@arcgis/core 5.0.0-next.1 → 5.0.0-next.10

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 (955) hide show
  1. package/Map.js +1 -1
  2. package/PopupTemplate.js +1 -1
  3. package/analysis/ElevationProfileAnalysis.js +1 -1
  4. package/analysis/VolumeMeasurement/VolumeMeasurementCutFillOptions.js +1 -1
  5. package/analysis/VolumeMeasurement/volumeMeasurementConfiguration.js +5 -0
  6. package/analysis/VolumeMeasurementAnalysis.js +1 -1
  7. package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +4 -0
  8. package/applications/KnowledgeStudio/generalSdkInternalAccess.js +5 -0
  9. package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +1 -0
  10. package/applications/KnowledgeStudio/generalSharedKgUtils.js +1 -1
  11. package/applications/KnowledgeStudio/layerInternalAccessUtils.d.ts +2 -0
  12. package/applications/KnowledgeStudio/layerInternalAccessUtils.js +1 -1
  13. package/applications/KnowledgeStudio/resourceSerializationUtils.js +1 -1
  14. package/arcade/featureset/actions/Adapted.js +1 -1
  15. package/arcade/featureset/actions/AttributeFilter.js +1 -1
  16. package/arcade/featureset/actions/GroupBy.js +1 -1
  17. package/arcade/featureset/actions/OrderBy.js +1 -1
  18. package/arcade/featureset/actions/SpatialFilter.js +1 -1
  19. package/arcade/featureset/actions/Top.js +1 -1
  20. package/arcade/featureset/sources/Empty.js +1 -1
  21. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  22. package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
  23. package/arcade/featureset/sources/FeatureLayerRelated.js +1 -1
  24. package/arcade/featureset/support/FeatureSet.js +1 -1
  25. package/arcade/featureset/support/sqlUtils.js +1 -1
  26. package/arcade/featureset/support/stats.js +1 -1
  27. package/arcade/functions/featuresetbase.js +1 -1
  28. package/arcade/functions/featuresetstring.js +1 -1
  29. package/arcade/functions/knowledgegraph.js +1 -1
  30. package/assets/components/assets/sort-handle/t9n/messages.uk.json +1 -1
  31. package/assets/esri/core/workers/RemoteClient.js +1 -1
  32. package/assets/esri/core/workers/chunks/{1a713dcc9971e1935401.js → 0030d68d9edf42b4af57.js} +1 -1
  33. package/assets/esri/core/workers/chunks/00c77f03dd511c6dbff2.js +1 -0
  34. package/assets/esri/core/workers/chunks/01d460398f3ba6767a37.js +1 -0
  35. package/assets/esri/core/workers/chunks/0200637e0503556a3b97.js +1 -0
  36. package/assets/esri/core/workers/chunks/022c854eff2c2c2aed6b.js +1 -0
  37. package/assets/esri/core/workers/chunks/{14ace5dc4b8984212a57.js → 042cd64e1f4eb326c30f.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{66db5f77e09d25e33951.js → 063905fbf9a0c6586949.js} +1 -1
  39. package/assets/esri/core/workers/chunks/066a0ea67688361e85a5.js +1 -0
  40. package/assets/esri/core/workers/chunks/06f75c5b6b50934d72a6.js +1 -0
  41. package/assets/esri/core/workers/chunks/{89027f6800e17fab8973.js → 0a5d74414dd02a2fb8e1.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{3815ffa13e7b439bca6e.js → 0d5212f59e9b62c16164.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{388482cea4b9fdeaf06e.js → 0f30a9514571c7be9978.js} +1 -1
  44. package/assets/esri/core/workers/chunks/0f735b0dec173142f3b6.js +2 -0
  45. package/assets/esri/core/workers/chunks/{a8f998b8ec8c56150479.js.LICENSE.txt → 0f735b0dec173142f3b6.js.LICENSE.txt} +1 -1
  46. package/assets/esri/core/workers/chunks/{e032f3d2ee19790f8c79.js → 11e96a312f1294d34c50.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{309c5f69ea06f3081d83.js → 1257c37bf04d39c27b62.js} +1 -1
  48. package/assets/esri/core/workers/chunks/125e71b0e29d1d132777.js +1 -0
  49. package/assets/esri/core/workers/chunks/{1e4e7aedf4b779241a02.js → 15c7c10ff9ac63f0e792.js} +1 -1
  50. package/assets/esri/core/workers/chunks/15f969836d63c7fe2d9d.js +1 -0
  51. package/assets/esri/core/workers/chunks/18c5d79d5ee1136e0a57.js +1 -0
  52. package/assets/esri/core/workers/chunks/{f03635ddf56e2ef90e4c.js → 1d06fcae4c2f02fb1c95.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{651b9144abb1895cc510.js → 1e848d9da1c61a27cf18.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{8cea114168d849c38b1b.js → 20278683bddc8c2d8136.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{d84373a6ec94dcfec8c2.js → 24cd7b84cd0f3de4bff2.js} +1 -1
  56. package/assets/esri/core/workers/chunks/27e6a6c5610007ac6a54.js +1 -0
  57. package/assets/esri/core/workers/chunks/2857bcb68df874e9aa62.js +1 -0
  58. package/assets/esri/core/workers/chunks/{94c9d3094c93f7760433.js → 29286234be26680245f6.js} +1 -1
  59. package/assets/esri/core/workers/chunks/292daac70bb828e4923f.js +1 -0
  60. package/assets/esri/core/workers/chunks/2ddcf3cea0efe4052618.js +1 -0
  61. package/assets/esri/core/workers/chunks/2e8a4df83c43f86d7361.js +1 -0
  62. package/assets/esri/core/workers/chunks/{4f01be74dd26e639330f.js → 2f24017e72d41c259faa.js} +1 -1
  63. package/assets/esri/core/workers/chunks/2f2e4f81f3daa3fb8527.js +1 -0
  64. package/assets/esri/core/workers/chunks/30e220f4f843681a4cdd.js +1 -0
  65. package/assets/esri/core/workers/chunks/3109f0a6914e7be088ed.js +1 -0
  66. package/assets/esri/core/workers/chunks/{5d3661d1fe46dd29aae9.js → 311b564e44ae637c960d.js} +1 -1
  67. package/assets/esri/core/workers/chunks/31bb1ee9370c2753ce9d.js +1 -0
  68. package/assets/esri/core/workers/chunks/329fccd7f5cb8401e0c3.js +1 -0
  69. package/assets/esri/core/workers/chunks/37c1f155da14de91565a.js +1 -0
  70. package/assets/esri/core/workers/chunks/37f2ef14399546e697e6.js +1 -0
  71. package/assets/esri/core/workers/chunks/38ee69125da60464d5a1.js +1 -0
  72. package/assets/esri/core/workers/chunks/38f6b9288c82dac9a800.js +1 -0
  73. package/assets/esri/core/workers/chunks/3a457e718a901a45902e.js.LICENSE.txt +1 -1
  74. package/assets/esri/core/workers/chunks/{f7c99e9c8d19352af38d.js → 3ac7562ea90f91a9f30c.js} +1 -1
  75. package/assets/esri/core/workers/chunks/3b1848713ee25f750242.js +1 -0
  76. package/assets/esri/core/workers/chunks/{e9311386f58f3cb95c22.js → 42a1e71d09e8583a7327.js} +1 -1
  77. package/assets/esri/core/workers/chunks/442973ff4dda923def62.js +1 -0
  78. package/assets/esri/core/workers/chunks/443dfe7029ec208f670c.js +1 -0
  79. package/assets/esri/core/workers/chunks/44f27eac92c5ccc57e12.js +1 -0
  80. package/assets/esri/core/workers/chunks/4941bfd3aae7f6bdac97.js +1 -0
  81. package/assets/esri/core/workers/chunks/{b75930d60449eceb0f1c.js → 4baf6f6e7ddedb25f806.js} +1 -1
  82. package/assets/esri/core/workers/chunks/4bd2cc65f7db0d261543.js +1 -0
  83. package/assets/esri/core/workers/chunks/4fa230dc6e5e87b0dec1.js +1 -0
  84. package/assets/esri/core/workers/chunks/4fb5f1c671892001a4fd.js +1 -0
  85. package/assets/esri/core/workers/chunks/4fbe2a8d742065cbaea3.js +1 -0
  86. package/assets/esri/core/workers/chunks/4fe4feeb251f2916a339.js +1 -0
  87. package/assets/esri/core/workers/chunks/509392131ec473d6b988.js +1 -0
  88. package/assets/esri/core/workers/chunks/{2ea6985da4eb0107bb9d.js → 51ab2acac4ecc1ca9c34.js} +1 -1
  89. package/assets/esri/core/workers/chunks/{fc4417d1260b717a9385.js → 52282f767bd0e99ddca0.js} +1 -1
  90. package/assets/esri/core/workers/chunks/{fc06014fb484fc8c697e.js → 53654edd766d9b4ef750.js} +1 -1
  91. package/assets/esri/core/workers/chunks/55eb6a0f1e4569a65f2a.js +1 -0
  92. package/assets/esri/core/workers/chunks/57e04e2d8721bbdc029a.js +1 -0
  93. package/assets/esri/core/workers/chunks/{ed8a85efbd90241512bb.js → 588533c3abe876f20f62.js} +1 -1
  94. package/assets/esri/core/workers/chunks/591e459f9fce34f519ca.js +1 -0
  95. package/assets/esri/core/workers/chunks/59514624daf188a8030f.js +1 -0
  96. package/assets/esri/core/workers/chunks/5c09d98b41f71a036e2a.js +1 -0
  97. package/assets/esri/core/workers/chunks/{72846fb9c87c6642daf0.js → 5e2ce34def5e053913b2.js} +1 -1
  98. package/assets/esri/core/workers/chunks/{b7a17927e14f502006b4.js → 5ea0c62016d56990787b.js} +1 -1
  99. package/assets/esri/core/workers/chunks/605b9643b1baeff16149.js +1 -0
  100. package/assets/esri/core/workers/chunks/{2ce4a0fe4fae63c43a81.js → 61d970ed75c2c358b1e9.js} +1 -1
  101. package/assets/esri/core/workers/chunks/{7a6a96edc892d7060b7d.js → 629127877042ad784ad2.js} +1 -1
  102. package/assets/esri/core/workers/chunks/{00aa85ae6419aad183ea.js → 6293e33f304c4952f88c.js} +1 -1
  103. package/assets/esri/core/workers/chunks/664ae441617afe4b17ec.js +1 -0
  104. package/assets/esri/core/workers/chunks/67f03d042455cd0f7009.js +1 -0
  105. package/assets/esri/core/workers/chunks/{ec13053af1999701464a.js → 6826fe54562dcdc054d7.js} +1 -1
  106. package/assets/esri/core/workers/chunks/{8215015f11221a354273.js → 6d049182bec34a22abcd.js} +1 -1
  107. package/assets/esri/core/workers/chunks/6d9f2b113d6bde936a04.js +1 -0
  108. package/assets/esri/core/workers/chunks/{5132ca68e8c7af111a47.js → 6e22b02a9715c10578d0.js} +1 -1
  109. package/assets/esri/core/workers/chunks/6e25ef5ad6d6b3f88343.js +1 -0
  110. package/assets/esri/core/workers/chunks/{deb2854bb7d082a26f52.js → 7005d956c990a04ee8b2.js} +1 -1
  111. package/assets/esri/core/workers/chunks/{c73def15ccfb2a32afa8.js → 7290e7a819eb291b1df2.js} +4 -4
  112. package/assets/esri/core/workers/chunks/731f7b552dde0fb325cd.js +1 -0
  113. package/assets/esri/core/workers/chunks/7565b382f6b3d2cb46a3.js +2 -0
  114. package/assets/esri/core/workers/chunks/{24921d31efa8d222ad2d.js.LICENSE.txt → 7565b382f6b3d2cb46a3.js.LICENSE.txt} +1 -1
  115. package/assets/esri/core/workers/chunks/759321045c264bc6964e.js +1 -0
  116. package/assets/esri/core/workers/chunks/773f2c6c9d38db76dfed.js +1 -0
  117. package/assets/esri/core/workers/chunks/7803495f8862d9025bcd.js +1 -0
  118. package/assets/esri/core/workers/chunks/79dbfa2b9b332ca0002f.js +1 -0
  119. package/assets/esri/core/workers/chunks/7a23ab84e1144f081c92.js +1 -0
  120. package/assets/esri/core/workers/chunks/7e3f27ebf366d4266350.js +1 -0
  121. package/assets/esri/core/workers/chunks/826072cfc0ac8e36f03c.js +1 -0
  122. package/assets/esri/core/workers/chunks/826fa0dfb63df77bfd95.js +1 -0
  123. package/assets/esri/core/workers/chunks/8372f142c4d7a65c7954.js +1 -0
  124. package/assets/esri/core/workers/chunks/87921f3fa9001f5801ed.js +1 -0
  125. package/assets/esri/core/workers/chunks/8ce608013b353155ee5a.js +1 -0
  126. package/assets/esri/core/workers/chunks/{24c14e4a1d2a2267097e.js → 8d9d3797c6d62fdfff9d.js} +1 -1
  127. package/assets/esri/core/workers/chunks/{0086a09441627842d34a.js → 8f3503b2fb6cd38757b9.js} +1 -1
  128. package/assets/esri/core/workers/chunks/{e7638b9ab6674bc8a18f.js → 91dfd29e2dba200eab09.js} +1 -1
  129. package/assets/esri/core/workers/chunks/{de1f75c907152df7e788.js → 9698f36c143953a975d4.js} +1 -1
  130. package/assets/esri/core/workers/chunks/9b0c2f4311fe9bca370a.js +1 -0
  131. package/assets/esri/core/workers/chunks/9c48d8d17831aa57f8a4.js +1 -0
  132. package/assets/esri/core/workers/chunks/9f21436016ff7a899e79.js +1 -0
  133. package/assets/esri/core/workers/chunks/9f28b2800945903bc165.js +1 -0
  134. package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js → 9ff8ee6ed6b98c03ae7e.js} +2 -2
  135. package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js.LICENSE.txt → 9ff8ee6ed6b98c03ae7e.js.LICENSE.txt} +1 -1
  136. package/assets/esri/core/workers/chunks/a091623bbfb3d771c8d8.js +1 -0
  137. package/assets/esri/core/workers/chunks/a27e74117c37f3efcbca.js +1 -0
  138. package/assets/esri/core/workers/chunks/a41ba05c09a59d1eb35f.js +1 -0
  139. package/assets/esri/core/workers/chunks/a470f662d73aa8d5d90f.js +1 -0
  140. package/assets/esri/core/workers/chunks/a93ebd076bc55aa6eab0.js +1 -0
  141. package/assets/esri/core/workers/chunks/aa78b69219d9a0ef1c54.js.LICENSE.txt +1 -1
  142. package/assets/esri/core/workers/chunks/aaed35a6414859233678.js +1 -0
  143. package/assets/esri/core/workers/chunks/acd0564ad1544f452f3f.js +1 -0
  144. package/assets/esri/core/workers/chunks/{135e270b4f03c4270870.js → af47272aaaef0ea57e71.js} +1 -1
  145. package/assets/esri/core/workers/chunks/b0f43191a431c9de16e5.js +1 -0
  146. package/assets/esri/core/workers/chunks/{bc3bcf88b252760e2574.js → b3028b1ff75eafd0c358.js} +1 -1
  147. package/assets/esri/core/workers/chunks/b320bb76c7e9998fe53b.js +1 -0
  148. package/assets/esri/core/workers/chunks/{79968c183135281d2a6f.js → b3613a38178cad2ebc82.js} +1 -1
  149. package/assets/esri/core/workers/chunks/b8a3f1e60e24a13749c1.js +1 -0
  150. package/assets/esri/core/workers/chunks/ba4571d2637a74a59552.js +1 -0
  151. package/assets/esri/core/workers/chunks/bb7976e2f883b544add6.js +1 -0
  152. package/assets/esri/core/workers/chunks/{56916e56c20465428dd4.js → be3b874f86f627f4fa98.js} +1 -1
  153. package/assets/esri/core/workers/chunks/c29486c4eeb3e72effff.js +1 -0
  154. package/assets/esri/core/workers/chunks/{2b94623cabc6ae0f86ce.js → c37f7756d48ff9af2656.js} +1 -1
  155. package/assets/esri/core/workers/chunks/{1c52999a6392370844a6.js → c4090a60d149a5962179.js} +1 -1
  156. package/assets/esri/core/workers/chunks/c61c61dac1e8d6188749.js +1 -0
  157. package/assets/esri/core/workers/chunks/c84caf81bfaa4a8b5aa1.js +1 -0
  158. package/assets/esri/core/workers/chunks/c8c8cf43fd640d2f5cb1.js +1 -0
  159. package/assets/esri/core/workers/chunks/{73c1d43070b4fe1e5c1e.js → c8e686efe344a33a0258.js} +1 -1
  160. package/assets/esri/core/workers/chunks/{6bb5158de43c4b59107f.js → c9b16fd41cd59d452522.js} +1 -1
  161. package/assets/esri/core/workers/chunks/ce16489cf7eb0d78c741.js.LICENSE.txt +1 -1
  162. package/assets/esri/core/workers/chunks/d048e4926e78458afa3e.js +1 -0
  163. package/assets/esri/core/workers/chunks/d07f911d40bf05fc0306.js +1 -0
  164. package/assets/esri/core/workers/chunks/d1ca7c3a32ce00ed8b81.js +1 -0
  165. package/assets/esri/core/workers/chunks/{630efe10c871425b6a95.js → d1e97cce5047f1791e22.js} +1 -1
  166. package/assets/esri/core/workers/chunks/d28670cb11164e318e45.js +1 -0
  167. package/assets/esri/core/workers/chunks/{46ef545d2b3b3f4e6d32.js → d391bfbaf0e790cd10d6.js} +2 -2
  168. package/assets/esri/core/workers/chunks/{46ef545d2b3b3f4e6d32.js.LICENSE.txt → d391bfbaf0e790cd10d6.js.LICENSE.txt} +1 -1
  169. package/assets/esri/core/workers/chunks/d56ac52a5288e06365e7.js +1 -0
  170. package/assets/esri/core/workers/chunks/d6e0528eacee7ea4c1ce.js.LICENSE.txt +1 -1
  171. package/assets/esri/core/workers/chunks/{d570c75a425aa29672c8.js → da24ad57747714ac5eda.js} +1 -1
  172. package/assets/esri/core/workers/chunks/{7e43c105f1cfc44b7bd0.js → dc51438b832551924a9e.js} +1 -1
  173. package/assets/esri/core/workers/chunks/dc66490520f97eef15bf.js +316 -0
  174. package/assets/esri/core/workers/chunks/ddca92e18e96ea1c9d89.js +1 -0
  175. package/assets/esri/core/workers/chunks/{cfa3164e7fa1884dc2b9.js → ddfd01bb9ba8577c3ffc.js} +1 -1
  176. package/assets/esri/core/workers/chunks/ded9747ae04ab889d52a.js +1 -0
  177. package/assets/esri/core/workers/chunks/{50d9f69d5255af4b29bb.js → df5afa06c6deb6b40109.js} +1 -1
  178. package/assets/esri/core/workers/chunks/df8279e1baf378faf85f.js +1 -0
  179. package/assets/esri/core/workers/chunks/dff2df259f140b7d97a9.js +1 -0
  180. package/assets/esri/core/workers/chunks/e25c4b4a03270d48f408.js +1 -0
  181. package/assets/esri/core/workers/chunks/e3434f91f47f551d9e02.js +1 -0
  182. package/assets/esri/core/workers/chunks/{da573ecc68e6aa8f6da9.js → e767f83f9e2de6650f80.js} +1 -1
  183. package/assets/esri/core/workers/chunks/e9d4cae2144974489d6e.js +1 -0
  184. package/assets/esri/core/workers/chunks/{91df8638b8b904e6d8c5.js → ead8d0cbcebd12dbfad7.js} +1 -1
  185. package/assets/esri/core/workers/chunks/eb6c3dd440ede4adf603.js +1 -0
  186. package/assets/esri/core/workers/chunks/eb9c166db0db6fa60e95.js +1 -0
  187. package/assets/esri/core/workers/chunks/edc671b9b83c8e19cb42.js +1 -0
  188. package/assets/esri/core/workers/chunks/{16d66770ef841564ee3f.js → ee5aa11750c51b220f1e.js} +1 -1
  189. package/assets/esri/core/workers/chunks/ee5f0fd5384caa11c986.js +1 -0
  190. package/assets/esri/core/workers/chunks/f141c9f7f0d9b2322bf6.js +1 -0
  191. package/assets/esri/core/workers/chunks/{5875a51b97ee9bd438a0.js → f34e3fa0c5b28531e289.js} +1 -1
  192. package/assets/esri/core/workers/chunks/f64037a88ab03662dc2a.js +1 -0
  193. package/assets/esri/core/workers/chunks/f651c05604eab83aef5f.js.LICENSE.txt +1 -1
  194. package/assets/esri/core/workers/chunks/{fa4411e0a5ac3fcba365.js → f65c0102af17390a50ac.js} +1 -1
  195. package/assets/esri/core/workers/chunks/f6c11c8ac687de3ef1ab.js +1 -0
  196. package/assets/esri/core/workers/chunks/f7a1f48c53422c6e2028.js +1 -0
  197. package/assets/esri/core/workers/chunks/f7f002ea5ff5fe7f6249.js +1 -0
  198. package/assets/esri/core/workers/chunks/f80f5dbf96c343ac4df6.js +1 -0
  199. package/assets/esri/core/workers/chunks/f8e889be4b45f6f0667e.js +1 -0
  200. package/assets/esri/core/workers/chunks/fbd796c88f07bb6755dc.js +1 -0
  201. package/assets/esri/core/workers/chunks/fbd8d2f61f8a15bcf3db.js +1 -0
  202. package/assets/esri/core/workers/chunks/fccd931f95d81ecc57b2.js +1 -0
  203. package/assets/esri/core/workers/chunks/{2f78861afe0e9037dd8d.js → fe49321dca22dc60d105.js} +1 -1
  204. package/assets/esri/core/workers/chunks/fec3897ed7e8691387ed.js +1 -0
  205. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  206. package/assets/esri/themes/base/widgets/_Directions.scss +17 -18
  207. package/assets/esri/themes/base/widgets/_NavigationToggle.scss +1 -1
  208. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -4
  209. package/assets/esri/themes/base/widgets/_UtilityNetworkTrace.scss +14 -4
  210. package/assets/esri/themes/base/widgets/_Widget.scss +1 -1
  211. package/assets/esri/themes/dark/main.css +1 -1
  212. package/assets/esri/themes/light/main.css +1 -1
  213. package/assets/esri/themes/light/view.css +1 -1
  214. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ar.json +1 -1
  215. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_bg.json +1 -1
  216. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_bs.json +1 -1
  217. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ca.json +1 -1
  218. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_cs.json +1 -1
  219. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_da.json +1 -1
  220. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_de.json +1 -1
  221. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_el.json +1 -1
  222. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_es.json +1 -1
  223. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_et.json +1 -1
  224. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_fi.json +1 -1
  225. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_fr.json +1 -1
  226. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_he.json +1 -1
  227. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_hr.json +1 -1
  228. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_hu.json +1 -1
  229. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_id.json +1 -1
  230. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_it.json +1 -1
  231. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ja.json +1 -1
  232. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ko.json +1 -1
  233. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_lt.json +1 -1
  234. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_lv.json +1 -1
  235. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_nl.json +1 -1
  236. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_no.json +1 -1
  237. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pl.json +1 -1
  238. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pt-BR.json +1 -1
  239. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pt-PT.json +1 -1
  240. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ro.json +1 -1
  241. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ru.json +1 -1
  242. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sk.json +1 -1
  243. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sl.json +1 -1
  244. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sr.json +1 -1
  245. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sv.json +1 -1
  246. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_th.json +1 -1
  247. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_tr.json +1 -1
  248. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_uk.json +1 -1
  249. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_vi.json +1 -1
  250. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-CN.json +1 -1
  251. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-HK.json +1 -1
  252. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-TW.json +1 -1
  253. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  254. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  255. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  256. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  257. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  258. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  259. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  260. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  261. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  262. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  263. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  264. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  265. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  266. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  267. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  268. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  269. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  270. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  271. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  272. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  273. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  274. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  275. package/assets/esri/widgets/Editor/t9n/Editor_no.json +1 -1
  276. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  277. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  278. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  279. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  280. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  281. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  282. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  283. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  284. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  285. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  286. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  287. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  288. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  289. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  290. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  291. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  292. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  293. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  294. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  295. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  296. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  297. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  298. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  299. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  300. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  301. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  302. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  303. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  304. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  305. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  306. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  307. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  308. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  309. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  310. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  311. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  312. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  313. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  314. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  315. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  316. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  317. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  318. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  319. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  320. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  321. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  322. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  323. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  324. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  325. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  326. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  327. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  328. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  329. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  330. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  331. package/assets/esri/widgets/Sketch/t9n/Sketch_ar.json +1 -1
  332. package/assets/esri/widgets/Sketch/t9n/Sketch_bg.json +1 -1
  333. package/assets/esri/widgets/Sketch/t9n/Sketch_bs.json +1 -1
  334. package/assets/esri/widgets/Sketch/t9n/Sketch_ca.json +1 -1
  335. package/assets/esri/widgets/Sketch/t9n/Sketch_cs.json +1 -1
  336. package/assets/esri/widgets/Sketch/t9n/Sketch_da.json +1 -1
  337. package/assets/esri/widgets/Sketch/t9n/Sketch_de.json +1 -1
  338. package/assets/esri/widgets/Sketch/t9n/Sketch_el.json +1 -1
  339. package/assets/esri/widgets/Sketch/t9n/Sketch_es.json +1 -1
  340. package/assets/esri/widgets/Sketch/t9n/Sketch_et.json +1 -1
  341. package/assets/esri/widgets/Sketch/t9n/Sketch_fi.json +1 -1
  342. package/assets/esri/widgets/Sketch/t9n/Sketch_fr.json +1 -1
  343. package/assets/esri/widgets/Sketch/t9n/Sketch_he.json +1 -1
  344. package/assets/esri/widgets/Sketch/t9n/Sketch_hr.json +1 -1
  345. package/assets/esri/widgets/Sketch/t9n/Sketch_hu.json +1 -1
  346. package/assets/esri/widgets/Sketch/t9n/Sketch_id.json +1 -1
  347. package/assets/esri/widgets/Sketch/t9n/Sketch_it.json +1 -1
  348. package/assets/esri/widgets/Sketch/t9n/Sketch_ja.json +1 -1
  349. package/assets/esri/widgets/Sketch/t9n/Sketch_ko.json +1 -1
  350. package/assets/esri/widgets/Sketch/t9n/Sketch_lt.json +1 -1
  351. package/assets/esri/widgets/Sketch/t9n/Sketch_lv.json +1 -1
  352. package/assets/esri/widgets/Sketch/t9n/Sketch_nl.json +1 -1
  353. package/assets/esri/widgets/Sketch/t9n/Sketch_no.json +1 -1
  354. package/assets/esri/widgets/Sketch/t9n/Sketch_pl.json +1 -1
  355. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-BR.json +1 -1
  356. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-PT.json +1 -1
  357. package/assets/esri/widgets/Sketch/t9n/Sketch_ro.json +1 -1
  358. package/assets/esri/widgets/Sketch/t9n/Sketch_ru.json +1 -1
  359. package/assets/esri/widgets/Sketch/t9n/Sketch_sk.json +1 -1
  360. package/assets/esri/widgets/Sketch/t9n/Sketch_sl.json +1 -1
  361. package/assets/esri/widgets/Sketch/t9n/Sketch_sr.json +1 -1
  362. package/assets/esri/widgets/Sketch/t9n/Sketch_sv.json +1 -1
  363. package/assets/esri/widgets/Sketch/t9n/Sketch_th.json +1 -1
  364. package/assets/esri/widgets/Sketch/t9n/Sketch_tr.json +1 -1
  365. package/assets/esri/widgets/Sketch/t9n/Sketch_uk.json +1 -1
  366. package/assets/esri/widgets/Sketch/t9n/Sketch_vi.json +1 -1
  367. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-CN.json +1 -1
  368. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-HK.json +1 -1
  369. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-TW.json +1 -1
  370. package/chunks/ComponentShader.glsl.js +72 -39
  371. package/chunks/Envelope.js +1 -1
  372. package/chunks/Geometry.js +1 -1
  373. package/chunks/MultiPathImpl.js +1 -1
  374. package/chunks/OITBlend.glsl.js +3 -3
  375. package/chunks/Point2D.js +1 -1
  376. package/chunks/UnitFactory.js +1 -1
  377. package/chunks/bundle.js +1 -1
  378. package/chunks/containsOperator.js +1 -1
  379. package/chunks/densifyOperator.js +1 -1
  380. package/chunks/differenceOperator.js +1 -1
  381. package/chunks/intersectsOperator.js +1 -1
  382. package/chunks/persistableUrlUtils.js +1 -1
  383. package/config.js +1 -1
  384. package/core/Identifiable.js +1 -1
  385. package/core/MultiOriginJSONSupport.js +1 -1
  386. package/core/NumericIdentifiable.js +5 -0
  387. package/core/QueueProcessor.js +1 -1
  388. package/core/SetUtils.js +1 -1
  389. package/core/WriteableMultiOriginJSONMixin.js +5 -0
  390. package/core/dedupeResult.js +5 -0
  391. package/core/has.js +1 -1
  392. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  393. package/{views/3d/support/ImageWithType.js → core/performance.js} +1 -1
  394. package/core/sanitizerUtils.js +1 -1
  395. package/core/scheduling.js +1 -1
  396. package/core/unitUtils.js +1 -1
  397. package/core/workers/Connection.js +1 -1
  398. package/core/workers/WorkerHandle.js +1 -1
  399. package/core/workers/utils.js +1 -1
  400. package/editing/sharedTemplates/executor/support/createFeatureServiceEdit.js +1 -1
  401. package/form/FormTemplate.js +1 -1
  402. package/form/elements/Element.js +1 -1
  403. package/form/elements/FieldElement.js +1 -1
  404. package/form/elements/GroupElement.js +1 -1
  405. package/geohash/GeohashCell.js +1 -1
  406. package/geohash/geohashUtils.js +1 -1
  407. package/geometry/Extent.js +1 -1
  408. package/geometry/Geometry.js +1 -1
  409. package/geometry/GeometryCursor.js +1 -1
  410. package/geometry/Point.js +1 -1
  411. package/geometry/SpatialReference.js +1 -1
  412. package/geometry/ellipsoidUtils.js +1 -1
  413. package/geometry/geometryCursorCollectUtils.js +1 -1
  414. package/geometry/libtess.js +1 -1
  415. package/geometry/operators/gx/operatorOffset.js +1 -1
  416. package/geometry/operators/support/jsonConverter.js +1 -1
  417. package/geometry/support/MeshTransform.js +1 -1
  418. package/geometry/support/axisAngleDegrees.js +1 -1
  419. package/geometry/support/jsonUtils.js +1 -1
  420. package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
  421. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  422. package/geometry/support/meshUtils/rotate.js +1 -1
  423. package/geometry/support/meshUtils/scale.js +1 -1
  424. package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
  425. package/geometry/support/normalizeUtilsSync.js +1 -1
  426. package/geometry/support/plane.js +1 -1
  427. package/geometry/support/polygonUtils.js +1 -1
  428. package/geometry/support/triangulationUtils.js +1 -1
  429. package/identity/Credential.js +1 -1
  430. package/identity/IdentityManager.js +1 -1
  431. package/identity/IdentityManagerBase.js +1 -1
  432. package/interfaces.d.ts +2067 -458
  433. package/intl/date.js +1 -1
  434. package/intl.d.ts +2 -0
  435. package/intl.js +1 -1
  436. package/kernel.js +1 -1
  437. package/layers/FeatureLayer.js +1 -1
  438. package/layers/KnowledgeGraphLayer.js +1 -1
  439. package/layers/Layer.js +1 -1
  440. package/layers/LinkChartLayer.js +1 -1
  441. package/layers/MapNotesLayer.js +1 -1
  442. package/layers/OrientedImageryLayer.js +1 -1
  443. package/layers/SceneLayer.js +1 -1
  444. package/layers/graphics/OptimizedFeature.js +1 -1
  445. package/layers/graphics/OptimizedGeometry.js +1 -1
  446. package/layers/graphics/centroid.js +1 -1
  447. package/layers/graphics/contains.js +1 -1
  448. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  449. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  450. package/layers/graphics/data/AttributesBuilder.js +1 -1
  451. package/layers/graphics/data/FeatureStore.js +1 -1
  452. package/layers/graphics/data/QueryEngine.js +1 -1
  453. package/layers/graphics/data/QueryEngineResult.js +1 -1
  454. package/layers/graphics/data/geometryUtils.js +1 -1
  455. package/layers/graphics/data/spatialQuerySupport.js +1 -1
  456. package/layers/graphics/featureConversionUtils.js +1 -1
  457. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  458. package/layers/graphics/sources/connections/GeoEventConnection.js +1 -1
  459. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  460. package/layers/graphics/sources/geojson/geojson.js +1 -1
  461. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  462. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  463. package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
  464. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  465. package/layers/knowledgeGraph/layerUtils.js +1 -1
  466. package/layers/mixins/ArcGISImageService.js +1 -1
  467. package/layers/mixins/ImageryTileMixin.js +1 -1
  468. package/layers/ogc/ogcFeatureUtils.js +1 -1
  469. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  470. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  471. package/layers/save/groupLayerUtils.js +1 -1
  472. package/layers/support/DateTimeFieldFormat.js +1 -1
  473. package/layers/support/FieldFormat.js +1 -1
  474. package/layers/support/MediaElementBase.js +1 -1
  475. package/layers/support/NumberFieldFormat.js +1 -1
  476. package/layers/support/PixelBlock.js +1 -1
  477. package/layers/support/RasterInfo.js +1 -1
  478. package/layers/support/RasterJobHandler.js +1 -1
  479. package/layers/support/RasterSensorInfo.js +1 -1
  480. package/layers/support/RasterStorageInfo.js +1 -1
  481. package/layers/support/RasterWorker.js +1 -1
  482. package/layers/support/Sublayer.js +1 -1
  483. package/layers/support/TitleCreator.js +1 -1
  484. package/layers/support/arcgisLayerUrl.js +1 -1
  485. package/layers/support/capabilities.js +1 -1
  486. package/layers/support/fieldConfigUtils.js +1 -1
  487. package/layers/support/fieldUtils.js +1 -1
  488. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  489. package/layers/support/rasterDatasets/pixelReader.js +1 -1
  490. package/layers/support/rasterFieldUtils.js +1 -1
  491. package/layers/support/rasterFunctions/pixelTransformUtils.js +5 -0
  492. package/layers/support/rasterFunctions/pixelUtils.js +1 -1
  493. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  494. package/layers/support/source/DataLayerSource.js +1 -1
  495. package/networks/CircuitManager.d.ts +4 -0
  496. package/networks/UnitIdentifierManager.d.ts +4 -0
  497. package/networks/support/Circuit.d.ts +4 -0
  498. package/networks/support/CircuitLocation.d.ts +4 -0
  499. package/networks/support/CircuitPath.d.ts +4 -0
  500. package/networks/support/CircuitPathConnectivityElement.d.ts +4 -0
  501. package/networks/support/CircuitSection.d.ts +4 -0
  502. package/networks/support/Subcircuit.d.ts +4 -0
  503. package/package.json +5 -5
  504. package/popup/ExpressionInfo.js +1 -1
  505. package/popup/FieldInfo.js +1 -1
  506. package/popup/content/AttachmentsContent.js +1 -1
  507. package/popup/content/BarChartMediaInfo.js +1 -1
  508. package/popup/content/ColumnChartMediaInfo.js +1 -1
  509. package/popup/content/Content.js +1 -1
  510. package/popup/content/CustomContent.js +1 -1
  511. package/popup/content/ExpressionContent.js +1 -1
  512. package/popup/content/FieldsContent.js +1 -1
  513. package/popup/content/ImageMediaInfo.js +1 -1
  514. package/popup/content/LineChartMediaInfo.js +1 -1
  515. package/popup/content/MediaContent.js +1 -1
  516. package/popup/content/PieChartMediaInfo.js +1 -1
  517. package/popup/content/RelationshipContent.js +1 -1
  518. package/popup/content/TextContent.js +1 -1
  519. package/popup/content/UtilityNetworkAssociationsContent.js +1 -1
  520. package/popup/content/mixins/ChartMediaInfo.js +1 -1
  521. package/popup/content/mixins/MediaInfo.js +1 -1
  522. package/popup/content.js +1 -1
  523. package/popup/support/FieldInfoFormat.js +1 -1
  524. package/processRequest.js +5 -0
  525. package/request.js +1 -1
  526. package/requestConfig.js +5 -0
  527. package/requestQueue.js +5 -0
  528. package/rest/geometryService/utils.js +1 -1
  529. package/rest/networks/circuits/support/CircuitTraceResult.d.ts +4 -0
  530. package/rest/networks/circuits/support/CircuitVerifyResult.d.ts +4 -0
  531. package/rest/networks/support/TelecomNetworkElement.d.ts +4 -0
  532. package/rest/networks/unitIdentifiers/support/UnitQueryResult.d.ts +4 -0
  533. package/rest/print.js +1 -1
  534. package/rest/query/executeForCount.js +1 -1
  535. package/rest/query/executeForExtent.js +1 -1
  536. package/rest/query/executeForIds.js +1 -1
  537. package/rest/query/executeQueryJSON.js +1 -1
  538. package/rest/query/executeQueryPBF.js +1 -1
  539. package/rest/query/operations/pbfDehydratedFeatureSet.js +1 -1
  540. package/rest/query/operations/pbfJSONFeatureSet.js +1 -1
  541. package/rest/query/operations/query.js +1 -1
  542. package/rest/query/operations/queryZScale.js +1 -1
  543. package/rest/support/BaseImageMeasureResultValue.js +5 -0
  544. package/rest/support/ImageAreaResult.js +1 -1
  545. package/rest/support/ImageDistanceResult.js +1 -1
  546. package/rest/support/ImageHeightResult.js +1 -1
  547. package/rest/support/ImageMeasureResultAngleValue.js +5 -0
  548. package/rest/support/ImageMeasureResultAreaValue.js +5 -0
  549. package/rest/support/ImageMeasureResultLengthValue.js +5 -0
  550. package/rest/support/ImageWithType.js +5 -0
  551. package/rest/support/imageMeasureUtils.js +1 -1
  552. package/rest/versionManagement/getVersionInfos.js +1 -1
  553. package/smartMapping/renderers/size.js +1 -1
  554. package/smartMapping/statistics/histogram.js +1 -1
  555. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  556. package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
  557. package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
  558. package/smartMapping/support/adapters/support/utils.js +1 -1
  559. package/smartMapping/support/utils.js +1 -1
  560. package/support/basemapDefinitions.js +1 -1
  561. package/support/elevationInfoUtils.js +1 -1
  562. package/support/requestImageUtils.js +1 -1
  563. package/support/revision.js +1 -1
  564. package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
  565. package/symbols/support/utils.js +1 -1
  566. package/time/TimeExtent.js +1 -1
  567. package/undoredo/support/Services.js +1 -1
  568. package/views/2d/GoToManager.js +1 -1
  569. package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
  570. package/views/2d/constraints/GeometryConstraint.js +1 -1
  571. package/views/2d/constraints/RotationConstraint.js +1 -1
  572. package/views/2d/constraints/ZoomConstraint.js +1 -1
  573. package/views/2d/engine/Bitmap.js +1 -1
  574. package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
  575. package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
  576. package/views/2d/engine/webgl/Mesh2D.js +1 -1
  577. package/views/2d/engine/webgl/brushes/WGLBrushVTLSymbol.js +1 -1
  578. package/views/2d/engine/webgl/mesh/templates/templateUtils.js +1 -1
  579. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  580. package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
  581. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  582. package/views/2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js +1 -1
  583. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  584. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  585. package/views/2d/layers/features/aggregation/GridCell.js +1 -1
  586. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  587. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  588. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  589. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  590. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  591. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  592. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  593. package/views/2d/layers/features/processor/AAggregateStrategy.js +1 -1
  594. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  595. package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
  596. package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
  597. package/views/2d/layers/features/schema/ExceedsLimitCache.js +5 -0
  598. package/views/2d/layers/features/schema/SourceSchema.js +1 -1
  599. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  600. package/views/2d/layers/features/sources/strategies/AFeatureLoadStrategy.js +1 -1
  601. package/views/2d/layers/features/sources/strategies/ALoadStrategy.js +1 -1
  602. package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
  603. package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
  604. package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
  605. package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
  606. package/views/2d/layers/features/sources/strategies/constants.js +5 -0
  607. package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
  608. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  609. package/views/2d/layers/features/support/FeatureFilterEvaluator.js +1 -1
  610. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  611. package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
  612. package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
  613. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  614. package/views/2d/layers/features/support/GraphicsReader.js +1 -1
  615. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  616. package/views/3d/FocusAreasView.js +1 -1
  617. package/views/3d/GroundView3D.js +1 -1
  618. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  619. package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
  620. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillComputation.js +1 -1
  621. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  622. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  623. package/views/3d/analysis/VolumeMeasurement/volumeMeasurementErrors.js +5 -0
  624. package/views/3d/environment/CloudsRenderer.js +1 -1
  625. package/views/3d/glTF/DefaultLoadingContext.js +1 -1
  626. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  627. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
  628. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  629. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
  630. package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
  631. package/views/3d/layers/ElevationLayerView3D.js +1 -1
  632. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  633. package/views/3d/layers/FlowSubView3D.js +1 -1
  634. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  635. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  636. package/views/3d/layers/graphics/FeatureGraphics3DGraphicsPipeline.js +1 -1
  637. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  638. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  639. package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
  640. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  641. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  642. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  643. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  644. package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
  645. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  646. package/views/3d/layers/graphics/Labeler.js +1 -1
  647. package/views/3d/layers/graphics/ObjectResourceCache.js +1 -1
  648. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  649. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
  650. package/views/3d/layers/graphics/pipeline/featureSet/PBFPointFeatureSetView.js +1 -1
  651. package/views/3d/layers/graphics/pipeline/featureSet/TiledFeatureStore.js +1 -1
  652. package/views/3d/layers/graphics/pipeline/fetching/Tile3DFetcher.js +1 -1
  653. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  654. package/views/3d/layers/i3s/I3SDataRequester.js +5 -0
  655. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  656. package/views/3d/layers/i3s/I3SNode.js +1 -1
  657. package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
  658. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  659. package/views/3d/layers/i3s/I3SQueryFeatureAdapter.js +1 -1
  660. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  661. package/views/3d/layers/support/FeatureTile.js +1 -1
  662. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  663. package/views/3d/layers/support/FeatureTileFetcher3DContext.js +1 -1
  664. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  665. package/views/3d/layers/support/ImageHighlightHelper3D.js +1 -1
  666. package/views/3d/layers/support/MediaLayerInteractionOptions.js +1 -1
  667. package/views/3d/layers/support/MediaLayerInteractionReshapeOptions.js +5 -0
  668. package/views/3d/layers/support/SampledGeometryMaxDistanceRatio.js +5 -0
  669. package/views/3d/layers/support/featureTileQuery3D.js +1 -1
  670. package/views/3d/layers/support/fetchTile.js +1 -1
  671. package/views/3d/layers/support/lyr3dTypeConversions.js +1 -1
  672. package/views/3d/state/ViewStateManager.js +1 -1
  673. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  674. package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
  675. package/views/3d/state/controllers/RotateController.js +1 -1
  676. package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
  677. package/views/3d/state/controllers/ZoomControllerLocal.js +1 -1
  678. package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
  679. package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
  680. package/views/3d/state/utils/navigationUtils.js +1 -1
  681. package/views/3d/support/DisplayQualityProfile.js +1 -1
  682. package/views/3d/support/QualitySettings.js +1 -1
  683. package/views/3d/support/ResourceController.js +1 -1
  684. package/views/3d/support/SharedSymbolResources.js +1 -1
  685. package/views/3d/support/StreamTextureCollection.js +1 -1
  686. package/views/3d/support/engineContent/line.js +1 -1
  687. package/views/3d/support/flow/FlowSubViewExtent3D.js +1 -1
  688. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  689. package/views/3d/support/flow/FlowWorker.js +1 -1
  690. package/views/3d/support/flow/StreamlineResources3D.js +1 -1
  691. package/views/3d/support/flow/StreamlineResources3DOverlay.js +1 -1
  692. package/views/3d/support/flow/StreamlineResources3DShape.js +1 -1
  693. package/views/3d/support/flow/constants.js +1 -1
  694. package/views/3d/support/hitTest.js +1 -1
  695. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  696. package/views/3d/support/renderInfoUtils/polygon.js +1 -1
  697. package/views/3d/terrain/OverlayRenderer.js +1 -1
  698. package/views/3d/terrain/TerrainSurface.js +1 -1
  699. package/views/3d/terrain/Tile.js +1 -1
  700. package/views/3d/terrain/TileOverlayData.js +1 -1
  701. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  702. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  703. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  704. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  705. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  706. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +7 -7
  707. package/views/3d/webgl-engine/core/shaderModules/BooleanDrawUniform.js +5 -0
  708. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueConstructionContext.js +1 -1
  709. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  710. package/views/3d/webgl-engine/lib/CutFillDepth.js +1 -1
  711. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  712. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  713. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  714. package/views/3d/webgl-engine/lighting/SceneLighting.js +1 -1
  715. package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
  716. package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
  717. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  718. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  719. package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +10 -4
  720. package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
  721. package/views/DOMContainer.js +1 -1
  722. package/views/SceneView.js +1 -1
  723. package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
  724. package/views/analysis/ElevationProfile/ElevationProfileLineGroundComputation.js +1 -1
  725. package/views/analysis/ElevationProfile/ElevationProfileLineInputComputation.js +1 -1
  726. package/views/analysis/ElevationProfile/ElevationProfileResult.js +1 -1
  727. package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
  728. package/views/analysis/ElevationProfile/constants.js +1 -1
  729. package/views/analysis/ElevationProfile/elevationProfileGenerationUtils.js +1 -1
  730. package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
  731. package/views/analysis/ElevationProfile/elevationProfileLayerUtils.js +5 -0
  732. package/views/draw/DrawOperation.js +1 -1
  733. package/views/draw/MultipointDrawAction.js +1 -1
  734. package/views/draw/PointDrawAction.js +1 -1
  735. package/views/draw/PolygonDrawAction.js +1 -1
  736. package/views/draw/PolylineDrawAction.js +1 -1
  737. package/views/draw/SegmentDrawAction.js +1 -1
  738. package/views/draw/input/CursorUpdateEvents.js +5 -0
  739. package/views/draw/input/DrawCompleteEvent.js +5 -0
  740. package/views/draw/input/VertexAddEvent.js +5 -0
  741. package/views/draw/input/VertexRemoveEvent.js +5 -0
  742. package/views/draw/input/VertexUpdateEvent.js +5 -0
  743. package/views/draw/support/Reshape.js +1 -1
  744. package/views/draw/support/reshapeUtils.js +1 -1
  745. package/views/interactive/dragEventPipeline.js +1 -1
  746. package/views/interactive/editGeometry/CheckpointingEditGeometryOperations.js +5 -0
  747. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  748. package/views/interactive/editGeometry/operations/ReplayableAppendVertex.js +5 -0
  749. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  750. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
  751. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
  752. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
  753. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTilesSimple.js +1 -1
  754. package/views/layers/FeatureLayerView.js +1 -1
  755. package/views/support/PromiseQueue.js +1 -1
  756. package/views/support/Scheduler.js +1 -1
  757. package/views/support/TextureCompressionWorker.js +1 -1
  758. package/views/webgl/ShaderBuilder.js +1 -1
  759. package/views/webgl/Texture.js +1 -1
  760. package/webdoc/support/webdocSaveUtils.js +1 -1
  761. package/webscene/spec-certification/api.js +1 -1
  762. package/widgets/Attachments/AttachmentsViewModel.js +1 -1
  763. package/widgets/BasemapLayerList.js +1 -1
  764. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  765. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  766. package/widgets/BatchAttributeForm.js +1 -1
  767. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  768. package/widgets/CoordinateConversion.js +1 -1
  769. package/widgets/Daylight/DaylightViewModel.js +1 -1
  770. package/widgets/Daylight.js +1 -1
  771. package/widgets/Directions/css.js +1 -1
  772. package/widgets/Directions.js +1 -1
  773. package/widgets/Editor/AddAssociationWorkflow.js +1 -1
  774. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  775. package/widgets/Editor/EditorViewModel.js +1 -1
  776. package/widgets/Editor/Edits.js +1 -1
  777. package/widgets/Editor/MergeFeaturesWorkflow.d.ts +4 -0
  778. package/widgets/Editor/MergeFeaturesWorkflow.js +5 -0
  779. package/widgets/Editor/MergeFeaturesWorkflowData.d.ts +4 -0
  780. package/widgets/Editor/MergeFeaturesWorkflowData.js +5 -0
  781. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  782. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  783. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  784. package/widgets/Editor/UpdateFeaturesWorkflowData.js +1 -1
  785. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  786. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  787. package/widgets/Editor/UpdateWorkflow.js +1 -1
  788. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  789. package/widgets/Editor/components/FeatureList.js +1 -1
  790. package/widgets/Editor/components/UploadDetails.js +1 -1
  791. package/widgets/Editor/support/EditorItem.js +1 -1
  792. package/widgets/Editor/support/SketchController.js +1 -1
  793. package/widgets/Editor/support/errors.js +5 -0
  794. package/widgets/Editor/support/mergeFeaturesUtils.js +5 -0
  795. package/widgets/Editor/workflowUtils.js +1 -1
  796. package/widgets/Editor.js +1 -1
  797. package/widgets/Feature/FeatureExpression.js +1 -1
  798. package/widgets/Feature/FeatureFields/FeatureFieldsViewModel.js +1 -1
  799. package/widgets/Feature/FeatureFields.js +1 -1
  800. package/widgets/Feature/FeatureMedia/FeatureMediaViewModel.js +1 -1
  801. package/widgets/Feature/FeatureMedia.js +1 -1
  802. package/widgets/Feature/FeatureViewModel.js +1 -1
  803. package/widgets/Feature/support/featureUtils.js +1 -1
  804. package/widgets/Feature.js +1 -1
  805. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  806. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  807. package/widgets/FeatureForm/FieldInput.js +1 -1
  808. package/widgets/FeatureForm/InputBase.js +1 -1
  809. package/widgets/FeatureForm/RelationshipInput.js +1 -1
  810. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  811. package/widgets/FeatureForm.js +1 -1
  812. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  813. package/widgets/FeatureTable/FieldColumn.js +1 -1
  814. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  815. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  816. package/widgets/LayerList.js +1 -1
  817. package/widgets/Legend/LegendViewModel.js +1 -1
  818. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  819. package/widgets/Legend.js +1 -1
  820. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  821. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  822. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  823. package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
  824. package/widgets/OrientedImageryViewer/components/SketchTools.js +1 -1
  825. package/widgets/OrientedImageryViewer/galleryUtils.js +1 -1
  826. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  827. package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
  828. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  829. package/widgets/PanoramicViewer/PanoramicZoomManager.js +1 -1
  830. package/widgets/PanoramicViewer/support/PanoramicMeshManager.js +1 -1
  831. package/widgets/PanoramicViewer/support/PanoramicTileNode.js +1 -1
  832. package/widgets/PanoramicViewer/support/PanoramicTilePyramid.js +1 -1
  833. package/widgets/PanoramicViewer/support/getVisibleTiles.js +5 -0
  834. package/widgets/Print.js +1 -1
  835. package/widgets/Search/LayerSearchSource.js +1 -1
  836. package/widgets/Sketch/CreateToolVisibilityMap.js +5 -0
  837. package/widgets/Sketch/SelectionToolVisibilityMap.js +5 -0
  838. package/widgets/Sketch/VisibleElements.js +1 -1
  839. package/widgets/Sketch.js +1 -1
  840. package/widgets/UtilityNetworkTrace.js +1 -1
  841. package/widgets/support/ColorPicker.js +1 -1
  842. package/widgets/support/FilterCondition.js +1 -1
  843. package/widgets/support/SelectionList/LayerItem.js +1 -1
  844. package/widgets/support/jsxWidgetSupport.js +1 -1
  845. package/assets/esri/core/workers/chunks/01642fe19e81bfa33eb5.js +0 -1
  846. package/assets/esri/core/workers/chunks/039ec0fbe3b4b398b8c6.js +0 -1
  847. package/assets/esri/core/workers/chunks/0429c1a3690f20647c9f.js +0 -1
  848. package/assets/esri/core/workers/chunks/05eee334d58a0b9f6316.js +0 -1
  849. package/assets/esri/core/workers/chunks/065f2bbcaeef1f13fd48.js +0 -1
  850. package/assets/esri/core/workers/chunks/0731e588afd1f561ec3b.js +0 -1
  851. package/assets/esri/core/workers/chunks/09de8be660174a229efb.js +0 -1
  852. package/assets/esri/core/workers/chunks/0eaa4dccba0d844b9da3.js +0 -1
  853. package/assets/esri/core/workers/chunks/0f9bb3187306f89e3d63.js +0 -1
  854. package/assets/esri/core/workers/chunks/1019fa4818624ba292ef.js +0 -1
  855. package/assets/esri/core/workers/chunks/10fb29ba6f3f81353fbc.js +0 -1
  856. package/assets/esri/core/workers/chunks/147ad5fdd02f46b6da24.js +0 -1
  857. package/assets/esri/core/workers/chunks/17103e6542aae53c7301.js +0 -1
  858. package/assets/esri/core/workers/chunks/188272af9a6470ccfe31.js +0 -1
  859. package/assets/esri/core/workers/chunks/18da83afbc324fef9fd8.js +0 -316
  860. package/assets/esri/core/workers/chunks/1a9f544f20f643161a36.js +0 -1
  861. package/assets/esri/core/workers/chunks/1cfcadaa98ac528fea37.js +0 -1
  862. package/assets/esri/core/workers/chunks/1db0bf570a04687b3130.js +0 -1
  863. package/assets/esri/core/workers/chunks/2266a8f2c2ec37c19bb4.js +0 -1
  864. package/assets/esri/core/workers/chunks/24921d31efa8d222ad2d.js +0 -2
  865. package/assets/esri/core/workers/chunks/25639559336109ff3df1.js +0 -1
  866. package/assets/esri/core/workers/chunks/2a5f331c0f18d8574b4e.js +0 -1
  867. package/assets/esri/core/workers/chunks/2a900a632a1231deb713.js +0 -1
  868. package/assets/esri/core/workers/chunks/31c6e951b99315e8e68a.js +0 -1
  869. package/assets/esri/core/workers/chunks/326a76a4e80269d4029d.js +0 -1
  870. package/assets/esri/core/workers/chunks/35491fbdd287470d40a4.js +0 -1
  871. package/assets/esri/core/workers/chunks/36247c6f6fc2891df2cf.js +0 -1
  872. package/assets/esri/core/workers/chunks/36fe6b8228e622407ec2.js +0 -1
  873. package/assets/esri/core/workers/chunks/3d22fe2f2c40abbc246e.js +0 -1
  874. package/assets/esri/core/workers/chunks/3d53307efbc3f07d7bf2.js +0 -1
  875. package/assets/esri/core/workers/chunks/3d65b8a2fbe1df050a25.js +0 -1
  876. package/assets/esri/core/workers/chunks/40b81d1c2d53cf598b8e.js +0 -1
  877. package/assets/esri/core/workers/chunks/42a72e1d963e4636323b.js +0 -1
  878. package/assets/esri/core/workers/chunks/456161a323be7d640c61.js +0 -1
  879. package/assets/esri/core/workers/chunks/459a67928bde4a62b6a4.js +0 -1
  880. package/assets/esri/core/workers/chunks/4c4227b0ea21a5e429ab.js +0 -1
  881. package/assets/esri/core/workers/chunks/4eebd74ebc20579dade8.js +0 -1
  882. package/assets/esri/core/workers/chunks/500d09d2191127371081.js +0 -1
  883. package/assets/esri/core/workers/chunks/50864c1924030e62497d.js +0 -1
  884. package/assets/esri/core/workers/chunks/5707713c2f27588b9194.js +0 -1
  885. package/assets/esri/core/workers/chunks/5713f96bade5ebb54c81.js +0 -1
  886. package/assets/esri/core/workers/chunks/5718cf135e105e1e026b.js +0 -1
  887. package/assets/esri/core/workers/chunks/5c585b338a9e9aa0e205.js +0 -1
  888. package/assets/esri/core/workers/chunks/5d1d909354c90cb8eb60.js +0 -1
  889. package/assets/esri/core/workers/chunks/5ea03f53d4d64d9e7cae.js +0 -1
  890. package/assets/esri/core/workers/chunks/6201356f7f91e5c06425.js +0 -1
  891. package/assets/esri/core/workers/chunks/620a94b54be3ed78350d.js +0 -1
  892. package/assets/esri/core/workers/chunks/63019a7eb5222dc5e420.js +0 -1
  893. package/assets/esri/core/workers/chunks/64629ddcf008349eaf41.js +0 -1
  894. package/assets/esri/core/workers/chunks/64ee8d2acae2d6fce608.js +0 -1
  895. package/assets/esri/core/workers/chunks/650c94c0e8ab9721015e.js +0 -1
  896. package/assets/esri/core/workers/chunks/67f305b0c72e77a6331a.js +0 -1
  897. package/assets/esri/core/workers/chunks/6e5b3bbee054d072b594.js +0 -1
  898. package/assets/esri/core/workers/chunks/6f4bd0ee85e7e5a74340.js +0 -1
  899. package/assets/esri/core/workers/chunks/72ecf49d03bb24bf0998.js +0 -1
  900. package/assets/esri/core/workers/chunks/7421f9575487cdc9e28e.js +0 -1
  901. package/assets/esri/core/workers/chunks/77a11d7d53325d108ed8.js +0 -1
  902. package/assets/esri/core/workers/chunks/7c5c272612198db83851.js +0 -1
  903. package/assets/esri/core/workers/chunks/7d9882ddfa6495f72baa.js +0 -1
  904. package/assets/esri/core/workers/chunks/7fffad8ff6878fa1fd56.js +0 -1
  905. package/assets/esri/core/workers/chunks/81bbe5251ed13c0d91cc.js +0 -1
  906. package/assets/esri/core/workers/chunks/85622fe99f4d08afe875.js +0 -1
  907. package/assets/esri/core/workers/chunks/8b16aa50d879b92a5375.js +0 -1
  908. package/assets/esri/core/workers/chunks/8bc64fc7c4b9eb8fca4d.js +0 -1
  909. package/assets/esri/core/workers/chunks/8eefa133c36a004c054c.js +0 -1
  910. package/assets/esri/core/workers/chunks/91afee11072471e4eefe.js +0 -1
  911. package/assets/esri/core/workers/chunks/929ece362604dc301229.js +0 -1
  912. package/assets/esri/core/workers/chunks/9834bc11586a2d8d6f35.js +0 -1
  913. package/assets/esri/core/workers/chunks/9a723d739ac44b45432c.js +0 -1
  914. package/assets/esri/core/workers/chunks/9c6fc4fe2c46f40d63d9.js +0 -1
  915. package/assets/esri/core/workers/chunks/a5f25104938ab33e7a85.js +0 -1
  916. package/assets/esri/core/workers/chunks/a7bd294996e6c8b8354a.js +0 -1
  917. package/assets/esri/core/workers/chunks/a87521ebe632bf783ef4.js +0 -1
  918. package/assets/esri/core/workers/chunks/a8f998b8ec8c56150479.js +0 -2
  919. package/assets/esri/core/workers/chunks/abf4f018c692c18c3320.js +0 -1
  920. package/assets/esri/core/workers/chunks/ae6066ea6cb373dc6db3.js +0 -1
  921. package/assets/esri/core/workers/chunks/b0b2670596d6d8c32b5e.js +0 -1
  922. package/assets/esri/core/workers/chunks/b1f667006cba60ef4aa7.js +0 -1
  923. package/assets/esri/core/workers/chunks/b2add7338258ca7c24dd.js +0 -1
  924. package/assets/esri/core/workers/chunks/b2d9f4e057af26a538fb.js +0 -1
  925. package/assets/esri/core/workers/chunks/b62807c6fcfb70a87cd4.js +0 -1
  926. package/assets/esri/core/workers/chunks/b8339c1d60847a9eed3e.js +0 -1
  927. package/assets/esri/core/workers/chunks/bc6619307f312f9241bf.js +0 -1
  928. package/assets/esri/core/workers/chunks/bfc1e8aec7aace3ff30e.js +0 -1
  929. package/assets/esri/core/workers/chunks/c0feec6e2f0e45900ae0.js +0 -1
  930. package/assets/esri/core/workers/chunks/c362fbbafec91c44eeb2.js +0 -1
  931. package/assets/esri/core/workers/chunks/c368a8e8d2f1535af446.js +0 -1
  932. package/assets/esri/core/workers/chunks/c55c096669677321a227.js +0 -1
  933. package/assets/esri/core/workers/chunks/c7a3a44cca5a7d52cca9.js +0 -1
  934. package/assets/esri/core/workers/chunks/c941d15190fc08523d0d.js +0 -1
  935. package/assets/esri/core/workers/chunks/cc70a4a915b0b2ccb2a0.js +0 -1
  936. package/assets/esri/core/workers/chunks/d121045cddbe55c2ecb2.js +0 -1
  937. package/assets/esri/core/workers/chunks/d2120a623b1bd91b9ed9.js +0 -1
  938. package/assets/esri/core/workers/chunks/d466f3f0d3824c77da7c.js +0 -1
  939. package/assets/esri/core/workers/chunks/d78c2833cdc4730a88a3.js +0 -1
  940. package/assets/esri/core/workers/chunks/dabc5a38a472c9719df9.js +0 -1
  941. package/assets/esri/core/workers/chunks/dc31865edea480f0ebba.js +0 -1
  942. package/assets/esri/core/workers/chunks/df438b62702007267798.js +0 -1
  943. package/assets/esri/core/workers/chunks/e0bbfbe1ed39c82f1bd4.js +0 -1
  944. package/assets/esri/core/workers/chunks/e6fc278e2390d2787345.js +0 -1
  945. package/assets/esri/core/workers/chunks/f4eb090bcc3eca64306a.js +0 -1
  946. package/assets/esri/core/workers/chunks/f7846523adacbfe5047e.js +0 -1
  947. package/assets/esri/core/workers/chunks/f839b86bee15deaf84e4.js +0 -1
  948. package/assets/esri/core/workers/chunks/f98689562017583f73ee.js +0 -1
  949. package/assets/esri/core/workers/chunks/fa5c87889c2f0bef896b.js +0 -1
  950. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementConfiguration.js +0 -5
  951. package/views/3d/layers/i3s/I3SStreamDataController.js +0 -5
  952. package/views/3d/support/StreamDataLoader.js +0 -5
  953. package/views/3d/support/StreamDataRequester.js +0 -5
  954. package/views/3d/support/downloadSlots.js +0 -5
  955. package/views/draw/input/DrawEvents.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{d as e,a as t,g as n,q as r,p as i,G as s,t as a}from"../../../chunks/Geometry.js";import{aJ as o,i as u,d as m,P as l,b as c,aK as d,m as _}from"../../../chunks/Point2D.js";import{q as h,b as f,p,aX as k,c as b,e as y,a as N,f as T,aY as g}from"../../../chunks/UnitFactory.js";import{a1 as v,a4 as x,P as A,E as S,$ as w,a0 as C,a5 as D,a6 as F,Y as j}from"../../../chunks/Envelope.js";import{a as O,P as z,S as I,M as E,J as P,a5 as B,a6 as V,a7 as R,a8 as M,a9 as U}from"../../../chunks/MultiPathImpl.js";import W from"../../SpatialReference.js";import"./initNoPeFactory.js";function X(){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 Y(){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 L{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:X}}createJSONArrayIterator(e){return{m_iteratorType:"array",m_strict:this.m_options.strict,m_i:-1,m_a:e,next:Y}}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>=o()&&this.m_currentValue<=u()?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;e("unrecognized json element type")}return e("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&&t("invalid token"),this.m_currentValue}currentDoubleValue(){return 7!==this.m_currentToken&&8!==this.m_currentToken&&t("invalid token"),this.m_currentValue}currentInt32Value(){return 8!==this.m_currentToken&&t("invalid token"),this.m_currentValue}currentInt64Value(){return n(0),0n}currentBoolValue(){return 12!==this.m_currentToken&&11!==this.m_currentToken&&t("invalid token"),this.m_currentValue}isError(){return 0}}class G{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){n(0)}addInt32(e){this.addValue_(e)}addBool(e){this.addValue_(e)}addNull(){this.addValue_(null)}getObject(){return this.m_acceptedObject}}class q{constructor(t){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!==t.sz?(this.m_sz=t.sz,t.buffer?(this.m_sz<0&&r("size out of range"),this.m_buffer=t.buffer,this.m_offset=void 0!==t.offset?t.offset:0,this.m_view=void 0!==t.offset?new DataView(t.buffer,t.offset,t.sz):new DataView(this.m_buffer),this.m_bOwnsBuffer=!1,void(this.m_bLittleEndian=!0)):(this.m_sz<0&&r("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))))):t.move?(this.m_sz=t.move.m_sz,this.m_buffer=t.move.m_buffer,this.m_view=t.move.m_view,this.m_bOwnsBuffer=t.move.m_bOwnsBuffer,this.m_bLittleEndian=t.move.m_bLittleEndian,t.move.m_buffer=null,t.move.m_view=null,t.move.m_sz=0,void(t.move.m_bOwnsBuffer=!0)):void e("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===q.getNativeByteOrder())}setNativeByteOrder(){this.m_bLittleEndian=1===q.getNativeByteOrder()}setOrder(e){this.m_bLittleEndian=1===e}getOrder(){return this.m_bLittleEndian?1:0}getView(){return this.m_view||i("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){n(e>=0&&e<=this.m_sz),this.m_sz=e}}function K(e,r,i,a,o,u){let m=!1,l=!1,c=!1,d=!1,_=!1,h=!1,f=!1,p=!1,k=!1,b=!1,y=!1,N=!1,T=!1,g=!1,w=!1,C=!1,D=!1,F=!1,j=!1,O=!1,z=!1,I=!1,E=!1,P=!1,B=Number.NaN,V=Number.NaN,R=Number.NaN,M=Number.NaN,U=0,W=Number.NaN,X=Number.NaN,Y=Number.NaN,L=Number.NaN,G=Number.NaN,q=Number.NaN,K=Number.NaN,J=Number.NaN,re=0,ie=0,se=!1,ae=!1,oe=null,ue=null,me=null,le=null,ce=null;for(;3!==i.nextToken();){const u=i.currentString();if(i.nextToken(),"spatialReference"===u){if(o&&!m){m=!0,1===i.currentToken()?le=Q(i):10!==i.currentToken()&&t("failed to parse spatial reference: object or null is expected");continue}}else if(a)if("hasZ"===u){if(!l){l=!0,se=11===i.currentToken();continue}}else if("hasM"===u){if(!c){c=!0,ae=11===i.currentToken();continue}}else if("rings"===u){if(!(_||h||e!==s.enumUnknown&&e!==s.enumPolygon)){_=!0,({geometry:ce,as:oe,bs:ue}=Z(!0,!1,r,i));continue}}else if("curveRings"===u){if(!h&&(e===s.enumUnknown||e===s.enumPolygon)){h=!0,({geometry:ce,as:oe,bs:ue}=Z(!0,!0,r,i));continue}}else if("paths"===u){if(!(f||p||e!==s.enumUnknown&&e!==s.enumPolyline)){f=!0,({geometry:ce,as:oe,bs:ue}=Z(!1,!1,r,i));continue}}else if("curvePaths"===u){if(!p&&(e===s.enumUnknown||e===s.enumPolyline)){p=!0,({geometry:ce,as:oe,bs:ue}=Z(!1,!0,r,i));continue}}else if("points"===u){if(!k&&(e===s.enumUnknown||e===s.enumMultiPoint)){k=!0,({geometry:ce,as:oe,bs:ue}=H(r,i));continue}}else if("ids"===u){if(!d){d=!0,me=$(r,i);continue}}else if("x"===u){if(!b&&(e===s.enumUnknown||e===s.enumPoint)){b=!0,B=ee(i);continue}}else if("y"===u){if(!y&&(e===s.enumUnknown||e===s.enumPoint)){y=!0,V=ee(i);continue}}else if("z"===u){if(!N&&(e===s.enumUnknown||e===s.enumPoint)){N=!0,R=ee(i);continue}}else if("m"===u){if(!T&&(e===s.enumUnknown||e===s.enumPoint)){T=!0,M=ee(i);continue}}else if("id"===u){if(!g&&(e===s.enumUnknown||e===s.enumPoint)){g=!0,U=te(i);continue}}else if("xmin"===u){if(!w&&(e===s.enumUnknown||e===s.enumEnvelope)){w=!0,W=ee(i);continue}}else if("ymin"===u){if(!C&&(e===s.enumUnknown||e===s.enumEnvelope)){C=!0,X=ee(i);continue}}else if("mmin"===u){if(!z&&(e===s.enumUnknown||e===s.enumEnvelope)){z=!0,K=ee(i);continue}}else if("zmin"===u){if(!j&&(e===s.enumUnknown||e===s.enumEnvelope)){j=!0,G=ee(i);continue}}else if("idmin"===u){if(!E&&(e===s.enumUnknown||e===s.enumEnvelope)){E=!0,re=te(i);continue}}else if("xmax"===u){if(!D&&(e===s.enumUnknown||e===s.enumEnvelope)){D=!0,Y=ee(i);continue}}else if("ymax"===u){if(!F&&(e===s.enumUnknown||e===s.enumEnvelope)){F=!0,L=ee(i);continue}}else if("mmax"===u){if(!I&&(e===s.enumUnknown||e===s.enumEnvelope)){I=!0,J=ee(i);continue}}else if("zmax"===u){if(!O&&(e===s.enumUnknown||e===s.enumEnvelope)){O=!0,q=ee(i);continue}}else if("idmax"===u){if(!P&&(e===s.enumUnknown||e===s.enumEnvelope)){P=!0,ie=te(i);continue}}else"materials"===u&&n(0);i.skipChildren()}if(_||h||f||p||k){let e=null,t=null;const n=ce;se&&(ce.addAttribute(1),e=oe,e||(e=v(n.getPointCount(),Number.NaN))),ae&&(ce.addAttribute(2),t=se?ue:oe),null!=me&&ce.addAttribute(3),se&&null!=e&&n.setAttributeStreamRef(1,e),ae&&null!=t&&n.setAttributeStreamRef(2,t),null!=me&&ne(n,me)}else if(b||y||T||N||g){x(B,V)||t("failed to parse point: x and y must be finite or nan"),(Number.isNaN(V)||Number.isNaN(B))&&(B=Number.NaN,V=Number.NaN);const e=new A({x:B,y:V});N&&e.setZ(R),T&&e.setM(M),g&&e.setID(U),ce=e}else if(w||C||D||F||j||O||z||I||E||P){(Number.isNaN(X)||Number.isNaN(Y)||Number.isNaN(L))&&(W=Number.NaN);const e=new S({xmin:W,ymin:X,xmax:Y,ymax:L});j&&O&&e.setInterval(1,0,G,q),z&&I&&e.setInterval(2,0,K,J),E&&P&&e.setInterval(3,0,re,ie),ce=e}return{...ce?{geom:ce}:{},...le?{sr:le}:{}}}function J(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 Q(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,g=!1,v=!1,x=!1,A=!1,S=-1,w=-1,C=-1,D=-1,F=0,j=0,O=0,z=0,I=0,E=0,P=0,B=0,V=0,R=0,M="",U="",W=null;for(;3!==e.nextToken();){const h=e.currentString();e.nextToken(),"wkid"===h?t||(t=!0,8===e.currentToken()&&(S=e.currentInt32Value())):"latestWkid"===h?n||(n=!0,8===e.currentToken()&&(w=e.currentInt32Value())):"wkt"===h?s||(s=!0,6===e.currentToken()&&(M=e.currentString())):"wkt2"===h?s||6===e.currentToken()&&(U=e.currentString()):"vcsWkid"===h?r||(r=!0,8===e.currentToken()&&(C=e.currentInt32Value())):"latestVcsWkid"===h?i||(i=!0,8===e.currentToken()&&(D=e.currentInt32Value())):"xyTolerance"===h?o||(o=!0,a=!0,F=e.currentDoubleValue()):"zTolerance"===h?u||(u=!0,a=!0,j=e.currentDoubleValue()):"mTolerance"===h?m||(m=!0,a=!0,O=e.currentDoubleValue()):"falseX"===h?l||(l=!0,a=!0,P=e.currentDoubleValue()):"falseY"===h?c||(c=!0,a=!0,B=e.currentDoubleValue()):"falseZ"===h?d||(d=!0,a=!0,V=e.currentDoubleValue()):"falseM"===h?_||(_=!0,a=!0,R=e.currentDoubleValue()):"xyUnits"===h?g||(g=!0,a=!0,z=e.currentDoubleValue()):"zUnits"===h?v||(v=!0,a=!0,I=e.currentDoubleValue()):"mUnits"===h?x||(x=!0,a=!0,E=e.currentDoubleValue()):"unit"===h?A||(A=!0,W=J(e)):e.skipChildren()}D<=0&&C>0&&(D=C),C<=0&&D>0&&(C=D);let X=null,Y=!0;if(0!==M.length&&(Y=!1,h(M)&&(X=f(M))),X||0===U.length||(Y=!1,h(U)&&(X=f(U))),!X&&w>0&&(Y=!1,p(w)&&(D<=0||k())&&(X=b(w,D))),!X&&S>0&&(Y=!1,p(S)&&(C<=0||k())&&(X=b(S,C))),Y&&(X=y(W)),a&&X){const e=new N;X.queryPrecisionDescriptorWithoutFalseXY(e),o&&e.setTolerance(0,F),u&&e.setTolerance(1,j),m&&e.setTolerance(2,O),g&&l&&c&&e.setGridParams(P,B,z),v&&d&&e.setZParams(V,I),x&&_&&e.setMParams(R,E),X=T(X,e)}return X}function Z(e,n,r,i){2!==i.currentToken()&&t("failed to parse multipath: array of array of vertices is expected");const s=e?new O:new z,a=s,o=w(0),u=v(2,0),_=C(0);let h=null,f=null,p=null,k=null,b=null,y=0,N=0,T=0;const g=new I,x=l.getNAN();let A=0,S=0;const F=e?1:0;for(;4!==i.nextToken();){2!==i.currentToken()&&t("failed to parse multipath: ring/path array is expected");let r=2,s=0,j=!0;const O=4;let z=0,I=0;const E=l.getNAN(),P=m(O,Number.NaN),B=m(O,Number.NaN);let V=!1;for(i.nextToken();4!==i.currentToken();){if(n&&1===i.currentToken())j&&t("failed to parse multipath: starting vertex array is expected"),p||(p=C(A-1,1),k=w(A-1,-1),b=v(0)),V=!0,r=1,({segFlag:T,toPointSz:z}=me(g,P,x,i));else{for(V=!1,2!==i.currentToken()&&t("failed to parse multipath: array is expected, rings/paths vertices consist of arrays of coordinates"),z=0;4!==i.nextToken();)z===O&&t("failed to parse multipath: each vertex array has to have at most 4 elements"),P[z++]=ee(i);z<2&&t("failed to parse multipath: each vertex array has to have at least 2 elements"),D(P[0],P[1])||t("failed to parse multipath: x and y must be finite")}i.nextToken();do{if(u.size()===2*A&&u.resize(re(A)),u.writePoint2D(2*A,E.setCoords(P[0],P[1])),h&&h.size()===A&&h.resize(ie(A)),z>2?(h||(h=v(A+1,Number.NaN)),h.write(A,P[2])):h&&h.write(A,Number.NaN),f&&f.size()===A&&f.resize(ie(A)),z>3?(f||(f=v(A+1,Number.NaN)),f.write(A,P[3])):f&&f.write(A,Number.NaN),j)S++,o.add(A),_.add(F),j=!1,I=z,c(B,P,0,0,I);else if(null!==p)if(V){const e=U(T),t=b.size();b.resize(t+e),p.add(T),k.add(y),g.get().writeInBufferStream(b,y),y+=e,a.incCurveType(T,1),N++}else p.add(1),k.add(-1);A++,s++,x.setCoords(P[0],P[1])}while(s<r&&4===i.currentToken())}0!==s&&(e&&s>r&&z===I&&0===d(P,B,z)?(A--,s--):null!==p&&(p.add(1),k.add(-1)))}return A&&(o.resize(S),_.resize(S),A>0&&(o.add(A),_.add(0)),a.setAttributeStreamRef(0,u),a.setPathFlagsStreamRef(_),a.setPathStreamRef(o),null!==p&&(a.updateCurveCounter(N),a.setSegmentData(k,b,p,y)),a.notifyModifiedFlags(65535)),{geometry:s,as:h,bs:f}}function H(e,n){2!==n.currentToken()&&t("failed to parse multipoint: array of vertices is expected");let r=0;const i=new E,s=v(2,0);let a=0;const o=4,u=m(o,Number.NaN),c=new l;let d=null,_=null;for(;4!==n.nextToken();){for(2!==n.currentToken()&&t("failed to parse multipoint: array is expected, multipoint vertices consist of arrays of cooridinates"),a=0;4!==n.nextToken();)a===o&&t("failed to parse multipoint: each vertex array has to have at most 4 elements"),u[a++]=ee(n);a<2&&t("failed to parse multipoint: each vertex array has to have at least 2 elements"),D(u[0],u[1])||t("failed to parse multipoint: x and y must be finite"),s.size()===2*r&&s.resize(re(r)),s.writePoint2D(2*r,c.setCoords(u[0],u[1])),d&&d.size()===r&&d.resize(ie(r)),a>2?(d||(d=v(r+1,Number.NaN)),d.write(r,u[2])):d&&d.write(r,Number.NaN),_&&_.size()===r&&_.resize(ie(r)),a>3?(_||(_=v(r+1,Number.NaN)),_.write(r,u[3])):_&&_.write(r,Number.NaN),r++}if(r){const e=i.getImpl();e.setAttributeStreamRef(0,s),e.resizeNoInit(r),e.notifyModifiedFlags(65535)}return{geometry:i,as:d,bs:_}}function $(e,n){2!==n.currentToken()&&t("failed to parse array of IDs: array of array of integers is expected");const r=F(2,0);let i=0,s=-1;for(;4!==n.nextToken();){const e=i;r.size()===i&&r.resize(ie(i)),i++;let a=0;for(-1===s?s=2===n.currentToken()?1:0:1===s&&2!==n.currentToken()&&t("failed to parse array of IDs: array of array of integers is expected"),0===s&&(r.size()===i&&r.resize(ie(i)),r.write(i,te(n)),a++,i++);4!==n.nextToken();)r.size()===i&&r.resize(ie(i)),r.write(i,te(n)),a++,i++;if(r.write(e,a),0===s)break}return r.resize(i),r}function ee(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 te(e){return e.currentInt32Value()}function ne(t,n){if(t.isEmpty())return;const r=F(2,0),i=t.getGeometryType();let s=0;i===E.type?s=1:i===z.type||i===O.type?s=t.getPathCount():e("not implemented"),r.resize(t.getPointCount(),0);let a=0;for(let o=0;o<s;++o){const s=n.read(a);a++;const u=a+s;let m=0,l=0;i===E.type?m=t.getPointCount():i===z.type||i===O.type?(m=t.getPathSize(o),l=t.getPathStart(o)):e("not implemented");for(let e=0,t=Math.min(s,m);e<t;++e)r.write(l,n.read(a)),a++,l++;a=u}t.getImpl().setAttributeStreamRef(3,r)}function re(e){let t=2*Math.trunc(3*(e+1)/2);return t<8?t=8:t<32&&(t=32),t}function ie(e){let t=Math.trunc(3*(e+1)/2);return t<4?t=4:t<16&&(t=16),t}function se(e,t,n,i,s){s>=i.size()&&r("Byte_buffer out of range access"),e.m_bits=0,e.m_rotation=0,e.m_cosr=1,e.m_sinr=0,e.setStartXY(t),e.setEndXY(n);const a=l.getNAN();a.x=i.readDouble(s),a.y=i.readDouble(s+8);const o=i.readInt32(s+16);if(!!(1&o))return e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.assign(a),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,V(e),!1;let u=!!(64&o);const m=!!(128&o);let c=!!(32&o);const d=!!(8&o),_=!!(16&o),h=t.equals(n);return u&&!h&&(u=!1,c=!0),c&&h&&(u=!0,c=!1,a.setCoords(0,0)),u||(m?c?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_interior.assign(a),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0):(e.constructCircularArcThreePoint(t,n,a),h&&d===e.isClockwise()&&e.reverse()):c?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,V(e),e.queryCoord2D(.5,e.m_interior)):R(e,t,n,a,d,_)),u&&(e.m_center.assign(t),e.m_startAngle=a.x,e.m_sweepAngle=a.y,M(e,Number.NaN,d,_),e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.setCoordsPoint2D(t)),e.setProjectionBehavior(0),V(e),!0}function ae(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,M(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,V(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),V(e),!0}function oe(e,t,r,i,s){return n(s+32<=i.size()),e.m_cp=_(l,2),e.m_cp[0].x=i.readDouble(s),e.m_cp[0].y=i.readDouble(s+8),e.m_cp[1].x=i.readDouble(s+16),e.m_cp[1].y=i.readDouble(s+24),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=r.x,e.m_YEnd=r.y,!0}function ue(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 me(e,n,r,i,s){const a={segFlag:0,toPointSz:0};let o=i.currentToken();o=i.nextToken();const u=i.currentString(),m=u[0];for((1!==u.length||"a"!==m&&"b"!==m&&"c"!==m&&"n"!==m&&"q"!==m)&&t('failed to parse curve: expecting "a", "b", "n", "q", or "c"'),o=i.nextToken(),2!==o&&t("failed to parse curve: start array is expected for curve parameters"),o=i.nextToken(),2!==o&&t("failed to parse curve: start array is expected for to point"),a.toPointSz=0;4!==i.nextToken();)4===a.toPointSz&&t("failed to parse curve: vertex array cannot have more than 4 elements"),n[a.toPointSz++]=ee(i);a.toPointSz<2&&t("failed to parse curve: vertex array must have at least 2 elements");const c=l.construct(n[0],n[1]),d=l.getNAN();let _=-1,h=-1,f=!1,p=Number.NaN,k=Number.NaN,b=Number.NaN;const y=[l.getNAN(),l.getNAN(),l.getNAN()],N=l.getNAN();if("a"===m){o=i.nextToken(),2!==o&&t("failed to parse curve: start array is expected for center point"),o=i.nextToken();const e=ee(i);o=i.nextToken();const n=ee(i);o=i.nextToken(),4!==o&&t("failed to parse curve: end array is expected for center point"),d.setCoords(e,n),o=i.nextToken(),_=i.currentInt32Value(),o=i.nextToken(),h=i.currentInt32Value(),o=i.nextToken(),4!==o?(f=!1,p=ee(i),o=i.nextToken(),k=ee(i),o=i.nextToken(),b=ee(i),o=i.nextToken(),4!==o&&t("failed to parse curve: end array is expected for curve parameters")):f=!0,a.segFlag=4}else if("b"===m){for(let e=0;e<2;e++){o=i.nextToken(),2!==o&&t("failed to parse curve: start array is expected for control point"),o=i.nextToken();const n=ee(i);o=i.nextToken();const r=ee(i);o=i.nextToken(),4!==o&&t("failed to parse curve: end array is expected for control point"),y[e].setCoords(n,r)}o=i.nextToken(),4!==o&&t("failed to parse curve: end array is expected for curve parameters"),a.segFlag=2}else if("n"===m){{o=i.nextToken(),2!==o&&t("failed to parse curve: start array is expected for control point"),o=i.nextToken();const e=ee(i);o=i.nextToken();const n=ee(i);o=i.nextToken(),4!==o&&t("failed to parse curve: end array is expected for control point"),y[0].setCoords(e,n)}o=i.nextToken();const e=ee(i);o=i.nextToken();const n=ee(i);o=i.nextToken();const r=ee(i);y[1].setCoords(e,n),y[2].setCoords(r,r),o=i.nextToken(),4!==o&&t("failed to parse curve: end array is expected for curve parameters"),a.segFlag=8}else if("q"===m){for(let e=0;e<1;e++){o=i.nextToken(),2!==o&&t("failed to parse curve: start array is expected for control point"),o=i.nextToken();const n=ee(i);o=i.nextToken();const r=ee(i);o=i.nextToken(),4!==o&&t("failed to parse curve: end array is expected for control point"),y[e].setCoords(n,r)}o=i.nextToken(),4!==o&&t("failed to parse curve: end array is expected for curve parameters"),a.segFlag=16}else{o=i.nextToken(),2!==o&&t("failed to parse curve: start array is expected for interior point"),o=i.nextToken();const e=ee(i);o=i.nextToken();const n=ee(i);o=i.nextToken(),4!==o&&t("failed to parse curve: end array is expected for interior point"),N.setCoords(e,n),o=i.nextToken(),4!==o&&t("failed to parse curve: end array is expected for curve parameters"),a.segFlag=4}if(o=i.nextToken(),3!==o&&t("failed to parse curve: end object is expected for curve"),"a"===m)if(e.createEllipticArc(),f){const t=!0;le(e.get(),r,c,d,t,_,h)}else ce(e.get(),r,c,d,_,h,p,k,b);else if("b"===m)e.createCubicBezier(),de(e.get(),r,c,y);else if("n"===m)e.createQuadraticRationalBezier(),_e(e.get(),r,c,y[0],y[1].x,y[1].y,y[2].x);else if("q"===m)e.createQuadraticBezier(),e.get().construct(r,y[0],c);else{e.createEllipticArc();const t=!1;le(e.get(),r,c,N,t,-1,-1)}return a}function le(e,t,n,r,i,s,a){e.dropAllAttributes();const o=20,u=new ArrayBuffer(o),m=new q({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,se(e,t,n,m,0)}function ce(e,t,n,r,i,s,a,o,u){e.dropAllAttributes();const m=44,l=new ArrayBuffer(m),c=new q({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,ae(e,t,n,c,0)}function de(e,t,n,r){e.dropAllAttributes();const i=32,s=new ArrayBuffer(i),a=new q({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,oe(e,t,n,a,0)}function _e(e,t,n,r,i,s,a){e.dropAllAttributes();const o=40,u=new ArrayBuffer(o),m=new q({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,ue(e,t,n,m,0)}function he(e,t,n,r,i){const o=e.getGeometryType();if(o===s.enumEllipticArc)return fe(e,t,n,r,i);if(o===s.enumBezier)return pe(e,t,n,r,i);if(o===s.enumRationalBezier2)return ke(e,t,n,r,i);if(o===s.enumBezier2){const s=new P;return s.constructFromQuadraticSegment(e),pe(s,t,n,r,i)}a("")}function fe(e,t,r,i,s){n(!B(e));const a=e.getEndXY(),o=e.hasAttribute(1)&&!t,u=e.hasAttribute(2)&&!r;let m=Number.NaN,l=Number.NaN;if(o&&(m=e.getEndAttributeAsDbl(1,0)),u&&(l=e.getEndAttributeAsDbl(2,0)),e.isDegenerateToLine()||e.isDegenerate(0))return be(o,u,a.x,a.y,m,l,i,s),!0;const c=0===e.projectionBehavior(),d=!!c&&e.isClosed();if(c&&!d)s.startObject(),s.addFieldName("c"),s.startArray(),be(o,u,a.x,a.y,m,l,i,s),ye(e.m_interior.x,e.m_interior.y,17,s),s.endArray(),s.endObject();else if(c){s.startObject(),s.addFieldName("a"),s.startArray(),be(o,u,a.x,a.y,m,l,i,s);const t=0,n=0;ye(e.m_center.x+t,e.m_center.y+n,17,s);const r=!e.isMajor();s.addInt32(r?1:0);const c=e.isClockwise();s.addInt32(c?1:0),s.endArray(),s.endObject()}else{s.startObject(),s.addFieldName("a"),s.startArray(),be(o,u,a.x,a.y,m,l,i,s);const t=e;ye(t.m_center.x,t.m_center.y,17,s);const n=!t.isMajor();s.addInt32(n?1:0);const r=t.isClockwise();s.addInt32(r?1:0),s.addDouble(t.m_rotation,17),s.addDouble(t.m_semiMajorAxis,17),s.addDouble(t.m_minorMajorRatio,17),s.endArray(),s.endObject()}return!1}function pe(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(),be(a,o,s.x,s.y,u,m,r,i),ye(e.m_cp[0].x,e.m_cp[0].y,r,i),ye(e.m_cp[1].x,e.m_cp[1].y,r,i),i.endArray(),i.endObject(),!1}function ke(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(),be(a,o,s.x,s.y,u,m,r,i),ye(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 be(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 ye(e,t,n,r){r.startArray(),r.addDouble(e,n),r.addDouble(t,n),r.endArray()}class Ne{getOperatorType(){return 10405}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,r,i,s){Te(e,t,n,r)}exportSpatialReference(e,t,r,i){n(0)}exportProjectionTransformation(e,t,r,i){n(0)}exportDatumTransformation(e,t,r,i){n(0)}static geometryTypeToString(e){return n(0),""}}function Te(t,r,i,a,o){if(r||i){if(a.startObject(),null!==r){switch(r.getGeometryType()){case s.enumPolygon:ge(!0,t,r,a);break;case s.enumPolyline:ge(!1,t,r,a);break;case s.enumMultiPoint:ve(t,r,a);break;case s.enumPoint:xe(t,r,a);break;case s.enumEnvelope:Ae(t,r,a);break;case s.enumMultipatch:n(0);break;default:e("exportToJSON")}}null!==i&&(a.addFieldName("spatialReference"),we(t,i,a)),a.endObject()}}function ge(e,t,r,i){const s=r.getImpl(),o=!!(2&t),u=!!(4&t),m=!!(8&t),l=s.hasAttribute(1)&&!o,c=s.hasAttribute(2)&&!u,d=s.hasAttribute(3)&&!m,_=s.hasNonLinearSegments();l&&(i.addFieldName("hasZ"),i.addBool(!0)),c&&(i.addFieldName("hasM"),i.addBool(!0)),e?_?i.addFieldName("curveRings"):i.addFieldName("rings"):_?i.addFieldName("curvePaths"):i.addFieldName("paths");let h=null;const f=[];if(r.isEmpty())i.startArray(),i.endArray();else{const e=17-(31&t>>13);i.startArray();const n=r.getPathCount();let m=0;const p=s.getAttributeStreamRef(0);let k=null,b=null,y=null;const N=new I;let T=null,g=null,v=null;_&&(T=s.getSegmentFlagsStreamRef(),g=s.getSegmentIndexStreamRef(),v=s.getSegmentDataStreamRef()),l&&(k=s.getAttributeStreamRef(1)),c&&(b=s.getAttributeStreamRef(2)),d&&(y=s.getAttributeStreamRef(3),h=j(3,0));for(let t=0;t<n;t++){i.startArray(),d&&f.push(0);const n=r.getPathEnd(t);if(m===n){i.endArray();continue}const s=r.isClosedPath(t);let _=p.read(2*m),x=p.read(2*m+1),A=l?k.read(m):Number.NaN,S=c?b.read(m):Number.NaN,w=d?y.read(m):0;Ce(l,c,_,x,A,S,e,i);let C=1;d&&(h.add(w),f[f.length-1]++);const D=_,F=x,j=A,O=S,z=w;let I=!1,E=0,P=Number.NaN,B=Number.NaN,V=0;for(let t=m+1,r=m,R=s?n+1:n;t<R;t++,r++){const s=null!==T?31&T.read(r):1;let m,R;if(t<n?(m=p.read(2*t),R=p.read(2*t+1),l&&(P=k.read(t)),c&&(B=b.read(t)),d&&(V=y.read(t))):(m=D,R=F,P=j,B=O,V=z),1!==s){I=!0,4===s?N.createEllipticArc():2===s?N.createCubicBezier():16===s?N.createQuadraticBezier():8===s?N.createQuadraticRationalBezier():a("JSON export.unsupported curve");const t=N.get(),n=g.read(r);t.setStartXYCoords(_,x),t.setEndXYCoords(m,R),l&&(t.setStartAttribute(1,0,A),t.setEndAttribute(1,0,P)),c&&(t.setStartAttribute(2,0,S),t.setEndAttribute(2,0,B)),t.readFromBufferStream(v,n);he(N.get(),o,u,e,i)&&E++}else Ce(l,c,m,R,P,B,e,i);d&&(h.add(V),f[f.length-1]++),C++,_=m,x=R,A=P,S=B,w=V}I&&0===E||(C<2&&E<1&&(Ce(l,c,_,x,A,S,e,i),C++,d&&(h.add(w),f[f.length-1]++)),s&&C<3&&E<2&&(Ce(l,c,D,F,j,O,e,i),C++,_=D,x=F,A=j,S=O,w=z,d&&(h.add(z),f[f.length-1]++))),i.endArray(),m=n}i.endArray()}if(d){i.addFieldName("ids"),i.startArray();let e=0;for(let t=0,r=f.length;t<r;++t){const r=f[t];n(0===r||null!==h&&e+r<=h.size()),i.startArray();for(let t=0;t<r;++t)i.addInt32(h.read(e)),e++;i.endArray()}i.endArray()}}function ve(e,t,r){const i=t.getImpl(),s=i.hasAttribute(1)&&!(2&e),a=i.hasAttribute(2)&&!(4&e),o=i.hasAttribute(3)&&!(8&e);s&&(r.addFieldName("hasZ"),r.addBool(!0)),a&&(r.addFieldName("hasM"),r.addBool(!0)),r.addFieldName("points");const u=t.getPointCount();if(t.isEmpty())r.startArray(),r.endArray();else{const t=17-(31&e>>13);r.startArray();const n=i.getAttributeStreamRef(0);let o=null,m=null;s&&(o=i.getAttributeStreamRef(1)),a&&(m=i.getAttributeStreamRef(2));for(let e=0;e<u;e++){const i=n.read(2*e),u=n.read(2*e+1);let l=Number.NaN,c=Number.NaN;s&&(l=o.read(e)),a&&(c=m.read(e)),Ce(s,a,i,u,l,c,t,r)}r.endArray()}if(o){let e=null;i.isEmpty()||(e=i.getAttributeStreamRef(3)),n(0===u||null!==e&&e.size()>=u),r.addFieldName("ids"),r.startArray();for(let t=0;t<u;t++)r.addInt32(e.read(t));r.endArray()}}function xe(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 Ae(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 Se(e,n,r){r.startObject();const i=n.getID();i<=0&&t("cannot export unit that has no valid WKID"),r.addFieldName("uwkid"),r.addInt32(i),r.endObject()}function we(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"),Se(e,t.getUnit(),n));else if(r<=0||1&e){let r="";64&e&&(r=t.getText2(),n.addFieldName("wkt2"),n.addString(r));const i=t.getText();i!==r&&(n.addFieldName("wkt"),n.addString(i))}if(16&e){const e=new N;t.queryPrecisionDescriptor(e),n.addFieldName("xyTolerance"),n.addDouble(e.getTolerance(0)),n.addFieldName("zTolerance"),n.addDouble(e.getTolerance(1)),n.addFieldName("mTolerance"),n.addDouble(e.getTolerance(2)),n.addFieldName("falseX"),n.addDouble(e.getFalseX()),n.addFieldName("falseY"),n.addDouble(e.getFalseY()),n.addFieldName("xyUnits"),n.addDouble(e.getGridUnitsXY()),n.addFieldName("falseZ"),n.addDouble(e.getFalseZ()),n.addFieldName("zUnits"),n.addDouble(e.getGridUnitsZ()),n.addFieldName("falseM"),n.addDouble(e.getFalseM()),n.addFieldName("mUnits"),n.addDouble(e.getGridUnitsM())}n.endObject()}function Ce(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 De={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 Fe{constructor(t){this.m_functionStack=[],this.m_pushPositions=[],this.m_utf8Decoder=new TextDecoder("utf-8",{fatal:!0}),void 0===t?(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):t.jsonString?this.resetParserFromString(t.jsonString):t.jsonStream?a("streaming json parsing not yet impl"):e("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_(){a("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){a("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 n(0),""}childrenAsString(){return n(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"}t("invalid token")}toUTF8_(e,t){let n=0,r=e;for(;t.charCodeAt(r)===De.s_backslash&&t.charCodeAt(r+1)===De.s_u;)n++,r+=6;r=e;const i=new Uint8Array(n);let s=0;for(;t.charCodeAt(r)===De.s_backslash&&t.charCodeAt(r+1)===De.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)!==De.s_backslash)r++;else{switch(r>0&&(e+=i.slice(t,t+r)),i.charCodeAt(++s)){case De.s_doubleQuote:e+='"';break;case De.s_u:{const{u8s:t,end:n}=this.toUTF8_(s-1,i);s=n-1,e+=t;break}case De.s_backslash:e+="\\";break;case De.s_forwardslash:e+="/";break;case De.s_b:e+="\b";break;case De.s_f:e+="\f";break;case De.s_n:e+="\n";break;case De.s_r:e+="\r";break;case De.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&&t("invalid token"),10===this.m_currentTokenType)return Number.NaN;let e=this.m_getCurrentSubstr(),n=this.m_endToken-this.m_startToken;if(6===this.m_currentTokenType){if("NaN"===this.currentString())return Number.NaN;e=e.slice(1),n-=2,0===n&&t("invalid token")}const r=Number.parseFloat(e);if(6===this.m_currentTokenType)Number.isNaN(r)&&t("invalid token");else if(Number.isNaN(r))return Number.NaN;return r}currentInt32Value(){8!==this.m_currentTokenType&&6!==this.m_currentTokenType&&t("invalid token");let e=this.m_getCurrentSubstr(),n=this.m_endToken-this.m_startToken;6===this.m_currentTokenType&&(e=e.slice(1),n-=2,0===n&&t("invalid token"));const r=parseInt(e);return Number.isNaN(r)&&t("invalid token"),r}currentInt64Value(){return n(0),0n}currentBoolValue(){return n(0),!1}isError(){return 0}JSONString(){return n(0),""}pushPosition(){return n(0),!1}popPosition(){return n(0),!1}skipCStyleComments_(){n(0)}skipCppStyleComments_(){n(0)}skipComments_(){this.m_prepSubstr();let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&t("invalid token"),e=this.m_peekChar(),e===De.s_asterisk?this.skipCStyleComments_():e===De.s_forwardslash?this.skipCppStyleComments_():t("invalid token")}skipWhiteSpace_(){let e;do{this.m_eof()&&t("invalid token");let n=this.m_peekChar();for(;n>=9&&n<=13||32===n;)this.m_increment(),this.m_eof()&&t("invalid token"),n=this.m_peekChar();n===De.s_forwardslash?(this.m_startToken=this.m_endToken,e=!0,this.skipComments_()):e=!1}while(e)}rightBracket_(){return this.m_peekChar()===De.s_endArray&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=4,!0)}rightBrace_(){return this.m_peekChar()===De.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()&&t("invalid token");let e=this.m_peekChar();for(;e!==De.s_doubleQuote;){const n=e===De.s_backslash;if(this.m_stepOverChar(),this.m_eof()&&t("invalid token"),e=this.m_peekChar(),n)if(this.m_bHasEscapes=!0,e===De.s_doubleQuote||e===De.s_backslash||e===De.s_forwardslash||e===De.s_b||e===De.s_f||e===De.s_n||e===De.s_r||e===De.s_t)this.m_stepOverChar(),this.m_eof()&&t("invalid token"),e=this.m_peekChar();else if(e===De.s_u)for(let r=0;r<4;r++)this.m_stepOverChar(),this.m_eof()&&t("invalid token"),e=this.m_peekChar(),e>=De.s_zero&&e<=De.s_nine||e>=De.s_a&&e<=De.s_f||e>=De.s_A&&e<=De.s_F||t("invalid token");else t("invalid token")}this.m_stepOverChar()}comma_(){return this.m_peekChar()===De.s_comma&&(this.m_increment(),!0)}colon_(){return this.m_peekChar()===De.s_colon&&(this.m_increment(),!0)}fieldNameEnd_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.colon_()?(this.skipWhiteSpace_(),this.value_()):t("invalid token")}fieldNameStart_(){this.m_startToken=this.m_endToken;this.m_peekChar()!==De.s_doubleQuote&&t("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():t("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():t("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()!==De.s_zero?this.digits_():this.m_stepOverChar()}digits_(){let e=this.m_peekChar();do{this.m_stepOverChar(),this.m_eof()&&t("invalid token"),e=this.m_peekChar()}while(e>=De.s_zero&&e<=De.s_nine)}frac_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&t("invalid token"),e=this.m_peekChar(),e>=De.s_zero&&e<=De.s_nine||t("invalid token"),this.digits_()}exp_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&t("invalid token"),e=this.m_peekChar(),e!==De.s_plus&&e!==De.s_minus||(this.m_stepOverChar(),this.m_eof()&&t("invalid token"),e=this.m_peekChar()),e>=De.s_zero&&e<=De.s_nine||t("invalid token"),this.digits_()}valueNumber_(){this.m_prepSubstr();let e=!1,n=this.m_peekChar();if(n===De.s_minus?(this.m_stepOverChar(),this.m_eof()&&t("invalid token"),n=this.m_peekChar(),e=!0,n>=De.s_zero&&n<=De.s_nine||t("invalid token"),this.int_()):this.int_(),n=this.m_peekChar(),n===De.s_period)this.m_currentTokenType=7,this.frac_(),n=this.m_peekChar(),n!==De.s_e&&n!==De.s_E||this.exp_();else if(n===De.s_e||n===De.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:n}=this.m_get(5);n&&t("invalid token"),"null"!==e&&t("invalid token"),this.m_currentTokenType=10}valueTrue_(){const{s:e,bDone:n}=this.m_get(5);n&&t("invalid token"),"true"!==e&&t("invalid token"),this.m_currentTokenType=11}valueFalse_(){const{s:e,bDone:n}=this.m_get(6);n&&t("invalid token"),"false"!==e&&t("invalid token"),this.m_currentTokenType=12}valueNan_(){const{s:e,bDone:n}=this.m_get(4);n&&t("invalid token"),"NaN"!==e&&t("invalid token"),this.m_currentTokenType=7}value_(){this.m_startToken=this.m_endToken;const e=this.m_peekChar();e===De.s_beginObject?this.valueStartObject_():e===De.s_beginArray?this.valueStartArray_():e===De.s_doubleQuote?this.valueString_():e===De.s_minus||e>=De.s_zero&&e<=De.s_zero+9?this.valueNumber_():e===De.s_n?this.valueNull_():e===De.s_t?this.valueTrue_():e===De.s_f?this.valueFalse_():e===De.s_N?this.valueNan_():t("invalid token")}start_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.m_functionStack.push(()=>this.accept_());const e=this.m_peekChar();e!==De.s_beginObject&&e!==De.s_beginArray&&t("invalid token"),this.value_()}accept_(){this.m_startToken=this.m_endToken,this.m_currentTokenType=0}}class je{getOperatorType(){return 10404}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,n,r,i,s,a,o){let u;"string"==typeof r?(u=new Fe({jsonString:r}),u.nextToken()):u=r,1!==u.currentToken()&&t("failed to import map geometry: start of object is expected");const m=K(n,e,u,i,s);return new g(m)}importSpatialReference(t){const n=Q(t);return null===n&&e("failed to import spatial reference"),n}importProjectionTransformation(e,t){return n(0),{}}importDatumTransformation(e,t){return n(0),{}}static stringToGeometryType(e){return(e=e.toLowerCase()).startsWith("esrigeometry")||t("string_to_geometry_type"),e.endsWith("point")?s.enumPoint:e.endsWith("envelope")?s.enumEnvelope:e.endsWith("multipoint")?s.enumMultiPoint:e.endsWith("polyline")?s.enumPolyline:e.endsWith("polygon")?s.enumPolygon:void t("string_to_geometry_type")}}const Oe=new G,ze=new Ne,Ie=new je;function Ee(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function Pe(e,t){const{includeGeometry:n=!0,includeSpatialReference:r=!0}=t??{},i=new L(e,{strict:!1});return i.nextToken(),Ie.execute(0,s.enumUnknown,i,n,r)}function Be(e){let t=null;return[e.map(e=>{if(null==t){const n=Ve(e);return t=n.getSpatialReference(),n.getGeometry()}return Re(e)}),t]}function Ve(e){return e.spatialReference instanceof W&&(e={...e,spatialReference:e.spatialReference.toJSON()}),Pe(e)}function Re(e){return Pe(e,{includeSpatialReference:!1}).getGeometry()}function Me(e){return e instanceof W&&(e=e.toJSON()),Pe({spatialReference:e},{includeGeometry:!1}).getSpatialReference()}function Ue(e,t){return e instanceof g&&(t=e.getSpatialReference(),e=e.getGeometry()),e?.isEmpty()?null:(Oe.reset(),ze.execute(0,e,t,Oe),Oe.getObject())}export{Be as fromGeometries,Ve as fromGeometry,Re as fromGeometryToGXGeometry,Me as fromSpatialReference,Ee as getSpatialReference,Ue as toGeometry};
5
+ import{d as e,a as t,g as n,q as r,p as i,G as s,t as a}from"../../../chunks/Geometry.js";import{aJ as o,i as u,d as m,P as l,b as c,aK as d,m as _}from"../../../chunks/Point2D.js";import{q as h,b as f,p,aX as k,c as b,e as y,a as N,f as T,aY as g}from"../../../chunks/UnitFactory.js";import{a1 as v,a4 as x,P as A,E as S,$ as w,a0 as C,a5 as D,a6 as F,Y as j}from"../../../chunks/Envelope.js";import{a as O,P as z,S as I,M as E,N as P,a5 as B,a6 as R,a7 as V,a8 as M,a9 as U}from"../../../chunks/MultiPathImpl.js";import W from"../../SpatialReference.js";import"./initNoPeFactory.js";function X(){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 Y(){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 L{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:X}}createJSONArrayIterator(e){return{m_iteratorType:"array",m_strict:this.m_options.strict,m_i:-1,m_a:e,next:Y}}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>=o()&&this.m_currentValue<=u()?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;e("unrecognized json element type")}return e("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&&t("invalid token"),this.m_currentValue}currentDoubleValue(){return 7!==this.m_currentToken&&8!==this.m_currentToken&&t("invalid token"),this.m_currentValue}currentInt32Value(){return 8!==this.m_currentToken&&t("invalid token"),this.m_currentValue}currentInt64Value(){return n(0),0n}currentBoolValue(){return 12!==this.m_currentToken&&11!==this.m_currentToken&&t("invalid token"),this.m_currentValue}isError(){return 0}}class G{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){n(0)}addInt32(e){this.addValue_(e)}addBool(e){this.addValue_(e)}addNull(){this.addValue_(null)}getObject(){return this.m_acceptedObject}}class q{constructor(t){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!==t.sz?(this.m_sz=t.sz,t.buffer?(this.m_sz<0&&r("size out of range"),this.m_buffer=t.buffer,this.m_offset=void 0!==t.offset?t.offset:0,this.m_view=void 0!==t.offset?new DataView(t.buffer,t.offset,t.sz):new DataView(this.m_buffer),this.m_bOwnsBuffer=!1,void(this.m_bLittleEndian=!0)):(this.m_sz<0&&r("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))))):t.move?(this.m_sz=t.move.m_sz,this.m_buffer=t.move.m_buffer,this.m_view=t.move.m_view,this.m_bOwnsBuffer=t.move.m_bOwnsBuffer,this.m_bLittleEndian=t.move.m_bLittleEndian,t.move.m_buffer=null,t.move.m_view=null,t.move.m_sz=0,void(t.move.m_bOwnsBuffer=!0)):void e("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===q.getNativeByteOrder())}setNativeByteOrder(){this.m_bLittleEndian=1===q.getNativeByteOrder()}setOrder(e){this.m_bLittleEndian=1===e}getOrder(){return this.m_bLittleEndian?1:0}getView(){return this.m_view||i("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){n(e>=0&&e<=this.m_sz),this.m_sz=e}}function K(e,r,i,a,o,u){let m=!1,l=!1,c=!1,d=!1,_=!1,h=!1,f=!1,p=!1,k=!1,b=!1,y=!1,N=!1,T=!1,g=!1,w=!1,C=!1,D=!1,F=!1,j=!1,O=!1,z=!1,I=!1,E=!1,P=!1,B=Number.NaN,R=Number.NaN,V=Number.NaN,M=Number.NaN,U=0,W=Number.NaN,X=Number.NaN,Y=Number.NaN,L=Number.NaN,G=Number.NaN,q=Number.NaN,K=Number.NaN,J=Number.NaN,re=0,ie=0,se=!1,ae=!1,oe=null,ue=null,me=null,le=null,ce=null;for(;3!==i.nextToken();){const u=i.currentString();if(i.nextToken(),"spatialReference"===u){if(o&&!m){m=!0,1===i.currentToken()?le=Q(i):10!==i.currentToken()&&t("failed to parse spatial reference: object or null is expected");continue}}else if(a)if("hasZ"===u){if(!l){l=!0,se=11===i.currentToken();continue}}else if("hasM"===u){if(!c){c=!0,ae=11===i.currentToken();continue}}else if("rings"===u){if(!(_||h||e!==s.enumUnknown&&e!==s.enumPolygon)){_=!0,({geometry:ce,as:oe,bs:ue}=Z(!0,!1,r,i));continue}}else if("curveRings"===u){if(!h&&(e===s.enumUnknown||e===s.enumPolygon)){h=!0,({geometry:ce,as:oe,bs:ue}=Z(!0,!0,r,i));continue}}else if("paths"===u){if(!(f||p||e!==s.enumUnknown&&e!==s.enumPolyline)){f=!0,({geometry:ce,as:oe,bs:ue}=Z(!1,!1,r,i));continue}}else if("curvePaths"===u){if(!p&&(e===s.enumUnknown||e===s.enumPolyline)){p=!0,({geometry:ce,as:oe,bs:ue}=Z(!1,!0,r,i));continue}}else if("points"===u){if(!k&&(e===s.enumUnknown||e===s.enumMultiPoint)){k=!0,({geometry:ce,as:oe,bs:ue}=H(r,i));continue}}else if("ids"===u){if(!d){d=!0,me=$(r,i);continue}}else if("x"===u){if(!b&&(e===s.enumUnknown||e===s.enumPoint)){b=!0,B=ee(i);continue}}else if("y"===u){if(!y&&(e===s.enumUnknown||e===s.enumPoint)){y=!0,R=ee(i);continue}}else if("z"===u){if(!N&&(e===s.enumUnknown||e===s.enumPoint)){N=!0,V=ee(i);continue}}else if("m"===u){if(!T&&(e===s.enumUnknown||e===s.enumPoint)){T=!0,M=ee(i);continue}}else if("id"===u){if(!g&&(e===s.enumUnknown||e===s.enumPoint)){g=!0,U=te(i);continue}}else if("xmin"===u){if(!w&&(e===s.enumUnknown||e===s.enumEnvelope)){w=!0,W=ee(i);continue}}else if("ymin"===u){if(!C&&(e===s.enumUnknown||e===s.enumEnvelope)){C=!0,X=ee(i);continue}}else if("mmin"===u){if(!z&&(e===s.enumUnknown||e===s.enumEnvelope)){z=!0,K=ee(i);continue}}else if("zmin"===u){if(!j&&(e===s.enumUnknown||e===s.enumEnvelope)){j=!0,G=ee(i);continue}}else if("idmin"===u){if(!E&&(e===s.enumUnknown||e===s.enumEnvelope)){E=!0,re=te(i);continue}}else if("xmax"===u){if(!D&&(e===s.enumUnknown||e===s.enumEnvelope)){D=!0,Y=ee(i);continue}}else if("ymax"===u){if(!F&&(e===s.enumUnknown||e===s.enumEnvelope)){F=!0,L=ee(i);continue}}else if("mmax"===u){if(!I&&(e===s.enumUnknown||e===s.enumEnvelope)){I=!0,J=ee(i);continue}}else if("zmax"===u){if(!O&&(e===s.enumUnknown||e===s.enumEnvelope)){O=!0,q=ee(i);continue}}else if("idmax"===u){if(!P&&(e===s.enumUnknown||e===s.enumEnvelope)){P=!0,ie=te(i);continue}}else"materials"===u&&n(0);i.skipChildren()}if(_||h||f||p||k){let e=null,t=null;const n=ce;se&&(ce.addAttribute(1),e=oe,e||(e=v(n.getPointCount(),Number.NaN))),ae&&(ce.addAttribute(2),t=se?ue:oe),null!=me&&ce.addAttribute(3),se&&null!=e&&n.setAttributeStreamRef(1,e),ae&&null!=t&&n.setAttributeStreamRef(2,t),null!=me&&ne(n,me)}else if(b||y||T||N||g){x(B,R)||t("failed to parse point: x and y must be finite or nan"),(Number.isNaN(R)||Number.isNaN(B))&&(B=Number.NaN,R=Number.NaN);const e=new A({x:B,y:R});N&&e.setZ(V),T&&e.setM(M),g&&e.setID(U),ce=e}else if(w||C||D||F||j||O||z||I||E||P){(Number.isNaN(X)||Number.isNaN(Y)||Number.isNaN(L))&&(W=Number.NaN);const e=new S({xmin:W,ymin:X,xmax:Y,ymax:L});j&&O&&e.setInterval(1,0,G,q),z&&I&&e.setInterval(2,0,K,J),E&&P&&e.setInterval(3,0,re,ie),ce=e}return{...ce?{geom:ce}:{},...le?{sr:le}:{}}}function J(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 Q(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,g=!1,v=!1,x=!1,A=!1,S=-1,w=-1,C=-1,D=-1,F=0,j=0,O=0,z=0,I=0,E=0,P=0,B=0,R=0,V=0,M="",U="",W=null;for(;3!==e.nextToken();){const h=e.currentString();e.nextToken(),"wkid"===h?t||(t=!0,8===e.currentToken()&&(S=e.currentInt32Value())):"latestWkid"===h?n||(n=!0,8===e.currentToken()&&(w=e.currentInt32Value())):"wkt"===h?s||(s=!0,6===e.currentToken()&&(M=e.currentString())):"wkt2"===h?s||6===e.currentToken()&&(U=e.currentString()):"vcsWkid"===h?r||(r=!0,8===e.currentToken()&&(C=e.currentInt32Value())):"latestVcsWkid"===h?i||(i=!0,8===e.currentToken()&&(D=e.currentInt32Value())):"xyTolerance"===h?o||(o=!0,a=!0,F=e.currentDoubleValue()):"zTolerance"===h?u||(u=!0,a=!0,j=e.currentDoubleValue()):"mTolerance"===h?m||(m=!0,a=!0,O=e.currentDoubleValue()):"falseX"===h?l||(l=!0,a=!0,P=e.currentDoubleValue()):"falseY"===h?c||(c=!0,a=!0,B=e.currentDoubleValue()):"falseZ"===h?d||(d=!0,a=!0,R=e.currentDoubleValue()):"falseM"===h?_||(_=!0,a=!0,V=e.currentDoubleValue()):"xyUnits"===h?g||(g=!0,a=!0,z=e.currentDoubleValue()):"zUnits"===h?v||(v=!0,a=!0,I=e.currentDoubleValue()):"mUnits"===h?x||(x=!0,a=!0,E=e.currentDoubleValue()):"unit"===h?A||(A=!0,W=J(e)):e.skipChildren()}D<=0&&C>0&&(D=C),C<=0&&D>0&&(C=D);let X=null,Y=!0;if(0!==M.length&&(Y=!1,h(M)&&(X=f(M))),X||0===U.length||(Y=!1,h(U)&&(X=f(U))),!X&&w>0&&(Y=!1,p(w)&&(D<=0||k())&&(X=b(w,D))),!X&&S>0&&(Y=!1,p(S)&&(C<=0||k())&&(X=b(S,C))),Y&&(X=y(W)),a&&X){const e=new N;X.queryPrecisionDescriptorWithoutFalseXY(e),o&&e.setTolerance(0,F),u&&e.setTolerance(1,j),m&&e.setTolerance(2,O),g&&l&&c&&e.setGridParams(P,B,z),v&&d&&e.setZParams(R,I),x&&_&&e.setMParams(V,E),X=T(X,e)}return X}function Z(e,n,r,i){2!==i.currentToken()&&t("failed to parse multipath: array of array of vertices is expected");const s=e?new O:new z,a=s,o=w(0),u=v(2,0),_=C(0);let h=null,f=null,p=null,k=null,b=null,y=0,N=0,T=0;const g=new I,x=l.getNAN();let A=0,S=0;const F=e?1:0;for(;4!==i.nextToken();){2!==i.currentToken()&&t("failed to parse multipath: ring/path array is expected");let r=2,s=0,j=!0;const O=4;let z=0,I=0;const E=l.getNAN(),P=m(O,Number.NaN),B=m(O,Number.NaN);let R=!1;for(i.nextToken();4!==i.currentToken();){if(n&&1===i.currentToken())j&&t("failed to parse multipath: starting vertex array is expected"),p||(p=C(A-1,1),k=w(A-1,-1),b=v(0)),R=!0,r=1,({segFlag:T,toPointSz:z}=me(g,P,x,i));else{for(R=!1,2!==i.currentToken()&&t("failed to parse multipath: array is expected, rings/paths vertices consist of arrays of coordinates"),z=0;4!==i.nextToken();)z===O&&t("failed to parse multipath: each vertex array has to have at most 4 elements"),P[z++]=ee(i);z<2&&t("failed to parse multipath: each vertex array has to have at least 2 elements"),D(P[0],P[1])||t("failed to parse multipath: x and y must be finite")}i.nextToken();do{if(u.size()===2*A&&u.resize(re(A)),u.writePoint2D(2*A,E.setCoords(P[0],P[1])),h&&h.size()===A&&h.resize(ie(A)),z>2?(h||(h=v(A+1,Number.NaN)),h.write(A,P[2])):h&&h.write(A,Number.NaN),f&&f.size()===A&&f.resize(ie(A)),z>3?(f||(f=v(A+1,Number.NaN)),f.write(A,P[3])):f&&f.write(A,Number.NaN),j)S++,o.add(A),_.add(F),j=!1,I=z,c(B,P,0,0,I);else if(null!==p)if(R){const e=U(T),t=b.size();b.resize(t+e),p.add(T),k.add(y),g.get().writeInBufferStream(b,y),y+=e,a.incCurveType(T,1),N++}else p.add(1),k.add(-1);A++,s++,x.setCoords(P[0],P[1])}while(s<r&&4===i.currentToken())}0!==s&&(e&&s>r&&z===I&&0===d(P,B,z)?(A--,s--):null!==p&&(p.add(1),k.add(-1)))}return A&&(o.resize(S),_.resize(S),A>0&&(o.add(A),_.add(0)),a.setAttributeStreamRef(0,u),a.setPathFlagsStreamRef(_),a.setPathStreamRef(o),null!==p&&(a.updateCurveCounter(N),a.setSegmentData(k,b,p,y)),a.notifyModifiedFlags(65535)),{geometry:s,as:h,bs:f}}function H(e,n){2!==n.currentToken()&&t("failed to parse multipoint: array of vertices is expected");let r=0;const i=new E,s=v(2,0);let a=0;const o=4,u=m(o,Number.NaN),c=new l;let d=null,_=null;for(;4!==n.nextToken();){for(2!==n.currentToken()&&t("failed to parse multipoint: array is expected, multipoint vertices consist of arrays of cooridinates"),a=0;4!==n.nextToken();)a===o&&t("failed to parse multipoint: each vertex array has to have at most 4 elements"),u[a++]=ee(n);a<2&&t("failed to parse multipoint: each vertex array has to have at least 2 elements"),D(u[0],u[1])||t("failed to parse multipoint: x and y must be finite"),s.size()===2*r&&s.resize(re(r)),s.writePoint2D(2*r,c.setCoords(u[0],u[1])),d&&d.size()===r&&d.resize(ie(r)),a>2?(d||(d=v(r+1,Number.NaN)),d.write(r,u[2])):d&&d.write(r,Number.NaN),_&&_.size()===r&&_.resize(ie(r)),a>3?(_||(_=v(r+1,Number.NaN)),_.write(r,u[3])):_&&_.write(r,Number.NaN),r++}if(r){const e=i.getImpl();e.setAttributeStreamRef(0,s),e.resizeNoInit(r),e.notifyModifiedFlags(65535)}return{geometry:i,as:d,bs:_}}function $(e,n){2!==n.currentToken()&&t("failed to parse array of IDs: array of array of integers is expected");const r=F(2,0);let i=0,s=-1;for(;4!==n.nextToken();){const e=i;r.size()===i&&r.resize(ie(i)),i++;let a=0;for(-1===s?s=2===n.currentToken()?1:0:1===s&&2!==n.currentToken()&&t("failed to parse array of IDs: array of array of integers is expected"),0===s&&(r.size()===i&&r.resize(ie(i)),r.write(i,te(n)),a++,i++);4!==n.nextToken();)r.size()===i&&r.resize(ie(i)),r.write(i,te(n)),a++,i++;if(r.write(e,a),0===s)break}return r.resize(i),r}function ee(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 te(e){return e.currentInt32Value()}function ne(t,n){if(t.isEmpty())return;const r=F(2,0),i=t.getGeometryType();let s=0;i===E.type?s=1:i===z.type||i===O.type?s=t.getPathCount():e("not implemented"),r.resize(t.getPointCount(),0);let a=0;for(let o=0;o<s;++o){const s=n.read(a);a++;const u=a+s;let m=0,l=0;i===E.type?m=t.getPointCount():i===z.type||i===O.type?(m=t.getPathSize(o),l=t.getPathStart(o)):e("not implemented");for(let e=0,t=Math.min(s,m);e<t;++e)r.write(l,n.read(a)),a++,l++;a=u}t.getImpl().setAttributeStreamRef(3,r)}function re(e){let t=2*Math.trunc(3*(e+1)/2);return t<8?t=8:t<32&&(t=32),t}function ie(e){let t=Math.trunc(3*(e+1)/2);return t<4?t=4:t<16&&(t=16),t}function se(e,t,n,i,s){s>=i.size()&&r("Byte_buffer out of range access"),e.m_bits=0,e.m_rotation=0,e.m_cosr=1,e.m_sinr=0,e.setStartXY(t),e.setEndXY(n);const a=l.getNAN();a.x=i.readDouble(s),a.y=i.readDouble(s+8);const o=i.readInt32(s+16);if(!!(1&o))return e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.assign(a),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,R(e),!1;let u=!!(64&o);const m=!!(128&o);let c=!!(32&o);const d=!!(8&o),_=!!(16&o),h=t.equals(n);return u&&!h&&(u=!1,c=!0),c&&h&&(u=!0,c=!1,a.setCoords(0,0)),u||(m?c?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_interior.assign(a),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0):(e.constructCircularArcThreePoint(t,n,a),h&&d===e.isClockwise()&&e.reverse()):c?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,R(e),e.queryCoord2D(.5,e.m_interior)):V(e,t,n,a,d,_)),u&&(e.m_center.assign(t),e.m_startAngle=a.x,e.m_sweepAngle=a.y,M(e,Number.NaN,d,_),e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.setCoordsPoint2D(t)),e.setProjectionBehavior(0),R(e),!0}function ae(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,M(e,Number.NaN,u,m),e.m_semiMajorAxis=0,e.m_interior.setCoordsPoint2D(t)):a?(e.m_center.setNAN(),e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,R(e),e.queryCoord2D(.5,e.m_interior)):e.constructEllipticArcEndPointsCenter(t,n,e.m_semiMajorAxis,e.m_minorMajorRatio,e.m_rotation,!m,u,e.m_center),e.setProjectionBehavior(1),R(e),!0}function oe(e,t,r,i,s){return n(s+32<=i.size()),e.m_cp=_(l,2),e.m_cp[0].x=i.readDouble(s),e.m_cp[0].y=i.readDouble(s+8),e.m_cp[1].x=i.readDouble(s+16),e.m_cp[1].y=i.readDouble(s+24),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=r.x,e.m_YEnd=r.y,!0}function ue(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 me(e,n,r,i,s){const a={segFlag:0,toPointSz:0};let o=i.currentToken();o=i.nextToken();const u=i.currentString(),m=u[0];for((1!==u.length||"a"!==m&&"b"!==m&&"c"!==m&&"n"!==m&&"q"!==m)&&t('failed to parse curve: expecting "a", "b", "n", "q", or "c"'),o=i.nextToken(),2!==o&&t("failed to parse curve: start array is expected for curve parameters"),o=i.nextToken(),2!==o&&t("failed to parse curve: start array is expected for to point"),a.toPointSz=0;4!==i.nextToken();)4===a.toPointSz&&t("failed to parse curve: vertex array cannot have more than 4 elements"),n[a.toPointSz++]=ee(i);a.toPointSz<2&&t("failed to parse curve: vertex array must have at least 2 elements");const c=l.construct(n[0],n[1]),d=l.getNAN();let _=-1,h=-1,f=!1,p=Number.NaN,k=Number.NaN,b=Number.NaN;const y=[l.getNAN(),l.getNAN(),l.getNAN()],N=l.getNAN();if("a"===m){o=i.nextToken(),2!==o&&t("failed to parse curve: start array is expected for center point"),o=i.nextToken();const e=ee(i);o=i.nextToken();const n=ee(i);o=i.nextToken(),4!==o&&t("failed to parse curve: end array is expected for center point"),d.setCoords(e,n),o=i.nextToken(),_=i.currentInt32Value(),o=i.nextToken(),h=i.currentInt32Value(),o=i.nextToken(),4!==o?(f=!1,p=ee(i),o=i.nextToken(),k=ee(i),o=i.nextToken(),b=ee(i),o=i.nextToken(),4!==o&&t("failed to parse curve: end array is expected for curve parameters")):f=!0,a.segFlag=4}else if("b"===m){for(let e=0;e<2;e++){o=i.nextToken(),2!==o&&t("failed to parse curve: start array is expected for control point"),o=i.nextToken();const n=ee(i);o=i.nextToken();const r=ee(i);o=i.nextToken(),4!==o&&t("failed to parse curve: end array is expected for control point"),y[e].setCoords(n,r)}o=i.nextToken(),4!==o&&t("failed to parse curve: end array is expected for curve parameters"),a.segFlag=2}else if("n"===m){{o=i.nextToken(),2!==o&&t("failed to parse curve: start array is expected for control point"),o=i.nextToken();const e=ee(i);o=i.nextToken();const n=ee(i);o=i.nextToken(),4!==o&&t("failed to parse curve: end array is expected for control point"),y[0].setCoords(e,n)}o=i.nextToken();const e=ee(i);o=i.nextToken();const n=ee(i);o=i.nextToken();const r=ee(i);y[1].setCoords(e,n),y[2].setCoords(r,r),o=i.nextToken(),4!==o&&t("failed to parse curve: end array is expected for curve parameters"),a.segFlag=8}else if("q"===m){for(let e=0;e<1;e++){o=i.nextToken(),2!==o&&t("failed to parse curve: start array is expected for control point"),o=i.nextToken();const n=ee(i);o=i.nextToken();const r=ee(i);o=i.nextToken(),4!==o&&t("failed to parse curve: end array is expected for control point"),y[e].setCoords(n,r)}o=i.nextToken(),4!==o&&t("failed to parse curve: end array is expected for curve parameters"),a.segFlag=16}else{o=i.nextToken(),2!==o&&t("failed to parse curve: start array is expected for interior point"),o=i.nextToken();const e=ee(i);o=i.nextToken();const n=ee(i);o=i.nextToken(),4!==o&&t("failed to parse curve: end array is expected for interior point"),N.setCoords(e,n),o=i.nextToken(),4!==o&&t("failed to parse curve: end array is expected for curve parameters"),a.segFlag=4}if(o=i.nextToken(),3!==o&&t("failed to parse curve: end object is expected for curve"),"a"===m)if(e.createEllipticArc(),f){const t=!0;le(e.get(),r,c,d,t,_,h)}else ce(e.get(),r,c,d,_,h,p,k,b);else if("b"===m)e.createCubicBezier(),de(e.get(),r,c,y);else if("n"===m)e.createQuadraticRationalBezier(),_e(e.get(),r,c,y[0],y[1].x,y[1].y,y[2].x);else if("q"===m)e.createQuadraticBezier(),e.get().construct(r,y[0],c);else{e.createEllipticArc();const t=!1;le(e.get(),r,c,N,t,-1,-1)}return a}function le(e,t,n,r,i,s,a){e.dropAllAttributes();const o=20,u=new ArrayBuffer(o),m=new q({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,se(e,t,n,m,0)}function ce(e,t,n,r,i,s,a,o,u){e.dropAllAttributes();const m=44,l=new ArrayBuffer(m),c=new q({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,ae(e,t,n,c,0)}function de(e,t,n,r){e.dropAllAttributes();const i=32,s=new ArrayBuffer(i),a=new q({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,oe(e,t,n,a,0)}function _e(e,t,n,r,i,s,a){e.dropAllAttributes();const o=40,u=new ArrayBuffer(o),m=new q({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,ue(e,t,n,m,0)}function he(e,t,n,r,i){const o=e.getGeometryType();if(o===s.enumEllipticArc)return fe(e,t,n,r,i);if(o===s.enumBezier)return pe(e,t,n,r,i);if(o===s.enumRationalBezier2)return ke(e,t,n,r,i);if(o===s.enumBezier2){const s=new P;return s.constructFromQuadraticSegment(e),pe(s,t,n,r,i)}a("")}function fe(e,t,r,i,s){n(!B(e));const a=e.getEndXY(),o=e.hasAttribute(1)&&!t,u=e.hasAttribute(2)&&!r;let m=Number.NaN,l=Number.NaN;if(o&&(m=e.getEndAttributeAsDbl(1,0)),u&&(l=e.getEndAttributeAsDbl(2,0)),e.isDegenerateToLine()||e.isDegenerate(0))return be(o,u,a.x,a.y,m,l,i,s),!0;const c=0===e.projectionBehavior(),d=!!c&&e.isClosed();if(c&&!d)s.startObject(),s.addFieldName("c"),s.startArray(),be(o,u,a.x,a.y,m,l,i,s),ye(e.m_interior.x,e.m_interior.y,17,s),s.endArray(),s.endObject();else if(c){s.startObject(),s.addFieldName("a"),s.startArray(),be(o,u,a.x,a.y,m,l,i,s);const t=0,n=0;ye(e.m_center.x+t,e.m_center.y+n,17,s);const r=!e.isMajor();s.addInt32(r?1:0);const c=e.isClockwise();s.addInt32(c?1:0),s.endArray(),s.endObject()}else{s.startObject(),s.addFieldName("a"),s.startArray(),be(o,u,a.x,a.y,m,l,i,s);const t=e;ye(t.m_center.x,t.m_center.y,17,s);const n=!t.isMajor();s.addInt32(n?1:0);const r=t.isClockwise();s.addInt32(r?1:0),s.addDouble(t.m_rotation,17),s.addDouble(t.m_semiMajorAxis,17),s.addDouble(t.m_minorMajorRatio,17),s.endArray(),s.endObject()}return!1}function pe(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(),be(a,o,s.x,s.y,u,m,r,i),ye(e.m_cp[0].x,e.m_cp[0].y,r,i),ye(e.m_cp[1].x,e.m_cp[1].y,r,i),i.endArray(),i.endObject(),!1}function ke(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(),be(a,o,s.x,s.y,u,m,r,i),ye(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 be(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 ye(e,t,n,r){r.startArray(),r.addDouble(e,n),r.addDouble(t,n),r.endArray()}class Ne{getOperatorType(){return 10405}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,r,i,s){Te(e,t,n,r)}exportSpatialReference(e,t,r,i){n(0)}exportProjectionTransformation(e,t,r,i){n(0)}exportDatumTransformation(e,t,r,i){n(0)}static geometryTypeToString(e){return n(0),""}}function Te(t,r,i,a,o){if(r||i){if(a.startObject(),null!==r){switch(r.getGeometryType()){case s.enumPolygon:ge(!0,t,r,a);break;case s.enumPolyline:ge(!1,t,r,a);break;case s.enumMultiPoint:ve(t,r,a);break;case s.enumPoint:xe(t,r,a);break;case s.enumEnvelope:Ae(t,r,a);break;case s.enumMultipatch:n(0);break;default:e("exportToJSON")}}null!==i&&(a.addFieldName("spatialReference"),we(t,i,a)),a.endObject()}}function ge(e,t,r,i){const s=r.getImpl(),o=!!(2&t),u=!!(4&t),m=!!(8&t),l=s.hasAttribute(1)&&!o,c=s.hasAttribute(2)&&!u,d=s.hasAttribute(3)&&!m,_=s.hasNonLinearSegments();l&&(i.addFieldName("hasZ"),i.addBool(!0)),c&&(i.addFieldName("hasM"),i.addBool(!0)),e?_?i.addFieldName("curveRings"):i.addFieldName("rings"):_?i.addFieldName("curvePaths"):i.addFieldName("paths");let h=null;const f=[];if(r.isEmpty())i.startArray(),i.endArray();else{const e=17-(31&t>>13);i.startArray();const n=r.getPathCount();let m=0;const p=s.getAttributeStreamRef(0);let k=null,b=null,y=null;const N=new I;let T=null,g=null,v=null;_&&(T=s.getSegmentFlagsStreamRef(),g=s.getSegmentIndexStreamRef(),v=s.getSegmentDataStreamRef()),l&&(k=s.getAttributeStreamRef(1)),c&&(b=s.getAttributeStreamRef(2)),d&&(y=s.getAttributeStreamRef(3),h=j(3,0));for(let t=0;t<n;t++){i.startArray(),d&&f.push(0);const n=r.getPathEnd(t);if(m===n){i.endArray();continue}const s=r.isClosedPath(t);let _=p.read(2*m),x=p.read(2*m+1),A=l?k.read(m):Number.NaN,S=c?b.read(m):Number.NaN,w=d?y.read(m):0;Ce(l,c,_,x,A,S,e,i);let C=1;d&&(h.add(w),f[f.length-1]++);const D=_,F=x,j=A,O=S,z=w;let I=!1,E=0,P=Number.NaN,B=Number.NaN,R=0;for(let t=m+1,r=m,V=s?n+1:n;t<V;t++,r++){const s=null!==T?31&T.read(r):1;let m,V;if(t<n?(m=p.read(2*t),V=p.read(2*t+1),l&&(P=k.read(t)),c&&(B=b.read(t)),d&&(R=y.read(t))):(m=D,V=F,P=j,B=O,R=z),1!==s){I=!0,4===s?N.createEllipticArc():2===s?N.createCubicBezier():16===s?N.createQuadraticBezier():8===s?N.createQuadraticRationalBezier():a("JSON export.unsupported curve");const t=N.get(),n=g.read(r);t.setStartXYCoords(_,x),t.setEndXYCoords(m,V),l&&(t.setStartAttribute(1,0,A),t.setEndAttribute(1,0,P)),c&&(t.setStartAttribute(2,0,S),t.setEndAttribute(2,0,B)),t.readFromBufferStream(v,n);he(N.get(),o,u,e,i)&&E++}else Ce(l,c,m,V,P,B,e,i);d&&(h.add(R),f[f.length-1]++),C++,_=m,x=V,A=P,S=B,w=R}I&&0===E||(C<2&&E<1&&(Ce(l,c,_,x,A,S,e,i),C++,d&&(h.add(w),f[f.length-1]++)),s&&C<3&&E<2&&(Ce(l,c,D,F,j,O,e,i),C++,_=D,x=F,A=j,S=O,w=z,d&&(h.add(z),f[f.length-1]++))),i.endArray(),m=n}i.endArray()}if(d){i.addFieldName("ids"),i.startArray();let e=0;for(let t=0,r=f.length;t<r;++t){const r=f[t];n(0===r||null!==h&&e+r<=h.size()),i.startArray();for(let t=0;t<r;++t)i.addInt32(h.read(e)),e++;i.endArray()}i.endArray()}}function ve(e,t,r){const i=t.getImpl(),s=i.hasAttribute(1)&&!(2&e),a=i.hasAttribute(2)&&!(4&e),o=i.hasAttribute(3)&&!(8&e);s&&(r.addFieldName("hasZ"),r.addBool(!0)),a&&(r.addFieldName("hasM"),r.addBool(!0)),r.addFieldName("points");const u=t.getPointCount();if(t.isEmpty())r.startArray(),r.endArray();else{const t=17-(31&e>>13);r.startArray();const n=i.getAttributeStreamRef(0);let o=null,m=null;s&&(o=i.getAttributeStreamRef(1)),a&&(m=i.getAttributeStreamRef(2));for(let e=0;e<u;e++){const i=n.read(2*e),u=n.read(2*e+1);let l=Number.NaN,c=Number.NaN;s&&(l=o.read(e)),a&&(c=m.read(e)),Ce(s,a,i,u,l,c,t,r)}r.endArray()}if(o){let e=null;i.isEmpty()||(e=i.getAttributeStreamRef(3)),n(0===u||null!==e&&e.size()>=u),r.addFieldName("ids"),r.startArray();for(let t=0;t<u;t++)r.addInt32(e.read(t));r.endArray()}}function xe(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 Ae(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 Se(e,n,r){r.startObject();const i=n.getID();i<=0&&t("cannot export unit that has no valid WKID"),r.addFieldName("uwkid"),r.addInt32(i),r.endObject()}function we(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"),Se(e,t.getUnit(),n));else if(r<=0||1&e){let r="";64&e&&(r=t.getText2(),n.addFieldName("wkt2"),n.addString(r));const i=t.getText();i!==r&&(n.addFieldName("wkt"),n.addString(i))}if(16&e){const e=new N;t.queryPrecisionDescriptor(e),n.addFieldName("xyTolerance"),n.addDouble(e.getTolerance(0)),n.addFieldName("zTolerance"),n.addDouble(e.getTolerance(1)),n.addFieldName("mTolerance"),n.addDouble(e.getTolerance(2)),n.addFieldName("falseX"),n.addDouble(e.getFalseX()),n.addFieldName("falseY"),n.addDouble(e.getFalseY()),n.addFieldName("xyUnits"),n.addDouble(e.getGridUnitsXY()),n.addFieldName("falseZ"),n.addDouble(e.getFalseZ()),n.addFieldName("zUnits"),n.addDouble(e.getGridUnitsZ()),n.addFieldName("falseM"),n.addDouble(e.getFalseM()),n.addFieldName("mUnits"),n.addDouble(e.getGridUnitsM())}n.endObject()}function Ce(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 De={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 Fe{constructor(t){this.m_functionStack=[],this.m_pushPositions=[],this.m_utf8Decoder=new TextDecoder("utf-8",{fatal:!0}),void 0===t?(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):t.jsonString?this.resetParserFromString(t.jsonString):t.jsonStream?a("streaming json parsing not yet impl"):e("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_(){a("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){a("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 n(0),""}childrenAsString(){return n(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"}t("invalid token")}toUTF8_(e,t){let n=0,r=e;for(;t.charCodeAt(r)===De.s_backslash&&t.charCodeAt(r+1)===De.s_u;)n++,r+=6;r=e;const i=new Uint8Array(n);let s=0;for(;t.charCodeAt(r)===De.s_backslash&&t.charCodeAt(r+1)===De.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)!==De.s_backslash)r++;else{switch(r>0&&(e+=i.slice(t,t+r)),i.charCodeAt(++s)){case De.s_doubleQuote:e+='"';break;case De.s_u:{const{u8s:t,end:n}=this.toUTF8_(s-1,i);s=n-1,e+=t;break}case De.s_backslash:e+="\\";break;case De.s_forwardslash:e+="/";break;case De.s_b:e+="\b";break;case De.s_f:e+="\f";break;case De.s_n:e+="\n";break;case De.s_r:e+="\r";break;case De.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&&t("invalid token"),10===this.m_currentTokenType)return Number.NaN;let e=this.m_getCurrentSubstr(),n=this.m_endToken-this.m_startToken;if(6===this.m_currentTokenType){if("NaN"===this.currentString())return Number.NaN;e=e.slice(1),n-=2,0===n&&t("invalid token")}const r=Number.parseFloat(e);if(6===this.m_currentTokenType)Number.isNaN(r)&&t("invalid token");else if(Number.isNaN(r))return Number.NaN;return r}currentInt32Value(){8!==this.m_currentTokenType&&6!==this.m_currentTokenType&&t("invalid token");let e=this.m_getCurrentSubstr(),n=this.m_endToken-this.m_startToken;6===this.m_currentTokenType&&(e=e.slice(1),n-=2,0===n&&t("invalid token"));const r=parseInt(e);return Number.isNaN(r)&&t("invalid token"),r}currentInt64Value(){return n(0),0n}currentBoolValue(){return n(0),!1}isError(){return 0}JSONString(){return n(0),""}pushPosition(){return n(0),!1}popPosition(){return n(0),!1}skipCStyleComments_(){n(0)}skipCppStyleComments_(){n(0)}skipComments_(){this.m_prepSubstr();let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&t("invalid token"),e=this.m_peekChar(),e===De.s_asterisk?this.skipCStyleComments_():e===De.s_forwardslash?this.skipCppStyleComments_():t("invalid token")}skipWhiteSpace_(){let e;do{this.m_eof()&&t("invalid token");let n=this.m_peekChar();for(;n>=9&&n<=13||32===n;)this.m_increment(),this.m_eof()&&t("invalid token"),n=this.m_peekChar();n===De.s_forwardslash?(this.m_startToken=this.m_endToken,e=!0,this.skipComments_()):e=!1}while(e)}rightBracket_(){return this.m_peekChar()===De.s_endArray&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=4,!0)}rightBrace_(){return this.m_peekChar()===De.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()&&t("invalid token");let e=this.m_peekChar();for(;e!==De.s_doubleQuote;){const n=e===De.s_backslash;if(this.m_stepOverChar(),this.m_eof()&&t("invalid token"),e=this.m_peekChar(),n)if(this.m_bHasEscapes=!0,e===De.s_doubleQuote||e===De.s_backslash||e===De.s_forwardslash||e===De.s_b||e===De.s_f||e===De.s_n||e===De.s_r||e===De.s_t)this.m_stepOverChar(),this.m_eof()&&t("invalid token"),e=this.m_peekChar();else if(e===De.s_u)for(let r=0;r<4;r++)this.m_stepOverChar(),this.m_eof()&&t("invalid token"),e=this.m_peekChar(),e>=De.s_zero&&e<=De.s_nine||e>=De.s_a&&e<=De.s_f||e>=De.s_A&&e<=De.s_F||t("invalid token");else t("invalid token")}this.m_stepOverChar()}comma_(){return this.m_peekChar()===De.s_comma&&(this.m_increment(),!0)}colon_(){return this.m_peekChar()===De.s_colon&&(this.m_increment(),!0)}fieldNameEnd_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.colon_()?(this.skipWhiteSpace_(),this.value_()):t("invalid token")}fieldNameStart_(){this.m_startToken=this.m_endToken;this.m_peekChar()!==De.s_doubleQuote&&t("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():t("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():t("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()!==De.s_zero?this.digits_():this.m_stepOverChar()}digits_(){let e=this.m_peekChar();do{this.m_stepOverChar(),this.m_eof()&&t("invalid token"),e=this.m_peekChar()}while(e>=De.s_zero&&e<=De.s_nine)}frac_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&t("invalid token"),e=this.m_peekChar(),e>=De.s_zero&&e<=De.s_nine||t("invalid token"),this.digits_()}exp_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&t("invalid token"),e=this.m_peekChar(),e!==De.s_plus&&e!==De.s_minus||(this.m_stepOverChar(),this.m_eof()&&t("invalid token"),e=this.m_peekChar()),e>=De.s_zero&&e<=De.s_nine||t("invalid token"),this.digits_()}valueNumber_(){this.m_prepSubstr();let e=!1,n=this.m_peekChar();if(n===De.s_minus?(this.m_stepOverChar(),this.m_eof()&&t("invalid token"),n=this.m_peekChar(),e=!0,n>=De.s_zero&&n<=De.s_nine||t("invalid token"),this.int_()):this.int_(),n=this.m_peekChar(),n===De.s_period)this.m_currentTokenType=7,this.frac_(),n=this.m_peekChar(),n!==De.s_e&&n!==De.s_E||this.exp_();else if(n===De.s_e||n===De.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:n}=this.m_get(5);n&&t("invalid token"),"null"!==e&&t("invalid token"),this.m_currentTokenType=10}valueTrue_(){const{s:e,bDone:n}=this.m_get(5);n&&t("invalid token"),"true"!==e&&t("invalid token"),this.m_currentTokenType=11}valueFalse_(){const{s:e,bDone:n}=this.m_get(6);n&&t("invalid token"),"false"!==e&&t("invalid token"),this.m_currentTokenType=12}valueNan_(){const{s:e,bDone:n}=this.m_get(4);n&&t("invalid token"),"NaN"!==e&&t("invalid token"),this.m_currentTokenType=7}value_(){this.m_startToken=this.m_endToken;const e=this.m_peekChar();e===De.s_beginObject?this.valueStartObject_():e===De.s_beginArray?this.valueStartArray_():e===De.s_doubleQuote?this.valueString_():e===De.s_minus||e>=De.s_zero&&e<=De.s_zero+9?this.valueNumber_():e===De.s_n?this.valueNull_():e===De.s_t?this.valueTrue_():e===De.s_f?this.valueFalse_():e===De.s_N?this.valueNan_():t("invalid token")}start_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.m_functionStack.push(()=>this.accept_());const e=this.m_peekChar();e!==De.s_beginObject&&e!==De.s_beginArray&&t("invalid token"),this.value_()}accept_(){this.m_startToken=this.m_endToken,this.m_currentTokenType=0}}class je{getOperatorType(){return 10404}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,n,r,i,s,a,o){let u;"string"==typeof r?(u=new Fe({jsonString:r}),u.nextToken()):u=r,1!==u.currentToken()&&t("failed to import map geometry: start of object is expected");const m=K(n,e,u,i,s);return new g(m)}importSpatialReference(t){const n=Q(t);return null===n&&e("failed to import spatial reference"),n}importProjectionTransformation(e,t){return n(0),{}}importDatumTransformation(e,t){return n(0),{}}static stringToGeometryType(e){return(e=e.toLowerCase()).startsWith("esrigeometry")||t("string_to_geometry_type"),e.endsWith("point")?s.enumPoint:e.endsWith("envelope")?s.enumEnvelope:e.endsWith("multipoint")?s.enumMultiPoint:e.endsWith("polyline")?s.enumPolyline:e.endsWith("polygon")?s.enumPolygon:void t("string_to_geometry_type")}}const Oe=new G,ze=new Ne,Ie=new je;function Ee(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function Pe(e,t){const{includeGeometry:n=!0,includeSpatialReference:r=!0}=t??{};r&&(e.spatialReference?.latestVcsWkid||e.spatialReference?.vcsWkid)&&(e={...e,spatialReference:{...e.spatialReference}},delete e.spatialReference?.latestVcsWkid,delete e.spatialReference?.vcsWkid);const i=new L(e,{strict:!1});return i.nextToken(),Ie.execute(0,s.enumUnknown,i,n,r)}function Be(e){let t=null;return[e.map(e=>{if(null==t){const n=Re(e);return t=n.getSpatialReference(),n.getGeometry()}return Ve(e)}),t]}function Re(e){return e.spatialReference instanceof W&&(e={...e,spatialReference:e.spatialReference.toJSON()}),Pe(e)}function Ve(e){return Pe(e,{includeSpatialReference:!1}).getGeometry()}function Me(e){return e instanceof W&&(e=e.toJSON()),Pe({x:0,y:0,spatialReference:e},{includeGeometry:!1}).getSpatialReference()}function Ue(e,t){return e instanceof g&&(t=e.getSpatialReference(),e=e.getGeometry()),e?.isEmpty()?null:(Oe.reset(),ze.execute(0,e,t,Oe),Oe.getObject())}export{Be as fromGeometries,Re as fromGeometry,Ve as fromGeometryToGXGeometry,Me as fromSpatialReference,Ee as getSpatialReference,Ue as toGeometry};
@@ -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{__decorate as t}from"tslib";import{ClonableMixin as o}from"../../core/Clonable.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{fromRotationTranslationScale as i,invert as a,exactEquals as l}from"../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../core/libs/gl-matrix-2/factories/mat4f64.js";import{setAxisAngle as p}from"../../core/libs/gl-matrix-2/math/quat.js";import{create as m}from"../../core/libs/gl-matrix-2/factories/quatf64.js";import{create as c,fromArray as u,fromValues as f,clone as h}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromAxisAndAngle as x,angle as g,angleRad as j,axis as b,up as y}from"./axisAngleDegrees.js";let d=class extends(o(r)){constructor(t){super(t),this.translation=c(),this.rotationAxis=u(y),this.rotationAngle=0,this.scale=f(1,1,1)}get rotation(){return x(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=h(b(t)),this.rotationAngle=g(t)}get localMatrix(){const t=n();return p(A,b(this.rotation),j(this.rotation)),i(t,A,this.translation,this.scale),t}get localMatrixInverse(){return a(n(),this.localMatrix)}equals(t){return this===t||null!=t&&l(this.localMatrix,t.localMatrix)}};t([e({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"translation",void 0),t([e({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAxis",void 0),t([e({type:Number,nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAngle",void 0),t([e({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"scale",void 0),t([e()],d.prototype,"rotation",null),t([e()],d.prototype,"localMatrix",null),t([e()],d.prototype,"localMatrixInverse",null),d=t([s("esri.geometry.support.MeshTransform")],d);const A=m();export{d as default};
5
+ import{__decorate as t}from"tslib";import{ClonableMixin as o}from"../../core/Clonable.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{fromRotationTranslationScale as i,invert as a,exactEquals as l}from"../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../core/libs/gl-matrix-2/factories/mat4f64.js";import{setAxisAngle as p}from"../../core/libs/gl-matrix-2/math/quat.js";import{create as m}from"../../core/libs/gl-matrix-2/factories/quatf64.js";import{create as c,fromArray as u,fromValues as f,clone as h}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{up as x,fromAxisAndAngle as g,angle as j,angleRad as b,axis as y}from"./axisAngleDegrees.js";let d=class extends(o(r)){constructor(t){super(t),this.translation=c(),this.rotationAxis=u(x),this.rotationAngle=0,this.scale=f(1,1,1)}get rotation(){return g(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=h(y(t)),this.rotationAngle=j(t)}get localMatrix(){const t=n();return p(A,y(this.rotation),b(this.rotation)),i(t,A,this.translation,this.scale),t}get localMatrixInverse(){return a(n(),this.localMatrix)}equals(t){return this===t||null!=t&&l(this.localMatrix,t.localMatrix)}};t([e({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"translation",void 0),t([e({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAxis",void 0),t([e({type:Number,nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAngle",void 0),t([e({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"scale",void 0),t([e()],d.prototype,"rotation",null),t([e()],d.prototype,"localMatrix",null),t([e()],d.prototype,"localMatrixInverse",null),d=t([s("esri.geometry.support.MeshTransform")],d);const A=m();export{d as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{deg2rad as r,rad2deg as t}from"../../core/mathUtils.js";import{getRotation as n}from"../../core/libs/gl-matrix-2/math/mat4.js";import{setAxisAngle as o,multiply as i,getAxisAngle as u}from"../../core/libs/gl-matrix-2/math/quat.js";import{create as c}from"../../core/libs/gl-matrix-2/factories/quatf64.js";import{d as e,i as f,n as s,p as m}from"../../chunks/vec32.js";import{UNIT_X as a,UNIT_Y as l,UNIT_Z as p}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";function j(r=B){return[r[0],r[1],r[2],r[3]]}function x(r,t,n,o){return h(r,t,n,o,E)}function b(r,t){return h(r[0],r[1],r[2],t,E)}function g(r,t=j()){return h(r[0],r[1],r[2],r[3],t)}function h(r,t,n,o,i=j()){return i[0]=r,i[1]=t,i[2]=n,i[3]=o,i}function q(r,t,n=j()){return e(w(n),r),n[3]=t,n}function v(r,t,n){return f(n,r,t),s(n,n),n[3]=-m(r,t),n}function d(r,o=j()){const i=n(C,r);return A(o,t(u(o,i))),o}function k(r,n,c=j()){return o(C,w(r),z(r)),o(D,w(n),z(n)),i(C,D,C),A(c,t(u(w(c),C)))}function U(r,t,n,o=j()){return q(a,r,F),q(l,t,G),q(p,n,H),k(F,G,F),k(F,H,o),o}function w(r){return r}function y(r){return r[3]}function z(t){return r(t[3])}function A(r,t){return r[3]=t,r}const B=[0,0,1,0],C=c(),D=c(),E=j(),F=j(),G=j(),H=j();export{y as angle,z as angleRad,w as axis,k as compose,U as composeAxes,g as copy,j as create,q as fromAxisAndAngle,d as fromMatrix,v as fromPoints,h as fromValues,A as setAngle,B as up,x as wrap,b as wrapAxisAngle};
5
+ import{rad2deg as r,deg2rad as t}from"../../core/mathUtils.js";import{getRotation as n}from"../../core/libs/gl-matrix-2/math/mat4.js";import{setAxisAngle as o,multiply as i,getAxisAngle as u}from"../../core/libs/gl-matrix-2/math/quat.js";import{create as c}from"../../core/libs/gl-matrix-2/factories/quatf64.js";import{d as e,i as f,n as s,p as m}from"../../chunks/vec32.js";import{UNIT_X as a,UNIT_Y as l,UNIT_Z as p}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";function j(r=B){return[r[0],r[1],r[2],r[3]]}function x(r,t,n,o){return h(r,t,n,o,E)}function b(r,t){return h(r[0],r[1],r[2],t,E)}function g(r,t=j()){return h(r[0],r[1],r[2],r[3],t)}function h(r,t,n,o,i=j()){return i[0]=r,i[1]=t,i[2]=n,i[3]=o,i}function q(r,t,n=j()){return e(w(n),r),n[3]=t,n}function v(r,t,n){return f(n,r,t),s(n,n),n[3]=-m(r,t),n}function d(t,o=j()){const i=n(C,t);return A(o,r(u(o,i))),o}function k(t,n,c=j()){return o(C,w(t),z(t)),o(D,w(n),z(n)),i(C,D,C),A(c,r(u(w(c),C)))}function U(r,t,n,o=j()){return q(a,r,F),q(l,t,G),q(p,n,H),k(F,G,F),k(F,H,o),o}function w(r){return r}function y(r){return r[3]}function z(r){return t(r[3])}function A(r,t){return r[3]=t,r}const B=[0,0,1,0],C=c(),D=c(),E=j(),F=j(),G=j(),H=j();export{y as angle,z as angleRad,w as axis,k as compose,U as composeAxes,g as copy,j as create,q as fromAxisAndAngle,d as fromMatrix,v as fromPoints,h as fromValues,A as setAngle,B as up,x as wrap,b as wrapAxisAngle};
@@ -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 r from"../Geometry.js";import e from"../Multipoint.js";import i from"../Point.js";import n from"../Polygon.js";import t from"../Polyline.js";function m(o){return void 0!==o.xmin&&void 0!==o.ymin&&void 0!==o.xmax&&void 0!==o.ymax}function u(o){return void 0!==o.points}function l(o){return void 0!==o.x&&void 0!==o.y}function s(o){return void 0!==o.paths||void 0!==o.curvePaths}function y(o){return void 0!==o.rings||void 0!==o.curveRings}function f(f){return null==f?null:f instanceof r?f:l(f)?i.fromJSON(f):s(f)?t.fromJSON(f):y(f)?n.fromJSON(f):u(f)?e.fromJSON(f):m(f)?o.fromJSON(f):null}function v(o){return o?l(o)?"esriGeometryPoint":s(o)?"esriGeometryPolyline":y(o)?"esriGeometryPolygon":m(o)?"esriGeometryEnvelope":u(o)?"esriGeometryMultipoint":null:null}const p={esriGeometryPoint:i,esriGeometryPolyline:t,esriGeometryPolygon:n,esriGeometryEnvelope:o,esriGeometryMultipoint:e,esriGeometryMultiPatch:n};function c(o){return o&&p[o]||null}export{f as fromJSON,c as getGeometryType,v as getJsonType,m as isExtent,u as isMultipoint,l as isPoint,y as isPolygon,s as isPolyline};
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};
@@ -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{colorGamma as e}from"../../../../../colorUtils.js";import t from"../../../../../core/Logger.js";import{getOrCreateMapValue as s}from"../../../../../core/MapUtils.js";import{deg2rad as r}from"../../../../../core/mathUtils.js";import{exactEquals as i}from"../../../../../core/libs/gl-matrix-2/math/quat.js";import{clone as o,IDENTITY as a}from"../../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{q as n}from"../../../../../chunks/vec32.js";import{ZEROS as l,clone as c,ONES as u}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import h from"../../../MeshMaterialMetallicRoughness.js";import{convertVertexSpace as f}from"../../vertexSpaceConversion.js";import{Buffer as m}from"./buffer.js";import{smoothNormals as p}from"./geometry.js";import{imageToArrayBuffer as d,imageToDataURI as g}from"./imageutils.js";import{isEncodedMeshTexture as x}from"../../../../../views/3d/glTF/internal/resourceUtils.js";import{DataType as T}from"../../../../../views/webgl/enums.js";const b=()=>t.getLogger("esri.geometry.support.meshUtils.exporters.gltf.gltf");class _{constructor(e,t){this.options=t,this._materialMap=new Array,this._imageMap=new Map,this._textureMap=new Map,this.gltf={asset:{version:"2.0",copyright:e.copyright,generator:e.generator},extras:{output:t.output,binChunkBuffer:null,promises:[]}},this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras,s=2===t.output.buffer||2===t.output.image;s&&(t.binChunkBuffer=new m(this.gltf)),e.forEachScene(e=>{this._addScene(e)}),s&&t.binChunkBuffer.finalize()}_addScene(e){this.gltf.scenes||(this.gltf.scenes=[]);const t={};e.name&&(t.name=e.name),e.forEachNode(e=>{t.nodes||(t.nodes=[]),t.nodes.push(...this._addNodes(e))}),this.gltf.scenes.push(t)}_addNodes(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;n(s,l)||(t.translation=c(s));const r=e.rotation;i(r,a)||(t.rotation=o(r));const h=e.scale;n(h,u)||(t.scale=c(h));const f=this.gltf.nodes.length;if(this.gltf.nodes.push(t),e.mesh&&e.mesh.vertexAttributes.position){const s=this._createMeshes(e.mesh),r=[f];if(1===s.length)this._addMesh(t,s[0]);else for(const e of s){const t={};this._addMesh(t,e),r.push(this.gltf.nodes.length),this.gltf.nodes.push(t)}return r}return e.forEachNode(e=>{t.children||(t.children=[]),t.children.push(...this._addNodes(e))}),[f]}_addMesh(e,t){this.gltf.meshes??=[];const s=this.gltf.meshes.length;this.gltf.meshes.push(t),e.mesh=s}_createMeshes(e){const t=this.gltf.extras,s=2===t.output.buffer;let r;r=s?t.binChunkBuffer:new m(this.gltf);const i=this.options.origin,o=e.vertexSpace.clone();o.origin=[i.x,i.y,i.z??0];const a=f({vertexAttributes:e.vertexAttributes,vertexSpace:e.vertexSpace,transform:this.options?.ignoreLocalTransform?null:e.transform,spatialReference:e.spatialReference},o,{targetUnit:this.options.unitConversionDisabled?void 0:"meters"});if(!a)return[];p(e,a),M(a);const{position:n,normal:l,tangent:c}=a,{uv:u,color:h}=e.vertexAttributes,d=r.addBufferView(T.FLOAT,"VEC3",34962);let g,x,b,_;l&&(g=r.addBufferView(T.FLOAT,"VEC3",34962)),u&&(x=r.addBufferView(T.FLOAT,"VEC2",34962)),c&&(b=r.addBufferView(T.FLOAT,"VEC4",34962)),h&&(_=r.addBufferView(T.FLOAT,"VEC4",34962)),d.startAccessor("POSITION"),g&&g.startAccessor("NORMAL"),x&&x.startAccessor("TEXCOORD_0"),b&&b.startAccessor("TANGENT"),_&&_.startAccessor("COLOR_0");const A=a.position.length/3;for(let f=0;f<A;++f)d.push(n[3*f]),d.push(n[3*f+1]),d.push(n[3*f+2]),g&&null!=l&&(g.push(l[3*f]),g.push(l[3*f+1]),g.push(l[3*f+2])),x&&null!=u&&(x.push(u[2*f]),x.push(u[2*f+1])),b&&null!=c&&(b.push(c[4*f]),b.push(c[4*f+1]),b.push(c[4*f+2]),b.push(c[4*f+3])),_&&null!=h&&(_.push(w(h[4*f]/255)),_.push(w(h[4*f+1]/255)),_.push(w(h[4*f+2]/255)),_.push(h[4*f+3]/255));const O=d.endAccessor(),v=this._addAccessor(d.index,O);let R,N,C,S,I;if(g){const e=g.endAccessor();R=this._addAccessor(g.index,e)}if(x){const e=x.endAccessor();N=this._addAccessor(x.index,e)}if(b){const e=b.endAccessor();C=this._addAccessor(b.index,e)}if(_){const e=_.endAccessor();S=this._addAccessor(_.index,e)}const y=[];return e.components&&e.components.length>0&&e.components[0].faces?(I=r.addBufferView(T.UNSIGNED_INT,"SCALAR",34963),this._addMeshVertexIndexed(I,e.components,y,v,R,N,C,S)):this._addMeshVertexNonIndexed(e.components,y,v,R,N,C,S),d.finalize(),g?.finalize(),x?.finalize(),b?.finalize(),I?.finalize(),_?.finalize(),s||r.finalize(),y}_addMaterial(e){if(null==e)return;const t=this._materialMap.indexOf(e);if(-1!==t)return t;this.gltf.materials||(this.gltf.materials=[]);const s={};switch(e.alphaMode){case"mask":s.alphaMode="MASK";break;case"auto":case"blend":s.alphaMode="BLEND"}s.alphaCutoff=e.alphaCutoff,e.doubleSided&&(s.doubleSided=e.doubleSided),s.pbrMetallicRoughness={};const r=e=>{const t=e.toRgba();return t[0]=w(t[0]/255),t[1]=w(t[1]/255),t[2]=w(t[2]/255),t};if(null!=e.color&&(s.pbrMetallicRoughness.baseColorFactor=r(e.color)),null!=e.colorTexture&&(s.pbrMetallicRoughness.baseColorTexture=this._createTextureInfo(e.colorTexture,e.colorTextureTransform)),null!=e.normalTexture&&(s.normalTexture=this._createTextureInfo(e.normalTexture,e.normalTextureTransform)),e instanceof h){if(null!=e.emissiveTexture&&(s.emissiveTexture=this._createTextureInfo(e.emissiveTexture,e.emissiveTextureTransform)),null!=e.emissiveColor){const t=r(e.emissiveColor);s.emissiveFactor=[t[0],t[1],t[2]]}null!=e.occlusionTexture&&(s.occlusionTexture=this._createTextureInfo(e.occlusionTexture,e.occlusionTextureTransform)),null!=e.metallicRoughnessTexture&&(s.pbrMetallicRoughness.metallicRoughnessTexture=this._createTextureInfo(e.metallicRoughnessTexture,e.metallicRoughnessTextureTransform)),s.pbrMetallicRoughness.metallicFactor=e.metallic,s.pbrMetallicRoughness.roughnessFactor=e.roughness}else s.pbrMetallicRoughness.metallicFactor=1,s.pbrMetallicRoughness.roughnessFactor=1,b().warnOnce("Meshes exported to GLTF without MeshMaterialMetallicRoughness material will appear different when imported back.");const i=this.gltf.materials.length;return this.gltf.materials.push(s),this._materialMap.push(e),i}_createTextureInfo(e,t){const s={index:this._addTexture(e)};return t?(s.extensions||(s.extensions={}),s.extensions.KHR_texture_transform={scale:t.scale,offset:t.offset,rotation:r(t.rotation)},s):s}_addTexture(e){const t=this.gltf.textures??[];return this.gltf.textures=t,s(this._textureMap,e,()=>{const s={sampler:this._addSampler(e),source:this._addImage(e)},r=t.length;return t.push(s),r})}_addImage(e){const t=this._imageMap.get(e);if(null!=t)return t;this.gltf.images||(this.gltf.images=[]);const s={};if(e.url)s.uri=e.url;else{const t=e.data;s.extras=t;for(let e=0;e<this.gltf.images.length;++e)if(t===this.gltf.images[e].extras)return e;const r=this.gltf.extras;switch(r.output.image){case 2:{const e=r.binChunkBuffer.addBufferView(T.UNSIGNED_BYTE,"SCALAR");if(x(t))null!=t.data&&e.writeOutToBuffer(t.data.buffer,0);else{const i=d(t,this.options.signal).then(({data:e,type:t})=>(s.mimeType=t,e));r.promises.push(e.writeAsync(i).then(()=>e.finalize()))}s.bufferView=e.index;break}case 1:if(x(t)){b().warnOnce("Image export for basis compressed textures not available.");break}s.uri=g(t);break;default:if(x(t)){b().warnOnce("Image export for basis compressed textures not available.");break}r.promises.push(d(t,this.options.signal).then(({data:e,type:t})=>{s.uri=e,s.mimeType=t}))}}const r=this.gltf.images.length;return this.gltf.images.push(s),this._imageMap.set(e,r),r}_addSampler(e){this.gltf.samplers||(this.gltf.samplers=[]);let t=10497,s=10497;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=33071,s=33071;break;case"mirror":t=33648,s=33648}else{switch(e.wrap.vertical){case"clamp":s=33071;break;case"mirror":s=33648}switch(e.wrap.horizontal){case"clamp":t=33071;break;case"mirror":t=33648}}const r={wrapS:t,wrapT:s};for(let o=0;o<this.gltf.samplers.length;++o)if(JSON.stringify(r)===JSON.stringify(this.gltf.samplers[o]))return o;const i=this.gltf.samplers.length;return this.gltf.samplers.push(r),i}_addAccessor(e,t){this.gltf.accessors||(this.gltf.accessors=[]);const s={bufferView:e,byteOffset:t.byteOffset,componentType:t.componentType,count:t.count,type:t.type,min:t.min,max:t.max,name:t.name};t.normalized&&(s.normalized=!0);const r=this.gltf.accessors.length;return this.gltf.accessors.push(s),r}_addMeshVertexIndexed(e,t,s,r,i,o,a,n){const l=new Map;for(const c of t){if(e.startAccessor("INDICES"),c.faces)for(let s=0;s<c.faces.length;++s)e.push(c.faces[s]);const t=e.endAccessor(),u={attributes:{POSITION:r},indices:this._addAccessor(e.index,t),material:this._addMaterial(c.material)};i&&"flat"!==c.shading&&(u.attributes.NORMAL=i),o&&(u.attributes.TEXCOORD_0=o),a&&"flat"!==c.shading&&(u.attributes.TANGENT=a),n&&(u.attributes.COLOR_0=n);const h=l.get(c.name);if(h)h.primitives.push(u);else{const e={name:c.name,primitives:[u]};l.set(c.name,e),s.push(e)}}}_addMeshVertexNonIndexed(e,t,s,r,i,o,a){const n={primitives:[]};t.push(n);const l={attributes:{POSITION:s}};r&&(l.attributes.NORMAL=r),i&&(l.attributes.TEXCOORD_0=i),o&&(l.attributes.TANGENT=o),a&&(l.attributes.COLOR_0=a),e&&(l.material=this._addMaterial(e[0].material)),n.primitives.push(l)}}function M({position:e,normal:t,tangent:s}){A(e,3),A(t,3),A(s,4)}function A(e,t){if(null!=e)for(let s=1,r=2;s<e.length;s+=t,r+=t){const t=e[s],i=e[r];e[s]=i,e[r]=-t}}function w(t){return t**e}export{_ as GLTF};
5
+ import{colorGamma as e}from"../../../../../colorUtils.js";import t from"../../../../../core/Logger.js";import{getOrCreateMapValue as s}from"../../../../../core/MapUtils.js";import{deg2rad as r}from"../../../../../core/mathUtils.js";import{exactEquals as i}from"../../../../../core/libs/gl-matrix-2/math/quat.js";import{clone as o,IDENTITY as a}from"../../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{q as n}from"../../../../../chunks/vec32.js";import{clone as l,ZEROS as c,ONES as u}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import h from"../../../MeshMaterialMetallicRoughness.js";import{convertVertexSpace as f}from"../../vertexSpaceConversion.js";import{Buffer as m}from"./buffer.js";import{smoothNormals as p}from"./geometry.js";import{imageToArrayBuffer as d,imageToDataURI as g}from"./imageutils.js";import{isEncodedMeshTexture as x}from"../../../../../views/3d/glTF/internal/resourceUtils.js";import{DataType as T}from"../../../../../views/webgl/enums.js";const b=()=>t.getLogger("esri.geometry.support.meshUtils.exporters.gltf.gltf");class _{constructor(e,t){this.options=t,this._materialMap=new Array,this._imageMap=new Map,this._textureMap=new Map,this.gltf={asset:{version:"2.0",copyright:e.copyright,generator:e.generator},extras:{output:t.output,binChunkBuffer:null,promises:[]}},this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras,s=2===t.output.buffer||2===t.output.image;s&&(t.binChunkBuffer=new m(this.gltf)),e.forEachScene(e=>{this._addScene(e)}),s&&t.binChunkBuffer.finalize()}_addScene(e){this.gltf.scenes||(this.gltf.scenes=[]);const t={};e.name&&(t.name=e.name),e.forEachNode(e=>{t.nodes||(t.nodes=[]),t.nodes.push(...this._addNodes(e))}),this.gltf.scenes.push(t)}_addNodes(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;n(s,c)||(t.translation=l(s));const r=e.rotation;i(r,a)||(t.rotation=o(r));const h=e.scale;n(h,u)||(t.scale=l(h));const f=this.gltf.nodes.length;if(this.gltf.nodes.push(t),e.mesh&&e.mesh.vertexAttributes.position){const s=this._createMeshes(e.mesh),r=[f];if(1===s.length)this._addMesh(t,s[0]);else for(const e of s){const t={};this._addMesh(t,e),r.push(this.gltf.nodes.length),this.gltf.nodes.push(t)}return r}return e.forEachNode(e=>{t.children||(t.children=[]),t.children.push(...this._addNodes(e))}),[f]}_addMesh(e,t){this.gltf.meshes??=[];const s=this.gltf.meshes.length;this.gltf.meshes.push(t),e.mesh=s}_createMeshes(e){const t=this.gltf.extras,s=2===t.output.buffer;let r;r=s?t.binChunkBuffer:new m(this.gltf);const i=this.options.origin,o=e.vertexSpace.clone();o.origin=[i.x,i.y,i.z??0];const a=f({vertexAttributes:e.vertexAttributes,vertexSpace:e.vertexSpace,transform:this.options?.ignoreLocalTransform?null:e.transform,spatialReference:e.spatialReference},o,{targetUnit:this.options.unitConversionDisabled?void 0:"meters"});if(!a)return[];p(e,a),M(a);const{position:n,normal:l,tangent:c}=a,{uv:u,color:h}=e.vertexAttributes,d=r.addBufferView(T.FLOAT,"VEC3",34962);let g,x,b,_;l&&(g=r.addBufferView(T.FLOAT,"VEC3",34962)),u&&(x=r.addBufferView(T.FLOAT,"VEC2",34962)),c&&(b=r.addBufferView(T.FLOAT,"VEC4",34962)),h&&(_=r.addBufferView(T.FLOAT,"VEC4",34962)),d.startAccessor("POSITION"),g&&g.startAccessor("NORMAL"),x&&x.startAccessor("TEXCOORD_0"),b&&b.startAccessor("TANGENT"),_&&_.startAccessor("COLOR_0");const A=a.position.length/3;for(let f=0;f<A;++f)d.push(n[3*f]),d.push(n[3*f+1]),d.push(n[3*f+2]),g&&null!=l&&(g.push(l[3*f]),g.push(l[3*f+1]),g.push(l[3*f+2])),x&&null!=u&&(x.push(u[2*f]),x.push(u[2*f+1])),b&&null!=c&&(b.push(c[4*f]),b.push(c[4*f+1]),b.push(c[4*f+2]),b.push(c[4*f+3])),_&&null!=h&&(_.push(w(h[4*f]/255)),_.push(w(h[4*f+1]/255)),_.push(w(h[4*f+2]/255)),_.push(h[4*f+3]/255));const O=d.endAccessor(),v=this._addAccessor(d.index,O);let R,N,C,S,I;if(g){const e=g.endAccessor();R=this._addAccessor(g.index,e)}if(x){const e=x.endAccessor();N=this._addAccessor(x.index,e)}if(b){const e=b.endAccessor();C=this._addAccessor(b.index,e)}if(_){const e=_.endAccessor();S=this._addAccessor(_.index,e)}const y=[];return e.components&&e.components.length>0&&e.components[0].faces?(I=r.addBufferView(T.UNSIGNED_INT,"SCALAR",34963),this._addMeshVertexIndexed(I,e.components,y,v,R,N,C,S)):this._addMeshVertexNonIndexed(e.components,y,v,R,N,C,S),d.finalize(),g?.finalize(),x?.finalize(),b?.finalize(),I?.finalize(),_?.finalize(),s||r.finalize(),y}_addMaterial(e){if(null==e)return;const t=this._materialMap.indexOf(e);if(-1!==t)return t;this.gltf.materials||(this.gltf.materials=[]);const s={};switch(e.alphaMode){case"mask":s.alphaMode="MASK";break;case"auto":case"blend":s.alphaMode="BLEND"}s.alphaCutoff=e.alphaCutoff,e.doubleSided&&(s.doubleSided=e.doubleSided),s.pbrMetallicRoughness={};const r=e=>{const t=e.toRgba();return t[0]=w(t[0]/255),t[1]=w(t[1]/255),t[2]=w(t[2]/255),t};if(null!=e.color&&(s.pbrMetallicRoughness.baseColorFactor=r(e.color)),null!=e.colorTexture&&(s.pbrMetallicRoughness.baseColorTexture=this._createTextureInfo(e.colorTexture,e.colorTextureTransform)),null!=e.normalTexture&&(s.normalTexture=this._createTextureInfo(e.normalTexture,e.normalTextureTransform)),e instanceof h){if(null!=e.emissiveTexture&&(s.emissiveTexture=this._createTextureInfo(e.emissiveTexture,e.emissiveTextureTransform)),null!=e.emissiveColor){const t=r(e.emissiveColor);s.emissiveFactor=[t[0],t[1],t[2]]}null!=e.occlusionTexture&&(s.occlusionTexture=this._createTextureInfo(e.occlusionTexture,e.occlusionTextureTransform)),null!=e.metallicRoughnessTexture&&(s.pbrMetallicRoughness.metallicRoughnessTexture=this._createTextureInfo(e.metallicRoughnessTexture,e.metallicRoughnessTextureTransform)),s.pbrMetallicRoughness.metallicFactor=e.metallic,s.pbrMetallicRoughness.roughnessFactor=e.roughness}else s.pbrMetallicRoughness.metallicFactor=1,s.pbrMetallicRoughness.roughnessFactor=1,b().warnOnce("Meshes exported to GLTF without MeshMaterialMetallicRoughness material will appear different when imported back.");const i=this.gltf.materials.length;return this.gltf.materials.push(s),this._materialMap.push(e),i}_createTextureInfo(e,t){const s={index:this._addTexture(e)};return t?(s.extensions||(s.extensions={}),s.extensions.KHR_texture_transform={scale:t.scale,offset:t.offset,rotation:r(t.rotation)},s):s}_addTexture(e){const t=this.gltf.textures??[];return this.gltf.textures=t,s(this._textureMap,e,()=>{const s={sampler:this._addSampler(e),source:this._addImage(e)},r=t.length;return t.push(s),r})}_addImage(e){const t=this._imageMap.get(e);if(null!=t)return t;this.gltf.images||(this.gltf.images=[]);const s={};if(e.url)s.uri=e.url;else{const t=e.data;s.extras=t;for(let e=0;e<this.gltf.images.length;++e)if(t===this.gltf.images[e].extras)return e;const r=this.gltf.extras;switch(r.output.image){case 2:{const e=r.binChunkBuffer.addBufferView(T.UNSIGNED_BYTE,"SCALAR");if(x(t))null!=t.data&&e.writeOutToBuffer(t.data.buffer,0);else{const i=d(t,this.options.signal).then(({data:e,type:t})=>(s.mimeType=t,e));r.promises.push(e.writeAsync(i).then(()=>e.finalize()))}s.bufferView=e.index;break}case 1:if(x(t)){b().warnOnce("Image export for basis compressed textures not available.");break}s.uri=g(t);break;default:if(x(t)){b().warnOnce("Image export for basis compressed textures not available.");break}r.promises.push(d(t,this.options.signal).then(({data:e,type:t})=>{s.uri=e,s.mimeType=t}))}}const r=this.gltf.images.length;return this.gltf.images.push(s),this._imageMap.set(e,r),r}_addSampler(e){this.gltf.samplers||(this.gltf.samplers=[]);let t=10497,s=10497;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=33071,s=33071;break;case"mirror":t=33648,s=33648}else{switch(e.wrap.vertical){case"clamp":s=33071;break;case"mirror":s=33648}switch(e.wrap.horizontal){case"clamp":t=33071;break;case"mirror":t=33648}}const r={wrapS:t,wrapT:s};for(let o=0;o<this.gltf.samplers.length;++o)if(JSON.stringify(r)===JSON.stringify(this.gltf.samplers[o]))return o;const i=this.gltf.samplers.length;return this.gltf.samplers.push(r),i}_addAccessor(e,t){this.gltf.accessors||(this.gltf.accessors=[]);const s={bufferView:e,byteOffset:t.byteOffset,componentType:t.componentType,count:t.count,type:t.type,min:t.min,max:t.max,name:t.name};t.normalized&&(s.normalized=!0);const r=this.gltf.accessors.length;return this.gltf.accessors.push(s),r}_addMeshVertexIndexed(e,t,s,r,i,o,a,n){const l=new Map;for(const c of t){if(e.startAccessor("INDICES"),c.faces)for(let s=0;s<c.faces.length;++s)e.push(c.faces[s]);const t=e.endAccessor(),u={attributes:{POSITION:r},indices:this._addAccessor(e.index,t),material:this._addMaterial(c.material)};i&&"flat"!==c.shading&&(u.attributes.NORMAL=i),o&&(u.attributes.TEXCOORD_0=o),a&&"flat"!==c.shading&&(u.attributes.TANGENT=a),n&&(u.attributes.COLOR_0=n);const h=l.get(c.name);if(h)h.primitives.push(u);else{const e={name:c.name,primitives:[u]};l.set(c.name,e),s.push(e)}}}_addMeshVertexNonIndexed(e,t,s,r,i,o,a){const n={primitives:[]};t.push(n);const l={attributes:{POSITION:s}};r&&(l.attributes.NORMAL=r),i&&(l.attributes.TEXCOORD_0=i),o&&(l.attributes.TANGENT=o),a&&(l.attributes.COLOR_0=a),e&&(l.material=this._addMaterial(e[0].material)),n.primitives.push(l)}}function M({position:e,normal:t,tangent:s}){A(e,3),A(t,3),A(s,4)}function A(e,t){if(null!=e)for(let s=1,r=2;s<e.length;s+=t,r+=t){const t=e[s],i=e[r];e[s]=i,e[r]=-t}}function w(t){return t**e}export{_ as GLTF};
@@ -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"../../../Color.js";import{colorGamma as t}from"../../../colorUtils.js";import r from"../../../request.js";import o from"../../../core/Error.js";import{getOrCreateMapValue as n}from"../../../core/MapUtils.js";import{rad2deg as s,hasScaling as a}from"../../../core/mathUtils.js";import{normalFromMat4 as i,fromMat4 as l}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as c}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{fromValues as u}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as f}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import m from"../MeshComponent.js";import p from"../MeshMaterialMetallicRoughness.js";import d from"../MeshTexture.js";import x from"../MeshTextureTransform.js";import{MeshVertexAttributes as g}from"../MeshVertexAttributes.js";import{selectVertexSpace as h}from"../meshVertexSpaceUtils.js";import{BufferViewVec4f as T,BufferViewVec4u8 as v,BufferViewVec4u16 as j,BufferViewVec3u8 as w,BufferViewVec3f as b,BufferViewVec3u16 as y,BufferViewVec2f as C,BufferViewVec3f64 as M}from"../buffer/BufferView.js";import{d as B,c as F,e as R,l as $}from"../../../chunks/vec3.js";import{a as A,n as S,l as U}from"../../../chunks/vec4.js";import{createBuffer as k}from"../buffer/utils.js";import{convertVertexSpace as V}from"./vertexSpaceConversion.js";import{DefaultLoadingContext as E}from"../../../views/3d/glTF/DefaultLoadingContext.js";import{loadGLTF as q}from"../../../views/3d/glTF/loader.js";import{convertPrimitiveToTriangles as D}from"../../../views/3d/glTF/internal/indexUtils.js";import{isEncodedMeshTexture as I}from"../../../views/3d/glTF/internal/resourceUtils.js";import{f as L}from"../../../chunks/vec33.js";import{f as z}from"../../../chunks/vec43.js";import{n as N,f as O}from"../../../chunks/vec2.js";async function G(e,t,r){const n=new E(K(r)),s=await q(n,t,r,!0),a=s.model,i=a.lods.shift(),l=new Map,c=new Map;a.textures.forEach((e,t)=>l.set(t,J(e))),a.materials.forEach((e,t)=>c.set(t,W(e,l)));const u=H(i);for(const o of u.parts)X(u,o,c);const{position:f,normal:m,tangent:p,color:d,texCoord0:x}=u.vertexAttributes,T=h(e,r),v=e.spatialReference.isGeographic?h(e):T,j=V({vertexAttributes:{position:f.typedBuffer,normal:m?.typedBuffer,tangent:p?.typedBuffer},vertexSpace:v,spatialReference:e.spatialReference},T,{allowBufferReuse:!0,sourceUnit:r?.unitConversionDisabled?void 0:"meters"});if(!j)throw new o("load-gltf-mesh:vertex-space-projection",`Failed to load mesh from glTF because we could not convert the vertex space from ${v.type} to ${T.type}`);return{mesh:{transform:null,vertexSpace:T,components:u.components,spatialReference:e.spatialReference,vertexAttributes:new g({...j,color:d?.typedBuffer,uv:x?.typedBuffer})},meta:s.meta}}function K(e){const t=e?.resolveFile;return t?{busy:!1,request:async(e,o,n)=>{const s=t?.(e)??e,a=2===o?"image":1===o||3===o?"array-buffer":"json";return(await r(s,{responseType:a,signal:n?.signal,timeout:0})).data}}:null}function P(e,t){if(null==e)return"-";const r=e.typedBuffer;return`${n(t,r.buffer,()=>t.size)}/${r.byteOffset}/${r.byteLength}`}function Q(e){return null!=e?e.toString():"-"}function H(e){let t=0;const has={color:!1,tangent:!1,normal:!1,texCoord0:!1},r=new Map,o=new Map,s=[];for(const a of e.parts){const{position:e,normal:i,color:l,tangent:c,texCoord0:u}=a.attributes,f=`\n ${P(e,r)}/\n ${P(i,r)}/\n ${P(l,r)}/\n ${P(c,r)}/\n ${P(u,r)}/\n ${Q(a.transform)}\n `;let m=!1;const p=n(o,f,()=>(m=!0,{start:t,length:e.count}));m&&(t+=e.count),i&&(has.normal=!0),l&&(has.color=!0),c&&(has.tangent=!0),u&&(has.texCoord0=!0),s.push({gltf:a,writeVertices:m,region:p})}return{vertexAttributes:{position:k(M,t),normal:has.normal?k(b,t):null,tangent:has.tangent?k(T,t):null,color:has.color?k(v,t):null,texCoord0:has.texCoord0?k(C,t):null},parts:s,components:[]}}function J(e){return new d({data:(I(e.data),e.data),wrap:_(e.parameters.wrap)})}function W(t,r){const o=new e(re(t.color,t.opacity)),n=t.emissiveFactor?new e(oe(t.emissiveFactor)):null,a=e=>e?new x({scale:e.scale?[e.scale[0],e.scale[1]]:[1,1],rotation:s(e.rotation??0),offset:e.offset?[e.offset[0],e.offset[1]]:[0,0]}):null;return new p({color:o,colorTexture:r.get(t.colorTexture),normalTexture:r.get(t.normalTexture),emissiveColor:n,emissiveTexture:r.get(t.emissiveTexture),occlusionTexture:r.get(t.occlusionTexture),alphaMode:Z(t.alphaMode),alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,metallic:t.metallicFactor,roughness:t.roughnessFactor,metallicRoughnessTexture:r.get(t.metallicRoughnessTexture),colorTextureTransform:a(t.colorTextureTransform),normalTextureTransform:a(t.normalTextureTransform),occlusionTextureTransform:a(t.occlusionTextureTransform),emissiveTextureTransform:a(t.emissiveTextureTransform),metallicRoughnessTextureTransform:a(t.metallicRoughnessTextureTransform)})}function X(e,t,r){t.writeVertices&&Y(e,t);const{indices:o,attributes:n,primitiveType:s,material:a}=t.gltf;let i=D(o||n.position.count,s);const l=t.region.start;if(l){const e=new Uint32Array(i);for(let t=0;t<i.length;t++)e[t]+=l;i=e}e.components.push(new m({name:t.gltf.name,faces:i,material:r.get(a),shading:n.normal?"source":"flat",trustSourceNormals:!0}))}function Y(e,t){const{position:r,normal:o,tangent:n,color:s,texCoord0:u}=e.vertexAttributes,f=t.region.start,{attributes:m,transform:p}=t.gltf,d=m.position.count;if(B(r.slice(f,d),m.position,p),null!=m.normal&&null!=o){const e=i(c(),p),t=o.slice(f,d);F(t,m.normal,e),a(e)&&R(t,t)}else null!=o&&L(o,0,0,1,{dstIndex:f,count:d});if(null!=m.tangent&&null!=n){const e=l(c(),p),t=n.slice(f,d);A(t,m.tangent,e),a(e)&&S(t,t)}else null!=n&&z(n,0,0,1,1,{dstIndex:f,count:d});if(null!=m.texCoord0&&null!=u?N(u.slice(f,d),m.texCoord0):null!=u&&O(u,0,0,{dstIndex:f,count:d}),null!=m.color&&null!=s){const e=m.color,t=s.slice(f,d);if(4===e.elementCount)e instanceof T?U(t,e,1,255):(e instanceof v||e instanceof j)&&U(t,e,1/255,255);else{z(t,255,255,255,255);const r=w.fromTypedArray(t.typedBuffer,t.typedBufferStride);e instanceof b?$(r,e,1,255):(e instanceof w||e instanceof y)&&$(r,e,1/255,255)}}else null!=s&&z(s.slice(f,d),255,255,255,255)}function Z(e){switch(e){case"OPAQUE":return"opaque";case"MASK":return"mask";case"BLEND":return"blend"}}function _(e){return{horizontal:ee(e.s),vertical:ee(e.t)}}function ee(e){switch(e){case 33071:return"clamp";case 33648:return"mirror";case 10497:return"repeat"}}function te(e){return e**(1/t)*255}function re(e,t){return f(te(e[0]),te(e[1]),te(e[2]),t)}function oe(e){return u(te(e[0]),te(e[1]),te(e[2]))}export{G as loadGLTFMesh};
5
+ import e from"../../../Color.js";import{colorGamma as t}from"../../../colorUtils.js";import r from"../../../core/Error.js";import{getOrCreateMapValue as o}from"../../../core/MapUtils.js";import{rad2deg as n,hasScaling as s}from"../../../core/mathUtils.js";import{normalFromMat4 as i,fromMat4 as a}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as l}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{fromValues as c}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as f}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import u from"../MeshComponent.js";import m from"../MeshMaterialMetallicRoughness.js";import p from"../MeshTexture.js";import d from"../MeshTextureTransform.js";import{MeshVertexAttributes as x}from"../MeshVertexAttributes.js";import{selectVertexSpace as g}from"../meshVertexSpaceUtils.js";import{BufferViewVec4f as h,BufferViewVec4u8 as T,BufferViewVec4u16 as v,BufferViewVec3u8 as w,BufferViewVec3f as j,BufferViewVec3u16 as b,BufferViewVec2f as y,BufferViewVec3f64 as C}from"../buffer/BufferView.js";import{d as M,c as B,e as F,l as R}from"../../../chunks/vec3.js";import{a as $,n as A,l as S}from"../../../chunks/vec4.js";import{createBuffer as U}from"../buffer/utils.js";import{convertVertexSpace as k}from"./vertexSpaceConversion.js";import{DefaultLoadingContext as V}from"../../../views/3d/glTF/DefaultLoadingContext.js";import{loadGLTF as E}from"../../../views/3d/glTF/loader.js";import{convertPrimitiveToTriangles as D}from"../../../views/3d/glTF/internal/indexUtils.js";import{isEncodedMeshTexture as I}from"../../../views/3d/glTF/internal/resourceUtils.js";import{f as L}from"../../../chunks/vec33.js";import{f as z}from"../../../chunks/vec43.js";import{n as N,f as O}from"../../../chunks/vec2.js";async function q(e,t,o){const n=new V(o?.resolveFile),s=await E(n,t,o,!0),i=s.model,a=i.lods.shift(),l=new Map,c=new Map;i.textures.forEach((e,t)=>l.set(t,Q(e))),i.materials.forEach((e,t)=>c.set(t,H(e,l)));const f=P(a);for(const r of f.parts)J(f,r,c);const{position:u,normal:m,tangent:p,color:d,texCoord0:h}=f.vertexAttributes,T=g(e,o),v=e.spatialReference.isGeographic?g(e):T,w=k({vertexAttributes:{position:u.typedBuffer,normal:m?.typedBuffer,tangent:p?.typedBuffer},vertexSpace:v,spatialReference:e.spatialReference},T,{allowBufferReuse:!0,sourceUnit:o?.unitConversionDisabled?void 0:"meters"});if(!w)throw new r("load-gltf-mesh:vertex-space-projection",`Failed to load mesh from glTF because we could not convert the vertex space from ${v.type} to ${T.type}`);return{mesh:{transform:null,vertexSpace:T,components:f.components,spatialReference:e.spatialReference,vertexAttributes:new x({...w,color:d?.typedBuffer,uv:h?.typedBuffer})},meta:s.meta}}function G(e,t){if(null==e)return"-";const r=e.typedBuffer;return`${o(t,r.buffer,()=>t.size)}/${r.byteOffset}/${r.byteLength}`}function K(e){return null!=e?e.toString():"-"}function P(e){let t=0;const has={color:!1,tangent:!1,normal:!1,texCoord0:!1},r=new Map,n=new Map,s=[];for(const i of e.parts){const{position:e,normal:a,color:l,tangent:c,texCoord0:f}=i.attributes,u=`\n ${G(e,r)}/\n ${G(a,r)}/\n ${G(l,r)}/\n ${G(c,r)}/\n ${G(f,r)}/\n ${K(i.transform)}\n `;let m=!1;const p=o(n,u,()=>(m=!0,{start:t,length:e.count}));m&&(t+=e.count),a&&(has.normal=!0),l&&(has.color=!0),c&&(has.tangent=!0),f&&(has.texCoord0=!0),s.push({gltf:i,writeVertices:m,region:p})}return{vertexAttributes:{position:U(C,t),normal:has.normal?U(j,t):null,tangent:has.tangent?U(h,t):null,color:has.color?U(T,t):null,texCoord0:has.texCoord0?U(y,t):null},parts:s,components:[]}}function Q(e){return new p({data:(I(e.data),e.data),wrap:Y(e.parameters.wrap)})}function H(t,r){const o=new e(ee(t.color,t.opacity)),s=t.emissiveFactor?new e(te(t.emissiveFactor)):null,i=e=>e?new d({scale:e.scale?[e.scale[0],e.scale[1]]:[1,1],rotation:n(e.rotation??0),offset:e.offset?[e.offset[0],e.offset[1]]:[0,0]}):null;return new m({color:o,colorTexture:r.get(t.colorTexture),normalTexture:r.get(t.normalTexture),emissiveColor:s,emissiveTexture:r.get(t.emissiveTexture),occlusionTexture:r.get(t.occlusionTexture),alphaMode:X(t.alphaMode),alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,metallic:t.metallicFactor,roughness:t.roughnessFactor,metallicRoughnessTexture:r.get(t.metallicRoughnessTexture),colorTextureTransform:i(t.colorTextureTransform),normalTextureTransform:i(t.normalTextureTransform),occlusionTextureTransform:i(t.occlusionTextureTransform),emissiveTextureTransform:i(t.emissiveTextureTransform),metallicRoughnessTextureTransform:i(t.metallicRoughnessTextureTransform)})}function J(e,t,r){t.writeVertices&&W(e,t);const{indices:o,attributes:n,primitiveType:s,material:i}=t.gltf;let a=D(o||n.position.count,s);const l=t.region.start;if(l){const e=new Uint32Array(a);for(let t=0;t<a.length;t++)e[t]+=l;a=e}e.components.push(new u({name:t.gltf.name,faces:a,material:r.get(i),shading:n.normal?"source":"flat",trustSourceNormals:!0}))}function W(e,t){const{position:r,normal:o,tangent:n,color:c,texCoord0:f}=e.vertexAttributes,u=t.region.start,{attributes:m,transform:p}=t.gltf,d=m.position.count;if(M(r.slice(u,d),m.position,p),null!=m.normal&&null!=o){const e=i(l(),p),t=o.slice(u,d);B(t,m.normal,e),s(e)&&F(t,t)}else null!=o&&L(o,0,0,1,{dstIndex:u,count:d});if(null!=m.tangent&&null!=n){const e=a(l(),p),t=n.slice(u,d);$(t,m.tangent,e),s(e)&&A(t,t)}else null!=n&&z(n,0,0,1,1,{dstIndex:u,count:d});if(null!=m.texCoord0&&null!=f?N(f.slice(u,d),m.texCoord0):null!=f&&O(f,0,0,{dstIndex:u,count:d}),null!=m.color&&null!=c){const e=m.color,t=c.slice(u,d);if(4===e.elementCount)e instanceof h?S(t,e,1,255):(e instanceof T||e instanceof v)&&S(t,e,1/255,255);else{z(t,255,255,255,255);const r=w.fromTypedArray(t.typedBuffer,t.typedBufferStride);e instanceof j?R(r,e,1,255):(e instanceof w||e instanceof b)&&R(r,e,1/255,255)}}else null!=c&&z(c.slice(u,d),255,255,255,255)}function X(e){switch(e){case"OPAQUE":return"opaque";case"MASK":return"mask";case"BLEND":return"blend"}}function Y(e){return{horizontal:Z(e.s),vertical:Z(e.t)}}function Z(e){switch(e){case 33071:return"clamp";case 33648:return"mirror";case 10497:return"repeat"}}function _(e){return e**(1/t)*255}function ee(e,t){return f(_(e[0]),_(e[1]),_(e[2]),t)}function te(e){return c(_(e[0]),_(e[1]),_(e[2]))}export{q as loadGLTFMesh};
@@ -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 t from"../../../core/Logger.js";import{fromMat4 as e}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{fromRotationTranslationScaleOrigin as o,multiply as i,getScale as n,scale as s,getTranslation as a,fromRotation as l}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{setAxisAngle as m}from"../../../core/libs/gl-matrix-2/math/quat.js";import{create as f}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{j as p,r as g,o as u,t as x}from"../../../chunks/vec32.js";import{create as j,ZEROS as v,ONES as b}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import A from"../../Point.js";import{getSphericalPCPF as h}from"../../spatialReferenceEllipsoidUtils.js";import{computeTranslationToOriginAndRotation as R}from"../../projection/computeTranslationToOriginAndRotation.js";import{projectPointToVector as d}from"../../projection/projectPointToVector.js";import{angleRad as y,axis as w,fromMatrix as F,create as S}from"../axisAngleDegrees.js";import T from"../MeshTransform.js";import{isMeshWithRelativeVertexSpace as U}from"../meshVertexSpaceUtils.js";import{performGlobalOperation as q}from"./geographicUtils.js";import{logProjectionError as C,loadProjectErrorMessage as k,projectToPCPF as z,projectNormalToPCPF as L,projectTangentToPCPF as M,projectFromPCPF as P,projectNormalFromPCPF as V,projectTangentFromPCPF as D}from"./projection.js";import{projectPointToVertexSpace as E}from"./vertexSpaceConversion.js";const O=()=>t.getLogger("esri.geometry.support.meshUtils.rotate");function B(t,e,r){if(!t.vertexAttributes?.position||0===e[3])return;const{spatialReference:o,vertexSpace:i}=t,n=r?.origin??t.origin,s=r?.geographic,a=q(O,i,o,s);U(t)?G(t,e,n):a?H(t,e,n):I(t,e,n)}function G(t,e,r){t.transform??=new T;const{vertexSpace:l,transform:c,spatialReference:f}=t,[u,x,h]=l.origin,R=new A({x:u,y:x,z:h,spatialReference:f}),d=K;if(R.equals(r))p(d,0,0,0);else if(!E(d,r,t))return void C(O(),r.spatialReference,f,k);m(Z,w(e),y(e));const S=o(N,Z,v,b,d),{localMatrix:U}=c,q=i(N,S,U);c.scale=n(j(),q),s(q,q,g(K,c.scale));const z=c.rotationAxis;c.rotation=F(q),0===c.rotationAngle&&(c.rotationAxis=z),c.translation=a(j(),q)}function H(t,r,o){const i=t.spatialReference,n=h(i),s=Y;if(!d(o,s,n)&&(C(O(),o.spatialReference,n,"Falling back to mesh origin"),!d(t.origin,s,n)))return void C(O(),t.origin.spatialReference,n);const a=t.vertexAttributes.position,l=t.vertexAttributes.normal,c=t.vertexAttributes.tangent,m=new Float64Array(a.length),f=null!=l?new Float32Array(l.length):null,p=null!=c?new Float32Array(c.length):null;R(n,s,W,n),e(X,W);const g=Q;u(w(Q),w(r),X),g[3]=r[3],z(a,i,m,n)&&(null==l||null==f||L(l,a,i,m,n,f))&&(null==c||null==p||M(c,a,i,m,n,p))?(J(m,g,3,s),P(m,n,a,i)&&(null==l||null==f||(J(f,g,3),V(f,a,i,m,n,l)))&&(null==c||null==p||(J(p,g,4),D(p,a,i,m,n,c)))?t.vertexAttributesChanged():C(O(),n,i)):C(O(),i,n)}function I(t,e,r){const o=Y;if(!d(r,o,t.spatialReference)){const e=t.origin;return o[0]=e.x,o[1]=e.y,o[2]=e.z,void C(O(),r.spatialReference,t.spatialReference,k)}J(t.vertexAttributes.position,e,3,o),J(t.vertexAttributes.normal,e,3),J(t.vertexAttributes.tangent,e,4),t.vertexAttributesChanged()}function J(t,e,r,o=v){if(null!=t){l(W,y(e),w(e));for(let e=0;e<t.length;e+=r){for(let r=0;r<3;r++)K[r]=t[e+r]-o[r];x(K,K,W);for(let r=0;r<3;r++)t[e+r]=K[r]+o[r]}}}const K=j(),N=c(),Q=S(),W=c(),X=r(),Y=j(),Z=f();export{B as rotate};
5
+ import t from"../../../core/Logger.js";import{fromMat4 as e}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{fromRotationTranslationScaleOrigin as o,multiply as i,getScale as n,scale as s,getTranslation as a,fromRotation as l}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{setAxisAngle as m}from"../../../core/libs/gl-matrix-2/math/quat.js";import{create as f}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{j as p,r as g,o as u,t as x}from"../../../chunks/vec32.js";import{create as j,ZEROS as v,ONES as b}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import A from"../../Point.js";import{getSphericalPCPF as h}from"../../spatialReferenceEllipsoidUtils.js";import{computeTranslationToOriginAndRotation as R}from"../../projection/computeTranslationToOriginAndRotation.js";import{projectPointToVector as d}from"../../projection/projectPointToVector.js";import{angleRad as y,axis as w,fromMatrix as F,create as S}from"../axisAngleDegrees.js";import T from"../MeshTransform.js";import{isMeshWithRelativeVertexSpace as U}from"../meshVertexSpaceUtils.js";import{performGlobalOperation as q}from"./geographicUtils.js";import{logProjectionError as C,projectToPCPF as k,projectNormalToPCPF as z,projectTangentToPCPF as L,projectFromPCPF as M,projectNormalFromPCPF as P,projectTangentFromPCPF as V,loadProjectErrorMessage as D}from"./projection.js";import{projectPointToVertexSpace as E}from"./vertexSpaceConversion.js";const O=()=>t.getLogger("esri.geometry.support.meshUtils.rotate");function B(t,e,r){if(!t.vertexAttributes?.position||0===e[3])return;const{spatialReference:o,vertexSpace:i}=t,n=r?.origin??t.origin,s=r?.geographic,a=q(O,i,o,s);U(t)?G(t,e,n):a?H(t,e,n):I(t,e,n)}function G(t,e,r){t.transform??=new T;const{vertexSpace:l,transform:c,spatialReference:f}=t,[u,x,h]=l.origin,R=new A({x:u,y:x,z:h,spatialReference:f}),d=K;if(R.equals(r))p(d,0,0,0);else if(!E(d,r,t))return void C(O(),r.spatialReference,f,D);m(Z,w(e),y(e));const S=o(N,Z,v,b,d),{localMatrix:U}=c,q=i(N,S,U);c.scale=n(j(),q),s(q,q,g(K,c.scale));const k=c.rotationAxis;c.rotation=F(q),0===c.rotationAngle&&(c.rotationAxis=k),c.translation=a(j(),q)}function H(t,r,o){const i=t.spatialReference,n=h(i),s=Y;if(!d(o,s,n)&&(C(O(),o.spatialReference,n,"Falling back to mesh origin"),!d(t.origin,s,n)))return void C(O(),t.origin.spatialReference,n);const a=t.vertexAttributes.position,l=t.vertexAttributes.normal,c=t.vertexAttributes.tangent,m=new Float64Array(a.length),f=null!=l?new Float32Array(l.length):null,p=null!=c?new Float32Array(c.length):null;R(n,s,W,n),e(X,W);const g=Q;u(w(Q),w(r),X),g[3]=r[3],k(a,i,m,n)&&(null==l||null==f||z(l,a,i,m,n,f))&&(null==c||null==p||L(c,a,i,m,n,p))?(J(m,g,3,s),M(m,n,a,i)&&(null==l||null==f||(J(f,g,3),P(f,a,i,m,n,l)))&&(null==c||null==p||(J(p,g,4),V(p,a,i,m,n,c)))?t.vertexAttributesChanged():C(O(),n,i)):C(O(),i,n)}function I(t,e,r){const o=Y;if(!d(r,o,t.spatialReference)){const e=t.origin;return o[0]=e.x,o[1]=e.y,o[2]=e.z,void C(O(),r.spatialReference,t.spatialReference,D)}J(t.vertexAttributes.position,e,3,o),J(t.vertexAttributes.normal,e,3),J(t.vertexAttributes.tangent,e,4),t.vertexAttributesChanged()}function J(t,e,r,o=v){if(null!=t){l(W,y(e),w(e));for(let e=0;e<t.length;e+=r){for(let r=0;r<3;r++)K[r]=t[e+r]-o[r];x(K,K,W);for(let r=0;r<3;r++)t[e+r]=K[r]+o[r]}}}const K=j(),N=c(),Q=S(),W=c(),X=r(),Y=j(),Z=f();export{B as rotate};
@@ -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"../../../core/Logger.js";import{fromRotationTranslationScaleOrigin as t,multiply as r,getScale as o,scale as i,getTranslation as n}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as s}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{IDENTITY as a}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{j as l,r as c,h as f}from"../../../chunks/vec32.js";import{create as m,ZEROS as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import g from"../../Point.js";import{getSphericalPCPF as u}from"../../spatialReferenceEllipsoidUtils.js";import{projectPointToVector as x}from"../../projection/projectPointToVector.js";import{fromMatrix as j}from"../axisAngleDegrees.js";import v from"../MeshTransform.js";import{isMeshWithRelativeVertexSpace as h}from"../meshVertexSpaceUtils.js";import{performGlobalOperation as A}from"./geographicUtils.js";import{logProjectionError as b,loadProjectErrorMessage as R,projectToPCPF as d,projectNormalToPCPF as y,projectTangentToPCPF as w,projectFromPCPF as F,projectNormalFromPCPF as S,projectTangentFromPCPF as U}from"./projection.js";import{projectPointToVertexSpace as C}from"./vertexSpaceConversion.js";const k=()=>e.getLogger("esri.geometry.support.meshUtils.scale");function q(e,t,r){if(!e.vertexAttributes?.position)return;const{vertexSpace:o,spatialReference:i}=e,n=r?.origin??e.origin,s=r?.geographic,a=A(k,o,i,s);h(e)?z(e,t,n):a?L(e,t,n):M(e,t,n)}function z(e,s,f){e.transform??=new v;const{vertexSpace:u,transform:x,spatialReference:h}=e,[A,d,y]=u.origin,w=new g({x:A,y:d,z:y,spatialReference:h}),F=T;if(w.equals(f))l(F,0,0,0);else if(!C(F,f,e))return void b(k(),f.spatialReference,h,R);const S=l(V,s,s,s),U=t(D,a,p,S,F),{localMatrix:q}=x,z=r(D,U,q);x.scale=o(m(),z),i(z,z,c(T,x.scale));const L=x.rotationAxis;x.rotation=j(z),0===x.rotationAngle&&(x.rotationAxis=L),x.translation=n(m(),z)}function L(e,t,r){const o=e.spatialReference,i=u(o),n=E;if(!x(r,n,i)&&(b(k(),r.spatialReference,i,"Falling back to mesh origin"),!x(e.origin,n,i)))return void b(k(),e.origin.spatialReference,i);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),f=null!=a?new Float32Array(a.length):null,m=null!=l?new Float32Array(l.length):null;d(s,o,c,i)&&(null==a||null==f||y(a,s,o,c,i,f))&&(null==l||null==m||w(l,s,o,c,i,m))?(P(c,t,n),F(c,i,s,o)&&(null==a||null==f||S(f,s,o,c,i,a))&&(null==l||null==m||U(m,s,o,c,i,l))?e.vertexAttributesChanged():b(k(),i,o)):b(k(),o,i)}function M(e,t,r){const o=E;if(!x(r,o,e.spatialReference)){const t=e.origin;return o[0]=t.x,o[1]=t.y,o[2]=t.z,void b(k(),r.spatialReference,e.spatialReference,R)}P(e.vertexAttributes.position,t,o),e.vertexAttributesChanged()}function P(e,t,r=p){if(e)for(let o=0;o<e.length;o+=3){for(let t=0;t<3;t++)T[t]=e[o+t]-r[t];f(T,T,t);for(let t=0;t<3;t++)e[o+t]=T[t]+r[t]}}const T=m(),V=m(),D=s(),E=m();export{q as scale};
5
+ import e from"../../../core/Logger.js";import{fromRotationTranslationScaleOrigin as t,multiply as r,getScale as o,scale as i,getTranslation as n}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as s}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{IDENTITY as a}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{j as l,r as c,h as f}from"../../../chunks/vec32.js";import{ZEROS as m,create as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import g from"../../Point.js";import{getSphericalPCPF as u}from"../../spatialReferenceEllipsoidUtils.js";import{projectPointToVector as x}from"../../projection/projectPointToVector.js";import{fromMatrix as j}from"../axisAngleDegrees.js";import v from"../MeshTransform.js";import{isMeshWithRelativeVertexSpace as h}from"../meshVertexSpaceUtils.js";import{performGlobalOperation as A}from"./geographicUtils.js";import{logProjectionError as b,projectToPCPF as R,projectNormalToPCPF as d,projectTangentToPCPF as y,projectFromPCPF as w,projectNormalFromPCPF as F,projectTangentFromPCPF as S,loadProjectErrorMessage as U}from"./projection.js";import{projectPointToVertexSpace as C}from"./vertexSpaceConversion.js";const k=()=>e.getLogger("esri.geometry.support.meshUtils.scale");function q(e,t,r){if(!e.vertexAttributes?.position)return;const{vertexSpace:o,spatialReference:i}=e,n=r?.origin??e.origin,s=r?.geographic,a=A(k,o,i,s);h(e)?z(e,t,n):a?L(e,t,n):M(e,t,n)}function z(e,s,f){e.transform??=new v;const{vertexSpace:u,transform:x,spatialReference:h}=e,[A,R,d]=u.origin,y=new g({x:A,y:R,z:d,spatialReference:h}),w=T;if(y.equals(f))l(w,0,0,0);else if(!C(w,f,e))return void b(k(),f.spatialReference,h,U);const F=l(V,s,s,s),S=t(D,a,m,F,w),{localMatrix:q}=x,z=r(D,S,q);x.scale=o(p(),z),i(z,z,c(T,x.scale));const L=x.rotationAxis;x.rotation=j(z),0===x.rotationAngle&&(x.rotationAxis=L),x.translation=n(p(),z)}function L(e,t,r){const o=e.spatialReference,i=u(o),n=E;if(!x(r,n,i)&&(b(k(),r.spatialReference,i,"Falling back to mesh origin"),!x(e.origin,n,i)))return void b(k(),e.origin.spatialReference,i);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),f=null!=a?new Float32Array(a.length):null,m=null!=l?new Float32Array(l.length):null;R(s,o,c,i)&&(null==a||null==f||d(a,s,o,c,i,f))&&(null==l||null==m||y(l,s,o,c,i,m))?(P(c,t,n),w(c,i,s,o)&&(null==a||null==f||F(f,s,o,c,i,a))&&(null==l||null==m||S(m,s,o,c,i,l))?e.vertexAttributesChanged():b(k(),i,o)):b(k(),o,i)}function M(e,t,r){const o=E;if(!x(r,o,e.spatialReference)){const t=e.origin;return o[0]=t.x,o[1]=t.y,o[2]=t.z,void b(k(),r.spatialReference,e.spatialReference,U)}P(e.vertexAttributes.position,t,o),e.vertexAttributesChanged()}function P(e,t,r=m){if(e)for(let o=0;o<e.length;o+=3){for(let t=0;t<3;t++)T[t]=e[o+t]-r[t];f(T,T,t);for(let t=0;t<3;t++)e[o+t]=T[t]+r[t]}}const T=p(),V=p(),D=s(),E=p();export{q as scale};
@@ -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 t from"../../../core/Logger.js";import{floatEqualUlp as n}from"../../../core/mathUtils.js";import{getMetersPerCartesianUnitForSR as r,convertUnit as e}from"../../../core/unitUtils.js";import{normalFromMat4 as o}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{exactEquals as l,scale as a,invert as s,copy as c,multiply as u}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as f,IDENTITY as m}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{u as p,e as g,t as x}from"../../../chunks/vec32.js";import{create as h}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{WGS84ECEFSpatialReference as v,getSphericalPCPF as j}from"../../spatialReferenceEllipsoidUtils.js";import{computeTranslationToOriginAndRotation as A}from"../../projection/computeTranslationToOriginAndRotation.js";import{projectPointToVector as w}from"../../projection/projectPointToVector.js";import{isRelativeVertexSpace as y,vertexSpaceEquals as F}from"../meshVertexSpaceUtils.js";import{isEarth as b}from"../spatialReferenceUtils.js";import{a as R,t as d,b as S}from"../../../chunks/vec3.js";import{logProjectionError as U,projectToPCPF as M,projectNormalToPCPF as T,projectTangentToPCPF as k,transformNormal as B,transformTangent as E,projectFromPCPF as L,projectNormalFromPCPF as V,projectTangentFromPCPF as C}from"./projection.js";const O=()=>t.getLogger("esri.geometry.support.meshUtils.vertexSpaceConversion");function P(t,n,{vertexSpace:r,spatialReference:e}){if("georeferenced"===r.type){const o=t;if(!w(n,o,e))return!1;const{origin:i}=r;return g(t,o,i),!0}const o=j(e),i=t;if(!w(n,i,o))return!1;const{origin:l}=r,a=lt;if(!A(e,l,a,o))return!1;const c=s(lt,a);return null!=c&&(x(t,i,c),!0)}function q(t,n,r){const{vertexSpace:e,transform:o,vertexAttributes:i}=t,a=y(e)?o:null,s=Y(t.spatialReference,r,3);if(F(e,n)&&(!a||l(a.localMatrix,m))&&Z(s)){const{position:t,normal:n,tangent:e}=i,o=r?.allowBufferReuse;return{position:o?t:t.slice(),normal:o?n:n?.slice(),tangent:o?e:e?.slice()}}switch(t.vertexSpace.type){case"local":return"local"===n.type?J(t,t.vertexSpace,n.origin,r):G(t,t.vertexSpace,n.origin,r);case"georeferenced":return"local"===n.type?H(t,t.vertexSpace,n.origin,r):z(t,t.vertexSpace,n.origin,r)}}function z({vertexAttributes:t,transform:n,spatialReference:r},{origin:e},o,i){const l=Y(r,i,3),a=e||!Z(l)?c(rt,n?.localMatrix??m):null;a&&X(a,r,i,3);const{position:s,normal:u,tangent:f}=a?K(t,a):t,g=i?.allowBufferReuse,x=g?s:new Float64Array(s.length);let h=s;if(e&&(h=R(x,h,e)),o){const t=p(it,o);h=R(x,h,t)}return{position:h!==t.position||g?h:h.slice(),normal:u!==t.normal||g?u:u?.slice(),tangent:f!==t.tangent||g?f:f?.slice()}}function D(t,n){return n?.useEllipsoid&&b(t)?v:j(t)}function G({spatialReference:t,vertexAttributes:n,transform:r},{origin:e},o,i){const l=D(t,i);if(!A(t,e,rt,l))return U(O(),t,l),null;r&&u(rt,rt,r.localMatrix),X(rt,t,i,1);const a=new Float64Array(n.position.length),s=N(n.position,rt,t,a,l);if(!s)return null;const c=Q(s,t,a,l,n.normal,rt);if(n.normal&&!c)return null;const f=W(s,t,a,l,n.tangent,rt);if(n.tangent&&!f)return null;if(o){const t=p(it,o);R(s,s,t)}return{position:s,normal:c,tangent:f}}function H({vertexAttributes:t,spatialReference:n,transform:r},{origin:e},i,l){const c=D(n,l);if(!A(n,i,rt,c))return U(O(),n,c),null;const u=1/Y(n,l,2);a(rt,rt,[u,u,u]);const f=s(et,rt),{position:m,normal:p,tangent:g}=I(t,e,r),x=new Float64Array(m.length),h=$(m,n,f,x,c);if(!h)return null;const v=o(ot,f),j=_(p,m,n,x,c,v,p!==t.normal?p:void 0);if(!j&&p)return null;const w=tt(g,m,n,x,c,v,g!==t.tangent?g:void 0);return!w&&g?null:{position:h,normal:j,tangent:w}}function I(t,n,r){if(!n)return t;if(!r){const{position:r,normal:e,tangent:o}=t;return{position:R(new Float64Array(r.length),r,n),tangent:o,normal:e}}const e=K(t,r.localMatrix);return R(e.position,e.position,n),e}function J({vertexAttributes:t,spatialReference:n,transform:r},{origin:e},o,i){const l=D(n,i);if(!A(n,e,rt,l))return U(O(),n,l),null;if(r&&u(rt,rt,r.localMatrix),!A(n,o,et,l))return U(O(),l,n),null;s(et,et);const a=u(rt,et,rt);return X(a,n,i,3),K(t,a)}function K(t,n){const r=new Float64Array(t.position.length);d(r,t.position,n);const e=t.normal?new Float32Array(t.normal.length):null,o=t.tangent?new Float32Array(t.tangent.length):null;return e&&t.normal&&B(t.normal,e,n),o&&t.tangent&&E(t.tangent,o,n),{position:r,normal:e,tangent:o}}function N(t,n,r,e,o){d(e,t,n);const i=new Float64Array(t.length);return L(e,o,i,r)?i:(U(O(),o,r),null)}function Q(t,n,r,e,o,i){if(null==o)return null;const l=new Float32Array(o.length);return B(o,l,i),V(l,t,n,r,e,l)?l:(U(O(),e,n),null)}function W(t,n,r,e,o,i){if(null==o)return null;const l=new Float32Array(o.length);return E(o,l,i),C(l,t,n,r,e,l)?l:(U(O(),e,n),null)}function X(t,n,r,e){const o=Y(n,r,e);Z(o)||a(t,t,[o,o,o])}function Y(t,n,r){const e=!!(1&r),o=!!(2&r),i=n?.sourceUnit,l=n?.targetUnit;if(!i&&!l)return 1;let a=nt(i,t);e||!i||Z(a)||(O().warn("source unit conversion not supported"),a=1);let s=1/nt(l,t);return o||!l||Z(s)||(O().warn("target unit conversion not supported"),s=1),a*s}function Z(t){return n(t,1)}function $(t,n,r,e,o){const i=M(t,n,e,o);if(!i)return U(O(),n,o),null;const l=new Float64Array(i.length);return d(l,i,r),l}function _(t,n,r,e,o,i,l){if(null==t)return null;const a=l??new Float32Array(t.length);return T(t,n,r,e,o,a)?(S(a,a,i),a):(U(O(),r,o),null)}function tt(t,n,r,e,o,i,l){if(null==t)return null;const a=l??new Float32Array(t.length);return k(t,n,r,e,o,a)?(S(a,a,i,4),a):(U(O(),r,o),null)}function nt(t,n){if(null==t)return 1;const o=r(n);return 1/e(o,"meters",t)}const rt=f(),et=f(),ot=i(),it=h(),lt=f();export{q as convertVertexSpace,nt as getUnitToSpatialReferenceScaleConversion,P as projectPointToVertexSpace};
5
+ import t from"../../../core/Logger.js";import{floatEqualUlp as n}from"../../../core/mathUtils.js";import{getMetersPerCartesianUnitForSR as r,convertUnit as e}from"../../../core/unitUtils.js";import{normalFromMat4 as o}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{exactEquals as l,scale as a,invert as s,copy as c,multiply as u}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as f,IDENTITY as m}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{u as p,e as g,t as x}from"../../../chunks/vec32.js";import{create as h}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getSphericalPCPF as v,WGS84ECEFSpatialReference as j}from"../../spatialReferenceEllipsoidUtils.js";import{computeTranslationToOriginAndRotation as A}from"../../projection/computeTranslationToOriginAndRotation.js";import{projectPointToVector as w}from"../../projection/projectPointToVector.js";import{isRelativeVertexSpace as y,vertexSpaceEquals as F}from"../meshVertexSpaceUtils.js";import{isEarth as b}from"../spatialReferenceUtils.js";import{a as R,t as d,b as S}from"../../../chunks/vec3.js";import{logProjectionError as U,projectToPCPF as M,projectNormalToPCPF as T,projectTangentToPCPF as k,transformNormal as B,transformTangent as E,projectFromPCPF as L,projectNormalFromPCPF as V,projectTangentFromPCPF as C}from"./projection.js";const O=()=>t.getLogger("esri.geometry.support.meshUtils.vertexSpaceConversion");function P(t,n,{vertexSpace:r,spatialReference:e}){if("georeferenced"===r.type){const o=t;if(!w(n,o,e))return!1;const{origin:i}=r;return g(t,o,i),!0}const o=v(e),i=t;if(!w(n,i,o))return!1;const{origin:l}=r,a=lt;if(!A(e,l,a,o))return!1;const c=s(lt,a);return null!=c&&(x(t,i,c),!0)}function q(t,n,r){const{vertexSpace:e,transform:o,vertexAttributes:i}=t,a=y(e)?o:null,s=Y(t.spatialReference,r,3);if(F(e,n)&&(!a||l(a.localMatrix,m))&&Z(s)){const{position:t,normal:n,tangent:e}=i,o=r?.allowBufferReuse;return{position:o?t:t.slice(),normal:o?n:n?.slice(),tangent:o?e:e?.slice()}}switch(t.vertexSpace.type){case"local":return"local"===n.type?J(t,t.vertexSpace,n.origin,r):G(t,t.vertexSpace,n.origin,r);case"georeferenced":return"local"===n.type?H(t,t.vertexSpace,n.origin,r):z(t,t.vertexSpace,n.origin,r)}}function z({vertexAttributes:t,transform:n,spatialReference:r},{origin:e},o,i){const l=Y(r,i,3),a=e||!Z(l)?c(rt,n?.localMatrix??m):null;a&&X(a,r,i,3);const{position:s,normal:u,tangent:f}=a?K(t,a):t,g=i?.allowBufferReuse,x=g?s:new Float64Array(s.length);let h=s;if(e&&(h=R(x,h,e)),o){const t=p(it,o);h=R(x,h,t)}return{position:h!==t.position||g?h:h.slice(),normal:u!==t.normal||g?u:u?.slice(),tangent:f!==t.tangent||g?f:f?.slice()}}function D(t,n){return n?.useEllipsoid&&b(t)?j:v(t)}function G({spatialReference:t,vertexAttributes:n,transform:r},{origin:e},o,i){const l=D(t,i);if(!A(t,e,rt,l))return U(O(),t,l),null;r&&u(rt,rt,r.localMatrix),X(rt,t,i,1);const a=new Float64Array(n.position.length),s=N(n.position,rt,t,a,l);if(!s)return null;const c=Q(s,t,a,l,n.normal,rt);if(n.normal&&!c)return null;const f=W(s,t,a,l,n.tangent,rt);if(n.tangent&&!f)return null;if(o){const t=p(it,o);R(s,s,t)}return{position:s,normal:c,tangent:f}}function H({vertexAttributes:t,spatialReference:n,transform:r},{origin:e},i,l){const c=D(n,l);if(!A(n,i,rt,c))return U(O(),n,c),null;const u=1/Y(n,l,2);a(rt,rt,[u,u,u]);const f=s(et,rt),{position:m,normal:p,tangent:g}=I(t,e,r),x=new Float64Array(m.length),h=$(m,n,f,x,c);if(!h)return null;const v=o(ot,f),j=_(p,m,n,x,c,v,p!==t.normal?p:void 0);if(!j&&p)return null;const w=tt(g,m,n,x,c,v,g!==t.tangent?g:void 0);return!w&&g?null:{position:h,normal:j,tangent:w}}function I(t,n,r){if(!n)return t;if(!r){const{position:r,normal:e,tangent:o}=t;return{position:R(new Float64Array(r.length),r,n),tangent:o,normal:e}}const e=K(t,r.localMatrix);return R(e.position,e.position,n),e}function J({vertexAttributes:t,spatialReference:n,transform:r},{origin:e},o,i){const l=D(n,i);if(!A(n,e,rt,l))return U(O(),n,l),null;if(r&&u(rt,rt,r.localMatrix),!A(n,o,et,l))return U(O(),l,n),null;s(et,et);const a=u(rt,et,rt);return X(a,n,i,3),K(t,a)}function K(t,n){const r=new Float64Array(t.position.length);d(r,t.position,n);const e=t.normal?new Float32Array(t.normal.length):null,o=t.tangent?new Float32Array(t.tangent.length):null;return e&&t.normal&&B(t.normal,e,n),o&&t.tangent&&E(t.tangent,o,n),{position:r,normal:e,tangent:o}}function N(t,n,r,e,o){d(e,t,n);const i=new Float64Array(t.length);return L(e,o,i,r)?i:(U(O(),o,r),null)}function Q(t,n,r,e,o,i){if(null==o)return null;const l=new Float32Array(o.length);return B(o,l,i),V(l,t,n,r,e,l)?l:(U(O(),e,n),null)}function W(t,n,r,e,o,i){if(null==o)return null;const l=new Float32Array(o.length);return E(o,l,i),C(l,t,n,r,e,l)?l:(U(O(),e,n),null)}function X(t,n,r,e){const o=Y(n,r,e);Z(o)||a(t,t,[o,o,o])}function Y(t,n,r){const e=!!(1&r),o=!!(2&r),i=n?.sourceUnit,l=n?.targetUnit;if(!i&&!l)return 1;let a=nt(i,t);e||!i||Z(a)||(O().warn("source unit conversion not supported"),a=1);let s=1/nt(l,t);return o||!l||Z(s)||(O().warn("target unit conversion not supported"),s=1),a*s}function Z(t){return n(t,1)}function $(t,n,r,e,o){const i=M(t,n,e,o);if(!i)return U(O(),n,o),null;const l=new Float64Array(i.length);return d(l,i,r),l}function _(t,n,r,e,o,i,l){if(null==t)return null;const a=l??new Float32Array(t.length);return T(t,n,r,e,o,a)?(S(a,a,i),a):(U(O(),r,o),null)}function tt(t,n,r,e,o,i,l){if(null==t)return null;const a=l??new Float32Array(t.length);return k(t,n,r,e,o,a)?(S(a,a,i,4),a):(U(O(),r,o),null)}function nt(t,n){if(null==t)return 1;const o=r(n);return 1/e(o,"meters",t)}const rt=f(),et=f(),ot=i(),it=h(),lt=f();export{q as convertVertexSpace,nt as getUnitToSpatialReferenceScaleConversion,P as projectPointToVertexSpace};
@@ -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 of t)i.push([s[0]+m,s[1]]);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"./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};
@@ -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{clamp as t}from"../../core/mathUtils.js";import{f as n,g as r,h as o,i as e,e as c,q as u,n as i,j as s,d as f}from"../../chunks/vec32.js";import{create as a}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as m,e as g}from"../../chunks/vec42.js";import{projectPointSignedLength as h}from"./vector.js";import{sv4d as l,sv3d as p}from"./vectorStacks.js";import{tangentFrame as M}from"../../views/3d/support/mathUtils.js";function j(t=$){return[t[0],t[1],t[2],t[3]]}const v=m,b=g;function d(t=$[0],n=$[1],r=$[2],o=$[3]){return q(t,n,r,o,l.get())}function y(t,n){return q(n[0],n[1],n[2],n[3],t)}function k(t){return t}function q(t,n,r,o,e=j()){return e[0]=t,e[1]=n,e[2]=r,e[3]=o,e}function x(t,n,r){return f(r,t),r[3]=n,r}function U(t,n,r){const o=n[0]*n[0]+n[1]*n[1]+n[2]*n[2],e=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return r[0]=n[0]*e,r[1]=n[1]*e,r[2]=n[2]*e,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2]),r}function w(t,n,r,o=j()){const e=r[0]-n[0],c=r[1]-n[1],u=r[2]-n[2],i=t[0]-n[0],s=t[1]-n[1],f=t[2]-n[2],a=c*f-u*s,m=u*i-e*f,g=e*s-c*i,h=a*a+m*m+g*g,l=Math.abs(h-1)>1e-5&&h>1e-12?1/Math.sqrt(h):1;return o[0]=a*l,o[1]=m*l,o[2]=g*l,o[3]=-(o[0]*t[0]+o[1]*t[1]+o[2]*t[2]),o}function S(t,r,o,e=0,s=Math.floor(o*(1/3)),f=Math.floor(o*(2/3))){if(o<3)return!1;r(B,e);let a=s,m=!1;for(;a<o-1&&!m;)r(C,a),a++,m=!u(B,C);if(!m)return!1;for(a=Math.max(a,f),m=!1;a<o&&!m;)r(D,a),a++,c(E,B,C),i(E,E),c(F,C,D),i(F,F),m=!u(B,D)&&!u(C,D)&&Math.abs(n(E,F))<A;return m?(w(B,C,D,t),!0):(0!==e||1!==s||2!==f)&&S(t,r,o,0,1,2)}function z(t,n,r=!0){const o=n.length/3;return S(t,(t,r)=>s(t,n[3*r+0],n[3*r+1],n[3*r+2]),r?o-1:o)}const A=.99619469809,B=a(),C=a(),D=a(),E=a(),F=a();function G(t,r,o){return r!==t&&y(t,r),t[3]=-n(k(t),o),t}function H(t,n){return n[0]=-t[0],n[1]=-t[1],n[2]=-t[2],n[3]=-t[3],n}function I(t,n,r,o){return e(D,n,t),U(r,D,o)}function J(t,n,r,o){return Y(Z(t,n,c(p.get(),r,n),_,o))}function K(t,n,r){return null!=n&&Y(Z(t,n.origin,n.direction,tt,r))}function L(t,n,r){return Y(Z(t,n.origin,n.vector,0,r))}function N(t,n,r){return Y(Z(t,n.origin,n.vector,1,r))}function O(t,n){return X(t,n)>=0}function P(t,r){const o=n(k(t),r.ray.direction),e=-X(t,r.ray.origin);if(e<0&&o>=0)return!1;if(o>-1e-6&&o<1e-6)return e>0;if((e<0||o<0)&&!(e<0&&o<0))return!0;const c=e/o;return o>0?c<r.c1&&(r.c1=c):c>r.c0&&(r.c0=c),r.c0<=r.c1}function Q(t,r){const o=n(k(t),r.ray.direction),e=-X(t,r.ray.origin);if(o>-1e-6&&o<1e-6)return e>0;const c=e/o;return o>0?c<r.c1&&(r.c1=c):c>r.c0&&(r.c0=c),r.c0<=r.c1}function R(t,n,e){const u=o(p.get(),k(t),-t[3]),i=V(t,c(p.get(),n,u),p.get());return r(e,i,u),e}function T(t,n,r,o){const e=k(t),u=p.get(),i=p.get();M(e,u,i);const f=c(p.get(),r,n),a=h(u,f),m=h(i,f),g=h(e,f);return s(o,a,m,g)}function V(t,r,e){const u=o(p.get(),k(t),n(k(t),r));return c(e,r,u),e}function W(t,n){return Math.abs(X(t,n))}function X(t,r){return n(k(t),r)+t[3]}function Y(t){return 0===t||1===t}function Z(e,c,u,i,s){const f=n(k(e),u),a=X(e,c);if(0===f)return a>=0?2:3;let m=-a/f;return 1&i&&(m=t(m,0,1)),!(4&i)&&m<0||!(8&i)&&m>1?a>=0?2:3:(r(s,c,o(s,u,m)),a>=0?0:1)}const $=[0,0,1,0],_=12,tt=8;export{P as clip,Q as clipInfinite,y as copy,j as create,W as distance,b as equals,v as exactEquals,z as fromArray,S as fromManyPoints,x as fromNormalAndOffset,w as fromPoints,U as fromPositionAndNormal,q as fromValues,I as fromVectorsAndPoint,k as getNormal,J as intersectLine,Z as intersectLineOrRay,L as intersectLineSegment,N as intersectLineSegmentClamp,K as intersectRay,O as isPointInside,H as negate,R as projectPoint,T as projectPointLocal,V as projectVector,G as setOffsetFromPoint,X as signedDistance,$ as up,d as wrap};
5
+ import{clamp as t}from"../../core/mathUtils.js";import{f as n,g as r,h as o,q as e,e as c,n as u,i,j as s,d as f}from"../../chunks/vec32.js";import{create as a}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as m,e as g}from"../../chunks/vec42.js";import{projectPointSignedLength as h}from"./vector.js";import{sv4d as l,sv3d as p}from"./vectorStacks.js";import{tangentFrame as M}from"../../views/3d/support/mathUtils.js";function j(t=$){return[t[0],t[1],t[2],t[3]]}const v=m,b=g;function d(t=$[0],n=$[1],r=$[2],o=$[3]){return q(t,n,r,o,l.get())}function y(t,n){return q(n[0],n[1],n[2],n[3],t)}function k(t){return t}function q(t,n,r,o,e=j()){return e[0]=t,e[1]=n,e[2]=r,e[3]=o,e}function x(t,n,r){return f(r,t),r[3]=n,r}function U(t,n,r){const o=n[0]*n[0]+n[1]*n[1]+n[2]*n[2],e=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return r[0]=n[0]*e,r[1]=n[1]*e,r[2]=n[2]*e,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2]),r}function w(t,n,r,o=j()){const e=r[0]-n[0],c=r[1]-n[1],u=r[2]-n[2],i=t[0]-n[0],s=t[1]-n[1],f=t[2]-n[2],a=c*f-u*s,m=u*i-e*f,g=e*s-c*i,h=a*a+m*m+g*g,l=Math.abs(h-1)>1e-5&&h>1e-12?1/Math.sqrt(h):1;return o[0]=a*l,o[1]=m*l,o[2]=g*l,o[3]=-(o[0]*t[0]+o[1]*t[1]+o[2]*t[2]),o}function S(t,r,o,i=0,s=Math.floor(o*(1/3)),f=Math.floor(o*(2/3))){if(o<3)return!1;r(B,i);let a=s,m=!1;for(;a<o-1&&!m;)r(C,a),a++,m=!e(B,C);if(!m)return!1;for(a=Math.max(a,f),m=!1;a<o&&!m;)r(D,a),a++,c(E,B,C),u(E,E),c(F,C,D),u(F,F),m=!e(B,D)&&!e(C,D)&&Math.abs(n(E,F))<A;return m?(w(B,C,D,t),!0):(0!==i||1!==s||2!==f)&&S(t,r,o,0,1,2)}function z(t,n,r=!0){const o=n.length/3;return S(t,(t,r)=>s(t,n[3*r+0],n[3*r+1],n[3*r+2]),r?o-1:o)}const A=.99619469809,B=a(),C=a(),D=a(),E=a(),F=a();function G(t,r,o){return r!==t&&y(t,r),t[3]=-n(k(t),o),t}function H(t,n){return n[0]=-t[0],n[1]=-t[1],n[2]=-t[2],n[3]=-t[3],n}function I(t,n,r,o){return i(D,n,t),U(r,D,o)}function J(t,n,r,o){return Y(Z(t,n,c(p.get(),r,n),_,o))}function K(t,n,r){return null!=n&&Y(Z(t,n.origin,n.direction,tt,r))}function L(t,n,r){return Y(Z(t,n.origin,n.vector,0,r))}function N(t,n,r){return Y(Z(t,n.origin,n.vector,1,r))}function O(t,n){return X(t,n)>=0}function P(t,r){const o=n(k(t),r.ray.direction),e=-X(t,r.ray.origin);if(e<0&&o>=0)return!1;if(o>-1e-6&&o<1e-6)return e>0;if((e<0||o<0)&&!(e<0&&o<0))return!0;const c=e/o;return o>0?c<r.c1&&(r.c1=c):c>r.c0&&(r.c0=c),r.c0<=r.c1}function Q(t,r){const o=n(k(t),r.ray.direction),e=-X(t,r.ray.origin);if(o>-1e-6&&o<1e-6)return e>0;const c=e/o;return o>0?c<r.c1&&(r.c1=c):c>r.c0&&(r.c0=c),r.c0<=r.c1}function R(t,n,e){const u=o(p.get(),k(t),-t[3]),i=V(t,c(p.get(),n,u),p.get());return r(e,i,u),e}function T(t,n,r,o){const e=k(t),u=p.get(),i=p.get();M(e,u,i);const f=c(p.get(),r,n),a=h(u,f),m=h(i,f),g=h(e,f);return s(o,a,m,g)}function V(t,r,e){const u=o(p.get(),k(t),n(k(t),r));return c(e,r,u),e}function W(t,n){return Math.abs(X(t,n))}function X(t,r){return n(k(t),r)+t[3]}function Y(t){return 0===t||1===t}function Z(e,c,u,i,s){const f=n(k(e),u),a=X(e,c);if(0===f)return a>=0?2:3;let m=-a/f;return 1&i&&(m=t(m,0,1)),!(4&i)&&m<0||!(8&i)&&m>1?a>=0?2:3:(r(s,c,o(s,u,m)),a>=0?0:1)}const $=[0,0,1,0],_=12,tt=8;export{P as clip,Q as clipInfinite,y as copy,j as create,W as distance,b as equals,v as exactEquals,z as fromArray,S as fromManyPoints,x as fromNormalAndOffset,w as fromPoints,U as fromPositionAndNormal,q as fromValues,I as fromVectorsAndPoint,k as getNormal,J as intersectLine,Z as intersectLineOrRay,L as intersectLineSegment,N as intersectLineSegmentClamp,K as intersectRay,O as isPointInside,H as negate,R as projectPoint,T as projectPointLocal,V as projectVector,G as setOffsetFromPoint,X as signedDistance,$ as up,d as wrap};
@@ -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{deg2rad as t}from"../../core/mathUtils.js";import{getMetersPerUnitForSR as r,getMetersPerVerticalUnitForSR as o}from"../../core/unitUtils.js";import{j as s}from"../../chunks/vec32.js";import{getNormal as a,create as n,fromManyPoints as c}from"./plane.js";function i(r,o,s){const n=m(e,r,o,s)?a(e):[0,0,1];return Math.abs(n[2])>Math.cos(t(80))?2:Math.abs(n[1])>Math.abs(n[0])?1:0}function m(t,a,n,i){const m=(t=>!Array.isArray(t[0]))(a)?(t,r)=>a[3*t+r]:(t,r)=>a[t][r],e=i?r(i)/o(i):1;return c(t,(t,r)=>s(t,m(r,0)*e,m(r,1)*e,m(r,2)),n)}const e=n();export{m as fitPlane,i as leastSignificantAxis};
5
+ import{deg2rad as t}from"../../core/mathUtils.js";import{getMetersPerUnitForSR as r,getMetersPerVerticalUnitForSR as o}from"../../core/unitUtils.js";import{j as s}from"../../chunks/vec32.js";import{getNormal as a,fromManyPoints as n,create as c}from"./plane.js";function i(r,o,s){const n=m(e,r,o,s)?a(e):[0,0,1];return Math.abs(n[2])>Math.cos(t(80))?2:Math.abs(n[1])>Math.abs(n[0])?1:0}function m(t,a,c,i){const m=(t=>!Array.isArray(t[0]))(a)?(t,r)=>a[3*t+r]:(t,r)=>a[t][r],e=i?r(i)/o(i):1;return n(t,(t,r)=>s(t,m(r,0)*e,m(r,1)*e,m(r,2)),c)}const e=c();export{m as fitPlane,i as leastSignificantAxis};
@@ -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 as n}from"../../chunks/earcut.js";import{isClockwise as t}from"./coordsUtils.js";import{doubleSubArray as e,doubleArrayFrom as o,newDoubleArray as r}from"./DoubleArray.js";import{compactMeshIndices as s}from"./Indices.js";import{leastSignificantAxis as i}from"./polygonUtils.js";import{deduplicate as l}from"./meshUtils/deduplicate.js";function c(t){const r=h(t.rings,t.hasZ,1,t.spatialReference),i=new Array;let c=0,a=0;for(const o of r.polygons){const t=o.count,l=o.index,f=e(r.position,3*l,3*t),h=o.holeIndices.map(n=>n-l),g=s(n(f,h,3));i.push({position:f,faces:g}),c+=f.length,a+=g.length}const g=f(i,c,a),u=Array.isArray(g.position)?l(g.position,3,{originalIndices:g.faces}):l(g.position.buffer,6,{originalIndices:g.faces});return g.position=o(new Float64Array(u.buffer)),g.faces=u.indices,g}function f(n,t,e){if(1===n.length)return n[0];const o=r(t),i=new Array(e);let l=0,c=0,f=0;for(const r of n){for(let n=0;n<r.position.length;n++)o[l++]=r.position[n];for(const n of r.faces)i[c++]=n+f;f=l/3}return{position:o,faces:s(i)}}function h(n,t,e,o){const s=n.length,i=new Array(s),l=new Array(s),c=new Array(s);let f=0;for(let r=0;r<s;++r)f+=n[r].length;let h=0,u=0,p=0;const d=r(3*f);let m=0;for(let r=s-1;r>=0;r--){const f=n[r],y=1===e&&g(f,t,o);if(y&&1!==s)i[h++]=f;else{let n=f.length;for(let t=0;t<h;++t)n+=i[t].length;const e={index:m,pathLengths:new Array(h+1),count:n,holeIndices:new Array(h)};e.pathLengths[0]=f.length,f.length>0&&(c[p++]={index:m,count:f.length}),m=y?a(f,f.length-1,-1,d,m,f.length,t):a(f,0,1,d,m,f.length,t);for(let o=0;o<h;++o){const n=i[o];e.holeIndices[o]=m,e.pathLengths[o+1]=n.length,n.length>0&&(c[p++]={index:m,count:n.length}),m=a(n,0,1,d,m,n.length,t)}h=0,e.count>0&&(l[u++]=e)}}for(let r=0;r<h;++r){const n=i[r];n.length>0&&(c[p++]={index:m,count:n.length}),m=a(n,0,1,d,m,n.length,t)}return l.length=u,c.length=p,{position:d,polygons:l,outlines:c}}function a(n,t,e,o,r,s,i){r*=3;for(let l=0;l<s;++l){const s=n[t];o[r++]=s[0],o[r++]=s[1],o[r++]=i&&s[2]?s[2]:0,t+=e}return r/3}function g(n,e,o){if(!e)return!t(n);const r=n.length-1;switch(i(n,r,o)){case 0:return!t(n,1,2);case 1:return!t(n,0,2);case 2:return!t(n,0,1)}}export{g as isCounterClockwise,h as ringsToTriangulationInfo,c as triangulate};
5
+ import{e as n}from"../../chunks/earcut.js";import{isClockwise as t}from"./coordsUtils.js";import{doubleSubArray as e,doubleArrayFrom as o,newDoubleArray as r}from"./DoubleArray.js";import{compactMeshIndices as s}from"./Indices.js";import{leastSignificantAxis as i}from"./polygonUtils.js";import{deduplicate as l}from"./meshUtils/deduplicate.js";function c(t){const r=f(t.rings,t.hasZ,1,t.spatialReference),i=new Array;let c=0,a=0;for(const o of r.polygons){const t=o.count,l=o.index,h=e(r.position,3*l,3*t),f=o.holeIndices.map(n=>n-l),g=s(n(h,f,3));i.push({position:h,faces:g}),c+=h.length,a+=g.length}const g=h(i,c,a),u=Array.isArray(g.position)?l(g.position,3,{originalIndices:g.faces}):l(g.position.buffer,6,{originalIndices:g.faces});return g.position=o(new Float64Array(u.buffer)),g.faces=u.indices,g}function h(n,t,e){if(1===n.length)return n[0];const o=r(t),i=new Array(e);let l=0,c=0,h=0;for(const r of n){for(let n=0;n<r.position.length;n++)o[l++]=r.position[n];for(const n of r.faces)i[c++]=n+h;h=l/3}return{position:o,faces:s(i)}}function f(n,t,e,o){const s=n.length,i=new Array(s),l=new Array(s),c=new Array(s),h=n.reduce((n,t)=>n+t.length,0);let f=0,u=0,p=0;const d=r(3*h);let m=0;for(let r=s-1;r>=0;r--){const h=n[r],y=1===e&&g(h,t,o);if(y&&1!==s)i[f++]=h;else{let n=h.length;for(let t=0;t<f;++t)n+=i[t].length;const e={index:m,pathLengths:new Array(f+1),count:n,holeIndices:new Array(f)};e.pathLengths[0]=h.length,h.length>0&&(c[p++]={index:m,count:h.length}),m=y?a(h,h.length-1,-1,d,m,h.length,t):a(h,0,1,d,m,h.length,t);for(let o=0;o<f;++o){const n=i[o];e.holeIndices[o]=m,e.pathLengths[o+1]=n.length,n.length>0&&(c[p++]={index:m,count:n.length}),m=a(n,0,1,d,m,n.length,t)}f=0,e.count>0&&(l[u++]=e)}}for(let r=0;r<f;++r){const n=i[r];n.length>0&&(c[p++]={index:m,count:n.length}),m=a(n,0,1,d,m,n.length,t)}return l.length=u,c.length=p,{position:d,polygons:l,outlines:c}}function a(n,t,e,o,r,s,i){r*=3;for(let l=0;l<s;++l){const s=n[t];o[r++]=s[0],o[r++]=s[1],o[r++]=i&&s[2]?s[2]:0,t+=e}return r/3}function g(n,e,o){if(!e)return!t(n);const r=n.length-1;switch(i(n,r,o)){case 0:return!t(n,1,2);case 1:return!t(n,0,2);case 2:return!t(n,0,1)}}export{g as isCounterClockwise,f as ringsToTriangulationInfo,c as triangulate};