@arcgis/core 6.0.0-next.28 → 6.0.0-next.29

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 (321) hide show
  1. package/arcgisGlobal.d.ts +0 -2
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/131185d26343a997495e.js +1 -0
  4. package/assets/esri/core/workers/chunks/{dbda982485d3fe26c729.js → 13c64087be3b2985a21b.js} +1 -1
  5. package/assets/esri/core/workers/chunks/144bad0c2415c345736a.js +1 -0
  6. package/assets/esri/core/workers/chunks/176d0a06ebff5a29dedf.js +1 -0
  7. package/assets/esri/core/workers/chunks/{b0ca81a07cff25df19d2.js → 176d75e76318bfc25a53.js} +1 -1
  8. package/assets/esri/core/workers/chunks/18776a130d96879a68b1.js +1 -0
  9. package/assets/esri/core/workers/chunks/{e35641a3a4da8cfbcf54.js → 189321d88026bd7e6d3e.js} +1 -1
  10. package/assets/esri/core/workers/chunks/18e7fa4d3e0b1a084cc6.js +1 -0
  11. package/assets/esri/core/workers/chunks/{1168bc5c9f0a7e1f63a2.js → 1989410a618865f02dec.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{2c0cb214fedb29487eef.js → 199a7f97916679e0257c.js} +1 -1
  13. package/assets/esri/core/workers/chunks/1c406ab2bf99ac563316.js +1 -0
  14. package/assets/esri/core/workers/chunks/1d96fbad881a7d14a950.js +1 -0
  15. package/assets/esri/core/workers/chunks/{42d44c7d532df5ee70e9.js → 1deca3de77b1a9a07da4.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{45f826554499c38968c6.js → 1ee4df0fd61440cb5f02.js} +1 -1
  17. package/assets/esri/core/workers/chunks/22e73501e1435a896826.js +1 -0
  18. package/assets/esri/core/workers/chunks/25657f70c5f04a4ed978.js +1 -0
  19. package/assets/esri/core/workers/chunks/276a0b549acf048e8673.js +1 -0
  20. package/assets/esri/core/workers/chunks/{56e903ccef66cbe18f92.js → 2cd60fd062d954322c1f.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{ad96132bc89671e595f3.js → 2d3e0e4442dbc6ec6def.js} +1 -1
  22. package/assets/esri/core/workers/chunks/2de4296590bf9f9e9add.js +1 -0
  23. package/assets/esri/core/workers/chunks/2f5d014d6a72108b0b3a.js +1 -0
  24. package/assets/esri/core/workers/chunks/{0363d29fc665d169ebc4.js → 3105336a05f38a95ebea.js} +1 -1
  25. package/assets/esri/core/workers/chunks/379ef56f6b32494832a6.js +1 -0
  26. package/assets/esri/core/workers/chunks/3aafdb905c697bc9b1ad.js +1 -0
  27. package/assets/esri/core/workers/chunks/40c2674dae73f0942751.js +1 -0
  28. package/assets/esri/core/workers/chunks/418addce122dbb8897b4.js +1 -0
  29. package/assets/esri/core/workers/chunks/4419732baf3459a80e6d.js +1 -0
  30. package/assets/esri/core/workers/chunks/4976f5567fc7f1b63d10.js +1 -0
  31. package/assets/esri/core/workers/chunks/4e17665dd9048c300d87.js +1 -0
  32. package/assets/esri/core/workers/chunks/5396b6e99a0546a25d19.js +1 -0
  33. package/assets/esri/core/workers/chunks/53c7510df09b71ab5646.js +1 -0
  34. package/assets/esri/core/workers/chunks/561c48cb4d49b150765b.js +1 -0
  35. package/assets/esri/core/workers/chunks/{d90a3bfd45b5ed4092e0.js → 590fe0f56bc4c33a50e7.js} +1 -1
  36. package/assets/esri/core/workers/chunks/5bb6c255bdc8aa9ba23e.js +1 -0
  37. package/assets/esri/core/workers/chunks/5f1cb79aec9c4a9b7ddc.js +29 -0
  38. package/assets/esri/core/workers/chunks/{23a4806b4cdf7cc32e4d.js → 5f787809b74eed7b9a91.js} +1 -1
  39. package/assets/esri/core/workers/chunks/636e9c4ac1f9ae98f9d1.js +1 -0
  40. package/assets/esri/core/workers/chunks/654f5441227579d2b6b4.js +1 -0
  41. package/assets/esri/core/workers/chunks/692f0093c444fcc752b5.js +1 -0
  42. package/assets/esri/core/workers/chunks/69627b2634da64dd885f.js +1 -0
  43. package/assets/esri/core/workers/chunks/6a7de221cea4426cb490.js +1 -0
  44. package/assets/esri/core/workers/chunks/7030a4d0714a35995a58.js +1 -0
  45. package/assets/esri/core/workers/chunks/72d20d3957d612f86431.js +1 -0
  46. package/assets/esri/core/workers/chunks/7862abd24fb5c3b12e6b.js +1 -0
  47. package/assets/esri/core/workers/chunks/7a0b4dc0cda190367a39.js +1 -0
  48. package/assets/esri/core/workers/chunks/{5eec1c1162779574f46e.js → 7c75a8ee266c36baa902.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{ab1660f5f8a5268c2fac.js → 84038dd85005fea413eb.js} +1 -1
  50. package/assets/esri/core/workers/chunks/849f446c718e892f39ce.js +1 -0
  51. package/assets/esri/core/workers/chunks/{8ac2098ecdc40ad41055.js → 8502274806ea52308822.js} +1 -1
  52. package/assets/esri/core/workers/chunks/865cebc5c982c040ab6f.js +1 -0
  53. package/assets/esri/core/workers/chunks/{76196c414e48834f7b92.js → 8f008eedb11685ee2048.js} +1 -1
  54. package/assets/esri/core/workers/chunks/90d797ab82d4a68ba32f.js +1 -0
  55. package/assets/esri/core/workers/chunks/9184c947cdefe06bf551.js +1 -0
  56. package/assets/esri/core/workers/chunks/9976eaa81085c0d17e14.js +1 -0
  57. package/assets/esri/core/workers/chunks/{177f353ce72133e2eeed.js → 9c2436464b7dfd666678.js} +1 -1
  58. package/assets/esri/core/workers/chunks/a125650edbed802e419a.js +1 -0
  59. package/assets/esri/core/workers/chunks/{23fd4de56de352f63e2d.js → a2196a49f89d57a0a1c7.js} +1 -1
  60. package/assets/esri/core/workers/chunks/ad21757d78e372fa2ed6.js +1 -0
  61. package/assets/esri/core/workers/chunks/b01688ccc29d33bfc82d.js +1 -0
  62. package/assets/esri/core/workers/chunks/b5eff28cf482d920b9ea.js +1 -0
  63. package/assets/esri/core/workers/chunks/{04ecf15524ff3838c01c.js → ba4520ddcb6a49988da6.js} +1 -1
  64. package/assets/esri/core/workers/chunks/be55771758e4bcef0976.js +1 -0
  65. package/assets/esri/core/workers/chunks/bead830a677690eeb6fb.js +1 -0
  66. package/assets/esri/core/workers/chunks/c131e0dd180a4c10e12e.js +1 -0
  67. package/assets/esri/core/workers/chunks/c1cf3edce15f09648eb4.js +1 -0
  68. package/assets/esri/core/workers/chunks/c4f78a481f43cfae7b63.js +1 -0
  69. package/assets/esri/core/workers/chunks/c570b90995c65bbb2e14.js +1 -0
  70. package/assets/esri/core/workers/chunks/c576bef77e34920af188.js +1 -0
  71. package/assets/esri/core/workers/chunks/c9feffb9884cfed52c4b.js +1 -0
  72. package/assets/esri/core/workers/chunks/cc97e4fd0dacad970a23.js +1 -0
  73. package/assets/esri/core/workers/chunks/ce324dde6d7daea33638.js +1 -0
  74. package/assets/esri/core/workers/chunks/d1d6154b4af1c9cc497b.js +1 -0
  75. package/assets/esri/core/workers/chunks/d3c3fb079ad97970f834.js +1 -0
  76. package/assets/esri/core/workers/chunks/daae21cf77864f3293ef.js +1 -0
  77. package/assets/esri/core/workers/chunks/dc2f93453dfa40f623ab.js +1 -0
  78. package/assets/esri/core/workers/chunks/dcf6024dc19428ff2b9d.js +1 -0
  79. package/assets/esri/core/workers/chunks/dd30b02c5978c1c5f511.js +1 -0
  80. package/assets/esri/core/workers/chunks/de3f140058aa0b907b65.js +1 -0
  81. package/assets/esri/core/workers/chunks/df375d1b0dab5ecbd1be.js +1 -0
  82. package/assets/esri/core/workers/chunks/{ef2c3febcceedc44b3ac.js → dfd4782b11d6fdca0492.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{48cc58890fddbcf69cef.js → e121d15b883184ee83e7.js} +1 -1
  84. package/assets/esri/core/workers/chunks/{67e06d606c7fd2064adf.js → e2c6cd8dac01e129ccfe.js} +1 -1
  85. package/assets/esri/core/workers/chunks/e3b212f8af448ec29eef.js +1 -0
  86. package/assets/esri/core/workers/chunks/e4042e43f0081fe49f7b.js +1 -0
  87. package/assets/esri/core/workers/chunks/e480e7d5f40049a2053b.js +1 -0
  88. package/assets/esri/core/workers/chunks/eaab787a5f2445be5e5a.js +1 -0
  89. package/assets/esri/core/workers/chunks/edd36a1fc80b1d29907e.js +1 -0
  90. package/assets/esri/core/workers/chunks/ee0dc906cc7979080329.js +1 -0
  91. package/assets/esri/core/workers/chunks/f07fb9b3fa30d7ee1681.js +1 -0
  92. package/assets/esri/core/workers/chunks/f09bc86cd52224febfcb.js +1 -0
  93. package/assets/esri/core/workers/chunks/{037c67ef5c4398d5954d.js → f2dab9fcd90ce38ae3d1.js} +1 -1
  94. package/assets/esri/core/workers/chunks/f39c700f3db7db52b522.js +1 -0
  95. package/assets/esri/core/workers/chunks/f3b4159c0722df8ffe13.js +1 -0
  96. package/assets/esri/core/workers/chunks/f3dc0bc0e00635855a7a.js +1 -0
  97. package/assets/esri/core/workers/chunks/f45064066e1ab041a0b2.js +1 -0
  98. package/assets/esri/core/workers/chunks/{dc7aa0a1eb6c6e361f9f.js → f7398cfd8bbd041bd635.js} +1 -1
  99. package/assets/esri/core/workers/chunks/f9dc38761b314d33890f.js +1 -0
  100. package/assets/esri/core/workers/chunks/fe6dcb21570395e46ce8.js +1 -0
  101. package/assets/esri/core/workers/chunks/{9c4961213ac6ec283dd9.js → fefdd10bdd5a4c8d8ed0.js} +44 -47
  102. package/assets/esri/core/workers/chunks/ffe49d9e7df081bef4a5.js +1 -0
  103. package/assets/esri/themes/base/_core.scss +0 -2
  104. package/assets/esri/themes/dark/main.css +1 -1
  105. package/assets/esri/themes/light/main.css +1 -1
  106. package/assets/esri/themes/light/view.css +1 -1
  107. package/chunks/Component.glsl.js +48 -48
  108. package/chunks/EmissionComposite.glsl.js +1 -1
  109. package/chunks/Fog.glsl.js +1 -1
  110. package/chunks/GaussianSplatDepth.glsl.js +15 -7
  111. package/chunks/GaussianSplatShadow.glsl.js +14 -4
  112. package/config.d.ts +12 -9
  113. package/config.js +1 -1
  114. package/form/FormTemplate.d.ts +1 -1
  115. package/form/elements/AttachmentElement.d.ts +2 -0
  116. package/form/elements/FieldElement.d.ts +2 -2
  117. package/form/elements/FieldElement.js +1 -1
  118. package/form/elements/RelationshipElement.d.ts +1 -1
  119. package/form/elements/TextElement.d.ts +2 -2
  120. package/form/elements/UtilityNetworkAssociationsElement.d.ts +1 -1
  121. package/form/elements/inputs/inputUtils.js +1 -1
  122. package/form/elements/inputs/types.d.ts +19 -0
  123. package/form/elements/inputs.d.ts +3 -2
  124. package/form/elements/inputs.js +1 -1
  125. package/interfaces.d.ts +0 -14
  126. package/kernel.js +1 -1
  127. package/layers/VideoLayer.d.ts +5 -5
  128. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  129. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  130. package/layers/orientedImagery/transformations/rotationUtils.js +2 -0
  131. package/layers/orientedImagery/transformations/utils.js +1 -1
  132. package/layers/save/parquetLayerUtils.js +1 -1
  133. package/layers/support/vectorTileLayerLoader.js +1 -1
  134. package/package.json +2 -2
  135. package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
  136. package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
  137. package/views/2d/engine/vectorTiles/style/GeoJSONVectorTileSource.js +1 -1
  138. package/views/2d/engine/vectorTiles/style/GeoJSONVectorTileSourceWorker.js +1 -1
  139. package/views/2d/engine/vectorTiles/style/geoJSONVectorTileUtils.js +2 -0
  140. package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
  141. package/views/2d/engine/webgl/collisions/LabelStore.js +1 -1
  142. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  143. package/views/2d/layers/features/FeatureContainer.js +1 -1
  144. package/views/2d/layers/support/visualVariableSimpleUtils.js +1 -1
  145. package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
  146. package/views/3d/support/ResourceController.js +1 -1
  147. package/views/3d/terrain/TerrainRenderer.js +1 -1
  148. package/views/3d/terrain/TerrainSurface.js +1 -1
  149. package/views/3d/terrain/TileAgent.js +1 -1
  150. package/views/3d/webgl-engine/Stage.js +1 -1
  151. package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
  152. package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +23 -26
  153. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +18 -21
  154. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js +5 -5
  155. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js +10 -12
  156. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +22 -25
  157. package/views/3d/webgl-engine/effects/RenderPluginContext.js +2 -0
  158. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  159. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  160. package/views/3d/webgl-engine/effects/glow/applyEmissiveGlow.glsl.js +3 -3
  161. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  162. package/views/3d/webgl-engine/lib/GaussianSplatDepthRenderer.js +1 -1
  163. package/views/3d/webgl-engine/lib/GaussianSplatRenderer.js +1 -1
  164. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  165. package/views/3d/webgl-engine/lib/edgeRendering/EdgeUtil.glsl.js +30 -35
  166. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  167. package/views/3d/webgl-engine/shaders/EmissiveTechniqueConfiguration.js +1 -1
  168. package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +62 -53
  169. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  170. package/views/VideoView.d.ts +10 -0
  171. package/views/VideoView.js +1 -1
  172. package/views/layers/LayerView.d.ts +10 -2
  173. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +2 -2
  174. package/widgets/Editor/EditorViewModel.d.ts +10 -12
  175. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  176. package/widgets/FeatureTable/support/EditableColumnTemplateMixin.js +1 -1
  177. package/widgets/OrientedImageryViewer/ImageMeasurementWorker.js +1 -1
  178. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  179. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  180. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  181. package/widgets/OrientedImageryViewer/imageMeasurementWorkerUtils.js +2 -0
  182. package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
  183. package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
  184. package/widgets/support/iconUtils.js +1 -1
  185. package/assets/esri/core/workers/chunks/010f57ec7fdbedf78d02.js +0 -1
  186. package/assets/esri/core/workers/chunks/03f33cb78b5405ab7e23.js +0 -1
  187. package/assets/esri/core/workers/chunks/0487e1d7a7cecf7c1c25.js +0 -1
  188. package/assets/esri/core/workers/chunks/09300e74e5b014ce6269.js +0 -1
  189. package/assets/esri/core/workers/chunks/0d9c4c6c571ce26d356b.js +0 -1
  190. package/assets/esri/core/workers/chunks/112ed86f812e4400a7e0.js +0 -1
  191. package/assets/esri/core/workers/chunks/151e5799ede763a03ee2.js +0 -1
  192. package/assets/esri/core/workers/chunks/173f89c55a5c79ff065b.js +0 -1
  193. package/assets/esri/core/workers/chunks/2447d2e2a4a3ab8fcf94.js +0 -1
  194. package/assets/esri/core/workers/chunks/2a36fe3f3f257a779a1b.js +0 -1
  195. package/assets/esri/core/workers/chunks/2a97268000c6d03ef720.js +0 -1
  196. package/assets/esri/core/workers/chunks/2cf8172be83b10b11bdc.js +0 -1
  197. package/assets/esri/core/workers/chunks/2df37a9a95ceebb87a5f.js +0 -1
  198. package/assets/esri/core/workers/chunks/2e00c155e447e4930442.js +0 -1
  199. package/assets/esri/core/workers/chunks/2f91fd61019d2a37476d.js +0 -1
  200. package/assets/esri/core/workers/chunks/30af63b3b750142faadb.js +0 -1
  201. package/assets/esri/core/workers/chunks/3a47fc97c400fca2c736.js +0 -1
  202. package/assets/esri/core/workers/chunks/3cd04d23b73beaf79650.js +0 -1
  203. package/assets/esri/core/workers/chunks/426b4eb500fdfe9df325.js +0 -1
  204. package/assets/esri/core/workers/chunks/45367aa8e5c5d574de94.js +0 -1
  205. package/assets/esri/core/workers/chunks/47c97640ec525676918b.js +0 -1
  206. package/assets/esri/core/workers/chunks/47d074136a7f8e551a9a.js +0 -1
  207. package/assets/esri/core/workers/chunks/4a6b92ecbb1f1c55cc43.js +0 -1
  208. package/assets/esri/core/workers/chunks/4cb751dc8d00bdaeb04c.js +0 -1
  209. package/assets/esri/core/workers/chunks/518ab22f80c3300bcfff.js +0 -1
  210. package/assets/esri/core/workers/chunks/53ff68d4f9e365fc15cd.js +0 -1
  211. package/assets/esri/core/workers/chunks/58609bf94f72bc4f1952.js +0 -1
  212. package/assets/esri/core/workers/chunks/586a929bc037e23857af.js +0 -1
  213. package/assets/esri/core/workers/chunks/5c7780f804d789cb37f5.js +0 -1
  214. package/assets/esri/core/workers/chunks/5d76f4d97beee494bbbf.js +0 -1
  215. package/assets/esri/core/workers/chunks/603fdbbe9534c614928f.js +0 -1
  216. package/assets/esri/core/workers/chunks/611e3cdf67283c11576f.js +0 -1
  217. package/assets/esri/core/workers/chunks/6431480ba0fa8c8d487f.js +0 -1
  218. package/assets/esri/core/workers/chunks/652faf4359ac072c5dde.js +0 -1
  219. package/assets/esri/core/workers/chunks/65c98f3449044fa4fd79.js +0 -1
  220. package/assets/esri/core/workers/chunks/6b9961261241fdce0e94.js +0 -1
  221. package/assets/esri/core/workers/chunks/6dfe96b056bec30068df.js +0 -1
  222. package/assets/esri/core/workers/chunks/6f897b4e7ddd1dd1672b.js +0 -1
  223. package/assets/esri/core/workers/chunks/70cc2d79653d66e85b58.js +0 -1
  224. package/assets/esri/core/workers/chunks/7159d9c36869cd82599e.js +0 -29
  225. package/assets/esri/core/workers/chunks/7393f63043a1da3d05a6.js +0 -1
  226. package/assets/esri/core/workers/chunks/7449568eb2305bf2d650.js +0 -1
  227. package/assets/esri/core/workers/chunks/75d551a449bba61ce238.js +0 -1
  228. package/assets/esri/core/workers/chunks/76e27e36050a3dd9d249.js +0 -1
  229. package/assets/esri/core/workers/chunks/76f877e2d2493d56afab.js +0 -1
  230. package/assets/esri/core/workers/chunks/7748c2886d0122b40eeb.js +0 -1
  231. package/assets/esri/core/workers/chunks/78643f116677950ea29a.js +0 -1
  232. package/assets/esri/core/workers/chunks/78fbe330f16bdbdb886e.js +0 -1
  233. package/assets/esri/core/workers/chunks/7e0f04a5038e2a4f6e4b.js +0 -1
  234. package/assets/esri/core/workers/chunks/7f16ae01ccd9b6114d1c.js +0 -1
  235. package/assets/esri/core/workers/chunks/90153b5230b3a4985c14.js +0 -1
  236. package/assets/esri/core/workers/chunks/9189dfe19a2a2ccd5173.js +0 -1
  237. package/assets/esri/core/workers/chunks/943a0f140813ee4ab04a.js +0 -1
  238. package/assets/esri/core/workers/chunks/98be2f621801e230aa01.js +0 -1
  239. package/assets/esri/core/workers/chunks/99f51d5d9da6e9bfc430.js +0 -1
  240. package/assets/esri/core/workers/chunks/9aebe876b1a2fb075f9c.js +0 -1
  241. package/assets/esri/core/workers/chunks/9b6929faf649e81265fb.js +0 -1
  242. package/assets/esri/core/workers/chunks/9dd48e75b4e8d9811d81.js +0 -1
  243. package/assets/esri/core/workers/chunks/a163c6005aba3378edaa.js +0 -1
  244. package/assets/esri/core/workers/chunks/a8286febe371dc186aaa.js +0 -1
  245. package/assets/esri/core/workers/chunks/acb265a22be5e12f38e5.js +0 -1
  246. package/assets/esri/core/workers/chunks/b12acf1f694f82e00df9.js +0 -1
  247. package/assets/esri/core/workers/chunks/b83cef2d3f528726d492.js +0 -1
  248. package/assets/esri/core/workers/chunks/b9596d862da1ec342cd3.js +0 -1
  249. package/assets/esri/core/workers/chunks/bc1fcc9c897461e68e29.js +0 -1
  250. package/assets/esri/core/workers/chunks/bdc221d94300c225665a.js +0 -1
  251. package/assets/esri/core/workers/chunks/be97a629e2ae4d13ceb3.js +0 -1
  252. package/assets/esri/core/workers/chunks/bfb39590c548188f5052.js +0 -1
  253. package/assets/esri/core/workers/chunks/c2318c014e97ba519be8.js +0 -1
  254. package/assets/esri/core/workers/chunks/c62237c344e341619341.js +0 -1
  255. package/assets/esri/core/workers/chunks/cdb5c26fed7d9a97db49.js +0 -1
  256. package/assets/esri/core/workers/chunks/cdf0c7706d3e1221f49b.js +0 -1
  257. package/assets/esri/core/workers/chunks/cea0db3ee326f60610eb.js +0 -1
  258. package/assets/esri/core/workers/chunks/d7f2f1708d2a2668676c.js +0 -1
  259. package/assets/esri/core/workers/chunks/daf9b691817e83a11f3c.js +0 -1
  260. package/assets/esri/core/workers/chunks/db41490bd39d863305bf.js +0 -1
  261. package/assets/esri/core/workers/chunks/ddc95cdac6c06fc4794c.js +0 -1
  262. package/assets/esri/core/workers/chunks/df26ec0b508cf4716e0a.js +0 -1
  263. package/assets/esri/core/workers/chunks/e11159e3dc3353b27c57.js +0 -1
  264. package/assets/esri/core/workers/chunks/e4a57a0a9629faafd6c6.js +0 -1
  265. package/assets/esri/core/workers/chunks/ebc1a2ef3aed8aa29424.js +0 -1
  266. package/assets/esri/core/workers/chunks/ec1c4d66142b6efb0e8b.js +0 -1
  267. package/assets/esri/core/workers/chunks/ef12fa3574d4cbf8b084.js +0 -1
  268. package/assets/esri/core/workers/chunks/f2d56f5c15d5977e1d19.js +0 -1
  269. package/assets/esri/core/workers/chunks/f7bfa3d33b05b250ce33.js +0 -1
  270. package/assets/esri/core/workers/chunks/f905f1a1aa4c123cbe83.js +0 -1
  271. package/assets/esri/core/workers/chunks/fc139f251dc0523074e7.js +0 -1
  272. package/assets/esri/themes/base/widgets/_VideoPlayer.scss +0 -129
  273. package/assets/esri/widgets/VideoPlayer/t9n/messages.ar.json +0 -1
  274. package/assets/esri/widgets/VideoPlayer/t9n/messages.bg.json +0 -1
  275. package/assets/esri/widgets/VideoPlayer/t9n/messages.bs.json +0 -1
  276. package/assets/esri/widgets/VideoPlayer/t9n/messages.ca.json +0 -1
  277. package/assets/esri/widgets/VideoPlayer/t9n/messages.cs.json +0 -1
  278. package/assets/esri/widgets/VideoPlayer/t9n/messages.da.json +0 -1
  279. package/assets/esri/widgets/VideoPlayer/t9n/messages.de.json +0 -1
  280. package/assets/esri/widgets/VideoPlayer/t9n/messages.el.json +0 -1
  281. package/assets/esri/widgets/VideoPlayer/t9n/messages.en.json +0 -1
  282. package/assets/esri/widgets/VideoPlayer/t9n/messages.es.json +0 -1
  283. package/assets/esri/widgets/VideoPlayer/t9n/messages.et.json +0 -1
  284. package/assets/esri/widgets/VideoPlayer/t9n/messages.fi.json +0 -1
  285. package/assets/esri/widgets/VideoPlayer/t9n/messages.fr.json +0 -1
  286. package/assets/esri/widgets/VideoPlayer/t9n/messages.he.json +0 -1
  287. package/assets/esri/widgets/VideoPlayer/t9n/messages.hr.json +0 -1
  288. package/assets/esri/widgets/VideoPlayer/t9n/messages.hu.json +0 -1
  289. package/assets/esri/widgets/VideoPlayer/t9n/messages.id.json +0 -1
  290. package/assets/esri/widgets/VideoPlayer/t9n/messages.it.json +0 -1
  291. package/assets/esri/widgets/VideoPlayer/t9n/messages.ja.json +0 -1
  292. package/assets/esri/widgets/VideoPlayer/t9n/messages.ko.json +0 -1
  293. package/assets/esri/widgets/VideoPlayer/t9n/messages.lt.json +0 -1
  294. package/assets/esri/widgets/VideoPlayer/t9n/messages.lv.json +0 -1
  295. package/assets/esri/widgets/VideoPlayer/t9n/messages.nl.json +0 -1
  296. package/assets/esri/widgets/VideoPlayer/t9n/messages.no.json +0 -1
  297. package/assets/esri/widgets/VideoPlayer/t9n/messages.pl.json +0 -1
  298. package/assets/esri/widgets/VideoPlayer/t9n/messages.pt-BR.json +0 -1
  299. package/assets/esri/widgets/VideoPlayer/t9n/messages.pt-PT.json +0 -1
  300. package/assets/esri/widgets/VideoPlayer/t9n/messages.ro.json +0 -1
  301. package/assets/esri/widgets/VideoPlayer/t9n/messages.ru.json +0 -1
  302. package/assets/esri/widgets/VideoPlayer/t9n/messages.sk.json +0 -1
  303. package/assets/esri/widgets/VideoPlayer/t9n/messages.sl.json +0 -1
  304. package/assets/esri/widgets/VideoPlayer/t9n/messages.sr.json +0 -1
  305. package/assets/esri/widgets/VideoPlayer/t9n/messages.sv.json +0 -1
  306. package/assets/esri/widgets/VideoPlayer/t9n/messages.th.json +0 -1
  307. package/assets/esri/widgets/VideoPlayer/t9n/messages.tr.json +0 -1
  308. package/assets/esri/widgets/VideoPlayer/t9n/messages.uk.json +0 -1
  309. package/assets/esri/widgets/VideoPlayer/t9n/messages.vi.json +0 -1
  310. package/assets/esri/widgets/VideoPlayer/t9n/messages.zh-CN.json +0 -1
  311. package/assets/esri/widgets/VideoPlayer/t9n/messages.zh-HK.json +0 -1
  312. package/assets/esri/widgets/VideoPlayer/t9n/messages.zh-TW.json +0 -1
  313. package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +0 -232
  314. package/widgets/VideoPlayer/VideoPlayerViewModel.js +0 -2
  315. package/widgets/VideoPlayer/components/MetadataSection.js +0 -2
  316. package/widgets/VideoPlayer/components/PlayerActionsGroup.js +0 -2
  317. package/widgets/VideoPlayer/components/PlayerControlsGroup.js +0 -2
  318. package/widgets/VideoPlayer/components/SettingsButton.js +0 -2
  319. package/widgets/VideoPlayer/css.js +0 -2
  320. package/widgets/VideoPlayer.d.ts +0 -119
  321. package/widgets/VideoPlayer.js +0 -2
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9235],{99235(t,e,s){s.d(e,{vt:()=>Vr,UD:()=>Er});var r=s(85334),n=s(49186),i=s(4718),o=s(32198),a=s(91429),l=s(94778),u=s(25482);let p=class extends u.o{constructor(){super(...arguments),this.raster=void 0}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"raster",void 0),p=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.BaseFunctionArguments")],p);const c=p;var h;let m=h=class extends c{constructor(){super(...arguments),this.raster2=void 0}get rasters(){return[this.raster,this.raster2]}clone(){return new h({raster:this.raster,raster2:this.raster2,operation:this.operation})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],m.prototype,"operation",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],m.prototype,"raster2",void 0),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],m.prototype,"rasters",null),m=h=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ArithmeticFunctionArguments")],m);const d=m;var g=s(14140),f=s(87186);const y=new Set(["slope","aspect","curvature","hillshade","shadedrelief","statistics"]);let w=class extends u.o{constructor(){super(...arguments),this.functionArguments=null,this.readingBufferSize=0,this.id=-1,this.isNoopProcess=!1,this.rawInputBandIds=[],this.rawSourceRasterInfos=null,this.isInputBandIdsSwizzled=!1,this.swizzledBandSelection=[],this.isBranch=!1,this.isRoot=!1,this._bindingResult=null}get supportsGPU(){return this._bindingResult.supportsGPU}get flatWebGLFunctionChain(){let t=this.getWebGLProcessorDefinition();if(!t)return null;let e=[t],{parameters:s}=t,r=s.rasters||s.raster&&[s.raster];for(;r?.length;){e.unshift(...r);let t=[];for(let e=0;e<r.length;e++){let{parameters:s}=r[e],n=s.rasters||s.raster&&[s.raster];n?.length&&t.push(...n)}r=t}for(let t=e.length-1;t>=0;t--)e[t].isNoopProcess&&e.splice(t,1);let n=!1;for(let t=0;t<e.length;t++){let s=e[t];s.id=e.length-t-1;let{rasters:r}=s.parameters;n||=null!=r&&r.length>1}let i=e.some(({name:t})=>y.has(t.toLowerCase())),{rawSourceRasterInfos:o}=this;return{functions:e,hasBranches:n,hasFocalFunction:i,isSourceSingleBand:1===o?.[0]?.bandCount}}get neighborhoodSize(){let{rows:t,cols:e}=this._getNeighborhoodSize(),s=this.getImmediateChildFunctions();for(let r of s){let s=r.neighborhoodSize;t=Math.max(t,s.rows),e=Math.max(e,s.cols)}return{rows:t,cols:e}}bind(t,e=!1,s=-1){this.id=s+1;let r=this._getRasterValues(),n=!0;for(let s=0;s<r.length;s++){let i=r[s];if(null!=i&&this._isRasterFunctionValue(i)){let r=i.bind(t,e,this.id+s);if(!r.success)return this._bindingResult=r,r;n&&=r.supportsGPU}}return!this.rasterInfo||e?(this.sourceRasterInfos=this._getSourceRasterInfos(t),this._bindingResult=this._bindSourceRasters(),n&&=this._bindingResult.supportsGPU,this._bindingResult.success&&(this._patchRasterInfo(),n&&this.isRoot&&(this.processInputBandIds(),this.swizzleInputBandIds(this.rawInputBandIds)||(n=this.rawInputBandIds.length<=3))),this._bindingResult.supportsGPU=n,this._bindingResult):(this._bindingResult={success:!0,supportsGPU:!0},this._bindingResult)}queryRasterFunction(t){let e=[this];for(;e.length;){let s=e.pop();if(t(s))return s;let r=s.getImmediateChildFunctions();e.push(...r)}}getImmediateChildFunctions(){return this._getRasterValues().filter(t=>t&&"object"==typeof t&&"bind"in t)}process(t,e){let s=this._getRasterValues(),r=0===s.length?t.pixelBlocks??t.primaryPixelBlocks:s.map(s=>this._readRasterValue(s,t,e));return this._processPixels({...t,pixelBlocks:r},e)}processInputBandIds(){let t=this._getRasterValues().filter(this._isRasterFunctionValue);if(t.length>1){let e=t.map(t=>t.processInputBandIds());return this.rawInputBandIds=[...new Set(e.flat())],this.rawInputBandIds}let e=t[0];if(e)return this.rawInputBandIds=e.processInputBandIds(),this.rawInputBandIds;let{bandCount:s}=this.sourceRasterInfos[0],r=Array.from({length:s},(t,e)=>e);return this.rawInputBandIds=this._getInputBandIds(r),this.rawInputBandIds}swizzleInputBandIds(t){let e=this._getRasterValues().filter(this._isRasterFunctionValue),s=!0;for(let r of e)s=r.swizzleInputBandIds(t)&&s;return!!s&&this._swizzleBandIds(t)}getPrimaryRasters(){let t=[],e=[];return this._getPrimaryRasters(this,t,e),{rasters:t,rasterIds:e}}getWebGLProcessorDefinition(){let t=this._getWebGLParameters(),{raster:e,rasters:s}=this.functionArguments;return s&&Array.isArray(s)&&s.length?(t.rasters=s.map(t=>this._isRasterFunctionValue(t)?t.getWebGLProcessorDefinition():"number"==typeof t?{name:"Constant",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1}:{name:"Identity",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1}),t.rasters.some(t=>null!=t)||(t.rasters=null)):this._isRasterFunctionValue(e)&&(t.raster=e.getWebGLProcessorDefinition()),{name:this.functionName,parameters:t,pixelType:this.outputPixelType,id:this.id,isNoopProcess:this.isNoopProcess}}getClippingGeometries(){let t=[];"Clip"===this.functionName&&t.push(this.functionArguments);let{raster:e,rasters:s}=this.functionArguments;if(s&&Array.isArray(s)&&s.length)s.forEach(e=>{if(this._isRasterFunctionValue(e)){let s=e.getClippingGeometries();t.push(...s)}});else if(this._isRasterFunctionValue(e)){let s=e.getClippingGeometries();t.push(...s)}return t}_getOutputPixelType(t){return"unknown"===this.outputPixelType?t:this.outputPixelType??t}_getWebGLParameters(){return{}}_getInputBandIds(t){return t}_swizzleBandIds(t){return!0}_isInputRasterPrimaryOrConstant(){return!this._getRasterValues().some(t=>t&&"object"==typeof t&&"rasterFunction"in t&&t.rasterFunction)}_getNeighborhoodSize(){return{rows:1,cols:1}}_removeStatsHistColormapVAT(t){t.statistics=null,t.histograms=null,t.colormap=null,t.attributeTable=null,t.multidimensionalInfo?.variables.forEach(t=>{t.statistics=void 0,t.histograms=void 0})}_getRasterValues(){let{rasterArgumentNames:t}=this;return"rasters"===t[0]?this.functionArguments.rasters??[]:t.flatMap(t=>this.functionArguments[t])}_getSourceRasterInfos(t){let e=this._getRasterValues(),{rasterInfos:s,rasterIds:r}=t;if(0===e.length)return s;let n=e.map(t=>t&&"object"==typeof t&&"bind"in t&&t.rasterInfo?t.rasterInfo:"string"==typeof t&&r.includes(t)?s[r.indexOf(t)]:"number"!=typeof t?s[0]:void 0),i=n.find(t=>t)??s[0];return n.forEach((t,e)=>{void 0===t&&(n[e]=i)}),n}_getPrimaryRasterId(t){return t?.rasterId}_getPrimaryRasters(t,e=[],s=[]){for(let r=0;r<t.sourceRasters.length;r++){let n=t.sourceRasters[r];if("number"!=typeof n)if("bind"in n)this._getPrimaryRasters(n,e,s);else{let t=n,r=this._getPrimaryRasterId(t);if(null==r)continue;s.includes(r)||(this.mainPrimaryRasterId===r?(e.unshift(t),s.unshift(r)):(e.push(t),s.push(r)))}}}_isRasterFunctionValue(t){return"object"==typeof t&&!!t&&"getWebGLProcessorDefinition"in t}_readRasterValue(t,e,s){let{primaryPixelBlocks:r}=e;if(null==t||"$$"===t){let t=r[0];return null==t?null:t.clone()}if("string"==typeof t){let s=e.primaryRasterIds.indexOf(t);return-1===s?null:r[s]}if("number"==typeof t){let e=r[0];if(null==e)return null;let{width:s,height:n,pixelType:i}=e,o=new Float32Array(s*n);o.fill(t);let a=this.sourceRasterInfos[0].bandCount,l=Array(a).fill(o);return new g.A({width:s,height:n,pixelType:i,pixels:l})}return t.process(e,s)}_patchRasterInfo(){let{rasterInfo:t}=this;if(!t?.keyProperties)return;let{bandCount:e,keyProperties:s,statistics:r,histograms:n}=t,i=s.BandProperties;i&&i.length!==e&&(t.keyProperties={...s,BandProperties:void 0}),r&&r.length!==e&&(t.statistics=r.length>e?r.slice(0,e):null),n&&n.length!==e&&(t.histograms=n.length>e?n.slice(0,e):null),s.BAND_COUNT&&Number(s.BAND_COUNT)!==e&&(t.keyProperties={...s,BAND_COUNT:"string"==typeof s.BAND_COUNT?String(e):e})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],w.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}}),(0,a.wg)(t=>t?.toLowerCase())],w.prototype,"outputPixelType",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"mainPrimaryRasterId",void 0),(0,o.Cg)([(0,a.MZ)()],w.prototype,"sourceRasters",void 0),(0,o.Cg)([(0,a.MZ)({type:[f.A],json:{write:!0}})],w.prototype,"sourceRasterInfos",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"rasterInfo",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"readingBufferSize",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"id",void 0),(0,o.Cg)([(0,a.MZ)()],w.prototype,"isNoopProcess",void 0),(0,o.Cg)([(0,a.MZ)()],w.prototype,"supportsGPU",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"rawInputBandIds",void 0),(0,o.Cg)([(0,a.MZ)()],w.prototype,"rawSourceRasterInfos",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"isInputBandIdsSwizzled",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"swizzledBandSelection",void 0),(0,o.Cg)([(0,a.MZ)()],w.prototype,"isBranch",void 0),(0,o.Cg)([(0,a.MZ)()],w.prototype,"isRoot",void 0),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],w.prototype,"flatWebGLFunctionChain",null),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],w.prototype,"neighborhoodSize",null),(0,o.Cg)([(0,a.MZ)()],w.prototype,"_bindingResult",void 0),w=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.BaseRasterFunction")],w);const x=w,v={userDefined:-1,lineDetectionHorizontal:0,lineDetectionVertical:1,lineDetectionLeftDiagonal:2,lineDetectionRightDiagonal:3,gradientNorth:4,gradientWest:5,gradientEast:6,gradientSouth:7,gradientNorthEast:8,gradientNorthWest:9,smoothArithmeticMean:10,smoothing3x3:11,smoothing5x5:12,sharpening3x3:13,sharpening5x5:14,laplacian3x3:15,laplacian5x5:16,sobelHorizontal:17,sobelVertical:18,sharpen:19,sharpen2:20,pointSpread:21,none:255},A={bitwiseAnd:11,bitwiseLeftShift:12,bitwiseNot:13,bitwiseOr:14,bitwiseRightShift:15,bitwiseXOr:16,booleanAnd:17,booleanNot:18,booleanOr:19,booleanXOr:20,equalTo:24,greaterThan:28,greaterThanEqual:29,lessThan:33,lessThanEqual:34,isNull:31,notEqual:46},C={acos:6,asin:7,atan:8,atanh:9,cos:21,cosh:22,sin:51,sinh:52,tan:56,tanh:57,acosh:59,asinh:60,atan2:61},b={setNull:50,conditional:78},M={plus:1,minus:2,times:3,sqrt:4,power:5,abs:10,divide:23,exp:25,exp10:26,exp2:27,int:30,float:32,ln:35,log10:36,log2:37,mod:44,negate:45,roundDown:48,roundUp:49,square:53,floatDivide:64,floorDivide:65,...A,...C,majority:38,max:39,mean:40,med:41,min:42,minority:43,range:47,stddev:54,sum:55,variety:58,majorityIgnoreNoData:66,maxIgnoreNoData:67,meanIgnoreNoData:68,medIgnoreNoData:69,minIgnoreNoData:70,minorityIgnoreNoData:71,rangeIgnoreNoData:72,stddevIgnoreNoData:73,sumIgnoreNoData:74,varietyIgnoreNoData:75,...b},P=new Map([[C.acos,{domain:[0,Math.PI],isInteger:!1}],[C.asin,{domain:[-Math.PI/2,Math.PI/2],isInteger:!1}],[C.atan,{domain:[-Math.PI/2,Math.PI/2],isInteger:!1}],[C.cos,{domain:[-1,1],isInteger:!1}],[C.sin,{domain:[-1,1],isInteger:!1}],[A.booleanAnd,{domain:[0,1],isInteger:!0}],[A.booleanNot,{domain:[0,1],isInteger:!0}],[A.booleanOr,{domain:[0,1],isInteger:!0}],[A.booleanXOr,{domain:[0,1],isInteger:!0}],[A.equalTo,{domain:[0,1],isInteger:!0}],[A.notEqual,{domain:[0,1],isInteger:!0}],[A.greaterThan,{domain:[0,1],isInteger:!0}],[A.greaterThanEqual,{domain:[0,1],isInteger:!0}],[A.lessThan,{domain:[0,1],isInteger:!0}],[A.lessThanEqual,{domain:[0,1],isInteger:!0}],[A.isNull,{domain:[0,1],isInteger:!0}]]);function T(t){return P.get(t)}const N=[0,2,2,2,1,2,1,1,1,1,1,2,2,1,2,2,2,2,1,2,2,1,1,2,2,1,1,1,2,2,1,1,1,2,2,1,1,1,999,999,999,999,999,999,2,1,2,999,1,1,2,1,1,1,999,999,1,1,999,1,1,2,999,999,2,2,999,999,999,999,999,999,999,999,999,999,3,999,3];function I(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]+n[t]);return o}function R(t,e,s){let[r]=t,n=r.length,i=g.A.createEmptyBand("f32",n);return i.set(r),i}function F(t,e,s){let[r]=t,n=r.length,i=g.A.createEmptyBand(s,n);for(let t=0;t<n;t++)(!e||e[t])&&(i[t]=r[t]*r[t]);return i}function _(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]-n[t]);return o}function k(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]*n[t]);return o}function S(t,e,s){let[r]=t,n=r.length,i=g.A.createEmptyBand(s,n);for(let t=0;t<n;t++)(!e||e[t])&&(i[t]=Math.sign(r[t])*Math.floor(Math.abs(r[t])));return i}function B(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]/n[t]);return o}function j(t,e,s){return B(t,e,"f32")}function Z(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=Math.floor(r[t]/n[t]));return o}function z(t,e,s,r){let n=t[0],i=n.length,o=g.A.createEmptyBand(s,i);if(r===C.atanh){for(let t=0;t<i;t++)if(e[t]){let s=n[t];Math.abs(s)>=1?e[t]=0:o[t]=Math.atanh(s)}return o}let a=r===C.asin?Math.asin:Math.acos;for(let t=0;t<i;t++)if(e[t]){let s=n[t];Math.abs(s)>1?e[t]=0:o[t]=a(s)}return o}function G(t,e,s,r){let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r(n[t]));return o}function O(t,e,s,r){let[n,i]=t,o=n.length,a=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)(!e||e[t])&&(a[t]=r(n[t],i[t]));return a}function D(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]&n[t]);return o}function E(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]<<n[t]);return o}function V(t,e,s){let[r]=t,n=r.length,i=g.A.createEmptyBand(s,n);for(let t=0;t<n;t++)(!e||e[t])&&(i[t]=~r[t]);return i}function U(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]|n[t]);return o}function L(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]>>n[t]);return o}function $(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]^n[t]);return o}function K(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]&&n[t]?1:0);return o}function W(t,e,s){let[r]=t,n=r.length,i=g.A.createEmptyBand(s,n);for(let t=0;t<n;t++)(!e||e[t])&&(i[t]=+!r[t]);return i}function H(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]||n[t]?1:0);return o}function q(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=+!!r[t]^!!n[t]);return o}function J(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=+(r[t]===n[t]));return o}function X(t,e,s,r){let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i),a=r===Math.E;for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=a?Math.exp(n[t]):r**n[t]);return o}function Q(t,e,s){return X(t,e,s,10)}function Y(t,e,s){return X(t,e,s,2)}function tt(t,e,s){return X(t,e,s,Math.E)}function et(t,e,s,r){let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(n[t]<=0?e[t]=0:o[t]=r(n[t]));return o}function st(t,e,s){return et(t,e,s,Math.log10)}function rt(t,e,s){return et(t,e,s,Math.log2)}function nt(t,e,s){return et(t,e,s,Math.log)}function it(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=+(r[t]>n[t]));return o}function ot(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=+(r[t]>=n[t]));return o}function at(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=+(r[t]<n[t]));return o}function lt(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=+(r[t]<=n[t]));return o}function ut(t,e,s){let[r]=t,n=r.length,i=g.A.createEmptyBand(s,n);if(!e)return i;for(let t=0;t<n;t++)i[t]=+!e[t];return i}function pt(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]%n[t]);return o}function ct(t,e,s){let[r]=t,n=r.length,i=g.A.createEmptyBand(s,n);for(let t=0;t<n;t++)(!e||e[t])&&(i[t]=-r[t]);return i}function ht(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]===n[t]?0:1);return o}function mt(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i),a=new Uint8Array(i);for(let t=0;t<i;t++)(null==e||e[t])&&0===r[t]&&(o[t]=n[t],a[t]=255);return{band:o,mask:a}}function dt(t,e,s){let[r,n,i]=t,o=r.length,a=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)(!e||e[t])&&(a[t]=r[t]?n[t]:i[t]);return a}function gt(t,e,s){let r=t.length;if(r<2)return t[0];let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let s=0;s<i;s++)if(!e||e[s]){let e=n[s];for(let n=1;n<r;n++){let r=t[n][s];e<r&&(e=r)}o[s]=e}return o}function ft(t,e,s){let r=t.length;if(r<2)return t[0];let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let s=0;s<i;s++)if(!e||e[s]){let e=n[s];for(let n=1;n<r;n++){let r=t[n][s];e>r&&(e=r)}o[s]=e}return o}function yt(t,e,s){let r=t.length;if(r<2)return t[0];let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let s=0;s<i;s++)if(!e||e[s]){let e=n[s],i=e;for(let n=1;n<r;n++){let r=t[n][s];i<r?i=r:e>r&&(e=r)}o[s]=i-e}return o}function wt(t,e,s){let r=t.length;if(r<2)return t[0];let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let s=0;s<i;s++)if(!e||e[s]){let e=0;for(let n=0;n<r;n++)e+=t[n][s];o[s]=e/r}return o}function xt(t,e,s){let r=t.length;if(r<2)return t[0];let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let s=0;s<i;s++)if(!e||e[s])for(let e=0;e<r;e++){let r=t[e];o[s]+=r[s]}return o}function vt(t,e,s){let r=t.length;if(r<2)return t[0];let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let s=0;s<i;s++)if(!e||e[s]){let e=new Float32Array(r),n=0;for(let i=0;i<r;i++){let r=t[i];n+=r[s],e[i]=r[s]}n/=r;let i=0;for(let t=0;t<r;t++)i+=(e[t]-n)**2;o[s]=Math.sqrt(i/r)}return o}function At(t,e,s){let r=t.length;if(r<2)return t[0];let n=Math.floor(r/2),[i]=t,o=i.length,a=g.A.createEmptyBand(s,o),l=new Float32Array(r),u=r%2==1;for(let s=0;s<o;s++)if(!e||e[s]){for(let e=0;e<r;e++)l[e]=t[e][s];l.sort(),a[s]=u?l[n]:(l[n]+l[n-1])/2}return a}function Ct(t,e,s){let[r,n]=t;if(null==n)return r;let i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]<n[t]?r[t]:n[t]);return o}function bt(t,e,s){let r=t.length;if(r<=2)return Ct(t,e,s);let n=t[0].length,i=g.A.createEmptyBand(s,n),o=new Map;for(let s=0;s<n;s++)if(!e||e[s]){o.clear();for(let e=0;e<r;e++){let r=t[e][s];o.set(r,o.has(r)?o.get(r)+1:1)}let e=0,n=0,a=[];for(let t of o.keys())e=o.get(t),e>n?(n=e,a.length=0,a.push(t)):e===n&&a.push(t);a.length>1&&a.sort((t,e)=>t-e),i[s]=a[0]}return i}function Mt(t,e,s){let r=t.length;if(r<=2)return Ct(t,e,s);let n=t[0].length,i=g.A.createEmptyBand(s,n),o=new Map;for(let s=0;s<n;s++)if(!e||e[s]){o.clear();for(let e=0;e<r;e++){let r=t[e][s];o.set(r,o.has(r)?o.get(r)+1:1)}let e=0,n=t.length,a=[];for(let t of o.keys())e=o.get(t),e<n?(n=e,a.length=0,a.push(t)):e===n&&a.push(t);a.length>1&&a.sort((t,e)=>t-e),i[s]=a[0]}return i}function Pt(t,e,s){let r=t.length;if(r<2)return t[0];let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i),a=new Set;for(let s=0;s<i;s++)if(!e||e[s]){let e;a.clear();for(let n=0;n<r;n++)e=t[n][s],a.add(e);o[s]=a.size}return o}const Tt=new Map,Nt=new Map,It=new Map,Rt=new Map;function Ft(){Tt.size||(Tt.set(4,Math.sqrt),Tt.set(6,Math.acos),Tt.set(7,Math.asin),Tt.set(8,Math.atan),Tt.set(9,Math.atanh),Tt.set(10,Math.abs),Tt.set(21,Math.cos),Tt.set(22,Math.cosh),Tt.set(48,Math.floor),Tt.set(49,Math.ceil),Tt.set(51,Math.sin),Tt.set(52,Math.sinh),Tt.set(56,Math.tan),Tt.set(57,Math.tanh),Tt.set(59,Math.acosh),Tt.set(60,Math.asinh),Tt.set(65,Math.floor),Nt.set(5,Math.pow),Nt.set(61,Math.atan2),It.set(1,I),It.set(2,_),It.set(3,k),It.set(11,D),It.set(12,E),It.set(13,V),It.set(14,U),It.set(15,L),It.set(16,$),It.set(17,K),It.set(18,W),It.set(19,H),It.set(20,q),It.set(23,B),It.set(24,J),It.set(25,tt),It.set(26,Q),It.set(27,Y),It.set(28,it),It.set(29,ot),It.set(30,S),It.set(31,ut),It.set(32,R),It.set(33,at),It.set(34,lt),It.set(35,nt),It.set(36,st),It.set(37,rt),It.set(44,pt),It.set(45,ct),It.set(46,ht),It.set(53,F),It.set(64,j),It.set(65,Z),It.set(76,dt),It.set(78,dt),Rt.set(38,bt),Rt.set(39,gt),Rt.set(40,wt),Rt.set(41,At),Rt.set(42,ft),Rt.set(43,Mt),Rt.set(47,yt),Rt.set(54,vt),Rt.set(55,xt),Rt.set(58,Pt),Rt.set(66,bt),Rt.set(67,gt),Rt.set(68,wt),Rt.set(69,At),Rt.set(70,ft),Rt.set(71,Mt),Rt.set(72,yt),Rt.set(73,vt),Rt.set(74,xt),Rt.set(75,Pt))}function _t(t,e,s={}){Ft();let r=function(t,e=!1){let s=t.map(t=>t.mask),r=s.filter(t=>null!=t),n=t[0].pixels[0].length;if(0===r.length||e&&r.length!==s.length)return new Uint8Array(n).fill(255);let i=r[0],o=new Uint8Array(i);if(1===r.length)return o;if(!e){for(let t=1;t<r.length;t++){let e=r[t];for(let t=0;t<o.length;t++)o[t]&&(o[t]=e[t]?255:0)}return o}for(let t=1;t<r.length;t++){let e=r[t];for(let t=0;t<o.length;t++)0===o[t]&&(o[t]=e[t]?255:0)}return o}(t,e>=66&&e<=75),{outputPixelType:n="f32"}=s,i=!Rt.has(e)||s.processAsMultiband,o=i?t[0].pixels.length:1,a=[];for(let s=0;s<o;s++){let o,u=Rt.has(e)&&!i?t.flatMap(t=>t.pixels):t.map(t=>t.pixels[s]),p=!0;if(e===b.setNull){let t=mt(u,r,n);o=t.band,r=t.mask,p=!1}else It.has(e)?o=It.get(e)(u,r,"f64"):Tt.has(e)?o=e===C.asin||e===C.acos||e===C.atanh?z(u,r,"f64",e):G(u,r,"f64",Tt.get(e)):Nt.has(e)?o=O(u,r,"f64",Nt.get(e)):Rt.has(e)?o=Rt.get(e)(u,r,"f64"):(o=u[0],p=!1);if(p&&e!==A.isNull&&!P.has(e)){let t=g.A.createEmptyBand(n,o.length);r||=new Uint8Array(o.length).fill(255),(0,l.$p)(o,r),(0,l.yM)(o,r,n,t),o=t}a.push(o)}let u=t[0];return new g.A({width:u.width,height:u.height,pixelType:n,mask:e===A.isNull?null:r,pixels:a})}let kt=class extends x{constructor(){super(...arguments),this.functionName="Arithmetic",this.functionArguments=null,this.rasterArgumentNames=["raster","raster2"]}_bindSourceRasters(){let{operation:t}=this.functionArguments;if(t<1||t>6)return{success:!1,supportsGPU:!1,error:"unsupported operation"};let e=this.sourceRasterInfos[0].clone();return this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(e),this.rasterInfo=e,{success:!0,supportsGPU:e.bandCount<=3}}_processPixels(t){let{pixelBlocks:e}=t;return null==e?.[0]||null==e?.[1]?null:function(t,e,s){return _t(t,e=[null,1,2,3,23,5,44][e]??1,{outputPixelType:s})}(e,this.functionArguments.operation,this.outputPixelType)}_getWebGLParameters(){let{operation:t}=this.functionArguments,e=["","plus","minus","times","divide","power","mod"][t],s=this.outputPixelType??"f32",[r,n]=(0,l.hP)(s),i=(0,l.zw)(s);return i&&(r-=1e-4,n+=1e-4),{imageCount:2,operationName:e,domainRange:[r,n],isOutputRounded:i}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],kt.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:d,json:{write:!0,name:"rasterFunctionArguments"}})],kt.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],kt.prototype,"rasterArgumentNames",void 0),kt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ArithmeticFunction")],kt);const St=kt;var Bt;let jt=Bt=class extends c{clone(){return new Bt({raster:this.raster})}};jt=Bt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.AspectFunctionArguments")],jt);const Zt=jt;var zt=s(51181);let Gt=class extends x{constructor(){super(...arguments),this.functionName="Aspect",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){let t=this.sourceRasterInfos[0];this.isGCS=t.spatialReference?.isGeographic??!1,this.outputPixelType=this._getOutputPixelType("f32");let e=t.clone();return e.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(e),e.statistics=[{min:-1,max:360,avg:180,stddev:30}],e.bandCount=1,this.rasterInfo=e,{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return null;let{extent:s,primaryPixelSizes:r}=t,n=r?.[0]??(s?{x:s.width/e.width,y:s.height/e.height}:{x:1,y:1});return(0,zt.di)(e,{resolution:n})}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Gt.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Zt,json:{write:!0,name:"rasterFunctionArguments"}})],Gt.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Gt.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Gt.prototype,"isGCS",void 0),Gt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.AspectFunction")],Gt);const Ot=Gt;var Dt=s(66552);const Et=new Set(["+","-","*","/","(",")"]);function Vt(t,e){return t.toLowerCase().startsWith("b")?e[parseInt(t.slice(1),10)-1]:parseFloat(t)}function Ut(t,e,s,r){if("number"==typeof s&&"number"==typeof r)return s+r;let n,i,o;"number"==typeof s?(o=r,n=o.length,i=new Float32Array(n),i.fill(s)):(n=s.length,i=s,r.constructor===Number?(o=new Float32Array(n),o.fill(r)):o=r);let a=new Float32Array(n);switch(e){case"+":for(let e=0;e<n;e++)(null==t||t[e])&&(a[e]=i[e]+o[e]);break;case"-":for(let e=0;e<n;e++)(null==t||t[e])&&(a[e]=i[e]-o[e]);break;case"*":for(let e=0;e<n;e++)(null==t||t[e])&&(a[e]=i[e]*o[e]);break;case"/":for(let e=0;e<n;e++)(null==t||t[e])&&o[e]&&(a[e]=i[e]/o[e]);break;case"(":case")":throw Error("encountered error with custom band index equation")}return a}function Lt(t,e){t.splice(e,1);let s=0,r=0;do{s=0,r=0;for(let e=0;e<t.length;e++)if("("===t[e])s=e;else if(")"===t[e]){r=e;break}r===s+1&&t.splice(s,2)}while(r===s+1);return t}function $t(t){if(1===t.length)return{opIndex:0,numIndex:0};let e=0,s=0;for(let r=0;r<t.length;r++)if("("===t[r])e=r;else if(")"===t[r]){s=r;break}let r=0===s?t:t.slice(e+1,s),n=-1;for(let t=0;t<r.length;t++)if("*"===r[t]||"/"===r[t]){n=t;break}if(n>-1)s>0&&(n+=e+1);else{for(let t=0;t<r.length;t++)if("+"===r[t]||"-"===r[t]){n=t;break}s>0&&(n+=e+1)}let i=0;for(let e=0;e<n;e++)"("===t[e]&&i++;return{opIndex:n,numIndex:n-i}}var Kt=s(47520);const Wt=new Dt.J({0:"custom",1:"ndvi",2:"savi",3:"tsavi",4:"msavi",5:"gemi",6:"pvi",7:"gvitm",8:"sultan",9:"vari",10:"gndvi",11:"sr",12:"ndvi-re",13:"sr-re",14:"mtvi2",15:"rtvi-core",16:"ci-re",17:"ci-g",18:"ndwi",19:"evi",20:"iron-oxide",21:"ferrous-minerals",22:"clay-minerals",23:"wndwi",24:"bai",25:"nbr",26:"ndbi",27:"ndmi",28:"ndsi",29:"mndwi"},{useNumericKeys:!0});function Ht(t,e){if(!(0,Kt.AB)(t))return t;let s,{equation:r,method:n}=e,i=e.bandIndexes.map(t=>t-1),{pixels:o,mask:a}=t;switch(n){case"gndvi":case"nbr":case"ndbi":case"ndvi":case"ndvi-re":case"ndsi":case"ndmi":case"mndwi":s=Jt(a,o[i[0]],o[i[1]]);break;case"ndwi":s=Jt(a,o[i[1]],o[i[0]]);break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":s=function(t,e,s){let r=s.length,n=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i]){let t=e[i],r=s[i];r&&(n[i]=t/r)}return[n]}(a,o[i[0]],o[i[1]]);break;case"ci-g":case"ci-re":s=function(t,e,s){let r=e.length,n=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i]){let t=e[i],r=s[i];r&&(n[i]=t/r-1)}return[n]}(a,o[i[0]],o[i[1]]);break;case"savi":s=function(t,e,s,r){let n=s.length,i=new Float32Array(n);for(let o=0;o<n;o++)if(null==t||t[o]){let t=s[o],n=e[o],a=n+t+r;a&&(i[o]=(n-t)/a*(1+r))}return[i]}(a,o[i[0]],o[i[1]],i[2]+1);break;case"tsavi":s=function(t,e,s,r,n,i){let o=s.length,a=new Float32Array(o),l=-n*r+i*(1+r*r);for(let i=0;i<o;i++)if(null==t||t[i]){let t=s[i],o=e[i],u=n*o+t+l;u&&(a[i]=r*(o-r*t-n)/u)}return[a]}(a,o[i[0]],o[i[1]],i[2]+1,i[3]+1,i[4]+1);break;case"msavi":s=function(t,e,s){let r=s.length,n=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i]){let t=s[i],r=e[i],o=2*r+1;n[i]=.5*(o-Math.sqrt(o*o-8*(r-t)))}return[n]}(a,o[i[0]],o[i[1]]);break;case"gemi":s=function(t,e,s){let r=s.length,n=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i]){let t=s[i],r=e[i];if(1!==t&&r+t+.5!==0){let e=(2*(r*r-t*t)+1.5*r+.5*t)/(r+t+.5);n[i]=e*(1-.25*e)-(t-.125)/(1-t)}}return[n]}(a,o[i[0]],o[i[1]]);break;case"pvi":s=function(t,e,s,r,n){let i=s.length,o=new Float32Array(i),a=1/Math.sqrt(1+r*r);for(let l=0;l<i;l++)if(null==t||t[l]){let t=s[l],i=e[l];o[l]=(i-r*t-n)*a}return[o]}(a,o[i[0]],o[i[1]],i[2]+1,i[3]+1);break;case"gvitm":s=function(t,e){let[s,r,n,i,o,a]=e,l=s.length,u=new Float32Array(l);for(let e=0;e<l;e++)(null==t||t[e])&&(u[e]=-.2848*s[e]-.2435*r[e]-.5436*n[e]+.7243*i[e]+.084*o[e]-.18*a[e]);return[u]}(a,[o[i[0]],o[i[1]],o[i[2]],o[i[3]],o[i[4]],o[i[5]]]);break;case"sultan":s=function(t,e){let[s,r,n,i,o]=e,a=s.length,l=new Float32Array(a),u=new Float32Array(a),p=new Float32Array(a);for(let e=0;e<a;e++)(null==t||t[e])&&(l[e]=o[e]?i[e]/o[e]*100:0,u[e]=s[e]?i[e]/s[e]*100:0,p[e]=n[e]?r[e]/n[e]*(i[e]/n[e])*100:0);return[l,u,p]}(a,[o[i[0]],o[i[1]],o[i[2]],o[i[3]],o[i[4]]]);break;case"vari":s=function(t,e){let[s,r,n]=e,i=s.length,o=new Float32Array(i);for(let e=0;e<i;e++)if(null==t||t[e])for(e=0;e<i;e++){let t=s[e],i=r[e],a=i+t-n[e];a&&(o[e]=(i-t)/a)}return[o]}(a,[o[i[0]],o[i[1]],o[i[2]]]);break;case"mtvi2":s=function(t,e){let[s,r,n]=e,i=s.length,o=new Float32Array(i);for(let e=0;e<i;e++)if(null==t||t[e])for(e=0;e<i;e++){let t=s[e],i=r[e],a=n[e],l=Math.sqrt((2*t+1)**2-(6*t-5*Math.sqrt(i))-.5);if(l){let s=1.5*(1.2*(t-a)-2.5*(i-a));o[e]=s/l}}return[o]}(a,[o[i[0]],o[i[1]],o[i[2]]]);break;case"rtvi-core":s=function(t,e){let[s,r,n]=e,i=s.length,o=new Float32Array(i);for(let e=0;e<i;e++)if(null==t||t[e])for(e=0;e<i;e++){let t=s[e],i=r[e],a=n[e];o[e]=100*(t-i)-10*(t-a)}return[o]}(a,[o[i[0]],o[i[1]],o[i[2]]]);break;case"evi":s=function(t,e){let[s,r,n]=e,i=s.length,o=new Float32Array(i);for(let e=0;e<i;e++)if(null==t||t[e])for(e=0;e<i;e++){let t=s[e],i=r[e],a=t+6*i-7.5*n[e]+1;a&&(o[e]=2.5*(t-i)/a)}return[o]}(a,[o[i[0]],o[i[1]],o[i[2]]]);break;case"wndwi":s=function(t,e,s=.5){let[r,n,i]=e,o=n.length,a=new Float32Array(o);for(let e=0;e<o;e++)if(null==t||t[e])for(e=0;e<o;e++){let t=r[e],o=n[e],l=i[e],u=t+s*o+(1-s)*l;u&&(a[e]=(t-s*o-(1-s)*l)/u)}return[a]}(a,[o[i[0]],o[i[1]],o[i[2]]],i[3]?i[3]+1:.5);break;case"bai":s=function(t,e,s){let r=s.length,n=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i])for(i=0;i<r;i++){let t=(.1-e[i])**2+(.06-s[i])**2;t&&(n[i]=1/t)}return[n]}(a,o[i[0]],o[i[1]]);break;case"custom":s=function(t,e,s){let r,{ops:n,nums:i}=function(t,e){(t=t.replaceAll(" ","")).startsWith("-")&&(t="0"+t),t.startsWith("+")&&(t=t.slice(1));let s=t.split(""),r=[],n=[],i="";for(let t=0;t<s.length;t++){let o=s[t];Et.has(o)?(i.length&&n.push(Vt(i,e)),r.push(o),i=""):i=i.concat(o)}return i.length&&n.push(Vt(i,e)),{ops:r,nums:n}}(s,e);if(0===n.length){let t=1===i.length?i[0]:e[0];if(t instanceof Float32Array)return[t];let s=new Float32Array(e[0].length);return"number"==typeof t?s.fill(t):s.set(t),[s]}for(;n.length>0;){let{numIndex:e,opIndex:s}=$t(n);if(r=Ut(t,n[s],i[e],i[e+1]),1===n.length)break;n=Lt(n,s),i.splice(e,2,r)}return[r]}(a,o,r);break;default:return t}let u,{outputPixelType:p="f32"}=e,c=null!=p&&(0,l.zw)(p);a?(u=new Uint8Array(t.width*t.height),u.set(a)):c&&(u=new Uint8Array(t.width*t.height).fill(255)),c&&(s=s.map(t=>{let e=g.A.createEmptyBand(p,t.length);return(0,l.yM)(t,u,p,e),e}));let h=new g.A({width:t.width,height:t.height,pixelType:p,pixels:s,mask:u});return h.updateStatistics(),h}function qt(t){let e=new Float32Array(9);return e[3*t[0]]=1,e[3*t[1]+1]=1,e[3*t[2]+2]=1,e}function Jt(t,e,s){let r=s.length,n=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i]){let t=e[i],r=s[i],o=t+r;o&&(n[i]=(t-r)/o)}return[n]}var Xt,Qt=s(93223);let Yt=Xt=class extends c{constructor(){super(...arguments),this.method="custom"}clone(){return new Xt({method:this.method,bandIndexes:this.bandIndexes,raster:(0,i.o8)(this.raster)})}};(0,o.Cg)([(0,a.MZ)({json:{type:String,write:!0}})],Yt.prototype,"bandIndexes",void 0),(0,o.Cg)([(0,Qt.e)(Wt)],Yt.prototype,"method",void 0),Yt=Xt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.BandArithmeticFunctionArguments")],Yt);const te=Yt,ee=new Set(["vari","mtvi2","rtvi-core","evi"]);let se=class extends x{constructor(){super(...arguments),this.functionName="BandArithmetic",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");let t=this.sourceRasterInfos[0];if(t.bandCount<2)return{success:!1,supportsGPU:!1,error:"band-arithmetic-function: source raster has insufficient amount of raster bands"};let e=t.clone();return e.pixelType=this.outputPixelType,e.bandCount="sultan"===this.functionArguments.method?3:1,this._removeStatsHistColormapVAT(e),e.keyProperties={...e.keyProperties,BandProperties:void 0},this.rasterInfo=e,{success:!0,supportsGPU:!["custom","gvitm","sultan"].includes(this.functionArguments.method)}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return e;let{method:s,bandIndexes:r}=this.functionArguments,n=r.split(" ").map(t=>parseFloat(t));if(this.rasterInfo.storageInfo.isBsqTile){let{rawInputBandIds:t}=this,e=ee.has(this.functionArguments.method)?3:2,s=n.slice(0,e).map(e=>t.indexOf(e-1));n.splice(0,e,...s)}return Ht(e,{method:s,bandIndexes:n,equation:r,outputPixelType:this.outputPixelType})}_getWebGLParameters(){let t=this.functionArguments.bandIndexes.split(" ").map(t=>parseFloat(t)-1);2===t.length&&t.push(0);let e,s,r=this.isInputBandIdsSwizzled?[0,1,2]:t,n=new Float32Array(3),{method:i}=this.functionArguments;switch(i){case"gndvi":case"nbr":case"ndbi":case"ndvi":case"ndvi-re":case"ndsi":case"ndmi":case"mndwi":e=qt([r[0],r[1],0]),s="ndxi";break;case"ndwi":e=qt([r[1],r[0],0]),s="ndxi";break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":e=qt([r[0],r[1],0]),s="sr";break;case"ci-g":case"ci-re":e=qt([r[0],r[1],0]),s="ci";break;case"savi":e=qt([r[0],r[1],0]),s="savi",n[0]=t[2]+1;break;case"tsavi":e=qt([r[0],r[1],0]),s="tsavi",n[0]=t[2]+1,n[1]=t[3]+1,n[2]=t[4]+1;break;case"msavi":e=qt([r[0],r[1],0]),s="msavi";break;case"gemi":e=qt([r[0],r[1],0]),s="gemi";break;case"pvi":e=qt([r[0],r[1],0]),s="tsavi",n[0]=t[2]+1,n[1]=t[3]+1;break;case"vari":e=qt([r[0],r[1],r[2]]),s="vari";break;case"mtvi2":e=qt([r[0],r[1],r[2]]),s="mtvi";break;case"rtvi-core":e=qt([r[0],r[1],r[2]]),s="rtvicore";break;case"evi":e=qt([r[0],r[1],r[2]]),s="evi";break;case"wndwi":e=qt([r[0],r[1],0]),s="wndwi",n[0]=t[3]?t[3]+1:.5;break;case"bai":e=qt([r[1],r[0],0]),s="bai";break;default:e=qt([0,1,2]),s="custom"}return{bandIndexMat3:e,indexType:s,adjustments:n,isOutputRounded:(0,l.zw)(this.outputPixelType)}}_getInputBandIds(t){if("custom"===this.functionArguments.method)return t;let e=this.functionArguments.bandIndexes.split(" ").map(t=>parseFloat(t)-1),s=t.length,r=e.map(t=>t>=s?s-1:t),n=ee.has(this.functionArguments.method)?3:2,i=r.slice(0,n).map(e=>t[e]);return 2===i.length&&i.push(0),i}_swizzleBandIds(t){let e=this.functionArguments.bandIndexes.split(" ").map(t=>parseFloat(t)-1);2===e.length&&e.push(0);let{method:s}=this.functionArguments,r=(["vari","mtvi2","rtvi-core","evi"].includes(s)?e.slice(0,3):"bai"===s||"ndwi"===s?[e[1],e[0]]:e.slice(0,2)).map(e=>t.indexOf(e));return r[2]??=r[1],this.isInputBandIdsSwizzled=!0,this.swizzledBandSelection=r,!1}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],se.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:te,json:{write:!0,name:"rasterFunctionArguments"}})],se.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],se.prototype,"rasterArgumentNames",void 0),se=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.BandArithmeticFunction")],se);const re=se;var ne,ie=s(65864),oe=s(50498);const ae=new Dt.J({1:"outside",2:"inside"},{useNumericKeys:!0});let le=ne=class extends c{constructor(){super(...arguments),this.clippingType="outside"}clone(){return new ne({clippingGeometry:this.clippingGeometry.clone(),clippingType:this.clippingType})}};(0,o.Cg)([(0,a.MZ)({types:oe.yR,json:{read:ie.rS,write:!0}})],le.prototype,"clippingGeometry",void 0),(0,o.Cg)([(0,a.MZ)({json:{read:ae.read,write:ae.write}})],le.prototype,"clippingType",void 0),le=ne=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ClipFunctionArguments")],le);const ue=le;var pe=s(34930),ce=s(37373);let he=class extends x{constructor(){super(...arguments),this.functionName="Clip",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){let t=this.sourceRasterInfos[0].clone();this.outputPixelType=this._getOutputPixelType(t.pixelType),t.pixelType=this.outputPixelType,this.rasterInfo=t;let{functionArguments:e}=this,{clippingGeometry:s,clippingType:r}=e;if(!s)return{success:!1,supportsGPU:!1,error:"missing clipping geometry"};if("outside"===r)try{let{spatialReference:e}=t,r="extent"===s.type?(0,ce._l)(s,e):(0,ce.uk)(s,e).extent;r&&(0,pe.Sd)(t,r)}catch{}return{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}_getWebGLParameters(){let{clippingGeometry:t,clippingType:e}=this.functionArguments;return{clippingGeometry:t.toJSON(),clippingType:e}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],he.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:ue,json:{write:!0,name:"rasterFunctionArguments"}})],he.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],he.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],he.prototype,"isNoopProcess",void 0),he=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ClipFunction")],he);const me=he;var de,ge=s(67369),fe=s(95349),ye=s(36005);let we=de=class extends c{castColormapName(t){if(!t)return null;let e=t.toLowerCase();return ge.L7.includes(e)?e:null}readColorRamp(t){return(0,fe.r)(t)}readColorRampName(t,e){if(!t)return null;let s=ge.kH.jsonValues.find(e=>e.toLowerCase()===t.toLowerCase());return s?ge.kH.fromJSON(s):null}clone(){return new de({colormap:(0,i.o8)(this.colormap),colormapName:this.colormapName,colorRamp:this.colorRamp?.clone(),colorRampName:this.colorRampName})}};(0,o.Cg)([(0,a.MZ)({type:[[Number]],json:{write:!0}})],we.prototype,"colormap",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],we.prototype,"colormapName",void 0),(0,o.Cg)([(0,a.wg)("colormapName")],we.prototype,"castColormapName",null),(0,o.Cg)([(0,a.MZ)({types:fe.g,json:{write:!0}})],we.prototype,"colorRamp",void 0),(0,o.Cg)([(0,ye.w)("colorRamp")],we.prototype,"readColorRamp",null),(0,o.Cg)([(0,a.MZ)({type:ge.kH.apiValues,json:{type:ge.kH.jsonValues,write:ge.kH.write}})],we.prototype,"colorRampName",void 0),(0,o.Cg)([(0,ye.w)("colorRampName")],we.prototype,"readColorRampName",null),we=de=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapFunctionArguments")],we);const xe=we,ve=[[36,0,255],[36,0,255],[36,0,255],[36,0,255],[112,75,3],[113,76,3],[114,77,3],[115,77,3],[116,78,3],[117,79,3],[118,79,3],[119,80,3],[121,81,4],[122,82,4],[123,82,4],[124,83,4],[125,84,4],[126,84,4],[127,85,4],[128,86,4],[129,86,4],[130,87,4],[131,88,4],[132,89,4],[133,89,4],[134,90,4],[135,91,4],[136,91,4],[137,92,4],[138,93,4],[139,94,4],[140,94,4],[142,95,5],[143,96,5],[144,96,5],[145,97,5],[146,98,5],[147,99,5],[148,99,5],[149,100,5],[150,101,5],[151,101,5],[152,102,5],[153,103,5],[154,104,5],[155,104,5],[156,105,5],[157,106,5],[158,106,5],[159,107,5],[160,108,5],[161,108,5],[162,109,5],[164,110,6],[165,111,6],[166,111,6],[167,112,6],[168,113,6],[169,113,6],[170,114,6],[171,115,6],[172,116,6],[173,116,6],[174,117,6],[245,0,0],[245,5,0],[245,10,0],[246,15,0],[246,20,0],[246,25,0],[246,30,0],[247,35,0],[247,40,0],[247,45,0],[247,50,0],[247,55,0],[248,60,0],[248,65,0],[248,70,0],[248,75,0],[249,81,0],[249,86,0],[249,91,0],[249,96,0],[250,101,0],[250,106,0],[250,111,0],[250,116,0],[250,121,0],[251,126,0],[251,131,0],[251,136,0],[251,141,0],[252,146,0],[252,151,0],[252,156,0],[252,156,0],[251,159,0],[250,162,0],[249,165,0],[248,168,0],[247,171,0],[246,174,0],[245,177,0],[245,179,0],[244,182,0],[243,185,0],[242,188,0],[241,191,0],[240,194,0],[239,197,0],[238,200,0],[237,203,0],[236,206,0],[235,209,0],[234,212,0],[233,215,0],[232,218,0],[231,221,0],[230,224,0],[230,226,0],[229,229,0],[228,232,0],[227,235,0],[226,238,0],[225,241,0],[224,244,0],[223,247,0],[165,247,0],[163,244,0],[161,240,0],[158,237,0],[156,233,1],[154,230,1],[152,227,1],[149,223,1],[147,220,1],[145,216,1],[143,213,1],[140,210,2],[138,206,2],[136,203,2],[134,200,2],[132,196,2],[129,193,2],[127,189,2],[125,186,3],[123,183,3],[120,179,3],[118,176,3],[116,172,3],[114,169,3],[111,166,3],[109,162,4],[107,159,4],[105,155,4],[103,152,4],[100,149,4],[98,145,4],[96,142,4],[94,138,5],[91,135,5],[89,132,5],[87,128,5],[85,125,5],[82,121,5],[80,118,5],[78,115,6],[76,111,6],[73,108,6],[71,105,6],[69,101,6],[67,98,6],[65,94,6],[62,91,7],[60,88,7],[58,84,7],[56,81,7],[53,77,7],[51,74,7],[49,71,7],[47,67,8],[44,64,8],[42,60,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8]],Ae=[[36,0,255],[36,0,255],[36,0,255],[36,0,255],[245,20,0],[245,24,0],[245,29,0],[245,31,0],[247,33,0],[247,33,0],[247,37,0],[247,41,0],[247,41,0],[247,41,0],[247,45,0],[247,45,0],[247,47,0],[247,49,0],[247,49,0],[247,54,0],[247,54,0],[247,56,0],[247,58,0],[247,58,0],[250,62,0],[250,62,0],[250,62,0],[250,67,0],[250,67,0],[250,67,0],[250,69,0],[250,71,0],[250,71,0],[250,75,0],[250,75,0],[250,78,0],[250,79,0],[250,79,0],[250,79,0],[250,81,0],[250,83,0],[250,83,0],[250,87,0],[250,87,0],[250,90,0],[250,92,0],[252,93,0],[252,93,0],[252,97,0],[252,97,0],[252,97,0],[252,97,0],[252,101,0],[252,101,0],[252,101,0],[252,101,0],[252,105,0],[252,105,0],[252,107,0],[252,109,0],[252,109,0],[252,113,13],[255,118,20],[255,119,23],[255,121,25],[255,126,33],[255,132,38],[255,133,40],[255,135,43],[255,141,48],[255,144,54],[255,150,59],[255,152,61],[255,153,64],[255,159,69],[255,163,77],[255,165,79],[255,168,82],[255,174,87],[255,176,92],[255,181,97],[255,183,99],[255,186,102],[255,191,107],[255,197,115],[255,201,120],[255,203,123],[255,205,125],[255,209,130],[255,214,138],[255,216,141],[255,218,143],[255,224,150],[255,228,156],[255,234,163],[255,236,165],[255,238,168],[255,243,173],[255,248,181],[255,252,186],[253,252,186],[250,252,187],[244,250,180],[238,247,176],[234,246,173],[231,245,169],[223,240,163],[217,237,157],[211,235,150],[205,233,146],[200,230,142],[195,227,136],[189,224,132],[184,222,126],[180,220,123],[174,217,119],[169,214,114],[163,212,108],[160,210,105],[154,207,101],[148,204,96],[143,201,93],[138,199,88],[134,197,84],[130,194,81],[126,191,77],[117,189,70],[115,186,68],[112,184,64],[106,181,60],[100,179,55],[94,176,49],[92,174,47],[90,173,45],[81,168,37],[75,166,33],[71,163,28],[66,160,24],[62,158,21],[56,156,14],[51,153,0],[51,153,0],[51,153,0],[50,150,0],[50,150,0],[50,150,0],[50,150,0],[49,148,0],[49,148,0],[49,148,0],[48,145,0],[48,145,0],[48,145,0],[48,145,0],[48,143,0],[48,143,0],[48,143,0],[48,143,0],[47,140,0],[47,140,0],[47,140,0],[47,140,0],[46,138,0],[46,138,0],[46,138,0],[46,138,0],[45,135,0],[45,135,0],[45,135,0],[45,135,0],[44,133,0],[44,133,0],[44,133,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[42,128,0],[42,128,0],[42,128,0],[42,125,0],[42,125,0],[42,125,0],[42,125,0],[41,122,0],[41,122,0],[41,122,0],[41,122,0],[40,120,0],[40,120,0],[40,120,0],[40,120,0],[40,120,0],[39,117,0],[39,117,0],[39,117,0],[39,117,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0]];function Ce(t,e){let s=[],r=[];for(let e=0;e<t.length-1;e++)s.push({type:"algorithmic",algorithm:"esriHSVAlgorithm",fromColor:t[e].slice(1),toColor:t[e+1].slice(1)}),r.push(t[e+1][0]-t[e][0]);let n=t[t.length-1][0];return e??=r,(0,ge.iv)({type:"multipart",colorRamps:s},{numColors:n,weights:e})}let be=class extends x{constructor(){super(...arguments),this.functionName="Colormap",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){let t=this.sourceRasterInfos[0];if(t.bandCount>1)return{success:!1,supportsGPU:!1,error:"colormap-function: source data must be single band"};let{colormap:e,colormapName:s,colorRamp:r,colorRampName:n}=this.functionArguments;if(!e?.length)if(r)this.colorRamp=r,e=(0,ge.R8)(r,{interpolateAlpha:!0});else if(n){let t=(0,ge.M5)(n);t&&(e=(0,ge.R8)(t),this.colorRamp=(0,fe.r)(t))}else s&&(e=function(t){let e;switch(t){case"elevation":e=Ce([[0,0,191,191],[51,0,0,255],[102,255,0,255],[153,255,0,127],[204,191,63,127],[256,20,20,20]]);break;case"gray":e=(0,ge.iv)({type:"algorithmic",algorithm:"esriHSVAlgorithm",fromColor:[0,0,0],toColor:[255,255,255]});break;case"hillshade":e=Ce([[0,38,41,54],[69,79,82,90],[131,156,156,156],[256,253,253,241]],[.268,.238,.495]);break;case"ndvi":e=ve;break;case"ndvi2":e=function(){let t=Ce([[0,255,255,255],[70,0,255,0],[80,205,173,193],[100,150,150,150],[110,120,51,100],[130,120,100,200],[140,28,3,144],[160,6,0,55],[180,10,25,30],[201,6,7,27]]);for(let e=t.length;e<256;e++)t.push([6,27,7]);return t}();break;case"ndvi3":e=Ae;break;case"random":e=function(){let t=[];for(let e=0;e<256;e++){let e=[];for(let t=0;t<3;t++)e.push(Math.round(255*Math.random()));t.push(e)}return t}()}return e?(e=e.map((t,e)=>[e,...t]),e):null}(s));if(!e?.length)return{success:!1,supportsGPU:!1,error:"colormap-function: missing colormap argument"};let i=this._getOutputPixelType(t.pixelType);this.outputPixelType=i.startsWith("f")?"s32":i;let o=t.clone();return o.pixelType=this.outputPixelType,o.colormap=e,o.bandCount=1,this.rasterInfo=o,{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];return!e||(0,l.zw)(e.pixelType)||(e=e.clone(),e.clamp(this.outputPixelType)),e}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],be.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:xe,json:{write:!0,name:"rasterFunctionArguments"}})],be.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],be.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],be.prototype,"isNoopProcess",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],be.prototype,"indexedColormap",void 0),(0,o.Cg)([(0,a.MZ)()],be.prototype,"colorRamp",void 0),be=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapFunction")],be);const Me=be;var Pe;let Te=Pe=class extends c{clone(){return new Pe({raster:this.raster})}};Te=Pe=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapToRGBFunctionArguments")],Te);const Ne=Te;var Ie=s(4151),Re=s(88178);let Fe=class extends x{constructor(){super(...arguments),this.functionName="ColormapToRGB",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let t=this.sourceRasterInfos[0];if(t.bandCount>1||!t.colormap?.length)return{success:!1,supportsGPU:!1,error:"colormap-to-rgb-function: source data must be single band with a colormap"};let e=t.clone();e.pixelType=this.outputPixelType=this._getOutputPixelType("u8"),this._removeStatsHistColormapVAT(e),e.bandCount=3,e.statistics=[{min:0,max:255,avg:100,stddev:20},{min:0,max:255,avg:100,stddev:20},{min:0,max:255,avg:100,stddev:20}],this.rasterInfo=e;let s=[...t.colormap].sort((t,e)=>t[0]-e[0]),{indexedColormap:r,offset:n}=(0,Kt.zg)({colormap:s});return r?(this.lookup={indexedColormap:r,offset:n},{success:!0,supportsGPU:(0,Re.WN)(r)}):{success:!1,supportsGPU:!1,error:"colormap-to-rgb-function: the colormap is not supported"}}_processPixels(t){let e=t.pixelBlocks?.[0];if(!e||!this.lookup)return e;e=e.clone();let s=e.pixels[0],r=e.mask??new Uint8Array(s.length).fill(255),n=new Uint8Array(s.length),i=new Uint8Array(s.length),o=new Uint8Array(s.length),{indexedColormap:a,offset:l}=this.lookup,u=a.length;for(let t=0;t<s.length;t++)if(r[t]){let e=4*(s[t]-l);e<0||e>u-4?r[t]=0:(n[t]=a[e++],i[t]=a[e++],o[t]=a[e++])}return e.pixels=[n,i,o],e.statistics=[new Ie.A(0,255),new Ie.A(0,255),new Ie.A(0,255)],e.pixelType=this.outputPixelType,e}_getWebGLParameters(){return this.lookup}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Fe.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Ne,json:{write:!0,name:"rasterFunctionArguments"}})],Fe.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Fe.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Fe.prototype,"lookup",void 0),Fe=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapToRGBFunction")],Fe);const _e=Fe;var ke,Se=s(43937);let Be=ke=class extends c{constructor(){super(...arguments),this.rasters=[]}writeRasters(t,e){e.rasters=t.map(t=>"number"==typeof t||"string"==typeof t?t:t.toJSON())}clone(){return new ke({rasters:(0,i.o8)(this.rasters)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Be.prototype,"rasters",void 0),(0,o.Cg)([(0,Se.K)("rasters")],Be.prototype,"writeRasters",null),Be=ke=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.CompositeBandFunctionArguments")],Be);const je=Be;let Ze=class extends x{constructor(){super(...arguments),this.functionName="CompositeBand",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){let{sourceRasterInfos:t}=this,e=t[0];this.outputPixelType=this._getOutputPixelType(e.pixelType);let s=e.clone();if(s.attributeTable=null,s.colormap=null,s.pixelType=this.outputPixelType,s.bandCount=t.map(({bandCount:t})=>t).reduce((t,e)=>t+e),t.every(({statistics:t})=>null!=t&&t.length)){let e=[];t.forEach(({statistics:t})=>null!=t&&e.push(...t)),s.statistics=e}if(t.every(({histograms:t})=>null!=t&&t.length)){let e=[];t.forEach(({histograms:t})=>null!=t&&e.push(...t)),s.histograms=e}s.multidimensionalInfo&&s.multidimensionalInfo.variables.forEach(e=>{let s=t.map(t=>t.multidimensionalInfo?.variables.find(({name:t})=>t===e.name)),r=s.map(t=>t?.statistics?.length?t.statistics:null),n=s.map(t=>t?.histograms?.length?t.histograms:null);e.statistics=r.every(t=>null!=t)?r.flat():null,e.histograms=n.every(t=>null!=t)?n.flat():null}),s.bandCount>1&&(s.colormap=null,s.attributeTable=null);let r=t.every(t=>t.keyProperties.BandProperties?.length)?t.flatMap(t=>t.keyProperties.BandProperties):void 0;return s.keyProperties={...s.keyProperties,BandProperties:r},this.rasterInfo=s,{success:!0,supportsGPU:s.bandCount<=3}}_processPixels(t){let{pixelBlocks:e}=t;return e&&null!=e?.[0]?(0,Kt.Wy)(e):null}_getWebGLParameters(){return{bandCount:this.rasterInfo.bandCount}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Ze.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:je,json:{write:!0,name:"rasterFunctionArguments"}})],Ze.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Ze.prototype,"rasterArgumentNames",void 0),Ze=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.CompositeBandFunction")],Ze);const ze=Ze,Ge=new Dt.J({0:"difference",1:"relative-difference",2:"categorical",3:"euclidean-distance",4:"angle-difference",5:"band-with-most-change"},{useNumericKeys:!0}),Oe=new Dt.J({0:"all",1:"changed",2:"unchanged"},{useNumericKeys:!0});var De;let Ee=De=class extends c{constructor(){super(...arguments),this.method="difference",this.keepMethod="all",this.raster2=void 0}get rasters(){return[this.raster,this.raster2]}clone(){return new De({raster:this.raster,raster2:this.raster2,method:this.method,keepMethod:this.keepMethod})}};(0,o.Cg)([(0,Qt.e)(Ge)],Ee.prototype,"method",void 0),(0,o.Cg)([(0,Qt.e)(Oe)],Ee.prototype,"keepMethod",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Ee.prototype,"raster2",void 0),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],Ee.prototype,"rasters",null),Ee=De=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ComputeChangeFunctionArguments")],Ee);const Ve=Ee;var Ue=s(20437);let Le=class extends x{constructor(){super(...arguments),this.functionName="ComputeChange",this.functionArguments=null,this.rasterArgumentNames=["raster","raster2"]}_bindSourceRasters(){let{method:t}=this.functionArguments,e=this.sourceRasterInfos[0].clone();if(this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(e),"categorical"===t){let t=this.sourceRasterInfos.map(t=>t.attributeTable),s=this._getFieldNames(t,"value"),r=t.map(t=>this._getClassFieldName(t));if(null==s[0]||null==s[1]||null==r[0]||null==r[1])return{success:!1,supportsGPU:!1,error:"both inputs must have proper attribute table with value and class fields"};this._updateAttributeTable(e,s,r)}return e.bandCount=1,this.rasterInfo=e,{success:!0,supportsGPU:"difference"===t||"relative-difference"===t}}_processPixels(t){let{pixelBlocks:e}=t;if(null==e?.[0]||null==e?.[1])return null;let{method:s}=this.functionArguments;return function(t,e,s,r){let[n,i]=t,o=(0,l.zw)(s)&&!(0,l.zw)(n.pixelType)&&!(0,l.zw)(i.pixelType),a=[n.mask,i.mask].filter(t=>t),u=g.A.combineBandMasks(a),p=t.map(t=>t.pixels[0]),{width:c,height:h}=n,m=g.A.createEmptyBand(s,c*h);switch(e){case"difference":case"relative-difference":!function(t){let{bands:[e,s],mask:r,isRelative:n,isRoundingNeeded:i,outBand:o}=t,a=e.length;for(let t=0;t<a;t++)if(!r||r[t]){let r=e[t]-s[t];if(n){let n=Math.max(Math.abs(e[t]),Math.abs(s[t]));r=0===n?0:r/n}o[t]=i?Math.round(r):r}}({bands:p,mask:u,outBand:m,isRoundingNeeded:o,isRelative:"relative-difference"===e});break;case"categorical":!function(t){let{bands:[e,s],categoryIndexLookups:[r,n],classNames:[i,o],mask:a,keepMethod:l,outBand:u}=t,p=e.length,c=i.length,h=o.length,m=c*h,d=m+1,g=m+2;for(let t=0;t<p;t++)if(!a||a[t]){let a=e[t],p=s[t],c=r[a],f=n[p],y=i[c],w=o[f];u[t]=null==c||null==f?m:"changed"===l&&y===w?d:"unchanged"===l&&y!==w?g:c*h+f}}({bands:p,mask:u,outBand:m,...r});break;case"euclidean-distance":!function(t){let{pixels:[e,s],mask:r,outBand:n}=t,i=e[0].length,o=e.length;for(let t=0;t<i;t++)if(!r||r[t]){let r=0;for(let n=0;n<o;n++){let i=e[n][t]-s[n][t];r+=i*i}n[t]=Math.sqrt(r)}}({pixels:t.map(t=>t.pixels),mask:u,outBand:m});break;case"angle-difference":!function(t){let{pixels:[e,s],mask:r,outBand:n}=t,i=e[0].length,o=e.length;for(let t=0;t<i;t++)if(!r||r[t]){let r=0,i=0,a=0;for(let n=0;n<o;n++){let o=e[n][t],l=s[n][t];r+=o*l,i+=o*o,a+=l*l}let l=Math.sqrt(i*a);n[t]=l?Math.acos(r/l):1.5707963267948966}}({pixels:t.map(t=>t.pixels),mask:u,outBand:m});break;case"band-with-most-change":!function(t){let{pixels:[e,s],mask:r,outBand:n}=t,i=e[0].length,o=e.length;for(let t=0;t<i;t++)if(!r||r[t]){let r=0,i=0;for(let n=0;n<o;n++){let o=Math.abs(e[n][t]-s[n][t]);o>r&&(r=o,i=n)}n[t]=i}}({pixels:t.map(t=>t.pixels),mask:u,outBand:m})}let d=new g.A({width:c,height:h,pixels:[m],pixelType:s,mask:u});return d.updateStatistics(),d}(e,s,this.outputPixelType,this._categoryConfig)}_getWebGLParameters(){let t=this.outputPixelType??"f32",[e,s]=(0,l.hP)(t),r=(0,l.zw)(t);return r&&(e-=1e-4,s+=1e-4),{method:this.functionArguments.method,domainRange:[e,s],isOutputRounded:r}}_updateAttributeTable(t,e,s){let r=this.sourceRasterInfos.map(t=>t.attributeTable),n=r.map((t,s)=>t.features.map(t=>t.attributes[e[s]])),i=r.map((t,e)=>t.features.map(t=>t.attributes[s[e]])),o=n.map(t=>{let e=[];return t.forEach((t,s)=>e[t]=s),e}),{keepMethod:a}=this.functionArguments;this._categoryConfig={categoryIndexLookups:o,classNames:i,keepMethod:a};let l=r[0].clone();l.fields=[new Ue.A({name:"OID",type:"oid"}),new Ue.A({name:"Value",type:"integer"}),new Ue.A({name:"ClassName",type:"string"}),new Ue.A({name:"Class_From",type:"string"}),new Ue.A({name:"Class_To",type:"string"})];let u=this._getFieldNames(r,"red"),p=this._getFieldNames(r,"green"),c=this._getFieldNames(r,"blue"),h=[],m=2===u.length&&2===p.length&&2===c.length;m&&(h.push(...r.map((t,e)=>t.features.map(t=>[t.attributes[u[e]],t.attributes[p[e]],t.attributes[c[e]]]))),l.fields.push(new Ue.A({name:"Red",type:"integer"}),new Ue.A({name:"Green",type:"integer"}),new Ue.A({name:"Blue",type:"integer"})));let d=l.features[0].clone();d.geometry=null;let g=[],[f,y]=n.map(t=>t.length),w=1;for(let t=0;t<f;t++){let e=i[0][t];for(let s=0;s<y;s++){let r=i[1][s];if("changed"===a&&e===r||"unchanged"===a&&e!==r)continue;let n=d.clone();n.attributes={OID:w++,Value:t*y+s,ClassName:e===r?e:`${e} -> ${r}`,Class_From:e,Class_To:r},m&&(n.attributes.Red=h[0][t][0]+h[1][s][0]>>1,n.attributes.Green=h[0][t][1]+h[1][s][1]>>1,n.attributes.Blue=h[0][t][2]+h[1][s][2]>>1),g.push(n)}}if("changed"===a){let t=d.clone();t.attributes={OID:w++,Value:f*y+1,ClassName:"No Change",Class_From:"Same",Class_To:"Same"},g.push(t)}else if("unchanged"===a){let t=d.clone();t.attributes={OID:w++,Value:f*y+2,ClassName:"Changed",Class_From:"Any",Class_To:"Any"},g.push(t)}l.features=g,t.attributeTable=l}_getFieldNames(t,e){return t.map(({fields:t})=>t.find(t=>t.name.toLowerCase()===e)?.name).filter(t=>t)}_getClassFieldName(t){return(t.fields.find(t=>"string"===t.type&&t.name.toLowerCase().startsWith("class"))??t.fields.find(t=>"string"===t.type&&t.name.toLowerCase().includes("class")||t.name.toLowerCase().includes("type")||t.name.toLowerCase().includes("name"))??t.fields.find(t=>"string"===t.type))?.name}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Le.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Ve,json:{write:!0,name:"rasterFunctionArguments"}})],Le.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Le.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Le.prototype,"_categoryConfig",void 0),Le=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ComputeChangeFunction")],Le);const $e=Le;var Ke;let We=Ke=class extends c{constructor(){super(...arguments),this.contrastOffset=0,this.brightnessOffset=0}clone(){return new Ke({contrastOffset:this.contrastOffset,brightnessOffset:this.brightnessOffset,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],We.prototype,"contrastOffset",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],We.prototype,"brightnessOffset",void 0),We=Ke=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ContrastBrightnessFunctionArguments")],We);const He=We;var qe=s(51927);let Je=class extends x{constructor(){super(...arguments),this.functionName="ContrastBrightness",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){let{sourceRasterInfos:t}=this,e=t[0];if("u8"!==e.pixelType)return{success:!1,supportsGPU:!1,error:"Only unsigned 8 bit raster is supported by ContrastBrightness function."};this.outputPixelType=this._getOutputPixelType("u8");let s=e.clone();this._removeStatsHistColormapVAT(s),this.rasterInfo=s;let{contrastOffset:r,brightnessOffset:n}=this.functionArguments;return this.lookup=(0,qe.zj)(r,n),{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];return null==e?null:(0,Kt.eH)(e,{lut:e.pixels.map(()=>this.lookup),offset:0,outputPixelType:"u8"})}_getWebGLParameters(){let{contrastOffset:t,brightnessOffset:e}=this.functionArguments;return{contrastOffset:t,brightnessOffset:e}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Je.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:He,json:{write:!0,name:"rasterFunctionArguments"}})],Je.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Je.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Je.prototype,"lookup",void 0),Je=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ContrastBrightnessFunction")],Je);const Xe=Je;function Qe(t,e,s,r,n){let i=Math.floor(r/2);for(let r=0;r<i;r++)for(let i=0;i<e;i++)t[r*e+i]=t[(n-1-r)*e+i],t[(s-1-r)*e+i]=t[(s-n+r)*e+i];let o=Math.floor(n/2);for(let r=0;r<s;r++){let s=r*e;for(let r=0;r<o;r++)t[s+r]=t[s+n-1-r],t[s+e-r-1]=t[s+e+r-n]}}const Ye=new Map;function ts(t,e,s,r,n,i,o){let a=new Float32Array(e*s),l=i.length,u=o?0:r,p=o?r:0,c=o?1:e;for(let o=u;o<s-u;o++){let s=o*e;for(let o=p;o<e-p;o++){if(n&&!n[s+o])continue;let e=0;for(let n=0;n<l;n++)e+=t[s+o+(n-r)*c]*i[n];a[s+o]=e}}return a}function es(t,e,s,r,n,i,o){let a=new Float32Array(e*s),l=Math.floor(r/2),u=Math.floor(n/2);for(let p=l;p<s-l;p++){let s=p*e;for(let p=u;p<e-u;p++){if(i&&!i[s+p])continue;let c=0;for(let i=0;i<r;i++)for(let r=0;r<n;r++)c+=t[s+p+(i-l)*e+r-u]*o[i*n+r];a[s+p]=c}}return a}var ss;Ye.set(v.none,[0,0,0,0,1,0,0,0,0]),Ye.set(v.lineDetectionHorizontal,[-1,-1,-1,2,2,2,-1,-1,-1]),Ye.set(v.lineDetectionVertical,[-1,2,-1,-1,2,-1,-1,2,-1]),Ye.set(v.lineDetectionLeftDiagonal,[2,-1,-1,-1,2,-1,-1,-1,2]),Ye.set(v.lineDetectionRightDiagonal,[-1,-1,2,-1,2,-1,2,-1,-1]),Ye.set(v.gradientNorth,[-1,-2,-1,0,0,0,1,2,1]),Ye.set(v.gradientWest,[-1,0,1,-2,0,2,-1,0,1]),Ye.set(v.gradientEast,[1,0,-1,2,0,-2,1,0,-1]),Ye.set(v.gradientSouth,[1,2,1,0,0,0,-1,-2,-1]),Ye.set(v.gradientNorthEast,[0,-1,-2,1,0,-1,2,1,0]),Ye.set(v.gradientNorthWest,[-2,-1,0,-1,0,1,0,1,2]),Ye.set(v.smoothArithmeticMean,[.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111]),Ye.set(v.smoothing3x3,[.0625,.125,.0625,.125,.25,.125,.0625,.125,.0625]),Ye.set(v.smoothing5x5,[1,1,1,1,1,1,4,4,4,1,1,4,12,4,1,1,4,4,4,1,1,1,1,1,1]),Ye.set(v.sharpening3x3,[-1,-1,-1,-1,9,-1,-1,-1,-1]),Ye.set(v.sharpening5x5,[-1,-3,-4,-3,-1,-3,0,6,0,-3,-4,6,21,6,-4,-3,0,6,0,-3,-1,-3,-4,-3,-1]),Ye.set(v.laplacian3x3,[0,-1,0,-1,4,-1,0,-1,0]),Ye.set(v.laplacian5x5,[0,0,-1,0,0,0,-1,-2,-1,0,-1,-2,17,-2,-1,0,-1,-2,-1,0,0,0,-1,0,0]),Ye.set(v.sobelHorizontal,[-1,-2,-1,0,0,0,1,2,1]),Ye.set(v.sobelVertical,[-1,0,1,-2,0,2,-1,0,1]),Ye.set(v.sharpen,[0,-.25,0,-.25,2,-.25,0,-.25,0]),Ye.set(v.sharpen2,[-.25,-.25,-.25,-.25,3,-.25,-.25,-.25,-.25]),Ye.set(v.pointSpread,[-.627,.352,-.627,.352,2.923,.352,-.627,.352,-.627]);let rs=ss=class extends c{constructor(){super(...arguments),this.rows=3,this.cols=3,this.kernel=[0,0,0,0,1,0,0,0,0]}set convolutionType(t){this._set("convolutionType",t);let e=Ye.get(t);if(!e||t===v.userDefined||t===v.none)return;let s=Math.round(Math.sqrt(e.length));this._set("kernel",e),this._set("cols",s),this._set("rows",s)}clone(){return new ss({cols:this.cols,rows:this.rows,kernel:[...this.kernel],convolutionType:this.convolutionType,raster:(0,i.o8)(this.raster)})}};(0,o.Cg)([(0,a.MZ)({json:{type:Number,write:!0}})],rs.prototype,"rows",void 0),(0,o.Cg)([(0,a.MZ)({json:{type:Number,write:!0,name:"columns"}})],rs.prototype,"cols",void 0),(0,o.Cg)([(0,a.MZ)({json:{name:"type",type:Number,write:!0}})],rs.prototype,"convolutionType",null),(0,o.Cg)([(0,a.MZ)({json:{type:[Number],write:!0}})],rs.prototype,"kernel",void 0),rs=ss=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ConvolutionFunctionArguments")],rs);const ns=rs;let is=class extends x{constructor(){super(...arguments),this.functionName="Convolution",this.rasterArgumentNames=["raster"]}get _normalizedKernel(){let{kernel:t,convolutionType:e}=this.functionArguments,s=t.reduce((t,e)=>t+e);return-1===e||0===s||1===s?t:t.map(t=>t/s)}_bindSourceRasters(){let{convolutionType:t,rows:e,cols:s,kernel:r}=this.functionArguments;if(!Object.values(v).includes(t))return{success:!1,supportsGPU:!1,error:`convolution-function: the specified kernel type is not supported ${t}`};if(t!==v.none&&e*s!==r.length)return{success:!1,supportsGPU:!1,error:"convolution-function: the specified rows and cols do not match the length of the kernel"};let n=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType(n.pixelType);let i=n.clone();i.pixelType=this.outputPixelType;let o=[v.none,v.sharpen,v.sharpen2,v.sharpening3x3,v.sharpening5x5];return(-1===t||"u8"!==this.outputPixelType&&!o.includes(t))&&(i.statistics=null,i.histograms=null),i.colormap=null,i.attributeTable=null,this.rasterInfo=i,{success:!0,supportsGPU:r.length<=25}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e||this.functionArguments.convolutionType===v.none)return e;let{rows:s,cols:r}=this.functionArguments,{_normalizedKernel:n}=this;return function(t,e){let s=function(t){let e=Math.sqrt(t.length),s=t.slice(0,e),r=[1];for(let s=1;s<e;s++){let n=null;for(let r=0;r<e;r++){let i=t[r+s*e],o=t[r];if(null==n)if(0===o){if(i)return{separable:!1,row:null,col:null}}else n=i/o;else if(i/o!==n)return{separable:!1,row:null,col:null}}if(null==n)return{separable:!1,row:null,col:null};r.push(n)}return{separable:!0,row:s,col:r}}(e.kernel),r=!1!==e.mirrorEdges,n=s.separable?function(t,e,s,r=!0){let{pixels:n,width:i,height:o,pixelType:a,mask:l}=t,u=n.length,p=[],c=e.length,h=s.length,m=Math.floor(c/2),d=Math.floor(h/2);for(let t=0;t<u;t++){let a=ts(n[t],i,o,m,l,e,!0);a=ts(a,i,o,d,l,s,!1),r&&Qe(a,i,o,c,h),p.push(a)}return new g.A({width:i,height:o,pixelType:a,pixels:p,mask:l})}(t,s.row,s.col,r):function(t,e,s=!0){let{pixels:r,width:n,height:i,pixelType:o,mask:a}=t,l=r.length,u=[],{kernel:p,rows:c,cols:h}=e;for(let t=0;t<l;t++){let e=es(r[t],n,i,c,h,a,p);s&&Qe(e,n,i,c,h),u.push(e)}return new g.A({width:n,height:i,pixelType:o,pixels:u,mask:a})}(t,e,r),{outputPixelType:i}=e;return i&&n.clamp(i),n}(e,{kernel:n,rows:s,cols:r,outputPixelType:this.outputPixelType})}_getWebGLParameters(){let t=new Float32Array(25),{rows:e,cols:s}=this.functionArguments,{_normalizedKernel:r}=this;for(let n=0;n<e;n++)for(let e=0;e<s;e++)t[5*n+e]=r[n*s+e];return{kernelRows:e,kernelCols:s,kernel:t,clampRange:(0,l.hP)(this.outputPixelType)}}_getNeighborhoodSize(){let{rows:t,cols:e}=this.functionArguments;return{rows:t,cols:e}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],is.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:ns,json:{write:!0,name:"rasterFunctionArguments"}})],is.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],is.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],is.prototype,"_normalizedKernel",null),is=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ConvolutionFunction")],is);const os=is;var as;const ls=new Dt.J({0:"standard",1:"planform",2:"profile"},{useNumericKeys:!0});let us=as=class extends c{constructor(){super(...arguments),this.curvatureType="standard",this.zFactor=1}readCurvatureType(t,e){return ls.fromJSON(e.type??e.curvatureType??0)}clone(){return new as({curvatureType:this.curvatureType,zFactor:this.zFactor,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({json:{write:{target:"type"}}}),(0,Qt.e)(ls)],us.prototype,"curvatureType",void 0),(0,o.Cg)([(0,ye.w)("curvatureType",["type","curvatureType"])],us.prototype,"readCurvatureType",null),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],us.prototype,"zFactor",void 0),us=as=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.CurvatureFunctionArguments")],us);const ps=us;let cs=class extends x{constructor(){super(...arguments),this.functionName="Curvature",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");let t=this.sourceRasterInfos[0].clone();return t.pixelType=this.outputPixelType,t.bandCount=1,this._removeStatsHistColormapVAT(t),this.rasterInfo=t,this.isGCS=t.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return null;let{zFactor:s,curvatureType:r}=this.functionArguments,{extent:n,primaryPixelSizes:i}=t,o=i?.[0]??(n?{x:n.width/e.width,y:n.height/e.height}:{x:1,y:1}),a=this.isGCS&&s>=1?s*zt.rk:s;return(0,zt.E0)(e,{zFactor:a,curvatureType:r,resolution:o})}_getWebGLParameters(){let{zFactor:t,curvatureType:e}=this.functionArguments;return{curvatureType:e,zFactor:this.isGCS&&t>=1?t*zt.rk:t}}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],cs.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:ps,json:{write:!0,name:"rasterFunctionArguments"}})],cs.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],cs.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],cs.prototype,"isGCS",void 0),cs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.CurvatureFunction")],cs);const hs=cs;var ms;let ds=ms=class extends c{constructor(){super(...arguments),this.bandIds=[],this.bandNames=[],this.bandWavelengths=[],this.missingBandAction=0}clone(){return new ms({bandIds:this.bandIds?.slice(),bandNames:this.bandNames?.slice(),bandWavelengths:this.bandWavelengths?.slice(),missingBandAction:this.missingBandAction,method:this.method,wavelengthMatchTolerance:this.wavelengthMatchTolerance})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"bandIds",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"bandNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"bandWavelengths",void 0),(0,o.Cg)([(0,Qt.e)({0:"name",1:"wavelength",2:"id"})],ds.prototype,"method",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"missingBandAction",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"wavelengthMatchTolerance",void 0),ds=ms=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ExtractBandFunctionArguments")],ds);const gs=ds;let fs=class extends x{constructor(){super(...arguments),this.functionName="ExtractBand",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let{functionArguments:t,sourceRasterInfos:e}=this,s=e[0],{method:r,bandNames:n,bandWavelengths:i,bandIds:o,missingBandAction:a}=t,l=n?.length&&("name"===r||"id"!==r&&!o?.length),u=i?.length&&("wavelength"===r||"id"!==r&&!o?.length),p=1===a,c=l?function(t,e){let s=t.bandInfos.map(({name:t})=>t.toLowerCase()),r=[];for(let t=0;t<e.length;t++){let n=e[t].toLowerCase(),i=s.indexOf(n);if(-1===i&&"nearinfrared"===n&&(i=s.findIndex(t=>t.startsWith("nearinfrared_1")),-1===i&&(i=s.findIndex(t=>t.startsWith("nearinfrared")))),-1===i)return null;r.push(i)}return r}(s,n):u?function(t,e,{wavelengthMatchTolerance:s},r){let{bandInfos:n}=t,i=[];for(let t=0;t<n.length;t++){let{minWavelength:e,maxWavelength:s}=n[t];if(!e||!s)return null;i.push({minWavelength:e,maxWavelength:s})}let o=[];for(let t=0;t<e.length;t++){let n=e[t],a=!1,l=-1,u=Number.MAX_VALUE;for(let t=0;t<i.length;t++){let e=i[t],s=n>=e.minWavelength&&n<=e.maxWavelength,r=Math.abs(n-(e.minWavelength+e.maxWavelength)/2);s?r<u&&(a=!0,l=t,u=r):!a&&r<u&&(l=t,u=r)}if(!a&&s&&u<s&&(a=!0),!a&&r)return null;o.push(l)}return o}(s,i,this.functionArguments,p):function(t,e,s){let{bandCount:r}=t;return!e?.length||s&&e.some(t=>t<0||t>=r)?null:e}(s,o,p);if(null==c)return{success:!1,supportsGPU:!1,error:`extract-band-function: Invalid ${l?"band names":u?"band wavelengths":"band ids"} for the imagery data source`};this.functionArguments.bandIds=c,this.functionArguments.method="id",this.outputPixelType=this._getOutputPixelType(s.pixelType);let h=s.clone();h.pixelType=this.outputPixelType,h.bandCount=c.length;let{statistics:m,histograms:d}=h;null!=m&&m.length&&(h.statistics=c.map(t=>m[t]||m[m.length-1])),null!=d&&d.length&&(h.histograms=c.map(t=>d[t]||d[d.length-1])),h.multidimensionalInfo&&h.multidimensionalInfo.variables.forEach(t=>{let{statistics:e,histograms:s}=t;null!=e&&e.length&&(t.statistics=c.map(t=>e[t]||e[e.length-1])),null!=s&&s.length&&(t.histograms=c.map(t=>s[t]||s[s.length-1]))});let g=h.keyProperties?.BandProperties;return g?.length&&(g=c.map(t=>t>=g.length?g[g.length-1]:g[t]),h.keyProperties={...h.keyProperties,BandProperties:g}),this.rasterInfo=h,{success:!0,supportsGPU:h.bandCount<=3}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return null;let{bandIds:s}=this.functionArguments;if(this.rasterInfo.storageInfo.isBsqTile){let{rawInputBandIds:t}=this;s=s.map(e=>t.indexOf(e))}else{let t=e.pixels.length;s=s.map(e=>e>=t?t-1:e)}return e.extractBands(s)}_getWebGLParameters(){let t;if(this.isInputBandIdsSwizzled)t=this.swizzledBandSelection.length?this.swizzledBandSelection:[0,1,2];else{t=[...this.functionArguments.bandIds],0===t.length?t=[0,1,2]:t.length<3&&(t[1]=t[1]??t[0],t[2]=t[2]??t[1]);for(let e=0;e<3;e++)t[e]=Math.min(t[e],2)}return{bandIndexMat3:qt(t)}}_getInputBandIds(t){let e=t.length;return this.functionArguments.bandIds.map(t=>t>=e?e-1:t).map(e=>t[e])}_swizzleBandIds(t){let e=this.functionArguments.bandIds.map(e=>t.indexOf(e));return this.isInputBandIdsSwizzled=!0,e[1]??=e[0],e[2]??=e[1],this.swizzledBandSelection=e,!1}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],fs.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:gs,json:{write:!0,name:"rasterFunctionArguments"}})],fs.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],fs.prototype,"rasterArgumentNames",void 0),fs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ExtractBandFunction")],fs);const ys=fs;function ws(t,e,s,r){let{pixels:n,width:i,height:o}=t,a=n.length,u=s.startsWith("f"),p=!u,[c,h]=(0,l.hP)(s),m=i*o,d=g.A.createEmptyBand(s,m);for(let t=0;t<o;t++){let s=t*i;for(let t=0;t<i;t++,s++)if(!r||r[s]){let t=0;for(let r=0;r<a;r++)t+=e[r]*n[r][s];u||(t=Math.round(t),p&&(t=t>h?h:t<c?c:t)),d[s]=t}}return d}var xs;let vs=xs=class extends c{clone(){return new xs({conversionParameters:[...this.conversionParameters],raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],vs.prototype,"conversionParameters",void 0),vs=xs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.GrayscaleFunctionArguments")],vs);const As=vs;let Cs=class extends x{constructor(){super(...arguments),this.functionName="Grayscale",this.functionArguments=null,this.rasterArgumentNames=["raster"]}get _normalizedWeights(){let{conversionParameters:t}=this.functionArguments,e=t.reduce((t,e)=>t+e);return t.map(t=>t/e)}_bindSourceRasters(){let{conversionParameters:t}=this.functionArguments;if(!t?.length)return{success:!1,supportsGPU:!1,error:"missing valid conversion parameters."};let e=this.sourceRasterInfos[0].clone();this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType;let s=3===t.length||3===e.bandCount&&t.length>3;return e.bandCount=1,this._removeStatsHistColormapVAT(e),this.rasterInfo=e,{success:!0,supportsGPU:s}}_processPixels(t){let e=t.pixelBlocks?.[0];return null==e?null:function(t,e,s){let{width:r,height:n,mask:i,bandMasks:o}=t,a=o?.length?g.A.combineBandMasks(o):i,l=ws(t,e,s,a),u=new g.A({width:r,height:n,pixels:[l],pixelType:s,mask:a});return u.updateStatistics(),u}(e,this._normalizedWeights,this.outputPixelType)}_getWebGLParameters(){return{weights:this._normalizedWeights}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Cs.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:As,json:{write:!0,name:"rasterFunctionArguments"}})],Cs.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Cs.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],Cs.prototype,"_normalizedWeights",null),Cs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.GrayscaleFunction")],Cs);const bs=Cs;var Ms;const Ps=new Dt.J({0:"traditional",1:"multi-directional"},{useNumericKeys:!0}),Ts=new Dt.J({1:"degree",2:"percent-rise",3:"scaled"},{useNumericKeys:!0});let Ns=Ms=class extends c{constructor(){super(...arguments),this.altitude=45,this.azimuth=315,this.hillshadeType="traditional",this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.slopeType="degree",this.zFactor=1,this.removeEdgeEffect=!1}clone(){return new Ms({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,slopeType:this.slopeType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ns.prototype,"altitude",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ns.prototype,"azimuth",void 0),(0,o.Cg)([(0,a.MZ)(),(0,Qt.e)(Ps)],Ns.prototype,"hillshadeType",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0,name:"psPower"}})],Ns.prototype,"pixelSizePower",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0,name:"psZFactor"}})],Ns.prototype,"pixelSizeFactor",void 0),(0,o.Cg)([(0,a.MZ)(),(0,Qt.e)(Ts)],Ns.prototype,"slopeType",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ns.prototype,"zFactor",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],Ns.prototype,"removeEdgeEffect",void 0),Ns=Ms=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.HillshadeFunctionArguments")],Ns);const Is=Ns;let Rs=class extends x{constructor(){super(...arguments),this.functionName="Hillshade",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){let t=this.sourceRasterInfos[0];if(t.bandCount>1)return{success:!1,supportsGPU:!1,error:"hillshade-function: source data must be single band"};this.outputPixelType=this._getOutputPixelType("u8");let e=t.clone();return this._removeStatsHistColormapVAT(e),e.pixelType=this.outputPixelType,e.bandCount=1,e.statistics=[{min:0,max:255,avg:60,stddev:10}],this.rasterInfo=e,this.isGCS=e.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];if(!e)return null;let{extent:s,primaryPixelSizes:r}=t,n=r?.[0]??(s?{x:s.width/e.width,y:s.height/e.height}:{x:1,y:1}),i=(0,zt.PP)(this.functionArguments,n,this.isGCS),o=(0,zt.fw)(e,i);return o.pixelType=this.outputPixelType,o}_getWebGLParameters(){let t=(0,zt.PP)(this.functionArguments,{x:1,y:1},this.isGCS),e=(0,zt.ng)(t),{slopeType:s,zFactor:r,pixelSizeFactor:n,pixelSizePower:i}=this.functionArguments,o="scaled"===s,a=(0,l.zw)(this.outputPixelType);return{...e,zFactor:r,gcsFactor:this.isGCS?zt.rk:1,pixelSizeFactor:o?n:0,pixelSizePower:o?i:0,isOutputRounded:a}}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Rs.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Is,json:{write:!0,name:"rasterFunctionArguments"}})],Rs.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Rs.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Rs.prototype,"isGCS",void 0),Rs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.HillshadeFunction")],Rs);const Fs=Rs;var _s;let ks=_s=class extends c{constructor(){super(...arguments),this.rasters=[],this.processAsMultiband=!0}writeRasters(t,e){e.rasters=t.map(t=>"number"==typeof t||"string"==typeof t?t:t.toJSON())}clone(){return new _s({operation:this.operation,processAsMultiband:this.processAsMultiband,rasters:(0,i.o8)(this.rasters)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ks.prototype,"operation",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ks.prototype,"rasters",void 0),(0,o.Cg)([(0,Se.K)("rasters")],ks.prototype,"writeRasters",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ks.prototype,"processAsMultiband",void 0),ks=_s=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.LocalFunctionArguments")],ks);const Ss=ks;let Bs=class extends x{constructor(){super(...arguments),this.functionName="Local",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){let{sourceRasterInfos:t}=this,e=t[0],{bandCount:s}=e,{processAsMultiband:r}=this.functionArguments;if(t.some(t=>t.bandCount!==s))return{success:!1,supportsGPU:!1,error:"local-function: input rasters do not have same band count"};let{operation:n,rasters:i}=this.functionArguments,o=N[n];if(!(999===o||i.length===o||i.length<=1&&1===o))return{success:!1,supportsGPU:!1,error:`local-function: the length of functionArguments.rasters does not match operation's requirement: ${o}`};let a=e.clone();return a.bandCount=999!==o||r?s:1,this._removeStatsHistColormapVAT(a),this._updateStatistics(a),this._updatePixelType(a),this.rasterInfo=a,{success:!0,supportsGPU:1===a.bandCount&&o<=3}}_processPixels(t){let{pixelBlocks:e}=t;return null==e||e.some(t=>null==t)?null:_t(e,this.functionArguments.operation,{processAsMultiband:this.functionArguments.processAsMultiband,outputPixelType:this.outputPixelType??void 0})}_getWebGLParameters(){let{operation:t}=this.functionArguments,e=N[t],s=Object.keys(M).find(e=>M[e]===t)?.toLowerCase()??"undefined",r=this.outputPixelType??"f32",[n,i]=(0,l.hP)(r),o=(0,l.zw)(r);return o&&(n-=1e-4,i+=1e-4),{imageCount:e,operationName:s,domainRange:[n,i],isOutputRounded:o}}_updateStatistics(t){let e=this.sourceRasterInfos[0],{operation:s}=this.functionArguments,r=T(s)?.domain;if(r){t.statistics=[];for(let e=0;e<t.bandCount;e++)t.statistics[e]={min:r[0],max:r[1],avg:(r[0]+r[1])/2,stddev:(r[0]+r[1])/10}}else 45===s&&e.statistics?.length&&(t.statistics=e.statistics.map(t=>({min:-t.max,max:-t.min,avg:null==t.avg?void 0:-t.avg,stddev:null==t.stddev?void 0:-t.stddev})))}_updatePixelType(t){let{statistics:e,pixelType:s}=this.sourceRasterInfos[0],{operation:r}=this.functionArguments,{domain:n,isInteger:i}=T(r)??{domain:null,isInteger:!1},o="f32";if(n&&i)o=(0,l.X1)(n[0],n[1]);else if(30===r){let t=e?.[0];o=t?(0,l.X1)(t.min,t.max):(0,l.zw)(s)?s:"s32"}else if(45===r&&(0,l.zw)(s)){let t=e?.map(({max:t})=>-t),r=e?.map(({min:t})=>-t),n=t?.length?Math.min(...t):null,i=r?.length?Math.min(...r):null;o=null!=n&&null!=i?(0,l.X1)(n,i):s.startsWith("s")?s.replace("s","u"):"u1"===s||"u2"===s||"u4"===s?"s8":"u8"===s?"s16":"s32"}t.pixelType=this.outputPixelType=this._getOutputPixelType(o)}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Bs.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Ss,json:{write:!0,name:"rasterFunctionArguments"}})],Bs.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Bs.prototype,"rasterArgumentNames",void 0),Bs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.LocalFunction")],Bs);const js=Bs;var Zs,zs=s(34727);let Gs=Zs=class extends c{constructor(){super(...arguments),this.includedRanges=null,this.noDataValues=null,this.noDataInterpretation=0}get normalizedNoDataValues(){let{noDataValues:t}=this;if(!t?.length)return null;let e=!1,s=t.map(t=>{if("number"==typeof t)return e=!0,[t];if("string"==typeof t){let s=t.trim().split(" ").filter(t=>""!==t.trim()).map(t=>Number(t));return e||=s.length>0,0===s.length?null:s}return null});return e?s:null}clone(){return new Zs({includedRanges:this.includedRanges?.slice()??[],noDataValues:this.noDataValues?.slice()??[],noDataInterpretation:this.noDataInterpretation})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Gs.prototype,"includedRanges",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Gs.prototype,"noDataValues",void 0),(0,o.Cg)([(0,a.MZ)()],Gs.prototype,"normalizedNoDataValues",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Gs.prototype,"noDataInterpretation",void 0),Gs=Zs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.MaskFunctionArguments")],Gs);const Os=Gs;let Ds=class extends x{constructor(){super(...arguments),this.functionName="Mask",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let t=this.sourceRasterInfos[0].clone(),{pixelType:e}=t;this.outputPixelType=this._getOutputPixelType(e),t.pixelType=this.outputPixelType,this.rasterInfo=t;let{includedRanges:s,normalizedNoDataValues:r}=this.functionArguments;if(!s?.length&&!r?.length)return{success:!1,supportsGPU:!1,error:"missing includedRanges or noDataValues argument"};let n=[];for(let i=0;i<t.bandCount;i++){let t=(0,Kt.Wt)(e,s?.slice(2*i,2*i+2),r?.[i]);if(null==t){n=null;break}n.push(t)}this.lookups=n;let i=null!=r&&r.every(t=>t?.length===r[0]?.length);return{success:!0,supportsGPU:(!s||s.length<=18)&&(!r||i&&r[0].length<=9)}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return null;let{outputPixelType:s,lookups:r}=this,{includedRanges:n,noDataInterpretation:i,normalizedNoDataValues:o}=this.functionArguments;return(0,Kt.dK)(e,{includedRanges:n,noDataValues:o,outputPixelType:s,matchAll:1===i,lookups:r})}_getWebGLParameters(){let{includedRanges:t,normalizedNoDataValues:e}=this.functionArguments,s=new Float32Array(9);s.fill(zs.pq),e?.[0]?.length&&s.set(e[0]);let r=new Float32Array(6);for(let e=0;e<r.length;e+=2)r[e]=t?.[e]??-zs.pq,r[e+1]=t?.[e+1]??zs.pq;return t?.length&&r.set(t),{bandCount:this.sourceRasterInfos[0].bandCount,noDataValues:s,includedRanges:r}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Ds.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Os,json:{write:!0,name:"rasterFunctionArguments"}})],Ds.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Ds.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Ds.prototype,"lookups",void 0),Ds=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.MaskFunction")],Ds);const Es=Ds;var Vs;let Us=Vs=class extends c{constructor(){super(...arguments),this.visibleBandID=0,this.infraredBandID=1,this.scientificOutput=!1}clone(){let{visibleBandID:t,infraredBandID:e,scientificOutput:s}=this;return new Vs({visibleBandID:t,infraredBandID:e,scientificOutput:s})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Us.prototype,"visibleBandID",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Us.prototype,"infraredBandID",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Us.prototype,"scientificOutput",void 0),Us=Vs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.NDVIFunctionArguments")],Us);const Ls=Us;let $s=class extends x{constructor(){super(...arguments),this.functionName="NDVI",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let{scientificOutput:t,visibleBandID:e,infraredBandID:s}=this.functionArguments;this.outputPixelType=this._getOutputPixelType(t?"f32":"u8");let r=this.sourceRasterInfos[0],n=Math.max(e,s);if(r.bandCount<2||n>=r.bandCount)return{success:!1,supportsGPU:!1,error:"ndvi-function: source raster has insufficient amount of raster bands"};if(e<0||s<0)return{success:!1,supportsGPU:!1,error:"ndvi-function: invalid visible or infrared band id"};let i=r.clone();i.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(i),i.bandCount=1,i.keyProperties={...i.keyProperties,BandProperties:void 0};let[o,a,l,u]=t?[-1,1,0,.1]:[0,200,100,10];return i.statistics=[{min:o,max:a,avg:l,stddev:u}],this.rasterInfo=i,{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return null;let{visibleBandID:s,infraredBandID:r,scientificOutput:n}=this.functionArguments;if(this.rasterInfo.storageInfo.isBsqTile){let{rawInputBandIds:t}=this;r=t.indexOf(r),s=t.indexOf(s)}return function(t,e,s,r){let{mask:n,pixels:i,width:o,height:a}=t,l=i[s],u=i[e],p=u.length,c=r?new Uint8Array(p):new Float32Array(p),h=r?100:1,m=r?100.5:0;for(let t=0;t<p;t++)if(null==n||n[t]){let e=l[t],s=u[t],r=e+s;r&&(c[t]=(e-s)/r*h+m)}let d=new g.A({width:o,height:a,mask:n,pixelType:r?"u8":"f32",pixels:[c]});return d.updateStatistics(),d}(e,s,r,!n)}_getWebGLParameters(){let{visibleBandID:t,infraredBandID:e,scientificOutput:s}=this.functionArguments;return{bandIndexMat3:qt(this.isInputBandIdsSwizzled?[0,1,2]:[e,t,0]),scaled:!s}}_getInputBandIds(t){let{visibleBandID:e,infraredBandID:s}=this.functionArguments;return[s,e,0].map(e=>t[e])}_swizzleBandIds(t){let{visibleBandID:e,infraredBandID:s}=this.functionArguments,r=[e,s].map(e=>t.indexOf(e));return r[2]=r[1],this.isInputBandIdsSwizzled=!0,this.swizzledBandSelection=r,!1}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],$s.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Ls,json:{write:!0,name:"rasterFunctionArguments"}})],$s.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],$s.prototype,"rasterArgumentNames",void 0),$s=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.NDVIFunction")],$s);const Ks=$s;var Ws;let Hs=Ws=class extends c{constructor(){super(...arguments),this.inputRanges=null,this.outputValues=null,this.noDataRanges=null,this.allowUnmatched=!1,this.isLastInputRangeInclusive=!1}clone(){return new Ws({inputRanges:[...this.inputRanges],outputValues:[...this.outputValues],noDataRanges:[...this.noDataRanges],allowUnmatched:this.allowUnmatched,isLastInputRangeInclusive:this.isLastInputRangeInclusive})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"inputRanges",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"outputValues",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"noDataRanges",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"allowUnmatched",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"replacementValue",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"isLastInputRangeInclusive",void 0),Hs=Ws=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.RemapFunctionArguments")],Hs);const qs=Hs;let Js=class extends x{constructor(){super(...arguments),this.functionName="Remap",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){let t=this.sourceRasterInfos[0].clone(),{pixelType:e}=t;t.bandCount=1;let{statistics:s}=t;this._removeStatsHistColormapVAT(t);let{allowUnmatched:r,replacementValue:n,outputValues:i,inputRanges:o,noDataRanges:a,isLastInputRangeInclusive:u}=this.functionArguments,p="unknown"===this.outputPixelType||null==this.outputPixelType;if(this.outputPixelType=this._getOutputPixelType(e),i?.length){let o=s?.[0];if(r&&null==n){let e=o?.min??i[0],s=o?.max??i[0];e=Math.min.apply(null,[...i,e]),s=Math.max.apply(null,[...i,s]),t.statistics=[{min:e,max:s,avg:o?.avg??0,stddev:o?.stddev??-1}]}else{let e=i[0],s=e;for(let t=0;t<i.length;t++)e=e>i[t]?i[t]:e,s=s>i[t]?s:i[t];r&&null!=n&&(e=Math.min(e,n),s=Math.max(s,n)),t.statistics=[{min:e,max:s,avg:o?.avg??0,stddev:o?.stddev??-1}]}if(p){let{min:s,max:o}=t.statistics[0],a=["u8","s8","u16","s16","u32","s32","f32"],u=a.find(t=>{let[e,r]=(0,l.hP)(t);return s>=e&&o<=r})??"f64";this.outputPixelType=i.some(t=>Math.floor(t)!==t)?"f64"===u?"f64":"f32":r&&null==n&&a.indexOf(e)>a.indexOf(u)?e:u}}return t.pixelType=this.outputPixelType,this.rasterInfo=t,this.lookup=r?null:(0,Kt.XU)({srcPixelType:e,inputRanges:o,outputValues:i,noDataRanges:a,allowUnmatched:r,isLastInputRangeInclusive:u,outputPixelType:this.outputPixelType}),{success:!0,supportsGPU:(!i||i.length<=9)&&(!a||a.length<=9)}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return null;let{lookup:s,outputPixelType:r}=this;if(s){let t=(0,Kt.eH)(e,{lut:[s.lut],offset:s.offset,outputPixelType:r});return null!=t&&s.mask&&(t.mask=(0,Kt.UK)(e.pixels[0],e.mask,s.mask,s.offset,"u8")),t}let{inputRanges:n,outputValues:i,noDataRanges:o,allowUnmatched:a,isLastInputRangeInclusive:l,replacementValue:u}=this.functionArguments;return(0,Kt.Ew)(e,{inputRanges:n,outputValues:i,noDataRanges:o,outputPixelType:r,allowUnmatched:a,isLastInputRangeInclusive:l,replacementValue:u})}_getWebGLParameters(){let{allowUnmatched:t,noDataRanges:e,isLastInputRangeInclusive:s}=this.functionArguments,r=this.functionArguments.inputRanges??[],n=this.functionArguments.outputValues??[],i=(0,Kt.bL)(r,n,s),o=new Float32Array(18);return o.fill(zs.pq),e?.length&&o.set(e),{allowUnmatched:t,rangeMaps:i,noDataRanges:o,clampRange:(0,l.hP)(this.outputPixelType),replacementValue:this.functionArguments.replacementValue}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Js.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:qs,json:{write:!0,name:"rasterFunctionArguments"}})],Js.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Js.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Js.prototype,"lookup",void 0),Js=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.RemapFunction")],Js);const Xs=Js;var Qs;let Ys=Qs=class extends Is{readColorRamp(t){if("string"==typeof t){let e=ge.kH.jsonValues.find(e=>e.toLowerCase()===t.toLowerCase());return e?(0,ge.M5)(ge.kH.fromJSON(e)):null}return"toJSON"in t?t.toJSON():t}clone(){return new Qs({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,slopeType:this.slopeType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,removeEdgeEffect:this.removeEdgeEffect,colorRamp:this.colorRamp,colormap:this.colormap,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Ys.prototype,"colorRamp",void 0),(0,o.Cg)([(0,ye.w)("colorRamp")],Ys.prototype,"readColorRamp",null),(0,o.Cg)([(0,a.MZ)({type:[[Number]],json:{write:!0}})],Ys.prototype,"colormap",void 0),Ys=Qs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ShadedReliefFunctionArguments")],Ys);const tr=Ys;let er=class extends x{constructor(){super(...arguments),this.functionName="ShadedRelief",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){let t=this.sourceRasterInfos[0];if(t.bandCount>1)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: source data must be single band"};let{colorRamp:e,colormap:s}=this.functionArguments;if(!e&&!s?.length)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: a color ramp argument must be specified"};this.outputPixelType=this._getOutputPixelType("u8");let r=t.clone();this._removeStatsHistColormapVAT(r),r.pixelType=this.outputPixelType,r.bandCount=3,r.statistics=[{min:0,max:255,avg:60,stddev:10},{min:0,max:255,avg:60,stddev:10},{min:0,max:255,avg:60,stddev:10}],this.rasterInfo=r,this.isGCS=r.spatialReference?.isGeographic??!1,s?.length||(s=(0,ge.R8)(e,{interpolateAlpha:!0}));let{indexedColormap:n,offset:i}=(0,Kt.zg)({colormap:s});if(!n?.length)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: a valid colorramp is required"};let o=(0,ge.S2)(n);return this.lookup={indexedColormap:n,offset:i,hsvMap:o},{success:!0,supportsGPU:(0,Re.WN)(n)}}_processPixels(t){let e=t.pixelBlocks?.[0];if(!e||!this.lookup)return null;let s=t.primaryPixelSizes?.[0];if(null==s){let{extent:r}=t;s=r?{x:r.width/e.width,y:r.height/e.height}:{x:1,y:1}}let r=(0,zt.PP)(this.functionArguments,s,this.isGCS),n=(0,zt.fw)(e,r),i=this.sourceRasterInfos[0].statistics?.[0]??{min:0,max:8e3};return(0,zt.SC)(n,e,this.lookup.hsvMap,i),n.pixelType=this.outputPixelType,n}_getWebGLParameters(){let t=(0,zt.PP)(this.functionArguments,{x:1,y:1},this.isGCS),e=(0,zt.ng)(t),{slopeType:s,zFactor:r,pixelSizeFactor:n,pixelSizePower:i}=this.functionArguments,o="scaled"===s,{indexedColormap:a,offset:u}=this.lookup,p=this.sourceRasterInfos[0].statistics?.[0],c=(0,l.zw)(this.outputPixelType);return{...e,indexedColormap:a,offset:u,zFactor:r,gcsFactor:this.isGCS?zt.rk:1,pixelSizeFactor:o?n:0,pixelSizePower:o?i:0,minValue:p?.min??0,maxValue:p?.max??8e3,isOutputRounded:c}}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],er.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:tr,json:{write:!0,name:"rasterFunctionArguments"}})],er.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],er.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],er.prototype,"isGCS",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],er.prototype,"lookup",void 0),er=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ShadedReliefFunction")],er);const sr=er;var rr;const nr=new Dt.J({1:"degree",2:"percent-rise",3:"adjusted"},{useNumericKeys:!0});let ir=rr=class extends c{constructor(){super(...arguments),this.slopeType="degree",this.zFactor=1,this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.removeEdgeEffect=!1}clone(){return new rr({slopeType:this.slopeType,zFactor:this.zFactor,pixelSizePower:this.pixelSizePower,pixelSizeFactor:this.pixelSizeFactor,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};(0,o.Cg)([(0,Qt.e)(nr)],ir.prototype,"slopeType",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],ir.prototype,"zFactor",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{name:"psPower",write:!0}})],ir.prototype,"pixelSizePower",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{name:"psZFactor",write:!0}})],ir.prototype,"pixelSizeFactor",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],ir.prototype,"removeEdgeEffect",void 0),ir=rr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.SlopeFunctionArguments")],ir);const or=ir;let ar=class extends x{constructor(){super(...arguments),this.functionName="Slope",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");let t=this.sourceRasterInfos[0].clone();return t.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(t),t.statistics="percent-rise"===this.functionArguments.slopeType?null:[{min:0,max:90,avg:1,stddev:1}],t.bandCount=1,this.rasterInfo=t,this.isGCS=t.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return null;let{zFactor:s,slopeType:r,pixelSizePower:n,pixelSizeFactor:i}=this.functionArguments,{isGCS:o}=this,{extent:a,primaryPixelSizes:l}=t,u=l?.[0]??(a?{x:a.width/e.width,y:a.height/e.height}:{x:1,y:1});return(0,zt.yy)(e,{zFactor:s,slopeType:r,pixelSizePower:n,pixelSizeFactor:i,isGCS:o,resolution:u})}_getWebGLParameters(){let{zFactor:t,slopeType:e,pixelSizeFactor:s,pixelSizePower:r}=this.functionArguments;return{zFactor:this.isGCS&&t>=1?t*zt.rk:t,slopeType:e,pixelSizeFactor:s??0,pixelSizePower:r??0,isOutputRounded:(0,l.zw)(this.outputPixelType)}}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],ar.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:or,json:{write:!0,name:"rasterFunctionArguments"}})],ar.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],ar.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ar.prototype,"isGCS",void 0),ar=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.SlopeFunction")],ar);const lr=ar;var ur;let pr=ur=class extends c{clone(){return new ur({conversionMatrix:[...this.conversionMatrix],raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],pr.prototype,"conversionMatrix",void 0),pr=ur=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.SpectralConversionFunctionArguments")],pr);const cr=pr;let hr=class extends x{constructor(){super(...arguments),this.functionName="SpectralConversion",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let t=this.sourceRasterInfos[0].clone();return this.outputPixelType=this._getOutputPixelType(t.pixelType),t.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(t),this.rasterInfo=t,{success:!0,supportsGPU:3===t.bandCount&&9===this.functionArguments.conversionMatrix.length}}_processPixels(t){let e=t.pixelBlocks?.[0];return null==e?null:function(t,e,s){let{width:r,height:n,mask:i,bandMasks:o}=t,a=o?.length?g.A.combineBandMasks(o):i,l=[],u=t.pixels.length;for(let r=0;r<e.length/u;r++){let n=ws(t,e.slice(r*u,(r+1)*u),s,a);l.push(n)}let p=new g.A({width:r,height:n,pixels:l,pixelType:s,mask:a});return p.updateStatistics(),p}(e,this.functionArguments.conversionMatrix,this.outputPixelType)}_getWebGLParameters(){let t=(0,l.hP)(this.outputPixelType),[e,s,r,n,i,o,a,u,p]=this.functionArguments.conversionMatrix;return{weights:[e,n,a,s,i,u,r,o,p],clampRange:t}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],hr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:cr,json:{write:!0,name:"rasterFunctionArguments"}})],hr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],hr.prototype,"rasterArgumentNames",void 0),hr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.SpectralConversionFunction")],hr);const mr=hr,dr=new Dt.J({1:"min",2:"max",3:"mean",4:"stddev",5:"median",6:"majority",7:"minority"},{useNumericKeys:!0});function gr(t,e){let{fillNoDataOnly:s}=e,{band:r,width:n,height:i,mask:o,outBand:a}=t;if(s&&!o)return void a.set(r);let{statisticsType:l,kernelRows:u,kernelCols:p}=e,c="stddev"===l,h=n*i,m=new Float64Array(h),d=new Float64Array(h),g=new Uint32Array(h);for(let t=0;t<i;t++){let e=t*n,s=0,i=0,a=0;for(let t=0;t<p;t++)(!o||o[e+t])&&(s+=r[e+t],c&&(i+=r[e+t]**2),a++);m[e]=s,d[e]=i,g[e]=a;for(let t=1;t<=n-p;t++){let n=e+t-1,l=n+p;o?(o[n]&&(a--,s-=r[n],c&&(i-=r[n]**2)),o[l]&&(a++,s+=r[l],c&&(i+=r[l]**2))):(s-=r[n],s+=r[l],c&&(i-=r[n]**2,i+=r[l]**2)),m[e+t]=s,g[e+t]=a,c&&(d[e+t]=i)}}let f=new Float64Array(h),y=new Float64Array(h),w=new Uint32Array(h),x=u*n;for(let t=0;t<=n-p;t++){let e=0,s=0,r=0;for(let i=0;i<u;i++){let o=i*n+t;e+=m[o],r+=g[o],c&&(s+=d[o])}f[t]=e,y[t]=s,w[t]=r;for(let o=1;o<=i-u;o++){let i=(o-1)*n+t,a=i+x;e-=m[i],e+=m[a],r-=g[i],r+=g[a],c&&(s-=d[i],s+=d[a]),f[o*n+t]=e,y[o*n+t]=s,w[o*n+t]=r}}let v=Math.floor(u/2),A=Math.floor(p/2);for(let t=v;t<i-v;t++){let e=t*n;for(let r=A;r<n-A;r++){let i=(t-v)*n+r-A,l=w[i];if(0===l||s&&(!o||o[e+r]))continue;let u=f[i]/l,p=c?Math.sqrt((y[i]-f[i]*u)/l):u;a[e+r]=p,o&&(o[e+r]=255)}}}function fr(t,e){let{fillNoDataOnly:s}=e,{band:r,width:n,height:i,mask:o,outBand:a}=t;if(s&&!o)return void a.set(r);let{kernelRows:l,kernelCols:u,statisticsType:p}=e,c=Math.floor(l/2),h=Math.floor(u/2),m="min"===p,d=a.slice(),g=new Uint32Array(n*i);for(let t=c;t<i-c;t++){let e=t*n;for(let t=h;t<n-h;t++){let s=m?Number.MAX_VALUE:-Number.MAX_VALUE,i=0;for(let a=0;a<l;a++)for(let l=0;l<u;l++){let u=e+t+(a-c)*n+l-h;(!o||o[u])&&(s=m?Math.min(s,r[u]):Math.max(s,r[u]),i++)}o?(d[e+t]=0===i?0:s,g[e+t]=i):a[e+t]=0===i?0:s}}if(o)for(let t=c;t<i-c;t++){let e=t*n;for(let t=h;t<n-h;t++)if(g[e+t]){if(s&&o[e+t])continue;a[e+t]=d[e+t],o[e+t]=255}}}function yr(t,e){let{fillNoDataOnly:s}=e,{band:r,width:n,height:i,mask:o,outBand:a}=t;if(s&&!o)return void a.set(r);let{kernelRows:l,kernelCols:u}=e,p=Math.floor(l/2),c=Math.floor(u/2),h=a.slice(),m=new Uint32Array(n*i);for(let t=p;t<i-p;t++){let e=t*n;for(let t=c;t<n-c;t++){if(s&&o?.[e+t])continue;let i=[];for(let s=0;s<l;s++)for(let a=0;a<u;a++){let l=e+t+(s-p)*n+a-c;(!o||o[l])&&i.push(r[l])}i.length&&(i.sort((t,e)=>t-e),o?(h[e+t]=i[Math.floor((i.length-1)/2)],m[e+t]=i.length):a[e+t]=i[Math.floor((i.length-1)/2)])}}if(o)for(let t=p;t<i-p;t++){let e=t*n;for(let t=c;t<n-c;t++)if(m[e+t]){if(s&&o[e+t])continue;a[e+t]=h[e+t],o[e+t]=255}}}function wr(t,e){let{fillNoDataOnly:s}=e,{band:r,width:n,height:i,mask:o,outBand:a}=t;if(s&&!o)return void a.set(r);let{kernelRows:l,kernelCols:u}=e,p=Math.floor(l/2),c=Math.floor(u/2),h="majority"===e.statisticsType,m=l*u,d=a.slice(),g=new Uint32Array(n*i);for(let t=p;t<i-p;t++){let e=t*n;for(let t=c;t<n-c;t++){if(s&&o?.[e+t])continue;let i=new Map;for(let s=0;s<l;s++)for(let a=0;a<u;a++){let l=e+t+(s-p)*n+a-c;if(o&&!o[l])continue;let u=r[l];i.set(u,i.has(u)?i.get(u)+1:1)}if(0===i.size)continue;let f=0,y=0,w=h?0:m+1;for(let t of i.keys())y=i.get(t),h===y>w&&(w=y,f=t);o?(d[e+t]=f,g[e+t]=i.size):a[e+t]=f}}if(o)for(let t=p;t<i-p;t++){let e=t*n;for(let t=c;t<n-c;t++)if(g[e+t]){if(s&&o[e+t])continue;a[e+t]=d[e+t],o[e+t]=255}}}var xr;let vr=xr=class extends c{constructor(){super(...arguments),this.rows=3,this.cols=3,this.fillNoDataOnly=!1,this.statisticsType="min"}clone(){return new xr({rows:this.rows,cols:this.cols,fillNoDataOnly:this.fillNoDataOnly,statisticsType:this.statisticsType,raster:(0,i.o8)(this.raster)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,read:{source:["kernelRows","rows"],reader:(t,e)=>Number(t??e?.kernelRows??3)}}})],vr.prototype,"rows",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0,read:{source:["kernelCols","cols"],reader:(t,e)=>Number(t??e?.kernelCols??3)}}})],vr.prototype,"cols",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],vr.prototype,"fillNoDataOnly",void 0),(0,o.Cg)([(0,a.MZ)({json:{read:{source:["statisticsType","type"],reader:(t,e)=>dr.fromJSON(e?.statisticsType??e?.type)??"min"},write:{target:"type"}}}),(0,Qt.e)(dr)],vr.prototype,"statisticsType",void 0),vr=xr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsFunctionArguments")],vr);const Ar=vr;let Cr=class extends x{constructor(){super(...arguments),this.functionName="Statistics",this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let{type:t}=this.functionArguments.toJSON();if(t<1||t>7)return{success:!1,supportsGPU:!1,error:`statistics-function: the given statistics type is not supported ${t}`};let e=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType(e.pixelType);let s=e.clone();s.pixelType=this.outputPixelType;let{statisticsType:r}=this.functionArguments;return"stddev"===r&&this._removeStatsHistColormapVAT(s),this.rasterInfo=s,{success:!0,supportsGPU:s.bandCount<=3&&t<5}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return e;let{statisticsType:s,rows:r,cols:n,fillNoDataOnly:i}=this.functionArguments;return function(t,e){let{mask:s}=t,{fillNoDataOnly:r}=e;if(r&&!s)return t;let{pixels:n,width:i,height:o,bandMasks:a,pixelType:l}=t,u=n.length,p=i*o,c=[],{kernelRows:h,kernelCols:m,statisticsType:d,mirrorEdges:f}=e;if(r&&!s)return t;let y=e.outputPixelType??l,w=[];for(let t=0;t<u;t++){let l=n[t],u=g.A.createEmptyBand(y,p);r&&u.set(l);let x=(a?.[t]??s)?.slice()??null,v={band:l,width:i,height:o,mask:x,outBand:u};switch(d){case"min":case"max":fr(v,e);break;case"mean":case"stddev":gr(v,e);break;case"median":yr(v,e);break;case"majority":case"minority":wr(v,e)}f&&!r&&Qe(u,i,o,h,m),c.push(u),x&&w.push(x)}let x=w[0]??s;w.length!==u&&(w.length=0),u>1&&a?.length&&(x=g.A.combineBandMasks(a));let v=new g.A({pixelType:y,width:i,height:o,pixels:c,bandMasks:a&&w.length?w:null,mask:x});return v.updateStatistics(),v}(e,{kernelRows:r,kernelCols:n,fillNoDataOnly:i,outputPixelType:this.outputPixelType,statisticsType:s,mirrorEdges:!0})}_getWebGLParameters(){let{rows:t,cols:e,statisticsType:s,fillNoDataOnly:r}=this.functionArguments;return{fillNoDataOnly:r,kernelRows:t,kernelCols:e,statisticsType:s,clampRange:(0,l.hP)(this.outputPixelType)}}_getNeighborhoodSize(){let{rows:t,cols:e}=this.functionArguments;return{rows:t,cols:e}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Cr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Ar,json:{write:!0,name:"rasterFunctionArguments"}})],Cr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Cr.prototype,"rasterArgumentNames",void 0),Cr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsFunction")],Cr);const br=Cr;var Mr;let Pr=Mr=class extends c{constructor(){super(...arguments),this.statistics=null,this.histograms=null}readStatistics(t,e){if(!t?.length)return null;let s=[];return t.forEach(t=>{let e={min:t.min,max:t.max,avg:t.avg??t.mean,stddev:t.stddev??t.standardDeviation};s.push(e)}),s}writeStatistics(t,e,s){if(!t?.length)return;let r=[];t.forEach(t=>{let e={...t,mean:t.avg,standardDeviation:t.stddev};delete e.avg,delete e.stddev,r.push(e)}),e[s]=r}clone(){return new Mr({statistics:(0,i.o8)(this.statistics),histograms:(0,i.o8)(this.histograms)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Pr.prototype,"statistics",void 0),(0,o.Cg)([(0,ye.w)("statistics")],Pr.prototype,"readStatistics",null),(0,o.Cg)([(0,Se.K)("statistics")],Pr.prototype,"writeStatistics",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Pr.prototype,"histograms",void 0),Pr=Mr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsHistogramFunctionArguments")],Pr);const Tr=Pr;let Nr=class extends x{constructor(){super(...arguments),this.functionName="StatisticsHistogram",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){let t=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType("u8");let e=t.clone(),{statistics:s,histograms:r}=this.functionArguments;return r&&(e.histograms=r),s&&(e.statistics=s),this.rasterInfo=e,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Nr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Tr,json:{write:!0,name:"rasterFunctionArguments"}})],Nr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Nr.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Nr.prototype,"indexedColormap",void 0),(0,o.Cg)([(0,a.MZ)()],Nr.prototype,"isNoopProcess",void 0),Nr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsHistogramFunction")],Nr);const Ir=Nr;var Rr;const Fr=new Dt.J({0:"none",3:"standard-deviation",4:"histogram-equalization",5:"min-max",6:"percent-clip",9:"sigmoid"},{useNumericKeys:!0});let _r=Rr=class extends c{constructor(){super(...arguments),this.computeGamma=!1,this.dynamicRangeAdjustment=!1,this.gamma=[],this.histograms=null,this.statistics=null,this.stretchType="none",this.useGamma=!1}writeStatistics(t,e,s){t?.length&&(Array.isArray(t[0])||(t=t.map(t=>[t.min,t.max,t.avg,t.stddev])),e[s]=t)}clone(){return new Rr({stretchType:this.stretchType,outputMin:this.outputMin,outputMax:this.outputMax,useGamma:this.useGamma,computeGamma:this.computeGamma,statistics:(0,i.o8)(this.statistics),gamma:(0,i.o8)(this.gamma),sigmoidStrengthLevel:this.sigmoidStrengthLevel,numberOfStandardDeviations:this.numberOfStandardDeviations,minPercent:this.minPercent,maxPercent:this.maxPercent,histograms:(0,i.o8)(this.histograms),dynamicRangeAdjustment:this.dynamicRangeAdjustment,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],_r.prototype,"computeGamma",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{name:"dra",write:!0}})],_r.prototype,"dynamicRangeAdjustment",void 0),(0,o.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],_r.prototype,"gamma",void 0),(0,o.Cg)([(0,a.MZ)()],_r.prototype,"histograms",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_r.prototype,"maxPercent",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_r.prototype,"minPercent",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_r.prototype,"numberOfStandardDeviations",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{name:"max",write:!0}})],_r.prototype,"outputMax",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{name:"min",write:!0}})],_r.prototype,"outputMin",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_r.prototype,"sigmoidStrengthLevel",void 0),(0,o.Cg)([(0,a.MZ)({json:{type:[[Number]],write:!0}})],_r.prototype,"statistics",void 0),(0,o.Cg)([(0,Se.K)("statistics")],_r.prototype,"writeStatistics",null),(0,o.Cg)([(0,Qt.e)(Fr)],_r.prototype,"stretchType",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],_r.prototype,"useGamma",void 0),_r=Rr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StretchFunctionArguments")],_r);const kr=_r;let Sr=class extends x{constructor(){super(...arguments),this.functionName="Stretch",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null,this.cutOffs=null}_bindSourceRasters(){this.lookup=null,this.cutOffs=null;let t=this.sourceRasterInfos[0],{pixelType:e}=t,{functionArguments:s}=this,{dynamicRangeAdjustment:r,gamma:n,useGamma:i}=s;if(!r&&["u8","u16","s8","s16"].includes(e)){let r=(0,qe.DP)(s.toJSON(),{rasterInfo:t}),o=(0,l.zw)(this.outputPixelType)?"round":"float";this.lookup=(0,qe.RP)({pixelType:e,...r,gamma:i?n:null,rounding:o}),this.cutOffs=r}else r||(this.cutOffs=(0,qe.DP)(s.toJSON(),{rasterInfo:t}));this.outputPixelType=this._getOutputPixelType(e);let o=t.clone();o.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(o),"u8"===this.outputPixelType&&(o.keyProperties.DataType="processed");let{outputMin:a=0,outputMax:u=255}=this.functionArguments;o.statistics=[];for(let t=0;t<o.bandCount;t++)o.statistics[t]={min:a,max:u};return this.rasterInfo=o,{success:!0,supportsGPU:!r}}_processPixels(t,e){let s=t.pixelBlocks?.[0];if(null==s)return s;let{lookup:r}=this;if(r)return(0,Kt.eH)(s,{...r,outputPixelType:this.rasterInfo.pixelType});let{functionArguments:n}=this,i=e?.stretchCutoff??this.cutOffs??(0,qe.DP)(n.toJSON(),{rasterInfo:this.sourceRasterInfos[0],pixelBlock:s}),o=n.useGamma?n.gamma:null;return(0,qe._N)(s,{...i,gamma:o,outputPixelType:this.outputPixelType})}_getWebGLParameters(){let{outputMin:t=0,outputMax:e=255,gamma:s,useGamma:r}=this.functionArguments,n=this.rasterInfo.bandCount>=2?3:1,i=r&&s?.length?(0,qe.Nh)(n,s):[1,1,1],{minCutOff:o,maxCutOff:a}=this.cutOffs??{minCutOff:[0,0,0],maxCutOff:[255,255,255]};1===o.length&&(o[1]=o[2]=o[0],a[1]=a[2]=a[0]);let u=a.map((s,r)=>(e-t)/(a[r]-o[r])),p=(0,l.zw)(this.outputPixelType);return{bandCount:n,minOutput:t,maxOutput:e,minCutOff:o,maxCutOff:a,factor:u,useGamma:r,gamma:r&&s?[s[0],s[1]??s[0],s[2]??s[0]]:[1,1,1],gammaCorrection:r?[i[0],i[1]??i[0],i[2]??i[0]]:[1,1,1],stretchType:this.functionArguments.stretchType,isOutputRounded:p,type:"stretch"}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Sr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:kr,json:{write:!0,name:"rasterFunctionArguments"}})],Sr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Sr.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Sr.prototype,"lookup",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Sr.prototype,"cutOffs",void 0),Sr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StretchFunction")],Sr);const Br=Sr;var jr;let Zr=jr=class extends c{constructor(){super(...arguments),this.attributeTableAsRecordSet=null}clone(){return new jr({attributeTableAsRecordSet:(0,i.o8)(this.attributeTableAsRecordSet)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Zr.prototype,"attributeTableAsRecordSet",void 0),Zr=jr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.TableFunctionArguments")],Zr);const zr=Zr;let Gr=class extends x{constructor(){super(...arguments),this.functionName="Table",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){let t=this.sourceRasterInfos[0];if(t.bandCount>1||t.pixelType.startsWith("f"))return{success:!1,supportsGPU:!1,error:"table-function: Source data must be single band and integer pixel type."};let{attributeTableAsRecordSet:e}=this.functionArguments;if(!e)return{success:!1,supportsGPU:!1,error:"table-function: Missing attributeTableAsRecordSet argument."};this.outputPixelType=this._getOutputPixelType(t.pixelType);let s=t.clone();return s.pixelType=this.outputPixelType,s.bandCount=1,"thematic"!==s.dataType&&(s.keyProperties=s.keyProperties?{...s.keyProperties,DataType:"thematic"}:{DataType:"thematic"}),this.rasterInfo=s,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Gr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:zr,json:{write:!0,name:"rasterFunctionArguments"}})],Gr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Gr.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],Gr.prototype,"isNoopProcess",void 0),Gr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.TableFunction")],Gr);const Or=Gr,Dr=new Map;function Er(t,e){let{rasterFunctionArguments:s}=t;s&&(s.rasters||[s.raster,s.raster2]).forEach(t=>{t&&"number"!=typeof t&&("string"==typeof t?t.startsWith("http")&&(e.includes(t)||e.push(t)):"rasterFunctionArguments"in t&&Er(t,e))})}function Vr(t,e){e??={};try{if("function"in(t=(0,i.o8)(t))&&"arguments"in t&&t.arguments){let s=qr(t,new Map,e);if(Xr(s),!s.renderingRule)throw new n.A("raster-function-helper","Unsupported raster function json.");t=s.renderingRule}if("rasterFunction"in t){let s=$r(t=Lr(t),e);return s.isRoot=!0,s}}catch{}throw new n.A("raster-function-helper","unsupported raster function json.")}function Ur(t){return!!(t&&"object"==typeof t&&t.rasterFunction&&t.rasterFunctionArguments)}function Lr(t){let{rasterFunction:e,rasterFunctionArguments:s}=t,r={};for(let t in s){let e=s[t],n=t.toLowerCase();if("rasters"===n&&Array.isArray(e))r.rasters=e.map(t=>Ur(t)?Lr(t):t);else switch(Ur(e)&&(e=Lr(e)),n){case"dra":r.dra=e;break;case"pspower":r.psPower=e;break;case"pszfactor":r.psZFactor=e;break;case"bandids":r.bandIds=e;break;default:r[t[0].toLowerCase()+t.slice(1)]=e}}return"Local"===e&&!r.rasters?.length&&(r.rasters=["$$"]),{...t,rasterFunctionArguments:r}}function $r(t,e){let{rasterFunction:s,rasterFunctionArguments:r}=t,i=t.outputPixelType?.toLowerCase();if(null==s||!Dr.has(s))throw new n.A("raster-function-helper",`unsupported raster function: ${s}`);let o=Dr.get(s),a=("function"==typeof o.ctor?o.ctor:o.ctor.default).fromJSON({...t,outputPixelType:i}),{rasterArgumentNames:l}=a,u=[],p=function(t,e){return"rasters"===e[0]&&Array.isArray(t.rasters)?t.rasters:e.map(e=>t[e])}(r,l),c="rasters"===l[0]||l.length>1,h=[];for(let t=0;t<p.length;t++){let s,r=p[t];null==r||"string"==typeof r&&r.startsWith("$")?u.push(e?.raster):"string"==typeof r?e[r]&&u.push(e[r]):"number"!=typeof r&&"rasterFunction"in r&&(s=$r(r,e),c||(a.functionArguments[l[t]]=s),u.push(s)),c&&h.push(s??r)}if(c&&("rasters"===l[0]?a.functionArguments.rasters=h:l.forEach((t,e)=>{a.functionArguments[t]=h[e]})),e){a.sourceRasters=u;let t=e.raster?.url;t&&(a.mainPrimaryRasterId=t)}return a}function Kr(t,e){if(t&&e)for(let s in t){let r=t[s];r&&"object"==typeof r&&"type"in r&&("RasterFunctionTemplate"===r.type?Kr(r.arguments,e):"RasterFunctionVariable"===r.type&&null!=e[r.name]&&(r.value=e[r.name]))}}function Wr(t,e){if(!t||"object"!=typeof t)return t;let{value:s}=t;if(!s||"object"!=typeof s)return t.isDataset?"$$":s;if(Array.isArray(s))return 0===s.length?[]:s.map(t=>t&&"object"==typeof t&&"RasterFunctionVariable"===t.type?Wr(t,e):t);if("value"in s&&["number","string","boolean"].includes(typeof s.value))return s.value;if(t.isDataset&&"Scalar"!==s.type)return"$$";if(!("type"in s))return s;let r=s;switch(s.type){case"Scalar":r=s.value;break;case"AlgorithmicColorRamp":r=Hr(s);break;case"MultiPartColorRamp":r={type:"multipart",colorRamps:s.ArrayOfColorRamp.map(Hr)};break;case"ArgumentArray":if(s.elements?.length&&"RasterStatistics"!==s.elements[0].type){let t=[];for(let r=0;r<s.elements.length;r++){let i=s.elements[r],{type:o}=i;if(o)if("RasterFunctionTemplate"===o){let{renderingRule:s}=qr(i,e);t.push(s),null!=i._object_id&&e.set(i._object_id,s)}else{if("RasterFunctionVariable"!==o)throw new n.A("raster-function-helper","unsupported raster function json.");{let s=Wr(i,e);t.push(s),null!=i._object_id&&e.set(i._object_id,s)}}else t.push(i)}r=t}else r=s.elements}return null!=s._object_id&&e.set(s._object_id,r),r}function Hr(t){let e=t.algorithm??"esriHSVAlgorithm",{FromColor:s,ToColor:n}=t;if(!Array.isArray(s)){let{r:t,g:e,b:n}=(0,r.$)({h:s.Hue,s:s.Saturation,v:s.Value});s=[t,e,n,s.AlphaValue]}if(!Array.isArray(n)){let{r:t,g:e,b:s}=(0,r.$)({h:n.Hue,s:n.Saturation,v:n.Value});n=[t,e,s,n.AlphaValue]}return{type:"algorithmic",algorithm:e,fromColor:s,toColor:n}}function qr(t,e,s){s&&Kr(t,s);let r={renderingRule:{},templates:e};return Jr(t,r),r}function Jr(t,e){if(!t||!e.renderingRule)return;let{renderingRule:s,templates:r}=e,{function:n,arguments:i,_object_id:o}=t;if(!n||!i)return;null!=o&&r.set(o,s),s.rasterFunction=n.type.replace("Function",""),s.outputPixelType=n.pixelType;let a={};s.rasterFunctionArguments=a;for(let t in i){if("type"===t||"object_id"===t||"_object_ref_id"===t)continue;let e=i[t];!e||"object"!=typeof e||!("type"in e)||"RasterFunctionTemplate"!==e.type&&"RasterFunctionVariable"!==e.type?a[t]=e:("RasterFunctionVariable"===e.type?a[t]=Wr(e,r):(s.rasterFunctionArguments[t]={},Jr(e,{renderingRule:s.rasterFunctionArguments[t],templates:r})),null!=e._object_id&&r.set(e._object_id,a[t]))}switch(a.DEM&&!a.Raster&&(a.Raster=a.DEM,delete a.DEM),s.rasterFunction){case"Stretch":!function(t){t.Statistics?.length&&"object"==typeof t.Statistics&&(t.Statistics=t.Statistics.map(t=>[t.min,t.max,t.mean,t.standardDeviation])),null!=t.NumberOfStandardDeviation&&(t.NumberOfStandardDeviations=t.NumberOfStandardDeviation,delete t.NumberOfStandardDeviation)}(a);break;case"Colormap":!function(t){"randomcolorramp"===t.ColorRamp?.type?.toLowerCase()&&(delete t.ColorRamp,t.ColormapName="Random"),0===t.ColorSchemeType&&delete t.ColorRamp}(a);break;case"Convolution":!function(t){null!=t.ConvolutionType&&(t.Type=t.ConvolutionType,delete t.ConvolutionType)}(a);break;case"Mask":!function(t){t.NoDataValues?.length&&"string"==typeof t.NoDataValues[0]&&(t.NoDataValues=t.NoDataValues.filter(t=>""!==t).map(t=>Number(t)))}(a)}}function Xr(t){let{renderingRule:e,templates:s}=t;if("object"!=typeof e||!e?.rasterFunctionArguments||!s.size)return;let{rasterFunctionArguments:r}=e;for(let t in r){let e=r[t],i="_object_ref_id"===t?e:e&&"object"==typeof e&&"_object_ref_id"in e?e._object_ref_id:null;if(null!=i){if(!s.has(i))throw new n.A("raster-function-helper",`unsupported raster function json. _object_ref_id: ${i} does not exist`);let e=s.get(i);"_object_ref_id"===t?e&&"object"==typeof e&&Object.assign(r,e):r[t]=e}else e&&"object"==typeof e&&(e.rasterFunctionArguments&&Xr({renderingRule:e,templates:s}),Array.isArray(e)&&e.forEach((t,r)=>{if(t&&"object"==typeof t)if(null!=t._object_ref_id){if(!s.has(t._object_ref_id))throw new n.A("raster-function-helper",`unsupported raster function json. _object_ref_id: ${e} does not exist`);let o=s.get(i);o&&"object"==typeof o?Object.assign(t,o):e[r]=o}else Xr({renderingRule:t,templates:s})}))}}Dr.set("Arithmetic",{desc:"Arithmetic Function",ctor:St,rasterArgumentNames:["rasters"]}),Dr.set("Aspect",{desc:"Aspect Function",ctor:Ot,rasterArgumentNames:["raster"]}),Dr.set("BandArithmetic",{desc:"Band Arithmetic Function",ctor:re,rasterArgumentNames:["raster"]}),Dr.set("Colormap",{desc:"Colormap Function",ctor:Me,rasterArgumentNames:["raster"]}),Dr.set("ColormapToRGB",{desc:"ColormapToRGB Function",ctor:_e,rasterArgumentNames:["raster"]}),Dr.set("CompositeBand",{desc:"CompositeBand Function",ctor:ze,rasterArgumentNames:["rasters"]}),Dr.set("ComputeChange",{desc:"ComputeChange Function",ctor:$e,rasterArgumentNames:["rasters"]}),Dr.set("Convolution",{desc:"Convolution Function",ctor:os,rasterArgumentNames:["raster"]}),Dr.set("ContrastBrightness",{desc:"Contrast Brightness Function",ctor:Xe,rasterArgumentNames:["raster"]}),Dr.set("ExtractBand",{desc:"ExtractBand Function",ctor:ys,rasterArgumentNames:["raster"]}),Dr.set("Curvature",{desc:"Curvature Function",ctor:hs,rasterArgumentNames:["raster"]}),Dr.set("Hillshade",{desc:"Hillshade Function",ctor:Fs,rasterArgumentNames:["raster"]}),Dr.set("ShadedRelief",{desc:"ShadedRelief Function",ctor:sr,rasterArgumentNames:["raster"]}),Dr.set("Grayscale",{desc:"Grayscale Function",ctor:bs,rasterArgumentNames:["raster"]}),Dr.set("Clip",{desc:"Clip Function",ctor:me,rasterArgumentNames:["raster"]}),Dr.set("Local",{desc:"Local Function",ctor:js,rasterArgumentNames:["rasters"]}),Dr.set("Mask",{desc:"Mask Function",ctor:Es,rasterArgumentNames:["raster"]}),Dr.set("NDVI",{desc:"NDVI Function",ctor:Ks,rasterArgumentNames:["raster"]}),Dr.set("Remap",{desc:"Remap Function",ctor:Xs,rasterArgumentNames:["raster"]}),Dr.set("Slope",{desc:"Slope Function",ctor:lr,rasterArgumentNames:["raster"]}),Dr.set("SpectralConversion",{desc:"Spectral Conversion",ctor:mr,rasterArgumentNames:["raster"]}),Dr.set("Statistics",{desc:"Focal Statistics Function",ctor:br,rasterArgumentNames:["raster"]}),Dr.set("StatisticsHistogram",{desc:"Statistics Histogram Function",ctor:Ir,rasterArgumentNames:["raster"]}),Dr.set("Stretch",{desc:"Stretch Function",ctor:Br,rasterArgumentNames:["raster"]}),Dr.set("Table",{desc:"Attribute Table Function",ctor:Or,rasterArgumentNames:["raster"]})}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[118],{83349(e,t,n){n.d(t,{e:()=>o});const r=new Set;let i=!1;function o(e,t,n=2){let i=t&&t.length,o=i?t[0]*n:e.length;r.size&&r.clear();let l=s(e,0,o,n,!0),u=[];if(!l||l.next===l.prev)return u;let c=0,f=0,h=0;if(i&&(l=g(e,t,l,n)),e.length>80*n){c=e[0],f=e[1];let t=c,r=f;for(let i=n;i<o;i+=n){let n=e[i],o=e[i+1];n<c&&(c=n),o<f&&(f=o),n>t&&(t=n),o>r&&(r=o)}h=Math.max(t-c,r-f),h=0===h?0:32767/h}return a(l,u,c,f,h),u}function s(e,t,n,r,i){let o=null;if(i===k(e,t,n,r)>0)for(let i=t;i<n;i+=r)o=D(i/r|0,e[i],e[i+1],o);else for(let i=n-r;i>=t;i-=r)o=D(i/r|0,e[i],e[i+1],o);return o&&P(o,o.next)&&($(o),o=o.next),o}function l(e,t=e){let n,o=t===e,s=e;do{n=!1,s===s.next||0!==r.size&&r.has(s)||!P(s,s.next)&&0!==O(s.prev,s,s.next)?(o||s!==t)&&(s=s.next,n=!o):((o||s===t)&&(t=s.prev),i=!0,$(s),s=s.prev,n=!0)}while(n||s!==t);return t}function a(e,t,n,r,o){o&&function(e,t,n,r){let i=e,o=0;do{i.z=I(i.x,i.y,t,n,r),T[o++]=i,i=i.next}while(i!==e);!function(e){if(e<=32)for(let t=1;t<e;t++){let e=T[t],n=e.z,r=t-1;for(;r>=0&&T[r].z>n;)T[r+1]=T[r],r--;T[r+1]=e}else{S.length<e&&(S=new Uint32Array(e),E=new Uint32Array(e),R=Array(e));for(let t=0;t<e;t++)S[t]=T[t].z;U(e,T,S,R,E,0),U(e,R,E,T,S,8),U(e,T,S,R,E,16),U(e,R,E,T,S,24)}}(o);let s=null;for(let e=0;e<o;e++){let t=T[e];t.prevZ=s,s&&(s.nextZ=t),s=t}s.nextZ=null,T.fill(null,0,o),R.fill(null,0,o)}(e,n,r,o);let s=e,a=!1;for(;e.prev!==e.next;){let p=e.prev,g=e.next;if(O(p,e,g)<0&&(o?c(e,n,r,o):u(e)))t.push(p.i,e.i,g.i),$(e),e=g,s=g;else if((e=g)===s){if(i=!1,e=l(e),i){s=e;continue}if(!a){s=e=f(e,t),a=!0;continue}h(e,t,n,r,o);break}}}function u(e){let t=e.prev,n=e,r=e.next,i=t.x,o=n.x,s=r.x,l=t.y,a=n.y,u=r.y,c=Math.min(i,o,s),f=Math.min(l,a,u),h=Math.max(i,o,s),p=Math.max(l,a,u),g=r.next;for(;g!==t;){if(g.x>=c&&g.x<=h&&g.y>=f&&g.y<=p&&(i!==g.x||l!==g.y)&&_(i,l,o,a,s,u,g.x,g.y)&&O(g.prev,g,g.next)>=0)return!1;g=g.next}return!0}function c(e,t,n,r){let i=e.prev,o=e,s=e.next,l=i.x,a=o.x,u=s.x,c=i.y,f=o.y,h=s.y,p=Math.min(l,a,u),g=Math.min(c,f,h),d=Math.max(l,a,u),y=Math.max(c,f,h),m=I(p,g,t,n,r),x=I(d,y,t,n,r),v=e.prevZ;for(;v&&v.z>=m;){if(v.x>=p&&v.x<=d&&v.y>=g&&v.y<=y&&v!==s&&(l!==v.x||c!==v.y)&&_(l,c,a,f,u,h,v.x,v.y)&&O(v.prev,v,v.next)>=0)return!1;v=v.prevZ}let w=e.nextZ;for(;w&&w.z<=x;){if(w.x>=p&&w.x<=d&&w.y>=g&&w.y<=y&&w!==s&&(l!==w.x||c!==w.y)&&_(l,c,a,f,u,h,w.x,w.y)&&O(w.prev,w,w.next)>=0)return!1;w=w.nextZ}return!0}function f(e,t){let n=e,r=!1;do{let i=n.prev,o=n.next.next;j(i,n,n.next,o,!1)&&B(i,o)&&B(o,i)&&(t.push(i.i,n.i,o.i),$(n),$(n.next),n=e=o,r=!0),n=n.next}while(n!==e);return r?l(n):n}function h(e,t,n,r,i){let o=e;do{let e=o.next.next;for(;e!==o.prev;){if(o.i!==e.i&&N(o,e)){let s=z(o,e);return o=l(o,o.next),s=l(s,s.next),a(o,t,n,r,i),void a(s,t,n,r,i)}e=e.next}o=o.next}while(o!==e)}let p=!1;function g(e,t,n,i){let o=[];for(let n=0,l=t.length;n<l;n++){let a=s(e,t[n]*i,n<l-1?t[n+1]*i:e.length,i,!1);a===a.next&&r.add(a),o.push(Z(a))}o.sort(d),function(e,t){let n=Math.ceil((e+2*t)/16)+t+2;m.length<4*n&&(m=new Float64Array(4*n)),x=0}(e.length/i,t.length),A(n,n),p=!0;for(let e=0;e<o.length;e++)n=y(o[e],n);return p=!1,l(n)}function d(e,t){return e.x-t.x||e.y-t.y||(e.next.y-e.y)/(e.next.x-e.x)-(t.next.y-t.y)/(t.next.x-t.x)}function y(e,t){let n=function(e,t){let n,r=t,i=e.x,o=e.y,s=-1/0;if(P(e,r))return r;for(let t=0,l=0;t<x;t++,l+=4){if(o<m[l+1]||o>m[l+3]||m[l]>i||m[l+2]<=s)continue;let a=b(t);r=M(t);do{if(r.prev.next===r){if(P(e,r.next))return r.next;if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){let e=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(e<=i&&e>s&&(s=e,n=r.x<r.next.x?r:r.next,e===i))return n}}r=r.next}while(r!==a)}if(!n)return null;let l=n.x,a=n.y,u=Math.min(o,a),c=Math.max(o,a),f=1/0;for(let t=0,h=0;t<x;t++,h+=4){if(m[h+2]<l||m[h]>i||m[h+3]<u||m[h+1]>c)continue;let p=b(t);r=M(t);do{if(r.prev.next===r&&i>=r.x&&r.x>=l&&i!==r.x&&_(o<a?i:s,o,l,a,o<a?s:i,o,r.x,r.y)){let t=Math.abs(o-r.y)/(i-r.x);(B(r,e)||r.y===o&&r.next.y===o&&r.next.x>i)&&(t<f||t===f&&(r.x>n.x||r.x===n.x&&C(n,r)))&&(n=r,f=t)}r=r.next}while(r!==p)}return n}(e,t);if(!n)return t;let r=z(n,e);return A(n,r.next.next),l(r,r.next),l(n,n.next)}let m=new Float64Array,x=0;const v=[],w=[];function A(e,t){let n=e;do{let e=x++;v[e]=n;let r=1/0,i=1/0,o=-1/0,s=-1/0,l=0;do{let t=n.next;n.z=e,n.x<r&&(r=n.x),n.x>o&&(o=n.x),n.y<i&&(i=n.y),n.y>s&&(s=n.y),t.x<r&&(r=t.x),t.x>o&&(o=t.x),t.y<i&&(i=t.y),t.y>s&&(s=t.y),n=t}while(++l<16&&n!==t);w[e]=n;let a=4*e;m[a]=r,m[a+1]=i,m[a+2]=o,m[a+3]=s}while(n!==t)}function b(e){let t=w[e];for(;t.prev.next!==t;)t=t.next;return w[e]=t,t}function M(e){let t=v[e];for(;t.prev.next!==t;)t=t.next;return v[e]=t,t}function C(e,t){return O(e.prev,e,t.prev)<0&&O(t.next,e,e.next)<0}const T=[];let R=[],S=new Uint32Array,E=new Uint32Array;const L=new Uint32Array(256);function U(e,t,n,r,i,o){L.fill(0);for(let t=0;t<e;t++)L[n[t]>>>o&255]++;let s=0;for(let e=0;e<256;e++){let t=L[e];L[e]=s,s+=t}for(let s=0;s<e;s++){let e=n[s],l=L[e>>>o&255]++;r[l]=t[s],i[l]=e}}function I(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Z(e){let t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function _(e,t,n,r,i,o,s,l){return(i-s)*(t-l)>=(e-s)*(o-l)&&(e-s)*(r-l)>=(n-s)*(t-l)&&(n-s)*(o-l)>=(i-s)*(r-l)}function N(e,t){let n=P(e,t)&&O(e.prev,e,e.next)>0&&O(t.prev,t,t.next)>0;return e.next.i!==t.i&&(n||B(e,t)&&B(t,e)&&(0!==O(e.prev,e,t.prev)||0!==O(e,t.prev,t)))&&!function(e,t){let n=Math.min(e.x,t.x),r=Math.max(e.x,t.x),i=Math.min(e.y,t.y),o=Math.max(e.y,t.y),s=e;do{let l=s.next;if(s.x>r&&l.x>r||s.x<n&&l.x<n||s.y>o&&l.y>o||s.y<i&&l.y<i)s=l;else{if(s.i!==e.i&&l.i!==e.i&&s.i!==t.i&&l.i!==t.i&&j(s,l,e,t))return!0;s=l}}while(s!==e);return!1}(e,t)&&(n||function(e,t){let n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{let e=n.next;n.y>o!=e.y>o&&i<(e.x-n.x)*(o-n.y)/(e.y-n.y)+n.x&&(r=!r),n=e}while(n!==e);return r}(e,t))}function O(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function P(e,t){return e.x===t.x&&e.y===t.y}function j(e,t,n,r,i=!0){let o=O(e,t,n),s=O(e,t,r),l=O(n,r,e),a=O(n,r,t);return(o>0&&s<0||o<0&&s>0)&&(l>0&&a<0||l<0&&a>0)||!!i&&!!(0===o&&F(e,n,t)||0===s&&F(e,r,t)||0===l&&F(n,e,r)||0===a&&F(n,t,r))}function F(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function B(e,t){return O(e.prev,e,e.next)<0?O(e,t,e.next)>=0&&O(e,e.prev,t)>=0:O(e,t,e.prev)<0||O(e,e.next,t)<0}function z(e,t){let n=H(e.i,e.x,e.y),r=H(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function D(e,t,n,r){let i=H(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function $(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ),p&&function(e,t){let n=4*e.z;t.x<m[n]&&(m[n]=t.x),t.y<m[n+1]&&(m[n+1]=t.y),t.x>m[n+2]&&(m[n+2]=t.x),t.y>m[n+3]&&(m[n+3]=t.y)}(e.prev,e.next)}function H(e,t,n){return{i:e,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function k(e,t,n,r){let i=0;for(let o=t,s=n-r;o<n;o+=r)i+=(e[s]-e[o])*(e[o+1]+e[s+1]),s=o;return i}let G,V,Y,K,W,q=0,J=0;function Q(e,t,n,r,i,o){return(n-e)*(o-t)-(r-t)*(i-e)}function X(e,t,n,r,i,o,s,l){let a=e-s,u=t-l,c=n-s,f=r-l,h=i-s,p=o-l,g=a*a+u*u,d=c*c+f*f,y=h*h+p*p,m=g+d+y;return a*(f*y-d*p)-u*(c*y-d*h)+g*(c*p-f*h)<=1e-13*m*m}function ee(e){return e-e%3+(e+1)%3}o.deviation=function(e,t,n,r){let i=t&&t.length,o=i?t[0]*n:e.length,s=Math.abs(k(e,0,o,n));if(i)for(let r=0,i=t.length;r<i;r++){let o=t[r]*n,l=r<i-1?t[r+1]*n:e.length;s-=Math.abs(k(e,o,l,n))}let l=0;for(let t=0;t<r.length;t+=3){let i=r[t]*n,o=r[t+1]*n,s=r[t+2]*n;l+=Math.abs((e[i]-e[s])*(e[o+1]-e[i+1])-(e[i]-e[o])*(e[s+1]-e[i+1]))}return 0===s&&0===l?0:Math.abs((l-s)/s)},o.flatten=function(e){let t=[],n=[],r=e[0][0].length,i=0,o=0;for(let s of e){for(let e of s)for(let n=0;n<r;n++)t.push(e[n]);o&&(i+=o,n.push(i)),o=s.length}return{vertices:t,holes:n,dimensions:r}},o.refine=function(e,t,n=2){let r=e,i=r.length;if(i<6)return;(function(e){(!G||G.length<e)&&(G=new Int32Array(e)),(!V||V.length<e)&&(V=new Int32Array(e)),(!W||W.length<e)&&(W=new Uint8Array(e));let t=1;for(;t<4*e;)t<<=1;(!Y||Y.length<t)&&(Y=new Int32Array(t),K=new Uint32Array(t)),q=t-1})(i),J++,V.fill(-1,0,i);let o=0;for(let e=0;e<i;e++){let t=r[e],n=r[ee(e)],i=t<n?t:n,s=t<n?n:t,l=(Math.imul(i,2654435761)^Math.imul(s,2246822507))&q;for(;K[l]===J;){let t=Y[l];if(-1!==t){let n=r[t],a=r[ee(t)];if(n===i&&a===s||n===s&&a===i){V[e]=t,V[t]=e,Y[l]=-1,W[t]=1,G[o++]=t;break}}l=l+1&q}K[l]!==J&&(Y[l]=e,K[l]=J)}for(;o>0;){let e=G[--o];W[e]=0;let i=V[e];if(-1===i)continue;let s=e-e%3,l=i-i%3,a=s+(e+2)%3,u=s+(e+1)%3,c=l+(i+2)%3,f=l+(i+1)%3,h=r[a],p=r[e],g=r[u],d=r[c],y=t[h*n],m=t[h*n+1],x=t[p*n],v=t[p*n+1],w=t[g*n],A=t[g*n+1],b=t[d*n],M=t[d*n+1];if(!X(y,m,x,v,w,A,b,M)&&Q(y,m,x,v,b,M)>0&&Q(y,m,b,M,w,A)>0){r[e]=d,r[i]=h;let t=V[c],n=V[a];V[e]=t,-1!==t&&(V[t]=e),V[i]=n,-1!==n&&(V[n]=i),V[a]=c,V[c]=a,-1!==t&&0===W[e]&&(W[e]=1,G[o++]=e),-1!==n&&0===W[i]&&(W[i]=1,G[o++]=i),-1!==V[u]&&0===W[u]&&(W[u]=1,G[o++]=u),-1!==V[f]&&0===W[f]&&(W[f]=1,G[o++]=f)}}}},21287(e,t,n){n.d(t,{M5:()=>f,eV:()=>c});var r=n(56507),i=n(49186),o=n(17676),s=n(84952),l=n(26306);let a=null,u=!0;function c(e,t,n,r){if(!t||!n)throw Error("Cannot construct image data without dimensions");if(u)try{return new ImageData(e,t,n)}catch{u=!1}let i=function(e,t,n){return n||=(a||(a=document.createElement("canvas"),a.width=1,a.height=1),a),n.getContext("2d").createImageData(e,t)}(t,n,r);return i.data.set(e,0),i}async function f(e,t){let{arrayBuffer:a,mediaType:u}=await async function(e,t){let n=(0,s.r$)(e);if(n?.isBase64)return{arrayBuffer:(0,l.M)(n.data),mediaType:n.mediaType};let i=await(0,r.A)(e,{responseType:"array-buffer",...t});return{arrayBuffer:i.data,mediaType:i.getHeader?.("Content-Type")??""}}(e,t),c="image/png"===u;if("image/gif"===u){let{isAnimatedGIF:e,parseGif:r}=await n.e(820).then(()=>n(10820));if(e(a))return r(a,t)}if(c){let{isAnimatedPNG:e,parseApng:r}=await n.e(2390).then(()=>n(22390));if(e(a))return r(a,t)}return async function(e,t){let n=window.URL.createObjectURL(e);try{let{data:e}=await(0,r.A)(n,{...t,responseType:"image"});return e}catch(e){throw(0,o.zf)(e)?e:new i.A("invalid-image",`Could not fetch requested image at ${n}`)}finally{window.URL.revokeObjectURL(n)}}(new Blob([a],{type:u}),t)}},83300(e,t,n){n.r(t),n.d(t,{default:()=>Ee});var r=n(32198),i=n(69540),o=n(92474),s=n(53966),l=n(61893),a=n(17676),u=n(36708),c=n(91429),f=n(51850),h=n(91075),p=n(86738),g=n(39829),d=n(70328),y=n(24770),m=n(16939),x=n(49186);const v="Expected location to be a Point instance";class w extends x.A{constructor(){super("invalid-input:location",v)}}var A=n(95696),b=n(18251),M=n(73836),C=n(1193),T=n(27615),R=n(35522),S=n(65806);function E(e,t){switch(e.type){case"georeferenced":return t.isGeographic;case"local":return t.isGeographic||t.isWebMercator}}var L=n(22141),U=n(72258);const I=()=>s.A.getLogger("esri.geometry.support.meshUtils.centerAt");const Z=(0,f.vt)(),_=(0,f.vt)(),N=(0,f.vt)();var O=n(9093),P=n(5443),j=n(99917),F=n(98764),B=n(48353),z=n(9762),D=n(4197),$=n(73354);const H=(0,O.vt)(),k=(0,D.jh)(24);var G=n(84952);function V(e){let t=(0,G.nM)(e.url);return n=>{let r=(0,G.V1)(n,t,t),i=r?r.replace(/^ *\.\//,""):null;return(i?e.files.get(i):null)??n}}function Y(e){return ee.fromBlob(e,te(e.name,e.type))}const K=/^model\/gltf\+json$/,W=/^model\/gltf-binary$/,q=/\.gltf$/i,J=/\.glb$/i;function Q({mimeType:e,source:t,name:n}){return K.test(e)||q.test(n)?{url:t.url,type:"gltf"}:W.test(e)||J.test(n)?{url:t.url,type:"glb"}:null}function X(e){let t=new Map,n=null,r=null;for(let i of e){let{source:e,name:o}=i;n??=Q(i),"ESRI3DO_NORM.glb"===o&&(r=Q(i)),t.set(o,e.url),e.files.forEach((e,n)=>t.set(n,e))}let i=r??n;if(null==i)throw new x.A("mesh-load-external:missing-files","Missing files to load external mesh source");return new ee(i.url,()=>e.forEach(({source:e})=>e.dispose()),t,i.type)}class ee{constructor(e,t=()=>{},n=new Map,r){this.url=e,this.dispose=t,this.files=n,this.type=r}static fromBlob(e,t){let n=URL.createObjectURL(e);return new ee(n,()=>URL.revokeObjectURL(n),void 0,t)}}function te(e,t){return K.test(t)||q.test(e)?"gltf":W.test(t)||q.test(e)?"glb":void 0}var ne=n(66895),re=n(29461),ie=n(15070),oe=n(77690),se=n(29242),le=n(58083),ae=n(67026),ue=n(82534);const ce=()=>s.A.getLogger("esri.geometry.support.meshUtils.rotate");function fe(e,t,n,r=f.uY){if(null!=e){(0,le.$0)(de,(0,y.$I)(t),(0,y.yo)(t));for(let t=0;t<e.length;t+=n){for(let n=0;n<3;n++)he[n]=e[t+n]-r[n];(0,R.Z0)(he,he,de);for(let n=0;n<3;n++)e[t+n]=he[n]+r[n]}}}const he=(0,f.vt)(),pe=(0,O.vt)(),ge=(0,y.vt)(),de=(0,O.vt)(),ye=(0,se.vt)(),me=(0,f.vt)(),xe=(0,ue.vt)(),ve=()=>s.A.getLogger("esri.geometry.support.meshUtils.scale");function we(e,t,n=f.uY){if(e)for(let r=0;r<e.length;r+=3){for(let t=0;t<3;t++)Ae[t]=e[r+t]-n[t];(0,R.hs)(Ae,Ae,t);for(let t=0;t<3;t++)e[r+t]=Ae[t]+n[t]}}const Ae=(0,f.vt)(),be=(0,f.vt)(),Me=(0,O.vt)(),Ce=(0,f.vt)();var Te,Re=n(9859);const Se={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:A.A,local:b.A}};let Ee=Te=class extends((0,i.OU)((0,o.WV)((0,l.g)(h.A)))){constructor(e){super(e),this.components=null,this.vertexSpace=new A.A,this.transform=null,this.metadata=new re.O,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new C.default,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when(()=>{this.addHandles((0,u.wB)(()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map(e=>e.clone())}),()=>this._clearSources(),{once:!0,sync:!0}))}).catch(()=>{})}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){let{spatialReference:e,vertexSpace:t}=this,n=this;return function(e){let{spatialReference:t,vertexSpace:n,untransformedBounds:r}=e,i=(0,d.gE)(r,k);if((0,T.Hq)(n)&&e.transform&&(0,$.t)(i,i,e.transform.localMatrix),"georeferenced"===n.type){let e=n.origin;return e&&(0,$.a)(i,i,e),(0,d.w1)((0,d.vY)(i),t)}let o=(0,F.lO)(t),s=n.origin;if(!(0,j.canProjectWithoutEngine)(o,t)){let[e,n,r]=s;return new P.A({xmin:e,ymin:n,zmin:r,xmax:e,ymax:n,zmax:r,spatialReference:t})}return(0,B.l)(t,s,H,o),(0,$.t)(i,i,H),(0,z.projectBuffer)(i,o,0,i,t,0),(0,d.w1)((0,d.vY)(i),t)}({get transform(){return n.transform},vertexSpace:t,spatialReference:e,untransformedBounds:this._untransformedBounds})}get _untransformedBounds(){let{vertexAttributes:{position:e},components:t}=this;return 0===e.length||0===t?.length?(0,d.vt)(d.v_):(0,d.vY)(e)}get origin(){let e=(0,T.MW)(this.vertexSpace,this.spatialReference);if(null!=e)return e;let{center:t,zmin:n}=this._transformedExtent;return new p.A({x:t.x,y:t.y,z:n,spatialReference:this.spatialReference})}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this._checkIfLoaded("addComponent()")&&(this.components||=[],this.components.push(m.default.from(e)),this.notifyChange("components"))}removeComponent(e){if(this._checkIfLoaded("removeComponent()")){if(this.components){let t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}s.A.getLogger(this).error("removeComponent()","Provided component is not part of the list of components")}}rotate(e,t,n,r){return(0,y.AU)(e,t,n,Le),function(e,t,n){if(!e.vertexAttributes?.position||0===t[3])return;let{spatialReference:r,vertexSpace:i}=e,o=n?.origin??e.origin;(0,T.CK)(e)?function(e,t,n){e.transform??=new M.A;let{vertexSpace:r,transform:i,spatialReference:o}=e,[s,l,a]=r.origin,u=new p.A({x:s,y:l,z:a,spatialReference:o}),c=he;if(u.equals(n))(0,R.hZ)(c,0,0,0);else if(!(0,U.p5)(c,n,e))return void(0,L.CN)(ce(),n.spatialReference,o,L.JP);(0,ae.x8)(xe,(0,y.yo)(t),(0,y.$I)(t));let h=(0,le.O7)(pe,xe,f.uY,f.Un,c),{localMatrix:g}=i,d=(0,le.lw)(pe,h,g);i.scale=(0,le.X_)((0,f.vt)(),d),(0,le.hs)(d,d,(0,R.DI)(he,i.scale));let m=i.rotationAxis;i.rotation=(0,y.ui)(d),0===i.rotationAngle&&(i.rotationAxis=m),i.translation=(0,le.sC)((0,f.vt)(),d)}(e,t,o):E(i,r)?function(e,t,n){let r=e.spatialReference,i=(0,F.lO)(r),o=me;if(!(0,S.g)(n,o,i)&&((0,L.CN)(ce(),n.spatialReference,i,"Falling back to mesh origin"),!(0,S.g)(e.origin,o,i)))return void(0,L.CN)(ce(),e.origin.spatialReference,i);let s=e.vertexAttributes.position,l=e.vertexAttributes.normal,a=e.vertexAttributes.tangent,u=new Float64Array(s.length),c=null==l?null:new Float32Array(l.length),f=null==a?null:new Float32Array(a.length);(0,B.l)(i,o,de,i),(0,oe.z0)(ye,de);let h=ge;(0,R.ei)((0,y.yo)(ge),(0,y.yo)(t),ye),h[3]=t[3],(0,L.gr)(s,r,u,i)?null!=l&&null!=c&&!(0,L.X4)(l,s,r,u,i,c)||null!=a&&null!=f&&!(0,L.xA)(a,s,r,u,i,f)?(0,L.CN)(ce(),r,i):(fe(u,h,3,o),(0,L.$5)(u,i,s,r)?null!=l&&null!=c&&(fe(c,h,3),!(0,L.si)(c,s,r,u,i,l))||null!=a&&null!=f&&(fe(f,h,4),!(0,L.Mv)(f,s,r,u,i,a))?(0,L.CN)(ce(),i,r):e.vertexAttributesChanged():(0,L.CN)(ce(),i,r)):(0,L.CN)(ce(),r,i)}(e,t,o):function(e,t,n){let r=me;if((0,S.g)(n,r,e.spatialReference))fe(e.vertexAttributes.position,t,3,r),fe(e.vertexAttributes.normal,t,3),fe(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged();else{let t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,(0,L.CN)(ce(),n.spatialReference,e.spatialReference,L.JP)}}(e,t,o)}(this,Le,r),this}offset(e,t,n){if(!this._checkIfLoaded("offset()"))return this;let{vertexSpace:r,vertexAttributes:i}=this,o=i?.position;if(!o)return this;if((0,T.Hq)(r)){let[i,o,s]=r.origin;r.origin=(0,f.fA)(i+e,o+t,s+n)}else{for(let r=0;r<o.length;r+=3)o[r]+=e,o[r+1]+=t,o[r+2]+=n;this.vertexAttributesChanged()}return this}scale(e,t){return this._checkIfLoaded("scale()")&&function(e,t,n){if(!e.vertexAttributes?.position)return;let{vertexSpace:r,spatialReference:i}=e,o=n?.origin??e.origin;(0,T.CK)(e)?function(e,t,n){e.transform??=new M.A;let{vertexSpace:r,transform:i,spatialReference:o}=e,[s,l,a]=r.origin,u=new p.A({x:s,y:l,z:a,spatialReference:o}),c=Ae;if(u.equals(n))(0,R.hZ)(c,0,0,0);else if(!(0,U.p5)(c,n,e))return void(0,L.CN)(ve(),n.spatialReference,o,L.JP);let h=(0,R.hZ)(be,t,t,t),g=(0,le.O7)(Me,ue.zK,f.uY,h,c),{localMatrix:d}=i,m=(0,le.lw)(Me,g,d);i.scale=(0,le.X_)((0,f.vt)(),m),(0,le.hs)(m,m,(0,R.DI)(Ae,i.scale));let x=i.rotationAxis;i.rotation=(0,y.ui)(m),0===i.rotationAngle&&(i.rotationAxis=x),i.translation=(0,le.sC)((0,f.vt)(),m)}(e,t,o):E(r,i)?function(e,t,n){let r=e.spatialReference,i=(0,F.lO)(r),o=Ce;if(!(0,S.g)(n,o,i)&&((0,L.CN)(ve(),n.spatialReference,i,"Falling back to mesh origin"),!(0,S.g)(e.origin,o,i)))return void(0,L.CN)(ve(),e.origin.spatialReference,i);let s=e.vertexAttributes.position,l=e.vertexAttributes.normal,a=e.vertexAttributes.tangent,u=new Float64Array(s.length),c=null==l?null:new Float32Array(l.length),f=null==a?null:new Float32Array(a.length);(0,L.gr)(s,r,u,i)?null!=l&&null!=c&&!(0,L.X4)(l,s,r,u,i,c)||null!=a&&null!=f&&!(0,L.xA)(a,s,r,u,i,f)?(0,L.CN)(ve(),r,i):(we(u,t,o),(0,L.$5)(u,i,s,r)?null!=l&&null!=c&&!(0,L.si)(c,s,r,u,i,l)||null!=a&&null!=f&&!(0,L.Mv)(f,s,r,u,i,a)?(0,L.CN)(ve(),i,r):e.vertexAttributesChanged():(0,L.CN)(ve(),i,r)):(0,L.CN)(ve(),r,i)}(e,t,o):function(e,t,n){let r=Ce;if((0,S.g)(n,r,e.spatialReference))we(e.vertexAttributes.position,t,r),e.vertexAttributesChanged();else{let t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,(0,L.CN)(ve(),n.spatialReference,e.spatialReference,L.JP)}}(e,t,o)}(this,e,t),this}centerAt(e,t){return this._checkIfLoaded("centerAt()")&&function(e,t,n){if(!e.vertexAttributes?.position)return;let{vertexSpace:r}=e,i=n?.origin??e.origin;(0,T.Hq)(r)?function(e,t,n){let{vertexSpace:r}=e;if(!(0,T.Hq)(r))return;let i=_,o=Z;if(!(0,S.g)(t,o,e.spatialReference))return void(0,L.CN)(I(),t.spatialReference,e.spatialReference,L.JP);if(!(0,S.g)(n,i,e.spatialReference))return void(0,L.CN)(I(),n.spatialReference,e.spatialReference,L.JP);let s=(0,R.Re)(N,o,i);r.origin=(0,R.WQ)((0,f.vt)(),r.origin,s)}(e,t,i):E(r,i.spatialReference)?function(e,t,n){let r=(0,f.fA)(n.x,n.y,n.z??0),i=(0,U.UR)(e,new b.A({origin:r}));if(!i)return;let o=(0,f.fA)(t.x,t.y,t.z??0),s=(0,U.UR)({vertexAttributes:i,spatialReference:e.spatialReference,vertexSpace:new b.A({origin:o})},A.A.absolute);if(!s)return;let{position:l,normal:a,tangent:u}=s;e.vertexAttributes.position=l,e.vertexAttributes.normal=a,e.vertexAttributes.tangent=u,e.vertexAttributesChanged()}(e,t,i):function(e,t,n){let r=_,i=Z;if((0,S.g)(t,i,e.spatialReference))if((0,S.g)(n,r,e.spatialReference))(function(e,t,n){if(e)for(let r=0;r<e.length;r+=3)for(let i=0;i<3;i++)e[r+i]+=t[i]-n[i]})(e.vertexAttributes.position,i,r),e.vertexAttributesChanged();else{let t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,(0,L.CN)(I(),n.spatialReference,e.spatialReference,L.JP)}else(0,L.CN)(I(),t.spatialReference,e.spatialReference,L.JP)}(e,t,i)}(this,e,t),this}load(e){let{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(async function(e,t,r){switch(t.source.type){case"client":case"service":return async function(e,t,r){let{source:i}=t,{loadGLTFMesh:o}=await(0,a.qr)(n.e(5841).then(()=>n(35841)),r),s=await async function(e,t){switch(e.type){case"client":return Array.isArray(e.files)?function(e){if(!e.length)throw new x.A("mesh-load-external:missing-assets","There must be at least one file to load");return X(e.map(e=>({name:e.name,mimeType:e.type,source:Y(e)})))}(e.files):Y(e.files);case"service":return async function(e,t){if(!e.length)throw new x.A("mesh-load-external:missing-assets","There must be at least one file to load");let n=await(0,a.nA)(e.map(async e=>{let n=await async function(e,t){let{parts:n,assetMimeType:r,assetName:i}=e;if(1===n.length)return new ee(n[0].partUrl);let o=await e.toBlob(t);return(0,a.Te)(t),ee.fromBlob(o,te(i,r))}(e);return(0,a.Te)(t),{name:e.assetName,mimeType:e.assetMimeType,source:n}}));if((0,a.G4)(t))throw n.forEach(e=>e.source.dispose()),(0,a.NK)();return X(n)}(e.assets,t);default:throw new x.A("mesh-load-external:invalid-source","Invalid source type")}}(i,r);(0,a.Te)(r);let{mesh:{vertexAttributes:l,components:u},meta:{isDracoDecompressed:c}}=await o(new p.A({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:V(s),signal:r?.signal,expectedType:s.type,unitConversionDisabled:t.unitConversionDisabled}).finally(()=>s.dispose());if(c)throw new x.A("mesh-load-external:draco-not-supported","The provided mesh uses Draco compression which is not supported.");e.vertexAttributes=l,e.components=u}(e,t,r);case"loadable":return t.source.load(e,r);default:t.source}}(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(e){return super.clone((0,ne.WO)((0,ne.QN)(e)))}cloneShallow(){return new Te({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){let[{toBinaryGLTF:t}]=await Promise.all([n.e(4038).then(()=>n(84038)),this.load(e)]);return(0,a.Te)(e),await t(this,e)}get usedMemory(){return this.components?this.components.reduce((e,t)=>e+t.memoryUsage,this.vertexAttributes.usedMemory):this.vertexAttributes.usedMemory}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return!!this.loaded||(s.A.getLogger(this).error(e,"Mesh must be loaded before applying operations"),!1)}static createBox(e,t){if(!(e instanceof p.A))return s.A.getLogger(this.prototype).error(".createBox()",v),null;let n=new Te((0,ie.UG)((0,ie.H8)(),e,t));return t?.imageFace&&"all"!==t.imageFace?(0,ie.bQ)(n,t.imageFace):n}static createSphere(e,t){return e instanceof p.A?new Te((0,ie.UG)((0,ie.Dk)(t?.densificationFactor||0),e,t)):(s.A.getLogger(this.prototype).error(".createSphere()",v),null)}static createCylinder(e,t){return e instanceof p.A?new Te((0,ie.UG)((0,ie.ai)(t?.densificationFactor||0),e,t)):(s.A.getLogger(this.prototype).error(".createCylinder()",v),null)}static createPlane(e,t){if(!(e instanceof p.A))return s.A.getLogger(this.prototype).error(".createPlane()",v),null;let n=t?.facing??"up",r=(0,ie.uF)(n,t?.size);return new Te((0,ie.UG)((0,ie.Uh)(n),e,{...t,size:r}))}static createFromPolygon(e,t){if(!(e instanceof g.A))return s.A.getLogger(this.prototype).error(".createFromPolygon()","Expected polygon to be a Polygon instance"),null;let n=(0,Re.uM)(e,{method:"earcut"}),r=(0,a.$X)(n)?null:n,i=r?.positions??[],o=r?.polygonIndices??[];return new Te({vertexAttributes:new C.default({position:i}),components:[new m.default({faces:o,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new A.A})}static async createFromGLTF(e,t,r){if(!(e instanceof p.A)){let e=new w;throw s.A.getLogger(this.prototype).error(".createfromGLTF()",e.message),e}let{loadGLTFMesh:i}=await(0,a.qr)(n.e(5841).then(()=>n(35841)),r);return new Te((await i(e,t,r)).mesh)}};(0,r.Cg)([(0,c.MZ)({type:[m.default],json:{write:!0}})],Ee.prototype,"components",void 0),(0,r.Cg)([(0,c.MZ)({nonNullable:!0,types:Se,constructOnly:!0,json:{write:!0},clonable:(e,t)=>(0,ne.o2)(t)?.vertexSpace??e.clone(t)})],Ee.prototype,"vertexSpace",void 0),(0,r.Cg)([(0,c.MZ)({type:M.A,clonable:(e,t)=>{let n=(0,ne.o2)(t);return n&&"transform"in n?n.transform:e?.clone()??e},json:{write:!0}})],Ee.prototype,"transform",void 0),(0,r.Cg)([(0,c.MZ)({constructOnly:!0,type:re.O,clonable:(e,t)=>(0,ne.o2)(t)?.metadata??e.clone()})],Ee.prototype,"metadata",void 0),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"hasExtent",null),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"_transformedExtent",null),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"_untransformedBounds",null),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"origin",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],Ee.prototype,"extent",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Ee.prototype,"hasZ",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Ee.prototype,"hasM",void 0),(0,r.Cg)([(0,c.MZ)({type:C.default,nonNullable:!0,json:{write:!0},clonable:(e,t)=>(0,ne.o2)(t)?.vertexAttributes??e.clone(t)})],Ee.prototype,"vertexAttributes",void 0),Ee=Te=(0,r.Cg)([(0,c.$K)("esri.geometry.Mesh")],Ee);const Le=(0,y.vt)()},15585(e,t,n){n.d(t,{If:()=>p,O5:()=>m,O9:()=>d,QT:()=>y,l3:()=>g});var r=n(32198),i=n(2741),o=n(49186),s=n(44208),l=n(34727);let a=null,u=null,c=null,f=null;const h=(new Float32Array,new Uint32Array,new Uint32Array,new Uint32Array,{vertices:new Float64Array,indices:new Uint32Array,outlineIndices:new Uint32Array,outlineRingLengths:new Uint32Array,vertexCount:0,indexCount:0,outlineIndexCount:0,outlineRingCount:0});async function p(){return a??=async function(){c=await(await n.e(2997).then(()=>n(42997))).default({locateFile:e=>(0,i.s)(`esri/core/libs/libtess/${e}`)})}(),a}async function g(){return u??=async function(){f=await(await n.e(9134).then(()=>n(99134))).default({locateFile:e=>(0,i.s)(`esri/core/libs/libtess/${e}`)})}(),u}function d(){return null!==f}function y(e,t,n=2){let i={stack:[],error:void 0,hasError:!1};try{let l=c;if(!l)throw new o.A("libtess:not-loaded","libtessF32 not loaded");let a=(0,r.mS)(i,A.from(l,e),!1),u=(0,r.mS)(i,M.from(l,t),!1),f=e.length/n*4,h=(0,r.mS)(i,new A(l,f*n),!1),p=l.triangulate(a.ptr,u.ptr,u.size,n,h.ptr,f);if((0,s.A)("esri-tessellation-debug")){let e=l.getError();0!==e&&console.warn("libtess:triangulation",C(e))}return{buffer:h.slice(0,p*n),vertexCount:p}}catch(e){i.error=e,i.hasError=!0}finally{(0,r.hk)(i)}}function m(e,t,n=2,i=!0){let a={stack:[],error:void 0,hasError:!1};try{let u=f;if(!u)throw new o.A("libtess:not-loaded","libtessF64 not loaded");let c=(0,r.mS)(a,b.from(u,e),!1),p=(0,r.mS)(a,M.from(u,t),!1),g=(0,r.mS)(a,new M(u,1),!1),d=(0,r.mS)(a,new M(u,1),!1),y=(0,r.mS)(a,new M(u,1),!1),m=(0,r.mS)(a,new M(u,1),!1),{maxVertexCount:x,maxIndexCount:v,maxOutlineIndexCount:A,maxOutlineRingCount:T}=function(e,t){let n=e.reduce((e,t)=>e+t,0),r=e.length,i=Math.max(0,e.length-1),o=Math.max(0,n+2*i-2),s=Math.max(0,Math.ceil(2*n)),a=Math.max(0,Math.ceil(3*o*2)),u=(0,l.mP)(a,3),c=n>0?Math.max(2,Math.ceil(.25*n)):0,f=n>0?Math.max(1,Math.ceil(c/3)):0;return{maxVertexCount:s,maxIndexCount:u,maxOutlineIndexCount:t?Math.max(0,n+r+c):0,maxOutlineRingCount:t?Math.max(0,r+f):0}}(t,i),R=0,S=0,E=0,L=0,U=0;{let e={stack:[],error:void 0,hasError:!1};try{let t=(0,r.mS)(e,new b(u,x*n),!1),o=(0,r.mS)(e,new M(u,v),!1),s=(0,r.mS)(e,i?new M(u,A):null,!1),l=(0,r.mS)(e,i?new M(u,T):null,!1);if(u.triangulateIndexed(c.ptr,p.ptr,p.size,n,t.ptr,x,n,o.ptr,v,g.ptr,d.ptr,s?.ptr??0,A,l?.ptr??0,T,y.ptr,m.ptr),U=u.getError(),R=w(u)[g.ptr/Int32Array.BYTES_PER_ELEMENT],S=w(u)[d.ptr/Int32Array.BYTES_PER_ELEMENT],E=w(u)[y.ptr/Int32Array.BYTES_PER_ELEMENT],L=w(u)[m.ptr/Int32Array.BYTES_PER_ELEMENT],0===U)return{vertices:t.slice(0,R*n),indices:o.slice(0,S),outlineIndices:i&&s?s.slice(0,E):h.outlineIndices,outlineRingLengths:i&&l?l.slice(0,L):h.outlineRingLengths,vertexCount:R,indexCount:S,outlineIndexCount:i?E:0,outlineRingCount:i?L:0}}catch(t){e.error=t,e.hasError=!0}finally{(0,r.hk)(e)}}if(100903!==U)return(0,s.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",C(U)),h;let I=(0,r.mS)(a,new b(u,R*n),!1),Z=(0,r.mS)(a,new M(u,S),!1),_=(0,r.mS)(a,i?new M(u,E):null,!1),N=(0,r.mS)(a,i?new M(u,L):null,!1);if(u.triangulateIndexed(c.ptr,p.ptr,p.size,n,I.ptr,R,n,Z.ptr,S,g.ptr,d.ptr,_?.ptr??0,i?E:0,N?.ptr??0,i?L:0,y.ptr,m.ptr),U=u.getError(),0!==U)return(0,s.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",C(U)),h;let O=w(u)[g.ptr/Int32Array.BYTES_PER_ELEMENT],P=w(u)[d.ptr/Int32Array.BYTES_PER_ELEMENT],j=w(u)[y.ptr/Int32Array.BYTES_PER_ELEMENT],F=w(u)[m.ptr/Int32Array.BYTES_PER_ELEMENT];return{vertices:I.slice(0,O*n),indices:Z.slice(0,P),outlineIndices:i&&_?_.slice(0,j):h.outlineIndices,outlineRingLengths:i&&N?N.slice(0,F):h.outlineRingLengths,vertexCount:O,indexCount:P,outlineIndexCount:i?j:0,outlineRingCount:i?F:0}}catch(e){a.error=e,a.hasError=!0}finally{(0,r.hk)(a)}}function x(e){return e.HEAPF64}function v(e){return e.HEAPF32}function w(e){return e.HEAP32}class A{static from(e,t){let n=new A(e,t.length);return n.set(t),n}constructor(e,t){this._libtess=e,this.size=t,this.ptr=e.allocateCoordinateArray(t)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float32Array.BYTES_PER_ELEMENT}set(e){v(this._libtess).set(e,this.ptr/this.bytesPerCoordinate)}slice(e,t){let n=this.ptr/this.bytesPerCoordinate;return v(this._libtess).slice(n+e,n+t)}}class b{static from(e,t){let n=new b(e,t.length);return n.set(t),n}constructor(e,t){this._libtess=e,this.size=t,this.ptr=e.allocateCoordinateArray(t)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float64Array.BYTES_PER_ELEMENT}set(e){x(this._libtess).set(e,this.ptr/this.bytesPerCoordinate)}slice(e,t){let n=this.ptr/this.bytesPerCoordinate;return x(this._libtess).slice(n+e,n+t)}}class M{static from(e,t){let n=new M(e,t.length);return n.set(t),n}constructor(e,t){this._libtess=e,this.size=t,this.ptr=e.allocateLengthsArray(t)}destroy(){this._libtess.destroyLengthsArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Int32Array.BYTES_PER_ELEMENT}set(e){w(this._libtess).set(e,this.ptr/this.bytesPerCoordinate)}slice(e,t){let n=this.ptr/this.bytesPerCoordinate;return function(e){let t=w(e);return new Uint32Array(t.buffer,t.byteOffset,t.length)}(this._libtess).slice(n+e,n+t)}}function C(e){switch(e){case 100903:return"Insufficient output buffer";case 100902:return"Out of memory";case 100151:return"Missing begin polygon";case 100152:return"Missing begin contour";case 100153:return"Missing end polygon";case 100154:return"Missing end countour";case 100155:return"Coordinates too large";case 100156:return"Missing combine callback";default:return`Unknown: ${e}`}}},97146(e,t,n){n.d(t,{Dg:()=>o,lC:()=>l,lc:()=>h,my:()=>s,tM:()=>p,uW:()=>i});var r=n(34275);function i(e){return o(e,!0)}function o(e,t){if(Array.isArray(e)){if(e.length<1024)return e}else if(e.length<1024)return Array.from(e);let n=!0,i=!0;return e.some((e,t)=>(n&&=0===e,i&&=e===t,!n&&!i)),n?function(e){if(1===e)return c;if(e<1024)return Array(e).fill(0);if(e>u.length){let t=Math.max(2*u.length,e);u=new Uint8Array(t)}return new Uint8Array(u.buffer,0,e)}(e.length):i?p(e.length):(0,r.iu)(e)&&e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:function(e,t){for(let n of e){if(n>=65536)return(0,r.iu)(e)?e:new Uint32Array(e);n>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}(e,!t)}function s(e,t=e){return e<=1024?Array(e):t<=65536?new Uint16Array(e):new Uint32Array(e)}function l(e,t,n){if(0===t.length)return e.slice();if(0===e.length)return t.slice();let r=s(e.length+t.length,n);for(let t=0;t<e.length;++t)r[t]=e[t];for(let n=0;n<t.length;++n)r[e.length+n]=t[n];return r}let a=g(131072),u=new Uint8Array(65536);const c=[0],f=(()=>{let e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function h(e){if(e===c)return!0;if(!(0,r.iu)(e))return!1;let{buffer:t}=e;return t===f.buffer||t===a.buffer||t===u.buffer}function p(e){return 1===e?c:e<1024?function(e){let t=Array(e).fill(0);for(let n=0;n<e;n++)t[n]=n;return t}(e):e<f.length?new Uint16Array(f.buffer,0,e):(e>a.length&&(a=g(Math.max(2*a.length,e))),new Uint32Array(a.buffer,0,e))}function g(e){let t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}},16939(e,t,n){n.r(t),n.d(t,{default:()=>p});var r,i=n(32198),o=n(69540),s=n(25482),l=n(53966),a=n(91429),u=n(78888),c=n(19211),f=n(80882),h=n(31199);let p=r=class extends((0,o.OU)(s.o)){static from(e){return(0,u.PZ)(r,e)}constructor(e){super(e),this.material=null,this.name=void 0,this.shading="source",this.trustSourceNormals=!1}get faces(){return this._get("faces")??null}set faces(e){this._set("faces",(0,h.b)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},l.A.getLogger(this)))}castMaterial(e){return e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?(0,u.PZ)(f.A,e):(0,u.PZ)(c.default,e)}get memoryUsage(){let e=0;return null!=this.faces&&(e+=this.faces.byteLength),null!=this.material&&(e+=this.material.memoryUsage),e}};(0,i.Cg)([(0,a.MZ)({json:{write:h.B}})],p.prototype,"faces",null),(0,i.Cg)([(0,a.MZ)({type:c.default,json:{write:!0}})],p.prototype,"material",void 0),(0,i.Cg)([(0,a.wg)("material")],p.prototype,"castMaterial",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"shading",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean})],p.prototype,"trustSourceNormals",void 0),p=r=(0,i.Cg)([(0,a.$K)("esri.geometry.support.MeshComponent")],p)},95696(e,t,n){n.d(t,{A:()=>u});var r,i=n(32198),o=n(69540),s=n(25482),l=n(91429),a=n(93223);let u=class extends((0,o.OU)(s.o)){static{r=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new r}};(0,i.Cg)([(0,a.e)({georeferenced:"georeferenced"},{readOnly:!0})],u.prototype,"type",void 0),(0,i.Cg)([(0,l.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],u.prototype,"origin",void 0),u=r=(0,i.Cg)([(0,l.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],u)},18251(e,t,n){n.d(t,{A:()=>u});var r=n(32198),i=n(69540),o=n(25482),s=n(91429),l=n(51850),a=n(93223);let u=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.type="local",this.origin=(0,l.vt)()}};(0,r.Cg)([(0,a.e)({local:"local"},{readOnly:!0})],u.prototype,"type",void 0),(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],u.prototype,"origin",void 0),u=(0,r.Cg)([(0,s.$K)("esri.geometry.support.MeshLocalVertexSpace")],u)},19211(e,t,n){n.r(t),n.d(t,{default:()=>f});var r=n(32198),i=n(68197),o=n(69540),s=n(25482),l=n(91429),a=n(35063),u=n(51147),c=n(66895);let f=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.color=null,this.colorTextureTransform=null,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}get colorTexture(){return this._get("colorTexture")}set colorTexture(e){this._set("colorTexture",null==e?null:a.default.from(e))}get normalTexture(){return this._get("normalTexture")}set normalTexture(e){this._set("normalTexture",null==e?null:a.default.from(e))}clone(e){let t=(0,c.hz)(e),n=t?.materialMap?.get(this);if(n)return n;let r=super.clone((0,c.QN)(e));return t?.materialMap?.set(this,r),r}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let e=0;return e+=null==this.color?0:16,null!=this.colorTexture&&(e+=this.colorTexture.memoryUsage),e+=null==this.colorTextureTransform?0:20,null!=this.normalTexture&&(e+=this.normalTexture.memoryUsage),e+=null==this.normalTextureTransform?0:20,e}};(0,r.Cg)([(0,l.MZ)({type:i.A,json:{write:!0}})],f.prototype,"color",void 0),(0,r.Cg)([(0,l.MZ)({type:a.default,json:{write:!0},value:null})],f.prototype,"colorTexture",null),(0,r.Cg)([(0,l.MZ)({type:u.A,json:{write:!0}})],f.prototype,"colorTextureTransform",void 0),(0,r.Cg)([(0,l.MZ)({type:a.default,json:{write:!0},value:null})],f.prototype,"normalTexture",null),(0,r.Cg)([(0,l.MZ)({type:u.A,json:{write:!0}})],f.prototype,"normalTextureTransform",void 0),(0,r.Cg)([(0,l.MZ)({nonNullable:!0,json:{write:!0}})],f.prototype,"alphaMode",void 0),(0,r.Cg)([(0,l.MZ)({nonNullable:!0,json:{write:!0}})],f.prototype,"alphaCutoff",void 0),(0,r.Cg)([(0,l.MZ)({nonNullable:!0,json:{write:!0}})],f.prototype,"doubleSided",void 0),f=(0,r.Cg)([(0,l.$K)("esri.geometry.support.MeshMaterial")],f)},80882(e,t,n){n.d(t,{A:()=>u});var r=n(32198),i=n(68197),o=n(91429),s=n(19211),l=n(35063),a=n(51147);let u=class extends s.default{constructor(e){super(e),this.emissiveColor=null,this.emissiveStrength=null,this.emissiveTextureTransform=void 0,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTextureTransform=void 0,this.unlit=!1}get emissiveTexture(){return this._get("emissiveTexture")}set emissiveTexture(e){this._set("emissiveTexture",null==e?null:l.default.from(e))}get occlusionTexture(){return this._get("occlusionTexture")}set occlusionTexture(e){this._set("occlusionTexture",null==e?null:l.default.from(e))}get metallicRoughnessTexture(){return this._get("metallicRoughnessTexture")}set metallicRoughnessTexture(e){this._set("metallicRoughnessTexture",null==e?null:l.default.from(e))}getMemoryUsage(){let e=super.getMemoryUsage();return e+=null==this.emissiveColor?0:16,null!=this.emissiveTexture&&(e+=this.emissiveTexture.memoryUsage),e+=null==this.emissiveTextureTransform?0:20,null!=this.occlusionTexture&&(e+=this.occlusionTexture.memoryUsage),e+=null==this.occlusionTextureTransform?0:20,null!=this.metallicRoughnessTexture&&(e+=this.metallicRoughnessTexture.memoryUsage),e+=null==this.metallicRoughnessTextureTransform?0:20,e}};(0,r.Cg)([(0,o.MZ)({type:i.A,json:{write:!0}})],u.prototype,"emissiveColor",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0}})],u.prototype,"emissiveStrength",void 0),(0,r.Cg)([(0,o.MZ)({type:l.default,json:{write:!0},value:null})],u.prototype,"emissiveTexture",null),(0,r.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],u.prototype,"emissiveTextureTransform",void 0),(0,r.Cg)([(0,o.MZ)({type:l.default,json:{write:!0},value:null})],u.prototype,"occlusionTexture",null),(0,r.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],u.prototype,"occlusionTextureTransform",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],u.prototype,"metallic",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],u.prototype,"roughness",void 0),(0,r.Cg)([(0,o.MZ)({type:l.default,json:{write:!0},value:null})],u.prototype,"metallicRoughnessTexture",null),(0,r.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],u.prototype,"metallicRoughnessTextureTransform",void 0),(0,r.Cg)([(0,o.MZ)({type:Boolean,nonNullable:!0,json:{write:!0}})],u.prototype,"unlit",void 0),u=(0,r.Cg)([(0,o.$K)("esri.geometry.support.MeshMaterialMetallicRoughness")],u)},35063(e,t,n){n.r(t),n.d(t,{default:()=>y});var r,i=n(32198),o=n(69540),s=n(21287),l=n(25482),a=n(91429),u=n(78888),c=n(66895),f=n(97159),h=n(43937),p=n(36005);const g=new WeakMap;let d=0,y=class extends((0,o.OU)(l.o)){static{r=this}constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,n,r){e instanceof HTMLImageElement?t[n]={type:"image-element",src:(0,f.t)(e.src,r),crossOrigin:e.crossOrigin}:e instanceof HTMLCanvasElement?t[n]={type:"canvas-element",imageData:m(e.getContext("2d").getImageData(0,0,e.width,e.height))}:e instanceof HTMLVideoElement?t[n]={type:"video-element",src:(0,f.t)(e.src,r),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload}:e instanceof ImageData&&(t[n]={type:"image-data",imageData:m(e)})}readData(e){switch(e.type){case"image-element":{let t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{let t=x(e.imageData),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").putImageData(t,0,0),n}case"image-data":return x(e.imageData);case"video-element":{let t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){let{data:e,url:t}=this,n=e=>e?.toLowerCase().endsWith(".png")||e?.toLocaleLowerCase().startsWith("data:image/png;");return e instanceof HTMLCanvasElement?v(e.getContext("2d").getImageData(0,0,e.width,e.height)):e instanceof ImageData?v(e):!!(t&&n(t)||e instanceof HTMLImageElement&&n(e.src))}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){let e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null==this.url?null==this.data?t():this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(g.has(this.data)||g.set(this.data,++d),t(g.get(this.data))):t(this.url)}get memoryUsage(){let e=0;if(e+=null==this.url?0:this.url.length,null!=this.data){let t=this.data;"data"in t?e+=t.data.byteLength:t instanceof HTMLImageElement?e+=t.naturalWidth*t.naturalHeight*3:t instanceof HTMLCanvasElement&&(e+=t.width*t.height*3)}return e}clone(e){let t=(0,c.$N)(e),n=t?.textureMap?.get(this);if(n)return n;let r=super.clone(e);return t?.textureMap?.set(this,r),r}static from(e){return"string"==typeof e?new r({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new r({data:e}):(0,u.PZ)(r,e)}};function m(e){let t="";for(let n=0;n<e.data.length;n++)t+=String.fromCharCode(e.data[n]);return{data:btoa(t),width:e.width,height:e.height}}function x(e){let t=atob(e.data),n=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return(0,s.eV)(n,e.width,e.height)}function v(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}(0,i.Cg)([(0,a.MZ)({type:String,json:{write:f.w}})],y.prototype,"url",null),(0,i.Cg)([(0,a.MZ)({clonable:"reference",json:{write:{overridePolicy(){return{enabled:!this.url}}}}})],y.prototype,"data",null),(0,i.Cg)([(0,h.K)("data")],y.prototype,"writeData",null),(0,i.Cg)([(0,p.w)("data")],y.prototype,"readData",null),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],y.prototype,"transparent",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],y.prototype,"wrap",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],y.prototype,"contentHash",null),y=r=(0,i.Cg)([(0,a.$K)("esri.geometry.support.MeshTexture")],y)},51147(e,t,n){n.d(t,{A:()=>l});var r=n(32198),i=n(69540),o=n(25482),s=n(91429);let l=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,r.Cg)([(0,s.$K)("esri.geometry.support.MeshTextureTransform")],l)},1193(e,t,n){n.r(t),n.d(t,{default:()=>f});var r,i=n(32198),o=n(69540),s=n(25482),l=n(4718),a=n(53966),u=n(91429),c=n(31199);let f=r=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.color=null,this.position=new Float64Array,this.uv=null,this.normal=null,this.tangent=null}castColor(e){return(0,c.b)(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},a.A.getLogger(this))}castPosition(e){return e&&e instanceof Float32Array&&a.A.getLogger(this).warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),(0,c.b)(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},a.A.getLogger(this))}castUv(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},a.A.getLogger(this))}castNormal(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},a.A.getLogger(this))}castTangent(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},a.A.getLogger(this))}clonePositional(){let e={position:(0,l.o8)(this.position),normal:(0,l.o8)(this.normal),tangent:(0,l.o8)(this.tangent),uv:this.uv,color:this.color};return new r(e)}get usedMemory(){return this.position.byteLength+(this.uv?.byteLength??0)+(this.normal?.byteLength??0)+(this.tangent?.byteLength??0)+(this.color?.byteLength??0)}};(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"color",void 0),(0,i.Cg)([(0,u.wg)("color")],f.prototype,"castColor",null),(0,i.Cg)([(0,u.MZ)({nonNullable:!0,json:{write:c.B}})],f.prototype,"position",void 0),(0,i.Cg)([(0,u.wg)("position")],f.prototype,"castPosition",null),(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"uv",void 0),(0,i.Cg)([(0,u.wg)("uv")],f.prototype,"castUv",null),(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"normal",void 0),(0,i.Cg)([(0,u.wg)("normal")],f.prototype,"castNormal",null),(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"tangent",void 0),(0,i.Cg)([(0,u.wg)("tangent")],f.prototype,"castTangent",null),f=r=(0,i.Cg)([(0,u.$K)("esri.geometry.support.MeshVertexAttributes")],f)},31199(e,t,n){function r(e,t,n,r){let{loggerTag:i,stride:o}=t;return e.length%o===0?e:(r.error(i,`Invalid array length, expected a multiple of ${o}`),new n([]))}function i(e,t,n,i,o){if(!e)return e;if(e instanceof t)return r(e,i,t,o);for(let s of n)if(e instanceof s)return r(new t(e),i,t,o);if(Array.isArray(e))return r(new t(e),i,t,o);{let r=n.map(e=>`'${e.name}'`);return o.error(`Failed to set property, expected one of ${r}, but got ${e.constructor.name}`),new t([])}}function o(e,t,n){t[n]=function(e){let t=Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n];return t}(e)}n.d(t,{B:()=>o,b:()=>i})},40118(e,t,n){n.d(t,{H5:()=>f,wh:()=>u,createWithExternalSource:()=>c});var r=n(49186),i=(n(17676),n(83300)),o=(n(16939),n(95696),n(73836)),s=(n(1193),n(27615));n(53966),n(35522),n(51850),n(66895),n(72258);var l=n(29461),a=n(15070);function u(e,t){return new i.default((0,a.UG)((0,a.Dk)(t?.densificationFactor||0),e,t))}function c(e,t,n){let r=n?.extent??null,{spatialReference:a}=e,u=n?.transform?.clone()??new o.A,c=(0,s.TE)(e,n),f={source:t,extent:r,unitConversionDisabled:n?.unitConversionDisabled},h=new l.O;return h.externalSources.push(f),new i.default({metadata:h,transform:u,vertexSpace:c,spatialReference:a})}function f(e,t){let{spatialReference:n}=e,l=t?.transform?.clone()??new o.A,a=(0,s.TE)(e,t),u=new i.default({transform:l,vertexSpace:a,spatialReference:n});return u.addResolvingPromise(Promise.reject(new r.A("mesh-incomplete","Mesh resources are not complete"))),u}n(9859)},63579(e,t,n){n.d(t,{Bq:()=>a,Qp:()=>l,WN:()=>y,dK:()=>m,eN:()=>p,fH:()=>d,in:()=>g,yr:()=>u});var r=n(56507),i=n(4576),o=n(17676),s=n(20557);class l{constructor(e,t,n){this.assetName=e,this.assetMimeType=t,this.parts=n}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,i.aI)(this.parts,e.parts,(e,t)=>e.equals(t))}isOnService(e){return this.parts.every(t=>t.isOnService(e))}makeHash(){let e="";for(let t of this.parts)e+=t.partHash;return e}async toBlob(e){let{parts:t}=this;if(1===t.length)return t[0].toBlob(e);let n=await Promise.all(t.map(t=>t.toBlob(e)));return(0,o.Te)(e),new Blob(n)}}class a{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){let{data:t}=await(0,r.A)(this.partUrl,{responseType:"blob"});return(0,o.Te)(e),t}}function u(e){return function(e){switch(e?.type){case"client":return Array.isArray(e.files)?e.files.some(h):h(e.files);case"service":return e.assets.some(h);case"loadable":return!0;default:return!1}}(e?.source)}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,f=/\.(gltf|glb)/i;function h(e){if(e instanceof File){let{type:t,name:n}=e;return c.test(t)||f.test(n)}return c.test(e.assetMimeType)||f.test(e.assetName)}function p(e,t){if(!e)return!1;let{source:n}=e;return function(e,t){return"service"===e.type&&e.assets.every(e=>e.isOnService(t))}(n,t)}function g(e,t){if(e===t)return!0;let{source:n}=e,{source:r}=t;if(n===r)return!0;if("service"===n.type&&"service"===r.type){if(n.assets.length!==r.assets.length)return!1;let e=(e,t)=>e.assetName<t.assetName?-1:+(e.assetName>t.assetName),t=[...n.assets].sort(e),i=[...r.assets].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(i[e]))return!1;return!0}return!1}function d(e,t){return e instanceof File?(0,s.rq)(e,t):(0,s.z$)(e.assetMimeType,e.assetName,t)}function y(e){switch(e.type){case"client":return Array.isArray(e.files)?e.files:[e.files];case"service":return e.assets;case"loadable":return}}function m(e){return!!e.original}},29461(e,t,n){n.d(t,{O:()=>u});var r=n(32198),i=n(69540),o=n(7762),s=n(36708),l=n(91429),a=n(63579);let u=class extends i.Pw{constructor(e){super(e),this.externalSources=new o.A,this._explicitDisplaySource=null,this.addHandles((0,s.on)(()=>this.externalSources,"after-remove",({item:e})=>{e===this._explicitDisplaySource&&(this._explicitDisplaySource=null)},{sync:!0,onListenerRemove:()=>this._explicitDisplaySource=null}))}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,a.yr)(e))throw Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&this.externalSources.every(t=>!(0,a.in)(t,e))&&this.externalSources.add(e)}clearSources(){this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter(t=>(0,a.eN)(t,e))}get _implicitDisplaySource(){return this.externalSources.find(a.yr)}};(0,r.Cg)([(0,l.MZ)()],u.prototype,"externalSources",void 0),(0,r.Cg)([(0,l.MZ)()],u.prototype,"displaySource",null),(0,r.Cg)([(0,l.MZ)()],u.prototype,"_implicitDisplaySource",null),(0,r.Cg)([(0,l.MZ)()],u.prototype,"_explicitDisplaySource",void 0),u=(0,r.Cg)([(0,l.$K)("esri.geometry.support.meshUtils.Metadata")],u)},66895(e,t,n){n.d(t,{$N:()=>c,Lz:()=>o,QN:()=>f,WO:()=>a,hz:()=>l,o2:()=>i});const r=Symbol("meshContext");function i(e){return e&&"object"==typeof e&&r in e?e[r]:void 0}function o(e,t){let n=i(e);return{...e,[r]:{...n,...t}}}const s=Symbol("meshMaterialContext");function l(e){return e&&"object"==typeof e&&s in e?e[s]:void 0}function a(e){if(l(e)?.materialMap)return e;let t={materialMap:new Map};return{...e,[s]:t}}const u=Symbol("meshTextureContext");function c(e){return e&&"object"==typeof e&&u in e?e[u]:void 0}function f(e){if(c(e)?.textureMap)return e;let t={textureMap:new Map};return{...e,[u]:t}}},15070(e,t,n){n.d(t,{Dk:()=>h,H8:()=>c,UG:()=>m,Uh:()=>d,ai:()=>p,bQ:()=>f,uF:()=>g});var r=n(29242),i=n(35522),o=n(51850),s=n(16939),l=n(1193),a=n(27615),u=n(72258);function c(){let{faceDescriptions:e,faceVertexOffsets:t,uvScales:n}=x,r=4*e.length,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),l=new Uint32Array(2*e.length*3),a=0,u=0,c=0,f=0;for(let r=0;r<e.length;r++){let h=e[r],p=a/3;for(let e of t)l[f++]=p+e;let g=h.corners;for(let e=0;e<4;e++){let t=g[e],r=0;s[c++]=.25*n[e][0]+h.uvOrigin[0],s[c++]=h.uvOrigin[1]-.25*n[e][1];for(let e=0;e<3;e++)0===h.axis[e]?(i[a++]=.5*t[r++],o[u++]=0):(i[a++]=.5*h.axis[e],o[u++]=h.axis[e])}}return{position:i,normal:o,uv:s,faces:l}}function f(e,t){let n=e.components[0],r=n.faces,i=v[t],o=6*i,l=[,,,,,,],a=Array(r.length-6),u=0,c=0;for(let e=0;e<r.length;e++)e>=o&&e<o+6?l[u++]=r[e]:a[c++]=r[e];if(null!=e.vertexAttributes.uv){let t=new Float32Array(e.vertexAttributes.uv),n=4*i*2,r=[0,1,1,1,1,0,0,0];for(let e=0;e<r.length;e++)t[n+e]=r[e];e.vertexAttributes.uv=t}return e.components=[new s.default({faces:l,material:n.material}),new s.default({faces:a})],e}function h(e=0){let t=Math.round(8*2**e),n=2*t,r=(t-1)*(n+1)+2*n,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),l=new Uint32Array((t-1)*n*2*3),a=0,u=0,c=0,f=0;for(let e=0;e<=t;e++){let r=e/t*Math.PI+.5*Math.PI,h=Math.cos(r);w[2]=Math.sin(r);let p=0===e||e===t,g=p?n-1:n;for(let r=0;r<=g;r++){let d=r/g*2*Math.PI;w[0]=-Math.sin(d)*h,w[1]=Math.cos(d)*h;for(let e=0;e<3;e++)i[a]=.5*w[e],o[a]=w[e],++a;s[u++]=(r+(p?.5:0))/n,s[u++]=e/t,0!==e&&r!==n&&(e!==t&&(l[c++]=f,l[c++]=f+1,l[c++]=f-n),1!==e&&(l[c++]=f,l[c++]=f-n,l[c++]=f-n-1)),f++}}return{position:i,normal:o,uv:s,faces:l}}function p(e=0){let t=Math.round(16*2**e),n=4*(t+1)+2*t,r=new Float64Array(3*n),i=new Float32Array(3*n),o=new Float32Array(2*n),s=new Uint32Array(4*t*3),l=0,a=0,u=0,c=0,f=0;for(let e=0;e<=5;e++){let n=0===e||5===e,h=e<=1||e>=4,p=2===e||4===e,g=n?t-1:t;for(let d=0;d<=g;d++){let y=d/g*2*Math.PI,m=n?0:.5;w[0]=m*Math.sin(y),w[1]=m*-Math.cos(y),w[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)r[l++]=w[t],i[a++]=h?2===t?e<=1?1:-1:0:2===t?0:w[t]/m;o[u++]=(d+(n?.5:0))/t,o[u++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,!p&&0!==e&&d!==t&&(5!==e&&(s[c++]=f,s[c++]=f+1,s[c++]=f-t),1!==e&&(s[c++]=f,s[c++]=f-t,s[c++]=f-t-1)),f++}}return{position:r,normal:i,uv:o,faces:s}}function g(e,t){let n="number"==typeof t?t:null==t?1:t.width,r="number"==typeof t?t:null==t?1:t.height;switch(e){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}function d(e){let t=y.facingAxisOrderSwap[e],n=y.position,r=y.normal,i=new Float64Array(n.length),o=new Float32Array(r.length),s=0;for(let e=0;e<4;e++){let e=s;for(let l=0;l<3;l++){let a=t[l],u=Math.abs(a)-1,c=a>=0?1:-1;i[s]=n[e+u]*c,o[s]=r[e+u]*c,s++}}return{position:i,normal:o,uv:new Float32Array(y.uv),faces:new Uint32Array(y.faces),isPlane:!0}}const y={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function m(e,t,n){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null!=t){A[0]=t[0],A[4]=t[1],A[8]=t[2];for(let t=0;t<e.position.length;t+=3){for(let n=0;n<3;n++)w[n]=e.position[t+n];(0,i.ei)(w,w,A);for(let n=0;n<3;n++)e.position[t+n]=w[n]}if(t[0]!==t[1]||t[1]!==t[2]){A[0]=1/t[0],A[4]=1/t[1],A[8]=1/t[2];for(let t=0;t<e.normal.length;t+=3){for(let n=0;n<3;n++)w[n]=e.normal[t+n];(0,i.ei)(w,w,A),(0,i.S8)(w,w);for(let n=0;n<3;n++)e.normal[t+n]=w[n]}}}}(e,function(e,t,n){let r=(0,u.xK)(t,n);if(null==e&&1===r)return null;if(null==e)return[r,r,r];if("number"==typeof e){let t=e*r;return[t,t,t]}return[null==e.width?r:e.width*r,null==e.depth?r:e.depth*r,null==e.height?r:e.height*r]}(n?.size,n?.unit,t.spatialReference));let r=(0,a.TE)(t,n),o=t.spatialReference.isGeographic?(0,a.TE)(t):r,c=(0,u.UR)({vertexAttributes:e,vertexSpace:o,spatialReference:t.spatialReference},r,{allowBufferReuse:!0});return{vertexAttributes:new l.default({...c,uv:e.uv}),vertexSpace:r,components:[new s.default({faces:e.faces,material:n?.material||null})],spatialReference:t.spatialReference}}const x={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},v={south:0,east:1,north:2,west:3,up:4,down:5},w=(0,o.vt)(),A=(0,r.vt)()},27615(e,t,n){n.d(t,{CK:()=>a,Hq:()=>l,MW:()=>u,TE:()=>c,yJ:()=>f});var r=n(35522),i=n(86738),o=n(95696),s=n(18251);function l(e){return null!=e.origin}function a(e){return l(e.vertexSpace)}function u(e,t){if(!l(e))return null;let[n,r,o]=e.origin;return new i.A({x:n,y:r,z:o,spatialReference:t})}function c(e,t){let{x:n,y:r,z:i,spatialReference:l}=e,a=[n,r,i??0];return"local"===(t?.vertexSpace??function(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}(l))?new s.A({origin:a}):new o.A({origin:a})}function f(e,t){return e.type===t.type&&(e.origin===t.origin||null!=e.origin&&null!=t.origin&&(0,r.t2)(e.origin,t.origin))}},9859(e,t,n){n.d(t,{uM:()=>j});var r=n(17676),i=(n(9762),n(4197)),o=(n(77690),n(29242)),s=(n(58083),n(9093)),l=n(35522),a=n(51850);n(48353),n(13030),(0,s.vt)(),(0,o.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),new class{constructor(){this.verticalDistanceToGround=0,this.sampledElevation=0,this.z=0}},(0,a.vt)(),n(44208),n(53966);var u=n(62788),c=n(95488),f=n(83349),h=n(15585),p=n(95108),g=n(97146),d=n(34727),y=n(86211),m=n(27921);function x(e,t,n){let r=function(e,t,n,r){let i=(e=>!Array.isArray(e[0]))(t)?(e,n)=>t[3*e+n]:(e,n)=>t[e][n],o=(0,y.GA)(r)/(0,y.G9)(r);return(0,m.lU)(e,(e,t)=>(0,l.hZ)(e,i(t,0)*o,i(t,1)*o,i(t,2)),n)}(v,e,t,n)?(0,m.Qj)(v):[0,0,1];return Math.abs(r[2])>Math.cos((0,d.kU)(80))?2:+(Math.abs(r[1])>Math.abs(r[0]))}const v=(0,m.vt)(),w="auto",A=void 0,b=void 0,M=void 0;function C(e,t,n){if(!t)return 2;let r=null;for(let i of e){let e=_(i,t),o=e<3?2:x(i,e,n);if(r??=o,o!==r)return 2}return r??2}function T(e,t,n){if(!t)return!(0,p.$3)(e);if(e.length<3)return!1;switch(n){case 0:return!(0,p.$3)(e,1,2);case 1:return!(0,p.$3)(e,0,2);case 2:return!(0,p.$3)(e,0,1)}}const R=new c.I;let S=new WeakSet;function E(e,t){if(!(0,h.O9)())return N("libtess-not-loaded");let n=null!=t.outlines,{positions:r,mergedPathLengths:o}=function(e){let t=function(e){let t=e.reduce((e,t)=>e+t.pathLengths.length,0),n=Array(t),r=0;for(let t=0;t<e.length;t++){let i=e[t].pathLengths;for(let e=0;e<i.length;e++)n[r++]=i[e]}return n}(e.polygons),n=3*e.polygonVertexCount;return n===e.positions.length?{positions:e.positions,mergedPathLengths:t}:{positions:(0,i.l5)(e.positions,0,n),mergedPathLengths:t}}(e),s=performance.now(),{vertices:l,indices:a,outlineIndices:u,outlineRingLengths:c}=(0,h.O5)(r,o,3,n),f=performance.now()-s;if(null!=t.owner&&f>250&&S.add(t.owner),l.length%3!=0)return N("positions-not-multiple-of-3");let{positions:p,outlineIndexBuffer:d,mergedOutlineRingLengths:y}=n?function(e,t,n,r,o){let s=e.polygonVertexCount,l=n.length/3,a=(t??[]).values().filter(e=>e.index>=s).map(e=>({index:l+e.index-s,count:e.count})).toArray();if(0===a.length)return{positions:n,outlineIndexBuffer:r,mergedOutlineRingLengths:o};let u=3*s,c=(0,i.l5)(e.positions,u,e.positions.length-u),f=(0,i.yH)(n,c),{outlineIndexBuffer:h,outlineRingLengths:p}=U(a,f);return{positions:f,outlineIndexBuffer:(0,g.lC)(r,h,f.length/3),mergedOutlineRingLengths:(0,g.lC)(o,p,o.length+p.length)}}(e,t.outlines,l,u,c):{positions:l,outlineIndexBuffer:void 0,mergedOutlineRingLengths:void 0};return{succeeded:!0,positions:p,indices:a,outlineIndexBuffer:d,outlineRingLengths:y,vertexCount:p.length/3,method:"libtess"}}function L(e,t,n){for(let r=0;r<e.length;r+=3){let i=e[r+t];e[r+t]=e[r+n],e[r+n]=i}}function U(e,t){let n=(0,g.my)(e.length),r=0;for(let i=0;i<e.length;i++){let o=e[i],s=o.count;if(s<=0){n[i]=0;continue}let l=3*o.index,a=3*(o.index+s-1),u=s>1&&t[l]===t[a]&&t[l+1]===t[a+1]&&t[l+2]===t[a+2]?s-1:s,c=u>0?u+1:0;n[i]=c,r+=c}let i=(0,g.my)(r,t.length/3),o=0;for(let t=0;t<e.length;t++){let r=n[t];if(0===r)continue;let s=e[t].index,l=r-1;for(let e=0;e<l;e++)i[o++]=s+e;i[o++]=s}return{outlineIndexBuffer:i,outlineRingLengths:n}}function I(e,{index:t,count:n}){let r=3*t,o=3*n;return(0,i.l5)(e,r,o)}function Z(e,t,n,r,i,o){let s=o?e.length-1:0,l=o?-1:1;n*=3;for(let o=0;o<r;++o){let r=e[s];t[n++]=r[0],t[n++]=r[1],t[n++]=i&&null!=r[2]?r[2]:0,s+=l}return n/3}function _(e,t){return function(e,t){let n=e.length;if(n<2)return!1;let r=e[0],i=e[n-1];return r[0]===i[0]&&r[1]===i[1]&&(!t||r[2]===i[2])}(e,t)?e.length-1:e.length}function N(e){return{succeeded:!1,message:e}}class O{constructor(e,t,n,r){this.positions=e,this.polygonIndices=t,this.outline=n,this.projectionSuccess=r,this.count=e.length/3}get vertexCount(){return this.positions.length/3}get polygonIndexCount(){return this.polygonIndices.length}get outlineIndexCount(){let{outline:e}=this;if("tessellated-indices"!==e.output)return 0;let t=0;for(let n=0;n<e.outlineIndices.length;n++)t+=B(e.outlineIndices[n]);return t}get outlineSegmentCount(){let{outline:e}=this;if("tessellated-indices"!==e.output)return 0;let t=0;for(let n=0;n<e.outlineIndices.length;n++)t+=B(e.outlineIndices[n]);return t}}class P extends O{}function j(e,t){let{projectIfNearlyVertical:n=!1,outlineOutput:o="none",method:s,owner:l}=t??{},a="tessellated-indices"===o,c=C(e.rings,!!e.hasZ,e.spatialReference),p=function(e,t){let{hasZ:n,ccwRingsAsHoles:r,spatialReference:o}=t,s=t.axis??C(e,n,o),l=e.length,a=[],u=[],c=[],f=[],h=e.reduce((e,t)=>e+t.length,0),p=0,g=(0,i.jh)(3*h),d=0,y=r&&e[0]&&T(e[0],n,s);for(let t=l-1;t>=0;t--){let i=e[t],o=_(i,n);if(o<3){o>1&&f.push(i);continue}let l=!!r&&T(i,n,s);if(y?!l:l)a[p++]=i;else{let e=i.length;for(let t=0;t<p;++t)e+=a[t].length;let t={index:d,pathLengths:Array(p+1),count:e,holeIndices:Array(p)};t.pathLengths[0]=i.length,i.length>0&&c.push({index:d,count:i.length}),d=Z(i,g,d,i.length,n,y);for(let e=0;e<p;++e){let r=a[e];t.holeIndices[e]=d,t.pathLengths[e+1]=r.length,r.length>0&&c.push({index:d,count:r.length}),d=Z(r,g,d,r.length,n,y)}p=0,t.count>0&&u.push(t)}}let m=d;for(let e of f)c.push({index:d,count:e.length}),d=Z(e,g,d,e.length,n,y);return{positions:3*d===g.length?g:(0,i.l5)(g,0,3*d),polygonVertexCount:m,polygons:u,outlines:c}}(e.rings,{hasZ:!!e.hasZ,ccwRingsAsHoles:!0,spatialReference:e.spatialReference,axis:c}),d=function(e,t){let n=function(e,t){let n={method:t?.method??w,projectionAxis:t?.projectionAxis??A,outlines:t?.outlines??b,owner:t?.owner??M},{projectionAxis:r}=n,i=null!=r&&2!==r;i&&L(e.positions,r,2);let o=function(e,t){if("libtess"===t.method)return E(e,t);let n=function(e,t){let n=null!=t.owner&&S.has(t.owner);return"auto"===t.method&&!(n&&e.polygonVertexCount>=1e4)}(e,t),r=[],i=0,o=0;for(let s of e.polygons){let l=I(e.positions,s),a=(s.holeIndices??[]).map(e=>e-s.index),u=a.length>0?a:null,c=(0,f.e)(l,u,3),h=f.e.deviation(l,a,3,c);if(n&&h>1e-5)return E(e,t);r.push({indices:c,index:s.index}),i+=c.length,o=Math.max(o,h)}let s=(0,g.my)(i,e.positions.length/3),l=0;for(let e of r)for(let t=0;t<e.indices.length;t++)s[l++]=e.indices[t]+e.index;let{outlineIndexBuffer:a,outlineRingLengths:u}=null==t.outlines?{outlineIndexBuffer:void 0,outlineRingLengths:void 0}:U(t.outlines,e.positions);return{succeeded:!0,positions:e.positions,indices:(0,g.uW)(s),outlineIndexBuffer:a,outlineRingLengths:u,vertexCount:e.positions.length/3,method:"earcut",deviation:o}}(e,n);if(i){let t=o.succeeded?o.positions:null;null!=t&&t!==e.positions&&L(t,2,r),L(e.positions,2,r)}return o}(e,t);return n.succeeded||"libtess-not-loaded"!==n.message?n:((0,u.gc)(R),async function(){try{await(0,h.l3)(),R.notify()}catch(e){throw e}}())}(p,{projectionAxis:n?c:void 0,outlines:a?p.outlines:void 0,method:s,owner:l});if((0,r.$X)(d))return d;if(!d.succeeded)return null;let y={output:"none"};if("vertex-data"===o){let e=d.positions===p.positions?p.positions.slice():p.positions;y={output:"vertex-data",outlines:F(p.outlines,e)}}else"tessellated-indices"===o&&(y=function(e){let{outlineIndexBuffer:t,outlineRingLengths:n}=e;if(null==t||null==n)return{output:"none"};let r=Array(n.length),i=0;for(let e=0;e<n.length;e++){let o=n[e],s=t.slice(i,i+o);r[e]=s,i+=o}return{output:"tessellated-indices",outlineIndices:r}}(d));return new P(d.positions,d.indices,y,!0)}function F(e,t,n=null){return e.values().filter(({count:e})=>e>1).map(({index:e,count:r})=>{let o=3*e,s=3*r;return null==n?new z(e,r,(0,i.l5)(t,o,s)):new D(e,r,(0,i.l5)(t,o,s),(0,i.l5)(n,o,s))}).toArray()}function B(e,t=0,n=e.length){return n>1&&e[t]===e[t+n-1]?n-1:n}class z{constructor(e,t,n){this.index=e,this.count=t,this.position=n}}class D extends z{constructor(e,t,n,r){super(e,t,n),this.mapPositions=r}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6854],{66131(e,t,s){s.d(t,{lY:()=>h,mT:()=>d});var r=s(59534),n=s(799),i=s(3330),o=s(84741),a=s(34747);const c={TimeZoneNotRecognized:"Timezone identifier has not been recognized."};class l extends Error{constructor(e,t){super((0,n.HC)(c[e],t)),this.declaredRootClass="esri.arcade.arcadedate.dateerror",Error.captureStackTrace&&Error.captureStackTrace(this,l)}}function u(e,t,s){return e<t?e-t:e>s?e-s:0}function m(e,t,s){return e<t?t:e>s?s:e}class h{constructor(e){this._date=e,this.declaredRootClass="esri.arcade.arcadedate"}static fromParts(e=0,t=1,s=1,r=0,n=0,i=0,o=0,c){if(isNaN(e)||isNaN(t)||isNaN(s)||isNaN(r)||isNaN(n)||isNaN(i)||isNaN(o))return null;let l=a.c9.local(e,t).daysInMonth,f=a.c9.fromObject({day:m(s,1,l),year:e,month:m(t,1,12),hour:m(r,0,23),minute:m(n,0,59),second:m(i,0,59),millisecond:m(o,0,999)},{zone:d(c)});return f=f.plus({months:u(t,1,12),days:u(s,1,l),hours:u(r,0,23),minutes:u(n,0,59),seconds:u(i,0,59),milliseconds:u(o,0,999)}),new h(f)}static get systemTimeZoneCanonicalName(){return Intl.DateTimeFormat().resolvedOptions().timeZone??"system"}static arcadeDateAndZoneToArcadeDate(e,t){let s=d(t);return e.isUnknownTimeZone||s===i.GB.instance?h.fromParts(e.year,e.monthJS+1,e.day,e.hour,e.minute,e.second,e.millisecond,s):new h(e._date.setZone(s))}static dateJSToArcadeDate(e){return new h(a.c9.fromJSDate(e,{zone:"system"}))}static dateJSAndZoneToArcadeDate(e,t="system"){let s=d(t);return new h(a.c9.fromJSDate(e,{zone:s}))}static unknownEpochToArcadeDate(e){return new h(a.c9.fromMillis(e,{zone:i.GB.instance}))}static unknownDateJSToArcadeDate(e){return new h(a.c9.fromMillis(e.getTime(),{zone:i.GB.instance}))}static epochToArcadeDate(e,t="system"){let s=d(t);return new h(a.c9.fromMillis(e,{zone:s}))}static dateTimeToArcadeDate(e){return new h(e)}clone(){return new h(this._date)}changeTimeZone(e){let t=d(e);return h.dateTimeToArcadeDate(this._date.setZone(t))}static dateTimeAndZoneToArcadeDate(e,t){let s=d(t);return e.zone===i.GB.instance||s===i.GB.instance?h.fromParts(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond,s):new h(e.setZone(s))}static nowToArcadeDate(e){let t=d(e);return new h(a.c9.fromJSDate(new Date,{zone:t}))}static nowUTCToArcadeDate(){return new h(a.c9.utc())}get isSystem(){return"system"===this.timeZone||this.timeZone===h.systemTimeZoneCanonicalName}equals(e){return this.isSystem&&e.isSystem?this.toNumber()===e.toNumber():this.isUnknownTimeZone===e.isUnknownTimeZone&&this._date.equals(e._date)}get isUnknownTimeZone(){return this._date.zone===i.GB.instance}get isValid(){return this._date.isValid}get hour(){return this._date.hour}get second(){return this._date.second}get day(){return this._date.day}get dayOfWeekISO(){return this._date.weekday}get dayOfWeekJS(){let e=this._date.weekday;return e>6&&(e=0),e}get millisecond(){return this._date.millisecond}get monthISO(){return this._date.month}get weekISO(){return this._date.weekNumber}get yearISO(){return this._date.weekYear}get monthJS(){return this._date.month-1}get year(){return this._date.year}get minute(){return this._date.minute}get zone(){return this._date.zone}get timeZoneOffset(){return this.isUnknownTimeZone?0:this._date.offset}get timeZone(){if(this.isUnknownTimeZone)return"unknown";if("system"===this._date.zone.type)return"system";let e=this.zone;return"fixed"===e.type?0===e.fixed?"UTC":e.formatOffset(0,"short"):e.name}stringify(){return JSON.stringify(this.toJSDate())}plus(e){return new h(this._date.plus(e))}diff(e,t){return this._date.diff(e._date,t)[t]}toISODate(){return this._date.toISODate()}toISOString(e){return e?this._date.toISO({suppressMilliseconds:!0,includeOffset:!this.isUnknownTimeZone}):this._date.toISO({includeOffset:!this.isUnknownTimeZone})}toISOTime(e,t){return this._date.toISOTime({suppressMilliseconds:e,includeOffset:t&&!this.isUnknownTimeZone})}toFormat(e,t){return this.isUnknownTimeZone&&(e=e.replaceAll("Z","")),this._date.toFormat(e,t)}toJSDate(){return this._date.toJSDate()}toSQLValue(){return this._date.toFormat("yyyy-LL-dd HH:mm:ss")}toSQLWithKeyword(){return`timestamp '${this.toSQLValue()}'`}toDateTime(){return this._date}toNumber(){return this._date.toMillis()}getTime(){return this._date.toMillis()}toUTC(){return new h(this._date.toUTC())}toLocal(){return new h(this._date.toLocal())}toString(){return this.toISOString(!0)}static fromReaderAsTimeStampOffset(e){if(!e)return null;let t=a.c9.fromISO(e,{setZone:!0});return new h(t)}}function d(e,t=!0){if(e instanceof a.bo)return e;switch((0,r.B)(e)){case"system":return"system";case"utc":return"UTC";case"unknown":return i.GB.instance}if(/^[+-]?[0-9]{1,2}(:[0-9]{2})?$/.test(e)){let t=a.mQ.parseSpecifier("UTC"+(e.startsWith("+")||e.startsWith("-")?"":"+")+e);if(t)return t}let s=(0,o.p)(e);if(!s.isValid){if(t)throw new l("TimeZoneNotRecognized");return null}return s}},59534(e,t,s){s.d(t,{B:()=>n,b:()=>i});var r=s(85935);function n(e){return e.toLowerCase().replaceAll(/[\s-]+/g,"")}class i{constructor(e,t){let s=new Map;for(let t of e){let e=n(t);if(s.has(e))throw Error(`${t} already added as ${s.get(e)}`);s.set(e,t)}if(null!=t)for(let[e,r]of t){let t=n(e);if(s.has(t))throw Error(`${e} already associated with ${s.get(t)}`);s.set(t,r)}this._enumMap=s}lookup(e){return this._enumMap.get(n(e))}get(e){let t=this.lookup(e);if(null==t)throw new r.D$("InvalidParameter",null);return t}}},85935(e,t,s){s.d(t,{D$:()=>a,O$:()=>u,i2:()=>m,mT:()=>l,ps:()=>d});var r=s(799);const n={TypeNotAllowedInFeature:"Feature attributes only support dates, numbers, strings, guids.",LogicError:"Logic error - {reason}",CannotCompareDateAndTime:"Cannot compare date or dateonly with timeonly types",NeverReach:"Encountered unreachable logic",AsyncNotEnabled:"Async Arcade must be enabled for this script",ModuleAccessorMustBeString:"Module accessor must be a string",ModuleExportNotFound:"Module has no export with provided identifier",ModulesNotSupported:"Current profile does not support modules",ArrayAccessMustBeNumber:"Array accessor must be a number",FunctionNotFound:"Function not found",FieldNotFound:"Key not found - {key}",CircularModules:"Circular module dependencies are not allowed",Cancelled:"Execution cancelled",UnsupportedHashType:"Type not supported in hash function",IllegalResult:"Value is not a supported return type",PortalRequired:"Portal is required",InvalidParameter:"Invalid parameter",WrongNumberOfParameters:"Call with wrong number of parameters",Unrecognized:"Unrecognized code structure",UnrecognizedType:"Unrecognized type",WrongSpatialReference:"Cannot work with geometry in this spatial reference. It is different to the execution spatial reference",BooleanConditionRequired:"Conditions must use booleans",NoFunctionInDictionary:"Dictionaries cannot contain functions.",NoFunctionInArray:"Arrays cannot contain functions.",NoFunctionInTemplateLiteral:"Template Literals do not expect functions by value.",KeyAccessorMustBeString:"Accessor must be a string",KeyMustBeString:"Object keys must be a string",Immutable:"Object is immutable",UnexpectedToken:"Unexpected token",MemberOfNull:"Cannot access property of null object",MaximumCallDepth:"Exceeded maximum function depth",OutOfBounds:"Out of bounds",InvalidIdentifier:"Identifier not recognized",CallNonFunction:"Expression is not a function",InvalidMemberAccessKey:"Cannot access value using a key of this type",AssignModuleFunction:"Cannot assign function to module variable",UnsupportUnaryOperator:"Unsupported unary operator",UnsupportedOperator:"Unsupported operator",LogicalExpressionOnlyBoolean:"Logical expressions must be boolean",LogicExpressionOrAnd:"Logical expression can only be combined with || or &&",CannotChangeTimeZoneTime:"Cannot change the timezone of a Time",CannotChangeTimeZoneDateOnly:"Cannot change the timezone of a DateOnly",FeatureSetDoesNotHaveSubtypes:"FeatureSet does not have subtypes"};function i(e){return"object"==typeof e&&"line"in e&&"column"in e&&"number"==typeof e.line&&"number"==typeof e.column}class o extends Error{constructor(e,t){super(c(t)+("object"==typeof e&&e&&"message"in e?e.message:""),{cause:e}),this.loc=t?.loc??null}}class a extends Error{constructor(e,t,s){super("Execution error - "+c(t)+(0,r.HC)(n[e],s)),this.declaredRootClass="esri.arcade.arcadeexecutionerror",this.loc=t?.loc??null}}function c(e){return null==e?.loc?"":`Line ${e.loc.start.line}:${e.loc.start.column}: `}class l extends Error{constructor(e,t,s){super("Compilation error - "+c(t)+(0,r.HC)(n[e],s)),this.declaredRootClass="esri.arcade.arcadecompilationerror",this.loc=t?.loc??null}}class u extends Error{constructor(){super("Uncompilable code structures"),this.declaredRootClass="esri.arcade.arcadeuncompilableerror"}}function m(e,t){return!function(e){if(e instanceof Error&&"loc"in e){let t=e.loc;return null==t||"object"==typeof t&&"start"in t&&null!=t.start&&i(t.start)&&(!("end"in t)||null==t.end||i(t.end))}return!1}(e)||null==e.loc&&null!=t?.loc?new o(e,t):e}const h={UnrecognizedUri:"Unrecognized uri - {uri}",UnsupportedUriProtocol:"Unrecognized uri protocol"};class d extends Error{constructor(e,t){super((0,r.HC)(h[e],t)),this.declaredRootClass="esri.arcade.arcademoduleerror"}}},54639(e,t,s){s.d(t,{R:()=>r,b:()=>i});class r{static{this._nextId=0}constructor(e,t,s,r,n){this.type=e,this.spatialReference=t,this.hasZ=s,this.hasM=r,this._geometry=n,this.arcadeDeclaredClass="esri.arcade.Geometry",this._json=null,this._gx=null,this._accessor=null,this._id=null}static of(e,t,s,n,i){return new r(e,t,s,n,i)}clone(e=!0){let t=new r(this.type,e?this.spatialReference:this.spatialReference.clone(),this.hasZ,this.hasM,this._geometry);return t._json=this._json,t._gx=this._gx,t._accessor=e?this._accessor:null,t}get id(){return this._id??=r._nextId++}set id(e){this._id??=e}asJsonGeometry(){return this._json??=this._geometry.toJsonGeometry(),this._json}asGxGeometry(e){return this._gx??=this._geometry.toGxGeometry(e),this._gx}asAccessorGeometry(){return this._accessor??=this._geometry.toAccessorGeometry(this.spatialReference),this._accessor}asJsonLikeGeometry(){return null==this._json?null==this._accessor?this.asJsonGeometry():this._accessor:this._json}castAsJson(){switch(this.type){case"point":{let{x:e,y:t,z:s,m:r}=this.asJsonLikeGeometry(),n={x:e,y:t,spatialReference:this.spatialReference.toJSON()};return this.hasZ&&(n.z=s??0),this.hasM&&(n.m=r??NaN),n}case"multipoint":{let{points:e}=this.asJsonLikeGeometry(),t={points:e,spatialReference:this.spatialReference.toJSON()};return this.hasZ&&(t.hasZ=!0),this.hasM&&(t.hasM=!0),t}case"polyline":{let{paths:e=[],curvePaths:t}=this.asJsonLikeGeometry(),s={paths:e,spatialReference:this.spatialReference.toJSON()};return null!=t&&(s.curvePaths=t),this.hasZ&&(s.hasZ=!0),this.hasM&&(s.hasM=!0),s}case"polygon":{let{rings:e=[],curveRings:t}=this.asJsonLikeGeometry(),s={rings:e,spatialReference:this.spatialReference.toJSON()};return null!=t&&(s.curveRings=t),this.hasZ&&(s.hasZ=!0),this.hasM&&(s.hasM=!0),s}case"extent":{let{xmin:e,ymin:t,xmax:s,ymax:r,zmin:n,zmax:i,mmin:o,mmax:a}=this.asJsonLikeGeometry(),c={xmin:e,ymin:t,xmax:s,ymax:r,spatialReference:this.spatialReference.toJSON()};return this.hasZ&&(c.zmin=n??0,c.zmax=i??0),this.hasM&&(c.mmin=o??NaN,c.mmax=a??NaN),c}default:throw this.type,Error(`Unsupported geometry type: ${this.type}`)}}castAsJsonAsync(){return Promise.resolve(this.castAsJson())}}const n="_arcadeGxJson";function i(e){let t=e.cache[n];if(null!=t)return t;let s=e.toJSON();return null!=e.wkt2&&(s.wkt2=e.wkt2),(s.latestVcsWkid||s.vcsWkid)&&(delete s.latestVcsWkid,delete s.vcsWkid),e.cache[n]=s}},44729(e,t,s){s.d(t,{n:()=>c});var r=s(66131),n=s(73444),i=s(34747);function o(e){e=e.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let t="";for(let s of e.match(/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g)||[])switch(s){case"D":t+="d";break;case"DD":t+="dd";break;case"DDD":t+="o";break;case"d":t+="c";break;case"ddd":t+="ccc";break;case"dddd":t+="cccc";break;case"M":t+="L";break;case"MM":t+="LL";break;case"MMM":t+="LLL";break;case"MMMM":t+="LLLL";break;case"YY":t+="yy";break;case"Y":case"YYYY":t+="yyyy";break;case"Q":t+="q";break;case"X":case"x":t+=s;break;default:s.length>=2&&s.startsWith("[")&&s.endsWith("]")?t+=`'${s.slice(1,-1)}'`:t+=`'${s}'`}return t}const a="esri.core.sql.dateonly";class c{constructor(e,t,s){this._year=e,this._month=t,this._day=s,this.declaredRootClass=a}static isDateOnly(e){return"object"==typeof e&&!!e&&"declaredRootClass"in e&&e.declaredRootClass===a}get month(){return this._month}get monthJS(){return this._month-1}get year(){return this._year}get day(){return this._day}get isValid(){return this.toDateTime("unknown").isValid}equals(e){return c.isDateOnly(e)&&e.day===this.day&&e.month===this.month&&e.year===this.year}compare(e){return this.year===e.year?this.month===e.month?this.day-e.day:this.month-e.month:this.year-e.year}clone(){return new c(this._year,this._month,this._day)}toDateTime(e){return i.c9.fromObject({day:this.day,month:this.month,year:this.year},{zone:(0,r.mT)(e)})}toDateTimeLuxon(e){return i.c9.fromObject({day:this.day,month:this.month,year:this.year},{zone:(0,r.mT)(e)})}toString(){return`${this.year.toString().padStart(4,"0")}-${this.month.toString().padStart(2,"0")}-${this.day.toString().padStart(2,"0")}`}toFormat(e=null,t=!0){if(null===e||""===e)return this.toString();if(t&&(e=o(e)),!e)return"";let s=this.toDateTime("unknown");return r.lY.dateTimeToArcadeDate(s).toFormat(e,{locale:(0,n.JK)(),numberingSystem:"latn"})}toArcadeDate(){let e=this.toDateTime("unknown");return r.lY.dateTimeToArcadeDate(e)}toNumber(){return this.toDateTime("unknown").toMillis()}toJSDate(){return this.toDateTime("unknown").toJSDate()}toStorageFormat(){return this.toFormat("yyyy-LL-dd",!1)}toSQLValue(){return this.toFormat("yyyy-LL-dd",!1)}toSQLWithKeyword(){return"date '"+this.toFormat("yyyy-LL-dd",!1)+"'"}plus(e,t){return c.fromDateTime(this.toUTCDateTime().plus({[e]:t}))}toUTCDateTime(){return i.c9.utc(this.year,this.month,this.day,0,0,0,0)}difference(e,t){switch(t.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(e.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return"M"===t?this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(e.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(e.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(e.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(e.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(e.toUTCDateTime(),"years").years}}static fromMilliseconds(e){let t=i.c9.fromMillis(e,{zone:i.mQ.utcInstance});return t.isValid?c.fromParts(t.year,t.month,t.day):null}static fromSeconds(e){let t=i.c9.fromSeconds(e,{zone:i.mQ.utcInstance});return t.isValid?c.fromParts(t.year,t.month,t.day):null}static fromReader(e){if(!e)return null;let t=e.indexOf("-");if(t<0)return null;let s=e.indexOf("-",t+1);return s<0?null:new c(parseInt(e.slice(0,t),10),parseInt(e.slice(t+1,s),10),parseInt(e.slice(s+1),10))}static fromParts(e,t,s){let r=new c(e,t,s);return!1===r.isValid?null:r}static fromDateJS(e){return c.fromParts(e.getFullYear(),e.getMonth()+1,e.getDay())}static fromDateTime(e){return c.fromParts(e.year,e.month,e.day)}static fromSqlTimeStampOffset(e){return this.fromDateTime(e.toDateTime())}static fromString(e,t=null){if(""===e||null===e)return null;let s=[];if(t)(t=o(t))&&s.push(t);else if(null===t||""===t){let t=i.c9.fromISO(e,{setZone:!0});return t.isValid?c.fromParts(t.year,t.month,t.day):null}for(let r of s){let s=i.c9.fromFormat(e,t??r);if(s.isValid)return new c(s.year,s.month,s.day)}return null}static fromNow(e="system"){let t=i.c9.fromJSDate(new Date).setZone((0,r.mT)(e));return new c(t.year,t.month,t.day)}}},15032(e,t,s){s.d(t,{k:()=>c});var r=s(73444),n=s(54218),i=s(34747);function o(e){if(!e)return"";let t=/(a|A|hh?|HH?|mm?|ss?|SSS|S|.)/g,s="";for(let r of e.match(t)||[])switch(r){case"SSS":case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":s+=r;break;case"A":case"a":s+="a";break;default:s+=`'${r}'`}return s}const a="esri.core.sql.timeonly";class c{constructor(e,t,s,r){this._hour=e,this._minute=t,this._second=s,this._millisecond=r,this.declaredRootClass=a}static isTimeOnly(e){return"object"==typeof e&&!!e&&"declaredRootClass"in e&&e.declaredRootClass===a}get hour(){return this._hour}get minute(){return this._minute}get second(){return this._second}get millisecond(){return this._millisecond}equals(e){return c.isTimeOnly(e)&&e.hour===this.hour&&e.minute===this.minute&&e.second===this.second&&e.millisecond===this.millisecond}clone(){return new c(this.hour,this.minute,this.second,this.millisecond)}isValid(){return(0,n.Fq)(this.hour)&&(0,n.Fq)(this.minute)&&(0,n.Fq)(this.second)&&(0,n.Fq)(this.millisecond)&&this.hour>=0&&this.hour<24&&this.minute>=0&&this.minute<60&&this.second>=0&&this.second<60&&this.millisecond>=0&&this.millisecond<1e3}toString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}`+(this.millisecond>0?"."+this.millisecond.toString().padStart(3,"0"):"")}toSQLValue(){return this.toString()}toSQLWithKeyword(){return`time '${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}${this.millisecond>0?"."+this.millisecond.toString().padStart(3,"0"):""}'`}toStorageString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}`}toFormat(e=null){return null===e||""===e?this.toString():(e=o(e))?i.c9.local(1970,1,1,this._hour,this._minute,this._second,this._millisecond).toFormat(e,{locale:(0,r.JK)(),numberingSystem:"latn"}):""}toNumber(){return this.millisecond+1e3*this.second+1e3*this.minute*60+60*this.hour*60*1e3}static fromParts(e,t,s,r){let n=new c(e,t,s,r);return n.isValid()?n:null}static fromReader(e){if(!e)return null;let t=e.indexOf(":");if(t<0)return null;let s=e.indexOf(":",t+1);return s<0?null:new c(parseInt(e.slice(0,t),10),parseInt(e.slice(t+1,s),10),parseInt(e.slice(s+1),10),0)}static fromMilliseconds(e){if(e>864e5||e<0)return null;let t=Math.floor(e/1e3%60),s=Math.floor(e/6e4%60),r=Math.floor(e/36e5%24),n=Math.floor(e%1e3);return new c(r,s,t,n)}static fromDateJS(e){return new c(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}static fromDateTime(e){return new c(e.hour,e.minute,e.second,e.millisecond)}static fromSqlTimeStampOffset(e){return this.fromDateTime(e.toDateTime())}static fromString(e,t=null){if(""===e||null===e)return null;let s=[];t?(t=o(t))&&s.push(t):(null===t||""===t)&&(s.push("HH:mm:ss"),s.push("HH:mm:ss.SSS"),s.push("hh:mm:ss a"),s.push("hh:mm:ss.SSS a"),s.push("HH:mm"),s.push("hh:mm a"),s.push("H:mm"),s.push("h:mm a"),s.push("H:mm:ss"),s.push("h:mm:ss a"),s.push("H:mm:ss.SSS"),s.push("h:mm:ss.SSS a"));for(let t of s){let s=i.c9.fromFormat(e,t);if(s.isValid)return new c(s.hour,s.minute,s.second,s.millisecond)}return null}plus(e,t){switch(e){case"days":case"years":case"months":return this.clone();case"hours":case"minutes":case"seconds":case"milliseconds":return c.fromDateTime(this.toUTCDateTime().plus({[e]:t}))}return null}toUTCDateTime(){return i.c9.utc(1970,1,1,this.hour,this.minute,this.second,this.millisecond)}difference(e,t){switch(t.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(e.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return"M"===t?this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(e.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(e.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(e.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(e.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(e.toUTCDateTime(),"years").years}}}}}]);