@arcgis/core 5.2.0-next.81 → 5.2.0-next.83

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 (269) hide show
  1. package/assets/components/assets/icon/deleteAndReplaceFeatures16.json +1 -0
  2. package/assets/components/assets/icon/deleteAndReplaceFeatures24.json +1 -0
  3. package/assets/components/assets/icon/deleteAndReplaceFeatures32.json +1 -0
  4. package/assets/components/assets/icon/moveAndRotate16.json +1 -0
  5. package/assets/components/assets/icon/moveAndRotate24.json +1 -0
  6. package/assets/components/assets/icon/moveAndRotate32.json +1 -0
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/{88d6a7ebded4d359deb0.js → 027af54888befb209aaa.js} +1 -1
  9. package/assets/esri/core/workers/chunks/028bee58f7bc19e5e39e.js +1 -0
  10. package/assets/esri/core/workers/chunks/{9bd4cda90daf90189bfc.js → 03895d49fbd34ccb3ead.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{694216224d5fd3a8956d.js → 04f5ff688785a4bd3b03.js} +1 -1
  12. package/assets/esri/core/workers/chunks/0775d1e3034d5e7ef7bc.js +1 -0
  13. package/assets/esri/core/workers/chunks/{3adba34224cba869a39c.js → 10ac92dcd3738ec23dfb.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{4a537054c99cbc492715.js → 11d911f70bf0ca252c19.js} +1 -1
  15. package/assets/esri/core/workers/chunks/1354b8442c2c501238f1.js +1 -0
  16. package/assets/esri/core/workers/chunks/{95ff342e5c29bf91a765.js → 13a43c87d7952facbed4.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{8cfe817299eb16cb2664.js → 1438f571f738e83b4d1c.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{bfd532e33800755b1f48.js → 14511c92cbbc26d80c86.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{e59101f1d060d0a30a65.js → 14def8f47ae7265dd71b.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{fbb0b2f4ec0ba458ddeb.js → 19dac19122eeeb5e36b2.js} +1 -1
  21. package/assets/esri/core/workers/chunks/1b00789511c9b27da4a7.js +1 -0
  22. package/assets/esri/core/workers/chunks/1b277311a4beb4243bf8.js +2 -0
  23. package/assets/esri/core/workers/chunks/1d03db4df18524cf391c.js +1 -0
  24. package/assets/esri/core/workers/chunks/{f71a3fe5f30aa782193a.js → 20db27d9828397d0b37a.js} +1 -1
  25. package/assets/esri/core/workers/chunks/24bfe759c8848143361e.js +1 -0
  26. package/assets/esri/core/workers/chunks/{b3081c0b037abc49d09b.js → 26c12804a0d801df29bf.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{8006ffa263fb8016afdb.js → 26c8ed0aef59ed6d5267.js} +1 -1
  28. package/assets/esri/core/workers/chunks/2d1c0d80a9843567df8d.js +1 -0
  29. package/assets/esri/core/workers/chunks/{2b79b376b0d60d2f0d5c.js → 2d6e1bf7c1981bed4357.js} +1 -1
  30. package/assets/esri/core/workers/chunks/30dade7bf6032be32599.js +2 -0
  31. package/assets/esri/core/workers/chunks/{7028671ffdaafe2725bc.js → 33aaa5a49e396a0aca47.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{dcec7fc66385c12ecdf0.js → 33dc93d82407052fafe1.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{578904043e873424904c.js → 3a6990058f1003bd2812.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{0fd7590e545864f5fff4.js → 3ca0d503ce733088a6c2.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{bfac0f47e81055585002.js → 3f0625c31dd46b563160.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{9a5894e8ebdf0e97b98f.js → 43122c435497228a7583.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{8fff4a41a54d39db470a.js → 44d13f65465646e5f6e9.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{9c17bfbfc347ac289b6e.js → 463b7952a4825541eb13.js} +1 -1
  39. package/assets/esri/core/workers/chunks/46b3d6814ba4c0a71111.js +1 -0
  40. package/assets/esri/core/workers/chunks/49784f8e8e5fac0cc5a9.js +1 -0
  41. package/assets/esri/core/workers/chunks/{1ed6a8bb415999c4e8a6.js → 4cf2c33494cb75942511.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{d8b38c196b06e801c4e6.js → 5156d94f01b4fbbf8cde.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{6c372d85b5783dd2a793.js → 52042fd36f4a572938f0.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{e8a9a686a3c23afc9d1f.js → 5568448e7f51508ffdf5.js} +1 -1
  45. package/assets/esri/core/workers/chunks/58e4aecabca047f1d229.js +1 -0
  46. package/assets/esri/core/workers/chunks/598221c7054415b84904.js +1 -0
  47. package/assets/esri/core/workers/chunks/{89df303abcbc0167e4d2.js → 5a006ff759fad9fc25cb.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{218ddad849745d652a28.js → 5a3c1fe24814a345ab39.js} +1 -1
  49. package/assets/esri/core/workers/chunks/5b292831127bf981c1c5.js +1 -0
  50. package/assets/esri/core/workers/chunks/{40ebe69b08ea54e0e780.js → 5b60fc95757b2a53558a.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{c336f300fe6100e36592.js → 5c634b3e6dc76299b1df.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{5a67bd724aa7fcdebe16.js → 5d30accf1dcda0c70f95.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{dbca32f0e0c2c2e2ccf3.js → 5f13ade03500b39c1720.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{8d16d53643dd8d489c25.js → 605da92d28e067f4a4c6.js} +1 -1
  55. package/assets/esri/core/workers/chunks/6154f4d39f9e53fe56cc.js +1 -0
  56. package/assets/esri/core/workers/chunks/62b116307483d5f0e37d.js +2 -0
  57. package/assets/esri/core/workers/chunks/6433a623af765b7e53ab.js +1 -0
  58. package/assets/esri/core/workers/chunks/{5c9a398e659ecd427fb5.js → 657528eb6a3d3b3cb631.js} +1 -1
  59. package/assets/esri/core/workers/chunks/65eff0ae773505495f21.js +1 -0
  60. package/assets/esri/core/workers/chunks/{d845f2115848b56c0369.js → 66292e98b4111ea3658d.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{f57e5e7d0748d9a370f7.js → 680496660b2aaa710099.js} +1 -1
  62. package/assets/esri/core/workers/chunks/6d11b922898a8039dbe7.js +1 -0
  63. package/assets/esri/core/workers/chunks/{fbcc346fa603d6edac98.js → 6db4a4f9a9ce7cc738d0.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{a9e944f28bd573c8230d.js → 6eb28086dc28f6d144ec.js} +1 -1
  65. package/assets/esri/core/workers/chunks/7188559a685e0ba30c4f.js +1 -0
  66. package/assets/esri/core/workers/chunks/{a3cbd3e983e21f40b253.js → 724b2631c9ced80a1661.js} +1 -1
  67. package/assets/esri/core/workers/chunks/7493ce5d02224c07a6d5.js +1 -0
  68. package/assets/esri/core/workers/chunks/7ad70c8a56f2481adc82.js +1 -0
  69. package/assets/esri/core/workers/chunks/7bd8ebb321ecf1f06496.js +1 -0
  70. package/assets/esri/core/workers/chunks/7ca188f824956a5cac35.js +2 -0
  71. package/assets/esri/core/workers/chunks/{d0aaa4ad7f76f577f117.js → 7d5877eede2f552dea9f.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{bf5831a7c12b1e42c669.js → 83a77d3f45c8c21cec45.js} +1 -1
  73. package/assets/esri/core/workers/chunks/852649460d664b0a1a1d.js +1 -0
  74. package/assets/esri/core/workers/chunks/{d62a5a33a24418a3e283.js → 88771a75adcbd54c4fac.js} +1 -1
  75. package/assets/esri/core/workers/chunks/{37fb38db03cb39e3c342.js → 8c6a60d96c73982febd2.js} +1 -1
  76. package/assets/esri/core/workers/chunks/{e63f94c8097555b266ad.js → 8e1b913067b8e88ff365.js} +2 -2
  77. package/assets/esri/core/workers/chunks/{6065caa7981cef255277.js → 911f3a1b8dd4bc5c9782.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{70c371c9f133ab9f7925.js → 918577ea025f67ebe372.js} +1 -1
  79. package/assets/esri/core/workers/chunks/{e3eab61815ef1c521a6c.js → 9568932bafe689c38f63.js} +1 -1
  80. package/assets/esri/core/workers/chunks/{e72fa08b0bd324514a0e.js → 996ac351e2322298a17d.js} +1 -1
  81. package/assets/esri/core/workers/chunks/99966339b061eb9945b8.js +1 -0
  82. package/assets/esri/core/workers/chunks/{d1baf17f3219f70106f7.js → 9be05d32528b395a7d34.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{552d6aecc7d88d16227b.js → 9d41c02601d0bb75b525.js} +1 -1
  84. package/assets/esri/core/workers/chunks/{64a1ffc221e5b63b43fb.js → a4bb0951e1389e7b803c.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{74cd17aca5f7e0caac90.js → a9a1061cdf82b372835f.js} +1 -1
  86. package/assets/esri/core/workers/chunks/{d2448e26e19005ef9ab2.js → aabffe53508730e504ec.js} +1 -1
  87. package/assets/esri/core/workers/chunks/{82da6d98bd4980a3d454.js → af88f8dd1a53e4740aa6.js} +1 -1
  88. package/assets/esri/core/workers/chunks/b61c30cdf698b4d1573a.js +1 -0
  89. package/assets/esri/core/workers/chunks/{61190c833791f0833a39.js → b7bcc2d0b0fa8e703c83.js} +1 -1
  90. package/assets/esri/core/workers/chunks/{37a121316d114999ac70.js → ba67aaa08e4f11e1140a.js} +1 -1
  91. package/assets/esri/core/workers/chunks/bbb97c38d8670329d07e.js +2 -0
  92. package/assets/esri/core/workers/chunks/{5d50a030bf9f4e94f69d.js → bbeb61d9302323bae9fb.js} +1 -1
  93. package/assets/esri/core/workers/chunks/bd8b483e70acf0fc601e.js +1 -0
  94. package/assets/esri/core/workers/chunks/bef32acf368b4d5aba37.js +1 -0
  95. package/assets/esri/core/workers/chunks/c1f125594e684c1b4ffc.js +1 -0
  96. package/assets/esri/core/workers/chunks/c90dfdf2302b7db1f6f7.js +1 -0
  97. package/assets/esri/core/workers/chunks/{09f0805b32e6cab980e6.js → cc1a00694cc9f7c606d6.js} +1 -1
  98. package/assets/esri/core/workers/chunks/{8a36b999cbd65dd2f16c.js → d8c3bdc3c6be8ba7c5e6.js} +1 -1
  99. package/assets/esri/core/workers/chunks/{bc30c0de6dcb106b24a1.js → da233362b06b6db375f1.js} +1 -1
  100. package/assets/esri/core/workers/chunks/{ce81f29134ab3971bd54.js → dd91824692bec809909c.js} +1 -1
  101. package/assets/esri/core/workers/chunks/{f9e9e79f78be32e5d475.js → e706c37b44e98fbcb5f7.js} +1 -1
  102. package/assets/esri/core/workers/chunks/ef269dd559c1c79957e5.js +1 -0
  103. package/assets/esri/core/workers/chunks/{4a6158994a8cc8b8664f.js → f0692e10af5983f6ad93.js} +1 -1
  104. package/assets/esri/core/workers/chunks/{40b842d055b87e442156.js → f20b88f5a6d3b988a055.js} +1 -1
  105. package/assets/esri/core/workers/chunks/{fae32c9ce811934b6a64.js → f6ae0c483579e227a2f2.js} +1 -1
  106. package/assets/esri/core/workers/chunks/{4c15551e33a3c6cda61d.js → f762f0f6c83748d8e328.js} +1 -1
  107. package/assets/esri/core/workers/chunks/{4eaa93859ceec1b38530.js → fa29b5064d6626cfc019.js} +1 -1
  108. package/assets/esri/core/workers/chunks/fcf7299e2ee904ab9882.js +1 -0
  109. package/assets/esri/core/workers/chunks/{388b71211a0ad5cbd6b9.js → fe06cc2f90b2d551e4c1.js} +1 -1
  110. package/assets/esri/core/workers/chunks/{86035e46777ed896c658.js → ffad5fd9c5e98f4fe2c3.js} +1 -1
  111. package/assets/esri/geometry/support/pe-wasm.wasm +0 -0
  112. package/chunks/Bufferer-CclWhXVb.js +1 -1
  113. package/chunks/Distance2DCalculator-DjIp2uQi.js +1 -1
  114. package/chunks/EmissionComposite.glsl.js +7 -1
  115. package/chunks/GeodeticDistanceCalculator-zRp89-dW.js +1 -1
  116. package/chunks/GeodeticUtils.js +1 -1
  117. package/chunks/GeographicTransformation.js +2 -0
  118. package/chunks/Geometry.js +1 -1
  119. package/chunks/MultiPathImpl.js +1 -1
  120. package/chunks/OperatorCrosses.js +1 -1
  121. package/chunks/OperatorCut.js +1 -1
  122. package/chunks/OperatorGeodesicBuffer.js +1 -1
  123. package/chunks/OperatorGeodeticArea.js +1 -1
  124. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  125. package/chunks/OperatorGeodeticLength.js +1 -1
  126. package/chunks/OperatorGraphicBuffer.js +1 -1
  127. package/chunks/OperatorIntegrate.js +1 -1
  128. package/chunks/OperatorIntersects.js +1 -1
  129. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  130. package/chunks/OperatorOverlaps.js +1 -1
  131. package/chunks/OperatorProximity.js +1 -1
  132. package/chunks/OperatorProximityGeodesic.js +1 -1
  133. package/chunks/OperatorShapePreservingLength.js +1 -1
  134. package/chunks/OperatorShapePreservingProject.js +1 -1
  135. package/chunks/OperatorSimplifyOGC.js +1 -1
  136. package/chunks/OperatorTouches.js +1 -1
  137. package/chunks/OperatorWithin.js +1 -1
  138. package/chunks/Point2D.js +1 -1
  139. package/chunks/ProjectionTransformation.js +1 -1
  140. package/chunks/SideCalculator2D-DX0718xq.js +1 -1
  141. package/chunks/UnitFactory.js +1 -1
  142. package/chunks/containsOperator.js +1 -1
  143. package/chunks/disjointOperator.js +1 -1
  144. package/chunks/equalsOperator.js +1 -1
  145. package/chunks/pe-wasm.js +1 -1
  146. package/chunks/relateOperator.js +1 -1
  147. package/config.js +1 -1
  148. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  149. package/geometry/operators/gx/operatorBuffer.js +1 -1
  150. package/geometry/operators/gx/operatorDifference.js +1 -1
  151. package/geometry/operators/gx/operatorIntersection.js +1 -1
  152. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  153. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  154. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  155. package/geometry/operators/gx/operatorSimplify.js +1 -1
  156. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  157. package/geometry/operators/gx/operatorUnion.js +1 -1
  158. package/geometry/operators/json/containsOperator.js +1 -1
  159. package/geometry/operators/json/disjointOperator.js +1 -1
  160. package/geometry/operators/reshapeOperator.js +1 -1
  161. package/geometry/operators/support/GeographicTransformation.d.ts +7 -0
  162. package/geometry/operators/support/GeographicTransformation.js +1 -1
  163. package/geometry/operators/support/GeographicTransformationStep.d.ts +7 -1
  164. package/geometry/operators/support/GeographicTransformationStep.js +1 -1
  165. package/geometry/operators/support/geographicTransformationUtils.d.ts +13 -2
  166. package/geometry/operators/support/geographicTransformationUtils.js +1 -1
  167. package/geometry/operators/support/jsonConverter.js +1 -1
  168. package/geometry/operators/support/projectionTransformation.js +1 -1
  169. package/geometry/support/spatialReferenceUtils.js +1 -1
  170. package/kernel.js +1 -1
  171. package/layers/raster/types.d.ts +1 -1
  172. package/layers/support/AggregateField.d.ts +9 -3
  173. package/layers/support/FeatureReductionCluster.d.ts +16 -6
  174. package/layers/support/I3SExtractChanges.js +2 -0
  175. package/package.json +4 -4
  176. package/renderers/UniqueValueRenderer.js +1 -1
  177. package/renderers/support/AuthoringInfo.d.ts +8 -3
  178. package/support/revision.js +1 -1
  179. package/views/2d/engine/vectorTiles/buckets/SymbolBucket.js +1 -1
  180. package/views/2d/engine/vectorTiles/style/GeoJSONLabelUtils.js +2 -0
  181. package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
  182. package/views/2d/engine/vectorTiles/style/StyleRepository.js +1 -1
  183. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
  184. package/views/2d/layers/MediaLayerView2D.js +1 -1
  185. package/views/3d/GroundView3D.js +1 -1
  186. package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +1 -1
  187. package/views/3d/analysis/LineOfSight/LineOfSightDrawToolRenderer.js +1 -1
  188. package/views/3d/analysis/LineOfSight/LineOfSightEditTool.js +1 -1
  189. package/views/3d/analysis/LineOfSight/LineOfSightInteractionVisuals.js +1 -1
  190. package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +1 -1
  191. package/views/3d/analysis/LineOfSight/LineOfSightObserverPlugin.js +1 -1
  192. package/views/3d/analysis/LineOfSight/LineOfSightPlacementLeafPlugin.js +1 -1
  193. package/views/3d/analysis/LineOfSight/LineOfSightRootPlugin.js +1 -1
  194. package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
  195. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  196. package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
  197. package/views/3d/input/SceneInputManager.js +1 -1
  198. package/views/3d/input/handlers/PinchAndPanNavigation.js +1 -1
  199. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  200. package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
  201. package/views/3d/layers/I3SMeshView3D.js +1 -1
  202. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  203. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  204. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  205. package/views/3d/layers/SceneLayerView3D.js +1 -1
  206. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  207. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  208. package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
  209. package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
  210. package/views/3d/state/utils/navigationUtils.js +1 -1
  211. package/views/3d/support/GroundAndIMSurface.js +2 -0
  212. package/views/3d/support/PBFDecoder.js +1 -1
  213. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  214. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  215. package/views/3d/support/pointsOfInterest/PointOfInterest.js +1 -1
  216. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  217. package/views/3d/terrain/OverlayManager.js +1 -1
  218. package/views/3d/webgl-engine/Stage.js +1 -1
  219. package/views/3d/webgl-engine/lib/EmissionComposite.glsl.js +1 -1
  220. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  221. package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
  222. package/views/MapView.d.ts +0 -60
  223. package/views/SceneView.js +1 -1
  224. package/views/View2D.d.ts +59 -1
  225. package/views/draw/support/PluginContext.js +1 -1
  226. package/views/draw/support/managers/InteractiveHandleManager.js +1 -1
  227. package/views/draw/support/types.d.ts +6 -0
  228. package/views/interactive/interactiveToolUtils.js +1 -1
  229. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  230. package/widgets/Legend/support/utils.js +1 -1
  231. package/widgets/Widget.js +1 -1
  232. package/widgets/support/jsxWidgetSupport.js +1 -1
  233. package/assets/esri/core/workers/chunks/0dcfd82a2669df6eb5a0.js +0 -1
  234. package/assets/esri/core/workers/chunks/177c3b23c1cbd4737049.js +0 -1
  235. package/assets/esri/core/workers/chunks/21f763694a41968ac21a.js +0 -1
  236. package/assets/esri/core/workers/chunks/230925079cee040a8d77.js +0 -1
  237. package/assets/esri/core/workers/chunks/25696c194457e42b3bdc.js +0 -1
  238. package/assets/esri/core/workers/chunks/2f3525df00fb265661fc.js +0 -1
  239. package/assets/esri/core/workers/chunks/453c69879f4b82ba13a1.js +0 -1
  240. package/assets/esri/core/workers/chunks/4f36596280142be1c666.js +0 -1
  241. package/assets/esri/core/workers/chunks/53d80202b5f43542d45b.js +0 -1
  242. package/assets/esri/core/workers/chunks/540a3685e614bb006744.js +0 -1
  243. package/assets/esri/core/workers/chunks/61312d3b5477ed9d87d9.js +0 -2
  244. package/assets/esri/core/workers/chunks/6f08c8a1e8e3ffd0a96a.js +0 -1
  245. package/assets/esri/core/workers/chunks/71ee7c51d2c60a180f1e.js +0 -1
  246. package/assets/esri/core/workers/chunks/856dba96332509fb1d7a.js +0 -2
  247. package/assets/esri/core/workers/chunks/9234a293d61e134f121f.js +0 -1
  248. package/assets/esri/core/workers/chunks/927582ec15bff2acbb49.js +0 -1
  249. package/assets/esri/core/workers/chunks/95b9eaf7a49eeb17e62f.js +0 -1
  250. package/assets/esri/core/workers/chunks/973440553c9e058b0132.js +0 -1
  251. package/assets/esri/core/workers/chunks/98739b6e7904045edbab.js +0 -1
  252. package/assets/esri/core/workers/chunks/a69c10bfd632a5546b34.js +0 -1
  253. package/assets/esri/core/workers/chunks/c5853fbb975e169c44c5.js +0 -1
  254. package/assets/esri/core/workers/chunks/c899457f19b749516275.js +0 -1
  255. package/assets/esri/core/workers/chunks/d4b78d11a5ce4320a29a.js +0 -1
  256. package/assets/esri/core/workers/chunks/da0ef984509057ec8507.js +0 -1
  257. package/assets/esri/core/workers/chunks/e2473de49189d93714d3.js +0 -1
  258. package/assets/esri/core/workers/chunks/eca0736953a20cfc64ad.js +0 -2
  259. package/assets/esri/core/workers/chunks/efd176c5ac35f313e7a2.js +0 -1
  260. package/assets/esri/core/workers/chunks/f2d99f693a590f384315.js +0 -1
  261. package/assets/esri/core/workers/chunks/fc2234e0d202631f3abf.js +0 -2
  262. package/assets/esri/core/workers/chunks/fcb943c3b31b1bf62e65.js +0 -2
  263. package/assets/esri/core/workers/chunks/ffe2cbfea38b92a231d6.js +0 -1
  264. /package/assets/esri/core/workers/chunks/{eca0736953a20cfc64ad.js.LICENSE.txt → 1b277311a4beb4243bf8.js.LICENSE.txt} +0 -0
  265. /package/assets/esri/core/workers/chunks/{856dba96332509fb1d7a.js.LICENSE.txt → 30dade7bf6032be32599.js.LICENSE.txt} +0 -0
  266. /package/assets/esri/core/workers/chunks/{fc2234e0d202631f3abf.js.LICENSE.txt → 62b116307483d5f0e37d.js.LICENSE.txt} +0 -0
  267. /package/assets/esri/core/workers/chunks/{61312d3b5477ed9d87d9.js.LICENSE.txt → 7ca188f824956a5cac35.js.LICENSE.txt} +0 -0
  268. /package/assets/esri/core/workers/chunks/{e63f94c8097555b266ad.js.LICENSE.txt → 8e1b913067b8e88ff365.js.LICENSE.txt} +0 -0
  269. /package/assets/esri/core/workers/chunks/{fcb943c3b31b1bf62e65.js.LICENSE.txt → bbb97c38d8670329d07e.js.LICENSE.txt} +0 -0
@@ -13,6 +13,7 @@
13
13
  import type Extent from "../../Extent.js";
14
14
  import type SpatialReference from "../../SpatialReference.js";
15
15
  import type GeographicTransformation from "./GeographicTransformation.js";
16
+ import type GeographicTransformationStep from "./GeographicTransformationStep.js";
16
17
 
17
18
  /**
18
19
  * Indicates if all dependencies of this module have been loaded.
@@ -48,6 +49,7 @@ export function load(): Promise<void>;
48
49
  * @param outSpatialReference - The spatial reference to which you are converting the geometries.
49
50
  * @param areaOfInterestExtent - An extent used to determine the suitability of the returned transformation.
50
51
  * The extent's spatial reference should be the same as `inSpatialReference`.
52
+ * @param returnUnusable - todoc
51
53
  * @returns Returns the default geographic transformation for the given parameters.
52
54
  * If no transformation is required or there are no suitable transformations, then `null` is returned.
53
55
  * @example
@@ -73,7 +75,7 @@ export function load(): Promise<void>;
73
75
  *
74
76
  * const geogtrans = projection.getTransformation(cs1, cs2, extent);
75
77
  */
76
- export function getTransformation(inSpatialReference: SpatialReference, outSpatialReference: SpatialReference, areaOfInterestExtent?: Extent | null): GeographicTransformation | null | undefined;
78
+ export function getTransformation(inSpatialReference: SpatialReference, outSpatialReference: SpatialReference, areaOfInterestExtent?: Extent | null, returnUnusable?: boolean): GeographicTransformation | null | undefined;
77
79
 
78
80
  /**
79
81
  * Returns a list of all equation-based, geographic transformations suitable to convert geometries from the input spatial reference
@@ -92,6 +94,7 @@ export function getTransformation(inSpatialReference: SpatialReference, outSpati
92
94
  * @param outSpatialReference - The spatial reference to which you are converting the geometries to.
93
95
  * @param areaOfInterestExtent - An extent used to help pick the correct transform.
94
96
  * The extent's spatial reference should be the same as `inSpatialReference`.
97
+ * @param returnUnusable - todoc
95
98
  * @returns Returns an array containing the maximum number the suitable
96
99
  * geographic transformations that can be used to convert geometries between input and output spatial references.
97
100
  * The list will be empty if the provided extent lies out of the area of use for the input spatial reference, or if no transformation is required, or there are no suitable transformations.
@@ -123,4 +126,12 @@ export function getTransformation(inSpatialReference: SpatialReference, outSpati
123
126
  * });
124
127
  * });
125
128
  */
126
- export function getTransformations(inSpatialReference: SpatialReference, outSpatialReference: SpatialReference, areaOfInterestExtent?: Extent | null): GeographicTransformation[];
129
+ export function getTransformations(inSpatialReference: SpatialReference, outSpatialReference: SpatialReference, areaOfInterestExtent?: Extent | null, returnUnusable?: boolean): GeographicTransformation[];
130
+
131
+ /**
132
+ * todoc
133
+ *
134
+ * @param transform - todoc
135
+ * @since 5.2
136
+ */
137
+ export function isTransformationUsable(transform: GeographicTransformation | GeographicTransformationStep): boolean;
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{l as n,p as t,i as e}from"../../../chunks/pe.js";import o from"./GeographicTransformation.js";import r from"./GeographicTransformationStep.js";let i,s,c,a;function p(){return!!i&&e()}async function u(){if(!p()){const[e,o,r,p]=await Promise.all([import("../../../chunks/Envelope2D.js"),import("../../../chunks/ProjectionTransformation.js").then(({queryTransformationList:n})=>n),import("../../../chunks/SpatialReference.js").then(({injectPe:n})=>n),import("./apiConverter.js"),n()]);c=e.Envelope2D.construct,a=e.Envelope2D.constructEmpty(),i=o,r(t),s=p.fromSpatialReference}}function m(n,t,e=null){const o=e?l(e):a,r=i(0,s(n),s(t),o,1,!0);return r.length>0?h(r[0]):null}function f(n,t,e=null){const o=e?l(e):a;return i(0,s(n),s(t),o,0,!0).map(n=>h(n))}function l(n){return c(n.xmin,n.ymin,n.xmax,n.ymax)}function h(n){const t=new o;for(let e=0;e<n.count();e++){const o=n.getStep(e);t.steps.push(new r({wkid:o.getID(),isInverse:o.isInverted()}))}return t}export{m as getTransformation,f as getTransformations,p as isLoaded,u as load};
2
+ import{l as e,p as n,i as t}from"../../../chunks/pe.js";import r from"./GeographicTransformation.js";import s from"./GeographicTransformationStep.js";let o,i,a,c,u,l;function f(){return!!a&&t()}async function m(){if(!f()){const[t,r,s,f,m]=await Promise.all([import("../../../chunks/GeographicTransformation.js").then(({create:e,createFromWKT:n})=>({create:e,createFromWKT:n})),import("../../../chunks/Envelope2D.js"),import("../../../chunks/ProjectionTransformation.js").then(({queryTransformationList:e})=>e),import("../../../chunks/SpatialReference.js").then(({injectPe:e})=>e),import("./apiConverter.js"),e()]);o=t.create,i=t.createFromWKT,u=r.Envelope2D.construct,l=r.Envelope2D.constructEmpty(),a=s,f(n),c=m.fromSpatialReference}}function p(e,n,t=null,r=!1){const s=t?k(t):l,o=a(0,c(e),c(n),s,1,!r);return o.length>0?g(o[0]):null}function h(e,n,t=null,r=!1){const s=t?k(t):l;return a(0,c(e),c(n),s,0,!r).map(e=>g(e))}function j(e){if(null!=e.isUsable)return e.isUsable;let n=!0;const t=e instanceof r?e.steps:[e];for(const r of t){if(null==r.isUsable){const e=r.wkid?o(r.wkid,r.isInverse):i(r.wkt,r.isInverse);r.isUsable=!e.referencesMissingData()}n&&=r.isUsable}return n}function k(e){return u(e.xmin,e.ymin,e.xmax,e.ymax)}function g(e){const n=new r;for(let t=0;t<e.count();t++){const r=e.getStep(t);n.steps.push(new s({wkid:r.getID(),isInverse:r.isInverted(),isUsable:!r.referencesMissingData()}))}return n}export{p as getTransformation,h as getTransformations,f as isLoaded,j as isTransformationUsable,m as load};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{constructFromFlatGeometry as e}from"../../../chunks/FlatGeometry.js";import{d as t,a as n,g as r,r as i,q as s,G as a,t as o}from"../../../chunks/Geometry.js";import{aL as u,i as m,d as l,b as c,aM as d,P as _,m as h}from"../../../chunks/Point2D.js";import{q as f,b as p,p as k,aX as b,c as y,e as T,a as N,f as g,aY as v}from"../../../chunks/UnitFactory.js";import{a2 as x,a5 as A,P as S,E as w,a0 as C,a1 as D,a6 as F,a7 as j,X as O}from"../../../chunks/Envelope.js";import{P as z,a as I,S as E,M as P,J as B,a5 as V,a6 as R,a7 as M,a8 as U,a9 as W}from"../../../chunks/MultiPathImpl.js";import{convertGeometryxToFlat as X,convertFlatToGeometryJSON as G,convertGeometryToFlat as L}from"../../FlatGeometry.js";import Y from"../../SpatialReference.js";import"./initNoPeFactory.js";import{isPoint as q,isMultipoint as K,isPolyline as J,isPolygon as Q}from"../../support/jsonTypeUtils.js";function Z(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:1,m_value:null},done:!1};if(this.m_i<this.m_keys.length){const e=this.m_bReturnKey,t=Math.trunc(this.m_i);return this.m_bReturnKey=!this.m_bReturnKey,this.m_i+=.5,e?{value:{m_token:5,m_value:this.m_keys[t]},done:!1}:{value:{m_token:6,m_value:this.m_o[this.m_keys[t]]},done:!1}}return{value:{m_token:3,m_value:null},done:!0}}function H(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:2,m_value:null},done:!1};if(this.m_i<this.m_a.length){const e={value:{m_token:6,m_value:this.m_a[this.m_i++]},done:!1};return this.m_strict||void 0===e.value.m_value&&(e.value.m_value=Number.NaN),e}return{value:{m_token:4,m_value:null},done:!0}}class ${m_iteratorStack;m_nextFlatToken;m_currentToken=0;m_currentValue;m_options;createJSONObjectIterator(e){return{m_iteratorType:"object",m_o:e,m_keys:this.m_options.strict?Object.keys(e):Object.keys(e).filter(t=>void 0!==e[t]),m_i:-1,m_bReturnKey:!0,next:Z}}createJSONArrayIterator(e){return{m_iteratorType:"array",m_strict:this.m_options.strict,m_i:-1,m_a:e,next:H}}constructor(e,t){this.m_options=t?{...t}:{strict:!0};const n=e;this.m_iteratorStack=[n instanceof Array?this.createJSONArrayIterator(n):this.createJSONObjectIterator(n)],this.m_nextFlatToken={m_value:null,m_token:0}}nextToken(){if(0===this.m_iteratorStack.length)return this.m_currentToken=0;switch(this.m_nextFlatToken=this.m_iteratorStack.at(-1).next().value,this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_currentToken=1;case 3:return this.m_iteratorStack.pop(),this.m_currentToken=3;case 2:return this.m_currentToken=2;case 4:return this.m_iteratorStack.pop(),this.m_currentToken=4;case 5:return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=5;case 6:if(this.m_nextFlatToken.m_value instanceof Array)return this.m_iteratorStack.push(this.createJSONArrayIterator(this.m_nextFlatToken.m_value)),this.nextToken();if(this.m_nextFlatToken.m_value instanceof Object)return this.m_iteratorStack.push(this.createJSONObjectIterator(this.m_nextFlatToken.m_value)),this.nextToken();if("number"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,Number.isSafeInteger(this.m_currentValue)&&this.m_currentValue>=u()&&this.m_currentValue<=m()?this.m_currentToken=8:this.m_currentToken=7;if("string"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=6;if("boolean"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=this.m_nextFlatToken.m_value?11:12;if("object"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=null,this.m_currentToken=10;t("unrecognized json element type")}t("unrecognized json element type")}currentToken(){return this.m_currentToken}skipChildren(){if(0!==this.m_iteratorStack.length)switch(this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=3,void(this.m_currentToken=3);case 2:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=4,void(this.m_currentToken=4)}}currentString(){return 6!==this.m_currentToken&&5!==this.m_currentToken&&n("invalid token"),this.m_currentValue}currentDoubleValue(){return 7!==this.m_currentToken&&8!==this.m_currentToken&&n("invalid token"),this.m_currentValue}currentInt32Value(){return 8!==this.m_currentToken&&n("invalid token"),this.m_currentValue}currentInt64Value(){return r(0),0n}currentBoolValue(){return 12!==this.m_currentToken&&11!==this.m_currentToken&&n("invalid token"),this.m_currentValue}isError(){return 0}}class ee{m_pendingKey=null;m_acceptedObject=null;m_currentObject=[];reset(){this.m_pendingKey=null,this.m_acceptedObject=null,this.m_currentObject.length=0}startObject(){const e={};this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}startArray(){const e=[];this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}endObject(){this.m_acceptedObject=this.m_currentObject.at(-1),this.m_currentObject.pop()}endArray(){this.m_currentObject.pop()}addFieldName(e){this.m_pendingKey=e}addValue_(e){this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):this.m_currentObject.at(-1).push(e)}addString(e){this.addValue_(e)}addDouble(e,t){this.addValue_(e)}addInt64(e){r(0)}addInt32(e){this.addValue_(e)}addBool(e){this.addValue_(e)}addNull(){this.addValue_(null)}getObject(){return this.m_acceptedObject}}class te{m_buffer=null;m_view=null;m_sz=0;m_offset=0;m_bOwnsBuffer=!0;m_bLittleEndian=!0;m_element;m_elementBytes;m_elementView;m_elementDouble;m_elementFloat;m_elementInt64;m_elementInt32;m_elementInt16;constructor(e){return this.m_element=new ArrayBuffer(8),this.m_elementBytes=new Uint8Array(this.m_element),this.m_elementView=new DataView(this.m_element),this.m_elementDouble=new Float64Array(this.m_element),this.m_elementFloat=new Float32Array(this.m_element),this.m_elementInt64=new BigInt64Array(this.m_element),this.m_elementInt32=new Int32Array(this.m_element),this.m_elementInt16=new Int16Array(this.m_element),void 0!==e.sz?(this.m_sz=e.sz,e.buffer?(this.m_sz<0&&i("size out of range"),this.m_buffer=e.buffer,this.m_offset=void 0!==e.offset?e.offset:0,this.m_view=void 0!==e.offset?new DataView(e.buffer,e.offset,e.sz):new DataView(this.m_buffer),this.m_bOwnsBuffer=!1,void(this.m_bLittleEndian=!0)):(this.m_sz<0&&i("size out of range"),void(this.m_sz>0&&(this.m_buffer=new ArrayBuffer(this.m_sz),this.m_view=new DataView(this.m_buffer))))):e.move?(this.m_sz=e.move.m_sz,this.m_buffer=e.move.m_buffer,this.m_view=e.move.m_view,this.m_bOwnsBuffer=e.move.m_bOwnsBuffer,this.m_bLittleEndian=e.move.m_bLittleEndian,e.move.m_buffer=null,e.move.m_view=null,e.move.m_sz=0,void(e.move.m_bOwnsBuffer=!0)):void t("unrecognized constructor options")}swapBytesDouble(){this.doSwap()&&(this.m_elementDouble[0]=this.m_elementBytes[0]<<56|this.m_elementBytes[1]<<48|this.m_elementBytes[2]<<40|this.m_elementBytes[3]<<32|this.m_elementBytes[4]<<24|this.m_elementBytes[5]<<16|this.m_elementBytes[6]<<8|this.m_elementBytes[7])}swapBytesInt32(){this.doSwap()&&(this.m_elementInt32[0]=this.m_elementBytes[0]<<24|this.m_elementBytes[1]<<16|this.m_elementBytes[2]<<8|this.m_elementBytes[3])}getOffset(){return this.m_offset}assignMove(e){return this===e||(this.clear(),this.m_sz=e.m_sz,this.m_buffer=e.m_buffer,this.m_view=e.m_view,this.m_bOwnsBuffer=e.m_bOwnsBuffer,this.m_bLittleEndian=e.m_bLittleEndian,e.m_buffer=null,e.m_sz=0,e.m_bOwnsBuffer=!0),this}doSwap(){return this.m_bLittleEndian!==(1===te.getNativeByteOrder())}setNativeByteOrder(){this.m_bLittleEndian=1===te.getNativeByteOrder()}setOrder(e){this.m_bLittleEndian=1===e}getOrder(){return this.m_bLittleEndian?1:0}getView(){return this.m_view||s("buffer not defined"),this.m_view}static getNativeByteOrder(){return 1}clear(){this.m_buffer=null,this.m_sz=0,this.m_bOwnsBuffer=!0}size(){return this.m_sz}readDouble(e){return this.doSwap()?(this.m_elementDouble[0]=this.m_view.getFloat64(e,this.m_bLittleEndian),this.swapBytesDouble(),this.m_elementDouble[0]):this.m_view.getFloat64(e,this.m_bLittleEndian)}writeDouble(e,t){this.m_elementDouble[0]=t,this.swapBytesDouble(),this.m_view.setFloat64(e,this.m_elementDouble[0],this.m_bLittleEndian)}readInt32(e){return this.doSwap()?(this.m_elementInt32[0]=this.m_view.getInt32(e,this.m_bLittleEndian),this.swapBytesInt32(),this.m_elementInt32[0]):this.m_view.getInt32(e,this.m_bLittleEndian)}writeInt32(e,t){this.m_elementInt32[0]=t,this.swapBytesInt32(),this.m_view.setInt32(e,this.m_elementInt32[0],this.m_bLittleEndian)}getPtr(){return this.m_buffer}setSizeNoRealloc(e){r(e>=0&&e<=this.m_sz),this.m_sz=e}}function ne(e,t,i,s,o,u){let m=!1,l=!1,c=!1,d=!1,_=!1,h=!1,f=!1,p=!1,k=!1,b=!1,y=!1,T=!1,N=!1,g=!1,v=!1,C=!1,D=!1,F=!1,j=!1,O=!1,z=!1,I=!1,E=!1,P=!1,B=Number.NaN,V=Number.NaN,R=Number.NaN,M=Number.NaN,U=0,W=Number.NaN,X=Number.NaN,G=Number.NaN,L=Number.NaN,Y=Number.NaN,q=Number.NaN,K=Number.NaN,J=Number.NaN,Q=0,Z=0,H=!1,$=!1,ee=null,te=null,ne=null,re=null,ce=null;for(;3!==i.nextToken();){const u=i.currentString();if(i.nextToken(),"spatialReference"===u){if(o&&!m){m=!0,1===i.currentToken()?re=ie(i):10!==i.currentToken()&&n("failed to parse spatial reference: object or null is expected");continue}}else if(s)if("hasZ"===u){if(!l){l=!0,H=11===i.currentToken();continue}}else if("hasM"===u){if(!c){c=!0,$=11===i.currentToken();continue}}else if("rings"===u){if(!(_||h||e!==a.enumUnknown&&e!==a.enumPolygon)){_=!0,({geometry:ce,as:ee,bs:te}=se(!0,!1,t,i));continue}}else if("curveRings"===u){if(!h&&(e===a.enumUnknown||e===a.enumPolygon)){h=!0,({geometry:ce,as:ee,bs:te}=se(!0,!0,t,i));continue}}else if("paths"===u){if(!(f||p||e!==a.enumUnknown&&e!==a.enumPolyline)){f=!0,({geometry:ce,as:ee,bs:te}=se(!1,!1,t,i));continue}}else if("curvePaths"===u){if(!p&&(e===a.enumUnknown||e===a.enumPolyline)){p=!0,({geometry:ce,as:ee,bs:te}=se(!1,!0,t,i));continue}}else if("points"===u){if(!k&&(e===a.enumUnknown||e===a.enumMultiPoint)){k=!0,({geometry:ce,as:ee,bs:te}=ae(t,i));continue}}else if("ids"===u){if(!d){d=!0,ne=oe(t,i);continue}}else if("x"===u){if(!b&&(e===a.enumUnknown||e===a.enumPoint)){b=!0,B=ue(i);continue}}else if("y"===u){if(!y&&(e===a.enumUnknown||e===a.enumPoint)){y=!0,V=ue(i);continue}}else if("z"===u){if(!T&&(e===a.enumUnknown||e===a.enumPoint)){T=!0,R=ue(i);continue}}else if("m"===u){if(!N&&(e===a.enumUnknown||e===a.enumPoint)){N=!0,M=ue(i);continue}}else if("id"===u){if(!g&&(e===a.enumUnknown||e===a.enumPoint)){g=!0,U=me(i);continue}}else if("xmin"===u){if(!v&&(e===a.enumUnknown||e===a.enumEnvelope)){v=!0,W=ue(i);continue}}else if("ymin"===u){if(!C&&(e===a.enumUnknown||e===a.enumEnvelope)){C=!0,X=ue(i);continue}}else if("mmin"===u){if(!z&&(e===a.enumUnknown||e===a.enumEnvelope)){z=!0,K=ue(i);continue}}else if("zmin"===u){if(!j&&(e===a.enumUnknown||e===a.enumEnvelope)){j=!0,Y=ue(i);continue}}else if("idmin"===u){if(!E&&(e===a.enumUnknown||e===a.enumEnvelope)){E=!0,Q=me(i);continue}}else if("xmax"===u){if(!D&&(e===a.enumUnknown||e===a.enumEnvelope)){D=!0,G=ue(i);continue}}else if("ymax"===u){if(!F&&(e===a.enumUnknown||e===a.enumEnvelope)){F=!0,L=ue(i);continue}}else if("mmax"===u){if(!I&&(e===a.enumUnknown||e===a.enumEnvelope)){I=!0,J=ue(i);continue}}else if("zmax"===u){if(!O&&(e===a.enumUnknown||e===a.enumEnvelope)){O=!0,q=ue(i);continue}}else if("idmax"===u){if(!P&&(e===a.enumUnknown||e===a.enumEnvelope)){P=!0,Z=me(i);continue}}else"materials"===u&&r(0);i.skipChildren()}if(_||h||f||p||k){let e=null,t=null;const n=ce;H&&(ce.addAttribute(1),e=ee,e||(e=x(n.getPointCount(),Number.NaN))),$&&(ce.addAttribute(2),t=H?te:ee),null!=ne&&ce.addAttribute(3),H&&null!=e&&n.setAttributeStreamRef(1,e),$&&null!=t&&n.setAttributeStreamRef(2,t),null!=ne&&le(n,ne)}else if(b||y||N||T||g){A(B,V)||n("failed to parse point: x and y must be finite or nan"),(Number.isNaN(V)||Number.isNaN(B))&&(B=Number.NaN,V=Number.NaN);const e=new S({x:B,y:V});T&&e.setZ(R),N&&e.setM(M),g&&e.setID(U),ce=e}else if(v||C||D||F||j||O||z||I||E||P){(Number.isNaN(X)||Number.isNaN(G)||Number.isNaN(L))&&(W=Number.NaN);const e=new w({xmin:W,ymin:X,xmax:G,ymax:L});j&&O&&e.setInterval(1,0,Y,q),z&&I&&e.setInterval(2,0,K,J),E&&P&&e.setInterval(3,0,Q,Z),ce=e}return{...ce?{geom:ce}:{},...re?{sr:re}:{}}}function re(e){let t=!1;for(;3!==e.nextToken();){const n=e.currentString();e.nextToken(),"uwkid"===n?t||(t=!0,8===e.currentToken()&&e.currentInt32Value()):e.skipChildren()}return null}function ie(e){let t=!1,n=!1,r=!1,i=!1,s=!1,a=!1,o=!1,u=!1,m=!1,l=!1,c=!1,d=!1,_=!1,h=!1,v=!1,x=!1,A=!1,S=-1,w=-1,C=-1,D=-1,F=0,j=0,O=0,z=0,I=0,E=0,P=0,B=0,V=0,R=0,M="",U="",W=null;for(;3!==e.nextToken();){const f=e.currentString();e.nextToken(),"wkid"===f?t||(t=!0,8===e.currentToken()&&(S=e.currentInt32Value())):"latestWkid"===f?n||(n=!0,8===e.currentToken()&&(w=e.currentInt32Value())):"wkt"===f?s||(s=!0,6===e.currentToken()&&(M=e.currentString())):"wkt2"===f?s||6===e.currentToken()&&(U=e.currentString()):"vcsWkid"===f?r||(r=!0,8===e.currentToken()&&(C=e.currentInt32Value())):"latestVcsWkid"===f?i||(i=!0,8===e.currentToken()&&(D=e.currentInt32Value())):"xyTolerance"===f?o||(o=!0,a=!0,F=e.currentDoubleValue()):"zTolerance"===f?u||(u=!0,a=!0,j=e.currentDoubleValue()):"mTolerance"===f?m||(m=!0,a=!0,O=e.currentDoubleValue()):"falseX"===f?l||(l=!0,a=!0,P=e.currentDoubleValue()):"falseY"===f?c||(c=!0,a=!0,B=e.currentDoubleValue()):"falseZ"===f?d||(d=!0,a=!0,V=e.currentDoubleValue()):"falseM"===f?_||(_=!0,a=!0,R=e.currentDoubleValue()):"xyUnits"===f?h||(h=!0,a=!0,z=e.currentDoubleValue()):"zUnits"===f?v||(v=!0,a=!0,I=e.currentDoubleValue()):"mUnits"===f?x||(x=!0,a=!0,E=e.currentDoubleValue()):"unit"===f?A||(A=!0,W=re(e)):e.skipChildren()}D<=0&&C>0&&(D=C),C<=0&&D>0&&(C=D);let X=null,G=!0;if(0!==M.length&&(G=!1,f(M)&&(X=p(M))),X||0===U.length||(G=!1,f(U)&&(X=p(U))),!X&&w>0&&(G=!1,k(w)&&(D<=0||b())&&(X=y(w,D))),!X&&S>0&&(G=!1,k(S)&&(C<=0||b())&&(X=y(S,C))),G&&(X=T(W)),a&&X){const e=new N;X.queryPrecisionDescriptorWithoutFalseXY(e),o&&e.setTolerance(0,F),u&&e.setTolerance(1,j),m&&e.setTolerance(2,O),h&&l&&c&&e.setGridParams(P,B,z),v&&d&&e.setZParams(V,I),x&&_&&e.setMParams(R,E),X=g(X,e)}return X}function se(e,t,r,i){2!==i.currentToken()&&n("failed to parse multipath: array of array of vertices is expected");const s=e?new z:new I,a=s,o=C(0),u=x(2,0),m=D(0);let h=null,f=null,p=null,k=null,b=null,y=0,T=0,N=0;const g=new E,v=_.getNAN();let A=0,S=0;const w=e?1:0;for(;4!==i.nextToken();){2!==i.currentToken()&&n("failed to parse multipath: ring/path array is expected");let r=2,s=0,j=!0;const O=4;let z=0,I=0;const E=_.getNAN(),P=l(O,Number.NaN),B=l(O,Number.NaN);let V=!1;for(i.nextToken();4!==i.currentToken();){if(t&&1===i.currentToken())j&&n("failed to parse multipath: starting vertex array is expected"),p||(p=D(A-1,1),k=C(A-1,-1),b=x(0)),V=!0,r=1,({segFlag:N,toPointSz:z}=ke(g,P,v,i));else{for(V=!1,2!==i.currentToken()&&n("failed to parse multipath: array is expected, rings/paths vertices consist of arrays of coordinates"),z=0;4!==i.nextToken();)z===O&&n("failed to parse multipath: each vertex array has to have at most 4 elements"),P[z++]=ue(i);z<2&&n("failed to parse multipath: each vertex array has to have at least 2 elements"),F(P[0],P[1])||n("failed to parse multipath: x and y must be finite")}i.nextToken();do{if(u.size()===2*A&&u.resize(ce(A)),u.writePoint2D(2*A,E.setCoords(P[0],P[1])),h&&h.size()===A&&h.resize(de(A)),z>2?(h||(h=x(A+1,Number.NaN)),h.write(A,P[2])):h&&h.write(A,Number.NaN),f&&f.size()===A&&f.resize(de(A)),z>3?(f||(f=x(A+1,Number.NaN)),f.write(A,P[3])):f&&f.write(A,Number.NaN),j)S++,o.add(A),m.add(w),j=!1,I=z,c(B,P,0,0,I);else if(null!==p)if(V){const e=W(N),t=b.size();b.resize(t+e),p.add(N),k.add(y),g.get().writeInBufferStream(b,y),y+=e,a.incCurveType(N,1),T++}else p.add(1),k.add(-1);A++,s++,v.setCoords(P[0],P[1])}while(s<r&&4===i.currentToken())}0!==s&&(e&&s>r&&z===I&&0===d(P,B,z)?(A--,s--):null!==p&&(p.add(1),k.add(-1)))}return A&&(o.resize(S),m.resize(S),A>0&&(o.add(A),m.add(0)),a.setAttributeStreamRef(0,u),a.setPathFlagsStreamRef(m),a.setPathStreamRef(o),null!==p&&(a.updateCurveCounter(T),a.setSegmentData(k,b,p,y)),a.notifyModifiedFlags(65535)),{geometry:s,as:h,bs:f}}function ae(e,t){2!==t.currentToken()&&n("failed to parse multipoint: array of vertices is expected");let r=0;const i=new P,s=x(2,0);let a=0;const o=4,u=l(o,Number.NaN),m=new _;let c=null,d=null;for(;4!==t.nextToken();){for(2!==t.currentToken()&&n("failed to parse multipoint: array is expected, multipoint vertices consist of arrays of cooridinates"),a=0;4!==t.nextToken();)a===o&&n("failed to parse multipoint: each vertex array has to have at most 4 elements"),u[a++]=ue(t);a<2&&n("failed to parse multipoint: each vertex array has to have at least 2 elements"),F(u[0],u[1])||n("failed to parse multipoint: x and y must be finite"),s.size()===2*r&&s.resize(ce(r)),s.writePoint2D(2*r,m.setCoords(u[0],u[1])),c&&c.size()===r&&c.resize(de(r)),a>2?(c||(c=x(r+1,Number.NaN)),c.write(r,u[2])):c&&c.write(r,Number.NaN),d&&d.size()===r&&d.resize(de(r)),a>3?(d||(d=x(r+1,Number.NaN)),d.write(r,u[3])):d&&d.write(r,Number.NaN),r++}if(r){const e=i.getImpl();e.setAttributeStreamRef(0,s),e.resizeNoInit(r),e.notifyModifiedFlags(65535)}return{geometry:i,as:c,bs:d}}function oe(e,t){2!==t.currentToken()&&n("failed to parse array of IDs: array of array of integers is expected");const r=j(2,0);let i=0,s=-1;for(;4!==t.nextToken();){const e=i;r.size()===i&&r.resize(de(i)),i++;let a=0;for(-1===s?s=2===t.currentToken()?1:0:1===s&&2!==t.currentToken()&&n("failed to parse array of IDs: array of array of integers is expected"),0===s&&(r.size()===i&&r.resize(de(i)),r.write(i,me(t)),a++,i++);4!==t.nextToken();)r.size()===i&&r.resize(de(i)),r.write(i,me(t)),a++,i++;if(r.write(e,a),0===s)break}return r.resize(i),r}function ue(e){const t=e.currentToken();if(10===t||6===t&&"NaN"===e.currentString())return Number.NaN;{const t=e.currentDoubleValue();return Number.isNaN(t)?Number.NaN:t}}function me(e){return e.currentInt32Value()}function le(e,n){if(e.isEmpty())return;const r=j(2,0),i=e.getGeometryType();let s=0;i===P.type?s=1:i===I.type||i===z.type?s=e.getPathCount():t("not implemented"),r.resize(e.getPointCount(),0);let a=0;for(let o=0;o<s;++o){const s=n.read(a);a++;const u=a+s;let m=0,l=0;i===P.type?m=e.getPointCount():i===I.type||i===z.type?(m=e.getPathSize(o),l=e.getPathStart(o)):t("not implemented");for(let e=0,t=Math.min(s,m);e<t;++e)r.write(l,n.read(a)),a++,l++;a=u}e.getImpl().setAttributeStreamRef(3,r)}function ce(e){let t=2*Math.trunc(3*(e+1)/2);return t<8?t=8:t<32&&(t=32),t}function de(e){let t=Math.trunc(3*(e+1)/2);return t<4?t=4:t<16&&(t=16),t}function _e(e,t,n,r,s){s>=r.size()&&i("Byte_buffer out of range access"),e.m_bits=0,e.m_rotation=0,e.m_cosr=1,e.m_sinr=0,e.setStartXY(t),e.setEndXY(n);const a=_.getNAN();a.x=r.readDouble(s),a.y=r.readDouble(s+8);const o=r.readInt32(s+16);if(!!(1&o))return e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.assign(a),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,R(e),!1;let u=!!(64&o);const m=!!(128&o);let l=!!(32&o);const c=!!(8&o),d=!!(16&o),h=t.equals(n);return u&&!h&&(u=!1,l=!0),l&&h&&(u=!0,l=!1,a.setCoords(0,0)),u||(m?l?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_interior.assign(a),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0):(e.constructCircularArcThreePoint(t,n,a),h&&c===e.isClockwise()&&e.reverse()):l?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,R(e),e.queryCoord2D(.5,e.m_interior)):M(e,t,n,a,c,d)),u&&(e.m_center.assign(t),e.m_startAngle=a.x,e.m_sweepAngle=a.y,U(e,Number.NaN,c,d),e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.setCoordsPoint2D(t)),e.setProjectionBehavior(0),R(e),!0}function he(e,t,n,r,i){e.m_bits=0,e.m_center.x=r.readDouble(i),e.m_center.y=r.readDouble(i+8),e.m_rotation=r.readDouble(i+16),e.m_semiMajorAxis=r.readDouble(i+24),e.m_minorMajorRatio=r.readDouble(i+32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y;const s=r.readInt32(i+40);if(1&s)return!1;let a=!!(64&s),o=!!(128&s);const u=!!(2048&s),m=!!(4096&s);return!!!(512&s)&&!!!(1024&s)||o||(a=!0),o&&!t.equals(n)?(o=!1,a=!0):a&&t.equals(n)&&(o=!0,a=!1),o?(e.m_center.assign(t),e.m_startAngle=e.m_center.x,e.m_sweepAngle=e.m_center.y,U(e,Number.NaN,u,m),e.m_semiMajorAxis=0,e.m_interior.setCoordsPoint2D(t)):a?(e.m_center.setNAN(),e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,R(e),e.queryCoord2D(.5,e.m_interior)):e.constructEllipticArcEndPointsCenter(t,n,e.m_semiMajorAxis,e.m_minorMajorRatio,e.m_rotation,!m,u,e.m_center),e.setProjectionBehavior(1),R(e),!0}function fe(e,t,n,i,s){return r(s+32<=i.size()),e.m_cp=h(_,2),e.m_cp[0].x=i.readDouble(s),e.m_cp[0].y=i.readDouble(s+8),e.m_cp[1].x=i.readDouble(s+16),e.m_cp[1].y=i.readDouble(s+24),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y,!0}function pe(e,t,n,r,i){return e.m_cp.x=r.readDouble(i),e.m_cp.y=r.readDouble(i+8),e.m_weights[0]=r.readDouble(i+16),e.m_weights[1]=r.readDouble(i+24),e.m_weights[2]=r.readDouble(i+32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y,!0}function ke(e,t,r,i,s){const a={segFlag:0,toPointSz:0};let o=i.currentToken();o=i.nextToken();const u=i.currentString(),m=u[0];for((1!==u.length||"a"!==m&&"b"!==m&&"c"!==m&&"n"!==m&&"q"!==m)&&n('failed to parse curve: expecting "a", "b", "n", "q", or "c"'),o=i.nextToken(),2!==o&&n("failed to parse curve: start array is expected for curve parameters"),o=i.nextToken(),2!==o&&n("failed to parse curve: start array is expected for to point"),a.toPointSz=0;4!==i.nextToken();)4===a.toPointSz&&n("failed to parse curve: vertex array cannot have more than 4 elements"),t[a.toPointSz++]=ue(i);a.toPointSz<2&&n("failed to parse curve: vertex array must have at least 2 elements");const l=_.construct(t[0],t[1]),c=_.getNAN();let d=-1,h=-1,f=!1,p=Number.NaN,k=Number.NaN,b=Number.NaN;const y=[_.getNAN(),_.getNAN(),_.getNAN()],T=_.getNAN();if("a"===m){o=i.nextToken(),2!==o&&n("failed to parse curve: start array is expected for center point"),o=i.nextToken();const e=ue(i);o=i.nextToken();const t=ue(i);o=i.nextToken(),4!==o&&n("failed to parse curve: end array is expected for center point"),c.setCoords(e,t),o=i.nextToken(),d=i.currentInt32Value(),o=i.nextToken(),h=i.currentInt32Value(),o=i.nextToken(),4!==o?(f=!1,p=ue(i),o=i.nextToken(),k=ue(i),o=i.nextToken(),b=ue(i),o=i.nextToken(),4!==o&&n("failed to parse curve: end array is expected for curve parameters")):f=!0,a.segFlag=4}else if("b"===m){for(let e=0;e<2;e++){o=i.nextToken(),2!==o&&n("failed to parse curve: start array is expected for control point"),o=i.nextToken();const t=ue(i);o=i.nextToken();const r=ue(i);o=i.nextToken(),4!==o&&n("failed to parse curve: end array is expected for control point"),y[e].setCoords(t,r)}o=i.nextToken(),4!==o&&n("failed to parse curve: end array is expected for curve parameters"),a.segFlag=2}else if("n"===m){{o=i.nextToken(),2!==o&&n("failed to parse curve: start array is expected for control point"),o=i.nextToken();const e=ue(i);o=i.nextToken();const t=ue(i);o=i.nextToken(),4!==o&&n("failed to parse curve: end array is expected for control point"),y[0].setCoords(e,t)}o=i.nextToken();const e=ue(i);o=i.nextToken();const t=ue(i);o=i.nextToken();const r=ue(i);y[1].setCoords(e,t),y[2].setCoords(r,r),o=i.nextToken(),4!==o&&n("failed to parse curve: end array is expected for curve parameters"),a.segFlag=8}else if("q"===m){for(let e=0;e<1;e++){o=i.nextToken(),2!==o&&n("failed to parse curve: start array is expected for control point"),o=i.nextToken();const t=ue(i);o=i.nextToken();const r=ue(i);o=i.nextToken(),4!==o&&n("failed to parse curve: end array is expected for control point"),y[e].setCoords(t,r)}o=i.nextToken(),4!==o&&n("failed to parse curve: end array is expected for curve parameters"),a.segFlag=16}else{o=i.nextToken(),2!==o&&n("failed to parse curve: start array is expected for interior point"),o=i.nextToken();const e=ue(i);o=i.nextToken();const t=ue(i);o=i.nextToken(),4!==o&&n("failed to parse curve: end array is expected for interior point"),T.setCoords(e,t),o=i.nextToken(),4!==o&&n("failed to parse curve: end array is expected for curve parameters"),a.segFlag=4}if(o=i.nextToken(),3!==o&&n("failed to parse curve: end object is expected for curve"),"a"===m)if(e.createEllipticArc(),f){const t=!0;be(e.get(),r,l,c,t,d,h)}else ye(e.get(),r,l,c,d,h,p,k,b);else if("b"===m)e.createCubicBezier(),Te(e.get(),r,l,y);else if("n"===m)e.createQuadraticRationalBezier(),Ne(e.get(),r,l,y[0],y[1].x,y[1].y,y[2].x);else if("q"===m)e.createQuadraticBezier(),e.get().construct(r,y[0],l);else{e.createEllipticArc();const t=!1;be(e.get(),r,l,T,t,-1,-1)}return a}function be(e,t,n,r,i,s,a){e.dropAllAttributes();const o=20,u=new ArrayBuffer(o),m=new te({sz:o,buffer:u});let l=0;m.writeDouble(l,r.x),l+=8,m.writeDouble(l,r.y),l+=8;let c=0;i?(a||(c|=8),s&&(c|=16)):c|=128,m.writeInt32(l,c),l+=4,_e(e,t,n,m,0)}function ye(e,t,n,r,i,s,a,o,u){e.dropAllAttributes();const m=44,l=new ArrayBuffer(m),c=new te({sz:m,buffer:l});let d=0;c.writeDouble(d,r.x),d+=8,c.writeDouble(d,r.y),d+=8,c.writeDouble(d,a),d+=8,c.writeDouble(d,o),d+=8,c.writeDouble(d,u),d+=8;let _=0;s||(_|=2048),i&&(_|=4096),c.writeInt32(d,_),d+=4,he(e,t,n,c,0)}function Te(e,t,n,r){e.dropAllAttributes();const i=32,s=new ArrayBuffer(i),a=new te({sz:i,buffer:s});let o=0;a.writeDouble(o,r[0].x),o+=8,a.writeDouble(o,r[0].y),o+=8,a.writeDouble(o,r[1].x),o+=8,a.writeDouble(o,r[1].y),o+=8,fe(e,t,n,a,0)}function Ne(e,t,n,r,i,s,a){e.dropAllAttributes();const o=40,u=new ArrayBuffer(o),m=new te({sz:o,buffer:u});let l=0;m.writeDouble(l,r.x),l+=8,m.writeDouble(l,r.y),l+=8,m.writeDouble(l,i),l+=8,m.writeDouble(l,s),l+=8,m.writeDouble(l,a),l+=8,pe(e,t,n,m,0)}function ge(e,t,n,r,i){const s=e.getGeometryType();if(s===a.enumEllipticArc)return ve(e,t,n,r,i);if(s===a.enumBezier)return xe(e,t,n,r,i);if(s===a.enumRationalBezier2)return Ae(e,t,n,r,i);if(s===a.enumBezier2){const s=new B;return s.constructFromQuadraticSegment(e),xe(s,t,n,r,i)}o("")}function ve(e,t,n,i,s){r(!V(e));const a=e.getEndXY(),o=e.hasAttribute(1)&&!t,u=e.hasAttribute(2)&&!n;let m=Number.NaN,l=Number.NaN;if(o&&(m=e.getEndAttributeAsDbl(1,0)),u&&(l=e.getEndAttributeAsDbl(2,0)),e.isDegenerateToLine()||e.isDegenerate(0))return Se(o,u,a.x,a.y,m,l,i,s),!0;const c=0===e.projectionBehavior(),d=!!c&&e.isClosed();if(c&&!d)s.startObject(),s.addFieldName("c"),s.startArray(),Se(o,u,a.x,a.y,m,l,i,s),we(e.m_interior.x,e.m_interior.y,17,s),s.endArray(),s.endObject();else if(c){s.startObject(),s.addFieldName("a"),s.startArray(),Se(o,u,a.x,a.y,m,l,i,s);const t=0,n=0;we(e.m_center.x+t,e.m_center.y+n,17,s);const r=!e.isMajor();s.addInt32(r?1:0);const c=e.isClockwise();s.addInt32(c?1:0),s.endArray(),s.endObject()}else{s.startObject(),s.addFieldName("a"),s.startArray(),Se(o,u,a.x,a.y,m,l,i,s);const t=e;we(t.m_center.x,t.m_center.y,17,s);const n=!t.isMajor();s.addInt32(n?1:0);const r=t.isClockwise();s.addInt32(r?1:0),s.addDouble(t.m_rotation,17),s.addDouble(t.m_semiMajorAxis,17),s.addDouble(t.m_minorMajorRatio,17),s.endArray(),s.endObject()}return!1}function xe(e,t,n,r,i){const s=e.getEndXY(),a=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!n;let u=Number.NaN,m=Number.NaN;return a&&(u=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("b"),i.startArray(),Se(a,o,s.x,s.y,u,m,r,i),we(e.m_cp[0].x,e.m_cp[0].y,r,i),we(e.m_cp[1].x,e.m_cp[1].y,r,i),i.endArray(),i.endObject(),!1}function Ae(e,t,n,r,i){const s=e.getEndXY(),a=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!n;let u=Number.NaN,m=Number.NaN;a&&(u=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("n"),i.startArray(),Se(a,o,s.x,s.y,u,m,r,i),we(e.m_cp.x,e.m_cp.y,r,i);const l=r;return i.addDouble(e.m_weights[0],l),i.addDouble(e.m_weights[1],l),i.addDouble(e.m_weights[2],l),i.endArray(),i.endObject(),!1}function Se(e,t,n,r,i,s,a,o){o.startArray(),o.addDouble(n,a),o.addDouble(r,a),e&&o.addDouble(i,a),t&&o.addDouble(s,a),o.endArray()}function we(e,t,n,r){r.startArray(),r.addDouble(e,n),r.addDouble(t,n),r.endArray()}class Ce{getOperatorType(){return 10405}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,r,i,s){De(e,t,n,r)}exportSpatialReference(e,t,n,i){r(0)}exportProjectionTransformation(e,t,n,i){r(0)}exportDatumTransformation(e,t,n,i){r(0)}static geometryTypeToString(e){return r(0),""}}function De(e,n,i,s,o){if(n||i){if(s.startObject(),null!==n){switch(n.getGeometryType()){case a.enumPolygon:Fe(!0,e,n,s);break;case a.enumPolyline:Fe(!1,e,n,s);break;case a.enumMultiPoint:je(e,n,s);break;case a.enumPoint:Oe(e,n,s);break;case a.enumEnvelope:ze(e,n,s);break;case a.enumMultipatch:r(0);break;default:t("exportToJSON")}}null!==i&&(s.addFieldName("spatialReference"),Ee(e,i,s)),s.endObject()}}function Fe(e,t,n,i){const s=n.getImpl(),a=!!(2&t),u=!!(4&t),m=!!(8&t),l=s.hasAttribute(1)&&!a,c=s.hasAttribute(2)&&!u,d=s.hasAttribute(3)&&!m,_=s.hasNonLinearSegments();l&&(i.addFieldName("hasZ"),i.addBool(!0)),c&&(i.addFieldName("hasM"),i.addBool(!0)),e?_?i.addFieldName("curveRings"):i.addFieldName("rings"):_?i.addFieldName("curvePaths"):i.addFieldName("paths");let h=null;const f=[];if(n.isEmpty())i.startArray(),i.endArray();else{const e=17-(31&t>>13);i.startArray();const r=n.getPathCount();let m=0;const p=s.getAttributeStreamRef(0);let k=null,b=null,y=null;const T=new E;let N=null,g=null,v=null;_&&(N=s.getSegmentFlagsStreamRef(),g=s.getSegmentIndexStreamRef(),v=s.getSegmentDataStreamRef()),l&&(k=s.getAttributeStreamRef(1)),c&&(b=s.getAttributeStreamRef(2)),d&&(y=s.getAttributeStreamRef(3),h=O(3,0));for(let t=0;t<r;t++){i.startArray(),d&&f.push(0);const r=n.getPathEnd(t);if(m===r){i.endArray();continue}const s=n.isClosedPath(t);let _=p.read(2*m),x=p.read(2*m+1),A=l?k.read(m):Number.NaN,S=c?b.read(m):Number.NaN,w=d?y.read(m):0;Pe(l,c,_,x,A,S,e,i);let C=1;d&&(h.add(w),f[f.length-1]++);const D=_,F=x,j=A,O=S,z=w;let I=!1,E=0,P=Number.NaN,B=Number.NaN,V=0;for(let t=m+1,n=m,R=s?r+1:r;t<R;t++,n++){const s=null!==N?31&N.read(n):1;let m,R;if(t<r?(m=p.read(2*t),R=p.read(2*t+1),l&&(P=k.read(t)),c&&(B=b.read(t)),d&&(V=y.read(t))):(m=D,R=F,P=j,B=O,V=z),1!==s){I=!0,4===s?T.createEllipticArc():2===s?T.createCubicBezier():16===s?T.createQuadraticBezier():8===s?T.createQuadraticRationalBezier():o("JSON export.unsupported curve");const t=T.get(),r=g.read(n);t.setStartXYCoords(_,x),t.setEndXYCoords(m,R),l&&(t.setStartAttribute(1,0,A),t.setEndAttribute(1,0,P)),c&&(t.setStartAttribute(2,0,S),t.setEndAttribute(2,0,B)),t.readFromBufferStream(v,r);ge(T.get(),a,u,e,i)&&E++}else Pe(l,c,m,R,P,B,e,i);d&&(h.add(V),f[f.length-1]++),C++,_=m,x=R,A=P,S=B,w=V}I&&0===E||(C<2&&E<1&&(Pe(l,c,_,x,A,S,e,i),C++,d&&(h.add(w),f[f.length-1]++)),s&&C<3&&E<2&&(Pe(l,c,D,F,j,O,e,i),C++,_=D,x=F,A=j,S=O,w=z,d&&(h.add(z),f[f.length-1]++))),i.endArray(),m=r}i.endArray()}if(d){i.addFieldName("ids"),i.startArray();let e=0;for(let t=0,n=f.length;t<n;++t){const n=f[t];r(0===n||null!==h&&e+n<=h.size()),i.startArray();for(let t=0;t<n;++t)i.addInt32(h.read(e)),e++;i.endArray()}i.endArray()}}function je(e,t,n){const i=t.getImpl(),s=i.hasAttribute(1)&&!(2&e),a=i.hasAttribute(2)&&!(4&e),o=i.hasAttribute(3)&&!(8&e);s&&(n.addFieldName("hasZ"),n.addBool(!0)),a&&(n.addFieldName("hasM"),n.addBool(!0)),n.addFieldName("points");const u=t.getPointCount();if(t.isEmpty())n.startArray(),n.endArray();else{const t=17-(31&e>>13);n.startArray();const r=i.getAttributeStreamRef(0);let o=null,m=null;s&&(o=i.getAttributeStreamRef(1)),a&&(m=i.getAttributeStreamRef(2));for(let e=0;e<u;e++){const i=r.read(2*e),u=r.read(2*e+1);let l=Number.NaN,c=Number.NaN;s&&(l=o.read(e)),a&&(c=m.read(e)),Pe(s,a,i,u,l,c,t,n)}n.endArray()}if(o){let e=null;i.isEmpty()||(e=i.getAttributeStreamRef(3)),r(0===u||null!==e&&e.size()>=u),n.addFieldName("ids"),n.startArray();for(let t=0;t<u;t++)n.addInt32(e.read(t));n.endArray()}}function Oe(e,t,n){const r=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),s=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return n.addFieldName("x"),n.addNull(),n.addFieldName("y"),n.addNull(),r&&(n.addFieldName("z"),n.addNull()),i&&(n.addFieldName("m"),n.addNull()),void(s&&(n.addFieldName("id"),n.addInt32(0)));const a=17-(31&e>>13);n.addFieldName("x"),n.addDouble(t.getX(),a),n.addFieldName("y"),n.addDouble(t.getY(),a),r&&(n.addFieldName("z"),n.addDouble(t.getZ(),a)),i&&(n.addFieldName("m"),n.addDouble(t.getM(),a)),s&&(n.addFieldName("id"),n.addInt32(t.getID()))}function ze(e,t,n){const r=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),s=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return n.addFieldName("xmin"),n.addNull(),n.addFieldName("ymin"),n.addNull(),n.addFieldName("xmax"),n.addNull(),n.addFieldName("ymax"),n.addNull(),r&&(n.addFieldName("zmin"),n.addNull(),n.addFieldName("zmax"),n.addNull()),i&&(n.addFieldName("mmin"),n.addNull(),n.addFieldName("mmax"),n.addNull()),void(s&&(n.addFieldName("idmin"),n.addInt32(0),n.addFieldName("idmax"),n.addInt32(0)));const a=17-(31&e>>13);if(n.addFieldName("xmin"),n.addDouble(t.getXMin(),a),n.addFieldName("ymin"),n.addDouble(t.getYMin(),a),n.addFieldName("xmax"),n.addDouble(t.getXMax(),a),n.addFieldName("ymax"),n.addDouble(t.getYMax(),a),r){const e=t.queryInterval(1,0);n.addFieldName("zmin"),n.addDouble(e.vmin,a),n.addFieldName("zmax"),n.addDouble(e.vmax,a)}if(i){const e=t.queryInterval(2,0);n.addFieldName("mmin"),n.addDouble(e.vmin,a),n.addFieldName("mmax"),n.addDouble(e.vmax,a)}if(s){const e=t.queryInterval(3,0);n.addFieldName("idmin"),n.addInt32(e.vmin),n.addFieldName("idmax"),n.addInt32(e.vmax)}}function Ie(e,t,r){r.startObject();const i=t.getID();i<=0&&n("cannot export unit that has no valid WKID"),r.addFieldName("uwkid"),r.addInt32(i),r.endObject()}function Ee(e,t,n){n.startObject();let r=0;t.isCustomWkid()||(r=t.getOldID());let i=0;const s=t.getVCS();if(null!==s&&(s.isCustomWkid()||(i=s.getOldID()),i<=0&&(r=0)),r>0){n.addFieldName("wkid"),n.addInt32(r);const e=t.getLatestID();if(e>0&&e!==r&&(n.addFieldName("latestWkid"),n.addInt32(e)),i>0){n.addFieldName("vcsWkid"),n.addInt32(i);const e=t.getLatestVerticalID();e!==i&&(n.addFieldName("latestVcsWkid"),n.addInt32(e))}}if(0===t.getCoordinateSystemType())n.addFieldName("wkid"),n.addNull(),null!==t.getUnit()&&(n.addFieldName("unit"),Ie(e,t.getUnit(),n));else if(r<=0||1&e){let r="";64&e&&(r=t.getText2(),n.addFieldName("wkt2"),n.addString(r));const i=t.getText();i!==r&&(n.addFieldName("wkt"),n.addString(i))}if(16&e){const e=new N;t.queryPrecisionDescriptor(e),n.addFieldName("xyTolerance"),n.addDouble(e.getTolerance(0)),n.addFieldName("zTolerance"),n.addDouble(e.getTolerance(1)),n.addFieldName("mTolerance"),n.addDouble(e.getTolerance(2)),n.addFieldName("falseX"),n.addDouble(e.getFalseX()),n.addFieldName("falseY"),n.addDouble(e.getFalseY()),n.addFieldName("xyUnits"),n.addDouble(e.getGridUnitsXY()),n.addFieldName("falseZ"),n.addDouble(e.getFalseZ()),n.addFieldName("zUnits"),n.addDouble(e.getGridUnitsZ()),n.addFieldName("falseM"),n.addDouble(e.getFalseM()),n.addFieldName("mUnits"),n.addDouble(e.getGridUnitsM())}n.endObject()}function Pe(e,t,n,r,i,s,a,o){o.startArray(),o.addDouble(n,a),o.addDouble(r,a),e&&o.addDouble(i,a),t&&o.addDouble(s,a),o.endArray()}const Be={s_a:"a".charCodeAt(0),s_A:"A".charCodeAt(0),s_asterisk:"*".charCodeAt(0),s_b:"b".charCodeAt(0),s_backslash:"\\".charCodeAt(0),s_beginArray:"[".charCodeAt(0),s_beginObject:"{".charCodeAt(0),s_colon:":".charCodeAt(0),s_period:".".charCodeAt(0),s_comma:",".charCodeAt(0),s_doubleQuote:'"'.charCodeAt(0),s_endArray:"]".charCodeAt(0),s_endObject:"}".charCodeAt(0),s_e:"e".charCodeAt(0),s_E:"E".charCodeAt(0),s_f:"f".charCodeAt(0),s_F:"F".charCodeAt(0),s_forwardslash:"/".charCodeAt(0),s_minus:"-".charCodeAt(0),s_plus:"+".charCodeAt(0),s_n:"n".charCodeAt(0),s_N:"N".charCodeAt(0),s_r:"r".charCodeAt(0),s_t:"t".charCodeAt(0),s_u:"u".charCodeAt(0),s_zero:"0".charCodeAt(0),s_nine:"9".charCodeAt(0)};class Ve{m_jsonString;m_endToken;m_startToken;m_currentTokenType;m_bHasEscapes;m_functionStack=[];m_pushPositions=[];m_utf8Decoder=new TextDecoder("utf-8",{fatal:!0});m_prepSubstr;m_getCurrentSubstr;m_stepOverChar;m_peekChar;m_get;m_increment;m_eof;constructor(e){void 0===e?(this.m_startToken=Number.MAX_SAFE_INTEGER,this.m_endToken=0,this.m_currentTokenType=0,this.m_functionStack.push(()=>this.accept_()),this.m_jsonString=null,this.m_bHasEscapes=!1):e.jsonString?this.resetParserFromString(e.jsonString):e.jsonStream?o("streaming json parsing not yet impl"):t("invalid constructor parameter")}prepSubstrString_(){}getCurrentSubstrString_(){return this.m_jsonString.slice(this.m_startToken,this.m_endToken)}stepOverCharString_(){this.m_endToken++}peekCharString_(){return this.m_jsonString.charCodeAt(this.m_endToken)}getString_(e){const t=this.m_jsonString?.slice(this.m_startToken,this.m_startToken+e-1);this.m_endToken+=e-1;return{s:t,bDone:this.m_endToken>=this.m_jsonString.length}}incrementString_(){this.m_endToken++}eofString_(){return this.m_endToken>=this.m_jsonString.length}setStringFunctions_(){this.m_prepSubstr=this.prepSubstrString_,this.m_getCurrentSubstr=this.getCurrentSubstrString_,this.m_stepOverChar=this.stepOverCharString_,this.m_peekChar=this.peekCharString_,this.m_get=this.getString_,this.m_increment=this.incrementString_,this.m_eof=this.eofString_}setStreamFunctions_(){o("streaming json parsing not yet impl")}reset_(){this.m_jsonString=null,this.m_endToken=0,this.m_startToken=Number.MAX_SAFE_INTEGER,this.m_currentTokenType=0,this.m_bHasEscapes=!1,this.m_functionStack.length=0,this.m_functionStack.push(()=>this.start_()),this.m_pushPositions.length=0}resetParserFromString(e){this.reset_(),this.setStringFunctions_(),this.m_jsonString=e}resetParserFromStream(e){o("streaming json parsing not yet impl")}resetToPosition(e){return!!this.m_jsonString&&(this.m_endToken=e,this.m_startToken=Number.MAX_VALUE,this.m_currentTokenType=0,this.m_functionStack.length=0,e>=this.m_jsonString.length?(this.m_functionStack.push(()=>this.accept_()),!1):(this.m_functionStack.push(()=>this.start_()),!0))}nextToken(){return this.m_functionStack.at(-1)(),this.m_currentTokenType}currentToken(){return this.m_currentTokenType}currentTokenStartIndex(){return this.m_startToken}currentTokenEndIndex(){return this.m_endToken}currentText(){return r(0),""}childrenAsString(){return r(0),""}skipChildren(){this.skipChildren_()}skipChildren_(){if(1===this.m_currentTokenType){let e=1;do{this.m_currentTokenType=this.nextToken(),1===this.m_currentTokenType?e++:3===this.m_currentTokenType&&e--}while(3!==this.m_currentTokenType||0!==e);return}if(2===this.m_currentTokenType){let e=1;do{this.m_currentTokenType=this.nextToken(),2===this.m_currentTokenType?e++:4===this.m_currentTokenType&&e--}while(4!==this.m_currentTokenType||0!==e);return}}currentTerminalAsString_(){switch(this.m_currentTokenType){case 7:case 8:case 9:return this.m_getCurrentSubstr().slice(0,this.m_endToken-this.m_startToken);case 10:return"null";case 11:return"true";case 12:return"false"}n("invalid token")}toUTF8_(e,t){let n=0,r=e;for(;t.charCodeAt(r)===Be.s_backslash&&t.charCodeAt(r+1)===Be.s_u;)n++,r+=6;r=e;const i=new Uint8Array(n);let s=0;for(;t.charCodeAt(r)===Be.s_backslash&&t.charCodeAt(r+1)===Be.s_u;)i[s++]=Number.parseInt(t.slice(r+2,r+6),16),r+=6;return{u8s:this.m_utf8Decoder.decode(i),end:r}}unquoteCurrentString_(){let e="",t=1;const n=this.m_endToken-this.m_startToken-1;let r=0;const i=this.m_getCurrentSubstr();for(let s=t;s<n;s++)if(i.charCodeAt(s)!==Be.s_backslash)r++;else{switch(r>0&&(e+=i.slice(t,t+r)),i.charCodeAt(++s)){case Be.s_doubleQuote:e+='"';break;case Be.s_u:{const{u8s:t,end:n}=this.toUTF8_(s-1,i);s=n-1,e+=t;break}case Be.s_backslash:e+="\\";break;case Be.s_forwardslash:e+="/";break;case Be.s_b:e+="\b";break;case Be.s_f:e+="\f";break;case Be.s_n:e+="\n";break;case Be.s_r:e+="\r";break;case Be.s_t:e+="\t"}t=s+1,r=0}return r>0&&(e+=i.slice(t,t+r)),e}currentString(){if(5!==this.m_currentTokenType&&6!==this.m_currentTokenType)return this.currentTerminalAsString_();if(this.m_bHasEscapes)return this.unquoteCurrentString_();return this.m_getCurrentSubstr().slice(1,this.m_endToken-this.m_startToken-2+1)}currentDoubleValue(){if(7!==this.m_currentTokenType&&8!==this.m_currentTokenType&&9!==this.m_currentTokenType&&6!==this.m_currentTokenType&&10!==this.m_currentTokenType&&n("invalid token"),10===this.m_currentTokenType)return Number.NaN;let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;if(6===this.m_currentTokenType){if("NaN"===this.currentString())return Number.NaN;e=e.slice(1),t-=2,0===t&&n("invalid token")}const r=Number.parseFloat(e);if(6===this.m_currentTokenType)Number.isNaN(r)&&n("invalid token");else if(Number.isNaN(r))return Number.NaN;return r}currentInt32Value(){8!==this.m_currentTokenType&&6!==this.m_currentTokenType&&n("invalid token");let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;6===this.m_currentTokenType&&(e=e.slice(1),t-=2,0===t&&n("invalid token"));const r=parseInt(e);return Number.isNaN(r)&&n("invalid token"),r}currentInt64Value(){return r(0),0n}currentBoolValue(){return r(0),!1}isError(){return 0}JSONString(){return r(0),""}pushPosition(){return r(0),!1}popPosition(){return r(0),!1}skipCStyleComments_(){r(0)}skipCppStyleComments_(){r(0)}skipComments_(){this.m_prepSubstr();let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&n("invalid token"),e=this.m_peekChar(),e===Be.s_asterisk?this.skipCStyleComments_():e===Be.s_forwardslash?this.skipCppStyleComments_():n("invalid token")}skipWhiteSpace_(){let e;do{this.m_eof()&&n("invalid token");let t=this.m_peekChar();for(;t>=9&&t<=13||32===t;)this.m_increment(),this.m_eof()&&n("invalid token"),t=this.m_peekChar();t===Be.s_forwardslash?(this.m_startToken=this.m_endToken,e=!0,this.skipComments_()):e=!1}while(e)}rightBracket_(){return this.m_peekChar()===Be.s_endArray&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=4,!0)}rightBrace_(){return this.m_peekChar()===Be.s_endObject&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=3,!0)}string_(){this.m_prepSubstr(),this.m_bHasEscapes=!1,this.m_stepOverChar(),this.m_eof()&&n("invalid token");let e=this.m_peekChar();for(;e!==Be.s_doubleQuote;){const t=e===Be.s_backslash;if(this.m_stepOverChar(),this.m_eof()&&n("invalid token"),e=this.m_peekChar(),t)if(this.m_bHasEscapes=!0,e===Be.s_doubleQuote||e===Be.s_backslash||e===Be.s_forwardslash||e===Be.s_b||e===Be.s_f||e===Be.s_n||e===Be.s_r||e===Be.s_t)this.m_stepOverChar(),this.m_eof()&&n("invalid token"),e=this.m_peekChar();else if(e===Be.s_u)for(let r=0;r<4;r++)this.m_stepOverChar(),this.m_eof()&&n("invalid token"),e=this.m_peekChar(),e>=Be.s_zero&&e<=Be.s_nine||e>=Be.s_a&&e<=Be.s_f||e>=Be.s_A&&e<=Be.s_F||n("invalid token");else n("invalid token")}this.m_stepOverChar()}comma_(){return this.m_peekChar()===Be.s_comma&&(this.m_increment(),!0)}colon_(){return this.m_peekChar()===Be.s_colon&&(this.m_increment(),!0)}fieldNameEnd_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.colon_()?(this.skipWhiteSpace_(),this.value_()):n("invalid token")}fieldNameStart_(){this.m_startToken=this.m_endToken;this.m_peekChar()!==Be.s_doubleQuote&&n("invalid token"),this.string_(),this.m_currentTokenType=5,this.m_functionStack.push(()=>this.fieldNameEnd_())}pairEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.fieldNameStart_()):this.rightBrace_()?this.m_functionStack.pop():n("invalid token")}arrayStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBracket_()||(this.m_functionStack.push(()=>this.elementEnd_()),this.value_())}elementEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.value_()):this.rightBracket_()?this.m_functionStack.pop():n("invalid token")}objectStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBrace_()||(this.m_functionStack.push(()=>this.pairEnd_()),this.fieldNameStart_())}valueStartObject_(){this.m_increment(),this.m_currentTokenType=1,this.m_functionStack.push(()=>this.objectStart_())}valueStartArray_(){this.m_increment(),this.m_currentTokenType=2,this.m_functionStack.push(()=>this.arrayStart_())}valueString_(){this.string_(),this.m_currentTokenType=6}int_(){this.m_peekChar()!==Be.s_zero?this.digits_():this.m_stepOverChar()}digits_(){let e=this.m_peekChar();do{this.m_stepOverChar(),this.m_eof()&&n("invalid token"),e=this.m_peekChar()}while(e>=Be.s_zero&&e<=Be.s_nine)}frac_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&n("invalid token"),e=this.m_peekChar(),e>=Be.s_zero&&e<=Be.s_nine||n("invalid token"),this.digits_()}exp_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&n("invalid token"),e=this.m_peekChar(),e!==Be.s_plus&&e!==Be.s_minus||(this.m_stepOverChar(),this.m_eof()&&n("invalid token"),e=this.m_peekChar()),e>=Be.s_zero&&e<=Be.s_nine||n("invalid token"),this.digits_()}valueNumber_(){this.m_prepSubstr();let e=!1,t=this.m_peekChar();if(t===Be.s_minus?(this.m_stepOverChar(),this.m_eof()&&n("invalid token"),t=this.m_peekChar(),e=!0,t>=Be.s_zero&&t<=Be.s_nine||n("invalid token"),this.int_()):this.int_(),t=this.m_peekChar(),t===Be.s_period)this.m_currentTokenType=7,this.frac_(),t=this.m_peekChar(),t!==Be.s_e&&t!==Be.s_E||this.exp_();else if(t===Be.s_e||t===Be.s_E)this.m_currentTokenType=7,this.exp_();else{let t=0;e&&t++;const n=this.m_endToken-this.m_startToken-t;if(n<10)this.m_currentTokenType=8;else if(10===n){const n=this.m_getCurrentSubstr();e?n.slice(t)<="2147483648"?this.m_currentTokenType=8:this.m_currentTokenType=9:n.slice(t)<="2147483647"?this.m_currentTokenType=8:this.m_currentTokenType=9}else if(n<19)this.m_currentTokenType=9;else if(19===n){const n=this.m_getCurrentSubstr();e?n.slice(t)<="9223372036854775808"?this.m_currentTokenType=9:this.m_currentTokenType=7:n.slice(t)<="9223372036854775807"?this.m_currentTokenType=9:this.m_currentTokenType=7}else this.m_currentTokenType=7}}valueNull_(){const{s:e,bDone:t}=this.m_get(5);t&&n("invalid token"),"null"!==e&&n("invalid token"),this.m_currentTokenType=10}valueTrue_(){const{s:e,bDone:t}=this.m_get(5);t&&n("invalid token"),"true"!==e&&n("invalid token"),this.m_currentTokenType=11}valueFalse_(){const{s:e,bDone:t}=this.m_get(6);t&&n("invalid token"),"false"!==e&&n("invalid token"),this.m_currentTokenType=12}valueNan_(){const{s:e,bDone:t}=this.m_get(4);t&&n("invalid token"),"NaN"!==e&&n("invalid token"),this.m_currentTokenType=7}value_(){this.m_startToken=this.m_endToken;const e=this.m_peekChar();e===Be.s_beginObject?this.valueStartObject_():e===Be.s_beginArray?this.valueStartArray_():e===Be.s_doubleQuote?this.valueString_():e===Be.s_minus||e>=Be.s_zero&&e<=Be.s_zero+9?this.valueNumber_():e===Be.s_n?this.valueNull_():e===Be.s_t?this.valueTrue_():e===Be.s_f?this.valueFalse_():e===Be.s_N?this.valueNan_():n("invalid token")}start_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.m_functionStack.push(()=>this.accept_());const e=this.m_peekChar();e!==Be.s_beginObject&&e!==Be.s_beginArray&&n("invalid token"),this.value_()}accept_(){this.m_startToken=this.m_endToken,this.m_currentTokenType=0}}class Re{getOperatorType(){return 10404}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,r,i,s,a,o){let u;"string"==typeof r?(u=new Ve({jsonString:r}),u.nextToken()):u=r,1!==u.currentToken()&&n("failed to import map geometry: start of object is expected");const m=ne(t,e,u,i,s);return new v(m)}importSpatialReference(e){const n=ie(e);return null===n&&t("failed to import spatial reference"),n}importProjectionTransformation(e,t){return r(0),{}}importDatumTransformation(e,t){return r(0),{}}static stringToGeometryType(e){return(e=e.toLowerCase()).startsWith("esrigeometry")||n("string_to_geometry_type"),e.endsWith("point")?a.enumPoint:e.endsWith("envelope")?a.enumEnvelope:e.endsWith("multipoint")?a.enumMultiPoint:e.endsWith("polyline")?a.enumPolyline:e.endsWith("polygon")?a.enumPolygon:void n("string_to_geometry_type")}}const Me=new ee,Ue=new Ce,We=new Re;function Xe(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function Ge(t,n=!1){if(!n&&(q(t)||K(t)||J(t)||Q(t))){const n=new v;return n.setGeometry(e(L(t))),n}const r=new $(t,{strict:!1});return r.nextToken(),We.execute(0,a.enumUnknown,r,!0,!1)}function Le(e){let t=null;return[e.map(e=>{if(null==t){const n=Ye(e);return t=n.getSpatialReference(),n.getGeometry()}return qe(e)}),t]}function Ye(e){const t=Ge(e),n=Je(e.spatialReference);return n&&t.setSpatialReference(n),t}function qe(e){return Ge(e).getGeometry()}function Ke(e){return Ge(e,!0).getGeometry()}function Je(e){if(null==e)return null;let t=!1;if(e instanceof Y){const{wkt2:n}=e;e=e.toJSON(),e.wkt2??=n,t=!0}(e.latestVcsWkid||e.vcsWkid)&&(t||(e={...e}),delete e?.latestVcsWkid,delete e?.vcsWkid);const n=new $(e,{strict:!1});n.nextToken();const r=We.importSpatialReference(n);return 0===r.getCoordinateSystemType()?null:r}function Qe(e,t){if(e instanceof v&&(t=e.getSpatialReference(),e=e.getGeometry()),null==e||e.isEmpty())return null;let n;switch(e.getGeometryType()){case a.enumPoint:case a.enumMultiPoint:case a.enumPolyline:case a.enumPolygon:n=X(e)}if(n){const e=G(n);return e.spatialReference=Ze(t),null==e.spatialReference&&delete e.spatialReference,e}return Me.reset(),Ue.execute(0,e,t??null,Me),Me.getObject()}function Ze(e){return null==e||0===e.getCoordinateSystemType()?null:(Me.reset(),Ue.execute(0,null,e,Me),Me.getObject().spatialReference)}export{Le as fromGeometries,Ye as fromGeometry,qe as fromGeometryToGXGeometry,Ke as fromGeometryToGXGeometryUsingImportOperator,Je as fromSpatialReference,Xe as getSpatialReference,Qe as toGeometry,Ze as toSpatialReference};
2
+ import{constructFromFlatGeometry as e}from"../../../chunks/FlatGeometry.js";import{d as t,a as n,g as r,r as i,q as s,G as a,t as o}from"../../../chunks/Geometry.js";import{aL as u,i as m,d as l,b as c,aM as d,P as _,m as h}from"../../../chunks/Point2D.js";import{q as f,b as p,p as k,aZ as b,c as y,e as T,a as N,f as g,a_ as v}from"../../../chunks/UnitFactory.js";import{a2 as x,a5 as A,P as S,E as w,a0 as C,a1 as D,a6 as F,a7 as j,X as O}from"../../../chunks/Envelope.js";import{P as z,a as I,S as E,M as P,J as B,a5 as V,a6 as R,a7 as M,a8 as U,a9 as W}from"../../../chunks/MultiPathImpl.js";import{convertGeometryxToFlat as X,convertFlatToGeometryJSON as G,convertGeometryToFlat as L}from"../../FlatGeometry.js";import Y from"../../SpatialReference.js";import"./initNoPeFactory.js";import{isPoint as q,isMultipoint as K,isPolyline as J,isPolygon as Q}from"../../support/jsonTypeUtils.js";function Z(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:1,m_value:null},done:!1};if(this.m_i<this.m_keys.length){const e=this.m_bReturnKey,t=Math.trunc(this.m_i);return this.m_bReturnKey=!this.m_bReturnKey,this.m_i+=.5,e?{value:{m_token:5,m_value:this.m_keys[t]},done:!1}:{value:{m_token:6,m_value:this.m_o[this.m_keys[t]]},done:!1}}return{value:{m_token:3,m_value:null},done:!0}}function H(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:2,m_value:null},done:!1};if(this.m_i<this.m_a.length){const e={value:{m_token:6,m_value:this.m_a[this.m_i++]},done:!1};return this.m_strict||void 0===e.value.m_value&&(e.value.m_value=Number.NaN),e}return{value:{m_token:4,m_value:null},done:!0}}class ${m_iteratorStack;m_nextFlatToken;m_currentToken=0;m_currentValue;m_options;createJSONObjectIterator(e){return{m_iteratorType:"object",m_o:e,m_keys:this.m_options.strict?Object.keys(e):Object.keys(e).filter(t=>void 0!==e[t]),m_i:-1,m_bReturnKey:!0,next:Z}}createJSONArrayIterator(e){return{m_iteratorType:"array",m_strict:this.m_options.strict,m_i:-1,m_a:e,next:H}}constructor(e,t){this.m_options=t?{...t}:{strict:!0};const n=e;this.m_iteratorStack=[n instanceof Array?this.createJSONArrayIterator(n):this.createJSONObjectIterator(n)],this.m_nextFlatToken={m_value:null,m_token:0}}nextToken(){if(0===this.m_iteratorStack.length)return this.m_currentToken=0;switch(this.m_nextFlatToken=this.m_iteratorStack.at(-1).next().value,this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_currentToken=1;case 3:return this.m_iteratorStack.pop(),this.m_currentToken=3;case 2:return this.m_currentToken=2;case 4:return this.m_iteratorStack.pop(),this.m_currentToken=4;case 5:return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=5;case 6:if(this.m_nextFlatToken.m_value instanceof Array)return this.m_iteratorStack.push(this.createJSONArrayIterator(this.m_nextFlatToken.m_value)),this.nextToken();if(this.m_nextFlatToken.m_value instanceof Object)return this.m_iteratorStack.push(this.createJSONObjectIterator(this.m_nextFlatToken.m_value)),this.nextToken();if("number"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,Number.isSafeInteger(this.m_currentValue)&&this.m_currentValue>=u()&&this.m_currentValue<=m()?this.m_currentToken=8:this.m_currentToken=7;if("string"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=6;if("boolean"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=this.m_nextFlatToken.m_value?11:12;if("object"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=null,this.m_currentToken=10;t("unrecognized json element type")}t("unrecognized json element type")}currentToken(){return this.m_currentToken}skipChildren(){if(0!==this.m_iteratorStack.length)switch(this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=3,void(this.m_currentToken=3);case 2:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=4,void(this.m_currentToken=4)}}currentString(){return 6!==this.m_currentToken&&5!==this.m_currentToken&&n("invalid token"),this.m_currentValue}currentDoubleValue(){return 7!==this.m_currentToken&&8!==this.m_currentToken&&n("invalid token"),this.m_currentValue}currentInt32Value(){return 8!==this.m_currentToken&&n("invalid token"),this.m_currentValue}currentInt64Value(){return r(0),0n}currentBoolValue(){return 12!==this.m_currentToken&&11!==this.m_currentToken&&n("invalid token"),this.m_currentValue}isError(){return 0}}class ee{m_pendingKey=null;m_acceptedObject=null;m_currentObject=[];reset(){this.m_pendingKey=null,this.m_acceptedObject=null,this.m_currentObject.length=0}startObject(){const e={};this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}startArray(){const e=[];this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}endObject(){this.m_acceptedObject=this.m_currentObject.at(-1),this.m_currentObject.pop()}endArray(){this.m_currentObject.pop()}addFieldName(e){this.m_pendingKey=e}addValue_(e){this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):this.m_currentObject.at(-1).push(e)}addString(e){this.addValue_(e)}addDouble(e,t){this.addValue_(e)}addInt64(e){r(0)}addInt32(e){this.addValue_(e)}addBool(e){this.addValue_(e)}addNull(){this.addValue_(null)}getObject(){return this.m_acceptedObject}}class te{m_buffer=null;m_view=null;m_sz=0;m_offset=0;m_bOwnsBuffer=!0;m_bLittleEndian=!0;m_element;m_elementBytes;m_elementView;m_elementDouble;m_elementFloat;m_elementInt64;m_elementInt32;m_elementInt16;constructor(e){return this.m_element=new ArrayBuffer(8),this.m_elementBytes=new Uint8Array(this.m_element),this.m_elementView=new DataView(this.m_element),this.m_elementDouble=new Float64Array(this.m_element),this.m_elementFloat=new Float32Array(this.m_element),this.m_elementInt64=new BigInt64Array(this.m_element),this.m_elementInt32=new Int32Array(this.m_element),this.m_elementInt16=new Int16Array(this.m_element),void 0!==e.sz?(this.m_sz=e.sz,e.buffer?(this.m_sz<0&&i("size out of range"),this.m_buffer=e.buffer,this.m_offset=void 0!==e.offset?e.offset:0,this.m_view=void 0!==e.offset?new DataView(e.buffer,e.offset,e.sz):new DataView(this.m_buffer),this.m_bOwnsBuffer=!1,void(this.m_bLittleEndian=!0)):(this.m_sz<0&&i("size out of range"),void(this.m_sz>0&&(this.m_buffer=new ArrayBuffer(this.m_sz),this.m_view=new DataView(this.m_buffer))))):e.move?(this.m_sz=e.move.m_sz,this.m_buffer=e.move.m_buffer,this.m_view=e.move.m_view,this.m_bOwnsBuffer=e.move.m_bOwnsBuffer,this.m_bLittleEndian=e.move.m_bLittleEndian,e.move.m_buffer=null,e.move.m_view=null,e.move.m_sz=0,void(e.move.m_bOwnsBuffer=!0)):void t("unrecognized constructor options")}swapBytesDouble(){this.doSwap()&&(this.m_elementDouble[0]=this.m_elementBytes[0]<<56|this.m_elementBytes[1]<<48|this.m_elementBytes[2]<<40|this.m_elementBytes[3]<<32|this.m_elementBytes[4]<<24|this.m_elementBytes[5]<<16|this.m_elementBytes[6]<<8|this.m_elementBytes[7])}swapBytesInt32(){this.doSwap()&&(this.m_elementInt32[0]=this.m_elementBytes[0]<<24|this.m_elementBytes[1]<<16|this.m_elementBytes[2]<<8|this.m_elementBytes[3])}getOffset(){return this.m_offset}assignMove(e){return this===e||(this.clear(),this.m_sz=e.m_sz,this.m_buffer=e.m_buffer,this.m_view=e.m_view,this.m_bOwnsBuffer=e.m_bOwnsBuffer,this.m_bLittleEndian=e.m_bLittleEndian,e.m_buffer=null,e.m_sz=0,e.m_bOwnsBuffer=!0),this}doSwap(){return this.m_bLittleEndian!==(1===te.getNativeByteOrder())}setNativeByteOrder(){this.m_bLittleEndian=1===te.getNativeByteOrder()}setOrder(e){this.m_bLittleEndian=1===e}getOrder(){return this.m_bLittleEndian?1:0}getView(){return this.m_view||s("buffer not defined"),this.m_view}static getNativeByteOrder(){return 1}clear(){this.m_buffer=null,this.m_sz=0,this.m_bOwnsBuffer=!0}size(){return this.m_sz}readDouble(e){return this.doSwap()?(this.m_elementDouble[0]=this.m_view.getFloat64(e,this.m_bLittleEndian),this.swapBytesDouble(),this.m_elementDouble[0]):this.m_view.getFloat64(e,this.m_bLittleEndian)}writeDouble(e,t){this.m_elementDouble[0]=t,this.swapBytesDouble(),this.m_view.setFloat64(e,this.m_elementDouble[0],this.m_bLittleEndian)}readInt32(e){return this.doSwap()?(this.m_elementInt32[0]=this.m_view.getInt32(e,this.m_bLittleEndian),this.swapBytesInt32(),this.m_elementInt32[0]):this.m_view.getInt32(e,this.m_bLittleEndian)}writeInt32(e,t){this.m_elementInt32[0]=t,this.swapBytesInt32(),this.m_view.setInt32(e,this.m_elementInt32[0],this.m_bLittleEndian)}getPtr(){return this.m_buffer}setSizeNoRealloc(e){r(e>=0&&e<=this.m_sz),this.m_sz=e}}function ne(e,t,i,s,o,u){let m=!1,l=!1,c=!1,d=!1,_=!1,h=!1,f=!1,p=!1,k=!1,b=!1,y=!1,T=!1,N=!1,g=!1,v=!1,C=!1,D=!1,F=!1,j=!1,O=!1,z=!1,I=!1,E=!1,P=!1,B=Number.NaN,V=Number.NaN,R=Number.NaN,M=Number.NaN,U=0,W=Number.NaN,X=Number.NaN,G=Number.NaN,L=Number.NaN,Y=Number.NaN,q=Number.NaN,K=Number.NaN,J=Number.NaN,Q=0,Z=0,H=!1,$=!1,ee=null,te=null,ne=null,re=null,ce=null;for(;3!==i.nextToken();){const u=i.currentString();if(i.nextToken(),"spatialReference"===u){if(o&&!m){m=!0,1===i.currentToken()?re=ie(i):10!==i.currentToken()&&n("failed to parse spatial reference: object or null is expected");continue}}else if(s)if("hasZ"===u){if(!l){l=!0,H=11===i.currentToken();continue}}else if("hasM"===u){if(!c){c=!0,$=11===i.currentToken();continue}}else if("rings"===u){if(!(_||h||e!==a.enumUnknown&&e!==a.enumPolygon)){_=!0,({geometry:ce,as:ee,bs:te}=se(!0,!1,t,i));continue}}else if("curveRings"===u){if(!h&&(e===a.enumUnknown||e===a.enumPolygon)){h=!0,({geometry:ce,as:ee,bs:te}=se(!0,!0,t,i));continue}}else if("paths"===u){if(!(f||p||e!==a.enumUnknown&&e!==a.enumPolyline)){f=!0,({geometry:ce,as:ee,bs:te}=se(!1,!1,t,i));continue}}else if("curvePaths"===u){if(!p&&(e===a.enumUnknown||e===a.enumPolyline)){p=!0,({geometry:ce,as:ee,bs:te}=se(!1,!0,t,i));continue}}else if("points"===u){if(!k&&(e===a.enumUnknown||e===a.enumMultiPoint)){k=!0,({geometry:ce,as:ee,bs:te}=ae(t,i));continue}}else if("ids"===u){if(!d){d=!0,ne=oe(t,i);continue}}else if("x"===u){if(!b&&(e===a.enumUnknown||e===a.enumPoint)){b=!0,B=ue(i);continue}}else if("y"===u){if(!y&&(e===a.enumUnknown||e===a.enumPoint)){y=!0,V=ue(i);continue}}else if("z"===u){if(!T&&(e===a.enumUnknown||e===a.enumPoint)){T=!0,R=ue(i);continue}}else if("m"===u){if(!N&&(e===a.enumUnknown||e===a.enumPoint)){N=!0,M=ue(i);continue}}else if("id"===u){if(!g&&(e===a.enumUnknown||e===a.enumPoint)){g=!0,U=me(i);continue}}else if("xmin"===u){if(!v&&(e===a.enumUnknown||e===a.enumEnvelope)){v=!0,W=ue(i);continue}}else if("ymin"===u){if(!C&&(e===a.enumUnknown||e===a.enumEnvelope)){C=!0,X=ue(i);continue}}else if("mmin"===u){if(!z&&(e===a.enumUnknown||e===a.enumEnvelope)){z=!0,K=ue(i);continue}}else if("zmin"===u){if(!j&&(e===a.enumUnknown||e===a.enumEnvelope)){j=!0,Y=ue(i);continue}}else if("idmin"===u){if(!E&&(e===a.enumUnknown||e===a.enumEnvelope)){E=!0,Q=me(i);continue}}else if("xmax"===u){if(!D&&(e===a.enumUnknown||e===a.enumEnvelope)){D=!0,G=ue(i);continue}}else if("ymax"===u){if(!F&&(e===a.enumUnknown||e===a.enumEnvelope)){F=!0,L=ue(i);continue}}else if("mmax"===u){if(!I&&(e===a.enumUnknown||e===a.enumEnvelope)){I=!0,J=ue(i);continue}}else if("zmax"===u){if(!O&&(e===a.enumUnknown||e===a.enumEnvelope)){O=!0,q=ue(i);continue}}else if("idmax"===u){if(!P&&(e===a.enumUnknown||e===a.enumEnvelope)){P=!0,Z=me(i);continue}}else"materials"===u&&r(0);i.skipChildren()}if(_||h||f||p||k){let e=null,t=null;const n=ce;H&&(ce.addAttribute(1),e=ee,e||(e=x(n.getPointCount(),Number.NaN))),$&&(ce.addAttribute(2),t=H?te:ee),null!=ne&&ce.addAttribute(3),H&&null!=e&&n.setAttributeStreamRef(1,e),$&&null!=t&&n.setAttributeStreamRef(2,t),null!=ne&&le(n,ne)}else if(b||y||N||T||g){A(B,V)||n("failed to parse point: x and y must be finite or nan"),(Number.isNaN(V)||Number.isNaN(B))&&(B=Number.NaN,V=Number.NaN);const e=new S({x:B,y:V});T&&e.setZ(R),N&&e.setM(M),g&&e.setID(U),ce=e}else if(v||C||D||F||j||O||z||I||E||P){(Number.isNaN(X)||Number.isNaN(G)||Number.isNaN(L))&&(W=Number.NaN);const e=new w({xmin:W,ymin:X,xmax:G,ymax:L});j&&O&&e.setInterval(1,0,Y,q),z&&I&&e.setInterval(2,0,K,J),E&&P&&e.setInterval(3,0,Q,Z),ce=e}return{...ce?{geom:ce}:{},...re?{sr:re}:{}}}function re(e){let t=!1;for(;3!==e.nextToken();){const n=e.currentString();e.nextToken(),"uwkid"===n?t||(t=!0,8===e.currentToken()&&e.currentInt32Value()):e.skipChildren()}return null}function ie(e){let t=!1,n=!1,r=!1,i=!1,s=!1,a=!1,o=!1,u=!1,m=!1,l=!1,c=!1,d=!1,_=!1,h=!1,v=!1,x=!1,A=!1,S=-1,w=-1,C=-1,D=-1,F=0,j=0,O=0,z=0,I=0,E=0,P=0,B=0,V=0,R=0,M="",U="",W=null;for(;3!==e.nextToken();){const f=e.currentString();e.nextToken(),"wkid"===f?t||(t=!0,8===e.currentToken()&&(S=e.currentInt32Value())):"latestWkid"===f?n||(n=!0,8===e.currentToken()&&(w=e.currentInt32Value())):"wkt"===f?s||(s=!0,6===e.currentToken()&&(M=e.currentString())):"wkt2"===f?s||6===e.currentToken()&&(U=e.currentString()):"vcsWkid"===f?r||(r=!0,8===e.currentToken()&&(C=e.currentInt32Value())):"latestVcsWkid"===f?i||(i=!0,8===e.currentToken()&&(D=e.currentInt32Value())):"xyTolerance"===f?o||(o=!0,a=!0,F=e.currentDoubleValue()):"zTolerance"===f?u||(u=!0,a=!0,j=e.currentDoubleValue()):"mTolerance"===f?m||(m=!0,a=!0,O=e.currentDoubleValue()):"falseX"===f?l||(l=!0,a=!0,P=e.currentDoubleValue()):"falseY"===f?c||(c=!0,a=!0,B=e.currentDoubleValue()):"falseZ"===f?d||(d=!0,a=!0,V=e.currentDoubleValue()):"falseM"===f?_||(_=!0,a=!0,R=e.currentDoubleValue()):"xyUnits"===f?h||(h=!0,a=!0,z=e.currentDoubleValue()):"zUnits"===f?v||(v=!0,a=!0,I=e.currentDoubleValue()):"mUnits"===f?x||(x=!0,a=!0,E=e.currentDoubleValue()):"unit"===f?A||(A=!0,W=re(e)):e.skipChildren()}D<=0&&C>0&&(D=C),C<=0&&D>0&&(C=D);let X=null,G=!0;if(0!==M.length&&(G=!1,f(M)&&(X=p(M))),X||0===U.length||(G=!1,f(U)&&(X=p(U))),!X&&w>0&&(G=!1,k(w)&&(D<=0||b())&&(X=y(w,D))),!X&&S>0&&(G=!1,k(S)&&(C<=0||b())&&(X=y(S,C))),G&&(X=T(W)),a&&X){const e=new N;X.queryPrecisionDescriptorWithoutFalseXY(e),o&&e.setTolerance(0,F),u&&e.setTolerance(1,j),m&&e.setTolerance(2,O),h&&l&&c&&e.setGridParams(P,B,z),v&&d&&e.setZParams(V,I),x&&_&&e.setMParams(R,E),X=g(X,e)}return X}function se(e,t,r,i){2!==i.currentToken()&&n("failed to parse multipath: array of array of vertices is expected");const s=e?new z:new I,a=s,o=C(0),u=x(2,0),m=D(0);let h=null,f=null,p=null,k=null,b=null,y=0,T=0,N=0;const g=new E,v=_.getNAN();let A=0,S=0;const w=e?1:0;for(;4!==i.nextToken();){2!==i.currentToken()&&n("failed to parse multipath: ring/path array is expected");let r=2,s=0,j=!0;const O=4;let z=0,I=0;const E=_.getNAN(),P=l(O,Number.NaN),B=l(O,Number.NaN);let V=!1;for(i.nextToken();4!==i.currentToken();){if(t&&1===i.currentToken())j&&n("failed to parse multipath: starting vertex array is expected"),p||(p=D(A-1,1),k=C(A-1,-1),b=x(0)),V=!0,r=1,({segFlag:N,toPointSz:z}=ke(g,P,v,i));else{for(V=!1,2!==i.currentToken()&&n("failed to parse multipath: array is expected, rings/paths vertices consist of arrays of coordinates"),z=0;4!==i.nextToken();)z===O&&n("failed to parse multipath: each vertex array has to have at most 4 elements"),P[z++]=ue(i);z<2&&n("failed to parse multipath: each vertex array has to have at least 2 elements"),F(P[0],P[1])||n("failed to parse multipath: x and y must be finite")}i.nextToken();do{if(u.size()===2*A&&u.resize(ce(A)),u.writePoint2D(2*A,E.setCoords(P[0],P[1])),h&&h.size()===A&&h.resize(de(A)),z>2?(h||(h=x(A+1,Number.NaN)),h.write(A,P[2])):h&&h.write(A,Number.NaN),f&&f.size()===A&&f.resize(de(A)),z>3?(f||(f=x(A+1,Number.NaN)),f.write(A,P[3])):f&&f.write(A,Number.NaN),j)S++,o.add(A),m.add(w),j=!1,I=z,c(B,P,0,0,I);else if(null!==p)if(V){const e=W(N),t=b.size();b.resize(t+e),p.add(N),k.add(y),g.get().writeInBufferStream(b,y),y+=e,a.incCurveType(N,1),T++}else p.add(1),k.add(-1);A++,s++,v.setCoords(P[0],P[1])}while(s<r&&4===i.currentToken())}0!==s&&(e&&s>r&&z===I&&0===d(P,B,z)?(A--,s--):null!==p&&(p.add(1),k.add(-1)))}return A&&(o.resize(S),m.resize(S),A>0&&(o.add(A),m.add(0)),a.setAttributeStreamRef(0,u),a.setPathFlagsStreamRef(m),a.setPathStreamRef(o),null!==p&&(a.updateCurveCounter(T),a.setSegmentData(k,b,p,y)),a.notifyModifiedFlags(65535)),{geometry:s,as:h,bs:f}}function ae(e,t){2!==t.currentToken()&&n("failed to parse multipoint: array of vertices is expected");let r=0;const i=new P,s=x(2,0);let a=0;const o=4,u=l(o,Number.NaN),m=new _;let c=null,d=null;for(;4!==t.nextToken();){for(2!==t.currentToken()&&n("failed to parse multipoint: array is expected, multipoint vertices consist of arrays of cooridinates"),a=0;4!==t.nextToken();)a===o&&n("failed to parse multipoint: each vertex array has to have at most 4 elements"),u[a++]=ue(t);a<2&&n("failed to parse multipoint: each vertex array has to have at least 2 elements"),F(u[0],u[1])||n("failed to parse multipoint: x and y must be finite"),s.size()===2*r&&s.resize(ce(r)),s.writePoint2D(2*r,m.setCoords(u[0],u[1])),c&&c.size()===r&&c.resize(de(r)),a>2?(c||(c=x(r+1,Number.NaN)),c.write(r,u[2])):c&&c.write(r,Number.NaN),d&&d.size()===r&&d.resize(de(r)),a>3?(d||(d=x(r+1,Number.NaN)),d.write(r,u[3])):d&&d.write(r,Number.NaN),r++}if(r){const e=i.getImpl();e.setAttributeStreamRef(0,s),e.resizeNoInit(r),e.notifyModifiedFlags(65535)}return{geometry:i,as:c,bs:d}}function oe(e,t){2!==t.currentToken()&&n("failed to parse array of IDs: array of array of integers is expected");const r=j(2,0);let i=0,s=-1;for(;4!==t.nextToken();){const e=i;r.size()===i&&r.resize(de(i)),i++;let a=0;for(-1===s?s=2===t.currentToken()?1:0:1===s&&2!==t.currentToken()&&n("failed to parse array of IDs: array of array of integers is expected"),0===s&&(r.size()===i&&r.resize(de(i)),r.write(i,me(t)),a++,i++);4!==t.nextToken();)r.size()===i&&r.resize(de(i)),r.write(i,me(t)),a++,i++;if(r.write(e,a),0===s)break}return r.resize(i),r}function ue(e){const t=e.currentToken();if(10===t||6===t&&"NaN"===e.currentString())return Number.NaN;{const t=e.currentDoubleValue();return Number.isNaN(t)?Number.NaN:t}}function me(e){return e.currentInt32Value()}function le(e,n){if(e.isEmpty())return;const r=j(2,0),i=e.getGeometryType();let s=0;i===P.type?s=1:i===I.type||i===z.type?s=e.getPathCount():t("not implemented"),r.resize(e.getPointCount(),0);let a=0;for(let o=0;o<s;++o){const s=n.read(a);a++;const u=a+s;let m=0,l=0;i===P.type?m=e.getPointCount():i===I.type||i===z.type?(m=e.getPathSize(o),l=e.getPathStart(o)):t("not implemented");for(let e=0,t=Math.min(s,m);e<t;++e)r.write(l,n.read(a)),a++,l++;a=u}e.getImpl().setAttributeStreamRef(3,r)}function ce(e){let t=2*Math.trunc(3*(e+1)/2);return t<8?t=8:t<32&&(t=32),t}function de(e){let t=Math.trunc(3*(e+1)/2);return t<4?t=4:t<16&&(t=16),t}function _e(e,t,n,r,s){s>=r.size()&&i("Byte_buffer out of range access"),e.m_bits=0,e.m_rotation=0,e.m_cosr=1,e.m_sinr=0,e.setStartXY(t),e.setEndXY(n);const a=_.getNAN();a.x=r.readDouble(s),a.y=r.readDouble(s+8);const o=r.readInt32(s+16);if(!!(1&o))return e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.assign(a),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,R(e),!1;let u=!!(64&o);const m=!!(128&o);let l=!!(32&o);const c=!!(8&o),d=!!(16&o),h=t.equals(n);return u&&!h&&(u=!1,l=!0),l&&h&&(u=!0,l=!1,a.setCoords(0,0)),u||(m?l?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_interior.assign(a),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0):(e.constructCircularArcThreePoint(t,n,a),h&&c===e.isClockwise()&&e.reverse()):l?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,R(e),e.queryCoord2D(.5,e.m_interior)):M(e,t,n,a,c,d)),u&&(e.m_center.assign(t),e.m_startAngle=a.x,e.m_sweepAngle=a.y,U(e,Number.NaN,c,d),e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.setCoordsPoint2D(t)),e.setProjectionBehavior(0),R(e),!0}function he(e,t,n,r,i){e.m_bits=0,e.m_center.x=r.readDouble(i),e.m_center.y=r.readDouble(i+8),e.m_rotation=r.readDouble(i+16),e.m_semiMajorAxis=r.readDouble(i+24),e.m_minorMajorRatio=r.readDouble(i+32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y;const s=r.readInt32(i+40);if(1&s)return!1;let a=!!(64&s),o=!!(128&s);const u=!!(2048&s),m=!!(4096&s);return!!!(512&s)&&!!!(1024&s)||o||(a=!0),o&&!t.equals(n)?(o=!1,a=!0):a&&t.equals(n)&&(o=!0,a=!1),o?(e.m_center.assign(t),e.m_startAngle=e.m_center.x,e.m_sweepAngle=e.m_center.y,U(e,Number.NaN,u,m),e.m_semiMajorAxis=0,e.m_interior.setCoordsPoint2D(t)):a?(e.m_center.setNAN(),e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,R(e),e.queryCoord2D(.5,e.m_interior)):e.constructEllipticArcEndPointsCenter(t,n,e.m_semiMajorAxis,e.m_minorMajorRatio,e.m_rotation,!m,u,e.m_center),e.setProjectionBehavior(1),R(e),!0}function fe(e,t,n,i,s){return r(s+32<=i.size()),e.m_cp=h(_,2),e.m_cp[0].x=i.readDouble(s),e.m_cp[0].y=i.readDouble(s+8),e.m_cp[1].x=i.readDouble(s+16),e.m_cp[1].y=i.readDouble(s+24),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y,!0}function pe(e,t,n,r,i){return e.m_cp.x=r.readDouble(i),e.m_cp.y=r.readDouble(i+8),e.m_weights[0]=r.readDouble(i+16),e.m_weights[1]=r.readDouble(i+24),e.m_weights[2]=r.readDouble(i+32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y,!0}function ke(e,t,r,i,s){const a={segFlag:0,toPointSz:0};let o=i.currentToken();o=i.nextToken();const u=i.currentString(),m=u[0];for((1!==u.length||"a"!==m&&"b"!==m&&"c"!==m&&"n"!==m&&"q"!==m)&&n('failed to parse curve: expecting "a", "b", "n", "q", or "c"'),o=i.nextToken(),2!==o&&n("failed to parse curve: start array is expected for curve parameters"),o=i.nextToken(),2!==o&&n("failed to parse curve: start array is expected for to point"),a.toPointSz=0;4!==i.nextToken();)4===a.toPointSz&&n("failed to parse curve: vertex array cannot have more than 4 elements"),t[a.toPointSz++]=ue(i);a.toPointSz<2&&n("failed to parse curve: vertex array must have at least 2 elements");const l=_.construct(t[0],t[1]),c=_.getNAN();let d=-1,h=-1,f=!1,p=Number.NaN,k=Number.NaN,b=Number.NaN;const y=[_.getNAN(),_.getNAN(),_.getNAN()],T=_.getNAN();if("a"===m){o=i.nextToken(),2!==o&&n("failed to parse curve: start array is expected for center point"),o=i.nextToken();const e=ue(i);o=i.nextToken();const t=ue(i);o=i.nextToken(),4!==o&&n("failed to parse curve: end array is expected for center point"),c.setCoords(e,t),o=i.nextToken(),d=i.currentInt32Value(),o=i.nextToken(),h=i.currentInt32Value(),o=i.nextToken(),4!==o?(f=!1,p=ue(i),o=i.nextToken(),k=ue(i),o=i.nextToken(),b=ue(i),o=i.nextToken(),4!==o&&n("failed to parse curve: end array is expected for curve parameters")):f=!0,a.segFlag=4}else if("b"===m){for(let e=0;e<2;e++){o=i.nextToken(),2!==o&&n("failed to parse curve: start array is expected for control point"),o=i.nextToken();const t=ue(i);o=i.nextToken();const r=ue(i);o=i.nextToken(),4!==o&&n("failed to parse curve: end array is expected for control point"),y[e].setCoords(t,r)}o=i.nextToken(),4!==o&&n("failed to parse curve: end array is expected for curve parameters"),a.segFlag=2}else if("n"===m){{o=i.nextToken(),2!==o&&n("failed to parse curve: start array is expected for control point"),o=i.nextToken();const e=ue(i);o=i.nextToken();const t=ue(i);o=i.nextToken(),4!==o&&n("failed to parse curve: end array is expected for control point"),y[0].setCoords(e,t)}o=i.nextToken();const e=ue(i);o=i.nextToken();const t=ue(i);o=i.nextToken();const r=ue(i);y[1].setCoords(e,t),y[2].setCoords(r,r),o=i.nextToken(),4!==o&&n("failed to parse curve: end array is expected for curve parameters"),a.segFlag=8}else if("q"===m){for(let e=0;e<1;e++){o=i.nextToken(),2!==o&&n("failed to parse curve: start array is expected for control point"),o=i.nextToken();const t=ue(i);o=i.nextToken();const r=ue(i);o=i.nextToken(),4!==o&&n("failed to parse curve: end array is expected for control point"),y[e].setCoords(t,r)}o=i.nextToken(),4!==o&&n("failed to parse curve: end array is expected for curve parameters"),a.segFlag=16}else{o=i.nextToken(),2!==o&&n("failed to parse curve: start array is expected for interior point"),o=i.nextToken();const e=ue(i);o=i.nextToken();const t=ue(i);o=i.nextToken(),4!==o&&n("failed to parse curve: end array is expected for interior point"),T.setCoords(e,t),o=i.nextToken(),4!==o&&n("failed to parse curve: end array is expected for curve parameters"),a.segFlag=4}if(o=i.nextToken(),3!==o&&n("failed to parse curve: end object is expected for curve"),"a"===m)if(e.createEllipticArc(),f){const t=!0;be(e.get(),r,l,c,t,d,h)}else ye(e.get(),r,l,c,d,h,p,k,b);else if("b"===m)e.createCubicBezier(),Te(e.get(),r,l,y);else if("n"===m)e.createQuadraticRationalBezier(),Ne(e.get(),r,l,y[0],y[1].x,y[1].y,y[2].x);else if("q"===m)e.createQuadraticBezier(),e.get().construct(r,y[0],l);else{e.createEllipticArc();const t=!1;be(e.get(),r,l,T,t,-1,-1)}return a}function be(e,t,n,r,i,s,a){e.dropAllAttributes();const o=20,u=new ArrayBuffer(o),m=new te({sz:o,buffer:u});let l=0;m.writeDouble(l,r.x),l+=8,m.writeDouble(l,r.y),l+=8;let c=0;i?(a||(c|=8),s&&(c|=16)):c|=128,m.writeInt32(l,c),l+=4,_e(e,t,n,m,0)}function ye(e,t,n,r,i,s,a,o,u){e.dropAllAttributes();const m=44,l=new ArrayBuffer(m),c=new te({sz:m,buffer:l});let d=0;c.writeDouble(d,r.x),d+=8,c.writeDouble(d,r.y),d+=8,c.writeDouble(d,a),d+=8,c.writeDouble(d,o),d+=8,c.writeDouble(d,u),d+=8;let _=0;s||(_|=2048),i&&(_|=4096),c.writeInt32(d,_),d+=4,he(e,t,n,c,0)}function Te(e,t,n,r){e.dropAllAttributes();const i=32,s=new ArrayBuffer(i),a=new te({sz:i,buffer:s});let o=0;a.writeDouble(o,r[0].x),o+=8,a.writeDouble(o,r[0].y),o+=8,a.writeDouble(o,r[1].x),o+=8,a.writeDouble(o,r[1].y),o+=8,fe(e,t,n,a,0)}function Ne(e,t,n,r,i,s,a){e.dropAllAttributes();const o=40,u=new ArrayBuffer(o),m=new te({sz:o,buffer:u});let l=0;m.writeDouble(l,r.x),l+=8,m.writeDouble(l,r.y),l+=8,m.writeDouble(l,i),l+=8,m.writeDouble(l,s),l+=8,m.writeDouble(l,a),l+=8,pe(e,t,n,m,0)}function ge(e,t,n,r,i){const s=e.getGeometryType();if(s===a.enumEllipticArc)return ve(e,t,n,r,i);if(s===a.enumBezier)return xe(e,t,n,r,i);if(s===a.enumRationalBezier2)return Ae(e,t,n,r,i);if(s===a.enumBezier2){const s=new B;return s.constructFromQuadraticSegment(e),xe(s,t,n,r,i)}o("")}function ve(e,t,n,i,s){r(!V(e));const a=e.getEndXY(),o=e.hasAttribute(1)&&!t,u=e.hasAttribute(2)&&!n;let m=Number.NaN,l=Number.NaN;if(o&&(m=e.getEndAttributeAsDbl(1,0)),u&&(l=e.getEndAttributeAsDbl(2,0)),e.isDegenerateToLine()||e.isDegenerate(0))return Se(o,u,a.x,a.y,m,l,i,s),!0;const c=0===e.projectionBehavior(),d=!!c&&e.isClosed();if(c&&!d)s.startObject(),s.addFieldName("c"),s.startArray(),Se(o,u,a.x,a.y,m,l,i,s),we(e.m_interior.x,e.m_interior.y,17,s),s.endArray(),s.endObject();else if(c){s.startObject(),s.addFieldName("a"),s.startArray(),Se(o,u,a.x,a.y,m,l,i,s);const t=0,n=0;we(e.m_center.x+t,e.m_center.y+n,17,s);const r=!e.isMajor();s.addInt32(r?1:0);const c=e.isClockwise();s.addInt32(c?1:0),s.endArray(),s.endObject()}else{s.startObject(),s.addFieldName("a"),s.startArray(),Se(o,u,a.x,a.y,m,l,i,s);const t=e;we(t.m_center.x,t.m_center.y,17,s);const n=!t.isMajor();s.addInt32(n?1:0);const r=t.isClockwise();s.addInt32(r?1:0),s.addDouble(t.m_rotation,17),s.addDouble(t.m_semiMajorAxis,17),s.addDouble(t.m_minorMajorRatio,17),s.endArray(),s.endObject()}return!1}function xe(e,t,n,r,i){const s=e.getEndXY(),a=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!n;let u=Number.NaN,m=Number.NaN;return a&&(u=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("b"),i.startArray(),Se(a,o,s.x,s.y,u,m,r,i),we(e.m_cp[0].x,e.m_cp[0].y,r,i),we(e.m_cp[1].x,e.m_cp[1].y,r,i),i.endArray(),i.endObject(),!1}function Ae(e,t,n,r,i){const s=e.getEndXY(),a=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!n;let u=Number.NaN,m=Number.NaN;a&&(u=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("n"),i.startArray(),Se(a,o,s.x,s.y,u,m,r,i),we(e.m_cp.x,e.m_cp.y,r,i);const l=r;return i.addDouble(e.m_weights[0],l),i.addDouble(e.m_weights[1],l),i.addDouble(e.m_weights[2],l),i.endArray(),i.endObject(),!1}function Se(e,t,n,r,i,s,a,o){o.startArray(),o.addDouble(n,a),o.addDouble(r,a),e&&o.addDouble(i,a),t&&o.addDouble(s,a),o.endArray()}function we(e,t,n,r){r.startArray(),r.addDouble(e,n),r.addDouble(t,n),r.endArray()}class Ce{getOperatorType(){return 10405}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,r,i,s){De(e,t,n,r)}exportSpatialReference(e,t,n,i){r(0)}exportProjectionTransformation(e,t,n,i){r(0)}exportDatumTransformation(e,t,n,i){r(0)}static geometryTypeToString(e){return r(0),""}}function De(e,n,i,s,o){if(n||i){if(s.startObject(),null!==n){switch(n.getGeometryType()){case a.enumPolygon:Fe(!0,e,n,s);break;case a.enumPolyline:Fe(!1,e,n,s);break;case a.enumMultiPoint:je(e,n,s);break;case a.enumPoint:Oe(e,n,s);break;case a.enumEnvelope:ze(e,n,s);break;case a.enumMultipatch:r(0);break;default:t("exportToJSON")}}null!==i&&(s.addFieldName("spatialReference"),Ee(e,i,s)),s.endObject()}}function Fe(e,t,n,i){const s=n.getImpl(),a=!!(2&t),u=!!(4&t),m=!!(8&t),l=s.hasAttribute(1)&&!a,c=s.hasAttribute(2)&&!u,d=s.hasAttribute(3)&&!m,_=s.hasNonLinearSegments();l&&(i.addFieldName("hasZ"),i.addBool(!0)),c&&(i.addFieldName("hasM"),i.addBool(!0)),e?_?i.addFieldName("curveRings"):i.addFieldName("rings"):_?i.addFieldName("curvePaths"):i.addFieldName("paths");let h=null;const f=[];if(n.isEmpty())i.startArray(),i.endArray();else{const e=17-(31&t>>13);i.startArray();const r=n.getPathCount();let m=0;const p=s.getAttributeStreamRef(0);let k=null,b=null,y=null;const T=new E;let N=null,g=null,v=null;_&&(N=s.getSegmentFlagsStreamRef(),g=s.getSegmentIndexStreamRef(),v=s.getSegmentDataStreamRef()),l&&(k=s.getAttributeStreamRef(1)),c&&(b=s.getAttributeStreamRef(2)),d&&(y=s.getAttributeStreamRef(3),h=O(3,0));for(let t=0;t<r;t++){i.startArray(),d&&f.push(0);const r=n.getPathEnd(t);if(m===r){i.endArray();continue}const s=n.isClosedPath(t);let _=p.read(2*m),x=p.read(2*m+1),A=l?k.read(m):Number.NaN,S=c?b.read(m):Number.NaN,w=d?y.read(m):0;Pe(l,c,_,x,A,S,e,i);let C=1;d&&(h.add(w),f[f.length-1]++);const D=_,F=x,j=A,O=S,z=w;let I=!1,E=0,P=Number.NaN,B=Number.NaN,V=0;for(let t=m+1,n=m,R=s?r+1:r;t<R;t++,n++){const s=null!==N?31&N.read(n):1;let m,R;if(t<r?(m=p.read(2*t),R=p.read(2*t+1),l&&(P=k.read(t)),c&&(B=b.read(t)),d&&(V=y.read(t))):(m=D,R=F,P=j,B=O,V=z),1!==s){I=!0,4===s?T.createEllipticArc():2===s?T.createCubicBezier():16===s?T.createQuadraticBezier():8===s?T.createQuadraticRationalBezier():o("JSON export.unsupported curve");const t=T.get(),r=g.read(n);t.setStartXYCoords(_,x),t.setEndXYCoords(m,R),l&&(t.setStartAttribute(1,0,A),t.setEndAttribute(1,0,P)),c&&(t.setStartAttribute(2,0,S),t.setEndAttribute(2,0,B)),t.readFromBufferStream(v,r);ge(T.get(),a,u,e,i)&&E++}else Pe(l,c,m,R,P,B,e,i);d&&(h.add(V),f[f.length-1]++),C++,_=m,x=R,A=P,S=B,w=V}I&&0===E||(C<2&&E<1&&(Pe(l,c,_,x,A,S,e,i),C++,d&&(h.add(w),f[f.length-1]++)),s&&C<3&&E<2&&(Pe(l,c,D,F,j,O,e,i),C++,_=D,x=F,A=j,S=O,w=z,d&&(h.add(z),f[f.length-1]++))),i.endArray(),m=r}i.endArray()}if(d){i.addFieldName("ids"),i.startArray();let e=0;for(let t=0,n=f.length;t<n;++t){const n=f[t];r(0===n||null!==h&&e+n<=h.size()),i.startArray();for(let t=0;t<n;++t)i.addInt32(h.read(e)),e++;i.endArray()}i.endArray()}}function je(e,t,n){const i=t.getImpl(),s=i.hasAttribute(1)&&!(2&e),a=i.hasAttribute(2)&&!(4&e),o=i.hasAttribute(3)&&!(8&e);s&&(n.addFieldName("hasZ"),n.addBool(!0)),a&&(n.addFieldName("hasM"),n.addBool(!0)),n.addFieldName("points");const u=t.getPointCount();if(t.isEmpty())n.startArray(),n.endArray();else{const t=17-(31&e>>13);n.startArray();const r=i.getAttributeStreamRef(0);let o=null,m=null;s&&(o=i.getAttributeStreamRef(1)),a&&(m=i.getAttributeStreamRef(2));for(let e=0;e<u;e++){const i=r.read(2*e),u=r.read(2*e+1);let l=Number.NaN,c=Number.NaN;s&&(l=o.read(e)),a&&(c=m.read(e)),Pe(s,a,i,u,l,c,t,n)}n.endArray()}if(o){let e=null;i.isEmpty()||(e=i.getAttributeStreamRef(3)),r(0===u||null!==e&&e.size()>=u),n.addFieldName("ids"),n.startArray();for(let t=0;t<u;t++)n.addInt32(e.read(t));n.endArray()}}function Oe(e,t,n){const r=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),s=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return n.addFieldName("x"),n.addNull(),n.addFieldName("y"),n.addNull(),r&&(n.addFieldName("z"),n.addNull()),i&&(n.addFieldName("m"),n.addNull()),void(s&&(n.addFieldName("id"),n.addInt32(0)));const a=17-(31&e>>13);n.addFieldName("x"),n.addDouble(t.getX(),a),n.addFieldName("y"),n.addDouble(t.getY(),a),r&&(n.addFieldName("z"),n.addDouble(t.getZ(),a)),i&&(n.addFieldName("m"),n.addDouble(t.getM(),a)),s&&(n.addFieldName("id"),n.addInt32(t.getID()))}function ze(e,t,n){const r=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),s=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return n.addFieldName("xmin"),n.addNull(),n.addFieldName("ymin"),n.addNull(),n.addFieldName("xmax"),n.addNull(),n.addFieldName("ymax"),n.addNull(),r&&(n.addFieldName("zmin"),n.addNull(),n.addFieldName("zmax"),n.addNull()),i&&(n.addFieldName("mmin"),n.addNull(),n.addFieldName("mmax"),n.addNull()),void(s&&(n.addFieldName("idmin"),n.addInt32(0),n.addFieldName("idmax"),n.addInt32(0)));const a=17-(31&e>>13);if(n.addFieldName("xmin"),n.addDouble(t.getXMin(),a),n.addFieldName("ymin"),n.addDouble(t.getYMin(),a),n.addFieldName("xmax"),n.addDouble(t.getXMax(),a),n.addFieldName("ymax"),n.addDouble(t.getYMax(),a),r){const e=t.queryInterval(1,0);n.addFieldName("zmin"),n.addDouble(e.vmin,a),n.addFieldName("zmax"),n.addDouble(e.vmax,a)}if(i){const e=t.queryInterval(2,0);n.addFieldName("mmin"),n.addDouble(e.vmin,a),n.addFieldName("mmax"),n.addDouble(e.vmax,a)}if(s){const e=t.queryInterval(3,0);n.addFieldName("idmin"),n.addInt32(e.vmin),n.addFieldName("idmax"),n.addInt32(e.vmax)}}function Ie(e,t,r){r.startObject();const i=t.getID();i<=0&&n("cannot export unit that has no valid WKID"),r.addFieldName("uwkid"),r.addInt32(i),r.endObject()}function Ee(e,t,n){n.startObject();let r=0;t.isCustomWkid()||(r=t.getOldID());let i=0;const s=t.getVCS();if(null!==s&&(s.isCustomWkid()||(i=s.getOldID()),i<=0&&(r=0)),r>0){n.addFieldName("wkid"),n.addInt32(r);const e=t.getLatestID();if(e>0&&e!==r&&(n.addFieldName("latestWkid"),n.addInt32(e)),i>0){n.addFieldName("vcsWkid"),n.addInt32(i);const e=t.getLatestVerticalID();e!==i&&(n.addFieldName("latestVcsWkid"),n.addInt32(e))}}if(0===t.getCoordinateSystemType())n.addFieldName("wkid"),n.addNull(),null!==t.getUnit()&&(n.addFieldName("unit"),Ie(e,t.getUnit(),n));else if(r<=0||1&e){let r="";64&e&&(r=t.getText2(),n.addFieldName("wkt2"),n.addString(r));const i=t.getText();i!==r&&(n.addFieldName("wkt"),n.addString(i))}if(16&e){const e=new N;t.queryPrecisionDescriptor(e),n.addFieldName("xyTolerance"),n.addDouble(e.getTolerance(0)),n.addFieldName("zTolerance"),n.addDouble(e.getTolerance(1)),n.addFieldName("mTolerance"),n.addDouble(e.getTolerance(2)),n.addFieldName("falseX"),n.addDouble(e.getFalseX()),n.addFieldName("falseY"),n.addDouble(e.getFalseY()),n.addFieldName("xyUnits"),n.addDouble(e.getGridUnitsXY()),n.addFieldName("falseZ"),n.addDouble(e.getFalseZ()),n.addFieldName("zUnits"),n.addDouble(e.getGridUnitsZ()),n.addFieldName("falseM"),n.addDouble(e.getFalseM()),n.addFieldName("mUnits"),n.addDouble(e.getGridUnitsM())}n.endObject()}function Pe(e,t,n,r,i,s,a,o){o.startArray(),o.addDouble(n,a),o.addDouble(r,a),e&&o.addDouble(i,a),t&&o.addDouble(s,a),o.endArray()}const Be={s_a:"a".charCodeAt(0),s_A:"A".charCodeAt(0),s_asterisk:"*".charCodeAt(0),s_b:"b".charCodeAt(0),s_backslash:"\\".charCodeAt(0),s_beginArray:"[".charCodeAt(0),s_beginObject:"{".charCodeAt(0),s_colon:":".charCodeAt(0),s_period:".".charCodeAt(0),s_comma:",".charCodeAt(0),s_doubleQuote:'"'.charCodeAt(0),s_endArray:"]".charCodeAt(0),s_endObject:"}".charCodeAt(0),s_e:"e".charCodeAt(0),s_E:"E".charCodeAt(0),s_f:"f".charCodeAt(0),s_F:"F".charCodeAt(0),s_forwardslash:"/".charCodeAt(0),s_minus:"-".charCodeAt(0),s_plus:"+".charCodeAt(0),s_n:"n".charCodeAt(0),s_N:"N".charCodeAt(0),s_r:"r".charCodeAt(0),s_t:"t".charCodeAt(0),s_u:"u".charCodeAt(0),s_zero:"0".charCodeAt(0),s_nine:"9".charCodeAt(0)};class Ve{m_jsonString;m_endToken;m_startToken;m_currentTokenType;m_bHasEscapes;m_functionStack=[];m_pushPositions=[];m_utf8Decoder=new TextDecoder("utf-8",{fatal:!0});m_prepSubstr;m_getCurrentSubstr;m_stepOverChar;m_peekChar;m_get;m_increment;m_eof;constructor(e){void 0===e?(this.m_startToken=Number.MAX_SAFE_INTEGER,this.m_endToken=0,this.m_currentTokenType=0,this.m_functionStack.push(()=>this.accept_()),this.m_jsonString=null,this.m_bHasEscapes=!1):e.jsonString?this.resetParserFromString(e.jsonString):e.jsonStream?o("streaming json parsing not yet impl"):t("invalid constructor parameter")}prepSubstrString_(){}getCurrentSubstrString_(){return this.m_jsonString.slice(this.m_startToken,this.m_endToken)}stepOverCharString_(){this.m_endToken++}peekCharString_(){return this.m_jsonString.charCodeAt(this.m_endToken)}getString_(e){const t=this.m_jsonString?.slice(this.m_startToken,this.m_startToken+e-1);this.m_endToken+=e-1;return{s:t,bDone:this.m_endToken>=this.m_jsonString.length}}incrementString_(){this.m_endToken++}eofString_(){return this.m_endToken>=this.m_jsonString.length}setStringFunctions_(){this.m_prepSubstr=this.prepSubstrString_,this.m_getCurrentSubstr=this.getCurrentSubstrString_,this.m_stepOverChar=this.stepOverCharString_,this.m_peekChar=this.peekCharString_,this.m_get=this.getString_,this.m_increment=this.incrementString_,this.m_eof=this.eofString_}setStreamFunctions_(){o("streaming json parsing not yet impl")}reset_(){this.m_jsonString=null,this.m_endToken=0,this.m_startToken=Number.MAX_SAFE_INTEGER,this.m_currentTokenType=0,this.m_bHasEscapes=!1,this.m_functionStack.length=0,this.m_functionStack.push(()=>this.start_()),this.m_pushPositions.length=0}resetParserFromString(e){this.reset_(),this.setStringFunctions_(),this.m_jsonString=e}resetParserFromStream(e){o("streaming json parsing not yet impl")}resetToPosition(e){return!!this.m_jsonString&&(this.m_endToken=e,this.m_startToken=Number.MAX_VALUE,this.m_currentTokenType=0,this.m_functionStack.length=0,e>=this.m_jsonString.length?(this.m_functionStack.push(()=>this.accept_()),!1):(this.m_functionStack.push(()=>this.start_()),!0))}nextToken(){return this.m_functionStack.at(-1)(),this.m_currentTokenType}currentToken(){return this.m_currentTokenType}currentTokenStartIndex(){return this.m_startToken}currentTokenEndIndex(){return this.m_endToken}currentText(){return r(0),""}childrenAsString(){return r(0),""}skipChildren(){this.skipChildren_()}skipChildren_(){if(1===this.m_currentTokenType){let e=1;do{this.m_currentTokenType=this.nextToken(),1===this.m_currentTokenType?e++:3===this.m_currentTokenType&&e--}while(3!==this.m_currentTokenType||0!==e);return}if(2===this.m_currentTokenType){let e=1;do{this.m_currentTokenType=this.nextToken(),2===this.m_currentTokenType?e++:4===this.m_currentTokenType&&e--}while(4!==this.m_currentTokenType||0!==e);return}}currentTerminalAsString_(){switch(this.m_currentTokenType){case 7:case 8:case 9:return this.m_getCurrentSubstr().slice(0,this.m_endToken-this.m_startToken);case 10:return"null";case 11:return"true";case 12:return"false"}n("invalid token")}toUTF8_(e,t){let n=0,r=e;for(;t.charCodeAt(r)===Be.s_backslash&&t.charCodeAt(r+1)===Be.s_u;)n++,r+=6;r=e;const i=new Uint8Array(n);let s=0;for(;t.charCodeAt(r)===Be.s_backslash&&t.charCodeAt(r+1)===Be.s_u;)i[s++]=Number.parseInt(t.slice(r+2,r+6),16),r+=6;return{u8s:this.m_utf8Decoder.decode(i),end:r}}unquoteCurrentString_(){let e="",t=1;const n=this.m_endToken-this.m_startToken-1;let r=0;const i=this.m_getCurrentSubstr();for(let s=t;s<n;s++)if(i.charCodeAt(s)!==Be.s_backslash)r++;else{switch(r>0&&(e+=i.slice(t,t+r)),i.charCodeAt(++s)){case Be.s_doubleQuote:e+='"';break;case Be.s_u:{const{u8s:t,end:n}=this.toUTF8_(s-1,i);s=n-1,e+=t;break}case Be.s_backslash:e+="\\";break;case Be.s_forwardslash:e+="/";break;case Be.s_b:e+="\b";break;case Be.s_f:e+="\f";break;case Be.s_n:e+="\n";break;case Be.s_r:e+="\r";break;case Be.s_t:e+="\t"}t=s+1,r=0}return r>0&&(e+=i.slice(t,t+r)),e}currentString(){if(5!==this.m_currentTokenType&&6!==this.m_currentTokenType)return this.currentTerminalAsString_();if(this.m_bHasEscapes)return this.unquoteCurrentString_();return this.m_getCurrentSubstr().slice(1,this.m_endToken-this.m_startToken-2+1)}currentDoubleValue(){if(7!==this.m_currentTokenType&&8!==this.m_currentTokenType&&9!==this.m_currentTokenType&&6!==this.m_currentTokenType&&10!==this.m_currentTokenType&&n("invalid token"),10===this.m_currentTokenType)return Number.NaN;let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;if(6===this.m_currentTokenType){if("NaN"===this.currentString())return Number.NaN;e=e.slice(1),t-=2,0===t&&n("invalid token")}const r=Number.parseFloat(e);if(6===this.m_currentTokenType)Number.isNaN(r)&&n("invalid token");else if(Number.isNaN(r))return Number.NaN;return r}currentInt32Value(){8!==this.m_currentTokenType&&6!==this.m_currentTokenType&&n("invalid token");let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;6===this.m_currentTokenType&&(e=e.slice(1),t-=2,0===t&&n("invalid token"));const r=parseInt(e);return Number.isNaN(r)&&n("invalid token"),r}currentInt64Value(){return r(0),0n}currentBoolValue(){return r(0),!1}isError(){return 0}JSONString(){return r(0),""}pushPosition(){return r(0),!1}popPosition(){return r(0),!1}skipCStyleComments_(){r(0)}skipCppStyleComments_(){r(0)}skipComments_(){this.m_prepSubstr();let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&n("invalid token"),e=this.m_peekChar(),e===Be.s_asterisk?this.skipCStyleComments_():e===Be.s_forwardslash?this.skipCppStyleComments_():n("invalid token")}skipWhiteSpace_(){let e;do{this.m_eof()&&n("invalid token");let t=this.m_peekChar();for(;t>=9&&t<=13||32===t;)this.m_increment(),this.m_eof()&&n("invalid token"),t=this.m_peekChar();t===Be.s_forwardslash?(this.m_startToken=this.m_endToken,e=!0,this.skipComments_()):e=!1}while(e)}rightBracket_(){return this.m_peekChar()===Be.s_endArray&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=4,!0)}rightBrace_(){return this.m_peekChar()===Be.s_endObject&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=3,!0)}string_(){this.m_prepSubstr(),this.m_bHasEscapes=!1,this.m_stepOverChar(),this.m_eof()&&n("invalid token");let e=this.m_peekChar();for(;e!==Be.s_doubleQuote;){const t=e===Be.s_backslash;if(this.m_stepOverChar(),this.m_eof()&&n("invalid token"),e=this.m_peekChar(),t)if(this.m_bHasEscapes=!0,e===Be.s_doubleQuote||e===Be.s_backslash||e===Be.s_forwardslash||e===Be.s_b||e===Be.s_f||e===Be.s_n||e===Be.s_r||e===Be.s_t)this.m_stepOverChar(),this.m_eof()&&n("invalid token"),e=this.m_peekChar();else if(e===Be.s_u)for(let r=0;r<4;r++)this.m_stepOverChar(),this.m_eof()&&n("invalid token"),e=this.m_peekChar(),e>=Be.s_zero&&e<=Be.s_nine||e>=Be.s_a&&e<=Be.s_f||e>=Be.s_A&&e<=Be.s_F||n("invalid token");else n("invalid token")}this.m_stepOverChar()}comma_(){return this.m_peekChar()===Be.s_comma&&(this.m_increment(),!0)}colon_(){return this.m_peekChar()===Be.s_colon&&(this.m_increment(),!0)}fieldNameEnd_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.colon_()?(this.skipWhiteSpace_(),this.value_()):n("invalid token")}fieldNameStart_(){this.m_startToken=this.m_endToken;this.m_peekChar()!==Be.s_doubleQuote&&n("invalid token"),this.string_(),this.m_currentTokenType=5,this.m_functionStack.push(()=>this.fieldNameEnd_())}pairEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.fieldNameStart_()):this.rightBrace_()?this.m_functionStack.pop():n("invalid token")}arrayStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBracket_()||(this.m_functionStack.push(()=>this.elementEnd_()),this.value_())}elementEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.value_()):this.rightBracket_()?this.m_functionStack.pop():n("invalid token")}objectStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBrace_()||(this.m_functionStack.push(()=>this.pairEnd_()),this.fieldNameStart_())}valueStartObject_(){this.m_increment(),this.m_currentTokenType=1,this.m_functionStack.push(()=>this.objectStart_())}valueStartArray_(){this.m_increment(),this.m_currentTokenType=2,this.m_functionStack.push(()=>this.arrayStart_())}valueString_(){this.string_(),this.m_currentTokenType=6}int_(){this.m_peekChar()!==Be.s_zero?this.digits_():this.m_stepOverChar()}digits_(){let e=this.m_peekChar();do{this.m_stepOverChar(),this.m_eof()&&n("invalid token"),e=this.m_peekChar()}while(e>=Be.s_zero&&e<=Be.s_nine)}frac_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&n("invalid token"),e=this.m_peekChar(),e>=Be.s_zero&&e<=Be.s_nine||n("invalid token"),this.digits_()}exp_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&n("invalid token"),e=this.m_peekChar(),e!==Be.s_plus&&e!==Be.s_minus||(this.m_stepOverChar(),this.m_eof()&&n("invalid token"),e=this.m_peekChar()),e>=Be.s_zero&&e<=Be.s_nine||n("invalid token"),this.digits_()}valueNumber_(){this.m_prepSubstr();let e=!1,t=this.m_peekChar();if(t===Be.s_minus?(this.m_stepOverChar(),this.m_eof()&&n("invalid token"),t=this.m_peekChar(),e=!0,t>=Be.s_zero&&t<=Be.s_nine||n("invalid token"),this.int_()):this.int_(),t=this.m_peekChar(),t===Be.s_period)this.m_currentTokenType=7,this.frac_(),t=this.m_peekChar(),t!==Be.s_e&&t!==Be.s_E||this.exp_();else if(t===Be.s_e||t===Be.s_E)this.m_currentTokenType=7,this.exp_();else{let t=0;e&&t++;const n=this.m_endToken-this.m_startToken-t;if(n<10)this.m_currentTokenType=8;else if(10===n){const n=this.m_getCurrentSubstr();e?n.slice(t)<="2147483648"?this.m_currentTokenType=8:this.m_currentTokenType=9:n.slice(t)<="2147483647"?this.m_currentTokenType=8:this.m_currentTokenType=9}else if(n<19)this.m_currentTokenType=9;else if(19===n){const n=this.m_getCurrentSubstr();e?n.slice(t)<="9223372036854775808"?this.m_currentTokenType=9:this.m_currentTokenType=7:n.slice(t)<="9223372036854775807"?this.m_currentTokenType=9:this.m_currentTokenType=7}else this.m_currentTokenType=7}}valueNull_(){const{s:e,bDone:t}=this.m_get(5);t&&n("invalid token"),"null"!==e&&n("invalid token"),this.m_currentTokenType=10}valueTrue_(){const{s:e,bDone:t}=this.m_get(5);t&&n("invalid token"),"true"!==e&&n("invalid token"),this.m_currentTokenType=11}valueFalse_(){const{s:e,bDone:t}=this.m_get(6);t&&n("invalid token"),"false"!==e&&n("invalid token"),this.m_currentTokenType=12}valueNan_(){const{s:e,bDone:t}=this.m_get(4);t&&n("invalid token"),"NaN"!==e&&n("invalid token"),this.m_currentTokenType=7}value_(){this.m_startToken=this.m_endToken;const e=this.m_peekChar();e===Be.s_beginObject?this.valueStartObject_():e===Be.s_beginArray?this.valueStartArray_():e===Be.s_doubleQuote?this.valueString_():e===Be.s_minus||e>=Be.s_zero&&e<=Be.s_zero+9?this.valueNumber_():e===Be.s_n?this.valueNull_():e===Be.s_t?this.valueTrue_():e===Be.s_f?this.valueFalse_():e===Be.s_N?this.valueNan_():n("invalid token")}start_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.m_functionStack.push(()=>this.accept_());const e=this.m_peekChar();e!==Be.s_beginObject&&e!==Be.s_beginArray&&n("invalid token"),this.value_()}accept_(){this.m_startToken=this.m_endToken,this.m_currentTokenType=0}}class Re{getOperatorType(){return 10404}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,r,i,s,a,o){let u;"string"==typeof r?(u=new Ve({jsonString:r}),u.nextToken()):u=r,1!==u.currentToken()&&n("failed to import map geometry: start of object is expected");const m=ne(t,e,u,i,s);return new v(m)}importSpatialReference(e){const n=ie(e);return null===n&&t("failed to import spatial reference"),n}importProjectionTransformation(e,t){return r(0),{}}importDatumTransformation(e,t){return r(0),{}}static stringToGeometryType(e){return(e=e.toLowerCase()).startsWith("esrigeometry")||n("string_to_geometry_type"),e.endsWith("point")?a.enumPoint:e.endsWith("envelope")?a.enumEnvelope:e.endsWith("multipoint")?a.enumMultiPoint:e.endsWith("polyline")?a.enumPolyline:e.endsWith("polygon")?a.enumPolygon:void n("string_to_geometry_type")}}const Me=new ee,Ue=new Ce,We=new Re;function Xe(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function Ge(t,n=!1){if(!n&&(q(t)||K(t)||J(t)||Q(t))){const n=new v;return n.setGeometry(e(L(t))),n}const r=new $(t,{strict:!1});return r.nextToken(),We.execute(0,a.enumUnknown,r,!0,!1)}function Le(e){let t=null;return[e.map(e=>{if(null==t){const n=Ye(e);return t=n.getSpatialReference(),n.getGeometry()}return qe(e)}),t]}function Ye(e){const t=Ge(e),n=Je(e.spatialReference);return n&&t.setSpatialReference(n),t}function qe(e){return Ge(e).getGeometry()}function Ke(e){return Ge(e,!0).getGeometry()}function Je(e){if(null==e)return null;let t=!1;if(e instanceof Y){const{wkt2:n}=e;e=e.toJSON(),e.wkt2??=n,t=!0}(e.latestVcsWkid||e.vcsWkid)&&(t||(e={...e}),delete e?.latestVcsWkid,delete e?.vcsWkid);const n=new $(e,{strict:!1});n.nextToken();const r=We.importSpatialReference(n);return 0===r.getCoordinateSystemType()?null:r}function Qe(e,t){if(e instanceof v&&(t=e.getSpatialReference(),e=e.getGeometry()),null==e||e.isEmpty())return null;let n;switch(e.getGeometryType()){case a.enumPoint:case a.enumMultiPoint:case a.enumPolyline:case a.enumPolygon:n=X(e)}if(n){const e=G(n);return e.spatialReference=Ze(t),null==e.spatialReference&&delete e.spatialReference,e}return Me.reset(),Ue.execute(0,e,t??null,Me),Me.getObject()}function Ze(e){return null==e||0===e.getCoordinateSystemType()?null:(Me.reset(),Ue.execute(0,null,e,Me),Me.getObject().spatialReference)}export{Le as fromGeometries,Ye as fromGeometry,qe as fromGeometryToGXGeometry,Ke as fromGeometryToGXGeometryUsingImportOperator,Je as fromSpatialReference,Xe as getSpatialReference,Qe as toGeometry,Ze as toSpatialReference};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a3 as e,a4 as t,a5 as n,z as s,y as a,x as r,a6 as i,B as o}from"../../../chunks/UnitFactory.js";import"../../../chunks/Point2D.js";import"../../../chunks/Envelope.js";import"../../../chunks/Geometry.js";import{Envelope2D as c}from"../../../chunks/Envelope2D.js";function f(c,f,m){let u,l;if(m?.geographicTransformation){if(m.geographicTransformation.steps?.length){const s=new e;s.setInputSpatialReference(c),s.setOutputSpatialReference(f);for(const e of m.geographicTransformation.steps){let a;a=e.wkid?t(e.wkid,e.isInverse):n(e.wkt,e.isInverse),s.add(a)}u=s.create()}else u=i();if(m.extendedParams){l=o();const{densificationStep:e}=m.extendedParams;null!=e&&(l.densificationStep=e)}}else if(m?.areaOfInterestExtent)return s(c,f,p(m.areaOfInterestExtent));return u?a(c,f,u,l):r(c,f)}function p(e){return c.construct(e.xmin,e.ymin,e.xmax,e.ymax)}export{f as createProjectionTransformation};
2
+ import{a7 as e,v as t,x as n,C as s,B as a,A as r,a8 as i,E as o}from"../../../chunks/UnitFactory.js";import"../../../chunks/Point2D.js";import"../../../chunks/Envelope.js";import"../../../chunks/Geometry.js";import{Envelope2D as c}from"../../../chunks/Envelope2D.js";function f(c,f,m){let u,l;if(m?.geographicTransformation){if(m.geographicTransformation.steps?.length){const s=new e;s.setInputSpatialReference(c),s.setOutputSpatialReference(f);for(const e of m.geographicTransformation.steps){let a;a=e.wkid?t(e.wkid,e.isInverse):n(e.wkt,e.isInverse),s.add(a)}u=s.create()}else u=i();if(m.extendedParams){l=o();const{densificationStep:e}=m.extendedParams;null!=e&&(l.densificationStep=e)}}else if(m?.areaOfInterestExtent)return s(c,f,p(m.areaOfInterestExtent));return u?a(c,f,u,l):r(c,f)}function p(e){return c.construct(e.xmin,e.ymin,e.xmax,e.ymax)}export{f as createProjectionTransformation};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{replace as e}from"../../core/string.js";import{i as r,l as n,P as t,a as i}from"../../chunks/pe.js";import l from"./WKIDUnitConversion.js";const a=[102100,102113,3857,3785,900913],_=[104905,104971],E=[104903],o=[4326,...a,..._,...E],R=[-20037508.342788905,20037508.342788905],M=[-20037508.342787,20037508.342787],u={wkTemplate:'PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',valid:R,origin:M,dx:1e-5},s={102113:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:R,origin:M,dx:1e-5},102100:u,3785:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:R,origin:M,dx:1e-5},3857:u,4326:{wkTemplate:'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",{Central_Meridian}],UNIT["Degree",0.0174532925199433]]',altTemplate:'PROJCS["WGS_1984_Plate_Carree",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Plate_Carree"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],UNIT["Degrees",111319.491]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104971:{wkTemplate:'GEOGCS["Mars_2000_(Sphere)",DATUM["Mars_2000_(Sphere)",SPHEROID["Mars_2000_(Sphere)",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104905:{wkTemplate:'GEOGCS["GCS_Mars_2000",DATUM["D_Mars_2000",SPHEROID["Mars_2000_IAU_IAG",3396190.0,169.8944472236118]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5},900913:u,104903:{wkTemplate:'GEOGCS["GCS_Moon_2000",DATUM["D_Moon_2000",SPHEROID["Moon_2000_IAU_IAG",1737400,0,AUTHORITY["ESRI","107903"]],AUTHORITY["ESRI","106903"]],PRIMEM["Reference_Meridian",0,AUTHORITY["ESRI","108900"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["ESRI","104903"]]',valid:[-180,180],origin:[-180,90],dx:1e-5}};function T(e,r){if(e===r)return!0;if(null==e||null==r)return!1;const n=e.wkid,t=r.wkid;if(null!=n||null!=t){if(n===t)return!0;if(O(e)&&O(r))return!0;const i=e.latestWkid;if(null!=i&&t===i)return!0;const l=r.latestWkid;if(null!=l&&n===l)return!0;if(null!=n&&null!=t)return!1}let i,l;return e.wkt2&&r.wkt2?(i=e.wkt2,l=r.wkt2):e.wkt&&r.wkt&&(i=e.wkt,l=r.wkt),!(!i||!l)&&i.toUpperCase()===l.toUpperCase()}async function S(e,l){if(e===l)return!0;r()||await n();const a=e=>{const r=e.wkt2||e.wkt;if(r){const e=t.fromString(i.PE_TYPE_COORDSYS,r);return e?.getCode()}const n=e.wkid??e.latestWkid;return n?t.coordsys(n)?.getCode():null},_=e?a(e):null,E=l?a(l):null;return null!=_&&null!=E&&_===E}function G(e){const r=e?.wkid;return null!=r&&r>=2e3&&s[r]||null}async function c(e,l){if(1===l&&!I(e)||2===l&&I(e))return e;r()||await n();const a=t.fromString(i.PE_TYPE_NONE,e);return a?.toString(1===l?i.PE_STR_FMT_WKT:i.PE_STR_FMT_WKT2)??null}function d(e){if(!e)return;const{wkid:r,vcsWkid:n,falseM:t,falseX:i,falseY:l,falseZ:a,mTolerance:_,mUnits:E,xyTolerance:o,xyUnits:R,zTolerance:M,zUnits:u}=e;if(r&&[n,t,i,l,a,_,E,o,R,M,u].every(e=>null==e))return String(r);const s={wkid:r,wkt:r?void 0:e.wkt||e.wkt2,vcsWkid:n,falseM:t,falseX:i,falseY:l,falseZ:a,mTolerance:_,mUnits:E,xyTolerance:o,xyUnits:R,zTolerance:M,zUnits:u};for(const[T,S]of Object.entries(s))null===S&&delete s[T];return JSON.stringify(s)}function A(e){if(!U(e))return!1;const{wkid:r}=e;if(r)return null==l[r];const n=e.wkt2||e.wkt;return!!n&&/^\s*(?:GEOGCS|GEOGCRS|GEOGRAPHICCRS)/i.test(n)}function P(e){return 4326===e?.wkid}function I(e){return/^\s*(?:GEOD|GEODETIC|GEOG|GEOGRAPHIC|PROJ|PROJECTED|VERT|VERTICAL|ENG|ENGINEERING|PARAMETRIC|TIME|DERIVEDPROJ|COMPOUND|BOUND)CRS/i.test(e)}function C(e){return 4490===e?.wkid}function O(e){const r=e?.wkid;return null!=r&&r>=2e3&&a.includes(r)}function f(e){return 32662===e?.wkid}function k(e){return 104971===e||104905===e}function w(e){return 104903===e}function D(e){const r=e?.wkid;return null!=r&&r>=2e3&&o.includes(r)}function U(e){if(null==e)return!1;const r=e.wkid;return null!=r&&r>=2e3||(null!=e.wkt2||null!=e.wkt)}const g={wkid:4326,wkt:e(s[4326].wkTemplate,{Central_Meridian:"0.0"})},p={wkid:102100,latestWkid:3857},W={wkid:32662};export{T as equals,S as equalsWithProjectionEngine,G as getInfo,c as getWktFromWkt,C as isCGCS2000,A as isGeographic,f as isPlateCarree,U as isValid,P as isWGS84,k as isWKIDFromMars,w as isWKIDFromMoon,I as isWKT2,O as isWebMercator,D as isWrappable,W as plateCarree,d as srToRESTValue,p as webMercator,M as webMercatorOrigin,R as webMercatorValid,g as wgs84};
2
+ import{replace as e}from"../../core/string.js";import{i as r,l as n,P as t,a as i}from"../../chunks/pe.js";import l from"./WKIDUnitConversion.js";const a=[102100,102113,3857,3785,900913],_=[104905,104971],E=[104903],o=[4326,...a,..._,...E],R=[-20037508.342788905,20037508.342788905],u=[-20037508.342787,20037508.342787],M={wkTemplate:'PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',valid:R,origin:u,dx:1e-5},s={102113:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:R,origin:u,dx:1e-5},102100:M,3785:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:R,origin:u,dx:1e-5},3857:M,4326:{wkTemplate:'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",{Central_Meridian}],UNIT["Degree",0.0174532925199433]]',altTemplate:'PROJCS["WGS_1984_Plate_Carree",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Plate_Carree"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],UNIT["Degrees",111319.491]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104971:{wkTemplate:'GEOGCS["Mars_2000_(Sphere)",DATUM["Mars_2000_(Sphere)",SPHEROID["Mars_2000_(Sphere)",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104905:{wkTemplate:'GEOGCS["GCS_Mars_2000",DATUM["D_Mars_2000",SPHEROID["Mars_2000_IAU_IAG",3396190.0,169.8944472236118]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5},900913:M,104903:{wkTemplate:'GEOGCS["GCS_Moon_2000",DATUM["D_Moon_2000",SPHEROID["Moon_2000_IAU_IAG",1737400,0,AUTHORITY["ESRI","107903"]],AUTHORITY["ESRI","106903"]],PRIMEM["Reference_Meridian",0,AUTHORITY["ESRI","108900"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["ESRI","104903"]]',valid:[-180,180],origin:[-180,90],dx:1e-5}};function T(e,r){if(e===r)return!0;if(null==e||null==r)return!1;const n=e.wkid,t=r.wkid;if(null!=n||null!=t){if(n===t)return!0;if(f(e)&&f(r))return!0;const i=e.latestWkid;if(null!=i&&t===i)return!0;const l=r.latestWkid;if(null!=l&&n===l)return!0;if(null!=n&&null!=t)return!1}let i,l;return e.wkt2&&r.wkt2?(i=e.wkt2,l=r.wkt2):e.wkt&&r.wkt&&(i=e.wkt,l=r.wkt),!(!i||!l)&&i.toUpperCase()===l.toUpperCase()}async function S(e,l){if(e===l)return!0;r()||await n();const a=e=>{const r=e.wkt2||e.wkt;if(r)return t.fromString(i.PE_TYPE_COORDSYS,r);const n=e.wkid??e.latestWkid;return n?t.coordsys(n):null},_=e?a(e):null,E=l?a(l):null;return null!=_&&null!=E&&_.isEqual(E)}function G(e){const r=e?.wkid;return null!=r&&r>=2e3&&s[r]||null}async function c(e,l){if(1===l&&!I(e)||2===l&&I(e))return e;r()||await n();const a=t.fromString(i.PE_TYPE_NONE,e);return a?.toString(1===l?i.PE_STR_FMT_WKT:i.PE_STR_FMT_WKT2)??null}function A(e){if(!e)return;const{wkid:r,vcsWkid:n,falseM:t,falseX:i,falseY:l,falseZ:a,mTolerance:_,mUnits:E,xyTolerance:o,xyUnits:R,zTolerance:u,zUnits:M}=e;if(r&&[n,t,i,l,a,_,E,o,R,u,M].every(e=>null==e))return String(r);const s={wkid:r,wkt:r?void 0:e.wkt||e.wkt2,vcsWkid:n,falseM:t,falseX:i,falseY:l,falseZ:a,mTolerance:_,mUnits:E,xyTolerance:o,xyUnits:R,zTolerance:u,zUnits:M};for(const[T,S]of Object.entries(s))null===S&&delete s[T];return JSON.stringify(s)}function d(e){if(!U(e))return!1;const{wkid:r}=e;if(r)return null==l[r];const n=e.wkt2||e.wkt;return!!n&&/^\s*(?:GEOGCS|GEOGCRS|GEOGRAPHICCRS)/i.test(n)}function P(e){return 4326===e?.wkid}function I(e){return/^\s*(?:GEOD|GEODETIC|GEOG|GEOGRAPHIC|PROJ|PROJECTED|VERT|VERTICAL|ENG|ENGINEERING|PARAMETRIC|TIME|DERIVEDPROJ|COMPOUND|BOUND)CRS/i.test(e)}function O(e){return 4490===e?.wkid}function f(e){const r=e?.wkid;return null!=r&&r>=2e3&&a.includes(r)}function C(e){return 32662===e?.wkid}function k(e){return 104971===e||104905===e}function w(e){return 104903===e}function D(e){const r=e?.wkid;return null!=r&&r>=2e3&&o.includes(r)}function U(e){if(null==e)return!1;const r=e.wkid;return null!=r&&r>=2e3||(null!=e.wkt2||null!=e.wkt)}const p={wkid:4326,wkt:e(s[4326].wkTemplate,{Central_Meridian:"0.0"})},W={wkid:102100,latestWkid:3857},g={wkid:32662};export{T as equals,S as equalsWithProjectionEngine,G as getInfo,c as getWktFromWkt,O as isCGCS2000,d as isGeographic,C as isPlateCarree,U as isValid,P as isWGS84,k as isWKIDFromMars,w as isWKIDFromMoon,I as isWKT2,f as isWebMercator,D as isWrappable,g as plateCarree,A as srToRESTValue,W as webMercator,u as webMercatorOrigin,R as webMercatorValid,p as wgs84};
package/kernel.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.2.0-next.81",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
2
+ import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.2.0-next.83",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
@@ -248,7 +248,7 @@ export interface RasterBandBoxStatistics {
248
248
  */
249
249
  max: number;
250
250
  /**
251
- * Maximum value of the statistics.
251
+ * Average of the statistics.
252
252
  *
253
253
  * @internal
254
254
  */
@@ -59,9 +59,15 @@ export default class AggregateField extends JSONSupport {
59
59
  */
60
60
  accessor alias: string | null | undefined;
61
61
  /**
62
- * Indicates whether the field was created internally by the JS API's rendering engine for
63
- * default [FeatureReductionCluster](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/) visualizations. You should avoid
64
- * setting or changing this value. If `true`, then all other properties of the AggregateField are read-only.
62
+ * Indicates whether the field is automatically generated by the JS API's rendering engine for
63
+ * default [FeatureReductionCluster](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/) visualizations. Auto-generated aggregate fields
64
+ * are discarded and replaced when the underlying layer's renderer changes.
65
+ *
66
+ * Set this property to `false` to retain an auto-generated aggregate field when the underlying layer's
67
+ * renderer changes. To retain an auto-generated cluster renderer that uses this field, also set
68
+ * [AuthoringInfo.isAutoGenerated](https://developers.arcgis.com/javascript/latest/references/core/renderers/support/AuthoringInfo/#isAutoGenerated) to `false` on the
69
+ * [cluster renderer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/#renderer). When `true`, all other
70
+ * properties of the AggregateField are read-only.
65
71
  *
66
72
  * @default false
67
73
  * @since 4.25
@@ -476,9 +476,14 @@ export interface FeatureReductionClusterProperties extends Partial<Pick<FeatureR
476
476
  * See [Styles and configurations](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/#styles-and-configurations)
477
477
  * for more information about this behavior. In this scenario, the renderer will be persisted when
478
478
  * the layer is saved to the web map, but it will be flagged as "auto generated" in the
479
- * [AuthoringInfo.isAutoGenerated](https://developers.arcgis.com/javascript/latest/references/core/renderers/support/AuthoringInfo/#isAutoGenerated) property of the
480
- * the [Renderer.authoringInfo](https://developers.arcgis.com/javascript/latest/references/core/renderers/Renderer/#authoringInfo) object.
481
- * All auto generated renderers are discarded and replaced each time the underlying layer's renderer is changed.
479
+ * [AuthoringInfo.isAutoGenerated](https://developers.arcgis.com/javascript/latest/references/core/renderers/support/AuthoringInfo/#isAutoGenerated) property of the [Renderer.authoringInfo](https://developers.arcgis.com/javascript/latest/references/core/renderers/Renderer/#authoringInfo) object.
480
+ * By default, the renderer and any auto-generated [AggregateFields](https://developers.arcgis.com/javascript/latest/references/core/layers/support/AggregateField/) it uses are
481
+ * discarded and replaced each time the underlying layer's renderer changes.
482
+ *
483
+ * To retain an auto-generated cluster renderer as an explicit renderer, set the cluster renderer's
484
+ * [AuthoringInfo.isAutoGenerated](https://developers.arcgis.com/javascript/latest/references/core/renderers/support/AuthoringInfo/#isAutoGenerated) property to `false`.
485
+ * To retain an auto-generated aggregate field used by that renderer, set its
486
+ * [AggregateField.isAutoGenerated](https://developers.arcgis.com/javascript/latest/references/core/layers/support/AggregateField/#isAutoGenerated) property to `false`.
482
487
  *
483
488
  * This property allows you to override the auto generated cluster styling using any
484
489
  * renderer type suitable for point geometries. For example, if you want to render clusters
@@ -1192,9 +1197,14 @@ export default class FeatureReductionCluster extends FeatureReductionClusterSupe
1192
1197
  * See [Styles and configurations](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/#styles-and-configurations)
1193
1198
  * for more information about this behavior. In this scenario, the renderer will be persisted when
1194
1199
  * the layer is saved to the web map, but it will be flagged as "auto generated" in the
1195
- * [AuthoringInfo.isAutoGenerated](https://developers.arcgis.com/javascript/latest/references/core/renderers/support/AuthoringInfo/#isAutoGenerated) property of the
1196
- * the [Renderer.authoringInfo](https://developers.arcgis.com/javascript/latest/references/core/renderers/Renderer/#authoringInfo) object.
1197
- * All auto generated renderers are discarded and replaced each time the underlying layer's renderer is changed.
1200
+ * [AuthoringInfo.isAutoGenerated](https://developers.arcgis.com/javascript/latest/references/core/renderers/support/AuthoringInfo/#isAutoGenerated) property of the [Renderer.authoringInfo](https://developers.arcgis.com/javascript/latest/references/core/renderers/Renderer/#authoringInfo) object.
1201
+ * By default, the renderer and any auto-generated [AggregateFields](https://developers.arcgis.com/javascript/latest/references/core/layers/support/AggregateField/) it uses are
1202
+ * discarded and replaced each time the underlying layer's renderer changes.
1203
+ *
1204
+ * To retain an auto-generated cluster renderer as an explicit renderer, set the cluster renderer's
1205
+ * [AuthoringInfo.isAutoGenerated](https://developers.arcgis.com/javascript/latest/references/core/renderers/support/AuthoringInfo/#isAutoGenerated) property to `false`.
1206
+ * To retain an auto-generated aggregate field used by that renderer, set its
1207
+ * [AggregateField.isAutoGenerated](https://developers.arcgis.com/javascript/latest/references/core/layers/support/AggregateField/#isAutoGenerated) property to `false`.
1198
1208
  *
1199
1209
  * This property allows you to override the auto generated cluster styling using any
1200
1210
  * renderer type suitable for point geometries. For example, if you want to render clusters
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import s from"../../request.js";import r from"../../core/Accessor.js";import{result as t}from"../../core/asyncUtils.js";import o from"../../core/Logger.js";import{getOrCreateMapValue as a}from"../../core/MapUtils.js";import{whenOrAbort as l,isAbortError as n}from"../../core/promiseUtils.js";import{subclass as i}from"../../core/accessorSupport/decorators.js";import{property as h}from"../../core/accessorSupport/decorators/property.js";import{parse as c}from"./arcgisLayerUrl.js";let u=class extends r{constructor(e){super(e),this._abortController=new AbortController,this._pendingBatches=new Map,this._flushHandle=void 0,this._flushDeadline=null,this._flushInProgress=!1,this._flushRequested=!1}async fetch(e,s){const r=c(e?.url)?.url.path;if(!e||!r)return null;const t=f(e,r,s),o=e.layerId,n=a(this._pendingBatches,m(t),()=>({...t,layers:new Map})),i=a(n.layers,o,()=>({resolvers:[],serverGen:s.serverGen}));if(i.serverGen!==s.serverGen)throw new Error(`I3SExtractChanges: serverGen mismatch for layer ${e.title} (${o}). Expected ${i.serverGen}, got ${s.serverGen}.`);const h=Promise.withResolvers();return i.resolvers.push(h),this._scheduleFlush(),l(h.promise,s)}destroy(){clearTimeout(this._flushHandle),this._flushHandle=void 0,this._flushDeadline=null,this._flushRequested=!1;for(const e of this._pendingBatches.values())this._resolveBatch(e,null);this._pendingBatches.clear(),this._abortController.abort()}_scheduleFlush(){if(!this.batchingEnabled)return void this._flushSerially().catch(()=>{});const e=Date.now();this._flushDeadline??=e+g,clearTimeout(this._flushHandle);const s=Math.min(y,Math.max(0,this._flushDeadline-e));this._flushHandle=setTimeout(()=>{this._flushHandle=void 0,this._flushDeadline=null,this._flushSerially().catch(()=>{})},s)}async _flushSerially(){if(this._flushInProgress)this._flushRequested=!0;else{this._flushInProgress=!0;try{do{this._flushRequested=!1,await this._flush()}while(this._flushRequested)}finally{this._flushInProgress=!1}}}async _flush(){const e=Array.from(this._pendingBatches.values());this._pendingBatches.clear(),await Promise.all(e.map(e=>this._fetchBatch(e)))}async _fetchBatch(e){const{layers:r}=e,o=Array.from(r.keys()),a={...e.customParameters,f:"json",returnIdsOnly:!0,layers:JSON.stringify(o),returnUpdates:!0,returnDeletes:e.returnGeometryChanges,returnInserts:e.returnGeometryChanges,layerServerGens:JSON.stringify(Array.from(r,([e,{serverGen:s}])=>({id:e,serverGen:s})))};null!=e.apiKey&&(a.token=e.apiKey),e.fieldsToCompare.length>0&&(a.fieldsToCompare=JSON.stringify({fields:e.fieldsToCompare}));const l=await t(s(`${e.serviceUrl}/extractChanges`,{method:"post",query:a,timeout:p,signal:this._abortController.signal}));if(!l.ok)return n(l.error)||this._logUnavailable(),void this._resolveBatch(e,null);const i=new Map(l.value.data?.edits?.map(e=>[e.id,e]));for(const[s,t]of r){const r=i.get(s),o=null!=r?this._getChangedObjectIdsFromExtractChanges(r,e.returnGeometryChanges):new d;for(const e of t.resolvers)e.resolve(o)}}_resolveBatch(e,s){for(const r of e.layers.values())for(const e of r.resolvers)e.resolve(s)}_logUnavailable(){o.getLogger(this.layer).warn("extractChanges:unavailable",this.layer.title,": could not obtain edited features that are not cached in the scene service. Display of features may not be up to date with the latest edits. Consider re-caching the scene service.")}_getChangedObjectIdsFromExtractChanges(e,s){const r=e.objectIds,t=e.fieldUpdates,o=r?.adds??[],a=r?.updates??[],l=r?.deletes??[];return new d([...o,...a,...l],s?[...o,...t??a,...l]:[])}};e([h()],u.prototype,"layer",void 0),e([h()],u.prototype,"batchingEnabled",void 0),u=e([i("esri.layers.support.I3SExtractChanges")],u);class d{constructor(e=[],s=[]){this.attributeChangedObjectIds=e,this.geometryChangedObjectIds=s}}function f(e,s,r){const t=r.returnGeometryChanges?e.infoFor3D:null,o=null!=t?[...new Set([...Object.values(t.transformFieldRoles),t.sourceHashField])].sort():[];return{serviceUrl:s,customParameters:e.customParameters?{...e.customParameters}:{},apiKey:e.apiKey,returnGeometryChanges:r.returnGeometryChanges,fieldsToCompare:o}}function m(e){return JSON.stringify([e.serviceUrl,Object.entries(e.customParameters).sort(([e],[s])=>e.localeCompare(s)),e.apiKey??null,e.returnGeometryChanges,e.fieldsToCompare])}const p=1e4,y=200,g=600;export{d as I3SChangedObjectIds,u as I3SExtractChanges,g as extractChangesFetchMaxWait,y as extractChangesFetchQuietTime};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "5.2.0-next.81",
3
+ "version": "5.2.0-next.83",
4
4
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
5
5
  "keywords": [
6
6
  "ArcGIS",
@@ -20,13 +20,13 @@
20
20
  "license": "SEE LICENSE IN LICENSE.md",
21
21
  "dependencies": {
22
22
  "@amcharts/amcharts5": "~5.20.2",
23
- "@arcgis/toolkit": "^5.2.0-next.76",
23
+ "@arcgis/toolkit": "^5.2.0-next.77",
24
24
  "@esri/arcgis-html-sanitizer": "~4.1.0",
25
- "@esri/calcite-components": "^5.2.0-next.50",
25
+ "@esri/calcite-components": "^5.2.0-next.52",
26
26
  "@vaadin/grid": "~25.2.8",
27
27
  "@zip.js/zip.js": "~2.8.51",
28
28
  "luxon": "~3.7.2",
29
- "marked": "~18.0.9",
29
+ "marked": "~18.0.10",
30
30
  "tslib": "^2.8.1"
31
31
  }
32
32
  }
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{clone as t}from"../core/lang.js";import s from"../core/Logger.js";import{deepMerge as i}from"../core/object.js";import{watch as l}from"../core/reactiveUtils.js";import{property as o,cast as r,subclass as u}from"../core/accessorSupport/decorators.js";import{diff as n}from"../core/accessorSupport/diffUtils.js";import{ensureString as a,ensureType as p}from"../core/accessorSupport/ensureType.js";import{collectArcadeFieldNames as f,collectField as d}from"../layers/support/fieldUtils.js";import c from"../portal/Portal.js";import h from"./Renderer.js";import{VisualVariablesMixin as m}from"./mixins/VisualVariablesMixin.js";import{rendererBackgroundFillSymbolProperty as y,rendererSymbolProperty as b}from"./support/commonProperties.js";import v from"./support/RendererLegendOptions.js";import{getScaleDependentSymbol as _}from"./support/scaleDependentSymbolUtils.js";import g from"./support/UniqueValue.js";import V from"./support/UniqueValueClass.js";import q from"./support/UniqueValueGroup.js";import I from"./support/UniqueValueInfo.js";import{loadArcade as S}from"../support/loadArcade.js";import{f as w,t as U}from"../chunks/persistableUrlUtils.js";import j from"../symbols/WebStyleSymbol.js";import{fetchStyle as F}from"../symbols/support/styleUtils.js";import{ensureType as O}from"../symbols/support/typeUtils.js";import{addPropertyUnsupportedError as G}from"../webdoc/support/unsupportedErrors.js";import{enumeration as D}from"../core/accessorSupport/decorators/enumeration.js";import{writer as x}from"../core/accessorSupport/decorators/writer.js";import{reader as E}from"../core/accessorSupport/decorators/reader.js";var M;const R="uvInfos-watcher",L="uvGroups-watcher",N=",",P=p(I);function C(e){const{field1:t,field2:s,field3:i,fieldDelimiter:l,uniqueValueInfos:o,valueExpression:r}=e,u=!(!t||!s);return[{classes:(o??[]).map(e=>{const{alternateSymbols:o,symbol:n,label:a,value:p,description:f}=e,[d,c,h]=u?p?.toString()?.split(l||"")||[]:[p],m=[];return(t||r)&&m.push(d),s&&m.push(c),i&&m.push(h),{alternateSymbols:o,symbol:n,label:a,values:[m],description:f}})}]}function z(e){return null!=e&&""!==e&&("string"!=typeof e||""!==e.trim()&&"<null>"!==e.toLowerCase())||(e=null),e+""}let A=M=class extends(m(h)){constructor(e){super(e),this._valueInfoMap={},this._isDefaultSymbolDerived=!1,this._isInfosSource=null,this.type="unique-value",this.backgroundFillSymbol=null,this.orderByClassesEnabled=!1,this.valueExpressionTitle=null,this.legendOptions=null,this.defaultLabel=null,this.portal=null,this.styleOrigin=null,this.diff={uniqueValueInfos(e,t){if(!e&&!t)return;if(!e||!t)return{type:"complete",oldValue:e,newValue:t};let s=!1;const i={type:"collection",added:[],removed:[],changed:[],unchanged:[]};for(let l=0;l<t.length;l++){const o=e.find(e=>e.value===t[l].value);o?n(o,t[l])?(i.changed.push({type:"complete",oldValue:o,newValue:t[l]}),s=!0):i.unchanged.push({oldValue:o,newValue:t[l]}):(i.added.push(t[l]),s=!0)}for(let l=0;l<e.length;l++){t.find(t=>t.value===e[l].value)||(i.removed.push(e[l]),s=!0)}return s?i:void 0}},this._set("uniqueValueInfos",[]),this._set("uniqueValueGroups",[])}get _cache(){return{compiledFunc:null}}set field(e){this._set("field",e),this._updateFieldDelimiter(),this._updateUniqueValues()}castField(e){return null==e||"function"==typeof e?e:a(e)}writeField(e,t,i,l){"string"==typeof e?t[i]=e:l?.messages?G(l,"UniqueValueRenderer.field","set to a function cannot be written to JSON"):s.getLogger(this).error(".field: cannot write field to JSON since it's not a string value")}set field2(e){this._set("field2",e),this._updateFieldDelimiter(),this._updateUniqueValues()}set field3(e){this._set("field3",e),this._updateUniqueValues()}set valueExpression(e){this._set("valueExpression",e),this._updateUniqueValues()}set defaultSymbol(e){this._isDefaultSymbolDerived=!1,this._set("defaultSymbol",e)}set fieldDelimiter(e){this._set("fieldDelimiter",e),this._updateUniqueValues()}readPortal(e,t,s){return s.portal||c.getDefault()}readStyleOrigin(e,t,s){if(t.styleName)return Object.freeze({styleName:t.styleName});if(t.styleUrl){const e=w(t.styleUrl,s);return Object.freeze({styleUrl:e})}}writeStyleOrigin(e,t,s,i){e.styleName?t.styleName=e.styleName:e.styleUrl&&(t.styleUrl=U(e.styleUrl,i))}set uniqueValueGroups(e){this.styleOrigin?s.getLogger(this).error("#uniqueValueGroups=","Cannot modify unique value groups of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueGroups",e),this._updateInfosFromGroups(),this._isInfosSource=!1,this._watchUniqueValueGroups())}set uniqueValueInfos(e){this.styleOrigin?s.getLogger(this).error("#uniqueValueInfos=","Cannot modify unique value infos of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos())}addUniqueValueInfo(e,t){if(this.styleOrigin)return void s.getLogger(this).error("#addUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");let i;i="object"==typeof e?P(e):new I({value:e,symbol:O(t)}),this.uniqueValueInfos?.push(i),this._valueInfoMap[z(i.value)]=i,this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}removeUniqueValueInfo(e){if(this.styleOrigin)return void s.getLogger(this).error("#removeUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");const t=this.uniqueValueInfos;if(t)for(let s=0;s<t.length;s++){const i=t[s];if(String(i.value)===String(e)){delete this._valueInfoMap[z(e)],t.splice(s,1);break}}this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}async getUniqueValueInfo(e,t){let s=t;return this.valueExpression&&null==t?.arcade&&(s={...s,arcade:await S()}),this._getUniqueValueInfo(e,s)}getSymbol(e,t){if(this.valueExpression&&null==t?.arcade)return void s.getLogger(this).error("#getSymbol()","Please use getSymbolAsync if valueExpression is used");const i=this._getUniqueValueInfo(e,t);return _(i,t?.scale)??this.defaultSymbol}async getSymbolAsync(e,t){let s=t;if(this.valueExpression&&null==s?.arcade){const e=await S(),{arcadeUtils:t}=e;t.hasGeometryOperations(this.valueExpression)&&await t.enableGeometryOperations(),s={...s,arcade:e}}const i=this._getUniqueValueInfo(e,s);return _(i,s?.scale)??this.defaultSymbol}get symbols(){const e=[];if(this._isInfosSource)for(const t of this.uniqueValueInfos??[])t.symbol&&e.push(t.symbol),e.push(...t.alternateSymbols??[]);else for(const t of this.uniqueValueGroups??[])for(const s of t.classes??[])s.symbol&&e.push(s.symbol),e.push(...s.alternateSymbols??[]);return this.defaultSymbol&&e.push(this.defaultSymbol),e}clone(){const e=new M({field:this.field,field2:this.field2,field3:this.field3,defaultLabel:this.defaultLabel,defaultSymbol:t(this.defaultSymbol),orderByClassesEnabled:this.orderByClassesEnabled,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,fieldDelimiter:this.fieldDelimiter,visualVariables:t(this.visualVariables),legendOptions:t(this.legendOptions),authoringInfo:t(this.authoringInfo),backgroundFillSymbol:t(this.backgroundFillSymbol)});this._isDefaultSymbolDerived&&(e._isDefaultSymbolDerived=!0),e._set("portal",this.portal);const s=t(this.uniqueValueInfos),i=t(this.uniqueValueGroups);return this.styleOrigin&&(e._set("styleOrigin",Object.freeze(t(this.styleOrigin))),Object.freeze(s),Object.freeze(i)),e._set("uniqueValueInfos",s),e._updateValueInfoMap(),e._set("uniqueValueGroups",i),e._isInfosSource=this._isInfosSource,e._watchUniqueValueInfosAndGroups(),e}get arcadeRequired(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression}async collectRequiredFields(e,t){const s=[this.collectVVRequiredFields(e,t),this.collectSymbolFields(e,t)];await Promise.all(s)}async collectSymbolFields(e,t){const s=[...this.symbols.map(s=>s.collectRequiredFields(e,t)),f(e,t,null,this.valueExpression)];d(e,t,this.field),d(e,t,this.field2),d(e,t,this.field3),await Promise.all(s)}populateFromStyle(){return F(this.styleOrigin,{portal:this.portal}).then(e=>{const t=[];return this._valueInfoMap={},e?.data&&Array.isArray(e.data.items)&&e.data.items.forEach(s=>{const i=new j({styleUrl:e.styleUrl,styleName:e.styleName,portal:this.portal,name:s.name});this.defaultSymbol||s.name!==e.data.defaultItem||(this.defaultSymbol=i,this._isDefaultSymbolDerived=!0);const l=new I({value:s.name,symbol:i});t.push(l),this._valueInfoMap[z(s.name)]=l}),this._set("uniqueValueInfos",Object.freeze(t)),this._updateGroupsFromInfos(!0),this._isInfosSource=null,this._watchUniqueValueInfos(),!this.defaultSymbol&&this.uniqueValueInfos?.length&&(this.defaultSymbol=this.uniqueValueInfos[0].symbol,this._isDefaultSymbolDerived=!0),this})}_updateFieldDelimiter(){this.field&&this.field2&&!this.fieldDelimiter&&this._set("fieldDelimiter",N)}_updateUniqueValues(){null!=this._isInfosSource&&(this._isInfosSource?this._updateGroupsFromInfos():this._updateInfosFromGroups())}_updateValueInfoMap(){this._valueInfoMap={};const{uniqueValueInfos:e}=this;if(e)for(const t of e)this._valueInfoMap[z(t.value)]=t}_watchUniqueValueInfosAndGroups(){this._watchUniqueValueInfos(),this._watchUniqueValueGroups()}_watchUniqueValueInfos(){this.removeHandles(R);const{uniqueValueInfos:e}=this;if(e){const t=[];for(const s of e)t.push(l(()=>({symbol:s.symbol,alternateSymbols:s.alternateSymbols,value:s.value,label:s.label,description:s.description}),(e,t)=>{e!==t&&(this._updateGroupsFromInfos(),this._isInfosSource=!0)},{sync:!0}));this.addHandles(t,R)}}_watchUniqueValueGroups(){this.removeHandles(L);const{uniqueValueGroups:e}=this;if(e){const t=[];for(const s of e){t.push(l(()=>({classes:s.classes}),(e,t)=>{e!==t&&(this._updateInfosFromGroups(),this._isInfosSource=!1)},{sync:!0}));for(const e of s.classes??[])t.push(l(()=>({symbol:e.symbol,alternateSymbols:e.alternateSymbols,values:e.values,label:e.label,description:e.description}),(e,t)=>{e!==t&&(this._updateInfosFromGroups(),this._isInfosSource=!1)},{sync:!0}))}this.addHandles(t,L)}}_updateInfosFromGroups(){if(!this.uniqueValueGroups)return this._set("uniqueValueInfos",null),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const e=[],{field:t,field2:s,field3:i,fieldDelimiter:l,uniqueValueGroups:o,valueExpression:r}=this;if(!t&&!r)return this._set("uniqueValueInfos",e),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const u=!(!t||!s);for(const n of o)for(const t of n.classes??[]){const{alternateSymbols:o,symbol:r,label:n,values:a,description:p}=t;for(const t of a??[]){const{value:a,value2:f,value3:d}=t,c=[a];s&&c.push(f),i&&c.push(d);const h=u?c.join(l||""):c[0]??void 0;e.push(new I({alternateSymbols:o,symbol:r,label:n,value:h,description:p}))}}this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._watchUniqueValueInfos()}_updateGroupsFromInfos(e=!1){if(!this.uniqueValueInfos)return this._set("uniqueValueGroups",null),void this._watchUniqueValueGroups();const{field:t,field2:s,valueExpression:i,fieldDelimiter:l,uniqueValueInfos:o}=this;if(!t&&!i||!o.length)return this._set("uniqueValueGroups",[]),void this._watchUniqueValueGroups();const r=!(!t||!s),u=o.map(e=>{const{alternateSymbols:t,symbol:s,label:i,value:o,description:u}=e,[n,a,p]=r?o?.toString()?.split(l||"")||[]:[o];return new V({alternateSymbols:t,symbol:s,label:i,description:u,values:[new g({value:n,value2:a,value3:p})]})}),n=[new q({classes:u})];e&&Object.freeze(n),this._set("uniqueValueGroups",n),this._watchUniqueValueGroups()}_getUniqueValueInfo(e,t){return this.valueExpression?this._getUnqiueValueInfoForExpression(e,t):this._getUnqiueValueInfoForFields(e)}_getUnqiueValueInfoForExpression(e,t){const{viewingMode:s,scale:i,spatialReference:l,arcade:o,timeZone:r}=t??{};let u=this._cache.compiledFunc;const n=o.arcadeUtils;if(!u){const e=n.createSyntaxTree(this.valueExpression);u=n.createFunction(e),this._cache.compiledFunc=u}const a=n.executeFunction(u,n.createExecContext(e,n.getViewInfo({viewingMode:s,scale:i,spatialReference:l}),r));return this._valueInfoMap[z(a)]}_getUnqiueValueInfoForFields(e){const t=this.field,s=e.attributes;let i;if(this.field2){const e=this.field2,l=this.field3,o=[];t&&o.push(s[t]),e&&o.push(s[e]),l&&o.push(s[l]),i=o.join(this.fieldDelimiter||"")}else t&&(i=s[t]);return this._valueInfoMap[z(i)]}static fromPortalStyle(e,t){const i=new M(t?.properties);i._set("styleOrigin",Object.freeze({styleName:e})),i._set("portal",t?.portal||c.getDefault());const l=i.populateFromStyle();return l.catch(t=>{s.getLogger(this.prototype).error(`#fromPortalStyle('${e}'[, ...])`,"Failed to create unique value renderer from style name",t)}),l}static fromStyleUrl(e,t){const i=new M(t?.properties);i._set("styleOrigin",Object.freeze({styleUrl:e}));const l=i.populateFromStyle();return l.catch(t=>{s.getLogger(this.prototype).error(`#fromStyleUrl('${e}'[, ...])`,"Failed to create unique value renderer from style URL",t)}),l}};e([o({readOnly:!0})],A.prototype,"_cache",null),e([D({uniqueValue:"unique-value"})],A.prototype,"type",void 0),e([o(y)],A.prototype,"backgroundFillSymbol",void 0),e([o({value:null,json:{type:String,read:{source:"field1"},write:{target:"field1"}}})],A.prototype,"field",null),e([r("field")],A.prototype,"castField",null),e([x("field")],A.prototype,"writeField",null),e([o({type:String,value:null,json:{write:!0}})],A.prototype,"field2",null),e([o({type:String,value:null,json:{write:!0}})],A.prototype,"field3",null),e([o({type:Boolean,json:{name:"drawInClassOrder",default:!1,write:!0,origins:{"web-scene":{write:!1}}}})],A.prototype,"orderByClassesEnabled",void 0),e([o({type:String,value:null,json:{write:!0}})],A.prototype,"valueExpression",null),e([o({type:String,json:{write:!0}})],A.prototype,"valueExpressionTitle",void 0),e([o({type:v,json:{write:!0}})],A.prototype,"legendOptions",void 0),e([o({type:String,json:{write:!0}})],A.prototype,"defaultLabel",void 0),e([o(i({...b},{json:{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}},origins:{"web-scene":{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}}}}}}))],A.prototype,"defaultSymbol",null),e([o({type:String,value:null,json:{write:!0}})],A.prototype,"fieldDelimiter",null),e([o({type:c,readOnly:!0})],A.prototype,"portal",void 0),e([E("portal",["styleName"])],A.prototype,"readPortal",null),e([o({readOnly:!0,json:{write:{enabled:!1,overridePolicy:()=>({enabled:!0})}}})],A.prototype,"styleOrigin",void 0),e([E("styleOrigin",["styleName","styleUrl"])],A.prototype,"readStyleOrigin",null),e([x("styleOrigin",{styleName:{type:String},styleUrl:{type:String}})],A.prototype,"writeStyleOrigin",null),e([o({type:[q],json:{read:{source:["uniqueValueGroups","uniqueValueInfos"],reader:(e,t,s)=>(t.uniqueValueGroups||C(t)).map(e=>q.fromJSON(e,s))},write:{overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0}}}}})],A.prototype,"uniqueValueGroups",null),e([o({type:[I],json:{read:!1,write:{isRequired:!0,overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0,isRequired:!0}}}}})],A.prototype,"uniqueValueInfos",null),A=M=e([u("esri.renderers.UniqueValueRenderer")],A);export{A as default};
2
+ import{__decorate as e}from"tslib";import{clone as t}from"../core/lang.js";import s from"../core/Logger.js";import{deepMerge as i}from"../core/object.js";import{watch as l}from"../core/reactiveUtils.js";import{property as o,cast as r,subclass as u}from"../core/accessorSupport/decorators.js";import{diff as n}from"../core/accessorSupport/diffUtils.js";import{ensureString as a,ensureType as p}from"../core/accessorSupport/ensureType.js";import{collectArcadeFieldNames as f,collectField as d}from"../layers/support/fieldUtils.js";import c from"../portal/Portal.js";import h from"./Renderer.js";import{VisualVariablesMixin as m}from"./mixins/VisualVariablesMixin.js";import{rendererBackgroundFillSymbolProperty as y,rendererSymbolProperty as b}from"./support/commonProperties.js";import v from"./support/RendererLegendOptions.js";import{getScaleDependentSymbol as _}from"./support/scaleDependentSymbolUtils.js";import g from"./support/UniqueValue.js";import V from"./support/UniqueValueClass.js";import q from"./support/UniqueValueGroup.js";import I from"./support/UniqueValueInfo.js";import{loadArcade as S}from"../support/loadArcade.js";import{f as w,t as U}from"../chunks/persistableUrlUtils.js";import j from"../symbols/WebStyleSymbol.js";import{fetchStyle as F}from"../symbols/support/styleUtils.js";import{ensureType as O}from"../symbols/support/typeUtils.js";import{addPropertyUnsupportedError as G}from"../webdoc/support/unsupportedErrors.js";import{enumeration as D}from"../core/accessorSupport/decorators/enumeration.js";import{writer as x}from"../core/accessorSupport/decorators/writer.js";import{reader as E}from"../core/accessorSupport/decorators/reader.js";var M;const R="uvInfos-watcher",L="uvGroups-watcher",N=",",P=p(I);function C(e){const{field1:t,field2:s,field3:i,fieldDelimiter:l,uniqueValueInfos:o,valueExpression:r}=e,u=!(!t||!s);return[{classes:(o??[]).map(e=>{const{alternateSymbols:o,symbol:n,label:a,value:p,description:f}=e,[d,c,h]=u?p?.toString()?.split(l||"")||[]:[p],m=[];return(t||r)&&m.push(d),s&&m.push(c),i&&m.push(h),{alternateSymbols:o,symbol:n,label:a,values:[m],description:f}})}]}function z(e){return null==e||""===e||"string"==typeof e&&(""===e.trim()||"<null>"===e.toLowerCase())?null:e}function A(e,t){return t&&"string"==typeof e?e.split(t).map(e=>z(e)??"").join(t):`${z(e)}`}let T=M=class extends(m(h)){constructor(e){super(e),this._valueInfoMap={},this._isDefaultSymbolDerived=!1,this._isInfosSource=null,this.type="unique-value",this.backgroundFillSymbol=null,this.orderByClassesEnabled=!1,this.valueExpressionTitle=null,this.legendOptions=null,this.defaultLabel=null,this.portal=null,this.styleOrigin=null,this.diff={uniqueValueInfos(e,t){if(!e&&!t)return;if(!e||!t)return{type:"complete",oldValue:e,newValue:t};let s=!1;const i={type:"collection",added:[],removed:[],changed:[],unchanged:[]};for(let l=0;l<t.length;l++){const o=e.find(e=>e.value===t[l].value);o?n(o,t[l])?(i.changed.push({type:"complete",oldValue:o,newValue:t[l]}),s=!0):i.unchanged.push({oldValue:o,newValue:t[l]}):(i.added.push(t[l]),s=!0)}for(let l=0;l<e.length;l++){t.find(t=>t.value===e[l].value)||(i.removed.push(e[l]),s=!0)}return s?i:void 0}},this._set("uniqueValueInfos",[]),this._set("uniqueValueGroups",[])}get _cache(){return{compiledFunc:null}}set field(e){this._set("field",e),this._updateFieldDelimiter(),this._updateUniqueValues()}castField(e){return null==e||"function"==typeof e?e:a(e)}writeField(e,t,i,l){"string"==typeof e?t[i]=e:l?.messages?G(l,"UniqueValueRenderer.field","set to a function cannot be written to JSON"):s.getLogger(this).error(".field: cannot write field to JSON since it's not a string value")}set field2(e){this._set("field2",e),this._updateFieldDelimiter(),this._updateUniqueValues()}set field3(e){this._set("field3",e),this._updateUniqueValues()}set valueExpression(e){this._set("valueExpression",e),this._updateUniqueValues()}set defaultSymbol(e){this._isDefaultSymbolDerived=!1,this._set("defaultSymbol",e)}set fieldDelimiter(e){this._set("fieldDelimiter",e),this._updateUniqueValues()}readPortal(e,t,s){return s.portal||c.getDefault()}readStyleOrigin(e,t,s){if(t.styleName)return Object.freeze({styleName:t.styleName});if(t.styleUrl){const e=w(t.styleUrl,s);return Object.freeze({styleUrl:e})}}writeStyleOrigin(e,t,s,i){e.styleName?t.styleName=e.styleName:e.styleUrl&&(t.styleUrl=U(e.styleUrl,i))}set uniqueValueGroups(e){this.styleOrigin?s.getLogger(this).error("#uniqueValueGroups=","Cannot modify unique value groups of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueGroups",e),this._updateInfosFromGroups(),this._isInfosSource=!1,this._watchUniqueValueGroups())}set uniqueValueInfos(e){this.styleOrigin?s.getLogger(this).error("#uniqueValueInfos=","Cannot modify unique value infos of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos())}addUniqueValueInfo(e,t){if(this.styleOrigin)return void s.getLogger(this).error("#addUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");let i;i="object"==typeof e?P(e):new I({value:e,symbol:O(t)}),this.uniqueValueInfos?.push(i),this._valueInfoMap[A(i.value,this.fieldDelimiter)]=i,this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}removeUniqueValueInfo(e){if(this.styleOrigin)return void s.getLogger(this).error("#removeUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");const t=this.uniqueValueInfos;if(t)for(let s=0;s<t.length;s++){const i=t[s];if(String(i.value)===String(e)){delete this._valueInfoMap[A(e,this.fieldDelimiter)],t.splice(s,1);break}}this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}async getUniqueValueInfo(e,t){let s=t;return this.valueExpression&&null==t?.arcade&&(s={...s,arcade:await S()}),this._getUniqueValueInfo(e,s)}getSymbol(e,t){if(this.valueExpression&&null==t?.arcade)return void s.getLogger(this).error("#getSymbol()","Please use getSymbolAsync if valueExpression is used");const i=this._getUniqueValueInfo(e,t);return _(i,t?.scale)??this.defaultSymbol}async getSymbolAsync(e,t){let s=t;if(this.valueExpression&&null==s?.arcade){const e=await S(),{arcadeUtils:t}=e;t.hasGeometryOperations(this.valueExpression)&&await t.enableGeometryOperations(),s={...s,arcade:e}}const i=this._getUniqueValueInfo(e,s);return _(i,s?.scale)??this.defaultSymbol}get symbols(){const e=[];if(this._isInfosSource)for(const t of this.uniqueValueInfos??[])t.symbol&&e.push(t.symbol),e.push(...t.alternateSymbols??[]);else for(const t of this.uniqueValueGroups??[])for(const s of t.classes??[])s.symbol&&e.push(s.symbol),e.push(...s.alternateSymbols??[]);return this.defaultSymbol&&e.push(this.defaultSymbol),e}clone(){const e=new M({field:this.field,field2:this.field2,field3:this.field3,defaultLabel:this.defaultLabel,defaultSymbol:t(this.defaultSymbol),orderByClassesEnabled:this.orderByClassesEnabled,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,fieldDelimiter:this.fieldDelimiter,visualVariables:t(this.visualVariables),legendOptions:t(this.legendOptions),authoringInfo:t(this.authoringInfo),backgroundFillSymbol:t(this.backgroundFillSymbol)});this._isDefaultSymbolDerived&&(e._isDefaultSymbolDerived=!0),e._set("portal",this.portal);const s=t(this.uniqueValueInfos),i=t(this.uniqueValueGroups);return this.styleOrigin&&(e._set("styleOrigin",Object.freeze(t(this.styleOrigin))),Object.freeze(s),Object.freeze(i)),e._set("uniqueValueInfos",s),e._updateValueInfoMap(),e._set("uniqueValueGroups",i),e._isInfosSource=this._isInfosSource,e._watchUniqueValueInfosAndGroups(),e}get arcadeRequired(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression}async collectRequiredFields(e,t){const s=[this.collectVVRequiredFields(e,t),this.collectSymbolFields(e,t)];await Promise.all(s)}async collectSymbolFields(e,t){const s=[...this.symbols.map(s=>s.collectRequiredFields(e,t)),f(e,t,null,this.valueExpression)];d(e,t,this.field),d(e,t,this.field2),d(e,t,this.field3),await Promise.all(s)}populateFromStyle(){return F(this.styleOrigin,{portal:this.portal}).then(e=>{const t=[];return this._valueInfoMap={},e?.data&&Array.isArray(e.data.items)&&e.data.items.forEach(s=>{const i=new j({styleUrl:e.styleUrl,styleName:e.styleName,portal:this.portal,name:s.name});this.defaultSymbol||s.name!==e.data.defaultItem||(this.defaultSymbol=i,this._isDefaultSymbolDerived=!0);const l=new I({value:s.name,symbol:i});t.push(l),this._valueInfoMap[A(s.name)]=l}),this._set("uniqueValueInfos",Object.freeze(t)),this._updateGroupsFromInfos(!0),this._isInfosSource=null,this._watchUniqueValueInfos(),!this.defaultSymbol&&this.uniqueValueInfos?.length&&(this.defaultSymbol=this.uniqueValueInfos[0].symbol,this._isDefaultSymbolDerived=!0),this})}_updateFieldDelimiter(){this.field&&this.field2&&!this.fieldDelimiter&&this._set("fieldDelimiter",N)}_updateUniqueValues(){null!=this._isInfosSource&&(this._isInfosSource?this._updateGroupsFromInfos():this._updateInfosFromGroups())}_updateValueInfoMap(){this._valueInfoMap={};const{uniqueValueInfos:e}=this;if(e)for(const t of e)this._valueInfoMap[A(t.value,this.fieldDelimiter)]=t}_watchUniqueValueInfosAndGroups(){this._watchUniqueValueInfos(),this._watchUniqueValueGroups()}_watchUniqueValueInfos(){this.removeHandles(R);const{uniqueValueInfos:e}=this;if(e){const t=[];for(const s of e)t.push(l(()=>({symbol:s.symbol,alternateSymbols:s.alternateSymbols,value:s.value,label:s.label,description:s.description}),(e,t)=>{e!==t&&(this._updateGroupsFromInfos(),this._isInfosSource=!0)},{sync:!0}));this.addHandles(t,R)}}_watchUniqueValueGroups(){this.removeHandles(L);const{uniqueValueGroups:e}=this;if(e){const t=[];for(const s of e){t.push(l(()=>({classes:s.classes}),(e,t)=>{e!==t&&(this._updateInfosFromGroups(),this._isInfosSource=!1)},{sync:!0}));for(const e of s.classes??[])t.push(l(()=>({symbol:e.symbol,alternateSymbols:e.alternateSymbols,values:e.values,label:e.label,description:e.description}),(e,t)=>{e!==t&&(this._updateInfosFromGroups(),this._isInfosSource=!1)},{sync:!0}))}this.addHandles(t,L)}}_updateInfosFromGroups(){if(!this.uniqueValueGroups)return this._set("uniqueValueInfos",null),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const e=[],{field:t,field2:s,field3:i,fieldDelimiter:l,uniqueValueGroups:o,valueExpression:r}=this;if(!t&&!r)return this._set("uniqueValueInfos",e),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const u=!(!t||!s);for(const n of o)for(const t of n.classes??[]){const{alternateSymbols:o,symbol:r,label:n,values:a,description:p}=t;for(const t of a??[]){const{value:a,value2:f,value3:d}=t,c=[a];s&&c.push(f),i&&c.push(d);const h=u?c.join(l||""):c[0]??void 0;e.push(new I({alternateSymbols:o,symbol:r,label:n,value:h,description:p}))}}this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._watchUniqueValueInfos()}_updateGroupsFromInfos(e=!1){if(!this.uniqueValueInfos)return this._set("uniqueValueGroups",null),void this._watchUniqueValueGroups();const{field:t,field2:s,valueExpression:i,fieldDelimiter:l,uniqueValueInfos:o}=this;if(!t&&!i||!o.length)return this._set("uniqueValueGroups",[]),void this._watchUniqueValueGroups();const r=!(!t||!s),u=o.map(e=>{const{alternateSymbols:t,symbol:s,label:i,value:o,description:u}=e,[n,a,p]=r?o?.toString()?.split(l||"")||[]:[o];return new V({alternateSymbols:t,symbol:s,label:i,description:u,values:[new g({value:n,value2:a,value3:p})]})}),n=[new q({classes:u})];e&&Object.freeze(n),this._set("uniqueValueGroups",n),this._watchUniqueValueGroups()}_getUniqueValueInfo(e,t){return this.valueExpression?this._getUnqiueValueInfoForExpression(e,t):this._getUnqiueValueInfoForFields(e)}_getUnqiueValueInfoForExpression(e,t){const{viewingMode:s,scale:i,spatialReference:l,arcade:o,timeZone:r}=t??{};let u=this._cache.compiledFunc;const n=o.arcadeUtils;if(!u){const e=n.createSyntaxTree(this.valueExpression);u=n.createFunction(e),this._cache.compiledFunc=u}const a=n.executeFunction(u,n.createExecContext(e,n.getViewInfo({viewingMode:s,scale:i,spatialReference:l}),r));return this._valueInfoMap[A(a)]}_getUnqiueValueInfoForFields(e){const t=this.field,s=e.attributes;let i;if(this.field2){const e=this.field2,l=this.field3,o=[];t&&o.push(s[t]),e&&o.push(s[e]),l&&o.push(s[l]),i=o.join(this.fieldDelimiter||"")}else t&&(i=s[t]);return this._valueInfoMap[A(i,this.fieldDelimiter)]}static fromPortalStyle(e,t){const i=new M(t?.properties);i._set("styleOrigin",Object.freeze({styleName:e})),i._set("portal",t?.portal||c.getDefault());const l=i.populateFromStyle();return l.catch(t=>{s.getLogger(this.prototype).error(`#fromPortalStyle('${e}'[, ...])`,"Failed to create unique value renderer from style name",t)}),l}static fromStyleUrl(e,t){const i=new M(t?.properties);i._set("styleOrigin",Object.freeze({styleUrl:e}));const l=i.populateFromStyle();return l.catch(t=>{s.getLogger(this.prototype).error(`#fromStyleUrl('${e}'[, ...])`,"Failed to create unique value renderer from style URL",t)}),l}};e([o({readOnly:!0})],T.prototype,"_cache",null),e([D({uniqueValue:"unique-value"})],T.prototype,"type",void 0),e([o(y)],T.prototype,"backgroundFillSymbol",void 0),e([o({value:null,json:{type:String,read:{source:"field1"},write:{target:"field1"}}})],T.prototype,"field",null),e([r("field")],T.prototype,"castField",null),e([x("field")],T.prototype,"writeField",null),e([o({type:String,value:null,json:{write:!0}})],T.prototype,"field2",null),e([o({type:String,value:null,json:{write:!0}})],T.prototype,"field3",null),e([o({type:Boolean,json:{name:"drawInClassOrder",default:!1,write:!0,origins:{"web-scene":{write:!1}}}})],T.prototype,"orderByClassesEnabled",void 0),e([o({type:String,value:null,json:{write:!0}})],T.prototype,"valueExpression",null),e([o({type:String,json:{write:!0}})],T.prototype,"valueExpressionTitle",void 0),e([o({type:v,json:{write:!0}})],T.prototype,"legendOptions",void 0),e([o({type:String,json:{write:!0}})],T.prototype,"defaultLabel",void 0),e([o(i({...b},{json:{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}},origins:{"web-scene":{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}}}}}}))],T.prototype,"defaultSymbol",null),e([o({type:String,value:null,json:{write:!0}})],T.prototype,"fieldDelimiter",null),e([o({type:c,readOnly:!0})],T.prototype,"portal",void 0),e([E("portal",["styleName"])],T.prototype,"readPortal",null),e([o({readOnly:!0,json:{write:{enabled:!1,overridePolicy:()=>({enabled:!0})}}})],T.prototype,"styleOrigin",void 0),e([E("styleOrigin",["styleName","styleUrl"])],T.prototype,"readStyleOrigin",null),e([x("styleOrigin",{styleName:{type:String},styleUrl:{type:String}})],T.prototype,"writeStyleOrigin",null),e([o({type:[q],json:{read:{source:["uniqueValueGroups","uniqueValueInfos"],reader:(e,t,s)=>(t.uniqueValueGroups||C(t)).map(e=>q.fromJSON(e,s))},write:{overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0}}}}})],T.prototype,"uniqueValueGroups",null),e([o({type:[I],json:{read:!1,write:{isRequired:!0,overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0,isRequired:!0}}}}})],T.prototype,"uniqueValueInfos",null),T=M=e([u("esri.renderers.UniqueValueRenderer")],T);export{T as default};
@@ -117,9 +117,14 @@ export default class AuthoringInfo extends JSONSupport {
117
117
  */
118
118
  accessor focus: RelationshipFocus | null | undefined;
119
119
  /**
120
- * Indicates whether the renderer was created internally by the JS API's rendering engine for
121
- * default [FeatureReductionCluster](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/) visualizations. You should avoid
122
- * setting or changing this value.
120
+ * Indicates whether the renderer is automatically generated by the JS API's rendering engine for
121
+ * default [FeatureReductionCluster](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/) visualizations. Auto-generated cluster renderers
122
+ * are discarded and replaced when the underlying layer's renderer changes.
123
+ *
124
+ * Set this property to `false` to retain an auto-generated cluster renderer as an explicit renderer
125
+ * when the underlying layer's renderer changes. To retain any auto-generated
126
+ * [AggregateFields](https://developers.arcgis.com/javascript/latest/references/core/layers/support/AggregateField/) used by that renderer, also set their
127
+ * [AggregateField.isAutoGenerated](https://developers.arcgis.com/javascript/latest/references/core/layers/support/AggregateField/#isAutoGenerated) property to `false`.
123
128
  *
124
129
  * @default false
125
130
  */