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

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 (313) hide show
  1. package/Graphic.js +1 -1
  2. package/arcade/ArcadeDate.js +1 -1
  3. package/arcade/Feature.js +1 -1
  4. package/arcade/featureSetUtils.js +1 -1
  5. package/arcade/featureset/actions/Adapted.js +1 -1
  6. package/arcade/featureset/actions/GroupBy.js +1 -1
  7. package/arcade/featureset/support/FeatureSet.js +1 -1
  8. package/arcade/featureset/support/FeatureSetIterator.js +1 -1
  9. package/arcade/featureset/support/StatsField.js +1 -1
  10. package/arcade/featureset/support/sqlUtils.js +1 -1
  11. package/arcade/functions/date.js +1 -1
  12. package/arcade/functions/featuresetbase.js +1 -1
  13. package/arcade/functions/featuresetstats.js +1 -1
  14. package/arcade.js +1 -1
  15. package/assets/esri/core/workers/RemoteClient.js +1 -1
  16. package/assets/esri/core/workers/chunks/{2cb36f9686693234991a.js → 07a2dab2f645dcd7d8d6.js} +1 -1
  17. package/assets/esri/core/workers/chunks/07f6175b52366b2c28bd.js +1 -0
  18. package/assets/esri/core/workers/chunks/098073c3b2849f56dad8.js +1 -0
  19. package/assets/esri/core/workers/chunks/{580039dd491854ca325c.js → 21fc02f0d5716c4a7acd.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{072b4e041b8630c513a0.js → 243b1f9b2fba02946481.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{dff1c3c38dda2bd1a9d6.js → 246a954347fe9318190e.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{314c307e30f308a40a28.js → 25b09e9c0511c8e1cf8a.js} +1 -1
  23. package/assets/esri/core/workers/chunks/28a5ef2e2daa4207dd8b.js +1 -0
  24. package/assets/esri/core/workers/chunks/2b017e1aa1be71974c2e.js +1 -0
  25. package/assets/esri/core/workers/chunks/425b5733bb88e6efe242.js +1 -0
  26. package/assets/esri/core/workers/chunks/{c9dfb145f0c1d93e0fbd.js → 4bcca5fffb1fcc2d4353.js} +1 -1
  27. package/assets/esri/core/workers/chunks/4bf1a7e82a68ccee0ee1.js +1 -0
  28. package/assets/esri/core/workers/chunks/4c110c7f4f940ec58010.js +1 -0
  29. package/assets/esri/core/workers/chunks/{bde89b2684b6185992ef.js → 4ed77097e69fa3096ce4.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{1cbaba30f55f00f7498b.js → 51324d042f469f3b8914.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{3f4e9b1663ec521bfe00.js → 542ce10e1872399790b4.js} +1 -1
  32. package/assets/esri/core/workers/chunks/54d2b7e2ac4ba883bee8.js +1 -0
  33. package/assets/esri/core/workers/chunks/54ecb6cae310818d1aa2.js +1 -0
  34. package/assets/esri/core/workers/chunks/57c932e289d89d97da4b.js +1 -0
  35. package/assets/esri/core/workers/chunks/{6403de6fc067cf8f7436.js → 592c1fb531f2be928e8a.js} +1 -1
  36. package/assets/esri/core/workers/chunks/609a475ab395f2ce63e2.js +1 -0
  37. package/assets/esri/core/workers/chunks/{332689bf60d246485993.js → 65186e168dd112ac6221.js} +1 -1
  38. package/assets/esri/core/workers/chunks/6b9248fb2d6aadbce7bb.js +1 -0
  39. package/assets/esri/core/workers/chunks/709465832d306e02df52.js +1 -0
  40. package/assets/esri/core/workers/chunks/{bbc0dcd316c5598bc9ad.js → 74368a5213def6c200a2.js} +1 -1
  41. package/assets/esri/core/workers/chunks/78e7af899d9d50aa7e74.js +1 -0
  42. package/assets/esri/core/workers/chunks/7fe641cf1467496e670a.js +1 -0
  43. package/assets/esri/core/workers/chunks/{df8f62beb36fb9d2ac81.js → 810c8d6ff19976fd1366.js} +1 -1
  44. package/assets/esri/core/workers/chunks/83a15aa4b1c5252c651b.js +1 -0
  45. package/assets/esri/core/workers/chunks/85e436decdd693f240ee.js +1 -0
  46. package/assets/esri/core/workers/chunks/{243a4eed107d363dfad8.js → 887652bbdb3b71d0a089.js} +1 -1
  47. package/assets/esri/core/workers/chunks/896bfda379cf620b63ec.js +1 -0
  48. package/assets/esri/core/workers/chunks/{1f7e041140088f8ac489.js → 97073a60f0ea2a397165.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{101f776316a85b708927.js → a99070ec4c06c435b744.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{21a9c8aa2a9e9990df41.js → b499b4fa771e8c422b43.js} +1 -1
  51. package/assets/esri/core/workers/chunks/bffad8aec92f982cc75a.js +1 -0
  52. package/assets/esri/core/workers/chunks/d414dba3179bcf75bc6b.js +1 -0
  53. package/assets/esri/core/workers/chunks/{b449d6bd5851187d419f.js → d6e5408f9fa6b4bcd118.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{3ca759f72d3bb29e9ea9.js → e14da83329f7771135bc.js} +2 -2
  55. package/assets/esri/core/workers/chunks/{f508ccfde6425dabe9ac.js → ee0bf611d191103a7046.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{ed1fbc1bc8d50453e2f5.js → f793cd41fcd022baeea2.js} +1 -1
  57. package/assets/esri/core/workers/chunks/fb87fd64411b78afea23.js +1 -0
  58. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +2 -0
  59. package/assets/esri/themes/dark/main.css +1 -1
  60. package/assets/esri/themes/light/main.css +1 -1
  61. package/assets/esri/themes/light/view.css +1 -1
  62. package/config.js +1 -1
  63. package/core/Accessor.js +1 -1
  64. package/core/has.js +1 -1
  65. package/core/sql/DateOnly.js +1 -1
  66. package/core/sql/WhereClause.js +1 -1
  67. package/core/sql.js +1 -1
  68. package/identity/IdentityForm.js +1 -1
  69. package/identity/IdentityModal.js +1 -1
  70. package/interfaces.d.ts +28 -199
  71. package/layers/OrientedImageryLayer.js +1 -1
  72. package/layers/graphics/applyEditsUtils.js +5 -0
  73. package/layers/graphics/editingSupport.js +1 -1
  74. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  75. package/layers/mixins/EditBusLayer.js +1 -1
  76. package/layers/orientedImagery/core/CameraOrientationLTP.js +1 -1
  77. package/layers/orientedImagery/core/ElevationSourceDefinitions.js +5 -0
  78. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  79. package/layers/orientedImagery/core/cameraOrientationFactory.js +1 -1
  80. package/layers/orientedImagery/core/utils.js +5 -0
  81. package/layers/orientedImagery/transformations/groundToImageUtils.js +1 -1
  82. package/layers/support/fieldProperties.js +1 -1
  83. package/networks/Network.js +1 -1
  84. package/package.json +1 -1
  85. package/rest/featureService/FeatureService.js +1 -1
  86. package/support/arcadeUtils.js +1 -1
  87. package/support/revision.js +1 -1
  88. package/symbols/support/svgUtils.js +1 -1
  89. package/versionManagement/VersionManagementService.js +1 -1
  90. package/versionManagement/support/EditMomentStack.js +5 -0
  91. package/versionManagement/support/versionManagementUtils.js +1 -1
  92. package/views/2d/engine/Container.js +1 -1
  93. package/views/2d/engine/DisplayObject.js +1 -1
  94. package/views/2d/engine/ManagedCanvas.js +5 -0
  95. package/views/2d/engine/Stage.js +1 -1
  96. package/views/2d/engine/webgl/GroupContainer.js +1 -1
  97. package/views/2d/engine/webgl/Painter.js +1 -1
  98. package/views/2d/engine/webgl/WGLContainer.js +1 -1
  99. package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
  100. package/views/2d/engine/webgl/effects/FeatureEffect.js +1 -1
  101. package/views/2d/engine/webgl/effects/HighlightEffect.js +1 -1
  102. package/views/2d/engine/webgl/effects/HittestEffectVTL.js +1 -1
  103. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  104. package/views/2d/layers/MediaLayerView2D.js +1 -1
  105. package/views/2d/layers/TileLayerView2D.js +1 -1
  106. package/views/2d/layers/features/tileRenderers/support/WGLFeatureView.js +1 -1
  107. package/views/2d/layers/graphics/BaseGraphicContainer.js +1 -1
  108. package/views/2d/layers/graphics/GraphicContainer.js +1 -1
  109. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  110. package/views/2d/layers/graphics/HighlightGraphicContainer.js +1 -1
  111. package/views/2d/layers/support/DisplayGL.js +1 -1
  112. package/views/2d/webglDeps.js +1 -1
  113. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  114. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  115. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  116. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  117. package/views/3d/layers/SceneLayerView3D.js +1 -1
  118. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  119. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  120. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  121. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  122. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  123. package/views/3d/layers/graphics/Labeler.js +1 -1
  124. package/views/3d/layers/graphics/graphicUtils.js +1 -1
  125. package/views/3d/layers/i3s/featureEditing.js +1 -1
  126. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  127. package/views/3d/support/buffer/glUtil.js +1 -1
  128. package/views/3d/support/engineContent/line.js +1 -1
  129. package/views/3d/support/viewpointUtils.js +1 -1
  130. package/views/3d/webgl-engine/Stage.js +1 -1
  131. package/views/3d/webgl-engine/effects/RenderPluginInput.js +1 -1
  132. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  133. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  134. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  135. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  136. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  137. package/views/3d/webgl-engine/lib/ModelDirtySet.js +1 -1
  138. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  139. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  140. package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
  141. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  142. package/views/3d/webgl-engine/lib/TextTextureFactory.js +1 -1
  143. package/views/3d/webgl-engine/lib/VertexAttribute.js +1 -1
  144. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  145. package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
  146. package/views/3d/webgl-engine/lib/edgeRendering/edgeProcessing.js +1 -1
  147. package/views/View.js +1 -1
  148. package/views/interactive/tooltip/TooltipContentWithHelpMessage.js +1 -1
  149. package/views/interactive/tooltip/TooltipEditableField.js +1 -1
  150. package/views/interactive/tooltip/constraintUtils.js +1 -1
  151. package/views/interactive/tooltip/content/Fields.js +1 -1
  152. package/views/interactive/tooltip/content/TooltipContentDrawCircle.js +1 -1
  153. package/views/interactive/tooltip/content/TooltipContentDrawMesh.js +1 -1
  154. package/views/interactive/tooltip/content/TooltipContentDrawPoint.js +1 -1
  155. package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
  156. package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
  157. package/views/interactive/tooltip/content/TooltipContentDrawRectangle.js +1 -1
  158. package/views/interactive/tooltip/content/TooltipContentExtentRotate.js +1 -1
  159. package/views/interactive/tooltip/content/TooltipContentExtentScale.js +1 -1
  160. package/views/interactive/tooltip/content/TooltipContentReshapeEdgeOffset.js +1 -1
  161. package/views/interactive/tooltip/content/TooltipContentTransformAbsolute.js +1 -1
  162. package/views/interactive/tooltip/content/TooltipContentTransformRotate.js +1 -1
  163. package/views/interactive/tooltip/content/TooltipContentTransformScale.js +1 -1
  164. package/views/interactive/tooltip/content/TooltipContentTranslateGraphic.js +1 -1
  165. package/views/interactive/tooltip/content/TooltipContentTranslateGraphicXY.js +1 -1
  166. package/views/interactive/tooltip/content/TooltipContentTranslateGraphicZ.js +1 -1
  167. package/views/interactive/tooltip/content/TooltipContentTranslateVertex.js +1 -1
  168. package/views/interactive/tooltip/content/TooltipContentTranslateVertexXY.js +1 -1
  169. package/views/interactive/tooltip/content/TooltipContentTranslateVertexZ.js +1 -1
  170. package/views/support/angularMeasurementUtils.js +1 -1
  171. package/views/webgl/Texture.js +1 -1
  172. package/views/webgl/contextUtils.js +1 -1
  173. package/widgets/AreaMeasurement2D.js +1 -1
  174. package/widgets/AreaMeasurement3D.js +1 -1
  175. package/widgets/Attachments.js +1 -1
  176. package/widgets/Attribution.js +1 -1
  177. package/widgets/BasemapGallery.js +1 -1
  178. package/widgets/BasemapLayerList.js +1 -1
  179. package/widgets/BasemapToggle.js +1 -1
  180. package/widgets/Bookmarks.js +1 -1
  181. package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesNode.js +1 -1
  182. package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesTree.js +1 -1
  183. package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
  184. package/widgets/BuildingExplorer/BuildingLevelPicker/Label.js +1 -1
  185. package/widgets/BuildingExplorer/BuildingLevelPicker/LevelItem.js +1 -1
  186. package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
  187. package/widgets/BuildingExplorer.js +1 -1
  188. package/widgets/Compass.js +1 -1
  189. package/widgets/CoordinateConversion.js +1 -1
  190. package/widgets/Daylight/support/SliderWithDropdown.js +1 -1
  191. package/widgets/Daylight.js +1 -1
  192. package/widgets/DirectLineMeasurement3D.js +1 -1
  193. package/widgets/DirectionalPad.js +1 -1
  194. package/widgets/Directions/components/SaveLayer.js +1 -1
  195. package/widgets/Directions.js +1 -1
  196. package/widgets/DistanceMeasurement2D.js +1 -1
  197. package/widgets/Editor/components/FooterActions.js +1 -1
  198. package/widgets/Editor/components/Notices.js +1 -1
  199. package/widgets/Editor/components/PanelContent.js +1 -1
  200. package/widgets/Editor/components/PanelToolbar.js +1 -1
  201. package/widgets/Editor/components/Prompt.js +1 -1
  202. package/widgets/Editor/components/Settings.js +1 -1
  203. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  204. package/widgets/Editor/components/UploadDetails.js +1 -1
  205. package/widgets/Editor.js +1 -1
  206. package/widgets/ElevationProfile/components/LegendItem.js +1 -1
  207. package/widgets/ElevationProfile/components/SettingsButton.js +1 -1
  208. package/widgets/ElevationProfile/components/Statistics.js +1 -1
  209. package/widgets/ElevationProfile.js +1 -1
  210. package/widgets/Expand.js +1 -1
  211. package/widgets/Feature/FeatureContent.js +1 -1
  212. package/widgets/Feature/FeatureExpression.js +1 -1
  213. package/widgets/Feature/FeatureFields.js +1 -1
  214. package/widgets/Feature/FeatureMedia.js +1 -1
  215. package/widgets/Feature/FeatureRelationship.js +1 -1
  216. package/widgets/Feature/support/FeatureContentMixin.js +1 -1
  217. package/widgets/Feature/support/FeatureElementInfo.js +1 -1
  218. package/widgets/Feature.js +1 -1
  219. package/widgets/FeatureForm.js +1 -1
  220. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  221. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  222. package/widgets/FeatureTable/Grid/support/ButtonMenu.js +1 -1
  223. package/widgets/FeatureTable.js +1 -1
  224. package/widgets/FeatureTemplates/ItemList.js +1 -1
  225. package/widgets/FeatureTemplates.js +1 -1
  226. package/widgets/Features/FeaturesRelatedRecords.js +1 -1
  227. package/widgets/Features.js +1 -1
  228. package/widgets/FloorFilter.js +1 -1
  229. package/widgets/Fullscreen.js +1 -1
  230. package/widgets/Histogram.js +1 -1
  231. package/widgets/HistogramRangeSlider.js +1 -1
  232. package/widgets/Home.js +1 -1
  233. package/widgets/LayerList/ListItemPanel.js +1 -1
  234. package/widgets/LayerList.js +1 -1
  235. package/widgets/Legend/styles/Card.js +1 -1
  236. package/widgets/Legend/styles/Classic.js +1 -1
  237. package/widgets/Legend/styles/support/relationshipUtils.js +1 -1
  238. package/widgets/Legend/styles/support/univariateUtils.js +1 -1
  239. package/widgets/LineOfSight.js +1 -1
  240. package/widgets/Locate.js +1 -1
  241. package/widgets/NavigationToggle.js +1 -1
  242. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  243. package/widgets/OrientedImageryViewer.js +1 -1
  244. package/widgets/Popup.js +1 -1
  245. package/widgets/Print.js +1 -1
  246. package/widgets/ScaleRangeSlider.js +1 -1
  247. package/widgets/Search/SearchResultRenderer.js +1 -1
  248. package/widgets/Search.js +1 -1
  249. package/widgets/ShadowCast/components/DiscreteConfigurator.js +1 -1
  250. package/widgets/ShadowCast/components/DurationConfigurator.js +1 -1
  251. package/widgets/ShadowCast/components/ShadowTooltipContent.js +1 -1
  252. package/widgets/ShadowCast/components/ThresholdConfigurator.js +1 -1
  253. package/widgets/ShadowCast.js +1 -1
  254. package/widgets/Sketch.js +1 -1
  255. package/widgets/Slice.js +1 -1
  256. package/widgets/Slider.js +1 -1
  257. package/widgets/Swipe.js +1 -1
  258. package/widgets/TableList.js +1 -1
  259. package/widgets/TimeSlider.js +1 -1
  260. package/widgets/Track.js +1 -1
  261. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsLineSymbolPicker.js +1 -1
  262. package/widgets/UtilityNetworkAssociations.js +1 -1
  263. package/widgets/UtilityNetworkTrace.js +1 -1
  264. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  265. package/widgets/ValuePicker.js +1 -1
  266. package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
  267. package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
  268. package/widgets/VideoPlayer.js +1 -1
  269. package/widgets/Weather/LabeledSlider.js +1 -1
  270. package/widgets/Weather.js +1 -1
  271. package/widgets/Zoom/IconButton.js +1 -1
  272. package/widgets/smartMapping/BinaryColorSizeSlider.js +1 -1
  273. package/widgets/smartMapping/ClassedColorSlider.js +1 -1
  274. package/widgets/smartMapping/ClassedSizeSlider.js +1 -1
  275. package/widgets/smartMapping/ColorSizeSlider.js +1 -1
  276. package/widgets/smartMapping/ColorSlider.js +1 -1
  277. package/widgets/smartMapping/HeatmapSlider.js +1 -1
  278. package/widgets/smartMapping/OpacitySlider.js +1 -1
  279. package/widgets/smartMapping/SizeSlider.js +1 -1
  280. package/widgets/smartMapping/SmartMappingSliderBase.js +1 -1
  281. package/widgets/support/ColorPicker.js +1 -1
  282. package/widgets/support/DatePicker.js +1 -1
  283. package/widgets/support/Heading.js +1 -1
  284. package/widgets/support/LabeledSwitch.js +1 -1
  285. package/widgets/support/MeasurementWidgetContent.js +1 -1
  286. package/widgets/support/Popover.js +1 -1
  287. package/widgets/support/SelectionToolbar.js +1 -1
  288. package/widgets/support/SketchTooltipControls.js +1 -1
  289. package/widgets/support/SnappingControls.js +1 -1
  290. package/widgets/support/TimePicker.js +1 -1
  291. package/widgets/support/TimezonePicker.js +1 -1
  292. package/widgets/support/UnitSelect.js +1 -1
  293. package/assets/esri/core/workers/chunks/092920c25cac89c038ee.js +0 -1
  294. package/assets/esri/core/workers/chunks/1b3655f5bf5d90fa8730.js +0 -1
  295. package/assets/esri/core/workers/chunks/1cf7bb514e7eefc3e9c6.js +0 -1
  296. package/assets/esri/core/workers/chunks/24629402c647ef6b5f6b.js +0 -1
  297. package/assets/esri/core/workers/chunks/2d0d03cbea83c868edba.js +0 -1
  298. package/assets/esri/core/workers/chunks/2e130cb2f1038055c07b.js +0 -1
  299. package/assets/esri/core/workers/chunks/4369a6c1e0a82ab4db6a.js +0 -1
  300. package/assets/esri/core/workers/chunks/4f4a424d1747d04501df.js +0 -1
  301. package/assets/esri/core/workers/chunks/59c00d6fba0fd1c03d01.js +0 -1
  302. package/assets/esri/core/workers/chunks/650a317b6dc245a7060f.js +0 -1
  303. package/assets/esri/core/workers/chunks/7a358b1fd0c0cce59e9b.js +0 -1
  304. package/assets/esri/core/workers/chunks/83d1a1b3d371c991cc4c.js +0 -1
  305. package/assets/esri/core/workers/chunks/c4bb67150ccd01ea6014.js +0 -1
  306. package/assets/esri/core/workers/chunks/c60cf62f374e71e562fc.js +0 -1
  307. package/assets/esri/core/workers/chunks/c8f239c25fe864f0e47a.js +0 -1
  308. package/assets/esri/core/workers/chunks/cad260881653567bc8f9.js +0 -1
  309. package/assets/esri/core/workers/chunks/e55f7fc7eff0074ce0fc.js +0 -1
  310. package/assets/esri/core/workers/chunks/eef27d305023034084a4.js +0 -1
  311. package/assets/esri/core/workers/chunks/f38c54ada9e7012a2960.js +0 -1
  312. package/core/watchUtils.d.ts +0 -4
  313. package/core/watchUtils.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9863,661,5234],{53073:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(75148),a=n(59987),s=n(91136),i=n(90961),l=n(90658),o=n(8667);class u extends s.Z{constructor(e){super(e),this._relation="",this._relationGeom=null,this._relationString="",this.declaredClass="esri.arcade.featureset.actions.SpatialFilter",this._relationString=e.relationString,this._parent=e.parentfeatureset,this._maxProcessing=40,this._relation=e.relation,this._relationGeom=e.relationGeom}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,null,null,e);return this._checkCancelled(e),this._wset=new i.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){let t=this._parent._isInFeatureSet(e);return t===l.dj.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?l.dj.Unknown:t)}_getFeature(e,t,n){return this._parent._getFeature(e,t,n)}_getFeatures(e,t,n,r){return this._parent._getFeatures(e,t,n,r)}_featureFromCache(e){return this._parent._featureFromCache(e)}async executeSpatialRelationTest(e){if(null===e.geometry)return!1;switch(this._relation){case"esriSpatialRelEnvelopeIntersects":return(0,o.kK)((0,l.SV)(this._relationGeom),(0,l.SV)(e.geometry));case"esriSpatialRelIntersects":return(0,o.kK)(this._relationGeom,e.geometry);case"esriSpatialRelContains":return(0,o.r3)(this._relationGeom,e.geometry);case"esriSpatialRelOverlaps":return(0,o.Nm)(this._relationGeom,e.geometry);case"esriSpatialRelWithin":return(0,o.uh)(this._relationGeom,e.geometry);case"esriSpatialRelTouches":return(0,o.W4)(this._relationGeom,e.geometry);case"esriSpatialRelCrosses":return(0,o.jU)(this._relationGeom,e.geometry);case"esriSpatialRelRelation":return(0,o.LV)(this._relationGeom,e.geometry,this._relationString??"")}}async _fetchAndRefineFeatures(e,t,n){const r=new i.Z([],e,!1,null),a=Math.min(t,e.length);await(this._parent?._getFeatures(r,-1,a,n)),this._checkCancelled(n);const s=[];for(let t=0;t<a;t++){const n=this._parent._featureFromCache(e[t]);s.push(await this.executeSpatialRelationTest(n))}for(let n=0;n<t;n++)!0===s[n]?this._idstates[e[n]]=l.dj.InFeatureSet:this._idstates[e[n]]=l.dj.NotInFeatureSet;return"success"}async _getFilteredSet(e,t,n,r,a){await this._ensureLoaded();const s=await this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,n,r,a);let l;return this._checkCancelled(a),l=null!==t?new i.Z(s._candidates.slice(0).concat(s._known.slice(0)),[],s._ordered,this._clonePageDefinition(s.pagesDefinition)):new i.Z(s._candidates.slice(0),s._known.slice(0),s._ordered,this._clonePageDefinition(s.pagesDefinition)),l}async _stat(e,t,n,r,a,s,i){if(""!==n)return{calculated:!1};const l=await this._parent._stat(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,a,s,i);return!1===l.calculated?null===a&&""===n&&null===r?this._manualStat(e,t,s,i):{calculated:!1}:l}async _canDoAggregates(e,t,n,r,a){return""===n&&null===r&&null!==this._parent&&this._parent._canDoAggregates(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,a)}async _getAggregatePagesDataSourceDefinition(e,t,n,r,s,i,l){if(null===this._parent)throw new a.EN(a.H9.NeverReach);return this._parent._getAggregatePagesDataSourceDefinition(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s,i,l)}static registerAction(){s.Z._featuresetFunctions.intersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelIntersects",relationGeom:e})},s.Z._featuresetFunctions.envelopeIntersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelEnvelopeIntersects",relationGeom:e})},s.Z._featuresetFunctions.contains=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelContains",relationGeom:e})},s.Z._featuresetFunctions.overlaps=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelOverlaps",relationGeom:e})},s.Z._featuresetFunctions.within=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelWithin",relationGeom:e})},s.Z._featuresetFunctions.touches=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelTouches",relationGeom:e})},s.Z._featuresetFunctions.crosses=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelCrosses",relationGeom:e})},s.Z._featuresetFunctions.relate=function(e,t){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelRelation",relationGeom:e,relationString:t})}}}},75148:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(59987),a=n(91136),s=n(90961),i=n(90658);class l extends a.Z{constructor(e){super(e),this.declaredClass="esri.layers.featureset.sources.Empty",this._maxProcessing=1e3,this._wset=new s.Z([],[],!1,null),this._parent=e.parentfeatureset,this._databaseType=i.Bj.Standardised}async _getSet(){return this._wset}optimisePagingFeatureQueries(){}_isInFeatureSet(){return i.dj.NotInFeatureSet}async _getFeature(){throw new r.EN(r.H9.NeverReach)}async queryAttachments(){return[]}async _getFeatures(){return"success"}_featureFromCache(){return null}async _fetchAndRefineFeatures(){throw new r.EN(r.H9.NeverReach)}async _getFilteredSet(){return new s.Z([],[],!1,null)}_stat(e,t,n,r,a,s,i){return this._manualStat(e,t,s,i)}async _canDoAggregates(){return!1}}},91136:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(85839),a=n(48039),s=n(59987),i=n(15274);class l{constructor(e,t){this._lastId=-1,this._progress=t,this._parent=e}reset(){this._lastId=-1}async nextBatchAsArcadeFeatures(e,t){const n=await this.nextBatch(e);return null===n?n:n.map((e=>i.Z.createFromGraphicLikeObject(e.geometry,e.attributes,this._parent,t)))}nextBatch(e){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((t=>this.nextBatch(e)),(t=>this.nextBatch(e)));const t={returnpromise:null,hasset:!1},n=[];return t.returnpromise=new Promise(((r,a)=>{this._parent._getSet(this._progress).then((s=>{const i=s._known;let l=i.length-1;if("GETPAGES"===i[i.length-1]&&(l-=1),this._lastId+e>l&&i.length>0&&"GETPAGES"===i[i.length-1])return void this._parent._expandPagedSet(s,this._parent._maxQueryRate(),0,0,this._progress).then((n=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,a)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,a(e)}));const o=s._candidates;if(l>=this._lastId+e||0===o.length){for(let t=0;t<e;t++){const e=t+this._lastId+1;if(e>=i.length)break;n[t]=i[e]}return this._lastId+=n.length,0===n.length&&(t.hasset=!0,this._parent._mainSetInUse=null,r([])),void this._parent._getFeatureBatch(n,this._progress).then((e=>{t.hasset=!0,this._parent._mainSetInUse=null,r(e)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,a(e)}))}this._parent._refineSetBlock(s,this._parent._maxProcessingRate(),this._progress).then((()=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,a)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,a(e)}))}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,a(e)}))})),!1===t.hasset&&(this._parent._mainSetInUse=t.returnpromise,t.hasset=!0),t.returnpromise}next(){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((e=>this.next()),(e=>this.next()));const e={returnpromise:null,hasset:!1};return e.returnpromise=new Promise(((t,n)=>{this._parent._getSet(this._progress).then((r=>{const a=r._known;this._lastId<a.length-1?"GETPAGES"===a[this._lastId+1]?this._parent._expandPagedSet(r,this._parent._maxQueryRate(),0,0,this._progress).then((t=>(e.hasset=!0,this._parent._mainSetInUse=null,this.next()))).then(t,n):(this._lastId+=1,this._parent._getFeature(r,a[this._lastId],this._progress).then((n=>{e.hasset=!0,this._parent._mainSetInUse=null,t(n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))):r._candidates.length>0?this._parent._refineSetBlock(r,this._parent._maxProcessingRate(),this._progress).then((()=>{e.hasset=!0,this._parent._mainSetInUse=null,this.next().then(t,n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)})):(e.hasset=!0,this._parent._mainSetInUse=null,t(null))}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))})),!1===e.hasset&&(this._parent._mainSetInUse=e.returnpromise,e.hasset=!0),e.returnpromise}async count(){if(-1!==this._parent._totalCount)return this._parent._totalCount;const e=await this._parent._getSet(this._progress),t=await this._refineAllSets(e);return this._parent._totalCount=t._known.length,this._parent._totalCount}async _refineAllSets(e){if(e._known.length>0&&"GETPAGES"===e._known[e._known.length-1])return await this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,1,this._progress),this._refineAllSets(e);if(e._candidates.length>0){if("GETPAGES"===e._known[e._candidates.length-1])return await this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,2,this._progress),this._refineAllSets(e);const t=await this._parent._refineSetBlock(e,this._parent._maxProcessingRate(),this._progress);return t._candidates.length>0?this._refineAllSets(t):t}return e}}var o=n(90961),u=n(90658),c=n(95002),h=n(95330),d=n(8968),f=n(8667),p=n(82971),_=n(99514);class m{constructor(e){this.recentlyUsedQueries=null,this.featureSetQueryInterceptor=null,this._idstates=[],this._parent=null,this._wset=null,this._mainSetInUse=null,this._maxProcessing=200,this._maxQuery=500,this._totalCount=-1,this._databaseType=u.Bj.NotEvaluated,this._databaseTypeProbed=null,this.declaredRootClass="esri.arcade.featureset.support.FeatureSet",this._featureCache=[],this.typeIdField=null,this.types=null,this.fields=null,this.geometryType="",this.objectIdField="",this.globalIdField="",this.spatialReference=null,this.hasM=!1,this.hasZ=!1,this._transparent=!1,this.loaded=!1,this._loadPromise=null,this._fieldsIndex=null,this._dateFieldIndex=null,e&&e.lrucache&&(this.recentlyUsedQueries=e.lrucache),e&&e.interceptor&&(this.featureSetQueryInterceptor=e.interceptor)}optimisePagingFeatureQueries(e){this._parent&&this._parent.optimisePagingFeatureQueries(e)}_hasMemorySource(){return!0}prop(e,t){return void 0===t?this[e]:(void 0!==this[e]&&(this[e]=t),this)}end(){return null!==this._parent&&!0===this._parent._transparent?this._parent.end():this._parent}_ensureLoaded(){return this.load()}load(){return null===this._loadPromise&&(this._loadPromise=this.loadImpl()),this._loadPromise}async loadImpl(){return!0===this._parent?.loaded?(this._initialiseFeatureSet(),this):(await(this._parent?.load()),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(0),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.fields=[],this.typeIdField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new p.Z({wkid:4326}),this.geometryType=u.Qk.point)}getField(e,t){let n;return(t=t||this.fields)&&(e=e.toLowerCase(),t.some((t=>(t&&t.name.toLowerCase()===e&&(n=t),!!n)))),n}getFieldsIndex(){return null===this._fieldsIndex&&(this._fieldsIndex=new _.Z(this.fields)),this._fieldsIndex}_maxProcessingRate(){return null!==this._parent?Math.min(this._maxProcessing,this._parent._maxProcessingRate()):Math.min(this._maxProcessing,this._maxQueryRate())}_maxQueryRate(){return null!==this._parent?Math.max(this._maxQuery,this._parent._maxQueryRate()):this._maxQuery}_checkCancelled(e){if(null!=e&&e.aborted)throw new s.EN(s.H9.Cancelled)}nativeCapabilities(){return this._parent.nativeCapabilities()}async _canDoAggregates(e,t,n,r,a){return null!==this._parent&&this._parent._canDoAggregates(e,t,n,r,a)}async _getAggregatePagesDataSourceDefinition(e,t,n,r,a,i,l){if(null===this._parent)throw new s.EN(s.H9.NeverReach);return this._parent._getAggregatePagesDataSourceDefinition(e,t,n,r,a,i,l)}async _getAgregagtePhysicalPage(e,t,n){if(null===this._parent)throw new s.EN(s.H9.NeverReach);return this._parent._getAgregagtePhysicalPage(e,t,n)}async databaseType(){if(this._databaseType===u.Bj.NotEvaluated){if(null!==a.Z.applicationCache){const e=a.Z.applicationCache.getDatabaseType(this._cacheableFeatureSetSourceKey());if(null!==e)return e}if(null!==this._databaseTypeProbed)return this._databaseTypeProbed;try{this._databaseTypeProbed=this._getDatabaseTypeImpl(),null!==a.Z.applicationCache&&a.Z.applicationCache.setDatabaseType(this._cacheableFeatureSetSourceKey(),this._databaseTypeProbed)}catch(e){throw null!==a.Z.applicationCache&&a.Z.applicationCache.clearDatabaseType(this._cacheableFeatureSetSourceKey()),e}return this._databaseTypeProbed}return this._databaseType}async _getDatabaseTypeImpl(){const e=[{thetype:u.Bj.SqlServer,testwhere:"(CAST( '2015-01-01' as DATETIME) = CAST( '2015-01-01' as DATETIME)) AND OBJECTID<0"},{thetype:u.Bj.Oracle,testwhere:"(TO_DATE('2003-11-18','YYYY-MM-DD') = TO_DATE('2003-11-18','YYYY-MM-DD')) AND OBJECTID<0"},{thetype:u.Bj.StandardisedNoInterval,testwhere:"(date '2015-01-01 10:10:10' = date '2015-01-01 10:10:10') AND OBJECTID<0"}];for(const t of e)if(!0===await this._runDatabaseProbe(t.testwhere))return t.thetype;return u.Bj.StandardisedNoInterval}_cacheableFeatureSetSourceKey(){return"MUSTBESET"}async _runDatabaseProbe(e){if(null!==this._parent)return this._parent._runDatabaseProbe(e);throw new s.EN(s.H9.NotImplemented)}isTable(){return this._parent?.isTable()??!1}_featureFromCache(e){if(void 0!==this._featureCache[e])return this._featureCache[e]}_isInFeatureSet(e){return u.dj.Unknown}_getSet(e){throw new s.EN(s.H9.NotImplemented)}async _getFeature(e,t,n){if(this._checkCancelled(n),void 0!==this._featureFromCache(t))return this._featureFromCache(t);if(await this._getFeatures(e,t,this._maxProcessingRate(),n),this._checkCancelled(n),void 0!==this._featureFromCache(t))return this._featureFromCache(t);throw new s.EN(s.H9.MissingFeatures)}async _getFeatureBatch(e,t){this._checkCancelled(t);const n=new o.Z([],e,!1,null),r=[];await this._getFeatures(n,-1,e.length,t),this._checkCancelled(t);for(const t of e)void 0!==this._featureFromCache(t)&&r.push(this._featureFromCache(t));return r}async _getFeatures(e,t,n,r){return"success"}_getFilteredSet(e,t,n,r,a){throw new s.EN(s.H9.NotImplemented)}async _refineSetBlock(e,t,n){if(!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQueryRate()))return await this._expandPagedSet(e,this._maxQueryRate(),0,0,n),this._refineSetBlock(e,t,n);this._checkCancelled(n);const r=e._candidates.length;this._refineKnowns(e,t);let a=r-e._candidates.length;if(0===e._candidates.length)return e;if(a>=t)return e;if(await this._refineIfParentKnown(e,t-a,n),this._checkCancelled(n),this._refineKnowns(e,t-a),a=r-e._candidates.length,a<t&&e._candidates.length>0){const r=t-a,s=this._prepareFetchAndRefineSet(e._candidates);return await this._fetchAndRefineFeatures(s,s.length>r?r:e._candidates.length,n),this._checkCancelled(n),this._refineKnowns(e,t-a),e}return e}_fetchAndRefineFeatures(e,t,n){return null}_prepareFetchAndRefineSet(e){const t=[];for(let n=0;n<e.length;n++)this._isPhysicalFeature(e[n])&&t.push(e[n]);return t}_isPhysicalFeature(e){return null===this._parent||this._parent._isPhysicalFeature(e)}_refineKnowns(e,t){let n=0,r=null;const a=[];t=this._maxQueryRate();for(let s=0;s<e._candidates.length&&"GETPAGES"!==e._candidates[s];s++){let i=!1;const l=this._candidateIdTransform(e._candidates[s]);l!==e._candidates[s]&&(i=!0);const o=this._isInFeatureSet(l);if(o===u.dj.InFeatureSet)!0===i?e._known.includes(l)||(e._known.push(l),n+=1):(e._known.push(e._candidates[s]),n+=1),null===r?r={start:s,end:s}:r.end===s-1?r.end=s:(a.push(r),r={start:s,end:s});else if(o===u.dj.NotInFeatureSet)null===r?r={start:s,end:s}:r.end===s-1?r.end=s:(a.push(r),r={start:s,end:s}),n+=1;else if(o===u.dj.Unknown&&(n+=1,!0===e._ordered))break;if(n>=t)break}null!==r&&a.push(r);for(let t=a.length-1;t>=0;t--)e._candidates.splice(a[t].start,a[t].end-a[t].start+1)}_refineIfParentKnown(e,t,n){const r=new o.Z([],[],e._ordered,null);return r._candidates=e._candidates.slice(0),this._parent._refineSetBlock(r,t,n)}_candidateIdTransform(e){return this._parent._candidateIdTransform(e)}_checkIfNeedToExpandKnownPage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=e._lastFetchedIndex;r<e._known.length;r++){if("GETPAGES"===e._known[r])return!0;if(void 0===this._featureCache[e._known[r]]&&(n+=1,n>=t))break}return!1}_checkIfNeedToExpandCandidatePage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=0;r<e._candidates.length;r++){if("GETPAGES"===e._candidates[r])return!0;if(n+=1,n>=t)break}return!1}async _expandPagedSet(e,t,n,r,a){if(null===this._parent)throw new s.EN(s.H9.NotImplemented);return this._parent._expandPagedSet(e,t,n,r,a)}async _expandPagedSetFeatureSet(e,t,n,r,a){if(e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]&&(r=1),0===r&&e._candidates.length>0&&"GETPAGES"===e._candidates[e._candidates.length-1]&&(r=2),0===r)return"finished";const s=await this._getPage(e,r,a);return n+s<t?this._expandPagedSet(e,t,n+s,0,a):"success"}async _getPage(e,t,n){const r=1===t?e._known:e._candidates;if(e.pagesDefinition.internal.set.length>e.pagesDefinition.resultOffset||!0===e.pagesDefinition.internal.fullyResolved){r.length=r.length-1;let t=0;for(let n=0;n<e.pagesDefinition.resultRecordCount&&!(e.pagesDefinition.resultOffset+n>=e.pagesDefinition.internal.set.length);n++)r[r.length]=e.pagesDefinition.internal.set[e.pagesDefinition.resultOffset+n],t++;e.pagesDefinition.resultOffset+=t;let n=!1;return!0===e.pagesDefinition.internal.fullyResolved&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset&&(n=!0),!1===n&&r.push("GETPAGES"),t}return await this._getPhysicalPage(e,t,n),this._getPage(e,t,n)}_getPhysicalPage(e,t,n){return null}_clonePageDefinition(e){return null===this._parent?null:this._parent._clonePageDefinition(e)}_first(e){return this.iterator(e).next()}first(e){return this._first(e)}async calculateStatistic(e,t,n,r){await this._ensureLoaded();let a=await this._stat(e,t,"",null,null,n,r);return!1===a.calculated&&(a=await this._manualStat(e,t,n,r)),a.result}async _manualStat(e,t,n,r){let a=null;switch(e.toLowerCase()){case"count":return a=await(0,c.QX)(this,r),{calculated:!0,result:a};case"distinct":return a=await(0,c.EB)(this,t,n,r),{calculated:!0,result:a};case"avg":case"mean":return a=await(0,c.J6)(this,t,r),{calculated:!0,result:a};case"stdev":return a=await(0,c.m)(this,t,r),{calculated:!0,result:a};case"variance":return a=await(0,c.CA)(this,t,r),{calculated:!0,result:a};case"sum":return a=await(0,c.Sm)(this,t,r),{calculated:!0,result:a};case"min":return a=await(0,c.VV)(this,t,r),{calculated:!0,result:a};case"max":return a=await(0,c.Fp)(this,t,r),{calculated:!0,result:a};default:return{calculated:!0,result:0}}}async _stat(e,t,n,r,a,s,i){const l=await this._parent._stat(e,t,n,r,a,s,i);return!1===l.calculated?null===a&&""===n&&null===r?this._manualStat(e,t,s,i):{calculated:!1}:l}_unionAllGeomSelf(e){const t=this.iterator(this._defaultTracker(e)),n=[];return new Promise(((e,r)=>{this._unionShapeInBatches(n,t,e,r)}))}_unionAllGeom(e){return new Promise(((t,n)=>{const r=this.iterator(this._defaultTracker(e));this._unionShapeInBatches([],r,t,n)}))}_unionShapeInBatches(e,t,n,r){t.next().then((a=>{try{null!==a&&null!==a.geometry&&e.push(a.geometry),e.length>30||null===a&&e.length>1?(0,f.G0)(e).then((s=>{try{null===a?n(s):(e=[s],this._unionShapeInBatches(e,t,n,r))}catch(e){r(e)}}),r):null===a?1===e.length?n(e[0]):n(null):this._unionShapeInBatches(e,t,n,r)}catch(e){r(e)}}),r)}iterator(e){return new l(this,e)}intersection(e,t=!1){return m._featuresetFunctions.intersection.bind(this)(e,t)}difference(e,t=!1,n=!0){return m._featuresetFunctions.difference.bind(this)(e,t,n)}symmetricDifference(e,t=!1,n=!0){return m._featuresetFunctions.symmetricDifference.bind(this)(e,t,n)}morphShape(e,t,n="unknown",r=null){return m._featuresetFunctions.morphShape.bind(this)(e,t,n,r)}morphShapeAndAttributes(e,t,n="unknown"){return m._featuresetFunctions.morphShapeAndAttributes.bind(this)(e,t,n)}union(e,t=!1){return m._featuresetFunctions.union.bind(this)(e,t)}intersects(e){return m._featuresetFunctions.intersects.bind(this)(e)}envelopeIntersects(e){return m._featuresetFunctions.envelopeIntersects.bind(this)(e)}contains(e){return m._featuresetFunctions.contains.bind(this)(e)}overlaps(e){return m._featuresetFunctions.overlaps.bind(this)(e)}relate(e,t){return m._featuresetFunctions.relate.bind(this)(e,t)}within(e){return m._featuresetFunctions.within.bind(this)(e)}touches(e){return m._featuresetFunctions.touches.bind(this)(e)}top(e){return m._featuresetFunctions.top.bind(this)(e)}crosses(e){return m._featuresetFunctions.crosses.bind(this)(e)}buffer(e,t,n,r=!0){return m._featuresetFunctions.buffer.bind(this)(e,t,n,r)}filter(e,t=null){return m._featuresetFunctions.filter.bind(this)(e,t)}orderBy(e){return m._featuresetFunctions.orderBy.bind(this)(e)}dissolve(e,t){return m._featuresetFunctions.dissolve.bind(this)(e,t)}groupby(e,t){return m._featuresetFunctions.groupby.bind(this)(e,t)}reduce(e,t=null,n){return new Promise(((r,a)=>{this._reduceImpl(this.iterator(this._defaultTracker(n)),e,t,0,r,a,0)}))}_reduceImpl(e,t,n,r,a,s,i){try{if(++i>1e3)return void setTimeout((()=>{i=0,this._reduceImpl(e,t,n,r,a,s,i)}));e.next().then((l=>{try{if(null===l)a(n);else{const o=t(n,l,r,this);(0,h.y8)(o)?o.then((n=>{this._reduceImpl(e,t,n,r+1,a,s,i)}),s):this._reduceImpl(e,t,o,r+1,a,s,i)}}catch(e){s(e)}}),s)}catch(e){s(e)}}removeField(e){return m._featuresetFunctions.removeField.bind(this)(e)}addField(e,t,n=null){return m._featuresetFunctions.addField.bind(this)(e,t,n)}sumArea(e,t=!1,n){const r=(0,u.EI)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,f.Y4)(n.geometry,r).then((t=>e+t)):(0,f.CJ)(n.geometry,r).then((t=>e+t))),0,n)}sumLength(e,t=!1,n){const r=(0,u.Lz)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,f.kQ)(n.geometry,r).then((t=>e+t)):(0,f.sz)(n.geometry,r).then((t=>e+t))),0,n)}_substituteVars(e,t){if(null!==t){const n={};for(const e in t)n[e.toLowerCase()]=t[e];e.parameters=n}}async distinct(e,t=1e3,n=null,r){await this.load();const a=d.WhereClause.create(e,this.getFieldsIndex(),this.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC);return this._substituteVars(a,n),this.calculateStatistic("distinct",a,t,this._defaultTracker(r))}async min(e,t=null,n){await this.load();const r=d.WhereClause.create(e,this.getFieldsIndex(),this.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC);return this._substituteVars(r,t),this.calculateStatistic("min",r,-1,this._defaultTracker(n))}async max(e,t=null,n){await this.load();const r=d.WhereClause.create(e,this.getFieldsIndex(),this.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC);return this._substituteVars(r,t),this.calculateStatistic("max",r,-1,this._defaultTracker(n))}async avg(e,t=null,n){await this.load();const r=d.WhereClause.create(e,this.getFieldsIndex(),this.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC);return this._substituteVars(r,t),this.calculateStatistic("avg",r,-1,this._defaultTracker(n))}async sum(e,t=null,n){await this.load();const r=d.WhereClause.create(e,this.getFieldsIndex(),this.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC);return this._substituteVars(r,t),this.calculateStatistic("sum",r,-1,this._defaultTracker(n))}async stdev(e,t=null,n){await this.load();const r=d.WhereClause.create(e,this.getFieldsIndex(),this.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC);return this._substituteVars(r,t),this.calculateStatistic("stdev",r,-1,this._defaultTracker(n))}async variance(e,t=null,n){await this.load();const r=d.WhereClause.create(e,this.getFieldsIndex(),this.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC);return this._substituteVars(r,t),this.calculateStatistic("variance",r,-1,this._defaultTracker(n))}async count(e){return await this.load(),this.calculateStatistic("count",d.WhereClause.create("1",this.getFieldsIndex(),this.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC),-1,this._defaultTracker(e))}_defaultTracker(e){return e??{aborted:!1}}forEach(e,t){return new Promise(((n,r)=>{this._forEachImpl(this.iterator(this._defaultTracker(t)),e,this,n,r,0)}))}_forEachImpl(e,t,n,r,a,s){try{if(++s>1e3)return void setTimeout((()=>{s=0,this._forEachImpl(e,t,n,r,a,s)}),0);e.next().then((i=>{try{if(null===i)r(n);else{const l=t(i);null==l?this._forEachImpl(e,t,n,r,a,s):(0,h.y8)(l)?l.then((()=>{try{this._forEachImpl(e,t,n,r,a,s)}catch(e){a(e)}}),a):this._forEachImpl(e,t,n,r,a,s)}}catch(e){a(e)}}),a)}catch(e){a(e)}}convertToJSON(e){const t={layerDefinition:{geometryType:this.geometryType,fields:[]},featureSet:{features:[],geometryType:this.geometryType}};for(let e=0;e<this.fields.length;e++)t.layerDefinition.fields.push((0,u.Sh)(this.fields[e]));return this.reduce(((e,n)=>{const r={geometry:n.geometry&&n.geometry.toJSON(),attributes:{}};for(const e in n.attributes)r.attributes[e]=n.attributes[e];return t.featureSet.features.push(r),1}),0,e).then((()=>t))}castToText(e=!1){return"object, FeatureSet"}queryAttachments(e,t,n,r,a){return this._parent.queryAttachments(e,t,n,r,a)}serviceUrl(){return this._parent.serviceUrl()}subtypes(){return this.typeIdField?{subtypeField:this.typeIdField,subtypes:this.types?this.types.map((e=>({name:e.name,code:e.id}))):[]}:null}relationshipMetaData(){return this._parent.relationshipMetaData()}get gdbVersion(){return this._parent?this._parent.gdbVersion:""}schema(){const e=[];for(const t of this.fields)e.push((0,u.Sh)(t));return{objectIdField:this.objectIdField,globalIdField:this.globalIdField,geometryType:void 0===u.q2[this.geometryType]?"esriGeometryNull":u.q2[this.geometryType],fields:e}}async convertToText(e,t){if("schema"===e)return await this._ensureLoaded(),JSON.stringify(this.schema());if("featureset"===e){await this._ensureLoaded();const e=[];await this.reduce(((t,n)=>{const r={geometry:n.geometry?n.geometry.toJSON():null,attributes:n.attributes};return null!==r.geometry&&r.geometry.spatialReference&&delete r.geometry.spatialReference,e.push(r),1}),0,t);const n=this.schema();return n.features=e,n.spatialReference=this.spatialReference.toJSON(),JSON.stringify(n)}return this.castToText()}getFeatureByObjectId(e,t){return this._parent.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._parent.getOwningSystemUrl()}getIdentityUser(){return this._parent.getIdentityUser()}getRootFeatureSet(){return null!==this._parent?this._parent.getRootFeatureSet():this}getDataSourceFeatureSet(){return null!==this._parent?this._parent.getDataSourceFeatureSet():this}castAsJson(e=null){return"keeptype"===e?.featureset?this:"none"===e?.featureset?null:{type:"FeatureSet"}}async castAsJsonAsync(e=null,t=null){if("keeptype"===t?.featureset)return this;if("schema"===t?.featureset)return await this._ensureLoaded(),JSON.parse(JSON.stringify(this.schema()));if("none"===t?.featureset)return null;await this._ensureLoaded();const n=[];await this.reduce(((e,r)=>{const a={geometry:r.geometry?!0===t?.keepGeometryType?r.geometry:r.geometry.toJSON():null,attributes:r.attributes};return null!==a.geometry&&a.geometry.spatialReference&&!0!==t?.keepGeometryType&&delete a.geometry.spatialReference,n.push(a),1}),0,e);const r=this.schema();return r.features=n,r.spatialReference=!0===t?.keepGeometryType?this.spatialReference:this.spatialReference?.toJSON(),r}get dateTimeReferenceFieldIndex(){return null===this._dateFieldIndex&&(this._dateFieldIndex=r.nu.create(this.getFieldsIndex(),this)),this._dateFieldIndex}fieldTimeZone(e){return this.dateTimeReferenceFieldIndex.fieldTimeZone(e)}get preferredTimeReference(){return this._parent?.preferredTimeReference??null}get dateFieldsTimeReference(){return this._parent?.dateFieldsTimeReference??null}get datesInUnknownTimezone(){return this._parent.datesInUnknownTimezone}get editFieldsInfo(){return this._parent?.editFieldsInfo??null}get timeInfo(){return this._parent?.timeInfo??null}}m._featuresetFunctions={}},90961:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(e,t,n,r){this._lastFetchedIndex=0,this._ordered=!1,this.pagesDefinition=null,this._candidates=e,this._known=t,this._ordered=n,this.pagesDefinition=r}}},48039:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(){this._databaseTypeMetaData={},this._layerInfo={}}clearDatabaseType(e){void 0===this._databaseTypeMetaData[e]&&delete this._databaseTypeMetaData[e]}getDatabaseType(e){return"MUSTBESET"===e||void 0===this._databaseTypeMetaData[e]?null:this._databaseTypeMetaData[e]}setDatabaseType(e,t){this._databaseTypeMetaData[e]=t}getLayerInfo(e){return void 0===this._layerInfo[e]?null:this._layerInfo[e]}setLayerInfo(e,t){this._layerInfo[e]=t}clearLayerInfo(e){void 0!==this._layerInfo[e]&&delete this._layerInfo[e]}}r.applicationCache=null},36515:(e,t,n)=>{n.d(t,{$e:()=>d,DT:()=>w,TE:()=>A,XF:()=>c,bB:()=>h,fz:()=>p,hq:()=>b,mA:()=>_,oX:()=>y,vR:()=>S,y5:()=>E,zR:()=>u});var r=n(48853),a=n(59987),s=n(90658),i=n(53970),l=n(8968),o=n(17126);function u(e,t){return f(e?.parseTree,t,e?.parameters)}function c(e,t,n){return f(e,t,n)}function h(e,t,n,r){return l.WhereClause.create(f(e.parseTree,s.Bj.Standardised,e.parameters,t,n),r,e.timeZone)}function d(e,t,n="AND"){return l.WhereClause.create("(("+u(e,s.Bj.Standardised)+")"+n+"("+u(t,s.Bj.Standardised)+"))",e.fieldsIndex,e.timeZone)}function f(e,t,n,r=null,i=null,l=null){let u,c,h,d;switch(e.type){case"interval":return A(f(e.value,t,n,r,i,l),e.qualifier,e.op);case"case-expression":{let a=" CASE ";"simple"===e.format&&(a+=f(e.operand,t,n,r,i,l));for(let s=0;s<e.clauses.length;s++)a+=" WHEN "+f(e.clauses[s].operand,t,n,r,i,l)+" THEN "+f(e.clauses[s].value,t,n,r,i,l);return null!==e.else&&(a+=" ELSE "+f(e.else,t,n,r,i,l)),a+=" END ",a}case"parameter":{const r=n[e.value.toLowerCase()];if("string"==typeof r)return"'"+n[e.value.toLowerCase()].toString().replaceAll("'","''")+"'";if((0,s.J_)(r))return y(r,t,l);if((0,s._U)(r))return g(r,t);if((0,s.NP)(r))return _(r,t,l);if((0,s.$A)(r))return m(r,t);if(r instanceof Array){const e=[];for(let n=0;n<r.length;n++)"string"==typeof r[n]?e.push("'"+r[n].toString().replaceAll("'","''")+"'"):(0,s.J_)(r[n])?e.push(y(r[n],t,l)):(0,s._U)(r[n])?e.push(g(r[n],t)):(0,s.NP)(r[n])?e.push(_(r[n],t,l)):(0,s.$A)(r[n])?e.push(m(r[n],t)):e.push(r[n].toString());return e}return r.toString()}case"expression-list":c=[];for(const a of e.value)c.push(f(a,t,n,r,i,l));return c;case"unary-expression":return" ( NOT "+f(e.expr,t,n,r,i,l)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+f(e.left,t,n,r,i,l)+" AND "+f(e.right,t,n,r,i,l)+") ";case"OR":return" ("+f(e.left,t,n,r,i,l)+" OR "+f(e.right,t,n,r,i,l)+") ";case"IS":if("null"!==e.right.type)throw new a.eS(a.f.UnsupportedIsRhs);return" ("+f(e.left,t,n,r,i,l)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new a.eS(a.f.UnsupportedIsRhs);return" ("+f(e.left,t,n,r,i,l)+" IS NOT NULL )";case"IN":return u=[],"expression-list"===e.right.type?(u=f(e.right,t,n,r,i)," ("+f(e.left,t,n,r,i,l)+" IN ("+u.join(",")+")) "):(d=f(e.right,t,n,r,i,l),d instanceof Array?" ("+f(e.left,t,n,r,i,l)+" IN ("+d.join(",")+")) ":" ("+f(e.left,t,n,r,i,l)+" IN ("+d+")) ");case"NOT IN":return u=[],"expression-list"===e.right.type?(u=f(e.right,t,n,r,i)," ("+f(e.left,t,n,r,i,l)+" NOT IN ("+u.join(",")+")) "):(d=f(e.right,t,n,r,i,l),d instanceof Array?" ("+f(e.left,t,n,r,i,l)+" NOT IN ("+d.join(",")+")) ":" ("+f(e.left,t,n,r,i,l)+" NOT IN ("+d+")) ");case"BETWEEN":return h=f(e.right,t,n,r,i,l)," ("+f(e.left,t,n,r,i,l)+" BETWEEN "+h[0]+" AND "+h[1]+" ) ";case"NOTBETWEEN":return h=f(e.right,t,n,r,i,l)," ("+f(e.left,t,n,r,i,l)+" NOT BETWEEN "+h[0]+" AND "+h[1]+" ) ";case"LIKE":return""!==e.escape?" ("+f(e.left,t,n,r,i,l)+" LIKE "+f(e.right,t,n,r,i,l)+" ESCAPE '"+e.escape+"') ":" ("+f(e.left,t,n,r,i,l)+" LIKE "+f(e.right,t,n,r,i,l)+") ";case"NOT LIKE":return""!==e.escape?" ("+f(e.left,t,n,r,i,l)+" NOT LIKE "+f(e.right,t,n,r,i,l)+" ESCAPE '"+e.escape+"') ":" ("+f(e.left,t,n,r,i,l)+" NOT LIKE "+f(e.right,t,n,r,i,l)+") ";case"<>":case"<":case">":case">=":case"<=":case"=":case"*":case"-":case"+":case"/":return" ("+f(e.left,t,n,r,i,l)+" "+e.operator+" "+f(e.right,t,n,r,i,l)+") ";case"||":return" ("+f(e.left,t,n,r,i,l)+" "+(t===s.Bj.SqlServer?"+":e.operator)+" "+f(e.right,t,n,r,i,l)+") "}throw new a.eS(a.f.UnsupportedOperator,{operator:e.operator});case"null":return"null";case"boolean":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replaceAll("'","''")+"'";case"timestamp":return function(e,t,n,r){let a=(0,s.J_)(e)?o.ou.fromJSDate(e):o.ou.fromSQL(e);const i=0===a.hour&&0===a.minute&&0===a.second&&0===a.millisecond;switch(n?.inputTimeReference&&(a=o.ou.fromObject({day:a.day,year:a.year,month:a.month,hour:a.hour,minute:a.minute,second:a.second,millisecond:a.millisecond},{zone:n.inputTimeReference})),n?.outputTimeReference&&(a=a.setZone(n.outputTimeReference)),t){case s.Bj.FILEGDB:case s.Bj.Standardised:case s.Bj.StandardisedNoInterval:return i?`date '${a.toFormat("yyyy-LL-dd")}'`:`date '${a.toFormat("yyyy-LL-dd HH:mm:ss")}'`;case s.Bj.Oracle:return i?`TO_DATE('${a.toFormat("yyyy-LL-dd")}','YYYY-MM-DD')`:`TO_DATE('${a.toFormat("yyyy-LL-dd HH:mm:ss")}','YYYY-MM-DD HH24:MI:SS')`;case s.Bj.SqlServer:return`'${a.toFormat(i?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;case s.Bj.PGDB:return`#${a.toFormat(i?"LL-dd-yyyy":"LL-dd-yyyy HH:mm:ss")}#`;case s.Bj.Postgres:return`TIMESTAMP '${a.toFormat(i?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;default:return`date '${a.toFormat("yyyy-LL-dd HH:mm:ss")}'`}}(e.value,t,l,e.withtimezone);case"date":return y(e.value,t,l);case"time":return g(e.value,t);case"number":return e.value.toString();case"current-time":return S("date"===e.mode,t);case"column-reference":return r?r.toLowerCase()===e.column.toLowerCase()?"("+i+")":!0===e.delimited?`"${e.column.split('"').join('""')}"`:e.column:e.column;case"data-type":return e.value;case"function":{const a=f(e.args,t,n,r,i,l);return p(e.name,a,t)}}throw new a.eS(a.f.UnsupportedSyntax,{node:e.type})}function p(e,t,n){switch(e.toLowerCase().trim()){case"cos":case"sin":case"tan":case"cosh":case"tanh":case"sinh":case"acos":case"asin":case"atan":case"floor":case"log10":case"log":case"abs":if(1!==t.length)throw new a.eS(a.f.InvalidFunctionParameters,{function:e.toLowerCase().trim()});return`${e.toUpperCase().trim()}(${t[0]})`;case"ceiling":case"ceil":if(1!==t.length)throw new a.eS(a.f.InvalidFunctionParameters,{function:"ceiling"});switch(n){case s.Bj.Standardised:case s.Bj.StandardisedNoInterval:}return"CEILING("+t[0]+")";case"mod":case"power":case"nullif":if(2!==t.length)throw new a.eS(a.f.InvalidFunctionParameters,{function:e.toLowerCase().trim()});return`${e.toUpperCase().trim()}(${t[0]},${t[1]})`;case"round":if(2===t.length)return"ROUND("+t[0]+","+t[1]+")";if(1===t.length)return"ROUND("+t[0]+")";throw new a.eS(a.f.InvalidFunctionParameters,{function:"round"});case"truncate":if(t.length<1||t.length>2)throw new a.eS(a.f.InvalidFunctionParameters,{function:"truncate"});return n===s.Bj.SqlServer?"ROUND("+t[0]+(1===t.length?"0":","+t[1])+",1)":"TRUNCATE("+t[0]+(1===t.length?")":","+t[1]+")");case"char_length":case"len":if(1!==t.length)throw new a.eS(a.f.InvalidFunctionParameters,{function:"char_length"});switch(n){case s.Bj.SqlServer:return"LEN("+t[0]+")";case s.Bj.Oracle:return"LENGTH("+t[0]+")";default:return"CHAR_LENGTH("+t[0]+")"}case"coalesce":case"concat":{if(t.length<1)throw new a.eS(a.f.InvalidFunctionParameters,{function:e.toLowerCase()});let n=e.toUpperCase().trim()+"(";for(let e=0;e<t.length;e++)0!==e&&(n+=","),n+=t[e];return n+=")",n}case"lower":case"lcase":if(1!==t.length)throw new a.eS(a.f.InvalidFunctionParameters,{function:"lower"});return"LOWER("+t[0]+")";case"upper":case"ucase":if(1!==t.length)throw new a.eS(a.f.InvalidFunctionParameters,{function:"upper"});return"UPPER("+t[0]+")";case"substring":{let e="";switch(n){case s.Bj.Oracle:return e="SUBSTR("+t[0]+","+t[1],3===t.length&&(e+=","+t[2]),e+=")",e;case s.Bj.SqlServer:return e=3===t.length?"SUBSTRING("+t[0]+","+t[1]+","+t[2]+")":"SUBSTRING("+t[0]+", "+t[1]+", LEN("+t[0]+") - "+t[1]+")",e;default:return e="SUBSTRING("+t[0]+" FROM "+t[1],3===t.length&&(e+=" FOR "+t[2]),e+=")",e}}case"extract":return"EXTRACT("+t[0].replaceAll("'","")+" FROM "+t[1]+")";case"cast":{let e="";switch(n){case s.Bj.Oracle:switch(t[1].type){case"date":e="DATE";break;case"float":e="DOUBLE";break;case"integer":e="INTEGER";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="TIMESTAMP";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`;case s.Bj.Postgres:switch(t[1].type){case"date":e="DATE";break;case"float":e="DOUBLE PRECISION";break;case"integer":e="INT";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="TIMESTAMP";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`;case s.Bj.SqlServer:switch(t[1].type){case"date":e="DATE";break;case"float":e="FLOAT";break;case"integer":e="INT";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="DATETIME";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`;default:switch(t[1].type){case"date":e="DATE";break;case"float":e="FLOAT";break;case"integer":e="INTEGER";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="TIMESTAMP";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`}}}throw new a.eS(a.f.InvalidFunctionParameters,{function:e})}function _(e,t,n,a){n?.outputTimeReference&&(e=r.iG.arcadeDateAndZoneToArcadeDate(e,n?.outputTimeReference));const i=e.toDateTime(),l=0===i.hour&&0===i.minute&&0===i.second&&0===i.millisecond;switch(t){case s.Bj.FILEGDB:case s.Bj.Standardised:case s.Bj.StandardisedNoInterval:return l?`date '${i.toFormat("yyyy-LL-dd")}'`:`date '${i.toFormat("yyyy-LL-dd HH:mm:ss")}'`;case s.Bj.Oracle:return l?`TO_DATE('${i.toFormat("yyyy-LL-dd")}','YYYY-MM-DD')`:`TO_DATE('${i.toFormat("yyyy-LL-dd HH:mm:ss")}','YYYY-MM-DD HH24:MI:SS')`;case s.Bj.SqlServer:return`'${i.toFormat(l?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;case s.Bj.PGDB:return`#${i.toFormat(l?"LL-dd-yyyy":"LL-dd-yyyy HH:mm:ss")}#`;case s.Bj.Postgres:return`TIMESTAMP '${i.toFormat(l?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;default:return`date '${i.toFormat("yyyy-LL-dd HH:mm:ss")}'`}}function m(e,t,n){switch(t){case s.Bj.FILEGDB:case s.Bj.Standardised:case s.Bj.StandardisedNoInterval:return e.toSQLWithKeyword();case s.Bj.Oracle:return`TO_DATE('${e.toFormat("Y-MM-DD")}'`;case s.Bj.SqlServer:return`'${e.toFormat("Y-MM-DD")}'`;case s.Bj.PGDB:return`#${e.toFormat("Y-MM-DD")}#`;case s.Bj.Postgres:return`TIMESTAMP '${e.toFormat("Y-MM-DD")}'`;default:return e.toSQLWithKeyword()}}function g(e,t){switch(e instanceof i.n&&(e=e.toStorageString()),t){case s.Bj.Oracle:return`TO_DATE('${e}', 'HH24:MI:SS')`;case s.Bj.SqlServer:return`'${e}'`;case s.Bj.FILEGDB:case s.Bj.Standardised:case s.Bj.StandardisedNoInterval:case s.Bj.Postgres:default:return`time '${e}'`}}function y(e,t,n,r){let a=(0,s.J_)(e)?o.ou.fromJSDate(e):o.ou.fromSQL(e);const i=0===a.hour&&0===a.minute&&0===a.second&&0===a.millisecond;switch(n?.inputTimeReference&&(a=o.ou.fromObject({day:a.day,year:a.year,month:a.month,hour:a.hour,minute:a.minute,second:a.second,millisecond:a.millisecond},{zone:n.inputTimeReference})),n?.outputTimeReference&&(a=a.setZone(n.outputTimeReference)),t){case s.Bj.FILEGDB:case s.Bj.Standardised:case s.Bj.StandardisedNoInterval:return i?`date '${a.toFormat("yyyy-LL-dd")}'`:`date '${a.toFormat("yyyy-LL-dd HH:mm:ss")}'`;case s.Bj.Oracle:return i?`TO_DATE('${a.toFormat("yyyy-LL-dd")}','YYYY-MM-DD')`:`TO_DATE('${a.toFormat("yyyy-LL-dd HH:mm:ss")}','YYYY-MM-DD HH24:MI:SS')`;case s.Bj.SqlServer:return`'${a.toFormat(i?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;case s.Bj.PGDB:return`#${a.toFormat(i?"LL-dd-yyyy":"LL-dd-yyyy HH:mm:ss")}#`;case s.Bj.Postgres:return`TIMESTAMP '${a.toFormat(i?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;default:return`date '${a.toFormat("yyyy-LL-dd HH:mm:ss")}'`}}function S(e,t){switch(t){case s.Bj.FILEGDB:case s.Bj.Standardised:case s.Bj.StandardisedNoInterval:case s.Bj.Oracle:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP";case s.Bj.SqlServer:return e?"CAST(GETDATE() AS DATE)":"GETDATE()";case s.Bj.PGDB:case s.Bj.Postgres:default:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP"}}function w(e,t,n={}){const r={},a={},s={esriFieldTypeSmallInteger:"integer",esriFieldTypeInteger:"integer",esriFieldTypeBigInteger:"integer",esriFieldTypeSingle:"double",esriFieldTypeDouble:"double",esriFieldTypeString:"string",esriFieldTypeTimeOnly:"time-only",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimestampOffset:"timestamp-offset",esriFieldTypeDate:"date",esriFieldTypeOID:"integer",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"guid",oid:"integer",long:"integer","small-integer":"integer",integer:"integer","big-integer":"integer",single:"double","time-only":"time-only","date-only":"date-only","timestamp-offset":"timestemp-offset",double:"double",date:"date",guid:"guid",globalid:"guid",string:"string"};for(const e of t){const t=e.type?s[e.type]:void 0;r[e.name.toLowerCase()]=void 0===t?"":t}for(const e in n){const t=s[n[e]];a[e.toLowerCase()]=void 0===t?"":t}switch(T(r,e.parseTree,e.parameters,a)){case"double":return"double";case"integer":return"integer";case"date":return"date";case"date-only":return"date-only";case"time-only":return"time-only";case"timestamp-offset":return"timestamp-offset";case"string":return"string";case"global-id":case"guid":return"guid"}return""}function T(e,t,n,r){let i;switch(t.type){case"interval":return"integer";case"case-expression":{const a=[];if("simple"===t.format){for(let s=0;s<t.clauses.length;s++)a.push(T(e,t.clauses[s].value,n,r));null!==t.else&&a.push(T(e,t.else,n,r))}else{for(let s=0;s<t.clauses.length;s++)a.push(T(e,t.else,n,r));null!==t.else&&a.push(T(e,t.else,n,r))}return F(a)}case"parameter":{const e=r[t.value.toLowerCase()];if(void 0===e&&n){const e=n[t.value.toLowerCase()];if(void 0===e)return"";if(null===e)return"";if("string"==typeof e||e instanceof String)return"string";if("boolean"==typeof e)return"boolean";if((0,s.J_)(e))return"date";if((0,s.NP)(e))return"date";if((0,s.$A)(e))return"date-only";if((0,s._U)(e))return"time-only";if("number"==typeof e)return e%1==0?"integer":"double"}return void 0===e?"":e}case"expression-list":{const a=[];for(const s of t.value)a.push(T(e,s,n,r));return a}case"unary-expression":return"boolean";case"binary-expression":switch(t.operator){case"AND":case"OR":case"IN":case"NOT IN":case"BETWEEN":case"NOTBETWEEN":case"LIKE":case"NOT LIKE":case"<>":case"<":case">":case">=":case"<=":case"=":return"boolean";case"IS":case"ISNOT":if("null"!==t.right.type)throw new a.eS(a.f.UnsupportedIsRhs);return"boolean";case"*":case"-":case"+":case"/":return F([T(e,t.left,n,r),T(e,t.right,n,r)]);case"||":return"string";default:throw new a.eS(a.f.UnsupportedOperator,{operator:t.operator})}case"null":return"";case"boolean":return"boolean";case"string":return"string";case"number":return null===t.value?"":t.value%1==0?"integer":"double";case"date":return"date";case"timestamp":return t.withtimezone?"timestamp-offset":"date";case"time":return"time-only";case"current-time":return"date";case"column-reference":{const n=e[t.column.toLowerCase()];return void 0===n?"":n}case"function":switch(t.name.toLowerCase()){case"cast":switch(t.args?.value[1]?.value.type??""){case"integer":case"smallint":return"integer";case"real":case"float":return"double";case"date":case"timestamp":return!0===t.args?.value[1]?.value?.withtimezone?"timestamp-offset":"date";case"time":return"time-only";case"varchar":return"string";default:return""}case"position":case"extract":case"char_length":case"mod":return"integer";case"round":if(i=T(e,t.args,n,r),i instanceof Array){if(i.length<=0)return"double";i=i[0]}return i;case"sign":return"integer";case"ceiling":case"floor":case"abs":return i=T(e,t.args,n,r),i instanceof Array&&(i=F(i)),"integer"===i||"double"===i?i:"double";case"area":case"length":case"log":case"log10":case"sin":case"cos":case"tan":case"asin":case"acos":case"atan":case"cosh":case"sinh":case"tanh":case"power":return"double";case"substring":case"trim":case"concat":case"lower":case"upper":return"string";case"truncate":return"double";case"nullif":case"coalesce":return i=T(e,t.args,n,r),i instanceof Array?i.length>0?i[0]:"":i}return""}throw new a.eS(a.f.UnsupportedSyntax,{node:t.type})}const I={boolean:1,string:2,integer:3,double:4,date:5};function F(e){if(e){let t="";for(const n of e)""!==n&&(t=""===t||I[t]<I[n]?n:t);return t}return""}function b(e,t){return D(e.parseTree,t)}function E(e){return"column-reference"===e?.parseTree.type}function D(e,t){if(null==e)return!1;switch(e.type){case"when-clause":return D(e.operand,t)||D(e.value,t);case"case-expression":for(const n of e.clauses)if(D(n,t))return!0;return!("simple"!==e.format||!D(e.operand,t))||!(null===e.else||!D(e.else,t));case"parameter":case"null":case"boolean":case"date":case"timestamp":case"time":case"string":case"number":return!1;case"expression-list":for(const n of e.value)if(D(n,t))return!0;return!1;case"unary-expression":return D(e.expr,t);case"binary-expression":return D(e.left,t)||D(e.right,t);case"column-reference":return t.toLowerCase()===e.column.toLowerCase();case"function":return D(e.args,t)}return!1}function v(e){let t="";return t+=e.period.toUpperCase(),t}function A(e,t,n){let r="";return r="interval-period"===t.type?v(t):v(t.start)+" TO "+v(t.end),"INTERVAL "+n+" "+e+" "+r}},95002:(e,t,n)=>{n.d(t,{CA:()=>y,EB:()=>F,Fp:()=>m,J6:()=>g,QX:()=>T,Sm:()=>w,VV:()=>_,g3:()=>f,m:()=>S,tj:()=>p});var r=n(59987),a=n(90658),s=n(36515),i=n(22641),l=n(41555),o=n(53970);function u(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}function c(e){const t=u(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/e.length}function h(e){const t=u(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/(e.length-1)}function d(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t}function f(e){switch(e.toLowerCase()){case"distinct":return"distinct";case"avg":case"mean":return"avg";case"min":return"min";case"sum":return"sum";case"max":return"max";case"stdev":case"stddev":return"stddev";case"var":case"variance":return"var";case"count":return"count"}return""}function p(e,t,n=1e3){switch(e.toLowerCase()){case"distinct":return function(e,t){const n=[],r={},s=[];for(let i=0;i<e.length;i++){if(void 0!==e[i]&&null!==e[i]){const t=e[i];if((0,a.hj)(t)||(0,a.HD)(t))void 0===r[t]&&(n.push(t),r[t]=1);else{let e=!1;for(let n=0;n<s.length;n++)!0===(0,a.tt)(s[n],t)&&(e=!0);!1===e&&(s.push(t),n.push(t))}}if(n.length>=t&&-1!==t)return n}return n}(t,n);case"avg":case"mean":return u(t);case"min":return Math.min.apply(Math,t);case"sum":return d(t);case"max":return Math.max.apply(Math,t);case"stdev":case"stddev":return Math.sqrt(c(t));case"var":case"variance":return c(t);case"count":return t.length}return 0}async function _(e,t,n){const r=await I(e,t,n,!0);return 0===r.length?null:Math.min.apply(Math,r)}async function m(e,t,n){const r=await I(e,t,n,!0);return 0===r.length?null:Math.max.apply(Math,r)}async function g(e,t,n){let r="";t&&!(0,s.y5)(t)&&(r=(0,s.DT)(t,e.fields));const a=await I(e,t,n,!0);if(0===a.length)return null;const i=u(a);return null===i?i:"integer"===r?function(e){return e=+e,isFinite(e)?e-e%1||(e<0?-0:0===e?e:0):e}(i):i}async function y(e,t,n){const r=await I(e,t,n,!0);return 0===r.length?null:h(r)}async function S(e,t,n){const r=await I(e,t,n,!0);return 0===r.length?null:Math.sqrt(h(r))}async function w(e,t,n){const r=await I(e,t,n,!0);return 0===r.length?null:d(r)}async function T(e,t){return e.iterator(t).count()}async function I(e,t,n,a=!1){const s=e.iterator(n),u=[],c={ticker:0};let h=await s.next();for(;null!==h;){if(c.ticker++,n.aborted)throw new r.EN(r.H9.Cancelled);c.ticker%100==0&&(c.ticker=0,await new Promise((e=>{setTimeout(e,0)})));const e=t?.calculateValue(h);null===e?!1===a&&(u[u.length]=e):u[u.length]=e instanceof i.u||e instanceof o.n?e.toNumber():e instanceof l.H?e.toMilliseconds():e,h=await s.next()}return u}async function F(e,t,n=1e3,a=null){const s=e.iterator(a),u=[],c={},h={ticker:0};let d=await s.next();for(;null!==d;){if(h.ticker++,a&&a.aborted)throw new r.EN(r.H9.Cancelled);h.ticker%100==0&&(h.ticker=0,await new Promise((e=>{setTimeout(e,0)})));const e=t?.calculateValue(d);let f=e;if(e instanceof i.u?f="!!DATEONLY!!-"+e.toString():e instanceof l.H?f="!!TSOFFSETONLY!!-"+e.toString():e instanceof o.n?f="!!TIMEONLY!!-"+e.toString():e instanceof Date&&(f="!!DATE!!-"+e.toString()),null!=e&&void 0===c[f]&&(u.push(e),c[f]=1),u.length>=n&&-1!==n)return u;d=await s.next()}return u}},10661:(e,t,n)=>{n.d(t,{s:()=>a});var r=n(42100);class a extends r.s{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},8667:(e,t,n)=>{n.d(t,{CJ:()=>M,Cz:()=>O,D$:()=>B,ED:()=>w,FH:()=>x,G0:()=>L,Gg:()=>F,JI:()=>E,LV:()=>I,Nm:()=>T,Sp:()=>v,TE:()=>_,U1:()=>P,W4:()=>y,Y4:()=>U,_L:()=>k,cv:()=>R,e5:()=>D,f3:()=>N,fS:()=>m,j2:()=>j,jU:()=>p,kK:()=>g,kQ:()=>H,og:()=>b,oq:()=>h,r3:()=>f,rd:()=>C,sz:()=>G,uh:()=>S,wf:()=>A,z7:()=>d}),n(66577);var r=n(56569),a=n(94139),s=n(33955);function i(e){return Array.isArray(e)?e[0]?.spatialReference:e?.spatialReference}function l(e){return e?Array.isArray(e)?e.map(l):e.toJSON?e.toJSON():e:e}function o(e){return Array.isArray(e)?e.map((e=>(0,s.im)(e))):(0,s.im)(e)}let u;async function c(e,t){return(await async function(){return u||(u=(0,r.bA)("geometryEngineWorker",{strategy:"distributed"})),u}()).invoke("executeGEOperation",{operation:e,parameters:l(t)})}async function h(e,t){return o(await c("clip",[i(e),e,t]))}async function d(e,t){return o(await c("cut",[i(e),e,t]))}function f(e,t){return c("contains",[i(e),e,t])}function p(e,t){return c("crosses",[i(e),e,t])}function _(e,t,n){return c("distance",[i(e),e,t,n])}function m(e,t){return c("equals",[i(e),e,t])}function g(e,t){return c("intersects",[i(e),e,t])}function y(e,t){return c("touches",[i(e),e,t])}function S(e,t){return c("within",[i(e),e,t])}function w(e,t){return c("disjoint",[i(e),e,t])}function T(e,t){return c("overlaps",[i(e),e,t])}function I(e,t,n){return c("relate",[i(e),e,t,n])}function F(e){return c("isSimple",[i(e),e])}async function b(e){return o(await c("simplify",[i(e),e]))}async function E(e,t=!1){return o(await c("convexHull",[i(e),e,t]))}async function D(e,t){return o(await c("difference",[i(e),e,t]))}async function v(e,t){return o(await c("symmetricDifference",[i(e),e,t]))}async function A(e,t){return o(await c("intersect",[i(e),e,t]))}async function L(e,t=null){const n=function(e,t){let n;return Array.isArray(e)?n=e:(n=[],n.push(e),null!=t&&n.push(t)),n}(e,t);return o(await c("union",[i(n),n]))}async function R(e,t,n,r,a,s){return o(await c("offset",[i(e),e,t,n,r,a,s]))}async function N(e,t,n,r=!1){const a=[i(e),e,t,n,r];return o(await c("buffer",a))}async function C(e,t,n,r,a,s){const l=[i(e),e,t,n,r,a,s];return o(await c("geodesicBuffer",l))}async function x(e,t,n=!0){const r=await c("nearestCoordinate",[i(e),e,t,n]);return{...r,coordinate:a.Z.fromJSON(r.coordinate)}}async function k(e,t){const n=await c("nearestVertex",[i(e),e,t]);return{...n,coordinate:a.Z.fromJSON(n.coordinate)}}async function P(e,t,n){if(null==e)throw new Z;const r=e.spatialReference;if(null==(n=n??function(e){return"xmin"in e?e.center:"x"in e?e:e.extent?.center}(e)))throw new Z;const a=e.constructor.fromJSON(await c("rotate",[r,e,t,n]));return a.spatialReference=r,a}async function B(e,t,n,r){return o(await c("generalize",[i(e),e,t,n,r]))}async function O(e,t,n){return o(await c("densify",[i(e),e,t,n]))}async function j(e,t,n,r=0){return o(await c("geodesicDensify",[i(e),e,t,n,r]))}function M(e,t){return c("planarArea",[i(e),e,t])}function G(e,t){return c("planarLength",[i(e),e,t])}function U(e,t,n){return c("geodesicArea",[i(e),e,t,n])}function H(e,t,n){return c("geodesicLength",[i(e),e,t,n])}class Z extends Error{constructor(){super("Illegal Argument Exception")}}},94443:(e,t,n)=>{n.d(t,{ME:()=>p,Su:()=>_,tz:()=>f});var r=n(20102),a=n(50758),s=n(95330),i=n(70171);const l=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,o={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function u(e){return e in o}Object.keys(o);const c=[],h=new Map;function d(e){for(const t of h.keys())m(e.pattern,t)&&h.delete(t)}function f(e){return c.includes(e)||(d(e),c.unshift(e)),(0,a.kB)((()=>{const t=c.indexOf(e);t>-1&&(c.splice(t,1),d(e))}))}async function p(e){const t=(0,i.Kd)();h.has(e)||h.set(e,async function(e,t){const n=[];for(const r of c)if(m(r.pattern,e))try{return await r.fetchMessageBundle(e,t)}catch(e){n.push(e)}if(n.length)throw new r.Z("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:n});throw new r.Z("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const n=h.get(e);return n&&await g.add(n),n}function _(e){if(!l.test(e))return null;const t=l.exec(e);if(null===t)return null;const[,n,r]=t,a=n+(r?"-"+r.toUpperCase():"");return u(a)?a:u(n)?n:null}function m(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,i.Ze)((()=>{h.clear()}));const g=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,s.hh)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4505],{97323:(e,t,n)=>{function r(){return[0,0]}function i(e,t){return[e,t]}function o(e,t){return new Float64Array(e,t,2)}function a(){return i(1,1)}function s(){return i(1,0)}function u(){return i(0,1)}n.d(t,{a:()=>r,c:()=>o,f:()=>i});const c=a(),l=s(),E=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:l,UNIT_Y:E,ZEROS:[0,0],clone:function(e){return[e[0],e[1]]},create:r,createView:o,fromArray:function(e,t=[0,0]){const n=Math.min(2,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t},fromValues:i,ones:a,unitX:s,unitY:u,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},35065:(e,t,n)=>{var r;n.d(t,{T:()=>r}),function(e){e.POSITION="position",e.NORMAL="normal",e.NORMALCOMPRESSED="normalCompressed",e.UV0="uv0",e.AUXPOS1="auxpos1",e.AUXPOS2="auxpos2",e.COLOR="color",e.SYMBOLCOLOR="symbolColor",e.SIZE="size",e.TANGENT="tangent",e.OFFSET="offset",e.PERSPECTIVEDIVIDE="perspectiveDivide",e.SUBDIVISIONFACTOR="subdivisionFactor",e.COLORFEATUREATTRIBUTE="colorFeatureAttribute",e.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",e.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",e.DISTANCETOSTART="distanceToStart",e.UVMAPSPACE="uvMapSpace",e.BOUNDINGRECT="boundingRect",e.UVREGION="uvRegion",e.PROFILERIGHT="profileRight",e.PROFILEUP="profileUp",e.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",e.FEATUREVALUE="featureValue",e.INSTANCEMODELORIGINHI="instanceModelOriginHi",e.INSTANCEMODELORIGINLO="instanceModelOriginLo",e.INSTANCEMODEL="instanceModel",e.INSTANCEMODELNORMAL="instanceModelNormal",e.INSTANCECOLOR="instanceColor",e.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",e.LOCALTRANSFORM="localTransform",e.GLOBALTRANSFORM="globalTransform",e.BOUNDINGSPHERE="boundingSphere",e.MODELORIGIN="modelOrigin",e.MODELSCALEFACTORS="modelScaleFactors",e.FEATUREATTRIBUTE="featureAttribute",e.STATE="state",e.LODLEVEL="lodLevel",e.POSITION0="position0",e.POSITION1="position1",e.NORMALA="normalA",e.NORMALB="normalB",e.COMPONENTINDEX="componentIndex",e.VARIANTOFFSET="variantOffset",e.VARIANTSTROKE="variantStroke",e.VARIANTEXTENSION="variantExtension",e.U8PADDING="u8padding",e.U16PADDING="u16padding",e.SIDENESS="sideness",e.START="start",e.END="end",e.UP="up",e.EXTRUDE="extrude",e.OBJECTANDLAYERIDCOLOR="objectAndLayerIdColor",e.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(r||(r={}))},49594:(e,t,n)=>{n.r(t),n.d(t,{default:()=>u});var r=n(65576);function i(e,t){return t.push(e.buffer),{buffer:e.buffer,layout:new r.Gw(e.layout)}}var o=n(17288),a=n(97411),s=n(212);class u{async extract(e){const t=c(e),n=(0,s.Kl)(t),r=[t.data.buffer];return{result:l(n,r),transferList:r}}async extractComponentsEdgeLocations(e){const t=c(e),n=(0,s.kY)(t.data,t.skipDeduplicate,t.indices,t.indicesLength),r=[];return{result:i((0,a.n)(n,A,O).regular.instancesData,r),transferList:r}}async extractEdgeLocations(e){const t=c(e),n=(0,s.kY)(t.data,t.skipDeduplicate,t.indices,t.indicesLength),r=[];return{result:i((0,a.n)(n,E,O).regular.instancesData,r),transferList:r}}}function c(e){return{data:o.tf.createView(e.dataBuffer),indices:"Uint32Array"===e.indicesType?new Uint32Array(e.indices):"Uint16Array"===e.indicesType?new Uint16Array(e.indices):e.indices,indicesLength:e.indicesLength,writerSettings:e.writerSettings,skipDeduplicate:e.skipDeduplicate}}function l(e,t){return t.push(e.regular.lodInfo.lengths.buffer),t.push(e.silhouette.lodInfo.lengths.buffer),{regular:{instancesData:i(e.regular.instancesData,t),lodInfo:{lengths:e.regular.lodInfo.lengths.buffer}},silhouette:{instancesData:i(e.silhouette.instancesData,t),lodInfo:{lengths:e.silhouette.lodInfo.lengths.buffer}},averageEdgeLength:e.averageEdgeLength}}const E=new class{allocate(e){return s.Yr.createBuffer(e)}trim(e,t){return e.slice(0,t)}write(e,t,n){e.position0.setVec(t,n.position0),e.position1.setVec(t,n.position1)}},A=new class{allocate(e){return s.n_.createBuffer(e)}trim(e,t){return e.slice(0,t)}write(e,t,n){e.position0.setVec(t,n.position0),e.position1.setVec(t,n.position1),e.componentIndex.set(t,n.componentIndex)}},O={allocate:()=>null,write:()=>{},trim:()=>null}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4505],{97323:(e,t,n)=>{function r(){return[0,0]}function i(e,t){return[e,t]}function o(e,t){return new Float64Array(e,t,2)}function a(){return i(1,1)}function s(){return i(1,0)}function u(){return i(0,1)}n.d(t,{a:()=>r,c:()=>o,f:()=>i});const c=a(),l=s(),E=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:l,UNIT_Y:E,ZEROS:[0,0],clone:function(e){return[e[0],e[1]]},create:r,createView:o,fromArray:function(e,t=[0,0]){const n=Math.min(2,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t},fromValues:i,ones:a,unitX:s,unitY:u,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},35065:(e,t,n)=>{var r;n.d(t,{T:()=>r}),function(e){e.POSITION="position",e.NORMAL="normal",e.NORMALCOMPRESSED="normalCompressed",e.UV0="uv0",e.AUXPOS1="auxpos1",e.AUXPOS2="auxpos2",e.COLOR="color",e.SYMBOLCOLOR="symbolColor",e.SIZE="size",e.TANGENT="tangent",e.OFFSET="offset",e.PERSPECTIVEDIVIDE="perspectiveDivide",e.SUBDIVISIONFACTOR="subdivisionFactor",e.COLORFEATUREATTRIBUTE="colorFeatureAttribute",e.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",e.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",e.DISTANCETOSTART="distanceToStart",e.UVMAPSPACE="uvMapSpace",e.BOUNDINGRECT="boundingRect",e.UVREGION="uvRegion",e.PROFILERIGHT="profileRight",e.PROFILEUP="profileUp",e.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",e.FEATUREVALUE="featureValue",e.INSTANCEMODELORIGINHI="instanceModelOriginHi",e.INSTANCEMODELORIGINLO="instanceModelOriginLo",e.INSTANCEMODEL="instanceModel",e.INSTANCEMODELNORMAL="instanceModelNormal",e.INSTANCECOLOR="instanceColor",e.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",e.LOCALTRANSFORM="localTransform",e.GLOBALTRANSFORM="globalTransform",e.BOUNDINGSPHERE="boundingSphere",e.MODELORIGIN="modelOrigin",e.MODELSCALEFACTORS="modelScaleFactors",e.FEATUREATTRIBUTE="featureAttribute",e.STATE="state",e.LODLEVEL="lodLevel",e.POSITION0="position0",e.POSITION1="position1",e.NORMALA="normalA",e.NORMALB="normalB",e.COMPONENTINDEX="componentIndex",e.VARIANTOFFSET="variantOffset",e.VARIANTSTROKE="variantStroke",e.VARIANTEXTENSION="variantExtension",e.SIDENESS="sideness",e.START="start",e.END="end",e.UP="up",e.EXTRUDE="extrude",e.OBJECTANDLAYERIDCOLOR="objectAndLayerIdColor",e.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(r||(r={}))},49594:(e,t,n)=>{n.r(t),n.d(t,{default:()=>u});var r=n(65576);function i(e,t){return t.push(e.buffer),{buffer:e.buffer,layout:new r.Gw(e.layout)}}var o=n(17288),a=n(97411),s=n(212);class u{async extract(e){const t=c(e),n=(0,s.Kl)(t),r=[t.data.buffer];return{result:l(n,r),transferList:r}}async extractComponentsEdgeLocations(e){const t=c(e),n=(0,s.kY)(t.data,t.skipDeduplicate,t.indices,t.indicesLength),r=[];return{result:i((0,a.n)(n,O,T).regular.instancesData,r),transferList:r}}async extractEdgeLocations(e){const t=c(e),n=(0,s.kY)(t.data,t.skipDeduplicate,t.indices,t.indicesLength),r=[];return{result:i((0,a.n)(n,E,T).regular.instancesData,r),transferList:r}}}function c(e){return{data:o.tf.createView(e.dataBuffer),indices:"Uint32Array"===e.indicesType?new Uint32Array(e.indices):"Uint16Array"===e.indicesType?new Uint16Array(e.indices):e.indices,indicesLength:e.indicesLength,writerSettings:e.writerSettings,skipDeduplicate:e.skipDeduplicate}}function l(e,t){return t.push(e.regular.lodInfo.lengths.buffer),t.push(e.silhouette.lodInfo.lengths.buffer),{regular:{instancesData:i(e.regular.instancesData,t),lodInfo:{lengths:e.regular.lodInfo.lengths.buffer}},silhouette:{instancesData:i(e.silhouette.instancesData,t),lodInfo:{lengths:e.silhouette.lodInfo.lengths.buffer}},averageEdgeLength:e.averageEdgeLength}}const E=new class{allocate(e){return s.Yr.createBuffer(e)}trim(e,t){return e.slice(0,t)}write(e,t,n){e.position0.setVec(t,n.position0),e.position1.setVec(t,n.position1)}},O=new class{allocate(e){return s.n_.createBuffer(e)}trim(e,t){return e.slice(0,t)}write(e,t,n){e.position0.setVec(t,n.position0),e.position1.setVec(t,n.position1),e.componentIndex.set(t,n.componentIndex)}},T={allocate:()=>null,write:()=>{},trim:()=>null}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4573],{84573:(e,t,s)=>{s.r(t),s.d(t,{default:()=>a});var o,r=s(43697),n=s(96674),i=s(5600),m=s(75215),p=(s(67676),s(80442),s(52011));let u=o=class extends n.wq{static from(e){return(0,m.TJ)(o,e)}constructor(e){super(e),this.sessionId=void 0,this.moment=null}};(0,r._)([(0,i.Cb)({type:String,json:{write:!0}})],u.prototype,"sessionId",void 0),(0,r._)([(0,i.Cb)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.moment=e?e.getTime():null}}}})],u.prototype,"moment",void 0),u=o=(0,r._)([(0,p.j)("esri.rest.versionManagement.gdbVersion.support.PostParameters")],u);const a=u}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5613],{95401:(e,t,n)=>{n.d(t,{e:()=>l});var r,i,o,s=n(5732),a={exports:{}};r=a,i=function(){function e(e,n,i){i=i||2;var o,s,a,c,u,h,f,p=n&&n.length,d=p?n[0]*i:e.length,g=t(e,0,d,i,!0),m=[];if(!g||g.next===g.prev)return m;if(p&&(g=l(e,n,g,i)),e.length>80*i){o=a=e[0],s=c=e[1];for(var y=i;y<d;y+=i)(u=e[y])<o&&(o=u),(h=e[y+1])<s&&(s=h),u>a&&(a=u),h>c&&(c=h);f=0!==(f=Math.max(a-o,c-s))?1/f:0}return r(g,m,i,o,s,f),m}function t(e,t,n,r,i){var o,s;if(i===S(e,t,n,r)>0)for(o=t;o<n;o+=r)s=M(o,e[o],e[o+1],s);else for(o=n-r;o>=t;o-=r)s=M(o,e[o],e[o+1],s);if(s&&v(s,s.next)){var a=s.next;C(s),s=a}return s}function n(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==x(r.prev,r,r.next))r=r.next;else{var i=r.prev;if(C(r),(r=t=i)===r.next)break;n=!0}}while(n||r!==t);return t}function r(e,t,l,c,u,h,f){if(e){!f&&h&&p(e,c,u,h);for(var d,g,m=e;e.prev!==e.next;)if(d=e.prev,g=e.next,h?o(e,c,u,h):i(e))t.push(d.i/l),t.push(e.i/l),t.push(g.i/l),C(e),e=g.next,m=g.next;else if((e=g)===m){f?1===f?r(e=s(n(e),t,l),t,l,c,u,h,2):2===f&&a(e,t,l,c,u,h):r(n(e),t,l,c,u,h,1);break}}}function i(e){var t=e.prev,n=e,r=e.next;if(x(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(m(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&x(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function o(e,t,n,r){var i=e.prev,o=e,s=e.next;if(x(i,o,s)>=0)return!1;for(var a=i.x<o.x?i.x<s.x?i.x:s.x:o.x<s.x?o.x:s.x,l=i.y<o.y?i.y<s.y?i.y:s.y:o.y<s.y?o.y:s.y,c=i.x>o.x?i.x>s.x?i.x:s.x:o.x>s.x?o.x:s.x,u=i.y>o.y?i.y>s.y?i.y:s.y:o.y>s.y?o.y:s.y,h=d(a,l,t,n,r),f=d(c,u,t,n,r),p=e.prevZ,g=e.nextZ;p&&p.z>=h&&g&&g.z<=f;){if(p!==e.prev&&p!==e.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,p.x,p.y)&&x(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,g!==e.prev&&g!==e.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,g.x,g.y)&&x(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;p&&p.z>=h;){if(p!==e.prev&&p!==e.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,p.x,p.y)&&x(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;g&&g.z<=f;){if(g!==e.prev&&g!==e.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,g.x,g.y)&&x(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function s(e,t,r){var i=e;do{var o=i.prev,s=i.next.next;!v(o,s)&&w(o,i,i.next,s)&&_(o,s)&&_(s,o)&&(t.push(o.i/r),t.push(i.i/r),t.push(s.i/r),C(i),C(i.next),i=e=s),i=i.next}while(i!==e);return n(i)}function a(e,t,i,o,s,a){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&y(l,c)){var u=T(l,c);return l=n(l,l.next),u=n(u,u.next),r(l,t,i,o,s,a),void r(u,t,i,o,s,a)}c=c.next}l=l.next}while(l!==e)}function l(e,r,i,o){var s,a,l,u=[];for(s=0,a=r.length;s<a;s++)(l=t(e,r[s]*o,s<a-1?r[s+1]*o:e.length,o,!1))===l.next&&(l.steiner=!0),u.push(g(l));for(u.sort(c),s=0;s<u.length;s++)i=n(i=h(u[s],i),i.next);return i}function c(e,t){return e.x-t.x}function u(e){if(e.next.prev===e)return e;let t=e;for(;;){const n=t.next;if(n.prev===t||n===t||n===e)break;t=n}return t}function h(e,t){var r=function(e,t){var n,r=t,i=e.x,o=e.y,s=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var a=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=i&&a>s){if(s=a,a===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(i===s)return n;var l,c=n,u=n.x,h=n.y,p=1/0;r=n;do{i>=r.x&&r.x>=u&&i!==r.x&&m(o<h?i:s,o,u,h,o<h?s:i,o,r.x,r.y)&&(l=Math.abs(o-r.y)/(i-r.x),_(r,e)&&(l<p||l===p&&(r.x>n.x||r.x===n.x&&f(n,r)))&&(n=r,p=l)),r=r.next}while(r!==c);return n}(e,t);if(!r)return t;var i=T(r,e),o=n(r,r.next);let s=u(i);return n(s,s.next),o=u(o),u(t===r?o:t)}function f(e,t){return x(e.prev,e,t.prev)<0&&x(t.next,e,e.next)<0}function p(e,t,n,r){var i=e;do{null===i.z&&(i.z=d(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,o,s,a,l,c=1;do{for(n=e,e=null,o=null,s=0;n;){for(s++,r=n,a=0,t=0;t<c&&(a++,r=r.nextZ);t++);for(l=c;a>0||l>0&&r;)0!==a&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(s>1)}(i)}function d(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function g(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function m(e,t,n,r,i,o,s,a){return(i-s)*(t-a)-(e-s)*(o-a)>=0&&(e-s)*(r-a)-(n-s)*(t-a)>=0&&(n-s)*(o-a)-(i-s)*(r-a)>=0}function y(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&w(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(_(e,t)&&_(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(x(e.prev,e,t.prev)||x(e,t.prev,t))||v(e,t)&&x(e.prev,e,e.next)>0&&x(t.prev,t,t.next)>0)}function x(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function w(e,t,n,r){var i=A(x(e,t,n)),o=A(x(e,t,r)),s=A(x(n,r,e)),a=A(x(n,r,t));return i!==o&&s!==a||!(0!==i||!b(e,n,t))||!(0!==o||!b(e,r,t))||!(0!==s||!b(n,e,r))||!(0!==a||!b(n,t,r))}function b(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function A(e){return e>0?1:e<0?-1:0}function _(e,t){return x(e.prev,e,e.next)<0?x(e,t,e.next)>=0&&x(e,e.prev,t)>=0:x(e,t,e.prev)<0||x(e,e.next,t)<0}function T(e,t){var n=new Z(e.i,e.x,e.y),r=new Z(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function M(e,t,n,r){var i=new Z(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function C(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Z(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function S(e,t,n,r){for(var i=0,o=t,s=n-r;o<n;o+=r)i+=(e[s]-e[o])*(e[o+1]+e[s+1]),s=o;return i}return e.deviation=function(e,t,n,r){var i=t&&t.length,o=i?t[0]*n:e.length,s=Math.abs(S(e,0,o,n));if(i)for(var a=0,l=t.length;a<l;a++){var c=t[a]*n,u=a<l-1?t[a+1]*n:e.length;s-=Math.abs(S(e,c,u,n))}var h=0;for(a=0;a<r.length;a+=3){var f=r[a]*n,p=r[a+1]*n,d=r[a+2]*n;h+=Math.abs((e[f]-e[d])*(e[p+1]-e[f+1])-(e[f]-e[p])*(e[d+1]-e[f+1]))}return 0===s&&0===h?0:Math.abs((h-s)/s)},e.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,i=0;i<e.length;i++){for(var o=0;o<e[i].length;o++)for(var s=0;s<t;s++)n.vertices.push(e[i][o][s]);i>0&&(r+=e[i-1].length,n.holes.push(r))}return n},e},void 0!==(o=i())&&(r.exports=o);const l=(0,s.g)(a.exports)},20773:(e,t,n)=>{n.d(t,{a:()=>a,b:()=>s,c:()=>i,d:()=>u,e:()=>l,n:()=>h,s:()=>c,t:()=>o});var r=n(72220);function i(e,t,n){o(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function o(e,t,n,i=3,o=i){if(e.length/i!==Math.ceil(t.length/o))return r.c.error("source and destination buffers need to have the same number of elements"),e;const s=e.length/i,a=n[0],l=n[1],c=n[2],u=n[4],h=n[5],f=n[6],p=n[8],d=n[9],g=n[10],m=n[12],y=n[13],x=n[14];let v=0,w=0;for(let n=0;n<s;n++){const n=t[v],r=t[v+1],s=t[v+2];e[w]=a*n+u*r+p*s+m,e[w+1]=l*n+h*r+d*s+y,e[w+2]=c*n+f*r+g*s+x,v+=o,w+=i}return e}function s(e,t,n){a(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function a(e,t,n,i=3,o=i){if(e.length/i!==Math.ceil(t.length/o))return void r.c.error("source and destination buffers need to have the same number of elements");const s=e.length/i,a=n[0],l=n[1],c=n[2],u=n[3],h=n[4],f=n[5],p=n[6],d=n[7],g=n[8];let m=0,y=0;for(let n=0;n<s;n++){const n=t[m],r=t[m+1],s=t[m+2];e[y]=a*n+u*r+p*s,e[y+1]=l*n+h*r+d*s,e[y+2]=c*n+f*r+g*s,m+=o,y+=i}}function l(e,t,n){c(e.typedBuffer,t,n,e.typedBufferStride)}function c(e,t,n,r=3){const i=Math.min(e.length/r,t.count),o=t.typedBuffer,s=t.typedBufferStride;let a=0,l=0;for(let t=0;t<i;t++)e[l]=n*o[a],e[l+1]=n*o[a+1],e[l+2]=n*o[a+2],a+=s,l+=r}function u(e,t){h(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function h(e,t,n=3,r=n){const i=Math.min(e.length/n,t.length/r);let o=0,s=0;for(let a=0;a<i;a++){const i=t[o],a=t[o+1],l=t[o+2],c=i*i+a*a+l*l;if(c>0){const t=1/Math.sqrt(c);e[s]=t*i,e[s+1]=t*a,e[s+2]=t*l}o+=r,s+=n}}Object.freeze(Object.defineProperty({__proto__:null,normalize:h,normalizeView:u,scale:c,scaleView:l,shiftRight:function(e,t,n){const r=Math.min(e.count,t.count),i=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride;let l=0,c=0;for(let e=0;e<r;e++)i[c]=s[l]>>n,i[c+1]=s[l+1]>>n,i[c+2]=s[l+2]>>n,l+=a,c+=o},transformMat3:a,transformMat3View:s,transformMat4:o,transformMat4View:i},Symbol.toStringTag,{value:"Module"}))},70163:(e,t,n)=>{n.d(t,{Jl:()=>u,n$:()=>h});var r=n(3172),i=n(20102),o=n(95330),s=n(17452),a=n(49917);let l=null,c=!0;function u(e,t,n,r){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(c)try{return new ImageData(e,t,n)}catch(e){c=!1}const i=function(e,t,n){return n||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),n=l),n.getContext("2d").createImageData(e,t)}(t,n,r);return i.data.set(e,0),i}async function h(e,t){const{arrayBuffer:l,mediaType:c}=await async function(e,t){const n=(0,s.sJ)(e);if(n?.isBase64)return{arrayBuffer:(0,a.R)(n.data),mediaType:n.mediaType};const i=await(0,r.Z)(e,{responseType:"array-buffer",...t});return{arrayBuffer:i.data,mediaType:i.getHeader("Content-Type")}}(e,t),u="image/png"===c;if("image/gif"===c){const{isAnimatedGIF:e,parseGif:r}=await n.e(3310).then(n.bind(n,83310));if(e(l))return r(l,t)}if(u){const{isAnimatedPNG:e,parseApng:r}=await n.e(4492).then(n.bind(n,54492));if(e(l))return r(l,t)}return async function(e,t){const n=window.URL.createObjectURL(e);try{const{data:e}=await(0,r.Z)(n,{...t,responseType:"image"});return e}catch(e){if(!(0,o.D_)(e))throw new i.Z("invalid-image",`Could not fetch requested image at ${n}`);throw e}finally{window.URL.revokeObjectURL(n)}}(new Blob([l],{type:c}),t)}},83025:(e,t,n)=>{n.d(t,{JK:()=>a,QZ:()=>o,Rq:()=>s,bg:()=>i,mB:()=>l});var r=n(1533);function i(e,t=!1){return e<=r.c8?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function o(e){return((0,r.kJ)(e)?e.length:e.byteLength/8)<=r.c8?Array.from(e):new Float64Array(e)}function s(e,t,n){return Array.isArray(e)?e.slice(t,t+n):e.subarray(t,t+n)}function a(e,t){for(let n=0;n<t.length;++n)e[n]=t[n];return e}function l(e){return Array.isArray(e)?new Float64Array(e):e}},24882:(e,t,n)=>{n.d(t,{$z:()=>s,KF:()=>u,mi:()=>i});var r=n(1533);function i(e){return(0,r.kJ)(e)?e.length<r.c8?e:o(e):e.length<r.c8?Array.from(e):e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:o(e)}function o(e){let t=!0;for(const n of e){if(n>=65536)return(0,r.kJ)(e)?new Uint32Array(e):e;n>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}function s(e){return e<=r.c8?new Array(e):e<=65536?new Uint16Array(e):new Uint32Array(e)}let a=(()=>{const e=new Uint32Array(131072);for(let t=0;t<e.length;++t)e[t]=t;return e})();const l=[0],c=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function u(e){if(1===e)return l;if(e<r.c8)return Array.from(new Uint16Array(c.buffer,0,e));if(e<c.length)return new Uint16Array(c.buffer,0,e);if(e>a.length){const t=Math.max(2*a.length,e);a=new Uint32Array(t);for(let e=0;e<a.length;e++)a[e]=e}return new Uint32Array(a.buffer,0,e)}new Uint8Array(65536)},62540:(e,t,n)=>{n.d(t,{Z:()=>x});var r,i=n(43697),o=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011),h=n(75215),f=n(65542),p=n(60746),d=n(71630);const g="esri.geometry.support.MeshComponent",m=a.Z.getLogger(g);let y=r=class extends o.wq{static from(e){return(0,h.TJ)(r,e)}constructor(e){super(e),this.faces=null,this.material=null,this.name=void 0,this.shading="source",this.trustSourceNormals=!1}castFaces(e){return(0,d.X)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},m)}castMaterial(e){return(0,h.TJ)(e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?p.Z:f.Z,e)}clone(){return new r({faces:(0,s.d9)(this.faces),shading:this.shading,material:(0,s.d9)(this.material),trustSourceNormals:this.trustSourceNormals,name:this.name})}cloneWithDeduplication(e,t){const n={faces:(0,s.d9)(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(e,t):null,trustSourceNormals:this.trustSourceNormals,name:this.name};return new r(n)}get memoryUsage(){let e=0;return null!=this.faces&&(e+=this.faces.byteLength),null!=this.material&&(e+=this.material.memoryUsage),e}};(0,i._)([(0,l.Cb)({json:{write:!0}})],y.prototype,"faces",void 0),(0,i._)([(0,c.p)("faces")],y.prototype,"castFaces",null),(0,i._)([(0,l.Cb)({type:f.Z,json:{write:!0}})],y.prototype,"material",void 0),(0,i._)([(0,c.p)("material")],y.prototype,"castMaterial",null),(0,i._)([(0,l.Cb)()],y.prototype,"name",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"shading",void 0),(0,i._)([(0,l.Cb)({type:Boolean})],y.prototype,"trustSourceNormals",void 0),y=r=(0,i._)([(0,u.j)(g)],y);const x=y},85872:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(43697),i=n(2368),o=n(96674),s=n(5600),a=(n(75215),n(67676),n(80442),n(36030)),l=n(52011),c=n(65617),u=n(94139);let h=class extends((0,i.J)(o.wq)){constructor(e){super(e),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=(0,c.c)()}getOriginPoint(e){const[t,n,r]=this.origin;return new u.Z({x:t,y:n,z:r,spatialReference:e})}setOriginFromPoint({x:e,y:t,z:n}){this.origin=(0,c.f)(e,t,n??0)}};(0,r._)([(0,a.J)({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],h.prototype,"type",void 0),(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"origin",void 0),h=(0,r._)([(0,l.j)("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],h);const f=h},84555:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(43697),i=n(2368),o=n(96674),s=n(5600),a=(n(75215),n(67676),n(80442),n(36030)),l=n(52011),c=n(65617),u=n(94139);let h=class extends((0,i.J)(o.wq)){constructor(e){super(e),this.type="local",this.isRelative=!0,this.isGeoreferenced=!1,this.origin=(0,c.c)()}getOriginPoint(e){const[t,n,r]=this.origin;return new u.Z({x:t,y:n,z:r,spatialReference:e})}setOriginFromPoint({x:e,y:t,z:n}){this.origin=(0,c.f)(e,t,n??0)}};(0,r._)([(0,a.J)({local:"local"},{readOnly:!0})],h.prototype,"type",void 0),(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"origin",void 0),h=(0,r._)([(0,l.j)("esri.geometry.support.MeshLocalVertexSpace")],h);const f=h},65542:(e,t,n)=>{n.d(t,{Z:()=>f});var r,i=n(43697),o=n(22303),s=n(96674),a=n(5600),l=(n(75215),n(67676),n(80442),n(52011)),c=n(85965),u=n(80218);let h=r=class extends s.wq{constructor(e){super(e),this.color=null,this.colorTexture=null,this.colorTextureTransform=null,this.normalTexture=void 0,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=null!=e?e.get(this):null;if(n)return n;const i=new r(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,i),i}clonePropertiesWithDeduplication(e){return{color:null!=this.color?this.color.clone():null,colorTexture:this.colorTexture?.cloneWithDeduplication(e),normalTexture:this.normalTexture?.cloneWithDeduplication(e),alphaMode:this.alphaMode,alphaCutoff:this.alphaCutoff,doubleSided:this.doubleSided,colorTextureTransform:this.colorTextureTransform?.clone(),normalTextureTransform:this.normalTextureTransform?.clone()}}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let e=0;return e+=null!=this.color?16:0,null!=this.colorTexture&&(e+=this.colorTexture.memoryUsage),e+=null!=this.colorTextureTransform?20:0,null!=this.normalTexture&&(e+=this.normalTexture.memoryUsage),e+=null!=this.normalTextureTransform?20:0,e}};(0,i._)([(0,a.Cb)({type:o.Z,json:{write:!0}})],h.prototype,"color",void 0),(0,i._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"colorTexture",void 0),(0,i._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"colorTextureTransform",void 0),(0,i._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"normalTexture",void 0),(0,i._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"normalTextureTransform",void 0),(0,i._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],h.prototype,"alphaMode",void 0),(0,i._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],h.prototype,"alphaCutoff",void 0),(0,i._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],h.prototype,"doubleSided",void 0),h=r=(0,i._)([(0,l.j)("esri.geometry.support.MeshMaterial")],h);const f=h},60746:(e,t,n)=>{n.d(t,{Z:()=>f});var r,i=n(43697),o=n(22303),s=n(5600),a=(n(75215),n(67676),n(80442),n(52011)),l=n(65542),c=n(85965),u=n(80218);let h=r=class extends l.Z{constructor(e){super(e),this.emissiveColor=null,this.emissiveTexture=null,this.emissiveTextureTransform=void 0,this.occlusionTexture=null,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTexture=null,this.metallicRoughnessTextureTransform=void 0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=null!=e?e.get(this):null;if(n)return n;const i=new r(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,i),i}getMemoryUsage(){let e=super.getMemoryUsage();return e+=null!=this.emissiveColor?16:0,null!=this.emissiveTexture&&(e+=this.emissiveTexture.memoryUsage),e+=null!=this.emissiveTextureTransform?20:0,null!=this.occlusionTexture&&(e+=this.occlusionTexture.memoryUsage),e+=null!=this.occlusionTextureTransform?20:0,null!=this.metallicRoughnessTexture&&(e+=this.metallicRoughnessTexture.memoryUsage),e+=null!=this.metallicRoughnessTextureTransform?20:0,e}clonePropertiesWithDeduplication(e){return{...super.clonePropertiesWithDeduplication(e),emissiveColor:this.emissiveColor?.clone(),emissiveTexture:this.emissiveTexture?.cloneWithDeduplication(e),emissiveTextureTransform:this.emissiveTextureTransform?.clone(),occlusionTexture:this.occlusionTexture?.cloneWithDeduplication(e),occlusionTextureTransform:this.occlusionTextureTransform?.clone(),metallic:this.metallic,roughness:this.roughness,metallicRoughnessTexture:this.metallicRoughnessTexture?.cloneWithDeduplication(e),metallicRoughnessTextureTransform:this.metallicRoughnessTextureTransform?.clone()}}};(0,i._)([(0,s.Cb)({type:o.Z,json:{write:!0}})],h.prototype,"emissiveColor",void 0),(0,i._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"emissiveTexture",void 0),(0,i._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"emissiveTextureTransform",void 0),(0,i._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"occlusionTexture",void 0),(0,i._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"occlusionTextureTransform",void 0),(0,i._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],h.prototype,"metallic",void 0),(0,i._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],h.prototype,"roughness",void 0),(0,i._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"metallicRoughnessTexture",void 0),(0,i._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"metallicRoughnessTextureTransform",void 0),h=r=(0,i._)([(0,a.j)("esri.geometry.support.MeshMaterialMetallicRoughness")],h);const f=h},85965:(e,t,n)=>{n.d(t,{Z:()=>m});var r,i=n(43697),o=(n(80442),n(70163)),s=n(96674),a=n(5600),l=n(75215),c=(n(67676),n(71715)),u=n(52011),h=n(30556),f=n(25929);const p=new WeakMap;let d=0,g=r=class extends s.wq{constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,n,r){if(e instanceof HTMLImageElement){const i={type:"image-element",src:(0,f.t)(e.src,r),crossOrigin:e.crossOrigin};t[n]=i}else if(e instanceof HTMLCanvasElement){const r=e.getContext("2d").getImageData(0,0,e.width,e.height),i={type:"canvas-element",imageData:this._encodeImageData(r)};t[n]=i}else if(e instanceof HTMLVideoElement){const i={type:"video-element",src:(0,f.t)(e.src,r),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload};t[n]=i}else if(e instanceof ImageData){const r={type:"image-data",imageData:this._encodeImageData(e)};t[n]=r}}readData(e){switch(e.type){case"image-element":{const t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{const t=this._decodeImageData(e.imageData),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").putImageData(t,0,0),n}case"image-data":return this._decodeImageData(e.imageData);case"video-element":{const t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){const e=this.data,t=this.url;if(e instanceof HTMLCanvasElement)return this._imageDataContainsTransparent(e.getContext("2d").getImageData(0,0,e.width,e.height));if(e instanceof ImageData)return this._imageDataContainsTransparent(e);if(t){const e=t.substr(t.length-4,4).toLowerCase(),n=t.substr(0,15).toLocaleLowerCase();if(".png"===e||"data:image/png;"===n)return!0}return!1}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){const e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null!=this.url?t(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(p.has(this.data)||p.set(this.data,++d),t(p.get(this.data))):t()}get memoryUsage(){let e=0;if(e+=null!=this.url?this.url.length:0,null!=this.data){const t=this.data;"data"in t?e+=t.data.byteLength:t instanceof HTMLImageElement?e+=t.naturalWidth*t.naturalHeight*3:t instanceof HTMLCanvasElement&&(e+=t.width*t.height*3)}return e}clone(){const e={url:this.url,data:this.data,wrap:this._cloneWrap()};return new r(e)}cloneWithDeduplication(e){const t=e.get(this);if(t)return t;const n=this.clone();return e.set(this,n),n}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}_encodeImageData(e){let t="";for(let n=0;n<e.data.length;n++)t+=String.fromCharCode(e.data[n]);return{data:btoa(t),width:e.width,height:e.height}}_decodeImageData(e){const t=atob(e.data),n=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return(0,o.Jl)(n,e.width,e.height)}_imageDataContainsTransparent(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}static from(e){return"string"==typeof e?new r({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new r({data:e}):(0,l.TJ)(r,e)}};(0,i._)([(0,a.Cb)({type:String,json:{write:f.w}})],g.prototype,"url",null),(0,i._)([(0,a.Cb)({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),(0,a.Cb)()],g.prototype,"data",null),(0,i._)([(0,h.c)("data")],g.prototype,"writeData",null),(0,i._)([(0,c.r)("data")],g.prototype,"readData",null),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],g.prototype,"transparent",null),(0,i._)([(0,a.Cb)({json:{write:!0}})],g.prototype,"wrap",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],g.prototype,"contentHash",null),g=r=(0,i._)([(0,u.j)("esri.geometry.support.MeshTexture")],g);const m=g},80218:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(43697),i=n(2368),o=n(96674),s=n(5600),a=(n(75215),n(67676),n(80442),n(52011));let l=class extends((0,i.J)(o.wq)){constructor(e){super(e),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,r._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,r._)([(0,a.j)("esri.geometry.support.MeshTextureTransform")],l);const c=l},71630:(e,t,n)=>{n.d(t,{Q:()=>p,X:()=>g});var r,i=n(43697),o=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011);const h="esri.geometry.support.MeshVertexAttributes",f=a.Z.getLogger(h);let p=r=class extends o.wq{constructor(e){super(e),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(e){return g(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},f)}castPosition(e){return e&&e instanceof Float32Array&&f.warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),g(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},f)}castUv(e){return g(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},f)}castNormal(e){return g(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},f)}castTangent(e){return g(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},f)}clone(){const e={position:(0,s.d9)(this.position),uv:(0,s.d9)(this.uv),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),color:(0,s.d9)(this.color)};return new r(e)}clonePositional(){const e={position:(0,s.d9)(this.position),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),uv:this.uv,color:this.color};return new r(e)}get memoryUsage(){let e=0;return e+=this.position.byteLength,null!=this.uv&&(e+=this.uv.byteLength),null!=this.normal&&(e+=this.normal.byteLength),null!=this.tangent&&(e+=this.tangent.byteLength),null!=this.color&&(e+=this.color.byteLength),e}};function d(e,t,n,r){const{loggerTag:i,stride:o}=t;return e.length%o!=0?(r.error(i,`Invalid array length, expected a multiple of ${o}`),new n([])):e}function g(e,t,n,r,i){if(!e)return e;if(e instanceof t)return d(e,r,t,i);for(const o of n)if(e instanceof o)return d(new t(e),r,t,i);if(Array.isArray(e))return d(new t(e),r,t,i);{const r=n.map((e=>`'${e.name}'`));return i.error(`Failed to set property, expected one of ${r}, but got ${e.constructor.name}`),new t([])}}function m(e,t,n){t[n]=function(e){const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n];return t}(e)}(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"color",void 0),(0,i._)([(0,c.p)("color")],p.prototype,"castColor",null),(0,i._)([(0,l.Cb)({nonNullable:!0,json:{write:m}})],p.prototype,"position",void 0),(0,i._)([(0,c.p)("position")],p.prototype,"castPosition",null),(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"uv",void 0),(0,i._)([(0,c.p)("uv")],p.prototype,"castUv",null),(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"normal",void 0),(0,i._)([(0,c.p)("normal")],p.prototype,"castNormal",null),(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"tangent",void 0),(0,i._)([(0,c.p)("tangent")],p.prototype,"castTangent",null),p=r=(0,i._)([(0,u.j)(h)],p)},72220:(e,t,n)=>{n.d(t,{c:()=>r});const r=n(92604).Z.getLogger("esri.views.3d.support.buffer.math")},16996:(e,t,n)=>{n.d(t,{Ue:()=>l,nF:()=>u,zk:()=>c});var r=n(22021),i=n(22807),o=n(17896),s=n(65617),a=n(12981);function l(e){return e?{origin:(0,s.g)(e.origin),vector:(0,s.g)(e.vector)}:{origin:(0,s.c)(),vector:(0,s.c)()}}function c(e,t,n=l()){return(0,o.c)(n.origin,e),(0,o.f)(n.vector,t,e),n}function u(e,t,n){return function(e,t,n,i,s){const{vector:l,origin:c}=e,u=(0,o.f)(a.WM.get(),t,c),h=(0,o.j)(l,u)/(0,o.m)(l);return(0,o.i)(s,l,(0,r.uZ)(h,0,1)),(0,o.g)(s,s,e.origin)}(e,t,0,0,n)}(0,s.c)(),(0,s.c)(),new i.x((()=>l()))},84470:(e,t,n)=>{n.d(t,{CP:()=>a,JG:()=>d,LL:()=>l,NZ:()=>c,fV:()=>g,vj:()=>y,yT:()=>v,zE:()=>x});var r=n(3172),i=n(67676),o=n(95330),s=n(2981);class a{constructor(e,t,n){this.assetName=e,this.assetMimeType=t,this.parts=n}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,i.fS)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const n=await Promise.all(t.map((t=>t.toBlob(e))));return(0,o.k_)(e),new Blob(n)}}class l{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,r.Z)(this.partUrl,{responseType:"blob"});return(0,o.k_)(e),t}}function c(e){return function(e){return!!e&&(Array.isArray(e)?e.some(p):p(e))}(e?.source)}function u(e){return!!Array.isArray(e)&&e.every((e=>e instanceof a))}const h=/^(model\/gltf\+json)|(model\/gltf-binary)$/,f=/\.(gltf|glb)/i;function p(e){if(e instanceof File){const{type:t,name:n}=e;return h.test(t)||f.test(n)}return h.test(e.assetMimeType)||f.test(e.assetName)}function d(e,t){if(!e)return!1;const{source:n}=e;return function(e,t){if(Array.isArray(e)){const n=e;return n.length>0&&n.every((e=>m(e,t)))}return m(e,t)}(n,t)}function g(e,t){if(e===t)return!0;const{source:n}=e,{source:r}=t;if(n===r)return!0;if(u(n)&&u(r)){if(n.length!==r.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...n].sort(e),i=[...r].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(i[e]))return!1;return!0}return!1}function m(e,t){return e instanceof a&&e.isOnService(t)}function y(e,t){return e instanceof File?(0,s.dm)(e,t):(0,s.S0)(e.assetMimeType,t)??(0,s.Ow)(e.assetName,t)}function x(e){return Array.isArray(e)?e:[e]}function v(e){return!!e.original}},47545:(e,t,n)=>{n.d(t,{d:()=>o});var r=n(22021),i=n(24882);function o(e,t,n){const o=Array.isArray(e),u=o?e.length/t:e.byteLength/(4*t),h=o?e:new Uint32Array(e,0,u*t),f=n?.minReduction??0,p=n?.originalIndices||null,d=p?p.length:0,g=n?.componentOffsets||null;let m=0;if(g)for(let e=0;e<g.length-1;e++){const t=g[e+1]-g[e];t>m&&(m=t)}else m=u;const y=Math.floor(1.1*m)+1;(null==c||c.length<2*y)&&(c=new Uint32Array((0,r.Sf)(2*y)));for(let e=0;e<2*y;e++)c[e]=0;let x=0;const v=!!g&&!!p,w=v?d:u;let b=(0,i.$z)(u);const A=new Uint32Array(d),_=1.96;let T=0!==f?Math.ceil(4*_*_/(f*f)*f*(1-f)):w,M=1,C=g?g[1]:w;for(let e=0;e<w;e++){if(e===T){const t=1-x/e;if(t+_*Math.sqrt(t*(1-t)/e)<f)return null;T*=2}if(e===C){for(let e=0;e<2*y;e++)c[e]=0;if(p)for(let e=g[M-1];e<g[M];e++)A[e]=b[p[e]];C=g[++M]}const n=v?p[e]:e,r=n*t,i=l(h,r,t);let o=i%y,a=x;for(;0!==c[2*o+1];){if(c[2*o]===i){const e=c[2*o+1]-1;if(s(h,r,e*t,t)){a=b[e];break}}o++,o>=y&&(o-=y)}a===x&&(c[2*o]=i,c[2*o+1]=n+1,x++),b[n]=a}if(0!==f&&1-x/u<f)return null;if(v){for(let e=g[M-1];e<A.length;e++)A[e]=b[p[e]];b=(0,i.mi)(A)}const Z=o?new Array(x):new Uint32Array(x*t);x=0;for(let e=0;e<w;e++)b[e]===x&&(a(h,(v?p[e]:e)*t,Z,x*t,t),x++);if(p&&!v){const e=new Uint32Array(d);for(let t=0;t<e.length;t++)e[t]=b[p[t]];b=(0,i.mi)(e)}return{buffer:Array.isArray(Z)?Z:Z.buffer,indices:b,uniqueCount:x}}function s(e,t,n,r){for(let i=0;i<r;i++)if(e[t+i]!==e[n+i])return!1;return!0}function a(e,t,n,r,i){for(let o=0;o<i;o++)n[r+o]=e[t+o]}function l(e,t,n){let r=0;for(let i=0;i<n;i++)r=e[t+i]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let c=null},25158:(e,t,n)=>{n.r(t),n.d(t,{assetMapFromAssetMapsJSON:()=>lt,extractMesh:()=>ot,meshFeatureSetFromJSON:()=>it});var r=n(38171),i=n(92604),o=n(30175),s=n(65617),a=n(6570),l=n(43697),c=n(20102),u=n(83379),h=n(609),f=n(95330),p=n(17445),d=n(5600),g=(n(75215),n(67676),n(80442),n(52011)),m=n(9361),y=n(94139),x=n(38913),v=n(3709),w=n(62540);class b extends c.Z{constructor(){super("mesh-not-loaded","Mesh must be loaded before applying operations")}}class A extends c.Z{constructor(){super("component-not-found","Provided component is not part of the list of components")}}class _ extends c.Z{constructor(){super("invalid-polygon","expected polygon to be a Polygon instance")}}class T extends c.Z{constructor(){super("invalid-input:location","Expected location to be a Point instance")}}class M extends c.Z{constructor(){super("invalid-input:no-layer","A layer is needed to convert the files")}}class C extends c.Z{constructor(){super("invalid-input:no-model","No supported model found")}}class Z extends c.Z{constructor(){super("invalid-input:multiple-models","Multiple supported models found")}}var S=n(85872),R=n(50567),O=n(84555),L=n(2674),F=n(71630),I=n(95401),E=n(62155),P=n(86662),U=n(83025),N=n(24882),D=n(47545),j=(n(66577),n(22021)),k=n(67900),B=n(17896),z=n(62073);n(4726),n(22631),n(35065);const W=(0,z.Ue)();function H(e,t,n,r,i,o,s){i*=3;for(let a=0;a<o;++a){const o=e[t];r[i++]=o[0],r[i++]=o[1],r[i++]=s?o[2]:0,t+=n}return i/3}function $(e,t,n){if(t){const t=function(e,t,n){const r=function(e,t,n,r){const i=(e=>!Array.isArray(e[0]))(t)?(e,n)=>t[3*e+n]:(e,n)=>t[e][n],o=r?(0,k.c9)(r)/(0,k._R)(r):1;return(0,z.zu)(e,((e,t)=>(0,B.s)(e,i(t,0)*o,i(t,1)*o,i(t,2))),n)}(W,e,t,n)?(0,z.mJ)(W):[0,0,1];return Math.abs(r[2])>Math.cos((0,j.Vl)(80))?E.R.Z:Math.abs(r[1])>Math.abs(r[0])?E.R.Y:E.R.X}(e,e.length-1,n);if(t===E.R.X)return!(0,P.bu)(e,E.R.Y,E.R.Z);if(t===E.R.Y)return!(0,P.bu)(e,E.R.X,E.R.Z)}return!(0,P.bu)(e,E.R.X,E.R.Y)}var V,G;(G=V||(V={}))[G.NONE=0]="NONE",G[G.CCW_IS_HOLE=1]="CCW_IS_HOLE";var q=n(66459);let J=null;function Y(e,t){let n=1/0,r=1/0,i=1/0,o=-1/0,s=-1/0,l=-1/0;const c=e.length;let u=0;for(;u<c;){const t=e[u++],a=e[u++],c=e[u++];n=Math.min(n,t),r=Math.min(r,a),i=Math.min(i,c),o=Math.max(o,t),s=Math.max(s,a),l=Math.max(l,c)}return new a.Z({xmin:n,ymin:r,zmin:i,xmax:o,ymax:s,zmax:l,spatialReference:t})}var X=n(87360);function K(e,t,n,r=0){Q[0]=e.x,Q[1]=e.y;const i=e.z;return Q[2]=void 0!==i?i:r,(0,X.projectBuffer)(Q,e.spatialReference,0,t,n,0,1)}const Q=(0,s.c)();var ee=n(13442);const te="esri.geometry.support.meshUtils.centerAt";const ne=(0,s.c)(),re=(0,s.c)(),ie=(0,s.c)();n(99880),n(3172);var oe=n(17452);function se(e){const t=(0,oe.Yd)(e.url);return n=>{const r=(0,oe.PF)(n,t,t),i=r?r.replace(/^ *\.\//,""):null;return(i?e.files.get(i):null)??n}}function ae(e){return he.fromBlob(e)}n(47026);const le=/^(model\/gltf\+json)|(model\/gltf-binary)$/,ce=/\.(gltf|glb)/i;function ue(e){const t=new Map;let n=null;for(const{name:r,mimeType:i,source:o}of e)(null==n||le.test(i)||ce.test(r))&&(n=o.url),t.set(r,o.url),o.files.forEach(((e,n)=>t.set(n,e)));if(null==n)throw new c.Z("mesh-load-external:missing-files","Missing files to load external mesh source");return new he(n,(()=>e.forEach((({source:e})=>e.dispose()))),t)}class he{constructor(e,t=(()=>{}),n=new Map){this.url=e,this.dispose=t,this.files=n}static fromBlob(e){const t=URL.createObjectURL(e);return new he(t,(()=>URL.revokeObjectURL(t)))}}var fe=n(2368),pe=n(46791),de=n(84470);let ge=class extends fe.j{constructor(){super(),this.externalSources=new pe.Z,this._explicitDisplaySource=null,this.addHandles((0,p.on)((()=>this.externalSources),"after-remove",(({item:e})=>{e===this._explicitDisplaySource&&(this._explicitDisplaySource=null)}),{sync:!0,onListenerRemove:()=>this._explicitDisplaySource=null}))}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,de.NZ)(e))throw new Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&this.externalSources.every((t=>!(0,de.fV)(t,e)))&&this.externalSources.add(e)}clearSources(){this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter((t=>(0,de.JG)(t,e)))}get _implicitDisplaySource(){return this.externalSources.find(de.NZ)}};(0,l._)([(0,d.Cb)()],ge.prototype,"externalSources",void 0),(0,l._)([(0,d.Cb)()],ge.prototype,"displaySource",null),(0,l._)([(0,d.Cb)()],ge.prototype,"_implicitDisplaySource",null),(0,l._)([(0,d.Cb)()],ge.prototype,"_explicitDisplaySource",void 0),ge=(0,l._)([(0,g.j)("esri.geometry.support.meshUtils.Metadata")],ge);var me=n(21787),ye=n(46521),xe=n(13598),ve=n(58995),we=n(83932),be=n(56493);function Ae(e,t){if(e)for(let n=0;n<e.length;n+=3)for(let r=0;r<3;r++)e[n+r]+=t[r]}const _e=(0,s.c)(),Te=(0,xe.a)(),Me=(0,ye.a)(),Ce={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function Ze(e,t,n){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null==t)return;const n="number"==typeof t?[t,t,t]:[null!=t.width?t.width:1,null!=t.depth?t.depth:1,null!=t.height?t.height:1];Le[0]=n[0],Le[4]=n[1],Le[8]=n[2];for(let t=0;t<e.position.length;t+=3){for(let n=0;n<3;n++)Oe[n]=e.position[t+n];(0,B.t)(Oe,Oe,Le);for(let n=0;n<3;n++)e.position[t+n]=Oe[n]}if(n[0]!==n[1]||n[1]!==n[2]){Le[0]=1/n[0],Le[4]=1/n[1],Le[8]=1/n[2];for(let t=0;t<e.normal.length;t+=3){for(let n=0;n<3;n++)Oe[n]=e.normal[t+n];(0,B.t)(Oe,Oe,Le),(0,B.n)(Oe,Oe);for(let n=0;n<3;n++)e.normal[t+n]=Oe[n]}}}(e,n?.size);const{vertexAttributes:r,vertexSpace:i,transform:o}=(0,q.w1)(e,t,n);return{vertexAttributes:new F.Q({...r,uv:e.uv}),vertexSpace:i,transform:o,components:[new w.Z({faces:e.faces,material:n&&n.material||null})],spatialReference:t.spatialReference}}const Se={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},Re={south:0,east:1,north:2,west:3,up:4,down:5},Oe=(0,s.c)(),Le=(0,ye.a)();var Fe=n(52138);const Ie="esri.geometry.support.meshUtils.rotate";function Ee(e,t,n,r=s.Z){if(null!=e){(0,Fe.c)(De,(0,v.WH)(t),(0,v.ZZ)(t));for(let t=0;t<e.length;t+=n){for(let n=0;n<3;n++)Pe[n]=e[t+n]-r[n];(0,B.e)(Pe,Pe,De);for(let n=0;n<3;n++)e[t+n]=Pe[n]+r[n]}}}const Pe=(0,s.c)(),Ue=(0,s.c)(),Ne=(0,v.Ue)(),De=(0,xe.a)(),je=(0,ye.a)(),ke=(0,s.c)(),Be="esri.geometry.support.meshUtils.scale";function ze(e,t,n=s.Z){if(e)for(let r=0;r<e.length;r+=3){for(let t=0;t<3;t++)We[t]=e[r+t]-n[t];(0,B.i)(We,We,t);for(let t=0;t<3;t++)e[r+t]=We[t]+n[t]}}const We=(0,s.c)(),He=(0,s.c)(),$e=(0,s.c)();var Ve,Ge=n(2981);async function qe(e){const{BlobReader:t,ZipReader:r,BlobWriter:i}=await Promise.all([n.e(2712),n.e(4041)]).then(n.bind(n,74041)),o=[],s=new r(new t(e));return(await s.getEntries()).forEach((e=>{if(e.directory||/^__MACOS/i.test(e.filename))return;const t=new i,n=e.getData?.(t).then((t=>new File([t],e.filename)));n&&o.push(n)})),Promise.all(o)}const Je="esri.geometry.Mesh",Ye={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:R.Z,"georeferenced-relative":S.Z,local:O.Z}};let Xe=Ve=class extends(u.Z.LoadableMixin((0,h.v)(m.Z))){constructor(e){super(e),this.components=null,this.vertexSpace=new R.Z,this.transform=null,this.metadata=new ge,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new F.Q,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.addHandles((0,p.YP)((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{components:e,spatialReference:t,vertexAttributes:n,vertexSpace:r}=this,i=n.position;if(0===i.length||e&&0===e.length)return new a.Z({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t});if("local"===r.type){const{_untransformedExtent:e,transform:n}=this;return function({xmin:e,xmax:t,ymin:n,ymax:r,zmin:i,zmax:o},s,a,l){i??=0,o??=0,J??=new Float64Array(24);const c=J;return c[0]=e,c[1]=n,c[2]=i,c[3]=e,c[4]=r,c[5]=i,c[6]=t,c[7]=r,c[8]=i,c[9]=t,c[10]=n,c[11]=i,c[12]=e,c[13]=n,c[14]=o,c[15]=e,c[16]=r,c[17]=o,c[18]=t,c[19]=r,c[20]=o,c[21]=t,c[22]=n,c[23]=o,(0,q.project)({positions:c,transform:s,vertexSpace:a,inSpatialReference:l,outSpatialReference:l,outPositions:c}),Y(c,l)}(e,n,r,t)}if("georeferenced-relative"===r.type){const{transform:e}=this;return Y((0,q.project)({positions:i,transform:e,vertexSpace:r,inSpatialReference:t,outSpatialReference:t}),t)}return Y(i,t)}get _untransformedExtent(){return Y(this.vertexAttributes.position,this.spatialReference)}get anchor(){const{vertexSpace:e}=this;if(e.isRelative)return e.getOriginPoint(this.spatialReference);const{center:t,zmin:n}=this._transformedExtent;return new y.Z({x:t.x,y:t.y,z:n,spatialReference:this.spatialReference})}get origin(){const{vertexSpace:e}=this;return e.isRelative?e.getOriginPoint(this.spatialReference):this._transformedExtent.center}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){if(!this.loaded)return i.Z.getLogger(this).error("addComponent()",(new b).message);this.components||(this.components=[]),this.components.push(w.Z.from(e)),this.notifyChange("components")}removeComponent(e){if(!this.loaded)return i.Z.getLogger(this).error("removeComponent()",(new b).message);if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}i.Z.getLogger(this).error("removeComponent()",(new A).message)}rotate(e,t,n,r){return(0,v.qw)(e,t,n,Qe),function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position||0===t[3])return;const{spatialReference:r,vertexSpace:o}=e;if(o.isRelative){(0,ee.A)(o,Ie,n);const r=n?.origin??e.origin;e.transform??=new L.Z,function(e,t,n,r){const i=t.origin,o=(0,B.s)(Pe,r.x,r.y,r.z??0),a=(0,B.f)(Pe,o,i);e.applyLocalInverse(a,Ue),e.rotation=(0,v.qC)(e.rotation,n,(0,v.Ue)()),e.applyLocalInverse(a,a),(0,B.f)(a,a,Ue),e.translation=(0,B.g)((0,s.c)(),e.translation,a)}(e.transform,o,t,r)}else{const o=n?.origin??e.origin;(0,ee.h)(r,n)?function(e,t,n){const r=e.spatialReference,i=(0,ve.rS)(r),o=ke;K(n,o,i)||K(e.origin,o,i);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,h=null!=l?new Float32Array(l.length):null;(0,we.B)(i,o,De,i),(0,me.f)(je,De);const f=Ne;(0,B.t)((0,v.ZZ)(Ne),(0,v.ZZ)(t),je),f[3]=t[3],(0,be.XO)(s,r,c),null!=a&&null!=u&&(0,be.Iz)(a,s,c,r,u),null!=l&&null!=h&&(0,be.wi)(l,s,c,r,h),Ee(c,f,3,o),(0,be.To)(c,s,r),null!=a&&null!=u&&(Ee(u,f,3),(0,be.Yk)(u,s,c,r,a)),null!=l&&null!=h&&(Ee(h,f,4),(0,be.M2)(h,s,c,r,l)),e.vertexAttributesChanged()}(e,t,o):function(e,t,n){const r=ke;if(!K(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,i.Z.getLogger(Ie).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}Ee(e.vertexAttributes.position,t,3,r),Ee(e.vertexAttributes.normal,t,3),Ee(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}(e,t,o)}}(this,Qe,r),this}offset(e,t,n,r){return this.loaded?(Ke[0]=e,Ke[1]=t,Ke[2]=n,function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{vertexSpace:r}=e;r.isRelative?((0,ee.A)(r,"esri.geometry.support.meshUtils.offset",n),function(e,t){const n=e.origin;e.origin=(0,B.g)((0,s.c)(),n,t)}(r,t)):(0,ee.h)(e.spatialReference,n)?function(e,t){const n=e.spatialReference,r=e.vertexAttributes.position,i=e.vertexAttributes.normal,o=e.vertexAttributes.tangent,s=new Float64Array(r.length),a=null!=i?new Float32Array(i.length):null,l=null!=o?new Float32Array(o.length):null,c=e.extent.center,u=_e;(0,we.B)(n,[c.x,c.y,c.z],Te,(0,ve.rS)(n)),(0,me.f)(Me,Te),(0,B.t)(u,t,Me),(0,be.XO)(r,n,s),null!=i&&null!=a&&(0,be.Iz)(i,r,s,n,a),null!=o&&null!=l&&(0,be.wi)(o,r,s,n,l),Ae(s,u),(0,be.To)(s,r,n),null!=i&&null!=a&&(0,be.Yk)(a,r,s,n,i),null!=o&&null!=l&&(0,be.M2)(l,r,s,n,o),e.vertexAttributesChanged()}(e,t):function(e,t){Ae(e.vertexAttributes.position,t),e.vertexAttributesChanged()}(e,t)}(this,Ke,r),this):(i.Z.getLogger(this).error("offset()",(new b).message),this)}scale(e,t){return this.loaded?(function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{spatialReference:r,vertexSpace:o}=e;if(o.isRelative){(0,ee.A)(o,Be,n);const r=n?.origin??e.origin;e.transform??=new L.Z,function(e,t,n,r){const i=t.origin,o=(0,B.s)(We,r.x,r.y,r.z),a=(0,B.f)(We,o,i);e.applyLocalInverse(a,He);const l=(0,B.i)((0,s.c)(),e.scale,n);e.scale=l,e.applyLocalInverse(a,a),(0,B.f)(a,a,He),e.translation=(0,B.g)((0,s.c)(),e.translation,a)}(e.transform,o,t,r)}else{const o=(0,ee.h)(r,n),s=n?.origin??e.origin;o?function(e,t,n){const r=e.spatialReference,i=(0,ve.rS)(r),o=$e;K(n,o,i)||K(e.origin,o,i);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,h=null!=l?new Float32Array(l.length):null;(0,be.XO)(s,r,c),null!=a&&null!=u&&(0,be.Iz)(a,s,c,r,u),null!=l&&null!=h&&(0,be.wi)(l,s,c,r,h),ze(c,t,o),(0,be.To)(c,s,r),null!=a&&null!=u&&(0,be.Yk)(u,s,c,r,a),null!=l&&null!=h&&(0,be.M2)(h,s,c,r,l),e.vertexAttributesChanged()}(e,t,s):function(e,t,n){const r=$e;if(!K(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,i.Z.getLogger(Be).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}ze(e.vertexAttributes.position,t,r),e.vertexAttributesChanged()}(e,t,s)}}(this,e,t),this):(i.Z.getLogger(this).error("scale()",(new b).message),this)}centerAt(e,t){return this.loaded?(function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{vertexSpace:r}=e,o=n?.origin??e.origin;r.isRelative?((0,ee.A)(r,te,n),function(e,t,n){const{vertexSpace:r}=e;if(!r.isRelative)return;const o=re,a=ne;if(!K(t,a,e.spatialReference))return void i.Z.getLogger(te).error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`);if(!K(n,o,e.spatialReference)){const t=e.origin;o[0]=t.x,o[1]=t.y,o[2]=t.z,i.Z.getLogger(te).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}const l=(0,B.f)(ie,a,o),c=r.origin;r.origin=(0,B.g)((0,s.c)(),c,l)}(e,t,o)):(0,ee.h)(e.spatialReference,n)?function(e,t,n){const r=(0,q.FF)(e.vertexAttributes,n,{geographic:!0}),{position:i,normal:o,tangent:s}=(0,q.iv)(r,t,{geographic:!0});e.vertexAttributes.position=i,e.vertexAttributes.normal=o,e.vertexAttributes.tangent=s,e.vertexAttributesChanged()}(e,t,o):function(e,t,n){const r=re,o=ne;if(K(t,o,e.spatialReference)){if(!K(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,i.Z.getLogger(te).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(function(e,t,n){if(e)for(let r=0;r<e.length;r+=3)for(let i=0;i<3;i++)e[r+i]+=t[i]-n[i]})(e.vertexAttributes.position,o,r),e.vertexAttributesChanged()}else i.Z.getLogger(te).error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(e,t,o)}(this,e,t),this):(i.Z.getLogger(this).error("centerAt()",(new b).message),this)}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(async function(e,t,r){const{source:i}=t,{loadGLTFMesh:o}=await(0,f.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r),s=await async function(e,t){if(Array.isArray(e)){if(!e.length)throw new c.Z("mesh-load-external:missing-assets","There must be at least one file to load");return e[0]instanceof File?function(e){return ue(e.map((e=>({name:e.name,mimeType:e.type,source:ae(e)}))))}(e):async function(e,t){const n=await(0,f.OT)(e.map((async e=>{const n=await async function(e,t){const{parts:n}=e;if(1===n.length)return new he(n[0].partUrl);const r=await e.toBlob(t);return(0,f.k_)(t),he.fromBlob(r)}(e);return(0,f.k_)(t),{name:e.assetName,mimeType:e.assetMimeType,source:n}})));if((0,f.Hc)(t))throw n.forEach((e=>e.source.dispose())),(0,f.zE)();return ue(n)}(e,t)}return ae(e)}(i,r);(0,f.k_)(r);const a=o(new y.Z({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:se(s),requestFile:void 0,useTransform:!0,signal:r?.signal});a.then((()=>s.dispose()),(()=>s.dispose()));const{vertexAttributes:l,components:u}=await a;e.vertexAttributes=l,e.components=u}(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){return this.cloneWithVertexSpace(this.vertexSpace.clone())}cloneWithVertexSpace(e){let t=null;if(this.components){const e=new Map,n=new Map;t=this.components.map((t=>t.cloneWithDeduplication(e,n)))}const n={components:t,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),vertexSpace:e,transform:this.transform?.clone()??null,metadata:this.metadata.clone()};return new Ve(n)}cloneShallow(){return new Ve({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const t=n.e(7277).then(n.bind(n,7277)),r=this.load(),i=await Promise.all([t,r]),{toBinaryGLTF:o}=i[0];return o(this,e)}get memoryUsage(){let e=0;if(e+=this.vertexAttributes.memoryUsage,null!=this.components)for(const t of this.components)e+=t.memoryUsage;return e}_clearSources(){this.metadata.clearSources()}static createBox(e,t){if(!(e instanceof y.Z))return i.Z.getLogger(Je).error(".createBox()",(new T).message),null;const n=new Ve(Ze(function(){const{faceDescriptions:e,faceVertexOffsets:t,uvScales:n}=Se,r=4*e.length,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array(2*e.length*3);let l=0,c=0,u=0,h=0;for(let r=0;r<e.length;r++){const f=e[r],p=l/3;for(const e of t)a[h++]=p+e;const d=f.corners;for(let e=0;e<4;e++){const t=d[e];let r=0;s[u++]=.25*n[e][0]+f.uvOrigin[0],s[u++]=f.uvOrigin[1]-.25*n[e][1];for(let e=0;e<3;e++)0!==f.axis[e]?(i[l++]=.5*f.axis[e],o[c++]=f.axis[e]):(i[l++]=.5*t[r++],o[c++]=0)}}return{position:i,normal:o,uv:s,faces:a}}(),e,t));return t&&t.imageFace&&"all"!==t.imageFace?function(e,t){const n=e.components[0],r=n.faces,i=Re[t],o=6*i,s=new Array(6),a=new Array(r.length-6);let l=0,c=0;for(let e=0;e<r.length;e++)e>=o&&e<o+6?s[l++]=r[e]:a[c++]=r[e];if(null!=e.vertexAttributes.uv){const t=new Float32Array(e.vertexAttributes.uv),n=4*i*2,r=[0,1,1,1,1,0,0,0];for(let e=0;e<r.length;e++)t[n+e]=r[e];e.vertexAttributes.uv=t}return e.components=[new w.Z({faces:s,material:n.material}),new w.Z({faces:a})],e}(n,t.imageFace):n}static createSphere(e,t){return e instanceof y.Z?new Ve(Ze(function(e=0){const t=Math.round(8*2**e),n=2*t,r=(t-1)*(n+1)+2*n,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array((t-1)*n*2*3);let l=0,c=0,u=0,h=0;for(let e=0;e<=t;e++){const r=e/t*Math.PI+.5*Math.PI,f=Math.cos(r),p=Math.sin(r);Oe[2]=p;const d=0===e||e===t,g=d?n-1:n;for(let r=0;r<=g;r++){const p=r/g*2*Math.PI;Oe[0]=-Math.sin(p)*f,Oe[1]=Math.cos(p)*f;for(let e=0;e<3;e++)i[l]=.5*Oe[e],o[l]=Oe[e],++l;s[c++]=(r+(d?.5:0))/n,s[c++]=e/t,0!==e&&r!==n&&(e!==t&&(a[u++]=h,a[u++]=h+1,a[u++]=h-n),1!==e&&(a[u++]=h,a[u++]=h-n,a[u++]=h-n-1)),h++}}return{position:i,normal:o,uv:s,faces:a}}(t&&t.densificationFactor||0),e,t)):(i.Z.getLogger(Je).error(".createSphere()",(new T).message),null)}static createCylinder(e,t){return e instanceof y.Z?new Ve(Ze(function(e=0){const t=Math.round(16*2**e),n=4*(t+1)+2*t,r=new Float64Array(3*n),i=new Float32Array(3*n),o=new Float32Array(2*n),s=new Uint32Array(4*t*3);let a=0,l=0,c=0,u=0,h=0;for(let e=0;e<=5;e++){const n=0===e||5===e,f=e<=1||e>=4,p=2===e||4===e,d=n?t-1:t;for(let g=0;g<=d;g++){const m=g/d*2*Math.PI,y=n?0:.5;Oe[0]=y*Math.sin(m),Oe[1]=y*-Math.cos(m),Oe[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)r[a++]=Oe[t],i[l++]=f?2===t?e<=1?1:-1:0:2===t?0:Oe[t]/y;o[c++]=(g+(n?.5:0))/t,o[c++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,p||0===e||g===t||(5!==e&&(s[u++]=h,s[u++]=h+1,s[u++]=h-t),1!==e&&(s[u++]=h,s[u++]=h-t,s[u++]=h-t-1)),h++}}return{position:r,normal:i,uv:o,faces:s}}(t&&t.densificationFactor||0),e,t)):(i.Z.getLogger(Je).error(".createCylinder()",(new T).message),null)}static createPlane(e,t){if(!(e instanceof y.Z))return i.Z.getLogger(Je).error(".createPlane()",(new T).message),null;const n=t?.facing??"up",r=function(e,t){const n="number"==typeof t?t:null!=t?t.width:1,r="number"==typeof t?t:null!=t?t.height:1;switch(e){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}(n,t?.size);return new Ve(Ze(function(e){const t=Ce.facingAxisOrderSwap[e],n=Ce.position,r=Ce.normal,i=new Float64Array(n.length),o=new Float32Array(r.length);let s=0;for(let e=0;e<4;e++){const e=s;for(let a=0;a<3;a++){const l=t[a],c=Math.abs(l)-1,u=l>=0?1:-1;i[s]=n[e+c]*u,o[s]=r[e+c]*u,s++}}return{position:i,normal:o,uv:new Float32Array(Ce.uv),faces:new Uint32Array(Ce.faces),isPlane:!0}}(n),e,{...t,size:r}))}static createFromPolygon(e,t){if(!(e instanceof x.Z))return i.Z.getLogger(Je).error(".createFromPolygon()",(new _).message),null;const n=function(e){const t=function(e,t,n,r){const i=e.length,o=new Array(i),s=new Array(i),a=new Array(i);let l=0,c=0,u=0,h=0;for(let t=0;t<i;++t)h+=e[t].length;const f=(0,U.bg)(3*h);let p=0;for(let h=i-1;h>=0;h--){const d=e[h],g=n===V.CCW_IS_HOLE&&$(d,t,r);if(g&&1!==i)o[l++]=d;else{let e=d.length;for(let t=0;t<l;++t)e+=o[t].length;const n={index:p,pathLengths:new Array(l+1),count:e,holeIndices:new Array(l)};n.pathLengths[0]=d.length,d.length>0&&(a[u++]={index:p,count:d.length}),p=g?H(d,d.length-1,-1,f,p,d.length,t):H(d,0,1,f,p,d.length,t);for(let e=0;e<l;++e){const r=o[e];n.holeIndices[e]=p,n.pathLengths[e+1]=r.length,r.length>0&&(a[u++]={index:p,count:r.length}),p=H(r,0,1,f,p,r.length,t)}l=0,n.count>0&&(s[c++]=n)}}for(let e=0;e<l;++e){const n=o[e];n.length>0&&(a[u++]={index:p,count:n.length}),p=H(n,0,1,f,p,n.length,t)}return s.length=c,a.length=u,{position:f,polygons:s,outlines:a}}(e.rings,e.hasZ,V.CCW_IS_HOLE,e.spatialReference),n=new Array;let r=0,i=0;for(const e of t.polygons){const o=e.count,s=e.index,a=(0,U.Rq)(t.position,3*s,3*o),l=e.holeIndices.map((e=>e-s)),c=(0,N.mi)((0,I.e)(a,l,3));n.push({position:a,faces:c}),r+=a.length,i+=c.length}const o=function(e,t,n){if(1===e.length)return e[0];const r=(0,U.bg)(t),i=new Array(n);let o=0,s=0,a=0;for(const t of e){for(let e=0;e<t.position.length;e++)r[o++]=t.position[e];for(const e of t.faces)i[s++]=e+a;a=o/3}return{position:r,faces:(0,N.mi)(i)}}(n,r,i),s=Array.isArray(o.position)?(0,D.d)(o.position,3,{originalIndices:o.faces}):(0,D.d)(o.position.buffer,6,{originalIndices:o.faces});return o.position=(0,U.QZ)(new Float64Array(s.buffer)),o.faces=s.indices,o}(e);return new Ve({vertexAttributes:new F.Q({position:n.position}),components:[new w.Z({faces:n.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new R.Z})}static async createFromGLTF(e,t,r){if(!(e instanceof y.Z)){const e=new T;throw i.Z.getLogger(Je).error(".createfromGLTF()",e.message),e}const{loadGLTFMesh:o}=await(0,f.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r);return new Ve(await o(e,t,r))}static async createFromFiles(e,t,n){const r=e=>i.Z.getLogger(Je).error(".createFromFiles()",e.message);if(!(e instanceof y.Z)){const e=new T;throw r(e),e}const o=n?.layer;if(!o){const e=new M;throw r(e),e}const s=await Ve.extractAndFilterFiles(t,o),a=s.reduce(((e,t)=>(0,Ge.$z)(o.infoFor3D,t)?e+1:e),0);if(0===a){const e=new C;throw r(e),e}if(a>1){const e=new Z;throw r(e),e}const l=Ve.createWithExternalSource(e,s),[c]=await o.uploadAssets([l],n);return c}static async extractAndFilterFiles(e,t){const n=t?.infoFor3D;return n?(await async function(e){const t=[];for(const n of e)n.name.toLowerCase().endsWith(".zip")?t.push(qe(n)):t.push(Promise.resolve(n));return(await Promise.all(t)).flat()}(e)).filter((e=>(0,Ge.F7)(n,e))):e}static createWithExternalSource(e,t,n){const r=n?.extent??null,{x:i,y:o,z:s,spatialReference:a}=e,l=n?.transform?.clone()??new L.Z,c=n?.vertexSpace??new O.Z({origin:[i,o,s??0]}),u={source:t,extent:r},h=new ge;return h.externalSources.push(u),new Ve({metadata:h,transform:l,vertexSpace:c,spatialReference:a})}static createIncomplete(e,t){const{x:n,y:r,z:i,spatialReference:o}=e,s=t?.transform?.clone()??new L.Z,a=t?.vertexSpace??new O.Z({origin:[n,r,i??0]}),l=new Ve({transform:s,vertexSpace:a,spatialReference:o});return l.addResolvingPromise(Promise.reject(new c.Z("mesh-incomplete","Mesh resources are not complete"))),l}};(0,l._)([(0,d.Cb)({type:[w.Z],json:{write:!0}})],Xe.prototype,"components",void 0),(0,l._)([(0,d.Cb)({nonNullable:!0,types:Ye,constructOnly:!0,json:{write:!0}})],Xe.prototype,"vertexSpace",void 0),(0,l._)([(0,d.Cb)({type:L.Z,json:{write:!0}})],Xe.prototype,"transform",void 0),(0,l._)([(0,d.Cb)({constructOnly:!0})],Xe.prototype,"metadata",void 0),(0,l._)([(0,d.Cb)()],Xe.prototype,"hasExtent",null),(0,l._)([(0,d.Cb)()],Xe.prototype,"_transformedExtent",null),(0,l._)([(0,d.Cb)()],Xe.prototype,"_untransformedExtent",null),(0,l._)([(0,d.Cb)()],Xe.prototype,"anchor",null),(0,l._)([(0,d.Cb)()],Xe.prototype,"origin",null),(0,l._)([(0,d.Cb)({readOnly:!0,json:{read:!1}})],Xe.prototype,"extent",null),(0,l._)([(0,d.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Xe.prototype,"hasZ",void 0),(0,l._)([(0,d.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Xe.prototype,"hasM",void 0),(0,l._)([(0,d.Cb)({type:F.Q,nonNullable:!0,json:{write:!0}})],Xe.prototype,"vertexAttributes",void 0),Xe=Ve=(0,l._)([(0,g.j)(Je)],Xe);const Ke=(0,s.c)(),Qe=(0,v.Ue)(),et=Xe;var tt=n(82971),nt=n(74889);const rt=()=>i.Z.getLogger("esri.rest.support.meshFeatureSet");function it(e,t,n){const i=n.features;n.features=[],delete n.geometryType;const o=nt.Z.fromJSON(n);if(o.geometryType="mesh",!n.assetMaps)return o;const s=lt(t,n.assetMaps),a=e.sourceSpatialReference??tt.Z.WGS84,l=n.globalIdFieldName,{outFields:c}=e,u=null!=c&&c.length>0?(h=c.includes("*")?null:new Set(c),({attributes:e})=>{if(!e)return{};if(!h)return e;for(const t in e)h.has(t)||delete e[t];return e}):()=>({});var h;for(const e of i){const n=ot(e,l,a,t,s);null!=n&&o.features.push(new r.Z({geometry:n,attributes:u(e)}))}return o}function ot(e,t,n,r,i){const o=e.attributes[t],l=i.get(o);if(null==l)return rt().error("mesh-feature-set:asset-not-found","Service returned a feature which was not found in the asset map",e),null;if(!e.geometry)return rt().error("mesh-feature-set:no-geometry","Service returned a feature without geometry",e),null;const{originPoint:c,originVector:u}=function({attributes:e},t,{transformFieldRoles:n}){const r=e[n.originX],i=e[n.originY],o=e[n.originZ];return{originPoint:new y.Z({x:r,y:i,z:o,spatialReference:t}),originVector:(0,s.f)(r,i,o)}}(e,n,r),h=a.Z.fromJSON(e.geometry);h.spatialReference=n;const f=function(e,{transformFieldRoles:t}){return new L.Z({translation:[e[t.translationX],-e[t.translationZ],e[t.translationY]],rotationAxis:[e[t.rotationX],-e[t.rotationZ],e[t.rotationY]],rotationAngle:e[t.rotationDeg],scale:[e[t.scaleX],e[t.scaleZ],e[t.scaleY]]})}(e.attributes,r),p=l.projectVertices?new S.Z({origin:u}):new O.Z({origin:u}),d=function(e){const t=Array.from(e.files.values()),n=new Array;for(const e of t){if(e.status!==st.COMPLETED)return null;const t=new Array;for(const n of e.parts){if(!n)return null;t.push(new de.LL(n.url,n.hash))}n.push(new de.CP(e.name,e.mimeType,t))}return n}(l);return d?et.createWithExternalSource(c,d,{extent:h,transform:f,vertexSpace:p}):et.createIncomplete(c,{extent:h,transform:f,vertexSpace:p})}var st,at;function lt(e,t){const n=new Map;for(const r of t){const t=r.parentGlobalId;if(null==t)continue;const i=r.assetName,s=r.assetType,a=r.assetHash,l=r.assetURL,c=r.conversionStatus,u=r.seqNo,h=(0,Ge.d1)(s,e.supportedFormats);if(!h){rt().error("mesh-feature-set:unknown-format",`Service returned an asset of type ${s}, but it does not list it as a supported type`);continue}const f=(0,o.s1)(n,t,(()=>({projectVertices:ut(r.flags).projectVertices,files:new Map})));(0,o.s1)(f.files,i,(()=>({name:i,type:s,mimeType:h,status:ct(c),parts:[]}))).parts[u]={hash:a,url:l}}return n}function ct(e){switch(e){case"COMPLETED":case"SUBMITTED":return st.COMPLETED;case"INPROGRESS":return st.PENDING;default:return st.FAILED}}function ut(e){return{projectVertices:e.includes("PROJECT_VERTICES")}}(at=st||(st={}))[at.FAILED=0]="FAILED",at[at.PENDING=1]="PENDING",at[at.COMPLETED=2]="COMPLETED"},17662:(e,t,n)=>{n.d(t,{c:()=>i});var r=n(99001);class i{constructor(){this.id=(0,r.D)()}}},4726:(e,t,n)=>{var r;n.d(t,{U:()=>r}),function(e){e[e.Layer=0]="Layer",e[e.Object=1]="Object",e[e.Mesh=2]="Mesh",e[e.Line=3]="Line",e[e.Point=4]="Point",e[e.Material=5]="Material",e[e.Texture=6]="Texture",e[e.COUNT=7]="COUNT"}(r||(r={}))},22631:(e,t,n)=>{n.d(t,{Z:()=>S});var r=n(13598),i=n(17896),o=n(24882),s=n(1533);function a(e){if(e.length<s.c8)return Array.from(e);if((0,s.kJ)(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,s.Uc)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}var l=n(47026),c=n(44553),u=n(65617),h=n(11726);class f{constructor(e,t,n){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this.position=n,this._children=void 0,(0,h.hu)(e.length>=1),(0,h.hu)(3===n.size||4===n.size);const{data:r,size:o,indices:s}=n;(0,h.hu)(s.length%this._numIndexPerPrimitive==0),(0,h.hu)(s.length>=e.length*this._numIndexPerPrimitive);const a=e.length;let l=o*s[this._numIndexPerPrimitive*e[0]];p.clear(),p.push(l);const c=(0,u.f)(r[l],r[l+1],r[l+2]),f=(0,u.g)(c);for(let t=0;t<a;++t){const n=this._numIndexPerPrimitive*e[t];for(let e=0;e<this._numIndexPerPrimitive;++e){l=o*s[n+e],p.push(l);let t=r[l];c[0]=Math.min(t,c[0]),f[0]=Math.max(t,f[0]),t=r[l+1],c[1]=Math.min(t,c[1]),f[1]=Math.max(t,f[1]),t=r[l+2],c[2]=Math.min(t,c[2]),f[2]=Math.max(t,f[2])}}this.bbMin=c,this.bbMax=f;const d=(0,i.p)((0,u.c)(),this.bbMin,this.bbMax,.5);this.radius=.5*Math.max(Math.max(f[0]-c[0],f[1]-c[1]),f[2]-c[2]);let g=this.radius*this.radius;for(let e=0;e<p.length;++e){l=p.at(e);const t=r[l]-d[0],n=r[l+1]-d[1],i=r[l+2]-d[2],o=t*t+n*n+i*i;if(o<=g)continue;const s=Math.sqrt(o),a=.5*(s-this.radius);this.radius=this.radius+a,g=this.radius*this.radius;const c=a/s;d[0]+=t*c,d[1]+=n*c,d[2]+=i*c}this.center=d,p.clear()}getChildren(){if(this._children||(0,i.a)(this.bbMin,this.bbMax)<=1)return this._children;const e=(0,i.p)((0,u.c)(),this.bbMin,this.bbMax,.5),t=this.primitiveIndices.length,n=new Uint8Array(t),r=new Array(8);for(let e=0;e<8;++e)r[e]=0;const{data:o,size:s,indices:a}=this.position;for(let i=0;i<t;++i){let t=0;const l=this._numIndexPerPrimitive*this.primitiveIndices[i];let c=s*a[l],u=o[c],h=o[c+1],f=o[c+2];for(let e=1;e<this._numIndexPerPrimitive;++e){c=s*a[l+e];const t=o[c],n=o[c+1],r=o[c+2];t<u&&(u=t),n<h&&(h=n),r<f&&(f=r)}u<e[0]&&(t|=1),h<e[1]&&(t|=2),f<e[2]&&(t|=4),n[i]=t,++r[t]}let l=0;for(let e=0;e<8;++e)r[e]>0&&++l;if(l<2)return;const c=new Array(8);for(let e=0;e<8;++e)c[e]=r[e]>0?new Uint32Array(r[e]):void 0;for(let e=0;e<8;++e)r[e]=0;for(let e=0;e<t;++e){const t=n[e];c[t][r[t]++]=this.primitiveIndices[e]}this._children=new Array;for(let e=0;e<8;++e)void 0!==c[e]&&this._children.push(new f(c[e],this._numIndexPerPrimitive,this.position));return this._children}static prune(){p.prune()}}const p=new c.Z({deallocator:null});var d=n(17662),g=n(4726),m=n(22807),y=n(16996);function x(e,t,n){return(0,i.f)(v,t,e),(0,i.f)(w,n,e),(0,i.l)((0,i.b)(v,v,w))/2}n(12981),new m.x(y.Ue),new m.x((()=>{return e?{p0:(0,u.g)(e.p0),p1:(0,u.g)(e.p1),p2:(0,u.g)(e.p2)}:{p0:(0,u.c)(),p1:(0,u.c)(),p2:(0,u.c)()};var e}));const v=(0,u.c)(),w=(0,u.c)(),b=(0,u.c)(),A=(0,u.c)(),_=(0,u.c)(),T=(0,u.c)();var M=n(99001);class C{constructor(e){this.channel=e,this.id=(0,M.D)()}}var Z=n(35065);n(9820),(0,u.c)(),new Float32Array(6);class S extends d.c{constructor(e,t,n=null,r=g.U.Mesh,i=null,s=-1){super(),this.material=e,this.mapPositions=n,this.type=r,this.objectAndLayerIdColor=i,this.edgeIndicesLength=s,this.visible=!0,this._attributes=new Map,this._boundingInfo=null;for(const[e,n]of t)0===n.indices.length&&(n.indices=(0,o.KF)(t[0][1].data.length/3)),this._attributes.set(e,{...n,indices:(0,o.mi)(n.indices)}),e===Z.T.POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._attributes.get(e).indices.length:this.edgeIndicesLength)}instantiate(e={}){const t=new S(e.material||this.material,[],this.mapPositions,this.type,this.objectAndLayerIdColor,this.edgeIndicesLength);return this._attributes.forEach(((e,n)=>{e.exclusive=!1,t._attributes.set(n,e)})),t._boundingInfo=this._boundingInfo,t.transformation=e.transformation||this.transformation,t}get attributes(){return this._attributes}getMutableAttribute(e){let t=this._attributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:a(t.data)},this._attributes.set(e,t)),t}setAttributeData(e,t){const n=this._attributes.get(e);n&&this._attributes.set(e,{...n,exclusive:!0,data:t})}get indexCount(){const e=this._attributes.values().next().value.indices;return e?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return null==this._boundingInfo&&(this._boundingInfo=this._calculateBoundingInfo()),this._boundingInfo}computeAttachmentOrigin(e){return!!(this.type===g.U.Mesh?this._computeAttachmentOriginTriangles(e):this.type===g.U.Line?this._computeAttachmentOriginLines(e):this._computeAttachmentOriginPoints(e))&&(null!=this._transformation&&(0,i.e)(e,e,this._transformation),!0)}_computeAttachmentOriginTriangles(e){return function(e,t){if(!e)return!1;const{size:n,data:r,indices:o}=e;(0,i.s)(t,0,0,0),(0,i.s)(T,0,0,0);let s=0,a=0;for(let e=0;e<o.length-2;e+=3){const l=o[e]*n,c=o[e+1]*n,u=o[e+2]*n;(0,i.s)(b,r[l],r[l+1],r[l+2]),(0,i.s)(A,r[c],r[c+1],r[c+2]),(0,i.s)(_,r[u],r[u+1],r[u+2]);const h=x(b,A,_);h?((0,i.g)(b,b,A),(0,i.g)(b,b,_),(0,i.i)(b,b,1/3*h),(0,i.g)(t,t,b),s+=h):((0,i.g)(T,T,b),(0,i.g)(T,T,A),(0,i.g)(T,T,_),a+=3)}return!(0===a&&0===s||(0!==s?((0,i.i)(t,t,1/s),0):0===a||((0,i.i)(t,T,1/a),0)))}(this.attributes.get(Z.T.POSITION),e)}_computeAttachmentOriginLines(e){const t=this.attributes.get(Z.T.POSITION);return function(e,t,n){if(!e)return!1;(0,i.s)(n,0,0,0),(0,i.s)(T,0,0,0);let r=0,o=0;const{size:s,data:a,indices:l}=e,c=l.length-1,u=c+(t?2:0);for(let e=0;e<u;e+=2){const t=e<c?e+1:0,u=l[e<c?e:c]*s,h=l[t]*s;b[0]=a[u],b[1]=a[u+1],b[2]=a[u+2],A[0]=a[h],A[1]=a[h+1],A[2]=a[h+2],(0,i.i)(b,(0,i.g)(b,b,A),.5);const f=(0,i.r)(b,A);f>0?((0,i.g)(n,n,(0,i.i)(b,b,f)),r+=f):0===r&&((0,i.g)(T,T,b),o++)}return 0!==r?((0,i.i)(n,n,1/r),!0):0!==o&&((0,i.i)(n,T,1/o),!0)}(t,function(e,t){return!(!("isClosed"in e)||!e.isClosed)&&t.indices.length>2}(this.material.parameters,t),e)}_computeAttachmentOriginPoints(e){return function(e,t){if(!e)return!1;const{size:n,data:r,indices:o}=e;(0,i.s)(t,0,0,0);let s=-1,a=0;for(let e=0;e<o.length;e++){const i=o[e]*n;s!==i&&(t[0]+=r[i],t[1]+=r[i+1],t[2]+=r[i+2],a++),s=i}return a>1&&(0,i.i)(t,t,1/a),a>0}(this.attributes.get(Z.T.POSITION),e)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const e=this.attributes.get(Z.T.POSITION);if(!e)return null;const t=this.type===g.U.Mesh?3:1;(0,h.hu)(e.indices.length%t==0,"Indexing error: "+e.indices.length+" not divisible by "+t);const n=(0,o.KF)(e.indices.length/t);return new f(n,t,e)}get transformation(){return this._transformation??r.I}set transformation(e){this._transformation=e&&e!==r.I?(0,r.b)(e):null}addHighlight(){const e=new C(l.V_.Highlight);return this.highlights=function(e,t){return null==e&&(e=[]),e.push(t),e}(this.highlights,e),e}removeHighlight(e){this.highlights=function(e,t){if(null==e)return null;const n=e.filter((e=>e!==t));return 0===n.length?null:n}(this.highlights,e)}}},11726:(e,t,n)=>{n.d(t,{hu:()=>i,yK:()=>o}),n(97323),n(98766),(0,n(88669).c)();class r{constructor(e){this.message=e}toString(){return`AssertException: ${this.message}`}}function i(e,t){if(!e){t=t||"Assertion";const e=new Error(t).stack;throw new r(`${t} at ${e}`)}}function o(e,t,n,r){let i,o=(n[0]-e[0])/t[0],s=(r[0]-e[0])/t[0];o>s&&(i=o,o=s,s=i);let a=(n[1]-e[1])/t[1],l=(r[1]-e[1])/t[1];if(a>l&&(i=a,a=l,l=i),o>l||a>s)return!1;a>o&&(o=a),l<s&&(s=l);let c=(n[2]-e[2])/t[2],u=(r[2]-e[2])/t[2];return c>u&&(i=c,c=u,u=i),!(o>u||c>s||(u<s&&(s=u),s<0))}},47026:(e,t,n)=>{var r,i,o,s,a,l,c,u,h;n.d(t,{Gv:()=>i,Iq:()=>u,JJ:()=>c,Rw:()=>s,Ti:()=>h,V_:()=>l,Vr:()=>r,hU:()=>a}),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(r||(r={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(i||(i={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(o||(o={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(s||(s={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(a||(a={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee",e[e.COUNT=2]="COUNT"}(l||(l={})),function(e){e[e.Blend=0]="Blend",e[e.Opaque=1]="Opaque",e[e.Mask=2]="Mask",e[e.MaskBlend=3]="MaskBlend",e[e.COUNT=4]="COUNT"}(c||(c={})),function(e){e[e.OFF=0]="OFF",e[e.ON=1]="ON"}(u||(u={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(h||(h={}))},9820:(e,t,n)=>{function r(e,t){const n=e.length;for(let r=0;r<n;++r)o[0]=e[r],t[r]=o[0];return t}function i(e,t){const n=e.length;for(let r=0;r<n;++r)o[0]=e[r],o[1]=e[r]-o[0],t[r]=o[1];return t}n.d(t,{GB:()=>i,U8:()=>r});const o=new Float32Array(2)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5613],{95401:(e,t,n)=>{n.d(t,{e:()=>l});var r,i,o,s=n(5732),a={exports:{}};r=a,i=function(){function e(e,n,i){i=i||2;var o,s,a,c,u,h,f,p=n&&n.length,d=p?n[0]*i:e.length,g=t(e,0,d,i,!0),m=[];if(!g||g.next===g.prev)return m;if(p&&(g=l(e,n,g,i)),e.length>80*i){o=a=e[0],s=c=e[1];for(var y=i;y<d;y+=i)(u=e[y])<o&&(o=u),(h=e[y+1])<s&&(s=h),u>a&&(a=u),h>c&&(c=h);f=0!==(f=Math.max(a-o,c-s))?1/f:0}return r(g,m,i,o,s,f),m}function t(e,t,n,r,i){var o,s;if(i===S(e,t,n,r)>0)for(o=t;o<n;o+=r)s=M(o,e[o],e[o+1],s);else for(o=n-r;o>=t;o-=r)s=M(o,e[o],e[o+1],s);if(s&&v(s,s.next)){var a=s.next;C(s),s=a}return s}function n(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==x(r.prev,r,r.next))r=r.next;else{var i=r.prev;if(C(r),(r=t=i)===r.next)break;n=!0}}while(n||r!==t);return t}function r(e,t,l,c,u,h,f){if(e){!f&&h&&p(e,c,u,h);for(var d,g,m=e;e.prev!==e.next;)if(d=e.prev,g=e.next,h?o(e,c,u,h):i(e))t.push(d.i/l),t.push(e.i/l),t.push(g.i/l),C(e),e=g.next,m=g.next;else if((e=g)===m){f?1===f?r(e=s(n(e),t,l),t,l,c,u,h,2):2===f&&a(e,t,l,c,u,h):r(n(e),t,l,c,u,h,1);break}}}function i(e){var t=e.prev,n=e,r=e.next;if(x(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(m(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&x(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function o(e,t,n,r){var i=e.prev,o=e,s=e.next;if(x(i,o,s)>=0)return!1;for(var a=i.x<o.x?i.x<s.x?i.x:s.x:o.x<s.x?o.x:s.x,l=i.y<o.y?i.y<s.y?i.y:s.y:o.y<s.y?o.y:s.y,c=i.x>o.x?i.x>s.x?i.x:s.x:o.x>s.x?o.x:s.x,u=i.y>o.y?i.y>s.y?i.y:s.y:o.y>s.y?o.y:s.y,h=d(a,l,t,n,r),f=d(c,u,t,n,r),p=e.prevZ,g=e.nextZ;p&&p.z>=h&&g&&g.z<=f;){if(p!==e.prev&&p!==e.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,p.x,p.y)&&x(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,g!==e.prev&&g!==e.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,g.x,g.y)&&x(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;p&&p.z>=h;){if(p!==e.prev&&p!==e.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,p.x,p.y)&&x(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;g&&g.z<=f;){if(g!==e.prev&&g!==e.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,g.x,g.y)&&x(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function s(e,t,r){var i=e;do{var o=i.prev,s=i.next.next;!v(o,s)&&w(o,i,i.next,s)&&_(o,s)&&_(s,o)&&(t.push(o.i/r),t.push(i.i/r),t.push(s.i/r),C(i),C(i.next),i=e=s),i=i.next}while(i!==e);return n(i)}function a(e,t,i,o,s,a){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&y(l,c)){var u=T(l,c);return l=n(l,l.next),u=n(u,u.next),r(l,t,i,o,s,a),void r(u,t,i,o,s,a)}c=c.next}l=l.next}while(l!==e)}function l(e,r,i,o){var s,a,l,u=[];for(s=0,a=r.length;s<a;s++)(l=t(e,r[s]*o,s<a-1?r[s+1]*o:e.length,o,!1))===l.next&&(l.steiner=!0),u.push(g(l));for(u.sort(c),s=0;s<u.length;s++)i=n(i=h(u[s],i),i.next);return i}function c(e,t){return e.x-t.x}function u(e){if(e.next.prev===e)return e;let t=e;for(;;){const n=t.next;if(n.prev===t||n===t||n===e)break;t=n}return t}function h(e,t){var r=function(e,t){var n,r=t,i=e.x,o=e.y,s=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var a=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=i&&a>s){if(s=a,a===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(i===s)return n;var l,c=n,u=n.x,h=n.y,p=1/0;r=n;do{i>=r.x&&r.x>=u&&i!==r.x&&m(o<h?i:s,o,u,h,o<h?s:i,o,r.x,r.y)&&(l=Math.abs(o-r.y)/(i-r.x),_(r,e)&&(l<p||l===p&&(r.x>n.x||r.x===n.x&&f(n,r)))&&(n=r,p=l)),r=r.next}while(r!==c);return n}(e,t);if(!r)return t;var i=T(r,e),o=n(r,r.next);let s=u(i);return n(s,s.next),o=u(o),u(t===r?o:t)}function f(e,t){return x(e.prev,e,t.prev)<0&&x(t.next,e,e.next)<0}function p(e,t,n,r){var i=e;do{null===i.z&&(i.z=d(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,o,s,a,l,c=1;do{for(n=e,e=null,o=null,s=0;n;){for(s++,r=n,a=0,t=0;t<c&&(a++,r=r.nextZ);t++);for(l=c;a>0||l>0&&r;)0!==a&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(s>1)}(i)}function d(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function g(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function m(e,t,n,r,i,o,s,a){return(i-s)*(t-a)-(e-s)*(o-a)>=0&&(e-s)*(r-a)-(n-s)*(t-a)>=0&&(n-s)*(o-a)-(i-s)*(r-a)>=0}function y(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&w(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(_(e,t)&&_(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(x(e.prev,e,t.prev)||x(e,t.prev,t))||v(e,t)&&x(e.prev,e,e.next)>0&&x(t.prev,t,t.next)>0)}function x(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function w(e,t,n,r){var i=A(x(e,t,n)),o=A(x(e,t,r)),s=A(x(n,r,e)),a=A(x(n,r,t));return i!==o&&s!==a||!(0!==i||!b(e,n,t))||!(0!==o||!b(e,r,t))||!(0!==s||!b(n,e,r))||!(0!==a||!b(n,t,r))}function b(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function A(e){return e>0?1:e<0?-1:0}function _(e,t){return x(e.prev,e,e.next)<0?x(e,t,e.next)>=0&&x(e,e.prev,t)>=0:x(e,t,e.prev)<0||x(e,e.next,t)<0}function T(e,t){var n=new Z(e.i,e.x,e.y),r=new Z(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function M(e,t,n,r){var i=new Z(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function C(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Z(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function S(e,t,n,r){for(var i=0,o=t,s=n-r;o<n;o+=r)i+=(e[s]-e[o])*(e[o+1]+e[s+1]),s=o;return i}return e.deviation=function(e,t,n,r){var i=t&&t.length,o=i?t[0]*n:e.length,s=Math.abs(S(e,0,o,n));if(i)for(var a=0,l=t.length;a<l;a++){var c=t[a]*n,u=a<l-1?t[a+1]*n:e.length;s-=Math.abs(S(e,c,u,n))}var h=0;for(a=0;a<r.length;a+=3){var f=r[a]*n,p=r[a+1]*n,d=r[a+2]*n;h+=Math.abs((e[f]-e[d])*(e[p+1]-e[f+1])-(e[f]-e[p])*(e[d+1]-e[f+1]))}return 0===s&&0===h?0:Math.abs((h-s)/s)},e.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,i=0;i<e.length;i++){for(var o=0;o<e[i].length;o++)for(var s=0;s<t;s++)n.vertices.push(e[i][o][s]);i>0&&(r+=e[i-1].length,n.holes.push(r))}return n},e},void 0!==(o=i())&&(r.exports=o);const l=(0,s.g)(a.exports)},20773:(e,t,n)=>{n.d(t,{a:()=>a,b:()=>s,c:()=>i,d:()=>u,e:()=>l,n:()=>h,s:()=>c,t:()=>o});var r=n(72220);function i(e,t,n){o(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function o(e,t,n,i=3,o=i){if(e.length/i!==Math.ceil(t.length/o))return r.c.error("source and destination buffers need to have the same number of elements"),e;const s=e.length/i,a=n[0],l=n[1],c=n[2],u=n[4],h=n[5],f=n[6],p=n[8],d=n[9],g=n[10],m=n[12],y=n[13],x=n[14];let v=0,w=0;for(let n=0;n<s;n++){const n=t[v],r=t[v+1],s=t[v+2];e[w]=a*n+u*r+p*s+m,e[w+1]=l*n+h*r+d*s+y,e[w+2]=c*n+f*r+g*s+x,v+=o,w+=i}return e}function s(e,t,n){a(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function a(e,t,n,i=3,o=i){if(e.length/i!==Math.ceil(t.length/o))return void r.c.error("source and destination buffers need to have the same number of elements");const s=e.length/i,a=n[0],l=n[1],c=n[2],u=n[3],h=n[4],f=n[5],p=n[6],d=n[7],g=n[8];let m=0,y=0;for(let n=0;n<s;n++){const n=t[m],r=t[m+1],s=t[m+2];e[y]=a*n+u*r+p*s,e[y+1]=l*n+h*r+d*s,e[y+2]=c*n+f*r+g*s,m+=o,y+=i}}function l(e,t,n){c(e.typedBuffer,t,n,e.typedBufferStride)}function c(e,t,n,r=3){const i=Math.min(e.length/r,t.count),o=t.typedBuffer,s=t.typedBufferStride;let a=0,l=0;for(let t=0;t<i;t++)e[l]=n*o[a],e[l+1]=n*o[a+1],e[l+2]=n*o[a+2],a+=s,l+=r}function u(e,t){h(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function h(e,t,n=3,r=n){const i=Math.min(e.length/n,t.length/r);let o=0,s=0;for(let a=0;a<i;a++){const i=t[o],a=t[o+1],l=t[o+2],c=i*i+a*a+l*l;if(c>0){const t=1/Math.sqrt(c);e[s]=t*i,e[s+1]=t*a,e[s+2]=t*l}o+=r,s+=n}}Object.freeze(Object.defineProperty({__proto__:null,normalize:h,normalizeView:u,scale:c,scaleView:l,shiftRight:function(e,t,n){const r=Math.min(e.count,t.count),i=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride;let l=0,c=0;for(let e=0;e<r;e++)i[c]=s[l]>>n,i[c+1]=s[l+1]>>n,i[c+2]=s[l+2]>>n,l+=a,c+=o},transformMat3:a,transformMat3View:s,transformMat4:o,transformMat4View:i},Symbol.toStringTag,{value:"Module"}))},70163:(e,t,n)=>{n.d(t,{Jl:()=>u,n$:()=>h});var r=n(3172),i=n(20102),o=n(95330),s=n(17452),a=n(49917);let l=null,c=!0;function u(e,t,n,r){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(c)try{return new ImageData(e,t,n)}catch(e){c=!1}const i=function(e,t,n){return n||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),n=l),n.getContext("2d").createImageData(e,t)}(t,n,r);return i.data.set(e,0),i}async function h(e,t){const{arrayBuffer:l,mediaType:c}=await async function(e,t){const n=(0,s.sJ)(e);if(n?.isBase64)return{arrayBuffer:(0,a.R)(n.data),mediaType:n.mediaType};const i=await(0,r.Z)(e,{responseType:"array-buffer",...t});return{arrayBuffer:i.data,mediaType:i.getHeader("Content-Type")}}(e,t),u="image/png"===c;if("image/gif"===c){const{isAnimatedGIF:e,parseGif:r}=await n.e(3310).then(n.bind(n,83310));if(e(l))return r(l,t)}if(u){const{isAnimatedPNG:e,parseApng:r}=await n.e(4492).then(n.bind(n,54492));if(e(l))return r(l,t)}return async function(e,t){const n=window.URL.createObjectURL(e);try{const{data:e}=await(0,r.Z)(n,{...t,responseType:"image"});return e}catch(e){if(!(0,o.D_)(e))throw new i.Z("invalid-image",`Could not fetch requested image at ${n}`);throw e}finally{window.URL.revokeObjectURL(n)}}(new Blob([l],{type:c}),t)}},83025:(e,t,n)=>{n.d(t,{JK:()=>a,QZ:()=>o,Rq:()=>s,bg:()=>i,mB:()=>l});var r=n(1533);function i(e,t=!1){return e<=r.c8?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function o(e){return((0,r.kJ)(e)?e.length:e.byteLength/8)<=r.c8?Array.from(e):new Float64Array(e)}function s(e,t,n){return Array.isArray(e)?e.slice(t,t+n):e.subarray(t,t+n)}function a(e,t){for(let n=0;n<t.length;++n)e[n]=t[n];return e}function l(e){return Array.isArray(e)?new Float64Array(e):e}},24882:(e,t,n)=>{n.d(t,{$z:()=>s,KF:()=>u,mi:()=>i});var r=n(1533);function i(e){return(0,r.kJ)(e)?e.length<r.c8?e:o(e):e.length<r.c8?Array.from(e):e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:o(e)}function o(e){let t=!0;for(const n of e){if(n>=65536)return(0,r.kJ)(e)?new Uint32Array(e):e;n>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}function s(e){return e<=r.c8?new Array(e):e<=65536?new Uint16Array(e):new Uint32Array(e)}let a=(()=>{const e=new Uint32Array(131072);for(let t=0;t<e.length;++t)e[t]=t;return e})();const l=[0],c=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function u(e){if(1===e)return l;if(e<r.c8)return Array.from(new Uint16Array(c.buffer,0,e));if(e<c.length)return new Uint16Array(c.buffer,0,e);if(e>a.length){const t=Math.max(2*a.length,e);a=new Uint32Array(t);for(let e=0;e<a.length;e++)a[e]=e}return new Uint32Array(a.buffer,0,e)}new Uint8Array(65536)},62540:(e,t,n)=>{n.d(t,{Z:()=>x});var r,i=n(43697),o=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011),h=n(75215),f=n(65542),p=n(60746),d=n(71630);const g="esri.geometry.support.MeshComponent",m=a.Z.getLogger(g);let y=r=class extends o.wq{static from(e){return(0,h.TJ)(r,e)}constructor(e){super(e),this.faces=null,this.material=null,this.name=void 0,this.shading="source",this.trustSourceNormals=!1}castFaces(e){return(0,d.X)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},m)}castMaterial(e){return(0,h.TJ)(e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?p.Z:f.Z,e)}clone(){return new r({faces:(0,s.d9)(this.faces),shading:this.shading,material:(0,s.d9)(this.material),trustSourceNormals:this.trustSourceNormals,name:this.name})}cloneWithDeduplication(e,t){const n={faces:(0,s.d9)(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(e,t):null,trustSourceNormals:this.trustSourceNormals,name:this.name};return new r(n)}get memoryUsage(){let e=0;return null!=this.faces&&(e+=this.faces.byteLength),null!=this.material&&(e+=this.material.memoryUsage),e}};(0,i._)([(0,l.Cb)({json:{write:!0}})],y.prototype,"faces",void 0),(0,i._)([(0,c.p)("faces")],y.prototype,"castFaces",null),(0,i._)([(0,l.Cb)({type:f.Z,json:{write:!0}})],y.prototype,"material",void 0),(0,i._)([(0,c.p)("material")],y.prototype,"castMaterial",null),(0,i._)([(0,l.Cb)()],y.prototype,"name",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"shading",void 0),(0,i._)([(0,l.Cb)({type:Boolean})],y.prototype,"trustSourceNormals",void 0),y=r=(0,i._)([(0,u.j)(g)],y);const x=y},85872:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(43697),i=n(2368),o=n(96674),s=n(5600),a=(n(75215),n(67676),n(80442),n(36030)),l=n(52011),c=n(65617),u=n(94139);let h=class extends((0,i.J)(o.wq)){constructor(e){super(e),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=(0,c.c)()}getOriginPoint(e){const[t,n,r]=this.origin;return new u.Z({x:t,y:n,z:r,spatialReference:e})}setOriginFromPoint({x:e,y:t,z:n}){this.origin=(0,c.f)(e,t,n??0)}};(0,r._)([(0,a.J)({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],h.prototype,"type",void 0),(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"origin",void 0),h=(0,r._)([(0,l.j)("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],h);const f=h},84555:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(43697),i=n(2368),o=n(96674),s=n(5600),a=(n(75215),n(67676),n(80442),n(36030)),l=n(52011),c=n(65617),u=n(94139);let h=class extends((0,i.J)(o.wq)){constructor(e){super(e),this.type="local",this.isRelative=!0,this.isGeoreferenced=!1,this.origin=(0,c.c)()}getOriginPoint(e){const[t,n,r]=this.origin;return new u.Z({x:t,y:n,z:r,spatialReference:e})}setOriginFromPoint({x:e,y:t,z:n}){this.origin=(0,c.f)(e,t,n??0)}};(0,r._)([(0,a.J)({local:"local"},{readOnly:!0})],h.prototype,"type",void 0),(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"origin",void 0),h=(0,r._)([(0,l.j)("esri.geometry.support.MeshLocalVertexSpace")],h);const f=h},65542:(e,t,n)=>{n.d(t,{Z:()=>f});var r,i=n(43697),o=n(22303),s=n(96674),a=n(5600),l=(n(75215),n(67676),n(80442),n(52011)),c=n(85965),u=n(80218);let h=r=class extends s.wq{constructor(e){super(e),this.color=null,this.colorTexture=null,this.colorTextureTransform=null,this.normalTexture=void 0,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=null!=e?e.get(this):null;if(n)return n;const i=new r(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,i),i}clonePropertiesWithDeduplication(e){return{color:null!=this.color?this.color.clone():null,colorTexture:this.colorTexture?.cloneWithDeduplication(e),normalTexture:this.normalTexture?.cloneWithDeduplication(e),alphaMode:this.alphaMode,alphaCutoff:this.alphaCutoff,doubleSided:this.doubleSided,colorTextureTransform:this.colorTextureTransform?.clone(),normalTextureTransform:this.normalTextureTransform?.clone()}}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let e=0;return e+=null!=this.color?16:0,null!=this.colorTexture&&(e+=this.colorTexture.memoryUsage),e+=null!=this.colorTextureTransform?20:0,null!=this.normalTexture&&(e+=this.normalTexture.memoryUsage),e+=null!=this.normalTextureTransform?20:0,e}};(0,i._)([(0,a.Cb)({type:o.Z,json:{write:!0}})],h.prototype,"color",void 0),(0,i._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"colorTexture",void 0),(0,i._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"colorTextureTransform",void 0),(0,i._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"normalTexture",void 0),(0,i._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"normalTextureTransform",void 0),(0,i._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],h.prototype,"alphaMode",void 0),(0,i._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],h.prototype,"alphaCutoff",void 0),(0,i._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],h.prototype,"doubleSided",void 0),h=r=(0,i._)([(0,l.j)("esri.geometry.support.MeshMaterial")],h);const f=h},60746:(e,t,n)=>{n.d(t,{Z:()=>f});var r,i=n(43697),o=n(22303),s=n(5600),a=(n(75215),n(67676),n(80442),n(52011)),l=n(65542),c=n(85965),u=n(80218);let h=r=class extends l.Z{constructor(e){super(e),this.emissiveColor=null,this.emissiveTexture=null,this.emissiveTextureTransform=void 0,this.occlusionTexture=null,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTexture=null,this.metallicRoughnessTextureTransform=void 0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=null!=e?e.get(this):null;if(n)return n;const i=new r(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,i),i}getMemoryUsage(){let e=super.getMemoryUsage();return e+=null!=this.emissiveColor?16:0,null!=this.emissiveTexture&&(e+=this.emissiveTexture.memoryUsage),e+=null!=this.emissiveTextureTransform?20:0,null!=this.occlusionTexture&&(e+=this.occlusionTexture.memoryUsage),e+=null!=this.occlusionTextureTransform?20:0,null!=this.metallicRoughnessTexture&&(e+=this.metallicRoughnessTexture.memoryUsage),e+=null!=this.metallicRoughnessTextureTransform?20:0,e}clonePropertiesWithDeduplication(e){return{...super.clonePropertiesWithDeduplication(e),emissiveColor:this.emissiveColor?.clone(),emissiveTexture:this.emissiveTexture?.cloneWithDeduplication(e),emissiveTextureTransform:this.emissiveTextureTransform?.clone(),occlusionTexture:this.occlusionTexture?.cloneWithDeduplication(e),occlusionTextureTransform:this.occlusionTextureTransform?.clone(),metallic:this.metallic,roughness:this.roughness,metallicRoughnessTexture:this.metallicRoughnessTexture?.cloneWithDeduplication(e),metallicRoughnessTextureTransform:this.metallicRoughnessTextureTransform?.clone()}}};(0,i._)([(0,s.Cb)({type:o.Z,json:{write:!0}})],h.prototype,"emissiveColor",void 0),(0,i._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"emissiveTexture",void 0),(0,i._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"emissiveTextureTransform",void 0),(0,i._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"occlusionTexture",void 0),(0,i._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"occlusionTextureTransform",void 0),(0,i._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],h.prototype,"metallic",void 0),(0,i._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],h.prototype,"roughness",void 0),(0,i._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"metallicRoughnessTexture",void 0),(0,i._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"metallicRoughnessTextureTransform",void 0),h=r=(0,i._)([(0,a.j)("esri.geometry.support.MeshMaterialMetallicRoughness")],h);const f=h},85965:(e,t,n)=>{n.d(t,{Z:()=>m});var r,i=n(43697),o=(n(80442),n(70163)),s=n(96674),a=n(5600),l=n(75215),c=(n(67676),n(71715)),u=n(52011),h=n(30556),f=n(25929);const p=new WeakMap;let d=0,g=r=class extends s.wq{constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,n,r){if(e instanceof HTMLImageElement){const i={type:"image-element",src:(0,f.t)(e.src,r),crossOrigin:e.crossOrigin};t[n]=i}else if(e instanceof HTMLCanvasElement){const r=e.getContext("2d").getImageData(0,0,e.width,e.height),i={type:"canvas-element",imageData:this._encodeImageData(r)};t[n]=i}else if(e instanceof HTMLVideoElement){const i={type:"video-element",src:(0,f.t)(e.src,r),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload};t[n]=i}else if(e instanceof ImageData){const r={type:"image-data",imageData:this._encodeImageData(e)};t[n]=r}}readData(e){switch(e.type){case"image-element":{const t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{const t=this._decodeImageData(e.imageData),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").putImageData(t,0,0),n}case"image-data":return this._decodeImageData(e.imageData);case"video-element":{const t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){const e=this.data,t=this.url;if(e instanceof HTMLCanvasElement)return this._imageDataContainsTransparent(e.getContext("2d").getImageData(0,0,e.width,e.height));if(e instanceof ImageData)return this._imageDataContainsTransparent(e);if(t){const e=t.substr(t.length-4,4).toLowerCase(),n=t.substr(0,15).toLocaleLowerCase();if(".png"===e||"data:image/png;"===n)return!0}return!1}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){const e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null!=this.url?t(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(p.has(this.data)||p.set(this.data,++d),t(p.get(this.data))):t()}get memoryUsage(){let e=0;if(e+=null!=this.url?this.url.length:0,null!=this.data){const t=this.data;"data"in t?e+=t.data.byteLength:t instanceof HTMLImageElement?e+=t.naturalWidth*t.naturalHeight*3:t instanceof HTMLCanvasElement&&(e+=t.width*t.height*3)}return e}clone(){const e={url:this.url,data:this.data,wrap:this._cloneWrap()};return new r(e)}cloneWithDeduplication(e){const t=e.get(this);if(t)return t;const n=this.clone();return e.set(this,n),n}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}_encodeImageData(e){let t="";for(let n=0;n<e.data.length;n++)t+=String.fromCharCode(e.data[n]);return{data:btoa(t),width:e.width,height:e.height}}_decodeImageData(e){const t=atob(e.data),n=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return(0,o.Jl)(n,e.width,e.height)}_imageDataContainsTransparent(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}static from(e){return"string"==typeof e?new r({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new r({data:e}):(0,l.TJ)(r,e)}};(0,i._)([(0,a.Cb)({type:String,json:{write:f.w}})],g.prototype,"url",null),(0,i._)([(0,a.Cb)({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),(0,a.Cb)()],g.prototype,"data",null),(0,i._)([(0,h.c)("data")],g.prototype,"writeData",null),(0,i._)([(0,c.r)("data")],g.prototype,"readData",null),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],g.prototype,"transparent",null),(0,i._)([(0,a.Cb)({json:{write:!0}})],g.prototype,"wrap",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],g.prototype,"contentHash",null),g=r=(0,i._)([(0,u.j)("esri.geometry.support.MeshTexture")],g);const m=g},80218:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(43697),i=n(2368),o=n(96674),s=n(5600),a=(n(75215),n(67676),n(80442),n(52011));let l=class extends((0,i.J)(o.wq)){constructor(e){super(e),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,r._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,r._)([(0,a.j)("esri.geometry.support.MeshTextureTransform")],l);const c=l},71630:(e,t,n)=>{n.d(t,{Q:()=>p,X:()=>g});var r,i=n(43697),o=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011);const h="esri.geometry.support.MeshVertexAttributes",f=a.Z.getLogger(h);let p=r=class extends o.wq{constructor(e){super(e),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(e){return g(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},f)}castPosition(e){return e&&e instanceof Float32Array&&f.warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),g(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},f)}castUv(e){return g(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},f)}castNormal(e){return g(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},f)}castTangent(e){return g(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},f)}clone(){const e={position:(0,s.d9)(this.position),uv:(0,s.d9)(this.uv),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),color:(0,s.d9)(this.color)};return new r(e)}clonePositional(){const e={position:(0,s.d9)(this.position),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),uv:this.uv,color:this.color};return new r(e)}get memoryUsage(){let e=0;return e+=this.position.byteLength,null!=this.uv&&(e+=this.uv.byteLength),null!=this.normal&&(e+=this.normal.byteLength),null!=this.tangent&&(e+=this.tangent.byteLength),null!=this.color&&(e+=this.color.byteLength),e}};function d(e,t,n,r){const{loggerTag:i,stride:o}=t;return e.length%o!=0?(r.error(i,`Invalid array length, expected a multiple of ${o}`),new n([])):e}function g(e,t,n,r,i){if(!e)return e;if(e instanceof t)return d(e,r,t,i);for(const o of n)if(e instanceof o)return d(new t(e),r,t,i);if(Array.isArray(e))return d(new t(e),r,t,i);{const r=n.map((e=>`'${e.name}'`));return i.error(`Failed to set property, expected one of ${r}, but got ${e.constructor.name}`),new t([])}}function m(e,t,n){t[n]=function(e){const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n];return t}(e)}(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"color",void 0),(0,i._)([(0,c.p)("color")],p.prototype,"castColor",null),(0,i._)([(0,l.Cb)({nonNullable:!0,json:{write:m}})],p.prototype,"position",void 0),(0,i._)([(0,c.p)("position")],p.prototype,"castPosition",null),(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"uv",void 0),(0,i._)([(0,c.p)("uv")],p.prototype,"castUv",null),(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"normal",void 0),(0,i._)([(0,c.p)("normal")],p.prototype,"castNormal",null),(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"tangent",void 0),(0,i._)([(0,c.p)("tangent")],p.prototype,"castTangent",null),p=r=(0,i._)([(0,u.j)(h)],p)},72220:(e,t,n)=>{n.d(t,{c:()=>r});const r=n(92604).Z.getLogger("esri.views.3d.support.buffer.math")},16996:(e,t,n)=>{n.d(t,{Ue:()=>l,nF:()=>u,zk:()=>c});var r=n(22021),i=n(22807),o=n(17896),s=n(65617),a=n(12981);function l(e){return e?{origin:(0,s.g)(e.origin),vector:(0,s.g)(e.vector)}:{origin:(0,s.c)(),vector:(0,s.c)()}}function c(e,t,n=l()){return(0,o.c)(n.origin,e),(0,o.f)(n.vector,t,e),n}function u(e,t,n){return function(e,t,n,i,s){const{vector:l,origin:c}=e,u=(0,o.f)(a.WM.get(),t,c),h=(0,o.j)(l,u)/(0,o.m)(l);return(0,o.i)(s,l,(0,r.uZ)(h,0,1)),(0,o.g)(s,s,e.origin)}(e,t,0,0,n)}(0,s.c)(),(0,s.c)(),new i.x((()=>l()))},84470:(e,t,n)=>{n.d(t,{CP:()=>a,JG:()=>d,LL:()=>l,NZ:()=>c,fV:()=>g,vj:()=>y,yT:()=>v,zE:()=>x});var r=n(3172),i=n(67676),o=n(95330),s=n(2981);class a{constructor(e,t,n){this.assetName=e,this.assetMimeType=t,this.parts=n}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,i.fS)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const n=await Promise.all(t.map((t=>t.toBlob(e))));return(0,o.k_)(e),new Blob(n)}}class l{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,r.Z)(this.partUrl,{responseType:"blob"});return(0,o.k_)(e),t}}function c(e){return function(e){return!!e&&(Array.isArray(e)?e.some(p):p(e))}(e?.source)}function u(e){return!!Array.isArray(e)&&e.every((e=>e instanceof a))}const h=/^(model\/gltf\+json)|(model\/gltf-binary)$/,f=/\.(gltf|glb)/i;function p(e){if(e instanceof File){const{type:t,name:n}=e;return h.test(t)||f.test(n)}return h.test(e.assetMimeType)||f.test(e.assetName)}function d(e,t){if(!e)return!1;const{source:n}=e;return function(e,t){if(Array.isArray(e)){const n=e;return n.length>0&&n.every((e=>m(e,t)))}return m(e,t)}(n,t)}function g(e,t){if(e===t)return!0;const{source:n}=e,{source:r}=t;if(n===r)return!0;if(u(n)&&u(r)){if(n.length!==r.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...n].sort(e),i=[...r].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(i[e]))return!1;return!0}return!1}function m(e,t){return e instanceof a&&e.isOnService(t)}function y(e,t){return e instanceof File?(0,s.dm)(e,t):(0,s.S0)(e.assetMimeType,t)??(0,s.Ow)(e.assetName,t)}function x(e){return Array.isArray(e)?e:[e]}function v(e){return!!e.original}},47545:(e,t,n)=>{n.d(t,{d:()=>o});var r=n(22021),i=n(24882);function o(e,t,n){const o=Array.isArray(e),u=o?e.length/t:e.byteLength/(4*t),h=o?e:new Uint32Array(e,0,u*t),f=n?.minReduction??0,p=n?.originalIndices||null,d=p?p.length:0,g=n?.componentOffsets||null;let m=0;if(g)for(let e=0;e<g.length-1;e++){const t=g[e+1]-g[e];t>m&&(m=t)}else m=u;const y=Math.floor(1.1*m)+1;(null==c||c.length<2*y)&&(c=new Uint32Array((0,r.Sf)(2*y)));for(let e=0;e<2*y;e++)c[e]=0;let x=0;const v=!!g&&!!p,w=v?d:u;let b=(0,i.$z)(u);const A=new Uint32Array(d),_=1.96;let T=0!==f?Math.ceil(4*_*_/(f*f)*f*(1-f)):w,M=1,C=g?g[1]:w;for(let e=0;e<w;e++){if(e===T){const t=1-x/e;if(t+_*Math.sqrt(t*(1-t)/e)<f)return null;T*=2}if(e===C){for(let e=0;e<2*y;e++)c[e]=0;if(p)for(let e=g[M-1];e<g[M];e++)A[e]=b[p[e]];C=g[++M]}const n=v?p[e]:e,r=n*t,i=l(h,r,t);let o=i%y,a=x;for(;0!==c[2*o+1];){if(c[2*o]===i){const e=c[2*o+1]-1;if(s(h,r,e*t,t)){a=b[e];break}}o++,o>=y&&(o-=y)}a===x&&(c[2*o]=i,c[2*o+1]=n+1,x++),b[n]=a}if(0!==f&&1-x/u<f)return null;if(v){for(let e=g[M-1];e<A.length;e++)A[e]=b[p[e]];b=(0,i.mi)(A)}const Z=o?new Array(x):new Uint32Array(x*t);x=0;for(let e=0;e<w;e++)b[e]===x&&(a(h,(v?p[e]:e)*t,Z,x*t,t),x++);if(p&&!v){const e=new Uint32Array(d);for(let t=0;t<e.length;t++)e[t]=b[p[t]];b=(0,i.mi)(e)}return{buffer:Array.isArray(Z)?Z:Z.buffer,indices:b,uniqueCount:x}}function s(e,t,n,r){for(let i=0;i<r;i++)if(e[t+i]!==e[n+i])return!1;return!0}function a(e,t,n,r,i){for(let o=0;o<i;o++)n[r+o]=e[t+o]}function l(e,t,n){let r=0;for(let i=0;i<n;i++)r=e[t+i]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let c=null},25158:(e,t,n)=>{n.r(t),n.d(t,{assetMapFromAssetMapsJSON:()=>lt,extractMesh:()=>ot,meshFeatureSetFromJSON:()=>it});var r=n(38171),i=n(92604),o=n(30175),s=n(65617),a=n(6570),l=n(43697),c=n(20102),u=n(83379),h=n(609),f=n(95330),p=n(17445),d=n(5600),g=(n(75215),n(67676),n(80442),n(52011)),m=n(9361),y=n(94139),x=n(38913),v=n(3709),w=n(62540);class b extends c.Z{constructor(){super("mesh-not-loaded","Mesh must be loaded before applying operations")}}class A extends c.Z{constructor(){super("component-not-found","Provided component is not part of the list of components")}}class _ extends c.Z{constructor(){super("invalid-polygon","expected polygon to be a Polygon instance")}}class T extends c.Z{constructor(){super("invalid-input:location","Expected location to be a Point instance")}}class M extends c.Z{constructor(){super("invalid-input:no-layer","A layer is needed to convert the files")}}class C extends c.Z{constructor(){super("invalid-input:no-model","No supported model found")}}class Z extends c.Z{constructor(){super("invalid-input:multiple-models","Multiple supported models found")}}var S=n(85872),R=n(50567),O=n(84555),L=n(2674),F=n(71630),I=n(95401),E=n(62155),P=n(86662),U=n(83025),N=n(24882),D=n(47545),j=(n(66577),n(22021)),k=n(67900),B=n(17896),z=n(62073);n(4726),n(22631),n(35065);const W=(0,z.Ue)();function H(e,t,n,r,i,o,s){i*=3;for(let a=0;a<o;++a){const o=e[t];r[i++]=o[0],r[i++]=o[1],r[i++]=s?o[2]:0,t+=n}return i/3}function $(e,t,n){if(t){const t=function(e,t,n){const r=function(e,t,n,r){const i=(e=>!Array.isArray(e[0]))(t)?(e,n)=>t[3*e+n]:(e,n)=>t[e][n],o=r?(0,k.c9)(r)/(0,k._R)(r):1;return(0,z.zu)(e,((e,t)=>(0,B.s)(e,i(t,0)*o,i(t,1)*o,i(t,2))),n)}(W,e,t,n)?(0,z.mJ)(W):[0,0,1];return Math.abs(r[2])>Math.cos((0,j.Vl)(80))?E.R.Z:Math.abs(r[1])>Math.abs(r[0])?E.R.Y:E.R.X}(e,e.length-1,n);if(t===E.R.X)return!(0,P.bu)(e,E.R.Y,E.R.Z);if(t===E.R.Y)return!(0,P.bu)(e,E.R.X,E.R.Z)}return!(0,P.bu)(e,E.R.X,E.R.Y)}var V,G;(G=V||(V={}))[G.NONE=0]="NONE",G[G.CCW_IS_HOLE=1]="CCW_IS_HOLE";var q=n(66459);let J=null;function Y(e,t){let n=1/0,r=1/0,i=1/0,o=-1/0,s=-1/0,l=-1/0;const c=e.length;let u=0;for(;u<c;){const t=e[u++],a=e[u++],c=e[u++];n=Math.min(n,t),r=Math.min(r,a),i=Math.min(i,c),o=Math.max(o,t),s=Math.max(s,a),l=Math.max(l,c)}return new a.Z({xmin:n,ymin:r,zmin:i,xmax:o,ymax:s,zmax:l,spatialReference:t})}var X=n(87360);function K(e,t,n,r=0){Q[0]=e.x,Q[1]=e.y;const i=e.z;return Q[2]=void 0!==i?i:r,(0,X.projectBuffer)(Q,e.spatialReference,0,t,n,0,1)}const Q=(0,s.c)();var ee=n(13442);const te="esri.geometry.support.meshUtils.centerAt";const ne=(0,s.c)(),re=(0,s.c)(),ie=(0,s.c)();n(99880),n(3172);var oe=n(17452);function se(e){const t=(0,oe.Yd)(e.url);return n=>{const r=(0,oe.PF)(n,t,t),i=r?r.replace(/^ *\.\//,""):null;return(i?e.files.get(i):null)??n}}function ae(e){return he.fromBlob(e)}n(47026);const le=/^(model\/gltf\+json)|(model\/gltf-binary)$/,ce=/\.(gltf|glb)/i;function ue(e){const t=new Map;let n=null;for(const{name:r,mimeType:i,source:o}of e)(null==n||le.test(i)||ce.test(r))&&(n=o.url),t.set(r,o.url),o.files.forEach(((e,n)=>t.set(n,e)));if(null==n)throw new c.Z("mesh-load-external:missing-files","Missing files to load external mesh source");return new he(n,(()=>e.forEach((({source:e})=>e.dispose()))),t)}class he{constructor(e,t=(()=>{}),n=new Map){this.url=e,this.dispose=t,this.files=n}static fromBlob(e){const t=URL.createObjectURL(e);return new he(t,(()=>URL.revokeObjectURL(t)))}}var fe=n(2368),pe=n(46791),de=n(84470);let ge=class extends fe.j{constructor(){super(),this.externalSources=new pe.Z,this._explicitDisplaySource=null,this.addHandles((0,p.on)((()=>this.externalSources),"after-remove",(({item:e})=>{e===this._explicitDisplaySource&&(this._explicitDisplaySource=null)}),{sync:!0,onListenerRemove:()=>this._explicitDisplaySource=null}))}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,de.NZ)(e))throw new Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&this.externalSources.every((t=>!(0,de.fV)(t,e)))&&this.externalSources.add(e)}clearSources(){this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter((t=>(0,de.JG)(t,e)))}get _implicitDisplaySource(){return this.externalSources.find(de.NZ)}};(0,l._)([(0,d.Cb)()],ge.prototype,"externalSources",void 0),(0,l._)([(0,d.Cb)()],ge.prototype,"displaySource",null),(0,l._)([(0,d.Cb)()],ge.prototype,"_implicitDisplaySource",null),(0,l._)([(0,d.Cb)()],ge.prototype,"_explicitDisplaySource",void 0),ge=(0,l._)([(0,g.j)("esri.geometry.support.meshUtils.Metadata")],ge);var me=n(21787),ye=n(46521),xe=n(13598),ve=n(58995),we=n(83932),be=n(56493);function Ae(e,t){if(e)for(let n=0;n<e.length;n+=3)for(let r=0;r<3;r++)e[n+r]+=t[r]}const _e=(0,s.c)(),Te=(0,xe.a)(),Me=(0,ye.a)(),Ce={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function Ze(e,t,n){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null==t)return;const n="number"==typeof t?[t,t,t]:[null!=t.width?t.width:1,null!=t.depth?t.depth:1,null!=t.height?t.height:1];Le[0]=n[0],Le[4]=n[1],Le[8]=n[2];for(let t=0;t<e.position.length;t+=3){for(let n=0;n<3;n++)Oe[n]=e.position[t+n];(0,B.t)(Oe,Oe,Le);for(let n=0;n<3;n++)e.position[t+n]=Oe[n]}if(n[0]!==n[1]||n[1]!==n[2]){Le[0]=1/n[0],Le[4]=1/n[1],Le[8]=1/n[2];for(let t=0;t<e.normal.length;t+=3){for(let n=0;n<3;n++)Oe[n]=e.normal[t+n];(0,B.t)(Oe,Oe,Le),(0,B.n)(Oe,Oe);for(let n=0;n<3;n++)e.normal[t+n]=Oe[n]}}}(e,n?.size);const{vertexAttributes:r,vertexSpace:i,transform:o}=(0,q.w1)(e,t,n);return{vertexAttributes:new F.Q({...r,uv:e.uv}),vertexSpace:i,transform:o,components:[new w.Z({faces:e.faces,material:n&&n.material||null})],spatialReference:t.spatialReference}}const Se={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},Re={south:0,east:1,north:2,west:3,up:4,down:5},Oe=(0,s.c)(),Le=(0,ye.a)();var Fe=n(52138);const Ie="esri.geometry.support.meshUtils.rotate";function Ee(e,t,n,r=s.Z){if(null!=e){(0,Fe.c)(De,(0,v.WH)(t),(0,v.ZZ)(t));for(let t=0;t<e.length;t+=n){for(let n=0;n<3;n++)Pe[n]=e[t+n]-r[n];(0,B.e)(Pe,Pe,De);for(let n=0;n<3;n++)e[t+n]=Pe[n]+r[n]}}}const Pe=(0,s.c)(),Ue=(0,s.c)(),Ne=(0,v.Ue)(),De=(0,xe.a)(),je=(0,ye.a)(),ke=(0,s.c)(),Be="esri.geometry.support.meshUtils.scale";function ze(e,t,n=s.Z){if(e)for(let r=0;r<e.length;r+=3){for(let t=0;t<3;t++)We[t]=e[r+t]-n[t];(0,B.i)(We,We,t);for(let t=0;t<3;t++)e[r+t]=We[t]+n[t]}}const We=(0,s.c)(),He=(0,s.c)(),$e=(0,s.c)();var Ve,Ge=n(2981);async function qe(e){const{BlobReader:t,ZipReader:r,BlobWriter:i}=await Promise.all([n.e(2712),n.e(4041)]).then(n.bind(n,74041)),o=[],s=new r(new t(e));return(await s.getEntries()).forEach((e=>{if(e.directory||/^__MACOS/i.test(e.filename))return;const t=new i,n=e.getData?.(t).then((t=>new File([t],e.filename)));n&&o.push(n)})),Promise.all(o)}const Je="esri.geometry.Mesh",Ye={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:R.Z,"georeferenced-relative":S.Z,local:O.Z}};let Xe=Ve=class extends(u.Z.LoadableMixin((0,h.v)(m.Z))){constructor(e){super(e),this.components=null,this.vertexSpace=new R.Z,this.transform=null,this.metadata=new ge,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new F.Q,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.addHandles((0,p.YP)((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{components:e,spatialReference:t,vertexAttributes:n,vertexSpace:r}=this,i=n.position;if(0===i.length||e&&0===e.length)return new a.Z({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t});if("local"===r.type){const{_untransformedExtent:e,transform:n}=this;return function({xmin:e,xmax:t,ymin:n,ymax:r,zmin:i,zmax:o},s,a,l){i??=0,o??=0,J??=new Float64Array(24);const c=J;return c[0]=e,c[1]=n,c[2]=i,c[3]=e,c[4]=r,c[5]=i,c[6]=t,c[7]=r,c[8]=i,c[9]=t,c[10]=n,c[11]=i,c[12]=e,c[13]=n,c[14]=o,c[15]=e,c[16]=r,c[17]=o,c[18]=t,c[19]=r,c[20]=o,c[21]=t,c[22]=n,c[23]=o,(0,q.project)({positions:c,transform:s,vertexSpace:a,inSpatialReference:l,outSpatialReference:l,outPositions:c}),Y(c,l)}(e,n,r,t)}if("georeferenced-relative"===r.type){const{transform:e}=this;return Y((0,q.project)({positions:i,transform:e,vertexSpace:r,inSpatialReference:t,outSpatialReference:t}),t)}return Y(i,t)}get _untransformedExtent(){return Y(this.vertexAttributes.position,this.spatialReference)}get anchor(){const{vertexSpace:e}=this;if(e.isRelative)return e.getOriginPoint(this.spatialReference);const{center:t,zmin:n}=this._transformedExtent;return new y.Z({x:t.x,y:t.y,z:n,spatialReference:this.spatialReference})}get origin(){const{vertexSpace:e}=this;return e.isRelative?e.getOriginPoint(this.spatialReference):this._transformedExtent.center}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){if(!this.loaded)return i.Z.getLogger(this).error("addComponent()",(new b).message);this.components||(this.components=[]),this.components.push(w.Z.from(e)),this.notifyChange("components")}removeComponent(e){if(!this.loaded)return i.Z.getLogger(this).error("removeComponent()",(new b).message);if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}i.Z.getLogger(this).error("removeComponent()",(new A).message)}rotate(e,t,n,r){return(0,v.qw)(e,t,n,Qe),function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position||0===t[3])return;const{spatialReference:r,vertexSpace:o}=e;if(o.isRelative){(0,ee.A)(o,Ie,n);const r=n?.origin??e.origin;e.transform??=new L.Z,function(e,t,n,r){const i=t.origin,o=(0,B.s)(Pe,r.x,r.y,r.z??0),a=(0,B.f)(Pe,o,i);e.applyLocalInverse(a,Ue),e.rotation=(0,v.qC)(e.rotation,n,(0,v.Ue)()),e.applyLocalInverse(a,a),(0,B.f)(a,a,Ue),e.translation=(0,B.g)((0,s.c)(),e.translation,a)}(e.transform,o,t,r)}else{const o=n?.origin??e.origin;(0,ee.h)(r,n)?function(e,t,n){const r=e.spatialReference,i=(0,ve.rS)(r),o=ke;K(n,o,i)||K(e.origin,o,i);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,h=null!=l?new Float32Array(l.length):null;(0,we.B)(i,o,De,i),(0,me.f)(je,De);const f=Ne;(0,B.t)((0,v.ZZ)(Ne),(0,v.ZZ)(t),je),f[3]=t[3],(0,be.XO)(s,r,c),null!=a&&null!=u&&(0,be.Iz)(a,s,c,r,u),null!=l&&null!=h&&(0,be.wi)(l,s,c,r,h),Ee(c,f,3,o),(0,be.To)(c,s,r),null!=a&&null!=u&&(Ee(u,f,3),(0,be.Yk)(u,s,c,r,a)),null!=l&&null!=h&&(Ee(h,f,4),(0,be.M2)(h,s,c,r,l)),e.vertexAttributesChanged()}(e,t,o):function(e,t,n){const r=ke;if(!K(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,i.Z.getLogger(Ie).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}Ee(e.vertexAttributes.position,t,3,r),Ee(e.vertexAttributes.normal,t,3),Ee(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}(e,t,o)}}(this,Qe,r),this}offset(e,t,n,r){return this.loaded?(Ke[0]=e,Ke[1]=t,Ke[2]=n,function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{vertexSpace:r}=e;r.isRelative?((0,ee.A)(r,"esri.geometry.support.meshUtils.offset",n),function(e,t){const n=e.origin;e.origin=(0,B.g)((0,s.c)(),n,t)}(r,t)):(0,ee.h)(e.spatialReference,n)?function(e,t){const n=e.spatialReference,r=e.vertexAttributes.position,i=e.vertexAttributes.normal,o=e.vertexAttributes.tangent,s=new Float64Array(r.length),a=null!=i?new Float32Array(i.length):null,l=null!=o?new Float32Array(o.length):null,c=e.extent.center,u=_e;(0,we.B)(n,[c.x,c.y,c.z],Te,(0,ve.rS)(n)),(0,me.f)(Me,Te),(0,B.t)(u,t,Me),(0,be.XO)(r,n,s),null!=i&&null!=a&&(0,be.Iz)(i,r,s,n,a),null!=o&&null!=l&&(0,be.wi)(o,r,s,n,l),Ae(s,u),(0,be.To)(s,r,n),null!=i&&null!=a&&(0,be.Yk)(a,r,s,n,i),null!=o&&null!=l&&(0,be.M2)(l,r,s,n,o),e.vertexAttributesChanged()}(e,t):function(e,t){Ae(e.vertexAttributes.position,t),e.vertexAttributesChanged()}(e,t)}(this,Ke,r),this):(i.Z.getLogger(this).error("offset()",(new b).message),this)}scale(e,t){return this.loaded?(function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{spatialReference:r,vertexSpace:o}=e;if(o.isRelative){(0,ee.A)(o,Be,n);const r=n?.origin??e.origin;e.transform??=new L.Z,function(e,t,n,r){const i=t.origin,o=(0,B.s)(We,r.x,r.y,r.z),a=(0,B.f)(We,o,i);e.applyLocalInverse(a,He);const l=(0,B.i)((0,s.c)(),e.scale,n);e.scale=l,e.applyLocalInverse(a,a),(0,B.f)(a,a,He),e.translation=(0,B.g)((0,s.c)(),e.translation,a)}(e.transform,o,t,r)}else{const o=(0,ee.h)(r,n),s=n?.origin??e.origin;o?function(e,t,n){const r=e.spatialReference,i=(0,ve.rS)(r),o=$e;K(n,o,i)||K(e.origin,o,i);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,h=null!=l?new Float32Array(l.length):null;(0,be.XO)(s,r,c),null!=a&&null!=u&&(0,be.Iz)(a,s,c,r,u),null!=l&&null!=h&&(0,be.wi)(l,s,c,r,h),ze(c,t,o),(0,be.To)(c,s,r),null!=a&&null!=u&&(0,be.Yk)(u,s,c,r,a),null!=l&&null!=h&&(0,be.M2)(h,s,c,r,l),e.vertexAttributesChanged()}(e,t,s):function(e,t,n){const r=$e;if(!K(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,i.Z.getLogger(Be).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}ze(e.vertexAttributes.position,t,r),e.vertexAttributesChanged()}(e,t,s)}}(this,e,t),this):(i.Z.getLogger(this).error("scale()",(new b).message),this)}centerAt(e,t){return this.loaded?(function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{vertexSpace:r}=e,o=n?.origin??e.origin;r.isRelative?((0,ee.A)(r,te,n),function(e,t,n){const{vertexSpace:r}=e;if(!r.isRelative)return;const o=re,a=ne;if(!K(t,a,e.spatialReference))return void i.Z.getLogger(te).error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`);if(!K(n,o,e.spatialReference)){const t=e.origin;o[0]=t.x,o[1]=t.y,o[2]=t.z,i.Z.getLogger(te).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}const l=(0,B.f)(ie,a,o),c=r.origin;r.origin=(0,B.g)((0,s.c)(),c,l)}(e,t,o)):(0,ee.h)(e.spatialReference,n)?function(e,t,n){const r=(0,q.FF)(e.vertexAttributes,n,{geographic:!0}),{position:i,normal:o,tangent:s}=(0,q.iv)(r,t,{geographic:!0});e.vertexAttributes.position=i,e.vertexAttributes.normal=o,e.vertexAttributes.tangent=s,e.vertexAttributesChanged()}(e,t,o):function(e,t,n){const r=re,o=ne;if(K(t,o,e.spatialReference)){if(!K(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,i.Z.getLogger(te).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(function(e,t,n){if(e)for(let r=0;r<e.length;r+=3)for(let i=0;i<3;i++)e[r+i]+=t[i]-n[i]})(e.vertexAttributes.position,o,r),e.vertexAttributesChanged()}else i.Z.getLogger(te).error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(e,t,o)}(this,e,t),this):(i.Z.getLogger(this).error("centerAt()",(new b).message),this)}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(async function(e,t,r){const{source:i}=t,{loadGLTFMesh:o}=await(0,f.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r),s=await async function(e,t){if(Array.isArray(e)){if(!e.length)throw new c.Z("mesh-load-external:missing-assets","There must be at least one file to load");return e[0]instanceof File?function(e){return ue(e.map((e=>({name:e.name,mimeType:e.type,source:ae(e)}))))}(e):async function(e,t){const n=await(0,f.OT)(e.map((async e=>{const n=await async function(e,t){const{parts:n}=e;if(1===n.length)return new he(n[0].partUrl);const r=await e.toBlob(t);return(0,f.k_)(t),he.fromBlob(r)}(e);return(0,f.k_)(t),{name:e.assetName,mimeType:e.assetMimeType,source:n}})));if((0,f.Hc)(t))throw n.forEach((e=>e.source.dispose())),(0,f.zE)();return ue(n)}(e,t)}return ae(e)}(i,r);(0,f.k_)(r);const a=o(new y.Z({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:se(s),requestFile:void 0,useTransform:!0,signal:r?.signal});a.then((()=>s.dispose()),(()=>s.dispose()));const{vertexAttributes:l,components:u}=await a;e.vertexAttributes=l,e.components=u}(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){return this.cloneWithVertexSpace(this.vertexSpace.clone())}cloneWithVertexSpace(e){let t=null;if(this.components){const e=new Map,n=new Map;t=this.components.map((t=>t.cloneWithDeduplication(e,n)))}const n={components:t,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),vertexSpace:e,transform:this.transform?.clone()??null,metadata:this.metadata.clone()};return new Ve(n)}cloneShallow(){return new Ve({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const t=n.e(7277).then(n.bind(n,7277)),r=this.load(),i=await Promise.all([t,r]),{toBinaryGLTF:o}=i[0];return o(this,e)}get memoryUsage(){let e=0;if(e+=this.vertexAttributes.memoryUsage,null!=this.components)for(const t of this.components)e+=t.memoryUsage;return e}_clearSources(){this.metadata.clearSources()}static createBox(e,t){if(!(e instanceof y.Z))return i.Z.getLogger(Je).error(".createBox()",(new T).message),null;const n=new Ve(Ze(function(){const{faceDescriptions:e,faceVertexOffsets:t,uvScales:n}=Se,r=4*e.length,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array(2*e.length*3);let l=0,c=0,u=0,h=0;for(let r=0;r<e.length;r++){const f=e[r],p=l/3;for(const e of t)a[h++]=p+e;const d=f.corners;for(let e=0;e<4;e++){const t=d[e];let r=0;s[u++]=.25*n[e][0]+f.uvOrigin[0],s[u++]=f.uvOrigin[1]-.25*n[e][1];for(let e=0;e<3;e++)0!==f.axis[e]?(i[l++]=.5*f.axis[e],o[c++]=f.axis[e]):(i[l++]=.5*t[r++],o[c++]=0)}}return{position:i,normal:o,uv:s,faces:a}}(),e,t));return t&&t.imageFace&&"all"!==t.imageFace?function(e,t){const n=e.components[0],r=n.faces,i=Re[t],o=6*i,s=new Array(6),a=new Array(r.length-6);let l=0,c=0;for(let e=0;e<r.length;e++)e>=o&&e<o+6?s[l++]=r[e]:a[c++]=r[e];if(null!=e.vertexAttributes.uv){const t=new Float32Array(e.vertexAttributes.uv),n=4*i*2,r=[0,1,1,1,1,0,0,0];for(let e=0;e<r.length;e++)t[n+e]=r[e];e.vertexAttributes.uv=t}return e.components=[new w.Z({faces:s,material:n.material}),new w.Z({faces:a})],e}(n,t.imageFace):n}static createSphere(e,t){return e instanceof y.Z?new Ve(Ze(function(e=0){const t=Math.round(8*2**e),n=2*t,r=(t-1)*(n+1)+2*n,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array((t-1)*n*2*3);let l=0,c=0,u=0,h=0;for(let e=0;e<=t;e++){const r=e/t*Math.PI+.5*Math.PI,f=Math.cos(r),p=Math.sin(r);Oe[2]=p;const d=0===e||e===t,g=d?n-1:n;for(let r=0;r<=g;r++){const p=r/g*2*Math.PI;Oe[0]=-Math.sin(p)*f,Oe[1]=Math.cos(p)*f;for(let e=0;e<3;e++)i[l]=.5*Oe[e],o[l]=Oe[e],++l;s[c++]=(r+(d?.5:0))/n,s[c++]=e/t,0!==e&&r!==n&&(e!==t&&(a[u++]=h,a[u++]=h+1,a[u++]=h-n),1!==e&&(a[u++]=h,a[u++]=h-n,a[u++]=h-n-1)),h++}}return{position:i,normal:o,uv:s,faces:a}}(t&&t.densificationFactor||0),e,t)):(i.Z.getLogger(Je).error(".createSphere()",(new T).message),null)}static createCylinder(e,t){return e instanceof y.Z?new Ve(Ze(function(e=0){const t=Math.round(16*2**e),n=4*(t+1)+2*t,r=new Float64Array(3*n),i=new Float32Array(3*n),o=new Float32Array(2*n),s=new Uint32Array(4*t*3);let a=0,l=0,c=0,u=0,h=0;for(let e=0;e<=5;e++){const n=0===e||5===e,f=e<=1||e>=4,p=2===e||4===e,d=n?t-1:t;for(let g=0;g<=d;g++){const m=g/d*2*Math.PI,y=n?0:.5;Oe[0]=y*Math.sin(m),Oe[1]=y*-Math.cos(m),Oe[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)r[a++]=Oe[t],i[l++]=f?2===t?e<=1?1:-1:0:2===t?0:Oe[t]/y;o[c++]=(g+(n?.5:0))/t,o[c++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,p||0===e||g===t||(5!==e&&(s[u++]=h,s[u++]=h+1,s[u++]=h-t),1!==e&&(s[u++]=h,s[u++]=h-t,s[u++]=h-t-1)),h++}}return{position:r,normal:i,uv:o,faces:s}}(t&&t.densificationFactor||0),e,t)):(i.Z.getLogger(Je).error(".createCylinder()",(new T).message),null)}static createPlane(e,t){if(!(e instanceof y.Z))return i.Z.getLogger(Je).error(".createPlane()",(new T).message),null;const n=t?.facing??"up",r=function(e,t){const n="number"==typeof t?t:null!=t?t.width:1,r="number"==typeof t?t:null!=t?t.height:1;switch(e){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}(n,t?.size);return new Ve(Ze(function(e){const t=Ce.facingAxisOrderSwap[e],n=Ce.position,r=Ce.normal,i=new Float64Array(n.length),o=new Float32Array(r.length);let s=0;for(let e=0;e<4;e++){const e=s;for(let a=0;a<3;a++){const l=t[a],c=Math.abs(l)-1,u=l>=0?1:-1;i[s]=n[e+c]*u,o[s]=r[e+c]*u,s++}}return{position:i,normal:o,uv:new Float32Array(Ce.uv),faces:new Uint32Array(Ce.faces),isPlane:!0}}(n),e,{...t,size:r}))}static createFromPolygon(e,t){if(!(e instanceof x.Z))return i.Z.getLogger(Je).error(".createFromPolygon()",(new _).message),null;const n=function(e){const t=function(e,t,n,r){const i=e.length,o=new Array(i),s=new Array(i),a=new Array(i);let l=0,c=0,u=0,h=0;for(let t=0;t<i;++t)h+=e[t].length;const f=(0,U.bg)(3*h);let p=0;for(let h=i-1;h>=0;h--){const d=e[h],g=n===V.CCW_IS_HOLE&&$(d,t,r);if(g&&1!==i)o[l++]=d;else{let e=d.length;for(let t=0;t<l;++t)e+=o[t].length;const n={index:p,pathLengths:new Array(l+1),count:e,holeIndices:new Array(l)};n.pathLengths[0]=d.length,d.length>0&&(a[u++]={index:p,count:d.length}),p=g?H(d,d.length-1,-1,f,p,d.length,t):H(d,0,1,f,p,d.length,t);for(let e=0;e<l;++e){const r=o[e];n.holeIndices[e]=p,n.pathLengths[e+1]=r.length,r.length>0&&(a[u++]={index:p,count:r.length}),p=H(r,0,1,f,p,r.length,t)}l=0,n.count>0&&(s[c++]=n)}}for(let e=0;e<l;++e){const n=o[e];n.length>0&&(a[u++]={index:p,count:n.length}),p=H(n,0,1,f,p,n.length,t)}return s.length=c,a.length=u,{position:f,polygons:s,outlines:a}}(e.rings,e.hasZ,V.CCW_IS_HOLE,e.spatialReference),n=new Array;let r=0,i=0;for(const e of t.polygons){const o=e.count,s=e.index,a=(0,U.Rq)(t.position,3*s,3*o),l=e.holeIndices.map((e=>e-s)),c=(0,N.mi)((0,I.e)(a,l,3));n.push({position:a,faces:c}),r+=a.length,i+=c.length}const o=function(e,t,n){if(1===e.length)return e[0];const r=(0,U.bg)(t),i=new Array(n);let o=0,s=0,a=0;for(const t of e){for(let e=0;e<t.position.length;e++)r[o++]=t.position[e];for(const e of t.faces)i[s++]=e+a;a=o/3}return{position:r,faces:(0,N.mi)(i)}}(n,r,i),s=Array.isArray(o.position)?(0,D.d)(o.position,3,{originalIndices:o.faces}):(0,D.d)(o.position.buffer,6,{originalIndices:o.faces});return o.position=(0,U.QZ)(new Float64Array(s.buffer)),o.faces=s.indices,o}(e);return new Ve({vertexAttributes:new F.Q({position:n.position}),components:[new w.Z({faces:n.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new R.Z})}static async createFromGLTF(e,t,r){if(!(e instanceof y.Z)){const e=new T;throw i.Z.getLogger(Je).error(".createfromGLTF()",e.message),e}const{loadGLTFMesh:o}=await(0,f.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r);return new Ve(await o(e,t,r))}static async createFromFiles(e,t,n){const r=e=>i.Z.getLogger(Je).error(".createFromFiles()",e.message);if(!(e instanceof y.Z)){const e=new T;throw r(e),e}const o=n?.layer;if(!o){const e=new M;throw r(e),e}const s=await Ve.extractAndFilterFiles(t,o),a=s.reduce(((e,t)=>(0,Ge.$z)(o.infoFor3D,t)?e+1:e),0);if(0===a){const e=new C;throw r(e),e}if(a>1){const e=new Z;throw r(e),e}const l=Ve.createWithExternalSource(e,s),[c]=await o.uploadAssets([l],n);return c}static async extractAndFilterFiles(e,t){const n=t?.infoFor3D;return n?(await async function(e){const t=[];for(const n of e)n.name.toLowerCase().endsWith(".zip")?t.push(qe(n)):t.push(Promise.resolve(n));return(await Promise.all(t)).flat()}(e)).filter((e=>(0,Ge.F7)(n,e))):e}static createWithExternalSource(e,t,n){const r=n?.extent??null,{x:i,y:o,z:s,spatialReference:a}=e,l=n?.transform?.clone()??new L.Z,c=n?.vertexSpace??new O.Z({origin:[i,o,s??0]}),u={source:t,extent:r},h=new ge;return h.externalSources.push(u),new Ve({metadata:h,transform:l,vertexSpace:c,spatialReference:a})}static createIncomplete(e,t){const{x:n,y:r,z:i,spatialReference:o}=e,s=t?.transform?.clone()??new L.Z,a=t?.vertexSpace??new O.Z({origin:[n,r,i??0]}),l=new Ve({transform:s,vertexSpace:a,spatialReference:o});return l.addResolvingPromise(Promise.reject(new c.Z("mesh-incomplete","Mesh resources are not complete"))),l}};(0,l._)([(0,d.Cb)({type:[w.Z],json:{write:!0}})],Xe.prototype,"components",void 0),(0,l._)([(0,d.Cb)({nonNullable:!0,types:Ye,constructOnly:!0,json:{write:!0}})],Xe.prototype,"vertexSpace",void 0),(0,l._)([(0,d.Cb)({type:L.Z,json:{write:!0}})],Xe.prototype,"transform",void 0),(0,l._)([(0,d.Cb)({constructOnly:!0})],Xe.prototype,"metadata",void 0),(0,l._)([(0,d.Cb)()],Xe.prototype,"hasExtent",null),(0,l._)([(0,d.Cb)()],Xe.prototype,"_transformedExtent",null),(0,l._)([(0,d.Cb)()],Xe.prototype,"_untransformedExtent",null),(0,l._)([(0,d.Cb)()],Xe.prototype,"anchor",null),(0,l._)([(0,d.Cb)()],Xe.prototype,"origin",null),(0,l._)([(0,d.Cb)({readOnly:!0,json:{read:!1}})],Xe.prototype,"extent",null),(0,l._)([(0,d.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Xe.prototype,"hasZ",void 0),(0,l._)([(0,d.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Xe.prototype,"hasM",void 0),(0,l._)([(0,d.Cb)({type:F.Q,nonNullable:!0,json:{write:!0}})],Xe.prototype,"vertexAttributes",void 0),Xe=Ve=(0,l._)([(0,g.j)(Je)],Xe);const Ke=(0,s.c)(),Qe=(0,v.Ue)(),et=Xe;var tt=n(82971),nt=n(74889);const rt=()=>i.Z.getLogger("esri.rest.support.meshFeatureSet");function it(e,t,n){const i=n.features;n.features=[],delete n.geometryType;const o=nt.Z.fromJSON(n);if(o.geometryType="mesh",!n.assetMaps)return o;const s=lt(t,n.assetMaps),a=e.sourceSpatialReference??tt.Z.WGS84,l=n.globalIdFieldName,{outFields:c}=e,u=null!=c&&c.length>0?(h=c.includes("*")?null:new Set(c),({attributes:e})=>{if(!e)return{};if(!h)return e;for(const t in e)h.has(t)||delete e[t];return e}):()=>({});var h;for(const e of i){const n=ot(e,l,a,t,s);null!=n&&o.features.push(new r.Z({geometry:n,attributes:u(e)}))}return o}function ot(e,t,n,r,i){const o=e.attributes[t],l=i.get(o);if(null==l)return rt().error("mesh-feature-set:asset-not-found","Service returned a feature which was not found in the asset map",e),null;if(!e.geometry)return rt().error("mesh-feature-set:no-geometry","Service returned a feature without geometry",e),null;const{originPoint:c,originVector:u}=function({attributes:e},t,{transformFieldRoles:n}){const r=e[n.originX],i=e[n.originY],o=e[n.originZ];return{originPoint:new y.Z({x:r,y:i,z:o,spatialReference:t}),originVector:(0,s.f)(r,i,o)}}(e,n,r),h=a.Z.fromJSON(e.geometry);h.spatialReference=n;const f=function(e,{transformFieldRoles:t}){return new L.Z({translation:[e[t.translationX],-e[t.translationZ],e[t.translationY]],rotationAxis:[e[t.rotationX],-e[t.rotationZ],e[t.rotationY]],rotationAngle:e[t.rotationDeg],scale:[e[t.scaleX],e[t.scaleZ],e[t.scaleY]]})}(e.attributes,r),p=l.projectVertices?new S.Z({origin:u}):new O.Z({origin:u}),d=function(e){const t=Array.from(e.files.values()),n=new Array;for(const e of t){if(e.status!==st.COMPLETED)return null;const t=new Array;for(const n of e.parts){if(!n)return null;t.push(new de.LL(n.url,n.hash))}n.push(new de.CP(e.name,e.mimeType,t))}return n}(l);return d?et.createWithExternalSource(c,d,{extent:h,transform:f,vertexSpace:p}):et.createIncomplete(c,{extent:h,transform:f,vertexSpace:p})}var st,at;function lt(e,t){const n=new Map;for(const r of t){const t=r.parentGlobalId;if(null==t)continue;const i=r.assetName,s=r.assetType,a=r.assetHash,l=r.assetURL,c=r.conversionStatus,u=r.seqNo,h=(0,Ge.d1)(s,e.supportedFormats);if(!h){rt().error("mesh-feature-set:unknown-format",`Service returned an asset of type ${s}, but it does not list it as a supported type`);continue}const f=(0,o.s1)(n,t,(()=>({projectVertices:ut(r.flags).projectVertices,files:new Map})));(0,o.s1)(f.files,i,(()=>({name:i,type:s,mimeType:h,status:ct(c),parts:[]}))).parts[u]={hash:a,url:l}}return n}function ct(e){switch(e){case"COMPLETED":case"SUBMITTED":return st.COMPLETED;case"INPROGRESS":return st.PENDING;default:return st.FAILED}}function ut(e){return{projectVertices:e.includes("PROJECT_VERTICES")}}(at=st||(st={}))[at.FAILED=0]="FAILED",at[at.PENDING=1]="PENDING",at[at.COMPLETED=2]="COMPLETED"},17662:(e,t,n)=>{n.d(t,{c:()=>i});var r=n(99001);class i{constructor(){this.id=(0,r.D)()}}},4726:(e,t,n)=>{var r;n.d(t,{U:()=>r}),function(e){e[e.Layer=0]="Layer",e[e.Object=1]="Object",e[e.Mesh=2]="Mesh",e[e.Line=3]="Line",e[e.Point=4]="Point",e[e.Material=5]="Material",e[e.Texture=6]="Texture",e[e.COUNT=7]="COUNT"}(r||(r={}))},22631:(e,t,n)=>{n.d(t,{Z:()=>S});var r=n(13598),i=n(17896),o=n(24882),s=n(1533);function a(e){if(e.length<s.c8)return Array.from(e);if((0,s.kJ)(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,s.Uc)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}var l=n(47026),c=n(44553),u=n(65617),h=n(11726);class f{constructor(e,t,n){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this.position=n,this._children=void 0,(0,h.hu)(e.length>=1),(0,h.hu)(3===n.size||4===n.size);const{data:r,size:o,indices:s}=n;(0,h.hu)(s.length%this._numIndexPerPrimitive==0),(0,h.hu)(s.length>=e.length*this._numIndexPerPrimitive);const a=e.length;let l=o*s[this._numIndexPerPrimitive*e[0]];p.clear(),p.push(l);const c=(0,u.f)(r[l],r[l+1],r[l+2]),f=(0,u.g)(c);for(let t=0;t<a;++t){const n=this._numIndexPerPrimitive*e[t];for(let e=0;e<this._numIndexPerPrimitive;++e){l=o*s[n+e],p.push(l);let t=r[l];c[0]=Math.min(t,c[0]),f[0]=Math.max(t,f[0]),t=r[l+1],c[1]=Math.min(t,c[1]),f[1]=Math.max(t,f[1]),t=r[l+2],c[2]=Math.min(t,c[2]),f[2]=Math.max(t,f[2])}}this.bbMin=c,this.bbMax=f;const d=(0,i.p)((0,u.c)(),this.bbMin,this.bbMax,.5);this.radius=.5*Math.max(Math.max(f[0]-c[0],f[1]-c[1]),f[2]-c[2]);let g=this.radius*this.radius;for(let e=0;e<p.length;++e){l=p.at(e);const t=r[l]-d[0],n=r[l+1]-d[1],i=r[l+2]-d[2],o=t*t+n*n+i*i;if(o<=g)continue;const s=Math.sqrt(o),a=.5*(s-this.radius);this.radius=this.radius+a,g=this.radius*this.radius;const c=a/s;d[0]+=t*c,d[1]+=n*c,d[2]+=i*c}this.center=d,p.clear()}getChildren(){if(this._children||(0,i.a)(this.bbMin,this.bbMax)<=1)return this._children;const e=(0,i.p)((0,u.c)(),this.bbMin,this.bbMax,.5),t=this.primitiveIndices.length,n=new Uint8Array(t),r=new Array(8);for(let e=0;e<8;++e)r[e]=0;const{data:o,size:s,indices:a}=this.position;for(let i=0;i<t;++i){let t=0;const l=this._numIndexPerPrimitive*this.primitiveIndices[i];let c=s*a[l],u=o[c],h=o[c+1],f=o[c+2];for(let e=1;e<this._numIndexPerPrimitive;++e){c=s*a[l+e];const t=o[c],n=o[c+1],r=o[c+2];t<u&&(u=t),n<h&&(h=n),r<f&&(f=r)}u<e[0]&&(t|=1),h<e[1]&&(t|=2),f<e[2]&&(t|=4),n[i]=t,++r[t]}let l=0;for(let e=0;e<8;++e)r[e]>0&&++l;if(l<2)return;const c=new Array(8);for(let e=0;e<8;++e)c[e]=r[e]>0?new Uint32Array(r[e]):void 0;for(let e=0;e<8;++e)r[e]=0;for(let e=0;e<t;++e){const t=n[e];c[t][r[t]++]=this.primitiveIndices[e]}this._children=new Array;for(let e=0;e<8;++e)void 0!==c[e]&&this._children.push(new f(c[e],this._numIndexPerPrimitive,this.position));return this._children}static prune(){p.prune()}}const p=new c.Z({deallocator:null});var d=n(17662),g=n(4726),m=n(22807),y=n(16996);function x(e,t,n){return(0,i.f)(v,t,e),(0,i.f)(w,n,e),(0,i.l)((0,i.b)(v,v,w))/2}n(12981),new m.x(y.Ue),new m.x((()=>{return e?{p0:(0,u.g)(e.p0),p1:(0,u.g)(e.p1),p2:(0,u.g)(e.p2)}:{p0:(0,u.c)(),p1:(0,u.c)(),p2:(0,u.c)()};var e}));const v=(0,u.c)(),w=(0,u.c)(),b=(0,u.c)(),A=(0,u.c)(),_=(0,u.c)(),T=(0,u.c)();var M=n(99001);class C{constructor(e){this.channel=e,this.id=(0,M.D)()}}var Z=n(35065);n(9820),(0,u.c)(),new Float32Array(6);class S extends d.c{constructor(e,t,n=null,r=g.U.Mesh,i=null,s=-1){super(),this.material=e,this.mapPositions=n,this.type=r,this.objectAndLayerIdColor=i,this.edgeIndicesLength=s,this.visible=!0,this._attributes=new Map,this._boundingInfo=null;for(const[e,n]of t)this._attributes.set(e,{...n,indices:(0,o.mi)(n.indices)}),e===Z.T.POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._attributes.get(e).indices.length:this.edgeIndicesLength)}instantiate(e={}){const t=new S(e.material||this.material,[],this.mapPositions,this.type,this.objectAndLayerIdColor,this.edgeIndicesLength);return this._attributes.forEach(((e,n)=>{e.exclusive=!1,t._attributes.set(n,e)})),t._boundingInfo=this._boundingInfo,t.transformation=e.transformation||this.transformation,t}get attributes(){return this._attributes}getMutableAttribute(e){let t=this._attributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:a(t.data)},this._attributes.set(e,t)),t}setAttributeData(e,t){const n=this._attributes.get(e);n&&this._attributes.set(e,{...n,exclusive:!0,data:t})}get indexCount(){const e=this._attributes.values().next().value.indices;return e?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return null==this._boundingInfo&&(this._boundingInfo=this._calculateBoundingInfo()),this._boundingInfo}computeAttachmentOrigin(e){return!!(this.type===g.U.Mesh?this._computeAttachmentOriginTriangles(e):this.type===g.U.Line?this._computeAttachmentOriginLines(e):this._computeAttachmentOriginPoints(e))&&(null!=this._transformation&&(0,i.e)(e,e,this._transformation),!0)}_computeAttachmentOriginTriangles(e){return function(e,t){if(!e)return!1;const{size:n,data:r,indices:o}=e;(0,i.s)(t,0,0,0),(0,i.s)(T,0,0,0);let s=0,a=0;for(let e=0;e<o.length-2;e+=3){const l=o[e]*n,c=o[e+1]*n,u=o[e+2]*n;(0,i.s)(b,r[l],r[l+1],r[l+2]),(0,i.s)(A,r[c],r[c+1],r[c+2]),(0,i.s)(_,r[u],r[u+1],r[u+2]);const h=x(b,A,_);h?((0,i.g)(b,b,A),(0,i.g)(b,b,_),(0,i.i)(b,b,1/3*h),(0,i.g)(t,t,b),s+=h):((0,i.g)(T,T,b),(0,i.g)(T,T,A),(0,i.g)(T,T,_),a+=3)}return!(0===a&&0===s||(0!==s?((0,i.i)(t,t,1/s),0):0===a||((0,i.i)(t,T,1/a),0)))}(this.attributes.get(Z.T.POSITION),e)}_computeAttachmentOriginLines(e){const t=this.attributes.get(Z.T.POSITION);return function(e,t,n){if(!e)return!1;(0,i.s)(n,0,0,0),(0,i.s)(T,0,0,0);let r=0,o=0;const{size:s,data:a,indices:l}=e,c=l.length-1,u=c+(t?2:0);for(let e=0;e<u;e+=2){const t=e<c?e+1:0,u=l[e<c?e:c]*s,h=l[t]*s;b[0]=a[u],b[1]=a[u+1],b[2]=a[u+2],A[0]=a[h],A[1]=a[h+1],A[2]=a[h+2],(0,i.i)(b,(0,i.g)(b,b,A),.5);const f=(0,i.r)(b,A);f>0?((0,i.g)(n,n,(0,i.i)(b,b,f)),r+=f):0===r&&((0,i.g)(T,T,b),o++)}return 0!==r?((0,i.i)(n,n,1/r),!0):0!==o&&((0,i.i)(n,T,1/o),!0)}(t,function(e,t){return!(!("isClosed"in e)||!e.isClosed)&&t.indices.length>2}(this.material.parameters,t),e)}_computeAttachmentOriginPoints(e){return function(e,t){if(!e)return!1;const{size:n,data:r,indices:o}=e;(0,i.s)(t,0,0,0);let s=-1,a=0;for(let e=0;e<o.length;e++){const i=o[e]*n;s!==i&&(t[0]+=r[i],t[1]+=r[i+1],t[2]+=r[i+2],a++),s=i}return a>1&&(0,i.i)(t,t,1/a),a>0}(this.attributes.get(Z.T.POSITION),e)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const e=this.attributes.get(Z.T.POSITION);if(!e||0===e.indices.length)return null;const t=this.type===g.U.Mesh?3:1;(0,h.hu)(e.indices.length%t==0,"Indexing error: "+e.indices.length+" not divisible by "+t);const n=(0,o.KF)(e.indices.length/t);return new f(n,t,e)}get transformation(){return this._transformation??r.I}set transformation(e){this._transformation=e&&e!==r.I?(0,r.b)(e):null}addHighlight(){const e=new C(l.V_.Highlight);return this.highlights=function(e,t){return null==e&&(e=[]),e.push(t),e}(this.highlights,e),e}removeHighlight(e){this.highlights=function(e,t){if(null==e)return null;const n=e.filter((e=>e!==t));return 0===n.length?null:n}(this.highlights,e)}}},11726:(e,t,n)=>{n.d(t,{hu:()=>i,yK:()=>o}),n(97323),n(98766),(0,n(88669).c)();class r{constructor(e){this.message=e}toString(){return`AssertException: ${this.message}`}}function i(e,t){if(!e){t=t||"Assertion";const e=new Error(t).stack;throw new r(`${t} at ${e}`)}}function o(e,t,n,r){let i,o=(n[0]-e[0])/t[0],s=(r[0]-e[0])/t[0];o>s&&(i=o,o=s,s=i);let a=(n[1]-e[1])/t[1],l=(r[1]-e[1])/t[1];if(a>l&&(i=a,a=l,l=i),o>l||a>s)return!1;a>o&&(o=a),l<s&&(s=l);let c=(n[2]-e[2])/t[2],u=(r[2]-e[2])/t[2];return c>u&&(i=c,c=u,u=i),!(o>u||c>s||(u<s&&(s=u),s<0))}},47026:(e,t,n)=>{var r,i,o,s,a,l,c,u,h;n.d(t,{Gv:()=>i,Iq:()=>u,JJ:()=>c,Rw:()=>s,Ti:()=>h,V_:()=>l,Vr:()=>r,hU:()=>a}),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(r||(r={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(i||(i={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(o||(o={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(s||(s={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(a||(a={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee",e[e.COUNT=2]="COUNT"}(l||(l={})),function(e){e[e.Blend=0]="Blend",e[e.Opaque=1]="Opaque",e[e.Mask=2]="Mask",e[e.MaskBlend=3]="MaskBlend",e[e.COUNT=4]="COUNT"}(c||(c={})),function(e){e[e.OFF=0]="OFF",e[e.ON=1]="ON"}(u||(u={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(h||(h={}))},9820:(e,t,n)=>{function r(e,t){const n=e.length;for(let r=0;r<n;++r)o[0]=e[r],t[r]=o[0];return t}function i(e,t){const n=e.length;for(let r=0;r<n;++r)o[0]=e[r],o[1]=e[r]-o[0],t[r]=o[1];return t}n.d(t,{GB:()=>i,U8:()=>r});const o=new Float32Array(2)}}]);