@arcgis/core 4.32.3 → 4.32.5

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 (261) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{9bd0d85706f4cc2f3e9f.js → 01582612e10e6a880eb5.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{53810519ff5922b42cd2.js → 08a17dd3c573d1154234.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{fc6264f3fc38f5e9e763.js → 0f4b4e50ad9d634c8ed0.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{272662e4e28341419b4f.js → 109a56fc07f814c4baa4.js} +1 -1
  6. package/assets/esri/core/workers/chunks/10ca2107c99fab6bcc3b.js +1 -0
  7. package/assets/esri/core/workers/chunks/{57924f4909f2cbe5d64c.js → 1accbc048b74857269e4.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{3bad184751fcb26c003c.js → 1d51c064045e9c47bd2e.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{c032bcd25e2e7a57ad43.js → 1ede0e123d0addadff63.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{d6b04f8a72e0c67ecef0.js → 1f3d2308e48f0e4758e7.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{3ebdd0701e77bb28c75d.js → 2079f9d28e4199714f22.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{4848a3e31632d15dc4ce.js → 20ac6ee693da8750ac75.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{401588b9d18866ed83e2.js → 24e174197a1be1f3d36c.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{61243217aed5de012e93.js → 25af8b25ab853941a992.js} +1 -1
  15. package/assets/esri/core/workers/chunks/285dd7683f57d9d3667d.js +1 -0
  16. package/assets/esri/core/workers/chunks/{82facb23dfaba2819bc7.js → 2ec7931a6192e55cc4b1.js} +1 -1
  17. package/assets/esri/core/workers/chunks/31a5ee1907775cd10a54.js +1 -0
  18. package/assets/esri/core/workers/chunks/{3835c2884c55e73dc202.js → 33db840002a2b77abc33.js} +1 -1
  19. package/assets/esri/core/workers/chunks/364445d5a7d90c276246.js +1 -0
  20. package/assets/esri/core/workers/chunks/39d1a1ef9695405c70cc.js +1 -0
  21. package/assets/esri/core/workers/chunks/{0a5689348d544090006d.js → 3c23e567cfb7372c44ba.js} +1 -1
  22. package/assets/esri/core/workers/chunks/3cdd12250fbecc137f06.js +1 -0
  23. package/assets/esri/core/workers/chunks/4155d28c0ea3d7615af3.js +1 -0
  24. package/assets/esri/core/workers/chunks/4990affabd907281cddd.js +1 -0
  25. package/assets/esri/core/workers/chunks/4e867c6e204aa457043a.js +1 -0
  26. package/assets/esri/core/workers/chunks/548ff32df8b8cc8df535.js +1 -0
  27. package/assets/esri/core/workers/chunks/57a51abfc708fa937eab.js +1 -0
  28. package/assets/esri/core/workers/chunks/{cf285e45c18cd4399dde.js → 5869cc7d1d90fb16c2e6.js} +1 -1
  29. package/assets/esri/core/workers/chunks/5d766ecc16b2389156ef.js +1 -0
  30. package/assets/esri/core/workers/chunks/{6fa1f1e431aae1794ce3.js → 5dd92428f2ca78dabfa2.js} +1 -1
  31. package/assets/esri/core/workers/chunks/5e2e92cc87aab56e5393.js +1 -0
  32. package/assets/esri/core/workers/chunks/{2c1a85a801cb4d9d737e.js → 5fbdb5fea7d6676fcf19.js} +1 -1
  33. package/assets/esri/core/workers/chunks/62e9e51564d7de62a01b.js +1 -0
  34. package/assets/esri/core/workers/chunks/{d60da671aba70485050e.js → 6e6422eda398774acbc7.js} +1 -1
  35. package/assets/esri/core/workers/chunks/6ec1cdb0f6411dd1cb48.js +1 -0
  36. package/assets/esri/core/workers/chunks/7019e238f173ff1b13f0.js +1 -0
  37. package/assets/esri/core/workers/chunks/75b5502fbea3b3fb8959.js +1 -0
  38. package/assets/esri/core/workers/chunks/{f52ed527b46c316eb369.js → 778f82f16b9719bea005.js} +1 -1
  39. package/assets/esri/core/workers/chunks/785fe520685b0efea0ff.js +1 -0
  40. package/assets/esri/core/workers/chunks/{d29c3bf29fcd7fa31f1a.js → 7a4eecabeb86a23d832c.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{5984ab09ea8010f8a874.js → 7aa763e7747530f6046f.js} +1 -1
  42. package/assets/esri/core/workers/chunks/7b4880b2dc6b01d70ccc.js +1 -0
  43. package/assets/esri/core/workers/chunks/7d94ba0a23fd20f18e32.js +973 -0
  44. package/assets/esri/core/workers/chunks/{30bd5b3204e09f516ea2.js → 7f87cf3d6a365d987f69.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{df506c4f81affce248c4.js → 7fe76e764c331b8ac938.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{e4b3f2d5c43518b0cde7.js → 83c1fecd2ef7e804bcad.js} +1 -1
  47. package/assets/esri/core/workers/chunks/83e340f4321f363c4bc7.js +1 -0
  48. package/assets/esri/core/workers/chunks/{21c7265f1f2a718de7c6.js → 84cc488555df6431facc.js} +1 -1
  49. package/assets/esri/core/workers/chunks/882f703365ca81f192bc.js +1 -0
  50. package/assets/esri/core/workers/chunks/892ef3f6a46ab0fd7055.js +1 -0
  51. package/assets/esri/core/workers/chunks/89cb4f2f6da7c313d6a3.js +1 -0
  52. package/assets/esri/core/workers/chunks/{e481e7d508274bc83c70.js → 8aebd8c89c9b653bade9.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{1787932b984ec8977095.js → 90e890fe7c56c4b3c47a.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{6ea02ff25f051c08e6c3.js → 91cce330c2720db377ec.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{a864ef9b584c83ebf6ae.js → 95ad76e58452b60fb79f.js} +1 -1
  56. package/assets/esri/core/workers/chunks/9cebecee1eee5fbe849e.js +1 -0
  57. package/assets/esri/core/workers/chunks/a2f3c5f4aeb997e59205.js +1 -0
  58. package/assets/esri/core/workers/chunks/{3f6516af411256d90a03.js → a559db8654b4f83fd79b.js} +1 -1
  59. package/assets/esri/core/workers/chunks/a8154c45aa798a8dc907.js +1 -0
  60. package/assets/esri/core/workers/chunks/b141cb82c13f6943e657.js +1 -0
  61. package/assets/esri/core/workers/chunks/b2696362f758e3f7c983.js +1 -0
  62. package/assets/esri/core/workers/chunks/b399173e13d8675f08bf.js +1 -0
  63. package/assets/esri/core/workers/chunks/{5cf08ee5114273163e09.js → b3aeda290470dcb2bdd2.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{dff4a9d656b84fe3e052.js → bb73cd34fbae935ccbcc.js} +1 -1
  65. package/assets/esri/core/workers/chunks/bf7e8ee652abec309cf0.js +1 -0
  66. package/assets/esri/core/workers/chunks/c03e6e35082beaec02a6.js +1 -0
  67. package/assets/esri/core/workers/chunks/{35bcb0622234b38d85b4.js → c04091eea7089dc2e864.js} +1 -1
  68. package/assets/esri/core/workers/chunks/c593b6c7e145526efef0.js +314 -0
  69. package/assets/esri/core/workers/chunks/{4300c80fa10c5d9141e8.js → c83b26ff96e39266adc2.js} +1 -1
  70. package/assets/esri/core/workers/chunks/cb6b9f29d4471532e078.js +1 -0
  71. package/assets/esri/core/workers/chunks/{17213c3fc63f580e5b73.js → cca7a3dbf899c6a9ce69.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{152becae48572299b07f.js → cee3a38b92a48a58c4d0.js} +1 -1
  73. package/assets/esri/core/workers/chunks/d0cbf3a455819d2e2686.js +1 -0
  74. package/assets/esri/core/workers/chunks/d57c7fb0340d800e7d27.js +1 -0
  75. package/assets/esri/core/workers/chunks/d94e8a1f64499ec9a22e.js +1 -0
  76. package/assets/esri/core/workers/chunks/da7eaf403212704b74f5.js +1 -0
  77. package/assets/esri/core/workers/chunks/{8722d05ae9b0aa5162a4.js → ddcbab04b9559cf310e4.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{28dbbfc44cc2bdcd221d.js → df850d4c94a39a550229.js} +1 -1
  79. package/assets/esri/core/workers/chunks/e24307ee8b6d101da39a.js +1 -0
  80. package/assets/esri/core/workers/chunks/{0b8bf1966653c326e95a.js → e2f1e6c56c494a531bbf.js} +1 -1
  81. package/assets/esri/core/workers/chunks/e4ab971764d2e57c9e4a.js +1 -0
  82. package/assets/esri/core/workers/chunks/{5719471414810b6a9aec.js → e56647e61296643c5f84.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{a12afed58acff17708ca.js → e6087eda5e3b7e5ad3e1.js} +1 -1
  84. package/assets/esri/core/workers/chunks/e7f866969be8477b6622.js +1 -0
  85. package/assets/esri/core/workers/chunks/{213249f3c7d639c04305.js → ecbfff23f0716446f050.js} +1 -1
  86. package/assets/esri/core/workers/chunks/f0456d3eda9861f7e517.js +1 -0
  87. package/assets/esri/core/workers/chunks/{37cfd102b6ab5b959f9d.js → f1fdade1a5ff27fddef6.js} +1 -1
  88. package/assets/esri/core/workers/chunks/f4b3199e7e45d9ceb91f.js +1 -0
  89. package/assets/esri/core/workers/chunks/f8e215ea3f420e666af4.js +1 -0
  90. package/assets/esri/core/workers/chunks/fa51036a48eec4175c74.js +1 -0
  91. package/assets/esri/core/workers/chunks/ffd987a0662167b58ff9.js +1 -0
  92. package/chunks/Bufferer-B-V7yYm-.js +1 -1
  93. package/chunks/Distance2DCalculator-Coa0qAFt.js +1 -1
  94. package/chunks/Envelope.js +1 -1
  95. package/chunks/GeodeticDistanceCalculator-D4iQ-_NX.js +1 -1
  96. package/chunks/OperatorClip.js +1 -1
  97. package/chunks/OperatorCut.js +1 -1
  98. package/chunks/OperatorGeodesicBuffer.js +1 -1
  99. package/chunks/OperatorGeodeticArea.js +1 -1
  100. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  101. package/chunks/OperatorProximity.js +1 -1
  102. package/chunks/OperatorShapePreservingProject.js +1 -1
  103. package/chunks/ProjectionTransformation.js +1 -1
  104. package/chunks/SideCalculator2D-BNwb5gvz.js +1 -1
  105. package/chunks/disjointOperator.js +1 -1
  106. package/core/timeUtils.js +1 -1
  107. package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
  108. package/editing/sharedTemplates/executor/builders/support/builderUtils.js +1 -1
  109. package/editing/sharedTemplates/executor/createTemplateExecutor.js +1 -1
  110. package/editing/sharedTemplates/executor/support/createFeatureServiceEdit.js +5 -0
  111. package/editing/sharedTemplates/executor/support/createPresetServiceEdit.js +5 -0
  112. package/editing/sharedTemplates/support/sharedTemplateErrors.js +1 -1
  113. package/editing/sharedTemplates/templateDefinitions/GroupTemplateDefinition.js +1 -1
  114. package/editing/templateUtils.js +1 -1
  115. package/geometry/operators/extendOperator.js +1 -1
  116. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  117. package/geometry/operators/gx/operatorBuffer.js +1 -1
  118. package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
  119. package/geometry/operators/gx/operatorIntegrate.js +1 -1
  120. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  121. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  122. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  123. package/geometry/operators/gx/operatorSimplify.js +1 -1
  124. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  125. package/geometry/operators/gx/operatorUnion.js +1 -1
  126. package/geometry/operators/json/disjointOperator.js +1 -1
  127. package/geometry/operators/reshapeOperator.js +1 -1
  128. package/geometry/operators/support/apiConverter.js +1 -1
  129. package/geometry/operators/support/initNoPeFactory.js +1 -1
  130. package/geometry/operators/support/jsonConverter.js +1 -1
  131. package/interfaces.d.ts +11 -5
  132. package/intl/date.js +1 -1
  133. package/kernel.js +1 -1
  134. package/layers/graphics/sources/WFSSource.js +1 -1
  135. package/layers/graphics/sources/WFSSourceWorker.js +1 -1
  136. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  137. package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
  138. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  139. package/layers/ogc/ogcFeatureUtils.js +1 -1
  140. package/layers/support/FieldsIndex.js +1 -1
  141. package/layers/support/SubtypeSublayer.js +1 -1
  142. package/networks/support/UtilityNetworkLookupHelper.js +5 -0
  143. package/package.json +1 -1
  144. package/smartMapping/support/utils.js +1 -1
  145. package/support/guards.js +1 -1
  146. package/support/revision.js +1 -1
  147. package/time/TimeExtent.js +1 -1
  148. package/time/constants.js +5 -0
  149. package/time/timeZoneUtils.js +1 -1
  150. package/views/2d/engine/webgl/TextureManager.js +1 -1
  151. package/views/2d/engine/webgl/Utils.js +1 -1
  152. package/views/2d/engine/webgl/mesh/factories/ResourceProxy.js +1 -1
  153. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js +1 -1
  154. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexOutlineFillShader.js +1 -1
  155. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
  156. package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
  157. package/views/2d/engine/webgl/textureUtils.js +5 -0
  158. package/views/2d/engine/webgl/urlUtils.js +5 -0
  159. package/views/2d/layers/MediaLayerView2D.js +1 -1
  160. package/views/2d/layers/TileLayerView2D.js +1 -1
  161. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  162. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  163. package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
  164. package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
  165. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  166. package/views/3d/terrain/TileRenderer.js +1 -1
  167. package/views/3d/webgl-engine/lib/TextureCompressionWorkerHandle.js +1 -1
  168. package/views/VideoView.js +1 -1
  169. package/views/View.js +1 -1
  170. package/views/support/TextureCompressionHelper.js +1 -1
  171. package/views/webgl/Texture.js +1 -1
  172. package/webmap/InitialViewProperties.js +1 -1
  173. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  174. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  175. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  176. package/widgets/Bookmarks.js +1 -1
  177. package/widgets/Directions/DirectionsViewModel.js +1 -1
  178. package/widgets/Editor/AddAssociationWorkflow.js +1 -1
  179. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  180. package/widgets/Editor/Edits.js +1 -1
  181. package/widgets/Editor/workflowUtils.js +1 -1
  182. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  183. package/widgets/Feature/FeatureRelationship.js +1 -1
  184. package/widgets/Feature/FeatureUtilityNetworkAssociationList.js +1 -1
  185. package/widgets/Feature/FeatureViewModel.js +1 -1
  186. package/widgets/Feature/support/featureUtils.js +1 -1
  187. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/AssociationDetails.js +1 -1
  188. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
  189. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js +1 -1
  190. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  191. package/widgets/FeatureForm/UtilityNetworkAssociationAddAssociationViewModel.js +1 -1
  192. package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
  193. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  194. package/widgets/FeatureTable/FieldColumn.js +1 -1
  195. package/widgets/Features/FeaturesDrillIn.js +1 -1
  196. package/widgets/Features/FeaturesViewModel.js +1 -1
  197. package/widgets/Features.js +1 -1
  198. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  199. package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
  200. package/widgets/OrientedImageryViewer/dataCaptureUtils.js +1 -1
  201. package/widgets/OrientedImageryViewer/symbols.js +1 -1
  202. package/widgets/OrientedImageryViewer.js +1 -1
  203. package/widgets/TimeSlider.js +1 -1
  204. package/widgets/TimeZoneLabel.js +1 -1
  205. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +1 -1
  206. package/widgets/support/UtilityNetworkAssociations/utils/createAssociation.js +5 -0
  207. package/widgets/support/UtilityNetworkAssociations/utils/formatPercentAlong.js +5 -0
  208. package/widgets/support/UtilityNetworkAssociations/utils/getAssociationTitle.js +5 -0
  209. package/widgets/support/UtilityNetworkAssociations/utils/getFeatureTitle.js +5 -0
  210. package/widgets/support/UtilityNetworkAssociations/utils/isConnectivity.js +5 -0
  211. package/widgets/support/UtilityNetworkAssociations/utils/isConnectivityMidspan.js +5 -0
  212. package/widgets/support/UtilityNetworkAssociations/utils/isFromElement.js +5 -0
  213. package/widgets/support/dateUtils.js +1 -1
  214. package/assets/esri/core/workers/chunks/0167cf867d8e46c818b0.js +0 -1
  215. package/assets/esri/core/workers/chunks/0a8e388e96af44deeabb.js +0 -1
  216. package/assets/esri/core/workers/chunks/16934a38974256fffbec.js +0 -1
  217. package/assets/esri/core/workers/chunks/16f82e9d98371431b46d.js +0 -1
  218. package/assets/esri/core/workers/chunks/17fe69462cba5eb895b8.js +0 -1
  219. package/assets/esri/core/workers/chunks/192569dfa7c0ea8dd864.js +0 -1
  220. package/assets/esri/core/workers/chunks/207c040b0e42358a5389.js +0 -1
  221. package/assets/esri/core/workers/chunks/24c94f97a76646d415ae.js +0 -1
  222. package/assets/esri/core/workers/chunks/2ebf66e21d155a27b23e.js +0 -1
  223. package/assets/esri/core/workers/chunks/333091ab2e267652ed56.js +0 -1
  224. package/assets/esri/core/workers/chunks/37323e58dbec303f5054.js +0 -1
  225. package/assets/esri/core/workers/chunks/39112ecf6b45b166cad9.js +0 -1
  226. package/assets/esri/core/workers/chunks/4122d10bc910e888eee1.js +0 -1
  227. package/assets/esri/core/workers/chunks/433576983754f690bcc7.js +0 -1
  228. package/assets/esri/core/workers/chunks/476205ee4414ed80666a.js +0 -1
  229. package/assets/esri/core/workers/chunks/5721557a1d8eab23a55b.js +0 -1
  230. package/assets/esri/core/workers/chunks/584216b52413cf85fecc.js +0 -1
  231. package/assets/esri/core/workers/chunks/610c3249fe81e370af8c.js +0 -1
  232. package/assets/esri/core/workers/chunks/6ab476f696290d190c6c.js +0 -1
  233. package/assets/esri/core/workers/chunks/7cb09e58bcc537ec1f7a.js +0 -1
  234. package/assets/esri/core/workers/chunks/7e23c15b2a02116f7189.js +0 -1
  235. package/assets/esri/core/workers/chunks/80744ad7f7656ef918db.js +0 -1
  236. package/assets/esri/core/workers/chunks/83fe9a8002a4fc96e534.js +0 -1
  237. package/assets/esri/core/workers/chunks/8940dfad0ec8a8cc2d3e.js +0 -1
  238. package/assets/esri/core/workers/chunks/9306bfe7ab58e71b75ea.js +0 -1
  239. package/assets/esri/core/workers/chunks/95047f145ebda65c3d8e.js +0 -1
  240. package/assets/esri/core/workers/chunks/a5e9ea13e844a62b2a7f.js +0 -1
  241. package/assets/esri/core/workers/chunks/b44cf0e4c2f93408cabc.js +0 -1
  242. package/assets/esri/core/workers/chunks/b68bddd0c4ca91493543.js +0 -1
  243. package/assets/esri/core/workers/chunks/b97673755cd2cc5164e8.js +0 -1
  244. package/assets/esri/core/workers/chunks/bc25e34a1db735967dc5.js +0 -314
  245. package/assets/esri/core/workers/chunks/caf410ed75c40b3703eb.js +0 -1
  246. package/assets/esri/core/workers/chunks/cb0cbfede273455f27bd.js +0 -1
  247. package/assets/esri/core/workers/chunks/d279e4b09042988f93ae.js +0 -1
  248. package/assets/esri/core/workers/chunks/d3d0c7624eb139994213.js +0 -1
  249. package/assets/esri/core/workers/chunks/d4e7de3eb7c0cf6efc19.js +0 -973
  250. package/assets/esri/core/workers/chunks/d599ba865da87b487b1b.js +0 -1
  251. package/assets/esri/core/workers/chunks/ddc30044f61a2c2df3fe.js +0 -1
  252. package/assets/esri/core/workers/chunks/e2d98ac47d8a536e8a5e.js +0 -1
  253. package/assets/esri/core/workers/chunks/e533c329246ddc9522b6.js +0 -1
  254. package/assets/esri/core/workers/chunks/f06231c14c0c0e5525bd.js +0 -1
  255. package/assets/esri/core/workers/chunks/f117a89d1f4001a1f9f0.js +0 -1
  256. package/assets/esri/core/workers/chunks/f9e48205178a5a804d38.js +0 -1
  257. package/assets/esri/core/workers/chunks/faf9063420262ea40fd8.js +0 -1
  258. package/assets/esri/core/workers/chunks/fd8790291348fb7ead55.js +0 -1
  259. package/assets/esri/core/workers/chunks/fe817283bbcbca8fb296.js +0 -1
  260. package/editing/sharedTemplates/executor/support/createServiceEdit.js +0 -5
  261. package/widgets/support/UtilityNetworkAssociations/utilityNetworkUtils.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{prefersReducedMotion as t}from"../core/a11yUtils.js";import{createTask as i}from"../core/asyncUtils.js";import a from"../core/Collection.js";import{deprecatedProperty as s}from"../core/deprecate.js";import o from"../core/Logger.js";import{isAbortError as r}from"../core/promiseUtils.js";import n from"../core/ReactiveMap.js";import{watch as l,initial as c,syncAndInitial as d,whenOnce as g}from"../core/reactiveUtils.js";import{property as m}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as h}from"../core/accessorSupport/decorators/subclass.js";import{or as p}from"../layers/orientedImagery/transformations/utils.js";import u from"./Widget.js";import{getAllArcPath as v}from"./OrientedImageryViewer/arcUtils.js";import{defaultImageGeometryField as y,defaultOIObjectIDField as _,segmentArcs as w,sectorsRadii as b,featureCircleRadius as C,navigationToolDimensionLength as M,getDelegatedEvents as T}from"./OrientedImageryViewer/constants.js";import{css as f,navigation as I,navigationToolRotationFrom as L,navigationToolRotationTo as A,root as k}from"./OrientedImageryViewer/css.js";import{isFeatureAttachment as O,loadImageForAttachment as F,getThumbnailPixelBlock as S,renderImageWithRotation as E}from"./OrientedImageryViewer/galleryUtils.js";import V from"./OrientedImageryViewer/OrientedImageryViewerViewModel.js";import P from"./OrientedImageryViewer/OrientedImageryViewerVisibleElements.js";import x from"./OrientedImageryViewer/components/ImageLocationWidget.js";import{loadCalciteComponents as G}from"./support/componentsUtils.js";import{globalCss as j}from"./support/globalCss.js";import"./support/widgetUtils.js";import{messageBundle as $}from"./support/decorators/messageBundle.js";import{vmEvent as D}from"./support/decorators/vmEvent.js";import{tsx as H}from"./support/jsxFactory.js";import{substitute as B}from"../intl/substitute.js";const R={overlayMapFeatures:"overlay-map-features",overlayed:"overlayed",overlaysActionHandles:"overlays-action-handles"};let W=class extends u{constructor(e,t){super(e,t),this.dataCaptureEnabled=!1,this.galleryOpened=!1,this.imageEnhancementToolActive=!1,this.imageOverlaysOpened=!1,this.navigationToolActive=!1,this.viewModel=new V,this.messagesCommon=null,this.messagesSketch=null,this.pixelMeasurementUnit="meters",this.pixelAreaMeasurementUnit="square-meters",this.showCameraLocations=!1,this.showMapFeatures=!1,this.visibleElements=new P,this._actionItems=new n,this._imageOverlaysLoaderTask=null,this._imageMeasurementToolsLoaderTask=null,this._clearMeasurements=()=>{this.viewModel.measureType=null,this.viewModel.clearPreviousMeasurements()},this._clearImageLocation=()=>{this.imageLocationToolActive=!1},this._navigationToolExpanded=!1,this._navigationTool=null,this._warningTitleElement=null,this._galleryController=new AbortController,this._galleryObserver=new IntersectionObserver(this._lazyLoadImage.bind(this)),this._overlayedLayers=new a,this._previousAction=null,this._handleDataCaptureLayerChange=async e=>{if(this.dataCaptureLayer&&await this.stopDataCapture(!0),this.dataCaptureLayer=this.dataCaptureLayer===e?null:e,this.dataCaptureLayer)return this.startDataCapture(this.dataCaptureLayer)},this._handleOverlayLayerDeselect=e=>{const t=e.layer;t===this.dataCaptureLayer&&(this.stopDataCapture(!0),this.dataCaptureLayer=null),this.removeOverlayedGraphicsOnImage(`${t.id}`)},this._handleOverlayLayerSelect=e=>{const t=e.layer;this.viewModel.overlayMapFeatures(t,this.showMapFeatures),this.addHandles(l((()=>t.visible),(()=>{this.viewModel.toggleOverlayMapFeatures(t.id,t.visible)})),`${R.overlayed}-${t.id}`)},this._highlight=e=>{const t=e.target?.dataset.objectid;t&&this.viewModel.highlight(t)},this._onAction=e=>{const{target:t}=e,{dataset:{action:i}}=t,{_previousAction:a}=this,s=a?.dataset.action,o=s?.includes("draw")??!1,r="select-feature"===s,n=s!==i;switch(i){case"draw-point":case"draw-polygon":case"draw-polyline":{a&&p(r,o&&n)&&(a.active=!1),t.active=!t.active;const e=i.replace("draw-","");this.viewModel.digitizeCreate(e),this._previousAction=t.active?t:null;break}case"save":this.viewModel.saveDrawing();break;case"select-feature":o&&(this._previousAction.active=!1),t.active=!t.active,this.viewModel.toggleSelection(t.active),this._previousAction=t.active?t:null;break;case"delete-feature":this.viewModel.digitizeDelete()}},this._onImageOverlayClosed=()=>{this.imageOverlaysOpened=!1},this._onShowCameraLocationsChanged=e=>{this.showCameraLocations=e},this._onShowMapFeaturesChanged=e=>{this.showMapFeatures=e},this._removeActionElement=e=>{this._actionItems.delete(e.text)},this._removeHighlight=()=>this.viewModel.removeHighlight(),this._restoreOverlays=async()=>Promise.all(this._overlayedLayers.map((e=>this.viewModel.overlayMapFeatures(e,this.showMapFeatures)))),this._scaleNavigationTool=()=>{this._navigationToolExpanded=!this._navigationToolExpanded},this._sketchLoaderTask=null,this._toggleImageAttributes=()=>{this.viewModel.toggleImageAttributes()},this._loadImageFromGallery=this._loadImageFromGallery.bind(this),this._registerGalleryItem=this._registerGalleryItem.bind(this),this._unregisterGalleryItem=this._unregisterGalleryItem.bind(this),this.loadImageFromSource=this.loadImageFromSource.bind(this),this.updateSuitabilities=this.updateSuitabilities.bind(this)}initialize(){this.addHandles([l((()=>[this.viewModel?.bestFeatureAngle,this._navigationTool]),(([e,t])=>{t&&this._updateNavigationTool(t)}),c),l((()=>this.currentCoverageVisible),(e=>this._onCurrentCoverageVisibilityChange(e))),l((()=>this.isAdditionalCoverageVisible),(e=>this._onAdditionalCoverageVisibilityChange(e))),l((()=>this.isAdditionalPointSourcesVisible),(e=>this._onAdditionalCameraLocationsVisibility(e))),l((()=>({features:this.currentBestFeature,showCameraLocations:this.showCameraLocations,state:this.viewModel.state})),(({showCameraLocations:e,state:t})=>{"image-loaded"===t&&this.viewModel.overlayCameraLocations(e)}),d),l((()=>({feature:this.currentBestFeature,showMapFeatures:this.showMapFeatures,state:this.viewModel.state})),(async(e,t)=>{if(e.showMapFeatures!==t?.showMapFeatures&&this.viewModel.toggleAllOverlayMapFeatures(e.showMapFeatures),null!=e.feature&&e.feature!==t?.feature){if(this.viewModel.removeAllOverlayMapFeatures(),await g((()=>"image-loaded"===this.viewModel.state)),this.dataCaptureLayer&&this.stopDataCapture(),await this._restoreOverlays(),!this.dataCaptureLayer)return;await this.startDataCapture(this.dataCaptureLayer),this._previousAction?.active&&(this._previousAction.active=!1,this._previousAction=null)}}),c)])}loadDependencies(){return G({"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),action:()=>import("@esri/calcite-components/dist/components/calcite-action"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),shell:()=>import("@esri/calcite-components/dist/components/calcite-shell"),dialog:()=>import("@esri/calcite-components/dist/components/calcite-dialog"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),slider:()=>import("@esri/calcite-components/dist/components/calcite-slider"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")})}destroy(){this._galleryController.abort(),this._galleryObserver.disconnect()}get accuracyParametersMissing(){return this.viewModel.accuracyParametersMissing}get activeLayer(){return s(o.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer}set activeLayer(e){s(o.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer=e}get currentBestFeature(){return this.viewModel.currentBestFeature}set currentBestFeature(e){this.viewModel.currentBestFeature=e}get currentCoverageVisible(){return this.viewModel.currentCoverageVisible}set currentCoverageVisible(e){this.viewModel.currentCoverageVisible=e}get dataCaptureLayer(){return this.viewModel.dataCaptureLayer}set dataCaptureLayer(e){this.viewModel.dataCaptureLayer=e}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get displayMessage(){return this.viewModel.displayMessage}get features(){return this.viewModel.features}get imagePointsInView(){return this.viewModel.imagePointsInView}get icon(){return"oriented-imagery-widget"}set icon(e){this._overrideIfSome("icon",e)}get imageGalleryEnabled(){return this.viewModel.imageGalleryEnabled}get imageLocationToolActive(){return this.viewModel.imageLocationToolState}set imageLocationToolActive(e){this.viewModel.imageLocationToolState=e}get invalidCameraHeading(){return this.viewModel.invalidCameraHeading}get isAdditionalCoverageVisible(){return this.viewModel.isAdditionalCoverageVisible}set isAdditionalCoverageVisible(e){this.viewModel.isAdditionalCoverageVisible=e}get isAdditionalPointSourcesVisible(){return this.viewModel.isAdditionalPointSourcesVisible}set isAdditionalPointSourcesVisible(e){this.viewModel.isAdditionalPointSourcesVisible=e}get mapImageConversionToolState(){return this.viewModel.mapImageConversionToolState}set mapImageConversionToolState(e){this.viewModel.mapImageConversionToolState=e}get measureType(){return this.viewModel.measureType}set measureType(e){this.viewModel.measureType=e}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get popupEnabled(){const{popupEnabled:e,state:t}=this.viewModel;return"image-loaded"===t&&e}get referencePoint(){return this.viewModel.referencePoint??null}get sketchViewModel(){return this.viewModel.sketch}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}set determineWorkflowForFeature(e){this.viewModel.determineWorkflowForFeature=e}get determineWorkflowForFeature(){return this.viewModel.determineWorkflowForFeature}set updateFootprint(e){this.viewModel.updateFootprint=e}get updateFootprint(){return this.viewModel.updateFootprint}_renderActionBar(){return H("calcite-action-bar",{expandDisabled:!0,layout:"horizontal",slot:"action-bar"},H("calcite-action-group",null,this._currentFootprintToggle(),this._additionalFootprintToggle(),this._additionalPointSourcesToggle()),H("calcite-action-group",null,this._mapImageConversionToggle(),this._navigationToolToggle(),this._imageEnhancementsToggle()),H("calcite-action-group",null,this._measurementToolsToggle(),this._imageGalleryToggle(),this._imageOverlaysToggle(),this._openPopupAction()),this._actionTooltips())}_actionTooltips(){return[...this._actionItems].map((([e,t])=>H("calcite-tooltip",{closeOnClick:!0,key:e,placement:"bottom",referenceElement:t},H("span",null,e))))}get _activeMeasurementIcon(){const{measureType:e,imageLocationToolActive:t}=this;if(t)return"pin-tear";switch(e){case"area":return"measure-area";case"height":return"measure-building-height-top-base";default:return"measure-line"}}get _activeMeasurementHeading(){const{measureType:e,messages:t}=this,{groundArea:i,heightAboveGround:a,groundDistance:s}=t;switch(e){case"area":return i;case"height":return a;default:return s}}_additionalFootprintToggle(){const{isAdditionalCoverageVisible:e,invalidCameraHeading:t,visibleElements:{additionalFootprintToggle:i}}=this;return i?H("calcite-action",{active:e,...this._commonActionProperties,class:f.addCoverage,disabled:t,icon:"trapezoid-area",onclick:this._toggleAdditionalCoverage,text:this.messages.additionalFootprints}):null}_additionalPointSourcesToggle(){const{isAdditionalPointSourcesVisible:e,invalidCameraHeading:t,visibleElements:{additionalCameraLocationsToggle:i}}=this;return i?H("calcite-action",{active:e,...this._commonActionProperties,class:f.addExpPoints,disabled:t,icon:"circle-area",onclick:this._toggleAdditionalCameraLocations,text:this.messages.additionalCameraLocations}):null}get _measurementToggle(){const{viewModel:{state:e,measureType:t},id:i}=this;if("image-loaded"!==e||!t)return;this._imageMeasurementToolsLoaderTask||this._loadImageMeasurementResources();const a=this._imageMeasurementToolsLoaderTask?.value;return a?H("calcite-dialog",{bind:this,dragEnabled:!0,escapeDisabled:!0,heading:this._activeMeasurementHeading,id:`${i}-${t}-measurement`,open:!0,placement:"bottom-start",resizable:!0,scale:"s",slot:"dialogs",width:"s",onCalciteDialogBeforeClose:this._clearMeasurements},H(a,{measurementType:t,measurementUnitMessages:this.measurementUnitMessages,messages:this.messages,oiViewModel:this.viewModel})):null}get _commonActionProperties(){return{afterCreate:this._storeActionElement,afterRemoved:this._removeActionElement,afterUpdate:this._storeActionElement,bind:this}}_renderRoot(){const{viewModel:{state:e}}=this;return H("calcite-panel",null,H("calcite-shell",null,H("calcite-panel",{bind:this,class:f.viewerContainer,heading:this.visibleElements.title?this.messages.title:void 0,loading:e.includes("loading")},this.visibleElements.menu?this._renderActionBar():null,this._imageViewer,this._panoramicViewer,this._messageBox,this.invalidCameraHeading?[this._renderWarning(this.messages.invalidCameraHeadingWarningTitle),this._renderWarningTooltip(this.messages.invalidCameraHeadingWarningDescription)]:[this._imageGalleryPanel,this._renderNavigation,this._imageOverlaysPanel()],this._imageEnhancementTools,this._renderSketch()),this._measurementToggle,this._locationToggle))}_currentFootprintToggle(){const{currentCoverageVisible:e,invalidCameraHeading:t}=this,{currentFootprintToggle:i}=this.visibleElements;return i?H("calcite-action",{active:e,...this._commonActionProperties,class:f.currentCoverage,disabled:t,icon:"trapezoid-area",onclick:this._toggleCurrentCoverage,text:this.messages.currentFootprint}):null}get _imageEnhancementTools(){const{imageEnhancementToolActive:e,viewModel:{brightness:t,contrast:i,sharpness:a,state:s}}=this;return e&&"image-loaded"===s?H("calcite-panel",{bind:this,class:f.imageEnhancementWrapper,closable:!0,closed:!e,heading:this.messages.imageEnhancement,key:this.messages.imageEnhancement,onCalcitePanelClose:this._toggleImageEnhancementToolState},H("div",{class:f.imageEnhancementTools},H("div",{class:f.imageEnhancementToolContainer},H("calcite-label",null,this.messages.brightness,H("calcite-slider",{bind:this,labelTicks:!0,max:10,min:-10,ticks:5,value:t,onCalciteSliderInput:this._handleBrightnessChange}))),H("div",{class:f.imageEnhancementToolContainer},H("calcite-label",null,this.messages.contrast,H("calcite-slider",{bind:this,labelTicks:!0,max:10,min:-10,ticks:5,value:i,onCalciteSliderInput:this._handleContrastChange}))),H("div",{class:f.imageEnhancementToolContainer},H("calcite-label",null,this.messages.sharpness,H("calcite-slider",{bind:this,labelTicks:!0,max:1,min:0,step:.1,ticks:.5,value:a,onCalciteSliderInput:this._handleSharpnessChange})))),H("calcite-action",{bind:this,icon:"reset",onclick:this._resetImageTools,slot:"header-actions-end",text:this.messagesCommon.reset})):null}_imageEnhancementsToggle(){const{state:e,mode:t}=this.viewModel,{imageEnhancement:i}=this.visibleElements;return i?H("calcite-action",{active:this.imageEnhancementToolActive,...this._commonActionProperties,disabled:"default"!==t||"image-loaded"!==e,icon:"sliders-horizontal",onclick:this._toggleImageEnhancementToolState,text:this.messages.imageEnhancement}):null}get _imageGalleryPanel(){const{container:e,galleryOpened:t,imageGalleryEnabled:i}=this;return i&&t&&e?this._imageGalleryContext:null}get _imageGalleryContext(){const{galleryOpened:e,invalidCameraHeading:t}=this;return H("calcite-panel",{bind:this,class:f.carousel,closable:!0,closed:!e,disabled:t,heading:this.messages.imageGallery,key:this.messages.imageGallery,onCalcitePanelClose:this._toggleImageGallery},H("div",{class:f.carouselContainer},this._renderThumbnails))}_imageGalleryToggle(){const{imageGalleryEnabled:e,invalidCameraHeading:t,visibleElements:{imageGallery:i}}=this;return i?H("calcite-action",{active:this.galleryOpened,...this._commonActionProperties,disabled:!e||t,icon:"images",onclick:this._toggleImageGallery,text:this.messages.imageGallery}):null}get _imageOverlaysComponent(){const{_imageOverlayMessages:e,_imageOverlaysLoaderTask:t,_overlayedLayers:a,dataCaptureEnabled:s,dataCaptureLayer:o,imageOverlaysOpened:r,showCameraLocations:n,showMapFeatures:l,view:c,layer:d}=this;if(!d)return null;const g=d.imageGeometryField?.length?d.imageGeometryField:y,m=d.imageReferenceField?.length?d.imageReferenceField:_;t||(this._imageOverlaysLoaderTask=i((async()=>(await import("./OrientedImageryViewer/components/ImageOverlays.js")).default)));const h=this._imageOverlaysLoaderTask?.value;return h?H(h,{closed:!r,dataCaptureEnabled:s,dataCaptureLayer:o,imageGeometryField:g,imageReferenceField:m,messages:e,overlayedLayers:a,showCameraLocations:n,showMapFeatures:l,view:c,onDataCaptureLayerChanged:this._handleDataCaptureLayerChange,onImageOverlaysClosed:this._onImageOverlayClosed,onLayerDeselected:this._handleOverlayLayerDeselect,onLayerSelected:this._handleOverlayLayerSelect,onShowCameraLocationsChanged:this._onShowCameraLocationsChanged,onShowMapFeaturesChanged:this._onShowMapFeaturesChanged}):null}get _imageOverlayMessages(){return{...this.messages,...this.messagesSketch}}get _imageSketchToolsMessages(){return{...this.messagesSketch,...this.messagesCommon}}_imageOverlaysPanel(){const{imageOverlaysOpened:e,viewModel:{state:t}}=this,i=this.classes({[f.imageOverlaysContainer]:!0,[j.hidden]:!e||"image-loaded"!==t});return H("div",{class:i,key:this.messages.imageOverlays},this._imageOverlaysComponent)}_imageOverlaysToggle(){const{viewModel:{state:e},imageOverlaysOpened:t,invalidCameraHeading:i,visibleElements:{imageOverlays:a}}=this;return a?H("calcite-action",{active:t,...this._commonActionProperties,disabled:"image-loaded"!==e||i,icon:"layers",onclick:this._toggleImageOverlays,text:this.messages.imageOverlays}):null}get _imageViewer(){const{displayMessage:e,loadImageViewer:t,mode:i}=this.viewModel,a=null!=e||"default"!==i,s=this.classes({[f.viewer]:!a,[f.viewerHidden]:a});return H("calcite-panel",{afterCreate:t,bind:this,class:s},this._renderSketch())}get _locationToggle(){const{viewModel:{state:e,groundCoordinates:t},imageLocationToolActive:i,messages:{groundLocation:a}}=this;if("image-loaded"===e&&t&&i)return H("calcite-dialog",{bind:this,dragEnabled:!0,escapeDisabled:!0,heading:a,id:a,open:!0,placement:"bottom-start",resizable:!0,scale:"s",slot:"dialogs",width:"s",onCalciteDialogBeforeClose:this._clearImageLocation},H(x,{groundCoordinates:t,messages:this.messages}))}_mapImageConversionToggle(){const{mapImageConversionToolState:e,viewModel:{state:t},invalidCameraHeading:i,visibleElements:{mapImageConversionTool:a}}=this;return a?H("calcite-action",{active:e,...this._commonActionProperties,disabled:"image-loaded"!==t||i,icon:"image-pin",onclick:this._toggleMapImageConversionToolState,text:this.messages.mapImageConversionTool}):null}_measurementToolsToggle(){const{_activeMeasurementIcon:e,measureType:t,viewModel:i,accuracyParametersMissing:a,messages:s,visibleElements:{measurementTools:o}}=this,{state:r}=i,{measurementTools:n,groundDistance:l,groundArea:c,heightAboveGround:d,groundLocation:g}=s;return o?H("calcite-dropdown",{disabled:a,key:"measurement-tools",width:"m"},H("calcite-action",{...this._commonActionProperties,icon:e,slot:"trigger",text:n}),H("calcite-dropdown-group",null,H("calcite-dropdown-item",{bind:this,disabled:"image-loaded"!==r,iconStart:"measure-line",key:"distance-measurement",onclick:e=>this._toggleMeasurementSketch(e,"distance"),selected:"distance"===t},l),H("calcite-dropdown-item",{bind:this,disabled:"image-loaded"!==r,iconStart:"measure-area",key:"area-measurement",onclick:e=>this._toggleMeasurementSketch(e,"area"),selected:"area"===t},c),H("calcite-dropdown-item",{bind:this,disabled:"image-loaded"!==r,iconStart:"measure-building-height-top-base",key:"height-dropdown",onclick:e=>this._toggleMeasurementSketch(e,"height"),selected:"height"===t},d),H("calcite-dropdown-item",{bind:this,disabled:"image-loaded"!==r,iconStart:"pin-tear",key:"surface-location",onclick:e=>this._toggleLocationTool(e),selected:this.imageLocationToolActive},g))):null}get _messageBox(){const{messages:e,viewModel:{displayMessage:t}}=this;if(!t)return null;const{data:i,key:a,map:s}=t,o=`${s?B(e[a],s):e[a]}`;return H("span",{class:f.messageBox},i?`${o} ${i}`:o)}_navigationToolToggle(){const{state:e}=this.viewModel,{visibleElements:{navigationTool:t}}=this;return t?H("calcite-action",{active:this.navigationToolActive,...this._commonActionProperties,disabled:"image-loaded"!==e||this.invalidCameraHeading,icon:"explore",onclick:this._toggleNavigationTool,text:this.messages.navigationTool}):null}_openPopupAction(){const{showPopupsAction:e}=this.visibleElements;return e?H("calcite-action",{...this._commonActionProperties,disabled:!this.popupEnabled,icon:"popup",onclick:this._toggleImageAttributes,text:this.messages.showPopups}):null}get _panoramicViewer(){const{displayMessage:e,loadPanoramicViewer:t,mode:i}=this.viewModel,a=null!=e||"panoramic"!==i,s=this.classes({[f.viewer]:!a,[f.viewerHidden]:a});return H("calcite-panel",{afterCreate:t,bind:this,class:s})}_closeAllImageTools(){this.imageEnhancementToolActive=!1,this.navigationToolActive=!1,this.imageOverlaysOpened=!1,this.galleryOpened=!1,this.measureType=null,this.imageLocationToolActive=!1}_handleBrightnessChange(e){this.viewModel.brightness=e.currentTarget.value??0}_handleContrastChange(e){this.viewModel.contrast=e.currentTarget.value??0}_handleSharpnessChange(e){this.viewModel.sharpness=e.currentTarget.value??0}_lazyLoadImage(e,t){e.forEach((async e=>{if(e.isIntersecting){const a=e.target,s=a.getAttribute("data-src"),n=a.getAttribute("data-rotation"),l=a.getAttribute("data-objectid"),c=n?parseFloat(n)%360:0,{layer:d,_galleryController:{signal:g}}=this;if(!s||!l)return;let m;try{m=O(s)?await F(d,l,{signal:g}):await S(s,{signal:g})}catch(i){r(i)||o.getLogger("esri.widgets.OrientedImageryViewer").error("#lazyLoadImage()",i)}finally{t.unobserve(a)}if(!m)return;E(m,a,c)}}))}_loadImageFromGallery(e){const{target:t}=e;if(!t)return;const i=t.getAttribute("data-objectid");i&&this.viewModel.currentBestFeature?.attributes.objectId!==Number(i)&&this.viewModel.selectBestFeature(i)}_loadImageMeasurementResources(){this._imageMeasurementToolsLoaderTask=i((async()=>{const{default:e}=await import("./OrientedImageryViewer/components/ImageMeasurementWidget.js");return e}))}_loadSketchResources(){this._sketchLoaderTask=i((async()=>(await import("./OrientedImageryViewer/components/SketchTools.js")).default))}_onAdditionalCoverageVisibilityChange(e){this.viewModel.setAdditionalCoverageVisibility(e)}_onAdditionalCameraLocationsVisibility(e){this.viewModel.setAdditionalCameraLocationsVisibility(e)}_onCurrentCoverageVisibilityChange(e){this.viewModel.setCurrentCoverageVisibility(e)}_registerGalleryItem(e){this._galleryObserver.observe(e)}_renderWarning(e){const{invalidCameraHeading:t,viewModel:{state:i}}=this;return t&&"image-loaded"===i?[H("calcite-notice",{class:f.alert,closable:!0,icon:"exclamation-mark-triangle-f",iconFlipRtl:!0,kind:"warning",open:!0,scale:"s"},H("div",{afterCreate:e=>this._storeWarningTitleElement(e),slot:"title"},e))]:null}_renderWarningTooltip(e){const{_warningTitleElement:t}=this;if(e?.length&&t)return H("calcite-tooltip",{closeOnClick:!0,referenceElement:t},e)}get _renderNavigation(){const{viewModel:{sectorData:e,navigatorCurrentBestFeature:i,currentBestFeature:a,state:s}}=this;if(!this.container||!a)return null;let o,r,n,l,c;if(i){const{x:e,y:t,direction:a}=i,[s,d,g,m]=w[a];o=`M ${e} ${t} L ${s} ${d} A ${b[2]} ${b[2]} 0 0 1 ${g} ${m} Z`,r=e,l=t,n=w[a][4],c=w[a][5]}const d=e=>{const t=e.target.dataset?.sector;t&&this.viewModel.handleSectorClick(+t)},g=e=>{const t=e.target.dataset;if(!t)return;const{featureIndexInSector:i,sector:a}=t;i&&a&&this.viewModel.handleFeatureClick({sector:a,featureIndexInSector:+i})},m=e=>{e.removeEventListener("click",g)},h=a.attributes.objectId,p=e?.map((e=>e?.items)).filter(Boolean).flatMap((e=>e?.map((({x:e,y:t,objectID:i,featureIndexInSector:a,sector:s})=>H("circle",{afterRemoved:m,class:this.classes(f.feature,{selected:h===i}),cx:e,cy:t,"data-feature-index-in-sector":a,"data-sector":s,key:`${f.feature}-${i}`,onclick:g,r:C}))))),u=e=>{e.removeEventListener("click",d)},y=this.classes({[f.navigationWrapper]:!0,[f.navigationZoomed]:this._navigationToolExpanded});return this.navigationToolActive&&"image-loaded"===s?H("div",{bind:this,class:y,key:this.messages.navigationTool},H("svg",{afterCreate:e=>this._storeNavigationToolReference(e),class:t()?I:f.rotateWithAnimation,focusable:"false",height:M,role:"img",width:M,xmlns:"http://www.w3.org/2000/svg"},H("defs",null,H("linearGradient",{gradientUnits:"userSpaceOnUse",id:`${this.id}-coverage-fill`,x1:r,x2:n,y1:l,y2:c},H("stop",{class:f.navigationPathOffset0,offset:0}),H("stop",{class:f.navigationPathOffset1,offset:1}))),H("g",null,H("circle",{class:this.classes(f.sector,f.outerSector),cx:b[3],cy:b[3],onclick:this._scaleNavigationTool,r:b[3]}),H("circle",{class:f.sector,cx:b[3],cy:b[3],r:b[2]}),H("circle",{class:f.sector,cx:b[3],cy:b[3],r:b[1]}),H("circle",{class:f.sector,cx:b[3],cy:b[3],r:b[0]}),H("path",{class:f.pointer,d:"M 56.5 6.06217782649107 L 60 0 L 63.5 6.06217782649107 Z",key:`${f.pointer}-west`}),H("path",{class:this.classes(f.pointer,f.north),d:"M 113.93782217350893 56.5 L 120 60 L 113.93782217350893 63.5 Z",key:`${f.pointer}-north`}),H("path",{class:f.pointer,d:"M 56.5 113.93782217350893 L 60 120 L 63.5 113.93782217350893 Z",key:`${f.pointer}-east`}),H("path",{class:f.pointer,d:"M 6.06217782649107 56.5 L 0 60 L 6.06217782649107 63.5 Z",key:`${f.pointer}-south`}),H("path",{class:this.classes(f.sector,f.sectorSeparator),d:"M 23.937554159486076 23.937554159486076 L 96.06244584051393 96.06244584051393 M 23.937554159486076 96.06244584051393 L 96.06244584051393 23.937554159486076",key:f.sectorSeparator}),v([b[2],b[1],b[0]],b[3],b[3]).map(((t,i)=>H("path",{afterRemoved:u,class:this.classes(f.sector,e?.[i]?.length?f.sectorEnabled:f.sectorDisabled),d:t,"data-sector":`${i}`,key:`${f.sector}-${i}`,onclick:d}))),H("path",{class:this.classes(f.sector,f.sectorCross),d:"M 56.4 56.4 L 63.53 63.53 M 63.53 56.4 L 56.4 63.53",key:f.sectorCross}),p,a.attributes.cameraPitch>=5&&o?H("path",{class:f.selectedFeaturePath,d:o,fill:`url(#${this.id}-coverage-fill)`,key:f.selectedFeaturePath}):null))):null}_renderSketch(){const{dataCaptureLayer:e,imageOverlaysOpened:t}=this;if(!e||t)return null;if(this._sketchLoaderTask||this._loadSketchResources(),!this._sketchLoaderTask?.value)return null;const{geometryType:i}=e,a="point"===i?"pin":"polyline"===i?"line":"polygon",s=this._sketchLoaderTask.value;return H("div",{class:f.sketchTools},H(s,{icon:a,messages:this._imageSketchToolsMessages,type:i,onAction:this._onAction}))}get _renderThumbnails(){const{currentBestFeature:e,thumbnails:t}=this.viewModel;return e?H("div",{class:f.carouselContent},t?.items.map((({url:t,objectId:i,rotation:a},s)=>H("div",{class:`${f.carouselItemWrapper}${e.attributes.objectId===i?"--selected":""}`,key:`${f.carouselItemWrapper}-${s}`},H("canvas",{afterCreate:this._registerGalleryItem,afterRemoved:this._unregisterGalleryItem,alt:`thumbnail-${i}`,class:f.carouselItem,"data-objectid":`${i}`,"data-rotation":`${a}`,"data-src":t,onclick:this._loadImageFromGallery,onmouseenter:this._highlight,onmouseleave:this._removeHighlight}))))):null}_resetImageTools(){this.viewModel.sharpness=this.viewModel.brightness=this.viewModel.contrast=0}_storeActionElement(e){this._actionItems.set(e.text,e)}_storeNavigationToolReference(e){this._navigationTool=e}_storeWarningTitleElement(e){this._warningTitleElement=e}_toggleAdditionalCameraLocations(){this.isAdditionalPointSourcesVisible=!this.isAdditionalPointSourcesVisible}_toggleAdditionalCoverage(){this.isAdditionalCoverageVisible=!this.isAdditionalCoverageVisible}_toggleCurrentCoverage(){this.currentCoverageVisible=!this.currentCoverageVisible}_toggleImageEnhancementToolState(e){e.stopPropagation();const t=this.imageEnhancementToolActive;this._closeAllImageTools(),this.imageEnhancementToolActive=!t}_toggleImageOverlays(e){e.stopPropagation();const t=this.imageOverlaysOpened;this._closeAllImageTools(),this.imageOverlaysOpened=!t}_toggleImageGallery(e){e.stopPropagation();const t=this.galleryOpened;this._closeAllImageTools(),this.galleryOpened=!!this.imageGalleryEnabled&&!t}_toggleLocationTool(e){const t=this.imageLocationToolActive;this._closeAllImageTools(),this.imageLocationToolActive=!t,e.stopPropagation()}_toggleMeasurementSketch(e,t){e.stopPropagation();const i=this.measureType;this._closeAllImageTools(),this.measureType=i===t?null:t,this.measureType===t&&(this.viewModel.displayNewMeasurementButton=!0)}_toggleNavigationTool(){const e=this.navigationToolActive;this._closeAllImageTools(),this.navigationToolActive=!e}_toggleMapImageConversionToolState(){this.mapImageConversionToolState=!this.mapImageConversionToolState}_unregisterGalleryItem(e){this._galleryObserver.unobserve(e)}_updateNavigationTool(e){const{previousFeatureAngle:t,bestFeatureAngle:i}=this.viewModel,a=(i-t+540)%360-180;e.style.setProperty(L,`${t}deg`),e.style.setProperty(A,`${t+a}deg`)}async loadBestImage(e){return this.viewModel.loadBestImage(e)}loadImageFromSource(e,t){return this.viewModel.loadImageFromSource(e,t)}async overlayMapFeatures(e,t){return this.removeHandles(`${R.overlayed}-${e.id}`),this.addHandles(l((()=>e.visible),(()=>{this.viewModel.toggleOverlayMapFeatures(e.id,e.visible)})),`${R.overlayed}-${e.id}`),this._overlayedLayers.add(e),this.viewModel.overlayMapFeatures(e,t&&this.showMapFeatures)}async plotMapPoint(e){return this.viewModel.plotMapPoint(e)}plotReferencePointOnGround(e){this.viewModel.plotReferencePointOnGround(e)}plotReferencePointOnImage(e){this.viewModel.plotReferencePointOnImage(e)}removeOverlayedGraphicsOnImage(e){this.removeHandles(`${R.overlayed}-${e}`),this._overlayedLayers.remove(this._overlayedLayers.find((t=>t.id===e))),this.viewModel.removeOverlayedGraphicsOnImage(e)}resetImage(){this.viewModel.resetImage()}render(){return H("div",{class:this.classes(j.widget,k)},this._renderRoot())}async startDataCapture(e){return this.viewModel.startDataCapture(e)}async stopDataCapture(e){return this.viewModel.stopDataCapture(e)}updateSuitabilities(e){this.viewModel.updateSuitabilities(e)}};e([m({readOnly:!0})],W.prototype,"accuracyParametersMissing",null),e([m()],W.prototype,"activeLayer",null),e([m()],W.prototype,"currentBestFeature",null),e([m()],W.prototype,"currentCoverageVisible",null),e([m()],W.prototype,"dataCaptureEnabled",void 0),e([m()],W.prototype,"dataCaptureLayer",null),e([m()],W.prototype,"disabled",null),e([m()],W.prototype,"features",null),e([m()],W.prototype,"imagePointsInView",null),e([m()],W.prototype,"galleryOpened",void 0),e([m()],W.prototype,"icon",null),e([m()],W.prototype,"imageEnhancementToolActive",void 0),e([m({readOnly:!0})],W.prototype,"imageGalleryEnabled",null),e([m()],W.prototype,"imageLocationToolActive",null),e([m()],W.prototype,"imageOverlaysOpened",void 0),e([m({readOnly:!0})],W.prototype,"invalidCameraHeading",null),e([m()],W.prototype,"isAdditionalCoverageVisible",null),e([m()],W.prototype,"isAdditionalPointSourcesVisible",null),e([m()],W.prototype,"mapImageConversionToolState",null),e([m()],W.prototype,"measureType",null),e([m()],W.prototype,"layer",null),e([m()],W.prototype,"navigationToolActive",void 0),e([D(T()),m({type:V})],W.prototype,"viewModel",void 0),e([m(),$("esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer")],W.prototype,"messages",void 0),e([m(),$("esri/core/t9n/Units")],W.prototype,"measurementUnitMessages",void 0),e([m(),$("esri/t9n/common")],W.prototype,"messagesCommon",void 0),e([m(),$("esri/widgets/Sketch/t9n/Sketch")],W.prototype,"messagesSketch",void 0),e([m()],W.prototype,"pixelMeasurementUnit",void 0),e([m()],W.prototype,"pixelAreaMeasurementUnit",void 0),e([m({readOnly:!0})],W.prototype,"popupEnabled",null),e([m()],W.prototype,"referencePoint",null),e([m()],W.prototype,"showCameraLocations",void 0),e([m()],W.prototype,"showMapFeatures",void 0),e([D(["create","delete","redo","undo","update"]),m({readOnly:!0})],W.prototype,"sketchViewModel",null),e([m()],W.prototype,"view",null),e([m({type:P,nonNullable:!0})],W.prototype,"visibleElements",void 0),e([m()],W.prototype,"determineWorkflowForFeature",null),e([m()],W.prototype,"updateFootprint",null),e([m()],W.prototype,"_actionItems",void 0),e([m()],W.prototype,"_activeMeasurementIcon",null),e([m()],W.prototype,"_activeMeasurementHeading",null),e([m()],W.prototype,"_imageOverlaysLoaderTask",void 0),e([m()],W.prototype,"_imageMeasurementToolsLoaderTask",void 0),e([m()],W.prototype,"_measurementToggle",null),e([m()],W.prototype,"_commonActionProperties",null),e([m()],W.prototype,"_imageEnhancementTools",null),e([m()],W.prototype,"_imageGalleryPanel",null),e([m()],W.prototype,"_imageGalleryContext",null),e([m()],W.prototype,"_imageOverlaysComponent",null),e([m()],W.prototype,"_imageOverlayMessages",null),e([m()],W.prototype,"_imageSketchToolsMessages",null),e([m()],W.prototype,"_imageViewer",null),e([m()],W.prototype,"_locationToggle",null),e([m()],W.prototype,"_messageBox",null),e([m()],W.prototype,"_navigationToolExpanded",void 0),e([m()],W.prototype,"_navigationTool",void 0),e([m()],W.prototype,"_panoramicViewer",null),e([m()],W.prototype,"_warningTitleElement",void 0),e([m()],W.prototype,"_renderNavigation",null),e([m()],W.prototype,"_renderThumbnails",null),e([m()],W.prototype,"_sketchLoaderTask",void 0),W=e([h("esri.widgets.OrientedImageryViewer")],W);const U=W;export{U as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{prefersReducedMotion as t}from"../core/a11yUtils.js";import{createTask as i}from"../core/asyncUtils.js";import a from"../core/Collection.js";import{deprecatedProperty as s}from"../core/deprecate.js";import o from"../core/Logger.js";import{isAbortError as r}from"../core/promiseUtils.js";import n from"../core/ReactiveMap.js";import{watch as l,initial as c,syncAndInitial as d,whenOnce as g}from"../core/reactiveUtils.js";import{property as m}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as h}from"../core/accessorSupport/decorators/subclass.js";import{or as p}from"../layers/orientedImagery/transformations/utils.js";import u from"./Widget.js";import{getAllArcPath as v}from"./OrientedImageryViewer/arcUtils.js";import{defaultImageGeometryField as y,defaultOIObjectIDField as _,segmentArcs as w,sectorsRadii as b,featureCircleRadius as C,navigationToolDimensionLength as M,getDelegatedEvents as T}from"./OrientedImageryViewer/constants.js";import{css as f,navigation as I,navigationToolRotationFrom as L,navigationToolRotationTo as A,root as k}from"./OrientedImageryViewer/css.js";import{isFeatureAttachment as O,loadImageForAttachment as F,getThumbnailPixelBlock as S,renderImageWithRotation as E}from"./OrientedImageryViewer/galleryUtils.js";import V from"./OrientedImageryViewer/OrientedImageryViewerViewModel.js";import P from"./OrientedImageryViewer/OrientedImageryViewerVisibleElements.js";import x from"./OrientedImageryViewer/components/ImageLocationWidget.js";import{loadCalciteComponents as G}from"./support/componentsUtils.js";import{globalCss as j}from"./support/globalCss.js";import"./support/widgetUtils.js";import{messageBundle as $}from"./support/decorators/messageBundle.js";import{vmEvent as D}from"./support/decorators/vmEvent.js";import{tsx as H}from"./support/jsxFactory.js";import{substitute as B}from"../intl/substitute.js";const R={overlayMapFeatures:"overlay-map-features",overlayed:"overlayed",overlaysActionHandles:"overlays-action-handles"};let W=class extends u{constructor(e,t){super(e,t),this.dataCaptureEnabled=!1,this.galleryOpened=!1,this.imageEnhancementToolActive=!1,this.imageOverlaysOpened=!1,this.navigationToolActive=!1,this.viewModel=new V,this.messagesCommon=null,this.messagesSketch=null,this.pixelMeasurementUnit="meters",this.pixelAreaMeasurementUnit="square-meters",this.showCameraLocations=!1,this.showMapFeatures=!1,this.visibleElements=new P,this._actionItems=new n,this._imageOverlaysLoaderTask=null,this._imageMeasurementToolsLoaderTask=null,this._clearMeasurements=()=>{this.viewModel.measureType=null,this.viewModel.clearPreviousMeasurements()},this._clearImageLocation=()=>{this.imageLocationToolActive=!1},this._navigationToolExpanded=!1,this._navigationTool=null,this._warningTitleElement=null,this._galleryController=new AbortController,this._galleryObserver=new IntersectionObserver(this._lazyLoadImage.bind(this)),this._overlayedLayers=new a,this._previousAction=null,this._handleDataCaptureLayerChange=async e=>{if(this.dataCaptureLayer&&await this.stopDataCapture(!0),this.dataCaptureLayer=this.dataCaptureLayer===e?null:e,this.dataCaptureLayer)return this.startDataCapture(this.dataCaptureLayer)},this._handleOverlayLayerDeselect=e=>{const t=e.layer;t===this.dataCaptureLayer&&(this.stopDataCapture(),this.dataCaptureLayer=null),this.removeOverlayedGraphicsOnImage(`${t.id}`)},this._handleOverlayLayerSelect=e=>{const t=e.layer;this.viewModel.overlayMapFeatures(t,this.showMapFeatures),this.addHandles(l((()=>t.visible),(()=>{this.viewModel.toggleOverlayMapFeatures(t.id,t.visible)})),`${R.overlayed}-${t.id}`)},this._highlight=e=>{const t=e.target?.dataset.objectid;t&&this.viewModel.highlight(t)},this._onAction=e=>{const{target:t}=e,{dataset:{action:i}}=t,{_previousAction:a}=this,s=a?.dataset.action,o=s?.includes("draw")??!1,r="select-feature"===s,n=s!==i;switch(i){case"draw-point":case"draw-polygon":case"draw-polyline":{a&&p(r,o&&n)&&(a.active=!1),t.active=!t.active;const e=i.replace("draw-","");this.viewModel.digitizeCreate(e),this._previousAction=t.active?t:null;break}case"save":this.viewModel.saveDrawing();break;case"select-feature":o&&(this._previousAction.active=!1),t.active=!t.active,this.viewModel.toggleSelection(t.active),this._previousAction=t.active?t:null;break;case"delete-feature":this.viewModel.digitizeDelete()}},this._onImageOverlayClosed=()=>{this.imageOverlaysOpened=!1},this._onShowCameraLocationsChanged=e=>{this.showCameraLocations=e},this._onShowMapFeaturesChanged=e=>{this.showMapFeatures=e},this._removeActionElement=e=>{this._actionItems.delete(e.text)},this._removeHighlight=()=>this.viewModel.removeHighlight(),this._restoreOverlays=async()=>Promise.all(this._overlayedLayers.map((e=>this.viewModel.overlayMapFeatures(e,this.showMapFeatures)))),this._scaleNavigationTool=()=>{this._navigationToolExpanded=!this._navigationToolExpanded},this._sketchLoaderTask=null,this._toggleImageAttributes=()=>{this.viewModel.toggleImageAttributes()},this._loadImageFromGallery=this._loadImageFromGallery.bind(this),this._registerGalleryItem=this._registerGalleryItem.bind(this),this._unregisterGalleryItem=this._unregisterGalleryItem.bind(this),this.loadImageFromSource=this.loadImageFromSource.bind(this),this.updateSuitabilities=this.updateSuitabilities.bind(this)}initialize(){this.addHandles([l((()=>[this.viewModel?.bestFeatureAngle,this._navigationTool]),(([e,t])=>{t&&this._updateNavigationTool(t)}),c),l((()=>this.currentCoverageVisible),(e=>this._onCurrentCoverageVisibilityChange(e))),l((()=>this.isAdditionalCoverageVisible),(e=>this._onAdditionalCoverageVisibilityChange(e))),l((()=>this.isAdditionalPointSourcesVisible),(e=>this._onAdditionalCameraLocationsVisibility(e))),l((()=>({features:this.currentBestFeature,showCameraLocations:this.showCameraLocations,state:this.viewModel.state})),(({showCameraLocations:e,state:t})=>{"image-loaded"===t&&this.viewModel.overlayCameraLocations(e)}),d),l((()=>({feature:this.currentBestFeature,showMapFeatures:this.showMapFeatures,state:this.viewModel.state})),(async(e,t)=>{if(e.showMapFeatures!==t?.showMapFeatures&&this.viewModel.toggleAllOverlayMapFeatures(e.showMapFeatures),null!=e.feature&&e.feature!==t?.feature){if(this.viewModel.removeAllOverlayMapFeatures(),await g((()=>"image-loaded"===this.viewModel.state)),this.dataCaptureLayer&&this.stopDataCapture(),await this._restoreOverlays(),!this.dataCaptureLayer)return;await this.startDataCapture(this.dataCaptureLayer),this._previousAction?.active&&(this._previousAction.active=!1,this._previousAction=null)}}),c)])}loadDependencies(){return G({"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),action:()=>import("@esri/calcite-components/dist/components/calcite-action"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),shell:()=>import("@esri/calcite-components/dist/components/calcite-shell"),dialog:()=>import("@esri/calcite-components/dist/components/calcite-dialog"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),slider:()=>import("@esri/calcite-components/dist/components/calcite-slider"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")})}destroy(){this._galleryController.abort(),this._galleryObserver.disconnect()}get accuracyParametersMissing(){return this.viewModel.accuracyParametersMissing}get activeLayer(){return s(o.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer}set activeLayer(e){s(o.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer=e}get currentBestFeature(){return this.viewModel.currentBestFeature}set currentBestFeature(e){this.viewModel.currentBestFeature=e}get currentCoverageVisible(){return this.viewModel.currentCoverageVisible}set currentCoverageVisible(e){this.viewModel.currentCoverageVisible=e}get dataCaptureLayer(){return this.viewModel.dataCaptureLayer}set dataCaptureLayer(e){this.viewModel.dataCaptureLayer=e}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get displayMessage(){return this.viewModel.displayMessage}get features(){return this.viewModel.features}get imagePointsInView(){return this.viewModel.imagePointsInView}get icon(){return"oriented-imagery-widget"}set icon(e){this._overrideIfSome("icon",e)}get imageGalleryEnabled(){return this.viewModel.imageGalleryEnabled}get imageLocationToolActive(){return this.viewModel.imageLocationToolState}set imageLocationToolActive(e){this.viewModel.imageLocationToolState=e}get invalidCameraHeading(){return this.viewModel.invalidCameraHeading}get isAdditionalCoverageVisible(){return this.viewModel.isAdditionalCoverageVisible}set isAdditionalCoverageVisible(e){this.viewModel.isAdditionalCoverageVisible=e}get isAdditionalPointSourcesVisible(){return this.viewModel.isAdditionalPointSourcesVisible}set isAdditionalPointSourcesVisible(e){this.viewModel.isAdditionalPointSourcesVisible=e}get mapImageConversionToolState(){return this.viewModel.mapImageConversionToolState}set mapImageConversionToolState(e){this.viewModel.mapImageConversionToolState=e}get measureType(){return this.viewModel.measureType}set measureType(e){this.viewModel.measureType=e}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get popupEnabled(){const{popupEnabled:e,state:t}=this.viewModel;return"image-loaded"===t&&e}get referencePoint(){return this.viewModel.referencePoint??null}get sketchViewModel(){return this.viewModel.sketch}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}set determineWorkflowForFeature(e){this.viewModel.determineWorkflowForFeature=e}get determineWorkflowForFeature(){return this.viewModel.determineWorkflowForFeature}set updateFootprint(e){this.viewModel.updateFootprint=e}get updateFootprint(){return this.viewModel.updateFootprint}_renderActionBar(){return H("calcite-action-bar",{expandDisabled:!0,layout:"horizontal",slot:"action-bar"},H("calcite-action-group",null,this._currentFootprintToggle(),this._additionalFootprintToggle(),this._additionalPointSourcesToggle()),H("calcite-action-group",null,this._mapImageConversionToggle(),this._navigationToolToggle(),this._imageEnhancementsToggle()),H("calcite-action-group",null,this._measurementToolsToggle(),this._imageGalleryToggle(),this._imageOverlaysToggle(),this._openPopupAction()),this._actionTooltips())}_actionTooltips(){return[...this._actionItems].map((([e,t])=>H("calcite-tooltip",{closeOnClick:!0,key:e,placement:"bottom",referenceElement:t},H("span",null,e))))}get _activeMeasurementIcon(){const{measureType:e,imageLocationToolActive:t}=this;if(t)return"pin-tear";switch(e){case"area":return"measure-area";case"height":return"measure-building-height-top-base";default:return"measure-line"}}get _activeMeasurementHeading(){const{measureType:e,messages:t}=this,{groundArea:i,heightAboveGround:a,groundDistance:s}=t;switch(e){case"area":return i;case"height":return a;default:return s}}_additionalFootprintToggle(){const{isAdditionalCoverageVisible:e,invalidCameraHeading:t,visibleElements:{additionalFootprintToggle:i}}=this;return i?H("calcite-action",{active:e,...this._commonActionProperties,class:f.addCoverage,disabled:t,icon:"trapezoid-area",onclick:this._toggleAdditionalCoverage,text:this.messages.additionalFootprints}):null}_additionalPointSourcesToggle(){const{isAdditionalPointSourcesVisible:e,invalidCameraHeading:t,visibleElements:{additionalCameraLocationsToggle:i}}=this;return i?H("calcite-action",{active:e,...this._commonActionProperties,class:f.addExpPoints,disabled:t,icon:"circle-area",onclick:this._toggleAdditionalCameraLocations,text:this.messages.additionalCameraLocations}):null}get _measurementToggle(){const{viewModel:{state:e,measureType:t},id:i}=this;if("image-loaded"!==e||!t)return;this._imageMeasurementToolsLoaderTask||this._loadImageMeasurementResources();const a=this._imageMeasurementToolsLoaderTask?.value;return a?H("calcite-dialog",{bind:this,dragEnabled:!0,escapeDisabled:!0,heading:this._activeMeasurementHeading,id:`${i}-${t}-measurement`,open:!0,placement:"bottom-start",resizable:!0,scale:"s",slot:"dialogs",width:"s",onCalciteDialogBeforeClose:this._clearMeasurements},H(a,{measurementType:t,measurementUnitMessages:this.measurementUnitMessages,messages:this.messages,oiViewModel:this.viewModel})):null}get _commonActionProperties(){return{afterCreate:this._storeActionElement,afterRemoved:this._removeActionElement,afterUpdate:this._storeActionElement,bind:this}}_renderRoot(){const{viewModel:{state:e}}=this;return H("calcite-panel",null,H("calcite-shell",null,H("calcite-panel",{bind:this,class:f.viewerContainer,heading:this.visibleElements.title?this.messages.title:void 0,loading:e.includes("loading")},this.visibleElements.menu?this._renderActionBar():null,this._imageViewer,this._panoramicViewer,this._messageBox,this.invalidCameraHeading?[this._renderWarning(this.messages.invalidCameraHeadingWarningTitle),this._renderWarningTooltip(this.messages.invalidCameraHeadingWarningDescription)]:[this._imageGalleryPanel,this._renderNavigation,this._imageOverlaysPanel()],this._imageEnhancementTools,this._renderSketch()),this._measurementToggle,this._locationToggle))}_currentFootprintToggle(){const{currentCoverageVisible:e,invalidCameraHeading:t}=this,{currentFootprintToggle:i}=this.visibleElements;return i?H("calcite-action",{active:e,...this._commonActionProperties,class:f.currentCoverage,disabled:t,icon:"trapezoid-area",onclick:this._toggleCurrentCoverage,text:this.messages.currentFootprint}):null}get _imageEnhancementTools(){const{imageEnhancementToolActive:e,viewModel:{brightness:t,contrast:i,sharpness:a,state:s}}=this;return e&&"image-loaded"===s?H("calcite-panel",{bind:this,class:f.imageEnhancementWrapper,closable:!0,closed:!e,heading:this.messages.imageEnhancement,key:this.messages.imageEnhancement,onCalcitePanelClose:this._toggleImageEnhancementToolState},H("div",{class:f.imageEnhancementTools},H("div",{class:f.imageEnhancementToolContainer},H("calcite-label",null,this.messages.brightness,H("calcite-slider",{bind:this,labelTicks:!0,max:10,min:-10,ticks:5,value:t,onCalciteSliderInput:this._handleBrightnessChange}))),H("div",{class:f.imageEnhancementToolContainer},H("calcite-label",null,this.messages.contrast,H("calcite-slider",{bind:this,labelTicks:!0,max:10,min:-10,ticks:5,value:i,onCalciteSliderInput:this._handleContrastChange}))),H("div",{class:f.imageEnhancementToolContainer},H("calcite-label",null,this.messages.sharpness,H("calcite-slider",{bind:this,labelTicks:!0,max:1,min:0,step:.1,ticks:.5,value:a,onCalciteSliderInput:this._handleSharpnessChange})))),H("calcite-action",{bind:this,icon:"reset",onclick:this._resetImageTools,slot:"header-actions-end",text:this.messagesCommon.reset})):null}_imageEnhancementsToggle(){const{state:e,mode:t}=this.viewModel,{imageEnhancement:i}=this.visibleElements;return i?H("calcite-action",{active:this.imageEnhancementToolActive,...this._commonActionProperties,disabled:"default"!==t||"image-loaded"!==e,icon:"sliders-horizontal",onclick:this._toggleImageEnhancementToolState,text:this.messages.imageEnhancement}):null}get _imageGalleryPanel(){const{container:e,galleryOpened:t,imageGalleryEnabled:i}=this;return i&&t&&e?this._imageGalleryContext:null}get _imageGalleryContext(){const{galleryOpened:e,invalidCameraHeading:t}=this;return H("calcite-panel",{bind:this,class:f.carousel,closable:!0,closed:!e,disabled:t,heading:this.messages.imageGallery,key:this.messages.imageGallery,onCalcitePanelClose:this._toggleImageGallery},H("div",{class:f.carouselContainer},this._renderThumbnails))}_imageGalleryToggle(){const{imageGalleryEnabled:e,invalidCameraHeading:t,visibleElements:{imageGallery:i}}=this;return i?H("calcite-action",{active:this.galleryOpened,...this._commonActionProperties,disabled:!e||t,icon:"images",onclick:this._toggleImageGallery,text:this.messages.imageGallery}):null}get _imageOverlaysComponent(){const{_imageOverlayMessages:e,_imageOverlaysLoaderTask:t,_overlayedLayers:a,dataCaptureEnabled:s,dataCaptureLayer:o,imageOverlaysOpened:r,showCameraLocations:n,showMapFeatures:l,view:c,layer:d}=this;if(!d)return null;const g=d.imageGeometryField?.length?d.imageGeometryField:y,m=d.imageReferenceField?.length?d.imageReferenceField:_;t||(this._imageOverlaysLoaderTask=i((async()=>(await import("./OrientedImageryViewer/components/ImageOverlays.js")).default)));const h=this._imageOverlaysLoaderTask?.value;return h?H(h,{closed:!r,dataCaptureEnabled:s,dataCaptureLayer:o,imageGeometryField:g,imageReferenceField:m,messages:e,overlayedLayers:a,showCameraLocations:n,showMapFeatures:l,view:c,onDataCaptureLayerChanged:this._handleDataCaptureLayerChange,onImageOverlaysClosed:this._onImageOverlayClosed,onLayerDeselected:this._handleOverlayLayerDeselect,onLayerSelected:this._handleOverlayLayerSelect,onShowCameraLocationsChanged:this._onShowCameraLocationsChanged,onShowMapFeaturesChanged:this._onShowMapFeaturesChanged}):null}get _imageOverlayMessages(){return{...this.messages,...this.messagesSketch}}get _imageSketchToolsMessages(){return{...this.messagesSketch,...this.messagesCommon}}_imageOverlaysPanel(){const{imageOverlaysOpened:e,viewModel:{state:t}}=this,i=this.classes({[f.imageOverlaysContainer]:!0,[j.hidden]:!e||"image-loaded"!==t});return H("div",{class:i,key:this.messages.imageOverlays},this._imageOverlaysComponent)}_imageOverlaysToggle(){const{viewModel:{state:e},imageOverlaysOpened:t,invalidCameraHeading:i,visibleElements:{imageOverlays:a}}=this;return a?H("calcite-action",{active:t,...this._commonActionProperties,disabled:"image-loaded"!==e||i,icon:"layers",onclick:this._toggleImageOverlays,text:this.messages.imageOverlays}):null}get _imageViewer(){const{displayMessage:e,loadImageViewer:t,mode:i}=this.viewModel,a=null!=e||"default"!==i,s=this.classes({[f.viewer]:!a,[f.viewerHidden]:a});return H("calcite-panel",{afterCreate:t,bind:this,class:s},this._renderSketch())}get _locationToggle(){const{viewModel:{state:e,groundCoordinates:t},imageLocationToolActive:i,messages:{groundLocation:a}}=this;if("image-loaded"===e&&t&&i)return H("calcite-dialog",{bind:this,dragEnabled:!0,escapeDisabled:!0,heading:a,id:a,open:!0,placement:"bottom-start",resizable:!0,scale:"s",slot:"dialogs",width:"s",onCalciteDialogBeforeClose:this._clearImageLocation},H(x,{groundCoordinates:t,messages:this.messages}))}_mapImageConversionToggle(){const{mapImageConversionToolState:e,viewModel:{state:t},invalidCameraHeading:i,visibleElements:{mapImageConversionTool:a}}=this;return a?H("calcite-action",{active:e,...this._commonActionProperties,disabled:"image-loaded"!==t||i,icon:"image-pin",onclick:this._toggleMapImageConversionToolState,text:this.messages.mapImageConversionTool}):null}_measurementToolsToggle(){const{_activeMeasurementIcon:e,measureType:t,viewModel:i,accuracyParametersMissing:a,messages:s,visibleElements:{measurementTools:o}}=this,{state:r}=i,{measurementTools:n,groundDistance:l,groundArea:c,heightAboveGround:d,groundLocation:g}=s;return o?H("calcite-dropdown",{disabled:a,key:"measurement-tools",width:"m"},H("calcite-action",{...this._commonActionProperties,icon:e,slot:"trigger",text:n}),H("calcite-dropdown-group",null,H("calcite-dropdown-item",{bind:this,disabled:"image-loaded"!==r,iconStart:"measure-line",key:"distance-measurement",onclick:e=>this._toggleMeasurementSketch(e,"distance"),selected:"distance"===t},l),H("calcite-dropdown-item",{bind:this,disabled:"image-loaded"!==r,iconStart:"measure-area",key:"area-measurement",onclick:e=>this._toggleMeasurementSketch(e,"area"),selected:"area"===t},c),H("calcite-dropdown-item",{bind:this,disabled:"image-loaded"!==r,iconStart:"measure-building-height-top-base",key:"height-dropdown",onclick:e=>this._toggleMeasurementSketch(e,"height"),selected:"height"===t},d),H("calcite-dropdown-item",{bind:this,disabled:"image-loaded"!==r,iconStart:"pin-tear",key:"surface-location",onclick:e=>this._toggleLocationTool(e),selected:this.imageLocationToolActive},g))):null}get _messageBox(){const{messages:e,viewModel:{displayMessage:t}}=this;if(!t)return null;const{data:i,key:a,map:s}=t,o=`${s?B(e[a],s):e[a]}`;return H("span",{class:f.messageBox},i?`${o} ${i}`:o)}_navigationToolToggle(){const{state:e}=this.viewModel,{visibleElements:{navigationTool:t}}=this;return t?H("calcite-action",{active:this.navigationToolActive,...this._commonActionProperties,disabled:"image-loaded"!==e||this.invalidCameraHeading,icon:"explore",onclick:this._toggleNavigationTool,text:this.messages.navigationTool}):null}_openPopupAction(){const{showPopupsAction:e}=this.visibleElements;return e?H("calcite-action",{...this._commonActionProperties,disabled:!this.popupEnabled,icon:"popup",onclick:this._toggleImageAttributes,text:this.messages.showPopups}):null}get _panoramicViewer(){const{displayMessage:e,loadPanoramicViewer:t,mode:i}=this.viewModel,a=null!=e||"panoramic"!==i,s=this.classes({[f.viewer]:!a,[f.viewerHidden]:a});return H("calcite-panel",{afterCreate:t,bind:this,class:s})}_closeAllImageTools(){this.imageEnhancementToolActive=!1,this.navigationToolActive=!1,this.imageOverlaysOpened=!1,this.galleryOpened=!1,this.measureType=null,this.imageLocationToolActive=!1}_handleBrightnessChange(e){this.viewModel.brightness=e.currentTarget.value??0}_handleContrastChange(e){this.viewModel.contrast=e.currentTarget.value??0}_handleSharpnessChange(e){this.viewModel.sharpness=e.currentTarget.value??0}_lazyLoadImage(e,t){e.forEach((async e=>{if(e.isIntersecting){const a=e.target,s=a.getAttribute("data-src"),n=a.getAttribute("data-rotation"),l=a.getAttribute("data-objectid"),c=n?parseFloat(n)%360:0,{layer:d,_galleryController:{signal:g}}=this;if(!s||!l)return;let m;try{m=O(s)?await F(d,l,{signal:g}):await S(s,{signal:g})}catch(i){r(i)||o.getLogger("esri.widgets.OrientedImageryViewer").error("#lazyLoadImage()",i)}finally{t.unobserve(a)}if(!m)return;E(m,a,c)}}))}_loadImageFromGallery(e){const{target:t}=e;if(!t)return;const i=t.getAttribute("data-objectid");i&&this.viewModel.currentBestFeature?.attributes.objectId!==Number(i)&&this.viewModel.selectBestFeature(i)}_loadImageMeasurementResources(){this._imageMeasurementToolsLoaderTask=i((async()=>{const{default:e}=await import("./OrientedImageryViewer/components/ImageMeasurementWidget.js");return e}))}_loadSketchResources(){this._sketchLoaderTask=i((async()=>(await import("./OrientedImageryViewer/components/SketchTools.js")).default))}_onAdditionalCoverageVisibilityChange(e){this.viewModel.setAdditionalCoverageVisibility(e)}_onAdditionalCameraLocationsVisibility(e){this.viewModel.setAdditionalCameraLocationsVisibility(e)}_onCurrentCoverageVisibilityChange(e){this.viewModel.setCurrentCoverageVisibility(e)}_registerGalleryItem(e){this._galleryObserver.observe(e)}_renderWarning(e){const{invalidCameraHeading:t,viewModel:{state:i}}=this;return t&&"image-loaded"===i?[H("calcite-notice",{class:f.alert,closable:!0,icon:"exclamation-mark-triangle-f",iconFlipRtl:!0,kind:"warning",open:!0,scale:"s"},H("div",{afterCreate:e=>this._storeWarningTitleElement(e),slot:"title"},e))]:null}_renderWarningTooltip(e){const{_warningTitleElement:t}=this;if(e?.length&&t)return H("calcite-tooltip",{closeOnClick:!0,referenceElement:t},e)}get _renderNavigation(){const{viewModel:{sectorData:e,navigatorCurrentBestFeature:i,currentBestFeature:a,state:s}}=this;if(!this.container||!a)return null;let o,r,n,l,c;if(i){const{x:e,y:t,direction:a}=i,[s,d,g,m]=w[a];o=`M ${e} ${t} L ${s} ${d} A ${b[2]} ${b[2]} 0 0 1 ${g} ${m} Z`,r=e,l=t,n=w[a][4],c=w[a][5]}const d=e=>{const t=e.target.dataset?.sector;t&&this.viewModel.handleSectorClick(+t)},g=e=>{const t=e.target.dataset;if(!t)return;const{featureIndexInSector:i,sector:a}=t;i&&a&&this.viewModel.handleFeatureClick({sector:a,featureIndexInSector:+i})},m=e=>{e.removeEventListener("click",g)},h=a.attributes.objectId,p=e?.map((e=>e?.items)).filter(Boolean).flatMap((e=>e?.map((({x:e,y:t,objectID:i,featureIndexInSector:a,sector:s})=>H("circle",{afterRemoved:m,class:this.classes(f.feature,{selected:h===i}),cx:e,cy:t,"data-feature-index-in-sector":a,"data-sector":s,key:`${f.feature}-${i}`,onclick:g,r:C}))))),u=e=>{e.removeEventListener("click",d)},y=this.classes({[f.navigationWrapper]:!0,[f.navigationZoomed]:this._navigationToolExpanded});return this.navigationToolActive&&"image-loaded"===s?H("div",{bind:this,class:y,key:this.messages.navigationTool},H("svg",{afterCreate:e=>this._storeNavigationToolReference(e),class:t()?I:f.rotateWithAnimation,focusable:"false",height:M,role:"img",width:M,xmlns:"http://www.w3.org/2000/svg"},H("defs",null,H("linearGradient",{gradientUnits:"userSpaceOnUse",id:`${this.id}-coverage-fill`,x1:r,x2:n,y1:l,y2:c},H("stop",{class:f.navigationPathOffset0,offset:0}),H("stop",{class:f.navigationPathOffset1,offset:1}))),H("g",null,H("circle",{class:this.classes(f.sector,f.outerSector),cx:b[3],cy:b[3],onclick:this._scaleNavigationTool,r:b[3]}),H("circle",{class:f.sector,cx:b[3],cy:b[3],r:b[2]}),H("circle",{class:f.sector,cx:b[3],cy:b[3],r:b[1]}),H("circle",{class:f.sector,cx:b[3],cy:b[3],r:b[0]}),H("path",{class:f.pointer,d:"M 56.5 6.06217782649107 L 60 0 L 63.5 6.06217782649107 Z",key:`${f.pointer}-west`}),H("path",{class:this.classes(f.pointer,f.north),d:"M 113.93782217350893 56.5 L 120 60 L 113.93782217350893 63.5 Z",key:`${f.pointer}-north`}),H("path",{class:f.pointer,d:"M 56.5 113.93782217350893 L 60 120 L 63.5 113.93782217350893 Z",key:`${f.pointer}-east`}),H("path",{class:f.pointer,d:"M 6.06217782649107 56.5 L 0 60 L 6.06217782649107 63.5 Z",key:`${f.pointer}-south`}),H("path",{class:this.classes(f.sector,f.sectorSeparator),d:"M 23.937554159486076 23.937554159486076 L 96.06244584051393 96.06244584051393 M 23.937554159486076 96.06244584051393 L 96.06244584051393 23.937554159486076",key:f.sectorSeparator}),v([b[2],b[1],b[0]],b[3],b[3]).map(((t,i)=>H("path",{afterRemoved:u,class:this.classes(f.sector,e?.[i]?.length?f.sectorEnabled:f.sectorDisabled),d:t,"data-sector":`${i}`,key:`${f.sector}-${i}`,onclick:d}))),H("path",{class:this.classes(f.sector,f.sectorCross),d:"M 56.4 56.4 L 63.53 63.53 M 63.53 56.4 L 56.4 63.53",key:f.sectorCross}),p,a.attributes.cameraPitch>=5&&o?H("path",{class:f.selectedFeaturePath,d:o,fill:`url(#${this.id}-coverage-fill)`,key:f.selectedFeaturePath}):null))):null}_renderSketch(){const{dataCaptureLayer:e,imageOverlaysOpened:t}=this;if(!e||t)return null;if(this._sketchLoaderTask||this._loadSketchResources(),!this._sketchLoaderTask?.value)return null;const{geometryType:i}=e,a="point"===i?"pin":"polyline"===i?"line":"polygon",s=this._sketchLoaderTask.value;return H("div",{class:f.sketchTools},H(s,{icon:a,messages:this._imageSketchToolsMessages,type:i,onAction:this._onAction}))}get _renderThumbnails(){const{currentBestFeature:e,thumbnails:t}=this.viewModel;return e?H("div",{class:f.carouselContent},t?.items.map((({url:t,objectId:i,rotation:a},s)=>H("div",{class:`${f.carouselItemWrapper}${e.attributes.objectId===i?"--selected":""}`,key:`${f.carouselItemWrapper}-${s}`},H("canvas",{afterCreate:this._registerGalleryItem,afterRemoved:this._unregisterGalleryItem,alt:`thumbnail-${i}`,class:f.carouselItem,"data-objectid":`${i}`,"data-rotation":`${a}`,"data-src":t,onclick:this._loadImageFromGallery,onmouseenter:this._highlight,onmouseleave:this._removeHighlight}))))):null}_resetImageTools(){this.viewModel.sharpness=this.viewModel.brightness=this.viewModel.contrast=0}_storeActionElement(e){this._actionItems.set(e.text,e)}_storeNavigationToolReference(e){this._navigationTool=e}_storeWarningTitleElement(e){this._warningTitleElement=e}_toggleAdditionalCameraLocations(){this.isAdditionalPointSourcesVisible=!this.isAdditionalPointSourcesVisible}_toggleAdditionalCoverage(){this.isAdditionalCoverageVisible=!this.isAdditionalCoverageVisible}_toggleCurrentCoverage(){this.currentCoverageVisible=!this.currentCoverageVisible}_toggleImageEnhancementToolState(e){e.stopPropagation();const t=this.imageEnhancementToolActive;this._closeAllImageTools(),this.imageEnhancementToolActive=!t}_toggleImageOverlays(e){e.stopPropagation();const t=this.imageOverlaysOpened;this._closeAllImageTools(),this.imageOverlaysOpened=!t}_toggleImageGallery(e){e.stopPropagation();const t=this.galleryOpened;this._closeAllImageTools(),this.galleryOpened=!!this.imageGalleryEnabled&&!t}_toggleLocationTool(e){const t=this.imageLocationToolActive;this._closeAllImageTools(),this.imageLocationToolActive=!t,e.stopPropagation()}_toggleMeasurementSketch(e,t){e.stopPropagation();const i=this.measureType;this._closeAllImageTools(),this.measureType=i===t?null:t,this.measureType===t&&(this.viewModel.displayNewMeasurementButton=!0)}_toggleNavigationTool(){const e=this.navigationToolActive;this._closeAllImageTools(),this.navigationToolActive=!e}_toggleMapImageConversionToolState(){this.mapImageConversionToolState=!this.mapImageConversionToolState}_unregisterGalleryItem(e){this._galleryObserver.unobserve(e)}_updateNavigationTool(e){const{previousFeatureAngle:t,bestFeatureAngle:i}=this.viewModel,a=(i-t+540)%360-180;e.style.setProperty(L,`${t}deg`),e.style.setProperty(A,`${t+a}deg`)}async loadBestImage(e){return this.viewModel.loadBestImage(e)}loadImageFromSource(e,t){return this.viewModel.loadImageFromSource(e,t)}async overlayMapFeatures(e,t){return this.removeHandles(`${R.overlayed}-${e.id}`),this.addHandles(l((()=>e.visible),(()=>{this.viewModel.toggleOverlayMapFeatures(e.id,e.visible)})),`${R.overlayed}-${e.id}`),this._overlayedLayers.add(e),this.viewModel.overlayMapFeatures(e,t&&this.showMapFeatures)}async plotMapPoint(e){return this.viewModel.plotMapPoint(e)}plotReferencePointOnGround(e){this.viewModel.plotReferencePointOnGround(e)}plotReferencePointOnImage(e){this.viewModel.plotReferencePointOnImage(e)}removeOverlayedGraphicsOnImage(e){this.removeHandles(`${R.overlayed}-${e}`),this._overlayedLayers.remove(this._overlayedLayers.find((t=>t.id===e))),this.viewModel.removeOverlayedGraphicsOnImage(e)}resetImage(){this.viewModel.resetImage()}render(){return H("div",{class:this.classes(j.widget,k)},this._renderRoot())}async startDataCapture(e){return this.viewModel.startDataCapture(e)}async stopDataCapture(e){return this.viewModel.stopDataCapture(e)}updateSuitabilities(e){this.viewModel.updateSuitabilities(e)}};e([m({readOnly:!0})],W.prototype,"accuracyParametersMissing",null),e([m()],W.prototype,"activeLayer",null),e([m()],W.prototype,"currentBestFeature",null),e([m()],W.prototype,"currentCoverageVisible",null),e([m()],W.prototype,"dataCaptureEnabled",void 0),e([m()],W.prototype,"dataCaptureLayer",null),e([m()],W.prototype,"disabled",null),e([m()],W.prototype,"features",null),e([m()],W.prototype,"imagePointsInView",null),e([m()],W.prototype,"galleryOpened",void 0),e([m()],W.prototype,"icon",null),e([m()],W.prototype,"imageEnhancementToolActive",void 0),e([m({readOnly:!0})],W.prototype,"imageGalleryEnabled",null),e([m()],W.prototype,"imageLocationToolActive",null),e([m()],W.prototype,"imageOverlaysOpened",void 0),e([m({readOnly:!0})],W.prototype,"invalidCameraHeading",null),e([m()],W.prototype,"isAdditionalCoverageVisible",null),e([m()],W.prototype,"isAdditionalPointSourcesVisible",null),e([m()],W.prototype,"mapImageConversionToolState",null),e([m()],W.prototype,"measureType",null),e([m()],W.prototype,"layer",null),e([m()],W.prototype,"navigationToolActive",void 0),e([D(T()),m({type:V})],W.prototype,"viewModel",void 0),e([m(),$("esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer")],W.prototype,"messages",void 0),e([m(),$("esri/core/t9n/Units")],W.prototype,"measurementUnitMessages",void 0),e([m(),$("esri/t9n/common")],W.prototype,"messagesCommon",void 0),e([m(),$("esri/widgets/Sketch/t9n/Sketch")],W.prototype,"messagesSketch",void 0),e([m()],W.prototype,"pixelMeasurementUnit",void 0),e([m()],W.prototype,"pixelAreaMeasurementUnit",void 0),e([m({readOnly:!0})],W.prototype,"popupEnabled",null),e([m()],W.prototype,"referencePoint",null),e([m()],W.prototype,"showCameraLocations",void 0),e([m()],W.prototype,"showMapFeatures",void 0),e([D(["create","delete","redo","undo","update"]),m({readOnly:!0})],W.prototype,"sketchViewModel",null),e([m()],W.prototype,"view",null),e([m({type:P,nonNullable:!0})],W.prototype,"visibleElements",void 0),e([m()],W.prototype,"determineWorkflowForFeature",null),e([m()],W.prototype,"updateFootprint",null),e([m()],W.prototype,"_actionItems",void 0),e([m()],W.prototype,"_activeMeasurementIcon",null),e([m()],W.prototype,"_activeMeasurementHeading",null),e([m()],W.prototype,"_imageOverlaysLoaderTask",void 0),e([m()],W.prototype,"_imageMeasurementToolsLoaderTask",void 0),e([m()],W.prototype,"_measurementToggle",null),e([m()],W.prototype,"_commonActionProperties",null),e([m()],W.prototype,"_imageEnhancementTools",null),e([m()],W.prototype,"_imageGalleryPanel",null),e([m()],W.prototype,"_imageGalleryContext",null),e([m()],W.prototype,"_imageOverlaysComponent",null),e([m()],W.prototype,"_imageOverlayMessages",null),e([m()],W.prototype,"_imageSketchToolsMessages",null),e([m()],W.prototype,"_imageViewer",null),e([m()],W.prototype,"_locationToggle",null),e([m()],W.prototype,"_messageBox",null),e([m()],W.prototype,"_navigationToolExpanded",void 0),e([m()],W.prototype,"_navigationTool",void 0),e([m()],W.prototype,"_panoramicViewer",null),e([m()],W.prototype,"_warningTitleElement",void 0),e([m()],W.prototype,"_renderNavigation",null),e([m()],W.prototype,"_renderThumbnails",null),e([m()],W.prototype,"_sketchLoaderTask",void 0),W=e([h("esri.widgets.OrientedImageryViewer")],W);const U=W;export{U as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../chunks/tslib.es6.js";import{equals as e}from"../core/arrayUtils.js";import{neverReached as i}from"../core/compilerUtils.js";import{watch as s,initial as o}from"../core/reactiveUtils.js";import{truncateDate as a,offsetDate as n}from"../core/timeUtils.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import"../core/Logger.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{formatDate as m,convertDateFormatToIntlOptions as u}from"../intl/date.js";import d from"../time/TimeInterval.js";import{unknown as c,system as p}from"../time/timeZoneUtils.js";import h from"./Slider.js";import v from"./Widget.js";import{loadCalciteComponents as f}from"./support/componentsUtils.js";import{globalCss as y}from"./support/globalCss.js";import{legacyIcon as g}from"./support/legacyIcon.js";import{accessibleHandler as b}from"./support/decorators/accessibleHandler.js";import{messageBundle as x}from"./support/decorators/messageBundle.js";import{vmEvent as w}from"./support/decorators/vmEvent.js";import{tsx as k}from"./support/jsxFactory.js";import{onResize as j}from"./support/widgetUtils.js";import{getCalciteThemeClass as _}from"../support/themeUtils.js";import{css as T}from"./TimeSlider/css.js";import E from"./TimeSlider/TimeSliderViewModel.js";const M=3,S=858,F=[{minor:{value:100,unit:"milliseconds"},major:{value:1,unit:"seconds"},format:{second:"numeric"}},{minor:{value:500,unit:"milliseconds"},major:{value:5,unit:"seconds"},format:{second:"numeric"}},{minor:{value:1,unit:"seconds"},major:{value:20,unit:"seconds"},format:{minute:"numeric",second:"numeric"}},{minor:{value:2,unit:"seconds"},major:{value:30,unit:"seconds"},format:{minute:"numeric",second:"numeric"}},{minor:{value:10,unit:"seconds"},major:{value:1,unit:"minutes"},format:{minute:"numeric"}},{minor:{value:15,unit:"seconds"},major:{value:5,unit:"minutes"},format:{hour:"numeric",minute:"numeric"}},{minor:{value:1,unit:"minutes"},major:{value:20,unit:"minutes"},format:{hour:"numeric",minute:"numeric"}},{minor:{value:5,unit:"minutes"},major:{value:2,unit:"hours"},format:{hour:"numeric",minute:"numeric"}},{minor:{value:15,unit:"minutes"},major:{value:6,unit:"hours"},format:{hour:"numeric",minute:"numeric"}},{minor:{value:1,unit:"hours"},major:{value:1,unit:"days"},format:{day:"numeric",month:"short"}},{minor:{value:6,unit:"hours"},major:{value:1,unit:"weeks"},format:{day:"numeric",month:"short"}},{minor:{value:1,unit:"days"},major:{value:1,unit:"months"},format:{month:"long"}},{minor:{value:2,unit:"days"},major:{value:1,unit:"months"},format:{month:"short"}},{minor:{value:3,unit:"days"},major:{value:1,unit:"months"},format:{month:"short"}},{minor:{value:4,unit:"days"},major:{value:3,unit:"months"},format:{month:"short",year:"numeric"}},{minor:{value:1,unit:"weeks"},major:{value:1,unit:"years"},format:{year:"numeric"}},{minor:{value:1,unit:"months"},major:{value:1,unit:"years"},format:{year:"numeric"}},{minor:{value:2,unit:"months"},major:{value:2,unit:"years"},format:{year:"numeric"}},{minor:{value:1,unit:"years"},major:{value:1,unit:"decades"},format:{year:"numeric"}},{minor:{value:2,unit:"years"},major:{value:5,unit:"decades"},format:{year:"numeric"}},{minor:{value:5,unit:"decades"},major:{value:10,unit:"centuries"},format:{era:"short",year:"numeric"}},{minor:{value:1,unit:"centuries"},major:{value:10,unit:"centuries"},format:{era:"short",year:"numeric"}},{minor:{value:2,unit:"centuries"},major:{value:20,unit:"centuries"},format:{era:"short",year:"numeric"}},{minor:{value:5,unit:"centuries"},major:{value:50,unit:"centuries"},format:{era:"short",year:"numeric"}},{minor:{value:10,unit:"centuries"},major:{value:100,unit:"centuries"},format:{era:"short",year:"numeric"}},{minor:{value:20,unit:"centuries"},major:{value:200,unit:"centuries"},format:{era:"short",year:"numeric"}},{minor:{value:50,unit:"centuries"},major:{value:500,unit:"centuries"},format:{era:"short",year:"numeric"}},{minor:{value:100,unit:"centuries"},major:{value:1e3,unit:"centuries"},format:{era:"short",year:"numeric"}},{minor:{value:200,unit:"centuries"},major:{value:1e3,unit:"centuries"},format:{era:"short",year:"numeric"}},{minor:{value:500,unit:"centuries"},major:{value:5e3,unit:"centuries"},format:{era:"short",year:"numeric"}},{minor:{value:1e3,unit:"centuries"},major:{value:1e4,unit:"centuries"},format:{era:"short",year:"numeric"}}];let C=class extends v{constructor(t,e){super(t,e),this._ignoreNextSliderUpdate=!1,this._slider=new h({precision:0,visibleElements:{rangeLabels:!1},rangeLabelInputsEnabled:!1,thumbsConstrained:!1}),this._tickFormat=null,this.disabled=!1,this.labelFormatFunction=null,this.messages=null,this.messagesCommon=null,this.tickConfigs=null,this.timeVisible=!1,this.viewModel=new E}initialize(){this.addHandles([s((()=>this._slider.values),(t=>{if(this._ignoreNextSliderUpdate)return void(this._ignoreNextSliderUpdate=!1);const e=this.viewModel.valuesToTimeExtent(t);null!=this.timeExtent?null!=e?this.timeExtent.equals(e)||(this.timeExtent=e):this.timeExtent=null:null!=e&&(this.timeExtent=e)})),s((()=>this.effectiveStops),(()=>this._updateSliderSteps()),o)])}loadDependencies(){return f({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),"action-menu":()=>import("@esri/calcite-components/dist/components/calcite-action-menu")})}destroy(){this._slider.destroy(),this._tickFormat=null}get _dateFormat(){return this._getIntlOptions("short-date")}get _timeFormat(){return this._getIntlOptions("long-time")}get actions(){return this.viewModel.actions}set actions(t){this.viewModel.actions=t}get effectiveStops(){return this.viewModel.effectiveStops}get fullTimeExtent(){return this.viewModel.fullTimeExtent}set fullTimeExtent(t){this.viewModel.fullTimeExtent=t}get icon(){return"clock"}set icon(t){this._overrideIfSome("icon",t)}get interactive(){return!(this.disabled||"disabled"===this.viewModel.state||this.timeZone===c)}get label(){return this.messages?.widgetLabel??""}set label(t){this._overrideIfSome("label",t)}set layout(t){["auto","compact","wide"].includes(t)||(t="auto"),this._set("layout",t)}get loop(){return this.viewModel.loop}set loop(t){this.viewModel.loop=t}get mode(){return this.viewModel.mode}set mode(t){this.viewModel.mode=t}get playRate(){return this.viewModel.playRate}set playRate(t){this.viewModel.playRate=t}get stops(){return this.viewModel.stops}set stops(t){this.viewModel.stops=t}get tickFormats(){const{timeZone:t}=this;return F.map((({minor:e,major:i,format:s})=>({minor:new d(e),major:new d(i),format:{...s,timeZone:t}})))}get timeExtent(){return this.viewModel.timeExtent}set timeExtent(t){this.viewModel.timeExtent=t}get timeZone(){return this.viewModel.view?.timeZone??p}set timeZone(t){this._overrideIfSome("timeZone",t)}get view(){return this.viewModel.view}set view(t){this.viewModel.view=t}next(){return this.viewModel.next()}play(){return this.viewModel.play()}previous(){return this.viewModel.previous()}stop(){return this.viewModel.stop()}render(){const{_slider:t,actions:i,domNode:s,effectiveStops:o,fullTimeExtent:a,interactive:n,messages:r,messagesCommon:l,mode:u,tickConfigs:d,timeExtent:c,timeVisible:p,viewModel:{state:h,timeExtentValues:v}}=this;if(null!=a){const{start:e,end:i}=a;if(null!=e&&null!=i){const s=e.getTime(),o=i.getTime(),a=t.min!==s||t.max!==o;if(a&&(t.min=s,t.max=o),null!=d)t.tickConfigs!==d&&(t.tickConfigs=d);else{const e=(o-s)/(t.trackElement?.offsetWidth||400),i=this.tickFormats.find((t=>t.minor.toMilliseconds()>M*e))??this.tickFormats.at(-1),n=this._tickFormat!==i&&null!=i;if(n&&(this._tickFormat=i),a||n){const e={mode:"position",values:this._getTickPositions(i.minor),labelsVisible:!1,tickCreatedFunction:(t,e)=>{e?.classList.add(T.sliderMinorTick)}},s={mode:"position",values:this._getTickPositions(i.major),labelsVisible:!0,tickCreatedFunction:(t,e)=>{e?.classList.add(T.sliderMajorTick)},labelFormatFunction:t=>m(t,i.format)};t.tickConfigs=[e,s]}}}}const f=null==this.fullTimeExtent?.start||null==this.fullTimeExtent.end||null==this.timeExtent||this.timeExtent.isAllTime||this.timeExtent.isEmpty||null!=this.timeExtent.start&&(this.timeExtent.start<this.fullTimeExtent.start||this.timeExtent.start>this.fullTimeExtent.end)||null!=this.timeExtent.end&&(this.timeExtent.end>this.fullTimeExtent.end||this.timeExtent.end<this.fullTimeExtent.start);if(f)switch(this._ignoreNextSliderUpdate=!0,u){case"time-window":t.values=[t.min,t.max];break;case"instant":case"cumulative-from-end":t.values=[t.min];break;case"cumulative-from-start":t.values=[t.max]}else null!=v?e(t.values,v)||(t.values=v):t.values=null;t.disabled=!n;const b="ready"===h,x="playing"===h,w=f||!n||null==o||0===o.length,E="auto"===this.layout?s.clientWidth<S?"compact":"wide":this.layout,F=k("div",{class:T.animation},k("button",{"aria-disabled":w?"true":"false","aria-label":x?l.control.stop:l.control.play,bind:this,class:this.classes(y.widgetButton,T.animationButton,w&&y.buttonDisabled),disabled:w,onclick:this._playOrStopClick,title:x?l.control.stop:l.control.play,type:"button"},k("div",{class:this.classes((b||w)&&g.play,x&&g.pause)}))),C=null!=this.labelFormatFunction?k("div",{afterCreate:this._createLabel,afterUpdate:this._createLabel,bind:this,class:T.timeExtentDate,"data-date":c?[c.start,c.end]:null,"data-layout":E,"data-type":"extent",key:"extent"}):null==c||null!=c&&c.isAllTime?[k("div",{class:this.classes(T.warning,g.noticeTriangle)}),k("div",{class:T.warningText,key:"warning-text"},r.noTimeExtent)]:c.isEmpty?[k("div",{class:this.classes(T.warning,g.noticeTriangle)}),k("div",{class:T.warningText,key:"warning-text"},r.emptyTimeExtent)]:[null!=c.start&&k("div",{class:T.timeExtentGroup,key:"start-date-group"},k("div",{class:T.timeExtentDate,key:"start-date"},this._formatDate(c.start)),p?k("div",{class:T.timeExtentTime,key:"start-time"},this._formatTime(c.start)):null),null!=c.start&&null!=c.end&&c.start.getTime()!==c.end.getTime()&&k("div",{class:T.timeExtentSeparator,key:"separator"},"–"),null!=c.end&&(null==c.start||c.start.getTime()!==c.end.getTime())&&k("div",{class:T.timeExtentGroup,key:"end-date-group"},k("div",{class:T.timeExtentDate,key:"end-date"},this._formatDate(c.end)),p?k("div",{class:T.timeExtentTime,key:"end-time"},this._formatTime(c.end)):null)],D=k("div",{class:this.classes(T.timeExtent,!n&&y.buttonDisabled)},[C]),L=null!=this.labelFormatFunction?k("div",{afterCreate:this._createLabel,afterUpdate:this._createLabel,bind:this,class:T.minDate,"data-date":a?.start,"data-layout":E,"data-type":"min",key:"min-date"}):null!=a?.start&&[k("div",{class:T.minDate,key:"min-date"},this._formatDate(a.start)),p&&k("div",{class:T.minTime,key:"min-time"},this._formatTime(a.start))],U=k("div",{class:this.classes(T.min,!n&&y.buttonDisabled)},[L]),Z=k("div",{class:T.slider},t.render()),R=null!=this.labelFormatFunction?k("div",{afterCreate:this._createLabel,afterUpdate:this._createLabel,bind:this,class:T.maxDate,"data-date":a?.end,"data-layout":E,"data-type":"max",key:"max-date"}):null!=a?.end&&[k("div",{class:T.maxDate,key:"max-date"},this._formatDate(a.end)),p&&k("div",{class:T.maxTime,key:"max-time"},this._formatTime(a.end))],B=k("div",{class:this.classes(T.max,!n&&y.buttonDisabled)},[R]),I=k("div",{class:T.previous},k("button",{"aria-disabled":w?"true":"false","aria-label":l.pagination.previous,bind:this,class:this.classes(y.widgetButton,T.previousButton,(x||w)&&y.buttonDisabled),disabled:w,onclick:this._previousClick,title:l.pagination.previous,type:"button"},k("div",{class:g.reverse}))),O=k("div",{class:T.next},k("button",{"aria-disabled":w?"true":"false","aria-label":l.pagination.next,bind:this,class:this.classes(y.widgetButton,T.nextButton,(x||w)&&y.buttonDisabled),disabled:w,onclick:this._nextClick,title:l.pagination.next,type:"button"},k("div",{class:g.forward}))),A=i?.length>0,V=A&&k("div",{class:T.actions,title:l.options},k("calcite-action-menu",{class:T.actionsButton,label:l.options},i.toArray().map((t=>k("calcite-action",{bind:this,icon:t.icon,id:t.id,onclick:()=>this.viewModel.triggerAction(t),text:t.title,textEnabled:!0,title:t.title})))));return k("div",{afterCreate:t=>{this.addHandles(j(t,(()=>this.scheduleRender())))},"aria-label":r.widgetLabel,class:this.classes(T.timeSlider,y.widget,`${T.timeSliderMode}${u}`,`${T.timeSliderLayout}${E}`,!n&&y.disabled,f&&T.timeSliderOutOfBounds,A&&T.hasActions,_())},"wide"===E&&k("div",{class:T.timeSliderRow},k("div",{class:T.playbackControls},[F,D,U,Z,B,I,O]),V),"compact"===E&&[k("div",{class:T.timeSliderRow,key:"time-slider-row-1"},[D,V]),k("div",{class:T.timeSliderRow,key:"time-slider-row-2"},[Z]),k("div",{class:T.timeSliderRow,key:"time-slider-row-3"},[U,I,F,O,B])])}updateWebDocument(t){this.viewModel?.updateWebDocument(t)}_createLabel(t){if(null==this.labelFormatFunction)return;const e=t.getAttribute("data-type"),i=t.getAttribute("data-layout"),s=t["data-date"];this.labelFormatFunction(s,e,t,i)}_formatDate(t){return m(t,this._dateFormat)}_formatTime(t){return m(t,this._timeFormat)}_getIntlOptions(t){const{timeZone:e}=this;return{...u(t),timeZone:e}}_getTickPositions(t){const{fullTimeExtent:e}=this;if(null==e?.start||null==e.end)return[];const{start:i,end:s}=e,o=[],{value:r,unit:l}=t;let m=a(i,l,this.timeZone);for(;m.getTime()<=s.getTime();)m.getTime()>=i.getTime()&&o.push(m.getTime()),m=n(m,r,l,this.timeZone);return o}_updateSliderSteps(){this._slider.steps=null!=this.effectiveStops&&this.effectiveStops.length>0?this.effectiveStops.map((t=>t.getTime())):null}_playOrStopClick(){switch(this.viewModel.state){case"ready":this.viewModel.play();break;case"playing":this.viewModel.stop();break;case"disabled":break;default:i(this.viewModel.state)}}_previousClick(){this.viewModel.previous()}_nextClick(){this.viewModel.next()}};t([r()],C.prototype,"_dateFormat",null),t([r()],C.prototype,"_timeFormat",null),t([r()],C.prototype,"actions",null),t([r()],C.prototype,"disabled",void 0),t([r()],C.prototype,"effectiveStops",null),t([r()],C.prototype,"fullTimeExtent",null),t([r()],C.prototype,"icon",null),t([r({readOnly:!0})],C.prototype,"interactive",null),t([r()],C.prototype,"label",null),t([r()],C.prototype,"labelFormatFunction",void 0),t([r({value:"auto"})],C.prototype,"layout",null),t([r()],C.prototype,"loop",null),t([r(),x("esri/widgets/TimeSlider/t9n/TimeSlider")],C.prototype,"messages",void 0),t([r(),x("esri/t9n/common")],C.prototype,"messagesCommon",void 0),t([r()],C.prototype,"mode",null),t([r()],C.prototype,"playRate",null),t([r()],C.prototype,"stops",null),t([r()],C.prototype,"tickConfigs",void 0),t([r()],C.prototype,"tickFormats",null),t([r()],C.prototype,"timeExtent",null),t([r({nonNullable:!0})],C.prototype,"timeVisible",void 0),t([r()],C.prototype,"timeZone",null),t([r()],C.prototype,"view",null),t([r({type:E}),w("trigger-action")],C.prototype,"viewModel",void 0),t([b()],C.prototype,"_playOrStopClick",null),t([b()],C.prototype,"_previousClick",null),t([b()],C.prototype,"_nextClick",null),C=t([l("esri.widgets.TimeSlider")],C);const D=C;export{D as default};
5
+ import{_ as t}from"../chunks/tslib.es6.js";import{equals as e}from"../core/arrayUtils.js";import{neverReached as i}from"../core/compilerUtils.js";import{watch as s,initial as o}from"../core/reactiveUtils.js";import{truncateDate as a,offsetDate as n}from"../core/timeUtils.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import"../core/Logger.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{formatDate as m,convertDateFormatToIntlOptions as u}from"../intl/date.js";import{unknown as d,system as c}from"../time/constants.js";import p from"../time/TimeInterval.js";import h from"./Slider.js";import v from"./Widget.js";import{loadCalciteComponents as f}from"./support/componentsUtils.js";import{globalCss as y}from"./support/globalCss.js";import{legacyIcon as g}from"./support/legacyIcon.js";import{accessibleHandler as b}from"./support/decorators/accessibleHandler.js";import{messageBundle as x}from"./support/decorators/messageBundle.js";import{vmEvent as w}from"./support/decorators/vmEvent.js";import{tsx as k}from"./support/jsxFactory.js";import{onResize as j}from"./support/widgetUtils.js";import{getCalciteThemeClass as _}from"../support/themeUtils.js";import{css as T}from"./TimeSlider/css.js";import E from"./TimeSlider/TimeSliderViewModel.js";const M=3,S=858,F=[{minor:{value:100,unit:"milliseconds"},major:{value:1,unit:"seconds"},format:{second:"numeric"}},{minor:{value:500,unit:"milliseconds"},major:{value:5,unit:"seconds"},format:{second:"numeric"}},{minor:{value:1,unit:"seconds"},major:{value:20,unit:"seconds"},format:{minute:"numeric",second:"numeric"}},{minor:{value:2,unit:"seconds"},major:{value:30,unit:"seconds"},format:{minute:"numeric",second:"numeric"}},{minor:{value:10,unit:"seconds"},major:{value:1,unit:"minutes"},format:{minute:"numeric"}},{minor:{value:15,unit:"seconds"},major:{value:5,unit:"minutes"},format:{hour:"numeric",minute:"numeric"}},{minor:{value:1,unit:"minutes"},major:{value:20,unit:"minutes"},format:{hour:"numeric",minute:"numeric"}},{minor:{value:5,unit:"minutes"},major:{value:2,unit:"hours"},format:{hour:"numeric",minute:"numeric"}},{minor:{value:15,unit:"minutes"},major:{value:6,unit:"hours"},format:{hour:"numeric",minute:"numeric"}},{minor:{value:1,unit:"hours"},major:{value:1,unit:"days"},format:{day:"numeric",month:"short"}},{minor:{value:6,unit:"hours"},major:{value:1,unit:"weeks"},format:{day:"numeric",month:"short"}},{minor:{value:1,unit:"days"},major:{value:1,unit:"months"},format:{month:"long"}},{minor:{value:2,unit:"days"},major:{value:1,unit:"months"},format:{month:"short"}},{minor:{value:3,unit:"days"},major:{value:1,unit:"months"},format:{month:"short"}},{minor:{value:4,unit:"days"},major:{value:3,unit:"months"},format:{month:"short",year:"numeric"}},{minor:{value:1,unit:"weeks"},major:{value:1,unit:"years"},format:{year:"numeric"}},{minor:{value:1,unit:"months"},major:{value:1,unit:"years"},format:{year:"numeric"}},{minor:{value:2,unit:"months"},major:{value:2,unit:"years"},format:{year:"numeric"}},{minor:{value:1,unit:"years"},major:{value:1,unit:"decades"},format:{year:"numeric"}},{minor:{value:2,unit:"years"},major:{value:5,unit:"decades"},format:{year:"numeric"}},{minor:{value:5,unit:"decades"},major:{value:10,unit:"centuries"},format:{era:"short",year:"numeric"}},{minor:{value:1,unit:"centuries"},major:{value:10,unit:"centuries"},format:{era:"short",year:"numeric"}},{minor:{value:2,unit:"centuries"},major:{value:20,unit:"centuries"},format:{era:"short",year:"numeric"}},{minor:{value:5,unit:"centuries"},major:{value:50,unit:"centuries"},format:{era:"short",year:"numeric"}},{minor:{value:10,unit:"centuries"},major:{value:100,unit:"centuries"},format:{era:"short",year:"numeric"}},{minor:{value:20,unit:"centuries"},major:{value:200,unit:"centuries"},format:{era:"short",year:"numeric"}},{minor:{value:50,unit:"centuries"},major:{value:500,unit:"centuries"},format:{era:"short",year:"numeric"}},{minor:{value:100,unit:"centuries"},major:{value:1e3,unit:"centuries"},format:{era:"short",year:"numeric"}},{minor:{value:200,unit:"centuries"},major:{value:1e3,unit:"centuries"},format:{era:"short",year:"numeric"}},{minor:{value:500,unit:"centuries"},major:{value:5e3,unit:"centuries"},format:{era:"short",year:"numeric"}},{minor:{value:1e3,unit:"centuries"},major:{value:1e4,unit:"centuries"},format:{era:"short",year:"numeric"}}];let C=class extends v{constructor(t,e){super(t,e),this._ignoreNextSliderUpdate=!1,this._slider=new h({precision:0,visibleElements:{rangeLabels:!1},rangeLabelInputsEnabled:!1,thumbsConstrained:!1}),this._tickFormat=null,this.disabled=!1,this.labelFormatFunction=null,this.messages=null,this.messagesCommon=null,this.tickConfigs=null,this.timeVisible=!1,this.viewModel=new E}initialize(){this.addHandles([s((()=>this._slider.values),(t=>{if(this._ignoreNextSliderUpdate)return void(this._ignoreNextSliderUpdate=!1);const e=this.viewModel.valuesToTimeExtent(t);null!=this.timeExtent?null!=e?this.timeExtent.equals(e)||(this.timeExtent=e):this.timeExtent=null:null!=e&&(this.timeExtent=e)})),s((()=>this.effectiveStops),(()=>this._updateSliderSteps()),o)])}loadDependencies(){return f({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),"action-menu":()=>import("@esri/calcite-components/dist/components/calcite-action-menu")})}destroy(){this._slider.destroy(),this._tickFormat=null}get _dateFormat(){return this._getIntlOptions("short-date")}get _timeFormat(){return this._getIntlOptions("long-time")}get actions(){return this.viewModel.actions}set actions(t){this.viewModel.actions=t}get effectiveStops(){return this.viewModel.effectiveStops}get fullTimeExtent(){return this.viewModel.fullTimeExtent}set fullTimeExtent(t){this.viewModel.fullTimeExtent=t}get icon(){return"clock"}set icon(t){this._overrideIfSome("icon",t)}get interactive(){return!(this.disabled||"disabled"===this.viewModel.state||this.timeZone===d)}get label(){return this.messages?.widgetLabel??""}set label(t){this._overrideIfSome("label",t)}set layout(t){["auto","compact","wide"].includes(t)||(t="auto"),this._set("layout",t)}get loop(){return this.viewModel.loop}set loop(t){this.viewModel.loop=t}get mode(){return this.viewModel.mode}set mode(t){this.viewModel.mode=t}get playRate(){return this.viewModel.playRate}set playRate(t){this.viewModel.playRate=t}get stops(){return this.viewModel.stops}set stops(t){this.viewModel.stops=t}get tickFormats(){const{timeZone:t}=this;return F.map((({minor:e,major:i,format:s})=>({minor:new p(e),major:new p(i),format:{...s,timeZone:t}})))}get timeExtent(){return this.viewModel.timeExtent}set timeExtent(t){this.viewModel.timeExtent=t}get timeZone(){return this.viewModel.view?.timeZone??c}set timeZone(t){this._overrideIfSome("timeZone",t)}get view(){return this.viewModel.view}set view(t){this.viewModel.view=t}next(){return this.viewModel.next()}play(){return this.viewModel.play()}previous(){return this.viewModel.previous()}stop(){return this.viewModel.stop()}render(){const{_slider:t,actions:i,domNode:s,effectiveStops:o,fullTimeExtent:a,interactive:n,messages:r,messagesCommon:l,mode:u,tickConfigs:d,timeExtent:c,timeVisible:p,viewModel:{state:h,timeExtentValues:v}}=this;if(null!=a){const{start:e,end:i}=a;if(null!=e&&null!=i){const s=e.getTime(),o=i.getTime(),a=t.min!==s||t.max!==o;if(a&&(t.min=s,t.max=o),null!=d)t.tickConfigs!==d&&(t.tickConfigs=d);else{const e=(o-s)/(t.trackElement?.offsetWidth||400),i=this.tickFormats.find((t=>t.minor.toMilliseconds()>M*e))??this.tickFormats.at(-1),n=this._tickFormat!==i&&null!=i;if(n&&(this._tickFormat=i),a||n){const e={mode:"position",values:this._getTickPositions(i.minor),labelsVisible:!1,tickCreatedFunction:(t,e)=>{e?.classList.add(T.sliderMinorTick)}},s={mode:"position",values:this._getTickPositions(i.major),labelsVisible:!0,tickCreatedFunction:(t,e)=>{e?.classList.add(T.sliderMajorTick)},labelFormatFunction:t=>m(t,i.format)};t.tickConfigs=[e,s]}}}}const f=null==this.fullTimeExtent?.start||null==this.fullTimeExtent.end||null==this.timeExtent||this.timeExtent.isAllTime||this.timeExtent.isEmpty||null!=this.timeExtent.start&&(this.timeExtent.start<this.fullTimeExtent.start||this.timeExtent.start>this.fullTimeExtent.end)||null!=this.timeExtent.end&&(this.timeExtent.end>this.fullTimeExtent.end||this.timeExtent.end<this.fullTimeExtent.start);if(f)switch(this._ignoreNextSliderUpdate=!0,u){case"time-window":t.values=[t.min,t.max];break;case"instant":case"cumulative-from-end":t.values=[t.min];break;case"cumulative-from-start":t.values=[t.max]}else null!=v?e(t.values,v)||(t.values=v):t.values=null;t.disabled=!n;const b="ready"===h,x="playing"===h,w=f||!n||null==o||0===o.length,E="auto"===this.layout?s.clientWidth<S?"compact":"wide":this.layout,F=k("div",{class:T.animation},k("button",{"aria-disabled":w?"true":"false","aria-label":x?l.control.stop:l.control.play,bind:this,class:this.classes(y.widgetButton,T.animationButton,w&&y.buttonDisabled),disabled:w,onclick:this._playOrStopClick,title:x?l.control.stop:l.control.play,type:"button"},k("div",{class:this.classes((b||w)&&g.play,x&&g.pause)}))),C=null!=this.labelFormatFunction?k("div",{afterCreate:this._createLabel,afterUpdate:this._createLabel,bind:this,class:T.timeExtentDate,"data-date":c?[c.start,c.end]:null,"data-layout":E,"data-type":"extent",key:"extent"}):null==c||null!=c&&c.isAllTime?[k("div",{class:this.classes(T.warning,g.noticeTriangle)}),k("div",{class:T.warningText,key:"warning-text"},r.noTimeExtent)]:c.isEmpty?[k("div",{class:this.classes(T.warning,g.noticeTriangle)}),k("div",{class:T.warningText,key:"warning-text"},r.emptyTimeExtent)]:[null!=c.start&&k("div",{class:T.timeExtentGroup,key:"start-date-group"},k("div",{class:T.timeExtentDate,key:"start-date"},this._formatDate(c.start)),p?k("div",{class:T.timeExtentTime,key:"start-time"},this._formatTime(c.start)):null),null!=c.start&&null!=c.end&&c.start.getTime()!==c.end.getTime()&&k("div",{class:T.timeExtentSeparator,key:"separator"},"–"),null!=c.end&&(null==c.start||c.start.getTime()!==c.end.getTime())&&k("div",{class:T.timeExtentGroup,key:"end-date-group"},k("div",{class:T.timeExtentDate,key:"end-date"},this._formatDate(c.end)),p?k("div",{class:T.timeExtentTime,key:"end-time"},this._formatTime(c.end)):null)],D=k("div",{class:this.classes(T.timeExtent,!n&&y.buttonDisabled)},[C]),L=null!=this.labelFormatFunction?k("div",{afterCreate:this._createLabel,afterUpdate:this._createLabel,bind:this,class:T.minDate,"data-date":a?.start,"data-layout":E,"data-type":"min",key:"min-date"}):null!=a?.start&&[k("div",{class:T.minDate,key:"min-date"},this._formatDate(a.start)),p&&k("div",{class:T.minTime,key:"min-time"},this._formatTime(a.start))],U=k("div",{class:this.classes(T.min,!n&&y.buttonDisabled)},[L]),Z=k("div",{class:T.slider},t.render()),R=null!=this.labelFormatFunction?k("div",{afterCreate:this._createLabel,afterUpdate:this._createLabel,bind:this,class:T.maxDate,"data-date":a?.end,"data-layout":E,"data-type":"max",key:"max-date"}):null!=a?.end&&[k("div",{class:T.maxDate,key:"max-date"},this._formatDate(a.end)),p&&k("div",{class:T.maxTime,key:"max-time"},this._formatTime(a.end))],B=k("div",{class:this.classes(T.max,!n&&y.buttonDisabled)},[R]),I=k("div",{class:T.previous},k("button",{"aria-disabled":w?"true":"false","aria-label":l.pagination.previous,bind:this,class:this.classes(y.widgetButton,T.previousButton,(x||w)&&y.buttonDisabled),disabled:w,onclick:this._previousClick,title:l.pagination.previous,type:"button"},k("div",{class:g.reverse}))),O=k("div",{class:T.next},k("button",{"aria-disabled":w?"true":"false","aria-label":l.pagination.next,bind:this,class:this.classes(y.widgetButton,T.nextButton,(x||w)&&y.buttonDisabled),disabled:w,onclick:this._nextClick,title:l.pagination.next,type:"button"},k("div",{class:g.forward}))),A=i?.length>0,V=A&&k("div",{class:T.actions,title:l.options},k("calcite-action-menu",{class:T.actionsButton,label:l.options},i.toArray().map((t=>k("calcite-action",{bind:this,icon:t.icon,id:t.id,onclick:()=>this.viewModel.triggerAction(t),text:t.title,textEnabled:!0,title:t.title})))));return k("div",{afterCreate:t=>{this.addHandles(j(t,(()=>this.scheduleRender())))},"aria-label":r.widgetLabel,class:this.classes(T.timeSlider,y.widget,`${T.timeSliderMode}${u}`,`${T.timeSliderLayout}${E}`,!n&&y.disabled,f&&T.timeSliderOutOfBounds,A&&T.hasActions,_())},"wide"===E&&k("div",{class:T.timeSliderRow},k("div",{class:T.playbackControls},[F,D,U,Z,B,I,O]),V),"compact"===E&&[k("div",{class:T.timeSliderRow,key:"time-slider-row-1"},[D,V]),k("div",{class:T.timeSliderRow,key:"time-slider-row-2"},[Z]),k("div",{class:T.timeSliderRow,key:"time-slider-row-3"},[U,I,F,O,B])])}updateWebDocument(t){this.viewModel?.updateWebDocument(t)}_createLabel(t){if(null==this.labelFormatFunction)return;const e=t.getAttribute("data-type"),i=t.getAttribute("data-layout"),s=t["data-date"];this.labelFormatFunction(s,e,t,i)}_formatDate(t){return m(t,this._dateFormat)}_formatTime(t){return m(t,this._timeFormat)}_getIntlOptions(t){const{timeZone:e}=this;return{...u(t),timeZone:e}}_getTickPositions(t){const{fullTimeExtent:e}=this;if(null==e?.start||null==e.end)return[];const{start:i,end:s}=e,o=[],{value:r,unit:l}=t;let m=a(i,l,this.timeZone);for(;m.getTime()<=s.getTime();)m.getTime()>=i.getTime()&&o.push(m.getTime()),m=n(m,r,l,this.timeZone);return o}_updateSliderSteps(){this._slider.steps=null!=this.effectiveStops&&this.effectiveStops.length>0?this.effectiveStops.map((t=>t.getTime())):null}_playOrStopClick(){switch(this.viewModel.state){case"ready":this.viewModel.play();break;case"playing":this.viewModel.stop();break;case"disabled":break;default:i(this.viewModel.state)}}_previousClick(){this.viewModel.previous()}_nextClick(){this.viewModel.next()}};t([r()],C.prototype,"_dateFormat",null),t([r()],C.prototype,"_timeFormat",null),t([r()],C.prototype,"actions",null),t([r()],C.prototype,"disabled",void 0),t([r()],C.prototype,"effectiveStops",null),t([r()],C.prototype,"fullTimeExtent",null),t([r()],C.prototype,"icon",null),t([r({readOnly:!0})],C.prototype,"interactive",null),t([r()],C.prototype,"label",null),t([r()],C.prototype,"labelFormatFunction",void 0),t([r({value:"auto"})],C.prototype,"layout",null),t([r()],C.prototype,"loop",null),t([r(),x("esri/widgets/TimeSlider/t9n/TimeSlider")],C.prototype,"messages",void 0),t([r(),x("esri/t9n/common")],C.prototype,"messagesCommon",void 0),t([r()],C.prototype,"mode",null),t([r()],C.prototype,"playRate",null),t([r()],C.prototype,"stops",null),t([r()],C.prototype,"tickConfigs",void 0),t([r()],C.prototype,"tickFormats",null),t([r()],C.prototype,"timeExtent",null),t([r({nonNullable:!0})],C.prototype,"timeVisible",void 0),t([r()],C.prototype,"timeZone",null),t([r()],C.prototype,"view",null),t([r({type:E}),w("trigger-action")],C.prototype,"viewModel",void 0),t([b()],C.prototype,"_playOrStopClick",null),t([b()],C.prototype,"_previousClick",null),t([b()],C.prototype,"_nextClick",null),C=t([l("esri.widgets.TimeSlider")],C);const D=C;export{D as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import{property as t}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import{system as s,systemTimeZone as o,unknown as r}from"../time/timeZoneUtils.js";import n from"./Widget.js";import{loadCalciteComponents as a}from"./support/componentsUtils.js";import{globalCss as c}from"./support/globalCss.js";import{isRTL as l}from"./support/widgetUtils.js";import{messageBundle as d}from"./support/decorators/messageBundle.js";import{tsx as p}from"./support/jsxFactory.js";import{css as m}from"./TimeZoneLabel/css.js";import h from"./TimeZoneLabel/TimeZoneLabelViewModel.js";let b=class extends n{constructor(e,t){super(e,t),this.disabled=!1,this.expanded=!1,this.messages=null,this.viewModel=new h,this._onExpanderClick=()=>{this.expanded=!this.expanded}}loadDependencies(){return a({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),"input-time-zone":()=>import("@esri/calcite-components/dist/components/calcite-input-time-zone"),label:()=>import("@esri/calcite-components/dist/components/calcite-label")})}get expandDirection(){if(!this.view||!this.container)return"end";const e=l();switch(this.view.ui.getPosition(this.container)){case"top-right":case"bottom-right":case"top-trailing":case"bottom-trailing":return e?"end":"start";case"top-left":case"bottom-left":case"top-leading":case"bottom-leading":return e?"start":"end";default:return"end"}}set expandDirection(e){this._overrideIfSome("expandDirection",e)}get icon(){return"time-zone"}set icon(e){this._overrideIfSome("icon",e)}get interactive(){return!(this.disabled||"disabled"===this.viewModel.state)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}render(){const{expandDirection:e,interactive:t,label:i}=this,s=this.classes(m.base,c.widget,!t&&c.disabled),o=[this._renderExpander(),this._renderName(),this._renderBadge()];return"start"===e&&o.reverse(),p("div",{"aria-label":i,class:s},o)}_getIcon(){const{expanded:e,expandDirection:t}=this;return e?l()?"start"===t?"chevrons-left":"chevrons-right":"start"===t?"chevrons-right":"chevrons-left":"time-zone"}_renderExpander(){const{interactive:e,label:t}=this,i=this._getIcon();return p("calcite-action",{active:!1,class:m.expander,disabled:!e,icon:i,key:m.expander,onclick:this._onExpanderClick,scale:"s",text:t,title:t})}_renderBadge(){const{expanded:e,interactive:t}=this;return p("div",{class:this.classes(m.badge,!e&&m.badgeHidden,!t&&m.badgeDisabled)},p("calcite-icon",{class:m.badgeIcon,icon:"time-zone",scale:"s"}))}_renderName(){const e=this.viewModel.view?.timeZone,t=e===s?o:e,i=e===r;return[p("calcite-label",{class:this.classes(m.label,(!this.expanded||!i)&&m.labelHidden,!this.interactive&&m.labelDisabled)},this.messages.noAdjustment),p("calcite-input-time-zone",{class:this.classes(m.name,(!this.expanded||!t||i)&&m.nameHidden),disabled:!this.interactive,mode:"region",readOnly:!0,value:t})]}};e([t()],b.prototype,"disabled",void 0),e([t()],b.prototype,"expandDirection",null),e([t()],b.prototype,"expanded",void 0),e([t()],b.prototype,"icon",null),e([t({readOnly:!0})],b.prototype,"interactive",null),e([t()],b.prototype,"label",null),e([t(),d("esri/widgets/TimeZoneLabel/t9n/TimeZoneLabel")],b.prototype,"messages",void 0),e([t()],b.prototype,"view",null),e([t()],b.prototype,"viewModel",void 0),b=e([i("esri.widgets.TimeZoneLabel")],b);const u=b;export{u as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import{property as t}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import{system as s,systemTimeZone as o,unknown as r}from"../time/constants.js";import n from"./Widget.js";import{loadCalciteComponents as a}from"./support/componentsUtils.js";import{globalCss as c}from"./support/globalCss.js";import{isRTL as l}from"./support/widgetUtils.js";import{messageBundle as d}from"./support/decorators/messageBundle.js";import{tsx as p}from"./support/jsxFactory.js";import{css as m}from"./TimeZoneLabel/css.js";import h from"./TimeZoneLabel/TimeZoneLabelViewModel.js";let b=class extends n{constructor(e,t){super(e,t),this.disabled=!1,this.expanded=!1,this.messages=null,this.viewModel=new h,this._onExpanderClick=()=>{this.expanded=!this.expanded}}loadDependencies(){return a({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),"input-time-zone":()=>import("@esri/calcite-components/dist/components/calcite-input-time-zone"),label:()=>import("@esri/calcite-components/dist/components/calcite-label")})}get expandDirection(){if(!this.view||!this.container)return"end";const e=l();switch(this.view.ui.getPosition(this.container)){case"top-right":case"bottom-right":case"top-trailing":case"bottom-trailing":return e?"end":"start";case"top-left":case"bottom-left":case"top-leading":case"bottom-leading":return e?"start":"end";default:return"end"}}set expandDirection(e){this._overrideIfSome("expandDirection",e)}get icon(){return"time-zone"}set icon(e){this._overrideIfSome("icon",e)}get interactive(){return!(this.disabled||"disabled"===this.viewModel.state)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}render(){const{expandDirection:e,interactive:t,label:i}=this,s=this.classes(m.base,c.widget,!t&&c.disabled),o=[this._renderExpander(),this._renderName(),this._renderBadge()];return"start"===e&&o.reverse(),p("div",{"aria-label":i,class:s},o)}_getIcon(){const{expanded:e,expandDirection:t}=this;return e?l()?"start"===t?"chevrons-left":"chevrons-right":"start"===t?"chevrons-right":"chevrons-left":"time-zone"}_renderExpander(){const{interactive:e,label:t}=this,i=this._getIcon();return p("calcite-action",{active:!1,class:m.expander,disabled:!e,icon:i,key:m.expander,onclick:this._onExpanderClick,scale:"s",text:t,title:t})}_renderBadge(){const{expanded:e,interactive:t}=this;return p("div",{class:this.classes(m.badge,!e&&m.badgeHidden,!t&&m.badgeDisabled)},p("calcite-icon",{class:m.badgeIcon,icon:"time-zone",scale:"s"}))}_renderName(){const e=this.viewModel.view?.timeZone,t=e===s?o:e,i=e===r;return[p("calcite-label",{class:this.classes(m.label,(!this.expanded||!i)&&m.labelHidden,!this.interactive&&m.labelDisabled)},this.messages.noAdjustment),p("calcite-input-time-zone",{class:this.classes(m.name,(!this.expanded||!t||i)&&m.nameHidden),disabled:!this.interactive,mode:"region",readOnly:!0,value:t})]}};e([t()],b.prototype,"disabled",void 0),e([t()],b.prototype,"expandDirection",null),e([t()],b.prototype,"expanded",void 0),e([t()],b.prototype,"icon",null),e([t({readOnly:!0})],b.prototype,"interactive",null),e([t()],b.prototype,"label",null),e([t(),d("esri/widgets/TimeZoneLabel/t9n/TimeZoneLabel")],b.prototype,"messages",void 0),e([t()],b.prototype,"view",null),e([t()],b.prototype,"viewModel",void 0),b=e([i("esri.widgets.TimeZoneLabel")],b);const u=b;export{u as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import"../../intl.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{fetchMessageBundle as o}from"../../intl/messages.js";import s from"../Widget.js";import{css as a}from"../Features/css.js";import{zoomToFeature as r}from"../Popup/actions.js";import{loadCalciteComponents as n}from"../support/componentsUtils.js";import"../support/widgetUtils.js";import{messageBundle as c}from"../support/decorators/messageBundle.js";import{tsx as l,tsxFragment as d}from"../support/jsxFactory.js";import{substitute as p}from"../../intl/substitute.js";const m=r.clone(),u="esri-utility-network-trace",h={base:u,featureContent:`${u}__feature-content`};let f=class extends s{constructor(e,t){super(e,t),this._utilityNetworkTraceMessages=null,this.closed=!1,this.closable=!0,this.messages=null,this.messagesCommon=null,this._handleAddNonspatialTraceLocation=e=>{this.emit("add-nso-trace-location",{featureWidget:e})},this._handleOpenFeature=e=>{this.emit("open-feature",{feature:e})},this._handleZoomToFeature=e=>{this.emit("zoom-to-feature",{featureWidget:e})}}initialize(){(async()=>{this._utilityNetworkTraceMessages=await o("esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace")})()}loadDependencies(){return n({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item")})}get mode(){return this._get("mode")||"show-feature-info"}set mode(e){this._set("mode",e)}render(){const{flowItems:e}=this,t=e?.toArray();return l(d,null,t?.map(((t,i)=>this._renderFlowItem(t,i===e.length-1))))}_renderAddNonspatialTraceLocationAction(e){const{_utilityNetworkTraceMessages:t}=this;return l("calcite-action",{appearance:"solid",bind:this,icon:"utility-network-trace",onclick:()=>this._handleAddNonspatialTraceLocation(e),scale:"s",text:t.inputsStrings.addNonspatialOption,textEnabled:!0,title:t.inputsStrings.addNonspatialOption})}_renderFlowItem(e,t){const{messages:i,closable:o,closed:s}=this,r="graphic"in e&&!e.isTable,n="feature-association"===e.flowType,c=this._getExitMessage(e),d=i.selectFeature,p=e,m=p?p.graphic?.layer:null,u=!(m?m.geometryType:null);return l("calcite-flow-item",{bind:this,closable:o,closed:s,description:this._getDrillInFlowItemDescription(e),heading:e.title??"",key:`flow-item-${e.viewModel.uid}`,selected:t,onCalciteFlowItemBack:e=>{e.preventDefault(),this._handleDrillInBackClick()}},l("calcite-action",{appearance:"transparent",bind:this,class:a.actionExit,icon:"move-up",key:"exit-action",onclick:this._handleExitClick,slot:"header-actions-start",text:c,title:c}),r?l("calcite-action",{appearance:"transparent",bind:this,icon:"zoom-to-object",key:"open-feature-action",onclick:()=>this._handleOpenFeature(e),slot:"header-actions-end",text:d,title:d}):null,"show-feature-info"===this.mode?l("calcite-action",{icon:"x",onclick:()=>{this.emit("close")},slot:"header-actions-end",text:this.messagesCommon.close}):void 0,n&&"add-nso"===this.mode?l("calcite-action-bar",{expandDisabled:!0,expanded:!0,key:"header-action-bar",scale:"s",slot:"action-bar"},l("calcite-action-group",{overlayPositioning:"fixed",scale:"s"},u?this._renderAddNonspatialTraceLocationAction(e):this._renderZoomToFeatureAction(e))):null,l("div",{class:this.classes(a.container,h.featureContent)},e.render()))}_renderZoomToFeatureAction(e){const t=this._getActionTitle(m);return l("calcite-action",{active:m.active,appearance:"solid",bind:this,"data-action-uid":m.uid,disabled:m.disabled,icon:m.icon??"question",indicator:m.indicator,key:`action-${m.uid}`,loading:m.active,onclick:()=>this._handleZoomToFeature(e),scale:"s",text:t,textEnabled:!0,title:t})}_getActionTitle(e){const{messages:t}=this,{id:i}=e,o=e.title??"";return"zoom-to-feature"===i?p(o,{messages:t}):o}_getDrillInFlowItemDescription(e){switch(e.flowType){case"feature":case"feature-association":case"feature-utility-network-associations":return e.viewModel.description??"";case"feature-relationship":return e.featureCountDescription;case"feature-utility-network-association-type":return e.description??""}}_getExitMessage(e){switch(e.flowType){case"feature":case"feature-association":return"";case"feature-relationship":return this.messages.exitRelatedRecords;case"feature-utility-network-associations":case"feature-utility-network-association-type":return this.messages.exitAssociations}}_handleDrillInBackClick(){const e=this.flowItems?.pop();e&&("showAllEnabled"in e.viewModel&&(e.viewModel.showAllEnabled=!1),e&&(e.viewModel=null,e.destroy()))}_handleExitClick(){this.emit("exit")}};e([t()],f.prototype,"closed",void 0),e([t()],f.prototype,"closable",void 0),e([t()],f.prototype,"flowItems",void 0),e([t(),c("esri/widgets/Features/t9n/Features")],f.prototype,"messages",void 0),e([t(),c("esri/t9n/common")],f.prototype,"messagesCommon",void 0),e([t()],f.prototype,"mode",null),f=e([i("esri.widgets.UtilityNetworkTrace.UtilityNetworkTraceFeaturesDrillIn")],f);const g=f;export{g as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import"../../intl.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{fetchMessageBundle as o}from"../../intl/messages.js";import s from"../Widget.js";import{css as a}from"../Features/css.js";import{zoomToFeature as r}from"../Popup/actions.js";import{loadCalciteComponents as n}from"../support/componentsUtils.js";import"../support/widgetUtils.js";import{messageBundle as c}from"../support/decorators/messageBundle.js";import{tsx as l,tsxFragment as d}from"../support/jsxFactory.js";import{substitute as p}from"../../intl/substitute.js";const m=r.clone(),u="esri-utility-network-trace",h={base:u,featureContent:`${u}__feature-content`};let f=class extends s{constructor(e,t){super(e,t),this._utilityNetworkTraceMessages=null,this.closed=!1,this.closable=!0,this.messages=null,this.messagesCommon=null,this._handleAddNonspatialTraceLocation=e=>{this.emit("add-nso-trace-location",{featureWidget:e})},this._handleOpenFeature=e=>{this.emit("open-feature",{feature:e})},this._handleZoomToFeature=e=>{this.emit("zoom-to-feature",{featureWidget:e})}}initialize(){(async()=>{this._utilityNetworkTraceMessages=await o("esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace")})()}loadDependencies(){return n({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item")})}get mode(){return this._get("mode")||"show-feature-info"}set mode(e){this._set("mode",e)}render(){const{flowItems:e}=this,t=e?.toArray();return l(d,null,t?.map(((t,i)=>this._renderFlowItem(t,i===e.length-1))))}_renderAddNonspatialTraceLocationAction(e){const{_utilityNetworkTraceMessages:t}=this;return l("calcite-action",{appearance:"solid",bind:this,icon:"utility-network-trace",onclick:()=>this._handleAddNonspatialTraceLocation(e),scale:"s",text:t.inputsStrings.addNonspatialOption,textEnabled:!0,title:t.inputsStrings.addNonspatialOption})}_renderFlowItem(e,t){const{messages:i,closable:o,closed:s}=this,r="graphic"in e&&!e.isTable,n="feature-association"===e.flowType,c=this._getExitMessage(e),d=i.selectFeature,p=e,m=p?p.graphic?.layer:null,u=!(m?m.geometryType:null);return l("calcite-flow-item",{bind:this,closable:o,closed:s,description:this._getDrillInFlowItemDescription(e),heading:e.title??"",key:`flow-item-${e.viewModel.uid}`,selected:t,onCalciteFlowItemBack:e=>{e.preventDefault(),this._handleDrillInBackClick()}},l("calcite-action",{appearance:"transparent",bind:this,class:a.actionExit,icon:"move-up",key:"exit-action",onclick:this._handleExitClick,slot:"header-actions-start",text:c,title:c}),r?l("calcite-action",{appearance:"transparent",bind:this,icon:"zoom-to-object",key:"open-feature-action",onclick:()=>this._handleOpenFeature(e),slot:"header-actions-end",text:d,title:d}):null,"show-feature-info"===this.mode?l("calcite-action",{icon:"x",onclick:()=>{this.emit("close")},slot:"header-actions-end",text:this.messagesCommon.close}):void 0,n&&"add-nso"===this.mode?l("calcite-action-bar",{expandDisabled:!0,expanded:!0,key:"header-action-bar",scale:"s",slot:"action-bar"},l("calcite-action-group",{overlayPositioning:"fixed",scale:"s"},u?this._renderAddNonspatialTraceLocationAction(e):this._renderZoomToFeatureAction(e))):null,l("div",{class:this.classes(a.container,h.featureContent)},e.render()))}_renderZoomToFeatureAction(e){const t=this._getActionTitle(m);return l("calcite-action",{active:m.active,appearance:"solid",bind:this,"data-action-uid":m.uid,disabled:m.disabled,icon:m.icon??"question",indicator:m.indicator,key:`action-${m.uid}`,loading:m.active,onclick:()=>this._handleZoomToFeature(e),scale:"s",text:t,textEnabled:!0,title:t})}_getActionTitle(e){const{messages:t}=this,{id:i}=e,o=e.title??"";return"zoom-to-feature"===i?p(o,{messages:t}):o}_getDrillInFlowItemDescription(e){switch(e.flowType){case"feature":case"feature-association":case"feature-utility-network-associations":return e.viewModel.description??"";case"feature-relationship":return e.allItemsDescription;case"feature-utility-network-association-type":return e.description??""}}_getExitMessage(e){switch(e.flowType){case"feature":case"feature-association":return"";case"feature-relationship":return this.messages.exitRelatedRecords;case"feature-utility-network-associations":case"feature-utility-network-association-type":return this.messages.exitAssociations}}_handleDrillInBackClick(){const e=this.flowItems?.pop();e&&("showAllEnabled"in e.viewModel&&(e.viewModel.showAllEnabled=!1),e&&(e.viewModel=null,e.destroy()))}_handleExitClick(){this.emit("exit")}};e([t()],f.prototype,"closed",void 0),e([t()],f.prototype,"closable",void 0),e([t()],f.prototype,"flowItems",void 0),e([t(),c("esri/widgets/Features/t9n/Features")],f.prototype,"messages",void 0),e([t(),c("esri/t9n/common")],f.prototype,"messagesCommon",void 0),e([t()],f.prototype,"mode",null),f=e([i("esri.widgets.UtilityNetworkTrace.UtilityNetworkTraceFeaturesDrillIn")],f);const g=f;export{g as default};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
+ */
5
+ import{generateBracedUUID as e}from"../../../../core/uuid.js";import{isSubtypeSublayer as t}from"../../../../layers/support/layerUtils.js";import r from"../../../../rest/networks/support/Association.js";import o from"../../../../rest/networks/support/NetworkElement.js";function i(t){return new r({fromNetworkElement:s(t.fromFeature,t.utilityNetwork),toNetworkElement:s(t.toFeature,t.utilityNetwork),associationType:t.associationType,globalId:e()})}function s(e,r){const i=t(e.sourceLayer)?e.sourceLayer.parent:e.sourceLayer;if(i&&"globalIdField"in i&&"layerId"in i&&i.globalIdField){const t=r.getSourceIdByLayerId(i.layerId),s="junction"===r.getSourceTypeById(t)?r.getTerminalConfiguration(e):void 0,a=s?.terminals.at(0)?.id,n=i.fieldsIndex.get("assetGroup").name,l=i.fieldsIndex.get("assetType").name,u=e.attributes[n],d=e.attributes[l],p=e.attributes[i.globalIdField];if(p&&null!=t)return new o({globalId:p,networkSourceId:t,assetGroupCode:u,assetTypeCode:d,terminalId:a})}}export{i as createAssociation};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
+ */
5
+ import"../../../../intl.js";import{formatNumber as t}from"../../../../intl/number.js";function n(n){const{percentAlong:r}=n;return null==r?"":t(r,{style:"percent",maximumFractionDigits:2})}export{n as formatPercentAlong};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
+ */
5
+ function t(t,n,c){const{associationType:e}=t;switch(e){case"attachment":return"to"===n?c.attachment:c.structure;case"containment":return"to"===n?c.content:c.container;case"junction-edge-from-connectivity":case"junction-edge-to-connectivity":case"junction-edge-midspan-connectivity":case"junction-junction-connectivity":case"connectivity":return c.connectivity}}export{t as getAssociationTitle};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
+ */
5
+ function l(l){const{attributes:t,sourceLayer:n}=l??{},i=n&&"displayField"in n?n.displayField:null,e=i?t?.[i]:null,r=null!=e?JSON.stringify(e):null,u=l?.getObjectId()?.toString();return r||u||""}export{l as getFeatureTitle};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
+ */
5
+ function n(n){const{associationType:t}=n;return"connectivity"===t||"junction-junction-connectivity"===t||"junction-edge-from-connectivity"===t||"junction-edge-midspan-connectivity"===t||"junction-edge-to-connectivity"===t}export{n as isConnectivity};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
+ */
5
+ function n(n){return"junction-edge-midspan-connectivity"===n.associationType}export{n as isConnectivityMidspan};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
+ */
5
+ function l(l,e){return!!(l.layer&&"globalIdField"in l.layer&&l.layer.globalIdField&&e.fromNetworkElement)&&l.attributes[l.layer.globalIdField]===e.fromNetworkElement.globalId}export{l as isFromElement};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import"../../intl.js";import"../../core/has.js";import t from"../../core/Error.js";import{clamp as e}from"../../core/mathUtils.js";import{convertDateFormatToIntlOptions as n,formatTimestamp as o,formatTimeOnly as l,formatDateOnly as i,formatDate as r}from"../../intl/date.js";import{defaultDatePattern as u,TimeStampOffsetPattern as a,defaultTimePattern as s,timeOnlyToDateTime as m,timestampOffsetToDateTime as f,dateOnlyToDateTime as c}from"../../support/dateUtils.js";import{isString as d,isNumber as p}from"../../support/guards.js";import{utc as y}from"../../time/timeZoneUtils.js";import{DateTime as h,FixedOffsetZone as v}from"luxon";import{getLocale as O}from"../../intl/locale.js";const S=y,w={date:null,time:null,timeZoneOffset:null},Z=new Map([["hours",3600],["minutes",60],["seconds",1],["deciseconds",.1],["centiseconds",.01],["milliseconds",.001]]),g="latn",j=new Set(["date-only","time-only","timestamp-offset"]),x=t=>"valueAsDate"in t;function I(t){return{locale:O(),numberingSystem:g,zone:t??S}}function M(t){return t?.isValid?t.toMillis():null}function D(t,e){return null==t?null:h.fromMillis(t,I(e))}function V(t,e){if(null==t||!d(t)||""===t){if(e){const t=h.local({zone:e});return{date:null,time:null,timeZoneOffset:t.isValid?t.offset.toString():null}}return w}const n=h.fromISO(t,{setZone:!0});return{date:n.toFormat(u,I()),time:n.toFormat(a.HMS_MS,I()),timeZoneOffset:n.offset.toString()}}function C(t,e){if(null==t||!p(t)||isNaN(t))return w;const n=D(t,e);return n?{date:n.toFormat(u,I(e)),time:n.toFormat(s,I(e))}:w}function F(t){switch(t.type){case"date":default:return n("short-date-short-time");case"date-only":return n("short-date");case"time-only":return n("short-time");case"timestamp-offset":return{...n("short-date-short-time"),timeZone:void 0,timeZoneName:"short"}}}function T(t,e,n){if(!t||null==e)return null;switch(t.type){case"date":return r(e,n);case"date-only":return i(e,n);case"time-only":return l(e,n);case"timestamp-offset":return o(e,n);default:return null}}function b(t){const{dateComponent:e,defaultTimeZone:n,timeComponent:o,timeZoneComponent:l,oldValue:i}=t;if(!e?.value)return null;const{year:r,month:a,day:s}=h.fromFormat(e.value,u),{hour:m,minute:f,second:c,millisecond:d}=A(o,y)??h.now(),p=V(i,n),O=l?.value?parseInt(l.value,10):null!=p.timeZoneOffset?parseInt(p.timeZoneOffset,10):(new Date).getTimezoneOffset(),S=v.instance(O),w=h.fromObject({year:r,month:a,day:s,hour:m,minute:f,second:c,millisecond:d},{zone:S});return w.isValid?w.toISO({includeOffset:!0}):null}function z(t,e="system"){return h.fromJSDate(t,{zone:e}).isInDST}function N(t){const{dateComponent:e,timeComponent:n,timeZone:o,max:l,min:i,oldValue:r}=t,u=A(e,o);let a=!!t.applyRange;if(!u)return null;let s=null;if(null!=n?.value){const t=A(n,o),e=Date.now(),i=null!=l&&l<e?l:e,r=h.fromMillis(i,I(o)),a=u||r,{year:m,month:f,day:c}=a,{hour:d,minute:p,second:y,millisecond:v}=t||r;s=a.set({year:m,month:f,day:c,hour:d,minute:p,second:y,millisecond:v})}else{const t=D(k({value:r??Date.now(),max:l,min:i}),o),{year:e,month:n,day:m}=u,{hour:f,minute:c,second:d,millisecond:p}=t;a=!0,s=u.set({year:e,month:n,day:m,hour:f,minute:c,second:d,millisecond:p})}if(!s.isValid)return null;const m=s.toMillis();return a?k({value:m,max:l,min:i}):m}function A(t,e){if(null==t?.value||Array.isArray(t.value))return null;let n=null;return n=x(t)?h.fromFormat(t.value,u,I(e)):m(t.value),n?.isValid?n:null}function U(t){const{max:e,min:n,value:o}=t;return!isNaN(o)&&(!(null!=e&&o>e)&&!(null!=n&&o<n))}function k(t){const{max:n,min:o,value:l}=t;return null!=n&&null!=o?e(l,o,n):null!=n&&l>n?n:null!=o&&l<o?o:l}function E(e){if(!e)return"";const n=e.split(".").at(0);if(!n||n.length<1)throw new t("invalid time-only field",`Cannot parse valid time-only field value from ${e}`);const o=n.split(":"),l=new Array(3);for(let t=0;t<3;t++){const e=o.at(t)??"";l[t]=e.padStart(2,"0")}return l.join(":")}function H(t,e){switch(e){case"date":return t.getTime();case"date-only":return t.toISODate();case"time-only":return E(t.toISOTime(!0,!1));case"timestamp-offset":return t.toISOString(!1);default:return null}}function J(t){return!!t&&"object"==typeof t&&"getTime"in t&&"toISOString"in t&&"timeZone"in t}function R(t){const{type:e,range:n,value:o}=t;if(null==o||!n||o===n.min||o===n.max)return!0;if("date"===e)return U({value:o,min:n.min,max:n.max});const{rawMax:l,rawMin:i}=n;let r=null,u=null,a=null;switch(e){case"date-only":r=c(l),u=c(i),a=c(o);break;case"time-only":r=m(l),u=m(i),a=m(o);break;case"timestamp-offset":r=f(l),u=f(i),a=f(o)}return!a||U({value:a.valueOf(),min:u?.valueOf(),max:r?.valueOf()})}export{H as arcadeDateToFieldValue,k as clampValueToRange,D as createDateTimeFromFieldValue,j as dateFieldsWithStringFieldValue,R as dateTimeIsInRange,M as dateTimeToFieldValue,I as getDefaultLocaleOptions,b as getISOFieldValueFromDateComponents,F as getIntlOptionsForField,T as getLabelForDateFieldValue,A as getLocalDateTimeFromComponent,N as getUnixFieldValueFromDateComponents,J as isArcadeDate,x as isCalciteDateComponent,z as isInDST,E as normalizeTimeOnlyString,g as numberingSystem,V as prepareISOFieldValueForDateComponents,C as prepareUnixFieldValueForDateComponents,Z as timeResolutionToStepMap,U as valueIsInRange};
5
+ import"../../intl.js";import"../../core/has.js";import t from"../../core/Error.js";import{clamp as e}from"../../core/mathUtils.js";import{convertDateFormatToIntlOptions as n,formatTimestamp as o,formatTimeOnly as l,formatDateOnly as r,formatDate as i}from"../../intl/date.js";import{defaultDatePattern as u,TimeStampOffsetPattern as a,defaultTimePattern as s,timeOnlyToDateTime as m,timestampOffsetToDateTime as f,dateOnlyToDateTime as c}from"../../support/dateUtils.js";import{isString as d,isNumber as p}from"../../support/guards.js";import{utc as y}from"../../time/constants.js";import{DateTime as h,FixedOffsetZone as v}from"luxon";import{getLocale as O}from"../../intl/locale.js";const S=y,w={date:null,time:null,timeZoneOffset:null},g=new Map([["hours",3600],["minutes",60],["seconds",1],["deciseconds",.1],["centiseconds",.01],["milliseconds",.001]]),j="latn",x=new Set(["date-only","time-only","timestamp-offset"]),Z=t=>"valueAsDate"in t;function I(t){return{locale:O(),numberingSystem:j,zone:t??S}}function M(t){return t?.isValid?t.toMillis():null}function D(t,e){return null==t?null:h.fromMillis(t,I(e))}function V(t,e){if(null==t||!d(t)||""===t){if(e){const t=h.local({zone:e});return{date:null,time:null,timeZoneOffset:t.isValid?t.offset.toString():null}}return w}const n=h.fromISO(t,{setZone:!0});return{date:n.toFormat(u,I()),time:n.toFormat(a.HMS_MS,I()),timeZoneOffset:n.offset.toString()}}function C(t,e){if(null==t||!p(t)||isNaN(t))return w;const n=D(t,e);return n?{date:n.toFormat(u,I(e)),time:n.toFormat(s,I(e))}:w}function F(t){switch(t.type){case"date":default:return n("short-date-short-time");case"date-only":return n("short-date");case"time-only":return n("short-time");case"timestamp-offset":return{...n("short-date-short-time"),timeZone:void 0,timeZoneName:"short"}}}function T(t,e,n){if(!t||null==e)return null;switch(t.type){case"date":return i(e,n);case"date-only":return r(e,n);case"time-only":return l(e,n);case"timestamp-offset":return o(e,n);default:return null}}function b(t){const{dateComponent:e,defaultTimeZone:n,timeComponent:o,timeZoneComponent:l,oldValue:r}=t;if(!e?.value)return null;const{year:i,month:a,day:s}=h.fromFormat(e.value,u),{hour:m,minute:f,second:c,millisecond:d}=A(o,y)??h.now(),p=V(r,n),O=l?.value?parseInt(l.value,10):null!=p.timeZoneOffset?parseInt(p.timeZoneOffset,10):(new Date).getTimezoneOffset(),S=v.instance(O),w=h.fromObject({year:i,month:a,day:s,hour:m,minute:f,second:c,millisecond:d},{zone:S});return w.isValid?w.toISO({includeOffset:!0}):null}function z(t,e="system"){return h.fromJSDate(t,{zone:e}).isInDST}function N(t){const{dateComponent:e,timeComponent:n,timeZone:o,max:l,min:r,oldValue:i}=t,u=A(e,o);let a=!!t.applyRange;if(!u)return null;let s=null;if(null!=n?.value){const t=A(n,o),e=Date.now(),r=null!=l&&l<e?l:e,i=h.fromMillis(r,I(o)),a=u||i,{year:m,month:f,day:c}=a,{hour:d,minute:p,second:y,millisecond:v}=t||i;s=a.set({year:m,month:f,day:c,hour:d,minute:p,second:y,millisecond:v})}else{const t=D(U({value:i??Date.now(),max:l,min:r}),o),{year:e,month:n,day:m}=u,{hour:f,minute:c,second:d,millisecond:p}=t;a=!0,s=u.set({year:e,month:n,day:m,hour:f,minute:c,second:d,millisecond:p})}if(!s.isValid)return null;const m=s.toMillis();return a?U({value:m,max:l,min:r}):m}function A(t,e){if(null==t?.value||Array.isArray(t.value))return null;let n=null;return n=Z(t)?h.fromFormat(t.value,u,I(e)):m(t.value),n?.isValid?n:null}function k(t){const{max:e,min:n,value:o}=t;return!isNaN(o)&&(!(null!=e&&o>e)&&!(null!=n&&o<n))}function U(t){const{max:n,min:o,value:l}=t;return null!=n&&null!=o?e(l,o,n):null!=n&&l>n?n:null!=o&&l<o?o:l}function E(e){if(!e)return"";const n=e.split(".").at(0);if(!n||n.length<1)throw new t("invalid time-only field",`Cannot parse valid time-only field value from ${e}`);const o=n.split(":"),l=new Array(3);for(let t=0;t<3;t++){const e=o.at(t)??"";l[t]=e.padStart(2,"0")}return l.join(":")}function H(t,e){switch(e){case"date":return t.getTime();case"date-only":return t.toISODate();case"time-only":return E(t.toISOTime(!0,!1));case"timestamp-offset":return t.toISOString(!1);default:return null}}function J(t){return!!t&&"object"==typeof t&&"getTime"in t&&"toISOString"in t&&"timeZone"in t}function R(t){const{type:e,range:n,value:o}=t;if(null==o||!n||o===n.min||o===n.max)return!0;if("date"===e)return k({value:o,min:n.min,max:n.max});const{rawMax:l,rawMin:r}=n;let i=null,u=null,a=null;switch(e){case"date-only":i=c(l),u=c(r),a=c(o);break;case"time-only":i=m(l),u=m(r),a=m(o);break;case"timestamp-offset":i=f(l),u=f(r),a=f(o)}return!a||k({value:a.valueOf(),min:u?.valueOf(),max:i?.valueOf()})}export{H as arcadeDateToFieldValue,U as clampValueToRange,D as createDateTimeFromFieldValue,x as dateFieldsWithStringFieldValue,R as dateTimeIsInRange,M as dateTimeToFieldValue,I as getDefaultLocaleOptions,b as getISOFieldValueFromDateComponents,F as getIntlOptionsForField,T as getLabelForDateFieldValue,A as getLocalDateTimeFromComponent,N as getUnixFieldValueFromDateComponents,J as isArcadeDate,Z as isCalciteDateComponent,z as isInDST,E as normalizeTimeOnlyString,j as numberingSystem,V as prepareISOFieldValueForDateComponents,C as prepareUnixFieldValueForDateComponents,g as timeResolutionToStepMap,k as valueIsInRange};
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1815],{4902:(e,t,i)=>{i.d(t,{A:()=>c});var r=i(90237),o=i(40608);let s=0;const n=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return t=(0,r._)([(0,o.$)("esri.core.Identifiable")],t),t},l=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return t=(0,r._)([(0,o.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let a=class extends(n(class{})){};var u;a=(0,r._)([(0,o.$)("esri.core.Identifiable")],a),(u=a||(a={})).IdentifiableMixin=n,u.NumericIdentifiableMixin=l;const c=a},36708:(e,t,i)=>{i.d(t,{C_:()=>d,OH:()=>y,Vh:()=>v,on:()=>p,pc:()=>f,wB:()=>a,z7:()=>u}),i(60999),i(5503);var r=i(37955),o=i(36563),s=i(97768),n=i(74887),l=i(14012);function a(e,t,i={}){return c(e,t,i,h)}function u(e,t,i={}){return c(e,t,i,g)}function c(e,t,i={},r){let o=null;const n=i.once?(e,i)=>{r(e)&&((0,s.xt)(o),t(e,i))}:(e,i)=>{r(e)&&t(e,i)};if(o=(0,l.Cn)(e,n,i.sync,i.equals),i.initial){const t=e();n(t,t)}return o}function p(e,t,i,n={}){let l=null,u=null,c=null;function p(){l&&u&&(u.remove(),n.onListenerRemove?.(l),l=null,u=null)}function d(e){n.once&&n.once&&(0,s.xt)(c),i(e)}const h=a(e,((e,i)=>{p(),(0,r.wb)(e)&&(l=e,u=(0,r.on)(e,t,d),n.onListenerAdd?.(e))}),{sync:n.sync,initial:!0});return c=(0,o.hA)((()=>{h.remove(),p()})),c}function d(e,t){return function(e,t,i){if((0,n.G4)(i))return Promise.reject((0,n.NK)());const r=e();if(t?.(r))return Promise.resolve(r);let l=null;function a(){l=(0,s.xt)(l)}return new Promise(((r,s)=>{l=(0,o.vE)([(0,n.u7)(i,(()=>{a(),s((0,n.NK)())})),c(e,(e=>{a(),r(e)}),{sync:!1,once:!0},t??h)])}))}(e,g,t)}function h(e){return!0}function g(e){return!!e}i(80559);const y={sync:!0},v={initial:!0},f={sync:!0,initial:!0}},17029:(e,t,i)=>{i.r(t),i.d(t,{default:()=>z});var r,o=i(90237),s=i(78888),n=i(49186),l=i(66552),a=i(92071),u=i(10107),c=(i(44208),i(53966),i(87811),i(40608)),p=i(86738),d=i(16930),h=i(5443),g=i(19419),y=i(4146),v=i(63074),f=i(54310),w=i(25036),b=i(33446),m=i(87045);const M=new(i(72802).U)("0/0/0",0,0,0,void 0);let A=r=class extends((0,v.dM)((0,w.j)((0,f.J)(y.A)))){constructor(){super(...arguments),this.tileInfo=m.A.create({spatialReference:d.A.WebMercator,size:256}),this.type="base-tile",this.fullExtent=new h.A(-20037508.342787,-20037508.34278,20037508.34278,20037508.342787,d.A.WebMercator),this.spatialReference=d.A.WebMercator}addResolvingPromise(e){super.addResolvingPromise(e)}getTileBounds(e,t,i,r){const o=r||(0,g.vt)();return M.level=e,M.row=t,M.col=i,M.extent=o,this.tileInfo.updateTileInfo(M),M.extent=void 0,o}fetchTile(e,t,i,r={}){const{signal:o}=r,n=this.getTileUrl(e,t,i),l={responseType:"image",signal:o,query:{...this.refreshParameters}};return(0,s.A)(n??"",l).then((e=>e.data))}async fetchImageBitmapTile(e,t,i,o={}){const{signal:n}=o;if(this.fetchTile!==r.prototype.fetchTile){const r=await this.fetchTile(e,t,i,o);return(0,b.C)(r,e,t,i,n)}const l=this.getTileUrl(e,t,i)??"",a={responseType:"blob",signal:n,query:{...this.refreshParameters}},{data:u}=await(0,s.A)(l,a);return(0,b.C)(u,e,t,i,n)}getTileUrl(){throw new n.A("basetilelayer:gettileurl-not-implemented","getTileUrl() is not implemented")}};(0,o._)([(0,u.MZ)({type:m.A})],A.prototype,"tileInfo",void 0),(0,o._)([(0,u.MZ)({type:["show","hide"]})],A.prototype,"listMode",void 0),(0,o._)([(0,u.MZ)({readOnly:!0,value:"base-tile"})],A.prototype,"type",void 0),(0,o._)([(0,u.MZ)({nonNullable:!0})],A.prototype,"fullExtent",void 0),(0,o._)([(0,u.MZ)()],A.prototype,"spatialReference",void 0),A=r=(0,o._)([(0,c.$)("esri.layers.BaseTileLayer")],A);const _=A;var x=i(16131),R=i(91806);const T=new l.J({BingMapsAerial:"aerial",BingMapsRoad:"road",BingMapsHybrid:"hybrid"});let j=class extends((0,v.dM)((0,x.q)((0,a.P)(_)))){constructor(e){super(e),this.type="bing-maps",this.tileInfo=new m.A({size:[256,256],dpi:96,origin:new p.A({x:-20037508.342787,y:20037508.342787,spatialReference:d.A.WebMercator}),spatialReference:d.A.WebMercator,lods:[new R.A({level:1,resolution:78271.5169639999,scale:295828763.795777}),new R.A({level:2,resolution:39135.7584820001,scale:147914381.897889}),new R.A({level:3,resolution:19567.8792409999,scale:73957190.948944}),new R.A({level:4,resolution:9783.93962049996,scale:36978595.474472}),new R.A({level:5,resolution:4891.96981024998,scale:18489297.737236}),new R.A({level:6,resolution:2445.98490512499,scale:9244648.868618}),new R.A({level:7,resolution:1222.99245256249,scale:4622324.434309}),new R.A({level:8,resolution:611.49622628138,scale:2311162.217155}),new R.A({level:9,resolution:305.748113140558,scale:1155581.108577}),new R.A({level:10,resolution:152.874056570411,scale:577790.554289}),new R.A({level:11,resolution:76.4370282850732,scale:288895.277144}),new R.A({level:12,resolution:38.2185141425366,scale:144447.638572}),new R.A({level:13,resolution:19.1092570712683,scale:72223.819286}),new R.A({level:14,resolution:9.55462853563415,scale:36111.909643}),new R.A({level:15,resolution:4.77731426794937,scale:18055.954822}),new R.A({level:16,resolution:2.38865713397468,scale:9027.977411}),new R.A({level:17,resolution:1.19432856685505,scale:4513.988705}),new R.A({level:18,resolution:.597164283559817,scale:2256.994353}),new R.A({level:19,resolution:.298582141647617,scale:1128.497176}),new R.A({level:20,resolution:.1492910708238085,scale:564.248588})]}),this.key=null,this.style="road",this.culture="en-US",this.region=null,this.portalUrl=null,this.hasAttributionData=!0}get bingMetadata(){return this._get("bingMetadata")}set bingMetadata(e){this._set("bingMetadata",e)}get copyright(){return null!=this.bingMetadata?this.bingMetadata.copyright:null}get operationalLayerType(){return T.toJSON(this.style)}get bingLogo(){return null!=this.bingMetadata?this.bingMetadata.brandLogoUri:null}load(e){return this.key?this.addResolvingPromise(this._getMetadata()):this.portalUrl?this.addResolvingPromise(this._getPortalBingKey().then((()=>this._getMetadata()))):this.addResolvingPromise(Promise.reject(new n.A("bingmapslayer:load","Bing layer must have bing key."))),Promise.resolve(this)}getTileUrl(e,t,i){if(!this.loaded||null==this.bingMetadata)return null;const r=this.bingMetadata.resourceSets[0].resources[0],o=r.imageUrlSubdomains[t%r.imageUrlSubdomains.length],s=this._getQuadKey(e,t,i);return r.imageUrl.replace("{subdomain}",o).replace("{quadkey}",s)}async fetchAttributionData(){return this.load().then((()=>null==this.bingMetadata?null:{contributors:this.bingMetadata.resourceSets[0].resources[0].imageryProviders.map((e=>({attribution:e.attribution,coverageAreas:e.coverageAreas.map((e=>({zoomMin:e.zoomMin,zoomMax:e.zoomMax,score:1,bbox:[e.bbox[0],e.bbox[1],e.bbox[2],e.bbox[3]]})))})))}))}_getMetadata(){const e={road:"roadOnDemand",aerial:"aerial",hybrid:"aerialWithLabelsOnDemand"}[this.style];return(0,s.A)(`https://dev.virtualearth.net/REST/v1/Imagery/Metadata/${e}`,{responseType:"json",query:{include:"ImageryProviders",uriScheme:"https",key:this.key,suppressStatus:!0,output:"json",culture:this.culture,userRegion:this.region}}).then((e=>{const t=e.data;if(200!==t.statusCode)throw new n.A("bingmapslayer:getmetadata",t.statusDescription);if(this.bingMetadata=t,0===this.bingMetadata.resourceSets.length)throw new n.A("bingmapslayer:getmetadata","no bing resourcesets");if(0===this.bingMetadata.resourceSets[0].resources.length)throw new n.A("bingmapslayer:getmetadata","no bing resources")})).catch((e=>{throw new n.A("bingmapslayer:getmetadata",e.message)}))}_getPortalBingKey(){return(0,s.A)(this.portalUrl??"",{responseType:"json",authMode:"no-prompt",query:{f:"json"}}).then((e=>{if(!e.data.bingKey)throw new n.A("bingmapslayer:getportalbingkey","The referenced Portal does not contain a valid bing key");this.key=e.data.bingKey})).catch((e=>{throw new n.A("bingmapslayer:getportalbingkey",e.message)}))}_getQuadKey(e,t,i){let r="";for(let o=e;o>0;o--){let e=0;const s=1<<o-1;i&s&&(e+=1),t&s&&(e+=2),r+=e.toString()}return r}};(0,o._)([(0,u.MZ)({json:{read:!1,write:!1},value:null})],j.prototype,"bingMetadata",null),(0,o._)([(0,u.MZ)({json:{read:!1,write:!1},value:"bing-maps",readOnly:!0})],j.prototype,"type",void 0),(0,o._)([(0,u.MZ)({type:m.A})],j.prototype,"tileInfo",void 0),(0,o._)([(0,u.MZ)({type:String,readOnly:!0,json:{read:!1,write:!1}})],j.prototype,"copyright",null),(0,o._)([(0,u.MZ)({type:String,json:{write:!1,read:!1}})],j.prototype,"key",void 0),(0,o._)([(0,u.MZ)({type:T.apiValues,nonNullable:!0,json:{read:{source:"layerType",reader:T.read}}})],j.prototype,"style",void 0),(0,o._)([(0,u.MZ)({type:["BingMapsAerial","BingMapsHybrid","BingMapsRoad"]})],j.prototype,"operationalLayerType",null),(0,o._)([(0,u.MZ)({type:String,json:{write:!1,read:!1}})],j.prototype,"culture",void 0),(0,o._)([(0,u.MZ)({type:String,json:{write:!1,read:!1}})],j.prototype,"region",void 0),(0,o._)([(0,u.MZ)({type:String,json:{write:!0,read:!0}})],j.prototype,"portalUrl",void 0),(0,o._)([(0,u.MZ)({type:Boolean,json:{write:!1,read:!1}})],j.prototype,"hasAttributionData",void 0),(0,o._)([(0,u.MZ)({type:String,readOnly:!0})],j.prototype,"bingLogo",null),j=(0,o._)([(0,c.$)("esri.layers.BingMapsLayer")],j);const z=j},91806:(e,t,i)=>{i.d(t,{A:()=>c});var r,o=i(90237),s=i(25482),n=i(10107),l=i(56507),a=(i(44208),i(87811),i(40608));let u=r=class extends s.A{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new r({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,o._)([(0,n.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"cols",void 0),(0,o._)([(0,n.MZ)({type:l.jz,json:{write:!0}})],u.prototype,"level",void 0),(0,o._)([(0,n.MZ)({type:String,json:{write:!0}})],u.prototype,"levelValue",void 0),(0,o._)([(0,n.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"origin",void 0),(0,o._)([(0,n.MZ)({type:Number,json:{write:!0}})],u.prototype,"resolution",void 0),(0,o._)([(0,n.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"rows",void 0),(0,o._)([(0,n.MZ)({type:Number,json:{write:!0}})],u.prototype,"scale",void 0),u=r=(0,o._)([(0,a.$)("esri.layers.support.LOD")],u);const c=u},87045:(e,t,i)=>{i.d(t,{A:()=>x});var r,o=i(90237),s=i(66552),n=i(25482),l=i(83047),a=i(10107),u=i(56507),c=(i(44208),i(87811),i(36005)),p=i(40608),d=i(43937),h=i(86738),g=i(16930),y=i(19419),v=i(21325),f=i(28735),w=i(91806),b=i(72802);const m=new s.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let M=r=class extends n.A{static create(e={}){const{resolutionFactor:t=1,scales:i,size:o=256,spatialReference:s=g.A.WebMercator,numLODs:n=24}=e;if(!(0,v.fn)(s)){const e=[];if(i)for(let t=0;t<i.length;t++){const r=i[t];e.push(new w.A({level:t,scale:r,resolution:r}))}else{let t=5e-4;for(let i=n-1;i>=0;i--)e.unshift(new w.A({level:i,scale:t,resolution:t})),t*=2}return new r({dpi:96,lods:e,origin:new h.A(0,0,s),size:[o,o],spatialReference:s})}const a=(0,v.Vp)(s),u=e.origin?new h.A({x:e.origin.x,y:e.origin.y,spatialReference:s}):new h.A(a?{x:a.origin[0],y:a.origin[1],spatialReference:s}:{x:0,y:0,spatialReference:s}),c=1/(39.37*(0,l.GA)(s)*96),p=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],r=t*c;p.push(new w.A({level:e,scale:t,resolution:r}))}else{let e=(0,v.EA)(s)?512/o*591657527.5917094:256/o*591657527.591555;const i=Math.ceil(n/t);p.push(new w.A({level:0,scale:e,resolution:e*c}));for(let r=1;r<i;r++){const i=e/2**t,o=i*c;p.push(new w.A({level:r,scale:i,resolution:o})),e=i}}return new r({dpi:96,lods:p,origin:u,size:[o,o],spatialReference:s})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,v.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return h.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const r=[],o=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach((e=>{r.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,o[e.level]=e}))),this._set("scales",r),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),r=i+1;return t[i]/(t[i]/t[r])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let r=0;for(;r<i;r++){const i=t[r],o=t[r+1];if(i<=e)return r;if(o===e)return r+1;if(i>e&&o<e)return r+Math.log(i/e)/Math.log(i/o)}return r}tileAt(e,t,i,r){const o=this.lodAt(e);if(!o)return null;let s,n;if("number"==typeof t)s=t,n=i;else if((0,v.aI)(t.spatialReference,this.spatialReference))s=t.x,n=t.y,r=i;else{const e=(0,f.Cv)(t,this.spatialReference);if(null==e)return null;s=e.x,n=e.y,r=i}const l=o.resolution*this.size[0],a=o.resolution*this.size[1];return r||(r=new b.U(null,0,0,0,(0,y.vt)())),r.level=e,r.row=Math.floor((this.origin.y-n)/a+.001),r.col=Math.floor((s-this.origin.x)/l+.001),this.updateTileInfo(r),r}updateTileInfo(e,t=r.ExtrapolateOptions.NONE){let i=this.lodAt(e.level);if(!i&&t===r.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return;const o=e.level-i.level,s=i.resolution*this.size[0]/2**o,n=i.resolution*this.size[1]/2**o;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,y.vt)()),e.extent[0]=this.origin.x+e.col*s,e.extent[1]=this.origin.y-(e.row+1)*n,e.extent[2]=e.extent[0]+s,e.extent[3]=e.extent[1]+n}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const i=this.lodAt(t.level);if(null==i)return null;const{resolution:r}=i,o=r*this.size[0],s=r*this.size[1];return e[0]=this.origin.x+t.col*o,e[1]=this.origin.y-(t.row+1)*s,e[2]=e[0]+o,e[3]=e[1]+s,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return r.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const i=[],o=this.lods.length-t;for(let e=0;e<o;e++){const r=e+t,{scale:o,resolution:s}=r>=0?this.lods[r]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new w.A({level:e,scale:o,resolution:s}))}return new r({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const r=e[i];this._upsampleLevels[r.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/r.resolution:0},t=r}}};var A,_;(0,o._)([(0,a.MZ)({type:Number,json:{write:!0}})],M.prototype,"compressionQuality",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{write:!0}})],M.prototype,"dpi",void 0),(0,o._)([(0,a.MZ)({type:String,json:{read:m.read,write:m.write,origins:{"web-scene":{read:!1,write:!1}}}})],M.prototype,"format",void 0),(0,o._)([(0,a.MZ)({readOnly:!0})],M.prototype,"isWrappable",null),(0,o._)([(0,a.MZ)({type:h.A,json:{write:!0}})],M.prototype,"origin",void 0),(0,o._)([(0,c.w)("origin")],M.prototype,"readOrigin",null),(0,o._)([(0,a.MZ)({type:[w.A],value:null,json:{write:!0}})],M.prototype,"lods",null),(0,o._)([(0,a.MZ)({readOnly:!0})],M.prototype,"scales",void 0),(0,o._)([(0,a.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],M.prototype,"size",void 0),(0,o._)([(0,c.w)("size",["rows","cols"])],M.prototype,"readSize",null),(0,o._)([(0,d.K)("size",{cols:{type:u.jz},rows:{type:u.jz}})],M.prototype,"writeSize",null),(0,o._)([(0,a.MZ)({type:g.A,json:{write:!0}})],M.prototype,"spatialReference",void 0),M=r=(0,o._)([(0,p.$)("esri.layers.support.TileInfo")],M),A=M||(M={}),(_=A.ExtrapolateOptions||(A.ExtrapolateOptions={}))[_.NONE=0]="NONE",_[_.POWER_OF_TWO=1]="POWER_OF_TWO";const x=M},72802:(e,t,i)=>{i.d(t,{U:()=>r});class r{constructor(e,t,i,r,o=void 0){this.id=e,this.level=t,this.row=i,this.col=r,this.extent=o}}},33446:(e,t,i)=>{i.d(t,{C:()=>n,m:()=>s});var r=i(49186),o=i(74887);async function s(e,t,i){let s;try{s=await createImageBitmap(e)}catch(e){throw new r.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,o.Te)(i),s}async function n(e,t,i,s,n){let l;try{l=await createImageBitmap(e)}catch(e){throw new r.A("request:server",`Unable to load tile ${t}/${i}/${s}`,{error:e,level:t,row:i,col:s})}return(0,o.Te)(n),l}},78553:(e,t,i)=>{i.d(t,{D:()=>s,p:()=>o});var r=i(56507);function o(e){const t=(0,r.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function s(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3771],{67482:(e,t,n)=>{function r(e){return null!=i(e)||null!=s(e)}function o(e){return u.test(e)}function a(e){return i(e)??s(e)}function s(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let n=!0;if(c&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,r=0;for(;!t&&r<=e.length;)t=!l.test(e[r]),r++;n=!t}}return n}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function i(e){const t=u.exec(e);if(!t?.groups)return null;const n=t.groups,r=+n.year,o=+n.month-1,a=+n.day,s=+(n.hours??"0"),i=+(n.minutes??"0"),l=+(n.seconds??"0");if(s>23)return null;if(i>59)return null;if(l>59)return null;const c=n.ms??"0",p=c?+c.padEnd(3,"0").slice(0,3):0;let f;if(n.isUTC||!n.offsetSign)f=Date.UTC(r,o,a,s,i,l,p);else{const e=+n.offsetHours,t=+n.offsetMinutes;f=6e4*("+"===n.offsetSign?-1:1)*(60*e+t)+Date.UTC(r,o,a,s,i,l,p)}return Number.isNaN(f)?null:f}n.d(t,{Br:()=>o,Cq:()=>r,_U:()=>a});const u=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,l=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,c=!Number.isNaN(new Date("technology 10").getTime())},33771:(e,t,n)=>{n.r(t),n.d(t,{default:()=>F});var r=n(60999),o=n(49186),a=n(53966),s=n(74887),i=n(67076),u=n(21325),l=n(90708),c=n(58376),p=n(83221),f=n(31464),d=n(19730),y=n(85113),m=n(82832),g=n(34322),h=n(95466),w=n(54218),b=n(56400);const T="esri.layers.WFSLayer";class F{constructor(){this._customParameters=null,this._queryEngine=null,this._supportsPagination=!0}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){const{getFeatureUrl:n,getFeatureOutputFormat:r,fields:a,geometryType:i,featureType:u,maxRecordCount:l,maxTotalRecordCount:c,maxPageCount:y,objectIdField:m,customParameters:w}=e,{spatialReference:T,getFeatureSpatialReference:F}=(0,g.UH)(n,u,e.spatialReference);try{await(0,f.Nk)(F,T)}catch{throw new o.A("unsupported-projection","Projection not supported",{inSpatialReference:F,outSpatialReference:T})}(0,s.Te)(t),this._customParameters=w,this._featureType=u,this._fieldsIndex=h.A.fromLayerJSON({fields:a,dateFieldsTimeReference:a.some((e=>"esriFieldTypeDate"===e.type))?{timeZoneIANA:b.n$}:null}),this._geometryType=i,this._getFeatureUrl=n,this._getFeatureOutputFormat=r,this._getFeatureSpatialReference=F,this._maxRecordCount=l,this._maxTotalRecordCount=c,this._maxPageCount=y,this._objectIdField=m,this._spatialReference=T;let x=await this._snapshotFeatures(t);if(x.errors.length>0&&(this._supportsPagination=!1,x=await this._snapshotFeatures(t),x.errors.length>0))throw x.errors[0];return this._queryEngine=new d.do({fieldsIndex:this._fieldsIndex,geometryType:i,hasM:!1,hasZ:!1,objectIdField:m,spatialReference:T,timeInfo:null,featureStore:new p.A({geometryType:i,hasM:!1,hasZ:!1})}),this._queryEngine.featureStore.addMany(x.features),{warnings:S(x),extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async applyEdits(){throw new o.A("wfs-source:editing-not-supported","applyEdits() is not supported on WFSLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),(await this._queryEngine.executeQueryForIds(e,t.signal)).filter(w.Et)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),(0,c.J)(this._queryEngine,e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){return this._customParameters=e.customParameters,this._maxRecordCount=e.maxRecordCount,this._maxTotalRecordCount=e.maxTotalRecordCount,this._maxPageCount=e.maxPageCount,this._snapshotTask?.abort(),this._snapshotTask=(0,r.UT)((e=>this._snapshotFeatures({signal:e}))),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),this._queryEngine.featureStore.addMany(e.features);for(const t of S(e))a.A.getLogger(T).warn(new i.A("wfs-layer:refresh-warning",t.message,t.details));e.errors?.length&&a.A.getLogger(T).warn(new i.A("wfs-layer:refresh-error","Refresh completed with errors",{errors:e.errors}))}),(()=>{this._queryEngine.featureStore.clear()})),await this._waitSnapshotComplete(),{extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _snapshotFeatures(e){const t=e?.signal,n=this._maxTotalRecordCount,r=this._maxPageCount,o=this._supportsPagination?await(0,g.E)(this._getFeatureUrl,this._featureType.typeName,{customParameters:this._customParameters,signal:t}):void 0;let a=[];const i=[];if(null==o)try{a=await this._singleQuery(t)}catch(e){(0,s.zf)(e)||i.push(e)}else{const e=Math.min(o,n),u=function*(e,t,n){for(let r=0;r<t;r++)yield e._pageQuery(r,n)}(this,Math.max(1,Math.min(Math.ceil(e/this._maxRecordCount),r)),t);await Promise.allSettled(Array.from({length:10}).map((()=>async function(e,t,n){let r=e.next();for(;!r.done;){try{const e=await r.value;t.push(...e)}catch(e){(0,s.zf)(e)||n.push(e)}r=e.next()}}(u,a,i))))}return(0,s.Te)(t),{features:a,totalRecordCount:o,maxTotalRecordCount:n,maxPageCount:r,errors:i}}async _singleQuery(e){const t=await(0,g.x$)(this._getFeatureUrl,this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,signal:e});return this._processGeoJSON(t,{signal:e})}async _pageQuery(e,t){const n=e*this._maxRecordCount,r=await(0,g.x$)(this._getFeatureUrl,this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,startIndex:n,count:this._maxRecordCount,signal:t});return this._processGeoJSON(r,{startIndex:n,signal:t})}_processGeoJSON(e,t){(0,y.sO)(e,this._getFeatureSpatialReference.wkid);const{startIndex:n,signal:r}=t;(0,s.Te)(r);const o=(0,y.bd)(e,{geometryType:this._geometryType,hasZ:!1,objectIdField:this._objectIdField});if(!(0,u.aI)(this._spatialReference,this._getFeatureSpatialReference))for(const e of o)null!=e.geometry&&(e.geometry=(0,l.Ux)((0,f.Cv)((0,l.zv)(e.geometry,this._geometryType,!1,!1),this._getFeatureSpatialReference,this._spatialReference)));let a=n??1;for(const e of o){const t={};(0,m.MB)(this._fieldsIndex,t,e.attributes,!0),e.attributes=t,null==t[this._objectIdField]&&(e.objectId=t[this._objectIdField]=a++)}return o}}function S(e){const t=[];return null!=e.totalRecordCount&&(e.features.length<e.totalRecordCount&&t.push({name:"wfs-layer:maxRecordCount-too-low",message:`Could only fetch ${e.features.length} of ${e.totalRecordCount} in ${e.maxPageCount} queries. Try increasing the value of WFSLayer.maxRecordCount.`,details:{recordCount:e.features.length,totalRecordCount:e.totalRecordCount}}),e.totalRecordCount>e.maxTotalRecordCount&&t.push({name:"wfs-layer:large-dataset",message:`The number of ${e.totalRecordCount} features exceeds the maximum allowed of ${e.maxTotalRecordCount}.`,details:{recordCount:e.features.length,totalRecordCount:e.totalRecordCount,maxTotalRecordCount:e.maxTotalRecordCount}})),t}},85113:(e,t,n)=>{n.d(t,{BM:()=>C,bd:()=>_,sO:()=>x,xD:()=>c});var r=n(67482),o=n(49186),a=n(21325),s=n(43334),i=n(92722),u=n(30524);const l={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function c(e){return l[e]}function*p(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*f(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function d(e){for(const t of e)if(t.length>2)return!0;return!1}function y(e){let t=0;for(let n=0;n<e.length;n++){const r=e[n],o=e[(n+1)%e.length];t+=r[0]*o[1]-o[0]*r[1]}return t<=0}function m(e){const t=e[0],n=e[e.length-1];return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]||e.push(t),e}function g(e,t,n){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,n){return b(e,t.coordinates,n),e}(e,t,n);case"MultiLineString":return function(e,t,n){for(const r of t.coordinates)b(e,r,n);return e}(e,t,n);case"MultiPolygon":return function(e,t,n){for(const r of t.coordinates){h(e,r[0],n);for(let t=1;t<r.length;t++)w(e,r[t],n)}return e}(e,t,n);case"Point":return function(e,t,n){return F(e,t.coordinates,n),e}(e,t,n);case"Polygon":return function(e,t,n){const r=t.coordinates;h(e,r[0],n);for(let t=1;t<r.length;t++)w(e,r[t],n);return e}(e,t,n)}}function h(e,t,n){const r=m(t);!function(e){return!y(e)}(r)?b(e,r,n):T(e,r,n)}function w(e,t,n){const r=m(t);!function(e){return y(e)}(r)?b(e,r,n):T(e,r,n)}function b(e,t,n){for(const r of t)F(e,r,n);e.lengths.push(t.length)}function T(e,t,n){for(let r=t.length-1;r>=0;r--)F(e,t[r],n);e.lengths.push(t.length)}function F(e,t,n){const[r,o,a]=t;e.coords.push(r,o),n.hasZ&&e.coords.push(a||0)}function S(e){switch(typeof e){case"string":return(0,r.Br)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function x(e,t=4326){if(!e)throw new o.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new o.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:n}=e;if(!n)return;const r="string"==typeof n?n:"name"===n.type?n.properties.name:"EPSG"===n.type?n.properties.code:null,s=(0,a.oT)({wkid:t})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${t})$`,"i");if(!r||!s.test(r))throw new o.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:n})}function C(e,t={}){const n=[],r=new Set,o=new Set;let a,s=!1,i=null,l=!1,{geometryType:y=null}=t;for(const t of p(e)){const{geometry:e,properties:p,id:m}=t;if((!e||(y||(y=c(e.type)),c(e.type)===y))&&(s||(s=d(f(e))),l||(l=null!=m,l&&(a=typeof m,p&&(i=Object.keys(p).filter((e=>p[e]===m))))),p&&i&&l&&null!=m&&(i.length>1?i=i.filter((e=>p[e]===m)):1===i.length&&(i=p[i[0]]===m?i:[])),p))for(const e in p){if(r.has(e))continue;const t=S(p[e]);if("unknown"===t){o.add(e);continue}o.delete(e),r.add(e);const a=(0,u.rS)(e);a&&n.push({name:a,alias:e,type:t})}}const m=(0,u.rS)(1===i?.length&&i[0]||null)??void 0;if(m)for(const e of n)if(e.name===m&&(0,u.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:n,geometryType:y,hasZ:s,objectIdFieldName:m,objectIdFieldType:a,unknownFields:Array.from(o)}}function _(e,t){return Array.from(function*(e,t={}){const{geometryType:n,objectIdField:r}=t;for(const o of e){const{geometry:e,properties:a,id:u}=o;if(e&&c(e.type)!==n)continue;const l=a||{};let p;r&&(p=l[r],null==u||p||(l[r]=p=u));const f=new s.Om(e?g(new i.A,e,t):null,l,null,p);yield f}}(p(e),t))}},82832:(e,t,n)=>{n.d(t,{$1:()=>g,CR:()=>m,MB:()=>f,PC:()=>h,Yx:()=>u,bP:()=>c});var r=n(67482),o=n(21325),a=n(30524);class s{constructor(){this.code=null,this.description=null}}class i{constructor(e){this.error=new s,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function u(e){return new i(e)}class l{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function c(e){return new l(e)}const p=new Set;function f(e,t,n,r=!1){p.clear();for(const o in n){const s=e.get(o);if(!s)continue;const i=d(s,n[o]);if(p.add(s.name),s&&(r||s.editable)){const e=(0,a.CJ)(s,i);if(e)return u((0,a.uo)(e,s,i));t[s.name]=i}}for(const t of e.requiredFields??[])if(!p.has(t.name))return u(`missing required field "${t.name}"`);return null}function d(e,t){let n=t;return(0,a.WA)(e)&&"string"==typeof t?n=parseFloat(t):(0,a.yM)(e)&&null!=t&&"string"!=typeof t?n=String(t):(0,a.vE)(e)&&"string"==typeof t&&(n=(0,r._U)(t)),(0,a.WX)(n)}let y;function m(e,t){if(!e||!(0,o.fn)(t))return e;if("rings"in e||"paths"in e){if(null==y)throw new TypeError("geometry engine not loaded");return y.simplify(t,e)}return e}async function g(e,t){!(0,o.fn)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==y&&(y=await Promise.all([n.e(9930),n.e(1275)]).then(n.bind(n,47559))),y}()}const h={supportsAutoIntervalBin:!0,supportsFixedIntervalBin:!0,supportsFixedBoundariesBin:!0,supportsDateBin:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsNormalization:!0,supportedStatisticTypes:["COUNT","SUM","AVG","VAR","STDDEV","MIN","MAX","PERCENTILE_CONT","PERCENTILE_DISC","CentroidAggregate","EnvelopeAggregate","ConvexHullAggregate"],supportedNormalizationTypes:["field","log","naturalLog","percentOfTotal","squareRoot"]}},34322:(e,t,n)=>{n.d(t,{E:()=>V,Fu:()=>N,O8:()=>v,UH:()=>J,YW:()=>O,i5:()=>b,mG:()=>G,x$:()=>D});var r=n(78888),o=n(49186),a=n(5479),s=n(84952),i=n(5443),u=n(57251),l=n(16930),c=n(21325),p=n(50498),f=n(85113),d=n(13043),y=n(60694),m=n(20437),g=n(30524);const h="xlink:href",w="2.0.0",b="__esri_wfs_id__",T="wfs-layer:getWFSLayerTypeInfo-error",F="wfs-layer:empty-service",S="wfs-layer:feature-type-not-found",x="wfs-layer:geojson-not-supported",C="wfs-layer:kvp-encoding-not-supported",_="wfs-layer:malformed-json",R="wfs-layer:unknown-geometry-type",A="wfs-layer:unknown-field-type",P="wfs-layer:unsupported-spatial-reference",E="wfs-layer:unsupported-wfs-version";async function N(e,t){const n=function(e){const t=W(e);(function(e){const t=e.firstElementChild?.getAttribute("version");if(t&&t!==w)throw new o.A(E,`Unsupported WFS version ${t}. Supported version: ${w}`)})(t),z(t);const n=t.firstElementChild,r=(0,a.PP)(function(e){return(0,d.i)(e,{FeatureTypeList:{FeatureType:e=>{const t={typeName:"undefined:undefined",name:"",title:"",description:"",extent:null,namespacePrefix:"",namespaceUri:"",defaultSpatialReference:4326,supportedSpatialReferences:[]},n=new Set;return(0,d.p)(e,{Name:e=>{const{name:n,prefix:r}=B(e.textContent);t.typeName=`${r}:${n}`,t.name=n,t.namespacePrefix=r,t.namespaceUri=e.lookupNamespaceURI(r)},Abstract:e=>{t.description=e.textContent},Title:e=>{t.title=e.textContent},WGS84BoundingBox:e=>{t.extent=i.A.fromJSON(function(e){let t,n,r,o;for(const a of e.children)switch(a.localName){case"LowerCorner":[t,n]=a.textContent.split(" ").map((e=>Number.parseFloat(e)));break;case"UpperCorner":[r,o]=a.textContent.split(" ").map((e=>Number.parseFloat(e)))}return{xmin:t,ymin:n,xmax:r,ymax:o,spatialReference:c.KK}}(e))},DefaultCRS:e=>{const r=j(e);r&&(t.defaultSpatialReference=r,n.add(r))},OtherCRS:e=>{const t=j(e);t&&n.add(t)}}),t.title||(t.title=t.name),n.add(4326),t.supportedSpatialReferences.push(...n),t}}})}(n));return{operations:M(n),get featureTypes(){return Array.from(r())},readFeatureTypes:r}}((await(0,r.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetCapabilities",VERSION:w,...t?.customParameters},signal:t?.signal})).data);return function(e,t){(0,s.m3)(e)&&((0,s.FX)(e,t.operations.DescribeFeatureType.url,!0)&&(t.operations.DescribeFeatureType.url=(0,s.lM)(t.operations.DescribeFeatureType.url)),(0,s.FX)(e,t.operations.GetFeature.url,!0)&&(t.operations.GetFeature.url=(0,s.lM)(t.operations.GetFeature.url)))}(e,n),n}const k=["json","application/json","geojson","application/json; subtype=geojson","application/geo+json"];function I(e){for(const t of k){const n=e.findIndex((e=>e.toLowerCase()===t));if(n>=0)return e[n]}return null}function M(e){let t=!1;const n={GetCapabilities:{url:""},DescribeFeatureType:{url:""},GetFeature:{url:"",outputFormat:null,supportsPagination:!1}},r=[],a=[];if((0,d.p)(e,{OperationsMetadata:{Parameter:e=>{if("outputFormat"===e.getAttribute("name"))return{AllowedValues:{Value:({textContent:e})=>{e&&r.push(e)}}}},Operation:e=>{switch(e.getAttribute("name")){case"GetCapabilities":return{DCP:{HTTP:{Get:e=>{n.GetCapabilities.url=e.getAttribute(h)}}}};case"DescribeFeatureType":return{DCP:{HTTP:{Get:e=>{n.DescribeFeatureType.url=e.getAttribute(h)}}}};case"GetFeature":return{DCP:{HTTP:{Get:e=>{n.GetFeature.url=e.getAttribute(h)}}},Parameter:e=>{if("outputFormat"===e.getAttribute("name"))return{AllowedValues:{Value:({textContent:e})=>{e&&a.push(e)}}}}}}},Constraint:e=>{switch(e.getAttribute("name")){case"KVPEncoding":return{DefaultValue:e=>{t="true"===e.textContent.toLowerCase()}};case"ImplementsResultPaging":return{DefaultValue:e=>{n.GetFeature.supportsPagination="true"===e.textContent.toLowerCase()}}}}}}),n.GetFeature.outputFormat=I(a)??I(r),!t)throw new o.A(C,"WFS service doesn't support key/value pair (KVP) encoding");if(null==n.GetFeature.outputFormat)throw new o.A(x,"WFS service doesn't support GeoJSON output format");return n}function j(e){const t=parseInt(e.textContent?.match(/(?<wkid>\d+$)/i)?.groups?.wkid??"",10);if(!Number.isNaN(t))return t}function G(e,t,n){return(0,a.I6)(e,(e=>n?e.name===t&&e.namespaceUri===n:e.typeName===t||e.name===t))}async function v(e,t,n,r={}){const{featureType:a,extent:s}=await async function(e,t,n,r={}){const a=e.readFeatureTypes(),s=t?G(a,t,n):a.next().value,{spatialReference:i=new l.A({wkid:s?.defaultSpatialReference})}=r;if(null==s)throw t?new o.A(S,`The type '${t}' could not be found in the service`):new o.A(F,"The service is empty");let p=s.extent;if(p&&!(0,c.aI)(p.spatialReference,i))try{await(0,u.initializeProjection)(p.spatialReference,i,void 0,r),p=(0,u.project)(p,i)}catch{throw new o.A(P,"Projection not supported")}return{extent:p,spatialReference:i,featureType:s}}(e,t,n,r),{spatialReference:i}=J(e.operations.GetFeature.url,a,r.spatialReference),{fields:p,geometryType:f,swapXY:d,objectIdField:y,geometryField:m}=await async function(e,t,n,r={}){const{typeName:a}=t,[s,i]=await Promise.allSettled([U(e.operations.DescribeFeatureType.url,a,r),q(e,a,n,r)]),u=e=>new o.A(T,`An error occurred while getting info about the feature type '${a}'`,{error:e});if("rejected"===s.status)throw u(s.reason);if("rejected"===i.status)throw u(i.reason);const{fields:l,errors:c}=s.value??{},p=s.value?.geometryType||i.value?.geometryType,f=i.value?.swapXY??!1;if(null==p)throw new o.A(R,`The geometry type could not be determined for type '${a}`,{typeName:a,geometryType:p,fields:l,errors:c});return{...O(l??[]),geometryType:p,swapXY:f}}(e,a,i,r);return{url:e.operations.GetCapabilities.url,name:a.name,namespaceUri:a.namespaceUri,fields:p,geometryField:m,geometryType:f,objectIdField:y,spatialReference:r.spatialReference??new l.A({wkid:a.defaultSpatialReference}),extent:s,swapXY:d,wfsCapabilities:e,customParameters:r.customParameters}}function O(e){const t=e.find((e=>"geometry"===e.type));let n=e.find((e=>"oid"===e.type));return e=e.filter((e=>"geometry"!==e.type)),n||(n=new m.A({name:b,type:"oid",alias:b}),e.unshift(n)),{geometryField:t?.name??null,objectIdField:n.name,fields:e}}async function q(e,t,n,o={}){let a,s=!1;const[i,u]=await Promise.all([D(e.operations.GetFeature.url,t,n,e.operations.GetFeature.outputFormat,{...o,count:1}),(0,r.A)(e.operations.GetFeature.url,{responseType:"text",query:L(t,n,void 0,{...o,count:1}),signal:o?.signal})]),l="FeatureCollection"===i.type&&i.features[0]?.geometry;if(l){let e;switch(a=p.gy.fromJSON((0,f.xD)(l.type)),l.type){case"Point":e=l.coordinates;break;case"LineString":case"MultiPoint":e=l.coordinates[0];break;case"MultiLineString":case"Polygon":e=l.coordinates[0][0];break;case"MultiPolygon":e=l.coordinates[0][0][0]}const t=/<[^>]*pos[^>]*> *(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/.exec(u.data);if(t){const n=e[0].toFixed(3),r=e[1].toFixed(3),o=parseFloat(t[1]).toFixed(3);n===parseFloat(t[2]).toFixed(3)&&r===o&&(s=!0)}}return{geometryType:a,swapXY:s}}async function U(e,t,n){return function(e,t){const{name:n}=B(e),r=W(t);z(r);const s=(0,a.I6)((0,d.i)(r.firstElementChild,{element:e=>e}),(e=>e.getAttribute("name")===n));if(null!=s){const e=s.getAttribute("type"),t=e?(0,a.I6)((0,d.i)(r.firstElementChild,{complexType:e=>e}),(t=>t.getAttribute("name")===B(e).name)):(0,a.I6)((0,d.i)(s,{complexType:e=>e}),(()=>!0));if(t)return function(e){const t=[],n=[];let r;const a=(0,d.i)(e,{complexContent:{extension:{sequence:{element:e=>e}}}});for(const s of a){const a=s.getAttribute("name");if(!a)continue;let i,u;if(s.hasAttribute("type")?i=B(s.getAttribute("type")).name:(0,d.p)(s,{simpleType:{restriction:e=>(i=B(e.getAttribute("base")).name,{maxLength:e=>{u=+e.getAttribute("value")}})}}),!i)continue;const l="true"===s.getAttribute("nillable");let c=!1;switch(i.toLowerCase()){case"integer":case"nonpositiveinteger":case"negativeinteger":case"long":case"int":case"short":case"byte":case"nonnegativeinteger":case"unsignedlong":case"unsignedint":case"unsignedshort":case"unsignedbyte":case"positiveinteger":n.push(new m.A({name:a,alias:a,type:"integer",nullable:l,length:(0,g._b)("integer")}));break;case"float":case"double":case"decimal":n.push(new m.A({name:a,alias:a,type:"double",nullable:l,length:(0,g._b)("double")}));break;case"boolean":case"string":case"gyearmonth":case"gyear":case"gmonthday":case"gday":case"gmonth":case"anyuri":case"qname":case"notation":case"normalizedstring":case"token":case"language":case"idrefs":case"entities":case"nmtoken":case"nmtokens":case"name":case"ncname":case"id":case"idref":case"entity":case"duration":case"time":n.push(new m.A({name:a,alias:a,type:"string",nullable:l,length:u??(0,g._b)("string")}));break;case"datetime":case"date":n.push(new m.A({name:a,alias:a,type:"date",nullable:l,length:u??(0,g._b)("date")}));break;case"pointpropertytype":r="point",c=!0;break;case"multipointpropertytype":r="multipoint",c=!0;break;case"curvepropertytype":case"multicurvepropertytype":case"multilinestringpropertytype":r="polyline",c=!0;break;case"surfacepropertytype":case"multisurfacepropertytype":case"multipolygonpropertytype":r="polygon",c=!0;break;case"geometrypropertytype":case"multigeometrypropertytype":c=!0,t.push(new o.A(R,`geometry type '${i}' is not supported`,{type:(new XMLSerializer).serializeToString(e)}));break;default:t.push(new o.A(A,`Unknown field type '${i}'`,{type:(new XMLSerializer).serializeToString(e)}))}c&&n.push(new m.A({name:a,alias:a,type:"geometry",nullable:l}))}for(const e of n)if("integer"===e.type&&!e.nullable&&$.has(e.name.toLowerCase())){e.type="oid";break}return{geometryType:r,fields:n,errors:t}}(t)}throw new o.A(S,`Type '${e}' not found in document`,{document:(new XMLSerializer).serializeToString(r)})}(t,(await(0,r.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"DescribeFeatureType",VERSION:w,TYPENAME:t,TYPENAMES:t,...n?.customParameters},signal:n?.signal})).data)}const $=new Set(["objectid","fid"]);async function D(e,t,n,a,s){let{data:i}=await(0,r.A)(e,{responseType:"text",query:L(t,n,a,s),signal:s?.signal});i=i.replaceAll(/": +(-?\d+),(\d+)(,)?/g,'": $1.$2$3');try{return JSON.parse(i)}catch(e){throw new o.A(_,"Error while parsing the response",{response:i,error:e})}}function L(e,t,n,r){const o="number"==typeof t?t:t.wkid;return{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:w,TYPENAMES:e,OUTPUTFORMAT:n,SRSNAME:"EPSG:"+o,STARTINDEX:r?.startIndex,COUNT:r?.count,...r?.customParameters}}async function V(e,t,n){const o=await(0,r.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:w,TYPENAMES:t,RESULTTYPE:"hits",...n?.customParameters},signal:n?.signal}),a=/numberMatched=["'](?<numberMatched>\d+)["']/gi.exec(o.data);if(a?.groups)return+a.groups.numberMatched}function W(e){return(new DOMParser).parseFromString(e.trim(),"text/xml")}function B(e){const[t,n]=e.split(":");return{prefix:n?t:"",name:n??t}}function z(e){let t="",n="";if((0,d.p)(e.firstElementChild,{Exception:e=>(t=e.getAttribute("exceptionCode"),{ExceptionText:e=>{n=e.textContent}})}),t)throw new o.A(`wfs-layer:${t}`,n)}function J(e,t,n){const r={wkid:t.defaultSpatialReference},o=null!=n?.wkid?{wkid:n.wkid}:r;return{spatialReference:o,getFeatureSpatialReference:(0,y.Fi)(e)||o.wkid&&t.supportedSpatialReferences.includes(o.wkid)?{wkid:o.wkid}:{wkid:t.defaultSpatialReference}}}},13043:(e,t,n)=>{function r(e,t){if(e&&t)for(const n of e.children)if(n.localName in t){const e=t[n.localName];if("function"==typeof e){const t=e(n);t&&r(n,t)}else r(n,e)}}function*o(e,t){for(const n of e.children)if(n.localName in t){const e=t[n.localName];"function"==typeof e?yield e(n):yield*o(n,e)}}n.d(t,{i:()=>o,p:()=>r})}}]);