@arcgis/core 5.0.0-next.49 → 5.0.0-next.50

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 (558) hide show
  1. package/applications/Components/baUtils.js +1 -1
  2. package/arcade.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/0000781c850b1b4828b3.js +1 -0
  5. package/assets/esri/core/workers/chunks/00f044370bf3bb6b24d7.js +1 -0
  6. package/assets/esri/core/workers/chunks/0136cd1a5da204b6daeb.js +1 -0
  7. package/assets/esri/core/workers/chunks/044a0ccd89741c1ae770.js +1 -0
  8. package/assets/esri/core/workers/chunks/090dad5579f0148d6486.js +1 -0
  9. package/assets/esri/core/workers/chunks/09bd9bd37a339802907a.js +1 -0
  10. package/assets/esri/core/workers/chunks/0bc01d71ed1ab8c3af3c.js +1 -0
  11. package/assets/esri/core/workers/chunks/0d9904ba62558686c289.js +1 -0
  12. package/assets/esri/core/workers/chunks/0fcb40204db8ee5571c3.js +1 -0
  13. package/assets/esri/core/workers/chunks/1065fd655bb7cee243fd.js +1 -0
  14. package/assets/esri/core/workers/chunks/11ab10668632648b2ba7.js +1 -0
  15. package/assets/esri/core/workers/chunks/13167bdd486b41163147.js +1 -0
  16. package/assets/esri/core/workers/chunks/{d8db2c51b2fb42f37b2a.js → 1363345f31f4f5051132.js} +1 -1
  17. package/assets/esri/core/workers/chunks/13be94357dcf5afc4fcb.js +1 -0
  18. package/assets/esri/core/workers/chunks/{e66bcdfd75e0113d1cec.js → 13ce8e8d45779b11ee12.js} +1 -1
  19. package/assets/esri/core/workers/chunks/1693f19f1c37e0a2087e.js +1 -0
  20. package/assets/esri/core/workers/chunks/18ab5959ebf8689f8fe8.js +1 -0
  21. package/assets/esri/core/workers/chunks/18c4cd160a4052b05831.js +1 -0
  22. package/assets/esri/core/workers/chunks/1bf4b5e5402790ccb450.js +1 -0
  23. package/assets/esri/core/workers/chunks/1db058f91a8e17b24db6.js +1 -0
  24. package/assets/esri/core/workers/chunks/1dc3ab52fcde7bff0f23.js +1 -0
  25. package/assets/esri/core/workers/chunks/{a7cd795042ebb8585906.js → 1f0c7ab33e466a37c7f9.js} +1 -1
  26. package/assets/esri/core/workers/chunks/224f01b11fdba9250b1e.js +1 -0
  27. package/assets/esri/core/workers/chunks/{a1a7b0e7ca488c895cb7.js → 22c115ec003351c7d8ee.js} +1 -1
  28. package/assets/esri/core/workers/chunks/24c35a46cf8ed11b774d.js +1 -0
  29. package/assets/esri/core/workers/chunks/27794d48c04a5875fd22.js +1 -0
  30. package/assets/esri/core/workers/chunks/294acaaebfedb05fe81e.js +1 -0
  31. package/assets/esri/core/workers/chunks/2a66841243975cac3e3c.js +1 -0
  32. package/assets/esri/core/workers/chunks/2c12848e4934e9bb2bd0.js +1 -0
  33. package/assets/esri/core/workers/chunks/2d61b6efa17e8c5832da.js +1 -0
  34. package/assets/esri/core/workers/chunks/2d6fa00273a73d44297d.js +1 -0
  35. package/assets/esri/core/workers/chunks/2da13c2269ab90281143.js +1 -0
  36. package/assets/esri/core/workers/chunks/2dfaead2ec6434513d45.js +1 -0
  37. package/assets/esri/core/workers/chunks/2fae37f34b28a46841e3.js +1 -0
  38. package/assets/esri/core/workers/chunks/{3298e96d3f2e49e338d2.js → 308fb48d080e01499a26.js} +1 -1
  39. package/assets/esri/core/workers/chunks/30dd4a7c93b33988a270.js +1 -0
  40. package/assets/esri/core/workers/chunks/355c8d0eadfff9f62dfb.js +1 -0
  41. package/assets/esri/core/workers/chunks/35961e71f69ae1d24b9e.js +1 -0
  42. package/assets/esri/core/workers/chunks/36a04be40369111a633d.js +1 -0
  43. package/assets/esri/core/workers/chunks/36d9208895abd1ba4ff1.js +1 -0
  44. package/assets/esri/core/workers/chunks/395a0773ccafd1f24c4d.js +1 -0
  45. package/assets/esri/core/workers/chunks/{81a60dfa600b690098f9.js → 3a612f873e29348370b2.js} +1 -1
  46. package/assets/esri/core/workers/chunks/3b1471f908fdecec2815.js +1 -0
  47. package/assets/esri/core/workers/chunks/{da1e61f355fb943085dc.js → 3c66dd52ad156711a6a2.js} +1 -1
  48. package/assets/esri/core/workers/chunks/3dd0db77a05263000bd8.js +1 -0
  49. package/assets/esri/core/workers/chunks/{08c1ea29678da27136f3.js → 44fb1184eeed0636704a.js} +1 -1
  50. package/assets/esri/core/workers/chunks/46d430a6983b81ba7556.js +1 -0
  51. package/assets/esri/core/workers/chunks/472d290f8eb1c1a85724.js +1 -0
  52. package/assets/esri/core/workers/chunks/47338472f5a8e004a671.js +1 -0
  53. package/assets/esri/core/workers/chunks/48b3906ac3ec57253d90.js +1 -0
  54. package/assets/esri/core/workers/chunks/{2a41283bba2361afa1fd.js → 495af366ec1defd89a72.js} +1 -1
  55. package/assets/esri/core/workers/chunks/49b581782f63abb6dd9f.js +1 -0
  56. package/assets/esri/core/workers/chunks/49df576f0215618aa651.js +1 -0
  57. package/assets/esri/core/workers/chunks/4abe2c56aecc9e9b8e86.js +1 -0
  58. package/assets/esri/core/workers/chunks/4e01e509a761a9d00b52.js +1 -0
  59. package/assets/esri/core/workers/chunks/{9d0f0d055ec25af037e0.js → 51093e552e31344cefa5.js} +1 -1
  60. package/assets/esri/core/workers/chunks/521aac8a665e98e4ca78.js +1 -0
  61. package/assets/esri/core/workers/chunks/54666586754949bfa584.js +1 -0
  62. package/assets/esri/core/workers/chunks/549f4ab9e285deaf04fb.js +1 -0
  63. package/assets/esri/core/workers/chunks/553ca1e55e9f1359839c.js +1 -0
  64. package/assets/esri/core/workers/chunks/{6f3943bebe2d5f4994f7.js → 58242447b72cc60a5040.js} +1 -1
  65. package/assets/esri/core/workers/chunks/58419d362f24b35003c1.js +1 -0
  66. package/assets/esri/core/workers/chunks/5aa354854219361f722b.js +1 -0
  67. package/assets/esri/core/workers/chunks/{aab93e885b6c7c6aa76e.js → 5ce524e0060053f35592.js} +19 -19
  68. package/assets/esri/core/workers/chunks/5d244fcf5c075afccdc6.js +1 -0
  69. package/assets/esri/core/workers/chunks/5e9fdd4eff7189f45932.js +1 -0
  70. package/assets/esri/core/workers/chunks/60954ab810dbbf36e5e1.js +1 -0
  71. package/assets/esri/core/workers/chunks/62ed6b45482e39d67785.js +1 -0
  72. package/assets/esri/core/workers/chunks/63b8193ad90b2ebe6884.js +1 -0
  73. package/assets/esri/core/workers/chunks/63c91421a71ae3b3599e.js +1 -0
  74. package/assets/esri/core/workers/chunks/63cf702cde83692126be.js +1 -0
  75. package/assets/esri/core/workers/chunks/687d2b761dc5b5cf0c31.js +1 -0
  76. package/assets/esri/core/workers/chunks/6cfcfebe9a4c491e453a.js +1 -0
  77. package/assets/esri/core/workers/chunks/{88aa71f02f43bb069345.js → 7033fa18b7dd7bd3e49c.js} +1 -1
  78. package/assets/esri/core/workers/chunks/710b29729f252f11115d.js +1 -0
  79. package/assets/esri/core/workers/chunks/72a520802b8accfd4512.js +1 -0
  80. package/assets/esri/core/workers/chunks/{72fbee59d5d909615408.js → 73892ac79b24b05e6863.js} +1 -1
  81. package/assets/esri/core/workers/chunks/73c3ee2697265b0f7208.js +1 -0
  82. package/assets/esri/core/workers/chunks/73f9cbf0f919b6adc2d5.js +1 -0
  83. package/assets/esri/core/workers/chunks/75e9759290f0f67b2128.js +1 -0
  84. package/assets/esri/core/workers/chunks/7737e69da604d2521da8.js +1 -0
  85. package/assets/esri/core/workers/chunks/{8e8d5422f57269d8c8d2.js → 7891825d5cdca03d2db0.js} +1 -1
  86. package/assets/esri/core/workers/chunks/7cd0ab01933bfb2c6e43.js +1 -0
  87. package/assets/esri/core/workers/chunks/81c2cc77c275a5b555c0.js +1 -0
  88. package/assets/esri/core/workers/chunks/82ace0195b63790b22c9.js +1 -0
  89. package/assets/esri/core/workers/chunks/8892bf3d2367e35de001.js +1 -0
  90. package/assets/esri/core/workers/chunks/8a132d91077ecf849248.js +1 -0
  91. package/assets/esri/core/workers/chunks/8a6e50d95539b46f629c.js +1 -0
  92. package/assets/esri/core/workers/chunks/8d941204425571b656ec.js +1 -0
  93. package/assets/esri/core/workers/chunks/914746077017fa50933f.js +1 -0
  94. package/assets/esri/core/workers/chunks/{004c2a1a37b99a184b13.js → 91fba3bebd78cb956941.js} +1 -1
  95. package/assets/esri/core/workers/chunks/92ec96aa743cabc9475d.js +1 -0
  96. package/assets/esri/core/workers/chunks/{5b290d18de61789417f9.js → 9361834d2c3064eb41fc.js} +1 -1
  97. package/assets/esri/core/workers/chunks/{44f036cc21e3a2308f69.js → 93b139be6488a1b4ba19.js} +1 -1
  98. package/assets/esri/core/workers/chunks/95057105f1b3bf805140.js +1 -0
  99. package/assets/esri/core/workers/chunks/968335b28b895e19913b.js +1 -0
  100. package/assets/esri/core/workers/chunks/973bf2ed34d57f299472.js +1 -0
  101. package/assets/esri/core/workers/chunks/9b6e2099aabf67b9f9f2.js +1 -0
  102. package/assets/esri/core/workers/chunks/{97b01803d0c38541aa08.js → 9c93eadbd19bef1191b4.js} +1 -1
  103. package/assets/esri/core/workers/chunks/a1594486177015e8a6c3.js +1 -0
  104. package/assets/esri/core/workers/chunks/{df458ad51be27df3d79d.js → a1f264abbd6354c333bf.js} +1 -1
  105. package/assets/esri/core/workers/chunks/a3407ca77b0ff62c0e75.js +1 -0
  106. package/assets/esri/core/workers/chunks/{8be61e13530fd0dc2fd1.js → a4f89568205d78d91cfe.js} +1 -1
  107. package/assets/esri/core/workers/chunks/a5e7c9517939f762c518.js +1 -0
  108. package/assets/esri/core/workers/chunks/a63ff3e9a9f3853d12f3.js +1 -0
  109. package/assets/esri/core/workers/chunks/a81a7cba815adb575c36.js +1 -0
  110. package/assets/esri/core/workers/chunks/{fe6fa1f2c2d54d41645e.js → a8dfd246c797f3b979f5.js} +1 -1
  111. package/assets/esri/core/workers/chunks/a8f7e44657083f6aa3fd.js +1 -0
  112. package/assets/esri/core/workers/chunks/a8fd635d1165db8616ab.js +1 -0
  113. package/assets/esri/core/workers/chunks/a92c1171314a68504c1b.js +1 -0
  114. package/assets/esri/core/workers/chunks/aa297e0931213341f51b.js +1 -0
  115. package/assets/esri/core/workers/chunks/aa7a1705266eec353cb6.js +1 -0
  116. package/assets/esri/core/workers/chunks/ab5e2f823960c33cefe4.js +1 -0
  117. package/assets/esri/core/workers/chunks/{f11453f24c0b728669d2.js → ac6f002cfad42e60de8f.js} +1 -1
  118. package/assets/esri/core/workers/chunks/b11c0e80e583f2b7c5de.js +1 -0
  119. package/assets/esri/core/workers/chunks/b14f9a46e583e1625a2b.js +1 -0
  120. package/assets/esri/core/workers/chunks/{8c271e9272e4eaf1325a.js → b1d3d2c93c189e215f67.js} +1 -1
  121. package/assets/esri/core/workers/chunks/b2425f6af7df6902dfc4.js +1 -0
  122. package/assets/esri/core/workers/chunks/b638ce18b93d3cfb9967.js +1 -0
  123. package/assets/esri/core/workers/chunks/b648a1e641cf5c772d67.js +1 -0
  124. package/assets/esri/core/workers/chunks/{1c58064ea80e6a4a4a3b.js → b907d16e82ac908bb896.js} +1 -1
  125. package/assets/esri/core/workers/chunks/b91c13f44f4d1bac5799.js +1 -0
  126. package/assets/esri/core/workers/chunks/ba7e97b1e324118b8156.js +1 -0
  127. package/assets/esri/core/workers/chunks/bb4aefaf9b0327dda738.js +1 -0
  128. package/assets/esri/core/workers/chunks/{9664d9e679abc41f6c42.js → bce81df760f5e34c01d7.js} +1 -1
  129. package/assets/esri/core/workers/chunks/be6a05d5375e80968877.js +1 -0
  130. package/assets/esri/core/workers/chunks/c02b09f16241db233103.js +1 -0
  131. package/assets/esri/core/workers/chunks/c09cba77ee60a3d765e2.js +1 -0
  132. package/assets/esri/core/workers/chunks/c0d6336c10b4081c4e32.js +1 -0
  133. package/assets/esri/core/workers/chunks/c27842a34e73ccb46116.js +1 -0
  134. package/assets/esri/core/workers/chunks/c7802c144959d60e774a.js +1 -0
  135. package/assets/esri/core/workers/chunks/c91201b37d1cb3875fb4.js +1 -0
  136. package/assets/esri/core/workers/chunks/cc4ae105e727d9211d82.js +1 -0
  137. package/assets/esri/core/workers/chunks/cd39a53ef74f47604977.js +1 -0
  138. package/assets/esri/core/workers/chunks/d22e0d733bfe821c0510.js +1 -0
  139. package/assets/esri/core/workers/chunks/{d7878fba02814adaf19f.js → d57577c02fb2932e8305.js} +1 -1
  140. package/assets/esri/core/workers/chunks/d62193323c67b379dee3.js +1 -0
  141. package/assets/esri/core/workers/chunks/d7a62504e00989202c45.js +1 -0
  142. package/assets/esri/core/workers/chunks/{adfe28c1c1619cdd3ca1.js → d8511e71c5108a0ba9eb.js} +2 -2
  143. package/assets/esri/core/workers/chunks/da922e861d5845ae0979.js +1 -0
  144. package/assets/esri/core/workers/chunks/dbe55d4731227d6e9571.js +1 -0
  145. package/assets/esri/core/workers/chunks/de05c59da6d67716795d.js +1 -0
  146. package/assets/esri/core/workers/chunks/de60421029fbcebe2950.js +1 -0
  147. package/assets/esri/core/workers/chunks/e00d56ae5e68267fe269.js +1 -0
  148. package/assets/esri/core/workers/chunks/{fecae7495e53bb05f282.js → e25be3b6b67ce6b03011.js} +1 -1
  149. package/assets/esri/core/workers/chunks/e2973e5626e5039209f9.js +1 -0
  150. package/assets/esri/core/workers/chunks/e2c7c269be93c552dc5b.js +1 -0
  151. package/assets/esri/core/workers/chunks/e4d593ddcbcf06010ab0.js +1 -0
  152. package/assets/esri/core/workers/chunks/e5ac9b048b16fef9840c.js +1 -0
  153. package/assets/esri/core/workers/chunks/{f7163048146ddaedfc36.js → e668ddc7332e5e560e78.js} +1 -1
  154. package/assets/esri/core/workers/chunks/e6bab7b739bfbb39f6cd.js +1 -0
  155. package/assets/esri/core/workers/chunks/{8b578ffc3a83089aa782.js → e7c08a03772f7fccd949.js} +1 -1
  156. package/assets/esri/core/workers/chunks/e8e4d48ab4024e17108d.js +1 -0
  157. package/assets/esri/core/workers/chunks/e9e0f1c355f963cbea74.js +1 -0
  158. package/assets/esri/core/workers/chunks/ec7e6427d99cf3148a61.js +1 -0
  159. package/assets/esri/core/workers/chunks/edd3cf415955309b4ca4.js +1 -0
  160. package/assets/esri/core/workers/chunks/ee361690b456c12c30d8.js +1 -0
  161. package/assets/esri/core/workers/chunks/efa95c50d1ed8e74219f.js +1 -0
  162. package/assets/esri/core/workers/chunks/f142c5cbdd16f1768275.js +1 -0
  163. package/assets/esri/core/workers/chunks/f286f13686f003c5eec5.js +1 -0
  164. package/assets/esri/core/workers/chunks/f379fd459a103f42d447.js +1 -0
  165. package/assets/esri/core/workers/chunks/{f2ba50eb29f93df885d6.js → f3d8d5fe15501220792d.js} +1 -1
  166. package/assets/esri/core/workers/chunks/f56906c443ce8ff68a27.js +1 -0
  167. package/assets/esri/core/workers/chunks/fb6670a929b7333f1764.js +1 -0
  168. package/assets/esri/core/workers/chunks/fbdf553253cf8f22c022.js +1 -0
  169. package/assets/esri/core/workers/chunks/fc10c738bae304721ab2.js +1 -0
  170. package/assets/esri/core/workers/chunks/ff79c2cb28db7e0a1fc4.js +1 -0
  171. package/assets/esri/core/workers/chunks/ffdf1cbc1e54414d0f96.js +1 -0
  172. package/assets/esri/themes/base/widgets/_Attribution.scss +7 -4
  173. package/assets/esri/themes/dark/main.css +1 -1
  174. package/assets/esri/themes/light/main.css +1 -1
  175. package/assets/esri/themes/light/view.css +1 -1
  176. package/chunks/Bufferer-Dw9Qi4T1.js +1 -1
  177. package/chunks/Distance2DCalculator-CXhBP-8I.js +1 -1
  178. package/chunks/Envelope.js +1 -1
  179. package/chunks/GeodeticDistanceCalculator-Ce-woMPw.js +1 -1
  180. package/chunks/GeodeticUtils.js +1 -1
  181. package/chunks/Geometry.js +1 -1
  182. package/chunks/MultiPathImpl.js +1 -1
  183. package/chunks/OperatorCrosses.js +1 -1
  184. package/chunks/OperatorCut.js +1 -1
  185. package/chunks/OperatorGeodesicBuffer.js +1 -1
  186. package/chunks/OperatorGeodeticArea.js +1 -1
  187. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  188. package/chunks/OperatorGeodeticLength.js +1 -1
  189. package/chunks/OperatorIntersects.js +1 -1
  190. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  191. package/chunks/OperatorOverlaps.js +1 -1
  192. package/chunks/OperatorProject.js +1 -1
  193. package/chunks/OperatorProximity.js +1 -1
  194. package/chunks/OperatorProximityGeodesic.js +1 -1
  195. package/chunks/OperatorShapePreservingLength.js +1 -1
  196. package/chunks/OperatorShapePreservingProject.js +1 -1
  197. package/chunks/OperatorSimplifyOGC.js +1 -1
  198. package/chunks/OperatorTouches.js +1 -1
  199. package/chunks/OperatorWithin.js +1 -1
  200. package/chunks/Point2D.js +1 -1
  201. package/chunks/ProjectionTransformation.js +1 -1
  202. package/chunks/SideCalculator2D-BNwb5gvz.js +1 -1
  203. package/chunks/SpatialReference.js +1 -1
  204. package/chunks/boundedPlane.js +1 -1
  205. package/chunks/containsOperator.js +1 -1
  206. package/chunks/disjointOperator.js +1 -1
  207. package/chunks/equalsOperator.js +1 -1
  208. package/chunks/pe.js +1 -1
  209. package/chunks/relateOperator.js +1 -1
  210. package/config.js +1 -1
  211. package/core/units.js +1 -1
  212. package/core/workers/workerFactory.js +1 -1
  213. package/editing/sharedTemplates/executor/builders/support/builderUtils.js +1 -1
  214. package/editing/sharedTemplates/executor/builders/support/offsetUtils.js +1 -1
  215. package/editing/sharedTemplates/executor/createTemplateExecutor.js +1 -1
  216. package/geometry/FlatGeometry.js +1 -1
  217. package/geometry/GeometryCursor.js +1 -1
  218. package/geometry/operators/containsOperator.js +1 -1
  219. package/geometry/operators/disjointOperator.js +1 -1
  220. package/geometry/operators/gx/geodeticUtils.js +1 -1
  221. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  222. package/geometry/operators/gx/operatorBuffer.js +1 -1
  223. package/geometry/operators/gx/operatorDifference.js +1 -1
  224. package/geometry/operators/gx/operatorGeodesicBuffer.js +1 -1
  225. package/geometry/operators/gx/operatorGeodeticArea.js +1 -1
  226. package/geometry/operators/gx/operatorGeodeticDensify.js +1 -1
  227. package/geometry/operators/gx/operatorGeodeticDistance.js +1 -1
  228. package/geometry/operators/gx/operatorGeodeticLength.js +1 -1
  229. package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
  230. package/geometry/operators/gx/operatorIntegrate.js +1 -1
  231. package/geometry/operators/gx/operatorIntersection.js +1 -1
  232. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  233. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  234. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  235. package/geometry/operators/gx/operatorProject.js +1 -1
  236. package/geometry/operators/gx/operatorProximityGeodesic.js +1 -1
  237. package/geometry/operators/gx/operatorShapePreservingProject.js +1 -1
  238. package/geometry/operators/gx/operatorSimplify.js +1 -1
  239. package/geometry/operators/gx/operatorSinglePartToMultiPart.js +1 -1
  240. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  241. package/geometry/operators/gx/operatorUnion.js +1 -1
  242. package/geometry/operators/json/containsOperator.js +1 -1
  243. package/geometry/operators/json/disjointOperator.js +1 -1
  244. package/geometry/operators/json/projectOperator.js +1 -1
  245. package/geometry/operators/projectOperator.js +1 -1
  246. package/geometry/operators/reshapeOperator.js +1 -1
  247. package/geometry/operators/support/geographicTransformationUtils.js +1 -1
  248. package/geometry/operators/support/initNoPeFactory.js +1 -1
  249. package/geometry/operators/support/jsonConverter.js +1 -1
  250. package/geometry/operators/support/projectionTransformation.js +1 -1
  251. package/geometry/operators/support/projectionZScaling.js +5 -0
  252. package/geometry/projection/projectPointToVector.js +1 -1
  253. package/geometry/projectionUtils.js +1 -1
  254. package/geometry/support/boundedPlane.js +1 -1
  255. package/geometry/support/jsonTypeUtils.js +5 -0
  256. package/geometry/support/jsonUtils.js +1 -1
  257. package/geometry/support/normalizeUtilsCommon.js +1 -1
  258. package/geometry/support/normalizeUtilsSync.js +1 -1
  259. package/geometry/support/quantizationUtils.js +1 -1
  260. package/geometry/support/zscale.js +1 -1
  261. package/interfaces.d.ts +84 -17
  262. package/kernel.js +1 -1
  263. package/layers/SceneLayer.js +1 -1
  264. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  265. package/layers/graphics/data/QueryEngine.js +1 -1
  266. package/layers/graphics/data/queryUtils.js +1 -1
  267. package/layers/graphics/data/spatialQuerySupport.js +1 -1
  268. package/layers/graphics/featureConversionUtils.js +1 -1
  269. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  270. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  271. package/layers/graphics/sources/support/uploadAssets.js +1 -1
  272. package/layers/mixins/ArcGISMapService.js +1 -1
  273. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  274. package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
  275. package/layers/orientedImagery/transformations/utils.js +1 -1
  276. package/layers/support/ControlPointsGeoreference.js +1 -1
  277. package/layers/support/Sublayer.js +1 -1
  278. package/package.json +4 -4
  279. package/renderers/support/DictionaryLoader.js +1 -1
  280. package/renderers/support/pointCloud/PointSizeFixedSizeAlgorithm.js +1 -1
  281. package/renderers/support/pointCloud/PointSizeSplatAlgorithm.js +1 -1
  282. package/rest/geometryService/cut.js +1 -1
  283. package/rest/geometryService/difference.js +1 -1
  284. package/rest/geometryService/intersect.js +1 -1
  285. package/rest/geometryService/project.js +1 -1
  286. package/rest/geometryService/reshape.js +1 -1
  287. package/rest/geometryService/simplify.js +1 -1
  288. package/rest/geometryService/utils.js +1 -1
  289. package/rest/knowledgeGraph/DataModel.js +1 -1
  290. package/rest/operations/generalize.js +1 -1
  291. package/rest/operations/identify.js +1 -1
  292. package/rest/operations/offset.js +1 -1
  293. package/rest/operations/relation.js +1 -1
  294. package/rest/query/operations/queryAttributeBins.js +1 -1
  295. package/rest/query/operations/queryTopFeatures.js +1 -1
  296. package/rest/query/operations/queryUtils.js +1 -1
  297. package/rest/support/BaseImageMeasureResultValue.js +1 -1
  298. package/rest/support/BufferParameters.js +1 -1
  299. package/rest/support/DensifyParameters.js +1 -1
  300. package/rest/support/DistanceParameters.js +1 -1
  301. package/rest/support/FeatureSet.js +1 -1
  302. package/rest/support/IdentifyParameters.js +1 -1
  303. package/rest/support/ImageAreaParameters.js +1 -1
  304. package/rest/support/ImageDistanceParameters.js +1 -1
  305. package/rest/support/ImageGPSInfoParameters.js +1 -1
  306. package/rest/support/ImageHeightParameters.js +1 -1
  307. package/rest/support/ImageHistogramParameters.js +1 -1
  308. package/rest/support/ImageIdentifyParameters.js +1 -1
  309. package/rest/support/ImageMeasureResultAngleValue.js +1 -1
  310. package/rest/support/ImageMeasureResultAreaValue.js +1 -1
  311. package/rest/support/ImageMeasureResultLengthValue.js +1 -1
  312. package/rest/support/ImagePointParameters.js +1 -1
  313. package/rest/support/ImageSampleParameters.js +1 -1
  314. package/rest/support/ImageToMapMultirayParameters.js +1 -1
  315. package/rest/support/ImageToMapParameters.js +1 -1
  316. package/rest/support/ImageVolumeParameters.js +1 -1
  317. package/rest/support/MapToImageParameters.js +1 -1
  318. package/rest/support/MeasureFromImageParameters.js +1 -1
  319. package/rest/support/ProjectParameters.js +1 -1
  320. package/support/modeUtils.js +1 -1
  321. package/support/revision.js +1 -1
  322. package/support/tests/serviceMockDependencies.js +1 -1
  323. package/symbols/MarkerSymbol.js +1 -1
  324. package/symbols/PictureMarkerSymbol.js +1 -1
  325. package/symbols/SimpleFillSymbol.js +1 -1
  326. package/symbols/SimpleMarkerSymbol.js +1 -1
  327. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  328. package/symbols/cim/CIMSymbolRasterizer.js +1 -1
  329. package/symbols/cim/SDFHelper.js +1 -1
  330. package/symbols/cim/effects/EffectOffset.js +1 -1
  331. package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
  332. package/symbols/support/ObjectSymbol3DLayerResource.js +1 -1
  333. package/views/2d/analysis/ElevationProfile/ElevationProfileVisualization2D.js +1 -1
  334. package/views/2d/engine/webgl/shaderGraph/techniques/createTestMeshData.js +1 -1
  335. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  336. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  337. package/views/2d/interactive/editingTools/manipulations/ScaleManipulation.js +1 -1
  338. package/views/2d/layers/MediaLayerView2D.js +1 -1
  339. package/views/2d/layers/TileLayerView2D.js +1 -1
  340. package/views/2d/layers/features/support/GraphicsReader.js +1 -1
  341. package/views/2d/layers/graphics/GraphicStoreItem.js +1 -1
  342. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  343. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
  344. package/views/3d/analysis/ShadowCast/analysisViewRegister.js +5 -0
  345. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  346. package/views/3d/analysis/Slice/SliceController.js +1 -1
  347. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  348. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  349. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  350. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  351. package/views/3d/analysis/support/projectionUtils.js +1 -1
  352. package/views/3d/interactive/editingTools/media/MediaElementControllerShape.js +1 -1
  353. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +1 -1
  354. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
  355. package/views/3d/interactive/editingTools/transform/extentTransform/extentUtils.js +1 -1
  356. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  357. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  358. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  359. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  360. package/views/3d/layers/RouteLayerView3D.js +1 -1
  361. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  362. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  363. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  364. package/views/3d/layers/support/featureReference.js +1 -1
  365. package/views/3d/state/ScreenSizePerspective.js +1 -1
  366. package/views/3d/support/ViewSlice.js +1 -1
  367. package/views/3d/support/cameraUtils.js +1 -1
  368. package/views/3d/support/viewpointUtils.js +1 -1
  369. package/views/3d/webgl-engine/effects/glow/GlowPresets.glsl.js +1 -1
  370. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  371. package/views/3d/webgl-engine/lib/SliceHelper.js +1 -1
  372. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  373. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  374. package/views/Attribution.js +1 -1
  375. package/views/DOMContainer.js +1 -1
  376. package/views/PopupView.js +1 -1
  377. package/views/SceneView.js +1 -1
  378. package/views/VideoView.js +1 -1
  379. package/views/View.js +1 -1
  380. package/views/View2D.js +1 -1
  381. package/views/analysis/ElevationProfile/ElevationProfileLineGroundComputation.js +1 -1
  382. package/views/draw/DrawAction.js +1 -1
  383. package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
  384. package/views/interactive/snapping/featureSources/featureServiceSource/tileUtils.js +1 -1
  385. package/views/layers/CatalogFootprintLayerView.js +1 -1
  386. package/views/layers/LayerView.js +1 -1
  387. package/views/support/attributionUtils.js +1 -1
  388. package/views/support/projectionUtils.js +1 -1
  389. package/widgets/Feature/FeatureUtilityNetworkAssociationList.js +1 -1
  390. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
  391. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  392. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  393. package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
  394. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  395. package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
  396. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  397. package/widgets/OrientedImageryViewer/galleryUtils.js +1 -1
  398. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  399. package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
  400. package/widgets/OrientedImageryViewer/support/NonPanoramicMedia.js +5 -0
  401. package/widgets/OrientedImageryViewer/support/NonPanoramicMediaCollection.js +5 -0
  402. package/widgets/OrientedImageryViewer/support/urlUtils.js +5 -0
  403. package/widgets/OrientedImageryViewer/utils.js +1 -1
  404. package/widgets/OrientedImageryViewer.js +1 -1
  405. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  406. package/widgets/PanoramicViewer/support/PanoramicMedia.js +1 -1
  407. package/widgets/PanoramicViewer/utils.js +1 -1
  408. package/widgets/PanoramicViewer.js +1 -1
  409. package/widgets/Slice.js +1 -1
  410. package/widgets/Swipe/SwipeViewModel.js +1 -1
  411. package/widgets/TimeSlider.js +1 -1
  412. package/widgets/Track.js +1 -1
  413. package/widgets/UtilityNetworkAssociations.js +1 -1
  414. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  415. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
  416. package/widgets/Weather.js +1 -1
  417. package/widgets/support/GridControls.js +1 -1
  418. package/widgets/support/SnappingControls.js +1 -1
  419. package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationList.js +1 -1
  420. package/assets/esri/core/workers/chunks/00ff4ca88c9d291d82c3.js +0 -1
  421. package/assets/esri/core/workers/chunks/0271a2ca4e9b1e4fd284.js +0 -1
  422. package/assets/esri/core/workers/chunks/02a65563779b4c64b2cf.js +0 -1
  423. package/assets/esri/core/workers/chunks/02d1c48e874dfd985bc4.js +0 -1
  424. package/assets/esri/core/workers/chunks/05b7720ab6bf0874f27c.js +0 -1
  425. package/assets/esri/core/workers/chunks/061def9163a09c804b5c.js +0 -1
  426. package/assets/esri/core/workers/chunks/06221ebadab32111e2c6.js +0 -1
  427. package/assets/esri/core/workers/chunks/063045ac5553e91c0c4c.js +0 -1
  428. package/assets/esri/core/workers/chunks/06d52a570d5d44f8c86e.js +0 -1
  429. package/assets/esri/core/workers/chunks/0a58b57e1777a8b0ea23.js +0 -1
  430. package/assets/esri/core/workers/chunks/0e4d0213d568f50c231f.js +0 -1
  431. package/assets/esri/core/workers/chunks/103153951ba312dc5e9e.js +0 -1
  432. package/assets/esri/core/workers/chunks/169be08394c5e7703628.js +0 -1
  433. package/assets/esri/core/workers/chunks/1a6f3531ef3d671e0289.js +0 -1
  434. package/assets/esri/core/workers/chunks/1c816aff8613d1e4bf38.js +0 -1
  435. package/assets/esri/core/workers/chunks/1e2d42e9984ed3437ba2.js +0 -1
  436. package/assets/esri/core/workers/chunks/2008b22f76071a2dde4e.js +0 -1
  437. package/assets/esri/core/workers/chunks/20e4243ea563d05a5256.js +0 -1
  438. package/assets/esri/core/workers/chunks/2107c93d1fe87f3b8dfa.js +0 -1
  439. package/assets/esri/core/workers/chunks/21f37a4b8d1857369203.js +0 -1
  440. package/assets/esri/core/workers/chunks/229e1ed4282005aa0b83.js +0 -1
  441. package/assets/esri/core/workers/chunks/22b8eaa6afab0e5ffc47.js +0 -1
  442. package/assets/esri/core/workers/chunks/231c0b583fa97f2ca675.js +0 -1
  443. package/assets/esri/core/workers/chunks/233f9eb617f3d72995b5.js +0 -1
  444. package/assets/esri/core/workers/chunks/2463cebf904a3c46c639.js +0 -1
  445. package/assets/esri/core/workers/chunks/249504f7d356be80d214.js +0 -1
  446. package/assets/esri/core/workers/chunks/2550d2ba935cfdf30236.js +0 -1
  447. package/assets/esri/core/workers/chunks/273ac1066095d63d6a6f.js +0 -1
  448. package/assets/esri/core/workers/chunks/28db329528def851efd7.js +0 -1
  449. package/assets/esri/core/workers/chunks/2de32649f8b0c6404d7c.js +0 -1
  450. package/assets/esri/core/workers/chunks/2e2867bc66c94aba7dc7.js +0 -1
  451. package/assets/esri/core/workers/chunks/30c4af16e3a2acc25589.js +0 -1
  452. package/assets/esri/core/workers/chunks/32d32d3c3b38a215d20d.js +0 -1
  453. package/assets/esri/core/workers/chunks/3386d4392f465b807b94.js +0 -1
  454. package/assets/esri/core/workers/chunks/34613b288cf174983f8b.js +0 -1
  455. package/assets/esri/core/workers/chunks/35f086a2ae0585348ae6.js +0 -1
  456. package/assets/esri/core/workers/chunks/37ea150dec5e491f691e.js +0 -1
  457. package/assets/esri/core/workers/chunks/3ac8de121a07c70bae0f.js +0 -1
  458. package/assets/esri/core/workers/chunks/3c94db7ecdcd38eeb1b1.js +0 -1
  459. package/assets/esri/core/workers/chunks/3f7749f06ae54a4437d9.js +0 -1
  460. package/assets/esri/core/workers/chunks/40a722933af28823953b.js +0 -1
  461. package/assets/esri/core/workers/chunks/444026d1938c1078ca97.js +0 -1
  462. package/assets/esri/core/workers/chunks/44f759d723ae05bb1b19.js +0 -1
  463. package/assets/esri/core/workers/chunks/456684b1c1417ed0e611.js +0 -1
  464. package/assets/esri/core/workers/chunks/48e2737182c75005fb8f.js +0 -1
  465. package/assets/esri/core/workers/chunks/48f805929fe6241952f5.js +0 -1
  466. package/assets/esri/core/workers/chunks/4a48b8ec5f3f2fd139b5.js +0 -1
  467. package/assets/esri/core/workers/chunks/4b084f985bc4100e7aec.js +0 -1
  468. package/assets/esri/core/workers/chunks/4b1de1fcd13677b615a8.js +0 -1
  469. package/assets/esri/core/workers/chunks/4d933de84afb2e3b7d18.js +0 -1
  470. package/assets/esri/core/workers/chunks/4f0de45a0a295d66d446.js +0 -1
  471. package/assets/esri/core/workers/chunks/4ff771942531fb2755c4.js +0 -1
  472. package/assets/esri/core/workers/chunks/513a4ef960e27500f986.js +0 -1
  473. package/assets/esri/core/workers/chunks/56b693baa376bb990925.js +0 -1
  474. package/assets/esri/core/workers/chunks/57fd5e1260269002d18a.js +0 -1
  475. package/assets/esri/core/workers/chunks/5b73c77587772120b209.js +0 -1
  476. package/assets/esri/core/workers/chunks/5fe40bb0e9ab333f6854.js +0 -1
  477. package/assets/esri/core/workers/chunks/61373d2fa7e7638d3395.js +0 -1
  478. package/assets/esri/core/workers/chunks/6202922b1c2637e9aaa5.js +0 -1
  479. package/assets/esri/core/workers/chunks/633368ae6fbb46373328.js +0 -1
  480. package/assets/esri/core/workers/chunks/6d0fe4db6b94f3d2c53a.js +0 -1
  481. package/assets/esri/core/workers/chunks/6d702cb26cef46a76963.js +0 -1
  482. package/assets/esri/core/workers/chunks/6e8925412fb90f88d688.js +0 -1
  483. package/assets/esri/core/workers/chunks/6e8c20ff1d28ef2fe72c.js +0 -1
  484. package/assets/esri/core/workers/chunks/708aba69a1870ea41a61.js +0 -1
  485. package/assets/esri/core/workers/chunks/74b1028e95f7cfff387b.js +0 -1
  486. package/assets/esri/core/workers/chunks/755ce019c97f5d527772.js +0 -1
  487. package/assets/esri/core/workers/chunks/780f60210878a8286633.js +0 -1
  488. package/assets/esri/core/workers/chunks/78fccea3445fb2f9120a.js +0 -1
  489. package/assets/esri/core/workers/chunks/7d3c2a063598bdd015e2.js +0 -1
  490. package/assets/esri/core/workers/chunks/7eab0bb42f9f062522ef.js +0 -1
  491. package/assets/esri/core/workers/chunks/804958f3f4ff47a4eff5.js +0 -1
  492. package/assets/esri/core/workers/chunks/82ba4140e30f083fbc87.js +0 -1
  493. package/assets/esri/core/workers/chunks/833fd2bc42c5cb459084.js +0 -1
  494. package/assets/esri/core/workers/chunks/83c8e5a92d8d6193cb32.js +0 -1
  495. package/assets/esri/core/workers/chunks/83da9ee6544ee9d3c124.js +0 -1
  496. package/assets/esri/core/workers/chunks/870022661376442411e4.js +0 -1
  497. package/assets/esri/core/workers/chunks/897ce6fc9cefb1e14a64.js +0 -1
  498. package/assets/esri/core/workers/chunks/898ab7db220e81e921c6.js +0 -1
  499. package/assets/esri/core/workers/chunks/8b75861196d1ce5cba63.js +0 -1
  500. package/assets/esri/core/workers/chunks/8c07396e9ea3007d6404.js +0 -1
  501. package/assets/esri/core/workers/chunks/8e26831f71634288f834.js +0 -1
  502. package/assets/esri/core/workers/chunks/8ec238b5b59ef18a1713.js +0 -1
  503. package/assets/esri/core/workers/chunks/90b8ccee883738917a6d.js +0 -1
  504. package/assets/esri/core/workers/chunks/90bc9c299ae0e8b8b5e5.js +0 -1
  505. package/assets/esri/core/workers/chunks/9100330ed4b4437c819d.js +0 -1
  506. package/assets/esri/core/workers/chunks/933dce4d4ff8b90219c8.js +0 -1
  507. package/assets/esri/core/workers/chunks/934bc1028b287f8df4aa.js +0 -1
  508. package/assets/esri/core/workers/chunks/94dc8b0fa129f1e168c4.js +0 -1
  509. package/assets/esri/core/workers/chunks/96055de47831e59a28bf.js +0 -1
  510. package/assets/esri/core/workers/chunks/963ba863e0f87abfca25.js +0 -1
  511. package/assets/esri/core/workers/chunks/987e19af8a525e77883f.js +0 -1
  512. package/assets/esri/core/workers/chunks/992e9bbdf9d3787ddb0e.js +0 -1
  513. package/assets/esri/core/workers/chunks/9aa8d60483ad905fe13b.js +0 -1
  514. package/assets/esri/core/workers/chunks/9c0efd06c9000ccbd62d.js +0 -1
  515. package/assets/esri/core/workers/chunks/9f1d3c0b53bef07e39bf.js +0 -1
  516. package/assets/esri/core/workers/chunks/9fed9946241bb2a5cfa4.js +0 -1
  517. package/assets/esri/core/workers/chunks/a2662e98857f0abf8e82.js +0 -1
  518. package/assets/esri/core/workers/chunks/a59dab47a58695c639da.js +0 -1
  519. package/assets/esri/core/workers/chunks/a5a9b0a35849b9f2e86d.js +0 -1
  520. package/assets/esri/core/workers/chunks/a60006c9ccf6817fc0d2.js +0 -1
  521. package/assets/esri/core/workers/chunks/a627b7eb94b7fca33210.js +0 -1
  522. package/assets/esri/core/workers/chunks/a651dc3b8f1fc1ab34cc.js +0 -1
  523. package/assets/esri/core/workers/chunks/a96742e678a506c461ab.js +0 -1
  524. package/assets/esri/core/workers/chunks/af663e81c851bcf142f1.js +0 -1
  525. package/assets/esri/core/workers/chunks/af8d6e6949930d0e6c7b.js +0 -1
  526. package/assets/esri/core/workers/chunks/b59be95949445ff5afab.js +0 -1
  527. package/assets/esri/core/workers/chunks/b6dec5dfdeca54bae88d.js +0 -1
  528. package/assets/esri/core/workers/chunks/b88dc7d8ae105747e6a4.js +0 -1
  529. package/assets/esri/core/workers/chunks/b90c786dd474ea1a409c.js +0 -1
  530. package/assets/esri/core/workers/chunks/b92e9e5df8154a128982.js +0 -1
  531. package/assets/esri/core/workers/chunks/bbdfa8ffcf084cbd9938.js +0 -1
  532. package/assets/esri/core/workers/chunks/bff814d34b38ec80c44d.js +0 -1
  533. package/assets/esri/core/workers/chunks/c36d699a75b6e8fb93eb.js +0 -1
  534. package/assets/esri/core/workers/chunks/c50fdf723f2d4316862e.js +0 -1
  535. package/assets/esri/core/workers/chunks/c5e8ff4721b15ac3c6eb.js +0 -1
  536. package/assets/esri/core/workers/chunks/ca61077e0a598654f33f.js +0 -1
  537. package/assets/esri/core/workers/chunks/ca81be5bdb88ef557bf3.js +0 -1
  538. package/assets/esri/core/workers/chunks/ced12ad98f8f48d0dc00.js +0 -1
  539. package/assets/esri/core/workers/chunks/d0320ca67abca4f8b0d2.js +0 -1
  540. package/assets/esri/core/workers/chunks/d561624ddb9388732b25.js +0 -1
  541. package/assets/esri/core/workers/chunks/d5fd6d0eaf96edfab123.js +0 -1
  542. package/assets/esri/core/workers/chunks/d705410c369bd03b1875.js +0 -1
  543. package/assets/esri/core/workers/chunks/d82e17522ed946c2d809.js +0 -1
  544. package/assets/esri/core/workers/chunks/dc29cb16704e2e4d0a46.js +0 -1
  545. package/assets/esri/core/workers/chunks/dc5075b2326c79130baa.js +0 -1
  546. package/assets/esri/core/workers/chunks/dd105d6e0fcedee32644.js +0 -1
  547. package/assets/esri/core/workers/chunks/defc6b50df5018bd9e86.js +0 -1
  548. package/assets/esri/core/workers/chunks/e1148067ceae7d9eaaf8.js +0 -1
  549. package/assets/esri/core/workers/chunks/e5a6a646f27715152714.js +0 -1
  550. package/assets/esri/core/workers/chunks/e8c2e2fbe9cef4c8a8c6.js +0 -1
  551. package/assets/esri/core/workers/chunks/efc293c8bbc12156096d.js +0 -1
  552. package/assets/esri/core/workers/chunks/f693a4d97b2762d0e6ff.js +0 -1
  553. package/assets/esri/core/workers/chunks/f7f53567b0c5b35d6aea.js +0 -1
  554. package/assets/esri/core/workers/chunks/f92a78ce5510e0d0d0f7.js +0 -1
  555. package/assets/esri/core/workers/chunks/fb76b43181077c55a207.js +0 -1
  556. package/assets/esri/core/workers/chunks/fc61443546f21869f8ba.js +0 -1
  557. package/assets/esri/core/workers/chunks/fdaa10a588db394e2f65.js +0 -1
  558. package/chunks/UnitFactory.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{P as e,D as t,A as n,n as r,a2 as i,a5 as s,E as a,a0 as o,a1 as u,a6 as m,a7 as l,Y as c}from"../../../chunks/Envelope.js";import{a as d,P as _,M as h,S as f,J as p,a5 as k,a6 as b,a7 as y,a8 as g,a9 as N}from"../../../chunks/MultiPathImpl.js";import{d as T,a as v,g as x,q as A,p as S,G as w,t as C}from"../../../chunks/Geometry.js";import{aJ as D,i as F,d as j,P as z,b as O,aK as I,m as E}from"../../../chunks/Point2D.js";import{q as P,b as B,p as V,aX as R,c as M,e as U,a as W,f as X,aY as Y}from"../../../chunks/UnitFactory.js";import{convertGeometryxToFlat as G,convertGeometryToFlat as L}from"../../FlatGeometry.js";import q from"../../SpatialReference.js";import"./initNoPeFactory.js";import{isPoint as K,isMultipoint as J,isPolyline as Z,isPolygon as Q}from"../../support/jsonUtils.js";function H({type:i,vertexCount:s,vertexXY:a,vertexZ:o,vertexM:u,partCount:m,partOffsets:l,partFlags:c,segmentFlags:d,segmentIndices:_,segmentParams:f,segmentCountArc:p,segmentCountBezier:k}){const b=new $[i];if(b instanceof e)return b.setXYCoords(a[0],a[1]),o&&b.setZ(o[0]),u&&b.setM(u[0]),b;const y=new t({fromArray:a});if(b.setAttributeStreamRef(0,y),o){const e=new t({fromArray:o});b.setAttributeStreamRef(1,e)}if(u){const e=new t({fromArray:u});b.setAttributeStreamRef(2,e)}if(b instanceof h)return b.resizeNoInit(s),b;{const e=m+1,t=new n({fromArray:l,size:e}),i=new r({fromArray:c,size:e});b.setPathStreamRef(t),b.setPathFlagsStreamRef(i)}if(null==d)return b.resizeImpl(s),b;const g=new r({fromArray:d}),N=new n({fromArray:_}),T=new t({fromArray:f});return b.setSegmentData(N,T,g,f.length),b.incCurveType(4,p),b.incCurveType(2,k),b.modifyCurveCounter(p+k),b.resizeImpl(s),b}const $={point:e,multipoint:h,polyline:_,polygon:d};function ee(){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 te(){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 ne{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:ee}}createJSONArrayIterator(e){return{m_iteratorType:"array",m_strict:this.m_options.strict,m_i:-1,m_a:e,next:te}}constructor(e,t){this.m_currentToken=0,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>=D()&&this.m_currentValue<=F()?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")}return T("unrecognized json element type"),0}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&&v("invalid token"),this.m_currentValue}currentDoubleValue(){return 7!==this.m_currentToken&&8!==this.m_currentToken&&v("invalid token"),this.m_currentValue}currentInt32Value(){return 8!==this.m_currentToken&&v("invalid token"),this.m_currentValue}currentInt64Value(){return x(0),0n}currentBoolValue(){return 12!==this.m_currentToken&&11!==this.m_currentToken&&v("invalid token"),this.m_currentValue}isError(){return 0}}class re{constructor(){this.m_pendingKey=null,this.m_acceptedObject=null,this.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){x(0)}addInt32(e){this.addValue_(e)}addBool(e){this.addValue_(e)}addNull(){this.addValue_(null)}getObject(){return this.m_acceptedObject}}class ie{constructor(e){return this.m_buffer=null,this.m_view=null,this.m_sz=0,this.m_offset=0,this.m_bOwnsBuffer=!0,this.m_bLittleEndian=!0,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&&A("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&&A("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===ie.getNativeByteOrder())}setNativeByteOrder(){this.m_bLittleEndian=1===ie.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){x(e>=0&&e<=this.m_sz),this.m_sz=e}}function se(t,n,r,o,u,m){let l=!1,c=!1,d=!1,_=!1,h=!1,f=!1,p=!1,k=!1,b=!1,y=!1,g=!1,N=!1,T=!1,A=!1,S=!1,C=!1,D=!1,F=!1,j=!1,z=!1,O=!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,Y=Number.NaN,G=Number.NaN,L=Number.NaN,q=Number.NaN,K=Number.NaN,J=Number.NaN,Z=0,Q=0,H=!1,$=!1,ee=null,te=null,ne=null,re=null,ie=null;for(;3!==r.nextToken();){const e=r.currentString();if(r.nextToken(),"spatialReference"===e){if(u&&!l){l=!0,1===r.currentToken()?re=oe(r):10!==r.currentToken()&&v("failed to parse spatial reference: object or null is expected");continue}}else if(o)if("hasZ"===e){if(!c){c=!0,H=11===r.currentToken();continue}}else if("hasM"===e){if(!d){d=!0,$=11===r.currentToken();continue}}else if("rings"===e){if(!(h||f||t!==w.enumUnknown&&t!==w.enumPolygon)){h=!0,({geometry:ie,as:ee,bs:te}=ue(!0,!1,n,r));continue}}else if("curveRings"===e){if(!f&&(t===w.enumUnknown||t===w.enumPolygon)){f=!0,({geometry:ie,as:ee,bs:te}=ue(!0,!0,n,r));continue}}else if("paths"===e){if(!(p||k||t!==w.enumUnknown&&t!==w.enumPolyline)){p=!0,({geometry:ie,as:ee,bs:te}=ue(!1,!1,n,r));continue}}else if("curvePaths"===e){if(!k&&(t===w.enumUnknown||t===w.enumPolyline)){k=!0,({geometry:ie,as:ee,bs:te}=ue(!1,!0,n,r));continue}}else if("points"===e){if(!b&&(t===w.enumUnknown||t===w.enumMultiPoint)){b=!0,({geometry:ie,as:ee,bs:te}=me(n,r));continue}}else if("ids"===e){if(!_){_=!0,ne=le(n,r);continue}}else if("x"===e){if(!y&&(t===w.enumUnknown||t===w.enumPoint)){y=!0,B=ce(r);continue}}else if("y"===e){if(!g&&(t===w.enumUnknown||t===w.enumPoint)){g=!0,V=ce(r);continue}}else if("z"===e){if(!N&&(t===w.enumUnknown||t===w.enumPoint)){N=!0,R=ce(r);continue}}else if("m"===e){if(!T&&(t===w.enumUnknown||t===w.enumPoint)){T=!0,M=ce(r);continue}}else if("id"===e){if(!A&&(t===w.enumUnknown||t===w.enumPoint)){A=!0,U=de(r);continue}}else if("xmin"===e){if(!S&&(t===w.enumUnknown||t===w.enumEnvelope)){S=!0,W=ce(r);continue}}else if("ymin"===e){if(!C&&(t===w.enumUnknown||t===w.enumEnvelope)){C=!0,X=ce(r);continue}}else if("mmin"===e){if(!O&&(t===w.enumUnknown||t===w.enumEnvelope)){O=!0,K=ce(r);continue}}else if("zmin"===e){if(!j&&(t===w.enumUnknown||t===w.enumEnvelope)){j=!0,L=ce(r);continue}}else if("idmin"===e){if(!E&&(t===w.enumUnknown||t===w.enumEnvelope)){E=!0,Z=de(r);continue}}else if("xmax"===e){if(!D&&(t===w.enumUnknown||t===w.enumEnvelope)){D=!0,Y=ce(r);continue}}else if("ymax"===e){if(!F&&(t===w.enumUnknown||t===w.enumEnvelope)){F=!0,G=ce(r);continue}}else if("mmax"===e){if(!I&&(t===w.enumUnknown||t===w.enumEnvelope)){I=!0,J=ce(r);continue}}else if("zmax"===e){if(!z&&(t===w.enumUnknown||t===w.enumEnvelope)){z=!0,q=ce(r);continue}}else if("idmax"===e){if(!P&&(t===w.enumUnknown||t===w.enumEnvelope)){P=!0,Q=de(r);continue}}else"materials"===e&&x(0);r.skipChildren()}if(h||f||p||k||b){let e=null,t=null;const n=ie;H&&(ie.addAttribute(1),e=ee,e||(e=i(n.getPointCount(),Number.NaN))),$&&(ie.addAttribute(2),t=H?te:ee),null!=ne&&ie.addAttribute(3),H&&null!=e&&n.setAttributeStreamRef(1,e),$&&null!=t&&n.setAttributeStreamRef(2,t),null!=ne&&_e(n,ne)}else if(y||g||T||N||A){s(B,V)||v("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 t=new e({x:B,y:V});N&&t.setZ(R),T&&t.setM(M),A&&t.setID(U),ie=t}else if(S||C||D||F||j||z||O||I||E||P){(Number.isNaN(X)||Number.isNaN(Y)||Number.isNaN(G))&&(W=Number.NaN);const e=new a({xmin:W,ymin:X,xmax:Y,ymax:G});j&&z&&e.setInterval(1,0,L,q),O&&I&&e.setInterval(2,0,K,J),E&&P&&e.setInterval(3,0,Z,Q),ie=e}return{...ie?{geom:ie}:{},...re?{sr:re}:{}}}function ae(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 oe(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,f=!1,p=!1,k=!1,b=-1,y=-1,g=-1,N=-1,T=0,v=0,x=0,A=0,S=0,w=0,C=0,D=0,F=0,j=0,z="",O="",I=null;for(;3!==e.nextToken();){const E=e.currentString();e.nextToken(),"wkid"===E?t||(t=!0,8===e.currentToken()&&(b=e.currentInt32Value())):"latestWkid"===E?n||(n=!0,8===e.currentToken()&&(y=e.currentInt32Value())):"wkt"===E?s||(s=!0,6===e.currentToken()&&(z=e.currentString())):"wkt2"===E?s||6===e.currentToken()&&(O=e.currentString()):"vcsWkid"===E?r||(r=!0,8===e.currentToken()&&(g=e.currentInt32Value())):"latestVcsWkid"===E?i||(i=!0,8===e.currentToken()&&(N=e.currentInt32Value())):"xyTolerance"===E?o||(o=!0,a=!0,T=e.currentDoubleValue()):"zTolerance"===E?u||(u=!0,a=!0,v=e.currentDoubleValue()):"mTolerance"===E?m||(m=!0,a=!0,x=e.currentDoubleValue()):"falseX"===E?l||(l=!0,a=!0,C=e.currentDoubleValue()):"falseY"===E?c||(c=!0,a=!0,D=e.currentDoubleValue()):"falseZ"===E?d||(d=!0,a=!0,F=e.currentDoubleValue()):"falseM"===E?_||(_=!0,a=!0,j=e.currentDoubleValue()):"xyUnits"===E?h||(h=!0,a=!0,A=e.currentDoubleValue()):"zUnits"===E?f||(f=!0,a=!0,S=e.currentDoubleValue()):"mUnits"===E?p||(p=!0,a=!0,w=e.currentDoubleValue()):"unit"===E?k||(k=!0,I=ae(e)):e.skipChildren()}N<=0&&g>0&&(N=g),g<=0&&N>0&&(g=N);let E=null,Y=!0;if(0!==z.length&&(Y=!1,P(z)&&(E=B(z))),E||0===O.length||(Y=!1,P(O)&&(E=B(O))),!E&&y>0&&(Y=!1,V(y)&&(N<=0||R())&&(E=M(y,N))),!E&&b>0&&(Y=!1,V(b)&&(g<=0||R())&&(E=M(b,g))),Y&&(E=U(I)),a&&E){const e=new W;E.queryPrecisionDescriptorWithoutFalseXY(e),o&&e.setTolerance(0,T),u&&e.setTolerance(1,v),m&&e.setTolerance(2,x),h&&l&&c&&e.setGridParams(C,D,A),f&&d&&e.setZParams(F,S),p&&_&&e.setMParams(j,w),E=X(E,e)}return E}function ue(e,t,n,r){2!==r.currentToken()&&v("failed to parse multipath: array of array of vertices is expected");const s=e?new d:new _,a=s,l=o(0),c=i(2,0),h=u(0);let p=null,k=null,b=null,y=null,g=null,T=0,x=0,A=0;const S=new f,w=z.getNAN();let C=0,D=0;const F=e?1:0;for(;4!==r.nextToken();){2!==r.currentToken()&&v("failed to parse multipath: ring/path array is expected");let n=2,s=0,d=!0;const _=4;let f=0,E=0;const P=z.getNAN(),B=j(_,Number.NaN),V=j(_,Number.NaN);let R=!1;for(r.nextToken();4!==r.currentToken();){if(t&&1===r.currentToken())d&&v("failed to parse multipath: starting vertex array is expected"),b||(b=u(C-1,1),y=o(C-1,-1),g=i(0)),R=!0,n=1,({segFlag:A,toPointSz:f}=ge(S,B,w,r));else{for(R=!1,2!==r.currentToken()&&v("failed to parse multipath: array is expected, rings/paths vertices consist of arrays of coordinates"),f=0;4!==r.nextToken();)f===_&&v("failed to parse multipath: each vertex array has to have at most 4 elements"),B[f++]=ce(r);f<2&&v("failed to parse multipath: each vertex array has to have at least 2 elements"),m(B[0],B[1])||v("failed to parse multipath: x and y must be finite")}r.nextToken();do{if(c.size()===2*C&&c.resize(he(C)),c.writePoint2D(2*C,P.setCoords(B[0],B[1])),p&&p.size()===C&&p.resize(fe(C)),f>2?(p||(p=i(C+1,Number.NaN)),p.write(C,B[2])):p&&p.write(C,Number.NaN),k&&k.size()===C&&k.resize(fe(C)),f>3?(k||(k=i(C+1,Number.NaN)),k.write(C,B[3])):k&&k.write(C,Number.NaN),d)D++,l.add(C),h.add(F),d=!1,E=f,O(V,B,0,0,E);else if(null!==b)if(R){const e=N(A),t=g.size();g.resize(t+e),b.add(A),y.add(T),S.get().writeInBufferStream(g,T),T+=e,a.incCurveType(A,1),x++}else b.add(1),y.add(-1);C++,s++,w.setCoords(B[0],B[1])}while(s<n&&4===r.currentToken())}0!==s&&(e&&s>n&&f===E&&0===I(B,V,f)?(C--,s--):null!==b&&(b.add(1),y.add(-1)))}return C&&(l.resize(D),h.resize(D),C>0&&(l.add(C),h.add(0)),a.setAttributeStreamRef(0,c),a.setPathFlagsStreamRef(h),a.setPathStreamRef(l),null!==b&&(a.updateCurveCounter(x),a.setSegmentData(y,g,b,T)),a.notifyModifiedFlags(65535)),{geometry:s,as:p,bs:k}}function me(e,t){2!==t.currentToken()&&v("failed to parse multipoint: array of vertices is expected");let n=0;const r=new h,s=i(2,0);let a=0;const o=4,u=j(o,Number.NaN),l=new z;let c=null,d=null;for(;4!==t.nextToken();){for(2!==t.currentToken()&&v("failed to parse multipoint: array is expected, multipoint vertices consist of arrays of cooridinates"),a=0;4!==t.nextToken();)a===o&&v("failed to parse multipoint: each vertex array has to have at most 4 elements"),u[a++]=ce(t);a<2&&v("failed to parse multipoint: each vertex array has to have at least 2 elements"),m(u[0],u[1])||v("failed to parse multipoint: x and y must be finite"),s.size()===2*n&&s.resize(he(n)),s.writePoint2D(2*n,l.setCoords(u[0],u[1])),c&&c.size()===n&&c.resize(fe(n)),a>2?(c||(c=i(n+1,Number.NaN)),c.write(n,u[2])):c&&c.write(n,Number.NaN),d&&d.size()===n&&d.resize(fe(n)),a>3?(d||(d=i(n+1,Number.NaN)),d.write(n,u[3])):d&&d.write(n,Number.NaN),n++}if(n){const e=r.getImpl();e.setAttributeStreamRef(0,s),e.resizeNoInit(n),e.notifyModifiedFlags(65535)}return{geometry:r,as:c,bs:d}}function le(e,t){2!==t.currentToken()&&v("failed to parse array of IDs: array of array of integers is expected");const n=l(2,0);let r=0,i=-1;for(;4!==t.nextToken();){const e=r;n.size()===r&&n.resize(fe(r)),r++;let s=0;for(-1===i?i=2===t.currentToken()?1:0:1===i&&2!==t.currentToken()&&v("failed to parse array of IDs: array of array of integers is expected"),0===i&&(n.size()===r&&n.resize(fe(r)),n.write(r,de(t)),s++,r++);4!==t.nextToken();)n.size()===r&&n.resize(fe(r)),n.write(r,de(t)),s++,r++;if(n.write(e,s),0===i)break}return n.resize(r),n}function ce(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 de(e){return e.currentInt32Value()}function _e(e,t){if(e.isEmpty())return;const n=l(2,0),r=e.getGeometryType();let i=0;r===h.type?i=1:r===_.type||r===d.type?i=e.getPathCount():T("not implemented"),n.resize(e.getPointCount(),0);let s=0;for(let a=0;a<i;++a){const i=t.read(s);s++;const o=s+i;let u=0,m=0;r===h.type?u=e.getPointCount():r===_.type||r===d.type?(u=e.getPathSize(a),m=e.getPathStart(a)):T("not implemented");for(let e=0,r=Math.min(i,u);e<r;++e)n.write(m,t.read(s)),s++,m++;s=o}e.getImpl().setAttributeStreamRef(3,n)}function he(e){let t=2*Math.trunc(3*(e+1)/2);return t<8?t=8:t<32&&(t=32),t}function fe(e){let t=Math.trunc(3*(e+1)/2);return t<4?t=4:t<16&&(t=16),t}function pe(e,t,n,r,i){i>=r.size()&&A("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 s=z.getNAN();s.x=r.readDouble(i),s.y=r.readDouble(i+8);const a=r.readInt32(i+16);if(!!(1&a))return e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.assign(s),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,b(e),!1;let o=!!(64&a);const u=!!(128&a);let m=!!(32&a);const l=!!(8&a),c=!!(16&a),d=t.equals(n);return o&&!d&&(o=!1,m=!0),m&&d&&(o=!0,m=!1,s.setCoords(0,0)),o||(u?m?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_interior.assign(s),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0):(e.constructCircularArcThreePoint(t,n,s),d&&l===e.isClockwise()&&e.reverse()):m?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,b(e),e.queryCoord2D(.5,e.m_interior)):y(e,t,n,s,l,c)),o&&(e.m_center.assign(t),e.m_startAngle=s.x,e.m_sweepAngle=s.y,g(e,Number.NaN,l,c),e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.setCoordsPoint2D(t)),e.setProjectionBehavior(0),b(e),!0}function ke(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,g(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,b(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),b(e),!0}function be(e,t,n,r,i){return x(i+32<=r.size()),e.m_cp=E(z,2),e.m_cp[0].x=r.readDouble(i),e.m_cp[0].y=r.readDouble(i+8),e.m_cp[1].x=r.readDouble(i+16),e.m_cp[1].y=r.readDouble(i+24),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y,!0}function ye(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 ge(e,t,n,r,i){const s={segFlag:0,toPointSz:0};let a=r.currentToken();a=r.nextToken();const o=r.currentString(),u=o[0];for((1!==o.length||"a"!==u&&"b"!==u&&"c"!==u&&"n"!==u&&"q"!==u)&&v('failed to parse curve: expecting "a", "b", "n", "q", or "c"'),a=r.nextToken(),2!==a&&v("failed to parse curve: start array is expected for curve parameters"),a=r.nextToken(),2!==a&&v("failed to parse curve: start array is expected for to point"),s.toPointSz=0;4!==r.nextToken();)4===s.toPointSz&&v("failed to parse curve: vertex array cannot have more than 4 elements"),t[s.toPointSz++]=ce(r);s.toPointSz<2&&v("failed to parse curve: vertex array must have at least 2 elements");const m=z.construct(t[0],t[1]),l=z.getNAN();let c=-1,d=-1,_=!1,h=Number.NaN,f=Number.NaN,p=Number.NaN;const k=[z.getNAN(),z.getNAN(),z.getNAN()],b=z.getNAN();if("a"===u){a=r.nextToken(),2!==a&&v("failed to parse curve: start array is expected for center point"),a=r.nextToken();const e=ce(r);a=r.nextToken();const t=ce(r);a=r.nextToken(),4!==a&&v("failed to parse curve: end array is expected for center point"),l.setCoords(e,t),a=r.nextToken(),c=r.currentInt32Value(),a=r.nextToken(),d=r.currentInt32Value(),a=r.nextToken(),4!==a?(_=!1,h=ce(r),a=r.nextToken(),f=ce(r),a=r.nextToken(),p=ce(r),a=r.nextToken(),4!==a&&v("failed to parse curve: end array is expected for curve parameters")):_=!0,s.segFlag=4}else if("b"===u){for(let e=0;e<2;e++){a=r.nextToken(),2!==a&&v("failed to parse curve: start array is expected for control point"),a=r.nextToken();const t=ce(r);a=r.nextToken();const n=ce(r);a=r.nextToken(),4!==a&&v("failed to parse curve: end array is expected for control point"),k[e].setCoords(t,n)}a=r.nextToken(),4!==a&&v("failed to parse curve: end array is expected for curve parameters"),s.segFlag=2}else if("n"===u){{a=r.nextToken(),2!==a&&v("failed to parse curve: start array is expected for control point"),a=r.nextToken();const e=ce(r);a=r.nextToken();const t=ce(r);a=r.nextToken(),4!==a&&v("failed to parse curve: end array is expected for control point"),k[0].setCoords(e,t)}a=r.nextToken();const e=ce(r);a=r.nextToken();const t=ce(r);a=r.nextToken();const n=ce(r);k[1].setCoords(e,t),k[2].setCoords(n,n),a=r.nextToken(),4!==a&&v("failed to parse curve: end array is expected for curve parameters"),s.segFlag=8}else if("q"===u){for(let e=0;e<1;e++){a=r.nextToken(),2!==a&&v("failed to parse curve: start array is expected for control point"),a=r.nextToken();const t=ce(r);a=r.nextToken();const n=ce(r);a=r.nextToken(),4!==a&&v("failed to parse curve: end array is expected for control point"),k[e].setCoords(t,n)}a=r.nextToken(),4!==a&&v("failed to parse curve: end array is expected for curve parameters"),s.segFlag=16}else{a=r.nextToken(),2!==a&&v("failed to parse curve: start array is expected for interior point"),a=r.nextToken();const e=ce(r);a=r.nextToken();const t=ce(r);a=r.nextToken(),4!==a&&v("failed to parse curve: end array is expected for interior point"),b.setCoords(e,t),a=r.nextToken(),4!==a&&v("failed to parse curve: end array is expected for curve parameters"),s.segFlag=4}if(a=r.nextToken(),3!==a&&v("failed to parse curve: end object is expected for curve"),"a"===u)if(e.createEllipticArc(),_){const t=!0;Ne(e.get(),n,m,l,t,c,d)}else Te(e.get(),n,m,l,c,d,h,f,p);else if("b"===u)e.createCubicBezier(),ve(e.get(),n,m,k);else if("n"===u)e.createQuadraticRationalBezier(),xe(e.get(),n,m,k[0],k[1].x,k[1].y,k[2].x);else if("q"===u)e.createQuadraticBezier(),e.get().construct(n,k[0],m);else{e.createEllipticArc();const t=!1;Ne(e.get(),n,m,b,t,-1,-1)}return s}function Ne(e,t,n,r,i,s,a){e.dropAllAttributes();const o=20,u=new ArrayBuffer(o),m=new ie({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,pe(e,t,n,m,0)}function Te(e,t,n,r,i,s,a,o,u){e.dropAllAttributes();const m=44,l=new ArrayBuffer(m),c=new ie({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,ke(e,t,n,c,0)}function ve(e,t,n,r){e.dropAllAttributes();const i=32,s=new ArrayBuffer(i),a=new ie({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,be(e,t,n,a,0)}function xe(e,t,n,r,i,s,a){e.dropAllAttributes();const o=40,u=new ArrayBuffer(o),m=new ie({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,ye(e,t,n,m,0)}function Ae(e,t,n,r,i){const s=e.getGeometryType();if(s===w.enumEllipticArc)return Se(e,t,n,r,i);if(s===w.enumBezier)return we(e,t,n,r,i);if(s===w.enumRationalBezier2)return Ce(e,t,n,r,i);if(s===w.enumBezier2){const s=new p;return s.constructFromQuadraticSegment(e),we(s,t,n,r,i)}C("")}function Se(e,t,n,r,i){x(!k(e));const s=e.getEndXY(),a=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!n;let u=Number.NaN,m=Number.NaN;if(a&&(u=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),e.isDegenerateToLine()||e.isDegenerate(0))return De(a,o,s.x,s.y,u,m,r,i),!0;const l=0===e.projectionBehavior(),c=!!l&&e.isClosed();if(l&&!c)i.startObject(),i.addFieldName("c"),i.startArray(),De(a,o,s.x,s.y,u,m,r,i),Fe(e.m_interior.x,e.m_interior.y,17,i),i.endArray(),i.endObject();else if(l){i.startObject(),i.addFieldName("a"),i.startArray(),De(a,o,s.x,s.y,u,m,r,i);const t=0,n=0;Fe(e.m_center.x+t,e.m_center.y+n,17,i);const l=!e.isMajor();i.addInt32(l?1:0);const c=e.isClockwise();i.addInt32(c?1:0),i.endArray(),i.endObject()}else{i.startObject(),i.addFieldName("a"),i.startArray(),De(a,o,s.x,s.y,u,m,r,i);const t=e;Fe(t.m_center.x,t.m_center.y,17,i);const n=!t.isMajor();i.addInt32(n?1:0);const l=t.isClockwise();i.addInt32(l?1:0),i.addDouble(t.m_rotation,17),i.addDouble(t.m_semiMajorAxis,17),i.addDouble(t.m_minorMajorRatio,17),i.endArray(),i.endObject()}return!1}function we(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(),De(a,o,s.x,s.y,u,m,r,i),Fe(e.m_cp[0].x,e.m_cp[0].y,r,i),Fe(e.m_cp[1].x,e.m_cp[1].y,r,i),i.endArray(),i.endObject(),!1}function Ce(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(),De(a,o,s.x,s.y,u,m,r,i),Fe(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 De(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 Fe(e,t,n,r){r.startArray(),r.addDouble(e,n),r.addDouble(t,n),r.endArray()}class je{getOperatorType(){return 10405}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,r,i,s){ze(e,t,n,r)}exportSpatialReference(e,t,n,r){x(0)}exportProjectionTransformation(e,t,n,r){x(0)}exportDatumTransformation(e,t,n,r){x(0)}static geometryTypeToString(e){return x(0),""}}function ze(e,t,n,r,i){if(t||n){if(r.startObject(),null!==t){switch(t.getGeometryType()){case w.enumPolygon:Oe(!0,e,t,r);break;case w.enumPolyline:Oe(!1,e,t,r);break;case w.enumMultiPoint:Ie(e,t,r);break;case w.enumPoint:Ee(e,t,r);break;case w.enumEnvelope:Pe(e,t,r);break;case w.enumMultipatch:x(0);break;default:T("exportToJSON")}}null!==n&&(r.addFieldName("spatialReference"),Ve(e,n,r)),r.endObject()}}function Oe(e,t,n,r){const i=n.getImpl(),s=!!(2&t),a=!!(4&t),o=!!(8&t),u=i.hasAttribute(1)&&!s,m=i.hasAttribute(2)&&!a,l=i.hasAttribute(3)&&!o,d=i.hasNonLinearSegments();u&&(r.addFieldName("hasZ"),r.addBool(!0)),m&&(r.addFieldName("hasM"),r.addBool(!0)),e?d?r.addFieldName("curveRings"):r.addFieldName("rings"):d?r.addFieldName("curvePaths"):r.addFieldName("paths");let _=null;const h=[];if(n.isEmpty())r.startArray(),r.endArray();else{const e=17-(31&t>>13);r.startArray();const o=n.getPathCount();let p=0;const k=i.getAttributeStreamRef(0);let b=null,y=null,g=null;const N=new f;let T=null,v=null,x=null;d&&(T=i.getSegmentFlagsStreamRef(),v=i.getSegmentIndexStreamRef(),x=i.getSegmentDataStreamRef()),u&&(b=i.getAttributeStreamRef(1)),m&&(y=i.getAttributeStreamRef(2)),l&&(g=i.getAttributeStreamRef(3),_=c(3,0));for(let t=0;t<o;t++){r.startArray(),l&&h.push(0);const i=n.getPathEnd(t);if(p===i){r.endArray();continue}const o=n.isClosedPath(t);let c=k.read(2*p),d=k.read(2*p+1),f=u?b.read(p):Number.NaN,A=m?y.read(p):Number.NaN,S=l?g.read(p):0;Re(u,m,c,d,f,A,e,r);let w=1;l&&(_.add(S),h[h.length-1]++);const D=c,F=d,j=f,z=A,O=S;let I=!1,E=0,P=Number.NaN,B=Number.NaN,V=0;for(let t=p+1,n=p,R=o?i+1:i;t<R;t++,n++){const o=null!==T?31&T.read(n):1;let p,R;if(t<i?(p=k.read(2*t),R=k.read(2*t+1),u&&(P=b.read(t)),m&&(B=y.read(t)),l&&(V=g.read(t))):(p=D,R=F,P=j,B=z,V=O),1!==o){I=!0,4===o?N.createEllipticArc():2===o?N.createCubicBezier():16===o?N.createQuadraticBezier():8===o?N.createQuadraticRationalBezier():C("JSON export.unsupported curve");const t=N.get(),i=v.read(n);t.setStartXYCoords(c,d),t.setEndXYCoords(p,R),u&&(t.setStartAttribute(1,0,f),t.setEndAttribute(1,0,P)),m&&(t.setStartAttribute(2,0,A),t.setEndAttribute(2,0,B)),t.readFromBufferStream(x,i);Ae(N.get(),s,a,e,r)&&E++}else Re(u,m,p,R,P,B,e,r);l&&(_.add(V),h[h.length-1]++),w++,c=p,d=R,f=P,A=B,S=V}I&&0===E||(w<2&&E<1&&(Re(u,m,c,d,f,A,e,r),w++,l&&(_.add(S),h[h.length-1]++)),o&&w<3&&E<2&&(Re(u,m,D,F,j,z,e,r),w++,c=D,d=F,f=j,A=z,S=O,l&&(_.add(O),h[h.length-1]++))),r.endArray(),p=i}r.endArray()}if(l){r.addFieldName("ids"),r.startArray();let e=0;for(let t=0,n=h.length;t<n;++t){const n=h[t];x(0===n||null!==_&&e+n<=_.size()),r.startArray();for(let t=0;t<n;++t)r.addInt32(_.read(e)),e++;r.endArray()}r.endArray()}}function Ie(e,t,n){const r=t.getImpl(),i=r.hasAttribute(1)&&!(2&e),s=r.hasAttribute(2)&&!(4&e),a=r.hasAttribute(3)&&!(8&e);i&&(n.addFieldName("hasZ"),n.addBool(!0)),s&&(n.addFieldName("hasM"),n.addBool(!0)),n.addFieldName("points");const o=t.getPointCount();if(t.isEmpty())n.startArray(),n.endArray();else{const t=17-(31&e>>13);n.startArray();const a=r.getAttributeStreamRef(0);let u=null,m=null;i&&(u=r.getAttributeStreamRef(1)),s&&(m=r.getAttributeStreamRef(2));for(let e=0;e<o;e++){const r=a.read(2*e),o=a.read(2*e+1);let l=Number.NaN,c=Number.NaN;i&&(l=u.read(e)),s&&(c=m.read(e)),Re(i,s,r,o,l,c,t,n)}n.endArray()}if(a){let e=null;r.isEmpty()||(e=r.getAttributeStreamRef(3)),x(0===o||null!==e&&e.size()>=o),n.addFieldName("ids"),n.startArray();for(let t=0;t<o;t++)n.addInt32(e.read(t));n.endArray()}}function Ee(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 Pe(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 Be(e,t,n){n.startObject();const r=t.getID();r<=0&&v("cannot export unit that has no valid WKID"),n.addFieldName("uwkid"),n.addInt32(r),n.endObject()}function Ve(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"),Be(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 W;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 Re(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 Me={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 Ue{constructor(e){this.m_functionStack=[],this.m_pushPositions=[],this.m_utf8Decoder=new TextDecoder("utf-8",{fatal:!0}),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?C("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_(){C("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){C("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 x(0),""}childrenAsString(){return x(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"}v("invalid token")}toUTF8_(e,t){let n=0,r=e;for(;t.charCodeAt(r)===Me.s_backslash&&t.charCodeAt(r+1)===Me.s_u;)n++,r+=6;r=e;const i=new Uint8Array(n);let s=0;for(;t.charCodeAt(r)===Me.s_backslash&&t.charCodeAt(r+1)===Me.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)!==Me.s_backslash)r++;else{switch(r>0&&(e+=i.slice(t,t+r)),i.charCodeAt(++s)){case Me.s_doubleQuote:e+='"';break;case Me.s_u:{const{u8s:t,end:n}=this.toUTF8_(s-1,i);s=n-1,e+=t;break}case Me.s_backslash:e+="\\";break;case Me.s_forwardslash:e+="/";break;case Me.s_b:e+="\b";break;case Me.s_f:e+="\f";break;case Me.s_n:e+="\n";break;case Me.s_r:e+="\r";break;case Me.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&&v("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&&v("invalid token")}const n=Number.parseFloat(e);if(6===this.m_currentTokenType)Number.isNaN(n)&&v("invalid token");else if(Number.isNaN(n))return Number.NaN;return n}currentInt32Value(){8!==this.m_currentTokenType&&6!==this.m_currentTokenType&&v("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&&v("invalid token"));const n=parseInt(e);return Number.isNaN(n)&&v("invalid token"),n}currentInt64Value(){return x(0),0n}currentBoolValue(){return x(0),!1}isError(){return 0}JSONString(){return x(0),""}pushPosition(){return x(0),!1}popPosition(){return x(0),!1}skipCStyleComments_(){x(0)}skipCppStyleComments_(){x(0)}skipComments_(){this.m_prepSubstr();let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&v("invalid token"),e=this.m_peekChar(),e===Me.s_asterisk?this.skipCStyleComments_():e===Me.s_forwardslash?this.skipCppStyleComments_():v("invalid token")}skipWhiteSpace_(){let e;do{this.m_eof()&&v("invalid token");let t=this.m_peekChar();for(;t>=9&&t<=13||32===t;)this.m_increment(),this.m_eof()&&v("invalid token"),t=this.m_peekChar();t===Me.s_forwardslash?(this.m_startToken=this.m_endToken,e=!0,this.skipComments_()):e=!1}while(e)}rightBracket_(){return this.m_peekChar()===Me.s_endArray&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=4,!0)}rightBrace_(){return this.m_peekChar()===Me.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()&&v("invalid token");let e=this.m_peekChar();for(;e!==Me.s_doubleQuote;){const t=e===Me.s_backslash;if(this.m_stepOverChar(),this.m_eof()&&v("invalid token"),e=this.m_peekChar(),t)if(this.m_bHasEscapes=!0,e===Me.s_doubleQuote||e===Me.s_backslash||e===Me.s_forwardslash||e===Me.s_b||e===Me.s_f||e===Me.s_n||e===Me.s_r||e===Me.s_t)this.m_stepOverChar(),this.m_eof()&&v("invalid token"),e=this.m_peekChar();else if(e===Me.s_u)for(let n=0;n<4;n++)this.m_stepOverChar(),this.m_eof()&&v("invalid token"),e=this.m_peekChar(),e>=Me.s_zero&&e<=Me.s_nine||e>=Me.s_a&&e<=Me.s_f||e>=Me.s_A&&e<=Me.s_F||v("invalid token");else v("invalid token")}this.m_stepOverChar()}comma_(){return this.m_peekChar()===Me.s_comma&&(this.m_increment(),!0)}colon_(){return this.m_peekChar()===Me.s_colon&&(this.m_increment(),!0)}fieldNameEnd_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.colon_()?(this.skipWhiteSpace_(),this.value_()):v("invalid token")}fieldNameStart_(){this.m_startToken=this.m_endToken;this.m_peekChar()!==Me.s_doubleQuote&&v("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():v("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():v("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()!==Me.s_zero?this.digits_():this.m_stepOverChar()}digits_(){let e=this.m_peekChar();do{this.m_stepOverChar(),this.m_eof()&&v("invalid token"),e=this.m_peekChar()}while(e>=Me.s_zero&&e<=Me.s_nine)}frac_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&v("invalid token"),e=this.m_peekChar(),e>=Me.s_zero&&e<=Me.s_nine||v("invalid token"),this.digits_()}exp_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&v("invalid token"),e=this.m_peekChar(),e!==Me.s_plus&&e!==Me.s_minus||(this.m_stepOverChar(),this.m_eof()&&v("invalid token"),e=this.m_peekChar()),e>=Me.s_zero&&e<=Me.s_nine||v("invalid token"),this.digits_()}valueNumber_(){this.m_prepSubstr();let e=!1,t=this.m_peekChar();if(t===Me.s_minus?(this.m_stepOverChar(),this.m_eof()&&v("invalid token"),t=this.m_peekChar(),e=!0,t>=Me.s_zero&&t<=Me.s_nine||v("invalid token"),this.int_()):this.int_(),t=this.m_peekChar(),t===Me.s_period)this.m_currentTokenType=7,this.frac_(),t=this.m_peekChar(),t!==Me.s_e&&t!==Me.s_E||this.exp_();else if(t===Me.s_e||t===Me.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&&v("invalid token"),"null"!==e&&v("invalid token"),this.m_currentTokenType=10}valueTrue_(){const{s:e,bDone:t}=this.m_get(5);t&&v("invalid token"),"true"!==e&&v("invalid token"),this.m_currentTokenType=11}valueFalse_(){const{s:e,bDone:t}=this.m_get(6);t&&v("invalid token"),"false"!==e&&v("invalid token"),this.m_currentTokenType=12}valueNan_(){const{s:e,bDone:t}=this.m_get(4);t&&v("invalid token"),"NaN"!==e&&v("invalid token"),this.m_currentTokenType=7}value_(){this.m_startToken=this.m_endToken;const e=this.m_peekChar();e===Me.s_beginObject?this.valueStartObject_():e===Me.s_beginArray?this.valueStartArray_():e===Me.s_doubleQuote?this.valueString_():e===Me.s_minus||e>=Me.s_zero&&e<=Me.s_zero+9?this.valueNumber_():e===Me.s_n?this.valueNull_():e===Me.s_t?this.valueTrue_():e===Me.s_f?this.valueFalse_():e===Me.s_N?this.valueNan_():v("invalid token")}start_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.m_functionStack.push(()=>this.accept_());const e=this.m_peekChar();e!==Me.s_beginObject&&e!==Me.s_beginArray&&v("invalid token"),this.value_()}accept_(){this.m_startToken=this.m_endToken,this.m_currentTokenType=0}}class We{getOperatorType(){return 10404}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,r,i,s,a){let o;"string"==typeof n?(o=new Ue({jsonString:n}),o.nextToken()):o=n,1!==o.currentToken()&&v("failed to import map geometry: start of object is expected");const u=se(t,e,o,r,i);return new Y(u)}importSpatialReference(e){const t=oe(e);return null===t&&T("failed to import spatial reference"),t}importProjectionTransformation(e,t){return x(0),{}}importDatumTransformation(e,t){return x(0),{}}static stringToGeometryType(e){return(e=e.toLowerCase()).startsWith("esrigeometry")||v("string_to_geometry_type"),e.endsWith("point")?w.enumPoint:e.endsWith("envelope")?w.enumEnvelope:e.endsWith("multipoint")?w.enumMultiPoint:e.endsWith("polyline")?w.enumPolyline:e.endsWith("polygon")?w.enumPolygon:void v("string_to_geometry_type")}}const Xe=new re,Ye=new je,Ge=new We;function Le(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function qe(e,t=!1){if(!t&&(K(e)||J(e)||Z(e)||Q(e))){const t=new Y;return t.setGeometry(H(L(e))),t}const n=new ne(e,{strict:!1});return n.nextToken(),Ge.execute(0,w.enumUnknown,n,!0,!1)}function Ke(e){let t=null;return[e.map(e=>{if(null==t){const n=Je(e);return t=n.getSpatialReference(),n.getGeometry()}return Ze(e)}),t]}function Je(e){const t=qe(e),n=He(e.spatialReference);return n&&t.setSpatialReference(n),t}function Ze(e){return qe(e).getGeometry()}function Qe(e){return qe(e,!0).getGeometry()}function He(e){if(null==e)return null;let t=!1;if(e instanceof q){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 ne(e,{strict:!1});n.nextToken();const r=Ge.importSpatialReference(n);return 0===r.getCoordinateSystemType()?null:r}function $e(e,t){if(e instanceof Y&&(t=e.getSpatialReference(),e=e.getGeometry()),null==e||e.isEmpty())return null;switch(e.getGeometryType()){case w.enumPoint:case w.enumMultiPoint:case w.enumPolyline:case w.enumPolygon:{const n=G(e,et(t)??void 0).toGeometryJSON();return null==n.spatialReference&&delete n.spatialReference,n}}return Xe.reset(),Ye.execute(0,e,t??null,Xe),Xe.getObject()}function et(e){return null==e||0===e.getCoordinateSystemType()?null:(Xe.reset(),Ye.execute(0,null,e,Xe),Xe.getObject().spatialReference)}export{Ke as fromGeometries,Je as fromGeometry,Ze as fromGeometryToGXGeometry,Qe as fromGeometryToGXGeometryUsingImportOperator,He as fromSpatialReference,Le as getSpatialReference,$e as toGeometry,et as toSpatialReference};
5
+ import{P as e,y as t,A as n,J as r,F as i,K as s,E as a,z as o,D as u,L as m,M as l,u as c}from"../../../chunks/Envelope.js";import{a as d,P as _,M as h,S as f,y as p,z as k,A as b,B as y,F as g,H as N}from"../../../chunks/MultiPathImpl.js";import{d as T,a as v,g as x,q as A,p as S,G as w,t as C}from"../../../chunks/Geometry.js";import{ar as D,i as F,d as j,P as z,b as O,as as I,m as E}from"../../../chunks/Point2D.js";import{aI as P,aE as B,aJ as V,aK as R,aL as M,a0 as U,aM as W,aN as X,aO as G}from"../../../chunks/SpatialReference.js";import{convertGeometryxToFlat as L,convertGeometryToFlat as Y}from"../../FlatGeometry.js";import K from"../../SpatialReference.js";import"./initNoPeFactory.js";import{isPoint as q,isMultipoint as J,isPolyline as Z,isPolygon as Q}from"../../support/jsonTypeUtils.js";function H({type:i,vertexCount:s,vertexXY:a,vertexZ:o,vertexM:u,partCount:m,partOffsets:l,partFlags:c,segmentFlags:d,segmentIndices:_,segmentParams:f,segmentCountArc:p,segmentCountBezier:k}){const b=new $[i];if(b instanceof e)return b.setXYCoords(a[0],a[1]),o&&b.setZ(o[0]),u&&b.setM(u[0]),b;const y=new t({fromArray:a});if(b.setAttributeStreamRef(0,y),o){const e=new t({fromArray:o});b.setAttributeStreamRef(1,e)}if(u){const e=new t({fromArray:u});b.setAttributeStreamRef(2,e)}if(b instanceof h)return b.resizeNoInit(s),b;{const e=m+1,t=new n({fromArray:l,size:e}),i=new r({fromArray:c,size:e});b.setPathStreamRef(t),b.setPathFlagsStreamRef(i)}if(null==d)return b.resizeImpl(s),b;const g=new r({fromArray:d}),N=new n({fromArray:_}),T=new t({fromArray:f});return b.setSegmentData(N,T,g,f.length),b.incCurveType(4,p),b.incCurveType(2,k),b.modifyCurveCounter(p+k),b.resizeImpl(s),b}const $={point:e,multipoint:h,polyline:_,polygon:d};function ee(){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 te(){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 ne{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:ee}}createJSONArrayIterator(e){return{m_iteratorType:"array",m_strict:this.m_options.strict,m_i:-1,m_a:e,next:te}}constructor(e,t){this.m_currentToken=0,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>=D()&&this.m_currentValue<=F()?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&&v("invalid token"),this.m_currentValue}currentDoubleValue(){return 7!==this.m_currentToken&&8!==this.m_currentToken&&v("invalid token"),this.m_currentValue}currentInt32Value(){return 8!==this.m_currentToken&&v("invalid token"),this.m_currentValue}currentInt64Value(){return x(0),0n}currentBoolValue(){return 12!==this.m_currentToken&&11!==this.m_currentToken&&v("invalid token"),this.m_currentValue}isError(){return 0}}class re{constructor(){this.m_pendingKey=null,this.m_acceptedObject=null,this.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){x(0)}addInt32(e){this.addValue_(e)}addBool(e){this.addValue_(e)}addNull(){this.addValue_(null)}getObject(){return this.m_acceptedObject}}class ie{constructor(e){return this.m_buffer=null,this.m_view=null,this.m_sz=0,this.m_offset=0,this.m_bOwnsBuffer=!0,this.m_bLittleEndian=!0,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&&A("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&&A("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===ie.getNativeByteOrder())}setNativeByteOrder(){this.m_bLittleEndian=1===ie.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){x(e>=0&&e<=this.m_sz),this.m_sz=e}}function se(t,n,r,o,u,m){let l=!1,c=!1,d=!1,_=!1,h=!1,f=!1,p=!1,k=!1,b=!1,y=!1,g=!1,N=!1,T=!1,A=!1,S=!1,C=!1,D=!1,F=!1,j=!1,z=!1,O=!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,K=Number.NaN,q=Number.NaN,J=Number.NaN,Z=0,Q=0,H=!1,$=!1,ee=null,te=null,ne=null,re=null,ie=null;for(;3!==r.nextToken();){const e=r.currentString();if(r.nextToken(),"spatialReference"===e){if(u&&!l){l=!0,1===r.currentToken()?re=oe(r):10!==r.currentToken()&&v("failed to parse spatial reference: object or null is expected");continue}}else if(o)if("hasZ"===e){if(!c){c=!0,H=11===r.currentToken();continue}}else if("hasM"===e){if(!d){d=!0,$=11===r.currentToken();continue}}else if("rings"===e){if(!(h||f||t!==w.enumUnknown&&t!==w.enumPolygon)){h=!0,({geometry:ie,as:ee,bs:te}=ue(!0,!1,n,r));continue}}else if("curveRings"===e){if(!f&&(t===w.enumUnknown||t===w.enumPolygon)){f=!0,({geometry:ie,as:ee,bs:te}=ue(!0,!0,n,r));continue}}else if("paths"===e){if(!(p||k||t!==w.enumUnknown&&t!==w.enumPolyline)){p=!0,({geometry:ie,as:ee,bs:te}=ue(!1,!1,n,r));continue}}else if("curvePaths"===e){if(!k&&(t===w.enumUnknown||t===w.enumPolyline)){k=!0,({geometry:ie,as:ee,bs:te}=ue(!1,!0,n,r));continue}}else if("points"===e){if(!b&&(t===w.enumUnknown||t===w.enumMultiPoint)){b=!0,({geometry:ie,as:ee,bs:te}=me(n,r));continue}}else if("ids"===e){if(!_){_=!0,ne=le(n,r);continue}}else if("x"===e){if(!y&&(t===w.enumUnknown||t===w.enumPoint)){y=!0,B=ce(r);continue}}else if("y"===e){if(!g&&(t===w.enumUnknown||t===w.enumPoint)){g=!0,V=ce(r);continue}}else if("z"===e){if(!N&&(t===w.enumUnknown||t===w.enumPoint)){N=!0,R=ce(r);continue}}else if("m"===e){if(!T&&(t===w.enumUnknown||t===w.enumPoint)){T=!0,M=ce(r);continue}}else if("id"===e){if(!A&&(t===w.enumUnknown||t===w.enumPoint)){A=!0,U=de(r);continue}}else if("xmin"===e){if(!S&&(t===w.enumUnknown||t===w.enumEnvelope)){S=!0,W=ce(r);continue}}else if("ymin"===e){if(!C&&(t===w.enumUnknown||t===w.enumEnvelope)){C=!0,X=ce(r);continue}}else if("mmin"===e){if(!O&&(t===w.enumUnknown||t===w.enumEnvelope)){O=!0,q=ce(r);continue}}else if("zmin"===e){if(!j&&(t===w.enumUnknown||t===w.enumEnvelope)){j=!0,Y=ce(r);continue}}else if("idmin"===e){if(!E&&(t===w.enumUnknown||t===w.enumEnvelope)){E=!0,Z=de(r);continue}}else if("xmax"===e){if(!D&&(t===w.enumUnknown||t===w.enumEnvelope)){D=!0,G=ce(r);continue}}else if("ymax"===e){if(!F&&(t===w.enumUnknown||t===w.enumEnvelope)){F=!0,L=ce(r);continue}}else if("mmax"===e){if(!I&&(t===w.enumUnknown||t===w.enumEnvelope)){I=!0,J=ce(r);continue}}else if("zmax"===e){if(!z&&(t===w.enumUnknown||t===w.enumEnvelope)){z=!0,K=ce(r);continue}}else if("idmax"===e){if(!P&&(t===w.enumUnknown||t===w.enumEnvelope)){P=!0,Q=de(r);continue}}else"materials"===e&&x(0);r.skipChildren()}if(h||f||p||k||b){let e=null,t=null;const n=ie;H&&(ie.addAttribute(1),e=ee,e||(e=i(n.getPointCount(),Number.NaN))),$&&(ie.addAttribute(2),t=H?te:ee),null!=ne&&ie.addAttribute(3),H&&null!=e&&n.setAttributeStreamRef(1,e),$&&null!=t&&n.setAttributeStreamRef(2,t),null!=ne&&_e(n,ne)}else if(y||g||T||N||A){s(B,V)||v("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 t=new e({x:B,y:V});N&&t.setZ(R),T&&t.setM(M),A&&t.setID(U),ie=t}else if(S||C||D||F||j||z||O||I||E||P){(Number.isNaN(X)||Number.isNaN(G)||Number.isNaN(L))&&(W=Number.NaN);const e=new a({xmin:W,ymin:X,xmax:G,ymax:L});j&&z&&e.setInterval(1,0,Y,K),O&&I&&e.setInterval(2,0,q,J),E&&P&&e.setInterval(3,0,Z,Q),ie=e}return{...ie?{geom:ie}:{},...re?{sr:re}:{}}}function ae(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 oe(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,f=!1,p=!1,k=!1,b=-1,y=-1,g=-1,N=-1,T=0,v=0,x=0,A=0,S=0,w=0,C=0,D=0,F=0,j=0,z="",O="",I=null;for(;3!==e.nextToken();){const E=e.currentString();e.nextToken(),"wkid"===E?t||(t=!0,8===e.currentToken()&&(b=e.currentInt32Value())):"latestWkid"===E?n||(n=!0,8===e.currentToken()&&(y=e.currentInt32Value())):"wkt"===E?s||(s=!0,6===e.currentToken()&&(z=e.currentString())):"wkt2"===E?s||6===e.currentToken()&&(O=e.currentString()):"vcsWkid"===E?r||(r=!0,8===e.currentToken()&&(g=e.currentInt32Value())):"latestVcsWkid"===E?i||(i=!0,8===e.currentToken()&&(N=e.currentInt32Value())):"xyTolerance"===E?o||(o=!0,a=!0,T=e.currentDoubleValue()):"zTolerance"===E?u||(u=!0,a=!0,v=e.currentDoubleValue()):"mTolerance"===E?m||(m=!0,a=!0,x=e.currentDoubleValue()):"falseX"===E?l||(l=!0,a=!0,C=e.currentDoubleValue()):"falseY"===E?c||(c=!0,a=!0,D=e.currentDoubleValue()):"falseZ"===E?d||(d=!0,a=!0,F=e.currentDoubleValue()):"falseM"===E?_||(_=!0,a=!0,j=e.currentDoubleValue()):"xyUnits"===E?h||(h=!0,a=!0,A=e.currentDoubleValue()):"zUnits"===E?f||(f=!0,a=!0,S=e.currentDoubleValue()):"mUnits"===E?p||(p=!0,a=!0,w=e.currentDoubleValue()):"unit"===E?k||(k=!0,I=ae(e)):e.skipChildren()}N<=0&&g>0&&(N=g),g<=0&&N>0&&(g=N);let E=null,G=!0;if(0!==z.length&&(G=!1,P(z)&&(E=B(z))),E||0===O.length||(G=!1,P(O)&&(E=B(O))),!E&&y>0&&(G=!1,V(y)&&(N<=0||R())&&(E=M(y,N))),!E&&b>0&&(G=!1,V(b)&&(g<=0||R())&&(E=M(b,g))),G&&(E=U(I)),a&&E){const e=new W;E.queryPrecisionDescriptorWithoutFalseXY(e),o&&e.setTolerance(0,T),u&&e.setTolerance(1,v),m&&e.setTolerance(2,x),h&&l&&c&&e.setGridParams(C,D,A),f&&d&&e.setZParams(F,S),p&&_&&e.setMParams(j,w),E=X(E,e)}return E}function ue(e,t,n,r){2!==r.currentToken()&&v("failed to parse multipath: array of array of vertices is expected");const s=e?new d:new _,a=s,l=o(0),c=i(2,0),h=u(0);let p=null,k=null,b=null,y=null,g=null,T=0,x=0,A=0;const S=new f,w=z.getNAN();let C=0,D=0;const F=e?1:0;for(;4!==r.nextToken();){2!==r.currentToken()&&v("failed to parse multipath: ring/path array is expected");let n=2,s=0,d=!0;const _=4;let f=0,E=0;const P=z.getNAN(),B=j(_,Number.NaN),V=j(_,Number.NaN);let R=!1;for(r.nextToken();4!==r.currentToken();){if(t&&1===r.currentToken())d&&v("failed to parse multipath: starting vertex array is expected"),b||(b=u(C-1,1),y=o(C-1,-1),g=i(0)),R=!0,n=1,({segFlag:A,toPointSz:f}=ge(S,B,w,r));else{for(R=!1,2!==r.currentToken()&&v("failed to parse multipath: array is expected, rings/paths vertices consist of arrays of coordinates"),f=0;4!==r.nextToken();)f===_&&v("failed to parse multipath: each vertex array has to have at most 4 elements"),B[f++]=ce(r);f<2&&v("failed to parse multipath: each vertex array has to have at least 2 elements"),m(B[0],B[1])||v("failed to parse multipath: x and y must be finite")}r.nextToken();do{if(c.size()===2*C&&c.resize(he(C)),c.writePoint2D(2*C,P.setCoords(B[0],B[1])),p&&p.size()===C&&p.resize(fe(C)),f>2?(p||(p=i(C+1,Number.NaN)),p.write(C,B[2])):p&&p.write(C,Number.NaN),k&&k.size()===C&&k.resize(fe(C)),f>3?(k||(k=i(C+1,Number.NaN)),k.write(C,B[3])):k&&k.write(C,Number.NaN),d)D++,l.add(C),h.add(F),d=!1,E=f,O(V,B,0,0,E);else if(null!==b)if(R){const e=N(A),t=g.size();g.resize(t+e),b.add(A),y.add(T),S.get().writeInBufferStream(g,T),T+=e,a.incCurveType(A,1),x++}else b.add(1),y.add(-1);C++,s++,w.setCoords(B[0],B[1])}while(s<n&&4===r.currentToken())}0!==s&&(e&&s>n&&f===E&&0===I(B,V,f)?(C--,s--):null!==b&&(b.add(1),y.add(-1)))}return C&&(l.resize(D),h.resize(D),C>0&&(l.add(C),h.add(0)),a.setAttributeStreamRef(0,c),a.setPathFlagsStreamRef(h),a.setPathStreamRef(l),null!==b&&(a.updateCurveCounter(x),a.setSegmentData(y,g,b,T)),a.notifyModifiedFlags(65535)),{geometry:s,as:p,bs:k}}function me(e,t){2!==t.currentToken()&&v("failed to parse multipoint: array of vertices is expected");let n=0;const r=new h,s=i(2,0);let a=0;const o=4,u=j(o,Number.NaN),l=new z;let c=null,d=null;for(;4!==t.nextToken();){for(2!==t.currentToken()&&v("failed to parse multipoint: array is expected, multipoint vertices consist of arrays of cooridinates"),a=0;4!==t.nextToken();)a===o&&v("failed to parse multipoint: each vertex array has to have at most 4 elements"),u[a++]=ce(t);a<2&&v("failed to parse multipoint: each vertex array has to have at least 2 elements"),m(u[0],u[1])||v("failed to parse multipoint: x and y must be finite"),s.size()===2*n&&s.resize(he(n)),s.writePoint2D(2*n,l.setCoords(u[0],u[1])),c&&c.size()===n&&c.resize(fe(n)),a>2?(c||(c=i(n+1,Number.NaN)),c.write(n,u[2])):c&&c.write(n,Number.NaN),d&&d.size()===n&&d.resize(fe(n)),a>3?(d||(d=i(n+1,Number.NaN)),d.write(n,u[3])):d&&d.write(n,Number.NaN),n++}if(n){const e=r.getImpl();e.setAttributeStreamRef(0,s),e.resizeNoInit(n),e.notifyModifiedFlags(65535)}return{geometry:r,as:c,bs:d}}function le(e,t){2!==t.currentToken()&&v("failed to parse array of IDs: array of array of integers is expected");const n=l(2,0);let r=0,i=-1;for(;4!==t.nextToken();){const e=r;n.size()===r&&n.resize(fe(r)),r++;let s=0;for(-1===i?i=2===t.currentToken()?1:0:1===i&&2!==t.currentToken()&&v("failed to parse array of IDs: array of array of integers is expected"),0===i&&(n.size()===r&&n.resize(fe(r)),n.write(r,de(t)),s++,r++);4!==t.nextToken();)n.size()===r&&n.resize(fe(r)),n.write(r,de(t)),s++,r++;if(n.write(e,s),0===i)break}return n.resize(r),n}function ce(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 de(e){return e.currentInt32Value()}function _e(e,t){if(e.isEmpty())return;const n=l(2,0),r=e.getGeometryType();let i=0;r===h.type?i=1:r===_.type||r===d.type?i=e.getPathCount():T("not implemented"),n.resize(e.getPointCount(),0);let s=0;for(let a=0;a<i;++a){const i=t.read(s);s++;const o=s+i;let u=0,m=0;r===h.type?u=e.getPointCount():r===_.type||r===d.type?(u=e.getPathSize(a),m=e.getPathStart(a)):T("not implemented");for(let e=0,r=Math.min(i,u);e<r;++e)n.write(m,t.read(s)),s++,m++;s=o}e.getImpl().setAttributeStreamRef(3,n)}function he(e){let t=2*Math.trunc(3*(e+1)/2);return t<8?t=8:t<32&&(t=32),t}function fe(e){let t=Math.trunc(3*(e+1)/2);return t<4?t=4:t<16&&(t=16),t}function pe(e,t,n,r,i){i>=r.size()&&A("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 s=z.getNAN();s.x=r.readDouble(i),s.y=r.readDouble(i+8);const a=r.readInt32(i+16);if(!!(1&a))return e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.assign(s),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,b(e),!1;let o=!!(64&a);const u=!!(128&a);let m=!!(32&a);const l=!!(8&a),c=!!(16&a),d=t.equals(n);return o&&!d&&(o=!1,m=!0),m&&d&&(o=!0,m=!1,s.setCoords(0,0)),o||(u?m?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_interior.assign(s),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0):(e.constructCircularArcThreePoint(t,n,s),d&&l===e.isClockwise()&&e.reverse()):m?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,b(e),e.queryCoord2D(.5,e.m_interior)):y(e,t,n,s,l,c)),o&&(e.m_center.assign(t),e.m_startAngle=s.x,e.m_sweepAngle=s.y,g(e,Number.NaN,l,c),e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.setCoordsPoint2D(t)),e.setProjectionBehavior(0),b(e),!0}function ke(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,g(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,b(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),b(e),!0}function be(e,t,n,r,i){return x(i+32<=r.size()),e.m_cp=E(z,2),e.m_cp[0].x=r.readDouble(i),e.m_cp[0].y=r.readDouble(i+8),e.m_cp[1].x=r.readDouble(i+16),e.m_cp[1].y=r.readDouble(i+24),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y,!0}function ye(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 ge(e,t,n,r,i){const s={segFlag:0,toPointSz:0};let a=r.currentToken();a=r.nextToken();const o=r.currentString(),u=o[0];for((1!==o.length||"a"!==u&&"b"!==u&&"c"!==u&&"n"!==u&&"q"!==u)&&v('failed to parse curve: expecting "a", "b", "n", "q", or "c"'),a=r.nextToken(),2!==a&&v("failed to parse curve: start array is expected for curve parameters"),a=r.nextToken(),2!==a&&v("failed to parse curve: start array is expected for to point"),s.toPointSz=0;4!==r.nextToken();)4===s.toPointSz&&v("failed to parse curve: vertex array cannot have more than 4 elements"),t[s.toPointSz++]=ce(r);s.toPointSz<2&&v("failed to parse curve: vertex array must have at least 2 elements");const m=z.construct(t[0],t[1]),l=z.getNAN();let c=-1,d=-1,_=!1,h=Number.NaN,f=Number.NaN,p=Number.NaN;const k=[z.getNAN(),z.getNAN(),z.getNAN()],b=z.getNAN();if("a"===u){a=r.nextToken(),2!==a&&v("failed to parse curve: start array is expected for center point"),a=r.nextToken();const e=ce(r);a=r.nextToken();const t=ce(r);a=r.nextToken(),4!==a&&v("failed to parse curve: end array is expected for center point"),l.setCoords(e,t),a=r.nextToken(),c=r.currentInt32Value(),a=r.nextToken(),d=r.currentInt32Value(),a=r.nextToken(),4!==a?(_=!1,h=ce(r),a=r.nextToken(),f=ce(r),a=r.nextToken(),p=ce(r),a=r.nextToken(),4!==a&&v("failed to parse curve: end array is expected for curve parameters")):_=!0,s.segFlag=4}else if("b"===u){for(let e=0;e<2;e++){a=r.nextToken(),2!==a&&v("failed to parse curve: start array is expected for control point"),a=r.nextToken();const t=ce(r);a=r.nextToken();const n=ce(r);a=r.nextToken(),4!==a&&v("failed to parse curve: end array is expected for control point"),k[e].setCoords(t,n)}a=r.nextToken(),4!==a&&v("failed to parse curve: end array is expected for curve parameters"),s.segFlag=2}else if("n"===u){{a=r.nextToken(),2!==a&&v("failed to parse curve: start array is expected for control point"),a=r.nextToken();const e=ce(r);a=r.nextToken();const t=ce(r);a=r.nextToken(),4!==a&&v("failed to parse curve: end array is expected for control point"),k[0].setCoords(e,t)}a=r.nextToken();const e=ce(r);a=r.nextToken();const t=ce(r);a=r.nextToken();const n=ce(r);k[1].setCoords(e,t),k[2].setCoords(n,n),a=r.nextToken(),4!==a&&v("failed to parse curve: end array is expected for curve parameters"),s.segFlag=8}else if("q"===u){for(let e=0;e<1;e++){a=r.nextToken(),2!==a&&v("failed to parse curve: start array is expected for control point"),a=r.nextToken();const t=ce(r);a=r.nextToken();const n=ce(r);a=r.nextToken(),4!==a&&v("failed to parse curve: end array is expected for control point"),k[e].setCoords(t,n)}a=r.nextToken(),4!==a&&v("failed to parse curve: end array is expected for curve parameters"),s.segFlag=16}else{a=r.nextToken(),2!==a&&v("failed to parse curve: start array is expected for interior point"),a=r.nextToken();const e=ce(r);a=r.nextToken();const t=ce(r);a=r.nextToken(),4!==a&&v("failed to parse curve: end array is expected for interior point"),b.setCoords(e,t),a=r.nextToken(),4!==a&&v("failed to parse curve: end array is expected for curve parameters"),s.segFlag=4}if(a=r.nextToken(),3!==a&&v("failed to parse curve: end object is expected for curve"),"a"===u)if(e.createEllipticArc(),_){const t=!0;Ne(e.get(),n,m,l,t,c,d)}else Te(e.get(),n,m,l,c,d,h,f,p);else if("b"===u)e.createCubicBezier(),ve(e.get(),n,m,k);else if("n"===u)e.createQuadraticRationalBezier(),xe(e.get(),n,m,k[0],k[1].x,k[1].y,k[2].x);else if("q"===u)e.createQuadraticBezier(),e.get().construct(n,k[0],m);else{e.createEllipticArc();const t=!1;Ne(e.get(),n,m,b,t,-1,-1)}return s}function Ne(e,t,n,r,i,s,a){e.dropAllAttributes();const o=20,u=new ArrayBuffer(o),m=new ie({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,pe(e,t,n,m,0)}function Te(e,t,n,r,i,s,a,o,u){e.dropAllAttributes();const m=44,l=new ArrayBuffer(m),c=new ie({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,ke(e,t,n,c,0)}function ve(e,t,n,r){e.dropAllAttributes();const i=32,s=new ArrayBuffer(i),a=new ie({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,be(e,t,n,a,0)}function xe(e,t,n,r,i,s,a){e.dropAllAttributes();const o=40,u=new ArrayBuffer(o),m=new ie({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,ye(e,t,n,m,0)}function Ae(e,t,n,r,i){const s=e.getGeometryType();if(s===w.enumEllipticArc)return Se(e,t,n,r,i);if(s===w.enumBezier)return we(e,t,n,r,i);if(s===w.enumRationalBezier2)return Ce(e,t,n,r,i);if(s===w.enumBezier2){const s=new p;return s.constructFromQuadraticSegment(e),we(s,t,n,r,i)}C("")}function Se(e,t,n,r,i){x(!k(e));const s=e.getEndXY(),a=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!n;let u=Number.NaN,m=Number.NaN;if(a&&(u=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),e.isDegenerateToLine()||e.isDegenerate(0))return De(a,o,s.x,s.y,u,m,r,i),!0;const l=0===e.projectionBehavior(),c=!!l&&e.isClosed();if(l&&!c)i.startObject(),i.addFieldName("c"),i.startArray(),De(a,o,s.x,s.y,u,m,r,i),Fe(e.m_interior.x,e.m_interior.y,17,i),i.endArray(),i.endObject();else if(l){i.startObject(),i.addFieldName("a"),i.startArray(),De(a,o,s.x,s.y,u,m,r,i);const t=0,n=0;Fe(e.m_center.x+t,e.m_center.y+n,17,i);const l=!e.isMajor();i.addInt32(l?1:0);const c=e.isClockwise();i.addInt32(c?1:0),i.endArray(),i.endObject()}else{i.startObject(),i.addFieldName("a"),i.startArray(),De(a,o,s.x,s.y,u,m,r,i);const t=e;Fe(t.m_center.x,t.m_center.y,17,i);const n=!t.isMajor();i.addInt32(n?1:0);const l=t.isClockwise();i.addInt32(l?1:0),i.addDouble(t.m_rotation,17),i.addDouble(t.m_semiMajorAxis,17),i.addDouble(t.m_minorMajorRatio,17),i.endArray(),i.endObject()}return!1}function we(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(),De(a,o,s.x,s.y,u,m,r,i),Fe(e.m_cp[0].x,e.m_cp[0].y,r,i),Fe(e.m_cp[1].x,e.m_cp[1].y,r,i),i.endArray(),i.endObject(),!1}function Ce(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(),De(a,o,s.x,s.y,u,m,r,i),Fe(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 De(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 Fe(e,t,n,r){r.startArray(),r.addDouble(e,n),r.addDouble(t,n),r.endArray()}class je{getOperatorType(){return 10405}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,r,i,s){ze(e,t,n,r)}exportSpatialReference(e,t,n,r){x(0)}exportProjectionTransformation(e,t,n,r){x(0)}exportDatumTransformation(e,t,n,r){x(0)}static geometryTypeToString(e){return x(0),""}}function ze(e,t,n,r,i){if(t||n){if(r.startObject(),null!==t){switch(t.getGeometryType()){case w.enumPolygon:Oe(!0,e,t,r);break;case w.enumPolyline:Oe(!1,e,t,r);break;case w.enumMultiPoint:Ie(e,t,r);break;case w.enumPoint:Ee(e,t,r);break;case w.enumEnvelope:Pe(e,t,r);break;case w.enumMultipatch:x(0);break;default:T("exportToJSON")}}null!==n&&(r.addFieldName("spatialReference"),Ve(e,n,r)),r.endObject()}}function Oe(e,t,n,r){const i=n.getImpl(),s=!!(2&t),a=!!(4&t),o=!!(8&t),u=i.hasAttribute(1)&&!s,m=i.hasAttribute(2)&&!a,l=i.hasAttribute(3)&&!o,d=i.hasNonLinearSegments();u&&(r.addFieldName("hasZ"),r.addBool(!0)),m&&(r.addFieldName("hasM"),r.addBool(!0)),e?d?r.addFieldName("curveRings"):r.addFieldName("rings"):d?r.addFieldName("curvePaths"):r.addFieldName("paths");let _=null;const h=[];if(n.isEmpty())r.startArray(),r.endArray();else{const e=17-(31&t>>13);r.startArray();const o=n.getPathCount();let p=0;const k=i.getAttributeStreamRef(0);let b=null,y=null,g=null;const N=new f;let T=null,v=null,x=null;d&&(T=i.getSegmentFlagsStreamRef(),v=i.getSegmentIndexStreamRef(),x=i.getSegmentDataStreamRef()),u&&(b=i.getAttributeStreamRef(1)),m&&(y=i.getAttributeStreamRef(2)),l&&(g=i.getAttributeStreamRef(3),_=c(3,0));for(let t=0;t<o;t++){r.startArray(),l&&h.push(0);const i=n.getPathEnd(t);if(p===i){r.endArray();continue}const o=n.isClosedPath(t);let c=k.read(2*p),d=k.read(2*p+1),f=u?b.read(p):Number.NaN,A=m?y.read(p):Number.NaN,S=l?g.read(p):0;Re(u,m,c,d,f,A,e,r);let w=1;l&&(_.add(S),h[h.length-1]++);const D=c,F=d,j=f,z=A,O=S;let I=!1,E=0,P=Number.NaN,B=Number.NaN,V=0;for(let t=p+1,n=p,R=o?i+1:i;t<R;t++,n++){const o=null!==T?31&T.read(n):1;let p,R;if(t<i?(p=k.read(2*t),R=k.read(2*t+1),u&&(P=b.read(t)),m&&(B=y.read(t)),l&&(V=g.read(t))):(p=D,R=F,P=j,B=z,V=O),1!==o){I=!0,4===o?N.createEllipticArc():2===o?N.createCubicBezier():16===o?N.createQuadraticBezier():8===o?N.createQuadraticRationalBezier():C("JSON export.unsupported curve");const t=N.get(),i=v.read(n);t.setStartXYCoords(c,d),t.setEndXYCoords(p,R),u&&(t.setStartAttribute(1,0,f),t.setEndAttribute(1,0,P)),m&&(t.setStartAttribute(2,0,A),t.setEndAttribute(2,0,B)),t.readFromBufferStream(x,i);Ae(N.get(),s,a,e,r)&&E++}else Re(u,m,p,R,P,B,e,r);l&&(_.add(V),h[h.length-1]++),w++,c=p,d=R,f=P,A=B,S=V}I&&0===E||(w<2&&E<1&&(Re(u,m,c,d,f,A,e,r),w++,l&&(_.add(S),h[h.length-1]++)),o&&w<3&&E<2&&(Re(u,m,D,F,j,z,e,r),w++,c=D,d=F,f=j,A=z,S=O,l&&(_.add(O),h[h.length-1]++))),r.endArray(),p=i}r.endArray()}if(l){r.addFieldName("ids"),r.startArray();let e=0;for(let t=0,n=h.length;t<n;++t){const n=h[t];x(0===n||null!==_&&e+n<=_.size()),r.startArray();for(let t=0;t<n;++t)r.addInt32(_.read(e)),e++;r.endArray()}r.endArray()}}function Ie(e,t,n){const r=t.getImpl(),i=r.hasAttribute(1)&&!(2&e),s=r.hasAttribute(2)&&!(4&e),a=r.hasAttribute(3)&&!(8&e);i&&(n.addFieldName("hasZ"),n.addBool(!0)),s&&(n.addFieldName("hasM"),n.addBool(!0)),n.addFieldName("points");const o=t.getPointCount();if(t.isEmpty())n.startArray(),n.endArray();else{const t=17-(31&e>>13);n.startArray();const a=r.getAttributeStreamRef(0);let u=null,m=null;i&&(u=r.getAttributeStreamRef(1)),s&&(m=r.getAttributeStreamRef(2));for(let e=0;e<o;e++){const r=a.read(2*e),o=a.read(2*e+1);let l=Number.NaN,c=Number.NaN;i&&(l=u.read(e)),s&&(c=m.read(e)),Re(i,s,r,o,l,c,t,n)}n.endArray()}if(a){let e=null;r.isEmpty()||(e=r.getAttributeStreamRef(3)),x(0===o||null!==e&&e.size()>=o),n.addFieldName("ids"),n.startArray();for(let t=0;t<o;t++)n.addInt32(e.read(t));n.endArray()}}function Ee(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 Pe(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 Be(e,t,n){n.startObject();const r=t.getID();r<=0&&v("cannot export unit that has no valid WKID"),n.addFieldName("uwkid"),n.addInt32(r),n.endObject()}function Ve(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"),Be(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 W;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 Re(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 Me={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 Ue{constructor(e){this.m_functionStack=[],this.m_pushPositions=[],this.m_utf8Decoder=new TextDecoder("utf-8",{fatal:!0}),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?C("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_(){C("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){C("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 x(0),""}childrenAsString(){return x(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"}v("invalid token")}toUTF8_(e,t){let n=0,r=e;for(;t.charCodeAt(r)===Me.s_backslash&&t.charCodeAt(r+1)===Me.s_u;)n++,r+=6;r=e;const i=new Uint8Array(n);let s=0;for(;t.charCodeAt(r)===Me.s_backslash&&t.charCodeAt(r+1)===Me.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)!==Me.s_backslash)r++;else{switch(r>0&&(e+=i.slice(t,t+r)),i.charCodeAt(++s)){case Me.s_doubleQuote:e+='"';break;case Me.s_u:{const{u8s:t,end:n}=this.toUTF8_(s-1,i);s=n-1,e+=t;break}case Me.s_backslash:e+="\\";break;case Me.s_forwardslash:e+="/";break;case Me.s_b:e+="\b";break;case Me.s_f:e+="\f";break;case Me.s_n:e+="\n";break;case Me.s_r:e+="\r";break;case Me.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&&v("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&&v("invalid token")}const n=Number.parseFloat(e);if(6===this.m_currentTokenType)Number.isNaN(n)&&v("invalid token");else if(Number.isNaN(n))return Number.NaN;return n}currentInt32Value(){8!==this.m_currentTokenType&&6!==this.m_currentTokenType&&v("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&&v("invalid token"));const n=parseInt(e);return Number.isNaN(n)&&v("invalid token"),n}currentInt64Value(){return x(0),0n}currentBoolValue(){return x(0),!1}isError(){return 0}JSONString(){return x(0),""}pushPosition(){return x(0),!1}popPosition(){return x(0),!1}skipCStyleComments_(){x(0)}skipCppStyleComments_(){x(0)}skipComments_(){this.m_prepSubstr();let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&v("invalid token"),e=this.m_peekChar(),e===Me.s_asterisk?this.skipCStyleComments_():e===Me.s_forwardslash?this.skipCppStyleComments_():v("invalid token")}skipWhiteSpace_(){let e;do{this.m_eof()&&v("invalid token");let t=this.m_peekChar();for(;t>=9&&t<=13||32===t;)this.m_increment(),this.m_eof()&&v("invalid token"),t=this.m_peekChar();t===Me.s_forwardslash?(this.m_startToken=this.m_endToken,e=!0,this.skipComments_()):e=!1}while(e)}rightBracket_(){return this.m_peekChar()===Me.s_endArray&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=4,!0)}rightBrace_(){return this.m_peekChar()===Me.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()&&v("invalid token");let e=this.m_peekChar();for(;e!==Me.s_doubleQuote;){const t=e===Me.s_backslash;if(this.m_stepOverChar(),this.m_eof()&&v("invalid token"),e=this.m_peekChar(),t)if(this.m_bHasEscapes=!0,e===Me.s_doubleQuote||e===Me.s_backslash||e===Me.s_forwardslash||e===Me.s_b||e===Me.s_f||e===Me.s_n||e===Me.s_r||e===Me.s_t)this.m_stepOverChar(),this.m_eof()&&v("invalid token"),e=this.m_peekChar();else if(e===Me.s_u)for(let n=0;n<4;n++)this.m_stepOverChar(),this.m_eof()&&v("invalid token"),e=this.m_peekChar(),e>=Me.s_zero&&e<=Me.s_nine||e>=Me.s_a&&e<=Me.s_f||e>=Me.s_A&&e<=Me.s_F||v("invalid token");else v("invalid token")}this.m_stepOverChar()}comma_(){return this.m_peekChar()===Me.s_comma&&(this.m_increment(),!0)}colon_(){return this.m_peekChar()===Me.s_colon&&(this.m_increment(),!0)}fieldNameEnd_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.colon_()?(this.skipWhiteSpace_(),this.value_()):v("invalid token")}fieldNameStart_(){this.m_startToken=this.m_endToken;this.m_peekChar()!==Me.s_doubleQuote&&v("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():v("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():v("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()!==Me.s_zero?this.digits_():this.m_stepOverChar()}digits_(){let e=this.m_peekChar();do{this.m_stepOverChar(),this.m_eof()&&v("invalid token"),e=this.m_peekChar()}while(e>=Me.s_zero&&e<=Me.s_nine)}frac_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&v("invalid token"),e=this.m_peekChar(),e>=Me.s_zero&&e<=Me.s_nine||v("invalid token"),this.digits_()}exp_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&v("invalid token"),e=this.m_peekChar(),e!==Me.s_plus&&e!==Me.s_minus||(this.m_stepOverChar(),this.m_eof()&&v("invalid token"),e=this.m_peekChar()),e>=Me.s_zero&&e<=Me.s_nine||v("invalid token"),this.digits_()}valueNumber_(){this.m_prepSubstr();let e=!1,t=this.m_peekChar();if(t===Me.s_minus?(this.m_stepOverChar(),this.m_eof()&&v("invalid token"),t=this.m_peekChar(),e=!0,t>=Me.s_zero&&t<=Me.s_nine||v("invalid token"),this.int_()):this.int_(),t=this.m_peekChar(),t===Me.s_period)this.m_currentTokenType=7,this.frac_(),t=this.m_peekChar(),t!==Me.s_e&&t!==Me.s_E||this.exp_();else if(t===Me.s_e||t===Me.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&&v("invalid token"),"null"!==e&&v("invalid token"),this.m_currentTokenType=10}valueTrue_(){const{s:e,bDone:t}=this.m_get(5);t&&v("invalid token"),"true"!==e&&v("invalid token"),this.m_currentTokenType=11}valueFalse_(){const{s:e,bDone:t}=this.m_get(6);t&&v("invalid token"),"false"!==e&&v("invalid token"),this.m_currentTokenType=12}valueNan_(){const{s:e,bDone:t}=this.m_get(4);t&&v("invalid token"),"NaN"!==e&&v("invalid token"),this.m_currentTokenType=7}value_(){this.m_startToken=this.m_endToken;const e=this.m_peekChar();e===Me.s_beginObject?this.valueStartObject_():e===Me.s_beginArray?this.valueStartArray_():e===Me.s_doubleQuote?this.valueString_():e===Me.s_minus||e>=Me.s_zero&&e<=Me.s_zero+9?this.valueNumber_():e===Me.s_n?this.valueNull_():e===Me.s_t?this.valueTrue_():e===Me.s_f?this.valueFalse_():e===Me.s_N?this.valueNan_():v("invalid token")}start_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.m_functionStack.push(()=>this.accept_());const e=this.m_peekChar();e!==Me.s_beginObject&&e!==Me.s_beginArray&&v("invalid token"),this.value_()}accept_(){this.m_startToken=this.m_endToken,this.m_currentTokenType=0}}class We{getOperatorType(){return 10404}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,r,i,s,a){let o;"string"==typeof n?(o=new Ue({jsonString:n}),o.nextToken()):o=n,1!==o.currentToken()&&v("failed to import map geometry: start of object is expected");const u=se(t,e,o,r,i);return new G(u)}importSpatialReference(e){const t=oe(e);return null===t&&T("failed to import spatial reference"),t}importProjectionTransformation(e,t){return x(0),{}}importDatumTransformation(e,t){return x(0),{}}static stringToGeometryType(e){return(e=e.toLowerCase()).startsWith("esrigeometry")||v("string_to_geometry_type"),e.endsWith("point")?w.enumPoint:e.endsWith("envelope")?w.enumEnvelope:e.endsWith("multipoint")?w.enumMultiPoint:e.endsWith("polyline")?w.enumPolyline:e.endsWith("polygon")?w.enumPolygon:void v("string_to_geometry_type")}}const Xe=new re,Ge=new je,Le=new We;function Ye(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function Ke(e,t=!1){if(!t&&(q(e)||J(e)||Z(e)||Q(e))){const t=new G;return t.setGeometry(H(Y(e))),t}const n=new ne(e,{strict:!1});return n.nextToken(),Le.execute(0,w.enumUnknown,n,!0,!1)}function qe(e){let t=null;return[e.map(e=>{if(null==t){const n=Je(e);return t=n.getSpatialReference(),n.getGeometry()}return Ze(e)}),t]}function Je(e){const t=Ke(e),n=He(e.spatialReference);return n&&t.setSpatialReference(n),t}function Ze(e){return Ke(e).getGeometry()}function Qe(e){return Ke(e,!0).getGeometry()}function He(e){if(null==e)return null;let t=!1;if(e instanceof K){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 ne(e,{strict:!1});n.nextToken();const r=Le.importSpatialReference(n);return 0===r.getCoordinateSystemType()?null:r}function $e(e,t){if(e instanceof G&&(t=e.getSpatialReference(),e=e.getGeometry()),null==e||e.isEmpty())return null;switch(e.getGeometryType()){case w.enumPoint:case w.enumMultiPoint:case w.enumPolyline:case w.enumPolygon:{const n=L(e,et(t)??void 0).toGeometryJSON();return null==n.spatialReference&&delete n.spatialReference,n}}return Xe.reset(),Ge.execute(0,e,t??null,Xe),Xe.getObject()}function et(e){return null==e||0===e.getCoordinateSystemType()?null:(Xe.reset(),Ge.execute(0,null,e,Xe),Xe.getObject().spatialReference)}export{qe as fromGeometries,Je as fromGeometry,Ze as fromGeometryToGXGeometry,Qe as fromGeometryToGXGeometryUsingImportOperator,He as fromSpatialReference,Ye as getSpatialReference,$e as toGeometry,et as toSpatialReference};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{$ as e,a0 as t,a1 as n,y as s,x as a,v as r,a2 as i,A 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};
5
+ import"tslib";import{D as e,E as t,F as n,b as s,a as r,c as a,G as i,m as o}from"../../../chunks/SpatialReference.js";import"../../../chunks/Point2D.js";import"../../../chunks/Envelope.js";import"../../../chunks/Geometry.js";import{Envelope2D as c}from"../../../chunks/Envelope2D.js";function p(c,p,m){let u,l;if(m?.geographicTransformation){if(m.geographicTransformation.steps?.length){const s=new e;s.setInputSpatialReference(c),s.setOutputSpatialReference(p);for(const e of m.geographicTransformation.steps){let r;r=e.wkid?t(e.wkid,e.isInverse):n(e.wkt,e.isInverse),s.add(r)}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,p,f(m.areaOfInterestExtent));return u?r(c,p,u,l):a(c,p)}function f(e){return c.construct(e.xmin,e.ymin,e.xmax,e.ymax)}export{p as createProjectionTransformation};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
+ */
5
+ import t from"../../../core/Error.js";import{isGeometryWithZ as o,getJsonType as r}from"../../support/jsonTypeUtils.js";import{getGeometryZScaler as e}from"../../support/zscale.js";function s(t,s,n){let p;for(const c of t)if(c&&o(c)&&!("vertexAttributes"in c)){if(!p){null==s.vcsWkid&&null==n.vcsWkid||i(s,n);const t="type"in c?c.type:r(c);if(p=e(t,s,n),!p)return}p(c)}}class n extends t{constructor(){super("projection:z-unsupported","projection of z values is unsupported between different vertical coordinate systems")}}function i({vcsWkid:t},{vcsWkid:o}){if((t??null)!==(o??null))throw new n}export{n as ProjectZUnsupportedError,s as applyZConversionAfterProjection,i as validateVCSForZConversion};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{create as e}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{canProjectWithoutEngine as r,tryProjectWithZConversion as t,initializeProjection as o}from"../projectionUtils.js";import{projectBuffer as i}from"./projectBuffer.js";function n(e,o,n){if(r(e.spatialReference,n))return f[0]=e.x,f[1]=e.y,f[2]=e.z??0,i(f,e.spatialReference,0,o,n,0);const c=t(e,n);return!!c&&(o[0]=c.x,o[1]=c.y,o[2]=c.z??0,!0)}async function c(e,r,t,i){return await o(e.spatialReference,t,null,i),n(e,r,t)}const f=e();export{n as projectPointToVector,c as projectPointToVectorAsync};
5
+ import{create as e}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{canProjectWithoutEngine as r,tryProject as t,initializeProjection as o}from"../projectionUtils.js";import{projectBuffer as i}from"./projectBuffer.js";function n(e,o,n){if(r(e.spatialReference,n))return f[0]=e.x,f[1]=e.y,f[2]=e.z??0,i(f,e.spatialReference,0,o,n,0);const c=t(e,n);return!!c&&(o[0]=c.x,o[1]=c.y,o[2]=c.z??0,!0)}async function c(e,r,t,i){return await o(e.spatialReference,t,null,i),n(e,r,t)}const f=e();export{n as projectPointToVector,c as projectPointToVectorAsync};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import n from"../core/Error.js";import{throwIfAborted as e,waitTick as r}from"../core/promiseUtils.js";import{trackAccess as t}from"../core/accessorSupport/tracking.js";import{SimpleObservable as o}from"../core/accessorSupport/tracking/SimpleObservable.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{assertNotMeshes as s,assertNotMesh as a}from"./asserts.js";import{isSphericalECEF as l,isSphericalPCPF as u}from"./ellipsoidUtils.js";import f from"./Extent.js";import c from"./Geometry.js";import p from"./Multipoint.js";import m from"./Point.js";import g from"./Polygon.js";import h from"./Polyline.js";import d from"./SpatialReference.js";import j from"./operators/support/GeographicTransformation.js";import{projectBuffer as R}from"./projection/projectBuffer.js";import{getProjector as x}from"./projection/projectors.js";import{projectXYZToVector as y}from"./projection/projectXYZToVector.js";import{equals as w,isValid as S,isWGS84 as z,isWebMercator as M,isCGCS2000 as T}from"./support/spatialReferenceUtils.js";import{getGeometryZScaler as Z}from"./support/zscale.js";let k=null,v=null,P=null,A=null,O={};const E=new o;function G(){return!!(v?.isLoaded()&&P?.isLoaded()&&A?.isLoaded())}function U(){return!!G()||(t(E),L(),!1)}function b(n,e){return!n||!e||(J(n,e)||U())}function I(n,e){return!J(n,e)&&!G()}async function L(n){null==k&&(k=Promise.all([import("./operators/projectOperator.js").then(n=>(v=n,v.load())),import("./operators/json/projectOperator.js").then(n=>(P=n,P.load())),import("./operators/support/geographicTransformationUtils.js").then(n=>(A=n,A.load()))])),await k,e(n),E.notify()}function W(n,e,r){return Array.isArray(n)?0===n.length?[]:(s(n),B(n,n[0].spatialReference,e,r)):(a(n),B([n],n.spatialReference,e,r)[0])}function B(n,e,r,t){if(null==e||null==r)return n;if(J(e,r,t))return n.map(n=>Q(n,e,r));if(null==t?.geographicTransformation&&l(e)){return n.map(n=>Q(n,e,d.WGS84)).map(n=>F(n,r))}if(null==t?.geographicTransformation&&l(r)){return n.map(n=>F(n,d.WGS84)).map(n=>Q(n,d.WGS84,r))}if(!G())throw new q;if(!t?.geographicTransformation)if(t?.extendedParams)t={...t,geographicTransformation:A.getTransformation(e,r,t.areaOfInterestExtent)||new j};else if(!t?.areaOfInterestExtent){const n=V(e,r);let o=O[n];o||(o=A.getTransformation(e,r)||new j,O[n]=o),t={geographicTransformation:o}}return n[0].spatialReference||(n[0].spatialReference=e),n[0]instanceof c?v.executeMany(n,r,t):P.executeMany(n,r,t)}function V(n,e){return[n.wkid?.toString()??"-1",n.wkt?.toString()??"",n.wkt2?.toString()??"",e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??""].join()}function X(n,e){const r=Y([n],e);return null!=r.pending?{pending:r.pending,geometry:null}:null!=r.geometries?{pending:null,geometry:r.geometries[0]}:{pending:null,geometry:null}}function Y(n,e){if(!G())for(const r of n)if(null!=r&&!w(r.spatialReference,e)&&S(r.spatialReference)&&S(e)&&!J(r.spatialReference,e))return t(E),{pending:L(),geometries:null};return{pending:null,geometries:n.map(n=>null==n?null:w(n.spatialReference,e)?n:S(n.spatialReference)&&S(e)?F(n,e):null)}}class q extends n{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function C(){k=null,v=null,P=null,A=null,O={}}const D={get loadPromise(){return k}};function F(n,e){try{const r=W(n,e);if(null==r)return null;"xmin"in n&&"xmin"in r&&(r.zmin=n.zmin,r.zmax=n.zmax);const t=Z(r.type,n.spatialReference,e);return null!=t&&t(r),r}catch(r){if(!(r instanceof q))throw r;return null}}async function H(n,e,r){const t=n.spatialReference;return null!=t&&null!=e&&await N(t,e,null,r),F(n,e)}function J(n,e,r){return!(r?.areaOfInterestExtent||r?.extendedParams||r?.geographicTransformation)&&(!!w(n,e)||S(n)&&S(e)&&!!x(n,e))}function K(n,e){if(w(n,e))return!0;if(!S(n)||!S(e))return!1;const r=z(n)||M(n)||T(n),t=z(e)||M(e)||T(e);return r&&t}async function N(n,e,t,o){if(G())return r(o);if(Array.isArray(n)){for(const{source:r,dest:i,options:s}of n)if(r&&i&&!J(r,i,s))return L(o)}else if(n&&e&&!J(n,e,t))return L(o);return r(o)}function Q(n,e,r){return n?"x"in n?_(n,e,new m,r,0):"xmin"in n?ln(n,e,new f,r,0):"rings"in n?sn(n,e,new g,r,0):"paths"in n?tn(n,e,new h,r,0):"points"in n?en(n,e,new p,r,0):null:null}function $(n,e,r=e.spatialReference,t=0){return null!=r&&null!=n.spatialReference&&null!=_(n,n.spatialReference,e,r,t)}function _(n,e,r,t,o){fn[0]=n.x,fn[1]=n.y;const i=n.z;return fn[2]=void 0!==i?i:o,R(fn,e,0,fn,t,0)?(r.x=fn[0],r.y=fn[1],r.spatialReference=t,void 0!==i||u(t)?(r.z=fn[2],r.hasZ=!0):(r.z=void 0,r.hasZ=!1),void 0===n.m?(r.m=void 0,r.hasM=!1):(r.m=n.m,r.hasM=!0),r):null}function nn(n,e,r=e.spatialReference,t=0){return null!=n.spatialReference&&null!=r&&null!=en(n,n.spatialReference,e,r,t)}function en(n,e,r,t,o){const{points:i,hasZ:s,hasM:a}=n,l=[],f=i.length,c=[];for(const u of i)c.push(u[0],u[1],s?u[2]:o);if(!R(c,e,0,c,t,0,f))return null;const p=s||u(t);for(let u=0;u<f;++u){const n=3*u,e=c[n],r=c[n+1];p&&a?l.push([e,r,c[n+2],i[u][3]]):p?l.push([e,r,c[n+2]]):a?l.push([e,r,i[u][2]]):l.push([e,r])}return r.points=l,r.spatialReference=t,r.hasZ=s,r.hasM=a,r}function rn(n,e,r=e.spatialReference,t=0){return null!=n.spatialReference&&null!=r&&null!=tn(n,n.spatialReference,e,r,t)}function tn(n,e,r,t,o){const{paths:i,hasZ:s,hasM:a}=n,l=[];if(!un(i,s??!1,a??!1,e,l,t,o))return null;const f=s||u(t);return r.paths=l,r.spatialReference=t,r.hasZ=f,r.hasM=a,r}function on(n,e,r=e.spatialReference,t=0){return null!=n.spatialReference&&null!=r&&null!=sn(n,n.spatialReference,e,r,t)}function sn(n,e,r,t,o){const{rings:i,hasZ:s,hasM:a}=n,l=[];if(!un(i,s??!1,a??!1,e,l,t,o))return null;const f=s||u(t);return r.rings=l,r.spatialReference=t,r.hasZ=f,r.hasM=a,r}function an(n,e,r=e.spatialReference,t=0){return null!=n.spatialReference&&null!=r&&null!=ln(n,n.spatialReference,e,r,t)}function ln(n,e,r,t,o){const{xmin:i,ymin:s,xmax:a,ymax:l,hasZ:f,hasM:c}=n,p=f?n.zmin:o;if(!y(i,s,p,e,fn,t))return null;const m=f||u(t);r.xmin=fn[0],r.ymin=fn[1],m&&(r.zmin=fn[2]);const g=f?n.zmax:o;return y(a,l,g,e,fn,t)?(r.xmax=fn[0],r.ymax=fn[1],m&&(r.zmax=fn[2]),c&&(r.mmin=n.mmin,r.mmax=n.mmax),r.spatialReference=t,r):null}function un(n,e,r,t,o,i,s=0){const a=new Array;for(const u of n)for(const n of u)a.push(n[0],n[1],e?n[2]:s);if(!R(a,t,0,a,i,0))return!1;let l=0;o.length=0;const f=e||u(i);for(const u of n){const n=new Array;for(const e of u)f&&r?n.push([a[l++],a[l++],a[l++],e[3]]):f?n.push([a[l++],a[l++],a[l++]]):r?(n.push([a[l++],a[l++],e[2]]),l++):(n.push([a[l++],a[l++]]),l++);o.push(n)}return!0}const fn=i();export{J as canProjectWithoutEngine,N as initializeProjection,K as isEqualBaseGCS,G as isLoaded,U as isLoadedOrLoad,b as isLoadedOrLoadFor,L as load,W as project,an as projectExtent,B as projectMany,nn as projectMultipoint,X as projectOrLoad,Y as projectOrLoadMany,$ as projectPoint,on as projectPolygon,rn as projectPolyline,H as projectWithZConversion,Q as projectWithoutEngine,I as requiresLoad,D as test,F as tryProjectWithZConversion,C as unload};
5
+ import n from"../core/Error.js";import{throwIfAborted as e,waitTick as r}from"../core/promiseUtils.js";import{trackAccess as t}from"../core/accessorSupport/tracking.js";import{SimpleObservable as o}from"../core/accessorSupport/tracking/SimpleObservable.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{assertNotMeshes as s,assertNotMesh as a}from"./asserts.js";import{isSphericalECEF as l,isSphericalPCPF as u}from"./ellipsoidUtils.js";import f from"./Extent.js";import c from"./Geometry.js";import p from"./Multipoint.js";import m from"./Point.js";import g from"./Polygon.js";import h from"./Polyline.js";import d from"./SpatialReference.js";import j from"./operators/support/GeographicTransformation.js";import{projectBuffer as y}from"./projection/projectBuffer.js";import{getProjector as R}from"./projection/projectors.js";import{projectXYZToVector as x}from"./projection/projectXYZToVector.js";import{equals as w,isValid as S,isWGS84 as M,isWebMercator as v,isCGCS2000 as z}from"./support/spatialReferenceUtils.js";let T=null,A=null,Z=null,k=null,b={};const P=new o;function G(){return!!(A?.isLoaded()&&Z?.isLoaded()&&k?.isLoaded())}function O(){return!!G()||(t(P),D(),!1)}function E(n,e){return!n||!e||(H(n,e)||O())}function C(n,e){return!H(n,e)&&!G()}async function D(n){null==T&&(T=Promise.all([import("./operators/projectOperator.js").then(n=>(A=n,A.load())),import("./operators/json/projectOperator.js").then(n=>(Z=n,Z.load())),import("./operators/support/geographicTransformationUtils.js").then(n=>(k=n,k.load()))])),await T,e(n),P.notify()}function U(n,e,r){return Array.isArray(n)?0===n.length?[]:(s(n),W(n,n[0].spatialReference,e,r)):(a(n),W([n],n.spatialReference,e,r)[0])}function W(n,e,r,t){if(null==e||null==r)return n;if(H(e,r,t))return n.map(n=>N(n,e,r));if(null==t?.geographicTransformation&&l(e)){return W(n.map(n=>N(n,e,d.WGS84)),d.WGS84,r,{zConversionDisabled:t?.zConversionDisabled})}if(null==t?.geographicTransformation&&l(r)){return W(n,e,d.WGS84).map(n=>N(n,d.WGS84,r))}if(!G())throw new X;if(!t?.geographicTransformation)if(t?.extendedParams)t={...t,geographicTransformation:k.getTransformation(e,r,t.areaOfInterestExtent)||new j};else if(!t?.areaOfInterestExtent){const n=I(e,r);let o=b[n];o||(o=k.getTransformation(e,r)||new j,b[n]=o),t={geographicTransformation:o,zConversionDisabled:t?.zConversionDisabled}}return n[0].spatialReference||(n[0].spatialReference=e),n[0]instanceof c?A.executeMany(n,r,t):Z.executeMany(n,r,t)}function I(n,e){return[n.wkid?.toString()??"-1",n.wkt?.toString()??"",n.wkt2?.toString()??"",e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??""].join()}function L(n,e,r){try{return U(n,e,r)}catch(t){if(t instanceof X)return null;throw t}}function B(n,e){const r=V([n],e);return null!=r.pending?{pending:r.pending,geometry:null}:null!=r.geometries?{pending:null,geometry:r.geometries[0]}:{pending:null,geometry:null}}function V(n,e,r){if(!G())for(const o of n)if(null!=o&&!w(o.spatialReference,e)&&S(o.spatialReference)&&S(e)&&!H(o.spatialReference,e))return t(P),{pending:D(),geometries:null};return{pending:null,geometries:n.map(n=>null==n?null:w(n.spatialReference,e)?n:S(n.spatialReference)&&S(e)?U(n,e,r):null)}}class X extends n{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function Y(){T=null,A=null,Z=null,k=null,b={}}const q={get loadPromise(){return T}};async function F(n,r,t){if(e(t),!n)return n;const o=V(Array.isArray(n)?n:[n],r,t);if(o.pending)return await o.pending,e(t),F(n,r,t);const i=o.geometries??[];return Array.isArray(n)?i:i[0]}function H(n,e,r){return!(r?.areaOfInterestExtent||r?.extendedParams||r?.geographicTransformation)&&(!!w(n,e)||S(n)&&S(e)&&!!R(n,e))}function J(n,e){if(w(n,e))return!0;if(!S(n)||!S(e))return!1;const r=M(n)||v(n)||z(n),t=M(e)||v(e)||z(e);return r&&t}async function K(n,e,t,o){if(G())return r(o);if(Array.isArray(n)){for(const{source:r,dest:i,options:s}of n)if(r&&i&&!H(r,i,s))return D(o)}else if(n&&e&&!H(n,e,t))return D(o);return r(o)}function N(n,e,r){return n?"x"in n?$(n,e,new m,r,0):"xmin"in n?an(n,e,new f,r,0):"rings"in n?on(n,e,new g,r,0):"paths"in n?rn(n,e,new h,r,0):"points"in n?nn(n,e,new p,r,0):null:null}function Q(n,e,r=e.spatialReference,t=0){return null!=r&&null!=n.spatialReference&&null!=$(n,n.spatialReference,e,r,t)}function $(n,e,r,t,o){un[0]=n.x,un[1]=n.y;const i=n.z;return un[2]=void 0!==i?i:o,y(un,e,0,un,t,0)?(r.x=un[0],r.y=un[1],r.spatialReference=t,void 0!==i||u(t)?(r.z=un[2],r.hasZ=!0):(r.z=void 0,r.hasZ=!1),void 0===n.m?(r.m=void 0,r.hasM=!1):(r.m=n.m,r.hasM=!0),r):null}function _(n,e,r=e.spatialReference,t=0){return null!=n.spatialReference&&null!=r&&null!=nn(n,n.spatialReference,e,r,t)}function nn(n,e,r,t,o){const{points:i,hasZ:s,hasM:a}=n,l=[],f=i.length,c=[];for(const u of i)c.push(u[0],u[1],s?u[2]:o);if(!y(c,e,0,c,t,0,f))return null;const p=s||u(t);for(let u=0;u<f;++u){const n=3*u,e=c[n],r=c[n+1];p&&a?l.push([e,r,c[n+2],i[u][3]]):p?l.push([e,r,c[n+2]]):a?l.push([e,r,i[u][2]]):l.push([e,r])}return r.points=l,r.spatialReference=t,r.hasZ=s,r.hasM=a,r}function en(n,e,r=e.spatialReference,t=0){return null!=n.spatialReference&&null!=r&&null!=rn(n,n.spatialReference,e,r,t)}function rn(n,e,r,t,o){const{paths:i,hasZ:s,hasM:a}=n,l=[];if(!ln(i,s??!1,a??!1,e,l,t,o))return null;const f=s||u(t);return r.paths=l,r.spatialReference=t,r.hasZ=f,r.hasM=a,r}function tn(n,e,r=e.spatialReference,t=0){return null!=n.spatialReference&&null!=r&&null!=on(n,n.spatialReference,e,r,t)}function on(n,e,r,t,o){const{rings:i,hasZ:s,hasM:a}=n,l=[];if(!ln(i,s??!1,a??!1,e,l,t,o))return null;const f=s||u(t);return r.rings=l,r.spatialReference=t,r.hasZ=f,r.hasM=a,r}function sn(n,e,r=e.spatialReference,t=0){return null!=n.spatialReference&&null!=r&&null!=an(n,n.spatialReference,e,r,t)}function an(n,e,r,t,o){const{xmin:i,ymin:s,xmax:a,ymax:l,hasZ:f,hasM:c}=n,p=f?n.zmin:o;if(!x(i,s,p,e,un,t))return null;const m=f||u(t);r.xmin=un[0],r.ymin=un[1],m&&(r.zmin=un[2]);const g=f?n.zmax:o;return x(a,l,g,e,un,t)?(r.xmax=un[0],r.ymax=un[1],m&&(r.zmax=un[2]),c&&(r.mmin=n.mmin,r.mmax=n.mmax),r.spatialReference=t,r):null}function ln(n,e,r,t,o,i,s=0){const a=new Array;for(const u of n)for(const n of u)a.push(n[0],n[1],e?n[2]:s);if(!y(a,t,0,a,i,0))return!1;let l=0;o.length=0;const f=e||u(i);for(const u of n){const n=new Array;for(const e of u)f&&r?n.push([a[l++],a[l++],a[l++],e[3]]):f?n.push([a[l++],a[l++],a[l++]]):r?(n.push([a[l++],a[l++],e[2]]),l++):(n.push([a[l++],a[l++]]),l++);o.push(n)}return!0}const un=i();export{H as canProjectWithoutEngine,K as initializeProjection,J as isEqualBaseGCS,G as isLoaded,O as isLoadedOrLoad,E as isLoadedOrLoadFor,D as load,U as project,F as projectAsync,sn as projectExtent,W as projectMany,_ as projectMultipoint,B as projectOrLoad,V as projectOrLoadMany,Q as projectPoint,tn as projectPolygon,en as projectPolyline,N as projectWithoutEngine,C as requiresLoad,q as test,L as tryProject,Y as unload};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import"../../core/has.js";import"../../core/Logger.js";import"../../core/mathUtils.js";import"../../core/ObjectStack.js";import"../../core/libs/gl-matrix-2/math/mat4.js";import"../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../../chunks/vec32.js";import"../../core/libs/gl-matrix-2/factories/vec3f64.js";import"./aaBoundingRect.js";import"./lineSegment.js";import"./plane.js";import"./ray.js";import"./vector.js";import"./vectorStacks.js";export{B as altitudeAt,A as axisAt,c as cameraFrustumCoverage,q as closestPoint,p as closestPointOnSilhouette,d as copy,k as copyWithoutVerify,a as create,j as distance,y as distance2,z as distanceToSilhouette,l as elevate,g as equals,e as extrusionContainsPoint,h as fromAABoundingRect,f as fromValues,m as getExtent,i as intersectRay,o as intersectRayClosestSilhouette,n as normal,v as projectPoint,x as projectPointLocal,r as rotate,C as setAltitudeAt,s as setExtent,t as transform,D as up,u as updateUnboundedPlane,w as wrap}from"../../chunks/boundedPlane.js";
5
+ import"../../core/has.js";import"../../core/Logger.js";import"../../core/mathUtils.js";import"../../core/ObjectStack.js";import"../../core/libs/gl-matrix-2/math/mat4.js";import"../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../../chunks/vec32.js";import"../../core/libs/gl-matrix-2/factories/vec3f64.js";import"./aaBoundingRect.js";import"./lineSegment.js";import"./plane.js";import"./ray.js";import"./vector.js";import"./vectorStacks.js";export{A as altitudeAt,z as axisAt,a as cameraFrustumCoverage,q as closestPoint,p as closestPointOnSilhouette,c as copy,k as copyWithoutVerify,d as create,j as distance,x as distance2,y as distanceToSilhouette,l as elevate,g as equals,e as extrusionContainsPoint,h as fromAABoundingRect,f as fromValues,m as getExtent,i as intersectRay,o as intersectRayClosestSilhouette,n as normal,t as projectPoint,v as projectPointLocal,r as rotate,B as setAltitudeAt,s as setExtent,C as transform,D as up,u as updateUnboundedPlane,w as wrap}from"../../chunks/boundedPlane.js";
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
+ */
5
+ function n(n){return void 0!==n.xmin&&void 0!==n.ymin&&void 0!==n.xmax&&void 0!==n.ymax}function i(n){return void 0!==n.points}function t(n){return void 0!==n.x&&void 0!==n.y}function e(n){return void 0!==n.paths||void 0!==n.curvePaths}function o(n){return void 0!==n.rings||void 0!==n.curveRings}function r(n){return"object"==typeof n&&"vertexAttributes"in n}function u(r){return r?t(r)?"esriGeometryPoint":e(r)?"esriGeometryPolyline":o(r)?"esriGeometryPolygon":n(r)?"esriGeometryEnvelope":i(r)?"esriGeometryMultipoint":null:null}function l(n){return null!=n&&("hasZ"in n&&n.hasZ||"z"in n&&null!=n.z)}function s(n){return null!=n&&("hasM"in n&&n.hasM||"m"in n&&null!=n.m)}export{u as getJsonType,n as isExtent,s as isGeometryWithM,l as isGeometryWithZ,r as isMesh,i as isMultipoint,t as isPoint,o as isPolygon,e as isPolyline};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import o from"../Extent.js";import n from"../Geometry.js";import r from"../Multipoint.js";import i from"../Point.js";import e from"../Polygon.js";import t from"../Polyline.js";function u(o){return void 0!==o.xmin&&void 0!==o.ymin&&void 0!==o.xmax&&void 0!==o.ymax}function l(o){return void 0!==o.points}function m(o){return void 0!==o.x&&void 0!==o.y}function s(o){return void 0!==o.paths||void 0!==o.curvePaths}function f(o){return void 0!==o.rings||void 0!==o.curveRings}function y(y){return null==y?null:y instanceof n?y:m(y)?i.fromJSON(y):s(y)?t.fromJSON(y):f(y)?e.fromJSON(y):l(y)?r.fromJSON(y):u(y)?o.fromJSON(y):null}function c(o){return o?m(o)?"esriGeometryPoint":s(o)?"esriGeometryPolyline":f(o)?"esriGeometryPolygon":u(o)?"esriGeometryEnvelope":l(o)?"esriGeometryMultipoint":null:null}const v={esriGeometryPoint:i,esriGeometryPolyline:t,esriGeometryPolygon:e,esriGeometryEnvelope:o,esriGeometryMultipoint:r,esriGeometryMultiPatch:e};function p(o){return o&&v[o]||null}function G(o){return null!=o&&("hasZ"in o&&o.hasZ||"z"in o&&null!=o.z)}function d(o){return null!=o&&("hasM"in o&&o.hasM||"m"in o&&null!=o.m)}export{y as fromJSON,p as getGeometryType,c as getJsonType,u as isExtent,d as isGeometryWithM,G as isGeometryWithZ,l as isMultipoint,m as isPoint,f as isPolygon,s as isPolyline};
5
+ import o from"../Extent.js";import r from"../Geometry.js";import t from"../Multipoint.js";import e from"../Point.js";import i from"../Polygon.js";import m from"../Polyline.js";import{isPoint as n,isPolyline as s,isPolygon as l,isMultipoint as f,isExtent as p,getJsonType as y}from"./jsonTypeUtils.js";function u(y){return null==y?null:y instanceof r?y:n(y)?e.fromJSON(y):s(y)?m.fromJSON(y):l(y)?i.fromJSON(y):f(y)?t.fromJSON(y):p(y)?o.fromJSON(y):null}const j={esriGeometryPoint:e,esriGeometryPolyline:m,esriGeometryPolygon:i,esriGeometryEnvelope:o,esriGeometryMultipoint:t,esriGeometryMultiPatch:i};function G(o){return o&&j[o]||null}const P=y;export{u as fromJSON,G as getGeometryType,P as getJsonType};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import e from"../Polyline.js";import n from"../SpatialReference.js";import{isPolygon as t}from"./jsonUtils.js";const r={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new e({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.WebMercator}),minus180Line:new e({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new e({paths:[[[180,-180],[180,180]]],spatialReference:n.WGS84}),minus180Line:new e({paths:[[[-180,-180],[-180,180]]],spatialReference:n.WGS84})}};function i(e,n){return Math.ceil((e-n)/(2*n))}function s(e,n){const t=o(e);for(const r of t)for(const e of r)e[0]+=n;return e}function o(e){return t(e)?e.rings:e.paths}export{r as cutParams,o as getGeometryParts,i as offsetMagnitude,s as updatePolyGeometry};
5
+ import e from"../Polyline.js";import n from"../SpatialReference.js";import{isPolygon as t}from"./jsonTypeUtils.js";const r={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new e({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.WebMercator}),minus180Line:new e({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new e({paths:[[[180,-180],[180,180]]],spatialReference:n.WGS84}),minus180Line:new e({paths:[[[-180,-180],[-180,180]]],spatialReference:n.WGS84})}};function i(e,n){return Math.ceil((e-n)/(2*n))}function s(e,n){const t=o(e);for(const r of t)for(const e of r)e[0]+=n;return e}function o(e){return t(e)?e.rings:e.paths}export{r as cutParams,o as getGeometryParts,i as offsetMagnitude,s as updatePolyGeometry};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{isSerializable as t}from"../../core/support/jsonUtils.js";import{create as i}from"./aaBoundingRect.js";import{getBoundsXY as s}from"./boundsUtils.js";import{closeRings as n}from"./coordsUtils.js";import{isPoint as e,isMultipoint as h,isExtent as o,isPolygon as u,isPolyline as r}from"./jsonUtils.js";import{cutParams as m,updatePolyGeometry as x,offsetMagnitude as l}from"./normalizeUtilsCommon.js";import{getInfo as _,isWebMercator as c}from"./spatialReferenceUtils.js";function p(t){return f(t,!0)}function a(t){return f(t,!1)}function f(i,n){if(null==i)return null;const p=i.spatialReference,a=_(p),f=t(i)?i.toJSON():i;if(!a)return f;const I=c(p)?102100:4326,g=m[I].maxX,v=m[I].minX;if(e(f))return y(f,g,v);if(h(f))return f.points=f.points.map(t=>y(t,g,v)),f;if(o(f))return d(f,a);if(u(f)||r(f)){const t=s(T,f),i={xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3]},e=l(i.xmin,v)*(2*g),h=0===e?f:x(f,e);return i.xmin+=e,i.xmax+=e,i.xmax>g?C(h,g,n):i.xmin<v?C(h,v,n):h}return f}function d(t,i){if(!i)return t;const s=I(t,i).map(t=>t.extent);return s.length<2?s[0]||t:s.length>2?(t.xmin=i.valid[0],t.xmax=i.valid[1],t):{rings:s.map(t=>[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]])}}function y(t,i,s){if(Array.isArray(t)){const n=t[0];if(n>i){const s=l(n,i);t[0]=n+s*(-2*i)}else if(n<s){const i=l(n,s);t[0]=n+i*(-2*s)}}else{const n=t.x;if(n>i){const s=l(n,i);t.x+=s*(-2*i)}else if(n<s){const i=l(n,s);t.x+=i*(-2*s)}}return t}function I(t,i){const s=[],{ymin:n,ymax:e,xmin:h,xmax:o}=t,u=t.xmax-t.xmin,[r,m]=i.valid,{x,frameId:l}=g(t.xmin,i),{x:_,frameId:c}=g(t.xmax,i),p=x===_&&u>0;if(u>2*m){const t={xmin:h<o?x:_,ymin:n,xmax:m,ymax:e},i={xmin:r,ymin:n,xmax:h<o?_:x,ymax:e},u={xmin:0,ymin:n,xmax:m,ymax:e},p={xmin:r,ymin:n,xmax:0,ymax:e},a=[],f=[];v(t,u)&&a.push(l),v(t,p)&&f.push(l),v(i,u)&&a.push(c),v(i,p)&&f.push(c);for(let s=l+1;s<c;s++)a.push(s),f.push(s);s.push(new P(t,[l]),new P(i,[c]),new P(u,a),new P(p,f))}else x>_||p?s.push(new P({xmin:x,ymin:n,xmax:m,ymax:e},[l]),new P({xmin:r,ymin:n,xmax:_,ymax:e},[c])):s.push(new P({xmin:x,ymin:n,xmax:_,ymax:e},[l]));return s}function g(t,i){const[s,n]=i.valid,e=2*n;let h,o=0;return t>n?(h=Math.ceil(Math.abs(t-n)/e),t-=h*e,o=h):t<s&&(h=Math.ceil(Math.abs(t-s)/e),t+=h*e,o=-h),{x:t,frameId:o}}function v(t,i){const{xmin:s,ymin:n,xmax:e,ymax:h}=i;return O(t,s,n)&&O(t,s,h)&&O(t,e,h)&&O(t,e,n)}function O(t,i,s){return i>=t.xmin&&i<=t.xmax&&s>=t.ymin&&s<=t.ymax}function C(t,i,s=!0){const e=!r(t);if(e&&n(t),s){return(new S).cut(t,i)}const h=e?t.rings:t.paths,o=e?4:2,u=h.length,m=-2*i;for(let n=0;n<u;n++){const t=h[n];if(t&&t.length>=o){const i=[];for(const[s,...n]of t)i.push([s+m,...n]);h.push(i)}}return e?t.rings=h:t.paths=h,t}class P{constructor(t,i){this.extent=t,this.frameIds=i}}const T=i();class S{constructor(){this._linesIn=[],this._linesOut=[]}cut(t,i){let s;if(this._xCut=i,t.rings)this._closed=!0,s=t.rings,this._minPts=4;else{if(!t.paths)return null;this._closed=!1,s=t.paths,this._minPts=2}for(const e of s){if(!e||e.length<this._minPts)continue;let t=!0;for(const i of e)t?(this.moveTo(i),t=!1):this.lineTo(i);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),s=[];for(const e of this._linesIn)e&&e.length>=this._minPts&&s.push(e);const n=-2*this._xCut;for(const e of this._linesOut)if(e&&e.length>=this._minPts){for(const t of e)t[0]+=n;s.push(e)}return this._closed?t.rings=s:t.paths=s,t}moveTo(t){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(t[0]),this._moveTo(t[0],t[1],this._prevSide),this._prevPt=t,this._firstPt=t}lineTo(t){const i=this._side(t[0]);if(i*this._prevSide===-1){const s=this._intersect(this._prevPt,t);this._lineTo(this._xCut,s,0),this._prevSide=0,this._lineTo(t[0],t[1],i)}else this._lineTo(t[0],t[1],i);this._prevSide=i,this._prevPt=t}close(){const t=this._firstPt,i=this._prevPt;t[0]===i[0]&&t[1]===i[1]||this.lineTo(t),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(t,i,s){this._closed?(this._lineIn.push([s<=0?t:this._xCut,i]),this._lineOut.push([s>=0?t:this._xCut,i])):(s<=0&&this._lineIn.push([t,i]),s>=0&&this._lineOut.push([t,i]))}_lineTo(t,i,s){this._closed?(j(this._lineIn,s<=0?t:this._xCut,i),j(this._lineOut,s>=0?t:this._xCut,i)):s<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push([t,i])):s>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push([t,i])):this._prevSide<0?(this._lineIn.push([t,i]),this._lineOut.push([t,i])):this._prevSide>0&&(this._lineOut.push([t,i]),this._lineIn.push([t,i]))}_checkClosingPt(t){const i=t.length;i>3&&t[0][0]===this._xCut&&t[i-2][0]===this._xCut&&t[1][0]===this._xCut&&(t[0][1]=t[i-2][1],t.pop())}_side(t){return t<this._xCut?-1:t>this._xCut?1:0}_intersect(t,i){const s=(this._xCut-t[0])/(i[0]-t[0]);return t[1]+s*(i[1]-t[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}function j(t,i,s){const n=t.length;n>1&&t[n-1][0]===i&&t[n-2][0]===i?t[n-1][1]=s:t.push([i,s])}export{S as CutVertical,a as normalizeCentralMeridianForDisplay,p as normalizeCentralMeridianSync};
5
+ import{isSerializable as t}from"../../core/support/jsonUtils.js";import{create as i}from"./aaBoundingRect.js";import{getBoundsXY as s}from"./boundsUtils.js";import{closeRings as n}from"./coordsUtils.js";import{isPoint as e,isMultipoint as h,isExtent as o,isPolygon as u,isPolyline as r}from"./jsonTypeUtils.js";import{cutParams as m,updatePolyGeometry as x,offsetMagnitude as l}from"./normalizeUtilsCommon.js";import{getInfo as _,isWebMercator as c}from"./spatialReferenceUtils.js";function p(t){return f(t,!0)}function a(t){return f(t,!1)}function f(i,n){if(null==i)return null;const p=i.spatialReference,a=_(p),f=t(i)?i.toJSON():i;if(!a)return f;const I=c(p)?102100:4326,g=m[I].maxX,v=m[I].minX;if(e(f))return d(f,g,v);if(h(f))return f.points=f.points.map(t=>d(t,g,v)),f;if(o(f))return y(f,a);if(u(f)||r(f)){const t=s(T,f),i={xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3]},e=l(i.xmin,v)*(2*g),h=0===e?f:x(f,e);return i.xmin+=e,i.xmax+=e,i.xmax>g?C(h,g,n):i.xmin<v?C(h,v,n):h}return f}function y(t,i){if(!i)return t;const s=I(t,i).map(t=>t.extent);return s.length<2?s[0]||t:s.length>2?(t.xmin=i.valid[0],t.xmax=i.valid[1],t):{rings:s.map(t=>[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]])}}function d(t,i,s){if(Array.isArray(t)){const n=t[0];if(n>i){const s=l(n,i);t[0]=n+s*(-2*i)}else if(n<s){const i=l(n,s);t[0]=n+i*(-2*s)}}else{const n=t.x;if(n>i){const s=l(n,i);t.x+=s*(-2*i)}else if(n<s){const i=l(n,s);t.x+=i*(-2*s)}}return t}function I(t,i){const s=[],{ymin:n,ymax:e,xmin:h,xmax:o}=t,u=t.xmax-t.xmin,[r,m]=i.valid,{x,frameId:l}=g(t.xmin,i),{x:_,frameId:c}=g(t.xmax,i),p=x===_&&u>0;if(u>2*m){const t={xmin:h<o?x:_,ymin:n,xmax:m,ymax:e},i={xmin:r,ymin:n,xmax:h<o?_:x,ymax:e},u={xmin:0,ymin:n,xmax:m,ymax:e},p={xmin:r,ymin:n,xmax:0,ymax:e},a=[],f=[];v(t,u)&&a.push(l),v(t,p)&&f.push(l),v(i,u)&&a.push(c),v(i,p)&&f.push(c);for(let s=l+1;s<c;s++)a.push(s),f.push(s);s.push(new P(t,[l]),new P(i,[c]),new P(u,a),new P(p,f))}else x>_||p?s.push(new P({xmin:x,ymin:n,xmax:m,ymax:e},[l]),new P({xmin:r,ymin:n,xmax:_,ymax:e},[c])):s.push(new P({xmin:x,ymin:n,xmax:_,ymax:e},[l]));return s}function g(t,i){const[s,n]=i.valid,e=2*n;let h,o=0;return t>n?(h=Math.ceil(Math.abs(t-n)/e),t-=h*e,o=h):t<s&&(h=Math.ceil(Math.abs(t-s)/e),t+=h*e,o=-h),{x:t,frameId:o}}function v(t,i){const{xmin:s,ymin:n,xmax:e,ymax:h}=i;return O(t,s,n)&&O(t,s,h)&&O(t,e,h)&&O(t,e,n)}function O(t,i,s){return i>=t.xmin&&i<=t.xmax&&s>=t.ymin&&s<=t.ymax}function C(t,i,s=!0){const e=!r(t);if(e&&n(t),s){return(new S).cut(t,i)}const h=e?t.rings:t.paths,o=e?4:2,u=h.length,m=-2*i;for(let n=0;n<u;n++){const t=h[n];if(t&&t.length>=o){const i=[];for(const[s,...n]of t)i.push([s+m,...n]);h.push(i)}}return e?t.rings=h:t.paths=h,t}class P{constructor(t,i){this.extent=t,this.frameIds=i}}const T=i();class S{constructor(){this._linesIn=[],this._linesOut=[]}cut(t,i){let s;if(this._xCut=i,t.rings)this._closed=!0,s=t.rings,this._minPts=4;else{if(!t.paths)return null;this._closed=!1,s=t.paths,this._minPts=2}for(const e of s){if(!e||e.length<this._minPts)continue;let t=!0;for(const i of e)t?(this.moveTo(i),t=!1):this.lineTo(i);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),s=[];for(const e of this._linesIn)e&&e.length>=this._minPts&&s.push(e);const n=-2*this._xCut;for(const e of this._linesOut)if(e&&e.length>=this._minPts){for(const t of e)t[0]+=n;s.push(e)}return this._closed?t.rings=s:t.paths=s,t}moveTo(t){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(t[0]),this._moveTo(t[0],t[1],this._prevSide),this._prevPt=t,this._firstPt=t}lineTo(t){const i=this._side(t[0]);if(i*this._prevSide===-1){const s=this._intersect(this._prevPt,t);this._lineTo(this._xCut,s,0),this._prevSide=0,this._lineTo(t[0],t[1],i)}else this._lineTo(t[0],t[1],i);this._prevSide=i,this._prevPt=t}close(){const t=this._firstPt,i=this._prevPt;t[0]===i[0]&&t[1]===i[1]||this.lineTo(t),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(t,i,s){this._closed?(this._lineIn.push([s<=0?t:this._xCut,i]),this._lineOut.push([s>=0?t:this._xCut,i])):(s<=0&&this._lineIn.push([t,i]),s>=0&&this._lineOut.push([t,i]))}_lineTo(t,i,s){this._closed?(j(this._lineIn,s<=0?t:this._xCut,i),j(this._lineOut,s>=0?t:this._xCut,i)):s<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push([t,i])):s>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push([t,i])):this._prevSide<0?(this._lineIn.push([t,i]),this._lineOut.push([t,i])):this._prevSide>0&&(this._lineOut.push([t,i]),this._lineIn.push([t,i]))}_checkClosingPt(t){const i=t.length;i>3&&t[0][0]===this._xCut&&t[i-2][0]===this._xCut&&t[1][0]===this._xCut&&(t[0][1]=t[i-2][1],t.pop())}_side(t){return t<this._xCut?-1:t>this._xCut?1:0}_intersect(t,i){const s=(this._xCut-t[0])/(i[0]-t[0]);return t[1]+s*(i[1]-t[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}function j(t,i,s){const n=t.length;n>1&&t[n-1][0]===i&&t[n-2][0]===i?t[n-1][1]=s:t.push([i,s])}export{S as CutVertical,a as normalizeCentralMeridianForDisplay,p as normalizeCentralMeridianSync};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{isPoint as n,isPolyline as t,isPolygon as e,isMultipoint as r,isExtent as o}from"./jsonUtils.js";function s(n){if(!n)return null;return{originPosition:"upper-left"===n.originPosition?"upperLeft":"lower-left"===n.originPosition?"lowerLeft":n.originPosition,scale:n.tolerance?[n.tolerance,n.tolerance,1,1]:[1,1,1,1],translate:null!=n.extent?[n.extent.xmin,n.extent.ymax,n.extent.zmin??0,n.extent.mmin??0]:[0,0,0,0]}}function l(n){return"lowerLeft"===n.originPosition&&4===n.scale.length&&4===n.translate.length}function u(n){if(l(n))return n;const{originPosition:t,scale:e,translate:r}=n,o=e[0]??1,s=e[1]??1;return{originPosition:"lowerLeft",scale:[o,"lowerLeft"===t?s:-s,e[2]??1,e[3]??1],translate:[r[0]??0,r[1]??0,r[2]??0,r[3]??0]}}function i({scale:n,translate:t},e){return Math.round((e-t[0])/n[0])}function a({scale:n,translate:t},e){return Math.round((e-t[1])/n[1])}function c({scale:n,translate:t},e){return Math.round(((e??0)-t[2])/n[2])}function h({scale:n,translate:t},e){return e?Math.round((e-t[3])/n[3]):0}function f(n,t){return n&&t?M:n&&!t?g:!n&&t?x:m}const m=(n,t)=>{const e=[];if(!t.length)return null;const r=t[0];let o=i(n,r[0]),s=a(n,r[1]);e.push([o,s]);for(let l=1;l<t.length;l++){const[r,u]=t[l],c=i(n,r),h=a(n,u);c===o&&h===s||e.push([c-o,h-s]),o=c,s=h}return e},g=(n,t)=>{const e=[];if(!t.length)return null;const r=t[0];let o=i(n,r[0]),s=a(n,r[1]),l=c(n,r[2]);e.push([o,s,l]);for(let u=1;u<t.length;u++){const[r,h,f]=t[u],m=i(n,r),g=a(n,h),x=c(n,f);m===o&&g===s&&x===l||e.push([m-o,g-s,x]),o=m,s=g,l=x}return e},x=(n,t)=>{const e=[];if(!t.length)return null;const r=t[0];let o=i(n,r[0]),s=a(n,r[1]),l=h(n,r[2]);e.push([o,s,l]);for(let u=1;u<t.length;u++){const[r,c,f]=t[u],m=i(n,r),g=a(n,c),x=h(n,f);m===o&&g===s&&x===l||e.push([m-o,g-s,x]),o=m,s=g,l=x}return e},M=(n,t)=>{const e=[];if(!t.length)return null;const r=t[0];let o=i(n,r[0]),s=a(n,r[1]),l=c(n,r[2]),u=h(n,r[3]);e.push([o,s,l,u]);for(let f=1;f<t.length;f++){const[r,m,g,x]=t[f],M=i(n,r),I=a(n,m),p=c(n,g),N=h(n,x);M===o&&I===s&&p===l&&N===u||e.push([M-o,I-s,p,N]),o=M,s=I,l=p,u=N}return e};function I(n,t,e){const r=u(n);return t[0]=i(r,e[0]),t[3]=a(r,e[1]),t[2]=i(r,e[2]),t[1]=a(r,e[3]),t}function p(n,t,e,r){const o=[],s=f(e,r);for(let l=0;l<t.length;l++){const e=s(n,t[l]);e&&e.length>=3&&o.push(e)}return o.length?o:null}function N(n,t,e,r){const o=[],s=f(e,r);for(let l=0;l<t.length;l++){const e=s(n,t[l]);e&&e.length>=2&&o.push(e)}return o.length?o:null}function Z({scale:n,translate:t},e){return e*n[0]+t[0]}function y({scale:n,translate:t},e){return e*n[1]+t[1]}function z({scale:n,translate:t},e){return(e??0)*n[2]+t[2]}function w({scale:n,translate:t},e){return e?e*n[3]+t[3]:0}function P(n,t){return n&&t?A:n&&!t?E:!n&&t?L:T}const T=(n,t)=>{const e=new Array(t.length);if(!t.length)return e;const r=t[0];let o=Z(n,r[0]),s=y(n,r[1]);e[0]=[o,s];const{scale:l,originPosition:u}=n,i=l[0],a="lowerLeft"===u?l[1]:-l[1];for(let c=1;c<t.length;c++){const[n,r]=t[c];o+=i*n,s+=a*r,e[c]=[o,s]}return e},E=(n,t)=>{const e=new Array(t.length);if(!t.length)return e;const r=t[0];let o=Z(n,r[0]),s=y(n,r[1]);e[0]=[o,s,z(n,r[2])];const{scale:l,originPosition:u}=n,i=l[0],a="lowerLeft"===u?l[1]:-l[1];for(let c=1;c<t.length;c++){const[r,l,u]=t[c];o+=i*r,s+=a*l,e[c]=[o,s,z(n,u)]}return e},L=(n,t)=>{const e=new Array(t.length);if(!t.length)return e;const r=t[0];let o=Z(n,r[0]),s=y(n,r[1]);e[0]=[o,s,w(n,r[2])];const{scale:l,originPosition:u}=n,i=l[0],a="lowerLeft"===u?l[1]:-l[1];for(let c=1;c<t.length;c++){const[r,l,u]=t[c];o+=i*r,s+=a*l,e[c]=[o,s,w(n,u)]}return e},A=(n,t)=>{const e=new Array(t.length);if(!t.length)return e;const r=t[0];let o=Z(n,r[0]),s=y(n,r[1]);e[0]=[o,s,z(n,r[2]),w(n,r[3])];const{scale:l,originPosition:u}=n,i=l[0],a="lowerLeft"===u?l[1]:-l[1];for(let c=1;c<t.length;c++){const[r,l,u,h]=t[c];o+=i*r,s+=a*l,e[c]=[o,s,z(n,u),w(n,h)]}return e};function b(n,t,e){const r=new Array(e.length);for(let o=0;o<e.length;o++)r[o]=t(n,e[o]);return r}function F(n,t,e){const r=u(n);return e?(t[0]=Z(r,e[0]),t[1]=y(r,e[3]),t[2]=Z(r,e[2]),t[3]=y(r,e[1]),t):[Z(r,t[0]),y(r,t[3]),Z(r,t[2]),y(r,t[1])]}function V(n,t,e){let[r,o]=e[0],s=Math.min(r,t[0]),l=Math.min(o,t[1]),u=Math.max(r,t[2]),i=Math.max(o,t[3]);for(let a=1;a<e.length;a++){const[n,t]=e[a];r+=n,o+=t,n<0&&(s=Math.min(s,r)),n>0&&(u=Math.max(u,r)),t<0?l=Math.min(l,o):t>0&&(i=Math.max(i,o))}return n[0]=s,n[1]=l,n[2]=u,n[3]=i,n}function Y(n,t){if(!t.length)return null;n[0]=n[1]=Number.POSITIVE_INFINITY,n[2]=n[3]=Number.NEGATIVE_INFINITY;for(let e=0;e<t.length;e++)V(n,n,t[e]);return n}function _(n){const t=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];return V(t,t,n)}function d(n){return Y([0,0,0,0],n)}function G(n){return Y([0,0,0,0],n)}function O(n,t,e){const r=u(n);return t.xmin=i(r,e.xmin),t.ymin=a(r,e.ymin),t.xmax=i(r,e.xmax),t.ymax=a(r,e.ymax),e.hasZ&&(t.zmin=c(r,e.zmin),t.zmax=c(r,e.zmax)),e.hasM&&(t.mmin=h(r,e.mmin),t.mmax=h(r,e.mmax)),t.hasZ=e.hasZ??!1,t.hasM=e.hasM??!1,t}function S(n,t,e){const r=u(n);return t.points=f(e.hasZ,e.hasM)(r,e.points)??[],t.hasZ=e.hasZ??!1,t.hasM=e.hasM??!1,t}function j(n,t,e){const r=u(n);return t.x=i(r,e.x),t.y=a(r,e.y),null!=e.z&&(t.z=c(r,e.z)),null!=e.m&&(t.m=h(r,e.m)),t}function U(n,t,e){const r=p(u(n),e.rings,e.hasZ,e.hasM);return r?(t.rings=r,t.hasZ=e.hasZ??!1,t.hasM=e.hasM??!1,t):null}function k(n,t,e){const r=N(u(n),e.paths,e.hasZ,e.hasM);return r?(t.paths=r,t.hasZ=e.hasZ??!1,t.hasM=e.hasM??!1,t):null}function q(s,l){return s&&l?n(l)?j(s,{},l):t(l)?k(s,{},l):e(l)?U(s,{},l):r(l)?S(s,{},l):o(l)?O(s,{},l):null:null}function v(n,t,e,r=e.hasZ??!1,o=e.hasM??!1){const s=u(n);return t.xmin=Z(s,e.xmin),t.xmax=Z(s,e.xmax),t.ymin=y(s,e.ymin),t.ymax=y(s,e.ymax),r&&(t.zmin=z(s,e.zmin),t.zmax=z(s,e.zmax)),o&&(t.mmin=w(s,e.mmin),t.mmax=w(s,e.mmax)),t.hasZ=r,t.hasM=o,t}function B(n,t,e,r=e?.hasZ??!1,o=e?.hasM??!1){if(null!=e){const s=u(n);t.points=P(r,o)(s,e.points),t.hasZ=r,t.hasM=o}return t}function C(n,t,e,r=null!=e?.z,o=null!=e?.m){if(null==e)return t;const s=u(n);return t.x=Z(s,e.x),t.y=y(s,e.y),r&&(t.z=z(s,e.z)),o&&(t.m=w(s,e.m)),t}function D(n,t,e,r=e?.hasZ??!1,o=e?.hasM??!1){if(null!=e){const s=u(n);t.rings=b(s,P(r,o),e.rings),t.hasZ=r,t.hasM=o}return t}function H(n,t,e,r=e?.hasZ??!1,o=e?.hasM??!1){if(null!=e){const s=u(n);t.paths=b(s,P(r,o),e.paths),t.hasZ=r,t.hasM=o}return t}export{V as getQuantizedBoundsCoordsArray,Y as getQuantizedBoundsCoordsArrayArray,d as getQuantizedBoundsPaths,_ as getQuantizedBoundsPoints,G as getQuantizedBoundsRings,u as normalizeTransform,I as quantizeBounds,m as quantizeCoordsArrayXY,x as quantizeCoordsArrayXYM,g as quantizeCoordsArrayXYZ,M as quantizeCoordsArrayXYZM,O as quantizeExtent,q as quantizeGeometry,h as quantizeM,S as quantizeMultipoint,j as quantizePoint,U as quantizePolygon,k as quantizePolyline,i as quantizeX,a as quantizeY,c as quantizeZ,s as toQuantizationTransform,F as unquantizeBounds,b as unquantizeCoordsArrayArray,T as unquantizeCoordsArrayXY,L as unquantizeCoordsArrayXYM,E as unquantizeCoordsArrayXYZ,A as unquantizeCoordsArrayXYZM,v as unquantizeExtent,w as unquantizeM,B as unquantizeMultipoint,C as unquantizePoint,D as unquantizePolygon,H as unquantizePolyline,Z as unquantizeX,y as unquantizeY,z as unquantizeZ};
5
+ import{isPoint as n,isPolyline as t,isPolygon as e,isMultipoint as r,isExtent as o}from"./jsonTypeUtils.js";function s(n){if(!n)return null;return{originPosition:"upper-left"===n.originPosition?"upperLeft":"lower-left"===n.originPosition?"lowerLeft":n.originPosition,scale:n.tolerance?[n.tolerance,n.tolerance,1,1]:[1,1,1,1],translate:null!=n.extent?[n.extent.xmin,n.extent.ymax,n.extent.zmin??0,n.extent.mmin??0]:[0,0,0,0]}}function l(n){return"lowerLeft"===n.originPosition&&4===n.scale.length&&4===n.translate.length}function u(n){if(l(n))return n;const{originPosition:t,scale:e,translate:r}=n,o=e[0]??1,s=e[1]??1;return{originPosition:"lowerLeft",scale:[o,"lowerLeft"===t?s:-s,e[2]??1,e[3]??1],translate:[r[0]??0,r[1]??0,r[2]??0,r[3]??0]}}function i({scale:n,translate:t},e){return Math.round((e-t[0])/n[0])}function a({scale:n,translate:t},e){return Math.round((e-t[1])/n[1])}function c({scale:n,translate:t},e){return Math.round(((e??0)-t[2])/n[2])}function h({scale:n,translate:t},e){return e?Math.round((e-t[3])/n[3]):0}function f(n,t){return n&&t?M:n&&!t?g:!n&&t?x:m}const m=(n,t)=>{const e=[];if(!t.length)return null;const r=t[0];let o=i(n,r[0]),s=a(n,r[1]);e.push([o,s]);for(let l=1;l<t.length;l++){const[r,u]=t[l],c=i(n,r),h=a(n,u);c===o&&h===s||e.push([c-o,h-s]),o=c,s=h}return e},g=(n,t)=>{const e=[];if(!t.length)return null;const r=t[0];let o=i(n,r[0]),s=a(n,r[1]),l=c(n,r[2]);e.push([o,s,l]);for(let u=1;u<t.length;u++){const[r,h,f]=t[u],m=i(n,r),g=a(n,h),x=c(n,f);m===o&&g===s&&x===l||e.push([m-o,g-s,x]),o=m,s=g,l=x}return e},x=(n,t)=>{const e=[];if(!t.length)return null;const r=t[0];let o=i(n,r[0]),s=a(n,r[1]),l=h(n,r[2]);e.push([o,s,l]);for(let u=1;u<t.length;u++){const[r,c,f]=t[u],m=i(n,r),g=a(n,c),x=h(n,f);m===o&&g===s&&x===l||e.push([m-o,g-s,x]),o=m,s=g,l=x}return e},M=(n,t)=>{const e=[];if(!t.length)return null;const r=t[0];let o=i(n,r[0]),s=a(n,r[1]),l=c(n,r[2]),u=h(n,r[3]);e.push([o,s,l,u]);for(let f=1;f<t.length;f++){const[r,m,g,x]=t[f],M=i(n,r),I=a(n,m),p=c(n,g),N=h(n,x);M===o&&I===s&&p===l&&N===u||e.push([M-o,I-s,p,N]),o=M,s=I,l=p,u=N}return e};function I(n,t,e){const r=u(n);return t[0]=i(r,e[0]),t[3]=a(r,e[1]),t[2]=i(r,e[2]),t[1]=a(r,e[3]),t}function p(n,t,e,r){const o=[],s=f(e,r);for(let l=0;l<t.length;l++){const e=s(n,t[l]);e&&e.length>=3&&o.push(e)}return o.length?o:null}function N(n,t,e,r){const o=[],s=f(e,r);for(let l=0;l<t.length;l++){const e=s(n,t[l]);e&&e.length>=2&&o.push(e)}return o.length?o:null}function Z({scale:n,translate:t},e){return e*n[0]+t[0]}function y({scale:n,translate:t},e){return e*n[1]+t[1]}function z({scale:n,translate:t},e){return(e??0)*n[2]+t[2]}function w({scale:n,translate:t},e){return e?e*n[3]+t[3]:0}function P(n,t){return n&&t?A:n&&!t?E:!n&&t?L:T}const T=(n,t)=>{const e=new Array(t.length);if(!t.length)return e;const r=t[0];let o=Z(n,r[0]),s=y(n,r[1]);e[0]=[o,s];const{scale:l,originPosition:u}=n,i=l[0],a="lowerLeft"===u?l[1]:-l[1];for(let c=1;c<t.length;c++){const[n,r]=t[c];o+=i*n,s+=a*r,e[c]=[o,s]}return e},E=(n,t)=>{const e=new Array(t.length);if(!t.length)return e;const r=t[0];let o=Z(n,r[0]),s=y(n,r[1]);e[0]=[o,s,z(n,r[2])];const{scale:l,originPosition:u}=n,i=l[0],a="lowerLeft"===u?l[1]:-l[1];for(let c=1;c<t.length;c++){const[r,l,u]=t[c];o+=i*r,s+=a*l,e[c]=[o,s,z(n,u)]}return e},L=(n,t)=>{const e=new Array(t.length);if(!t.length)return e;const r=t[0];let o=Z(n,r[0]),s=y(n,r[1]);e[0]=[o,s,w(n,r[2])];const{scale:l,originPosition:u}=n,i=l[0],a="lowerLeft"===u?l[1]:-l[1];for(let c=1;c<t.length;c++){const[r,l,u]=t[c];o+=i*r,s+=a*l,e[c]=[o,s,w(n,u)]}return e},A=(n,t)=>{const e=new Array(t.length);if(!t.length)return e;const r=t[0];let o=Z(n,r[0]),s=y(n,r[1]);e[0]=[o,s,z(n,r[2]),w(n,r[3])];const{scale:l,originPosition:u}=n,i=l[0],a="lowerLeft"===u?l[1]:-l[1];for(let c=1;c<t.length;c++){const[r,l,u,h]=t[c];o+=i*r,s+=a*l,e[c]=[o,s,z(n,u),w(n,h)]}return e};function b(n,t,e){const r=new Array(e.length);for(let o=0;o<e.length;o++)r[o]=t(n,e[o]);return r}function F(n,t,e){const r=u(n);return e?(t[0]=Z(r,e[0]),t[1]=y(r,e[3]),t[2]=Z(r,e[2]),t[3]=y(r,e[1]),t):[Z(r,t[0]),y(r,t[3]),Z(r,t[2]),y(r,t[1])]}function V(n,t,e){let[r,o]=e[0],s=Math.min(r,t[0]),l=Math.min(o,t[1]),u=Math.max(r,t[2]),i=Math.max(o,t[3]);for(let a=1;a<e.length;a++){const[n,t]=e[a];r+=n,o+=t,n<0&&(s=Math.min(s,r)),n>0&&(u=Math.max(u,r)),t<0?l=Math.min(l,o):t>0&&(i=Math.max(i,o))}return n[0]=s,n[1]=l,n[2]=u,n[3]=i,n}function Y(n,t){if(!t.length)return null;n[0]=n[1]=Number.POSITIVE_INFINITY,n[2]=n[3]=Number.NEGATIVE_INFINITY;for(let e=0;e<t.length;e++)V(n,n,t[e]);return n}function _(n){const t=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];return V(t,t,n)}function d(n){return Y([0,0,0,0],n)}function G(n){return Y([0,0,0,0],n)}function O(n,t,e){const r=u(n);return t.xmin=i(r,e.xmin),t.ymin=a(r,e.ymin),t.xmax=i(r,e.xmax),t.ymax=a(r,e.ymax),e.hasZ&&(t.zmin=c(r,e.zmin),t.zmax=c(r,e.zmax)),e.hasM&&(t.mmin=h(r,e.mmin),t.mmax=h(r,e.mmax)),t.hasZ=e.hasZ??!1,t.hasM=e.hasM??!1,t}function S(n,t,e){const r=u(n);return t.points=f(e.hasZ,e.hasM)(r,e.points)??[],t.hasZ=e.hasZ??!1,t.hasM=e.hasM??!1,t}function j(n,t,e){const r=u(n);return t.x=i(r,e.x),t.y=a(r,e.y),null!=e.z&&(t.z=c(r,e.z)),null!=e.m&&(t.m=h(r,e.m)),t}function U(n,t,e){const r=p(u(n),e.rings,e.hasZ,e.hasM);return r?(t.rings=r,t.hasZ=e.hasZ??!1,t.hasM=e.hasM??!1,t):null}function k(n,t,e){const r=N(u(n),e.paths,e.hasZ,e.hasM);return r?(t.paths=r,t.hasZ=e.hasZ??!1,t.hasM=e.hasM??!1,t):null}function q(s,l){return s&&l?n(l)?j(s,{},l):t(l)?k(s,{},l):e(l)?U(s,{},l):r(l)?S(s,{},l):o(l)?O(s,{},l):null:null}function v(n,t,e,r=e.hasZ??!1,o=e.hasM??!1){const s=u(n);return t.xmin=Z(s,e.xmin),t.xmax=Z(s,e.xmax),t.ymin=y(s,e.ymin),t.ymax=y(s,e.ymax),r&&(t.zmin=z(s,e.zmin),t.zmax=z(s,e.zmax)),o&&(t.mmin=w(s,e.mmin),t.mmax=w(s,e.mmax)),t.hasZ=r,t.hasM=o,t}function B(n,t,e,r=e?.hasZ??!1,o=e?.hasM??!1){if(null!=e){const s=u(n);t.points=P(r,o)(s,e.points),t.hasZ=r,t.hasM=o}return t}function C(n,t,e,r=null!=e?.z,o=null!=e?.m){if(null==e)return t;const s=u(n);return t.x=Z(s,e.x),t.y=y(s,e.y),r&&(t.z=z(s,e.z)),o&&(t.m=w(s,e.m)),t}function D(n,t,e,r=e?.hasZ??!1,o=e?.hasM??!1){if(null!=e){const s=u(n);t.rings=b(s,P(r,o),e.rings),t.hasZ=r,t.hasM=o}return t}function H(n,t,e,r=e?.hasZ??!1,o=e?.hasM??!1){if(null!=e){const s=u(n);t.paths=b(s,P(r,o),e.paths),t.hasZ=r,t.hasM=o}return t}export{V as getQuantizedBoundsCoordsArray,Y as getQuantizedBoundsCoordsArrayArray,d as getQuantizedBoundsPaths,_ as getQuantizedBoundsPoints,G as getQuantizedBoundsRings,u as normalizeTransform,I as quantizeBounds,m as quantizeCoordsArrayXY,x as quantizeCoordsArrayXYM,g as quantizeCoordsArrayXYZ,M as quantizeCoordsArrayXYZM,O as quantizeExtent,q as quantizeGeometry,h as quantizeM,S as quantizeMultipoint,j as quantizePoint,U as quantizePolygon,k as quantizePolyline,i as quantizeX,a as quantizeY,c as quantizeZ,s as toQuantizationTransform,F as unquantizeBounds,b as unquantizeCoordsArrayArray,T as unquantizeCoordsArrayXY,L as unquantizeCoordsArrayXYM,E as unquantizeCoordsArrayXYZ,A as unquantizeCoordsArrayXYZM,v as unquantizeExtent,w as unquantizeM,B as unquantizeMultipoint,C as unquantizePoint,D as unquantizePolygon,H as unquantizePolyline,Z as unquantizeX,y as unquantizeY,z as unquantizeZ};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{getMetersPerVerticalUnitForSR as n}from"../../core/units.js";import{isSphericalPCPF as e}from"../ellipsoidUtils.js";import{equals as o}from"./spatialReferenceUtils.js";function t(t,f,u){if(null==f||null==u||u.vcsWkid||o(f,u)||e(f)||e(u))return null;const a=n(f)/n(u);if(1===a)return null;switch(t){case"point":case"esriGeometryPoint":return n=>r(n,a);case"polyline":case"esriGeometryPolyline":return n=>l(n,a);case"polygon":case"esriGeometryPolygon":return n=>i(n,a);case"multipoint":case"esriGeometryMultipoint":return n=>s(n,a);case"extent":case"esriGeometryEnvelope":return n=>c(n,a);default:return null}}function r(n,e){null!=n?.z&&(n.z*=e)}function i(n,e){if(n)for(const o of n.rings)for(const n of o)n.length>2&&(n[2]*=e)}function l(n,e){if(n)for(const o of n.paths)for(const n of o)n.length>2&&(n[2]*=e)}function s(n,e){if(n)for(const o of n.points)o.length>2&&(o[2]*=e)}function c(n,e){n&&null!=n.zmin&&null!=n.zmax&&(n.zmin*=e,n.zmax*=e)}export{t as getGeometryZScaler};
5
+ import{getMetersPerVerticalUnitForSR as e}from"../../core/units.js";import{isSphericalPCPF as n}from"../ellipsoidUtils.js";import{equals as o}from"./spatialReferenceUtils.js";function t(t,f,u){if(null==f||null==u||u.vcsWkid||o(f,u)||n(f)||n(u))return;const a=e(f)/e(u);if(1!==a)switch(t){case"point":case"esriGeometryPoint":return e=>i(e,a);case"polyline":case"esriGeometryPolyline":return e=>s(e,a);case"polygon":case"esriGeometryPolygon":return e=>r(e,a);case"multipoint":case"esriGeometryMultipoint":return e=>l(e,a);case"extent":case"esriGeometryEnvelope":return e=>c(e,a);default:return}}function i(e,n){null!=e?.z&&(e.z*=n)}function r(e,n){if(e)for(const o of e.rings)for(const e of o)e.length>2&&(e[2]*=n)}function s(e,n){if(e)for(const o of e.paths)for(const e of o)e.length>2&&(e[2]*=n)}function l(e,n){if(e)for(const o of e.points)o.length>2&&(o[2]*=n)}function c(e,n){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=n,e.zmax*=n)}export{t as getGeometryZScaler};