@arcgis/core 4.28.0-next.20230919 → 4.28.0-next.20230921

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 (412) hide show
  1. package/Color.js +1 -1
  2. package/WebScene.js +1 -1
  3. package/arcade/ArcadeDate.js +1 -1
  4. package/arcade/executionError.js +1 -1
  5. package/arcade/featureset/support/errorsupport.js +1 -1
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/06621efb2573fad23b45.js +1 -0
  8. package/assets/esri/core/workers/chunks/072b4e041b8630c513a0.js +1 -0
  9. package/assets/esri/core/workers/chunks/101f776316a85b708927.js +1 -0
  10. package/assets/esri/core/workers/chunks/107546ef77a45d31c7ac.js +1 -0
  11. package/assets/esri/core/workers/chunks/10fd951bd296b2beeeba.js +1 -0
  12. package/assets/esri/core/workers/chunks/114269dda1d296893908.js +1 -0
  13. package/assets/esri/core/workers/chunks/126df6237fc80608344e.js +1 -0
  14. package/assets/esri/core/workers/chunks/134524cf6b1ebf208338.js +1 -0
  15. package/assets/esri/core/workers/chunks/17a36704e63ca1b34c5d.js +1 -0
  16. package/assets/esri/core/workers/chunks/1c83f47d446f2bca1721.js +1 -0
  17. package/assets/esri/core/workers/chunks/{09d395a9786607294689.js → 1c8469fbde39d85ee622.js} +1 -1
  18. package/assets/esri/core/workers/chunks/1cbaba30f55f00f7498b.js +1 -0
  19. package/assets/esri/core/workers/chunks/21a9c8aa2a9e9990df41.js +1 -0
  20. package/assets/esri/core/workers/chunks/{506874f562ce11f8914a.js → 243a4eed107d363dfad8.js} +1 -1
  21. package/assets/esri/core/workers/chunks/24629402c647ef6b5f6b.js +1 -0
  22. package/assets/esri/core/workers/chunks/2a1c1be9c202462cf54d.js +1 -0
  23. package/assets/esri/core/workers/chunks/2bb69d76a13564e8e455.js +1 -0
  24. package/assets/esri/core/workers/chunks/2d0d03cbea83c868edba.js +1 -0
  25. package/assets/esri/core/workers/chunks/2e130cb2f1038055c07b.js +1 -0
  26. package/assets/esri/core/workers/chunks/32ba4eba730e9232d964.js +1 -0
  27. package/assets/esri/core/workers/chunks/{b428fcb53ecc82b49e66.js → 332689bf60d246485993.js} +1 -1
  28. package/assets/esri/core/workers/chunks/3619e04cbb6691549014.js +1 -0
  29. package/assets/esri/core/workers/chunks/37116fb4c68cf3c3890a.js +1 -0
  30. package/assets/esri/core/workers/chunks/{3a7ad0d24264e2bc2e87.js → 3ca759f72d3bb29e9ea9.js} +22 -22
  31. package/assets/esri/core/workers/chunks/3dbfb4f370a874393822.js +1 -0
  32. package/assets/esri/core/workers/chunks/3f4e9b1663ec521bfe00.js +1 -0
  33. package/assets/esri/core/workers/chunks/406db5c90271a3a203d4.js +1 -0
  34. package/assets/esri/core/workers/chunks/4339ce8aaf87fabb80cc.js +1 -0
  35. package/assets/esri/core/workers/chunks/4369a6c1e0a82ab4db6a.js +1 -0
  36. package/assets/esri/core/workers/chunks/43ba2bacd0f7d19915f7.js +1 -0
  37. package/assets/esri/core/workers/chunks/44b8e75593b7df1843e1.js +1 -0
  38. package/assets/esri/core/workers/chunks/467a821d05df8ec0dc1c.js +1 -0
  39. package/assets/esri/core/workers/chunks/47be4c75dd6372b96fe4.js +1 -0
  40. package/assets/esri/core/workers/chunks/53097659f31750c03a6d.js +1 -0
  41. package/assets/esri/core/workers/chunks/{c1141056581af072aee9.js → 580039dd491854ca325c.js} +1 -1
  42. package/assets/esri/core/workers/chunks/59c00d6fba0fd1c03d01.js +1 -0
  43. package/assets/esri/core/workers/chunks/5a5720caa64a46daadf9.js +1 -0
  44. package/assets/esri/core/workers/chunks/5edb99b58549cd66b394.js +1 -0
  45. package/assets/esri/core/workers/chunks/6203ddf6caad3d356327.js +1 -0
  46. package/assets/esri/core/workers/chunks/652749dc847fcb887234.js +1 -0
  47. package/assets/esri/core/workers/chunks/6c495077cc79e1898927.js +1 -0
  48. package/assets/esri/core/workers/chunks/{e5c3beebd507e1dda35f.js → 749fc49246093d693227.js} +1 -1
  49. package/assets/esri/core/workers/chunks/74d3ecb1a06d9f81e2c5.js +1 -0
  50. package/assets/esri/core/workers/chunks/77c15b1c2729c780f75a.js +1 -0
  51. package/assets/esri/core/workers/chunks/7ea33aa455c5143affb1.js +1 -0
  52. package/assets/esri/core/workers/chunks/7ed70c96fbfe00792e7c.js +1 -0
  53. package/assets/esri/core/workers/chunks/8ab832468300cc4feb5a.js +1 -0
  54. package/assets/esri/core/workers/chunks/90771b0de3e520a1df9a.js +1 -0
  55. package/assets/esri/core/workers/chunks/94188fe381239d48a975.js +1 -0
  56. package/assets/esri/core/workers/chunks/a277c980ba8704939688.js +1 -0
  57. package/assets/esri/core/workers/chunks/b1746c022fe6edaeda55.js +1 -0
  58. package/assets/esri/core/workers/chunks/b449d6bd5851187d419f.js +1 -0
  59. package/assets/esri/core/workers/chunks/bbc0dcd316c5598bc9ad.js +1 -0
  60. package/assets/esri/core/workers/chunks/bc1dc6383e60e7e61d50.js +1 -0
  61. package/assets/esri/core/workers/chunks/bc6323bdc98013da6fe5.js +1 -0
  62. package/assets/esri/core/workers/chunks/bde89b2684b6185992ef.js +1 -0
  63. package/assets/esri/core/workers/chunks/c4bb67150ccd01ea6014.js +1 -0
  64. package/assets/esri/core/workers/chunks/{727548fffd4e270617d3.js → c6ea5aac232d1eca04dd.js} +1 -1
  65. package/assets/esri/core/workers/chunks/c8438c2d9ac48afe4033.js +1 -0
  66. package/assets/esri/core/workers/chunks/c9dfb145f0c1d93e0fbd.js +1 -0
  67. package/assets/esri/core/workers/chunks/cad260881653567bc8f9.js +1 -0
  68. package/assets/esri/core/workers/chunks/cec607d0138351a4952e.js +1 -0
  69. package/assets/esri/core/workers/chunks/d24afa6d8fd0061d9f00.js +1 -0
  70. package/assets/esri/core/workers/chunks/{f147269d85adfb4588ed.js → d9061beaa43065316062.js} +1 -1
  71. package/assets/esri/core/workers/chunks/dd7508d4016715371e0c.js +1 -0
  72. package/assets/esri/core/workers/chunks/dff1c3c38dda2bd1a9d6.js +1 -0
  73. package/assets/esri/core/workers/chunks/e55f7fc7eff0074ce0fc.js +1 -0
  74. package/assets/esri/core/workers/chunks/eb01f4cdb9b918cc61e7.js +1 -0
  75. package/assets/esri/core/workers/chunks/ec8258c9dc1491e97fc8.js +1 -0
  76. package/assets/esri/core/workers/chunks/ed1fbc1bc8d50453e2f5.js +1 -0
  77. package/assets/esri/core/workers/chunks/eeac53da496de4cd4182.js +1 -0
  78. package/assets/esri/core/workers/chunks/eef27d305023034084a4.js +1 -0
  79. package/assets/esri/core/workers/chunks/f38c54ada9e7012a2960.js +1 -0
  80. package/assets/esri/core/workers/chunks/f508ccfde6425dabe9ac.js +1 -0
  81. package/assets/esri/core/workers/chunks/f5e0ff5292b9fd18fc92.js +1 -0
  82. package/assets/esri/core/workers/chunks/f5eb8b5021620be7538e.js +1 -0
  83. package/assets/esri/images/portal/onlinemedialayer16.png +0 -0
  84. package/assets/esri/themes/base/widgets/_FeatureForm.scss +2 -1
  85. package/assets/esri/themes/dark/main.css +1 -1
  86. package/assets/esri/themes/light/main.css +1 -1
  87. package/assets/esri/themes/light/view.css +1 -1
  88. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm.json +1 -1
  89. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ar.json +1 -1
  90. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bg.json +1 -1
  91. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bs.json +1 -1
  92. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ca.json +1 -1
  93. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_cs.json +1 -1
  94. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_da.json +1 -1
  95. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_de.json +1 -1
  96. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_el.json +1 -1
  97. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_en.json +1 -1
  98. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_es.json +1 -1
  99. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_et.json +1 -1
  100. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fi.json +1 -1
  101. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fr.json +1 -1
  102. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_he.json +1 -1
  103. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hr.json +1 -1
  104. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hu.json +1 -1
  105. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_id.json +1 -1
  106. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_it.json +1 -1
  107. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ja.json +1 -1
  108. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ko.json +1 -1
  109. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lt.json +1 -1
  110. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lv.json +1 -1
  111. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_nb.json +1 -1
  112. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_nl.json +1 -1
  113. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pl.json +1 -1
  114. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-BR.json +1 -1
  115. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-PT.json +1 -1
  116. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ro.json +1 -1
  117. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ru.json +1 -1
  118. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sk.json +1 -1
  119. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sl.json +1 -1
  120. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sr.json +1 -1
  121. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sv.json +1 -1
  122. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_th.json +1 -1
  123. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_tr.json +1 -1
  124. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_uk.json +1 -1
  125. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_vi.json +1 -1
  126. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-CN.json +1 -1
  127. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-HK.json +1 -1
  128. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-TW.json +1 -1
  129. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace.json +1 -1
  130. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ar.json +1 -1
  131. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bg.json +1 -1
  132. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bs.json +1 -1
  133. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ca.json +1 -1
  134. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_cs.json +1 -1
  135. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_da.json +1 -1
  136. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_de.json +1 -1
  137. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_el.json +1 -1
  138. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_en.json +1 -1
  139. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_es.json +1 -1
  140. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_et.json +1 -1
  141. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fi.json +1 -1
  142. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fr.json +1 -1
  143. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_he.json +1 -1
  144. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hr.json +1 -1
  145. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hu.json +1 -1
  146. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_id.json +1 -1
  147. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_it.json +1 -1
  148. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ja.json +1 -1
  149. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ko.json +1 -1
  150. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lt.json +1 -1
  151. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lv.json +1 -1
  152. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_nb.json +1 -1
  153. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_nl.json +1 -1
  154. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pl.json +1 -1
  155. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-BR.json +1 -1
  156. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-PT.json +1 -1
  157. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ro.json +1 -1
  158. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ru.json +1 -1
  159. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sk.json +1 -1
  160. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sl.json +1 -1
  161. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sr.json +1 -1
  162. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sv.json +1 -1
  163. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_th.json +1 -1
  164. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_tr.json +1 -1
  165. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_uk.json +1 -1
  166. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_vi.json +1 -1
  167. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-CN.json +1 -1
  168. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-HK.json +1 -1
  169. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-TW.json +1 -1
  170. package/chunks/LaserlinePath.glsl.js +5 -1
  171. package/core/HandleOwner.js +1 -1
  172. package/core/MemCache.js +1 -1
  173. package/core/date.js +5 -0
  174. package/core/sql.js +1 -1
  175. package/core/string.js +1 -1
  176. package/interfaces.d.ts +60 -43
  177. package/intl/date.js +1 -1
  178. package/layers/GeoJSONLayer.js +1 -1
  179. package/layers/ImageryLayer.js +1 -1
  180. package/layers/VoxelWasmPerSceneView.js +1 -1
  181. package/layers/WFSLayer.js +1 -1
  182. package/layers/graphics/sources/GeoJSONSource.js +1 -1
  183. package/layers/graphics/sources/MemorySource.js +1 -1
  184. package/layers/graphics/sources/WFSSource.js +1 -1
  185. package/layers/graphics/sources/WFSSourceWorker.js +1 -1
  186. package/layers/graphics/sources/csv/csv.js +1 -1
  187. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  188. package/layers/graphics/sources/geojson/geojson.js +1 -1
  189. package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
  190. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  191. package/{views/interactive/tooltip/tooltipInfoUnion.js → layers/graphics/sources/support/QueryEngineBuildLayer.js} +1 -0
  192. package/layers/graphics/sources/support/sourceUtils.js +1 -1
  193. package/layers/mixins/SceneService.js +1 -1
  194. package/layers/ogc/wfsUtils.js +1 -1
  195. package/layers/save/utils.js +1 -1
  196. package/layers/support/editableLayers.js +1 -1
  197. package/layers/support/fieldUtils.js +1 -1
  198. package/layers/support/labelFormatUtils.js +1 -1
  199. package/layers/support/layersCreator.js +1 -1
  200. package/layers/support/rasterFunctionUtils.js +1 -1
  201. package/layers/support/rasterFunctions/creators/createBandIndexFunctions.js +1 -1
  202. package/layers/support/rasterFunctions/creators/createDataManagementFunctions.js +1 -1
  203. package/layers/support/rasterFunctions/creators/createLocalFunctions.js +1 -1
  204. package/networks/support/utils.js +1 -1
  205. package/package.json +1 -1
  206. package/portal/PortalItem.js +1 -1
  207. package/portal/support/layersLoader.js +1 -1
  208. package/rest/geometryService/cut.js +1 -1
  209. package/rest/query/operations/query.js +1 -1
  210. package/rest/versionManagement/deleteVersion.js +1 -1
  211. package/rest/versionManagement/gdbVersion/alterVersion.js +1 -1
  212. package/rest/versionManagement/gdbVersion/post.js +1 -1
  213. package/rest/versionManagement/gdbVersion/reconcile.js +1 -1
  214. package/rest/versionManagement/gdbVersion/serverVersionUtils.js +5 -0
  215. package/support/revision.js +1 -1
  216. package/time/timeZoneUtils.js +1 -1
  217. package/views/2d/engine/Stage.js +1 -1
  218. package/views/2d/engine/webgl/mesh/factories/WGLMeshFactory.js +1 -1
  219. package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
  220. package/views/2d/layers/features/sources/BaseFeatureSource.js +1 -1
  221. package/views/2d/layers/features/sources/DataTileSource.js +1 -1
  222. package/views/2d/layers/features/sources/StreamSource.js +1 -1
  223. package/views/2d/layers/features/support/whereUtils.js +1 -1
  224. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  225. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  226. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  227. package/views/3d/analysis/Slice/RotateManipulator.js +1 -1
  228. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  229. package/views/3d/environment/LocalAtmosphere.js +1 -1
  230. package/views/3d/externalRenderers/StageRenderer.js +1 -1
  231. package/views/3d/interactive/manipulatorUtils.js +1 -1
  232. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  233. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  234. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  235. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  236. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  237. package/views/3d/layers/MediaLayerView3D.js +1 -1
  238. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  239. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  240. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  241. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  242. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  243. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  244. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  245. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  246. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  247. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  248. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  249. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  250. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  251. package/views/3d/layers/support/overlayImageUtils.js +1 -1
  252. package/views/3d/layers/support/patternUtils.js +1 -1
  253. package/views/3d/support/LaserLineRenderer.js +1 -1
  254. package/views/3d/support/StreamDataLoader.js +1 -1
  255. package/views/3d/support/dito.js +1 -1
  256. package/views/3d/support/engineContent/line.js +1 -1
  257. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  258. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  259. package/views/3d/terrain/OverlayRenderer.js +1 -1
  260. package/views/3d/terrain/TerrainRenderer.js +1 -1
  261. package/views/3d/terrain/TileRenderer.js +1 -1
  262. package/views/3d/webgl-engine/collections/Component/ComponentIntersectionData.js +1 -1
  263. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  264. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  265. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  266. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +6 -6
  267. package/views/3d/webgl-engine/core/shaderLibrary/hud/AlignPixel.glsl.js +10 -12
  268. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDVisibility.glsl.js +8 -21
  269. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  270. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  271. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  272. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  273. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  274. package/views/3d/webgl-engine/lib/Attribute.js +1 -1
  275. package/views/3d/webgl-engine/lib/BoundingInfo.js +1 -1
  276. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  277. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
  278. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  279. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  280. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  281. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  282. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  283. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  284. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  285. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  286. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  287. package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
  288. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  289. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  290. package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
  291. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  292. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  293. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  294. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  295. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  296. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  297. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  298. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  299. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  300. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  301. package/views/3d/webgl-engine/materials/internal/MaterialUtil.js +1 -1
  302. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  303. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  304. package/views/View.js +1 -1
  305. package/views/draw/DrawGraphicTool.js +1 -1
  306. package/views/draw/support/HighlightHelper.js +1 -1
  307. package/views/draw/support/Reshape.js +1 -1
  308. package/views/draw/support/layerUtils.js +1 -1
  309. package/views/interactive/SegmentLabels.js +1 -1
  310. package/views/interactive/keybindings.js +1 -1
  311. package/views/interactive/tooltip/SketchTooltipInfo.js +1 -1
  312. package/views/interactive/tooltip/TooltipContentWithHelpMessage.js +1 -1
  313. package/views/interactive/tooltip/TooltipEditableField.js +1 -1
  314. package/views/interactive/tooltip/TranslateTooltipInfos.js +1 -1
  315. package/views/interactive/tooltip/content/Fields.js +5 -0
  316. package/views/interactive/tooltip/content/TooltipContentDrawPoint.js +1 -1
  317. package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
  318. package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
  319. package/views/layers/FeatureLayerView.js +1 -1
  320. package/views/webgl/FramebufferObject.js +1 -1
  321. package/webdoc/saveAPIKeyUtils.js +5 -0
  322. package/webdoc/webdocSaveUtils.js +1 -1
  323. package/widgets/BasemapGallery.js +1 -1
  324. package/widgets/BasemapLayerList.js +1 -1
  325. package/widgets/Bookmarks.js +1 -1
  326. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  327. package/widgets/Editor/EditorViewModel.js +1 -1
  328. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  329. package/widgets/Editor/UpdateWorkflow.js +1 -1
  330. package/widgets/Expand.js +1 -1
  331. package/widgets/Feature/FeatureRelationship.js +1 -1
  332. package/widgets/Feature/support/featureUtils.js +1 -1
  333. package/widgets/FeatureForm/EditableInput.js +1 -1
  334. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  335. package/widgets/FeatureForm/RelationshipInput.js +1 -1
  336. package/widgets/FeatureForm.js +1 -1
  337. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
  338. package/widgets/Fullscreen.js +1 -1
  339. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  340. package/widgets/Search.js +1 -1
  341. package/widgets/Swipe.js +1 -1
  342. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  343. package/widgets/UtilityNetworkTrace/support/ResultAreaHandler.js +1 -1
  344. package/widgets/UtilityNetworkTrace/support/UtilityHelper.js +1 -1
  345. package/widgets/UtilityNetworkTrace.js +1 -1
  346. package/widgets/support/SketchTooltipControls.js +1 -1
  347. package/widgets/support/globalCss.js +1 -1
  348. package/assets/esri/core/workers/chunks/0274b84548cb048562e4.js +0 -1
  349. package/assets/esri/core/workers/chunks/034accc7cab6c88a3b31.js +0 -1
  350. package/assets/esri/core/workers/chunks/0839b45999fcb556e460.js +0 -1
  351. package/assets/esri/core/workers/chunks/09589852b129bfb5624f.js +0 -1
  352. package/assets/esri/core/workers/chunks/132e9e6147304ffd128d.js +0 -1
  353. package/assets/esri/core/workers/chunks/1790ca4193d730f5f206.js +0 -1
  354. package/assets/esri/core/workers/chunks/1a449168d30a688e6128.js +0 -1
  355. package/assets/esri/core/workers/chunks/1c94624fd001c803a814.js +0 -1
  356. package/assets/esri/core/workers/chunks/25ab3bec45de900be36e.js +0 -1
  357. package/assets/esri/core/workers/chunks/273167b2dd46e58b8739.js +0 -1
  358. package/assets/esri/core/workers/chunks/2c5eb8aaad696fa16744.js +0 -1
  359. package/assets/esri/core/workers/chunks/353bad8530710a284592.js +0 -1
  360. package/assets/esri/core/workers/chunks/357d452b8522185cc433.js +0 -1
  361. package/assets/esri/core/workers/chunks/3c2be3d204e6bf87266a.js +0 -1
  362. package/assets/esri/core/workers/chunks/3c2c64832fb498bbaa83.js +0 -1
  363. package/assets/esri/core/workers/chunks/3c4d59018ce8502c65e7.js +0 -1
  364. package/assets/esri/core/workers/chunks/43eff89599f36d83924b.js +0 -1
  365. package/assets/esri/core/workers/chunks/4632ada4af99cab70a61.js +0 -1
  366. package/assets/esri/core/workers/chunks/481eab7879ed5d8a1f67.js +0 -1
  367. package/assets/esri/core/workers/chunks/4b3a5cc435435c81e6a5.js +0 -1
  368. package/assets/esri/core/workers/chunks/4f34fd8c2bb769541e9c.js +0 -1
  369. package/assets/esri/core/workers/chunks/4f5a0bc7411c0db33662.js +0 -1
  370. package/assets/esri/core/workers/chunks/56a4cea67cc579bf7547.js +0 -1
  371. package/assets/esri/core/workers/chunks/56afd89d08c874f620a1.js +0 -1
  372. package/assets/esri/core/workers/chunks/5b08d578521562b166e3.js +0 -1
  373. package/assets/esri/core/workers/chunks/5f938d6da9fd3f3edc74.js +0 -1
  374. package/assets/esri/core/workers/chunks/6108d72faf48a592c8ba.js +0 -1
  375. package/assets/esri/core/workers/chunks/656a8be4ce1bec721366.js +0 -1
  376. package/assets/esri/core/workers/chunks/7531ebc60e9ae61220e0.js +0 -1
  377. package/assets/esri/core/workers/chunks/77923afde29ae1ff10ca.js +0 -1
  378. package/assets/esri/core/workers/chunks/79683324be49aab79dd8.js +0 -1
  379. package/assets/esri/core/workers/chunks/7cdb4416afd5922cf5f3.js +0 -1
  380. package/assets/esri/core/workers/chunks/7e87bc83a0a2715e3016.js +0 -1
  381. package/assets/esri/core/workers/chunks/7f680cf24dd97d61bcd2.js +0 -1
  382. package/assets/esri/core/workers/chunks/7f797fed73cf7b48a686.js +0 -1
  383. package/assets/esri/core/workers/chunks/861609ebd3a77b787b0f.js +0 -1
  384. package/assets/esri/core/workers/chunks/869c3927f1e246cd1e42.js +0 -1
  385. package/assets/esri/core/workers/chunks/95371c0f5464f5daae9f.js +0 -1
  386. package/assets/esri/core/workers/chunks/962b99fd273709c726d3.js +0 -1
  387. package/assets/esri/core/workers/chunks/98fbcbb2115376d7ff62.js +0 -1
  388. package/assets/esri/core/workers/chunks/9abcd1d11bfd92f872ab.js +0 -1
  389. package/assets/esri/core/workers/chunks/9b54b5bdb6367c36f6e9.js +0 -1
  390. package/assets/esri/core/workers/chunks/9dab9f6c07ececa7f851.js +0 -1
  391. package/assets/esri/core/workers/chunks/9ff6ce486898713af7e2.js +0 -1
  392. package/assets/esri/core/workers/chunks/a98a435d4dbea73f7517.js +0 -1
  393. package/assets/esri/core/workers/chunks/b05bb6e784e5453696be.js +0 -1
  394. package/assets/esri/core/workers/chunks/b51d0ec283f61f638a48.js +0 -1
  395. package/assets/esri/core/workers/chunks/b5ee6c0c07fa50410370.js +0 -1
  396. package/assets/esri/core/workers/chunks/b9cf8f02974aeb3ce208.js +0 -1
  397. package/assets/esri/core/workers/chunks/bdf13091bd0e1ab0db7e.js +0 -1
  398. package/assets/esri/core/workers/chunks/bef1a1218a94ab6e2b51.js +0 -1
  399. package/assets/esri/core/workers/chunks/c22c2b15fe5f2c97a2ae.js +0 -1
  400. package/assets/esri/core/workers/chunks/c880d2f0ff06b3bf731f.js +0 -1
  401. package/assets/esri/core/workers/chunks/c88869d2a647c22dc3e6.js +0 -1
  402. package/assets/esri/core/workers/chunks/cc96be71fee49f07dcd4.js +0 -1
  403. package/assets/esri/core/workers/chunks/e4237360eef474d1f0ac.js +0 -1
  404. package/assets/esri/core/workers/chunks/e54ae2a4281dd58e0707.js +0 -1
  405. package/assets/esri/core/workers/chunks/e977e721f6f50e3c5f13.js +0 -1
  406. package/assets/esri/core/workers/chunks/ed31cf6688c0f7dac1f9.js +0 -1
  407. package/assets/esri/core/workers/chunks/f07a0ea10428adecea1a.js +0 -1
  408. package/assets/esri/core/workers/chunks/f1eab5c67ed808c18f86.js +0 -1
  409. package/assets/esri/core/workers/chunks/f2e7142a8db164940544.js +0 -1
  410. package/assets/esri/core/workers/chunks/f939b4166f76975f5da0.js +0 -1
  411. package/assets/esri/core/workers/chunks/ff4f4107a866e4a68386.js +0 -1
  412. package/layers/ogc/dateUtils.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5913],{91303:(e,t,i)=>{var n;i.d(t,{Y:()=>n}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(n||(n={}))},16306:(e,t,i)=>{i.d(t,{aX:()=>I});var n=i(68773),s=i(20102),r=i(92604),a=i(38913),o=i(58901),l=i(73913),c=i(8744),u=i(40488),h=(i(66577),i(3172)),f=i(33955),p=i(11282),d=i(17452);async function m(e,t,i){const n="string"==typeof e?(0,d.mN)(e):e,s=t[0].spatialReference,r=(0,f.Ji)(t[0]),a={...i,query:{...n.query,f:"json",sr:(0,c.B9)(s),geometries:JSON.stringify((l=t,{geometryType:(0,f.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:o}=await(0,h.Z)(n.path+"/simplify",a);var l;return function(e,t,i){const n=(0,f.q9)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=i,t}))}(o.geometries,r,s)}const y=r.Z.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function x(e){return"polyline"===e[0].type}function w(e,t,i){if(t){const t=function(e,t){if(!(e instanceof o.Z||e instanceof a.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y.error(e),new s.Z(e)}const i=(0,l.x3)(e),n=[];for(const e of i){const i=[];n.push(i),i.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const s=e[n][0],r=e[n][1],a=e[n+1][0],o=e[n+1][1],l=Math.sqrt((a-s)*(a-s)+(o-r)*(o-r)),c=(o-r)/l,u=(a-s)/l,h=l/t;if(h>1){for(let e=1;e<=h-1;e++){const n=e*t,a=u*n+s,o=c*n+r;i.push([a,o])}const e=(l+Math.floor(h-1)*t)/2,n=u*e+s,a=c*e+r;i.push([n,a])}i.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new a.Z({rings:n,spatialReference:e.spatialReference}):new o.Z({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,u.Sx)(t,!0)}return i&&(e=(0,l.Sy)(e,i)),e}function b(e,t,i){if(Array.isArray(e)){const n=e[0];if(n>t){const i=(0,l.XZ)(n,t);e[0]=n+i*(-2*t)}else if(n<i){const t=(0,l.XZ)(n,i);e[0]=n+t*(-2*i)}}else{const n=e.x;if(n>t){const i=(0,l.XZ)(n,t);e=e.clone().offset(i*(-2*t),0)}else if(n<i){const t=(0,l.XZ)(n,i);e=e.clone().offset(t*(-2*i),0)}}return e}function v(e,t){let i=-1;for(let n=0;n<t.cutIndexes.length;n++){const s=t.cutIndexes[n],r=t.geometries[n],a=(0,l.x3)(r);for(let e=0;e<a.length;e++){const t=a[e];t.some((i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const n=t[e][0];i=n>i?n:i}i=Number(i.toFixed(9));const n=-360*(0,l.XZ)(i,180);for(let i=0;i<t.length;i++){const t=r.getPoint(e,i);r.setPoint(e,i,t.clone().offset(n,0))}return!0}}))}if(s===i){if(g(e))for(const t of(0,l.x3)(r))e[s]=e[s].addRing(t);else if(x(e))for(const t of(0,l.x3)(r))e[s]=e[s].addPath(t)}else i=s,e[s]=r}return e}async function I(e,t,i){if(!Array.isArray(e))return I([e],t);t&&"string"!=typeof t&&y.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??n.default.geometryServiceUrl;let r,d,g,x,_,S,R,T,C=0;const k=[],M=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,d=(0,c.C5)(r),g=r.isWebMercator,S=g?102100:4326,x=l.UZ[S].maxX,_=l.UZ[S].minX,R=l.UZ[S].plus180Line,T=l.UZ[S].minus180Line),d)if("mesh"===t.type)M.push(t);else if("point"===t.type)M.push(b(t.clone(),x,_));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>b(e,x,_))),M.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,d);M.push(e.rings?new a.Z(e):e)}else if(t.extent){const e=t.extent,i=(0,l.XZ)(e.xmin,_)*(2*x);let n=0===i?t.clone():(0,l.Sy)(t.clone(),i);e.offset(i,0),e.intersects(R)&&e.xmax!==x?(C=e.xmax>C?e.xmax:C,n=w(n,g),k.push(n),M.push("cut")):e.intersects(T)&&e.xmin!==_?(C=e.xmax*(2*x)>C?e.xmax*(2*x):C,n=w(n,g,360),k.push(n),M.push("cut")):M.push(n)}else M.push(t.clone());else M.push(t);else M.push(t);let F=(0,l.XZ)(C,x),O=-90;const P=F,Z=new o.Z;for(;F>0;){const e=360*F-180;Z.addPath([[e,O],[e,-1*O]]),O*=-1,F--}if(k.length>0&&P>0){const t=v(k,await async function(e,t,i,n){const s=(0,p.en)(e),r=t[0].spatialReference,a={...n,responseType:"json",query:{...s.query,f:"json",sr:(0,c.B9)(r),target:JSON.stringify({geometryType:(0,f.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},o=await(0,h.Z)(s.path+"/cut",a),{cutIndexes:l,geometries:u=[]}=o.data;return{cutIndexes:l,geometries:u.map((e=>{const t=(0,f.im)(e);return t.spatialReference=r,t}))}}(s,k,Z,i)),n=[],r=[];for(let i=0;i<M.length;i++){const s=M[i];if("cut"!==s)r.push(s);else{const s=t.shift(),a=e[i];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&s.rings.length>=a.rings.length?(n.push(s),r.push("simplify")):r.push(g?(0,u.$)(s):s)}}if(!n.length)return r;const a=await m(s,n,i),o=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?o.push(t):o.push(g?(0,u.$)(a.shift()):a.shift())}return o}const D=[];for(let e=0;e<M.length;e++){const t=M[e];if("cut"!==t)D.push(t);else{const e=k.shift();D.push(!0===g?(0,u.$)(e):e)}}return D}},73913:(e,t,i)=>{i.d(t,{Sy:()=>l,UZ:()=>a,XZ:()=>o,x3:()=>c});var n=i(58901),s=i(82971),r=i(33955);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.Z.WebMercator}),minus180Line:new n.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.Z({paths:[[[180,-180],[180,180]]],spatialReference:s.Z.WGS84}),minus180Line:new n.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:s.Z.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=c(e);for(const e of i)for(const i of e)i[0]+=t;return e}function c(e){return(0,r.oU)(e)?e.rings:e.paths}},74878:(e,t,i)=>{i.r(t),i.d(t,{default:()=>ft});var n=i(43697),s=i(51773),r=i(2368),a=i(20102),o=i(92604),l=i(16453),c=i(95330),u=i(17445),h=i(5600),f=i(75215),p=i(67676),d=i(80442),m=i(36030),y=i(52011),g=i(87085),x=i(17287),w=i(71612),b=i(17017),v=(i(66577),i(30030)),I=i(3172),_=i(71715),S=i(8744),R=i(66677),T=i(21506),C=i(35956),k=i(29876),M=i(45663),F=i(88281),O=i(11145),P=i(96674),Z=i(609),D=i(39450),z=i(36679),A=i(99815),N=i(73506),B=i(94139);const E=new Map,J=new class{constructor(e=15e3,t=5e3){this._timer=null,this._cachedBlocks=new Map,this._size=-1,this._duration=e,this._interval=Math.min(e,t)}decreaseRefCount(e,t){const i=e+"/"+t,n=this._cachedBlocks;if(n.has(i)){const e=n.get(i);return e.refCount--,e.refCount<=0&&(n.delete(i),e.controller&&e.controller.abort()),e.refCount}return 0}getBlock(e,t){const i=e+"/"+t,n=this._cachedBlocks;if(n.has(i)){const e=n.get(i);return e.ts=Date.now(),e.refCount++,n.delete(i),n.set(i,e),e.block}return null}putBlock(e,t,i,n){const s=this._cachedBlocks,r=e+"/"+t;if(s.has(r)){const e=s.get(r);e.ts=Date.now(),e.refCount++}else s.set(r,{block:i,ts:Date.now(),refCount:1,controller:n});this._trim(),this._updateTimer()}deleteBlock(e,t){const i=this._cachedBlocks,n=e+"/"+t;i.has(n)&&i.delete(n)}updateMaxSize(e){this._size=e,this._trim()}empty(){this._cachedBlocks.clear(),this._clearTimer()}getCurrentSize(){return this._cachedBlocks.size}_updateTimer(){if(null!=this._timer)return;const e=this._cachedBlocks;this._timer=setInterval((()=>{const t=Array.from(e),i=Date.now();for(let n=0;n<t.length&&t[n][1].ts<=i-this._duration;n++)e.delete(t[n][0]);0===e.size&&this._clearTimer()}),this._interval)}_trim(){const e=this._cachedBlocks;if(-1===this._size||this._size>=e.size)return;const t=Array.from(e);for(let i=0;i<t.length-this._size;i++)e.delete(t[i][0])}_clearTimer(){null!=this._timer&&(clearInterval(this._timer),this._timer=null)}};function L(e,t){return null==t?e:`${e}?sliceId=${t}`}function H(e,t,i){const n=E.get(e);if(!n)return null==t?J.decreaseRefCount(e,i):0;if(null==t||null==n[t])return J.decreaseRefCount(e,i);const s=n[t]?.cache,r=s?.get(i);if(s&&r){if(r.refCount--,0===r.refCount){s.delete(i);for(let e=0;e<n.length;e++)n[e]?.cache.delete(i);r.controller&&r.controller.abort()}return r.refCount}return 0}function W(e,t,i){const n=E.get(e);if(!n)return null==t?J.getBlock(e,i):null;if(null==t||null==n[t]){for(let e=0;e<n.length;e++){const t=n[e]?.cache.get(i);if(t)return t.refCount++,t.block}return J.getBlock(e,i)}const s=n[t]?.cache.get(i);if(s)return s.refCount++,s.block;for(let e=0;e<n.length;e++){if(e===t||!n[e])continue;const s=n[e]?.cache,r=s?.get(i);if(s&&r)return r.refCount++,s.set(i,r),r.block}return null}function q(e,t,i,n,s=null){const r=E.get(e);if(!r)return void(null==t&&J.putBlock(e,i,n,s));if(null==t||null==r[t])return void J.putBlock(e,i,n,s);const a={refCount:1,block:n,isResolved:!1,isRejected:!1,controller:s};n.then((()=>a.isResolved=!0)).catch((()=>a.isRejected=!0)),r[t]?.cache.set(i,a)}function j(e,t,i){const n=E.get(e);n?null!=t&&null!=n[t]?n[t]?.cache.delete(i):J.deleteBlock(e,i):null==t&&J.deleteBlock(e,i)}var G=i(81578),U=i(75993),$=i(55914),V=i(80676),X=i(6570);let Y=class extends((0,Z.v)(P.wq)){constructor(){super(...arguments),this.datasetName=null,this.datasetFormat=null,this.hasUniqueSourceStorageInfo=!0,this.rasterInfo=null,this.ioConfig={sampling:"closest"}}async init(){const e=(0,N.zD)();this.addResolvingPromise(e),await this.when()}normalizeCtorArgs(e){return e&&e.ioConfig&&(e={...e,ioConfig:{resolution:null,bandIds:null,sampling:"closest",tileInfo:O.Z.create(),...e.ioConfig}}),e}get _isGlobalWrappableSource(){const{rasterInfo:e}=this,t=(0,N.ut)(e.spatialReference);return null!=t&&e.extent.width>=t/2}get _hasNoneOrGCSShiftTransform(){const{transform:e}=this.rasterInfo;return null==e||"gcs-shift"===e.type}set rasterJobHandler(e){this._set("rasterJobHandler",e),"Function"===this.datasetFormat&&this.primaryRasters?.rasters?.forEach((t=>t.rasterJobHandler=e))}set url(e){this._set("url",(0,R.Nm)(e,o.Z.getLogger(this)))}async open(e){throw new a.Z("BaseRaster:open-not-implemented","open() is not implemented")}async fetchTile(e,t,i,n={}){const s=n.tileInfo||this.rasterInfo.storageInfo.tileInfo,r=this.getTileExtentFromTileInfo(e,t,i,s);return this.fetchPixels(r,s.size[0],s.size[1],n)}async identify(e,t={}){e=(0,f.TJ)(B.Z,e).clone().normalize();const{multidimensionalDefinition:i,timeExtent:n}=t,{rasterInfo:s}=this,{hasMultidimensionalTranspose:r,multidimensionalInfo:a}=s;let{transposedVariableName:o}=t;const l=null!=a&&r&&(null!=n||(0,A.WU)(i));l&&!o&&(o=null!=i&&i.length>0?i[0].variableName??void 0:a.variables[0].name,t={...t,transposedVariableName:o}),t=this._getRequestOptionsWithSliceId(t);const{spatialReference:c,extent:u}=s,{datumTransformation:h}=t;let p=(0,N.nF)(e,c,h);if(!u.intersects(p))return{location:p,value:null};if(null!=s.transform){const e=s.transform.inverseTransform(p);if(!s.nativeExtent.intersects(e))return{location:e,value:null};p=e}let d=0;const m=null!=o&&null!=a&&s.hasMultidimensionalTranspose;if("Function"===this.datasetFormat){const e=this.primaryRasters.rasters[0];if(m)return e.identify(p,t);const{pixelSize:i}=s,n=3,r=i.x*n/2,a=i.y*n/2,o=new X.Z({xmin:p.x-r,xmax:p.x+r,ymin:p.y-a,ymax:p.y+a,spatialReference:c}),l={interpolation:"nearest"},{pixelBlock:u}=await e.fetchPixels(o,n,n,l),{pixelBlock:h}=await this.fetchPixels(o,n,n,l);if(null==u)return{location:p,value:null};const f=Math.floor(n*n*.5),d=!u.mask||u.mask[f]?u.pixels.map((e=>e[f])):null;let y;return null!=h&&(y=!h.mask||h.mask[f]?h.pixels.map((e=>e[f])):void 0),{location:p,value:d,processedValue:y,pyramidLevel:0}}if(!m)if(t.srcResolution)d=(0,N.kr)(t.srcResolution,s,this.ioConfig.sampling).pyramidLevel;else if(d=await this.computeBestPyramidLevelForLocation(e,t),null==d)return{location:p,value:null};const y=this.identifyPixelLocation(p,d,null,m);if(null===y)return{location:p,value:null};const{row:g,col:x,rowOffset:w,colOffset:b,blockWidth:v}=y,I=o??t.sliceId,_=L(this.url,I),S=`${d}/${g}/${x}`;let R=W(_,null,S);null==R&&(R=this.fetchRawTile(d,g,x,t),q(_,null,S,R));const T=await R;if(null==T||!T.pixels?.length)return{location:p,value:null};const C=w*v+b;return this._processIdentifyResult(T,{srcLocation:p,position:C,pyramidLevel:d,useTransposedTile:!!m,requestSomeSlices:l,identifyOptions:t})}async fetchPixels(e,t,i,n={}){e=(0,N.Fi)(e),n=this._getRequestOptionsWithSliceId(n);const{_hasNoneOrGCSShiftTransform:s}=this;if(n.requestRawData&&s)return this._fetchPixels(e,t,i,n);const r=(0,N.ut)(e.spatialReference),a=(0,N.Hq)(e);if(null==r||0===a||1===a&&this._isGlobalWrappableSource&&s)return this._fetchPixels(e,t,i,n);if(a>=3)return{extent:e,pixelBlock:null};const o=[],{xmin:l,xmax:c}=e,u=Math.round(r/(c-l)*t),h=u-Math.round((r/2-l)/(c-l)*t);let f=0;const p=[];for(let s=0;s<=a;s++){const d=new X.Z({xmin:0===s?l:-r/2,xmax:s===a?c-r*s:r/2,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference}),m=0===s?u-h:s===a?t-f:u;f+=m,p.push(m);const y=n.disableWrapAround&&s>0?null:this._fetchPixels(d,m,i,n);o.push(y)}const d=(await Promise.all(o)).map((e=>e?.pixelBlock));let m=null;const y={width:t,height:i};return m=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:d,srcMosaicSize:y,destDimension:null,coefs:null,sampleSpacing:null,interpolation:"nearest",alignmentInfo:null,blockWidths:p},n)).pixelBlock:(0,$.us)(d,y,{blockWidths:p}),{extent:e,srcExtent:(0,N.tB)(e,this.rasterInfo.spatialReference,n.datumTransformation),pixelBlock:m}}async fetchRawPixels(e,t,i,n={}){t={x:Math.floor(t.x),y:Math.floor(t.y)};const s=await this._fetchRawTiles(e,t,i,n),{nativeExtent:r,nativePixelSize:a,storageInfo:o}=this.rasterInfo,l=2**e,c=a.x*l,u=a.y*l,h=new X.Z({xmin:r.xmin+c*t.x,xmax:r.xmin+c*(t.x+i.width-1),ymin:r.ymax-u*(t.y+i.height-1),ymax:r.ymax-u*t.y,spatialReference:r.spatialReference});if(!s)return{extent:h,srcExtent:h,pixelBlock:null};const{pixelBlocks:f,mosaicSize:p}=s;if(1===f.length&&null!=f[0]&&f[0].width===i.width&&f[0].height===i.height)return{extent:h,srcExtent:h,pixelBlock:s.pixelBlocks[0]};const d=e>0?o.pyramidBlockWidth:o.blockWidth,m=e>0?o.pyramidBlockHeight:o.blockHeight,y={x:t.x%d,y:t.y%m};let g;return g=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:f,srcMosaicSize:p,destDimension:i,clipOffset:y,clipSize:i,coefs:null,sampleSpacing:null,interpolation:n.interpolation,alignmentInfo:null,blockWidths:null},n)).pixelBlock:(0,$.us)(f,p,{clipOffset:y,clipSize:i}),{extent:h,srcExtent:h,pixelBlock:g}}fetchRawTile(e,t,i,n){throw new a.Z("BaseRaster:read-not-implemented","fetchRawTile() is not implemented")}computeExtent(e){return(0,N.tB)(this.rasterInfo.extent,e)}decodePixelBlock(e,t){return!this.rasterJobHandler||t.useCanvas?(0,U.J)(e,t):this.rasterJobHandler.decode({data:e,options:t})}async request(e,t,i=0){const{customFetchParameters:n}=this.ioConfig,{range:s,query:r,headers:a}=t;i=i??t.retryCount??this.ioConfig.retryCount;const o=s?{Range:`bytes=${s.from}-${s.to}`}:null;try{return await(0,I.Z)(e,{...t,query:{...r,...n},headers:{...a,...o}})}catch(n){if(i>0)return i--,this.request(e,t,i);throw n}}getSliceIndex(e){const{multidimensionalInfo:t}=this.rasterInfo;return null==t||null==e||0===e.length?null:(0,A.gk)(e,t)}getTileExtentFromTileInfo(e,t,i,n){const s=n.lodAt(e);return this.getTileExtent({x:s.resolution,y:s.resolution},t,i,n.origin,n.spatialReference,n.size)}updateTileInfo(){const{storageInfo:e,spatialReference:t,extent:i,pixelSize:n}=this.rasterInfo;if(!e.tileInfo){const s=[],r=e.maximumPyramidLevel||0;let a=Math.max(n.x,n.y),o=1/.0254*96*a;for(let e=0;e<=r;e++)s.unshift(new D.Z({level:r-e,resolution:a,scale:o})),a*=2,o*=2;const l=new B.Z({x:i.xmin,y:i.ymax,spatialReference:t});e.tileInfo=new O.Z({origin:l,size:[e.blockWidth,e.blockHeight],spatialReference:t,lods:s}),e.isVirtualTileInfo=!0}}createRemoteDatasetStorageInfo(e,t=512,i=512,n){const{width:s,height:r,nativeExtent:a,pixelSize:o,spatialReference:l}=e,c=new B.Z({x:a.xmin,y:a.ymax,spatialReference:l});null==n&&(n=Math.max(0,Math.round(Math.log(Math.max(s,r))/Math.LN2-8)));const u=this.computeBlockBoundary(a,512,512,{x:a.xmin,y:a.ymax},[o],n);e.storageInfo=new z.Z({blockWidth:t,blockHeight:i,pyramidBlockWidth:t,pyramidBlockHeight:i,origin:c,firstPyramidLevel:1,maximumPyramidLevel:n,blockBoundary:u})}async computeBestPyramidLevelForLocation(e,t={}){return 0}computeBlockBoundary(e,t,i,n,s,r=0,a=2){if(1===s.length&&r>0){s=[...s];let{x:e,y:t}=s[0];for(let i=0;i<r;i++)e*=a,t*=a,s.push({x:e,y:t})}const o=[],{x:l,y:c}=n;for(let n=0;n<s.length;n++){const{x:r,y:a}=s[n];o.push({minCol:Math.floor((e.xmin-l+.1*r)/t/r),maxCol:Math.floor((e.xmax-l-.1*r)/t/r),minRow:Math.floor((c-e.ymax+.1*a)/i/a),maxRow:Math.floor((c-e.ymin-.1*a)/i/a)})}return o}getPyramidPixelSize(e){const{nativePixelSize:t}=this.rasterInfo,{pyramidResolutions:i,pyramidScalingFactor:n}=this.rasterInfo.storageInfo;if(0===e)return t;if(null!=i&&i.length)return i[e-1];const s=n**e;return{x:t.x*s,y:t.y*s}}identifyPixelLocation(e,t,i,n){const{spatialReference:s,nativeExtent:r,storageInfo:a}=this.rasterInfo,{maximumPyramidLevel:o,origin:l,transposeInfo:c}=a,u=n&&null!=c?c.tileSize[0]:a.blockWidth,h=n&&null!=c?c.tileSize[1]:a.blockHeight,f=(0,N.nF)(e,s,i);if(!r.intersects(f))return null;if(t<0||t>o)return null;const p=this.getPyramidPixelSize(t),{x:d,y:m}=p,y=(l.y-f.y)/m/h,g=(f.x-l.x)/d/u,x=Math.min(h-1,Math.floor((y-Math.floor(y))*h)),w=Math.min(u-1,Math.floor((g-Math.floor(g))*u));return{pyramidLevel:t,row:Math.floor(y),col:Math.floor(g),rowOffset:x,colOffset:w,blockWidth:u,srcLocation:f}}getTileExtent(e,t,i,n,s,r){const[a,o]=r,l=n.x+i*a*e.x,c=l+a*e.x,u=n.y-t*o*e.y,h=u-o*e.y;return new X.Z({xmin:l,xmax:c,ymin:h,ymax:u,spatialReference:s})}getBlockWidthHeight(e){return{blockWidth:e>0?this.rasterInfo.storageInfo.pyramidBlockWidth:this.rasterInfo.storageInfo.blockWidth,blockHeight:e>0?this.rasterInfo.storageInfo.pyramidBlockHeight:this.rasterInfo.storageInfo.blockHeight}}isBlockOutside(e,t,i){const n=this.rasterInfo.storageInfo.blockBoundary[e];return!n||n.maxRow<t||n.maxCol<i||n.minRow>t||n.minCol>i}async _fetchPixels(e,t,i,n={}){let s=(0,N.Hq)(e);if(s>=2)return{extent:e,pixelBlock:null};const r=this._getSourceDataInfo(e,t,i,n),{pyramidLevel:a,srcResolution:o,srcExtent:l,srcWidth:c,srcHeight:u,ul:h}=r;if(0===c||0===u)return{extent:e,srcExtent:l,pixelBlock:null};const{rasterInfo:f}=this,p=f.transform,d="gcs-shift"===p?.type,m=null!=(0,N.ut)(e.spatialReference);!d&&m||(s=(0,N.Hq)(r.srcExtent,d));const y=await this._fetchRawTiles(a,h,{width:c,height:u,wrapCount:s},n);if(!y)return{extent:e,srcExtent:l,pixelBlock:null};const g=f.storageInfo,x=a>0?g.pyramidBlockWidth:g.blockWidth,w=a>0?g.pyramidBlockHeight:g.blockHeight;let{x:b,y:v}=f.pixelSize;if(a>0){const{pyramidResolutions:e,pyramidScalingFactor:t}=g;if(null!=e&&e[a-1])({x:b,y:v}=e[a-1]);else{const e=t**a;b*=e,v*=e}}const I=f.spatialReference,_=new B.Z({x:b,y:v,spatialReference:I}),S=x===c&&w===u&&h.x%x==0&&h.y%w==0,R=new B.Z({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference}),T=!e.spatialReference.equals(I),C=I.isGeographic?1e-9:1e-4,{datumTransformation:k}=n;if(!T&&S&&1===y.pixelBlocks.length&&x===t&&w===i&&this._isSameResolution(o,R,C))return{extent:e,srcExtent:l,srcTilePixelSize:_,pixelBlock:y.pixelBlocks[0]};const M=m&&null!=(0,N.ut)(l.spatialReference)&&this._hasNoneOrGCSShiftTransform,F=n.requestProjectedLocalDirections&&this.rasterInfo.dataType.startsWith("vector");F&&!this.rasterJobHandler&&await(0,N.zD)();const O=this.rasterJobHandler?await this.rasterJobHandler.getProjectionOffsetGrid({projectedExtent:e,srcBufferExtent:y.extent,pixelSize:R.toJSON(),datumTransformation:k,rasterTransform:p,hasWrapAround:s>0||M,isAdaptive:!1!==this.ioConfig.optimizeProjectionAccuracy,includeGCSGrid:F},n):(0,N.Qp)({projectedExtent:e,srcBufferExtent:y.extent,pixelSize:R,datumTransformation:k,rasterTransform:p,hasWrapAround:s>0||M,isAdaptive:!1,includeGCSGrid:F});let P;const Z=!n.requestRawData,D={rows:O.spacing[0],cols:O.spacing[1]},z=this._hasNoneOrGCSShiftTransform?this._getRasterTileAlignmentInfo(a,y.extent.xmin):void 0,{pixelBlocks:A,mosaicSize:E,isPartiallyFilled:J}=y;let L=null;if(this.rasterJobHandler){const e=await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:A,srcMosaicSize:E,destDimension:Z?{width:t,height:i}:null,coefs:Z?O.coefficients:null,sampleSpacing:Z?D:null,projectDirections:F,gcsGrid:F?O.gcsGrid:null,isUV:"vector-uv"===this.rasterInfo.dataType,interpolation:n.interpolation,alignmentInfo:z,blockWidths:null},n);({pixelBlock:P,localNorthDirections:L}=e)}else{const e=(0,$.us)(A,E,{alignmentInfo:z});P=Z?(0,$.Uk)(e,{width:t,height:i},O.coefficients,D,n.interpolation):e,F&&O.gcsGrid&&(L=(0,$.Qh)({width:t,height:i},O.gcsGrid),P=(0,V.xQ)(P,this.rasterInfo.dataType,L))}return n.requestRawData||F?{extent:e,srcExtent:l,srcTilePixelSize:_,pixelBlock:P,transformGrid:O,localNorthDirections:L,isPartiallyFilled:J}:{extent:e,srcExtent:l,srcTilePixelSize:_,pixelBlock:P}}async _fetchRawTiles(e,t,i,n){const{origin:s,blockBoundary:r}=this.rasterInfo.storageInfo,{blockWidth:a,blockHeight:o}=this.getBlockWidthHeight(e);let{x:l,y:c}=t,{width:u,height:h,wrapCount:f}=i;const p=this._getRasterTileAlignmentInfo(e,0);n.buffer&&(l-=n.buffer.cols,c-=n.buffer.rows,u+=2*n.buffer.cols,h+=2*n.buffer.rows);let d=0,m=0,y=0;f&&null!=p&&(({worldColumnCountFromOrigin:m,originColumnOffset:y,rightPadding:d}=p),m*p.blockWidth-d>=l+u&&(d=0));const g=Math.floor(l/a),x=Math.floor(c/o),w=Math.floor((l+u+d-1)/a),b=Math.floor((c+h+d-1)/o),v=r[e];if(!v)return null;const{minRow:I,minCol:_,maxCol:S,maxRow:R}=v;if(0===f&&(b<I||w<_||x>R||g>S))return null;const T=new Array;let C=!1;const k=null==this.ioConfig.allowPartialFill?n.allowPartialFill:this.ioConfig.allowPartialFill;for(let t=x;t<=b;t++)for(let i=g;i<=w;i++){let s=i;if(!n.disableWrapAround&&f&&null!=p&&m<=i&&(s=i-m-y),t>=I&&s>=_&&R>=t&&S>=s){const i=this._fetchRawTile(e,t,s,n);k?T.push(new Promise((e=>{i.then((t=>e(t))).catch((()=>{C=!0,e(null)}))}))):T.push(i)}else T.push(Promise.resolve(null))}if(0===T.length)return null;const M=await Promise.all(T),F={height:(b-x+1)*o,width:(w-g+1)*a},{spatialReference:O}=this.rasterInfo,P=this.getPyramidPixelSize(e),{x:Z,y:D}=P;return{extent:new X.Z({xmin:s.x+g*a*Z,xmax:s.x+(w+1)*a*Z,ymin:s.y-(b+1)*o*D,ymax:s.y-x*o*D,spatialReference:O}),pixelBlocks:M,mosaicSize:F,isPartiallyFilled:C}}_isSameResolution(e,t,i){return Math.abs(e.x-t.x)<i&&Math.abs(e.y-t.y)<i}_fetchRawTile(e,t,i,n){const s=this.rasterInfo.storageInfo.blockBoundary[e];if(!s)return Promise.resolve(null);const{minRow:r,minCol:a,maxCol:o,maxRow:l}=s;if(t<r||i<a||t>l||i>o)return Promise.resolve(null);const u=L(this.url,n.sliceId),h=`${e}/${t}/${i}`;let f=W(u,n.registryId,h);if(null==f){const s=new AbortController;f=this.fetchRawTile(e,t,i,{...n,signal:s.signal}),q(u,n.registryId,h,f,s),f.catch((()=>j(u,n.registryId,h)))}return n.signal&&(0,c.fu)(n,(()=>{H(u,n.registryId,h)})),f}_computeMagDirValues(e){const{bandCount:t,dataType:i}=this.rasterInfo;if((2!==t||"vector-magdir"!==i)&&"vector-uv"!==i||2!==e?.length||!e[0]?.length)return null;const n=e[0].length;if("vector-magdir"===i){const t=e[1].map((e=>(e+360)%360));return[e[0],t]}const[s,r]=e,a=[],o=[];for(let e=0;e<n;e++){const[t,i]=(0,V.Tg)([s[e],r[e]]);a.push(t),o.push(i)}return[a,o]}_getRasterTileAlignmentInfo(e,t){return null==this._rasterTileAlighmentInfo&&(this._rasterTileAlighmentInfo=(0,N.P_)(this.rasterInfo)),null==this._rasterTileAlighmentInfo.pyramidsInfo?null:{startX:t,halfWorldWidth:this._rasterTileAlighmentInfo.halfWorldWidth,hasGCSSShiftTransform:this._rasterTileAlighmentInfo.hasGCSSShiftTransform,...this._rasterTileAlighmentInfo.pyramidsInfo[e]}}_getSourceDataInfo(e,t,i,n={}){const s={datumTransformation:n.datumTransformation,pyramidLevel:0,pyramidResolution:null,srcExtent:null,srcHeight:0,srcResolution:null,srcWidth:0,ul:{x:0,y:0}};n.srcResolution&&(s.srcResolution=n.srcResolution,this._updateSourceDataInfo(e,s));const r=this.rasterInfo.storageInfo.maximumPyramidLevel||0,{srcWidth:a,srcHeight:o,pyramidLevel:l}=s,c=a/t,u=o/i,h=l<r&&c*u>=16,f=l===r&&this._requireTooManySrcTiles(a,o,t,i);if(h||f||0===a||0===o){const a=new B.Z({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference});let o=(0,N.VO)(a,this.rasterInfo.spatialReference,e,s.datumTransformation);const f=!o||n.srcResolution&&o.x+o.y<n.srcResolution.x+n.srcResolution.y;if(h&&n.srcResolution&&f){const e=Math.round(Math.log(Math.max(c,u))/Math.LN2)-1;if(r-l+3>=e){const t=2**e;o={x:n.srcResolution.x*t,y:n.srcResolution.y*t}}}o&&(s.srcResolution=o,this._updateSourceDataInfo(e,s))}return this._requireTooManySrcTiles(s.srcWidth,s.srcHeight,t,i)&&(s.srcWidth=0,s.srcHeight=0),s}_requireTooManySrcTiles(e,t,i,n){const{tileInfo:s}=this.rasterInfo.storageInfo;return Math.ceil(e/s.size[0])*Math.ceil(t/s.size[1])>=256||e/i>8||t/n>8}_updateSourceDataInfo(e,t){t.srcWidth=0,t.srcHeight=0;const{rasterInfo:i}=this,n=i.spatialReference,{srcResolution:s,datumTransformation:r}=t,{pyramidLevel:a,pyramidResolution:o,excessiveReading:l}=(0,N.kr)(s,i,this.ioConfig.sampling);if(l)return;let c=t.srcExtent||(0,N.tB)(e,n,r);if(null==c)return;const u=i.transform;u&&(c=u.inverseTransform(c)),t.srcExtent=c;const{x:h,y:f}=i.storageInfo.origin,p=Math.floor((c.xmin-h)/o.x+.1),d=Math.floor((f-c.ymax)/o.y+.1),m=Math.floor((c.xmax-h)/o.x-.1),y=Math.floor((f-c.ymin)/o.y-.1),g=c.width<.1*o.x?0:m-p+1,x=c.height<.1*o.y?0:y-d+1;t.pyramidLevel=a,t.pyramidResolution=o,t.srcWidth=g,t.srcHeight=x,t.ul={x:p,y:d}}_getRequestOptionsWithSliceId(e){return null!=this.rasterInfo.multidimensionalInfo&&null==e.sliceId&&(e={...e,sliceId:this.getSliceIndex(e.multidimensionalDefinition)}),e}_processIdentifyResult(e,t){const{srcLocation:i,position:n,pyramidLevel:s,useTransposedTile:r}=t,a=e.pixels[0].length/e.width/e.height;if(e.mask&&!e.mask[n])return{location:i,value:null};const{multidimensionalInfo:o}=this.rasterInfo;if(null==o||!r){const t=e.pixels.map((e=>e[n])),r={location:i,value:t,pyramidLevel:s},a=this._computeMagDirValues(t.map((e=>[e])));return a?.length&&(r.magdirValue=a.map((e=>e[0]))),r}let l=e.pixels.map((e=>e.slice(n*a,n*a+a))),c=this._computeMagDirValues(l);const{requestSomeSlices:u,identifyOptions:h}=t;let f=(0,A.MO)(o,h.transposedVariableName);if(u){const e=(0,A.Ur)(f,h.multidimensionalDefinition,h.timeExtent);l=l.map((t=>e.map((e=>t[e])))),c=c?.map((t=>e.map((e=>t[e])))),f=e.map((e=>f[e]))}const p=e.noDataValues||this.rasterInfo.noDataValue,d={pixels:l,pixelType:e.pixelType};let m;return null!=p&&((0,G.A)(d,p),m=d.mask),{location:i,value:null,dataSeries:f.map(((e,t)=>{const i={value:0===m?.[t]?null:l.map((e=>e[t])),multidimensionalDefinition:e.multidimensionalDefinition.map((e=>new C.Z({...e,isSlice:!0})))};return c?.length&&(i.magdirValue=[c[0][t],c[1][t]]),i})),pyramidLevel:s}}};(0,n._)([(0,h.Cb)()],Y.prototype,"_rasterTileAlighmentInfo",void 0),(0,n._)([(0,h.Cb)({readOnly:!0})],Y.prototype,"_isGlobalWrappableSource",null),(0,n._)([(0,h.Cb)({readOnly:!0})],Y.prototype,"_hasNoneOrGCSShiftTransform",null),(0,n._)([(0,h.Cb)()],Y.prototype,"rasterJobHandler",null),(0,n._)([(0,h.Cb)(T.HQ)],Y.prototype,"url",null),(0,n._)([(0,h.Cb)({type:String,json:{write:!0}})],Y.prototype,"datasetName",void 0),(0,n._)([(0,h.Cb)({type:String,json:{write:!0}})],Y.prototype,"datasetFormat",void 0),(0,n._)([(0,h.Cb)()],Y.prototype,"hasUniqueSourceStorageInfo",void 0),(0,n._)([(0,h.Cb)()],Y.prototype,"rasterInfo",void 0),(0,n._)([(0,h.Cb)()],Y.prototype,"ioConfig",void 0),(0,n._)([(0,h.Cb)()],Y.prototype,"sourceJSON",void 0),Y=(0,n._)([(0,y.j)("esri.layers.support.rasterDatasets.BaseRaster")],Y);const K=Y;var Q=i(74889);let ee=class extends K{constructor(){super(...arguments),this.datasetFormat="Function",this.tileType="Raster",this.rasterFunction=null}async open(e){await this.init();const{rasterFunction:t}=this;this.primaryRasters?.rasters?.length?t.sourceRasters=this.primaryRasters.rasters:(this.primaryRasters=t.getPrimaryRasters(),this.rasterJobHandler&&this.primaryRasters.rasters?.forEach((e=>e.rasterJobHandler=this.rasterJobHandler)));const{rasters:i,rasterIds:n}=this.primaryRasters,s=i.map((t=>t.rasterInfo?void 0:t.open(e)));await Promise.all(s);const r=i.map((({rasterInfo:e})=>e)),o=t.bind({rasterInfos:r,rasterIds:n});if(!o.success||0===r.length)throw new a.Z("raster-function:open",`cannot bind the function: ${o.error??""}`);const l="Table"===t.functionName?t:t.functionArguments?.raster;"Table"===l?.functionName&&(t.rasterInfo.attributeTable=Q.Z.fromJSON(l.functionArguments.attributeTableAsRecordSet)),await this.syncJobHandler();const c=r[0];this.hasUniqueSourceStorageInfo=1===r.length||r.slice(1).every((e=>this._hasSameStorageInfo(e,c))),this.set("sourceJSON",i[0].sourceJSON),this.set("rasterInfo",t.rasterInfo)}async syncJobHandler(){return this.rasterJobHandler?.updateRasterFunction(this.rasterFunction)}async fetchPixels(e,t,i,n={}){const{rasters:s,rasterIds:r}=this.primaryRasters;let a=!1;const{interpolation:o}=n,l=this.rasterFunction.flatWebGLFunctionChain?.hasFocalFunction;!n.requestRawData&&"bilinear"!==o&&l&&(a=1===s.length&&!n.skipRasterFunction,n={...n,interpolation:"bilinear",requestRawData:a});const c=s.map((s=>s.fetchPixels(e,t,i,n))),u=await Promise.all(c),h=u.map((e=>e.pixelBlock)),f=a||n.requestRawData?u.map((e=>e.srcTilePixelSize)):null;if(n.skipRasterFunction||h.every((e=>null==e)))return u[0];const p=u.find((e=>null!=e.pixelBlock))?.extent??e,d=this.rasterJobHandler?await this.rasterJobHandler.process({extent:p,primaryPixelBlocks:h,primaryPixelSizes:f,primaryRasterIds:r}):this.rasterFunction.process({extent:p,primaryPixelBlocks:h,primaryPixelSizes:f,primaryRasterIds:r}),{transformGrid:m}=u[0];if(!a||null==d||null==m)return{...u[0],pixelBlock:d};const y={rows:m.spacing[0],cols:m.spacing[1]};let g;return g=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:[d],srcMosaicSize:{width:d.width,height:d.height},destDimension:{width:t,height:i},coefs:m.coefficients,sampleSpacing:y,projectDirections:!1,gcsGrid:null,isUV:!1,interpolation:o,alignmentInfo:void 0,blockWidths:null},n)).pixelBlock:(0,$.Uk)(d,{width:t,height:i},m.coefficients,y,o),{extent:e,srcExtent:u[0].srcExtent,pixelBlock:g}}_hasSameStorageInfo(e,t){const{storageInfo:i,pixelSize:n,spatialReference:s,extent:r}=e,{storageInfo:a,pixelSize:o,spatialReference:l,extent:c}=t;return n.x===o.x&&n.y===o.y&&s.equals(l)&&r.equals(c)&&i.blockHeight===a.blockHeight&&i.blockWidth===a.blockWidth&&i.maximumPyramidLevel===a.maximumPyramidLevel}};(0,n._)([(0,h.Cb)({type:String,json:{write:!0}})],ee.prototype,"datasetFormat",void 0),(0,n._)([(0,h.Cb)()],ee.prototype,"tileType",void 0),(0,n._)([(0,h.Cb)()],ee.prototype,"rasterFunction",void 0),(0,n._)([(0,h.Cb)()],ee.prototype,"primaryRasters",void 0),ee=(0,n._)([(0,y.j)("esri.layers.support.rasterDatasets.FunctionRaster")],ee);const te=ee;var ie=i(67900),ne=i(5847);var se=i(5154),re=i(15612),ae=i(67058),oe=i(72758),le=i(79681),ce=i(23808),ue=i(82971);const he=o.Z.getLogger("esri.layers.mixins.ImageryTileMixin"),fe=e=>{let t=class extends e{constructor(...e){super(...e),this._isConstructedFromFunctionRaster=!1,this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this.bandIds=null,this.copyright=null,this.interpolation="nearest",this.multidimensionalSubset=null,this.raster=null,this.rasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.symbolizer=null,this._isConstructedFromFunctionRaster="Function"===e[0]?.raster?.datasetFormat}get fullExtent(){return this.rasterInfo?.extent}set multidimensionalDefinition(e){this._set("multidimensionalDefinition",e),this.updateRenderer()}set rasterFunction(e){"none"===e?.functionName?.toLowerCase()&&(e=void 0),this._set("rasterFunction",e),this.updateRasterFunction()}set url(e){this._set("url",(0,R.Nm)(e,he))}set renderer(e){null==e&&null==this.rasterFunction?this._configDefaultRenderer("override"):(this._set("renderer",e),this.updateRenderer())}readRenderer(e,t,i){const n=t?.layerDefinition?.drawingInfo?.renderer;return(0,v.ij)(n,i)||void 0}async convertVectorFieldData(e,t){if(null==e||!this.rasterInfo)return null;const i=this._rasterJobHandler.instance,n=this.rasterInfo.dataType;return i?i.convertVectorFieldData({pixelBlock:e,dataType:n},t):(0,V.KC)(e,n)}async computeStatisticsHistograms(e,t){e=(0,f.TJ)(le.Z,e).clone();const{rasterInfo:n}=this,{geometry:s}=e;if(null==s)throw new a.Z("imagery-tile-mixin:compute-statistics-histograms","geometry must be specified");let r=s;const{spatialReference:o}=n;s.spatialReference.equals(o)||(await(0,N.zD)(),r="extent"===s.type?(0,N.tB)(s,o):(0,N.Wt)(s,o));const l=e.pixelSize??new B.Z({x:n.pixelSize.x,y:n.pixelSize.y,spatialReference:o}),{extent:c,width:u,height:h}=function(e,t,i,n=!0){const{spatialReference:s}=e,{x:r,y:a}=function(e,t){if(e.spatialReference.equals(t))return e;const i=(0,ie.c9)(e.spatialReference),n=(0,ie.c9)(t);if(i===n)return e;const s=i/n;return{x:e.x*s,y:e.y*s}}(i,s);let o,l,c;const u="extent"===t.type?t:t.extent;let{xmin:h,xmax:f,ymax:p,ymin:d}=u;const{xmin:m,ymax:y}=e.extent;return n?(h=m+(h>m?r*Math.round((h-m)/r):0),p=y-(p<y?a*Math.round((y-p)/a):0),f=m+(f>m?r*Math.round((f-m)/r):0),d=y-(d<y?a*Math.round((y-d)/a):0),o=new X.Z({xmin:h,ymax:p,xmax:f,ymin:d,spatialReference:s}),l=Math.round(o.width/r),c=Math.round(o.height/a)):(l=Math.floor((f-h)/r+.8),c=Math.floor((p-d)/a+.8),h=m+(h>m?r*Math.floor((h-m)/r+.1):0),p=y-(p<y?a*Math.floor((y-p)/a+.1):0),f=h+l*r,d=p-c*a,o=new X.Z({xmin:h,ymax:p,xmax:f,ymin:d,spatialReference:s})),{extent:o,width:l,height:c}}(n,r,l),p=await this.fetchPixels(c,u,h,{...t,interpolation:"nearest"});if(null==p.pixelBlock)throw new a.Z("imagery-tile-mixin:compute-statistics-histograms","failed to fetch pixels");const d=await async function(e,t,n){if("extent"===n.type)return function(e,t,i){const{width:n,height:s}=e,r=new Uint8Array(n*s),a=t.width/n,o=t.height/s;if(i.width/a<.5||i.height/o<.5)return new ne.Z({pixelType:e.pixelType,width:n,height:s,mask:r,pixels:[...e.pixels]});const{xmin:l,xmax:c,ymin:u,ymax:h}=t,{xmin:f,xmax:p,ymin:d,ymax:m}=i,y=Math.max(l,f),g=Math.min(c,p),x=Math.max(u,d),w=Math.min(h,m),b=.5*a,v=.5*o;if(g-y<b||w-x<v||g<l+b||y>c-b||x>h-v||w<u+v)return new ne.Z({pixelType:e.pixelType,width:n,height:s,mask:r,pixels:[...e.pixels]});const I=Math.max(0,(y-l)/a),_=Math.min(n,Math.max(0,(g-l)/a)),S=Math.max(0,(h-w)/o),R=Math.min(s,Math.max(0,(h-x)/o)),T=Math.round(I),C=Math.round(_)-1,k=Math.round(S),M=Math.round(R)-1;if(T===C&&I%1>.5&&_%1<.5||k===M&&S%1>.5&&R%1<.5)return new ne.Z({pixelType:e.pixelType,width:n,height:s,mask:r,pixels:[...e.pixels]});if(0===T&&0===k&&C===n&&M===s)return e;const F=e.mask;for(let e=k;e<=M;e++)for(let t=T;t<=C;t++){const i=e*n+t;r[i]=F?F[i]:255}return new ne.Z({pixelType:e.pixelType,width:n,height:s,mask:r,pixels:[...e.pixels]})}(e,t,n);const{width:s,height:r}=e,a=new Uint8Array(s*r),{contains:o,intersects:l}=await Promise.all([i.e(5837),i.e(1433)]).then(i.bind(i,61433));return l(t,n)?"polyline"===n.type?function(e,t,i){const{width:n,height:s}=e,r=new Uint8Array(n*s),a=t.width/n,o=t.height/s,{xmin:l,ymax:c}=t,{paths:u}=i,h=e.mask;for(let e=0;e<u.length;e++){const t=u[e];for(let e=0;e<t.length-1;e++){const[i,u]=t[e],[f,p]=t[e+1];let d=Math.floor((c-u)/o),m=Math.floor((c-p)/o);if(m<d){const e=d;d=m,m=e}d=Math.max(0,d),m=Math.min(s-1,m);const y=(f-i)/(p-u);for(let e=d;e<=m;e++){const t=e===d?Math.max(u,p):(s+1-e)*o,c=e===m?Math.min(u,p):t-o;let g=p===u?Math.floor((i-l)/a):Math.floor((y*(t-u)+i-l)/a),x=p===u?Math.floor((f-l)/a):Math.floor((y*(c-u)+i-l)/a);if(x<g){const e=g;g=x,x=e}const w=e*n;g=Math.max(0,g),x=Math.min(n-1,x);for(let e=w+g;e<=w+x;e++)r[e]=h?h[e]:255}}}return new ne.Z({pixelType:e.pixelType,width:n,height:s,mask:r,pixels:[...e.pixels]})}(e,t,n):o(n,t)?e:function(e,t,i){if(!e)return e;const{width:n,height:s}=e,r=t.width/n,a=t.height/s,{xmin:o,ymax:l}=t;let c;if("extent"===i.type){const e=(i.xmin-o)/r,t=(i.xmax-o)/r,n=(l-i.ymax)/a,s=(l-i.ymin)/a;c=[[[e,n],[e,s],[t,s],[t,n],[e,n]]]}else c=i.rings.map((e=>e.map((([e,t])=>[(e-o)/r,(l-t)/a]))));const u=document.createElement("canvas");u.width=n,u.height=s;const h=u.getContext("2d");h.fillStyle="#f00",c.forEach((e=>{h.beginPath(),h.moveTo(e[0][0],e[0][1]);for(let t=0;t<e.length;t++)h.lineTo(e[t][0],e[t][1]);h.closePath(),h.fill()}));const f=h.getImageData(0,0,n,s).data,p=e.mask,d=n*s,m=new Uint8Array(d);for(let e=0;e<d;e++)p&&!p[e]||(m[e]=f[4*e+3]>127?255:0);return new ne.Z({pixelType:e.pixelType,width:n,height:s,mask:m,maskIsAlpha:!1,pixels:[...e.pixels]})}(e,t,n):new ne.Z({pixelType:e.pixelType,width:s,height:r,mask:a,maskIsAlpha:!1,pixels:[...e.pixels]})}(p.pixelBlock,c,r),m=this._rasterJobHandler.instance;return m?m.computeStatisticsHistograms({pixelBlock:d},t):(0,re.js)(d)}async createFlowMesh(e,t){const i=this._rasterJobHandler.instance;return i?i.createFlowMesh(e,t):(0,ce.GE)(e.meshType,e.simulationSettings,e.flowData,null!=t.signal?t.signal:(new AbortController).signal)}normalizeRasterFetchOptions(e){const{multidimensionalInfo:t}=this.rasterInfo??{};if(null==t)return e;let i=e.multidimensionalDefinition||this.multidimensionalDefinition;null!=i&&i.length||(i=(0,A.Tj)(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset}));const n=e.timeExtent||this.timeExtent;if(null!=i&&null!=n&&(null!=n.start||null!=n.end)){i=i.map((e=>e.clone()));const s=t.variables.find((({name:e})=>e===i[0].variableName))?.dimensions?.find((({name:e})=>"StdTime"===e)),r=i.find((({dimensionName:e})=>"StdTime"===e));if(!s||!r)return{...e,multidimensionalDefinition:null};const{start:a,end:o}=n,l=null==a?null:a.getTime(),c=null==o?null:o.getTime(),u=l??c,h=c??l;if(null!=s.values){const e=s.values.filter((e=>{if(Array.isArray(e)){if(u===h)return e[0]<=u&&e[1]>=u;const t=e[0]<=u&&e[1]>u||e[0]<h&&e[1]>=h,i=e[0]>=u&&e[1]<=h||e[0]<u&&e[1]>h;return t||i}return u===h?e===u:e>=u&&e<=h}));if(e.length){const t=e.sort(((e,t)=>{const i=Array.isArray(e)?e[0]:e,n=Array.isArray(e)?e[1]:e,s=Array.isArray(t)?t[0]:t,r=Array.isArray(t)?t[1]:t;return u===h?i-s:Math.abs(n-h)-Math.abs(r-h)}))[0];r.values=[t]}else i=null}else if(s.hasRegularIntervals&&s.extent){const[e,t]=s.extent;u>t||h<e?i=null:r.values=u===h?[u]:[Math.max(e,u),Math.min(t,h)]}}return null!=i&&(0,A.nb)(i,this.multidimensionalSubset)?{...e,multidimensionalDefinition:null}:{...e,multidimensionalDefinition:i}}async updateRasterFunction(){if(!this.loaded||"imagery-tile"!==this.type||!this.rasterFunction&&!this._cachedRasterFunctionJson||JSON.stringify(this.rasterFunction)===JSON.stringify(this._cachedRasterFunctionJson))return;if(this._isConstructedFromFunctionRaster&&"Function"===this.raster.datasetFormat){const e=this.raster.rasterFunction.toJSON();return!this.rasterFunction&&e&&this._set("rasterFunction",M.Z.fromJSON(e)),void(this._cachedRasterFunctionJson=this.rasterFunction?.toJSON())}let e,t=this.raster,i=!1;"Function"===t.datasetFormat?(e=t.primaryRasters.rasters,t=e[0],i=!0):e=[t];const{rasterFunction:n}=this;if(n){const i={raster:t};e.length>1&&e.forEach((e=>i[e.url]=e));const s=(0,se.Ue)(n.functionDefinition?.toJSON()??n.toJSON(),i),r=new te({rasterFunction:s});r.rasterJobHandler=this._rasterJobHandler.instance,await r.open(),this._cachedRasterFunctionJson=this.rasterFunction?.toJSON(),this.raster=r}else this.raster=t,this._cachedRasterFunctionJson=null,await t.when();if(this._cachedRendererJson=null,!i&&!n)return;const{bandIds:s}=this,{bandCount:r}=this.raster.rasterInfo,a=s?.length?s.some((e=>e>=r)):r>=3;s&&(a||this.renderer&&"raster-stretch"!==this.renderer.type)&&this._set("bandIds",null),this._configDefaultRenderer("auto")}async updateRenderer(){const{loaded:e,symbolizer:t}=this;if(!e||!t||!this.renderer)return;const{rasterInfo:i}=this.raster,n=(0,A.WY)(i,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),s=n?.name,r=(0,ae.ol)({...this.renderer.toJSON(),variableName:s});if(JSON.stringify(this._cachedRendererJson)===JSON.stringify(r))return;const a=this._rasterJobHandler.instance;a&&(t.rasterInfo=(0,ae.FI)(i,s),t.rendererJSON=r,t.bind(),await a.updateSymbolizer(t),this._cachedRendererJson=r)}async applyRenderer(e,t){const i=e&&e.pixelBlock;if(!(null!=i&&i.pixels&&i.pixels.length>0))return null;let n;await this.updateRenderer();const s=this._rasterJobHandler.instance,r=this.bandIds??[];return n=s?await s.symbolize({...e,simpleStretchParams:t,bandIds:r}):this.symbolizer.symbolize({...e,simpleStretchParams:t,bandIds:r}),n}getTileUrl(e,t,i){return"RasterTileServer"===this.raster.datasetFormat?`${this.url}/tile/${e}/${t}/${i}`:""}getCompatibleTileInfo(e,t,i=!1){if(!this.loaded||null==t)return null;if(i&&e.equals(this.spatialReference))return this.tileInfo;const n=(0,S.C5)(e);return O.Z.create({size:256,spatialReference:e,origin:n?{x:n.origin[0],y:n.origin[1]}:{x:t.xmin,y:t.ymax}})}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent&&this._compatibleFullExtent.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}async fetchTile(e,t,i,n={}){if(s(this),n.requestAsImageElement){const s=this.getTileUrl(e,t,i);return(0,I.Z)(s,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:n.signal}).then((e=>e.data))}const{rasterInfo:r}=this;if(null!=r.multidimensionalInfo&&null==(n=this.normalizeRasterFetchOptions(n)).multidimensionalDefinition){const s=n.tileInfo||r.storageInfo.tileInfo;return{extent:this.raster.getTileExtentFromTileInfo(e,t,i,s),pixelBlock:null}}return await this._initJobHandler(),await this.updateRasterFunction(),"raster-shaded-relief"===this.renderer?.type&&(n={...n,buffer:{cols:1,rows:1}}),this.raster.fetchTile(e,t,i,n)}async fetchPixels(e,t,i,n={}){return null!=this.rasterInfo.multidimensionalInfo&&null==(n=this.normalizeRasterFetchOptions(n)).multidimensionalDefinition?{extent:e,pixelBlock:null}:(await this._initJobHandler(),await this.updateRasterFunction(),t=Math.round(t),i=Math.round(i),this.raster.fetchPixels(e,t,i,n))}async identify(e,t={}){const{raster:i,rasterInfo:n}=this;if(null!=n.multidimensionalInfo&&!(n.hasMultidimensionalTranspose&&((0,A.WU)(t.multidimensionalDefinition)||t.transposedVariableName||t.timeExtent)||null!=(t=this.normalizeRasterFetchOptions(t)).multidimensionalDefinition))return{location:e,value:null};const s=this.multidimensionalSubset?.areaOfInterest;if(s&&!s.contains(e))throw new a.Z("imagery-tile-mixin:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");return i.identify(e,t)}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}hasStandardTime(){const e=this.rasterInfo?.multidimensionalInfo;if(null==e||"standard-time"!==this.rasterInfo?.dataType)return!1;const t=this.multidimensionalDefinition,i=t?.[0]?.variableName;return e.variables.some((e=>e.name===i&&(!t?.[0].dimensionName||e.dimensions.some((e=>"StdTime"===e.name)))))}getStandardTimeValue(e){return new Date(24*(e-25569)*3600*1e3).toString()}getMultidimensionalSubsetVariables(e){const t=e??this.rasterInfo?.multidimensionalInfo;return(0,A.jj)(this.multidimensionalSubset,t)}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=(0,A.Tj)(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset})),this.rasterFunction&&"Function"===this.raster.datasetFormat&&(this._cachedRasterFunctionJson=this.rasterFunction.toJSON()),this._configDefaultRenderer()}_initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new F.Z;return this._rasterJobHandler.connectionPromise=e.initialize().then((async()=>{s(this),this._rasterJobHandler.instance=e,this.raster.rasterJobHandler=e,"Function"===this.raster.datasetFormat&&this.raster.syncJobHandler(),this.rasterFunction&&await this.updateRasterFunction().catch((()=>{})),this.renderer&&this.updateRenderer()})).catch((()=>{})),this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this._cachedRendererJson=null,this.raster&&(this.raster.rasterJobHandler=null)}_configDefaultInterpolation(){if(null==this.interpolation){s(this);const{raster:e}=this,t=(0,ae.In)(e.rasterInfo,e.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",t)}}_configDefaultRenderer(e="no"){s(this);const{rasterInfo:t}=this.raster;!this.bandIds&&t.bandCount>1&&(this.bandIds=(0,ae.YD)(t));const i=(0,A.WY)(t,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),n=i?.name;if(!this.renderer||"override"===e){const e=(0,ae.Ob)(t,{bandIds:this.bandIds,variableName:n}),i=t.statistics,s=i&&i.length>0?i[0]:null,r=s?.max??0,a=s?.min??0;"WCSServer"===this.raster.datasetFormat&&"raster-stretch"===e.type&&(r>1e24||a<-1e24)&&(e.dynamicRangeAdjustment=!0,e.statistics=null,"none"===e.stretchType&&(e.stretchType="min-max")),this.renderer=e}const r=(0,ae.ol)({...this.renderer.toJSON(),variableName:n}),a=(0,ae.FI)(t,n);this.symbolizer?(this.symbolizer.rendererJSON=r,this.symbolizer.rasterInfo=a):this.symbolizer=new oe.Z({rendererJSON:r,rasterInfo:a});const o=this.symbolizer.bind();if(o.success){if("auto"===e){const{colormap:e}=this.raster.rasterInfo,t=this.renderer;if(null!=e&&"raster-colormap"===t.type){const e=(0,ae.Ob)(this.raster.rasterInfo);JSON.stringify(e)!==JSON.stringify(t)&&this._configDefaultRenderer("override")}else if("raster-stretch"===t.type){const e=this.bandIds?.length,i=t.statistics?.length;!t.dynamicRangeAdjustment&&i&&e&&i!==e&&this._configDefaultRenderer("override")}}}else he.warn("imagery-tile-mixin",o.error||"The given renderer is not supported by the layer."),"auto"===e&&this._configDefaultRenderer("override")}};function s(e){if(!e.raster||!e.rasterInfo)throw new a.Z("imagery-tile","no raster")}return(0,n._)([(0,h.Cb)({clonable:!1})],t.prototype,"_cachedRendererJson",void 0),(0,n._)([(0,h.Cb)({clonable:!1})],t.prototype,"_cachedRasterFunctionJson",void 0),(0,n._)([(0,h.Cb)({clonable:!1})],t.prototype,"_compatibleFullExtent",void 0),(0,n._)([(0,h.Cb)({clonable:!1})],t.prototype,"_isConstructedFromFunctionRaster",void 0),(0,n._)([(0,h.Cb)({clonable:!1})],t.prototype,"_rasterJobHandler",void 0),(0,n._)([(0,h.Cb)()],t.prototype,"bandIds",void 0),(0,n._)([(0,h.Cb)({json:{origins:{service:{read:{source:"copyrightText"}}}}})],t.prototype,"copyright",void 0),(0,n._)([(0,h.Cb)({json:{read:!1}})],t.prototype,"fullExtent",null),(0,n._)([(0,h.Cb)()],t.prototype,"interpolation",void 0),(0,n._)([(0,h.Cb)()],t.prototype,"ioConfig",void 0),(0,n._)([(0,h.Cb)({type:[C.Z],json:{write:!0}})],t.prototype,"multidimensionalDefinition",null),(0,n._)([(0,h.Cb)({type:k.Z,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,n._)([(0,h.Cb)()],t.prototype,"raster",void 0),(0,n._)([(0,h.Cb)({type:M.Z,json:{name:"renderingRule",write:!0}})],t.prototype,"rasterFunction",null),(0,n._)([(0,h.Cb)()],t.prototype,"rasterInfo",void 0),(0,n._)([(0,h.Cb)()],t.prototype,"sourceJSON",void 0),(0,n._)([(0,h.Cb)({readOnly:!0,type:ue.Z,json:{read:!1}})],t.prototype,"spatialReference",void 0),(0,n._)([(0,h.Cb)({type:O.Z})],t.prototype,"tileInfo",void 0),(0,n._)([(0,h.Cb)(T.HQ)],t.prototype,"url",null),(0,n._)([(0,h.Cb)({types:v.dr,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(){const e="raster-stretch"===this.renderer?.type&&"none"===this.renderer.stretchType&&!this.renderer.useGamma;return{enabled:!this.loaded||"Raster"===this.raster.tileType||!e}}},origins:{"web-scene":{types:v.FK,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"renderer",null),(0,n._)([(0,_.r)("renderer")],t.prototype,"readRenderer",null),(0,n._)([(0,h.Cb)({clonable:!1})],t.prototype,"symbolizer",void 0),t=(0,n._)([(0,y.j)("esri.layers.ImageryTileMixin")],t),t};var pe=i(38009),de=i(16859),me=i(34760),ye=i(72965),ge=i(28294),xe=i(1231),we=i(69608),be=i(25972),ve=i(20095);function Ie(e){const t=e.fields,i=e.records,n=t.some((e=>"oid"===e.name.toLowerCase()))?"OBJECTID":"OID",s=[{name:n,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map((e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name})))),r=s.map((e=>e.name)),a=[];let o=0,l=0;return i.forEach((e=>{const t={};for(t[n]=o++,l=1;l<r.length;l++)t[r[l]]=e[l-1];a.push({attributes:t})})),{displayFieldName:"",fields:s,features:a}}class _e{static get supportedVersions(){return[5]}static parse(e){const t=new DataView(e),i=3&t.getUint8(0);if(3!==i)return{header:{version:i},recordSet:null};const n=t.getUint32(4,!0),s=t.getUint16(8,!0),r=t.getUint16(10,!0),a={version:i,recordCount:n,headerByteCount:s,recordByteCount:r};let o=32;const l=[],c=[];let u;if(3===i){for(;13!==t.getUint8(o);)u=String.fromCharCode(t.getUint8(o+11)).trim(),l.push({name:(0,ve.f)(new Uint8Array(e,o,11)),type:u,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(u)],length:t.getUint8(o+16)}),o+=32;if(o+=1,l.length>0)for(;c.length<n&&e.byteLength-o>r;){const i=[];32===t.getUint8(o)?(o+=1,l.forEach((t=>{if("C"===t.type)i.push((0,ve.f)(new Uint8Array(e,o,t.length)).trim());else if("N"===t.type)i.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim(),10));else if("F"===t.type)i.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim()));else if("D"===t.type){const n=String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim();i.push(new Date(parseInt(n.substring(0,4),10),parseInt(n.substring(4,6),10)-1,parseInt(n.substring(6,8),10)))}o+=t.length})),c.push(i)):o+=r}}return{header:a,fields:l,records:c,recordSet:Ie({fields:l,records:c})}}}var Se=i(87521);const Re=new Map;Re.set("int16","esriFieldTypeSmallInteger"),Re.set("int32","esriFieldTypeInteger"),Re.set("int64","esriFieldTypeInteger"),Re.set("float32","esriFieldTypeSingle"),Re.set("float64","esriFieldTypeDouble"),Re.set("text","esriFieldTypeString");let Te=class extends K{constructor(){super(...arguments),this.storageInfo=null,this.datasetFormat="CRF"}async open(e){await this.init();const{data:t}=await this.request(this.url+"/conf.json",{signal:e?.signal});if(!this._validateHeader(t))throw new a.Z("cloudraster:open","Invalid or unsupported conf.json.");this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const{storageInfo:i,rasterInfo:n}=this._parseHeader(t);if("thematic"===n.dataType){const e=await this._fetchAuxiliaryInformation();n.attributeTable=e}this._set("storageInfo",i),this._set("rasterInfo",n),this.ioConfig.retryCount=this.ioConfig.retryCount||0}async fetchRawTile(e,t,i,n={}){const{transposeInfo:s}=this.rasterInfo.storageInfo,{transposedVariableName:r}=n,a=!(!s||!r),o=a?0:this.rasterInfo.storageInfo.maximumPyramidLevel-e;if(o<0)return null;const l=this._buildCacheFilePath(o,t,i,n.multidimensionalDefinition,r),c=this._getIndexRecordFromBundle(t,i,a),u=await this.request(l,{range:{from:0,to:this.storageInfo.headerSize-1},responseType:"array-buffer",signal:n.signal});if(!u)return null;const h=new Uint8Array(u.data),f=this._getTileEndAndContentType(h,c);if(0===f.recordSize)return null;const p=await this.request(l,{range:{from:f.position,to:f.position+f.recordSize},responseType:"array-buffer",signal:n.signal});if(!p)return null;const[d,m]=this._getTileSize(a);return this.decodePixelBlock(p.data,{width:d,height:m,planes:null,pixelType:null,returnInterleaved:a})}_validateHeader(e){return e&&"RasterInfo"===e.type&&!["origin","extent","geodataXform","LODInfos","blockWidth","blockHeight","bandCount","pixelType","pixelSizeX","pixelSizeY","format","packetSize"].some((t=>!e[t]))}_parseHeader(e){const t=["u1","u2","u4","u8","s8","u16","s16","u32","s32","f32","f64"][e.pixelType],{bandCount:i,colormap:n,blockWidth:s,blockHeight:r,firstPyramidLevel:a,maximumPyramidLevel:o}=e,l=e.statistics&&e.statistics.map((e=>({min:e.min,max:e.max,avg:e.mean,stddev:e.standardDeviation,median:e.median,mode:e.mode}))),c=e.histograms?.[0]?.counts?.length?e.histograms:null,u=e.extent.spatialReference,h=e.geodataXform?.spatialReference,f=new ue.Z(u?.wkid||u?.wkt||u?.wkt2?u:h);let p=new X.Z({xmin:e.extent.xmin,ymin:e.extent.ymin,xmax:e.extent.xmax,ymax:e.extent.ymax,spatialReference:f});const d=new B.Z({x:e.pixelSizeX,y:e.pixelSizeY,spatialReference:f}),m=Math.round((p.xmax-p.xmin)/d.x),y=Math.round((p.ymax-p.ymin)/d.y),g=this._parseTransform(e.geodataXform),x=g?p:null;g&&(p=g.forwardTransform(p),d.x=(p.xmax-p.xmin)/m,d.y=(p.ymax-p.ymin)/y);const w=e.properties??{},b=e.format.toLowerCase().replace("cache/",""),v=new B.Z(e.origin.x,e.origin.y,f);let I,_,S,R;if(n&&n.colors)for(I=[],_=0;_<n.colors.length;_++)S=n.colors[_],R=n.values?n.values[_]:_,I.push([R,255&S,S<<16>>>24,S<<8>>>24,S>>>24]);const T=e.LODInfos,C=[];for(_=0;_<T.levels.length;_++)C.push(new D.Z({level:T.levels[_],resolution:T.resolutions[_],scale:96/.0254*T.resolutions[_]}));const k=new O.Z({dpi:96,lods:C,format:b,origin:v,size:[s,r],spatialReference:f}),M={recordSize:8,packetSize:e.packetSize,headerSize:e.packetSize*e.packetSize*8+64},F=[{maxCol:Math.ceil(m/s)-1,maxRow:Math.ceil(y/r)-1,minCol:0,minRow:0}];let P=2;if(o>0)for(_=0;_<o;_++)F.push({maxCol:Math.ceil(m/P/s)-1,maxRow:Math.ceil(y/P/r)-1,minCol:0,minRow:0}),P*=2;const Z=e.mdInfo;let A=null;if(Z&&w._yxs){const e=w._yxs;A={packetSize:e.PacketSize,tileSize:[e.TileXSize,e.TileYSize]}}return{storageInfo:M,rasterInfo:new be.Z({width:m,height:y,pixelType:t,bandCount:i,extent:p,nativeExtent:x,transform:g,spatialReference:f,pixelSize:d,keyProperties:w,statistics:l,histograms:c,multidimensionalInfo:Z,colormap:I,storageInfo:new z.Z({blockWidth:s,blockHeight:r,pyramidBlockWidth:s,pyramidBlockHeight:r,origin:v,tileInfo:k,transposeInfo:A,firstPyramidLevel:a,maximumPyramidLevel:o,blockBoundary:F})})}}_parseTransform(e){if(!(0,Se.j)(e))throw new a.Z("cloudraster:open","the data contains unsupported geodata transform types");const t=(0,Se.c)(e);if("identity"===t.type)return null;if("polynomial"!==t.type||!t.forwardCoefficients?.length||!t.inverseCoefficients?.length)throw new a.Z("cloudraster:open","the data contains unsupported geodata transforms - both forward and inverse coefficients are required currently");return t}async _fetchAuxiliaryInformation(e){const t=this.request(this.url+"/conf.vat.json",{signal:e}).then((e=>e.data)).catch((()=>null)),i=this.request(this.url+"/conf.vat.dbf",{responseType:"array-buffer",signal:e}).then((e=>e.data)).catch((()=>null)),n=await Promise.all([t,i]);let s;if(n[0]){let e=n[0].fields;const t=n[0].values;if(e&&t){e=e.map((e=>({type:"OID"===e.name?"esriFieldTypeOID":Re.get(e.type),name:e.name,alias:e.alias||e.name})));const i=t.map((e=>({attributes:e})));e&&t&&(s={fields:e,features:i})}}return!s&&n[1]&&(s=_e.parse(n[1]).recordSet),Q.Z.fromJSON(s)}_buildCacheFilePath(e,t,i,n,s){const r=this._getPackageSize(!!s),a=Math.floor(t/r)*r,o=Math.floor(i/r)*r,l="R"+this._toHexString4(a)+"C"+this._toHexString4(o);let c="L";c+=e>=10?e.toString():"0"+e.toString();const{multidimensionalInfo:u}=this.rasterInfo,h=n?.[0];if(null==u||!h)return`${this.url}/_alllayers/${c}/${l}.bundle`;let f="_yxs";if(!s){f=u.variables.find((e=>e.name===h.variableName)).dimensions[0].values.indexOf(h.values[0]).toString(16);const e=4-f.length;for(let t=0;t<e;t++)f="0"+f;f="S"+f}const p=this._getVariableFolderName(s||h.variableName);return`${this.url}/_alllayers/${p}/${f}/${c}/${l}.bundle`}_getPackageSize(e=!1){const{transposeInfo:t}=this.rasterInfo.storageInfo;return e&&null!=t?t.packetSize??0:this.storageInfo.packetSize}_getTileSize(e=!1){const{storageInfo:t}=this.rasterInfo,{transposeInfo:i}=t;return e&&null!=i?i.tileSize:t.tileInfo.size}_getVariableFolderName(e){return""===(e=e.trim())?"_v":e.replaceAll(/[\{|\}\-]/g,"_").replace("\\*","_v")}_getIndexRecordFromBundle(e,t,i=!1){const n=this._getPackageSize(i),s=n*(e%n)+t%n;if(s<0)throw new Error("Invalid level / row / col");return 20+s*this.storageInfo.recordSize+44}_getTileEndAndContentType(e,t){const i=e.subarray(t,t+8);let n,s=0;for(n=0;n<5;n++)s|=(255&i[n])<<8*n;const r=0xffffffffff&s;for(s=0,n=5;n<8;n++)s|=(255&i[n])<<8*(n-5);return{position:r,recordSize:0xffffffffff&s}}_toHexString4(e){let t=e.toString(16);if(4!==t.length){let e=4-t.length;for(;e-- >0;)t="0"+t}return t}};(0,n._)([(0,h.Cb)({readOnly:!0})],Te.prototype,"storageInfo",void 0),(0,n._)([(0,h.Cb)({type:String,json:{write:!0}})],Te.prototype,"datasetFormat",void 0),Te=(0,n._)([(0,y.j)("esri.layers.support.rasterDatasets.CloudRaster")],Te);const Ce=Te;let ke=class extends K{constructor(){super(...arguments),this.datasetFormat="MEMORY",this.data=null}async open(e){await this.init();const t=this.data,{pixelBlock:i,statistics:n,histograms:s,name:r,keyProperties:a,nativeExtent:o,transform:l}=this.data,{width:c,height:u,pixelType:h}=i,f=t.extent??new X.Z({xmin:-.5,ymin:.5,xmax:c-.5,ymax:u-.5,spatialReference:new ue.Z({wkid:3857})}),p=t.isPseudoSpatialReference??!t.extent,d={x:f.width/c,y:f.height/u},m=new be.Z({width:c,height:u,pixelType:h,extent:f,nativeExtent:o,transform:l,pixelSize:d,spatialReference:f.spatialReference,bandCount:i.pixels.length,keyProperties:a||{},statistics:n,isPseudoSpatialReference:p,histograms:s});this.createRemoteDatasetStorageInfo(m,512,512),this._set("rasterInfo",m),this.updateTileInfo(),await this._buildInMemoryRaster(i,{width:512,height:512},e),this.datasetName=r,this.url="/InMemory/"+r}fetchRawTile(e,t,i,n={}){const s=this._pixelBlockTiles.get(`${e}/${t}/${i}`);return Promise.resolve(s)}async _buildInMemoryRaster(e,t,i){const n=this.rasterInfo.storageInfo.maximumPyramidLevel,s=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:n},i):Promise.resolve((0,$.Vl)(e,t,n)),r=null!=this.rasterInfo.statistics,o=null!=this.rasterInfo.histograms,l=r?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},i):Promise.resolve((0,re.Hv)(e)),u=await(0,c.as)([s,l]);if(!u[0].value&&u[1].value)throw new a.Z("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=u[0].value,r||(this.rasterInfo.statistics=u[1].value?.statistics),o||(this.rasterInfo.histograms=u[1].value?.histograms)}};(0,n._)([(0,h.Cb)({type:String,json:{write:!0}})],ke.prototype,"datasetFormat",void 0),(0,n._)([(0,h.Cb)()],ke.prototype,"data",void 0),ke=(0,n._)([(0,y.j)("esri.layers.support.rasterDatasets.InMemoryRaster")],ke);const Me=ke;function Fe(e,t){if(!e||!t)return[];let i=t;t.includes("/")?(i=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const n=[];if(t){const s=Fe(e,i);for(let e=0;e<s.length;e++)Fe(s[e],t).forEach((e=>n.push(e)));return n}const s=e.getElementsByTagNameNS("*",i);if(!s||0===s.length)return[];for(let e=0;e<s.length;e++)n.push(s[e]||s.item(e));return n}function Oe(e,t){if(!e||!t)return null;let i=t;t.includes("/")?(i=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const n=Fe(e,i);return n.length>0?t?Oe(n[0],t):n[0]:null}function Pe(e,t=null){const i=t?Oe(e,t):e;let n;return i?(n=i.textContent||i.nodeValue,n?n.trim():null):null}function Ze(e,t){return function(e,t){const i=Fe(e,t),n=[];let s;for(let e=0;e<i.length;e++)s=i[e].textContent||i[e].nodeValue,s&&(s=s.trim(),""!==s&&n.push(s));return n}(e,t).map((e=>Number(e)))}function De(e,t){const i=Pe(e,t);return Number(i)}function ze(e,t){const i=e?.nodeName?.toLowerCase(),n=t.toLowerCase();return i.slice(i.lastIndexOf(":")+1)===n}var Ae=i(87390);function Ne(e,t){if(!e||!t)return null;const i=[];for(let n=0;n<e.length;n++)i.push(e[n]),i.push(t[n]);return i}function Be(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new ue.Z({wkid:t});if(e=String(e).trim(),(0,S.xl)(e))return new ue.Z({wkt2:e});const i=e.toUpperCase();if(i.startsWith("COMPD_CS")){if(!i.includes("VERTCS")||!i.includes("GEOGCS")&&!i.startsWith("PROJCS"))return null;const n=i.indexOf("VERTCS"),s=i.indexOf("PROJCS"),r=s>-1?s:i.indexOf("GEOGCS");if(-1===r)return null;const a=e.slice(r,e.lastIndexOf("]",n)+1).trim(),o=e.slice(n,e.lastIndexOf("]")).trim();t=Ee(a);const l=new ue.Z(t?{wkid:t}:{wkt:a}),c=Ee(o);return c&&(l.vcsWkid=c),l}return i.startsWith("GEOGCS")||i.startsWith("PROJCS")?(t=Ee(e),new ue.Z(0!==t?{wkid:t}:{wkt:e})):null}function Ee(e){const t=e.replaceAll("]","[").replaceAll('"',"").split("[").map((e=>e.trim())).filter((e=>""!==e)),i=t[t.length-1].split(","),n=i[0]?.toLowerCase();if(("epsg"===n||"esri"===n)&&e.endsWith('"]]')){const e=Number(i[1]);if(!isNaN(e)&&0!==e)return e}return 0}function Je(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};const t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach((e=>{if(1===e.nodeType)if(ze(e,"SRS")){if(!t.spatialReference){const i=Pe(e);t.spatialReference=Be(i)}}else if(ze(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){const{spatialReference:i,transform:n}=function(e){const t=Oe(e,"GeodataXform"),i=Be(De(t,"SpatialReference/WKID")||Pe(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:i,transform:null};const n=De(t,"PolynomialOrder")??1,s=Ze(t,"CoeffX/Double"),r=Ze(t,"CoeffY/Double"),a=Ze(t,"InverseCoeffX/Double"),o=Ze(t,"InverseCoeffY/Double"),l=Ne(s,r),c=Ne(a,o);return{spatialReference:i,transform:l&&c&&l.length&&c.length?new Ae.Z({spatialReference:i,polynomialOrder:n,forwardCoefficients:l,inverseCoefficients:c}):null}}(e);t.transform=n,t.spatialReference||(t.spatialReference=i)}else Fe(e,"MDI").forEach((e=>t.metadata[e.getAttribute("key")]=Pe(e)));else if(ze(e,"PAMRasterBand")){const i=function(e){const t=De(e,"NoDataValue"),i=Oe(e,"Histograms/HistItem"),n=De(i,"HistMin"),s=De(i,"HistMax"),r=De(i,"BucketCount"),a=Pe(i,"HistCounts")?.split("|").map((e=>Number(e)));let o,l,c,u;Fe(e,"Metadata/MDI").forEach((e=>{const t=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":o=t;break;case"STATISTICS_MAXIMUM":l=t;break;case"STATISTICS_MEAN":c=t;break;case"STATISTICS_STDDEV":u=t}}));const h=De(e,"Metadata/SourceBandIndex");return{noDataValue:t,histogram:a?.length&&null!=n&&null!=s?{min:n,max:s,size:r||a.length,counts:a}:null,sourceBandIndex:h,statistics:null!=o&&null!=l?{min:o,max:l,avg:c,stddev:u}:null}}(e);null!=i.sourceBandIndex&&null==t.rasterBands[i.sourceBandIndex]?t.rasterBands[i.sourceBandIndex]=i:t.rasterBands.push(i)}}));const i=t.rasterBands;if(i.length){const e=!!i[0].statistics;t.statistics=e?i.map((e=>e.statistics)).filter(p.pC):null;const n=!!i[0].histogram;t.histograms=n?i.map((e=>e.histogram)).filter(p.pC):null}return t}let Le=class extends K{async open(e){await this.init();const t=await this._fetchData(e);let{spatialReference:i,statistics:n,histograms:s,transform:r}=await this._fetchAuxiliaryData(e);const a=!i;a&&(i=new ue.Z({wkid:3857})),s?.length&&null==n&&(n=(0,re.Oh)(s));const{width:o,height:l}=t;let c=new X.Z({xmin:-.5,ymin:.5-l,xmax:o-.5,ymax:.5,spatialReference:i});const u=r?r.forwardTransform(c):c;let h=!0;if(r){const e=r.forwardCoefficients;h=e&&0===e[1]&&0===e[2],h&&(r=null,c=u)}const f=new Me({data:{extent:u,nativeExtent:c,transform:r,pixelBlock:t,statistics:n,histograms:s,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:a}});await f.open(),f.data=null,this._set("rasterInfo",f.rasterInfo),this._inMemoryRaster=f}fetchRawTile(e,t,i,n={}){return this._inMemoryRaster.fetchRawTile(e,t,i,n)}async _fetchData(e){const{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),i=(0,U.y)(t).toUpperCase();if("JPG"!==i&&"PNG"!==i&&"GIF"!==i&&"BMP"!==i)throw new a.Z("image-aux-raster:open","the data is not a supported format");this._set("datasetFormat",i);const n=i.toLowerCase(),s="gif"===n||"bmp"===n||!(0,d.Z)("ios"),r=await this.decodePixelBlock(t,{format:n,useCanvas:s,hasNoZlibMask:!0});if(null==r)throw new a.Z("image-aux-raster:open","the data cannot be decoded");return r}async _fetchAuxiliaryData(e){const t=e?.signal,i=this.ioConfig.skipExtensions??[],n=i.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),s=this.datasetFormat,r="JPG"===s?"jgw":"PNG"===s?"pgw":"BMP"===s?"bpw":null,a=r&&i.includes(r)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+r,{responseType:"text",signal:t}),o=await(0,c.as)([n,a]);if(t?.aborted)throw(0,c.zE)();const l=Je(o[0].value?.data);if(!l.transform){const e=o[1].value?o[1].value.data.split("\n").slice(0,6).map((e=>Number(e))):null;l.transform=6===e?.length?new Ae.Z({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return l}};(0,n._)([(0,h.Cb)({type:String,json:{write:!0}})],Le.prototype,"datasetFormat",void 0),Le=(0,n._)([(0,y.j)("esri.layers.support.rasterDatasets.ImageAuxRaster")],Le);const He=Le;var We=i(70586),qe=i(17452),je=i(28589),Ge=i(29680),Ue=i(26059);let $e=class extends K{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async open(e){await this.init();const t=e&&e.signal,i=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});i.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const n=i.data;if(this.sourceJSON=n,!n)throw new a.Z("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!n.tileInfo)throw new a.Z("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo(),this.tileType=n.cacheType,null==this.tileType&&(["jpg","jpeg","png","png8","png24","png32","mixed"].includes(n.tileInfo.format.toLowerCase())?this.tileType="Map":"lerc"===n.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=n.name?.slice(n.name.indexOf("/")+1)??"";const s=await this._fetchRasterInfo({signal:t});if(null==s)throw new a.Z("image-server-raster:open","cannot initialize image service");(0,Ue.n$)(s,n);const r="Map"===this.tileType?function(e,t){if(!e)return null;const{minScale:i,maxScale:n,minLOD:s,maxLOD:r}=t;if(null!=s&&null!=r)return O.Z.fromJSON({...e,lods:e.lods.filter((({level:e})=>null!=e&&e>=s&&e<=r))});if(0!==i&&0!==n){const t=e=>Math.round(1e4*e)/1e4,s=i?t(i):1/0,r=n?t(n):-1/0;return O.Z.fromJSON({...e,lods:e.lods.filter((e=>{const i=t(e.scale);return i<=s&&i>=r}))})}return O.Z.fromJSON(e)}(n.tileInfo,n):O.Z.fromJSON(n.tileInfo);(0,We.O3)(r);const[o,l]=this._computeMinMaxLOD(s,r),{extent:c,pixelSize:u}=s,h=.5/s.width*u.x,f=Math.max(u.x,u.y),{lods:p}=r;("Map"!==this.tileType&&0!==n.maxScale||Math.abs(u.x-u.y)>h||!p.some((e=>Math.abs(e.resolution-f)<h)))&&(u.x=u.y=o.resolution,s.width=Math.ceil((c.xmax-c.xmin)/u.x-.1),s.height=Math.ceil((c.ymax-c.ymin)/u.y-.1));const d=o.level-l.level,[m,y]=r.size,g=[],x=[];p.forEach(((e,t)=>{e.level>=l.level&&e.level<=o.level&&g.push({x:e.resolution,y:e.resolution}),t<p.length-1&&x.push(Math.round(10*e.resolution/p[t+1].resolution)/10)})),g.sort(((e,t)=>e.x-t.x));const w=this.computeBlockBoundary(c,m,y,r.origin,g,d),b=g.length>1?g.slice(1):null;let v;n.transposeInfo&&(v={tileSize:[n.transposeInfo.rows,n.transposeInfo.cols],packetSize:s.keyProperties?._yxs.PacketSize??0});const I=x.length<=1||x.length>=3&&x.slice(0,-1).every((e=>e===x[0]))?x[0]??2:Math.round(10/(l.resolution/o.resolution)**(-1/d))/10;if(s.storageInfo=new z.Z({blockWidth:r.size[0],blockHeight:r.size[1],pyramidBlockWidth:r.size[0],pyramidBlockHeight:r.size[1],pyramidResolutions:b,pyramidScalingFactor:I,compression:r.format,origin:r.origin,firstPyramidLevel:1,maximumPyramidLevel:d,tileInfo:r,transposeInfo:v,blockBoundary:w}),this._fixGCSShift(s),this._set("rasterInfo",s),n.capabilities.toLowerCase().includes("tilemap")){const e={tileInfo:s.storageInfo.tileInfo,parsedUrl:(0,qe.mN)(this.url),url:this.url,tileServers:[]};this._tilemapCache=new je.y({layer:e})}}async fetchRawTile(e,t,i,n={}){const{storageInfo:s,extent:r}=this.rasterInfo,{transposeInfo:a}=s,o=null!=a&&!!n.transposedVariableName;if(this._slices&&!o&&null==n.sliceId)return null;const l=o?0:s.maximumPyramidLevel-e+this._levelOffset,c=`${this.url}/tile/${l}/${t}/${i}`,u=this._slices?o?{variable:n.transposedVariableName}:{sliceId:n.sliceId||0}:null,{data:h}=await this.request(c,{query:u,responseType:"array-buffer",signal:n.signal});if(!h)return null;const f=o?a.tileSize:s.tileInfo.size,p=await this.decodePixelBlock(h,{width:f[0],height:f[1],planes:null,pixelType:null,isPoint:"Elevation"===this.tileType,returnInterleaved:o,noDataValue:this.rasterInfo.noDataValue});if(null==p)return null;const d=s.blockBoundary[e];if("jpg"!==s.compression||i>d.minCol&&i<d.maxCol&&t>d.minRow&&t<d.maxRow)return p;const{origin:m,blockWidth:y,blockHeight:g}=s,{x,y:w}=this.getPyramidPixelSize(e),b=Math.round((r.xmin-m.x)/x)%y,v=Math.round((r.xmax-m.x)/x)%y||y,I=Math.round((m.y-r.ymax)/w)%g,_=Math.round((m.y-r.ymin)/w)%g||g,S=i===d.minCol?b:0,R=t===d.minRow?I:0,T=i===d.maxCol?v:y,C=t===d.maxRow?_:g;return(0,$.pW)(p,{x:S,y:R},{width:T-S,height:C-R}),p}getSliceIndex(e){if(!this._slices||null==e||0===e.length)return null;const t=e;for(let e=0;e<this._slices.length;e++){const i=this._slices[e].multidimensionalDefinition;if(i.length===t.length&&!i.some((e=>{const i=t.find((t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName));return!i||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(i.values[0])?`${i.values[0][0]}-${i.values[0][1]}`:i.values[0])})))return e}return null}async fetchVariableStatisticsHistograms(e,t){const i=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.statistics)),n=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.histograms)),s=await Promise.all([i,n]);return s[0]&&s[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),s[1]?.[0]?.counts?.length||(s[1]=null),{statistics:s[0]||null,histograms:s[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let i=this.identifyPixelLocation(e,0,t.datumTransformation);if(null===i)return null;let n=0;const{maximumPyramidLevel:s}=this.rasterInfo.storageInfo;let r=s-n+this._levelOffset;const a=i.srcLocation;for(;r>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(r,i.row,i.col,t))break}catch{}if(r--,n++,i=this.identifyPixelLocation(a,n,t.datumTransformation),null===i)return null}return-1===r||null==i?null:n}async _fetchRasterInfo(e){const t=this.sourceJSON;if("Map"===this.tileType){const e=t.fullExtent||t.extent,i=Math.ceil((e.xmax-e.xmin)/t.pixelSizeX-.1),n=Math.ceil((e.ymax-e.ymin)/t.pixelSizeY-.1),s=ue.Z.fromJSON(t.spatialReference||e.spatialReference),r=new B.Z({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:s});return new be.Z({width:i,height:n,bandCount:3,extent:X.Z.fromJSON(e),spatialReference:s,pixelSize:r,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}const{signal:i}=e,n=(0,Ue.gh)(this.url,this.sourceJSON,{signal:i,query:this.ioConfig.customFetchParameters}),s=t.hasMultidimensions?this.request(`${this.url}/slices`,{query:{f:"json"},signal:i}).then((e=>e.data&&e.data.slices)).catch((()=>null)):null,r=await Promise.all([n,s]);return this._slices=r[1],r[0]}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_fixGCSShift(e){const{extent:t,spatialReference:i}=e;t.xmin>-1&&t.xmax>181&&i?.wkid&&i.isGeographic&&(e.nativeExtent=e.extent,e.transform=new Ge.Z,e.extent=e.transform.forwardTransform(t))}_computeMinMaxLOD(e,t){const{pixelSize:i}=e,n=.5/e.width*i.x,{lods:s}=t,r=t.lodAt(Math.max.apply(null,s.map((e=>e.level)))),a=t.lodAt(Math.min.apply(null,s.map((e=>e.level)))),{tileType:o}=this;if("Map"===o)return this._levelOffset=s[0].level,[r,a];if("Raster"===o)return[s.find((e=>e.resolution===i.x))??r,a];const{minScale:l,maxScale:c}=this.sourceJSON;let u=r;c>0&&(u=s.find((e=>Math.abs(e.scale-c)<n)),u||(u=s.filter((e=>e.scale>c)).sort(((e,t)=>e.scale>t.scale?1:-1))[0]??r));let h=a;return l>0&&(h=s.find((e=>Math.abs(e.scale-l)<n))??a,this._levelOffset=h.level-a.level),[u,h]}};(0,n._)([(0,h.Cb)({type:String,json:{write:!0}})],$e.prototype,"datasetFormat",void 0),(0,n._)([(0,h.Cb)()],$e.prototype,"tileType",void 0),$e=(0,n._)([(0,y.j)("esri.layers.support.rasterDatasets.ImageServerRaster")],$e);const Ve=$e;var Xe=i(48279);const Ye=new Map;Ye.set("Int8","s8"),Ye.set("UInt8","u8"),Ye.set("Int16","s16"),Ye.set("UInt16","u16"),Ye.set("Int32","s32"),Ye.set("UInt32","u32"),Ye.set("Float32","f32"),Ye.set("Float64","f32"),Ye.set("Double64","f32");const Ke=new Map;Ke.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),Ke.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),Ke.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),Ke.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"});let Qe=class extends K{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this.datasetFormat="MRF"}async open(e){await this.init(),this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const t=e?e.signal:null,i=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:n,files:s}=this._parseHeader(i.data);if(-1===this.ioConfig.skipExtensions?.indexOf("aux.xml")){const t=await this._fetchAuxiliaryData(e);null!=t&&(n.statistics=t.statistics??n.statistics,n.histograms=t.histograms,t.histograms&&null==n.statistics&&(n.statistics=(0,re.Oh)(t.histograms)))}this._set("rasterInfo",n),this._files=s;const r=await this.request(s.index,{responseType:"array-buffer",signal:t});this._storageIndex=this._parseIndex(r.data);const{blockWidth:a,blockHeight:o}=this.rasterInfo.storageInfo,l=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:c,height:u}=this.rasterInfo,h=[],f=this._getBandSegmentCount();let p=0,d=-1;for(;p<this._storageIndex.length;){d++;const e=Math.ceil(c/a/l**d)-1,t=Math.ceil(u/o/l**d)-1;p+=(e+1)*(t+1)*f*4,h.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=h,d>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=d),this.updateTileInfo()}async fetchRawTile(e,t,i,n={}){const{blockWidth:s,blockHeight:r,blockBoundary:a}=this.rasterInfo.storageInfo,o=a[e];if(!o||o.maxRow<t||o.maxCol<i||o.minRow>t||o.minCol>i)return null;const{bandCount:l,pixelType:c}=this.rasterInfo,{ranges:u,actualTileWidth:h,actualTileHeight:f}=this._getTileLocation(e,t,i);if(!u||0===u.length)return null;if(0===u[0].from&&0===u[0].to){const e=new Uint8Array(s*r);return new ne.Z({width:s,height:r,pixels:null,mask:e,validPixelCount:0})}const{bandIds:p}=this.ioConfig,d=this._getBandSegmentCount(),m=[];let y=0;for(y=0;y<d;y++)p&&!p.includes(y)||m.push(this.request(this._files.data,{range:{from:u[y].from,to:u[y].to},responseType:"array-buffer",signal:n.signal}));const g=await Promise.all(m),x=g.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),w=new Uint8Array(x);let b=0;for(y=0;y<d;y++)w.set(new Uint8Array(g[y].data),b),b+=g[y].data.byteLength;const v=Ke.get(this.rasterInfo.storageInfo.compression).decoderFormat,I=await this.decodePixelBlock(w.buffer,{width:s,height:r,format:v,planes:p?.length||l,pixelType:c});if(null==I)return null;let{noDataValue:_}=this.rasterInfo;if(null!=_&&"lerc"!==v&&!I.mask&&(_=_[0],null!=_)){const e=I.width*I.height,t=new Uint8Array(e);if(Math.abs(_)>1e24)for(y=0;y<e;y++)Math.abs((I.pixels[0][y]-_)/_)>1e-6&&(t[y]=1);else for(y=0;y<e;y++)I.pixels[0][y]!==_&&(t[y]=1);I.mask=t}let S=0,R=0;if(h!==s||f!==r){let e=I.mask;if(e)for(y=0;y<r;y++)if(R=y*s,y<f)for(S=h;S<s;S++)e[R+S]=0;else for(S=0;S<s;S++)e[R+S]=0;else for(e=new Uint8Array(s*r),I.mask=e,y=0;y<f;y++)for(R=y*s,S=0;S<h;S++)e[R+S]=1}return I}_parseIndex(e){if(e.byteLength%16>0)throw new Error("invalid array buffer must be multiples of 16");let t,i,n,s,r,a;if(Xe.f){for(i=new Uint8Array(e),s=new ArrayBuffer(e.byteLength),n=new Uint8Array(s),r=0;r<e.byteLength/4;r++)for(a=0;a<4;a++)n[4*r+a]=i[4*r+3-a];t=new Uint32Array(s)}else t=new Uint32Array(e);return t}_getBandSegmentCount(){return Ke.get(this.rasterInfo.storageInfo.compression).isOneSegment?1:this.rasterInfo.bandCount}_getTileLocation(e,t,i){const{blockWidth:n,blockHeight:s,pyramidScalingFactor:r}=this.rasterInfo.storageInfo,{width:a,height:o}=this.rasterInfo,l=this._getBandSegmentCount();let c,u,h,f=0,p=0;for(h=0;h<e;h++)p=r**h,c=Math.ceil(a/n/p),u=Math.ceil(o/s/p),f+=c*u;p=r**e,c=Math.ceil(a/n/p),u=Math.ceil(o/s/p),f+=t*c+i,f*=4*l;const d=this._storageIndex.subarray(f,f+4*l);let m=0,y=0;const g=[];for(let e=0;e<l;e++)m=d[4*e]*2**32+d[4*e+1],y=m+d[4*e+2]*2**32+d[4*e+3],g.push({from:m,to:y});return{ranges:g,actualTileWidth:i<c-1?n:Math.ceil(a/p)-n*(c-1),actualTileHeight:t<u-1?s:Math.ceil(o/p)-s*(u-1)}}_parseHeader(e){const t=Oe(e,"MRF_META/Raster");if(!t)throw new a.Z("mrf:open","not a valid MRF format");const i=Oe(t,"Size"),n=parseInt(i.getAttribute("x"),10),s=parseInt(i.getAttribute("y"),10),r=parseInt(i.getAttribute("c"),10),o=(Pe(t,"Compression")||"none").toLowerCase();if(!Ke.has(o))throw new a.Z("mrf:open","currently does not support compression "+o);const l=Pe(t,"DataType")||"UInt8",c=Ye.get(l);if(null==c)throw new a.Z("mrf:open","currently does not support pixel type "+l);const u=Oe(t,"PageSize"),h=parseInt(u.getAttribute("x"),10),f=parseInt(u.getAttribute("y"),10),p=Oe(t,"DataValues");let d,m;if(p&&(m=p.getAttribute("NoData"),null!=m&&(d=m.trim().split(" ").map((e=>parseFloat(e))))),Oe(e,"MRF_META/CachedSource"))throw new a.Z("mrf:open","currently does not support MRF referencing other data files");const y=Oe(e,"MRF_META/GeoTags"),g=Oe(y,"BoundingBox");let x,w=!1;if(null!=g){const e=parseFloat(g.getAttribute("minx")),t=parseFloat(g.getAttribute("miny")),i=parseFloat(g.getAttribute("maxx")),n=parseFloat(g.getAttribute("maxy")),s=Pe(y,"Projection")||"";let r=ue.Z.WGS84;if("LOCAL_CS[]"!==s)if(s.toLowerCase().startsWith("epsg:")){const e=Number(s.slice(5));isNaN(e)||0===e||(r=new ue.Z({wkid:e}))}else r=Be(s)??ue.Z.WGS84;else w=!0,r=new ue.Z({wkid:3857});x=new X.Z(e,t,i,n),x.spatialReference=r}else w=!0,x=new X.Z({xmin:-.5,ymin:.5-s,xmax:n-.5,ymax:.5,spatialReference:new ue.Z({wkid:3857})});const b=Oe(e,"MRF_META/Rsets"),v=parseInt(b&&b.getAttribute("scale")||"2",10),I=x.spatialReference,_=new z.Z({origin:new B.Z({x:x.xmin,y:x.ymax,spatialReference:I}),blockWidth:h,blockHeight:f,pyramidBlockWidth:h,pyramidBlockHeight:f,compression:o,pyramidScalingFactor:v}),S=new B.Z({x:x.width/n,y:x.height/s,spatialReference:I}),R=new be.Z({width:n,height:s,extent:x,isPseudoSpatialReference:w,spatialReference:I,bandCount:r,pixelType:c,pixelSize:S,noDataValue:d,storageInfo:_}),T=Pe(e,"datafile"),C=Pe(e,"IndexFile");return{rasterInfo:R,files:{mrf:this.url,index:C||this.url.replace(".mrf",".idx"),data:T||this.url.replace(".mrf",Ke.get(o).blobExtension)}}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return Je(t)}catch{return null}}};(0,n._)([(0,h.Cb)()],Qe.prototype,"_files",void 0),(0,n._)([(0,h.Cb)()],Qe.prototype,"_storageIndex",void 0),(0,n._)([(0,h.Cb)({type:String,json:{write:!0}})],Qe.prototype,"datasetFormat",void 0),Qe=(0,n._)([(0,y.j)("esri.layers.support.rasterIO.MRFRaster")],Qe);const et=Qe;var tt=i(94793),it=i(9832);const nt=(e,t)=>e.get(t)?.values,st=(e,t)=>e.get(t)?.values?.[0];let rt=class extends K{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this.datasetFormat="TIFF"}async open(e){await this.init();const t=e?e.signal:null,{data:i}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:t});if(!i)throw new a.Z("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1,this.url.lastIndexOf("."));const{littleEndian:n,firstIFDPos:s,isBigTiff:r}=(0,tt.cK)(i),l=[];await this._readIFDs(l,i,n,s,0,r?8:4,t);const{imageInfo:c,rasterInfo:u}=this._parseIFDs(l),h=(0,tt.ee)(l),f=(0,tt.I7)(l);if(this._headerInfo={littleEndian:n,isBigTiff:r,ifds:l,pyramidIFDs:h,maskIFDs:f,...c},this._set("rasterInfo",u),!c.isSupported)throw new a.Z("tiffraster:open","this tiff is not supported: "+c.message);if(!c.tileWidth)throw new a.Z("tiffraster:open","none-tiled tiff is not optimized for access, convert to COG and retry.");u.isPseudoSpatialReference&&o.Z.getLogger(this).warn("The spatial reference for this tiff is unsupported. Only EPSG spatial reference codes and Esri WKTs are supported.");const p=l[0].get("PREDICTOR")?.values?.[0],d=l[0].get("SAMPLEFORMAT")?.values?.[0];if(3===d&&2===p)throw new a.Z("tiffraster:open","unsupported horizontal difference encoding. Predictor=3 is supported for floatting point data");const{skipExtensions:m=[]}=this.ioConfig;if(!m.includes("aux.xml")){const t=await this._fetchAuxiliaryMetaData(e);null!=t&&this._processPAMInfo(t,u)}m.includes("vat.dbf")||1!==u.bandCount||"u8"!==u.pixelType||(u.attributeTable=await this._fetchAuxiliaryTable(e),null!=u.attributeTable&&(u.keyProperties.DataType="thematic")),this.updateTileInfo()}async fetchRawTile(e,t,i,n={}){if(!this._headerInfo?.isSupported||this.isBlockOutside(e,t,i))return null;const s=await this._fetchRawTiffTile(e,t,i,!1,n);if(null!=s&&this._headerInfo.hasMaskBand){const r=await this._fetchRawTiffTile(e,t,i,!0,n);null!=r&&r.pixels[0]instanceof Uint8Array&&(s.mask=r.pixels[0])}return s}_parseIFDs(e){const t=(0,tt.FI)(e),{width:i,height:n,tileWidth:s,tileHeight:r,planes:a,pixelType:o,compression:l,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidBlockWidth:h,pyramidBlockHeight:f,tileBoundary:p,affine:d,metadata:m}=t;let y=Be(t.extent.spatialReference?.wkt||t.extent.spatialReference?.wkid),g=!!t.isPseudoGeographic;null==y&&(g=!0,y=new ue.Z({wkid:3857}));const x=new X.Z({...t.extent,spatialReference:y}),w=new B.Z(x?{x:x.xmin,y:x.ymax,spatialReference:y}:{x:0,y:0}),b=new z.Z({blockWidth:s,blockHeight:r,pyramidBlockWidth:h,pyramidBlockHeight:f,compression:l,origin:w,firstPyramidLevel:c,maximumPyramidLevel:u,blockBoundary:p}),v=new B.Z({x:(x.xmax-x.xmin)/i,y:(x.ymax-x.ymin)/n,spatialReference:y}),I=m?{BandProperties:m.bandProperties,DataType:m.dataType}:{};let _=null;const S=st(e[0],"PHOTOMETRICINTERPRETATION"),R=nt(e[0],"COLORMAP");if(S<=3&&R?.length>3&&R.length%3==0){_=[];const e=R.length/3;for(let t=0;t<e;t++)_.push([t,R[t]>>>8,R[t+e]>>>8,R[t+2*e]>>>8])}const T=new be.Z({width:i,height:n,bandCount:a,pixelType:o,pixelSize:v,storageInfo:b,spatialReference:y,isPseudoSpatialReference:g,keyProperties:I,extent:x,colormap:_,statistics:m?m.statistics:null});return d?.length&&(T.nativeExtent=new X.Z({xmin:-.5,ymin:.5-n,xmax:i-.5,ymax:.5,spatialReference:y}),T.transform=new Ae.Z({polynomialOrder:1,forwardCoefficients:[d[2]+d[0]/2,d[5]-d[3]/2,d[0],d[3],-d[1],-d[4]]}),T.extent=T.transform.forwardTransform(T.nativeExtent),T.pixelSize=new B.Z({x:(x.xmax-x.xmin)/i,y:(x.ymax-x.ymin)/n,spatialReference:y}),b.origin.x=-.5,b.origin.y=.5),{imageInfo:t,rasterInfo:T}}_processPAMInfo(e,t){if(t.statistics=e.statistics??t.statistics,t.histograms=e.histograms,e.histograms&&null==t.statistics&&(t.statistics=(0,re.Oh)(e.histograms)),e.transform&&null==t.transform){t.transform=e.transform,t.nativeExtent=t.extent;const i=t.transform.forwardTransform(t.nativeExtent);t.pixelSize=new B.Z({x:(i.xmax-i.xmin)/t.width,y:(i.ymax-i.ymin)/t.height,spatialReference:t.spatialReference}),t.extent=i}t.isPseudoSpatialReference&&e.spatialReference&&(t.spatialReference=e.spatialReference,t.extent.spatialReference=t.nativeExtent.spatialReference=t.storageInfo.origin.spatialReference=t.spatialReference)}async _readIFDs(e,t,i,n,s,r=4,a){if(!n)return null;(n>=t.byteLength||n<0)&&(t=(await this.request(this.url,{range:{from:n+s,to:n+s+this._bufferSize},responseType:"array-buffer",signal:a})).data,s=n+s,n=0);const o=await this._readIFD(t,i,n,s,it.Z.tiffTags,r,a);if(e.push(o.ifd),!o.nextIFD)return null;await this._readIFDs(e,t,i,o.nextIFD-s,s,r,a)}async _readIFD(e,t,i,n,s=it.Z.tiffTags,r=4,a){if(!e)return null;const o=(0,tt.vr)(e,t,i,n,s,r);if(o.success){const i=[];if(o.ifd?.forEach((e=>{e.values||i.push(e)})),i.length>0){const s=i.map((e=>e.offlineOffsetSize)).filter(p.pC),r=Math.min.apply(null,s.map((e=>e[0])));if(Math.min.apply(null,s.map((e=>e[0]+e[1])))-r<=this._bufferSize){const{data:s}=await this.request(this.url,{range:{from:r,to:r+this._bufferSize},responseType:"array-buffer",signal:a});e=s,n=r,i.forEach((i=>(0,tt.Dq)(e,t,i,n)))}}if(o.ifd?.has("GEOKEYDIRECTORY")){const i=o.ifd.get("GEOKEYDIRECTORY"),s=i?.values;if(s&&s.length>4){const r=s[0]+"."+s[1]+"."+s[2],o=await this._readIFD(e,t,i.valueOffset+6-n,n,it.Z.geoKeys,2,a);i.data=o.ifd,i.data&&i.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[r]})}}return o}if(o.requiredBufferSize&&o.requiredBufferSize!==e.byteLength){const i=await this.request(this.url,{range:{from:n,to:n+o.requiredBufferSize+4},responseType:"array-buffer",signal:a});return(e=i.data).byteLength<o.requiredBufferSize?null:this._readIFD(e,t,0,n,it.Z.tiffTags,4,a)}}async _fetchRawTiffTile(e,t,i,n,s={}){const r=this._getTileLocation(e,t,i,n);if(!r)return null;const{ranges:a,actualTileWidth:o,actualTileHeight:l,ifd:c}=r,u=a.map((e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:s.signal}))),h=await Promise.all(u),f=h.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),p=1===h.length?h[0].data:new ArrayBuffer(f),d=[0],m=[0];if(h.length>1){const e=new Uint8Array(p);for(let t=0,i=0;t<h.length;t++){const n=h[t].data;e.set(new Uint8Array(n),i),d[t]=i,i+=n.byteLength,m[t]=n.byteLength}}const{blockWidth:y,blockHeight:g}=this.getBlockWidthHeight(e),x=await this.decodePixelBlock(p,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:c,offsets:d,sizes:m},width:y,height:g,planes:null,pixelType:null});if(null==x)return null;let w,b,v;if(o!==y||l!==g){let e=x.mask;if(e)for(w=0;w<g;w++)if(v=w*y,w<l)for(b=o;b<y;b++)e[v+b]=0;else for(b=0;b<y;b++)e[v+b]=0;else for(e=new Uint8Array(y*g),x.mask=e,w=0;w<l;w++)for(v=w*y,b=0;b<o;b++)e[v+b]=1}return x}_getTileLocation(e,t,i,n=!1){const{firstPyramidLevel:s,blockBoundary:r}=this.rasterInfo.storageInfo,a=0===e?0:e-(s-1),{_headerInfo:o}=this;if(!o)return null;const l=n?o.maskIFDs[a]:0===a?o?.ifds[0]:o?.pyramidIFDs[a-1];if(!l)return null;const c=(0,tt.If)(l,o),u=nt(l,"TILEOFFSETS");if(void 0===u)return null;const h=nt(l,"TILEBYTECOUNTS"),{minRow:f,minCol:p,maxRow:d,maxCol:m}=r[a];if(t>d||i>m||t<f||i<p)return null;const y=st(l,"IMAGEWIDTH"),g=st(l,"IMAGELENGTH"),x=st(l,"TILEWIDTH"),w=st(l,"TILELENGTH"),b=[];if(c){const{bandCount:e}=this.rasterInfo;for(let n=0;n<e;n++){const e=n*(d+1)*(m+1)+t*(m+1)+i;b[n]={from:u[e],to:u[e]+h[e]-1}}}else{const e=t*(m+1)+i;b.push({from:u[e],to:u[e]+h[e]-1})}for(let e=0;e<b.length;e++)if(null==b[e].from||!b[e].to||b[e].to<0)return null;return{ranges:b,ifd:l,actualTileWidth:i===m&&y%x||x,actualTileHeight:t===d&&g%w||w}}async _fetchAuxiliaryMetaData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return Je(t)}catch{return null}}async _fetchAuxiliaryTable(e){try{const{data:t}=await this.request(this.url+".vat.dbf",{responseType:"array-buffer",signal:e?.signal}),i=_e.parse(t);return i?.recordSet?Q.Z.fromJSON(i.recordSet):null}catch{return null}}};(0,n._)([(0,h.Cb)()],rt.prototype,"_files",void 0),(0,n._)([(0,h.Cb)()],rt.prototype,"_headerInfo",void 0),(0,n._)([(0,h.Cb)()],rt.prototype,"_bufferSize",void 0),(0,n._)([(0,h.Cb)({type:String,json:{write:!0}})],rt.prototype,"datasetFormat",void 0),rt=(0,n._)([(0,y.j)("esri.layers.support.rasterDatasets.TIFFRaster")],rt);const at=rt,ot=new Map;ot.set("CRF",{desc:"Cloud Raster Format",constructor:Ce}),ot.set("MRF",{desc:"Meta Raster Format",constructor:et}),ot.set("TIFF",{desc:"GeoTIFF",constructor:at}),ot.set("RasterTileServer",{desc:"Raster Tile Server",constructor:Ve}),ot.set("JPG",{desc:"JPG Raster Format",constructor:He}),ot.set("PNG",{desc:"PNG Raster Format",constructor:He}),ot.set("GIF",{desc:"GIF Raster Format",constructor:He}),ot.set("BMP",{desc:"BMP Raster Format",constructor:He});class lt{static get supportedFormats(){const e=new Set;return ot.forEach(((t,i)=>e.add(i))),e}static async open(e){const{url:t,ioConfig:i,sourceJSON:n}=e;let s=e.datasetFormat;null==s&&t.lastIndexOf(".")&&(s=t.slice(t.lastIndexOf(".")+1).toUpperCase()),"OVR"===s||"TIF"===s?s="TIFF":"JPG"!==s&&"JPEG"!==s&&"JFIF"!==s||(s="JPG"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(s="RasterTileServer");const r={url:t,sourceJSON:n,datasetFormat:s,ioConfig:i??{bandIds:null,sampling:null}};let o,l;if(s&&this.supportedFormats.has(s)){if("CRF"===s&&!i?.enableCRF)throw new a.Z("rasterfactory:open",`cannot open raster: ${t}`);return o=ot.get(s).constructor,l=new o(r),await l.open({signal:e.signal}),l}if(s)throw new a.Z("rasterfactory:open","not a supported format "+s);const c=Array.from(ot.keys());let u=0;const h=()=>(s=c[u++],s&&("CRF"!==s||i?.enableCRF)?(o=ot.get(s).constructor,l=new o(r),l.open({signal:e.signal}).then((()=>l)).catch((()=>h()))):null);return h()}static register(e,t,i){ot.has(e.toUpperCase())||ot.set(e.toUpperCase(),{desc:t,constructor:i})}}var ct=i(32163),ut=i(12259);let ht=class extends((0,w.h)((0,ye.M)((0,pe.q)((0,de.I)((0,b.N)(fe((0,ge.n)((0,x.Y)((0,me.Q)((0,l.R)((0,r.J)(g.Z)))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.bandIds=null,this.interpolation=null,this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null,this._debouncedSaveOperations=(0,c.Ds)((async(e,t,n)=>{const{save:s,saveAs:r}=await i.e(4697).then(i.bind(i,64697));switch(e){case ut.x.SAVE:return s(this,t);case ut.x.SAVE_AS:return r(this,n,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(c.r9).then((()=>this._openRaster(t)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[new xe.Z({name:"Raster.ServicePixelValue",alias:"Pixel Value",domain:null,editable:!1,length:50,type:"string"}),new xe.Z({name:"Raster.ServicePixelValue.Raw",alias:"Raw Pixel Value",domain:null,editable:!1,length:50,type:"string"})],{rasterInfo:t}=this,i=t?.attributeTable,n=null!=i?i.fields:null;if(n){const t=n.filter((e=>"oid"!==e.type&&"value"!==e.name.toLowerCase())).map((e=>{const t=e.clone();return t.name="Raster."+e.name,t}));e.push(...t)}const s=t?.dataType,r=t?.multidimensionalInfo;if(("vector-magdir"===s||"vector-uv"===s)&&null!=r){const t=r.variables[0].unit?.trim(),i="Magnitude"+(t?` (${t})`:"");e.push(new xe.Z({name:"Raster.Magnitude",alias:i,domain:null,editable:!1,type:"double"})),e.push(new xe.Z({name:"Raster.Direction",alias:"Direction (°)",domain:null,editable:!1,type:"double"}))}return e}createPopupTemplate(e){const{rasterFields:t}=this,i=new Set(t.map((({name:e})=>e)).filter((e=>"raster.servicepixelvalue.raw"!==e.toLowerCase())));return(0,ct.eZ)({fields:t,title:this.title},{...e,visibleFieldNames:i})}async generateRasterInfo(e,t){if(!(e=(0,f.TJ)(M.Z,e)))return this.rasterInfo;try{const i={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach((e=>i[e.url]=e));const n=(0,se.Ue)(e.functionDefinition?.toJSON()??e.toJSON(),i),s=new te({rasterFunction:n});return await s.open(t),s.rasterInfo}catch(e){if(e instanceof a.Z)throw e;throw new a.Z("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(ut.x.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(ut.x.SAVE_AS,t,e)}write(e,t){const i=this._primaryRasters[0]??this.raster;if(this.loaded?"RasterTileServer"===i.datasetFormat&&("Raster"===i.tileType||"Map"===i.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,t);if(t&&t.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new a.Z("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){let t=!1;if(this.raster)this.raster.rasterInfo||await this.raster.open(),"Function"===this.raster.datasetFormat?(t=!0,this._primaryRasters=this.raster.primaryRasters.rasters):this._primaryRasters=[this.raster],this.url=this.raster.url;else{const{rasterFunction:t}=this,i=[this.url];t&&(0,se.G8)(t.toJSON(),i);const n=await Promise.all(i.map((t=>lt.open({url:t,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:e})))),s=n.findIndex((e=>null==e));if(s>-1)throw new a.Z("imagery-tile-layer:open",`cannot open raster: ${i[s]}`);if(this._primaryRasters=n,t){const e={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach((t=>e[t.url]=t));const i=(0,se.Ue)(t.functionDefinition?.toJSON()??t.toJSON(),e),s=new te({rasterFunction:i});try{await s.open(),this.raster=s}catch(e){const t=o.Z.getLogger(this);e instanceof a.Z&&t.error("imagery-tile-layer:open",e.message),t.warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=n[0]}}else this.raster=n[0]}const i=this.raster.rasterInfo;if(!i)throw new a.Z("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("rasterInfo",t?i:this._primaryRasters[0].rasterInfo),this._set("spatialReference",i.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.rasterInfo.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles((0,u.YP)((()=>this.customParameters),(e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)})))}};(0,n._)([(0,h.Cb)({clonable:!1})],ht.prototype,"_primaryRasters",void 0),(0,n._)([(0,h.Cb)({type:[f.z8],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],ht.prototype,"bandIds",void 0),(0,n._)([(0,h.Cb)({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),(0,m.J)(we.cl)],ht.prototype,"interpolation",void 0),(0,n._)([(0,h.Cb)(T.rn)],ht.prototype,"legendEnabled",void 0),(0,n._)([(0,h.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],ht.prototype,"isReference",void 0),(0,n._)([(0,h.Cb)({type:["show","hide"]})],ht.prototype,"listMode",void 0),(0,n._)([(0,h.Cb)({json:{read:!0,write:!0}})],ht.prototype,"blendMode",void 0),(0,n._)([(0,h.Cb)()],ht.prototype,"sourceJSON",void 0),(0,n._)([(0,h.Cb)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],ht.prototype,"version",void 0),(0,n._)([(0,h.Cb)({readOnly:!0,json:{read:!1}})],ht.prototype,"type",void 0),(0,n._)([(0,h.Cb)({type:["ArcGISTiledImageServiceLayer"]})],ht.prototype,"operationalLayerType",void 0),(0,n._)([(0,h.Cb)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,i){t[i]=!e}}}})],ht.prototype,"popupEnabled",void 0),(0,n._)([(0,h.Cb)({type:s.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],ht.prototype,"popupTemplate",void 0),(0,n._)([(0,h.Cb)({readOnly:!0})],ht.prototype,"defaultPopupTemplate",null),(0,n._)([(0,h.Cb)({readOnly:!0,type:[xe.Z]})],ht.prototype,"fields",void 0),(0,n._)([(0,h.Cb)({readOnly:!0,type:[xe.Z]})],ht.prototype,"rasterFields",null),ht=(0,n._)([(0,y.j)("esri.layers.ImageryTileLayer")],ht);const ft=ht},39450:(e,t,i)=>{i.d(t,{Z:()=>u});var n,s=i(43697),r=i(96674),a=i(5600),o=i(75215),l=(i(67676),i(80442),i(52011));let c=n=class extends r.wq{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new n({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,s._)([(0,a.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"cols",void 0),(0,s._)([(0,a.Cb)({type:o.z8,json:{write:!0}})],c.prototype,"level",void 0),(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],c.prototype,"levelValue",void 0),(0,s._)([(0,a.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"origin",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"resolution",void 0),(0,s._)([(0,a.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"rows",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"scale",void 0),c=n=(0,s._)([(0,l.j)("esri.layers.support.LOD")],c);const u=c},11145:(e,t,i)=>{i.d(t,{Z:()=>S});var n,s=i(43697),r=i(35454),a=i(96674),o=i(67900),l=i(5600),c=i(75215),u=(i(67676),i(80442),i(71715)),h=i(52011),f=i(30556),p=i(94139),d=i(82971),m=i(24470),y=i(8744),g=i(40488),x=i(39450),w=i(43077);const b=new r.X({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let v=n=class extends a.wq{static create(e={}){const{resolutionFactor:t=1,scales:i,size:s=256,spatialReference:r=d.Z.WebMercator,numLODs:a=24}=e;if(!(0,y.JY)(r)){const e=[];if(i)for(let t=0;t<i.length;t++){const n=i[t];e.push(new x.Z({level:t,scale:n,resolution:n}))}else{let t=5e-4;for(let i=a-1;i>=0;i--)e.unshift(new x.Z({level:i,scale:t,resolution:t})),t*=2}return new n({dpi:96,lods:e,origin:new p.Z(0,0,r),size:[s,s],spatialReference:r})}const l=(0,y.C5)(r),c=e.origin?new p.Z({x:e.origin.x,y:e.origin.y,spatialReference:r}):new p.Z(l?{x:l.origin[0],y:l.origin[1],spatialReference:r}:{x:0,y:0,spatialReference:r}),u=1/(39.37*(0,o.c9)(r)*96),h=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],n=t*u;h.push(new x.Z({level:e,scale:t,resolution:n}))}else{let e=(0,y.sT)(r)?512/s*591657527.5917094:256/s*591657527.591555;const i=Math.ceil(a/t);h.push(new x.Z({level:0,scale:e,resolution:e*u}));for(let n=1;n<i;n++){const i=e/2**t,s=i*u;h.push(new x.Z({level:n,scale:i,resolution:s})),e=i}}return new n({dpi:96,lods:h,origin:c,size:[s,s],spatialReference:r})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,y.C5)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return p.Z.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const n=[],s=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach((e=>{n.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,s[e.level]=e}))),this._set("scales",n),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),n=i+1;return t[i]/(t[i]/t[n])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let n=0;for(;n<i;n++){const i=t[n],s=t[n+1];if(i<=e)return n;if(s===e)return n+1;if(i>e&&s<e)return n+Math.log(i/e)/Math.log(i/s)}return n}snapScale(e,t=.95){const i=this.scaleToZoom(e);return i%Math.floor(i)>=t?this.zoomToScale(Math.ceil(i)):this.zoomToScale(Math.floor(i))}tileAt(e,t,i,n){const s=this.lodAt(e);if(!s)return null;let r,a;if("number"==typeof t)r=t,a=i;else if((0,y.fS)(t.spatialReference,this.spatialReference))r=t.x,a=t.y,n=i;else{const e=(0,g.iV)(t,this.spatialReference);if(null==e)return null;r=e.x,a=e.y,n=i}const o=s.resolution*this.size[0],l=s.resolution*this.size[1];return n||(n=new w.f(null,0,0,0,(0,m.Ue)())),n.level=e,n.row=Math.floor((this.origin.y-a)/l+.001),n.col=Math.floor((r-this.origin.x)/o+.001),this.updateTileInfo(n),n}updateTileInfo(e,t=n.ExtrapolateOptions.NONE){let i=this.lodAt(e.level);if(!i&&t===n.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return;const s=e.level-i.level,r=i.resolution*this.size[0]/2**s,a=i.resolution*this.size[1]/2**s;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,m.Ue)()),e.extent[0]=this.origin.x+e.col*r,e.extent[1]=this.origin.y-(e.row+1)*a,e.extent[2]=e.extent[0]+r,e.extent[3]=e.extent[1]+a}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const i=this.lodAt(t.level);if(null==i)return null;const{resolution:n}=i,s=n*this.size[0],r=n*this.size[1];return e[0]=this.origin.x+t.col*s,e[1]=this.origin.y-(t.row+1)*r,e[2]=e[0]+s,e[3]=e[1]+r,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return n.fromJSON(this.write({}))}getOrCreateCompatible(e,t){if(256===this.size[0]&&256===this.size[1])return 256===e?this:null;const i=[],s=this.lods.length;for(let e=0;e<s;e++){const n=this.lods[e],s=n.resolution*t;i.push(new x.Z({level:n.level,scale:n.scale,resolution:s}))}return new n({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const n=e[i];this._upsampleLevels[n.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/n.resolution:0},t=n}}};var I,_;(0,s._)([(0,l.Cb)({type:Number,json:{write:!0}})],v.prototype,"compressionQuality",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{write:!0}})],v.prototype,"dpi",void 0),(0,s._)([(0,l.Cb)({type:String,json:{read:b.read,write:b.write,origins:{"web-scene":{read:!1,write:!1}}}})],v.prototype,"format",void 0),(0,s._)([(0,l.Cb)({readOnly:!0})],v.prototype,"isWrappable",null),(0,s._)([(0,l.Cb)({type:p.Z,json:{write:!0}})],v.prototype,"origin",void 0),(0,s._)([(0,u.r)("origin")],v.prototype,"readOrigin",null),(0,s._)([(0,l.Cb)({type:[x.Z],value:null,json:{write:!0}})],v.prototype,"lods",null),(0,s._)([(0,l.Cb)({readOnly:!0})],v.prototype,"scales",void 0),(0,s._)([(0,l.Cb)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],v.prototype,"size",void 0),(0,s._)([(0,u.r)("size",["rows","cols"])],v.prototype,"readSize",null),(0,s._)([(0,f.c)("size",{cols:{type:c.z8},rows:{type:c.z8}})],v.prototype,"writeSize",null),(0,s._)([(0,l.Cb)({type:d.Z,json:{write:!0}})],v.prototype,"spatialReference",void 0),v=n=(0,s._)([(0,h.j)("esri.layers.support.TileInfo")],v),I=v||(v={}),(_=I.ExtrapolateOptions||(I.ExtrapolateOptions={}))[_.NONE=0]="NONE",_[_.POWER_OF_TWO=1]="POWER_OF_TWO";const S=v},43077:(e,t,i)=>{i.d(t,{f:()=>n});class n{constructor(e,t,i,n,s=void 0){this.id=e,this.level=t,this.row=i,this.col=n,this.extent=s}}},28589:(e,t,i)=>{i.d(t,{y:()=>S});var n,s=i(43697),r=i(3172),a=i(92036),o=i(91303),l=i(20102),c=i(50758),u=i(13867),h=i(44553),f=i(95330),p=i(17445),d=i(1654),m=i(17452),y=i(5600),g=(i(75215),i(67676)),x=(i(80442),i(52011)),w=i(43077),b=i(22974),v=i(1533);class I{constructor(e){this._validateJSON(e);const{location:t,data:i}=e;this.location=Object.freeze((0,b.d9)(t));const n=this.location.width,s=this.location.height;let r=!0,a=!0;const o=function(e,t=!1){return e<=v.c8?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(n*s/32));let l=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(a=!1,o[l]|=1<<t):r=!1,31===t&&++l}a?(this._availability="unavailable",this.byteSize=40):r?(this._availability="available",this.byteSize=40):(this._availability=o,this.byteSize=40+(0,v.Xw)(o))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),n=i%32,s=i>>5,r=this._availability;return s<0||s>r.length?"unknown":r[s]&1<<n?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||r.Z,{row:n,col:s,width:a,height:o}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then((e=>e.data)).catch((e=>{if(e&&e.details&&422===e.details.httpStatus)return{location:{top:n,left:s,width:a,height:o},valid:!0,data:(0,g.a9)(a*o,0)};throw e})).then((e=>{if(e.location&&(e.location.top!==n||e.location.left!==s||e.location.width!==a||e.location.height!==o))throw new l.Z("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:n,left:s,width:a,height:o}});return I.fromJSON(e)}))}static fromJSON(e){return Object.freeze(new I(e))}_validateJSON(e){if(!e||!e.location)throw new l.Z("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new l.Z("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new l.Z("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new l.Z("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new l.Z("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}}function _(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}let S=n=class extends a.Z{constructor(e){super(e),this._pendingTilemapRequests={},this.request=r.Z,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new u.z(2*o.Y.MEGABYTES),this.addHandles([(0,p.YP)((()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]}),(()=>this._initializeTilemapDefinition()),p.nn)])}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}fetchTilemap(e,t,i,n){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new l.Z("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const s=this._tmpTilemapDefinition,r=this._tilemapFromCache(e,t,i,s);if(r)return Promise.resolve(r);const a=n&&n.signal;return n={...n,signal:null},new Promise(((e,t)=>{(0,f.fu)(a,(()=>t((0,f.zE)())));const i=_(s);let r=this._pendingTilemapRequests[i];if(!r){r=I.fromDefinition(s,n).then((e=>(this._tilemapCache.put(i,e,e.byteSize),e)));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=r,r.then(e,e)}r.then(e,t)}))}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const n=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return n?n.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,n){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(new l.Z("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})):this.fetchTilemap(e,t,i,n).catch((e=>e)).then((n=>{if(n instanceof I){const s=n.getAvailability(t,i);if("unavailable"===s)throw new l.Z("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return s}if((0,f.D_)(n))throw n;return"unknown"}))}fetchAvailabilityUpsample(e,t,i,n,s){n.level=e,n.row=t,n.col=i;const r=this.layer.tileInfo;r.updateTileInfo(n);const a=this.fetchAvailability(e,t,i,s).catch((e=>{if((0,f.D_)(e))throw e;if(r.upsampleTile(n))return this.fetchAvailabilityUpsample(n.level,n.row,n.col,n,s);throw e}));return this._fetchAvailabilityUpsamplePrefetch(n.id,e,t,i,s,a),a}async _fetchAvailabilityUpsamplePrefetch(e,t,i,s,r,a){if(!this._prefetchingEnabled||null==e)return;const o=`prefetch-${e}`;if(this.hasHandles(o))return;const l=new AbortController;a.then((()=>l.abort()),(()=>l.abort()));let u=!1;const h=(0,c.kB)((()=>{u||(u=!0,l.abort())}));if(this.addHandles(h,o),await(0,d.MU)(10,l.signal).catch((()=>{})),u||(u=!0,this.removeHandles(o)),(0,f.Hc)(l))return;const p=new w.f(e,t,i,s),m={...r,signal:l.signal},y=this.layer.tileInfo;for(let e=0;n._prefetches.length<n._maxPrefetch&&y.upsampleTile(p);++e){const e=this.fetchAvailability(p.level,p.row,p.col,m);n._prefetches.push(e);const t=()=>{n._prefetches.removeUnordered(e)};e.then(t,t)}}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,m.B7)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,n){n.level=e,n.row=t-t%this.size,n.col=i-i%this.size;const s=_(n);return this._tilemapCache.get(s)}get test(){const e=this;return{get prefetchingEnabled(){return e._prefetchingEnabled},set prefetchingEnabled(t){e._prefetchingEnabled=t},hasTilemap:(t,i,n)=>!!e._tilemapFromCache(t,i,n,e._tmpTilemapDefinition)}}};S._maxPrefetch=4,S._prefetches=new h.Z({initialSize:n._maxPrefetch}),(0,s._)([(0,y.Cb)({constructOnly:!0})],S.prototype,"layer",void 0),(0,s._)([(0,y.Cb)({constructOnly:!0})],S.prototype,"minLOD",void 0),(0,s._)([(0,y.Cb)({constructOnly:!0})],S.prototype,"maxLOD",void 0),(0,s._)([(0,y.Cb)({constructOnly:!0})],S.prototype,"request",void 0),(0,s._)([(0,y.Cb)({constructOnly:!0})],S.prototype,"size",void 0),S=n=(0,s._)([(0,x.j)("esri.layers.support.TilemapCache")],S)},11282:(e,t,i)=>{i.d(t,{cv:()=>o,en:()=>a,lA:()=>r}),i(68773),i(40330);var n=i(22974),s=i(17452);function r(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function a(e){return"string"==typeof e?(0,s.mN)(e):(0,n.d9)(e)}function o(e,t,i){const n={};for(const s in e){if("declaredClass"===s)continue;const r=e[s];if(null!=r&&"function"!=typeof r)if(Array.isArray(r)){n[s]=[];for(let e=0;e<r.length;e++)n[s][e]=o(r[e])}else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(i&&i[s]);n[s]=t?e:JSON.stringify(e)}else n[s]=t?r:JSON.stringify(r);else n[s]=r}return n}i(71058)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1161],{21787:(t,e,o)=>{o.d(e,{a:()=>u,d:()=>a,f:()=>r,i:()=>d,m:()=>c,n:()=>l,s:()=>s,t:()=>i});var n=o(46851);function r(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function s(t,e,o,n,r,s,i,a,u,c){return t[0]=e,t[1]=o,t[2]=n,t[3]=r,t[4]=s,t[5]=i,t[6]=a,t[7]=u,t[8]=c,t}function i(t,e){if(t===e){const o=e[1],n=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=o,t[5]=e[7],t[6]=n,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function a(t,e){const o=e[0],n=e[1],r=e[2],s=e[3],i=e[4],a=e[5],u=e[6],c=e[7],l=e[8],p=l*i-a*c,d=-l*s+a*u,f=c*s-i*u;let y=o*p+n*d+r*f;return y?(y=1/y,t[0]=p*y,t[1]=(-l*n+r*c)*y,t[2]=(a*n-r*i)*y,t[3]=d*y,t[4]=(l*o-r*u)*y,t[5]=(-a*o+r*s)*y,t[6]=f*y,t[7]=(-c*o+n*u)*y,t[8]=(i*o-n*s)*y,t):null}function u(t,e){const o=e[0],n=e[1],r=e[2],s=e[3],i=e[4],a=e[5],u=e[6],c=e[7],l=e[8];return t[0]=i*l-a*c,t[1]=r*c-n*l,t[2]=n*a-r*i,t[3]=a*u-s*l,t[4]=o*l-r*u,t[5]=r*s-o*a,t[6]=s*c-i*u,t[7]=n*u-o*c,t[8]=o*i-n*s,t}function c(t,e,o){const n=e[0],r=e[1],s=e[2],i=e[3],a=e[4],u=e[5],c=e[6],l=e[7],p=e[8],d=o[0],f=o[1],y=o[2],h=o[3],b=o[4],g=o[5],m=o[6],M=o[7],w=o[8];return t[0]=d*n+f*i+y*c,t[1]=d*r+f*a+y*l,t[2]=d*s+f*u+y*p,t[3]=h*n+b*i+g*c,t[4]=h*r+b*a+g*l,t[5]=h*s+b*u+g*p,t[6]=m*n+M*i+w*c,t[7]=m*r+M*a+w*l,t[8]=m*s+M*u+w*p,t}function l(t,e){const o=e[0],n=e[1],r=e[2],s=e[3],i=e[4],a=e[5],u=e[6],c=e[7],l=e[8],p=e[9],d=e[10],f=e[11],y=e[12],h=e[13],b=e[14],g=e[15],m=o*a-n*i,M=o*u-r*i,w=o*c-s*i,C=n*u-r*a,S=n*c-s*a,v=r*c-s*u,I=l*h-p*y,E=l*b-d*y,T=l*g-f*y,U=p*b-d*h,A=p*g-f*h,x=d*g-f*b;let _=m*x-M*A+w*U+C*T-S*E+v*I;return _?(_=1/_,t[0]=(a*x-u*A+c*U)*_,t[1]=(u*T-i*x-c*E)*_,t[2]=(i*A-a*T+c*I)*_,t[3]=(r*A-n*x-s*U)*_,t[4]=(o*x-r*T+s*E)*_,t[5]=(n*T-o*A-s*I)*_,t[6]=(h*v-b*S+g*C)*_,t[7]=(b*w-y*v-g*M)*_,t[8]=(y*S-h*w+g*m)*_,t):null}function p(t,e,o){return t[0]=e[0]-o[0],t[1]=e[1]-o[1],t[2]=e[2]-o[2],t[3]=e[3]-o[3],t[4]=e[4]-o[4],t[5]=e[5]-o[5],t[6]=e[6]-o[6],t[7]=e[7]-o[7],t[8]=e[8]-o[8],t}function d(t){const e=(0,n.g)(),o=t[0],r=t[1],s=t[2],i=t[3],a=t[4],u=t[5],c=t[6],l=t[7],p=t[8];return Math.abs(1-(o*o+i*i+c*c))<=e&&Math.abs(1-(r*r+a*a+l*l))<=e&&Math.abs(1-(s*s+u*u+p*p))<=e}const f=c,y=p;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,o){return t[0]=e[0]+o[0],t[1]=e[1]+o[1],t[2]=e[2]+o[2],t[3]=e[3]+o[3],t[4]=e[4]+o[4],t[5]=e[5]+o[5],t[6]=e[6]+o[6],t[7]=e[7]+o[7],t[8]=e[8]+o[8],t},adjoint:u,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},determinant:function(t){const e=t[0],o=t[1],n=t[2],r=t[3],s=t[4],i=t[5],a=t[6],u=t[7],c=t[8];return e*(c*s-i*u)+o*(-c*r+i*a)+n*(u*r-s*a)},equals:function(t,e){const o=t[0],r=t[1],s=t[2],i=t[3],a=t[4],u=t[5],c=t[6],l=t[7],p=t[8],d=e[0],f=e[1],y=e[2],h=e[3],b=e[4],g=e[5],m=e[6],M=e[7],w=e[8],C=(0,n.g)();return Math.abs(o-d)<=C*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(r-f)<=C*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(s-y)<=C*Math.max(1,Math.abs(s),Math.abs(y))&&Math.abs(i-h)<=C*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(a-b)<=C*Math.max(1,Math.abs(a),Math.abs(b))&&Math.abs(u-g)<=C*Math.max(1,Math.abs(u),Math.abs(g))&&Math.abs(c-m)<=C*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(l-M)<=C*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(p-w)<=C*Math.max(1,Math.abs(p),Math.abs(w))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromMat4:r,fromQuat:function(t,e){const o=e[0],n=e[1],r=e[2],s=e[3],i=o+o,a=n+n,u=r+r,c=o*i,l=n*i,p=n*a,d=r*i,f=r*a,y=r*u,h=s*i,b=s*a,g=s*u;return t[0]=1-p-y,t[3]=l-g,t[6]=d+b,t[1]=l+g,t[4]=1-c-y,t[7]=f-h,t[2]=d-b,t[5]=f+h,t[8]=1-c-p,t},fromRotation:function(t,e){const o=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=o,t[2]=0,t[3]=-o,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:a,isOrthoNormal:d,mul:f,multiply:c,multiplyScalar:function(t,e,o){return t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t[3]=e[3]*o,t[4]=e[4]*o,t[5]=e[5]*o,t[6]=e[6]*o,t[7]=e[7]*o,t[8]=e[8]*o,t},multiplyScalarAndAdd:function(t,e,o,n){return t[0]=e[0]+o[0]*n,t[1]=e[1]+o[1]*n,t[2]=e[2]+o[2]*n,t[3]=e[3]+o[3]*n,t[4]=e[4]+o[4]*n,t[5]=e[5]+o[5]*n,t[6]=e[6]+o[6]*n,t[7]=e[7]+o[7]*n,t[8]=e[8]+o[8]*n,t},normalFromMat4:l,normalFromMat4Legacy:function(t,e){const o=e[0],n=e[1],r=e[2],s=e[4],i=e[5],a=e[6],u=e[8],c=e[9],l=e[10],p=l*i-a*c,d=-l*s+a*u,f=c*s-i*u,y=o*p+n*d+r*f;if(!y)return null;const h=1/y;return t[0]=p*h,t[1]=(-l*n+r*c)*h,t[2]=(a*n-r*i)*h,t[3]=d*h,t[4]=(l*o-r*u)*h,t[5]=(-a*o+r*s)*h,t[6]=f*h,t[7]=(-c*o+n*u)*h,t[8]=(i*o-n*s)*h,t},projection:function(t,e,o){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/o,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,e,o){const n=e[0],r=e[1],s=e[2],i=e[3],a=e[4],u=e[5],c=e[6],l=e[7],p=e[8],d=Math.sin(o),f=Math.cos(o);return t[0]=f*n+d*i,t[1]=f*r+d*a,t[2]=f*s+d*u,t[3]=f*i-d*n,t[4]=f*a-d*r,t[5]=f*u-d*s,t[6]=c,t[7]=l,t[8]=p,t},scale:function(t,e,o){const n=o[0],r=o[1],s=o[2];return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=s*e[6],t[7]=s*e[7],t[8]=s*e[8],t},scaleByVec2:function(t,e,o){const n=o[0],r=o[1];return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t},set:s,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:y,subtract:p,translate:function(t,e,o){const n=e[0],r=e[1],s=e[2],i=e[3],a=e[4],u=e[5],c=e[6],l=e[7],p=e[8],d=o[0],f=o[1];return t[0]=n,t[1]=r,t[2]=s,t[3]=i,t[4]=a,t[5]=u,t[6]=d*n+f*i+c,t[7]=d*r+f*a+l,t[8]=d*s+f*u+p,t},transpose:i},Symbol.toStringTag,{value:"Module"}))},51305:(t,e,o)=>{o.d(e,{a:()=>f,c:()=>b,g:()=>l,j:()=>A,k:()=>h,m:()=>p,s:()=>c});var n=o(46521),r=o(94961),s=o(65617),i=o(46851),a=o(17896),u=o(98766);function c(t,e,o){o*=.5;const n=Math.sin(o);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(o),t}function l(t,e){const o=2*Math.acos(e[3]),n=Math.sin(o/2);return n>(0,i.g)()?(t[0]=e[0]/n,t[1]=e[1]/n,t[2]=e[2]/n):(t[0]=1,t[1]=0,t[2]=0),o}function p(t,e,o){const n=e[0],r=e[1],s=e[2],i=e[3],a=o[0],u=o[1],c=o[2],l=o[3];return t[0]=n*l+i*a+r*c-s*u,t[1]=r*l+i*u+s*a-n*c,t[2]=s*l+i*c+n*u-r*a,t[3]=i*l-n*a-r*u-s*c,t}function d(t,e,o,n){const r=e[0],s=e[1],a=e[2],u=e[3];let c,l,p,d,f,y=o[0],h=o[1],b=o[2],g=o[3];return l=r*y+s*h+a*b+u*g,l<0&&(l=-l,y=-y,h=-h,b=-b,g=-g),1-l>(0,i.g)()?(c=Math.acos(l),p=Math.sin(c),d=Math.sin((1-n)*c)/p,f=Math.sin(n*c)/p):(d=1-n,f=n),t[0]=d*r+f*y,t[1]=d*s+f*h,t[2]=d*a+f*b,t[3]=d*u+f*g,t}function f(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function y(t,e){const o=e[0]+e[4]+e[8];let n;if(o>0)n=Math.sqrt(o+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{let o=0;e[4]>e[0]&&(o=1),e[8]>e[3*o+o]&&(o=2);const r=(o+1)%3,s=(o+2)%3;n=Math.sqrt(e[3*o+o]-e[3*r+r]-e[3*s+s]+1),t[o]=.5*n,n=.5/n,t[3]=(e[3*r+s]-e[3*s+r])*n,t[r]=(e[3*r+o]+e[3*o+r])*n,t[s]=(e[3*s+o]+e[3*o+s])*n}return t}function h(t,e,o,n){const r=.5*Math.PI/180;e*=r,o*=r,n*=r;const s=Math.sin(e),i=Math.cos(e),a=Math.sin(o),u=Math.cos(o),c=Math.sin(n),l=Math.cos(n);return t[0]=s*u*l-i*a*c,t[1]=i*a*l+s*u*c,t[2]=i*u*c-s*a*l,t[3]=i*u*l+s*a*c,t}const b=u.c,g=u.s,m=u.a,M=p,w=u.b,C=u.d,S=u.l,v=u.f,I=v,E=u.g,T=E,U=u.n,A=u.h,x=u.e,_=(0,s.c)(),F=(0,s.f)(1,0,0),L=(0,s.f)(0,1,0),z=(0,r.a)(),O=(0,r.a)(),P=(0,n.a)();Object.freeze(Object.defineProperty({__proto__:null,add:m,calculateW:function(t,e){const o=e[0],n=e[1],r=e[2];return t[0]=o,t[1]=n,t[2]=r,t[3]=Math.sqrt(Math.abs(1-o*o-n*n-r*r)),t},conjugate:f,copy:b,dot:C,equals:x,exactEquals:A,fromEuler:h,fromMat3:y,getAxisAngle:l,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){const o=e[0],n=e[1],r=e[2],s=e[3],i=o*o+n*n+r*r+s*s,a=i?1/i:0;return t[0]=-o*a,t[1]=-n*a,t[2]=-r*a,t[3]=s*a,t},len:I,length:v,lerp:S,mul:M,multiply:p,normalize:U,random:function(t){const e=i.R,o=e(),n=e(),r=e(),s=Math.sqrt(1-o),a=Math.sqrt(o);return t[0]=s*Math.sin(2*Math.PI*n),t[1]=s*Math.cos(2*Math.PI*n),t[2]=a*Math.sin(2*Math.PI*r),t[3]=a*Math.cos(2*Math.PI*r),t},rotateX:function(t,e,o){o*=.5;const n=e[0],r=e[1],s=e[2],i=e[3],a=Math.sin(o),u=Math.cos(o);return t[0]=n*u+i*a,t[1]=r*u+s*a,t[2]=s*u-r*a,t[3]=i*u-n*a,t},rotateY:function(t,e,o){o*=.5;const n=e[0],r=e[1],s=e[2],i=e[3],a=Math.sin(o),u=Math.cos(o);return t[0]=n*u-s*a,t[1]=r*u+i*a,t[2]=s*u+n*a,t[3]=i*u-r*a,t},rotateZ:function(t,e,o){o*=.5;const n=e[0],r=e[1],s=e[2],i=e[3],a=Math.sin(o),u=Math.cos(o);return t[0]=n*u+r*a,t[1]=r*u-n*a,t[2]=s*u+i*a,t[3]=i*u-s*a,t},rotationTo:function(t,e,o){const n=(0,a.j)(e,o);return n<-.999999?((0,a.b)(_,F,e),(0,a.k)(_)<1e-6&&(0,a.b)(_,L,e),(0,a.n)(_,_),c(t,_,Math.PI),t):n>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,a.b)(_,e,o),t[0]=_[0],t[1]=_[1],t[2]=_[2],t[3]=1+n,U(t,t))},scale:w,set:g,setAxes:function(t,e,o,n){const r=P;return r[0]=o[0],r[3]=o[1],r[6]=o[2],r[1]=n[0],r[4]=n[1],r[7]=n[2],r[2]=-e[0],r[5]=-e[1],r[8]=-e[2],U(t,y(t,r))},setAxisAngle:c,slerp:d,sqlerp:function(t,e,o,n,r,s){return d(z,e,r,s),d(O,o,n,s),d(t,z,O,2*s*(1-s)),t},sqrLen:T,squaredLength:E,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},83932:(t,e,o)=>{o.d(e,{B:()=>c});var n=o(22021),r=o(52138),s=o(65617);function i(t,e,o){const n=Math.sin(t),r=Math.cos(t),s=Math.sin(e),i=Math.cos(e),a=o;return a[0]=-n,a[4]=-s*r,a[8]=i*r,a[12]=0,a[1]=r,a[5]=-s*n,a[9]=i*n,a[13]=0,a[2]=0,a[6]=i,a[10]=s,a[14]=0,a[3]=0,a[7]=0,a[11]=0,a[15]=1,a}var a=o(29166),u=o(8744);function c(t,e,o,n){if(null==t||null==n)return!1;const s=(0,a.eT)(t,a.Jz),c=(0,a.eT)(n,a.sp);if(s===c&&!l(c)&&(s!==a.Ej.UNKNOWN||(0,u.fS)(t,n)))return(0,r.d)(o,e),!0;if(l(c)){const t=a.rf[s][a.Ej.LON_LAT],n=a.rf[a.Ej.LON_LAT][c];return null!=t&&null!=n&&(t(e,0,d,0),n(d,0,f,0),i(p*d[0],p*d[1],o),o[12]=f[0],o[13]=f[1],o[14]=f[2],!0)}if((c===a.Ej.WEB_MERCATOR||c===a.Ej.PLATE_CARREE)&&(s===a.Ej.WGS84||s===a.Ej.CGCS2000&&c===a.Ej.PLATE_CARREE||s===a.Ej.SPHERICAL_ECEF||s===a.Ej.WEB_MERCATOR)){const t=a.rf[s][a.Ej.LON_LAT],n=a.rf[a.Ej.LON_LAT][c];return null!=t&&null!=n&&(t(e,0,d,0),n(d,0,f,0),s===a.Ej.SPHERICAL_ECEF?function(t,e,o){i(t,e,o),(0,r.t)(o,o)}(p*d[0],p*d[1],o):(0,r.g)(o),o[12]=f[0],o[13]=f[1],o[14]=f[2],!0)}return!1}function l(t){return t===a.Ej.SPHERICAL_ECEF||t===a.Ej.SPHERICAL_MARS_PCPF||t===a.Ej.SPHERICAL_MOON_PCPF}const p=(0,n.Vl)(1),d=(0,s.c)(),f=(0,s.c)()},58995:(t,e,o)=>{o.d(e,{rS:()=>c});var n=o(2109),r=o(82971),s=o(8744);const i=new r.Z(n.kU),a=new r.Z(n.JL),u=new r.Z(n.mM);function c(t){return t&&((0,s.BZ)(t)||(0,s.fS)(t,a))?a:t&&((0,s.V2)(t)||(0,s.fS)(t,u))?u:i}new r.Z(n.pn)},51161:(t,e,o)=>{o.d(e,{H3:()=>g,QI:()=>p,U4:()=>u,Yh:()=>f});var n=o(43697),r=o(96674),s=o(5600),i=(o(75215),o(67676),o(80442),o(36030)),a=o(52011);let u=class extends r.wq{constructor(){super(...arguments),this.nodesPerPage=null,this.rootIndex=0,this.lodSelectionMetricType=null}};(0,n._)([(0,s.Cb)({type:Number})],u.prototype,"nodesPerPage",void 0),(0,n._)([(0,s.Cb)({type:Number})],u.prototype,"rootIndex",void 0),(0,n._)([(0,s.Cb)({type:String})],u.prototype,"lodSelectionMetricType",void 0),u=(0,n._)([(0,a.j)("esri.layer.support.I3SNodePageDefinition")],u);let c=class extends r.wq{constructor(){super(...arguments),this.factor=1}};(0,n._)([(0,s.Cb)({type:Number,json:{read:{source:"textureSetDefinitionId"}}})],c.prototype,"id",void 0),(0,n._)([(0,s.Cb)({type:Number})],c.prototype,"factor",void 0),c=(0,n._)([(0,a.j)("esri.layer.support.I3SMaterialTexture")],c);let l=class extends r.wq{constructor(){super(...arguments),this.baseColorFactor=[1,1,1,1],this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.metallicFactor=1,this.roughnessFactor=1}};(0,n._)([(0,s.Cb)({type:[Number]})],l.prototype,"baseColorFactor",void 0),(0,n._)([(0,s.Cb)({type:c})],l.prototype,"baseColorTexture",void 0),(0,n._)([(0,s.Cb)({type:c})],l.prototype,"metallicRoughnessTexture",void 0),(0,n._)([(0,s.Cb)({type:Number})],l.prototype,"metallicFactor",void 0),(0,n._)([(0,s.Cb)({type:Number})],l.prototype,"roughnessFactor",void 0),l=(0,n._)([(0,a.j)("esri.layer.support.I3SMaterialPBRMetallicRoughness")],l);let p=class extends r.wq{constructor(){super(...arguments),this.alphaMode="opaque",this.alphaCutoff=.25,this.doubleSided=!1,this.cullFace="none",this.normalTexture=null,this.occlusionTexture=null,this.emissiveTexture=null,this.emissiveFactor=null,this.pbrMetallicRoughness=null}};(0,n._)([(0,i.J)({opaque:"opaque",mask:"mask",blend:"blend"})],p.prototype,"alphaMode",void 0),(0,n._)([(0,s.Cb)({type:Number})],p.prototype,"alphaCutoff",void 0),(0,n._)([(0,s.Cb)({type:Boolean})],p.prototype,"doubleSided",void 0),(0,n._)([(0,i.J)({none:"none",back:"back",front:"front"})],p.prototype,"cullFace",void 0),(0,n._)([(0,s.Cb)({type:c})],p.prototype,"normalTexture",void 0),(0,n._)([(0,s.Cb)({type:c})],p.prototype,"occlusionTexture",void 0),(0,n._)([(0,s.Cb)({type:c})],p.prototype,"emissiveTexture",void 0),(0,n._)([(0,s.Cb)({type:[Number]})],p.prototype,"emissiveFactor",void 0),(0,n._)([(0,s.Cb)({type:l})],p.prototype,"pbrMetallicRoughness",void 0),p=(0,n._)([(0,a.j)("esri.layer.support.I3SMaterialDefinition")],p);let d=class extends r.wq{};(0,n._)([(0,s.Cb)({type:String,json:{read:{source:["name","index"],reader:(t,e)=>null!=t?t:`${e.index}`}}})],d.prototype,"name",void 0),(0,n._)([(0,i.J)({jpg:"jpg",png:"png",dds:"dds","ktx-etc2":"ktx-etc2",ktx2:"ktx2",basis:"basis"})],d.prototype,"format",void 0),d=(0,n._)([(0,a.j)("esri.layer.support.I3STextureFormat")],d);let f=class extends r.wq{constructor(){super(...arguments),this.atlas=!1}};(0,n._)([(0,s.Cb)({type:[d]})],f.prototype,"formats",void 0),(0,n._)([(0,s.Cb)({type:Boolean})],f.prototype,"atlas",void 0),f=(0,n._)([(0,a.j)("esri.layer.support.I3STextureSetDefinition")],f);let y=class extends r.wq{};(0,n._)([(0,i.J)({Float32:"Float32",UInt64:"UInt64",UInt32:"UInt32",UInt16:"UInt16",UInt8:"UInt8"})],y.prototype,"type",void 0),(0,n._)([(0,s.Cb)({type:Number})],y.prototype,"component",void 0),y=(0,n._)([(0,a.j)("esri.layer.support.I3SGeometryAttribute")],y);let h=class extends r.wq{};(0,n._)([(0,i.J)({draco:"draco"})],h.prototype,"encoding",void 0),(0,n._)([(0,s.Cb)({type:[String]})],h.prototype,"attributes",void 0),h=(0,n._)([(0,a.j)("esri.layer.support.I3SGeometryCompressedAttributes")],h);let b=class extends r.wq{constructor(){super(...arguments),this.offset=0}};(0,n._)([(0,s.Cb)({type:Number})],b.prototype,"offset",void 0),(0,n._)([(0,s.Cb)({type:y})],b.prototype,"position",void 0),(0,n._)([(0,s.Cb)({type:y})],b.prototype,"normal",void 0),(0,n._)([(0,s.Cb)({type:y})],b.prototype,"uv0",void 0),(0,n._)([(0,s.Cb)({type:y})],b.prototype,"color",void 0),(0,n._)([(0,s.Cb)({type:y})],b.prototype,"uvRegion",void 0),(0,n._)([(0,s.Cb)({type:y})],b.prototype,"featureId",void 0),(0,n._)([(0,s.Cb)({type:y})],b.prototype,"faceRange",void 0),(0,n._)([(0,s.Cb)({type:h})],b.prototype,"compressedAttributes",void 0),b=(0,n._)([(0,a.j)("esri.layer.support.I3SGeometryBuffer")],b);let g=class extends r.wq{};(0,n._)([(0,i.J)({triangle:"triangle"})],g.prototype,"topology",void 0),(0,n._)([(0,s.Cb)()],g.prototype,"geometryBuffers",void 0),g=(0,n._)([(0,a.j)("esri.layer.support.I3SGeometryDefinition")],g)},56765:(t,e,o)=>{o.d(e,{Z:()=>l});var n,r=o(43697),s=o(46791),i=o(96674),a=o(5600),u=(o(75215),o(67676),o(80442),o(52011));let c=n=class extends i.wq{constructor(t){super(t),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new s.Z}clone(){return new n({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],c.prototype,"floorField",void 0),(0,r._)([(0,a.Cb)({json:{read:!1,write:!1}})],c.prototype,"viewAllMode",void 0),(0,r._)([(0,a.Cb)({json:{read:!1,write:!1}})],c.prototype,"viewAllLevelIds",void 0),c=n=(0,r._)([(0,u.j)("esri.layers.support.LayerFloorInfo")],c);const l=c},15506:(t,e,o)=>{o.d(e,{C:()=>n});const n={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},36405:(t,e,o)=>{function n(t,e){return null!=e&&e.mode?e.mode:function(t){return t?c:l}(t).mode}function r(t,e){return n(null!=t&&t.hasZ,e)}function s(t,e,o){return o&&o.mode!==e?`${t} only support ${e} elevation mode`:null}function i(t,e,o){return o?.mode===e?`${t} do not support ${e} elevation mode`:null}function a(t,e){return null!=e?.featureExpressionInfo&&"0"!==e.featureExpressionInfo.expression?`${t} do not support featureExpressionInfo`:null}function u(t,e){e&&t.warn(".elevationInfo=",e)}o.d(e,{LR:()=>u,Uy:()=>s,VW:()=>r,Wb:()=>i,kf:()=>a}),o(12541);const c={mode:"absolute-height",offset:0},l={mode:"on-the-ground",offset:null}},58333:(t,e,o)=>{o.d(e,{ET:()=>s,I4:()=>r,eG:()=>u,lF:()=>i,lj:()=>l,qP:()=>a,wW:()=>c});const n=[252,146,31,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:n,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},s={type:"esriSLS",style:"esriSLSSolid",width:.75,color:n},i={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},u={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},c={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},l={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},91891:(t,e,o)=>{o.d(e,{I_:()=>d,W7:()=>h,qM:()=>g});var n=o(20102),r=o(22974),s=o(92604),i=o(25683),a=o(35065);const u=s.Z.getLogger("esri.views.3d.layers.i3s.I3SBinaryReader");function c(t,e,o){let r="",s=0;for(;s<o;){const i=t[e+s];if(i<128)r+=String.fromCharCode(i),s++;else if(i>=192&&i<224){if(s+1>=o)throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Two byte character was truncated.");const a=(31&i)<<6|63&t[e+s+1];r+=String.fromCharCode(a),s+=2}else if(i>=224&&i<240){if(s+2>=o)throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const a=(15&i)<<12|(63&t[e+s+1])<<6|63&t[e+s+2];r+=String.fromCharCode(a),s+=3}else{if(!(i>=240&&i<248))throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Invalid multi byte sequence.");{if(s+3>=o)throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const a=(7&i)<<18|(63&t[e+s+1])<<12|(63&t[e+s+2])<<6|63&t[e+s+3];if(a>=65536){const t=55296+(a-65536>>10),e=56320+(1023&a);r+=String.fromCharCode(t,e)}else r+=String.fromCharCode(a);s+=4}}}return r}function l(t,e){const o={byteOffset:0,byteCount:0,fields:Object.create(null)};let n=0;for(let r=0;r<e.length;r++){const s=e[r],i=s.valueType||s.type,a=M[i];o.fields[s.property]=a(t,n),n+=m[i].BYTES_PER_ELEMENT}return o.byteCount=n,o}function p(t,e,o){const r=[];let s,i,a=0;for(i=0;i<t;i+=1){if(s=e[i],s>0){if(r.push(c(o,a,s-1)),0!==o[a+s-1])throw new n.Z("string-array-error","Invalid string array: missing null termination.")}else r.push(null);a+=s}return r}function d(t,e){return new(0,m[e.valueType])(t,e.byteOffset,e.count*e.valuesPerElement)}function f(t,e,o){const s=null!=e.header?l(t,e.header):{byteOffset:0,byteCount:0,fields:{count:o}},i={header:s,byteOffset:s.byteCount,byteCount:0,entries:Object.create(null)};let a=s.byteCount;for(let t=0;t<e.ordering.length;t++){const o=e.ordering[t],u=(0,r.d9)(e[o]);if(u.count=s.fields.count??0,"String"===u.valueType){if(u.byteOffset=a,u.byteCount=s.fields[o+"ByteCount"],"UTF-8"!==u.encoding)throw new n.Z("unsupported-encoding","Unsupported String encoding.",{encoding:u.encoding});if(u.timeEncoding&&"ECMA_ISO8601"!==u.timeEncoding)throw new n.Z("unsupported-time-encoding","Unsupported time encoding.",{timeEncoding:u.timeEncoding})}else{if(!w(u.valueType))throw new n.Z("unsupported-value-type","Unsupported binary valueType",{valueType:u.valueType});{const t=C(u.valueType);a+=a%t!=0?t-a%t:0,u.byteOffset=a,u.byteCount=t*u.valuesPerElement*u.count}}a+=u.byteCount??0,i.entries[o]=u}return i.byteCount=a-i.byteOffset,i}function y(t,e,o){if(e!==t&&u.error(`Invalid ${o} buffer size\n expected: ${t}, actual: ${e})`),e<t)throw new n.Z("buffer-too-small","Binary buffer is too small",{expectedSize:t,actualSize:e})}function h(t,e){const o=l(t,e&&e.header);let n=o.byteCount;const r={isDraco:!1,header:o,byteOffset:o.byteCount,byteCount:0,vertexAttributes:{}},s=o.fields,i=null!=s.vertexCount?s.vertexCount:s.count;for(const t of e.ordering){if(!e.vertexAttributes[t])continue;const o={...e.vertexAttributes[t],byteOffset:n,count:i},s=b[t]||"_"+t;r.vertexAttributes[s]=o,n+=C(o.valueType)*o.valuesPerElement*i}const a=s.faceCount;if(e.faces&&a){r.faces={};for(const t of e.ordering){if(!e.faces[t])continue;const o={...e.faces[t],byteOffset:n,count:a};r.faces[t]=o,n+=C(o.valueType)*o.valuesPerElement*a}}const u=s.featureCount;if(e.featureAttributes&&e.featureAttributeOrder&&u){r.featureAttributes={};for(const t of e.featureAttributeOrder){if(!e.featureAttributes[t])continue;const o={...e.featureAttributes[t],byteOffset:n,count:u};r.featureAttributes[t]=o,n+=("UInt64"===o.valueType?8:C(o.valueType))*o.valuesPerElement*u}}return y(n,t.byteLength,"geometry"),r.byteCount=n-r.byteOffset,r}const b={position:a.T.POSITION,normal:a.T.NORMAL,color:a.T.COLOR,uv0:a.T.UV0,region:a.T.UVREGION};function g(t,e,o){if("lepcc-rgb"===t.encoding)return(0,i.IT)(e);if("lepcc-intensity"===t.encoding)return(0,i.ti)(e);if(null!=t.encoding&&""!==t.encoding)throw new n.Z("unknown-attribute-storage-info-encoding","Unknown Attribute Storage Info Encoding");t["attributeByteCounts "]&&!t.attributeByteCounts&&(u.warn("Warning: Trailing space in 'attributeByteCounts '."),t.attributeByteCounts=t["attributeByteCounts "]),"ObjectIds"===t.ordering[0]&&t.hasOwnProperty("objectIds")&&(u.warn("Warning: Case error in objectIds"),t.ordering[0]="objectIds");const r=f(e,t,o);y(r.byteOffset+r.byteCount,e.byteLength,"attribute");const s=r.entries.attributeValues||r.entries.objectIds;if(s){if("String"===s.valueType){const t=r.entries.attributeByteCounts,o=d(e,t),n=function(t,e){return new Uint8Array(t,e.byteOffset,e.byteCount)}(e,s);return s.timeEncoding?function(t,e,o){return p(t,e,o).map((t=>{const e=t?Date.parse(t):null;return e&&!Number.isNaN(e)?e:null}))}(t.count,o,n):p(t.count,o,n)}return d(e,s)}throw new n.Z("bad-attribute-storage-info","Bad attributeStorageInfo specification.")}const m={Float32:Float32Array,Float64:Float64Array,UInt8:Uint8Array,Int8:Int8Array,UInt16:Uint16Array,Int16:Int16Array,UInt32:Uint32Array,Int32:Int32Array},M={Float32:(t,e)=>new DataView(t,0).getFloat32(e,!0),Float64:(t,e)=>new DataView(t,0).getFloat64(e,!0),UInt8:(t,e)=>new DataView(t,0).getUint8(e),Int8:(t,e)=>new DataView(t,0).getInt8(e),UInt16:(t,e)=>new DataView(t,0).getUint16(e,!0),Int16:(t,e)=>new DataView(t,0).getInt16(e,!0),UInt32:(t,e)=>new DataView(t,0).getUint32(e,!0),Int32:(t,e)=>new DataView(t,0).getInt32(e,!0)};function w(t){return m.hasOwnProperty(t)}function C(t){return w(t)?m[t].BYTES_PER_ELEMENT:0}},2358:(t,e,o)=>{o.d(e,{xe:()=>m});var n=o(3172),r=(o(67676),o(20102),o(80442),o(1533)),s=(o(21787),o(46521)),i=(o(52138),o(13598)),a=(o(51305),o(94961)),u=(o(17896),o(65617));o(2109),o(73615),o(82971),o(58995),o(83932),o(87360),(0,u.c)();var c=o(24470),l=(o(8744),o(14165),o(91891));o(22303);var p,d,f=o(88669);(d=p||(p={}))[d.INVISIBLE=0]="INVISIBLE",d[d.TRANSPARENT=1]="TRANSPARENT",d[d.OPAQUE=2]="OPAQUE";(0,f.f)(0,0,0,.2),p.OPAQUE;(0,f.f)(0,0,0,.2),p.OPAQUE,o(6206);var y,h,b=o(87951),g=o(51417);async function m(t,e,o,r,s){const i=[];for(const n of e)if(n&&s.includes(n.name)){const e=`${t}/nodes/${o}/attributes/${n.key}/0`;i.push({url:e,storageInfo:n})}const a=await Promise.allSettled(i.map((t=>(0,n.Z)(t.url,{responseType:"array-buffer"}).then((e=>(0,l.qM)(t.storageInfo,e.data)))))),u=[];for(const t of r){const e={};for(let o=0;o<a.length;o++){const n=a[o];if("fulfilled"===n.status){const r=n.value;e[i[o].storageInfo.name]=C(r,t)}}u.push(e)}return u}(0,c.Ue)(),(h=y||(y={}))[h.OUTSIDE=0]="OUTSIDE",h[h.INTERSECTS_CENTER_OUTSIDE=1]="INTERSECTS_CENTER_OUTSIDE",h[h.INTERSECTS_CENTER_INSIDE=2]="INTERSECTS_CENTER_INSIDE",h[h.INSIDE=3]="INSIDE";const M=-32768,w=-(2**31);function C(t,e){if(!t)return null;const o=t[e];return(0,r.z3)(t)?o===M?null:o:(0,r.Hx)(t)?o===w?null:o:o!=o?null:o}const S=new Array(24);new g.U(S,3),(0,u.c)(),(0,u.c)(),(0,s.a)(),(0,i.a)(),(0,a.a)(),(0,c.Ue)(),(0,c.Ue)(),(0,b.Ue)(),(0,u.c)(),new Array(72),(0,i.a)()},25683:(t,e,o)=>{o.d(e,{Gi:()=>c,IT:()=>y,ti:()=>g});var n=o(20102);const r=!0,s={identifierOffset:0,identifierLength:10,versionOffset:10,checksumOffset:12,byteCount:16};function i(t,e,o){return{identifier:String.fromCharCode.apply(null,new Uint8Array(t,o+s.identifierOffset,s.identifierLength)),version:e.getUint16(o+s.versionOffset,r),checksum:e.getUint32(o+s.checksumOffset,r)}}const a={sizeLo:0,sizeHi:4,minX:8,minY:16,minZ:24,maxX:32,maxY:40,maxZ:48,errorX:56,errorY:64,errorZ:72,count:80,reserved:84,byteCount:88};function u(t,e){return{sizeLo:t.getUint32(e+a.sizeLo,r),sizeHi:t.getUint32(e+a.sizeHi,r),minX:t.getFloat64(e+a.minX,r),minY:t.getFloat64(e+a.minY,r),minZ:t.getFloat64(e+a.minZ,r),maxX:t.getFloat64(e+a.maxX,r),maxY:t.getFloat64(e+a.maxY,r),maxZ:t.getFloat64(e+a.maxZ,r),errorX:t.getFloat64(e+a.errorX,r),errorY:t.getFloat64(e+a.errorY,r),errorZ:t.getFloat64(e+a.errorZ,r),count:t.getUint32(e+a.count,r),reserved:t.getUint32(e+a.reserved,r)}}function c(t){const e=new DataView(t,0);let o=0;const{identifier:r,version:c}=i(t,e,o);if(o+=s.byteCount,"LEPCC "!==r)throw new n.Z("lepcc-decode-error","Bad identifier");if(c>1)throw new n.Z("lepcc-decode-error","Unknown version");const p=u(e,o);if(o+=a.byteCount,p.sizeHi*2**32+p.sizeLo!==t.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const d=new Float64Array(3*p.count),f=[],y=[],h=[],b=[];if(o=l(t,o,f),o=l(t,o,y),o=l(t,o,h),o=l(t,o,b),o!==t.byteLength)throw new n.Z("lepcc-decode-error","Bad length");let g=0,m=0;for(let t=0;t<f.length;t++){m+=f[t];let e=0;for(let o=0;o<y[t];o++){e+=h[g];const t=b[g];d[3*g]=Math.min(p.maxX,p.minX+2*p.errorX*e),d[3*g+1]=Math.min(p.maxY,p.minY+2*p.errorY*m),d[3*g+2]=Math.min(p.maxZ,p.minZ+2*p.errorZ*t),g++}}return{errorX:p.errorX,errorY:p.errorY,errorZ:p.errorZ,result:d}}function l(t,e,o){const n=[];e=p(t,e,n);const r=[];for(let s=0;s<n.length;s++){r.length=0,e=p(t,e,r);for(let t=0;t<r.length;t++)o.push(r[t]+n[s])}return e}function p(t,e,o){const s=new DataView(t,e),i=s.getUint8(0),a=31&i,u=!!(32&i),c=(192&i)>>6;let l=0;if(0===c)l=s.getUint32(1,r),e+=5;else if(1===c)l=s.getUint16(1,r),e+=3;else{if(2!==c)throw new n.Z("lepcc-decode-error","Bad count type");l=s.getUint8(1),e+=2}if(u)throw new n.Z("lepcc-decode-error","LUT not implemented");const p=Math.ceil(l*a/8),d=new Uint8Array(t,e,p);let f=0,y=0,h=0;const b=-1>>>32-a;for(let t=0;t<l;t++){for(;y<a;)f|=d[h]<<y,y+=8,h+=1;o[t]=f&b,f>>>=a,y-=a,y+a>32&&(f|=d[h-1]>>8-y)}return e+h}const d={sizeLo:0,sizeHi:4,count:8,colorMapCount:12,lookupMethod:14,compressionMethod:15,byteCount:16};function f(t,e){return{sizeLo:t.getUint32(e+d.sizeLo,r),sizeHi:t.getUint32(e+d.sizeHi,r),count:t.getUint32(e+d.count,r),colorMapCount:t.getUint16(e+d.colorMapCount,r),lookupMethod:t.getUint8(e+d.lookupMethod),compressionMethod:t.getUint8(e+d.compressionMethod)}}function y(t){const e=new DataView(t,0);let o=0;const{identifier:r,version:a}=i(t,e,o);if(o+=s.byteCount,"ClusterRGB"!==r)throw new n.Z("lepcc-decode-error","Bad identifier");if(a>1)throw new n.Z("lepcc-decode-error","Unknown version");const u=f(e,o);if(o+=d.byteCount,u.sizeHi*2**32+u.sizeLo!==t.byteLength)throw new n.Z("lepcc-decode-error","Bad size");if((2===u.lookupMethod||1===u.lookupMethod)&&0===u.compressionMethod){if(3*u.colorMapCount+u.count+o!==t.byteLength||u.colorMapCount>256)throw new n.Z("lepcc-decode-error","Bad count");const e=new Uint8Array(t,o,3*u.colorMapCount),r=new Uint8Array(t,o+3*u.colorMapCount,u.count),s=new Uint8Array(3*u.count);for(let t=0;t<u.count;t++){const o=r[t];s[3*t]=e[3*o],s[3*t+1]=e[3*o+1],s[3*t+2]=e[3*o+2]}return s}if(0===u.lookupMethod&&0===u.compressionMethod){if(3*u.count+o!==t.byteLength||0!==u.colorMapCount)throw new n.Z("lepcc-decode-error","Bad count");return new Uint8Array(t,o).slice()}if(u.lookupMethod<=2&&1===u.compressionMethod){if(o+3!==t.byteLength||1!==u.colorMapCount)throw new n.Z("lepcc-decode-error","Bad count");const r=e.getUint8(o),s=e.getUint8(o+1),i=e.getUint8(o+2),a=new Uint8Array(3*u.count);for(let t=0;t<u.count;t++)a[3*t]=r,a[3*t+1]=s,a[3*t+2]=i;return a}throw new n.Z("lepcc-decode-error","Bad method "+u.lookupMethod+","+u.compressionMethod)}const h={sizeLo:0,sizeHi:4,count:8,scaleFactor:12,bitsPerPoint:14,reserved:15,byteCount:16};function b(t,e){return{sizeLo:t.getUint32(e+h.sizeLo,r),sizeHi:t.getUint32(e+h.sizeHi,r),count:t.getUint32(e+h.count,r),scaleFactor:t.getUint16(e+h.scaleFactor,r),bitsPerPoint:t.getUint8(e+h.bitsPerPoint),reserved:t.getUint8(e+h.reserved)}}function g(t){const e=new DataView(t,0);let o=0;const{identifier:r,version:a}=i(t,e,o);if(o+=s.byteCount,"Intensity "!==r)throw new n.Z("lepcc-decode-error","Bad identifier");if(a>1)throw new n.Z("lepcc-decode-error","Unknown version");const u=b(e,o);if(o+=h.byteCount,u.sizeHi*2**32+u.sizeLo!==t.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const c=new Uint16Array(u.count);if(8===u.bitsPerPoint){if(u.count+o!==t.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const e=new Uint8Array(t,o,u.count);for(let t=0;t<u.count;t++)c[t]=e[t]*u.scaleFactor}else if(16===u.bitsPerPoint){if(2*u.count+o!==t.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const e=new Uint16Array(t,o,u.count);for(let t=0;t<u.count;t++)c[t]=e[t]*u.scaleFactor}else{const e=[];if(p(t,o,e)!==t.byteLength)throw new n.Z("lepcc-decode-error","Bad size");for(let t=0;t<u.count;t++)c[t]=e[t]*u.scaleFactor}return c}},6206:(t,e,o)=>{var n,r;o.d(e,{a9:()=>n}),o(22021),(r=n||(n={}))[r.Multiply=1]="Multiply",r[r.Ignore=2]="Ignore",r[r.Replace=3]="Replace",r[r.Tint=4]="Tint"},87951:(t,e,o)=>{o.d(e,{Ue:()=>l,gI:()=>p}),o(21787);var n=o(46521),r=o(51305),s=o(94961),i=o(17896),a=o(65617),u=(o(98766),o(88669)),c=(o(60437),o(62073),o(64822));function l(t=[0,0,0],e=[-1,-1,-1],o=(0,s.a)()){return{center:(0,a.g)(t),halfSize:(0,a.g)(e),quaternion:(0,s.b)(o)}}function p(t,e,o,n,s){if((0,r.c)(s.quaternion,t.quaternion),n===c.JY.Global){(0,r.a)(h,t.quaternion),(0,i.v)(d,t.center,h),(0,i.w)(f,d),(0,i.x)(y,f,t.halfSize),(0,i.u)(y,f,y);const n=(0,i.l)(y);(0,i.g)(y,f,t.halfSize);const a=(0,i.l)(y);if(n<o)(0,i.c)(s.center,t.center),(0,i.s)(d,o,o,o),(0,i.g)(s.halfSize,t.halfSize,d);else{const r=a>0?1+e/a:1,u=n>0?1+o/n:1,c=(u+r)/2,l=(u-r)/2;(0,i.i)(s.halfSize,f,l),(0,i.q)(s.halfSize,s.halfSize,t.halfSize,c),(0,i.i)(s.center,f,c),(0,i.q)(s.center,s.center,t.halfSize,l),(0,i.z)(d,d),(0,i.A)(s.center,s.center,d),(0,i.v)(s.center,s.center,s.quaternion)}}else{const n=(0,i.s)(d,0,0,1);(0,i.q)(s.center,t.center,n,(o+e)/2),(0,r.a)(h,t.quaternion),(0,i.v)(n,n,h),(0,i.w)(n,n),(0,i.q)(s.halfSize,t.halfSize,n,(o-e)/2)}return s}(0,s.a)(),(0,a.c)(),(0,a.c)(),(0,u.c)(),(0,n.a)(),(()=>{const t=new Int8Array(162);let e=0;const o=o=>{for(let n=0;n<o.length;n++)t[e+n]=o[n];e+=6};o([6,2,3,1,5,4]),o([0,2,3,1,5,4]),o([0,2,3,7,5,4]),o([0,1,3,2,6,4]),o([0,1,3,2,0,0]),o([0,1,5,7,3,2]),o([0,1,3,7,6,4]),o([0,1,3,7,6,2]),o([0,1,5,7,6,2]),o([0,1,5,4,6,2]),o([0,1,5,4,0,0]),o([0,1,3,7,5,4]),o([0,2,6,4,0,0]),o([0,0,0,0,0,0]),o([1,3,7,5,0,0]),o([2,3,7,6,4,0]),o([2,3,7,6,0,0]),o([2,3,1,5,7,6]),o([0,1,5,7,6,2]),o([0,1,5,7,6,4]),o([0,1,3,7,6,4]),o([4,5,7,6,2,0]),o([4,5,7,6,0,0]),o([4,5,1,3,7,6]),o([0,2,3,7,5,4]),o([6,2,3,7,5,4]),o([6,2,3,1,5,4])})();const d=(0,a.c)(),f=(0,a.c)(),y=(0,a.c)(),h=(0,s.a)()},51417:(t,e,o)=>{o.d(e,{U:()=>n,a:()=>r});class n{constructor(t,e,o=e){this.data=t,this.size=e,this.stride=o}}class r extends n{constructor(t,e,o,n=!1,r=o){super(t,o,r),this.indices=e,this.exclusive=n}}},64822:(t,e,o)=>{var n;o.d(e,{JY:()=>n}),function(t){t[t.Global=1]="Global",t[t.Local=2]="Local"}(n||(n={}))},19833:(t,e,o)=>{o.d(e,{V5:()=>s,e7:()=>r});var n=o(35671);async function r(t,e=t.popupTemplate){if(null==e)return[];const o=await e.getRequiredFields(t.fieldsIndex),{lastEditInfoEnabled:r}=e,{objectIdField:s,typeIdField:i,globalIdField:a,relationships:u}=t;if(o.includes("*"))return["*"];const c=r?await(0,n.CH)(t):[],l=(0,n.Q0)(t.fieldsIndex,[...o,...c]);return i&&l.push(i),l&&s&&t.fieldsIndex?.has(s)&&!l.includes(s)&&l.push(s),l&&a&&t.fieldsIndex?.has(a)&&!l.includes(a)&&l.push(a),u&&u.forEach((e=>{const{keyField:o}=e;l&&o&&t.fieldsIndex?.has(o)&&!l.includes(o)&&l.push(o)})),l}function s(t,e){return t.popupTemplate?t.popupTemplate:null!=e&&e.defaultPopupTemplateEnabled&&null!=t.defaultPopupTemplate?t.defaultPopupTemplate:null}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4925,6030,5732,661,5234,2596],{5732:(t,e,n)=>{n.d(e,{c:()=>r,g:()=>i});var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},46521:(t,e,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function i(t,e,n,r,i,a,o,s,l){return[t,e,n,r,i,a,o,s,l]}function a(t,e){return new Float64Array(t,e,9)}n.d(e,{a:()=>r,c:()=>a,f:()=>i}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,createView:a,fromValues:i},Symbol.toStringTag,{value:"Module"}))},52138:(t,e,n)=>{n.d(e,{A:()=>m,a:()=>b,b:()=>u,c:()=>p,d:()=>d,e:()=>_,f:()=>g,g:()=>o,i:()=>l,k:()=>f,m:()=>c,s:()=>a,t:()=>s,w:()=>h,y:()=>v,z:()=>w});var r=n(65617),i=n(46851);function a(t,e,n,r,i,a,o,s,l,c,h,u,f,d,p,m,M){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=c,t[9]=h,t[10]=u,t[11]=f,t[12]=d,t[13]=p,t[14]=m,t[15]=M,t}function o(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function s(t,e){if(t===e){const n=e[1],r=e[2],i=e[3],a=e[6],o=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function l(t,e){const n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],h=e[8],u=e[9],f=e[10],d=e[11],p=e[12],m=e[13],M=e[14],y=e[15],g=n*s-r*o,x=n*l-i*o,_=n*c-a*o,b=r*l-i*s,w=r*c-a*s,v=i*c-a*l,S=h*m-u*p,B=h*M-f*p,R=h*y-d*p,X=u*M-f*m,Y=u*y-d*m,O=f*y-d*M;let j=g*O-x*Y+_*X+b*R-w*B+v*S;return j?(j=1/j,t[0]=(s*O-l*Y+c*X)*j,t[1]=(i*Y-r*O-a*X)*j,t[2]=(m*v-M*w+y*b)*j,t[3]=(f*w-u*v-d*b)*j,t[4]=(l*R-o*O-c*B)*j,t[5]=(n*O-i*R+a*B)*j,t[6]=(M*_-p*v-y*x)*j,t[7]=(h*v-f*_+d*x)*j,t[8]=(o*Y-s*R+c*S)*j,t[9]=(r*R-n*Y-a*S)*j,t[10]=(p*w-m*_+y*g)*j,t[11]=(u*_-h*w-d*g)*j,t[12]=(s*B-o*X-l*S)*j,t[13]=(n*X-r*B+i*S)*j,t[14]=(m*x-p*b-M*g)*j,t[15]=(h*b-u*x+f*g)*j,t):null}function c(t,e,n){const r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],h=e[7],u=e[8],f=e[9],d=e[10],p=e[11],m=e[12],M=e[13],y=e[14],g=e[15];let x=n[0],_=n[1],b=n[2],w=n[3];return t[0]=x*r+_*s+b*u+w*m,t[1]=x*i+_*l+b*f+w*M,t[2]=x*a+_*c+b*d+w*y,t[3]=x*o+_*h+b*p+w*g,x=n[4],_=n[5],b=n[6],w=n[7],t[4]=x*r+_*s+b*u+w*m,t[5]=x*i+_*l+b*f+w*M,t[6]=x*a+_*c+b*d+w*y,t[7]=x*o+_*h+b*p+w*g,x=n[8],_=n[9],b=n[10],w=n[11],t[8]=x*r+_*s+b*u+w*m,t[9]=x*i+_*l+b*f+w*M,t[10]=x*a+_*c+b*d+w*y,t[11]=x*o+_*h+b*p+w*g,x=n[12],_=n[13],b=n[14],w=n[15],t[12]=x*r+_*s+b*u+w*m,t[13]=x*i+_*l+b*f+w*M,t[14]=x*a+_*c+b*d+w*y,t[15]=x*o+_*h+b*p+w*g,t}function h(t,e,n){const r=n[0],i=n[1],a=n[2];if(e===t)t[12]=e[0]*r+e[4]*i+e[8]*a+e[12],t[13]=e[1]*r+e[5]*i+e[9]*a+e[13],t[14]=e[2]*r+e[6]*i+e[10]*a+e[14],t[15]=e[3]*r+e[7]*i+e[11]*a+e[15];else{const n=e[0],o=e[1],s=e[2],l=e[3],c=e[4],h=e[5],u=e[6],f=e[7],d=e[8],p=e[9],m=e[10],M=e[11];t[0]=n,t[1]=o,t[2]=s,t[3]=l,t[4]=c,t[5]=h,t[6]=u,t[7]=f,t[8]=d,t[9]=p,t[10]=m,t[11]=M,t[12]=n*r+c*i+d*a+e[12],t[13]=o*r+h*i+p*a+e[13],t[14]=s*r+u*i+m*a+e[14],t[15]=l*r+f*i+M*a+e[15]}return t}function u(t,e,n){const r=n[0],i=n[1],a=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function f(t,e,n,r){let a,o,s,l,c,h,u,f,d,p,m,M,y,g,x,_,b,w,v,S,B,R,X,Y,O=r[0],j=r[1],A=r[2],Z=Math.sqrt(O*O+j*j+A*A);return Z<(0,i.g)()?null:(Z=1/Z,O*=Z,j*=Z,A*=Z,a=Math.sin(n),o=Math.cos(n),s=1-o,l=e[0],c=e[1],h=e[2],u=e[3],f=e[4],d=e[5],p=e[6],m=e[7],M=e[8],y=e[9],g=e[10],x=e[11],_=O*O*s+o,b=j*O*s+A*a,w=A*O*s-j*a,v=O*j*s-A*a,S=j*j*s+o,B=A*j*s+O*a,R=O*A*s+j*a,X=j*A*s-O*a,Y=A*A*s+o,t[0]=l*_+f*b+M*w,t[1]=c*_+d*b+y*w,t[2]=h*_+p*b+g*w,t[3]=u*_+m*b+x*w,t[4]=l*v+f*S+M*B,t[5]=c*v+d*S+y*B,t[6]=h*v+p*S+g*B,t[7]=u*v+m*S+x*B,t[8]=l*R+f*X+M*Y,t[9]=c*R+d*X+y*Y,t[10]=h*R+p*X+g*Y,t[11]=u*R+m*X+x*Y,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function d(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function p(t,e,n){if(0===e)return o(t);let r,a,s,l=n[0],c=n[1],h=n[2],u=Math.sqrt(l*l+c*c+h*h);return u<(0,i.g)()?null:(u=1/u,l*=u,c*=u,h*=u,r=Math.sin(e),a=Math.cos(e),s=1-a,t[0]=l*l*s+a,t[1]=c*l*s+h*r,t[2]=h*l*s-c*r,t[3]=0,t[4]=l*c*s-h*r,t[5]=c*c*s+a,t[6]=h*c*s+l*r,t[7]=0,t[8]=l*h*s+c*r,t[9]=c*h*s-l*r,t[10]=h*h*s+a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function m(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function M(t,e,n){const r=e[0],i=e[1],a=e[2],o=e[3],s=r+r,l=i+i,c=a+a,h=r*s,u=r*l,f=r*c,d=i*l,p=i*c,m=a*c,M=o*s,y=o*l,g=o*c;return t[0]=1-(d+m),t[1]=u+g,t[2]=f-y,t[3]=0,t[4]=u-g,t[5]=1-(h+m),t[6]=p+M,t[7]=0,t[8]=f+y,t[9]=p-M,t[10]=1-(h+d),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}const y=(0,r.c)();function g(t,e,n,r){const i=e[0],a=e[1],o=e[2],s=e[3],l=i+i,c=a+a,h=o+o,u=i*l,f=i*c,d=i*h,p=a*c,m=a*h,M=o*h,y=s*l,g=s*c,x=s*h,_=r[0],b=r[1],w=r[2];return t[0]=(1-(p+M))*_,t[1]=(f+x)*_,t[2]=(d-g)*_,t[3]=0,t[4]=(f-x)*b,t[5]=(1-(u+M))*b,t[6]=(m+y)*b,t[7]=0,t[8]=(d+g)*w,t[9]=(m-y)*w,t[10]=(1-(u+p))*w,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function x(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function _(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function b(t,e){if(t===e)return!0;const n=t[0],r=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],h=t[7],u=t[8],f=t[9],d=t[10],p=t[11],m=t[12],M=t[13],y=t[14],g=t[15],x=e[0],_=e[1],b=e[2],w=e[3],v=e[4],S=e[5],B=e[6],R=e[7],X=e[8],Y=e[9],O=e[10],j=e[11],A=e[12],Z=e[13],C=e[14],P=e[15],z=(0,i.g)();return Math.abs(n-x)<=z*Math.max(1,Math.abs(n),Math.abs(x))&&Math.abs(r-_)<=z*Math.max(1,Math.abs(r),Math.abs(_))&&Math.abs(a-b)<=z*Math.max(1,Math.abs(a),Math.abs(b))&&Math.abs(o-w)<=z*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-v)<=z*Math.max(1,Math.abs(s),Math.abs(v))&&Math.abs(l-S)<=z*Math.max(1,Math.abs(l),Math.abs(S))&&Math.abs(c-B)<=z*Math.max(1,Math.abs(c),Math.abs(B))&&Math.abs(h-R)<=z*Math.max(1,Math.abs(h),Math.abs(R))&&Math.abs(u-X)<=z*Math.max(1,Math.abs(u),Math.abs(X))&&Math.abs(f-Y)<=z*Math.max(1,Math.abs(f),Math.abs(Y))&&Math.abs(d-O)<=z*Math.max(1,Math.abs(d),Math.abs(O))&&Math.abs(p-j)<=z*Math.max(1,Math.abs(p),Math.abs(j))&&Math.abs(m-A)<=z*Math.max(1,Math.abs(m),Math.abs(A))&&Math.abs(M-Z)<=z*Math.max(1,Math.abs(M),Math.abs(Z))&&Math.abs(y-C)<=z*Math.max(1,Math.abs(y),Math.abs(C))&&Math.abs(g-P)<=z*Math.max(1,Math.abs(g),Math.abs(P))}function w(t){const e=(0,i.g)(),n=t[0],r=t[1],a=t[2],o=t[4],s=t[5],l=t[6],c=t[8],h=t[9],u=t[10];return Math.abs(1-(n*n+o*o+c*c))<=e&&Math.abs(1-(r*r+s*s+h*h))<=e&&Math.abs(1-(a*a+l*l+u*u))<=e}function v(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const S=c,B=x;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},adjoint:function(t,e){const n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],h=e[8],u=e[9],f=e[10],d=e[11],p=e[12],m=e[13],M=e[14],y=e[15];return t[0]=s*(f*y-d*M)-u*(l*y-c*M)+m*(l*d-c*f),t[1]=-(r*(f*y-d*M)-u*(i*y-a*M)+m*(i*d-a*f)),t[2]=r*(l*y-c*M)-s*(i*y-a*M)+m*(i*c-a*l),t[3]=-(r*(l*d-c*f)-s*(i*d-a*f)+u*(i*c-a*l)),t[4]=-(o*(f*y-d*M)-h*(l*y-c*M)+p*(l*d-c*f)),t[5]=n*(f*y-d*M)-h*(i*y-a*M)+p*(i*d-a*f),t[6]=-(n*(l*y-c*M)-o*(i*y-a*M)+p*(i*c-a*l)),t[7]=n*(l*d-c*f)-o*(i*d-a*f)+h*(i*c-a*l),t[8]=o*(u*y-d*m)-h*(s*y-c*m)+p*(s*d-c*u),t[9]=-(n*(u*y-d*m)-h*(r*y-a*m)+p*(r*d-a*u)),t[10]=n*(s*y-c*m)-o*(r*y-a*m)+p*(r*c-a*s),t[11]=-(n*(s*d-c*u)-o*(r*d-a*u)+h*(r*c-a*s)),t[12]=-(o*(u*M-f*m)-h*(s*M-l*m)+p*(s*f-l*u)),t[13]=n*(u*M-f*m)-h*(r*M-i*m)+p*(r*f-i*u),t[14]=-(n*(s*M-l*m)-o*(r*M-i*m)+p*(r*l-i*s)),t[15]=n*(s*f-l*u)-o*(r*f-i*u)+h*(r*l-i*s),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},determinant:function(t){const e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],h=t[9],u=t[10],f=t[11],d=t[12],p=t[13],m=t[14],M=t[15];return(e*o-n*a)*(u*M-f*m)-(e*s-r*a)*(h*M-f*p)+(e*l-i*a)*(h*m-u*p)+(n*s-r*o)*(c*M-f*d)-(n*l-i*o)*(c*m-u*d)+(r*l-i*s)*(c*p-h*d)},equals:b,exactEquals:_,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,e){const n=e[0],r=e[1],i=e[2],a=e[3],o=n+n,s=r+r,l=i+i,c=n*o,h=r*o,u=r*s,f=i*o,d=i*s,p=i*l,m=a*o,M=a*s,y=a*l;return t[0]=1-u-p,t[1]=h+y,t[2]=f-M,t[3]=0,t[4]=h-y,t[5]=1-c-p,t[6]=d+m,t[7]=0,t[8]=f+M,t[9]=d-m,t[10]=1-c-u,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){const n=y,r=-e[0],i=-e[1],a=-e[2],o=e[3],s=e[4],l=e[5],c=e[6],h=e[7],u=r*r+i*i+a*a+o*o;return u>0?(n[0]=2*(s*o+h*r+l*a-c*i)/u,n[1]=2*(l*o+h*i+c*r-s*a)/u,n[2]=2*(c*o+h*a+s*i-l*r)/u):(n[0]=2*(s*o+h*r+l*a-c*i),n[1]=2*(l*o+h*i+c*r-s*a),n[2]=2*(c*o+h*a+s*i-l*r)),M(t,e,n),t},fromRotation:p,fromRotationTranslation:M,fromRotationTranslationScale:g,fromRotationTranslationScaleOrigin:function(t,e,n,r,i){const a=e[0],o=e[1],s=e[2],l=e[3],c=a+a,h=o+o,u=s+s,f=a*c,d=a*h,p=a*u,m=o*h,M=o*u,y=s*u,g=l*c,x=l*h,_=l*u,b=r[0],w=r[1],v=r[2],S=i[0],B=i[1],R=i[2],X=(1-(m+y))*b,Y=(d+_)*b,O=(p-x)*b,j=(d-_)*w,A=(1-(f+y))*w,Z=(M+g)*w,C=(p+x)*v,P=(M-g)*v,z=(1-(f+m))*v;return t[0]=X,t[1]=Y,t[2]=O,t[3]=0,t[4]=j,t[5]=A,t[6]=Z,t[7]=0,t[8]=C,t[9]=P,t[10]=z,t[11]=0,t[12]=n[0]+S-(X*S+j*B+C*R),t[13]=n[1]+B-(Y*S+A*B+P*R),t[14]=n[2]+R-(O*S+Z*B+z*R),t[15]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:d,fromXRotation:m,fromYRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,e,n,r,i,a,o){const s=1/(n-e),l=1/(i-r),c=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*l,t[10]=(o+a)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*c,t[15]=0,t},getRotation:function(t,e){const n=e[0]+e[5]+e[10];let r=0;return n>0?(r=2*Math.sqrt(n+1),t[3]=.25*r,t[0]=(e[6]-e[9])/r,t[1]=(e[8]-e[2])/r,t[2]=(e[1]-e[4])/r):e[0]>e[5]&&e[0]>e[10]?(r=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/r,t[0]=.25*r,t[1]=(e[1]+e[4])/r,t[2]=(e[8]+e[2])/r):e[5]>e[10]?(r=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/r,t[0]=(e[1]+e[4])/r,t[1]=.25*r,t[2]=(e[6]+e[9])/r):(r=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/r,t[0]=(e[8]+e[2])/r,t[1]=(e[6]+e[9])/r,t[2]=.25*r),t},getScaling:function(t,e){const n=e[0],r=e[1],i=e[2],a=e[4],o=e[5],s=e[6],l=e[8],c=e[9],h=e[10];return t[0]=Math.sqrt(n*n+r*r+i*i),t[1]=Math.sqrt(a*a+o*o+s*s),t[2]=Math.sqrt(l*l+c*c+h*h),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},hasIdentityRotation:v,identity:o,invert:l,invertOrIdentity:function(t,e){return l(t,e)||o(t),t},isOrthoNormal:w,lookAt:function(t,e,n,r){const a=e[0],s=e[1],l=e[2];let c=a-n[0],h=s-n[1],u=l-n[2];const f=(0,i.g)();if(Math.abs(c)<f&&Math.abs(h)<f&&Math.abs(u)<f)return void o(t);let d=1/Math.sqrt(c*c+h*h+u*u);c*=d,h*=d,u*=d;const p=r[0],m=r[1],M=r[2];let y=m*u-M*h,g=M*c-p*u,x=p*h-m*c;d=Math.sqrt(y*y+g*g+x*x),d?(d=1/d,y*=d,g*=d,x*=d):(y=0,g=0,x=0);let _=h*x-u*g,b=u*y-c*x,w=c*g-h*y;d=Math.sqrt(_*_+b*b+w*w),d?(d=1/d,_*=d,b*=d,w*=d):(_=0,b=0,w=0),t[0]=y,t[1]=_,t[2]=c,t[3]=0,t[4]=g,t[5]=b,t[6]=h,t[7]=0,t[8]=x,t[9]=w,t[10]=u,t[11]=0,t[12]=-(y*a+g*s+x*l),t[13]=-(_*a+b*s+w*l),t[14]=-(c*a+h*s+u*l),t[15]=1},mul:S,multiply:c,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},ortho:function(t,e,n,r,i,a,o){const s=1/(e-n),l=1/(r-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(o+a)*c,t[15]=1,t},perspective:function(t,e,n,r,i){const a=1/Math.tan(e/2);let o;return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t},perspectiveFromFieldOfView:function(t,e,n,r){const i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),l=2/(o+s),c=2/(i+a);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(o-s)*l*.5,t[9]=(i-a)*c*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},rotate:f,rotateX:function(t,e,n){const r=Math.sin(n),i=Math.cos(n),a=e[4],o=e[5],s=e[6],l=e[7],c=e[8],h=e[9],u=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*i+c*r,t[5]=o*i+h*r,t[6]=s*i+u*r,t[7]=l*i+f*r,t[8]=c*i-a*r,t[9]=h*i-o*r,t[10]=u*i-s*r,t[11]=f*i-l*r,t},rotateY:function(t,e,n){const r=Math.sin(n),i=Math.cos(n),a=e[0],o=e[1],s=e[2],l=e[3],c=e[8],h=e[9],u=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i-c*r,t[1]=o*i-h*r,t[2]=s*i-u*r,t[3]=l*i-f*r,t[8]=a*r+c*i,t[9]=o*r+h*i,t[10]=s*r+u*i,t[11]=l*r+f*i,t},rotateZ:function(t,e,n){const r=Math.sin(n),i=Math.cos(n),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],h=e[5],u=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i+c*r,t[1]=o*i+h*r,t[2]=s*i+u*r,t[3]=l*i+f*r,t[4]=c*i-a*r,t[5]=h*i-o*r,t[6]=u*i-s*r,t[7]=f*i-l*r,t},scale:u,set:a,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:B,subtract:x,targetTo:function(t,e,n,r){const i=e[0],a=e[1],o=e[2],s=r[0],l=r[1],c=r[2];let h=i-n[0],u=a-n[1],f=o-n[2],d=h*h+u*u+f*f;d>0&&(d=1/Math.sqrt(d),h*=d,u*=d,f*=d);let p=l*f-c*u,m=c*h-s*f,M=s*u-l*h;return d=p*p+m*m+M*M,d>0&&(d=1/Math.sqrt(d),p*=d,m*=d,M*=d),t[0]=p,t[1]=m,t[2]=M,t[3]=0,t[4]=u*M-f*m,t[5]=f*p-h*M,t[6]=h*m-u*p,t[7]=0,t[8]=h,t[9]=u,t[10]=f,t[11]=0,t[12]=i,t[13]=a,t[14]=o,t[15]=1,t},translate:h,transpose:s},Symbol.toStringTag,{value:"Module"}))},13598:(t,e,n)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function i(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}function a(t,e){return new Float64Array(t,e,16)}n.d(e,{I:()=>o,a:()=>r,b:()=>i,c:()=>a});const o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:i,create:r,createView:a,fromValues:function(t,e,n,r,i,a,o,s,l,c,h,u,f,d,p,m){return[t,e,n,r,i,a,o,s,l,c,h,u,f,d,p,m]}},Symbol.toStringTag,{value:"Module"}))},94961:(t,e,n)=>{function r(){return[0,0,0,1]}function i(t){return[t[0],t[1],t[2],t[3]]}function a(t,e){return new Float64Array(t,e,4)}n.d(e,{I:()=>o,a:()=>r,b:()=>i,c:()=>a});const o=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:i,create:r,createView:a,fromValues:function(t,e,n,r){return[t,e,n,r]}},Symbol.toStringTag,{value:"Module"}))},88764:(t,e,n)=>{n.d(e,{q:()=>l});var r,i,a,o=n(5732),s={exports:{}};r=s,i=function(){function t(n,r,i,a,o){for(;a>i;){if(a-i>600){var s=a-i+1,l=r-i+1,c=Math.log(s),h=.5*Math.exp(2*c/3),u=.5*Math.sqrt(c*h*(s-h)/s)*(l-s/2<0?-1:1);t(n,r,Math.max(i,Math.floor(r-l*h/s+u)),Math.min(a,Math.floor(r+(s-l)*h/s+u)),o)}var f=n[r],d=i,p=a;for(e(n,i,r),o(n[a],f)>0&&e(n,i,a);d<p;){for(e(n,d,p),d++,p--;o(n[d],f)<0;)d++;for(;o(n[p],f)>0;)p--}0===o(n[i],f)?e(n,i,p):e(n,++p,a),p<=r&&(i=p+1),r<=p&&(a=p-1)}}function e(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function n(t,e){return t<e?-1:t>e?1:0}return function(e,r,i,a,o){t(e,r,i||0,a||e.length-1,o||n)}},void 0!==(a=i())&&(r.exports=a);const l=(0,o.g)(s.exports)},20773:(t,e,n)=>{n.d(e,{a:()=>s,b:()=>o,c:()=>i,d:()=>h,e:()=>l,n:()=>u,s:()=>c,t:()=>a});var r=n(72220);function i(t,e,n){a(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function a(t,e,n,i=3,a=i){if(t.length/i!==Math.ceil(e.length/a))return r.c.error("source and destination buffers need to have the same number of elements"),t;const o=t.length/i,s=n[0],l=n[1],c=n[2],h=n[4],u=n[5],f=n[6],d=n[8],p=n[9],m=n[10],M=n[12],y=n[13],g=n[14];let x=0,_=0;for(let n=0;n<o;n++){const n=e[x],r=e[x+1],o=e[x+2];t[_]=s*n+h*r+d*o+M,t[_+1]=l*n+u*r+p*o+y,t[_+2]=c*n+f*r+m*o+g,x+=a,_+=i}return t}function o(t,e,n){s(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function s(t,e,n,i=3,a=i){if(t.length/i!==Math.ceil(e.length/a))return void r.c.error("source and destination buffers need to have the same number of elements");const o=t.length/i,s=n[0],l=n[1],c=n[2],h=n[3],u=n[4],f=n[5],d=n[6],p=n[7],m=n[8];let M=0,y=0;for(let n=0;n<o;n++){const n=e[M],r=e[M+1],o=e[M+2];t[y]=s*n+h*r+d*o,t[y+1]=l*n+u*r+p*o,t[y+2]=c*n+f*r+m*o,M+=a,y+=i}}function l(t,e,n){c(t.typedBuffer,e,n,t.typedBufferStride)}function c(t,e,n,r=3){const i=Math.min(t.length/r,e.count),a=e.typedBuffer,o=e.typedBufferStride;let s=0,l=0;for(let e=0;e<i;e++)t[l]=n*a[s],t[l+1]=n*a[s+1],t[l+2]=n*a[s+2],s+=o,l+=r}function h(t,e){u(t.typedBuffer,e.typedBuffer,t.typedBufferStride,e.typedBufferStride)}function u(t,e,n=3,r=n){const i=Math.min(t.length/n,e.length/r);let a=0,o=0;for(let s=0;s<i;s++){const i=e[a],s=e[a+1],l=e[a+2],c=i*i+s*s+l*l;if(c>0){const e=1/Math.sqrt(c);t[o]=e*i,t[o+1]=e*s,t[o+2]=e*l}a+=r,o+=n}}Object.freeze(Object.defineProperty({__proto__:null,normalize:u,normalizeView:h,scale:c,scaleView:l,shiftRight:function(t,e,n){const r=Math.min(t.count,e.count),i=t.typedBuffer,a=t.typedBufferStride,o=e.typedBuffer,s=e.typedBufferStride;let l=0,c=0;for(let t=0;t<r;t++)i[c]=o[l]>>n,i[c+1]=o[l+1]>>n,i[c+2]=o[l+2]>>n,l+=s,c+=a},transformMat3:s,transformMat3View:o,transformMat4:a,transformMat4View:i},Symbol.toStringTag,{value:"Module"}))},2368:(t,e,n)=>{n.d(e,{J:()=>h,j:()=>u});var r=n(43697),i=n(92036),a=(n(80442),n(22974)),o=(n(92604),n(70586)),s=n(31263),l=n(1153),c=n(52011);const h=t=>{let e=class extends t{clone(){const t=(0,l.vw)(this);(0,o.O3)(t,"unable to clone instance of non-accessor class");const e=t.metadatas,n=t.store,r={},i=new Map;for(const t in e){const o=e[t],l=n?.originOf(t),c=o.clonable;if(o.readOnly||!1===c||l!==s.s3.USER&&l!==s.s3.DEFAULTS&&l!==s.s3.WEB_MAP&&l!==s.s3.WEB_SCENE)continue;const h=this[t];let u=null;u="function"==typeof c?c(h):"reference"===c?h:(0,a.Vo)(h),null!=h&&null==u||(l===s.s3.DEFAULTS?i.set(t,u):r[t]=u)}const c=new(0,Object.getPrototypeOf(this).constructor)(r);if(i.size){const t=(0,l.vw)(c)?.store;if(t)for(const[e,n]of i)t.set(e,n,s.s3.DEFAULTS)}return c}};return e=(0,r._)([(0,c.j)("esri.core.Clonable")],e),e};let u=class extends(h(i.Z)){};u=(0,r._)([(0,c.j)("esri.core.Clonable")],u)},90578:(t,e,n)=>{n.d(e,{p:()=>l});var r=n(75215),i=n(7628);const a=Object.prototype.toString;function o(t){const e="__accessorMetadata__"in t?(0,r.se)(t):t;return function(...t){if(t.push(e),"number"==typeof t[2])throw new Error("Using @cast has parameter decorator is not supported since 4.16");return s.apply(this,t)}}function s(t,e,n,r){(0,i.Oe)(t,e).cast=r}function l(...t){if(3!==t.length||"string"!=typeof t[1])return 1===t.length&&"[object Function]"===a.call(t[0])?o(t[0]):1===t.length&&"string"==typeof t[0]?function(t){return(e,n)=>{(0,i.Oe)(e,t).cast=e[n]}}(t[0]):void 0}},36030:(t,e,n)=>{n.d(e,{J:()=>a});var r=n(35454),i=n(5600);function a(t,e={}){const n=t instanceof r.X?t:new r.X(t,e),a={type:e?.ignoreUnknown??1?n.apiValues:String,json:{type:n.jsonValues,read:!e?.readOnly&&{reader:n.read},write:{writer:n.write}}};return void 0!==e?.readOnly&&(a.readOnly=!!e.readOnly),void 0!==e?.default&&(a.json.default=e.default),void 0!==e?.name&&(a.json.name=e.name),void 0!==e?.nonNullable&&(a.nonNullable=e.nonNullable),(0,i.Cb)(a)}},71715:(t,e,n)=>{n.d(e,{r:()=>i});var r=n(5600);function i(t,e,n){let i,a;return void 0===e||Array.isArray(e)?(a=t,n=e,i=[void 0]):(a=e,i=Array.isArray(t)?t:[t]),(t,e)=>{const o=t.constructor.prototype;i.forEach((i=>{const s=(0,r.CJ)(t,i,a);s.read&&"object"==typeof s.read||(s.read={}),s.read.reader=o[e],n&&(s.read.source=(s.read.source||[]).concat(n))}))}}},10661:(t,e,n)=>{n.d(e,{s:()=>i});var r=n(42100);class i extends r.s{notify(){const t=this._observers;if(t&&t.length>0){const e=t.slice();for(const t of e)t.onInvalidated(),t.onCommitted()}}}},24133:(t,e,n)=>{n.d(e,{Q:()=>o});var r=n(67676),i=n(44553),a=n(88764);class o{constructor(t=9,e){this._compareMinX=h,this._compareMinY=u,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),x.prune(),_.prune(),b.prune(),w.prune()}all(t){this._all(this._data,t)}search(t,e){let n=this._data;const r=this._toBBox;if(y(t,n))for(x.clear();n;){for(let i=0,a=n.children.length;i<a;i++){const a=n.children[i],o=n.leaf?r(a):a;y(t,o)&&(n.leaf?e(a):M(t,o)?this._all(a,e):x.push(a))}n=x.pop()}}collides(t){let e=this._data;const n=this._toBBox;if(!y(t,e))return!1;for(x.clear();e;){for(let r=0,i=e.children.length;r<i;r++){const i=e.children[r],a=e.leaf?n(i):i;if(y(t,a)){if(e.leaf||M(t,a))return!0;x.push(i)}}e=x.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,n=t.length;e<n;e++)this.insert(t[e]);return this}let e=this._build(t.slice(0,t.length),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){const t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new B([]),this}remove(t){if(!t)return this;let e,n=this._data,i=null,a=0,o=!1;const s=this._toBBox(t);for(b.clear(),w.clear();n||b.length>0;){if(n||(n=b.pop(),i=b.data[b.length-1],a=w.pop()??0,o=!0),n.leaf&&(e=(0,r.cq)(n.children,t,n.children.length,n.indexHint),-1!==e))return n.children.splice(e,1),b.push(n),this._condense(b),this;o||n.leaf||!M(n,s)?i?(a++,n=i.children[a],o=!1):n=null:(b.push(n),w.push(a),a=0,i=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_all(t,e){let n=t;for(_.clear();n;){if(!0===n.leaf)for(const t of n.children)e(t);else _.pushArray(n.children);n=_.pop()??null}}_build(t,e,n,r){const i=n-e+1;let a=this._maxEntries;if(i<=a){const r=new B(t.slice(e,n+1));return s(r,this._toBBox),r}r||(r=Math.ceil(Math.log(i)/Math.log(a)),a=Math.ceil(i/a**(r-1)));const o=new R([]);o.height=r;const l=Math.ceil(i/a),c=l*Math.ceil(Math.sqrt(a));g(t,e,n,c,this._compareMinX);for(let i=e;i<=n;i+=c){const e=Math.min(i+c-1,n);g(t,i,e,l,this._compareMinY);for(let n=i;n<=e;n+=l){const i=Math.min(n+l-1,e);o.children.push(this._build(t,n,i,r-1))}}return s(o,this._toBBox),o}_chooseSubtree(t,e,n,r){for(;r.push(e),!0!==e.leaf&&r.length-1!==n;){let n,r=1/0,i=1/0;for(let a=0,o=e.children.length;a<o;a++){const o=e.children[a],s=f(o),l=p(t,o)-s;l<i?(i=l,r=s<r?s:r,n=o):l===i&&s<r&&(r=s,n=o)}e=n||e.children[0]}return e}_insert(t,e,n){const r=this._toBBox,i=n?t:r(t);b.clear();const a=this._chooseSubtree(i,this._data,e,b);for(a.children.push(t),c(a,i);e>=0&&b.data[e].children.length>this._maxEntries;)this._split(b,e),e--;this._adjustParentBBoxes(i,b,e)}_split(t,e){const n=t.data[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);const a=this._chooseSplitIndex(n,i,r);if(!a)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=n.children.splice(a,n.children.length-a),l=n.leaf?new B(o):new R(o);l.height=n.height,s(n,this._toBBox),s(l,this._toBBox),e?t.data[e-1].children.push(l):this._splitRoot(n,l)}_splitRoot(t,e){this._data=new R([t,e]),this._data.height=t.height+1,s(this._data,this._toBBox)}_chooseSplitIndex(t,e,n){let r,i,a;r=i=1/0;for(let o=e;o<=n-e;o++){const e=l(t,0,o,this._toBBox),s=l(t,o,n,this._toBBox),c=m(e,s),h=f(e)+f(s);c<r?(r=c,a=o,i=h<i?h:i):c===r&&h<i&&(i=h,a=o)}return a}_chooseSplitAxis(t,e,n){const r=t.leaf?this._compareMinX:h,i=t.leaf?this._compareMinY:u;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)}_allDistMargin(t,e,n,r){t.children.sort(r);const i=this._toBBox,a=l(t,0,e,i),o=l(t,n-e,n,i);let s=d(a)+d(o);for(let r=e;r<n-e;r++){const e=t.children[r];c(a,t.leaf?i(e):e),s+=d(a)}for(let r=n-e-1;r>=e;r--){const e=t.children[r];c(o,t.leaf?i(e):e),s+=d(o)}return s}_adjustParentBBoxes(t,e,n){for(let r=n;r>=0;r--)c(e.data[r],t)}_condense(t){for(let e=t.length-1;e>=0;e--){const n=t.data[e];if(0===n.children.length)if(e>0){const i=t.data[e-1],a=i.children;a.splice((0,r.cq)(a,n,a.length,i.indexHint),1)}else this.clear();else s(n,this._toBBox)}}_initFormat(t){const e=["return a"," - b",";"];this._compareMinX=new Function("a","b",e.join(t[0])),this._compareMinY=new Function("a","b",e.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function s(t,e){l(t,0,t.children.length,e,t)}function l(t,e,n,r,i){i||(i=new B([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let a,o=e;o<n;o++)a=t.children[o],c(i,t.leaf?r(a):a);return i}function c(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function h(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function d(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function m(t,e){const n=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),a=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,a-r)}function M(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function y(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function g(t,e,n,r,i){const o=[e,n];for(;o.length;){const e=o.pop(),n=o.pop();if(e-n<=r)continue;const s=n+Math.ceil((e-n)/r/2)*r;(0,a.q)(t,s,n,e,i),o.push(n,s,s,e)}}const x=new i.Z,_=new i.Z,b=new i.Z,w=new i.Z({deallocator:void 0});class v{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class S extends v{constructor(){super(...arguments),this.height=1,this.indexHint=new r.SO}}class B extends S{constructor(t){super(),this.children=t,this.leaf=!0}}class R extends S{constructor(t){super(),this.children=t,this.leaf=!1}}},9361:(t,e,n)=>{n.d(e,{Z:()=>h});var r=n(43697),i=n(96674),a=n(5600),o=(n(75215),n(67676),n(80442),n(71715)),s=n(52011),l=n(82971);let c=class extends i.wq{constructor(...t){super(...t),this.type=null,this.hasM=!1,this.hasZ=!1,this.spatialReference=l.Z.WGS84}get cache(){return this.commitProperty("spatialReference"),{}}get extent(){return null}readSpatialReference(t,e){if(t instanceof l.Z)return t;if(null!=t){const n=new l.Z;return n.read(t,e),n}return t}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}clearCache(){this.notifyChange("cache")}getCacheValue(t){return this.cache[t]}setCacheValue(t,e){this.cache[t]=e}};(0,r._)([(0,a.Cb)()],c.prototype,"type",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],c.prototype,"cache",null),(0,r._)([(0,a.Cb)({readOnly:!0})],c.prototype,"extent",null),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],c.prototype,"hasM",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],c.prototype,"hasZ",void 0),(0,r._)([(0,a.Cb)({type:l.Z,json:{write:!0},value:l.Z.WGS84})],c.prototype,"spatialReference",void 0),(0,r._)([(0,o.r)("spatialReference")],c.prototype,"readSpatialReference",null),c=(0,r._)([(0,s.j)("esri.geometry.Geometry")],c);const h=c},94139:(t,e,n)=>{n.d(e,{Z:()=>x});var r,i=n(43697),a=n(92604),o=n(5600),s=n(90578),l=(n(67676),n(80442),n(71715)),c=n(52011),h=n(30556),u=n(75215),f=n(9361),d=n(82971),p=n(8744),m=n(40488);const M=[0,0];function y(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}let g=r=class extends f.Z{static copy(t,e){e._set("x",t._get("x")),e._set("y",t._get("y")),e._set("z",t._get("z")),e._set("m",t._get("m"));const n=t._get("spatialReference");e._set("spatialReference",Object.isFrozen(n)?n:n.clone())}constructor(...t){super(...t),this.x=0,this.y=0,this.z=void 0,this.m=void 0,this.type="point"}normalizeCtorArgs(t,e,n,r,i){let o;if(Array.isArray(t))o=t,i=e,t=o[0],e=o[1],n=o[2],r=o[3];else if(t&&"object"==typeof t){if(o=t,t=null!=o.x?o.x:o.longitude,e=null!=o.y?o.y:o.latitude,n=o.z,r=o.m,(i=o.spatialReference)&&"esri.geometry.SpatialReference"!==i.declaredClass&&(i=new d.Z(i)),null!=o.longitude||null!=o.latitude)if(null==o.longitude)a.Z.getLogger(this).warn(".longitude=","Latitude was defined without longitude");else if(null==o.latitude)a.Z.getLogger(this).warn(".latitude=","Longitude was defined without latitude");else if(!o.declaredClass&&i&&i.isWebMercator){const n=(0,m.hG)(o.longitude,o.latitude,M);t=n[0],e=n[1]}}else y(n)?(i=n,n=null):y(r)&&(i=r,r=null);const s={x:t,y:e};return null==s.x&&null!=s.y?a.Z.getLogger(this).warn(".y=","Y coordinate was defined without an X coordinate"):null==s.y&&null!=s.x&&a.Z.getLogger(this).warn(".x=","X coordinate was defined without a Y coordinate"),null!=i&&(s.spatialReference=i),null!=n&&(s.z=n),null!=r&&(s.m=r),s}get cache(){return this.commitProperty("x"),this.commitProperty("y"),this.commitProperty("z"),this.commitProperty("m"),this.commitProperty("spatialReference"),{}}get hasM(){return void 0!==this.m}set hasM(t){t!==(void 0!==this._get("m"))&&(this._set("m",t?0:void 0),this._set("hasM",t))}get hasZ(){return void 0!==this.z}set hasZ(t){t!==(void 0!==this._get("z"))&&(this._set("z",t?0:void 0),this._set("hasZ",t))}get latitude(){const{spatialReference:t,x:e,y:n}=this;if(t){if(t.isWebMercator)return(0,m.R6)(e,n,M)[1];if(t.isGeographic)return n}return null}set latitude(t){const{spatialReference:e,x:n}=this;null!=t&&e&&(e.isWebMercator?this._set("y",(0,m.hG)(n,t,M)[1]):e.isGeographic&&this._set("y",t),this._set("latitude",t))}get longitude(){const{x:t,y:e,spatialReference:n}=this;if(n){if(n.isWebMercator)return(0,m.R6)(t,e,M)[0];if(n.isGeographic)return t}return null}set longitude(t){const{y:e,spatialReference:n}=this;null!=t&&n&&(n.isWebMercator?this._set("x",(0,m.hG)(t,e,M)[0]):n.isGeographic&&this._set("x",t),this._set("longitude",t))}writeX(t,e,n){e[n]=isNaN(t)?"NaN":t}readX(t){return"string"==typeof t?NaN:t}clone(){const t=new r;return t.x=this.x,t.y=this.y,t.z=this.z,t.m=this.m,t.spatialReference=this.spatialReference,t}copy(t){return r.copy(t,this),this}equals(t){if(null==t)return!1;const{x:e,y:n,z:r,m:i,spatialReference:a}=this,{z:o,m:s}=t;let{x:l,y:c,spatialReference:h}=t;if(!a.equals(h))if(a.isWebMercator&&h.isWGS84)[l,c]=(0,m.hG)(l,c),h=a;else{if(!a.isWGS84||!h.isWebMercator)return!1;[l,c]=(0,m.R6)(l,c),h=a}return e===l&&n===c&&r===o&&i===s&&a.wkid===h.wkid}offset(t,e,n){return this.x+=t,this.y+=e,null!=n&&(this.z=(this.z??0)+n),this}normalize(){if(!this.spatialReference)return this;const t=(0,p.C5)(this.spatialReference);if(!t)return this;let e=this.x;const[n,r]=t.valid,i=2*r;let a;return e>r?(a=Math.ceil(Math.abs(e-r)/i),e-=a*i):e<n&&(a=Math.ceil(Math.abs(e-n)/i),e+=a*i),this._set("x",e),this}distance(t){return function(t,e){const n=t.x-e.x,r=t.y-e.y,i=t.hasZ&&e.hasZ?t.z-e.z:0;return Math.sqrt(n*n+r*r+i*i)}(this,t)}toArray(){const t=this.hasZ,e=this.hasM;return t&&e?[this.x,this.y,this.z,this.m]:t?[this.x,this.y,this.z]:e?[this.x,this.y,this.m]:[this.x,this.y]}toJSON(t){return this.write({},t)}};(0,i._)([(0,o.Cb)({readOnly:!0})],g.prototype,"cache",null),(0,i._)([(0,o.Cb)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],g.prototype,"hasM",null),(0,i._)([(0,o.Cb)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],g.prototype,"hasZ",null),(0,i._)([(0,o.Cb)({type:Number})],g.prototype,"latitude",null),(0,i._)([(0,o.Cb)({type:Number})],g.prototype,"longitude",null),(0,i._)([(0,o.Cb)({type:Number,json:{type:[Number,String],write:{isRequired:!0,allowNull:!0}}}),(0,s.p)((t=>isNaN(t)?t:(0,u.q9)(t)))],g.prototype,"x",void 0),(0,i._)([(0,h.c)("x")],g.prototype,"writeX",null),(0,i._)([(0,l.r)("x")],g.prototype,"readX",null),(0,i._)([(0,o.Cb)({type:Number,json:{write:!0}})],g.prototype,"y",void 0),(0,i._)([(0,o.Cb)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasZ}}}}})],g.prototype,"z",void 0),(0,i._)([(0,o.Cb)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasM}}}}})],g.prototype,"m",void 0),g=r=(0,i._)([(0,c.j)("esri.geometry.Point")],g),g.prototype.toJSON.isDefaultToJSON=!0;const x=g},62155:(t,e,n)=>{var r;n.d(e,{R:()=>r}),function(t){t[t.X=0]="X",t[t.Y=1]="Y",t[t.Z=2]="Z"}(r||(r={}))},83025:(t,e,n)=>{n.d(e,{JK:()=>s,QZ:()=>a,Rq:()=>o,bg:()=>i,mB:()=>l});var r=n(1533);function i(t,e=!1){return t<=r.c8?e?new Array(t).fill(0):new Array(t):new Float64Array(t)}function a(t){return((0,r.kJ)(t)?t.length:t.byteLength/8)<=r.c8?Array.from(t):new Float64Array(t)}function o(t,e,n){return Array.isArray(t)?t.slice(e,e+n):t.subarray(e,e+n)}function s(t,e){for(let n=0;n<e.length;++n)t[n]=e[n];return t}function l(t){return Array.isArray(t)?new Float64Array(t):t}},85872:(t,e,n)=>{n.d(e,{Z:()=>f});var r=n(43697),i=n(2368),a=n(96674),o=n(5600),s=(n(75215),n(67676),n(80442),n(36030)),l=n(52011),c=n(65617),h=n(94139);let u=class extends((0,i.J)(a.wq)){constructor(t){super(t),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=(0,c.c)()}getOriginPoint(t){const[e,n,r]=this.origin;return new h.Z({x:e,y:n,z:r,spatialReference:t})}setOriginFromPoint({x:t,y:e,z:n}){this.origin=(0,c.f)(t,e,n??0)}};(0,r._)([(0,s.J)({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],u.prototype,"type",void 0),(0,r._)([(0,o.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],u.prototype,"origin",void 0),u=(0,r._)([(0,l.j)("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],u);const f=u},84555:(t,e,n)=>{n.d(e,{Z:()=>f});var r=n(43697),i=n(2368),a=n(96674),o=n(5600),s=(n(75215),n(67676),n(80442),n(36030)),l=n(52011),c=n(65617),h=n(94139);let u=class extends((0,i.J)(a.wq)){constructor(t){super(t),this.type="local",this.isRelative=!0,this.isGeoreferenced=!1,this.origin=(0,c.c)()}getOriginPoint(t){const[e,n,r]=this.origin;return new h.Z({x:e,y:n,z:r,spatialReference:t})}setOriginFromPoint({x:t,y:e,z:n}){this.origin=(0,c.f)(t,e,n??0)}};(0,r._)([(0,s.J)({local:"local"},{readOnly:!0})],u.prototype,"type",void 0),(0,r._)([(0,o.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],u.prototype,"origin",void 0),u=(0,r._)([(0,l.j)("esri.geometry.support.MeshLocalVertexSpace")],u);const f=u},72220:(t,e,n)=>{n.d(e,{c:()=>r});const r=n(92604).Z.getLogger("esri.views.3d.support.buffer.math")},61787:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});var r=n(80442),i=n(24133),a=n(66459);class o{async createIndex(t,e){const n=new Array;if(!t.vertexAttributes||!t.vertexAttributes.position)return new i.Q;const r=this._createMeshData(t),a=null!=e?await e.invoke("createIndexThread",r,{transferList:n}):this.createIndexThread(r).result;return this._createPooledRBush().fromJSON(a)}createIndexThread(t){const e=new Float64Array(t.position),n=this._createPooledRBush();return t.components?this._createIndexComponentsThread(n,e,t.components.map((t=>new Uint32Array(t)))):this._createIndexAllThread(n,e)}_createIndexAllThread(t,e){const n=new Array(e.length/9);let r=0;for(let t=0;t<e.length;t+=9)n[r++]=s(e,t,t+3,t+6);return t.load(n),{result:t.toJSON()}}_createIndexComponentsThread(t,e,n){let r=0;for(const t of n)r+=t.length/3;const i=new Array(r);let a=0;for(const t of n)for(let n=0;n<t.length;n+=3)i[a++]=s(e,3*t[n],3*t[n+1],3*t[n+2]);return t.load(i),{result:t.toJSON()}}_createMeshData(t){const e=(t.vertexSpace.isRelative?(0,a.I5)({position:t.vertexAttributes.position,normal:null,tangent:null},t.vertexSpace,t.transform,t.spatialReference).position:t.vertexAttributes.position).buffer;return!t.components||t.components.some((t=>!t.faces))?{position:e}:{position:e,components:t.components.map((t=>t.faces))}}_createPooledRBush(){return new i.Q(9,(0,r.Z)("esri-csp-restrictions")?t=>t:[".minX",".minY",".maxX",".maxY"])}}function s(t,e,n,r){return{minX:Math.min(t[e],t[n],t[r]),maxX:Math.max(t[e],t[n],t[r]),minY:Math.min(t[e+1],t[n+1],t[r+1]),maxY:Math.max(t[e+1],t[n+1],t[r+1]),p0:[t[e],t[e+1],t[e+2]],p1:[t[n],t[n+1],t[n+2]],p2:[t[r],t[r+1],t[r+2]]}}},40488:(t,e,n)=>{n.d(e,{$:()=>x,Q8:()=>m,R6:()=>g,Sx:()=>_,hG:()=>y,iV:()=>M,mZ:()=>u});var r=n(22974),i=n(82971),a=n(68441),o=n(8744);const s=57.29577951308232,l=.017453292519943;function c(t){return t*s}function h(t){return t*l}function u(t){return Math.PI/2-2*Math.atan(Math.exp(-t/a.sv.radius))}function f(t){return null!=t.wkid||null!=t.wkt}const d=[0,0];function p(t,e,n,r,i){const a=t,o=i;if(o.spatialReference=n,"x"in a&&"x"in o)[o.x,o.y]=e(a.x,a.y,d,r);else if("xmin"in a&&"xmin"in o)[o.xmin,o.ymin]=e(a.xmin,a.ymin,d,r),[o.xmax,o.ymax]=e(a.xmax,a.ymax,d,r);else if("paths"in a&&"paths"in o||"rings"in a&&"rings"in o){const t="paths"in a?a.paths:a.rings,n=[];let i;for(let a=0;a<t.length;a++){const o=t[a];i=[],n.push(i);for(let t=0;t<o.length;t++)i.push(e(o[t][0],o[t][1],[0,0],r)),o[t].length>2&&i[t].push(o[t][2]),o[t].length>3&&i[t].push(o[t][3])}"paths"in o?o.paths=n:o.rings=n}else if("points"in a&&"points"in o){const t=a.points,n=[];for(let i=0;i<t.length;i++)n[i]=e(t[i][0],t[i][1],[0,0],r),t[i].length>2&&n[i].push(t[i][2]),t[i].length>3&&n[i].push(t[i][3]);o.points=n}return i}function m(t,e){const n=t&&(f(t)?t:t.spatialReference),r=e&&(f(e)?e:e.spatialReference);return!(t&&"type"in t&&"mesh"===t.type||e&&"type"in e&&"mesh"===e.type||!n||!r)&&(!!(0,o.fS)(r,n)||(0,o.sS)(r)&&(0,o.oR)(n)||(0,o.sS)(n)&&(0,o.oR)(r))}function M(t,e){if(null==t)return null;const n=t.spatialReference,a=e&&(f(e)?e:e.spatialReference);return m(n,a)?(0,o.fS)(n,a)?(0,r.d9)(t):(0,o.sS)(a)?p(t,y,i.Z.WebMercator,!1,(0,r.d9)(t)):(0,o.oR)(a)?p(t,g,i.Z.WGS84,!1,(0,r.d9)(t)):null:null}function y(t,e,n=[0,0]){e>89.99999?e=89.99999:e<-89.99999&&(e=-89.99999);const r=h(e);return n[0]=h(t)*a.sv.radius,n[1]=a.sv.halfSemiMajorAxis*Math.log((1+Math.sin(r))/(1-Math.sin(r))),n}function g(t,e,n=[0,0],r=!1){const i=c(t/a.sv.radius);return n[0]=r?i:i-360*Math.floor((i+180)/360),n[1]=c(Math.PI/2-2*Math.atan(Math.exp(-e/a.sv.radius))),n}function x(t,e=!1,n=(0,r.d9)(t)){return p(t,y,i.Z.WebMercator,e,n)}function _(t,e=!1,n=(0,r.d9)(t)){return p(t,g,i.Z.WGS84,e,n)}}}]);