@arcgis/core 4.33.0-next.20250514 → 4.33.0-next.20250515

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 (399) hide show
  1. package/Graphic.js +1 -1
  2. package/Map.js +1 -1
  3. package/WebScene.js +1 -1
  4. package/applications/Components/SelectionOperation.js +1 -1
  5. package/arcade/functions/featuresetbase.js +1 -1
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/009730713ed9bc7c7388.js +1 -0
  8. package/assets/esri/core/workers/chunks/02853ab923245459b32e.js +1 -0
  9. package/assets/esri/core/workers/chunks/0624ae07d3af8d5f1ac8.js +1 -0
  10. package/assets/esri/core/workers/chunks/{6e8c6c9112ecb867b7be.js → 0817ddd885ce8b2459cb.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{69e8aabe5a1eb2d1e414.js → 0832bd5195b5791dd803.js} +1 -1
  12. package/assets/esri/core/workers/chunks/0d23610475c85385fbff.js +1 -0
  13. package/assets/esri/core/workers/chunks/{b4f38fe9cc948a39ad87.js → 0fd6d80393722132e044.js} +2 -2
  14. package/assets/esri/core/workers/chunks/{b4f38fe9cc948a39ad87.js.LICENSE.txt → 0fd6d80393722132e044.js.LICENSE.txt} +1 -1
  15. package/assets/esri/core/workers/chunks/1051a5a57b2fb843a555.js +1 -0
  16. package/assets/esri/core/workers/chunks/133e4bde346828d4510b.js +1 -0
  17. package/assets/esri/core/workers/chunks/19a58adc75a34f84b0ef.js +1 -0
  18. package/assets/esri/core/workers/chunks/1d7f2abfccc54659d6f2.js +1 -0
  19. package/assets/esri/core/workers/chunks/{339e7a900e2bba9d3647.js → 1f19bd3ef795c6765384.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{837f886f759fc6f0489d.js → 1f4fd9e3849f4e593375.js} +1 -1
  21. package/assets/esri/core/workers/chunks/1f9c6fbcd4d0eae1e574.js +1 -0
  22. package/assets/esri/core/workers/chunks/234117cc5cb7c6863313.js +1 -0
  23. package/assets/esri/core/workers/chunks/{1c025beaaac5ec7c04fb.js → 2adf558cd8d8155d07d7.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{47f64a340b5d56bf9e59.js → 2cf82d3645c75d311e99.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{f7ab3511f6627f467796.js → 377a7f0f7d304ff9fe5b.js} +1 -1
  26. package/assets/esri/core/workers/chunks/3b4b4f84d594db8945f9.js +1 -0
  27. package/assets/esri/core/workers/chunks/3bf1cf6c3cba172e2f6d.js +1 -0
  28. package/assets/esri/core/workers/chunks/{b3ca65d6112079fb1d00.js → 3ce5d7ad16e41eea05be.js} +1 -1
  29. package/assets/esri/core/workers/chunks/465f2db4ab8aa9c9f907.js +1 -0
  30. package/assets/esri/core/workers/chunks/{1e13e03aad422f9e871e.js → 47fe2379f2214bf50036.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{b8b5dfd2d73a8410fba2.js → 4954e0cf4a40e45d237f.js} +1 -1
  32. package/assets/esri/core/workers/chunks/4a362a35bcdb8405a53a.js +1 -0
  33. package/assets/esri/core/workers/chunks/4f8ebd9f0758b801835c.js +1 -0
  34. package/assets/esri/core/workers/chunks/5228d39c05d660a135b6.js +1 -0
  35. package/assets/esri/core/workers/chunks/{736cb9f74bf050b70f4c.js → 52a3d0e041717da7697e.js} +1 -1
  36. package/assets/esri/core/workers/chunks/54ea93f416ab52b413c1.js +1 -0
  37. package/assets/esri/core/workers/chunks/554a8bf4626336e68798.js +1 -0
  38. package/assets/esri/core/workers/chunks/55f087bca75c3f2a4515.js +1 -0
  39. package/assets/esri/core/workers/chunks/{bbaadce582df7e20397b.js → 56d2a20c1b143697aa19.js} +1 -1
  40. package/assets/esri/core/workers/chunks/57211c35a9646f088d86.js +1 -0
  41. package/assets/esri/core/workers/chunks/58526def64536b6581ab.js +1 -0
  42. package/assets/esri/core/workers/chunks/5890740d5a761b038560.js +1 -0
  43. package/assets/esri/core/workers/chunks/{9a641fb94819574e48f6.js → 5a73d8b7b01758ed4fdd.js} +1 -1
  44. package/assets/esri/core/workers/chunks/5dbd8d81d94cfda5bb32.js +1 -0
  45. package/assets/esri/core/workers/chunks/5e52c1c076a1502f9fe4.js +1 -0
  46. package/assets/esri/core/workers/chunks/609c7c9b7046b3a7acde.js +1 -0
  47. package/assets/esri/core/workers/chunks/{30f3014c0ac6e2bc14bf.js → 622c0552ca3cd674d46c.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{6e64ce0958c3432004b6.js → 62798f66872dc32e77d6.js} +1 -1
  49. package/assets/esri/core/workers/chunks/6409160d226a0bea5ac6.js +1 -0
  50. package/assets/esri/core/workers/chunks/65fd971d0574d69cbc26.js +1 -0
  51. package/assets/esri/core/workers/chunks/6993a59cbb78bc26f029.js +1 -0
  52. package/assets/esri/core/workers/chunks/6b23ca6570357f9fb724.js +1 -0
  53. package/assets/esri/core/workers/chunks/6c37a5bd00d255d1337a.js +1 -0
  54. package/assets/esri/core/workers/chunks/6ce4327f63e6eb92bba8.js +1 -0
  55. package/assets/esri/core/workers/chunks/6f9b8df290b0ce09beae.js +1 -0
  56. package/assets/esri/core/workers/chunks/{e0247252c6a0f3340e33.js → 6fa1a5b7276a037dbd6a.js} +84 -106
  57. package/assets/esri/core/workers/chunks/7c819b3e6d69c526f4b2.js +1 -0
  58. package/assets/esri/core/workers/chunks/7df147da40474b028705.js +1 -0
  59. package/assets/esri/core/workers/chunks/{0766ecb677d667e5fb83.js → 7e1dc8e5e18f18dd21e2.js} +2 -2
  60. package/assets/esri/core/workers/chunks/{0766ecb677d667e5fb83.js.LICENSE.txt → 7e1dc8e5e18f18dd21e2.js.LICENSE.txt} +1 -1
  61. package/assets/esri/core/workers/chunks/{e662c86b8bafc5512d3d.js → 847e88e1d6da1e74cdc8.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{6f5ec9bf7cf8a36d8e8b.js → 87eca6de502d18d8b7eb.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{10e6dffa57aa1a626708.js → 8a6aac37b3133de74cce.js} +1 -1
  64. package/assets/esri/core/workers/chunks/8a87c181b85d0b86b9bb.js.LICENSE.txt +1 -1
  65. package/assets/esri/core/workers/chunks/8f1fbfdac04e694f621d.js +1 -0
  66. package/assets/esri/core/workers/chunks/91cd29f53f07bc38fe75.js +1 -0
  67. package/assets/esri/core/workers/chunks/{5583d18032ed8bc17c74.js → 938f1eebc48871be64e9.js} +1 -1
  68. package/assets/esri/core/workers/chunks/97c148adf0347c69a79c.js +1 -0
  69. package/assets/esri/core/workers/chunks/{029a118e6dfb3f544a5c.js → 98ef17d15517368d2383.js} +1 -1
  70. package/assets/esri/core/workers/chunks/9c8224ca29475556e5ea.js +1 -0
  71. package/assets/esri/core/workers/chunks/{fd24dd602a3fed88d90e.js → 9d5eac3bd1526e2b33e3.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{38f5e6a202ce292edd9f.js → 9eb9c8db2510154c09cc.js} +1 -1
  73. package/assets/esri/core/workers/chunks/a036503087baa1f9fd00.js +1 -0
  74. package/assets/esri/core/workers/chunks/a673128da9e6656ead2e.js +1 -0
  75. package/assets/esri/core/workers/chunks/{90ae15ce22a49bd84876.js → ab9614555a15f04396f6.js} +2 -2
  76. package/assets/esri/core/workers/chunks/{90ae15ce22a49bd84876.js.LICENSE.txt → ab9614555a15f04396f6.js.LICENSE.txt} +1 -1
  77. package/assets/esri/core/workers/chunks/ae733c963d61065faa54.js +1 -0
  78. package/assets/esri/core/workers/chunks/b0522dffa5600345c07e.js +1 -0
  79. package/assets/esri/core/workers/chunks/{d1f7bfb8daf11ecada9f.js → b4273381dc069f4e1fa2.js} +1 -1
  80. package/assets/esri/core/workers/chunks/{fb2e28e6a87956267d1c.js → b92a34f88569c481ed10.js} +1 -1
  81. package/assets/esri/core/workers/chunks/{352b7dcd1633e0c98194.js → ba940ebdae84b174a7be.js} +1 -1
  82. package/assets/esri/core/workers/chunks/bf9b6b74654d303a6dae.js +1 -0
  83. package/assets/esri/core/workers/chunks/c07c1bb7ae09136dc1f6.js +1 -0
  84. package/assets/esri/core/workers/chunks/c938f5d269ba202d10ef.js +1 -0
  85. package/assets/esri/core/workers/chunks/cbbca011f8b176d4b5db.js +1 -0
  86. package/assets/esri/core/workers/chunks/{c604fefedccfd4db9953.js → ce321fd8fc5551e190ec.js} +1 -1
  87. package/assets/esri/core/workers/chunks/ce53ddda04e09ba2f860.js +1 -0
  88. package/assets/esri/core/workers/chunks/d166f805990353578494.js +1 -0
  89. package/assets/esri/core/workers/chunks/d9a23fb0c6c936d5e8ec.js +1 -0
  90. package/assets/esri/core/workers/chunks/db3f710d770adf631b28.js +2 -0
  91. package/assets/esri/core/workers/chunks/{6394ab6f629aa90292e6.js.LICENSE.txt → db3f710d770adf631b28.js.LICENSE.txt} +1 -1
  92. package/assets/esri/core/workers/chunks/{6805e7b43d6ecf3ea93c.js → dcf5719f38ad40b92941.js} +1 -1
  93. package/assets/esri/core/workers/chunks/e2cada6644c49b1b6e79.js +1 -0
  94. package/assets/esri/core/workers/chunks/e2fb4bebce3aee406efa.js +1 -0
  95. package/assets/esri/core/workers/chunks/e3638f9d4c0fda238f4b.js +1 -0
  96. package/assets/esri/core/workers/chunks/e85f892ea44d67d53ff0.js +2 -0
  97. package/assets/esri/core/workers/chunks/{3596540ef49e5330ceb2.js.LICENSE.txt → e85f892ea44d67d53ff0.js.LICENSE.txt} +1 -1
  98. package/assets/esri/core/workers/chunks/e89345c7af9d3d4d8452.js +1 -0
  99. package/assets/esri/core/workers/chunks/{a31658f544ac6e1801d6.js → ead5d4e271effc04def3.js} +1 -1
  100. package/assets/esri/core/workers/chunks/ece68a25651ef03fc95d.js +1 -0
  101. package/assets/esri/core/workers/chunks/f218a190015de1444018.js +1 -0
  102. package/assets/esri/core/workers/chunks/f229044615af3142bcb0.js +1 -0
  103. package/assets/esri/core/workers/chunks/f2692f25ef693cf12ce0.js +1 -0
  104. package/assets/esri/core/workers/chunks/f4c6ea630cecf0f260d7.js +2 -0
  105. package/assets/esri/core/workers/chunks/{e0dc8794343c2a949ffb.js.LICENSE.txt → f4c6ea630cecf0f260d7.js.LICENSE.txt} +1 -1
  106. package/assets/esri/core/workers/chunks/f718cb847c4eb1e43ad9.js +1 -0
  107. package/assets/esri/core/workers/chunks/faa40ef04604c7cce706.js +1 -0
  108. package/assets/esri/core/workers/chunks/{218a66d53f7cf4f285aa.js → fbd2f45d5adce4ca323f.js} +2 -2
  109. package/assets/esri/core/workers/chunks/{218a66d53f7cf4f285aa.js.LICENSE.txt → fbd2f45d5adce4ca323f.js.LICENSE.txt} +1 -1
  110. package/assets/esri/core/workers/chunks/{498886c321a2501658bc.js → ffaa977cd97a2b7190c5.js} +1 -1
  111. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  112. package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +5 -0
  113. package/assets/esri/themes/dark/main.css +1 -1
  114. package/assets/esri/themes/light/main.css +1 -1
  115. package/assets/esri/themes/light/view.css +1 -1
  116. package/chunks/Envelope.js +1 -1
  117. package/chunks/Jpg.js +1 -1
  118. package/chunks/LineSeries.js +1 -1
  119. package/chunks/ProjectionTransformation.js +1 -1
  120. package/chunks/QuadraticBezier.js +1 -1
  121. package/chunks/ShadowCastAccumulate.glsl.js +7 -5
  122. package/chunks/ShadowCastVisualize.glsl.js +1 -1
  123. package/chunks/ShadowHighlight.glsl.js +8 -7
  124. package/chunks/Transformation2D.js +1 -1
  125. package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
  126. package/chunks/arcgis-knowledge-client-core.js +1 -1
  127. package/chunks/basis_encoder.js +1 -1
  128. package/chunks/basis_transcoder.js +1 -1
  129. package/chunks/bundle.js +1 -1
  130. package/chunks/chartUtilsAm5.js +1 -1
  131. package/chunks/dxt_encoder.js +1 -1
  132. package/chunks/geometryEngineBase.js +1 -1
  133. package/chunks/i3s.js +1 -1
  134. package/chunks/lclayout.js +1 -1
  135. package/chunks/libtess-asm.js +1 -1
  136. package/chunks/lyr3DMain.js +1 -1
  137. package/chunks/lyr3DWorker.js +1 -1
  138. package/chunks/vec4.js +1 -1
  139. package/chunks/vxlLayer.js +1 -1
  140. package/core/arrayUtils.js +1 -1
  141. package/core/image/apng.js +1 -1
  142. package/core/image/gif.js +1 -1
  143. package/core/mathUtils.js +1 -1
  144. package/core/workers/Connection.js +1 -1
  145. package/geometry/operators/densifyOperator.d.ts +0 -1
  146. package/geometry/operators/gx/operatorOffset.js +1 -1
  147. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  148. package/geometry/support/meshProperties.js +1 -1
  149. package/geometry/support/normalizeUtilsSync.js +1 -1
  150. package/interfaces.d.ts +200 -147
  151. package/intl/date.js +1 -1
  152. package/intl/number.js +1 -1
  153. package/layers/BingMapsLayer.js +1 -1
  154. package/layers/graphics/OptimizedFeatureSet.js +1 -1
  155. package/layers/graphics/controllers/StreamController.js +1 -1
  156. package/layers/graphics/data/FeatureIdInfo.js +5 -0
  157. package/layers/graphics/data/QueryEngine.js +1 -1
  158. package/layers/graphics/data/StreamFeatureManager.js +1 -1
  159. package/layers/graphics/data/createFeatureId.js +5 -0
  160. package/layers/graphics/featureConversionUtils.js +1 -1
  161. package/layers/graphics/sources/WFSSourceWorker.js +1 -1
  162. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  163. package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
  164. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  165. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  166. package/layers/ogc/ogcFeatureUtils.js +1 -1
  167. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  168. package/layers/orientedImagery/core/utils.js +1 -1
  169. package/layers/orientedImagery/queries.js +1 -1
  170. package/layers/orientedImagery/transformations/utils.js +1 -1
  171. package/layers/support/LercWorker.js +1 -1
  172. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  173. package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
  174. package/layers/support/rasterFunctions/stretchUtils.js +1 -1
  175. package/layers/support/wmsUtils.js +1 -1
  176. package/layers/video/VideoController.js +1 -1
  177. package/package.json +1 -1
  178. package/rest/networks/support/Association.js +1 -1
  179. package/rest/networks/support/NetworkElement.js +1 -1
  180. package/rest/networks/support/QueryAssociationsParameters.js +1 -1
  181. package/rest/networks/support/TelecomNetworkElement.js +1 -1
  182. package/rest/networks/support/TraceResult.js +1 -1
  183. package/rest/query/operations/pbfDehydratedFeatureSet.js +1 -1
  184. package/rest/query/operations/pbfJSONFeatureSet.js +1 -1
  185. package/rest/query/operations/queryRelatedRecords.js +1 -1
  186. package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
  187. package/support/revision.js +1 -1
  188. package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
  189. package/views/2d/engine/ManagedCanvas.js +1 -1
  190. package/views/2d/engine/Stage.js +1 -1
  191. package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
  192. package/views/2d/engine/webgl/TileContainer.js +1 -1
  193. package/views/2d/engine/webgl/grouping.js +1 -1
  194. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  195. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  196. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  197. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  198. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  199. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  200. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  201. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  202. package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
  203. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  204. package/views/2d/layers/features/layerAdapters/featureServiceUtils.js +1 -1
  205. package/views/2d/layers/features/processor/AAggregateStrategy.js +1 -1
  206. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  207. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  208. package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
  209. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  210. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  211. package/views/2d/layers/features/sources/strategies/StreamLoadStrategy.js +1 -1
  212. package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
  213. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  214. package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
  215. package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
  216. package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
  217. package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
  218. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  219. package/views/3d/FocusAreasView.js +1 -1
  220. package/views/3d/analysis/AnalysisViewManager3D.js +1 -1
  221. package/views/3d/analysis/DimensionAnalysisView3D.d.ts +4 -0
  222. package/views/3d/analysis/DimensionAnalysisView3D.js +1 -1
  223. package/views/3d/camera/constraintUtils/common.js +1 -1
  224. package/views/3d/interactive/Manipulator3D.js +1 -1
  225. package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
  226. package/views/3d/layers/DimensionLayerView3D.js +1 -1
  227. package/views/3d/layers/I3SMeshView3D.js +1 -1
  228. package/views/3d/layers/LineOfSightLayerView3D.js +1 -1
  229. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  230. package/views/3d/layers/ViewshedLayerView3D.js +1 -1
  231. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  232. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  233. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  234. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  235. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  236. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  237. package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
  238. package/views/3d/layers/graphics/Labeler.js +1 -1
  239. package/views/3d/layers/graphics/QueryEngine.js +1 -1
  240. package/views/3d/layers/graphics/focusAreaStyle.js +5 -0
  241. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
  242. package/views/3d/layers/i3s/I3SBinaryReader.js +1 -1
  243. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  244. package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
  245. package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
  246. package/views/3d/layers/i3s/PagedNodeIndex.js +1 -1
  247. package/views/3d/layers/i3s/PointCloudWorkerUtil.js +1 -1
  248. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  249. package/views/3d/layers/support/LayerViewAnalysisViewManager.js +5 -0
  250. package/views/3d/terrain/PatchRenderData.js +1 -1
  251. package/views/3d/terrain/TerrainRenderer.js +1 -1
  252. package/views/3d/terrain/TerrainSurface.js +1 -1
  253. package/views/3d/terrain/TileAgent.js +1 -1
  254. package/views/3d/webgl-engine/collections/Component/IndexRange/ComponentRange.js +1 -1
  255. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  256. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +3 -3
  257. package/views/3d/webgl-engine/core/shaderLibrary/shading/ShadowmapFiltering.glsl.js +3 -25
  258. package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadow.glsl.js +1 -1
  259. package/views/3d/webgl-engine/core/shaderModules/Texture2DShadowBindUniform.js +5 -0
  260. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  261. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +3 -3
  262. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  263. package/views/3d/webgl-engine/lib/BoundingInfo.js +1 -1
  264. package/views/3d/webgl-engine/lib/DepthRange.js +1 -1
  265. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  266. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  267. package/views/3d/webgl-engine/lib/Material.js +1 -1
  268. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  269. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  270. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  271. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  272. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  273. package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
  274. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  275. package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
  276. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  277. package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +1 -1
  278. package/views/3d/webgl-engine/shaders/ShadowHighlight.glsl.js +1 -1
  279. package/views/3d/webgl.js +1 -1
  280. package/views/FocusArea.js +1 -1
  281. package/views/FocusAreas.js +1 -1
  282. package/views/GroundView.js +1 -1
  283. package/views/SceneView.js +1 -1
  284. package/views/View.js +1 -1
  285. package/views/draw/support/Box.js +1 -1
  286. package/views/draw/support/GraphicMover.js +1 -1
  287. package/views/draw/support/Reshape.js +1 -1
  288. package/views/input/InputManager.js +1 -1
  289. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  290. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  291. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
  292. package/views/layers/FeatureLayerView.js +1 -1
  293. package/views/support/LayerViewManager.js +1 -1
  294. package/views/webgl/RenderingContext.js +1 -1
  295. package/views/webgl/ShaderBuilder.js +1 -1
  296. package/views/webgl/Texture.js +1 -1
  297. package/views/webgl/TextureDescriptor.js +1 -1
  298. package/views/webgl/textureUtils.js +1 -1
  299. package/webscene/Slide.js +1 -1
  300. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  301. package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
  302. package/widgets/CoordinateConversion.js +1 -1
  303. package/widgets/Directions.js +1 -1
  304. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
  305. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
  306. package/widgets/ElevationProfile/support/profileUtils.js +1 -1
  307. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  308. package/widgets/FeatureForm.js +1 -1
  309. package/widgets/LayerList/LayerListItem.js +1 -1
  310. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  311. package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
  312. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  313. package/widgets/OrientedImageryViewer/components/NavigationUI.js +1 -1
  314. package/widgets/OrientedImageryViewer/components/NavigationUIPanoramicViewModel.js +5 -0
  315. package/widgets/OrientedImageryViewer/components/NavigationUIViewModel.js +1 -1
  316. package/widgets/OrientedImageryViewer/components/imageNavigationUtils.js +1 -1
  317. package/widgets/OrientedImageryViewer/constants.js +1 -1
  318. package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +5 -0
  319. package/widgets/OrientedImageryViewer/navigation/NavigationManagerPanoramic.js +5 -0
  320. package/widgets/OrientedImageryViewer/navigation/errors.js +5 -0
  321. package/widgets/OrientedImageryViewer/navigation/queries.js +5 -0
  322. package/widgets/OrientedImageryViewer/navigation/utils.js +5 -0
  323. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  324. package/widgets/PanoramicViewer.js +1 -1
  325. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  326. package/widgets/Sketch/SketchViewModel.js +1 -1
  327. package/widgets/Sketch.js +1 -1
  328. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  329. package/widgets/support/SelectionToolbar.js +1 -1
  330. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  331. package/widgets/support/SnappingControls.js +1 -1
  332. package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
  333. package/widgets/support/UtilityNetworkAssociations/utils/createAssociation.js +1 -1
  334. package/assets/esri/core/workers/chunks/0516bd18334d3af6c555.js +0 -1
  335. package/assets/esri/core/workers/chunks/0d8a635c1f9aeaf7564c.js +0 -1
  336. package/assets/esri/core/workers/chunks/191a45a594ecaf7f1abb.js +0 -1
  337. package/assets/esri/core/workers/chunks/1abd026ed12c863e1d94.js +0 -1
  338. package/assets/esri/core/workers/chunks/1c6542315390037053a6.js +0 -1
  339. package/assets/esri/core/workers/chunks/201db423e3c6f947b77c.js +0 -1
  340. package/assets/esri/core/workers/chunks/23de8aeed5b82c682cbe.js +0 -1
  341. package/assets/esri/core/workers/chunks/2e0af748eba93f3ea6cb.js +0 -1
  342. package/assets/esri/core/workers/chunks/3596540ef49e5330ceb2.js +0 -2
  343. package/assets/esri/core/workers/chunks/3604a77c93cf2927787b.js +0 -1
  344. package/assets/esri/core/workers/chunks/391b1c3e736a62befbaf.js +0 -1
  345. package/assets/esri/core/workers/chunks/40e556a0645af8658658.js +0 -1
  346. package/assets/esri/core/workers/chunks/4402336db7210cd583e0.js +0 -1
  347. package/assets/esri/core/workers/chunks/4899cdc8bb5085c356f9.js +0 -1
  348. package/assets/esri/core/workers/chunks/4bd5cbf6e0be2fc7e84d.js +0 -1
  349. package/assets/esri/core/workers/chunks/4c8052e81916579841f4.js +0 -1
  350. package/assets/esri/core/workers/chunks/4c9aa1dafdc0d9537231.js +0 -1
  351. package/assets/esri/core/workers/chunks/4feb774f123da26e9f2a.js +0 -1
  352. package/assets/esri/core/workers/chunks/51b5dfc7085272d26b89.js +0 -1
  353. package/assets/esri/core/workers/chunks/566c2ce50af225e556ac.js +0 -1
  354. package/assets/esri/core/workers/chunks/5ddf463c85c33428e807.js +0 -1
  355. package/assets/esri/core/workers/chunks/61032b5050464cb48056.js +0 -1
  356. package/assets/esri/core/workers/chunks/6394ab6f629aa90292e6.js +0 -2
  357. package/assets/esri/core/workers/chunks/63dade3e1cc7f5b76846.js +0 -1
  358. package/assets/esri/core/workers/chunks/64af433e88d4dd21a2ff.js +0 -1
  359. package/assets/esri/core/workers/chunks/6e12900a9f4c3c9941ec.js +0 -1
  360. package/assets/esri/core/workers/chunks/6e5d8a6b29c06a27998c.js +0 -1
  361. package/assets/esri/core/workers/chunks/6f506303017903b9a06f.js +0 -1
  362. package/assets/esri/core/workers/chunks/71e46e866c23372b0b58.js +0 -1
  363. package/assets/esri/core/workers/chunks/75fa861b5757551f8fdc.js +0 -1
  364. package/assets/esri/core/workers/chunks/7c49a8877bd744daa3d5.js +0 -1
  365. package/assets/esri/core/workers/chunks/7ea5bbb52e84be9a608e.js +0 -1
  366. package/assets/esri/core/workers/chunks/82c395d8649096609a8a.js +0 -1
  367. package/assets/esri/core/workers/chunks/86138c297095af1ac604.js +0 -1
  368. package/assets/esri/core/workers/chunks/8c21cc9af4ce9652cc5c.js +0 -1
  369. package/assets/esri/core/workers/chunks/8e6301006abdf47cc88d.js +0 -1
  370. package/assets/esri/core/workers/chunks/90f93091fe088875f80f.js +0 -1
  371. package/assets/esri/core/workers/chunks/91a02ee91f61cf841111.js +0 -1
  372. package/assets/esri/core/workers/chunks/9baeb3b5733acdda4e7c.js +0 -1
  373. package/assets/esri/core/workers/chunks/a1d697e2be1e892a666a.js +0 -1
  374. package/assets/esri/core/workers/chunks/a1f27c4f4b5ef3e359f7.js +0 -1
  375. package/assets/esri/core/workers/chunks/a348ff2dd936c6bf9399.js +0 -1
  376. package/assets/esri/core/workers/chunks/b64f708f821dd2bb51cd.js +0 -1
  377. package/assets/esri/core/workers/chunks/bf453744067267e84d1b.js +0 -1
  378. package/assets/esri/core/workers/chunks/c1175477dfcdee90a453.js +0 -1
  379. package/assets/esri/core/workers/chunks/c4e2b75b9135920babc3.js +0 -1
  380. package/assets/esri/core/workers/chunks/cb80b7ddc9acf625d754.js +0 -1
  381. package/assets/esri/core/workers/chunks/d22f91bc16a7641bcbef.js +0 -1
  382. package/assets/esri/core/workers/chunks/d52cf7b795ee52034f9e.js +0 -1
  383. package/assets/esri/core/workers/chunks/d971571a957de70d5a8d.js +0 -1
  384. package/assets/esri/core/workers/chunks/d9d9d4f99140e579eabb.js +0 -1
  385. package/assets/esri/core/workers/chunks/dc3a6beb3028009b3c23.js +0 -1
  386. package/assets/esri/core/workers/chunks/e0dc8794343c2a949ffb.js +0 -2
  387. package/assets/esri/core/workers/chunks/e483d2f169e51a361742.js +0 -1
  388. package/assets/esri/core/workers/chunks/e5608e5232e983531f72.js +0 -1
  389. package/assets/esri/core/workers/chunks/e613df03ceb39e29befa.js +0 -1
  390. package/assets/esri/core/workers/chunks/e697dd4508f02dcfe329.js +0 -1
  391. package/assets/esri/core/workers/chunks/eabfab23246d4a052ea3.js +0 -1
  392. package/assets/esri/core/workers/chunks/ec8e8048b3df2c92008d.js +0 -1
  393. package/assets/esri/core/workers/chunks/ed6d0fea159dea638c2f.js +0 -1
  394. package/assets/esri/core/workers/chunks/f5fcba6ca6f43bf1d65d.js +0 -1
  395. package/assets/esri/core/workers/chunks/f92d76b694ff0cdb212c.js +0 -1
  396. package/chunks/NetworkElement.js +0 -5
  397. package/views/FocusAreasUtils.js +0 -5
  398. package/views/analysis/DimensionAnalysisView.d.ts +0 -4
  399. package/views/analysis/DimensionAnalysisView.js +0 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.33.0-next.20250514",
3
+ "version": "4.33.0-next.20250515",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../../chunks/tslib.es6.js";import e from"../../../core/JSONSupport.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{reader as t}from"../../../core/accessorSupport/decorators/reader.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{writer as s}from"../../../core/accessorSupport/decorators/writer.js";import n from"../../../geometry/Polyline.js";import{associationTypeKebabDict as i}from"../../../networks/support/typeUtils.js";import{N as m}from"../../../chunks/NetworkElement.js";let p=class extends e{constructor(o){super(o),this.globalId=null,this.associationType=null,this.fromNetworkElement=null,this.toNetworkElement=null,this.geometry=null,this.errorMessage=null,this.percentAlong=null,this.errorCode=null,this.isContentVisible=null,this.status=null}readFromNetworkElement(o,e){return new m({globalId:e.fromGlobalId,networkSourceId:e.fromNetworkSourceId,terminalId:e.fromTerminalId})}writeFromNetworkElement(o,e){o&&(e.fromGlobalId=o.globalId,e.fromNetworkSourceId=o.networkSourceId,e.fromTerminalId=o.terminalId)}readToNetworkElement(o,e){return new m({globalId:e.toGlobalId,networkSourceId:e.toNetworkSourceId,terminalId:e.toTerminalId})}writeToNetworkElement(o,e){o&&(e.toGlobalId=o.globalId,e.toNetworkSourceId=o.networkSourceId,e.toTerminalId=o.terminalId)}};o([r({type:String,json:{write:!0}})],p.prototype,"globalId",void 0),o([r({type:i.apiValues,json:{type:i.jsonValues,read:i.read,write:i.write}})],p.prototype,"associationType",void 0),o([r({type:m,json:{write:{target:{fromGlobalId:{type:String},fromNetworkSourceId:{type:Number},fromTerminalId:{type:Number}}},read:{source:["fromGlobalId","fromNetworkSourceId","fromTerminalId"]}}})],p.prototype,"fromNetworkElement",void 0),o([t("fromNetworkElement")],p.prototype,"readFromNetworkElement",null),o([s("fromNetworkElement")],p.prototype,"writeFromNetworkElement",null),o([r({type:m,json:{write:{target:{toGlobalId:{type:String},toNetworkSourceId:{type:Number},toTerminalId:{type:Number}}},read:{source:["toGlobalId","toNetworkSourceId","toTerminalId"]}}})],p.prototype,"toNetworkElement",void 0),o([t("toNetworkElement")],p.prototype,"readToNetworkElement",null),o([s("toNetworkElement")],p.prototype,"writeToNetworkElement",null),o([r({type:n,json:{write:!0}})],p.prototype,"geometry",void 0),o([r({type:String,json:{write:!0}})],p.prototype,"errorMessage",void 0),o([r({type:Number,json:{write:!0}})],p.prototype,"percentAlong",void 0),o([r({type:Number,json:{write:!0}})],p.prototype,"errorCode",void 0),o([r({type:Boolean,json:{write:!0}})],p.prototype,"isContentVisible",void 0),o([r({type:Number,json:{write:!0}})],p.prototype,"status",void 0),p=o([l("esri.rest.networks.support.Association")],p);export{p as default};
5
+ import{_ as t}from"../../../chunks/tslib.es6.js";import o 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{reader as r}from"../../../core/accessorSupport/decorators/reader.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{writer as n}from"../../../core/accessorSupport/decorators/writer.js";import m from"../../../geometry/Polyline.js";import{associationTypeKebabDict as s}from"../../../networks/support/typeUtils.js";import l from"./NetworkElement.js";import p from"./TelecomNetworkElement.js";let d=class extends o{constructor(t){super(t),this.globalId=null,this.associationType=null,this.fromNetworkElement=null,this.toNetworkElement=null,this.geometry=null,this.errorMessage=null,this.percentAlong=null,this.errorCode=null,this.isContentVisible=null,this.status=null}readFromNetworkElement(t,o){return o.fromFirstUnit||o.fromNumUnits?new p({globalId:o.fromGlobalId,networkSourceId:o.fromNetworkSourceId,terminalId:o.fromTerminalId,firstUnit:o.fromFirstUnit,numUnits:o.fromNumUnits}):new l({globalId:o.fromGlobalId,networkSourceId:o.fromNetworkSourceId,terminalId:o.fromTerminalId})}writeFromNetworkElement(t,o){if(t&&(o.fromGlobalId=t.globalId,o.fromNetworkSourceId=t.networkSourceId,o.fromTerminalId=t.terminalId,"telecomNetworkElement"===t.type)){const e=t;o.fromFirstUnit=e.firstUnit,o.fromNumUnits=e.numUnits}}readToNetworkElement(t,o){return o.toFirstUnit||o.toNumUnits?new p({globalId:o.toGlobalId,networkSourceId:o.toNetworkSourceId,terminalId:o.toTerminalId,firstUnit:o.toFirstUnit,numUnits:o.toNumUnits}):new l({globalId:o.toGlobalId,networkSourceId:o.toNetworkSourceId,terminalId:o.toTerminalId})}writeToNetworkElement(t,o){if(t&&(o.toGlobalId=t.globalId,o.toNetworkSourceId=t.networkSourceId,o.toTerminalId=t.terminalId,"telecomNetworkElement"===t.type)){const e=t;o.toFirstUnit=e.firstUnit,o.toNumUnits=e.numUnits}}};t([e({type:String,json:{write:!0}})],d.prototype,"globalId",void 0),t([e({type:s.apiValues,json:{type:s.jsonValues,read:s.read,write:s.write}})],d.prototype,"associationType",void 0),t([e({type:l,json:{write:{target:{fromGlobalId:{type:String},fromNetworkSourceId:{type:Number},fromTerminalId:{type:Number},fromFirstUnit:{type:Number},fromNumUnits:{type:Number}}},read:{source:["fromGlobalId","fromNetworkSourceId","fromTerminalId","fromFirstUnit","fromNumUnits"]}}})],d.prototype,"fromNetworkElement",void 0),t([r("fromNetworkElement")],d.prototype,"readFromNetworkElement",null),t([n("fromNetworkElement")],d.prototype,"writeFromNetworkElement",null),t([e({type:l,json:{write:{target:{toGlobalId:{type:String},toNetworkSourceId:{type:Number},toTerminalId:{type:Number},toFirstUnit:{type:Number},toNumUnits:{type:Number}}},read:{source:["toGlobalId","toNetworkSourceId","toTerminalId","toFirstUnit","toNumUnits"]}}})],d.prototype,"toNetworkElement",void 0),t([r("toNetworkElement")],d.prototype,"readToNetworkElement",null),t([n("toNetworkElement")],d.prototype,"writeToNetworkElement",null),t([e({type:m,json:{write:!0}})],d.prototype,"geometry",void 0),t([e({type:String,json:{write:!0}})],d.prototype,"errorMessage",void 0),t([e({type:Number,json:{write:!0}})],d.prototype,"percentAlong",void 0),t([e({type:Number,json:{write:!0}})],d.prototype,"errorCode",void 0),t([e({type:Boolean,json:{write:!0}})],d.prototype,"isContentVisible",void 0),t([e({type:Number,json:{write:!0}})],d.prototype,"status",void 0),d=t([i("esri.rest.networks.support.Association")],d);export{d as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import"../../../chunks/tslib.es6.js";import"../../../core/JSONSupport.js";import"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import"../../../core/accessorSupport/decorators/subclass.js";export{N as default}from"../../../chunks/NetworkElement.js";
5
+ import{_ as o}from"../../../chunks/tslib.es6.js";import t 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 r}from"../../../core/accessorSupport/decorators/subclass.js";let s=class extends t{constructor(o){super(o),this.type="networkElement",this.assetGroupCode=null,this.assetTypeCode=null,this.globalId=null,this.networkSourceId=null,this.objectId=null,this.positionFrom=null,this.positionTo=null,this.terminalId=null}};o([e({json:{write:!1}})],s.prototype,"type",void 0),o([e({type:Number,json:{write:!0}})],s.prototype,"assetGroupCode",void 0),o([e({type:Number,json:{write:!0}})],s.prototype,"assetTypeCode",void 0),o([e({type:String,json:{write:!0}})],s.prototype,"globalId",void 0),o([e({type:Number,json:{write:!0}})],s.prototype,"networkSourceId",void 0),o([e({type:Number,json:{write:!0}})],s.prototype,"objectId",void 0),o([e({type:Number,json:{write:!0}})],s.prototype,"positionFrom",void 0),o([e({type:Number,json:{write:!0}})],s.prototype,"positionTo",void 0),o([e({type:Number,json:{write:!0}})],s.prototype,"terminalId",void 0),s=o([r("esri.rest.networks.support.NetworkElement")],s);export{s as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/JSONSupport.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import{ensureClass as o}from"../../../core/accessorSupport/ensureType.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{associationTypeKebabDict as p}from"../../../networks/support/typeUtils.js";import{N as i}from"../../../chunks/NetworkElement.js";var m;let n=m=class extends t{static from(e){return o(m,e)}constructor(e){super(e),this.returnDeletes=!1,this.elements=[],this.types=[],this.gdbVersion=null,this.moment=null}};e([r({type:Boolean,json:{write:!0}})],n.prototype,"returnDeletes",void 0),e([r({type:[i],json:{write:!0}})],n.prototype,"elements",void 0),e([r({type:[p.apiValues],json:{type:p.jsonValues,read:p.read,write:p.write}})],n.prototype,"types",void 0),e([r({type:String,json:{write:!0}})],n.prototype,"gdbVersion",void 0),e([r({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.moment=e?.getTime()}}}})],n.prototype,"moment",void 0),n=m=e([s("esri.rest.networks.support.QueryAssociationsParameters")],n);export{n as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/JSONSupport.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import{ensureClass as o}from"../../../core/accessorSupport/ensureType.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{associationTypeKebabDict as p}from"../../../networks/support/typeUtils.js";import i from"./NetworkElement.js";var m;let n=m=class extends t{static from(e){return o(m,e)}constructor(e){super(e),this.returnDeletes=!1,this.elements=[],this.types=[],this.gdbVersion=null,this.moment=null}};e([r({type:Boolean,json:{write:!0}})],n.prototype,"returnDeletes",void 0),e([r({type:[i],json:{write:!0}})],n.prototype,"elements",void 0),e([r({type:[p.apiValues],json:{type:p.jsonValues,read:p.read,write:p.write}})],n.prototype,"types",void 0),e([r({type:String,json:{write:!0}})],n.prototype,"gdbVersion",void 0),e([r({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.moment=e?.getTime()}}}})],n.prototype,"moment",void 0),n=m=e([s("esri.rest.networks.support.QueryAssociationsParameters")],n);export{n as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../chunks/tslib.es6.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import{N as e}from"../../../chunks/NetworkElement.js";export{a as default}from"../../../chunks/NetworkElement.js";let s=class extends e{constructor(t){super(t),this.type="telecomNetworkElement",this.firstUnit=null,this.numUnits=null,this.nextUnitId=null}};t([o({json:{write:!1}})],s.prototype,"type",void 0),t([o({json:{write:!0}})],s.prototype,"firstUnit",void 0),t([o({json:{write:!0}})],s.prototype,"numUnits",void 0),t([o({json:{write:!0}})],s.prototype,"nextUnitId",void 0),s=t([r("esri.rest.networks.support.TelecomNetworkElement")],s);
5
+ import{_ as o}from"../../../chunks/tslib.es6.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import e from"./NetworkElement.js";let s=class extends e{constructor(o){super(o),this.type="telecomNetworkElement",this.firstUnit=null,this.numUnits=null}};o([t({json:{write:!1}})],s.prototype,"type",void 0),o([t({json:{write:!0}})],s.prototype,"firstUnit",void 0),o([t({json:{write:!0}})],s.prototype,"numUnits",void 0),s=o([r("esri.rest.networks.support.TelecomNetworkElement")],s);export{s as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../../chunks/tslib.es6.js";import t 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 r}from"../../../core/accessorSupport/decorators/subclass.js";import s from"./AggregatedGeometry.js";import n from"./FunctionResult.js";import{N as i}from"../../../chunks/NetworkElement.js";let p=class extends t{constructor(o){super(o),this.aggregatedGeometry=null,this.elements=null,this.globalFunctionResults=null,this.kFeaturesForKNNFound=!1,this.startingPointsIgnored=!1,this.warnings=null}};o([e({type:s,json:{write:!0},readOnly:!0})],p.prototype,"aggregatedGeometry",void 0),o([e({type:[i],json:{write:!0},readOnly:!0})],p.prototype,"elements",void 0),o([e({type:[n],json:{write:!0},readOnly:!0})],p.prototype,"globalFunctionResults",void 0),o([e({type:Boolean,json:{write:!0},readOnly:!0})],p.prototype,"kFeaturesForKNNFound",void 0),o([e({type:Boolean,json:{write:!0},readOnly:!0})],p.prototype,"startingPointsIgnored",void 0),o([e({type:[String],json:{write:!0},readOnly:!0})],p.prototype,"warnings",void 0),p=o([r("esri.rest.networks.support.TraceResult")],p);export{p as default};
5
+ import{_ as o}from"../../../chunks/tslib.es6.js";import t 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 r}from"../../../core/accessorSupport/decorators/subclass.js";import s from"./AggregatedGeometry.js";import n from"./FunctionResult.js";import i from"./NetworkElement.js";let p=class extends t{constructor(o){super(o),this.aggregatedGeometry=null,this.elements=null,this.globalFunctionResults=null,this.kFeaturesForKNNFound=!1,this.startingPointsIgnored=!1,this.warnings=null}};o([e({type:s,json:{write:!0},readOnly:!0})],p.prototype,"aggregatedGeometry",void 0),o([e({type:[i],json:{write:!0},readOnly:!0})],p.prototype,"elements",void 0),o([e({type:[n],json:{write:!0},readOnly:!0})],p.prototype,"globalFunctionResults",void 0),o([e({type:Boolean,json:{write:!0},readOnly:!0})],p.prototype,"kFeaturesForKNNFound",void 0),o([e({type:Boolean,json:{write:!0},readOnly:!0})],p.prototype,"startingPointsIgnored",void 0),o([e({type:[String],json:{write:!0},readOnly:!0})],p.prototype,"warnings",void 0),p=o([r("esri.rest.networks.support.TraceResult")],p);export{p as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{neverReached as t}from"../../../core/compilerUtils.js";import{generateUID as e}from"../../../core/uid.js";import r from"../../../geometry/SpatialReference.js";import{getGeometryZScaler as s}from"../../../geometry/support/zscale.js";import{DehydratedFeatureSetClass as i,removeLargeStringAttributes as o,DehydratedFeatureClass as n}from"../../../layers/graphics/dehydratedFeatures.js";import{unquantizeOptimizedGeometry as a,convertToGeometry as h}from"../../../layers/graphics/featureConversionUtils.js";import l from"../../../layers/support/Field.js";function u(t,e){return e}function p(t,e,r,s){switch(r){case 0:return f(t,e+s,0);case 1:return"lowerLeft"===t.originPosition?f(t,e+s,1):y(t,e+s,1)}}function d(t,e,r,s){return 2===r?f(t,e,2):p(t,e,r,s)}function c(t,e,r,s){return 2===r?f(t,e,3):p(t,e,r,s)}function m(t,e,r,s){return 3===r?f(t,e,3):d(t,e,r,s)}function f({translate:t,scale:e},r,s){return t[s]+r*e[s]}function y({translate:t,scale:e},r,s){return t[s]-r*e[s]}class _{constructor(t){this._options=t,this.geometryTypes=["point","multipoint","polyline","polygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=u,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{},this._missingAttributes=[]}get missingAttributes(){return this._missingAttributes}createFeatureResult(){return new i}finishFeatureResult(t){if(this._options.applyTransform&&(t.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!t.hasZ)return;const e=s(t.geometryType,this._options.sourceSpatialReference,t.spatialReference);if(null!=e)for(const r of t.features)e(r.geometry)}createSpatialReference(){return new r}addField(t,e){t.fields.push(l.fromJSON(e));const r=t.fields.map((t=>t.name));this._attributesConstructor=function(){for(const t of r)this[t]=null}}addFeature(t,e){const r=this._options.maxStringAttributeLength,s=this._options.maxStringAttributeFields;o(e.attributes,s,r,(r=>{const s=e.attributes[t.objectIdFieldName];null!=s&&this._missingAttributes.push({objectId:s,attribute:r})})),t.features.push(e)}addQueryGeometry(t,e){const{queryGeometry:r,queryGeometryType:s}=e,i=this._transform?a(r.clone(),r,!1,!1,this._transform):r.clone(),o=h(i,s,!1,!1);switch(s){case"esriGeometryPoint":o.type="point";break;case"esriGeometryPolygon":o.type="polygon";break;case"esriGeometryPolyline":o.type="polyline";break;case"esriGeometryMultipoint":o.type="multipoint"}t.queryGeometryType=s,t.queryGeometry=o}prepareFeatures(e){switch(this._transform=e.transform??null,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"point":this.addCoordinate=(t,e,r)=>this.addCoordinatePoint(t,e,r),this.createGeometry=t=>this.createPointGeometry(t);break;case"polygon":this.addCoordinate=(t,e,r)=>this._addCoordinatePolygon(t,e,r),this.createGeometry=t=>this._createPolygonGeometry(t);break;case"polyline":this.addCoordinate=(t,e,r)=>this._addCoordinatePolyline(t,e,r),this.createGeometry=t=>this._createPolylineGeometry(t);break;case"multipoint":this.addCoordinate=(t,e,r)=>this._addCoordinateMultipoint(t,e,r),this.createGeometry=t=>this._createMultipointGeometry(t);break;case"mesh":case"extent":break;default:t(e.geometryType)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,new n(e(),null,new this._attributesConstructor)}allocateCoordinates(){const t=this._lengths.reduce(((t,e)=>t+e),0);this._coordinateBuffer=new Float64Array(t*this._vertexDimension),this._coordinateBufferPtr=0}addLength(t,e){0===this._lengths.length&&(this._toAddInCurrentPath=e),this._lengths.push(e)}createPointGeometry(t){const e={type:"point",x:0,y:0,spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM};return e.hasZ&&(e.z=0),e.hasM&&(e.m=0),e}addCoordinatePoint(t,e,r){const s=this._transform?this._applyTransform(this._transform,e,r,0):e;if(null!=s)switch(r){case 0:t.x=s;break;case 1:t.y=s;break;case 2:t.hasZ?t.z=s:t.m=s;break;case 3:t.m=s}}_transformPathLikeValue(t,e){let r=0;return e<=1&&(r=this._previousCoordinate[e],this._previousCoordinate[e]+=t),this._transform?this._applyTransform(this._transform,t,e,r):t}_addCoordinatePolyline(t,e,r){this._dehydratedAddPointsCoordinate(t.paths,e,r)}_addCoordinatePolygon(t,e,r){this._dehydratedAddPointsCoordinate(t.rings,e,r)}_addCoordinateMultipoint(t,e,r){0===r&&t.points.push([]);const s=this._transformPathLikeValue(e,r);t.points[t.points.length-1].push(s)}_createPolygonGeometry(t){return{type:"polygon",rings:[[]],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_createPolylineGeometry(t){return{type:"polyline",paths:[[]],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_createMultipointGeometry(t){return{type:"multipoint",points:[],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_dehydratedAddPointsCoordinate(t,e,r){0===r&&0==this._toAddInCurrentPath--&&(t.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const s=this._transformPathLikeValue(e,r),i=t[t.length-1],o=this._coordinateBuffer;if(o){if(0===r){const t=this._coordinateBufferPtr*Float64Array.BYTES_PER_ELEMENT;i.push(new Float64Array(o.buffer,t,this._vertexDimension))}o[this._coordinateBufferPtr++]=s}}_deriveApplyTransform(t){const{hasZ:e,hasM:r}=t;return e&&r?m:e?d:r?c:p}}export{_ as DehydratedFeatureSetParserContext};
5
+ import{neverReached as t}from"../../../core/compilerUtils.js";import{generateUID as e}from"../../../core/uid.js";import r from"../../../geometry/SpatialReference.js";import{getGeometryZScaler as s}from"../../../geometry/support/zscale.js";import{DehydratedFeatureSetClass as i,removeLargeStringAttributes as o,DehydratedFeatureClass as n}from"../../../layers/graphics/dehydratedFeatures.js";import{unquantizeOptimizedGeometry as a,convertToGeometry as h}from"../../../layers/graphics/featureConversionUtils.js";import l from"../../../layers/support/Field.js";function u(t,e){return e}function p(t,e,r,s){switch(r){case 0:return f(t,e+s,0);case 1:return"lowerLeft"===t.originPosition?f(t,e+s,1):y(t,e+s,1)}}function d(t,e,r,s){return 2===r?f(t,e,2):p(t,e,r,s)}function c(t,e,r,s){return 2===r?f(t,e,3):p(t,e,r,s)}function m(t,e,r,s){return 3===r?f(t,e,3):d(t,e,r,s)}function f({translate:t,scale:e},r,s){return t[s]+r*e[s]}function y({translate:t,scale:e},r,s){return t[s]-r*e[s]}class _{constructor(t){this._options=t,this.geometryTypes=["point","multipoint","polyline","polygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=u,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{},this._missingAttributes=[]}get missingAttributes(){return this._missingAttributes}createFeatureResult(){return new i}finishFeatureResult(t){if(this._options.applyTransform&&(t.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!t.hasZ)return;const e=s(t.geometryType,this._options.sourceSpatialReference,t.spatialReference);if(null!=e)for(const r of t.features)e(r.geometry)}createSpatialReference(){return new r}addField(t,e){t.fields.push(l.fromJSON(e));const r=t.fields.map((t=>t.name));this._attributesConstructor=function(){for(const t of r)this[t]=null}}addFeature(t,e){const r=this._options.maxStringAttributeLength,s=this._options.maxStringAttributeFields;o(e.attributes,s,r,(r=>{const s=e.attributes[t.objectIdFieldName];null!=s&&this._missingAttributes.push({objectId:s,attribute:r})})),t.features.push(e)}addQueryGeometry(t,e){const{queryGeometry:r,queryGeometryType:s}=e,i=this._transform?a(r.clone(),r,!1,!1,this._transform):r.clone(),o=h(i,s,!1,!1);switch(s){case"esriGeometryPoint":o.type="point";break;case"esriGeometryPolygon":o.type="polygon";break;case"esriGeometryPolyline":o.type="polyline";break;case"esriGeometryMultipoint":o.type="multipoint"}t.queryGeometryType=s,t.queryGeometry=o}prepareFeatures(e){switch(this._transform=e.transform??null,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"point":this.addCoordinate=(t,e,r)=>this.addCoordinatePoint(t,e,r),this.createGeometry=t=>this.createPointGeometry(t);break;case"polygon":this.addCoordinate=(t,e,r)=>this._addCoordinatePolygon(t,e,r),this.createGeometry=t=>this._createPolygonGeometry(t);break;case"polyline":this.addCoordinate=(t,e,r)=>this._addCoordinatePolyline(t,e,r),this.createGeometry=t=>this._createPolylineGeometry(t);break;case"multipoint":this.addCoordinate=(t,e,r)=>this._addCoordinateMultipoint(t,e,r),this.createGeometry=t=>this._createMultipointGeometry(t);break;case"mesh":case"extent":break;default:t(e.geometryType)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,new n(e(),null,new this._attributesConstructor)}allocateCoordinates(){const t=this._lengths.reduce(((t,e)=>t+e),0);this._coordinateBuffer=new Float64Array(t*this._vertexDimension),this._coordinateBufferPtr=0}addLength(t,e){0===this._lengths.length&&(this._toAddInCurrentPath=e),this._lengths.push(e)}createPointGeometry(t){const e={type:"point",x:0,y:0,spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM};return e.hasZ&&(e.z=0),e.hasM&&(e.m=0),e}addCoordinatePoint(t,e,r){const s=this._transform?this._applyTransform(this._transform,e,r,0):e;if(null!=s)switch(r){case 0:t.x=s;break;case 1:t.y=s;break;case 2:t.hasZ?t.z=s:t.m=s;break;case 3:t.m=s}}_transformPathLikeValue(t,e){let r=0;return e<=1&&(r=this._previousCoordinate[e],this._previousCoordinate[e]+=t),this._transform?this._applyTransform(this._transform,t,e,r):t}_addCoordinatePolyline(t,e,r){this._dehydratedAddPointsCoordinate(t.paths,e,r)}_addCoordinatePolygon(t,e,r){this._dehydratedAddPointsCoordinate(t.rings,e,r)}_addCoordinateMultipoint(t,e,r){0===r&&t.points.push([]);const s=this._transformPathLikeValue(e,r);t.points[t.points.length-1].push(s)}_createPolygonGeometry(t){return{type:"polygon",rings:[[]],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_createPolylineGeometry(t){return{type:"polyline",paths:[[]],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_createMultipointGeometry(t){return{type:"multipoint",points:[],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_dehydratedAddPointsCoordinate(t,e,r){0===r&&0===this._toAddInCurrentPath--&&(t.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const s=this._transformPathLikeValue(e,r),i=t[t.length-1],o=this._coordinateBuffer;if(o){if(0===r){const t=this._coordinateBufferPtr*Float64Array.BYTES_PER_ELEMENT;i.push(new Float64Array(o.buffer,t,this._vertexDimension))}o[this._coordinateBufferPtr++]=s}}_deriveApplyTransform(t){const{hasZ:e,hasM:r}=t;return e&&r?m:e?d:r?c:p}}export{_ as DehydratedFeatureSetParserContext};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{assertIsSome as e}from"../../../core/maybe.js";import{getGeometryZScaler as t}from"../../../geometry/support/zscale.js";import{unquantizeOptimizedGeometry as r,convertToGeometry as s}from"../../../layers/graphics/featureConversionUtils.js";function o(e,t){return t}function i(e,t,r,s){switch(r){case 0:return u(e,t+s,0);case 1:return"lowerLeft"===e.originPosition?u(e,t+s,1):l(e,t+s,1)}}function n(e,t,r,s){return 2===r?u(e,t,2):i(e,t,r,s)}function a(e,t,r,s){return 2===r?0===t?0:u(e,t,3):i(e,t,r,s)}function h(e,t,r,s){return 3===r?0===t?0:u(e,t,3):n(e,t,r,s)}function u({translate:e,scale:t},r,s){return e[s]+r*t[s]}function l({translate:e,scale:t},r,s){return e[s]-r*t[s]}class d{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=o,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._mValueOffset=null,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const r=t(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=r)for(const t of e.features)r(t.geometry)}createSpatialReference(){return{}}addField(t,r){const s=t.fields;e(s),s.push(r);const o=s.map((e=>e.name));this._attributesConstructor=function(){for(const e of o)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._mValueOffset=null,this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&(this._mValueOffset=this._vertexDimension,this._vertexDimension++),e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,r){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:o,queryGeometryType:i}=t,n=this._transform?r(o.clone(),o,!1,!1,this._transform):o.clone(),a=s(n,i,!1,!1);e.queryGeometryType=i,e.queryGeometry={...a}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const s=this._transform;switch(t=this._applyTransform(s,t,r,0),r){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let r=0;t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const s=this._transform;return null!==this._mValueOffset&&0===e&&t>0&&!(t%this._mValueOffset)?0:this._applyTransform(s,e,t,r)}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const s=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(s)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const s=this._transformPathLikeValue(t,r),o=e[e.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),o.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=s}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?h:t?n:r?a:i}}export{d as JSONFeatureSetParserContext};
5
+ import{assertIsSome as e}from"../../../core/maybe.js";import{getGeometryZScaler as t}from"../../../geometry/support/zscale.js";import{unquantizeOptimizedGeometry as r,convertToGeometry as s}from"../../../layers/graphics/featureConversionUtils.js";function o(e,t){return t}function i(e,t,r,s){switch(r){case 0:return u(e,t+s,0);case 1:return"lowerLeft"===e.originPosition?u(e,t+s,1):l(e,t+s,1)}}function n(e,t,r,s){return 2===r?u(e,t,2):i(e,t,r,s)}function a(e,t,r,s){return 2===r?0===t?0:u(e,t,3):i(e,t,r,s)}function h(e,t,r,s){return 3===r?0===t?0:u(e,t,3):n(e,t,r,s)}function u({translate:e,scale:t},r,s){return e[s]+r*t[s]}function l({translate:e,scale:t},r,s){return e[s]-r*t[s]}class d{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=o,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._mValueOffset=null,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const r=t(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=r)for(const t of e.features)r(t.geometry)}createSpatialReference(){return{}}addField(t,r){const s=t.fields;e(s),s.push(r);const o=s.map((e=>e.name));this._attributesConstructor=function(){for(const e of o)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._mValueOffset=null,this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&(this._mValueOffset=this._vertexDimension,this._vertexDimension++),e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,r){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:o,queryGeometryType:i}=t,n=this._transform?r(o.clone(),o,!1,!1,this._transform):o.clone(),a=s(n,i,!1,!1);e.queryGeometryType=i,e.queryGeometry={...a}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const s=this._transform;switch(t=this._applyTransform(s,t,r,0),r){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let r=0;t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const s=this._transform;return null!==this._mValueOffset&&0===e&&t>0&&!(t%this._mValueOffset)?0:this._applyTransform(s,e,t,r)}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const s=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(s)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0===this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const s=this._transformPathLikeValue(t,r),o=e[e.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),o.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=s}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?h:t?n:r?a:i}}export{d as JSONFeatureSetParserContext};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../request.js";import{srToRESTValue as t}from"../../../geometry/support/spatialReferenceUtils.js";import{mapParameters as o}from"../../operations/urlUtils.js";function r(e,o){const r=e.toJSON();return r.objectIds&&(r.objectIds=r.objectIds.join(",")),r.orderByFields&&(r.orderByFields=r.orderByFields.join(",")),r.outFields&&!o?.returnCountOnly?r.outFields.includes("*")?r.outFields="*":r.outFields=r.outFields.join(","):delete r.outFields,r.outSR&&(r.outSR=t(r.outSR)),r.dynamicDataSource&&(r.layer=JSON.stringify({source:r.dynamicDataSource}),delete r.dynamicDataSource),r}async function s(e,t,o){const r=await a(e,t,o),s=r.data,n=s.geometryType,d=s.spatialReference,c={};for(const a of s.relatedRecordGroups){const e={fields:void 0,objectIdFieldName:void 0,geometryType:n,spatialReference:d,hasZ:!!s.hasZ,hasM:!!s.hasM,features:a.relatedRecords};if(null!=a.objectId)c[a.objectId]=e;else for(const t of Object.keys(a))"relatedRecords"!==t&&(c[a[t]]=e)}return{...r,data:c}}async function n(e,t,o){const r=await a(e,t,o,{returnCountOnly:!0}),s=r.data,n={};for(const a of s.relatedRecordGroups)null!=a.objectId&&(n[a.objectId]=a.count);return{...r,data:n}}async function a(t,s,n={},a){const d=o({...t.query,f:"json",...a,...r(s,a)});return e(t.path+"/queryRelatedRecords",{...n,query:{...n.query,...d}})}export{s as executeRelationshipQuery,n as executeRelationshipQueryForCount,r as toQueryStringParameters};
5
+ import e from"../../../request.js";import{srToRESTValue as t}from"../../../geometry/support/spatialReferenceUtils.js";import{mapParameters as o}from"../../operations/urlUtils.js";function r(e,o){const r=e.toJSON();return r.objectIds&&(r.objectIds=r.objectIds.join(",")),r.orderByFields&&(r.orderByFields=r.orderByFields.join(",")),r.outFields&&!o?.returnCountOnly?r.outFields.includes("*")?r.outFields="*":r.outFields=r.outFields.join(","):delete r.outFields,r.outSR&&(r.outSR=t(r.outSR)),r.dynamicDataSource&&(r.layer=JSON.stringify({source:r.dynamicDataSource}),delete r.dynamicDataSource),r}async function s(e,t,o){const r=await a(e,t,o),s=r.data,n=s.geometryType,d=s.spatialReference,c={};for(const a of s.relatedRecordGroups){const e={fields:void 0,geometryType:n,spatialReference:d,hasZ:!!s.hasZ,hasM:!!s.hasM,features:a.relatedRecords};if(null!=a.objectId)c[a.objectId]=e;else for(const t of Object.keys(a))"relatedRecords"!==t&&(c[a[t]]=e)}return{...r,data:c}}async function n(e,t,o){const r=await a(e,t,o,{returnCountOnly:!0}),s=r.data,n={};for(const a of s.relatedRecordGroups)null!=a.objectId&&(n[a.objectId]=a.count);return{...r,data:n}}async function a(t,s,n={},a){const d=o({...t.query,f:"json",...a,...r(s,a)});return e(t.path+"/queryRelatedRecords",{...n,query:{...n.query,...d}})}export{s as executeRelationshipQuery,n as executeRelationshipQueryForCount,r as toQueryStringParameters};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import{pickRandom as t}from"../../../core/arrayUtils.js";import r from"../../../core/Error.js";import a from"../../../core/Logger.js";import{assertIsSome as i}from"../../../core/maybe.js";import{timeout as s,throwIfAborted as o}from"../../../core/promiseUtils.js";import{whenOnce as n}from"../../../core/reactiveUtils.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import{subclass as u}from"../../../core/accessorSupport/decorators/subclass.js";import{toQuantizationTransform as m}from"../../../geometry/support/quantizationUtils.js";import{kebabDict as p}from"../../../layers/support/fieldType.js";import{isTimeOnlyField as y}from"../../../layers/support/fieldUtils.js";import c from"../../../rest/support/QuantizationParameters.js";import{getArcadeForPredominantCategory as f}from"../../statistics/support/predominanceUtils.js";import{summaryStatistics as d,uniqueValues as h,histogram as w,classBreaks as g,heatmapStatistics as F}from"../../statistics/support/statsWorker.js";import{mergeWhereClauses as S}from"../../statistics/support/utils.js";import{WorkerClient as v}from"../../statistics/support/WorkerClient.js";import{getFieldsList as q,isAnyDateField as V,fieldDelimiter as x}from"../utils.js";import _ from"./LayerAdapter.js";import{getHistogramAttributeDefinition as z,getAttributeBinsQuery as T,processQueryAttributeBinsResult as N}from"./support/histogramUtils.js";import{ensureFeaturesJSON as M,getSummaryStatsQuery as L,getSummaryStatisticsFromFeatureSet as E,getViewInfoParams as C,getMissingFields as j,updateQueryWithFeatureFilter as b,getUVQuery as k,getUniqueValuesFromFeatureSet as I,getBins as O,getDomainsForFields as Q,getPredominantCategoriesFromUVInfos as J}from"./support/utils.js";import{processSummaryStatisticsResult as B,createUVResult as P,resolveCBResult as U}from"../../../statistics/utils.js";import{loadArcade as A}from"../../../support/loadArcade.js";const $=5;let G=null,R=class extends _{constructor(){super(...arguments),this._hasLocalSource=!1,this.adapterName="in-memory-layer-adapter"}destroy(){this.workerClient?.destroy()}async _waitForLayerViewUpdate(e){if(!e)throw new r(`${this.adapterName}:insufficient-data`,"layerView is required to fetch the features");const t=new AbortController,i=n((()=>!e.updating),t.signal);await s(i,5e3,t).catch((e=>{throw a.getLogger(this).warn("LayerView is taking too long to update. Aborting fetch from layerView."),e}))}async _fetchFeatureSetFromMemory(e,t,a){const i=this.layer;if(this._hasLocalSource&&"queryFeatures"in i)return i.queryFeatures(e);if(!t)throw new r(`${this.adapterName}:insufficient-data`,"view is required to fetch the features from layerView");const s=await t.whenLayerView(this.layer);return await this._waitForLayerViewUpdate(s),s.queryFeatures(e,{signal:a})}async _fetchFeaturesFromMemory(e,t,a,i){const s=this.layer,o="json"===i;if(this._hasLocalSource&&"queryFeatures"in s){const e=await s.queryFeatures(t);return o?M(e.features):e.features}if(await this._waitForLayerViewUpdate(e),o&&"queryFeaturesJSON"in e&&e.queryFeaturesJSON){const{features:r}=await e.queryFeaturesJSON(t,{signal:a});return r}if(!("queryFeatures"in e))throw new r(`${this.adapterName}:not-supported`,"'queryFeatures' is not supported on the layerView");const n=await e.queryFeatures(t,{signal:a});return o?M(n.features):n.features}_fetchFeaturesForStats(e,t){return q({field:e.field,field2:e.field2,field3:e.field3,normalizationField:e.normalizationField,valueExpression:e.valueExpression}).then((r=>this.getSampleFeatures({sampleSize:-1,view:e.view,returnGeometry:e.returnGeometry,filter:e.filter,requiredFields:r,signal:e.signal},t)))}async _summaryStatsFromClientQuery(e,t){const{view:r,signal:a}=e,i=L(this,e,t),s=await this._fetchFeatureSetFromMemory(i,r,a),o=E(s,V(t)||y(t));return B(o,e.outStatisticTypes)}async _getNormalizationTotalFromMemory(e,t,a){const{featuresJSON:i,graphics:s,layerView:o,query:n}=t,l={include:["sum"]},u=(!i&&!s&&o&&"querySummaryStatistics"in o?await o.querySummaryStatistics(n,{field:e},{signal:a}):i?await this.workerClient.summaryStatistics({field:e,outStatisticTypes:l},i):await d({attribute:{field:e,outStatisticTypes:l},features:s??[]})).sum;if(null==u)throw new r(`${this.adapterName}:invalid`,"invalid normalizationTotal");return u}async _summaryStatsFromMemory(e,t){const{view:r,field:a,valueExpression:i,normalizationType:s,signal:o}=e,n={field:a,valueExpression:i,normalizationType:s,normalizationField:e.normalizationField,normalizationTotal:e.normalizationTotal,minValue:e.minValue,maxValue:e.maxValue,outStatisticTypes:e.outStatisticTypes},{featuresJSON:l,graphics:u,layerView:m,query:y,fieldInfos:c}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"querySummaryStatistics"});return i&&r&&(l||u)&&(n.fieldType=t?.type?p.toJSON(t.type):null,n.viewInfoParams=C(r),n.timeZone=r.timeZone,n.fieldInfos=c),"percent-of-total"===s&&null==e.normalizationTotal&&(n.normalizationTotal=await this._getNormalizationTotalFromMemory(a,{featuresJSON:l,graphics:u,layerView:m,query:y},o)),!l&&!u&&m&&"querySummaryStatistics"in m?m.querySummaryStatistics(y,n,{signal:o}):l?this.workerClient.summaryStatistics(n,l):d({attribute:n,features:u})}async _getFilteredFeatures(e,t){let r=[];if("intersects"===t?.spatialRelationship){const{intersect:a}=await import("../../../geometry/geometryEngineAsync.js"),i=null!=t.geometry?t.geometry:null;for(const t of e){const e=null!=t.geometry?t.geometry:null;if(e&&i){await a(e,i)&&r.push(t)}}}else r=e;return e.length&&"declaredClass"in e[0]&&"esri.Graphic"===e[0].declaredClass?{graphics:r}:{featuresJSON:r}}async _processStatsFromMemoryParams(e){const{features:t,filter:r}=e;if(t?.length)return this._getFilteredFeatures(t,r);const{view:a,field:i,field2:s,field3:o,normalizationField:n,valueExpression:l,layerViewFunc:u,signal:m}=e;let p=e.returnGeometry;if(null==p&&l){if(!G){const{arcadeUtils:e}=await A();G=e}const e=G.hasGeometryOperations(l);e&&await G.enableGeometryOperations(),p=e}let y=null,c=null,f=null,d=null,h=null;if(a)try{const e="subtype-sublayer"===this.layer.type?this.layer.parent:this.layer;y=await a.whenLayerView(e),c=null!=u&&u in y&&"function"==typeof y[u]}catch{c=!1}if(c)try{await this._waitForLayerViewUpdate(y);const e=await q({field:i,field2:s,field3:o,normalizationField:n,valueExpression:l});j(this,e,y).length?c=!1:(f=this.layer.createQuery(),f.outFields=e,f.returnGeometry=!1,b(f,r)),y.suspended&&(c=!1)}catch{c=!1}return c||(d=await this._fetchFeaturesForStats({field:i,field2:s,field3:o,valueExpression:l,normalizationField:n,returnGeometry:p,filter:r,view:a,signal:m},"json"),h=(await q({valueExpression:l})).map((e=>this.getField(e)?.toJSON())).filter(Boolean)),{layerView:y,query:f,featuresJSON:d,fieldInfos:h}}async _uvFromClientQuery(e,t){const{view:r,signal:a}=e,i=k(this,e),s=await this._fetchFeatureSetFromMemory(i,r,a),o=await I(s,{layer:this,field:e.field,field2:e.field2,field3:e.field3,fieldDelimiter:x,view:e.view,signal:e.signal});return P(o,t,e.returnAllCodedValues,x)}async _uvFromMemory(e,t){const{view:r,field:a,valueExpression:i,returnAllCodedValues:s,signal:o}=e,{featuresJSON:n,graphics:l,layerView:u,query:m,fieldInfos:p}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryUniqueValues"}),y={field:a,field2:e.field2,field3:e.field3,fieldDelimiter:x,valueExpression:i,domains:t,returnAllCodedValues:s};return i&&r&&(n||l)&&(y.viewInfoParams=C(r),y.timeZone=r.timeZone,y.fieldInfos=p),!n&&!l&&u&&"queryUniqueValues"in u?u.queryUniqueValues(m,y,{signal:o}):n?this.workerClient.uniqueValues(y,n):h({attribute:y,features:l})}_histogramForField(e){let t=null;return t=null!=e.minValue&&null!=e.maxValue?Promise.resolve({min:e.minValue,max:e.maxValue}):this.summaryStatistics({...e,outStatisticTypes:{include:["min","max","count"]}}).then((e=>{if(!e.count)throw new r(`${this.adapterName}:insufficient-data`,"Either the layer has no features or none of the features have data for the field");return{min:e.min,max:e.max}})),t.then((t=>O(this,{min:t.min,max:t.max},e.field,e.numBins??void 0,e.view,e.filter,e.signal)))}async _histogramFromQueryAttributeBinsFromMemory(e){const{field:t,normalizationType:r,signal:a}=e,i=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryAttributeBins"}),{featuresJSON:s,graphics:o,layerView:n,query:l}=i,u="percent-of-total"===r?e.normalizationTotal??await this._getNormalizationTotalFromMemory(t,i,a):void 0;if(!n||!("queryAttributeBins"in n)||s||o){const t=z(e,i,u);return s?this.workerClient.histogram(t,s):w({attribute:t,features:o})}const{query:m,min:p,max:y}=await T(e,this,u,l?.where);if(!m)return{bins:[],minValue:p,maxValue:y,normalizationTotal:u};const c=await n.queryAttributeBins(m,{signal:a});return N(c,t?this.getField(t):null,{minValue:p,maxValue:y,normalizationTotal:u})}async _histogramFromMemory(e){const{field:t,signal:r}=e,a=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryHistogram"}),{featuresJSON:i,graphics:s,layerView:o,query:n}=a,l="percent-of-total"===e.normalizationType?e.normalizationTotal??await this._getNormalizationTotalFromMemory(t,a,r):void 0,u=z(e,a,l);return!i&&!s&&o&&"queryHistogram"in o?o.queryHistogram(n,u,{signal:r}):i?this.workerClient.histogram(u,i):w({attribute:u,features:s})}_classBreaksFromInterpolation(e){const{minValue:t,maxValue:r}=e,a=e.numClasses||$,i=[],s=(r-t)/a;for(let l=0;l<a;l++){const e=t+l*s;i.push({minValue:e,maxValue:e+s})}i[a-1].maxValue=r;const o={classBreaks:i,normalizationTotal:e.normalizationTotal},n=U(o,e.classificationMethod);return Promise.resolve(n)}async _classBreaksFromMemory(e){const{view:t,field:r,valueExpression:a,signal:i}=e,{featuresJSON:s,graphics:o,layerView:n,query:l,fieldInfos:u}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryClassBreaks"}),m={field:r,valueExpression:a,normalizationType:e.normalizationType,normalizationField:e.normalizationField,normalizationTotal:e.normalizationTotal,minValue:e.minValue,maxValue:e.maxValue,standardDeviationInterval:e.standardDeviationInterval,classificationMethod:e.classificationMethod,numClasses:e.numClasses};return a&&t&&(s||o)&&(m.viewInfoParams=C(t),m.timeZone=t.timeZone,m.fieldInfos=u),"percent-of-total"===e.normalizationType&&null==e.normalizationTotal&&(m.normalizationTotal=await this._getNormalizationTotalFromMemory(r,{featuresJSON:s,graphics:o,layerView:n,query:l},i)),!s&&!o&&n&&"queryClassBreaks"in n?n.queryClassBreaks(l,m,{signal:i}):s?this.workerClient.classBreaks(m,s):g({attribute:m,features:o})}async _heatmapStatsFromMemory(e){const{view:t,field:r,radius:a,signal:s}=e;i(t,"InMemoryLayerAdapter: must have a view");try{const r=await t.whenLayerView(this.layer);if("queryHeatmapStatistics"in r&&!r.updating&&!e.filter)return await r.queryHeatmapStatistics({field:e.field,radius:e.radius})}catch{o(s)}const{featuresJSON:n,graphics:l}=await this._processStatsFromMemoryParams({...e,returnGeometry:!0}),u=new c({extent:t.extent,tolerance:"2d"===t.type?t.state.resolution:t.pixelSizeAt?.(t.center)}),p={field:r,radius:a,transform:m(u),spatialReference:t.spatialReference?.toJSON(),size:t.size};return n?.length||l?.length?n?this.workerClient.heatmapStatistics(p,n):F({attribute:p,features:l}):{min:null,max:null}}getField(e=""){return this.layer.getField(e)}getFieldUsageInfo(e){return this.getField(e)?{supportsLabelingInfo:!0,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:!0,supportsStatistics:!0}:null}getFieldDomain(e,t){return this.layer.getFieldDomain(e,t)}createQuery(){return this.layer.createQuery()}async summaryStatistics(e){const{field:t,valueExpression:a,sqlExpression:i,features:s,view:o}=e,n=t?this.getField(t):null,l=!!a,u="3d"===o?.type;if(!a&&i&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return l||s||u?this._summaryStatsFromMemory(e,n):this._summaryStatsFromClientQuery(e,n)}async uniqueValues(e){const{valueExpression:t,sqlExpression:a,features:i,view:s}=e,o=await Q(e,this),n=!!t,l="3d"===s?.type;if(!t&&a&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return n||i||l?this._uvFromMemory(e,o):this._uvFromClientQuery(e,o)}async histogram(e){const{features:t,valueExpression:a,normalizationType:i,sqlExpression:s}=e,o=t||!!a;if(!a&&s&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return o||i?this._histogramFromMemory(e):this._histogramForField(e)}async classBreaks(e){return!1!==e.analyzeData?this._classBreaksFromMemory(e):this._classBreaksFromInterpolation(e)}async queryFeatureCount(e){const{whereClause:t,view:a,signal:i}=e;if(!a)throw new r(`${this.adapterName}:insufficient-data`,"view is required to fetch the features from layerView");const s=this.layer.createQuery();s.where=S(s.where,t);const o=await a.whenLayerView(this.layer);return await n((()=>!o.updating),i),o.queryFeatureCount(s,{signal:i})}async generateRenderer(e,t){throw new r(`${this.adapterName}:not-supported`,"Layer does not support generateRenderer operation")}async predominantCategories(e){const{fields:t,view:r,signal:a,filter:i}=e,s=f(t),o=await this._uvFromMemory({valueExpression:s,view:r,signal:a,filter:i});return J(o.uniqueValueInfos,t)}async heatmapStatistics(e){return this._heatmapStatsFromMemory(e)}async getSampleFeatures(e,a){const{view:i,sampleSize:s,requiredFields:o,returnGeometry:n,filter:l,signal:u}=e,m=this.layer.createQuery(),p=1;if(m.outSpatialReference=i?.spatialReference,m.returnGeometry=!!n,m.outFields=o,b(m,l),!i)throw new r(`${this.adapterName}:not-supported`,"view is required to get sample features for Layer");const y=await i.whenLayerView(this.layer);if(j(this,o,y).length)throw new r(`${this.adapterName}:not-supported`,"Required fields need to be passed in the outFields for Layer");const c=await this._fetchFeaturesFromMemory(y,m,u,a),f=null!=s&&s>0&&s<=c.length?s:c.length;return t(c,f,p)}load(e){const t=this.layer.load(e).then((async t=>{this.geometryType=t.geometryType,this.objectIdField=t.objectIdField,this.supportsSQLExpression="stream"===t.type||!!t.capabilities?.query?.supportsSqlExpression,this.minScale=t.minScale,this.maxScale=t.maxScale,this.fullExtent="fullExtent"in t?t.fullExtent:t.parent?.fullExtent,this._hasLocalSource=!1,this.hasQueryEngine=!0,this.workerClient=v.getInstance(),await this.workerClient.open(e.signal)}));return this.addResolvingPromise(t),Promise.resolve(this)}};e([l({readOnly:!0})],R.prototype,"adapterName",void 0),e([l({constructOnly:!0})],R.prototype,"layer",void 0),R=e([u("esri.smartMapping.support.adapters.InMemoryLayerAdapter")],R);export{R as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import{pickRandom as t}from"../../../core/arrayUtils.js";import r from"../../../core/Error.js";import a from"../../../core/Logger.js";import{assertIsSome as i}from"../../../core/maybe.js";import{timeout as s,throwIfAborted as o}from"../../../core/promiseUtils.js";import{whenOnce as n}from"../../../core/reactiveUtils.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import{subclass as u}from"../../../core/accessorSupport/decorators/subclass.js";import{toQuantizationTransform as m}from"../../../geometry/support/quantizationUtils.js";import{kebabDict as p}from"../../../layers/support/fieldType.js";import{isTimeOnlyField as y}from"../../../layers/support/fieldUtils.js";import c from"../../../rest/support/QuantizationParameters.js";import{getArcadeForPredominantCategory as f}from"../../statistics/support/predominanceUtils.js";import{summaryStatistics as d,uniqueValues as h,histogram as w,classBreaks as g,heatmapStatistics as F}from"../../statistics/support/statsWorker.js";import{mergeWhereClauses as S}from"../../statistics/support/utils.js";import{WorkerClient as v}from"../../statistics/support/WorkerClient.js";import{getFieldsList as q,isAnyDateField as V,fieldDelimiter as x}from"../utils.js";import _ from"./LayerAdapter.js";import{getHistogramAttributeDefinition as z,getAttributeBinsQuery as T,processQueryAttributeBinsResult as N}from"./support/histogramUtils.js";import{ensureFeaturesJSON as M,getSummaryStatsQuery as L,getSummaryStatisticsFromFeatureSet as C,getViewInfoParams as E,getMissingFields as j,updateQueryWithFeatureFilter as b,getUVQuery as k,getUniqueValuesFromFeatureSet as I,getBins as O,getDomainsForFields as Q,getPredominantCategoriesFromUVInfos as J}from"./support/utils.js";import{processSummaryStatisticsResult as B,createUVResult as P,resolveCBResult as U}from"../../../statistics/utils.js";import{loadArcade as A}from"../../../support/loadArcade.js";const $=5;let G=null,R=class extends _{constructor(){super(...arguments),this._hasLocalSource=!1,this.adapterName="in-memory-layer-adapter"}destroy(){this.workerClient?.destroy()}async _waitForLayerViewUpdate(e){if(!e)throw new r(`${this.adapterName}:insufficient-data`,"layerView is required to fetch the features");const t=new AbortController,i=n((()=>!e.updating),t.signal);await s(i,5e3,t).catch((e=>{throw a.getLogger(this).warn("LayerView is taking too long to update. Aborting fetch from layerView."),e}))}async _fetchFeatureSetFromMemory(e,t,a){const i=this.layer;if(this._hasLocalSource&&"queryFeatures"in i)return i.queryFeatures(e);if(!t)throw new r(`${this.adapterName}:insufficient-data`,"view is required to fetch the features from layerView");const s=await t.whenLayerView(this.layer);return await this._waitForLayerViewUpdate(s),s.queryFeatures(e,{signal:a})}async _fetchFeaturesFromMemory(e,t,a,i){const s=this.layer,o="json"===i;if(this._hasLocalSource&&"queryFeatures"in s){const e=await s.queryFeatures(t);return o?M(e.features):e.features}if(await this._waitForLayerViewUpdate(e),o&&"queryFeaturesJSON"in e&&e.queryFeaturesJSON){const{features:r}=await e.queryFeaturesJSON(t,{signal:a});return r}if(!("queryFeatures"in e))throw new r(`${this.adapterName}:not-supported`,"'queryFeatures' is not supported on the layerView");const n=await e.queryFeatures(t,{signal:a});return o?M(n.features):n.features}_fetchFeaturesForStats(e,t){return q({field:e.field,field2:e.field2,field3:e.field3,normalizationField:e.normalizationField,valueExpression:e.valueExpression}).then((r=>this.getSampleFeatures({sampleSize:-1,view:e.view,returnGeometry:e.returnGeometry,filter:e.filter,requiredFields:r,signal:e.signal},t)))}async _summaryStatsFromClientQuery(e,t){const{view:r,signal:a}=e,i=L(this,e,t),s=await this._fetchFeatureSetFromMemory(i,r,a),o=C(s,V(t)||y(t));return B(o,e.outStatisticTypes)}async _getNormalizationTotalFromMemory(e,t,a){const{featuresJSON:i,graphics:s,layerView:o,query:n}=t,l={include:["sum"]},u=(!i&&!s&&o&&"querySummaryStatistics"in o?await o.querySummaryStatistics(n,{field:e},{signal:a}):i?await this.workerClient.summaryStatistics({field:e,outStatisticTypes:l},i):await d({attribute:{field:e,outStatisticTypes:l},features:s??[]})).sum;if(null==u)throw new r(`${this.adapterName}:invalid`,"invalid normalizationTotal");return u}async _summaryStatsFromMemory(e,t){const{view:r,field:a,valueExpression:i,normalizationType:s,signal:o}=e,n={field:a,valueExpression:i,normalizationType:s,normalizationField:e.normalizationField,normalizationTotal:e.normalizationTotal,minValue:e.minValue,maxValue:e.maxValue,outStatisticTypes:e.outStatisticTypes},{featuresJSON:l,graphics:u,layerView:m,query:y,fieldInfos:c}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"querySummaryStatistics"});return i&&r&&(l||u)&&(n.fieldType=t?.type?p.toJSON(t.type):null,n.viewInfoParams=E(r),n.timeZone=r.timeZone,n.fieldInfos=c),"percent-of-total"===s&&null==e.normalizationTotal&&(n.normalizationTotal=await this._getNormalizationTotalFromMemory(a,{featuresJSON:l,graphics:u,layerView:m,query:y},o)),!l&&!u&&m&&"querySummaryStatistics"in m?m.querySummaryStatistics(y,n,{signal:o}):l?this.workerClient.summaryStatistics(n,l):d({attribute:n,features:u})}async _getFilteredFeatures(e,t){let r=e;const a=t?.geometry;if("intersects"===t?.spatialRelationship&&a){const t=await import("../../../geometry/operators/intersectionOperator.js");r=e.filter((({geometry:e})=>!(!e||!t.execute(e,a))))}return e.length&&"declaredClass"in e[0]&&"esri.Graphic"===e[0].declaredClass?{graphics:r}:{featuresJSON:r}}async _processStatsFromMemoryParams(e){const{features:t,filter:r}=e;if(t?.length)return this._getFilteredFeatures(t,r);const{view:a,field:i,field2:s,field3:o,normalizationField:n,valueExpression:l,layerViewFunc:u,signal:m}=e;let p=e.returnGeometry;if(null==p&&l){if(!G){const{arcadeUtils:e}=await A();G=e}const e=G.hasGeometryOperations(l);e&&await G.enableGeometryOperations(),p=e}let y=null,c=null,f=null,d=null,h=null;if(a)try{const e="subtype-sublayer"===this.layer.type?this.layer.parent:this.layer;y=await a.whenLayerView(e),c=null!=u&&u in y&&"function"==typeof y[u]}catch{c=!1}if(c)try{await this._waitForLayerViewUpdate(y);const e=await q({field:i,field2:s,field3:o,normalizationField:n,valueExpression:l});j(this,e,y).length?c=!1:(f=this.layer.createQuery(),f.outFields=e,f.returnGeometry=!1,b(f,r)),y.suspended&&(c=!1)}catch{c=!1}return c||(d=await this._fetchFeaturesForStats({field:i,field2:s,field3:o,valueExpression:l,normalizationField:n,returnGeometry:p,filter:r,view:a,signal:m},"json"),h=(await q({valueExpression:l})).map((e=>this.getField(e)?.toJSON())).filter(Boolean)),{layerView:y,query:f,featuresJSON:d,fieldInfos:h}}async _uvFromClientQuery(e,t){const{view:r,signal:a}=e,i=k(this,e),s=await this._fetchFeatureSetFromMemory(i,r,a),o=await I(s,{layer:this,field:e.field,field2:e.field2,field3:e.field3,fieldDelimiter:x,view:e.view,signal:e.signal});return P(o,t,e.returnAllCodedValues,x)}async _uvFromMemory(e,t){const{view:r,field:a,valueExpression:i,returnAllCodedValues:s,signal:o}=e,{featuresJSON:n,graphics:l,layerView:u,query:m,fieldInfos:p}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryUniqueValues"}),y={field:a,field2:e.field2,field3:e.field3,fieldDelimiter:x,valueExpression:i,domains:t,returnAllCodedValues:s};return i&&r&&(n||l)&&(y.viewInfoParams=E(r),y.timeZone=r.timeZone,y.fieldInfos=p),!n&&!l&&u&&"queryUniqueValues"in u?u.queryUniqueValues(m,y,{signal:o}):n?this.workerClient.uniqueValues(y,n):h({attribute:y,features:l})}_histogramForField(e){let t=null;return t=null!=e.minValue&&null!=e.maxValue?Promise.resolve({min:e.minValue,max:e.maxValue}):this.summaryStatistics({...e,outStatisticTypes:{include:["min","max","count"]}}).then((e=>{if(!e.count)throw new r(`${this.adapterName}:insufficient-data`,"Either the layer has no features or none of the features have data for the field");return{min:e.min,max:e.max}})),t.then((t=>O(this,{min:t.min,max:t.max},e.field,e.numBins??void 0,e.view,e.filter,e.signal)))}async _histogramFromQueryAttributeBinsFromMemory(e){const{field:t,normalizationType:r,signal:a}=e,i=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryAttributeBins"}),{featuresJSON:s,graphics:o,layerView:n,query:l}=i,u="percent-of-total"===r?e.normalizationTotal??await this._getNormalizationTotalFromMemory(t,i,a):void 0;if(!n||!("queryAttributeBins"in n)||s||o){const t=z(e,i,u);return s?this.workerClient.histogram(t,s):w({attribute:t,features:o})}const{query:m,min:p,max:y}=await T(e,this,u,l?.where);if(!m)return{bins:[],minValue:p,maxValue:y,normalizationTotal:u};const c=await n.queryAttributeBins(m,{signal:a});return N(c,t?this.getField(t):null,{minValue:p,maxValue:y,normalizationTotal:u})}async _histogramFromMemory(e){const{field:t,signal:r}=e,a=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryHistogram"}),{featuresJSON:i,graphics:s,layerView:o,query:n}=a,l="percent-of-total"===e.normalizationType?e.normalizationTotal??await this._getNormalizationTotalFromMemory(t,a,r):void 0,u=z(e,a,l);return!i&&!s&&o&&"queryHistogram"in o?o.queryHistogram(n,u,{signal:r}):i?this.workerClient.histogram(u,i):w({attribute:u,features:s})}_classBreaksFromInterpolation(e){const{minValue:t,maxValue:r}=e,a=e.numClasses||$,i=[],s=(r-t)/a;for(let l=0;l<a;l++){const e=t+l*s;i.push({minValue:e,maxValue:e+s})}i[a-1].maxValue=r;const o={classBreaks:i,normalizationTotal:e.normalizationTotal},n=U(o,e.classificationMethod);return Promise.resolve(n)}async _classBreaksFromMemory(e){const{view:t,field:r,valueExpression:a,signal:i}=e,{featuresJSON:s,graphics:o,layerView:n,query:l,fieldInfos:u}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryClassBreaks"}),m={field:r,valueExpression:a,normalizationType:e.normalizationType,normalizationField:e.normalizationField,normalizationTotal:e.normalizationTotal,minValue:e.minValue,maxValue:e.maxValue,standardDeviationInterval:e.standardDeviationInterval,classificationMethod:e.classificationMethod,numClasses:e.numClasses};return a&&t&&(s||o)&&(m.viewInfoParams=E(t),m.timeZone=t.timeZone,m.fieldInfos=u),"percent-of-total"===e.normalizationType&&null==e.normalizationTotal&&(m.normalizationTotal=await this._getNormalizationTotalFromMemory(r,{featuresJSON:s,graphics:o,layerView:n,query:l},i)),!s&&!o&&n&&"queryClassBreaks"in n?n.queryClassBreaks(l,m,{signal:i}):s?this.workerClient.classBreaks(m,s):g({attribute:m,features:o})}async _heatmapStatsFromMemory(e){const{view:t,field:r,radius:a,signal:s}=e;i(t,"InMemoryLayerAdapter: must have a view");try{const r=await t.whenLayerView(this.layer);if("queryHeatmapStatistics"in r&&!r.updating&&!e.filter)return await r.queryHeatmapStatistics({field:e.field,radius:e.radius})}catch{o(s)}const{featuresJSON:n,graphics:l}=await this._processStatsFromMemoryParams({...e,returnGeometry:!0}),u=new c({extent:t.extent,tolerance:"2d"===t.type?t.state.resolution:t.pixelSizeAt?.(t.center)}),p={field:r,radius:a,transform:m(u),spatialReference:t.spatialReference?.toJSON(),size:t.size};return n?.length||l?.length?n?this.workerClient.heatmapStatistics(p,n):F({attribute:p,features:l}):{min:null,max:null}}getField(e=""){return this.layer.getField(e)}getFieldUsageInfo(e){return this.getField(e)?{supportsLabelingInfo:!0,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:!0,supportsStatistics:!0}:null}getFieldDomain(e,t){return this.layer.getFieldDomain(e,t)}createQuery(){return this.layer.createQuery()}async summaryStatistics(e){const{field:t,valueExpression:a,sqlExpression:i,features:s,view:o}=e,n=t?this.getField(t):null,l=!!a,u="3d"===o?.type;if(!a&&i&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return l||s||u?this._summaryStatsFromMemory(e,n):this._summaryStatsFromClientQuery(e,n)}async uniqueValues(e){const{valueExpression:t,sqlExpression:a,features:i,view:s}=e,o=await Q(e,this),n=!!t,l="3d"===s?.type;if(!t&&a&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return n||i||l?this._uvFromMemory(e,o):this._uvFromClientQuery(e,o)}async histogram(e){const{features:t,valueExpression:a,normalizationType:i,sqlExpression:s}=e,o=t||!!a;if(!a&&s&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return o||i?this._histogramFromMemory(e):this._histogramForField(e)}async classBreaks(e){return!1!==e.analyzeData?this._classBreaksFromMemory(e):this._classBreaksFromInterpolation(e)}async queryFeatureCount(e){const{whereClause:t,view:a,signal:i}=e;if(!a)throw new r(`${this.adapterName}:insufficient-data`,"view is required to fetch the features from layerView");const s=this.layer.createQuery();s.where=S(s.where,t);const o=await a.whenLayerView(this.layer);return await n((()=>!o.updating),i),o.queryFeatureCount(s,{signal:i})}async generateRenderer(e,t){throw new r(`${this.adapterName}:not-supported`,"Layer does not support generateRenderer operation")}async predominantCategories(e){const{fields:t,view:r,signal:a,filter:i}=e,s=f(t),o=await this._uvFromMemory({valueExpression:s,view:r,signal:a,filter:i});return J(o.uniqueValueInfos,t)}async heatmapStatistics(e){return this._heatmapStatsFromMemory(e)}async getSampleFeatures(e,a){const{view:i,sampleSize:s,requiredFields:o,returnGeometry:n,filter:l,signal:u}=e,m=this.layer.createQuery(),p=1;if(m.outSpatialReference=i?.spatialReference,m.returnGeometry=!!n,m.outFields=o,b(m,l),!i)throw new r(`${this.adapterName}:not-supported`,"view is required to get sample features for Layer");const y=await i.whenLayerView(this.layer);if(j(this,o,y).length)throw new r(`${this.adapterName}:not-supported`,"Required fields need to be passed in the outFields for Layer");const c=await this._fetchFeaturesFromMemory(y,m,u,a),f=null!=s&&s>0&&s<=c.length?s:c.length;return t(c,f,p)}load(e){const t=this.layer.load(e).then((async t=>{this.geometryType=t.geometryType,this.objectIdField=t.objectIdField,this.supportsSQLExpression="stream"===t.type||!!t.capabilities?.query?.supportsSqlExpression,this.minScale=t.minScale,this.maxScale=t.maxScale,this.fullExtent="fullExtent"in t?t.fullExtent:t.parent?.fullExtent,this._hasLocalSource=!1,this.hasQueryEngine=!0,this.workerClient=v.getInstance(),await this.workerClient.open(e.signal)}));return this.addResolvingPromise(t),Promise.resolve(this)}};e([l({readOnly:!0})],R.prototype,"adapterName",void 0),e([l({constructOnly:!0})],R.prototype,"layer",void 0),R=e([u("esri.smartMapping.support.adapters.InMemoryLayerAdapter")],R);export{R as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- const e="20250514",c="61e9e7e1b36a140caac2fb8c4ddece5c32e5e4eb";export{e as buildDate,c as commitHash};
5
+ const d="20250515",a="62d03696af5dab58a7b33e6938d9676d8cad386f";export{d as buildDate,a as commitHash};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{GeometryCursor as s}from"../../../geometry/GeometryCursor.js";import{collectMultipath as t}from"../../../geometry/geometryCursorCollectUtils.js";import{getPathLength as i}from"../../../geometry/support/coordsUtils.js";import{setId as h}from"../CIMCursor.js";import{GeometricEffectControlMeasureLineRule as e}from"../enums.js";class r{static{this.instance=null}static local(){return null===r.instance&&(r.instance=new r),r.instance}execute(s,t,i,h,e){return new _(s,t,i)}}class _{constructor(s,t,i){this._defaultPointSize=20,this._inputGeometries=s,this._geomUnitsPerPoint=i,this._rule=t.rule??e.FullGeometry,this._defaultSize=this._defaultPointSize*i}next(){let i;for(;i=this._inputGeometries.next();){const h=this._processGeom(t(i));if(h?.length)return s.fromJSONCIM({paths:h})}return null}_clone(s){return[s[0],s[1]]}_mid(s,t){return[(s[0]+t[0])/2,(s[1]+t[1])/2]}_mix(s,t,i,h){return[s[0]*t+i[0]*h,s[1]*t+i[1]*h]}_add(s,t){return[s[0]+t[0],s[1]+t[1]]}_add2(s,t,i){return[s[0]+t,s[1]+i]}_sub(s,t){return[s[0]-t[0],s[1]-t[1]]}_dist(s,t){return Math.sqrt((s[0]-t[0])*(s[0]-t[0])+(s[1]-t[1])*(s[1]-t[1]))}_norm(s){return Math.sqrt(s[0]*s[0]+s[1]*s[1])}_normalize(s,t=1){const i=t/this._norm(s);s[0]*=i,s[1]*=i}_leftPerpendicular(s){const t=-s[1],i=s[0];s[0]=t,s[1]=i}_leftPerp(s){return[-s[1],s[0]]}_rightPerpendicular(s){const t=s[1],i=-s[0];s[0]=t,s[1]=i}_rightPerp(s){return[s[1],-s[0]]}_dotProduct(s,t){return s[0]*t[0]+s[1]*t[1]}_crossProduct(s,t){return s[0]*t[1]-s[1]*t[0]}_rotateDirect(s,t,i){const h=s[0]*t-s[1]*i,e=s[0]*i+s[1]*t;s[0]=h,s[1]=e}_makeCtrlPt(s){const t=[s[0],s[1]];return h(t,1),t}_addAngledTicks(s,t,i,h){const e=this._sub(i,t);this._normalize(e);const r=this._crossProduct(e,this._sub(h,t));let _;_=r>0?this._rightPerp(e):this._leftPerp(e);const c=Math.abs(r)/2,u=[];u.push([t[0]+(_[0]-e[0])*c,t[1]+(_[1]-e[1])*c]),u.push(t),u.push(i),u.push([i[0]+(_[0]+e[0])*c,i[1]+(_[1]+e[1])*c]),s.push(u)}_addBezier2(s,t,i,h,e){if(0==e--)return void s.push(h);const r=this._mid(t,i),_=this._mid(i,h),c=this._mid(r,_);this._addBezier2(s,t,r,c,e),this._addBezier2(s,c,_,h,e)}_addBezier3(s,t,i,h,e,r){if(0==r--)return void s.push(e);const _=this._mid(t,i),c=this._mid(i,h),u=this._mid(h,e),o=this._mid(_,c),a=this._mid(c,u),n=this._mid(o,a);this._addBezier3(s,t,_,o,n,r),this._addBezier3(s,n,a,u,e,r)}_add90DegArc(s,t,i,h,e){const r=e??this._crossProduct(this._sub(i,t),this._sub(h,t))>0,_=this._mid(t,i),c=this._sub(_,t);r?this._leftPerpendicular(c):this._rightPerpendicular(c),_[0]+=c[0],_[1]+=c[1],this._addBezier3(s,t,this._mix(t,.33333,_,.66667),this._mix(i,.33333,_,.66667),i,4)}_addArrow(s,t,i){const h=t[0],e=t[1],r=t[t.length-1],_=this._sub(h,e),c=this._norm(_);this._normalize(_);const u=Math.abs(this._crossProduct(_,this._sub(r,e)));let o=this._dotProduct(_,this._sub(r,e));o<.05*c?o=.05*c:o>.95*c&&(o=.95*c);const a=.5*u,n=this._leftPerp(_),p=[e[0]+_[0]*o,e[1]+_[1]*o],d=t.length-1,l=[];l.push(i?[-n[0],-n[1]]:n);let b=[-_[0],-_[1]];for(let P=1;P<d-1;P++){const s=this._sub(t[P+1],t[P]);this._normalize(s);const i=this._dotProduct(s,b),h=this._crossProduct(s,b),e=Math.sqrt((1+i)/2),r=this._sub(s,b);this._normalize(r),r[0]/=e,r[1]/=e,l.push(h<0?[-r[0],-r[1]]:r),b=s}l.push(this._rightPerp(b));for(let P=l.length-1;P>0;P--)s.push([t[P][0]+l[P][0]*a,t[P][1]+l[P][1]*a]);s.push([p[0]+l[0][0]*a,p[1]+l[0][1]*a]),s.push([p[0]+l[0][0]*u,p[1]+l[0][1]*u]),s.push(h),s.push([p[0]-l[0][0]*u,p[1]-l[0][1]*u]),s.push([p[0]-l[0][0]*a,p[1]-l[0][1]*a]);for(let P=1;P<l.length;P++)s.push([t[P][0]-l[P][0]*a,t[P][1]-l[P][1]*a])}_addDash(s,t,i){const h=this._norm(i)/7;this._normalize(i);let e=[];for(let r=0;r<=7;r++)e.push([t[0]+i[0]*r*h,t[1]+i[1]*r*h]),1&r&&(s.push(e),e=[])}_cp2(s,t,i){return s.length>=2?s[1]:this._add2(s[0],t*this._defaultSize,i*this._defaultSize)}_cp3(s,t,i,h){if(s.length>=3)return s[2];const e=this._mix(s[0],1-i,t,i),r=this._sub(t,s[0]);return this._normalize(r),this._rightPerpendicular(r),[e[0]+r[0]*h*this._defaultSize,e[1]+r[1]*h*this._defaultSize]}_arrowPath(s){if(s.length>2)return s;const t=s[0],i=this._cp2(s,-4,0),h=this._sub(t,i);this._normalize(h);const e=this._rightPerp(h);return[t,i,[t[0]+(e[0]-h[0])*this._defaultSize,t[1]+(e[1]-h[1])*this._defaultSize]]}_arrowLastSeg(s){const t=s[0],i=this._cp2(s,-4,0);let h;if(s.length>=3)h=s[s.length-1];else{const s=this._sub(t,i);this._normalize(s);const e=this._rightPerp(s);h=[t[0]+(e[0]-s[0])*this._defaultSize,t[1]+(e[1]-s[1])*this._defaultSize]}return[i,h]}_processGeom(s){if(!s)return null;const t=[];for(const r of s){const s=r.length>1&&i(r)<this._defaultSize;if(!r||0===r.length||s)continue;const _=r.length;let c=r[0];switch(this._rule){case e.PerpendicularFromFirstSegment:{const s=this._cp2(r,0,-1),i=this._cp3(r,s,.5,4),h=[];h.push(i),h.push(this._mid(c,s)),t.push(h);break}case e.ReversedFirstSegment:{const s=this._cp2(r,0,-1);t.push([s,c]);break}case e.PerpendicularToSecondSegment:{if(r.length<3)return[];const s=this._cp2(r,-4,1),i=this._cp3(r,s,.882353,-1.94),h=[];h.push(this._mid(s,i)),h.push(c),t.push(h);break}case e.SecondSegmentWithTicks:{if(r.length<3)return[];const s=this._cp2(r,-4,1),i=this._cp3(r,s,.882353,-1.94),h=this._sub(i,s);let e;e=this._crossProduct(h,this._sub(c,s))>0?this._rightPerp(h):this._leftPerp(h);const _=[];_.push([s[0]+(e[0]-h[0])/3,s[1]+(e[1]-h[1])/3]),_.push(s),_.push(i),_.push([i[0]+(e[0]+h[0])/3,i[1]+(e[1]+h[1])/3]),t.push(_);break}case e.DoublePerpendicular:{const s=this._cp2(r,0,-1),i=this._cp3(r,s,.5,3),h=this._mid(c,s),e=this._sub(h,i);this._normalize(e);const _=this._crossProduct(e,this._sub(c,i));this._leftPerpendicular(e);const u=[];u.push(c),u.push([i[0]+e[0]*_,i[1]+e[1]*_]),t.push(u);const o=[];o.push([i[0]-e[0]*_,i[1]-e[1]*_]),o.push(s),t.push(o);break}case e.OppositeToFirstSegment:{const s=this._cp2(r,0,-1),i=this._cp3(r,s,.5,3),h=this._mid(c,s),e=this._sub(h,i);this._normalize(e);const _=this._crossProduct(e,this._sub(c,i));this._leftPerpendicular(e);const u=[];u.push([i[0]+e[0]*_,i[1]+e[1]*_]),u.push([i[0]-e[0]*_,i[1]-e[1]*_]),t.push(u);break}case e.TriplePerpendicular:{const s=this._cp2(r,0,-1),i=this._cp3(r,s,.5,4),h=this._mid(c,s),e=this._sub(h,i);this._normalize(e);const _=this._crossProduct(e,this._sub(c,i));this._leftPerpendicular(e);const u=[];u.push([i[0]+e[0]*_*.8,i[1]+e[1]*_*.8]),u.push([h[0]+.8*(c[0]-h[0]),h[1]+.8*(c[1]-h[1])]),t.push(u),t.push([i,h]);const o=[];o.push([i[0]-e[0]*_*.8,i[1]-e[1]*_*.8]),o.push([h[0]+.8*(s[0]-h[0]),h[1]+.8*(s[1]-h[1])]),t.push(o);break}case e.HalfCircleFirstSegment:{const s=this._cp2(r,0,-1),i=this._cp3(r,s,.5,4),h=this._mid(c,s);let e=this._sub(s,c);const _=Math.cos(Math.PI/18),u=Math.sin(Math.PI/18),o=Math.sqrt((1+_)/2),a=Math.sqrt((1-_)/2),n=[];let p;this._crossProduct(e,this._sub(i,c))>0?(n.push(c),e=this._sub(c,h),p=s):(n.push(s),e=this._sub(s,h),p=c),this._rotateDirect(e,o,a),e[0]/=o,e[1]/=o;for(let t=1;t<=18;t++)n.push(this._add(h,e)),this._rotateDirect(e,_,u);n.push(p),t.push(n);break}case e.HalfCircleSecondSegment:{const s=this._cp2(r,0,-1),i=this._cp3(r,s,1,-1);let h=this._sub(c,s);this._normalize(h);const e=this._crossProduct(h,this._sub(i,s))/2;this._leftPerpendicular(h);const _=[s[0]+h[0]*e,s[1]+h[1]*e];h=this._sub(s,_);const u=Math.cos(Math.PI/18);let o=Math.sin(Math.PI/18);e>0&&(o=-o);const a=[s];for(let t=1;t<=18;t++)this._rotateDirect(h,u,o),a.push(this._add(_,h));t.push(a);break}case e.HalfCircleExtended:{const s=this._cp2(r,0,-2),i=this._cp3(r,s,1,-1);let h;if(_>=4)h=r[3];else{const t=this._sub(c,s);h=this._add(i,t)}const e=this._dist(s,i)/2/.75,u=this._sub(s,c);this._normalize(u,e);const o=this._sub(i,h);this._normalize(o,e);const a=[h,i];t.push(a);const n=[this._clone(i)];this._addBezier3(n,i,this._add(i,o),this._add(s,u),s,4),n.push(c),t.push(n);break}case e.OpenCircle:{const s=this._cp2(r,-2,0),i=this._sub(s,c),h=Math.cos(Math.PI/18),e=-Math.sin(Math.PI/18),_=[s];for(let t=1;t<=33;t++)this._rotateDirect(i,h,e),_.push(this._add(c,i));t.push(_);break}case e.CoverageEdgesWithTicks:{const s=this._cp2(r,0,-1);let i,h;if(_>=3)i=r[2];else{const t=this._sub(s,c),h=this._leftPerp(t);i=[c[0]+h[0]-.25*t[0],c[1]+h[1]-.25*t[1]]}if(_>=4)h=r[3];else{const t=this._mid(c,s),e=this._sub(c,s);this._normalize(e),this._leftPerpendicular(e);const r=this._crossProduct(e,this._sub(i,t));this._rightPerpendicular(e),h=[i[0]+e[0]*r*2,i[1]+e[1]*r*2]}const e=this._sub(s,c);let u,o;u=this._crossProduct(e,this._sub(i,c))>0?this._rightPerp(e):this._leftPerp(e),o=[],o.push(i),o.push(c),o.push([c[0]+(u[0]-e[0])/3,c[1]+(u[1]-e[1])/3]),t.push(o),u=this._crossProduct(e,this._sub(h,s))>0?this._rightPerp(e):this._leftPerp(e),o=[],o.push([s[0]+(u[0]+e[0])/3,s[1]+(u[1]+e[1])/3]),o.push(s),o.push(h),t.push(o);break}case e.GapExtentWithDoubleTicks:{const s=this._cp2(r,0,2),i=this._cp3(r,s,0,1);let h;if(_>=4)h=r[3];else{const t=this._sub(s,c);h=this._add(i,t)}this._addAngledTicks(t,c,s,this._mid(i,h)),this._addAngledTicks(t,i,h,this._mid(c,s));break}case e.GapExtentMidline:{const s=this._cp2(r,2,0),i=this._cp3(r,s,0,1);let h;if(_>=4)h=r[3];else{const t=this._sub(s,c);h=this._add(i,t)}const e=[];e.push(this._mid(c,i)),e.push(this._mid(s,h)),t.push(e);break}case e.Chevron:{const s=this._cp2(r,-1,-1);let i;if(_>=3)i=r[2];else{const t=this._sub(s,c);this._leftPerpendicular(t),i=this._add(c,t)}t.push([s,this._makeCtrlPt(c),i]);break}case e.PerpendicularWithArc:{const s=this._cp2(r,0,-2),i=this._cp3(r,s,.5,-1),h=this._sub(s,c),e=this._norm(h);h[0]/=e,h[1]/=e;const u=this._crossProduct(h,this._sub(i,c));let o=this._dotProduct(h,this._sub(i,c));o<.05*e?o=.05*e:o>.95*e&&(o=.95*e);const a=[c[0]+h[0]*o,c[1]+h[1]*o];let n=this._leftPerp(h),p=[];if(p.push([a[0]-n[0]*u,a[1]-n[1]*u]),p.push([a[0]+n[0]*u,a[1]+n[1]*u]),t.push(p),_>=4){const s=r[3];let i=this._dotProduct(h,this._sub(s,c));i<.1*e?i=.1*e:i>.9*e&&(i=.9*e);const _=[c[0]+h[0]*i,c[1]+h[1]*i],u=this._crossProduct(h,this._sub(s,c)),o=[];o.push([_[0]-n[0]*u,_[1]-n[1]*u]),o.push([_[0]+n[0]*u,_[1]+n[1]*u]),t.push(o)}const d=[s[0]+n[0]*u,s[1]+n[1]*u];n=this._sub(s,d);const l=Math.cos(Math.PI/18);let b=Math.sin(Math.PI/18);u<0&&(b=-b),p=[c,s];for(let t=1;t<=9;t++)this._rotateDirect(n,l,b),p.push(this._add(d,n));t.push(p);break}case e.ClosedHalfCircle:{const s=this._cp2(r,2,0),i=this._mid(c,s),h=this._sub(s,i),e=Math.cos(Math.PI/18),_=Math.sin(Math.PI/18),u=[c,s];for(let t=1;t<=18;t++)this._rotateDirect(h,e,_),u.push(this._add(i,h));t.push(u);break}case e.TripleParallelExtended:{const s=this._cp2(r,0,-2),i=this._cp3(r,s,1,-2),e=this._mid(c,s),_=this._sub(i,s);this._normalize(_);const u=Math.abs(this._crossProduct(_,this._sub(e,s)))/2,o=this._dist(s,i),a=[s,c];a.push([c[0]+_[0]*o*.5,c[1]+_[1]*o*.5]),t.push(a);const n=[];n.push([e[0]-_[0]*u,e[1]-_[1]*u]),n.push([e[0]+_[0]*o*.375,e[1]+_[1]*o*.375]),h(n[n.length-1],1),n.push([e[0]+_[0]*o*.75,e[1]+_[1]*o*.75]),t.push(n);const p=[s,i];t.push(p);break}case e.ParallelWithTicks:{const s=this._cp2(r,3,0),i=this._cp3(r,s,.5,-1),h=this._sub(i,s);this._normalize(h);const e=this._crossProduct(h,this._sub(i,c));this._leftPerpendicular(h),this._addAngledTicks(t,c,s,i),this._addAngledTicks(t,this._mix(c,1,h,e),this._mix(s,1,h,e),this._mid(c,s));break}case e.Parallel:{const s=this._cp2(r,3,0),i=this._cp3(r,s,.5,-1),h=this._sub(s,c);this._normalize(h);const e=this._leftPerp(h),_=this._crossProduct(h,this._sub(i,c));let u=[c,s];t.push(u),u=[],u.push([c[0]+e[0]*_,c[1]+e[1]*_]),u.push([s[0]+e[0]*_,s[1]+e[1]*_]),t.push(u);break}case e.PerpendicularToFirstSegment:{const s=this._cp2(r,3,0),i=this._cp3(r,s,.5,-1),h=this._mid(c,s),e=this._sub(s,c);this._normalize(e);const _=this._crossProduct(e,this._sub(i,c));this._leftPerpendicular(e);const u=[];u.push([h[0]-e[0]*_*.25,h[1]-e[1]*_*.25]),u.push([h[0]+e[0]*_*1.25,h[1]+e[1]*_*1.25]),t.push(u);break}case e.ParallelOffset:{const s=this._cp2(r,3,0),i=this._cp3(r,s,.5,-1),h=this._sub(s,c);this._normalize(h);const e=this._crossProduct(h,this._sub(i,c));this._leftPerpendicular(h);const _=[];_.push([c[0]-h[0]*e,c[1]-h[1]*e]),_.push([s[0]-h[0]*e,s[1]-h[1]*e]),t.push(_);const u=[];u.push([c[0]+h[0]*e,c[1]+h[1]*e]),u.push([s[0]+h[0]*e,s[1]+h[1]*e]),t.push(u);break}case e.OffsetOpposite:{const s=this._cp2(r,3,0),i=this._cp3(r,s,.5,-1),h=this._sub(s,c);this._normalize(h);const e=this._crossProduct(h,this._sub(i,c));this._leftPerpendicular(h);const _=[];_.push([c[0]-h[0]*e,c[1]-h[1]*e]),_.push([s[0]-h[0]*e,s[1]-h[1]*e]),t.push(_);break}case e.OffsetSame:{const s=this._cp2(r,3,0),i=this._cp3(r,s,.5,-1),h=this._sub(s,c);this._normalize(h);const e=this._crossProduct(h,this._sub(i,c));this._leftPerpendicular(h);const _=[];_.push([c[0]+h[0]*e,c[1]+h[1]*e]),_.push([s[0]+h[0]*e,s[1]+h[1]*e]),t.push(_);break}case e.CircleWithArc:{let s=this._cp2(r,3,0);const i=this._cp3(r,s,.5,-1);let e,u;if(_>=4)e=r[3],u=this._crossProduct(this._sub(e,s),this._sub(i,s))>0;else{e=s,u=this._crossProduct(this._sub(e,c),this._sub(i,c))>0;const t=24*this._geomUnitsPerPoint,h=this._sub(e,c);this._normalize(h,t);const r=Math.sqrt(2)/2;this._rotateDirect(h,r,u?r:-r),s=this._add(c,h)}const o=this._sub(s,c),a=Math.cos(Math.PI/18),n=Math.sin(Math.PI/18),p=[s];for(let t=1;t<=36;t++)this._rotateDirect(o,a,n),p.push(this._add(c,o));this._add90DegArc(p,s,e,i,u),h(p[p.length-8],1),t.push(p);break}case e.DoubleJog:{let s,i=this._cp2(r,-3,1),h=this._cp3(r,i,-1,-.5);if(_>=4)s=r[3];else{const t=c;c=i,s=h;const e=this._dist(c,t),r=this._dist(s,t);let _=30*this._geomUnitsPerPoint;.5*e<_&&(_=.5*e),.5*r<_&&(_=.5*r),i=this._mix(c,_/e,t,(e-_)/e),h=this._mix(s,_/r,t,(r-_)/r)}const e=this._mid(c,i),u=this._mid(s,h),o=this._dist(c,i),a=this._dist(h,s);let n=Math.min(o,a)/8;n=Math.min(n,24*this._geomUnitsPerPoint);const p=Math.cos(Math.PI/4);let d=this._sub(c,i);this._normalize(d,n),this._crossProduct(d,this._sub(s,i))>0?this._rotateDirect(d,p,-p):this._rotateDirect(d,p,p);let l=[];l.push(i),l.push(this._add(e,d)),l.push(this._sub(e,d)),l.push(c),t.push(l),d=this._sub(s,h),this._normalize(d,n),this._crossProduct(d,this._sub(c,h))<0?this._rotateDirect(d,p,p):this._rotateDirect(d,p,-p),l=[],l.push(h),l.push(this._add(u,d)),l.push(this._sub(u,d)),l.push(s),t.push(l);break}case e.PerpendicularOffset:{const s=this._cp2(r,-4,1),i=this._cp3(r,s,.882353,-1.94),h=this._sub(i,s);this._crossProduct(h,this._sub(c,s))>0?this._rightPerpendicular(h):this._leftPerpendicular(h);const e=[h[0]/8,h[1]/8],_=this._sub(this._mid(s,i),e);t.push([_,c]);break}case e.LineExcludingLastSegment:{const s=this._arrowPath(r),i=[];let h=s.length-2;for(;h--;)i.push(s[h]);t.push(i);break}case e.MultivertexArrow:{const s=this._arrowPath(r),i=[];this._addArrow(i,s,!1),t.push(i);break}case e.CrossedArrow:{const s=this._arrowPath(r),i=[];this._addArrow(i,s,!0),t.push(i);break}case e.ChevronArrow:{const[s,i]=this._arrowLastSeg(r),h=10*this._geomUnitsPerPoint,e=this._sub(c,s),_=this._norm(e);this._normalize(e);const u=this._crossProduct(e,this._sub(i,s));let o=this._dotProduct(e,this._sub(i,s));o<.05*_?o=.05*_:o>.95*_-h&&(o=.95*_-h);const a=[s[0]+e[0]*o,s[1]+e[1]*o],n=this._leftPerp(e),p=[];p.push([a[0]+n[0]*u+e[0]*h,a[1]+n[1]*u+e[1]*h]),p.push(c),p.push([a[0]-n[0]*u+e[0]*h,a[1]-n[1]*u+e[1]*h]),t.push(p);break}case e.ChevronArrowOffset:{const[s,i]=this._arrowLastSeg(r),h=this._sub(c,s),e=this._norm(h);this._normalize(h);const _=this._crossProduct(h,this._sub(i,s));let u=this._dotProduct(h,this._sub(i,s));u<.05*e?u=.05*e:u>.95*e&&(u=.95*e);const o=[s[0]+h[0]*u,s[1]+h[1]*u];this._leftPerpendicular(h);const a=[];a.push([o[0]+h[0]*_*.5,o[1]+h[1]*_*.5]),a.push(this._mid(o,c)),a.push([o[0]-h[0]*_*.5,o[1]-h[1]*_*.5]),t.push(a);break}case e.PartialFirstSegment:{const[s,i]=this._arrowLastSeg(r),h=this._sub(c,s),e=this._norm(h);this._normalize(h);let _=this._dotProduct(h,this._sub(i,s));_<.05*e?_=.05*e:_>.95*e&&(_=.95*e);const u=[s[0]+h[0]*_,s[1]+h[1]*_];t.push([s,u]);break}case e.Arch:{const s=this._cp2(r,0,-1),i=this._cp3(r,s,.5,1),h=this._sub(c,s),e=this._mix(i,1,h,.55),_=this._mix(i,1,h,-.55),u=[c];this._addBezier2(u,c,e,i,4),this._addBezier2(u,i,_,s,4),t.push(u);break}case e.CurvedParallelTicks:{const s=this._cp2(r,-4,1),i=this._cp3(r,s,.882353,-1.94),h=this._sub(i,s);this._crossProduct(h,this._sub(c,s))>0?this._rightPerpendicular(h):this._leftPerpendicular(h);const e=[h[0]/8,h[1]/8],_=this._sub(this._mid(s,i),e),u=this._sub(this._mix(s,.75,i,.25),e),o=this._sub(this._mix(s,.25,i,.75),e),a=[s];this._addBezier2(a,s,u,_,3),this._addBezier2(a,_,o,i,3),t.push(a);for(let r=0;r<8;r++){const s=a[2*r+1],i=[this._clone(s)];i.push(this._add(s,[h[0]/4,h[1]/4])),t.push(i)}break}case e.Arc90Degrees:{const s=this._cp2(r,0,-1),i=this._cp3(r,s,.5,1),h=[s];this._add90DegArc(h,s,c,i),t.push(h);break}case e.TipWithPerpendicularAndTicks:{const[s,i]=this._arrowLastSeg(r),h=10*this._geomUnitsPerPoint,e=this._sub(c,s),_=this._norm(e);this._normalize(e);let u=this._crossProduct(e,this._sub(i,s)),o=this._dotProduct(e,this._sub(i,s));o<.05*_?o=.05*_:o>.95*_-h&&(o=.95*_-h);const a=this._leftPerp(e),n=[c[0]-e[0]*h,c[1]-e[1]*h],p=.5*Math.max(_-o-h,h);u=Math.abs(u);const d=[];d.push([n[0]+a[0]*(u+p)-e[0]*p,n[1]+a[1]*(u+p)-e[1]*p]),d.push([n[0]+a[0]*u,n[1]+a[1]*u]),d.push([n[0]-a[0]*u,n[1]-a[1]*u]),d.push([n[0]-a[0]*(u+p)-e[0]*p,n[1]-a[1]*(u+p)-e[1]*p]),t.push(d),t.push([n,c]);break}case e.ConcentricCircles:{const s=this._cp2(r,1,0),i=this._cp3(r,s,2,0),e=Math.cos(Math.PI/18),u=Math.sin(Math.PI/18);let o=this._dist(s,c),a=[o,0],n=[];for(let t=0;t<=36;t++)n.push(this._add(c,a)),this._rotateDirect(a,e,u);if(t.push(n),_>=4){n=[];const s=r[3];o=this._dist(s,c),a=[o,0];for(let t=0;t<=36;t++)n.push(this._add(c,a)),0===t&&(n.push(this._add(c,a)),h(n[1],1)),this._rotateDirect(a,e,u);t.push(n)}n=[],o=this._dist(i,c),a=[o,0];for(let t=0;t<=36;t++)n.push(this._add(c,a)),this._rotateDirect(a,e,u);t.push(n);break}case e.DoubleJogArrow:{c=this._arrowPath(r)[0];const[s,i]=this._arrowLastSeg(r),h=this._sub(c,s),e=this._norm(h);this._normalize(h);const _=Math.abs(this._crossProduct(h,this._sub(i,c)));let u=Math.abs(this._dotProduct(h,this._sub(i,c)));u<.05*e?u=.05*e:u>.95*e&&(u=.95*e);const o=Math.max(_,u),a=this._leftPerp(h);let n=[];const p=[c[0]-h[0]*u*.5+a[0]*_*.5,c[1]-h[1]*u*.5+a[1]*_*.5];n.push([p[0],p[1]]),p[0]+=h[0]*o*.5+a[0]*o*.4,p[1]+=h[1]*o*.5+a[1]*o*.4,n.push([p[0],p[1]]),p[0]-=a[0]*o*.25,p[1]-=a[1]*o*.25,n.push([p[0],p[1]]),p[0]+=h[0]*o*.5+a[0]*o*.4,p[1]+=h[1]*o*.5+a[1]*o*.4,n.push([p[0],p[1]]),t.push(n),n=[],p[0]=c[0]-h[0]*u*.5-a[0]*_*.5,p[1]=c[1]-h[1]*u*.5-a[1]*_*.5,n.push([p[0],p[1]]),p[0]+=h[0]*o*.5-a[0]*o*.4,p[1]+=h[1]*o*.5-a[1]*o*.4,n.push([p[0],p[1]]),p[0]+=a[0]*o*.25,p[1]+=a[1]*o*.25,n.push([p[0],p[1]]),p[0]+=h[0]*o*.5-a[0]*o*.4,p[1]+=h[1]*o*.5-a[1]*o*.4,n.push([p[0],p[1]]),t.push(n);break}case e.LinkedChevrons:{const s=this._cp2(r,-5,0),i=this._cp3(r,s,-.2,1),h=this._sub(c,s);this._normalize(h);const e=this._leftPerp(h),_=Math.abs(this._crossProduct(h,this._sub(i,s)));t.push([s,c]);const u=[];u.push([c[0]-h[0]*_+e[0]*_,c[1]-h[1]*_+e[1]*_]),u.push(c),u.push([c[0]-h[0]*_-e[0]*_,c[1]-h[1]*_-e[1]*_]),t.push(u),this._addDash(t,s,[-h[0]*_+e[0]*_,-h[1]*_+e[1]*_]),this._addDash(t,s,[-h[0]*_-e[0]*_,-h[1]*_-e[1]*_]);break}case e.SegmentThenHalfCircle:{const s=this._cp2(r,2,0),i=this._cp3(r,s,1.5,0);let h;h=_>=4?r[3]:this._cp3(r,s,1.25,-.5);const e=this._sub(s,c);this._normalize(e);const u=.5*this._dist(s,i),o=this._crossProduct(e,this._sub(h,c))>0,a=Math.cos(Math.PI/18);let n=Math.sin(Math.PI/18);o&&(n=-n);const p=[c,s];e[0]*=u,e[1]*=u;const d=this._add(s,e);e[0]=-e[0],e[1]=-e[1];for(let t=1;t<=18;t++)this._rotateDirect(e,a,n),p.push(this._add(d,e));t.push(p);break}case e.LineWithStraightTicks:{const s=this._cp2(r,-2,1),i=this._cp3(r,s,-1,-.5),h=this._sub(i,s);this._normalize(h);const e=this._dotProduct(h,this._sub(s,c)),_=this._dotProduct(h,this._sub(i,c));let u=[c];u.push([c[0]+h[0]*e,c[1]+h[1]*e]),u.push(s),t.push(u),u=[c],u.push([c[0]+h[0]*_,c[1]+h[1]*_]),u.push(i),t.push(u);break}case e.DoubleCurve:{const s=this._cp2(r,-5,-1),i=this._cp3(r,s,2,0),e=Math.atan2(1,5),_=Math.cos(e),u=Math.sin(e),o=this._sub(s,c),a=this._dist(c,s);this._normalize(o),this._rotateDirect(o,_,-u);const n=[c];n.push([c[0]+o[0]*a*.5,c[1]+o[1]*a*.5]),h(n[1],1),n.push([c[0]+o[0]*a*.8,c[1]+o[1]*a*.8]),this._addBezier2(n,n[2],[c[0]+o[0]*a,c[1]+o[1]*a],s,3);const p=this._sub(i,s),d=this._dist(s,i);this._normalize(p),this._rotateDirect(p,_,-u),this._addBezier2(n,s,[i[0]-p[0]*d,i[1]-p[1]*d],[i[0]-p[0]*d*.8,i[1]-p[1]*d*.8],3),n.push(i),t.push(n);break}case e.ParallelWithTicksByWidth:{const s=this._cp2(r,0,-1),i=this._cp3(r,s,.5,3),h=this._sub(s,c);this._normalize(h);const e=this._crossProduct(h,this._sub(i,c));this._leftPerpendicular(h),e>0?(this._addAngledTicks(t,c,[c[0]+h[0]*e,c[1]+h[1]*e],s),this._addAngledTicks(t,s,[s[0]+h[0]*e,s[1]+h[1]*e],c)):(this._addAngledTicks(t,[c[0]+h[0]*e,c[1]+h[1]*e],c,s),this._addAngledTicks(t,[s[0]+h[0]*e,s[1]+h[1]*e],c,s));break}case e.EnclosingRoundedRectangle:{const s=this._cp2(r,3,-2),t=[Math.min(c[0],s[0]),Math.max(c[1],s[1])],i=[Math.max(c[0],s[0]),Math.min(c[1],s[1])],h=i[0]-t[0],e=t[1]-i[1],_=Math.min(h,e)/10,u=[];u.push([t[0]+_+.75*(h-2*_),t[1]]),u.push([i[0]-_,t[1]]),this._add90DegArc(u,[i[0]-_,t[1]],[i[0],t[1]-_],[i[0],t[1]]),u.push([i[0],i[1]+_]),this._add90DegArc(u,[i[0],i[1]+_],[i[0]-_,i[1]],i),u.push([t[0]+_,i[1]]),this._add90DegArc(u,[t[0]+_,i[1]],[t[0],i[1]+_],[t[0],i[1]]),u.push([t[0],t[1]-_]),this._add90DegArc(u,[t[0],t[1]-_],[t[0]+_,t[1]],t),u.push([t[0]+_+.75*(h-2*_),t[1]]);break}case e.FullGeometry:default:t.push(r)}}return t}}export{r as EffectControlMeasureLine};
5
+ import{GeometryCursor as s}from"../../../geometry/GeometryCursor.js";import{collectMultipath as t}from"../../../geometry/geometryCursorCollectUtils.js";import{getPathLength as i}from"../../../geometry/support/coordsUtils.js";import{setId as h}from"../CIMCursor.js";import{GeometricEffectControlMeasureLineRule as e}from"../enums.js";class r{static{this.instance=null}static local(){return null===r.instance&&(r.instance=new r),r.instance}execute(s,t,i,h,e){return new _(s,t,i)}}class _{constructor(s,t,i){this._defaultPointSize=20,this._inputGeometries=s,this._geomUnitsPerPoint=i,this._rule=t.rule??e.FullGeometry,this._defaultSize=this._defaultPointSize*i}next(){let i;for(;i=this._inputGeometries.next();){const h=this._processGeom(t(i));if(h?.length)return s.fromJSONCIM({paths:h})}return null}_clone(s){return[s[0],s[1]]}_mid(s,t){return[(s[0]+t[0])/2,(s[1]+t[1])/2]}_mix(s,t,i,h){return[s[0]*t+i[0]*h,s[1]*t+i[1]*h]}_add(s,t){return[s[0]+t[0],s[1]+t[1]]}_add2(s,t,i){return[s[0]+t,s[1]+i]}_sub(s,t){return[s[0]-t[0],s[1]-t[1]]}_dist(s,t){return Math.sqrt((s[0]-t[0])*(s[0]-t[0])+(s[1]-t[1])*(s[1]-t[1]))}_norm(s){return Math.sqrt(s[0]*s[0]+s[1]*s[1])}_normalize(s,t=1){const i=t/this._norm(s);s[0]*=i,s[1]*=i}_leftPerpendicular(s){const t=-s[1],i=s[0];s[0]=t,s[1]=i}_leftPerp(s){return[-s[1],s[0]]}_rightPerpendicular(s){const t=s[1],i=-s[0];s[0]=t,s[1]=i}_rightPerp(s){return[s[1],-s[0]]}_dotProduct(s,t){return s[0]*t[0]+s[1]*t[1]}_crossProduct(s,t){return s[0]*t[1]-s[1]*t[0]}_rotateDirect(s,t,i){const h=s[0]*t-s[1]*i,e=s[0]*i+s[1]*t;s[0]=h,s[1]=e}_makeCtrlPt(s){const t=[s[0],s[1]];return h(t,1),t}_addAngledTicks(s,t,i,h){const e=this._sub(i,t);this._normalize(e);const r=this._crossProduct(e,this._sub(h,t));let _;_=r>0?this._rightPerp(e):this._leftPerp(e);const c=Math.abs(r)/2,u=[];u.push([t[0]+(_[0]-e[0])*c,t[1]+(_[1]-e[1])*c]),u.push(t),u.push(i),u.push([i[0]+(_[0]+e[0])*c,i[1]+(_[1]+e[1])*c]),s.push(u)}_addBezier2(s,t,i,h,e){if(0===e--)return void s.push(h);const r=this._mid(t,i),_=this._mid(i,h),c=this._mid(r,_);this._addBezier2(s,t,r,c,e),this._addBezier2(s,c,_,h,e)}_addBezier3(s,t,i,h,e,r){if(0===r--)return void s.push(e);const _=this._mid(t,i),c=this._mid(i,h),u=this._mid(h,e),o=this._mid(_,c),a=this._mid(c,u),n=this._mid(o,a);this._addBezier3(s,t,_,o,n,r),this._addBezier3(s,n,a,u,e,r)}_add90DegArc(s,t,i,h,e){const r=e??this._crossProduct(this._sub(i,t),this._sub(h,t))>0,_=this._mid(t,i),c=this._sub(_,t);r?this._leftPerpendicular(c):this._rightPerpendicular(c),_[0]+=c[0],_[1]+=c[1],this._addBezier3(s,t,this._mix(t,.33333,_,.66667),this._mix(i,.33333,_,.66667),i,4)}_addArrow(s,t,i){const h=t[0],e=t[1],r=t[t.length-1],_=this._sub(h,e),c=this._norm(_);this._normalize(_);const u=Math.abs(this._crossProduct(_,this._sub(r,e)));let o=this._dotProduct(_,this._sub(r,e));o<.05*c?o=.05*c:o>.95*c&&(o=.95*c);const a=.5*u,n=this._leftPerp(_),p=[e[0]+_[0]*o,e[1]+_[1]*o],d=t.length-1,l=[];l.push(i?[-n[0],-n[1]]:n);let b=[-_[0],-_[1]];for(let P=1;P<d-1;P++){const s=this._sub(t[P+1],t[P]);this._normalize(s);const i=this._dotProduct(s,b),h=this._crossProduct(s,b),e=Math.sqrt((1+i)/2),r=this._sub(s,b);this._normalize(r),r[0]/=e,r[1]/=e,l.push(h<0?[-r[0],-r[1]]:r),b=s}l.push(this._rightPerp(b));for(let P=l.length-1;P>0;P--)s.push([t[P][0]+l[P][0]*a,t[P][1]+l[P][1]*a]);s.push([p[0]+l[0][0]*a,p[1]+l[0][1]*a]),s.push([p[0]+l[0][0]*u,p[1]+l[0][1]*u]),s.push(h),s.push([p[0]-l[0][0]*u,p[1]-l[0][1]*u]),s.push([p[0]-l[0][0]*a,p[1]-l[0][1]*a]);for(let P=1;P<l.length;P++)s.push([t[P][0]-l[P][0]*a,t[P][1]-l[P][1]*a])}_addDash(s,t,i){const h=this._norm(i)/7;this._normalize(i);let e=[];for(let r=0;r<=7;r++)e.push([t[0]+i[0]*r*h,t[1]+i[1]*r*h]),1&r&&(s.push(e),e=[])}_cp2(s,t,i){return s.length>=2?s[1]:this._add2(s[0],t*this._defaultSize,i*this._defaultSize)}_cp3(s,t,i,h){if(s.length>=3)return s[2];const e=this._mix(s[0],1-i,t,i),r=this._sub(t,s[0]);return this._normalize(r),this._rightPerpendicular(r),[e[0]+r[0]*h*this._defaultSize,e[1]+r[1]*h*this._defaultSize]}_arrowPath(s){if(s.length>2)return s;const t=s[0],i=this._cp2(s,-4,0),h=this._sub(t,i);this._normalize(h);const e=this._rightPerp(h);return[t,i,[t[0]+(e[0]-h[0])*this._defaultSize,t[1]+(e[1]-h[1])*this._defaultSize]]}_arrowLastSeg(s){const t=s[0],i=this._cp2(s,-4,0);let h;if(s.length>=3)h=s[s.length-1];else{const s=this._sub(t,i);this._normalize(s);const e=this._rightPerp(s);h=[t[0]+(e[0]-s[0])*this._defaultSize,t[1]+(e[1]-s[1])*this._defaultSize]}return[i,h]}_processGeom(s){if(!s)return null;const t=[];for(const r of s){const s=r.length>1&&i(r)<this._defaultSize;if(!r||0===r.length||s)continue;const _=r.length;let c=r[0];switch(this._rule){case e.PerpendicularFromFirstSegment:{const s=this._cp2(r,0,-1),i=this._cp3(r,s,.5,4),h=[];h.push(i),h.push(this._mid(c,s)),t.push(h);break}case e.ReversedFirstSegment:{const s=this._cp2(r,0,-1);t.push([s,c]);break}case e.PerpendicularToSecondSegment:{if(r.length<3)return[];const s=this._cp2(r,-4,1),i=this._cp3(r,s,.882353,-1.94),h=[];h.push(this._mid(s,i)),h.push(c),t.push(h);break}case e.SecondSegmentWithTicks:{if(r.length<3)return[];const s=this._cp2(r,-4,1),i=this._cp3(r,s,.882353,-1.94),h=this._sub(i,s);let e;e=this._crossProduct(h,this._sub(c,s))>0?this._rightPerp(h):this._leftPerp(h);const _=[];_.push([s[0]+(e[0]-h[0])/3,s[1]+(e[1]-h[1])/3]),_.push(s),_.push(i),_.push([i[0]+(e[0]+h[0])/3,i[1]+(e[1]+h[1])/3]),t.push(_);break}case e.DoublePerpendicular:{const s=this._cp2(r,0,-1),i=this._cp3(r,s,.5,3),h=this._mid(c,s),e=this._sub(h,i);this._normalize(e);const _=this._crossProduct(e,this._sub(c,i));this._leftPerpendicular(e);const u=[];u.push(c),u.push([i[0]+e[0]*_,i[1]+e[1]*_]),t.push(u);const o=[];o.push([i[0]-e[0]*_,i[1]-e[1]*_]),o.push(s),t.push(o);break}case e.OppositeToFirstSegment:{const s=this._cp2(r,0,-1),i=this._cp3(r,s,.5,3),h=this._mid(c,s),e=this._sub(h,i);this._normalize(e);const _=this._crossProduct(e,this._sub(c,i));this._leftPerpendicular(e);const u=[];u.push([i[0]+e[0]*_,i[1]+e[1]*_]),u.push([i[0]-e[0]*_,i[1]-e[1]*_]),t.push(u);break}case e.TriplePerpendicular:{const s=this._cp2(r,0,-1),i=this._cp3(r,s,.5,4),h=this._mid(c,s),e=this._sub(h,i);this._normalize(e);const _=this._crossProduct(e,this._sub(c,i));this._leftPerpendicular(e);const u=[];u.push([i[0]+e[0]*_*.8,i[1]+e[1]*_*.8]),u.push([h[0]+.8*(c[0]-h[0]),h[1]+.8*(c[1]-h[1])]),t.push(u),t.push([i,h]);const o=[];o.push([i[0]-e[0]*_*.8,i[1]-e[1]*_*.8]),o.push([h[0]+.8*(s[0]-h[0]),h[1]+.8*(s[1]-h[1])]),t.push(o);break}case e.HalfCircleFirstSegment:{const s=this._cp2(r,0,-1),i=this._cp3(r,s,.5,4),h=this._mid(c,s);let e=this._sub(s,c);const _=Math.cos(Math.PI/18),u=Math.sin(Math.PI/18),o=Math.sqrt((1+_)/2),a=Math.sqrt((1-_)/2),n=[];let p;this._crossProduct(e,this._sub(i,c))>0?(n.push(c),e=this._sub(c,h),p=s):(n.push(s),e=this._sub(s,h),p=c),this._rotateDirect(e,o,a),e[0]/=o,e[1]/=o;for(let t=1;t<=18;t++)n.push(this._add(h,e)),this._rotateDirect(e,_,u);n.push(p),t.push(n);break}case e.HalfCircleSecondSegment:{const s=this._cp2(r,0,-1),i=this._cp3(r,s,1,-1);let h=this._sub(c,s);this._normalize(h);const e=this._crossProduct(h,this._sub(i,s))/2;this._leftPerpendicular(h);const _=[s[0]+h[0]*e,s[1]+h[1]*e];h=this._sub(s,_);const u=Math.cos(Math.PI/18);let o=Math.sin(Math.PI/18);e>0&&(o=-o);const a=[s];for(let t=1;t<=18;t++)this._rotateDirect(h,u,o),a.push(this._add(_,h));t.push(a);break}case e.HalfCircleExtended:{const s=this._cp2(r,0,-2),i=this._cp3(r,s,1,-1);let h;if(_>=4)h=r[3];else{const t=this._sub(c,s);h=this._add(i,t)}const e=this._dist(s,i)/2/.75,u=this._sub(s,c);this._normalize(u,e);const o=this._sub(i,h);this._normalize(o,e);const a=[h,i];t.push(a);const n=[this._clone(i)];this._addBezier3(n,i,this._add(i,o),this._add(s,u),s,4),n.push(c),t.push(n);break}case e.OpenCircle:{const s=this._cp2(r,-2,0),i=this._sub(s,c),h=Math.cos(Math.PI/18),e=-Math.sin(Math.PI/18),_=[s];for(let t=1;t<=33;t++)this._rotateDirect(i,h,e),_.push(this._add(c,i));t.push(_);break}case e.CoverageEdgesWithTicks:{const s=this._cp2(r,0,-1);let i,h;if(_>=3)i=r[2];else{const t=this._sub(s,c),h=this._leftPerp(t);i=[c[0]+h[0]-.25*t[0],c[1]+h[1]-.25*t[1]]}if(_>=4)h=r[3];else{const t=this._mid(c,s),e=this._sub(c,s);this._normalize(e),this._leftPerpendicular(e);const r=this._crossProduct(e,this._sub(i,t));this._rightPerpendicular(e),h=[i[0]+e[0]*r*2,i[1]+e[1]*r*2]}const e=this._sub(s,c);let u,o;u=this._crossProduct(e,this._sub(i,c))>0?this._rightPerp(e):this._leftPerp(e),o=[],o.push(i),o.push(c),o.push([c[0]+(u[0]-e[0])/3,c[1]+(u[1]-e[1])/3]),t.push(o),u=this._crossProduct(e,this._sub(h,s))>0?this._rightPerp(e):this._leftPerp(e),o=[],o.push([s[0]+(u[0]+e[0])/3,s[1]+(u[1]+e[1])/3]),o.push(s),o.push(h),t.push(o);break}case e.GapExtentWithDoubleTicks:{const s=this._cp2(r,0,2),i=this._cp3(r,s,0,1);let h;if(_>=4)h=r[3];else{const t=this._sub(s,c);h=this._add(i,t)}this._addAngledTicks(t,c,s,this._mid(i,h)),this._addAngledTicks(t,i,h,this._mid(c,s));break}case e.GapExtentMidline:{const s=this._cp2(r,2,0),i=this._cp3(r,s,0,1);let h;if(_>=4)h=r[3];else{const t=this._sub(s,c);h=this._add(i,t)}const e=[];e.push(this._mid(c,i)),e.push(this._mid(s,h)),t.push(e);break}case e.Chevron:{const s=this._cp2(r,-1,-1);let i;if(_>=3)i=r[2];else{const t=this._sub(s,c);this._leftPerpendicular(t),i=this._add(c,t)}t.push([s,this._makeCtrlPt(c),i]);break}case e.PerpendicularWithArc:{const s=this._cp2(r,0,-2),i=this._cp3(r,s,.5,-1),h=this._sub(s,c),e=this._norm(h);h[0]/=e,h[1]/=e;const u=this._crossProduct(h,this._sub(i,c));let o=this._dotProduct(h,this._sub(i,c));o<.05*e?o=.05*e:o>.95*e&&(o=.95*e);const a=[c[0]+h[0]*o,c[1]+h[1]*o];let n=this._leftPerp(h),p=[];if(p.push([a[0]-n[0]*u,a[1]-n[1]*u]),p.push([a[0]+n[0]*u,a[1]+n[1]*u]),t.push(p),_>=4){const s=r[3];let i=this._dotProduct(h,this._sub(s,c));i<.1*e?i=.1*e:i>.9*e&&(i=.9*e);const _=[c[0]+h[0]*i,c[1]+h[1]*i],u=this._crossProduct(h,this._sub(s,c)),o=[];o.push([_[0]-n[0]*u,_[1]-n[1]*u]),o.push([_[0]+n[0]*u,_[1]+n[1]*u]),t.push(o)}const d=[s[0]+n[0]*u,s[1]+n[1]*u];n=this._sub(s,d);const l=Math.cos(Math.PI/18);let b=Math.sin(Math.PI/18);u<0&&(b=-b),p=[c,s];for(let t=1;t<=9;t++)this._rotateDirect(n,l,b),p.push(this._add(d,n));t.push(p);break}case e.ClosedHalfCircle:{const s=this._cp2(r,2,0),i=this._mid(c,s),h=this._sub(s,i),e=Math.cos(Math.PI/18),_=Math.sin(Math.PI/18),u=[c,s];for(let t=1;t<=18;t++)this._rotateDirect(h,e,_),u.push(this._add(i,h));t.push(u);break}case e.TripleParallelExtended:{const s=this._cp2(r,0,-2),i=this._cp3(r,s,1,-2),e=this._mid(c,s),_=this._sub(i,s);this._normalize(_);const u=Math.abs(this._crossProduct(_,this._sub(e,s)))/2,o=this._dist(s,i),a=[s,c];a.push([c[0]+_[0]*o*.5,c[1]+_[1]*o*.5]),t.push(a);const n=[];n.push([e[0]-_[0]*u,e[1]-_[1]*u]),n.push([e[0]+_[0]*o*.375,e[1]+_[1]*o*.375]),h(n[n.length-1],1),n.push([e[0]+_[0]*o*.75,e[1]+_[1]*o*.75]),t.push(n);const p=[s,i];t.push(p);break}case e.ParallelWithTicks:{const s=this._cp2(r,3,0),i=this._cp3(r,s,.5,-1),h=this._sub(i,s);this._normalize(h);const e=this._crossProduct(h,this._sub(i,c));this._leftPerpendicular(h),this._addAngledTicks(t,c,s,i),this._addAngledTicks(t,this._mix(c,1,h,e),this._mix(s,1,h,e),this._mid(c,s));break}case e.Parallel:{const s=this._cp2(r,3,0),i=this._cp3(r,s,.5,-1),h=this._sub(s,c);this._normalize(h);const e=this._leftPerp(h),_=this._crossProduct(h,this._sub(i,c));let u=[c,s];t.push(u),u=[],u.push([c[0]+e[0]*_,c[1]+e[1]*_]),u.push([s[0]+e[0]*_,s[1]+e[1]*_]),t.push(u);break}case e.PerpendicularToFirstSegment:{const s=this._cp2(r,3,0),i=this._cp3(r,s,.5,-1),h=this._mid(c,s),e=this._sub(s,c);this._normalize(e);const _=this._crossProduct(e,this._sub(i,c));this._leftPerpendicular(e);const u=[];u.push([h[0]-e[0]*_*.25,h[1]-e[1]*_*.25]),u.push([h[0]+e[0]*_*1.25,h[1]+e[1]*_*1.25]),t.push(u);break}case e.ParallelOffset:{const s=this._cp2(r,3,0),i=this._cp3(r,s,.5,-1),h=this._sub(s,c);this._normalize(h);const e=this._crossProduct(h,this._sub(i,c));this._leftPerpendicular(h);const _=[];_.push([c[0]-h[0]*e,c[1]-h[1]*e]),_.push([s[0]-h[0]*e,s[1]-h[1]*e]),t.push(_);const u=[];u.push([c[0]+h[0]*e,c[1]+h[1]*e]),u.push([s[0]+h[0]*e,s[1]+h[1]*e]),t.push(u);break}case e.OffsetOpposite:{const s=this._cp2(r,3,0),i=this._cp3(r,s,.5,-1),h=this._sub(s,c);this._normalize(h);const e=this._crossProduct(h,this._sub(i,c));this._leftPerpendicular(h);const _=[];_.push([c[0]-h[0]*e,c[1]-h[1]*e]),_.push([s[0]-h[0]*e,s[1]-h[1]*e]),t.push(_);break}case e.OffsetSame:{const s=this._cp2(r,3,0),i=this._cp3(r,s,.5,-1),h=this._sub(s,c);this._normalize(h);const e=this._crossProduct(h,this._sub(i,c));this._leftPerpendicular(h);const _=[];_.push([c[0]+h[0]*e,c[1]+h[1]*e]),_.push([s[0]+h[0]*e,s[1]+h[1]*e]),t.push(_);break}case e.CircleWithArc:{let s=this._cp2(r,3,0);const i=this._cp3(r,s,.5,-1);let e,u;if(_>=4)e=r[3],u=this._crossProduct(this._sub(e,s),this._sub(i,s))>0;else{e=s,u=this._crossProduct(this._sub(e,c),this._sub(i,c))>0;const t=24*this._geomUnitsPerPoint,h=this._sub(e,c);this._normalize(h,t);const r=Math.sqrt(2)/2;this._rotateDirect(h,r,u?r:-r),s=this._add(c,h)}const o=this._sub(s,c),a=Math.cos(Math.PI/18),n=Math.sin(Math.PI/18),p=[s];for(let t=1;t<=36;t++)this._rotateDirect(o,a,n),p.push(this._add(c,o));this._add90DegArc(p,s,e,i,u),h(p[p.length-8],1),t.push(p);break}case e.DoubleJog:{let s,i=this._cp2(r,-3,1),h=this._cp3(r,i,-1,-.5);if(_>=4)s=r[3];else{const t=c;c=i,s=h;const e=this._dist(c,t),r=this._dist(s,t);let _=30*this._geomUnitsPerPoint;.5*e<_&&(_=.5*e),.5*r<_&&(_=.5*r),i=this._mix(c,_/e,t,(e-_)/e),h=this._mix(s,_/r,t,(r-_)/r)}const e=this._mid(c,i),u=this._mid(s,h),o=this._dist(c,i),a=this._dist(h,s);let n=Math.min(o,a)/8;n=Math.min(n,24*this._geomUnitsPerPoint);const p=Math.cos(Math.PI/4);let d=this._sub(c,i);this._normalize(d,n),this._crossProduct(d,this._sub(s,i))>0?this._rotateDirect(d,p,-p):this._rotateDirect(d,p,p);let l=[];l.push(i),l.push(this._add(e,d)),l.push(this._sub(e,d)),l.push(c),t.push(l),d=this._sub(s,h),this._normalize(d,n),this._crossProduct(d,this._sub(c,h))<0?this._rotateDirect(d,p,p):this._rotateDirect(d,p,-p),l=[],l.push(h),l.push(this._add(u,d)),l.push(this._sub(u,d)),l.push(s),t.push(l);break}case e.PerpendicularOffset:{const s=this._cp2(r,-4,1),i=this._cp3(r,s,.882353,-1.94),h=this._sub(i,s);this._crossProduct(h,this._sub(c,s))>0?this._rightPerpendicular(h):this._leftPerpendicular(h);const e=[h[0]/8,h[1]/8],_=this._sub(this._mid(s,i),e);t.push([_,c]);break}case e.LineExcludingLastSegment:{const s=this._arrowPath(r),i=[];let h=s.length-2;for(;h--;)i.push(s[h]);t.push(i);break}case e.MultivertexArrow:{const s=this._arrowPath(r),i=[];this._addArrow(i,s,!1),t.push(i);break}case e.CrossedArrow:{const s=this._arrowPath(r),i=[];this._addArrow(i,s,!0),t.push(i);break}case e.ChevronArrow:{const[s,i]=this._arrowLastSeg(r),h=10*this._geomUnitsPerPoint,e=this._sub(c,s),_=this._norm(e);this._normalize(e);const u=this._crossProduct(e,this._sub(i,s));let o=this._dotProduct(e,this._sub(i,s));o<.05*_?o=.05*_:o>.95*_-h&&(o=.95*_-h);const a=[s[0]+e[0]*o,s[1]+e[1]*o],n=this._leftPerp(e),p=[];p.push([a[0]+n[0]*u+e[0]*h,a[1]+n[1]*u+e[1]*h]),p.push(c),p.push([a[0]-n[0]*u+e[0]*h,a[1]-n[1]*u+e[1]*h]),t.push(p);break}case e.ChevronArrowOffset:{const[s,i]=this._arrowLastSeg(r),h=this._sub(c,s),e=this._norm(h);this._normalize(h);const _=this._crossProduct(h,this._sub(i,s));let u=this._dotProduct(h,this._sub(i,s));u<.05*e?u=.05*e:u>.95*e&&(u=.95*e);const o=[s[0]+h[0]*u,s[1]+h[1]*u];this._leftPerpendicular(h);const a=[];a.push([o[0]+h[0]*_*.5,o[1]+h[1]*_*.5]),a.push(this._mid(o,c)),a.push([o[0]-h[0]*_*.5,o[1]-h[1]*_*.5]),t.push(a);break}case e.PartialFirstSegment:{const[s,i]=this._arrowLastSeg(r),h=this._sub(c,s),e=this._norm(h);this._normalize(h);let _=this._dotProduct(h,this._sub(i,s));_<.05*e?_=.05*e:_>.95*e&&(_=.95*e);const u=[s[0]+h[0]*_,s[1]+h[1]*_];t.push([s,u]);break}case e.Arch:{const s=this._cp2(r,0,-1),i=this._cp3(r,s,.5,1),h=this._sub(c,s),e=this._mix(i,1,h,.55),_=this._mix(i,1,h,-.55),u=[c];this._addBezier2(u,c,e,i,4),this._addBezier2(u,i,_,s,4),t.push(u);break}case e.CurvedParallelTicks:{const s=this._cp2(r,-4,1),i=this._cp3(r,s,.882353,-1.94),h=this._sub(i,s);this._crossProduct(h,this._sub(c,s))>0?this._rightPerpendicular(h):this._leftPerpendicular(h);const e=[h[0]/8,h[1]/8],_=this._sub(this._mid(s,i),e),u=this._sub(this._mix(s,.75,i,.25),e),o=this._sub(this._mix(s,.25,i,.75),e),a=[s];this._addBezier2(a,s,u,_,3),this._addBezier2(a,_,o,i,3),t.push(a);for(let r=0;r<8;r++){const s=a[2*r+1],i=[this._clone(s)];i.push(this._add(s,[h[0]/4,h[1]/4])),t.push(i)}break}case e.Arc90Degrees:{const s=this._cp2(r,0,-1),i=this._cp3(r,s,.5,1),h=[s];this._add90DegArc(h,s,c,i),t.push(h);break}case e.TipWithPerpendicularAndTicks:{const[s,i]=this._arrowLastSeg(r),h=10*this._geomUnitsPerPoint,e=this._sub(c,s),_=this._norm(e);this._normalize(e);let u=this._crossProduct(e,this._sub(i,s)),o=this._dotProduct(e,this._sub(i,s));o<.05*_?o=.05*_:o>.95*_-h&&(o=.95*_-h);const a=this._leftPerp(e),n=[c[0]-e[0]*h,c[1]-e[1]*h],p=.5*Math.max(_-o-h,h);u=Math.abs(u);const d=[];d.push([n[0]+a[0]*(u+p)-e[0]*p,n[1]+a[1]*(u+p)-e[1]*p]),d.push([n[0]+a[0]*u,n[1]+a[1]*u]),d.push([n[0]-a[0]*u,n[1]-a[1]*u]),d.push([n[0]-a[0]*(u+p)-e[0]*p,n[1]-a[1]*(u+p)-e[1]*p]),t.push(d),t.push([n,c]);break}case e.ConcentricCircles:{const s=this._cp2(r,1,0),i=this._cp3(r,s,2,0),e=Math.cos(Math.PI/18),u=Math.sin(Math.PI/18);let o=this._dist(s,c),a=[o,0],n=[];for(let t=0;t<=36;t++)n.push(this._add(c,a)),this._rotateDirect(a,e,u);if(t.push(n),_>=4){n=[];const s=r[3];o=this._dist(s,c),a=[o,0];for(let t=0;t<=36;t++)n.push(this._add(c,a)),0===t&&(n.push(this._add(c,a)),h(n[1],1)),this._rotateDirect(a,e,u);t.push(n)}n=[],o=this._dist(i,c),a=[o,0];for(let t=0;t<=36;t++)n.push(this._add(c,a)),this._rotateDirect(a,e,u);t.push(n);break}case e.DoubleJogArrow:{c=this._arrowPath(r)[0];const[s,i]=this._arrowLastSeg(r),h=this._sub(c,s),e=this._norm(h);this._normalize(h);const _=Math.abs(this._crossProduct(h,this._sub(i,c)));let u=Math.abs(this._dotProduct(h,this._sub(i,c)));u<.05*e?u=.05*e:u>.95*e&&(u=.95*e);const o=Math.max(_,u),a=this._leftPerp(h);let n=[];const p=[c[0]-h[0]*u*.5+a[0]*_*.5,c[1]-h[1]*u*.5+a[1]*_*.5];n.push([p[0],p[1]]),p[0]+=h[0]*o*.5+a[0]*o*.4,p[1]+=h[1]*o*.5+a[1]*o*.4,n.push([p[0],p[1]]),p[0]-=a[0]*o*.25,p[1]-=a[1]*o*.25,n.push([p[0],p[1]]),p[0]+=h[0]*o*.5+a[0]*o*.4,p[1]+=h[1]*o*.5+a[1]*o*.4,n.push([p[0],p[1]]),t.push(n),n=[],p[0]=c[0]-h[0]*u*.5-a[0]*_*.5,p[1]=c[1]-h[1]*u*.5-a[1]*_*.5,n.push([p[0],p[1]]),p[0]+=h[0]*o*.5-a[0]*o*.4,p[1]+=h[1]*o*.5-a[1]*o*.4,n.push([p[0],p[1]]),p[0]+=a[0]*o*.25,p[1]+=a[1]*o*.25,n.push([p[0],p[1]]),p[0]+=h[0]*o*.5-a[0]*o*.4,p[1]+=h[1]*o*.5-a[1]*o*.4,n.push([p[0],p[1]]),t.push(n);break}case e.LinkedChevrons:{const s=this._cp2(r,-5,0),i=this._cp3(r,s,-.2,1),h=this._sub(c,s);this._normalize(h);const e=this._leftPerp(h),_=Math.abs(this._crossProduct(h,this._sub(i,s)));t.push([s,c]);const u=[];u.push([c[0]-h[0]*_+e[0]*_,c[1]-h[1]*_+e[1]*_]),u.push(c),u.push([c[0]-h[0]*_-e[0]*_,c[1]-h[1]*_-e[1]*_]),t.push(u),this._addDash(t,s,[-h[0]*_+e[0]*_,-h[1]*_+e[1]*_]),this._addDash(t,s,[-h[0]*_-e[0]*_,-h[1]*_-e[1]*_]);break}case e.SegmentThenHalfCircle:{const s=this._cp2(r,2,0),i=this._cp3(r,s,1.5,0);let h;h=_>=4?r[3]:this._cp3(r,s,1.25,-.5);const e=this._sub(s,c);this._normalize(e);const u=.5*this._dist(s,i),o=this._crossProduct(e,this._sub(h,c))>0,a=Math.cos(Math.PI/18);let n=Math.sin(Math.PI/18);o&&(n=-n);const p=[c,s];e[0]*=u,e[1]*=u;const d=this._add(s,e);e[0]=-e[0],e[1]=-e[1];for(let t=1;t<=18;t++)this._rotateDirect(e,a,n),p.push(this._add(d,e));t.push(p);break}case e.LineWithStraightTicks:{const s=this._cp2(r,-2,1),i=this._cp3(r,s,-1,-.5),h=this._sub(i,s);this._normalize(h);const e=this._dotProduct(h,this._sub(s,c)),_=this._dotProduct(h,this._sub(i,c));let u=[c];u.push([c[0]+h[0]*e,c[1]+h[1]*e]),u.push(s),t.push(u),u=[c],u.push([c[0]+h[0]*_,c[1]+h[1]*_]),u.push(i),t.push(u);break}case e.DoubleCurve:{const s=this._cp2(r,-5,-1),i=this._cp3(r,s,2,0),e=Math.atan2(1,5),_=Math.cos(e),u=Math.sin(e),o=this._sub(s,c),a=this._dist(c,s);this._normalize(o),this._rotateDirect(o,_,-u);const n=[c];n.push([c[0]+o[0]*a*.5,c[1]+o[1]*a*.5]),h(n[1],1),n.push([c[0]+o[0]*a*.8,c[1]+o[1]*a*.8]),this._addBezier2(n,n[2],[c[0]+o[0]*a,c[1]+o[1]*a],s,3);const p=this._sub(i,s),d=this._dist(s,i);this._normalize(p),this._rotateDirect(p,_,-u),this._addBezier2(n,s,[i[0]-p[0]*d,i[1]-p[1]*d],[i[0]-p[0]*d*.8,i[1]-p[1]*d*.8],3),n.push(i),t.push(n);break}case e.ParallelWithTicksByWidth:{const s=this._cp2(r,0,-1),i=this._cp3(r,s,.5,3),h=this._sub(s,c);this._normalize(h);const e=this._crossProduct(h,this._sub(i,c));this._leftPerpendicular(h),e>0?(this._addAngledTicks(t,c,[c[0]+h[0]*e,c[1]+h[1]*e],s),this._addAngledTicks(t,s,[s[0]+h[0]*e,s[1]+h[1]*e],c)):(this._addAngledTicks(t,[c[0]+h[0]*e,c[1]+h[1]*e],c,s),this._addAngledTicks(t,[s[0]+h[0]*e,s[1]+h[1]*e],c,s));break}case e.EnclosingRoundedRectangle:{const s=this._cp2(r,3,-2),t=[Math.min(c[0],s[0]),Math.max(c[1],s[1])],i=[Math.max(c[0],s[0]),Math.min(c[1],s[1])],h=i[0]-t[0],e=t[1]-i[1],_=Math.min(h,e)/10,u=[];u.push([t[0]+_+.75*(h-2*_),t[1]]),u.push([i[0]-_,t[1]]),this._add90DegArc(u,[i[0]-_,t[1]],[i[0],t[1]-_],[i[0],t[1]]),u.push([i[0],i[1]+_]),this._add90DegArc(u,[i[0],i[1]+_],[i[0]-_,i[1]],i),u.push([t[0]+_,i[1]]),this._add90DegArc(u,[t[0]+_,i[1]],[t[0],i[1]+_],[t[0],i[1]]),u.push([t[0],t[1]-_]),this._add90DegArc(u,[t[0],t[1]-_],[t[0]+_,t[1]],t),u.push([t[0]+_+.75*(h-2*_),t[1]]);break}case e.FullGeometry:default:t.push(r)}}return t}}export{r as EffectControlMeasureLine};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../core/Evented.js";import{on as t}from"../../../core/events.js";import{handlesGroup as a}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import{deg2rad as r}from"../../../core/mathUtils.js";import{identity as s,scale as i,rotate as o,translate as n}from"../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as h}from"../../../core/libs/gl-matrix-2/factories/mat2df64.js";class c{constructor(r){this.events=new e,this._hasMajorPerformanceCaveat=!1,this._lastRenderFrameCounter=0,this._canvas=document.createElement("canvas"),this._canvas.setAttribute("style","width: 100%; height:100%; display:block; willChange:transform");const s={failIfMajorPerformanceCaveat:!0,alpha:!0,antialias:!1,depth:!0,stencil:!0,powerPreference:"high-performance"};r.appendChild(this._canvas);let i=this._canvas.getContext("webgl2",s);i||(i=this._canvas.getContext("webgl2",{...s,failIfMajorPerformanceCaveat:!1}),this._hasMajorPerformanceCaveat=!0),this._gl=i,this._handles=a([t(this._canvas,"webglcontextlost",(e=>this.events.emit("webgl-context-lost",e)))])}destroy(){this._canvas.parentNode?.removeChild(this._canvas),this._canvas=null,this._handles.remove(),this._gl=null}get gl(){return this._gl}render(e,t){if(this._hasMajorPerformanceCaveat||has("esri-force-performance-mode")){if(++this._lastRenderFrameCounter>=has("esri-performance-mode-frames-between-render")&&(t(),this._lastRenderViewState=e.state.clone(),this._lastRenderFrameCounter=0),this._lastRenderViewState){const[t,a,r,s,i,o]=this._computeViewTransform(this._lastRenderViewState,e.state);this._canvas.style.transform=`matrix(${t}, ${a}, ${r}, ${s}, ${i}, ${o})`}}else t()}resize(e){const t=this._canvas,a=t.style,{state:{size:r},pixelRatio:s}=e,i=r[0],o=r[1],n=Math.round(i*s),h=Math.round(o*s);t.width===n&&t.height===h||(t.width=n,t.height=h),a.width=i+"px",a.height=o+"px"}_computeViewTransform(e,t){const[a,c]=e.center,[l,m]=t.center,[d,f]=e.toScreen([0,0],l,m),[_,p]=e.toScreen([0,0],a,c),v=_-d,g=p-f,w=e.scale/t.scale,u=t.rotation-e.rotation,C=h();return s(C),i(C,C,[w,w]),o(C,C,r(u)),n(C,C,[v,g]),C}}export{c as ManagedCanvas};
5
+ import e from"../../../core/Evented.js";import{on as t}from"../../../core/events.js";import{handlesGroup as a}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import{deg2rad as s}from"../../../core/mathUtils.js";import{identity as r,scale as i,rotate as o,translate as n}from"../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as h}from"../../../core/libs/gl-matrix-2/factories/mat2df64.js";class c{constructor(s,r={}){this.events=new e,this._hasMajorPerformanceCaveat=!1,this._lastRenderFrameCounter=0,this._canvas=r.canvas??document.createElement("canvas"),this._canvas.setAttribute("style","width: 100%; height:100%; display:block; willChange:transform");const i={failIfMajorPerformanceCaveat:!0,alpha:!0,antialias:!1,depth:!0,stencil:!0,powerPreference:"high-performance"};s.contains(this._canvas)||s.appendChild(this._canvas);let o=this._canvas.getContext("webgl2",i);o||(o=this._canvas.getContext("webgl2",{...i,failIfMajorPerformanceCaveat:!1}),this._hasMajorPerformanceCaveat=!0),this._gl=o,this._handles=a([t(this._canvas,"webglcontextlost",(e=>this.events.emit("webgl-context-lost",e)))])}destroy(){this._canvas.remove(),this._canvas=null,this._handles.remove(),this._gl=null}get gl(){return this._gl}render(e,t){if(this._hasMajorPerformanceCaveat||has("esri-force-performance-mode")){if(++this._lastRenderFrameCounter>=has("esri-performance-mode-frames-between-render")&&(t(),this._lastRenderViewState=e.state.clone(),this._lastRenderFrameCounter=0),this._lastRenderViewState){const[t,a,s,r,i,o]=this._computeViewTransform(this._lastRenderViewState,e.state);this._canvas.style.transform=`matrix(${t}, ${a}, ${s}, ${r}, ${i}, ${o})`}}else t()}resize(e){const t=this._canvas,a=t.style,{state:{size:s},pixelRatio:r}=e,i=s[0],o=s[1],n=Math.round(i*r),h=Math.round(o*r);t.width===n&&t.height===h||(t.width=n,t.height=h),a.width=i+"px",a.height=o+"px"}_computeViewTransform(e,t){const[a,c]=e.center,[l,m]=t.center,[f,d]=e.toScreen([0,0],l,m),[_,v]=e.toScreen([0,0],a,c),p=_-f,g=v-d,w=e.scale/t.scale,u=t.rotation-e.rotation,j=h();return r(j),i(j,j,[w,w]),o(j,j,s(u)),n(j,j,[p,g]),j}}export{c as ManagedCanvas};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../core/Error.js";import has from"../../../core/has.js";import{removeMaybe as t}from"../../../core/maybe.js";import{addFrameTask as r}from"../../../core/scheduling.js";import{signal as s}from"../../../core/signal.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{CIMAnalyzer as n}from"../../../symbols/cim/cimAnalyzer.js";import{Container as a}from"./Container.js";import{ManagedCanvas as o}from"./ManagedCanvas.js";import{MAX_TILE_RESHUFFLES_PER_FRAME as h}from"./webgl/definitions.js";import{WGLDrawPhase as d}from"./webgl/enums.js";import l from"./webgl/Painter.js";import{ArrayBufferPool as m}from"./webgl/PooledUint32Array.js";import{Profiler as c}from"./webgl/Profiler.js";import{TileReshuffleManager as u}from"./webgl/TileReshuffleManager.js";import{startup as p,shutdown as f}from"./webgl/shaderGraph/techniques/TechniqueRegistry.js";import{MeshWriterRegistry as g}from"./webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js";import{Timeline as _}from"../support/Timeline.js";import{TextureWrapMode as b,SizedPixelFormat as w,SizedDepthStencilFormat as R,PixelFormat as y,PixelType as x}from"../../webgl/enums.js";import{FramebufferObject as P}from"../../webgl/FramebufferObject.js";import{RenderbufferDescriptor as j}from"../../webgl/RenderbufferDescriptor.js";import{RenderingContext as C}from"../../webgl/RenderingContext.js";import{TextureDescriptor as T}from"../../webgl/TextureDescriptor.js";const M=2e3;class O extends a{constructor(t,i){super(),this.meshWriterRegistry=new g,this._trash=new Set,this._renderRemainingTime=0,this._lastFrameRenderTime=0,this._renderRequested=s(!1),this.stage=this,this._stationary=!0,this._reshuffleManager=new u,this._canvas=new o(t),this.context=new C(this._canvas.gl,i.contextOptions??{}),this.painter=new l(this.context,this),this._cimAnalyzer=new n(this.painter.textureManager.resourceManager),has("esri-2d-profiler")&&(this._debugOutput=document.createElement("div"),this._debugOutput.setAttribute("style","margin: 24px 64px; position: absolute; color: red;"),t.appendChild(this._debugOutput));const a=()=>this.highlightGradient;this._renderParameters={drawPhase:0,state:this.state,pixelRatio:window.devicePixelRatio,stationary:!1,globalOpacity:1,blendMode:null,deltaTime:-1,time:0,inFadeTransition:!1,effects:null,context:this.context,painter:this.painter,timeline:i.timeline||new _,renderingOptions:i.renderingOptions,requestRender:()=>this.requestRender(),allowDelayedRender:!1,requireFBO:!1,profiler:new c(this.context,this._debugOutput),dataUploadCounter:0,get highlightGradient(){return a()},reshuffleManager:this._reshuffleManager,backgroundColor:i.backgroundColor},this._taskHandle=r({render:e=>this.renderFrame(e)}),this._taskHandle.pause(),this._lostWebGLContextHandle=this._canvas.events.on("webgl-context-lost",(t=>this.emit("webgl-error",{error:new e("webgl-context-lost",t.statusMessage)}))),this._bufferPool=new m,p()}destroy(){f(this.context),this.removeAllChildren(),this._emptyTrash(),this._taskHandle=t(this._taskHandle),this._lostWebGLContextHandle=t(this._lostWebGLContextHandle),this._canvas.destroy(),this._debugOutput?.parentNode?.removeChild(this._debugOutput),this._bufferPool.destroy(),this.painter.dispose(),this.context.dispose(),this._canvas=null}get textureManager(){return this.painter.textureManager}get backgroundColor(){return this._renderParameters.backgroundColor}set backgroundColor(e){this._renderParameters.backgroundColor=e,this.requestRender()}get bufferPool(){return this._bufferPool}get cimAnalyzer(){return this._cimAnalyzer}get renderingOptions(){return this._renderingOptions}set renderingOptions(e){this._renderingOptions=e,this.requestRender()}get renderRequested(){return this._renderRequested.value}get state(){return this._state}set state(e){this._state=e,this.requestRender()}get stationary(){return this._stationary}set stationary(e){this._stationary!==e&&(this._stationary=e,this.requestRender())}trashDisplayObject(e){this._trash.add(e),this.requestRender()}untrashDisplayObject(e){return this._trash.delete(e)}requestRender(){this._renderRemainingTime=M,this.renderRequested||(this._renderRequested.value=!0,this._taskHandle.resume())}renderFrame(e){const t=this._lastFrameRenderTime?e.time-this._lastFrameRenderTime:0;this._renderRemainingTime-=t,this._renderRemainingTime<=0&&this._taskHandle.pause(),this._lastFrameRenderTime=e.time,this._renderRequested.value=!1,this._renderParameters.state=this._state,this._renderParameters.stationary=this.stationary,this._renderParameters.pixelRatio=window.devicePixelRatio,this._renderParameters.globalOpacity=1,this._renderParameters.time=e.time,this._renderParameters.deltaTime=e.deltaTime,this._renderParameters.effects=null,this.processRender(this._renderParameters),this._emptyTrash()}_createTransforms(){return{displayViewScreenMat3:i()}}renderChildren(e){for(const t of this.children)t.beforeRender(e);this._reshuffleManager.reshuffle(h),this._canvas.render(e,(()=>this._renderChildren(this.children,e)));for(const t of this.children)t.afterRender(e)}_renderChildren(e,t){const r=this.context;this.painter.textureUploadManager.upload(),r.resetInfo(),t.profiler.recordStart("drawLayers"),t.dataUploadCounter=0,this.painter.beforeRenderPhases(t,t.backgroundColor,this.state.padding),t.drawPhase=d.MAP;for(const s of e)s.processRender(t);if(this.children.some((e=>e.hasHighlight))){t.drawPhase=d.HIGHLIGHT;for(const r of e)r.processRender(t)}if(this.children.some((e=>e.hasLabels))){t.drawPhase=d.LABEL;for(const r of e)r.processRender(t)}if(has("esri-tiles-debug")){t.drawPhase=d.DEBUG;for(const r of e)r.processRender(t)}this.painter.afterRenderPhases(t),t.profiler.recordEnd("drawLayers"),r.logInfo()}doRender(e){const t=this.context,{state:r,pixelRatio:s}=e;this._canvas.resize(e),t.setViewport(0,0,s*r.size[0],s*r.size[1]),t.setDepthWriteEnabled(!0),t.setStencilWriteMask(255),this.renderChildren(e)}async takeScreenshot(e,t,r,s){const i=Math.round(this.state.size[0]*e.resolutionScale),n=Math.round(this.state.size[1]*e.resolutionScale),a=e.resolutionScale,o=this.context,h=this._state.clone();if(null!=s){const e=h.viewpoint;h.viewpoint.rotation=s,h.viewpoint=e}const d={...this._renderParameters,drawPhase:null,globalOpacity:1,stationary:!0,state:h,pixelRatio:a,time:performance.now(),deltaTime:0,blendMode:null,effects:null,inFadeTransition:!1,backgroundColor:r},l=new T(i,n);l.wrapMode=b.CLAMP_TO_EDGE,l.internalFormat=w.RGBA8,l.isImmutable=!0;const m=new P(o,l,new j(R.DEPTH24_STENCIL8,i,n)),c=o.getBoundFramebufferObject(),u=o.getViewport();o.bindFramebuffer(m),o.setViewport(0,0,i,n),this._renderChildren(t??this.children,d);const p=this._readbackScreenshot(m,{...e.cropArea,y:n-(e.cropArea.y+e.cropArea.height)});o.bindFramebuffer(c),o.setViewport(u.x,u.y,u.width,u.height),this.requestRender();const f=await p;let g;return 1===e.outputScale?g=f:(g=new ImageData(Math.round(f.width*e.outputScale),Math.round(f.height*e.outputScale)),(await import("../../support/screenshotUtils.js")).resampleHermite(f,g,!0)),m.dispose(),g}async _readbackScreenshot(e,t){const r=(await import("../../support/screenshotUtils.js")).createEmptyImageData(t.width,t.height,document.createElement("canvas"));return await e.readPixelsAsync(t.x,t.y,t.width,t.height,y.RGBA,x.UNSIGNED_BYTE,new Uint8Array(r.data.buffer)),r}_emptyTrash(){for(;this._trash.size>0;){const e=Array.from(this._trash);this._trash.clear();for(const t of e)t.processDetach()}}}export{O as Stage,M as extraRenderTime};
5
+ import e from"../../../core/Error.js";import has from"../../../core/has.js";import{removeMaybe as t}from"../../../core/maybe.js";import{addFrameTask as r}from"../../../core/scheduling.js";import{signal as s}from"../../../core/signal.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{CIMAnalyzer as n}from"../../../symbols/cim/cimAnalyzer.js";import{Container as a}from"./Container.js";import{ManagedCanvas as o}from"./ManagedCanvas.js";import{MAX_TILE_RESHUFFLES_PER_FRAME as h}from"./webgl/definitions.js";import{WGLDrawPhase as d}from"./webgl/enums.js";import l from"./webgl/Painter.js";import{ArrayBufferPool as m}from"./webgl/PooledUint32Array.js";import{Profiler as c}from"./webgl/Profiler.js";import{TileReshuffleManager as u}from"./webgl/TileReshuffleManager.js";import{startup as p,shutdown as f}from"./webgl/shaderGraph/techniques/TechniqueRegistry.js";import{MeshWriterRegistry as g}from"./webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js";import{Timeline as _}from"../support/Timeline.js";import{TextureWrapMode as b,SizedPixelFormat as w,SizedDepthStencilFormat as R,PixelFormat as y,PixelType as x}from"../../webgl/enums.js";import{FramebufferObject as P}from"../../webgl/FramebufferObject.js";import{RenderbufferDescriptor as j}from"../../webgl/RenderbufferDescriptor.js";import{RenderingContext as C}from"../../webgl/RenderingContext.js";import{TextureDescriptor as T}from"../../webgl/TextureDescriptor.js";const M=2e3;class O extends a{constructor(t,i){super(),this.meshWriterRegistry=new g,this._trash=new Set,this._renderRemainingTime=0,this._lastFrameRenderTime=0,this._renderRequested=s(!1),this.stage=this,this._stationary=!0,this._reshuffleManager=new u,this._canvas=new o(t,i),this.context=new C(this._canvas.gl,i.contextOptions??{}),this.painter=new l(this.context,this),this._cimAnalyzer=new n(this.painter.textureManager.resourceManager),has("esri-2d-profiler")&&(this._debugOutput=document.createElement("div"),this._debugOutput.setAttribute("style","margin: 24px 64px; position: absolute; color: red;"),t.appendChild(this._debugOutput));const a=()=>this.highlightGradient;this._renderParameters={drawPhase:0,state:this.state,pixelRatio:window.devicePixelRatio,stationary:!1,globalOpacity:1,blendMode:null,deltaTime:-1,time:0,inFadeTransition:!1,effects:null,context:this.context,painter:this.painter,timeline:i.timeline||new _,renderingOptions:i.renderingOptions,requestRender:()=>this.requestRender(),allowDelayedRender:!1,requireFBO:!1,profiler:new c(this.context,this._debugOutput),dataUploadCounter:0,get highlightGradient(){return a()},reshuffleManager:this._reshuffleManager,backgroundColor:i.backgroundColor},this._taskHandle=r({render:e=>this.renderFrame(e)}),this._taskHandle.pause(),this._lostWebGLContextHandle=this._canvas.events.on("webgl-context-lost",(t=>this.emit("webgl-error",{error:new e("webgl-context-lost",t.statusMessage)}))),this._bufferPool=new m,p()}destroy(){f(this.context),this.removeAllChildren(),this._emptyTrash(),this._taskHandle=t(this._taskHandle),this._lostWebGLContextHandle=t(this._lostWebGLContextHandle),this._canvas.destroy(),this._debugOutput?.parentNode?.removeChild(this._debugOutput),this._bufferPool.destroy(),this.painter.dispose(),this.context.dispose(),this._canvas=null}get textureManager(){return this.painter.textureManager}get backgroundColor(){return this._renderParameters.backgroundColor}set backgroundColor(e){this._renderParameters.backgroundColor=e,this.requestRender()}get bufferPool(){return this._bufferPool}get cimAnalyzer(){return this._cimAnalyzer}get renderingOptions(){return this._renderingOptions}set renderingOptions(e){this._renderingOptions=e,this.requestRender()}get renderRequested(){return this._renderRequested.value}get state(){return this._state}set state(e){this._state=e,this.requestRender()}get stationary(){return this._stationary}set stationary(e){this._stationary!==e&&(this._stationary=e,this.requestRender())}trashDisplayObject(e){this._trash.add(e),this.requestRender()}untrashDisplayObject(e){return this._trash.delete(e)}requestRender(){this._renderRemainingTime=M,this.renderRequested||(this._renderRequested.value=!0,this._taskHandle.resume())}renderFrame(e){const t=this._lastFrameRenderTime?e.time-this._lastFrameRenderTime:0;this._renderRemainingTime-=t,this._renderRemainingTime<=0&&this._taskHandle.pause(),this._lastFrameRenderTime=e.time,this._renderRequested.value=!1,this._renderParameters.state=this._state,this._renderParameters.stationary=this.stationary,this._renderParameters.pixelRatio=window.devicePixelRatio,this._renderParameters.globalOpacity=1,this._renderParameters.time=e.time,this._renderParameters.deltaTime=e.deltaTime,this._renderParameters.effects=null,this.processRender(this._renderParameters),this._emptyTrash()}_createTransforms(){return{displayViewScreenMat3:i()}}renderChildren(e){for(const t of this.children)t.beforeRender(e);this._reshuffleManager.reshuffle(h),this._canvas.render(e,(()=>this._renderChildren(this.children,e)));for(const t of this.children)t.afterRender(e)}_renderChildren(e,t){const r=this.context;this.painter.textureUploadManager.upload(),r.resetInfo(),t.profiler.recordStart("drawLayers"),t.dataUploadCounter=0,this.painter.beforeRenderPhases(t,t.backgroundColor,this.state.padding),t.drawPhase=d.MAP;for(const s of e)s.processRender(t);if(this.children.some((e=>e.hasHighlight))){t.drawPhase=d.HIGHLIGHT;for(const r of e)r.processRender(t)}if(this.children.some((e=>e.hasLabels))){t.drawPhase=d.LABEL;for(const r of e)r.processRender(t)}if(has("esri-tiles-debug")){t.drawPhase=d.DEBUG;for(const r of e)r.processRender(t)}this.painter.afterRenderPhases(t),t.profiler.recordEnd("drawLayers"),r.logInfo()}doRender(e){const t=this.context,{state:r,pixelRatio:s}=e;this._canvas.resize(e),t.setViewport(0,0,s*r.size[0],s*r.size[1]),t.setDepthWriteEnabled(!0),t.setStencilWriteMask(255),this.renderChildren(e)}async takeScreenshot(e,t,r,s){const i=Math.round(this.state.size[0]*e.resolutionScale),n=Math.round(this.state.size[1]*e.resolutionScale),a=e.resolutionScale,o=this.context,h=this._state.clone();if(null!=s){const e=h.viewpoint;h.viewpoint.rotation=s,h.viewpoint=e}const d={...this._renderParameters,drawPhase:null,globalOpacity:1,stationary:!0,state:h,pixelRatio:a,time:performance.now(),deltaTime:0,blendMode:null,effects:null,inFadeTransition:!1,backgroundColor:r},l=new T(i,n);l.wrapMode=b.CLAMP_TO_EDGE,l.internalFormat=w.RGBA8,l.isImmutable=!0;const m=new P(o,l,new j(R.DEPTH24_STENCIL8,i,n)),c=o.getBoundFramebufferObject(),u=o.getViewport();o.bindFramebuffer(m),o.setViewport(0,0,i,n),this._renderChildren(t??this.children,d);const p=this._readbackScreenshot(m,{...e.cropArea,y:n-(e.cropArea.y+e.cropArea.height)});o.bindFramebuffer(c),o.setViewport(u.x,u.y,u.width,u.height),this.requestRender();const f=await p;let g;return 1===e.outputScale?g=f:(g=new ImageData(Math.round(f.width*e.outputScale),Math.round(f.height*e.outputScale)),(await import("../../support/screenshotUtils.js")).resampleHermite(f,g,!0)),m.dispose(),g}async _readbackScreenshot(e,t){const r=(await import("../../support/screenshotUtils.js")).createEmptyImageData(t.width,t.height,document.createElement("canvas"));return await e.readPixelsAsync(t.x,t.y,t.width,t.height,y.RGBA,x.UNSIGNED_BYTE,new Uint8Array(r.data.buffer)),r}_emptyTrash(){for(;this._trash.size>0;){const e=Array.from(this._trash);this._trash.clear();for(const t of e)t.processDetach()}}}export{O as Stage,M as extraRenderTime};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../core/has.js";import{identity as e,translate as t,rotate as s,scale as r}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{tileCoordSize as i}from"./constants.js";import{BucketType as o}from"./enums.js";import{CircleRenderBucket as h,SymbolRenderBucket as n,LineRenderBucket as l,FillRenderBucket as c}from"./RenderBucket.js";import{fadeDuration as d}from"./decluttering/config.js";import{TiledDisplayObject as u}from"../webgl/TiledDisplayObject.js";const y=null;class m extends u{constructor(e,t,s,r,a,o,h,n=null){super(e,t,s,r,a,o,i,i),this.styleRepository=h,this._memCache=n,this.type="vector-tile",this._referenced=1,this._hasSymbolBuckets=!1,this._usedMemory=256,this.layerData=new Map,this.status="loading",this.allSymbolsFadingOut=!1,this.lastOpacityUpdate=0,this.symbols=new Map,this.isCoverage=!1,this.neededForCoverage=!1,this.decluttered=!1,this.parentTile=null,this.childrenTiles=new Set,this.featureIndex=null,this.triangleCount=0,this._processed=!1,this.id=e.id}get styleLayerUIDs(){return Array.from(this.layerData.keys())}get hasSymbolBuckets(){return this._hasSymbolBuckets}get isFading(){return this._hasSymbolBuckets&&performance.now()-this.lastOpacityUpdate<d}get isHoldingForFade(){return this._hasSymbolBuckets&&(!this.allSymbolsFadingOut||performance.now()-this.lastOpacityUpdate<d)}get wasRequested(){return"errored"===this.status||"loaded"===this.status||"reloading"===this.status}setData(e){this.changeDataImpl(e),this.requestRender(),this.ready(),this._processed=!0}deleteLayerData(e){let t=!1;for(const s of e){const e=this.layerData.get(s);e&&(this._usedMemory-=e.usedMemory,e.type===o.SYMBOL&&this.symbols.delete(s)&&(t=!0),e.destroy(),this.layerData.delete(s))}this._memCache?.updateSize(this.key.id,this),t&&(this.featureIndex?.clear(),this.emit("symbols-changed")),this.requestRender()}processed(){return this._processed}hasData(){return this.layerData.size>0}hasFeatures(){const e=this.layerData.values();for(const t of e)if(t.hasData())return!0;return!1}dispose(){"unloaded"!==this.status&&(m._destroyRenderBuckets(this.layerData),this.layerData.clear(),this.featureIndex=null,this._usedMemory=0,this.destroy(),this.status="unloaded")}release(){0==--this._referenced&&(this.dispose(),this.stage=null)}retain(){++this._referenced}get cachedMemory(){return this._usedMemory}get usedMemory(){return this._usedMemory}get usedMemoryPerReference(){return this._usedMemory/(this._referenced||1)}changeDataImpl(e){this.featureIndex?.clear();let t=!1;if(e){const{bucketsWithData:s,emptyBuckets:r}=e,a=this._createRenderBuckets(s);if(r&&r.byteLength>0){const e=new Uint32Array(r);for(const t of e)this._deleteLayerData(t)}for(const[e,i]of a)this._deleteLayerData(e),i.type===o.SYMBOL&&(this.symbols.set(e,i.symbols),t=!0),this._usedMemory+=i.usedMemory,this.layerData.set(e,i);this._memCache?.updateSize(this.key.id,this)}this._hasSymbolBuckets=!1;for(const s of this.layerData.values())s.type===o.SYMBOL&&(this._hasSymbolBuckets=!0);t&&this.emit("symbols-changed")}attachWithContext(e){this.stage={context:e,trashDisplayObject(e){e.processDetach()},untrashDisplayObject:()=>!1}}setTransform(a){super.setTransform(a);const i=this.resolution/(a.resolution*a.pixelRatio),o=this.width/this.rangeX*i,h=this.height/this.rangeY*i,n=[0,0];a.toScreen(n,[this.x,this.y]);const l=this.transforms.tileUnitsToPixels;e(l),t(l,l,n),s(l,l,Math.PI*a.rotation/180),r(l,l,[o,h,1])}_createTransforms(){return{displayViewScreenMat3:a(),tileMat3:a(),tileUnitsToPixels:a()}}static _destroyRenderBuckets(e){if(!e)return;const t=new Set;for(const s of e.values())t.has(s)||(s.destroy(),t.add(s));e.clear()}_createRenderBuckets(e){const t=new Map,s=new Map;for(const r of e){const e=this._deserializeBucket(r,s);for(const s of e.layerUIDs)t.set(s,e)}return t}_deserializeBucket(e,t){let s=t.get(e);if(s)return s;switch(new Uint32Array(e)[0]){case o.FILL:s=new c(e,this.styleRepository);break;case o.LINE:s=new l(e,this.styleRepository);break;case o.SYMBOL:s=new n(e,this.styleRepository,this);break;case o.CIRCLE:s=new h(e,this.styleRepository)}return t.set(e,s),s}_deleteLayerData(e){if(!this.layerData.has(e))return;const t=this.layerData.get(e);this._usedMemory-=t.usedMemory,t.destroy(),this.layerData.delete(e)}}export{m as VectorTile,y as tracer};
5
+ import"../../../../core/has.js";import{identity as e,translate as t,rotate as s,scale as r}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{tileCoordSize as i}from"./constants.js";import{BucketType as o}from"./enums.js";import{CircleRenderBucket as h,SymbolRenderBucket as n,LineRenderBucket as l,FillRenderBucket as c}from"./RenderBucket.js";import{fadeDuration as d}from"./decluttering/config.js";import{TiledDisplayObject as u}from"../webgl/TiledDisplayObject.js";const y=null;class m extends u{constructor(e,t,s,r,a,o,h,n=null){super(e,t,s,r,a,o,i,i),this.styleRepository=h,this._memCache=n,this.type="vector-tile",this._referenced=1,this._hasSymbolBuckets=!1,this._usedMemory=256,this.layerData=new Map,this.status="loading",this.allSymbolsFadingOut=!1,this.lastOpacityUpdate=0,this.symbols=new Map,this.isCoverage=!1,this.neededForCoverage=!1,this.decluttered=!1,this.parentTile=null,this.childrenTiles=new Set,this.featureIndex=null,this.triangleCount=0,this._processed=!1,this.id=e.id}get styleLayerUIDs(){return Array.from(this.layerData.keys())}get hasSymbolBuckets(){return this._hasSymbolBuckets}get isFading(){return this._hasSymbolBuckets&&performance.now()-this.lastOpacityUpdate<d}get isHoldingForFade(){return this._hasSymbolBuckets&&(!this.allSymbolsFadingOut||performance.now()-this.lastOpacityUpdate<d)}get wasRequested(){return"errored"===this.status||"loaded"===this.status||"reloading"===this.status}setData(e){this.changeDataImpl(e),this.requestRender(),this.ready(),this._processed=!0}deleteLayerData(e){let t=!1;for(const s of e){const e=this.layerData.get(s);e&&(this._usedMemory-=e.usedMemory,e.type===o.SYMBOL&&this.symbols.delete(s)&&(t=!0),e.destroy(),this.layerData.delete(s))}this._memCache?.updateSize(this.key.id,this),t&&(this.featureIndex?.clear(),this.emit("symbols-changed")),this.requestRender()}processed(){return this._processed}hasData(){return this.layerData.size>0}hasFeatures(){const e=this.layerData.values();for(const t of e)if(t.hasData())return!0;return!1}dispose(){"unloaded"!==this.status&&(m._destroyRenderBuckets(this.layerData),this.layerData.clear(),this.featureIndex=null,this._usedMemory=0,this.destroy(),this.status="unloaded")}release(){0===--this._referenced&&(this.dispose(),this.stage=null)}retain(){++this._referenced}get cachedMemory(){return this._usedMemory}get usedMemory(){return this._usedMemory}get usedMemoryPerReference(){return this._usedMemory/(this._referenced||1)}changeDataImpl(e){this.featureIndex?.clear();let t=!1;if(e){const{bucketsWithData:s,emptyBuckets:r}=e,a=this._createRenderBuckets(s);if(r&&r.byteLength>0){const e=new Uint32Array(r);for(const t of e)this._deleteLayerData(t)}for(const[e,i]of a)this._deleteLayerData(e),i.type===o.SYMBOL&&(this.symbols.set(e,i.symbols),t=!0),this._usedMemory+=i.usedMemory,this.layerData.set(e,i);this._memCache?.updateSize(this.key.id,this)}this._hasSymbolBuckets=!1;for(const s of this.layerData.values())s.type===o.SYMBOL&&(this._hasSymbolBuckets=!0);t&&this.emit("symbols-changed")}attachWithContext(e){this.stage={context:e,trashDisplayObject(e){e.processDetach()},untrashDisplayObject:()=>!1}}setTransform(a){super.setTransform(a);const i=this.resolution/(a.resolution*a.pixelRatio),o=this.width/this.rangeX*i,h=this.height/this.rangeY*i,n=[0,0];a.toScreen(n,[this.x,this.y]);const l=this.transforms.tileUnitsToPixels;e(l),t(l,l,n),s(l,l,Math.PI*a.rotation/180),r(l,l,[o,h,1])}_createTransforms(){return{displayViewScreenMat3:a(),tileMat3:a(),tileUnitsToPixels:a()}}static _destroyRenderBuckets(e){if(!e)return;const t=new Set;for(const s of e.values())t.has(s)||(s.destroy(),t.add(s));e.clear()}_createRenderBuckets(e){const t=new Map,s=new Map;for(const r of e){const e=this._deserializeBucket(r,s);for(const s of e.layerUIDs)t.set(s,e)}return t}_deserializeBucket(e,t){let s=t.get(e);if(s)return s;switch(new Uint32Array(e)[0]){case o.FILL:s=new c(e,this.styleRepository);break;case o.LINE:s=new l(e,this.styleRepository);break;case o.SYMBOL:s=new n(e,this.styleRepository,this);break;case o.CIRCLE:s=new h(e,this.styleRepository)}return t.set(e,s),s}_deleteLayerData(e){if(!this.layerData.has(e))return;const t=this.layerData.get(e);this._usedMemory-=t.usedMemory,t.destroy(),this.layerData.delete(e)}}export{m as VectorTile,y as tracer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import has from"../../../../core/has.js";import{WGLDrawPhase as e}from"./enums.js";import r from"./WGLContainer.js";import s from"./brushes/WGLBrushStencil.js";import t from"./brushes/WGLBrushTileDebugInfo.js";const n=(e,r)=>e.key.level-r.key.level!=0?e.key.level-r.key.level:e.key.row-r.key.row!=0?e.key.row-r.key.row:e.key.col-r.key.col;class i extends r{constructor(e){super(),this.tileInfoView=e,this.sortFunction=n}renderChildren(e){this.setStencilReference(e),super.renderChildren(e)}createRenderParams(e){const{state:r}=e,s=super.createRenderParams(e);return s.requiredLevel=this.tileInfoView.getClosestInfoForScale(r.scale).level,s.displayLevel=this.tileInfoView.tileInfo.scaleToZoom(r.scale),s}prepareRenderPasses(r){const n=super.prepareRenderPasses(r);return n.push(r.registerRenderPass({name:"stencil",brushes:[s],drawPhase:e.DEBUG|e.MAP|e.HIGHLIGHT|e.LABEL,target:()=>this.getStencilTarget()})),has("esri-tiles-debug")&&n.push(r.registerRenderPass({name:"tileInfo",brushes:[t],drawPhase:e.DEBUG,target:()=>this.children})),n}getStencilTarget(){return this.children}setStencilReference(e){let r=1;for(const s of this.children)s.stencilRef=r++}}export{i as default};
5
+ import has from"../../../../core/has.js";import{WGLDrawPhase as e}from"./enums.js";import r from"./WGLContainer.js";import s from"./brushes/WGLBrushStencil.js";import t from"./brushes/WGLBrushTileDebugInfo.js";const n=(e,r)=>e.key.level-r.key.level!==0?e.key.level-r.key.level:e.key.row-r.key.row!==0?e.key.row-r.key.row:e.key.col-r.key.col;class i extends r{constructor(e){super(),this.tileInfoView=e,this.sortFunction=n}renderChildren(e){this.setStencilReference(e),super.renderChildren(e)}createRenderParams(e){const{state:r}=e,s=super.createRenderParams(e);return s.requiredLevel=this.tileInfoView.getClosestInfoForScale(r.scale).level,s.displayLevel=this.tileInfoView.tileInfo.scaleToZoom(r.scale),s}prepareRenderPasses(r){const n=super.prepareRenderPasses(r);return n.push(r.registerRenderPass({name:"stencil",brushes:[s],drawPhase:e.DEBUG|e.MAP|e.HIGHLIGHT|e.LABEL,target:()=>this.getStencilTarget()})),has("esri-tiles-debug")&&n.push(r.registerRenderPass({name:"tileInfo",brushes:[t],drawPhase:e.DEBUG,target:()=>this.children})),n}getStencilTarget(){return this.children}setStencilReference(e){let r=1;for(const s of this.children)s.stencilRef=r++}}export{i as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{numericHash as t}from"../../../../core/string.js";function e(e,o){let r;if("string"==typeof e)r=t(e+`-seed(${o})`);else{let t=12;r=e^o;do{r=107*(r>>8^r)+t|0}while(0!=--t)}return(1+r/(1<<31))/2}function o(t){return Math.floor(e(t,r)*n)}const r=53290320,n=10;export{e as getRandomValue,o as getStartGroup};
5
+ import{numericHash as t}from"../../../../core/string.js";function e(e,o){let r;if("string"==typeof e)r=t(e+`-seed(${o})`);else{let t=12;r=e^o;do{r=107*(r>>8^r)+t|0}while(0!==--t)}return(1+r/(1<<31))/2}function o(t){return Math.floor(e(t,r)*n)}const r=53290320,n=10;export{e as getRandomValue,o as getStartGroup};