@arcgis/core 4.32.0-next.20250128 → 4.32.0-next.20250130

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 (1152) hide show
  1. package/TrackGraphic.js +1 -1
  2. package/applications/Components/SelectionOperation.d.ts +1 -2
  3. package/applications/Components/SketchTooltipControls.d.ts +1 -2
  4. package/applications/Components/basemapUtils.d.ts +1 -2
  5. package/applications/Components/drawUtils.d.ts +1 -2
  6. package/applications/Components/fontUtils.d.ts +1 -2
  7. package/applications/Components/getDefaultUnits.d.ts +1 -2
  8. package/applications/Components/gfxUtils.d.ts +1 -2
  9. package/applications/Components/layerOriginUtils.d.ts +4 -2
  10. package/applications/Components/layersEffectsJsonUtils.d.ts +1 -2
  11. package/applications/Components/previewSymbol2D.d.ts +1 -2
  12. package/applications/Components/reactiveUtils.d.ts +1 -2
  13. package/applications/Components/styleUtils.d.ts +1 -2
  14. package/applications/Components/svgUtils.d.ts +3 -2
  15. package/applications/Components/webStyleSymbolUtils.d.ts +1 -2
  16. package/applications/Excalibur/videoViewUtils.d.ts +1 -2
  17. package/applications/ExperienceBuilder/sketchUtils.d.ts +3 -2
  18. package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +2 -2
  19. package/applications/KnowledgeStudio/layerInternalAccessUtils.d.ts +3 -2
  20. package/applications/KnowledgeStudio/resourceSerializationUtils.d.ts +4 -2
  21. package/applications/MapViewer/mediaUtils.d.ts +2 -2
  22. package/applications/MapViewer/templateUtils.d.ts +4 -2
  23. package/applications/SceneViewer/colorUtils.d.ts +1 -2
  24. package/applications/SceneViewer/devEnvironmentUtils.d.ts +3 -2
  25. package/applications/SceneViewer/layerUtils.d.ts +2 -2
  26. package/applications/SceneViewer/sceneViewerUtils.d.ts +15 -2
  27. package/applications/SceneViewer/symbolUtils.d.ts +1 -2
  28. package/applications/Urban/meshUtils.d.ts +1 -2
  29. package/applications/WebEditor/sketchUtils.d.ts +2 -2
  30. package/arcade.d.ts +2 -2
  31. package/assets/components/assets/icon/hammerCoin16.json +1 -0
  32. package/assets/components/assets/icon/hammerCoin24.json +1 -0
  33. package/assets/components/assets/icon/hammerCoin32.json +1 -0
  34. package/assets/components/assets/icon/hammerLock16.json +1 -0
  35. package/assets/components/assets/icon/hammerLock24.json +1 -0
  36. package/assets/components/assets/icon/hammerLock32.json +1 -0
  37. package/assets/esri/core/workers/RemoteClient.js +1 -1
  38. package/assets/esri/core/workers/chunks/06d72622590dbd38c5de.js +1 -0
  39. package/assets/esri/core/workers/chunks/07c5f3fc475c57f5a7a7.js +1 -0
  40. package/assets/esri/core/workers/chunks/08c4b585290efc98ca5d.js +1 -0
  41. package/assets/esri/core/workers/chunks/{41f7287832d407f13ce5.js → 09b77f82c22530b44daa.js} +1 -1
  42. package/assets/esri/core/workers/chunks/0b62871b89dcb4c70457.js +1 -0
  43. package/assets/esri/core/workers/chunks/0bafa546602b776caf2f.js +1 -0
  44. package/assets/esri/core/workers/chunks/0ebdf0d1fd2034b24519.js +972 -0
  45. package/assets/esri/core/workers/chunks/{e89439cc20b7f4c6a9d1.js → 0ef5b0f8aa8a09acd6e0.js} +1 -1
  46. package/assets/esri/core/workers/chunks/117e7a12af77c761efb5.js +1 -0
  47. package/assets/esri/core/workers/chunks/122ed10cac9f192e1eec.js +1 -0
  48. package/assets/esri/core/workers/chunks/12964a4b16113cdc9c93.js +1 -0
  49. package/assets/esri/core/workers/chunks/149bad940feb0764b350.js +1 -0
  50. package/assets/esri/core/workers/chunks/1891c9aa162c5df1d27c.js +1 -0
  51. package/assets/esri/core/workers/chunks/1ab83753d9eec0463461.js +1 -0
  52. package/assets/esri/core/workers/chunks/{304722106439951da6e1.js → 1accbc048b74857269e4.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{0edf5cd5d004631c3959.js → 1cbeac3301b6943bb28a.js} +1 -1
  54. package/assets/esri/core/workers/chunks/1d51c064045e9c47bd2e.js +1 -0
  55. package/assets/esri/core/workers/chunks/1f443b99653708470f31.js +1 -0
  56. package/assets/esri/core/workers/chunks/{7d49b5bc9eb102e467ab.js → 220b12654b94c94f8d8a.js} +1 -1
  57. package/assets/esri/core/workers/chunks/22e11a8abc70b6571a2b.js +1 -0
  58. package/assets/esri/core/workers/chunks/2345344be4b0e487d3a6.js +1 -0
  59. package/assets/esri/core/workers/chunks/{6eb829a7959df2269b0e.js → 24c94f97a76646d415ae.js} +1 -1
  60. package/assets/esri/core/workers/chunks/258b46b58a4860942f7c.js +1 -0
  61. package/assets/esri/core/workers/chunks/25c8cc30faade043c8dc.js.LICENSE.txt +1 -1
  62. package/assets/esri/core/workers/chunks/2c6f2fdf274c0258621e.js +1 -0
  63. package/assets/esri/core/workers/chunks/2ff63a71213f618377d6.js +1 -0
  64. package/assets/esri/core/workers/chunks/308ec51ff4a66f7fcb0d.js.LICENSE.txt +1 -1
  65. package/assets/esri/core/workers/chunks/{985ae30627429832b2a9.js → 32f5f00aab55ef16dcf1.js} +1 -1
  66. package/assets/esri/core/workers/chunks/380d37ceb8cf52bad190.js +1 -0
  67. package/assets/esri/core/workers/chunks/3984bf01f055fc42bfbf.js +1 -0
  68. package/assets/esri/core/workers/chunks/3e872e5e528dca7bee0c.js +1 -0
  69. package/assets/esri/core/workers/chunks/3ec51b75d1a86dad6cb1.js +1 -0
  70. package/assets/esri/core/workers/chunks/4263eee3247aaf4e64bf.js +1 -0
  71. package/assets/esri/core/workers/chunks/448ee44c7f594e5b2551.js +1 -0
  72. package/assets/esri/core/workers/chunks/476205ee4414ed80666a.js +1 -0
  73. package/assets/esri/core/workers/chunks/4b56c0c109e10d7409b8.js +1 -0
  74. package/assets/esri/core/workers/chunks/{95e786366bc471bd0730.js → 4c5279fedf982a174706.js} +1 -1
  75. package/assets/esri/core/workers/chunks/4cab082b8432ddc05345.js +1 -0
  76. package/assets/esri/core/workers/chunks/{1e1306527fb38c5894eb.js → 5a536de1ecae424bad05.js} +1 -1
  77. package/assets/esri/core/workers/chunks/5adeb979f178944b9ce5.js +1 -0
  78. package/assets/esri/core/workers/chunks/5be7cf1564e756c24066.js +1 -0
  79. package/assets/esri/core/workers/chunks/{f09c95c3d79205ee5a84.js → 5e9bf6d0db82526b8a8c.js} +5 -5
  80. package/assets/esri/core/workers/chunks/{57ebfa7f163a1b40cd1e.js → 61795bde00f2e16d04f1.js} +1 -1
  81. package/assets/esri/core/workers/chunks/{568fe969e8f914f042ca.js → 627cbe662d58cda62e7e.js} +1 -1
  82. package/assets/esri/core/workers/chunks/{6d179eb8edcefb91d5d7.js → 69ab4b780f7223cfd7dd.js} +1 -1
  83. package/assets/esri/core/workers/chunks/6d79ec15d1858839f576.js +1 -0
  84. package/assets/esri/core/workers/chunks/6e25742ceedea7fb1b97.js +1 -0
  85. package/assets/esri/core/workers/chunks/6e8905f20101c1f4509d.js.LICENSE.txt +1 -1
  86. package/assets/esri/core/workers/chunks/6ef2514a6b7bbfb8e37d.js +1 -0
  87. package/assets/esri/core/workers/chunks/72cf9192292e5c85c6df.js.LICENSE.txt +1 -1
  88. package/assets/esri/core/workers/chunks/{50beab30e120ba39d212.js → 76794184ba8c2e66745e.js} +1 -1
  89. package/assets/esri/core/workers/chunks/7810579a5a780933cdc9.js +1 -0
  90. package/assets/esri/core/workers/chunks/{e45dba512ebee97f0af2.js → 78242f2bf742b33d99fa.js} +1 -1
  91. package/assets/esri/core/workers/chunks/7966c245a073c85f04b1.js +1 -0
  92. package/assets/esri/core/workers/chunks/{fa0d968733d581bc2e4d.js → 7d120f8b01fe719eb257.js} +1 -1
  93. package/assets/esri/core/workers/chunks/7e23c15b2a02116f7189.js +1 -0
  94. package/assets/esri/core/workers/chunks/7f87cf3d6a365d987f69.js +1 -0
  95. package/assets/esri/core/workers/chunks/83edac97a52b26ead1ea.js +314 -0
  96. package/assets/esri/core/workers/chunks/881ddbdeb40336208e90.js +1 -0
  97. package/assets/esri/core/workers/chunks/{ec9d5af8887854e821c8.js → 88cbaa91c495d86f4bb0.js} +1 -1
  98. package/assets/esri/core/workers/chunks/{11c999b976ed805b0608.js → 89e3f7880abd014a62c0.js} +1 -1
  99. package/assets/esri/core/workers/chunks/{a3ae5ea96898de327147.js → 8bd51b5b392dfacc922f.js} +1 -1
  100. package/assets/esri/core/workers/chunks/8e6301006abdf47cc88d.js +1 -0
  101. package/assets/esri/core/workers/chunks/{9466e53ff270f6eb42c9.js → 9011704b258ecbfb6d9b.js} +2 -2
  102. package/assets/esri/core/workers/chunks/{9466e53ff270f6eb42c9.js.LICENSE.txt → 9011704b258ecbfb6d9b.js.LICENSE.txt} +1 -1
  103. package/assets/esri/core/workers/chunks/92984981afcbb95828cd.js +1 -0
  104. package/assets/esri/core/workers/chunks/934857de20f6f5c15188.js +1 -0
  105. package/assets/esri/core/workers/chunks/95ad76e58452b60fb79f.js +1 -0
  106. package/assets/esri/core/workers/chunks/9725398f6d56c8ba54ae.js +1 -0
  107. package/assets/esri/core/workers/chunks/97310e6eec87eeaf58f0.js +1 -0
  108. package/assets/esri/core/workers/chunks/9ffa27d0517bad84572e.js +1 -0
  109. package/assets/esri/core/workers/chunks/a39977478a6c57d2e8fb.js +1 -0
  110. package/assets/esri/core/workers/chunks/{f355ca70abadb2155839.js → a61d05354348385f41b5.js} +1 -1
  111. package/assets/esri/core/workers/chunks/af917f69d9c6e9937263.js +1 -0
  112. package/assets/esri/core/workers/chunks/b18620fc15707e4413a1.js +1 -0
  113. package/assets/esri/core/workers/chunks/b1baf39daf5725404be5.js +1 -0
  114. package/assets/esri/core/workers/chunks/b21b152fa15896577242.js.LICENSE.txt +1 -1
  115. package/assets/esri/core/workers/chunks/{39a6fe4cdb205f4925fb.js → b68bddd0c4ca91493543.js} +1 -1
  116. package/assets/esri/core/workers/chunks/bc50585615f07d5ec1a9.js +1 -0
  117. package/assets/esri/core/workers/chunks/bf9bc52a3c559108c19a.js +2 -0
  118. package/assets/esri/core/workers/chunks/{b5d4255db21dfd3b3b13.js.LICENSE.txt → bf9bc52a3c559108c19a.js.LICENSE.txt} +1 -1
  119. package/assets/esri/core/workers/chunks/c04091eea7089dc2e864.js +1 -0
  120. package/assets/esri/core/workers/chunks/{b9369c5415f5b3bda5cf.js → c1d80a709148e3373a82.js} +1 -1
  121. package/assets/esri/core/workers/chunks/c249ad935f54d3b49ae3.js +1 -0
  122. package/assets/esri/core/workers/chunks/{759618564e68fc09dc36.js → c57b9f2b9c229e68919d.js} +1 -1
  123. package/assets/esri/core/workers/chunks/c74441fbe0f63633796f.js +1 -0
  124. package/assets/esri/core/workers/chunks/{7fd48f0a2b35779e680a.js → c7a94e569c905f97244a.js} +1 -1
  125. package/assets/esri/core/workers/chunks/c80d542935803bf869f8.js +1 -0
  126. package/assets/esri/core/workers/chunks/{bc0183350841e09d71fa.js → c8a0089e080140db9076.js} +1 -1
  127. package/assets/esri/core/workers/chunks/{d71a5c029fc9f4820589.js → cee3a38b92a48a58c4d0.js} +1 -1
  128. package/assets/esri/core/workers/chunks/d1678945cf6a58f76863.js +1 -0
  129. package/assets/esri/core/workers/chunks/{9ed1691eab19dfb1cf04.js → d1718ad93e3271b0525e.js} +1 -1
  130. package/assets/esri/core/workers/chunks/{d5b373fe244e5dce1548.js → d27a199fd8e2ade69254.js} +1 -1
  131. package/assets/esri/core/workers/chunks/d3a8aabdbfb59dd433e3.js +1 -0
  132. package/assets/esri/core/workers/chunks/d599ba865da87b487b1b.js +1 -0
  133. package/assets/esri/core/workers/chunks/da1157e288dbc6ba842a.js +1 -0
  134. package/assets/esri/core/workers/chunks/{8584ccce34972e28c040.js → da77eefaad83c0644380.js} +1 -1
  135. package/assets/esri/core/workers/chunks/dd46ec81cebe1a0a7b9c.js +1 -0
  136. package/assets/esri/core/workers/chunks/dd9be173cddc16a354ed.js +1 -0
  137. package/assets/esri/core/workers/chunks/debfb75a94b66b58cbbc.js +1 -0
  138. package/assets/esri/core/workers/chunks/{5a83f90b55a5efbe1ef2.js → df3d1a8d3f11d52eb30d.js} +1 -1
  139. package/assets/esri/core/workers/chunks/e0de91eacf3a3b7eda55.js +51 -0
  140. package/assets/esri/core/workers/chunks/e444ec05a8a1dfbd21a8.js +1 -0
  141. package/assets/esri/core/workers/chunks/e4651d577d297386268e.js +1 -0
  142. package/assets/esri/core/workers/chunks/e468bf4ec7402942ad8c.js +1 -0
  143. package/assets/esri/core/workers/chunks/f200dca22f9f9bbb8670.js +1 -0
  144. package/assets/esri/core/workers/chunks/f2fae056a81f12b56b04.js +1 -0
  145. package/assets/esri/core/workers/chunks/f429d95eb986f3d215f3.js +1 -0
  146. package/assets/esri/core/workers/chunks/f8367c21fa91435c7c53.js +1 -0
  147. package/assets/esri/themes/base/_Ui.scss +6 -0
  148. package/assets/esri/themes/base/_mixins.scss +0 -7
  149. package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +0 -2
  150. package/assets/esri/themes/base/widgets/_Bookmarks.scss +0 -5
  151. package/assets/esri/themes/base/widgets/_CatalogLayerList.scss +0 -2
  152. package/assets/esri/themes/base/widgets/_Features.scss +0 -5
  153. package/assets/esri/themes/base/widgets/_LayerList.scss +0 -2
  154. package/assets/esri/themes/base/widgets/_TableList.scss +0 -2
  155. package/assets/esri/themes/dark/main.css +1 -1
  156. package/assets/esri/themes/light/main.css +1 -1
  157. package/assets/esri/themes/light/view.css +1 -1
  158. package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
  159. package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
  160. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm.json +1 -1
  161. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ar.json +1 -1
  162. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bg.json +1 -1
  163. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bs.json +1 -1
  164. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ca.json +1 -1
  165. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_cs.json +1 -1
  166. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_da.json +1 -1
  167. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_de.json +1 -1
  168. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_el.json +1 -1
  169. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_en.json +1 -1
  170. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_es.json +1 -1
  171. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_et.json +1 -1
  172. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fi.json +1 -1
  173. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fr.json +1 -1
  174. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_he.json +1 -1
  175. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hr.json +1 -1
  176. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hu.json +1 -1
  177. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_id.json +1 -1
  178. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_it.json +1 -1
  179. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ja.json +1 -1
  180. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ko.json +1 -1
  181. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lt.json +1 -1
  182. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lv.json +1 -1
  183. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_nl.json +1 -1
  184. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_no.json +1 -1
  185. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pl.json +1 -1
  186. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-BR.json +1 -1
  187. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-PT.json +1 -1
  188. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ro.json +1 -1
  189. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ru.json +1 -1
  190. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sk.json +1 -1
  191. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sl.json +1 -1
  192. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sr.json +1 -1
  193. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sv.json +1 -1
  194. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_th.json +1 -1
  195. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_tr.json +1 -1
  196. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_uk.json +1 -1
  197. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_vi.json +1 -1
  198. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-CN.json +1 -1
  199. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-HK.json +1 -1
  200. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-TW.json +1 -1
  201. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  202. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  203. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  204. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  205. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  206. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  207. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  208. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  209. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  210. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  211. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  212. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  213. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  214. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  215. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  216. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  217. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  218. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  219. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  220. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  221. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  222. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  223. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  224. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  225. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  226. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  227. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  228. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  229. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  230. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  231. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  232. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  233. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  234. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  235. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  236. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  237. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  238. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  239. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  240. package/assets/esri/widgets/Sketch/t9n/Sketch_ar.json +1 -1
  241. package/assets/esri/widgets/Sketch/t9n/Sketch_bg.json +1 -1
  242. package/assets/esri/widgets/Sketch/t9n/Sketch_bs.json +1 -1
  243. package/assets/esri/widgets/Sketch/t9n/Sketch_ca.json +1 -1
  244. package/assets/esri/widgets/Sketch/t9n/Sketch_cs.json +1 -1
  245. package/assets/esri/widgets/Sketch/t9n/Sketch_da.json +1 -1
  246. package/assets/esri/widgets/Sketch/t9n/Sketch_de.json +1 -1
  247. package/assets/esri/widgets/Sketch/t9n/Sketch_el.json +1 -1
  248. package/assets/esri/widgets/Sketch/t9n/Sketch_es.json +1 -1
  249. package/assets/esri/widgets/Sketch/t9n/Sketch_et.json +1 -1
  250. package/assets/esri/widgets/Sketch/t9n/Sketch_fi.json +1 -1
  251. package/assets/esri/widgets/Sketch/t9n/Sketch_fr.json +1 -1
  252. package/assets/esri/widgets/Sketch/t9n/Sketch_he.json +1 -1
  253. package/assets/esri/widgets/Sketch/t9n/Sketch_hr.json +1 -1
  254. package/assets/esri/widgets/Sketch/t9n/Sketch_hu.json +1 -1
  255. package/assets/esri/widgets/Sketch/t9n/Sketch_id.json +1 -1
  256. package/assets/esri/widgets/Sketch/t9n/Sketch_it.json +1 -1
  257. package/assets/esri/widgets/Sketch/t9n/Sketch_ja.json +1 -1
  258. package/assets/esri/widgets/Sketch/t9n/Sketch_ko.json +1 -1
  259. package/assets/esri/widgets/Sketch/t9n/Sketch_lt.json +1 -1
  260. package/assets/esri/widgets/Sketch/t9n/Sketch_lv.json +1 -1
  261. package/assets/esri/widgets/Sketch/t9n/Sketch_nl.json +1 -1
  262. package/assets/esri/widgets/Sketch/t9n/Sketch_no.json +1 -1
  263. package/assets/esri/widgets/Sketch/t9n/Sketch_pl.json +1 -1
  264. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-BR.json +1 -1
  265. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-PT.json +1 -1
  266. package/assets/esri/widgets/Sketch/t9n/Sketch_ro.json +1 -1
  267. package/assets/esri/widgets/Sketch/t9n/Sketch_ru.json +1 -1
  268. package/assets/esri/widgets/Sketch/t9n/Sketch_sk.json +1 -1
  269. package/assets/esri/widgets/Sketch/t9n/Sketch_sl.json +1 -1
  270. package/assets/esri/widgets/Sketch/t9n/Sketch_sr.json +1 -1
  271. package/assets/esri/widgets/Sketch/t9n/Sketch_sv.json +1 -1
  272. package/assets/esri/widgets/Sketch/t9n/Sketch_th.json +1 -1
  273. package/assets/esri/widgets/Sketch/t9n/Sketch_tr.json +1 -1
  274. package/assets/esri/widgets/Sketch/t9n/Sketch_uk.json +1 -1
  275. package/assets/esri/widgets/Sketch/t9n/Sketch_vi.json +1 -1
  276. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-CN.json +1 -1
  277. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-HK.json +1 -1
  278. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-TW.json +1 -1
  279. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ar.json +1 -1
  280. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bg.json +1 -1
  281. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bs.json +1 -1
  282. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ca.json +1 -1
  283. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_cs.json +1 -1
  284. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_da.json +1 -1
  285. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_de.json +1 -1
  286. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_el.json +1 -1
  287. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_es.json +1 -1
  288. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_et.json +1 -1
  289. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fi.json +1 -1
  290. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fr.json +1 -1
  291. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_he.json +1 -1
  292. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hr.json +1 -1
  293. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hu.json +1 -1
  294. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_id.json +1 -1
  295. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_it.json +1 -1
  296. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ja.json +1 -1
  297. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ko.json +1 -1
  298. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lt.json +1 -1
  299. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lv.json +1 -1
  300. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_nl.json +1 -1
  301. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_no.json +1 -1
  302. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pl.json +1 -1
  303. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-BR.json +1 -1
  304. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-PT.json +1 -1
  305. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ro.json +1 -1
  306. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ru.json +1 -1
  307. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sk.json +1 -1
  308. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sl.json +1 -1
  309. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sr.json +1 -1
  310. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sv.json +1 -1
  311. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_th.json +1 -1
  312. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_tr.json +1 -1
  313. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_uk.json +1 -1
  314. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_vi.json +1 -1
  315. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-CN.json +1 -1
  316. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-HK.json +1 -1
  317. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-TW.json +1 -1
  318. package/chunks/AtmosphereCompositing.glsl.js +2 -2
  319. package/chunks/BlendLayers.glsl.js +1 -1
  320. package/chunks/BlendWeights.glsl.js +1 -1
  321. package/chunks/BloomBlur.glsl.js +23 -23
  322. package/chunks/BloomComposition.glsl.js +3 -3
  323. package/chunks/BloomDepthAdjust.glsl.js +2 -2
  324. package/chunks/Blur.glsl.js +1 -1
  325. package/chunks/Bufferer-DjC-SKTJ.js +5 -0
  326. package/chunks/ChapmanAtmosphere.glsl.js +2 -2
  327. package/chunks/CheckerBoard.glsl.js +2 -2
  328. package/chunks/Clouds.glsl.js +14 -14
  329. package/chunks/CloudsComposition.glsl.js +1 -1
  330. package/chunks/ColorMaterial.glsl.js +1 -1
  331. package/chunks/ComponentShader.glsl.js +4 -4
  332. package/chunks/Compositing.glsl.js +2 -2
  333. package/chunks/DefaultMaterial.glsl.js +16 -15
  334. package/chunks/{Distance2DCalculator-C9BrfErD.js → Distance2DCalculator-8-JrFGHH.js} +1 -1
  335. package/chunks/EdgeDetect.glsl.js +2 -2
  336. package/chunks/EdgeShader.glsl.js +2 -2
  337. package/chunks/Envelope.js +1 -1
  338. package/chunks/FocusAreaColor.glsl.js +2 -2
  339. package/chunks/FocusAreaMask.glsl.js +1 -1
  340. package/chunks/Fog.glsl.js +3 -3
  341. package/chunks/GeodeticDistanceCalculator-BsWHOuqE.js +5 -0
  342. package/chunks/Geometry.js +1 -1
  343. package/chunks/HUDCompositing.glsl.js +1 -1
  344. package/chunks/HUDMaterial.glsl.js +24 -24
  345. package/chunks/Haze.glsl.js +3 -3
  346. package/chunks/HazeCompositing.glsl.js +2 -2
  347. package/chunks/Heatmap.glsl.js +1 -1
  348. package/chunks/HeatmapDensity.glsl.js +5 -5
  349. package/chunks/HighlightApply.glsl.js +2 -2
  350. package/chunks/HighlightDownsample.glsl.js +2 -2
  351. package/chunks/HighlightToSingle.glsl.js +2 -2
  352. package/chunks/ImageMaterial.glsl.js +4 -4
  353. package/chunks/LaserlinePath.glsl.js +1 -1
  354. package/chunks/Laserlines.glsl.js +1 -1
  355. package/chunks/LineCallout.glsl.js +1 -1
  356. package/chunks/LineMarker.glsl.js +8 -8
  357. package/chunks/Magnifier.glsl.js +4 -4
  358. package/chunks/MeasurementArrow.glsl.js +2 -2
  359. package/chunks/NativeLine.glsl.js +4 -4
  360. package/chunks/NoiseTextureAtlas.glsl.js +34 -34
  361. package/chunks/OITBlend.glsl.js +3 -3
  362. package/chunks/OperatorClip.js +1 -1
  363. package/chunks/OperatorCut.js +1 -1
  364. package/chunks/OperatorGeneralize.js +1 -1
  365. package/chunks/OperatorGeodesicBuffer.js +1 -1
  366. package/chunks/OperatorGeodeticArea.js +1 -1
  367. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  368. package/chunks/OperatorGeodeticDistance.js +1 -1
  369. package/chunks/OperatorGeodeticLength.js +1 -1
  370. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  371. package/chunks/OperatorProximity.js +1 -1
  372. package/chunks/OperatorProximityGeodesic.js +1 -1
  373. package/chunks/OperatorShapePreservingLength.js +1 -1
  374. package/chunks/OperatorShapePreservingProject.js +1 -1
  375. package/chunks/OverlayCompositing.glsl.js +1 -1
  376. package/chunks/Path.glsl.js +9 -9
  377. package/chunks/Pattern.glsl.js +3 -3
  378. package/chunks/Point2D.js +1 -1
  379. package/chunks/PointRenderer.glsl.js +1 -1
  380. package/chunks/Precipitation.glsl.js +1 -1
  381. package/chunks/ProjectionTransformation.js +1 -1
  382. package/chunks/QuadraticBezier.js +1 -1
  383. package/chunks/RasterColorizer.glsl.js +9 -9
  384. package/chunks/RealisticTree.glsl.js +3 -3
  385. package/chunks/RibbonLine.glsl.js +32 -32
  386. package/chunks/SSAO.glsl.js +2 -2
  387. package/chunks/SSAOBlur.glsl.js +1 -1
  388. package/chunks/ShadedColorMaterial.glsl.js +3 -3
  389. package/chunks/ShadowCastAccumulate.glsl.js +2 -2
  390. package/chunks/ShadowCastVisualize.glsl.js +4 -4
  391. package/chunks/ShadowHighlight.glsl.js +2 -2
  392. package/chunks/{SideCalculator2D-Bf4QCxCR.js → SideCalculator2D-BNwb5gvz.js} +1 -1
  393. package/chunks/SimpleAtmosphere.glsl.js +8 -8
  394. package/chunks/SingleHighlightApply.glsl.js +1 -1
  395. package/chunks/SingleHighlightBlur.glsl.js +6 -7
  396. package/chunks/SlicePlaneMaterial.glsl.js +2 -2
  397. package/chunks/Stars.glsl.js +2 -2
  398. package/chunks/Terrain.glsl.js +2 -2
  399. package/chunks/TextureOnly.glsl.js +2 -2
  400. package/chunks/Viewshed.glsl.js +2 -2
  401. package/chunks/WaterSurface.glsl.js +7 -7
  402. package/chunks/distanceOperator.js +1 -1
  403. package/chunks/relateOperator.js +1 -1
  404. package/core/QueueProcessor.js +5 -0
  405. package/core/accessorSupport/decorators.d.ts +4 -2
  406. package/core/has.js +1 -1
  407. package/core/jsonMap.js +1 -1
  408. package/core/lang.d.ts +1 -2
  409. package/core/libs/gl-matrix-2/factories/vec2f64.js +1 -1
  410. package/core/mathUtils.js +1 -1
  411. package/core/promiseUtils.d.ts +5 -2
  412. package/core/quantity.d.ts +3 -2
  413. package/core/reactiveUtils.d.ts +5 -2
  414. package/core/scheduling.d.ts +2 -2
  415. package/core/sql/WhereClauseCache.js +1 -1
  416. package/core/sql.d.ts +1 -2
  417. package/core/sql.js +1 -1
  418. package/core/units.d.ts +9 -2
  419. package/core/urlUtils.d.ts +5 -2
  420. package/core/workers.d.ts +1 -2
  421. package/editing/sharedTemplates/executor/builders/bufferLineToPolygon.js +1 -1
  422. package/editing/sharedTemplates/executor/builders/bufferPointToPolygon.js +1 -1
  423. package/editing/sharedTemplates/executor/builders/bufferPolygonToPolygon.js +1 -1
  424. package/editing/sharedTemplates/executor/builders/connectionPoint.js +1 -1
  425. package/editing/sharedTemplates/executor/builders/equallySpaced.js +1 -1
  426. package/editing/sharedTemplates/executor/builders/offsetLine.js +1 -1
  427. package/editing/sharedTemplates/executor/builders/offsetPrimaryLine.js +1 -1
  428. package/editing/sharedTemplates/executor/builders/pointAtAllVerticesOfLine.js +1 -1
  429. package/editing/sharedTemplates/executor/builders/pointAtBeginningOfLine.js +1 -1
  430. package/editing/sharedTemplates/executor/builders/pointAtBeginningOfRadial.js +1 -1
  431. package/editing/sharedTemplates/executor/builders/pointAtEndOfLine.js +1 -1
  432. package/editing/sharedTemplates/executor/builders/pointAtInteriorVertices.js +1 -1
  433. package/editing/sharedTemplates/executor/builders/pointAtIntersectionVerticesOfLine.js +1 -1
  434. package/editing/sharedTemplates/executor/builders/pointAtNotBeginningOfLine.js +1 -1
  435. package/editing/sharedTemplates/executor/builders/pointAtNotEndOfLine.js +1 -1
  436. package/editing/sharedTemplates/executor/builders/pointAtPolygonCentroid.js +1 -1
  437. package/editing/sharedTemplates/executor/builders/pointAtPolygonNotStart.js +1 -1
  438. package/editing/sharedTemplates/executor/builders/pointAtPolygonStart.js +1 -1
  439. package/editing/sharedTemplates/executor/builders/pointIdentity.js +1 -1
  440. package/editing/sharedTemplates/executor/builders/pointPrimaryIdentity.js +1 -1
  441. package/editing/sharedTemplates/executor/builders/polygonBoundary.js +1 -1
  442. package/editing/sharedTemplates/executor/builders/polygonBoundaryTwoPoint.js +1 -1
  443. package/editing/sharedTemplates/executor/builders/polygonIdentity.js +1 -1
  444. package/editing/sharedTemplates/executor/builders/polygonPrimaryIdentity.js +1 -1
  445. package/editing/sharedTemplates/executor/builders/polygonVertices.js +1 -1
  446. package/editing/sharedTemplates/executor/builders/radialLines.js +1 -1
  447. package/editing/sharedTemplates/executor/builders/twoPointLines.js +1 -1
  448. package/editing/sharedTemplates/executor/createTemplateExecutor.js +5 -0
  449. package/editing/sharedTemplates/executor/support/createServiceEdit.js +1 -1
  450. package/editing/sharedTemplates/executor/support/executorUtils.js +1 -1
  451. package/editing/sharedTemplates/executor/support/getBuilder.js +5 -0
  452. package/editing/templateUtils.js +1 -1
  453. package/form/elements/inputs.d.ts +11 -2
  454. package/form/elements.d.ts +7 -2
  455. package/geometry/coordinateFormatter.d.ts +11 -2
  456. package/geometry/geometryEngine.d.ts +37 -2
  457. package/geometry/geometryEngineAsync.d.ts +37 -2
  458. package/geometry/operators/affineTransformOperator.d.ts +3 -2
  459. package/geometry/operators/alphaShapeOperator.d.ts +3 -2
  460. package/geometry/operators/areaOperator.d.ts +2 -2
  461. package/geometry/operators/autoCompleteOperator.d.ts +2 -2
  462. package/geometry/operators/boundaryOperator.d.ts +3 -2
  463. package/geometry/operators/bufferOperator.d.ts +3 -2
  464. package/geometry/operators/centroidOperator.d.ts +2 -2
  465. package/geometry/operators/clipOperator.d.ts +3 -2
  466. package/geometry/operators/containsOperator.d.ts +3 -2
  467. package/geometry/operators/convexHullOperator.d.ts +4 -2
  468. package/geometry/operators/crossesOperator.d.ts +3 -2
  469. package/geometry/operators/cutOperator.d.ts +2 -2
  470. package/geometry/operators/densifyOperator.d.ts +3 -2
  471. package/geometry/operators/differenceOperator.d.ts +3 -2
  472. package/geometry/operators/disjointOperator.d.ts +3 -2
  473. package/geometry/operators/distanceOperator.d.ts +2 -2
  474. package/geometry/operators/equalsOperator.d.ts +3 -2
  475. package/geometry/operators/extendOperator.d.ts +2 -2
  476. package/geometry/operators/extendOperator.js +1 -1
  477. package/geometry/operators/generalizeOperator.d.ts +3 -2
  478. package/geometry/operators/geodesicBufferOperator.d.ts +5 -2
  479. package/geometry/operators/geodesicProximityOperator.d.ts +6 -2
  480. package/geometry/operators/geodeticAreaOperator.d.ts +4 -2
  481. package/geometry/operators/geodeticDensifyOperator.d.ts +5 -2
  482. package/geometry/operators/geodeticDistanceOperator.d.ts +4 -2
  483. package/geometry/operators/geodeticLengthOperator.d.ts +4 -2
  484. package/geometry/operators/graphicBufferOperator.d.ts +2 -2
  485. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  486. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  487. package/geometry/operators/gx/operatorBoundary.js +1 -1
  488. package/geometry/operators/gx/operatorBuffer.js +1 -1
  489. package/geometry/operators/gx/operatorConvexHull.js +1 -1
  490. package/geometry/operators/gx/operatorDifference.js +1 -1
  491. package/geometry/operators/gx/operatorGeodesicBuffer.js +1 -1
  492. package/geometry/operators/gx/operatorGeodeticArea.js +1 -1
  493. package/geometry/operators/gx/operatorGeodeticDensify.js +1 -1
  494. package/geometry/operators/gx/operatorGeodeticDistance.js +1 -1
  495. package/geometry/operators/gx/operatorGeodeticLength.js +1 -1
  496. package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
  497. package/geometry/operators/gx/operatorIntegrate.js +1 -1
  498. package/geometry/operators/gx/operatorIntersection.js +1 -1
  499. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  500. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  501. package/geometry/operators/gx/operatorLocateBetween.js +1 -1
  502. package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
  503. package/geometry/operators/gx/operatorOffset.js +1 -1
  504. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  505. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  506. package/geometry/operators/gx/operatorProject.js +1 -1
  507. package/geometry/operators/gx/operatorProximityGeodesic.js +1 -1
  508. package/geometry/operators/gx/operatorShapePreservingProject.js +1 -1
  509. package/geometry/operators/gx/operatorSimplify.js +1 -1
  510. package/geometry/operators/gx/operatorSinglePartToMultiPart.js +1 -1
  511. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  512. package/geometry/operators/gx/operatorUnion.js +1 -1
  513. package/geometry/operators/integrateOperator.d.ts +2 -2
  514. package/geometry/operators/intersectionOperator.d.ts +4 -2
  515. package/geometry/operators/intersectsOperator.d.ts +3 -2
  516. package/geometry/operators/isNearOperator.d.ts +2 -2
  517. package/geometry/operators/isNearOperator.js +1 -1
  518. package/geometry/operators/labelPointOperator.d.ts +3 -2
  519. package/geometry/operators/lengthOperator.d.ts +2 -2
  520. package/geometry/operators/linesToPolygonsOperator.d.ts +2 -2
  521. package/geometry/operators/locateBetweenOperator.d.ts +2 -2
  522. package/geometry/operators/minimumBoundingCircleOperator.d.ts +3 -2
  523. package/geometry/operators/multiPartToSinglePartOperator.d.ts +2 -2
  524. package/geometry/operators/offsetOperator.d.ts +3 -2
  525. package/geometry/operators/overlapsOperator.d.ts +3 -2
  526. package/geometry/operators/polygonOverlayOperator.d.ts +2 -2
  527. package/geometry/operators/polygonSlicerOperator.d.ts +4 -2
  528. package/geometry/operators/projectOperator.d.ts +5 -2
  529. package/geometry/operators/projectOperator.js +1 -1
  530. package/geometry/operators/proximityOperator.d.ts +4 -2
  531. package/geometry/operators/relateOperator.d.ts +4 -2
  532. package/geometry/operators/reshapeOperator.d.ts +2 -2
  533. package/geometry/operators/reshapeOperator.js +1 -1
  534. package/geometry/operators/shapePreservingProjectOperator.d.ts +5 -2
  535. package/geometry/operators/shapePreservingProjectOperator.js +1 -1
  536. package/geometry/operators/simplifyOperator.d.ts +4 -2
  537. package/geometry/operators/support/geographicTransformationUtils.d.ts +4 -2
  538. package/geometry/operators/support/geographicTransformationUtils.js +1 -1
  539. package/geometry/operators/support/initNoPeFactory.js +1 -1
  540. package/geometry/operators/support/jsonConverter.js +1 -1
  541. package/geometry/operators/symmetricDifferenceOperator.d.ts +3 -2
  542. package/geometry/operators/touchesOperator.d.ts +3 -2
  543. package/geometry/operators/unionOperator.d.ts +3 -2
  544. package/geometry/operators/withinOperator.d.ts +3 -2
  545. package/geometry/projection.d.ts +5 -2
  546. package/geometry/support/geodesicUtils.d.ts +5 -2
  547. package/geometry/support/jsonUtils.d.ts +2 -2
  548. package/geometry/support/meshUtils.d.ts +6 -2
  549. package/geometry/support/normalizeUtils.d.ts +2 -2
  550. package/geometry/support/scaleUtils.js +1 -1
  551. package/geometry/support/webMercatorUtils.d.ts +6 -2
  552. package/geometry.d.ts +7 -2
  553. package/interfaces.d.ts +72 -94
  554. package/intl.d.ts +16 -2
  555. package/kernel.d.ts +2 -2
  556. package/layers/ImageryLayer.js +1 -1
  557. package/layers/ImageryTileLayer.js +1 -1
  558. package/layers/LinkChartLayer.js +1 -1
  559. package/layers/catalog/catalogUtils.d.ts +2 -2
  560. package/layers/graphics/OptimizedGeometry.js +1 -1
  561. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  562. package/layers/graphics/sources/ParquetSource.js +1 -1
  563. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  564. package/layers/knowledgeGraph/cypherUtils.d.ts +1 -2
  565. package/layers/knowledgeGraph/layerUtils.js +1 -1
  566. package/layers/knowledgeGraph/supportUtils.d.ts +4 -2
  567. package/layers/mixins/APIKeyMixin.d.ts +1 -1
  568. package/layers/mixins/ArcGISCachedService.d.ts +1 -1
  569. package/layers/mixins/ArcGISImageService.d.ts +1 -1
  570. package/layers/mixins/ArcGISMapService.d.ts +1 -1
  571. package/layers/mixins/BlendLayer.d.ts +1 -1
  572. package/layers/mixins/CustomParametersMixin.d.ts +1 -1
  573. package/layers/mixins/DisplayFilteredLayer.d.ts +1 -1
  574. package/layers/mixins/FeatureEffectLayer.d.ts +1 -1
  575. package/layers/mixins/FeatureLayerBase.d.ts +1 -1
  576. package/layers/mixins/FeatureReductionLayer.d.ts +1 -1
  577. package/layers/mixins/ImageryTileMixin.d.ts +1 -1
  578. package/layers/mixins/ImageryTileMixin.js +1 -1
  579. package/layers/mixins/OperationalLayer.d.ts +1 -1
  580. package/layers/mixins/OrderedLayer.d.ts +1 -1
  581. package/layers/mixins/PortalLayer.d.ts +1 -1
  582. package/layers/mixins/PublishableLayer.d.ts +1 -1
  583. package/layers/mixins/RasterPresetRendererMixin.d.ts +1 -1
  584. package/layers/mixins/RefreshableLayer.d.ts +1 -1
  585. package/layers/mixins/ScaleRangeLayer.d.ts +1 -1
  586. package/layers/mixins/SceneService.d.ts +1 -1
  587. package/layers/mixins/SublayersOwner.d.ts +1 -1
  588. package/layers/mixins/TemporalLayer.d.ts +1 -1
  589. package/layers/mixins/TemporalSceneLayer.d.ts +1 -1
  590. package/layers/ogc/wcsUtils.d.ts +1 -2
  591. package/layers/ogc/wfsUtils.d.ts +2 -2
  592. package/layers/orientedImagery/transformations/imageToWorld.d.ts +1 -2
  593. package/layers/orientedImagery/transformations/worldToImage.d.ts +1 -2
  594. package/layers/support/DisplayFilterInfo.js +1 -1
  595. package/layers/support/Sublayer.js +1 -1
  596. package/layers/support/TrackInfo.js +1 -1
  597. package/layers/support/TrackPartInfo.js +5 -0
  598. package/layers/support/arcadeUtils.d.ts +1 -2
  599. package/layers/support/arcadeUtils.js +1 -1
  600. package/layers/support/csvUtils.d.ts +1 -2
  601. package/layers/support/displayFilterUtils.js +1 -1
  602. package/layers/support/featureLayerUtils.js +1 -1
  603. package/layers/support/fieldUtils.d.ts +8 -2
  604. package/layers/support/fieldUtils.js +1 -1
  605. package/layers/support/layerOriginUtils.js +1 -1
  606. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  607. package/layers/support/rasterFieldUtils.js +1 -1
  608. package/layers/support/rasterFunctionConstants.d.ts +15 -2
  609. package/layers/support/rasterFunctionUtils.d.ts +105 -2
  610. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  611. package/libs/linkchartlayout/LinkChartLayout.js +1 -1
  612. package/package.json +3 -3
  613. package/pointCloudRenderers.d.ts +5 -2
  614. package/popup/content.d.ts +9 -2
  615. package/rasterRenderers.d.ts +7 -2
  616. package/renderers/mixins/VisualVariablesMixin.d.ts +1 -1
  617. package/renderers/support/jsonUtils.d.ts +1 -2
  618. package/renderers/support/utils.d.ts +2 -2
  619. package/renderers.d.ts +9 -2
  620. package/request.js +1 -1
  621. package/rest/closestFacility.d.ts +1 -2
  622. package/rest/featureService/utils.d.ts +1 -2
  623. package/rest/find.d.ts +1 -2
  624. package/rest/geometryService.d.ts +21 -2
  625. package/rest/geoprocessor.d.ts +2 -2
  626. package/rest/identify.d.ts +1 -2
  627. package/rest/imageService.d.ts +19 -2
  628. package/rest/knowledgeGraphService.d.ts +11 -2
  629. package/rest/knowledgeGraphService.js +1 -1
  630. package/rest/locator.d.ts +4 -2
  631. package/rest/networkService.d.ts +1 -2
  632. package/rest/networks/queryAssociations.d.ts +1 -2
  633. package/rest/networks/synthesizeAssociationGeometries.d.ts +1 -2
  634. package/rest/networks/trace.d.ts +1 -2
  635. package/rest/places.d.ts +3 -2
  636. package/rest/print.d.ts +2 -2
  637. package/rest/query.d.ts +11 -2
  638. package/rest/route.d.ts +1 -2
  639. package/rest/serviceArea.d.ts +1 -2
  640. package/rest/symbolService.d.ts +1 -2
  641. package/smartMapping/labels/bins.d.ts +1 -2
  642. package/smartMapping/labels/clusters.d.ts +1 -2
  643. package/smartMapping/popup/clusters.d.ts +1 -2
  644. package/smartMapping/popup/templates.d.ts +1 -2
  645. package/smartMapping/raster/renderers/classBreaks.d.ts +1 -2
  646. package/smartMapping/raster/renderers/colormap.d.ts +1 -2
  647. package/smartMapping/raster/renderers/flow.d.ts +1 -2
  648. package/smartMapping/raster/renderers/rgb.d.ts +1 -2
  649. package/smartMapping/raster/renderers/shadedRelief.d.ts +1 -2
  650. package/smartMapping/raster/renderers/stretch.d.ts +1 -2
  651. package/smartMapping/raster/renderers/uniqueValue.d.ts +1 -2
  652. package/smartMapping/raster/renderers/vectorField.d.ts +1 -2
  653. package/smartMapping/raster/support/colorRamps.d.ts +5 -2
  654. package/smartMapping/raster/support/utils.d.ts +2 -2
  655. package/smartMapping/renderers/color.d.ts +6 -2
  656. package/smartMapping/renderers/dotDensity.d.ts +1 -2
  657. package/smartMapping/renderers/dotDensity.js +1 -1
  658. package/smartMapping/renderers/heatmap.d.ts +2 -2
  659. package/smartMapping/renderers/heatmap.js +1 -1
  660. package/smartMapping/renderers/location.d.ts +1 -2
  661. package/smartMapping/renderers/opacity.d.ts +1 -2
  662. package/smartMapping/renderers/pieChart.d.ts +2 -2
  663. package/smartMapping/renderers/predominance.d.ts +1 -2
  664. package/smartMapping/renderers/relationship.d.ts +2 -2
  665. package/smartMapping/renderers/size.d.ts +5 -2
  666. package/smartMapping/renderers/support/rendererUtils.d.ts +1 -2
  667. package/smartMapping/renderers/type.d.ts +2 -2
  668. package/smartMapping/renderers/univariateColorSize.d.ts +2 -2
  669. package/smartMapping/statistics/heatmapStatistics.js +1 -1
  670. package/smartMapping/statistics/summaryStatisticsForAttributes.js +1 -1
  671. package/smartMapping/statistics/support/ageUtils.d.ts +1 -2
  672. package/smartMapping/statistics/support/predominanceUtils.d.ts +1 -2
  673. package/smartMapping/support/adapters/CSVLayerAdapter.js +1 -1
  674. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  675. package/smartMapping/support/adapters/FeatureLayerBinningAdapter.js +1 -1
  676. package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
  677. package/smartMapping/support/adapters/LayerAdapter.js +1 -1
  678. package/smartMapping/support/adapters/OGCFeatureLayerAdapter.js +1 -1
  679. package/smartMapping/support/adapters/PointCloudLayerAdapter.js +1 -1
  680. package/smartMapping/support/adapters/SceneLayerAdapter.js +1 -1
  681. package/smartMapping/support/adapters/StreamLayerAdapter.js +1 -1
  682. package/smartMapping/support/adapters/support/histogramUtils.js +5 -0
  683. package/smartMapping/support/adapters/support/layerUtils.js +1 -1
  684. package/smartMapping/support/adapters/support/utils.js +1 -1
  685. package/smartMapping/symbology/color.d.ts +7 -2
  686. package/smartMapping/symbology/dotDensity.d.ts +4 -2
  687. package/smartMapping/symbology/flow.d.ts +5 -2
  688. package/smartMapping/symbology/heatmap.d.ts +5 -2
  689. package/smartMapping/symbology/location.d.ts +3 -2
  690. package/smartMapping/symbology/pieChart.d.ts +5 -2
  691. package/smartMapping/symbology/predominance.d.ts +5 -2
  692. package/smartMapping/symbology/relationship.d.ts +5 -2
  693. package/smartMapping/symbology/size.d.ts +3 -2
  694. package/smartMapping/symbology/support/colorRamps.d.ts +4 -2
  695. package/smartMapping/symbology/type.d.ts +5 -2
  696. package/support/LayersMixin.d.ts +1 -1
  697. package/support/TablesMixin.d.ts +1 -1
  698. package/support/featureFlags.js +1 -1
  699. package/support/popupUtils.d.ts +4 -2
  700. package/support/revision.js +1 -1
  701. package/support/timeUtils.d.ts +3 -2
  702. package/symbols/support/cimConversionUtils.d.ts +1 -2
  703. package/symbols/support/cimSymbolUtils.d.ts +6 -2
  704. package/symbols/support/jsonUtils.d.ts +1 -2
  705. package/symbols/support/symbolUtils.d.ts +7 -2
  706. package/symbols.d.ts +29 -2
  707. package/tables/elements.d.ts +5 -2
  708. package/unionTypes.d.ts +12 -2
  709. package/versionManagement/utils.d.ts +2 -2
  710. package/versionManagement/versionAdapters/utils.d.ts +2 -2
  711. package/views/2d/engine/webgl/TextureManager.js +1 -1
  712. package/views/2d/engine/webgl/mesh/factories/FeatureMeshFactory.js +1 -1
  713. package/views/2d/engine/webgl/shaderGraph/GraphShaderModule.js +1 -1
  714. package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +1 -1
  715. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerTechnique.js +1 -1
  716. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPointShader.js +1 -1
  717. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader.js +1 -1
  718. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
  719. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BitmapShader.js +1 -1
  720. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlendShader.js +1 -1
  721. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GridShader.js +1 -1
  722. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapResolveShader.js +1 -1
  723. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js +1 -1
  724. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js +1 -1
  725. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OverlayShader.js +1 -1
  726. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TestShader.js +1 -1
  727. package/views/2d/engine/webgl/util/LabelMatcher.js +1 -1
  728. package/views/2d/engine/webgl/util/Matcher.js +1 -1
  729. package/views/2d/engine/webgl/util/createMatcher.js +1 -1
  730. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  731. package/views/2d/layers/MediaLayerView2D.js +1 -1
  732. package/views/2d/layers/SubtypeGroupLayerView2D.js +1 -1
  733. package/views/2d/layers/TileLayerView2D.js +1 -1
  734. package/views/2d/layers/features/Processor.js +1 -1
  735. package/views/2d/layers/features/ProcessorTileMessageQueue.js +1 -1
  736. package/views/2d/layers/features/aggregation/AAggregateSpatialIndex.js +1 -1
  737. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  738. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  739. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  740. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  741. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  742. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  743. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  744. package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
  745. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  746. package/views/2d/layers/features/processor/AAggregateStrategy.js +1 -1
  747. package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
  748. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  749. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  750. package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
  751. package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
  752. package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
  753. package/views/2d/layers/features/schema/processor/StorageSchema.js +1 -1
  754. package/views/2d/layers/features/schema/processor/SubtypeProcessorSchema.js +1 -1
  755. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  756. package/views/2d/layers/features/sources/strategies/AFetchLoadStrategy.js +1 -1
  757. package/views/2d/layers/features/sources/strategies/DrillDownTileLoadStrategy.js +1 -1
  758. package/views/2d/layers/features/sources/strategies/PagedTileLoadStrategy.js +1 -1
  759. package/views/2d/layers/features/sources/strategies/ParquetLoadStrategy.js +1 -1
  760. package/views/2d/layers/features/sources/strategies/SnapshotLoadStrategy.js +1 -1
  761. package/views/2d/layers/features/sources/strategies/StreamLoadStrategy.js +1 -1
  762. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  763. package/views/2d/layers/features/support/FeatureFilterEvaluator.js +5 -0
  764. package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
  765. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  766. package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
  767. package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
  768. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  769. package/views/2d/layers/features/support/whereUtils.js +1 -1
  770. package/views/2d/layers/support/FeatureCommandQueue.js +1 -1
  771. package/views/2d/tiling/TileQueue.js +1 -1
  772. package/views/3d/environment/ChapmanApproximation.glsl.js +3 -3
  773. package/views/3d/environment/ChapmanAtmosphere.glsl.js +1 -1
  774. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  775. package/views/3d/environment/ChapmanRaymarching.glsl.js +4 -4
  776. package/views/3d/environment/Clouds.glsl.js +1 -1
  777. package/views/3d/environment/CloudsComposition.glsl.js +1 -1
  778. package/views/3d/environment/CloudsComposition.js +1 -1
  779. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  780. package/views/3d/environment/Fog.glsl.js +1 -1
  781. package/views/3d/environment/Fog.js +1 -1
  782. package/views/3d/environment/LocalAtmosphere.js +1 -1
  783. package/views/3d/environment/MarsAtmosphere.js +1 -1
  784. package/views/3d/environment/NoiseTextureAtlas.glsl.js +1 -1
  785. package/views/3d/environment/Precipitation.glsl.js +1 -1
  786. package/views/3d/environment/Precipitation.js +1 -1
  787. package/views/3d/environment/PrecipitationTechnique.js +1 -1
  788. package/views/3d/environment/SimpleAtmosphere.glsl.js +1 -1
  789. package/views/3d/interactive/visualElements/LaserlineVisualElement.js +1 -1
  790. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  791. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  792. package/views/3d/layers/SceneLayerWorker.js +1 -1
  793. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  794. package/views/3d/layers/graphics/Labeler.js +1 -1
  795. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
  796. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
  797. package/views/3d/layers/graphics/pipeline/Tile.js +1 -1
  798. package/views/3d/layers/graphics/pipeline/Tile3DManager.js +1 -1
  799. package/views/3d/layers/graphics/pipeline/featureData/FeatureData.js +1 -1
  800. package/views/3d/layers/graphics/pipeline/featureData/FeatureDataStore.js +1 -1
  801. package/views/3d/layers/graphics/pipeline/featureSet/PBFPointFeatureSetView.js +1 -1
  802. package/views/3d/layers/graphics/pipeline/featureSet/TiledFeatureStore.js +1 -1
  803. package/views/3d/layers/graphics/pipeline/fetching/Tile3DFetcher.js +1 -1
  804. package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
  805. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  806. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  807. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  808. package/views/3d/support/PBFDecoder.js +1 -1
  809. package/views/3d/support/engineContent/sdfPrimitives.js +1 -1
  810. package/views/3d/webgl/RenderNode.js +1 -1
  811. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  812. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +10 -10
  813. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  814. package/views/3d/webgl-engine/collections/Component/Material/shader/DecodeSymbolColor.glsl.js +2 -2
  815. package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
  816. package/views/3d/webgl-engine/core/material/MaterialBase.js +1 -1
  817. package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js +1 -1
  818. package/views/3d/webgl-engine/core/shaderLibrary/HighlightCellGridScreenSpacePass.glsl.js +1 -1
  819. package/views/3d/webgl-engine/core/shaderLibrary/HighlightReadBitmap.glsl.js +2 -2
  820. package/views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl.js +3 -3
  821. package/views/3d/webgl-engine/core/shaderLibrary/NormalFromDepth.glsl.js +1 -1
  822. package/views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js +2 -2
  823. package/views/3d/webgl-engine/core/shaderLibrary/ScreenSizeScaling.glsl.js +1 -1
  824. package/views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js +2 -2
  825. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +3 -3
  826. package/views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js +1 -1
  827. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +9 -9
  828. package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +1 -1
  829. package/views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js +1 -1
  830. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +1 -1
  831. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js +1 -1
  832. package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +1 -1
  833. package/views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js +2 -2
  834. package/views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js +1 -1
  835. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js +1 -1
  836. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +1 -1
  837. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +2 -2
  838. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTangent.glsl.js +1 -1
  839. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTextureCoordinates.glsl.js +2 -2
  840. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js +2 -2
  841. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +1 -1
  842. package/views/3d/webgl-engine/core/shaderLibrary/hud/AlignPixel.glsl.js +3 -3
  843. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +2 -2
  844. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js +1 -1
  845. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDVisibility.glsl.js +1 -1
  846. package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +3 -3
  847. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js +1 -1
  848. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +3 -3
  849. package/views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js +2 -2
  850. package/views/3d/webgl-engine/core/shaderLibrary/raster/Colormap.glsl.js +1 -1
  851. package/views/3d/webgl-engine/core/shaderLibrary/raster/Common.glsl.js +2 -2
  852. package/views/3d/webgl-engine/core/shaderLibrary/raster/Projection.glsl.js +1 -1
  853. package/views/3d/webgl-engine/core/shaderLibrary/raster/RasterColorizer.glsl.js +1 -1
  854. package/views/3d/webgl-engine/core/shaderLibrary/shading/AnalyticalSkyModel.glsl.js +1 -1
  855. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js +1 -1
  856. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js +1 -1
  857. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +2 -2
  858. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js +4 -4
  859. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js +1 -1
  860. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +1 -1
  861. package/views/3d/webgl-engine/core/shaderLibrary/shading/FoamRendering.glsl.js +1 -1
  862. package/views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js +4 -4
  863. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +1 -1
  864. package/views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js +2 -2
  865. package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +1 -1
  866. package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassGeometryTest.glsl.js +1 -1
  867. package/views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js +1 -1
  868. package/views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js +1 -1
  869. package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js +1 -1
  870. package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js +7 -7
  871. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js +2 -2
  872. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +1 -1
  873. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +1 -1
  874. package/views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js +2 -2
  875. package/views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js +1 -1
  876. package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +1 -1
  877. package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +1 -1
  878. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js +1 -1
  879. package/views/3d/webgl-engine/core/shaderLibrary/terrain/BackgroundGrid.glsl.js +1 -1
  880. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +3 -3
  881. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +1 -1
  882. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +6 -6
  883. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js +1 -1
  884. package/views/3d/webgl-engine/core/shaderLibrary/util/BlendLayers.glsl.js +1 -1
  885. package/views/3d/webgl-engine/core/shaderLibrary/util/BlendModes.glsl.js +1 -1
  886. package/views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js +2 -2
  887. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +3 -3
  888. package/views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js +1 -1
  889. package/views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js +1 -1
  890. package/views/3d/webgl-engine/core/shaderLibrary/util/DoublePrecision.glsl.js +1 -1
  891. package/views/3d/webgl-engine/core/shaderLibrary/util/IsNaN.glsl.js +2 -2
  892. package/views/3d/webgl-engine/core/shaderLibrary/util/LocalFromScreenSpace.glsl.js +2 -2
  893. package/views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js +1 -1
  894. package/views/3d/webgl-engine/core/shaderLibrary/util/RgbaFloat16Encoding.glsl.js +1 -1
  895. package/views/3d/webgl-engine/core/shaderLibrary/util/RgbaFloatEncoding.glsl.js +1 -1
  896. package/views/3d/webgl-engine/core/shaderLibrary/util/ScreenSizePerspective.glsl.js +1 -1
  897. package/views/3d/webgl-engine/core/shaderLibrary/util/TextureAtlasLookup.glsl.js +1 -1
  898. package/views/3d/webgl-engine/core/shaderLibrary/util/TextureOnly.glsl.js +1 -1
  899. package/views/3d/webgl-engine/core/shaderModules/BooleanBindUniform.js +1 -1
  900. package/views/3d/webgl-engine/core/shaderModules/BooleanPassUniform.js +1 -1
  901. package/views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js +1 -1
  902. package/views/3d/webgl-engine/core/shaderModules/Float2DrawUniform.js +1 -1
  903. package/views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js +1 -1
  904. package/views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js +1 -1
  905. package/views/3d/webgl-engine/core/shaderModules/Float3DrawUniform.js +1 -1
  906. package/views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js +1 -1
  907. package/views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js +1 -1
  908. package/views/3d/webgl-engine/core/shaderModules/Float4DrawUniform.js +1 -1
  909. package/views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js +1 -1
  910. package/views/3d/webgl-engine/core/shaderModules/Float4sPassUniform.js +1 -1
  911. package/views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js +1 -1
  912. package/views/3d/webgl-engine/core/shaderModules/FloatDrawUniform.js +1 -1
  913. package/views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js +1 -1
  914. package/views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js +1 -1
  915. package/views/3d/webgl-engine/core/shaderModules/Integer2BindUniform.js +1 -1
  916. package/views/3d/webgl-engine/core/shaderModules/Integer2PassUniform.js +1 -1
  917. package/views/3d/webgl-engine/core/shaderModules/IntegerBindUniform.js +1 -1
  918. package/views/3d/webgl-engine/core/shaderModules/IntegerDrawUniform.js +1 -1
  919. package/views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js +1 -1
  920. package/views/3d/webgl-engine/core/shaderModules/Matrix3DrawUniform.js +1 -1
  921. package/views/3d/webgl-engine/core/shaderModules/Matrix3PassUniform.js +1 -1
  922. package/views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js +1 -1
  923. package/views/3d/webgl-engine/core/shaderModules/Matrix4DrawUniform.js +1 -1
  924. package/views/3d/webgl-engine/core/shaderModules/Matrix4PassUniform.js +1 -1
  925. package/views/3d/webgl-engine/core/shaderModules/Matrix4sDrawUniform.js +1 -1
  926. package/views/3d/webgl-engine/core/shaderModules/Matrix4sPassUniform.js +1 -1
  927. package/views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js +1 -1
  928. package/views/3d/webgl-engine/core/shaderModules/Texture2DDrawUniform.js +1 -1
  929. package/views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js +1 -1
  930. package/views/3d/webgl-engine/core/shaderModules/TextureCubeBindUniform.js +1 -1
  931. package/views/3d/webgl-engine/core/shaderModules/glsl.js +5 -0
  932. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueConfiguration.js +1 -1
  933. package/views/3d/webgl-engine/effects/OpaqueEnvironment.js +1 -1
  934. package/views/3d/webgl-engine/effects/TransparentEnvironment.js +1 -1
  935. package/views/3d/webgl-engine/effects/bloom/BloomBlur.glsl.js +1 -1
  936. package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +1 -1
  937. package/views/3d/webgl-engine/effects/bloom/BloomDepthAdjust.glsl.js +1 -1
  938. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  939. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  940. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +5 -0
  941. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +5 -0
  942. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  943. package/views/3d/webgl-engine/effects/haze/Haze.glsl.js +1 -1
  944. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  945. package/views/3d/webgl-engine/effects/haze/HazeCompositing.glsl.js +1 -1
  946. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  947. package/views/3d/webgl-engine/effects/highlight/HighlightPassParameters.js +1 -1
  948. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  949. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  950. package/views/3d/webgl-engine/effects/laserlines/LaserlineTechnique.js +1 -1
  951. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  952. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  953. package/views/3d/webgl-engine/effects/smaa/SMAAPassParameters.js +1 -1
  954. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  955. package/views/3d/webgl-engine/effects/ssao/SSAOParameters.js +1 -1
  956. package/views/3d/webgl-engine/effects/stars/Stars.glsl.js +1 -1
  957. package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
  958. package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
  959. package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +1 -1
  960. package/views/3d/webgl-engine/lib/GLTextureMaterial.js +1 -1
  961. package/views/3d/webgl-engine/lib/Material.js +1 -1
  962. package/views/3d/webgl-engine/lib/Program.js +1 -1
  963. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  964. package/views/3d/webgl-engine/lib/TextureCompressionWorker.js +1 -1
  965. package/views/3d/webgl-engine/lib/TextureCompressionWorkerHandle.js +1 -1
  966. package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
  967. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  968. package/views/3d/webgl-engine/materials/internal/WaterTextureRepository.js +1 -1
  969. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  970. package/views/3d/webgl-engine/shaders/AtmosphereCompositing.glsl.js +1 -1
  971. package/views/3d/webgl-engine/shaders/BlendWeights.glsl.js +1 -1
  972. package/views/3d/webgl-engine/shaders/Blur.glsl.js +1 -1
  973. package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
  974. package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
  975. package/views/3d/webgl-engine/shaders/Compositing.glsl.js +1 -1
  976. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  977. package/views/3d/webgl-engine/shaders/EdgeDetect.glsl.js +1 -1
  978. package/views/3d/webgl-engine/shaders/FocusAreaColor.glsl.js +1 -1
  979. package/views/3d/webgl-engine/shaders/FocusAreaMask.glsl.js +1 -1
  980. package/views/3d/webgl-engine/shaders/HUDCompositing.glsl.js +1 -1
  981. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  982. package/views/3d/webgl-engine/shaders/Heatmap.glsl.js +1 -1
  983. package/views/3d/webgl-engine/shaders/HeatmapDensity.glsl.js +1 -1
  984. package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +1 -1
  985. package/views/3d/webgl-engine/shaders/HighlightApply.glsl.js +1 -1
  986. package/views/3d/webgl-engine/shaders/HighlightDownsample.glsl.js +1 -1
  987. package/views/3d/webgl-engine/shaders/HighlightToSingle.glsl.js +1 -1
  988. package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
  989. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  990. package/views/3d/webgl-engine/shaders/LaserlinePath.glsl.js +1 -1
  991. package/views/3d/webgl-engine/shaders/Laserlines.glsl.js +1 -1
  992. package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
  993. package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
  994. package/views/3d/webgl-engine/shaders/Magnifier.glsl.js +1 -1
  995. package/views/3d/webgl-engine/shaders/MeasurementArrow.glsl.js +1 -1
  996. package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
  997. package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +7 -7
  998. package/views/3d/webgl-engine/shaders/OverlayCompositing.glsl.js +1 -1
  999. package/views/3d/webgl-engine/shaders/Path.glsl.js +1 -1
  1000. package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
  1001. package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
  1002. package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
  1003. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  1004. package/views/3d/webgl-engine/shaders/SSAO.glsl.js +1 -1
  1005. package/views/3d/webgl-engine/shaders/SSAOBlur.glsl.js +1 -1
  1006. package/views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js +1 -1
  1007. package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +1 -1
  1008. package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +1 -1
  1009. package/views/3d/webgl-engine/shaders/ShadowCastVisualize.glsl.js +1 -1
  1010. package/views/3d/webgl-engine/shaders/ShadowHighlight.glsl.js +1 -1
  1011. package/views/3d/webgl-engine/shaders/SingleHighlightApply.glsl.js +1 -1
  1012. package/views/3d/webgl-engine/shaders/SingleHighlightBlur.glsl.js +1 -1
  1013. package/views/3d/webgl-engine/shaders/SlicePlaneMaterial.glsl.js +1 -1
  1014. package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
  1015. package/views/3d/webgl-engine/shaders/SphereIntersect.glsl.js +2 -2
  1016. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  1017. package/views/3d/webgl-engine/shaders/ToneMapping.glsl.js +1 -1
  1018. package/views/3d/webgl-engine/shaders/Viewshed.glsl.js +1 -1
  1019. package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
  1020. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/AdjustProjectedPosition.glsl.js +2 -2
  1021. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/DiscardNonSilhouetteEdges.glsl.js +4 -4
  1022. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/DistanceFalloff.glsl.js +2 -2
  1023. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeShader.glsl.js +1 -1
  1024. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +1 -1
  1025. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineAmplitude.glsl.js +3 -3
  1026. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineOffset.glsl.js +7 -7
  1027. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/UnpackAttributes.glsl.js +7 -7
  1028. package/views/3d/webgl.d.ts +3 -2
  1029. package/views/BreakpointsOwner.d.ts +1 -1
  1030. package/views/DOMContainer.d.ts +1 -1
  1031. package/views/DOMContainer.js +1 -1
  1032. package/views/FocusAreas.js +1 -1
  1033. package/views/PopupView.d.ts +1 -1
  1034. package/views/View.js +1 -1
  1035. package/views/layers/FeatureLayerView.js +1 -1
  1036. package/views/layers/support/WhereClauseVisitor.js +5 -0
  1037. package/views/support/DefaultsFromMap.js +1 -1
  1038. package/views/support/{QueueProcessor.js → ScheduledQueueProcessor.js} +1 -1
  1039. package/views/support/colorUtils.d.ts +2 -2
  1040. package/views/webgl/NoParameters.js +5 -0
  1041. package/views/webgl/ShaderBuilder.js +5 -0
  1042. package/views/webgl/Texture.js +1 -1
  1043. package/views/webgl/Uniform.js +5 -0
  1044. package/views/webgl/testAppleAmdDrawArrays.js +1 -1
  1045. package/widgets/Attachments/AttachmentsViewModel.js +1 -1
  1046. package/widgets/Editor/EditorViewModel.js +1 -1
  1047. package/widgets/Editor/UpdateWorkflow.js +1 -1
  1048. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  1049. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  1050. package/widgets/Editor.js +1 -1
  1051. package/widgets/ElevationProfile/support/profileUtils.js +1 -1
  1052. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
  1053. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationSettings.js +5 -0
  1054. package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
  1055. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  1056. package/widgets/LinkChartLayoutSwitcher/LinkChartLayoutSwitcherViewModel.js +5 -0
  1057. package/widgets/Print.js +1 -1
  1058. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  1059. package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
  1060. package/widgets/TimeSlider.js +1 -1
  1061. package/widgets/smartMapping/support/utils.d.ts +3 -2
  1062. package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
  1063. package/widgets/support/UtilityNetworkAssociations/utilityNetworkUtils.js +1 -1
  1064. package/widgets/support/widget.d.ts +8 -2
  1065. package/assets/esri/core/workers/chunks/02be905f7e9185de78c3.js +0 -1
  1066. package/assets/esri/core/workers/chunks/0b66fee87863e5775a6a.js +0 -1
  1067. package/assets/esri/core/workers/chunks/1557446aa4525705a5b2.js +0 -1
  1068. package/assets/esri/core/workers/chunks/1a8aaa92ccb90f646a8b.js +0 -1
  1069. package/assets/esri/core/workers/chunks/1dc6b5b177022b80c473.js +0 -1
  1070. package/assets/esri/core/workers/chunks/2118e9ffb24178ed7f59.js +0 -1
  1071. package/assets/esri/core/workers/chunks/25a6641938a9ccab39b7.js +0 -1
  1072. package/assets/esri/core/workers/chunks/2840705ae7fa909ab4ed.js +0 -1
  1073. package/assets/esri/core/workers/chunks/2a4c6c2e9ba103720e22.js +0 -314
  1074. package/assets/esri/core/workers/chunks/2e4f861c78ef820c0a3e.js +0 -1
  1075. package/assets/esri/core/workers/chunks/349f31a1fb489fbfe60d.js +0 -1
  1076. package/assets/esri/core/workers/chunks/34b31091e172e910d750.js +0 -1
  1077. package/assets/esri/core/workers/chunks/371c2fd9d767612bbeb2.js +0 -1
  1078. package/assets/esri/core/workers/chunks/37658a4e83a5b18acd37.js +0 -1
  1079. package/assets/esri/core/workers/chunks/39f3e202d95725f405ec.js +0 -1
  1080. package/assets/esri/core/workers/chunks/3cb56f509d8f7f340c45.js +0 -1
  1081. package/assets/esri/core/workers/chunks/4086698137db0795187f.js +0 -1
  1082. package/assets/esri/core/workers/chunks/454034bad60414a9ab7f.js +0 -1
  1083. package/assets/esri/core/workers/chunks/483787099d2ba8b8022d.js +0 -1
  1084. package/assets/esri/core/workers/chunks/4b38c008872bb9e10278.js +0 -1
  1085. package/assets/esri/core/workers/chunks/4cccca778b060d8dcd06.js +0 -1
  1086. package/assets/esri/core/workers/chunks/4e5cf2d489db2a57d3bd.js +0 -1
  1087. package/assets/esri/core/workers/chunks/4eda602a909a4773cb27.js +0 -1
  1088. package/assets/esri/core/workers/chunks/5595f19c1f332f504a81.js +0 -1
  1089. package/assets/esri/core/workers/chunks/55da04abc8e1ea93caa9.js +0 -1
  1090. package/assets/esri/core/workers/chunks/561fc48b06a43abe1cd0.js +0 -1
  1091. package/assets/esri/core/workers/chunks/576b7961fe7771dacfd9.js +0 -1
  1092. package/assets/esri/core/workers/chunks/5bb175106aee21025bc2.js +0 -1
  1093. package/assets/esri/core/workers/chunks/5c57aa9fdc4e1bab61ac.js +0 -1
  1094. package/assets/esri/core/workers/chunks/602c67fe1061ec5a3fa5.js +0 -1
  1095. package/assets/esri/core/workers/chunks/61f985a9a393803e5350.js +0 -1
  1096. package/assets/esri/core/workers/chunks/644e83f48752a34f0d1a.js +0 -1
  1097. package/assets/esri/core/workers/chunks/64f1355f7f51ecb3af95.js +0 -1
  1098. package/assets/esri/core/workers/chunks/68f5b077fc1f6f7636dd.js +0 -1
  1099. package/assets/esri/core/workers/chunks/7388b57de8926acd1fc2.js +0 -1
  1100. package/assets/esri/core/workers/chunks/76b8aa593a5279569267.js +0 -1
  1101. package/assets/esri/core/workers/chunks/7705ca2cc8ac3307d4cd.js +0 -1
  1102. package/assets/esri/core/workers/chunks/7719fe672ea74cdc87be.js +0 -1
  1103. package/assets/esri/core/workers/chunks/7ae1f26ded268099f429.js +0 -1
  1104. package/assets/esri/core/workers/chunks/7c95721c077c70f31b53.js +0 -1
  1105. package/assets/esri/core/workers/chunks/82a69eba9bacca8437bd.js +0 -1
  1106. package/assets/esri/core/workers/chunks/8a13cd313d309281dbb9.js +0 -1
  1107. package/assets/esri/core/workers/chunks/933089d069853f6e509a.js +0 -1
  1108. package/assets/esri/core/workers/chunks/9848e9b9cc62328bfeb4.js +0 -1
  1109. package/assets/esri/core/workers/chunks/9a30ad773c22bde61c64.js +0 -1
  1110. package/assets/esri/core/workers/chunks/9bcead430045cbd9941c.js +0 -1
  1111. package/assets/esri/core/workers/chunks/9bd22cdf6eb158555906.js +0 -1
  1112. package/assets/esri/core/workers/chunks/a418af538ee98de7822a.js +0 -1
  1113. package/assets/esri/core/workers/chunks/b1ce435e3850255e0b24.js +0 -1
  1114. package/assets/esri/core/workers/chunks/b31096f20b9ed1446c3a.js +0 -1
  1115. package/assets/esri/core/workers/chunks/b5d4255db21dfd3b3b13.js +0 -2
  1116. package/assets/esri/core/workers/chunks/b5ee6c203f536bdb6708.js +0 -1
  1117. package/assets/esri/core/workers/chunks/b882f921387e21fb263d.js +0 -1
  1118. package/assets/esri/core/workers/chunks/bf9144a5d1fdebec6c4d.js +0 -1
  1119. package/assets/esri/core/workers/chunks/c12bdf6fd7f631e3f79e.js +0 -971
  1120. package/assets/esri/core/workers/chunks/c14afb5a090c58e66235.js +0 -1
  1121. package/assets/esri/core/workers/chunks/c58f559eb68035ebe3da.js +0 -1
  1122. package/assets/esri/core/workers/chunks/c62614bf6ba530924ca1.js +0 -1
  1123. package/assets/esri/core/workers/chunks/c67322bb54dcf699fe23.js +0 -1
  1124. package/assets/esri/core/workers/chunks/d0672714fffe04d5632a.js +0 -51
  1125. package/assets/esri/core/workers/chunks/d5ca87a4ecf096430a21.js +0 -1
  1126. package/assets/esri/core/workers/chunks/d9c34e07627d93d4670b.js +0 -1
  1127. package/assets/esri/core/workers/chunks/e21259a75af746895d6c.js +0 -1
  1128. package/assets/esri/core/workers/chunks/e2c49c1dc02249cf6fd2.js +0 -1
  1129. package/assets/esri/core/workers/chunks/e36a4a049ea8b5589d28.js +0 -1
  1130. package/assets/esri/core/workers/chunks/f43277fdbdbb0f49fe52.js +0 -1
  1131. package/assets/esri/core/workers/chunks/f73bbf3a08adaa37581d.js +0 -1
  1132. package/assets/esri/core/workers/chunks/f9656b0d3c1df8ad19af.js +0 -1
  1133. package/chunks/Bufferer-BhfWVXPl.js +0 -5
  1134. package/chunks/Clipper-a9xfvRaw.js +0 -5
  1135. package/chunks/CrackAndCluster-CHWFqqYQ.js +0 -5
  1136. package/chunks/GeodeticDistanceCalculator-Cnd3ZMKD.js +0 -5
  1137. package/chunks/Intersector-K1VmdfQW.js +0 -5
  1138. package/chunks/OperatorDifference.js +0 -5
  1139. package/chunks/OperatorIntersection.js +0 -5
  1140. package/chunks/OperatorSimplify.js +0 -5
  1141. package/chunks/OperatorUnion.js +0 -5
  1142. package/layers/support/TrackLabelClass.js +0 -5
  1143. package/views/2d/engine/webgl/shaderGraph/ShaderBuilder2D.js +0 -5
  1144. package/views/2d/layers/features/support/FeatureFilter.js +0 -5
  1145. package/views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js +0 -5
  1146. package/views/3d/webgl-engine/core/shaderModules/Uniform.js +0 -5
  1147. package/views/3d/webgl-engine/core/shaderModules/interfaces.js +0 -5
  1148. package/views/3d/webgl-engine/effects/focusArea/FocusAreaRenderNode.js +0 -5
  1149. package/views/3d/webgl-engine/effects/focusArea/FocusAreaRenderNodeColorEffects.js +0 -5
  1150. package/views/3d/webgl-engine/effects/focusArea/FocusAreaRenderNodeGeometryMasking.js +0 -5
  1151. /package/chunks/{GeometryCleaner-DVgW95-D.js → GeometryCleaner-BEJM7I4l.js} +0 -0
  1152. /package/views/{3d/webgl-engine/core/shaderTechnique → webgl}/BindType.js +0 -0
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
- */
5
- import{S as e,G as t}from"./SimpleGeometryCursor.js";import{t as s,G as i,e as r,c as n,f as h,g as o,h as a,v as m,j as g,k as l,i as d,l as _,b as p}from"./Geometry.js";import{E as u,n as c,S as f,P as x,M as I,a as E,g as P,i as y,L as S}from"./QuadraticBezier.js";import{s as C,d as G,b as H,e as V,c as v,P as N,a as T,C as F,f as b,N as w,g as U,h as k,n as D,j as B,k as A,t as O,l as R}from"./CrackAndCluster-CHWFqqYQ.js";import{b as L,a as Y,d as M,i as X,e as q,f as z,g as W,h as Z,j,S as Q,A as K,k as J,P as $,T as ee,l as te,C as se,m as ie,I as re,n as ne,B as he,o as oe,p as ae,q as me,V as ge,r as le}from"./Envelope.js";import{Envelope2D as de}from"./Envelope2D.js";import{P as _e,f as pe,b as ue,h as ce,s as fe,i as xe,d as Ie,j as Ee,k as Pe,l as ye,E as Se,K as Ce,n as Ge,m as He}from"./Point2D.js";import{b as Ve,c as ve}from"./tslib.es6.js";class Ne{constructor(e){this.m_currentShift=63n,this.m_currentElt=0n,this.m_iCurrentElt=-1,this.m_parent=e,this.m_aiSetElts=e.m_bits.flatMap(((e,t)=>t))}next(){if(this.m_currentShift++,64n===this.m_currentShift){if(this.m_iCurrentElt++,this.m_iCurrentElt===this.m_aiSetElts.length)return Ne.npos();this.m_currentShift=0n,this.m_currentElt=this.m_parent.m_bits[this.m_aiSetElts[this.m_iCurrentElt]]}for(;this.m_currentShift<63n&&!(this.m_currentElt&1n<<this.m_currentShift);)this.m_currentShift++;return this.m_currentElt&1n<<this.m_currentShift?64*this.m_aiSetElts[this.m_iCurrentElt]+Number(this.m_currentShift):this.next()}static npos(){return Number.MAX_SAFE_INTEGER}}function Te(e){return 1n<<(0x3fn&BigInt(e))}function Fe(e){return e>>6}class be{constructor(e){this.m_bits=[],void 0!==e&&e.copy&&(this.m_bits=e.copy.m_bits.slice())}assignMove(){return this}assignCopy(){return this}hasBit(e){const t=Te(e),s=Fe(e);return void 0!==this.m_bits[s]&&!!(this.m_bits[s]&t)}setBit(e){const t=Te(e),s=Fe(e);void 0===this.m_bits[s]&&(this.m_bits[s]=0n),this.m_bits[s]|=t}clearBit(e){}flipBit(e){const t=Te(e),s=Fe(e);return void 0===this.m_bits[s]&&(this.m_bits[s]=0n),this.m_bits[s]^=t,0n!==(this.m_bits[s]&t)}clear(){this.m_bits.length=0}isZero(){let e=0;return this.m_bits.forEach((t=>{e|=t?2:1})),!(2&e)}equals(e){if(this===e)return!0;if(this.m_bits.length!==e.m_bits.length)return!1;let t=0;return this.m_bits.forEach(((s,i)=>{t|=s===e.m_bits[i]?2:1})),!(1&t)&&(e.m_bits.forEach(((e,s)=>{t|=e===this.m_bits[s]?2:1})),!(1&t))}notEquals(e){return!this.equals(e)}assignOr(e){return e.m_bits.forEach(((e,t)=>{void 0===this.m_bits[t]?this.m_bits[t]=e:this.m_bits[t]|=e})),this}assignSubtract(e){return e.m_bits.forEach(((e,t)=>{void 0!==this.m_bits[t]&&(this.m_bits[t]&=~e)})),this}assignAnd(e){return e.m_bits.forEach(((e,t)=>{void 0!==this.m_bits[t]&&(this.m_bits[t]&=e)})),this}assignXor(e){return e.m_bits.forEach(((e,t)=>{void 0===this.m_bits[t]?this.m_bits[t]=e:this.m_bits[t]^=e})),this}getHashCode(){return this.m_bits.reduce(((e,t)=>Pe(e,t)),ye(0))}getUnorderedBitIterator(){return new Ne(this)}}class we{constructor(e,t){this.m_map=new Map,this.m_hf=e,this.m_ef=t}add(e){const t=this.m_hf(e);if(!this.m_map.has(t))return this.m_map.set(t,e),this;const s=this.m_map.get(t);return s instanceof Array?s.find((t=>this.m_ef(t,e)))||s.push(e):this.m_ef(s,e)||this.m_map.set(t,[s,e]),this}clear(){this.m_map.clear()}delete(e){return!1}has(e){const t=this.m_hf(e);if(!this.m_map.has(t))return!1;const s=this.m_map.get(t);return s instanceof Array?void 0!==s.find((t=>this.m_ef(t,e))):this.m_ef(s,e)}get(e){const t=this.m_hf(e),s=this.m_map.get(t);if(void 0!==s)return s instanceof Array?s.find((t=>this.m_ef(t,e))):s}get size(){let e=0;for(const t of this.m_map.values())e+=t instanceof Array?t.length:1;return e}forEach(e,t){}[Symbol.iterator](){return(new Set)[Symbol.iterator]()}entries(){return(new Set).entries()}keys(){return(new Set).keys()}values(){return(new Set).values()}get[Symbol.toStringTag](){return"ValueSet"}}class Ue extends le{constructor(e){super(),this.m_bufferLeft=new f,this.m_bufferRight=new f,this.m_intervalLeft=Se.constructEmpty(),this.m_intervalRight=Se.constructEmpty(),this.m_yScanline=Number.NaN,this.m_helper=e}compare(e,t,s){const i=t,r=e.getElement(s);this.m_helper.querySegmentXY(i,this.m_bufferLeft),this.m_helper.querySegmentXY(r,this.m_bufferRight);const n=this.m_bufferLeft.get(),h=this.m_bufferRight.get();if(this.m_intervalLeft.setCoords(n.getStartX(),n.getEndX()),this.m_intervalRight.setCoords(h.getStartX(),h.getEndX()),this.m_intervalLeft.vmax<this.m_intervalRight.vmin)return-1;if(this.m_intervalLeft.vmin>this.m_intervalRight.vmax)return 1;const o=n.getStartY()===n.getEndY(),a=h.getStartY()===h.getEndY();if(o||a){if(o&&a)return 0;if(n.getStartY()===h.getStartY()&&n.getStartX()===h.getStartX())return o?1:-1;if(n.getEndY()===h.getEndY()&&n.getEndX()===h.getEndX())return o?-1:1}let m=n.intersectionOfYMonotonicWithAxisX(this.m_yScanline,this.m_intervalLeft.vmin),g=h.intersectionOfYMonotonicWithAxisX(this.m_yScanline,this.m_intervalRight.vmin);if(m===g){const e=n.getEndY(),t=h.getEndY(),s=Math.min(e,t);let i=.5*(s+this.m_yScanline);i===this.m_yScanline&&(i=s),m=n.intersectionOfYMonotonicWithAxisX(i,this.m_intervalLeft.vmin),g=h.intersectionOfYMonotonicWithAxisX(i,this.m_intervalRight.vmin)}return m<g?-1:m>g?1:0}setY(e){this.m_yScanline=e}}class ke{constructor(e){this.m_segmentBuffer=new f,this.m_point=_e.getNAN(),this.m_parent=e}setPointXY(e){this.m_point.assign(e)}compare(e,t){const s=e.getElement(t);this.m_parent.querySegmentXY(s,this.m_segmentBuffer);const i=this.m_segmentBuffer.get(),r=new Se;if(r.setCoords(i.getStartX(),i.getEndX()),this.m_point.x<r.vmin)return-1;if(this.m_point.x>r.vmax)return 1;const n=i.intersectionOfYMonotonicWithAxisX(this.m_point.y,this.m_point.x);return this.m_point.x<n?-1:this.m_point.x>n?1:0}}var De,Be;function Ae(e,t){return{parentage:e,rank:t}}function Oe(e,t){const s=e.length;if(s!==t.length)return!1;const i=e[0].parentage;if(i!==t[0].parentage)return!1;if(-1===i)return!0;for(let r=1;r<s;++r)if(e[r].parentage!==t[r].parentage)return!1;return!0}function Re(e,t,s){s.length=0;let i=!1;{let r=e.getHalfEdgeVertexIterator(t);for(;r!==c;){const t=e.getVertexFromVertexIterator(r),n=e.getShape().getSegmentRank(t),h=e.getShape().getSegmentParentage(t);i||=h>=0,s.push(Ae(h,n)),r=e.incrementVertexIterator(r)}}{let r=e.getHalfEdgeVertexIterator(e.getHalfEdgeTwin(t));for(;r!==c;){const t=e.getVertexFromVertexIterator(r),n=e.getShape().getSegmentRank(t),h=e.getShape().getSegmentParentage(t);i||=h>=0,s.push(Ae(h,n)),r=e.incrementVertexIterator(r)}}i&&s.sort(((e,t)=>e.rank>t.rank?-1:e.rank<t.rank?1:e.parentage<t.parentage?-1:e.parentage>t.parentage?1:0)),-1===s[0].parentage&&(s.length=1)}function Le(){return new we((e=>e.getHashCode()),((e,t)=>e.equals(t)))}!function(e){e[e.enumInputModeBuildGraph=0]="enumInputModeBuildGraph",e[e.enumInputModeSimplifyAlternate=1]="enumInputModeSimplifyAlternate",e[e.enumInputModeSimplifyWinding=2]="enumInputModeSimplifyWinding"}(De||(De={})),function(e){e[e.enumSegmentParentageBreakNode=1]="enumSegmentParentageBreakNode",e[e.enumPathBreakNode=2]="enumPathBreakNode"}(Be||(Be={}));class Ye{constructor(){this.m_shape=null,this.m_clusterData=new Q(8),this.m_clusterVertices=new Q(2),this.m_firstCluster=c,this.m_lastCluster=c,this.m_halfEdgeData=new Q(8),this.m_chainData=new Q(8),this.m_chainAreas=null,this.m_chainPerimeters=null,this.m_universeChain=-1,this.m_simplifiedGeometry=-1,this.m_edgeIndices=[],this.m_clusterIndices=[],this.m_chainIndices=[],this.m_bBuildGeometryParentageSets=!1,this.m_chainBitSetIndex=-1,this.m_edgeBitSetIndex=-1,this.m_edgeBitSetIndexLeft=-1,this.m_emptyBitSet=null,this.m_geometryMapID=null,this.m_uniqueBitSets=null,this.m_chainBitSets=[],this.m_edgeBitSets=[],this.m_checkDirtyPlanesweepTolerance=Number.NaN,this.m_geometryIDIndex=-1,this.m_clusterIndex=-1,this.m_halfEdgeIndex=-1,this.m_tmpHalfEdgeParentageIndex=-1,this.m_tmpHalfEdgeParentageIndexLeft=-1,this.m_tmpHalfEdgeWindingNumberIndex=-1,this.m_tmpHalfEdgeOddEvenNumberIndex=-1,this.m_segmentParentageIndex=-1,this.m_segmentIndexHe=-1,this.m_clusterBreakNodeIndex=-1,this.m_universeGeomID=-1,this.m_pointCount=0,this.m_progressCounter=0,this.m_bBuildChains=!0,this.m_bDirtyCheckFailed=!1}setCheckDirtyPlanesweepTolerance(e){this.m_checkDirtyPlanesweepTolerance=e}dirtyCheckFailed(){return this.m_bDirtyCheckFailed}getShape(){return this.m_shape}setEditShape(e,t,s=!0,i=!1){i?this.setEditShapeImpl3D_(e,De.enumInputModeBuildGraph,null,t,!1):this.setEditShapeImpl_(e,De.enumInputModeBuildGraph,null,t,s)}setAndSimplifyEditShapeAlternate(e,t,s=null,r=!1){const n=[];n.push(t),this.m_simplifiedGeometry=t,r?this.setEditShapeImpl3D_(e,De.enumInputModeSimplifyAlternate,n,s,!1):this.setEditShapeImpl_(e,De.enumInputModeSimplifyAlternate,n,s,e.getGeometryType(t)===i.enumPolygon)}setAndSimplifyEditShapeWinding(e,t,s=null){const i=[];i.push(t),this.m_simplifiedGeometry=t,this.setEditShapeImpl_(e,De.enumInputModeSimplifyWinding,i,s,!0)}removeShape(){null!==this.m_shape&&(-1!==this.m_geometryIDIndex&&(this.m_shape.removeGeometryUserIndex(this.m_geometryIDIndex),this.m_geometryIDIndex=-1),-1!==this.m_clusterIndex&&(this.m_shape.removeUserIndex(this.m_clusterIndex),this.m_clusterIndex=-1),-1!==this.m_halfEdgeIndex&&(this.m_shape.removeUserIndex(this.m_halfEdgeIndex),this.m_halfEdgeIndex=-1),-1!==this.m_tmpHalfEdgeParentageIndex&&(this.deleteUserIndexForHalfEdges(this.m_tmpHalfEdgeParentageIndex),this.m_tmpHalfEdgeParentageIndex=-1),-1!==this.m_tmpHalfEdgeParentageIndexLeft&&(this.deleteUserIndexForHalfEdges(this.m_tmpHalfEdgeParentageIndexLeft),this.m_tmpHalfEdgeParentageIndexLeft=-1),-1!==this.m_tmpHalfEdgeWindingNumberIndex&&(this.deleteUserIndexForHalfEdges(this.m_tmpHalfEdgeWindingNumberIndex),this.m_tmpHalfEdgeWindingNumberIndex=-1),-1!==this.m_tmpHalfEdgeOddEvenNumberIndex&&(this.deleteUserIndexForHalfEdges(this.m_tmpHalfEdgeOddEvenNumberIndex),this.m_tmpHalfEdgeOddEvenNumberIndex=-1),-1!==this.m_segmentParentageIndex&&(this.deleteUserIndexForHalfEdges(this.m_segmentParentageIndex),this.m_segmentParentageIndex=-1),-1!==this.m_segmentIndexHe&&(this.deleteUserIndexForHalfEdges(this.m_segmentIndexHe),this.m_segmentIndexHe=-1),-1!==this.m_clusterBreakNodeIndex&&(this.deleteUserIndexForClusters(this.m_clusterBreakNodeIndex),this.m_clusterBreakNodeIndex=-1),this.deleteEdgeBitSets_(),this.deleteChainBitSets_(),this.m_emptyBitSet=null,this.m_geometryMapID=null,this.m_shape=null,this.m_clusterData.deleteAll(!0),this.m_clusterVertices.deleteAll(!0),this.m_firstCluster=c,this.m_lastCluster=c,this.m_halfEdgeData.deleteAll(!0),this.m_edgeIndices.length=0,this.m_clusterIndices.length=0,this.m_chainIndices.length=0,this.m_chainData.deleteAll(!0),this.m_universeChain=c,this.m_chainAreas=null)}getClusterHalfEdge(e){return this.m_clusterData.getField(e,2)}queryXY(e,t){const s=this.getClusterVertexIndex_(e);t.assign(this.m_shape.getXYWithIndex(s))}queryXYZ(e,t){o(0)}getClusterParentage(e){return this.m_clusterData.getField(e,1)}getFirstCluster(){return this.m_firstCluster}getPrevCluster(e){return this.m_clusterData.getField(e,3)}getNextCluster(e){return this.m_clusterData.getField(e,4)}getClusterChain(e){return this.m_clusterData.getField(e,6)}getClusterVertexIterator(e){return this.m_clusterData.getField(e,7)}incrementVertexIterator(e){return this.m_clusterVertices.getField(e,1)}getVertexFromVertexIterator(e){return this.m_clusterVertices.getField(e,0)}getClusterUserIndex(e,t){const s=this.getClusterIndex_(e),i=this.m_clusterIndices[t];return i.size()<=s?-1:i.read(s)}setClusterUserIndex(e,t,s){const i=this.getClusterIndex_(e),r=this.m_clusterIndices[t];r.size()<=i&&r.resize(this.m_clusterData.size(),-1),r.write(i,s)}hasClusterUserIndexFlags(e,t,s){if(-1===t)return!1;const i=this.getClusterUserIndex(e,t);return-1!==i&&!!(s&i)}setClusterUserIndexFlags(e,t,s){const i=this.getClusterIndex_(e),r=this.m_clusterIndices[t];r.size()<=i&&r.resize(this.m_clusterData.size(),-1);let n=r.read(i);-1===n&&(n=0),r.write(i,s|n)}clearClusterUserIndexFlags(e,t,s){const i=this.getClusterIndex_(e),r=this.m_clusterIndices[t];r.size()<=i&&r.resize(this.m_clusterData.size(),-1);let n=r.read(i);-1===n&&(n=0),r.write(i,~s&n)}createUserIndexForClusters(e=-1){const t=new K(this.m_clusterData.capacity(),e);for(let s=0,i=this.m_clusterIndices.length;s<i;s++)if(null===this.m_clusterIndices[s])return this.m_clusterIndices[s]=t,s;this.m_clusterIndices.push(t);return this.m_clusterIndices.length-1}deleteUserIndexForClusters(e){this.m_clusterIndices[e]=null}getHalfEdgeOrigin(e){return this.m_halfEdgeData.getField(e,1)}getHalfEdgeTo(e){return this.getHalfEdgeOrigin(this.getHalfEdgeTwin(e))}getHalfEdgeTwin(e){return this.m_halfEdgeData.getField(e,4)}getHalfEdgePrev(e){return this.m_halfEdgeData.getField(e,5)}getHalfEdgeNext(e){return this.m_halfEdgeData.getField(e,6)}getHalfEdgeChain(e){return this.m_halfEdgeData.getField(e,2)}getHalfEdgeFaceParentage(e){return this.getChainParentage(this.getHalfEdgeChain(e))}getHalfEdgeVertexIterator(e){return this.m_halfEdgeData.getField(e,7)}getHalfEdgeFromXY(e,t){this.queryXY(this.getHalfEdgeOrigin(e),t)}getHalfEdgeToXY(e,t){this.queryXY(this.getHalfEdgeTo(e),t)}isHalfEdgeCurve(e){if(-1!==this.m_segmentIndexHe){return-1!==this.getHalfEdgeUserIndex(e,this.m_segmentIndexHe)}return!1}getHalfEdgeFromXYZ(e,t){o(0)}getHalfEdgeToXYZ(e,t){o(0)}getHalfEdgeParentage(e){return this.m_halfEdgeData.getField(e,3)&Ye.c_EdgeParentageMask}getHalfEdgeUserIndex(e,t){const s=this.getHalfEdgeIndex_(e),i=this.m_edgeIndices[t];return i.size()<=s?-1:i.read(s)}setHalfEdgeUserIndex(e,t,s){const i=this.getHalfEdgeIndex_(e),r=this.m_edgeIndices[t];r.size()<=i&&r.resize(this.m_halfEdgeData.size(),-1),r.write(i,s)}createUserIndexForHalfEdges(e){void 0===e&&(e=-1);const t=new K(this.m_halfEdgeData.capacity(),e);for(let i=0,r=this.m_edgeIndices.length;i<r;i++)if(null===this.m_edgeIndices[i])return this.m_edgeIndices[i]=t,i;this.m_edgeIndices.push(t);const s=this.m_edgeIndices.length-1;return o(s>=0&&s<=Number.MAX_SAFE_INTEGER),s}deleteUserIndexForHalfEdges(e){this.m_edgeIndices[e]=null}deleteEdgesBreakFaces_(e){for(let t=0,s=e.length;t<s;t++){const s=e[t],i=this.getHalfEdgeChain(s),r=this.getHalfEdgeTwin(s),n=this.getHalfEdgeChain(r);this.setChainHalfEdge_(i,c),this.setChainHalfEdge_(n,c),this.updateVertexToHalfEdgeConnection_(s,!0),this.deleteEdgeImpl_(s)}}doesHalfEdgeBelongToAPolygonInterior(e,t){return o(0),!1}doesHalfEdgeBelongToAPolygonExterior(e,t){return o(0),!1}doesHalfEdgeBelongToAPolygonBoundary(e,t){return o(0),!1}doesHalfEdgeBelongToAPolylineInterior(e,t){return o(0),!1}doesHalfEdgeBelongToAPolylineExterior(e,t){return o(0),!1}doesClusterBelongToAPolygonInterior(e,t){return o(0),!1}doesClusterBelongToAPolygonExterior(e,t){return o(0),!1}doesClusterBelongToAPolygonBoundary(e,t){return o(0),!1}getFirstChain(){return this.m_universeChain}getChainHalfEdge(e){return this.m_chainData.getField(e,1)}getChainParentage(e){return this.m_chainData.getField(e,2)}getChainParent(e){return this.m_chainData.getField(e,3)}getChainFirstIsland(e){return this.m_chainData.getField(e,4)}getChainNextInParent(e){return this.m_chainData.getField(e,5)}getChainNext(e){return this.m_chainData.getField(e,7)}getChainArea(e){const t=this.getChainIndex_(e);let s=this.m_chainAreas.read(t);return Number.isNaN(s)&&(this.updateChainAreaAndPerimeter_(e),s=this.m_chainAreas.read(t)),s}getChainPerimeter(e){return o(0),0}getChainUserIndex(e,t){const s=this.getChainIndex_(e),i=this.m_chainIndices[t];return i.size()<=s?-1:i.read(s)}setChainUserIndex(e,t,s){const i=this.getChainIndex_(e),r=this.m_chainIndices[t];r.size()<=i&&r.resize(this.m_chainData.size(),-1),r.write(i,s)}createUserIndexForChains(){const e=new K(this.m_chainData.capacity(),-1);for(let t=0,s=this.m_chainIndices.length;t<s;t++)if(null===this.m_chainIndices[t])return this.m_chainIndices[t]=e,t;this.m_chainIndices.push(e);return this.m_chainIndices.length-1}deleteUserIndexForChains(e){this.m_chainIndices[e]=null}extractPolygonFromChainAndIslands(e,t,s,r){const n=t===c?e.createGeometry(i.enumPolygon):t,h=new f;this.extractPolygonPathFromChain_(e,n,s,r,h);for(let i=this.getChainFirstIsland(s);i!==c;i=this.getChainNextInParent(i))this.extractPolygonPathFromChain_(e,n,i,r,h);return n}getGeometryID(e){const t=this.m_shape.getGeometryUserIndex(e,this.m_geometryIDIndex);return o(t>=0),1<<Math.min(t,31)}getClusterFromVertex(e){return this.m_shape.getUserIndex(e,this.m_clusterIndex)}getHalfEdgeFromVertex(e){return this.m_shape.getUserIndex(e,this.m_halfEdgeIndex)}buildGeometryParentageSets(){this.m_bBuildGeometryParentageSets=!0}getChainBitSet(e){if(o(this.m_bBuildGeometryParentageSets),-1===this.m_chainBitSetIndex)return this.getEmptySet();const t=this.getChainUserIndex(e,this.m_chainBitSetIndex);o(t>=0);let s=this.m_chainBitSets.at(t);return s||(s=this.getEmptySet()),s}getChainBoundaryBitSet(e){o(this.m_bBuildGeometryParentageSets);const t=new be,s=e=>{const s=this.getChainHalfEdge(e);let i=s;do{const e=this.getEdgeBitSet_(i);null!==e&&t.assignOr(e);const s=this.getEdgeBitSet_(this.getHalfEdgeTwin(i));null!==s&&t.assignOr(s),i=this.getHalfEdgeNext(i)}while(i!==s)};s(e);for(let i=this.getChainFirstIsland(e);i!==c;i=this.getChainNextInParent(i))s(e);return t}getChainPolygons(e){return o(0),[]}getGeometriesFromBits(e){if(!this.m_bBuildGeometryParentageSets||null===e)return[];if(null===this.m_geometryMapID){this.m_geometryMapID=new Map;for(let e=this.m_shape.getFirstGeometry();e!==c;e=this.m_shape.getNextGeometry(e))this.m_geometryMapID.set(this.m_shape.getGeometryUserIndex(e,this.m_geometryIDIndex),e)}const t=[],s=e.getUnorderedBitIterator();for(let i=s.next();i!==Ne.npos();i=s.next())o(this.m_geometryMapID.has(i)),t.push(this.m_geometryMapID.get(i));return t}getVertexDominant(e,t){if(t===c)return e;const s=this.getClusterFromVertex(e);return this.getVertexDominantFromCluster(s,t)}getVertexDominantFromCluster(e,t){if(t!==c){let s=c;for(let i=this.getClusterVertexIterator(e);i!==c;i=this.incrementVertexIterator(i)){const e=this.getVertexFromVertexIterator(i);s===c&&(s=e);const r=this.m_shape.getPathFromVertex(e);if(this.m_shape.getGeometryFromPath(r)===t){s=e;break}}return s}{const t=this.getClusterVertexIterator(e);if(t!==c){return this.getVertexFromVertexIterator(t)}return c}}isBreakNode(e){return this.hasClusterUserIndexFlags(e,this.m_clusterBreakNodeIndex,Be.enumSegmentParentageBreakNode)}setBreakNode(e,t){o(-1!==this.m_clusterBreakNodeIndex),t?this.setClusterUserIndexFlags(e,this.m_clusterBreakNodeIndex,Be.enumSegmentParentageBreakNode):this.clearClusterUserIndexFlags(e,this.m_clusterBreakNodeIndex,Be.enumSegmentParentageBreakNode)}isStrongPathNode(e){return this.hasClusterUserIndexFlags(e,this.m_clusterBreakNodeIndex,Be.enumPathBreakNode)}setStrongPathNode(e,t){if(-1===this.m_clusterBreakNodeIndex){if(!t)return;this.m_clusterBreakNodeIndex=this.createUserIndexForClusters()}t?this.setClusterUserIndexFlags(e,this.m_clusterBreakNodeIndex,Be.enumPathBreakNode):this.clearClusterUserIndexFlags(e,this.m_clusterBreakNodeIndex,Be.enumPathBreakNode)}getSegmentParentage(e){if(-1===this.m_segmentParentageIndex)return-1;const t=this.getHalfEdgeUserIndex(e,this.m_segmentParentageIndex);return t>=0?t:-1}isCrossroadAhead(e){const t=this.getHalfEdgeNext(e);if(this.isStrongPathNode(this.getHalfEdgeOrigin(t)))return!0;const s=this.getHalfEdgeTwin(t),i=this.getHalfEdgeNext(s);return e!==this.getHalfEdgeTwin(i)}isCrossroadBehind(e){return o(0),!1}getHalfEdgeConnector(e,t){const s=this.getClusterHalfEdge(e);if(s===c)return c;let i=s,r=c,n=c;do{if(this.getHalfEdgeTo(i)===t)return i;if(r===c){if(r=this.getClusterHalfEdge(t),r===c)return c;n=r}if(this.getHalfEdgeTo(n)===e)return i=this.getHalfEdgeTwin(n),i;i=this.getHalfEdgeNext(this.getHalfEdgeTwin(i)),n=this.getHalfEdgeNext(this.getHalfEdgeTwin(n))}while(i!==s&&n!==r);return c}querySegmentXY(e,t){if(-1!==this.m_segmentIndexHe){let s=this.getHalfEdgeUserIndex(e,this.m_segmentIndexHe);if(-1!==s){if(-2!==s){const e=this.m_shape.getSegmentFromIndex(s);t.copyFrom(e,!0)}else{s=this.getHalfEdgeUserIndex(this.getHalfEdgeTwin(e),this.m_segmentIndexHe);const i=this.m_shape.getSegmentFromIndex(s);t.copyFrom(i,!0),t.get().reverse()}return}}t.createLine();const s=t.get(),i=_e.getNAN();this.getHalfEdgeFromXY(e,i),s.setStartXY(i),this.getHalfEdgeToXY(e,i),s.setEndXY(i)}isCurveEdge(e){if(-1!==this.m_segmentIndexHe){return-1!==this.getHalfEdgeUserIndex(e,this.m_segmentIndexHe)}return!1}compareEdgeAnglesCurveHelper_(e,t,s){const i=new f,r=new f;this.querySegmentXY(e,i),this.querySegmentXY(t,r);const n=i.get(),h=r.get();if(n.equals(h))return 0;const a=new _e;this.getHalfEdgeFromXY(e,a);const m=new _e;this.getHalfEdgeToXY(e,m);const g=new _e;this.getHalfEdgeToXY(t,g),o(!m.isEqualPoint2D(g));const l=n.getTangent(0),d=h.getTangent(0);return _e.compareVectors(l,d)}compareEdgeAnglesHelper_(e,t,s){if(e===t)return 0;if(this.isHalfEdgeCurve(e)||this.isHalfEdgeCurve(t))return this.compareEdgeAnglesCurveHelper_(e,t,s);const i=_e.getNAN();this.getHalfEdgeToXY(e,i);const r=_e.getNAN();if(this.getHalfEdgeToXY(t,r),i.isEqualPoint2D(r))return 0;const n=_e.getNAN();this.getHalfEdgeFromXY(e,n);const h=_e.getNAN();h.setSub(i,n);const o=_e.getNAN();if(o.setSub(r,n),!s||o.y>=0&&h.y>0){return _e.compareVectors(h,o)}return 0}compareEdgeAngles_(e,t){return this.compareEdgeAnglesHelper_(e,t,!1)}compareEdgeAnglesForPair_(e,t){return this.compareEdgeAnglesHelper_(e,t,!0)}compareEdgeAngles3D_(e,t){return o(0),0}compareEdgeAnglesForPair3D_(e,t){return o(0),0}dbgDumpChains_(){}dbgDumpChainToPolygon_(e,t){}deleteEdgeInternal_(e){const t=this.getHalfEdgeChain(e),s=this.getHalfEdgeTwin(e),i=this.getHalfEdgeChain(s);o(i===t),o(e===this.getHalfEdgeNext(s)||s===this.getHalfEdgeNext(e));let r=this.getHalfEdgeNext(e);r===s&&(r=this.getHalfEdgeNext(r),r===e&&(r=c));const n=this.getChainIndex_(t),h=this.m_chainAreas.read(n);Number.isNaN(h)||(this.setChainArea_(t,Number.NaN),this.setChainPerimeter_(t,Number.NaN));const a=this.getChainHalfEdge(t);a!==e&&a!==s||this.setChainHalfEdge_(t,r),this.updateVertexToHalfEdgeConnection_(e,!0),this.deleteEdgeImpl_(e)}getFirstUnvisitedHalfEdgeOnCluster_(e,t,s){let i=t!==c?t:this.getClusterHalfEdge(e);if(i===c)return c;const r=i;for(;;){if(1!==this.getHalfEdgeUserIndex(i,s))return i;const e=this.getHalfEdgeNext(this.getHalfEdgeTwin(i));if(e===r)return c;i=e}}removeSpikes_(){let e=!1;const t=this.createUserIndexForHalfEdges();for(let s=this.getFirstCluster();s!==c;s=this.getNextCluster(s)){let i=c;for(;;){let r=this.getFirstUnvisitedHalfEdgeOnCluster_(s,i,t);if(r===c)break;i=this.getHalfEdgeNext(this.getHalfEdgeTwin(r));let n=r;for(;;){const s=this.getHalfEdgeNext(n),h=this.getHalfEdgePrev(n),o=this.getHalfEdgeTwin(n);if(h===o){if(this.deleteEdgeInternal_(n),e=!0,i!==n&&i!==o||(i=c),n===r||h===r){if(r=s,n===r||h===r)break;n=s;continue}}else this.setHalfEdgeUserIndex(n,t,1);if(n=s,n===r)break}}}return this.deleteUserIndexForHalfEdges(t),e}progress_(e,t=!1){}newCluster_(){const e=this.m_clusterData.newElement();return this.m_clusterData.setField(e,1,0),e}newHalfEdgePair_(){const e=this.m_halfEdgeData.newElement();this.m_halfEdgeData.setField(e,2,0),this.m_halfEdgeData.setField(e,3,0);const t=this.m_halfEdgeData.newElement();return this.m_halfEdgeData.setField(t,2,0),this.m_halfEdgeData.setField(t,3,0),this.setHalfEdgeTwin_(e,t),this.setHalfEdgeTwin_(t,e),e}newChain_(){const e=this.m_chainData.newElement();return this.m_chainData.setField(e,2,0),e}deleteChain_(e){return o(0),0}getClusterIndex_(e){return this.m_clusterData.elementToIndex(e)}setClusterVertexIterator_(e,t){this.m_clusterData.setField(e,7,t)}setClusterHalfEdge_(e,t){this.m_clusterData.setField(e,2,t)}setClusterParentage_(e,t){this.m_clusterData.setField(e,1,t)}setPrevCluster_(e,t){this.m_clusterData.setField(e,3,t)}setNextCluster_(e,t){this.m_clusterData.setField(e,4,t)}setClusterVertexIndex_(e,t){this.m_clusterData.setField(e,5,t)}getClusterVertexIndex_(e){return this.m_clusterData.getField(e,5)}setClusterChain_(e,t){this.m_clusterData.setField(e,6,t)}addClusterToExteriorChain_(e,t){this.setClusterChain_(t,e)}getHalfEdgeIndex_(e){return this.m_halfEdgeData.elementToIndex(e)}setHalfEdgeOrigin_(e,t){this.m_halfEdgeData.setField(e,1,t)}setHalfEdgeTwin_(e,t){this.m_halfEdgeData.setField(e,4,t)}setHalfEdgePrev_(e,t){this.m_halfEdgeData.setField(e,5,t)}setHalfEdgeNext_(e,t){this.m_halfEdgeData.setField(e,6,t)}setHalfEdgeChain_(e,t){this.m_halfEdgeData.setField(e,2,t)}setHalfEdgeParentage_(e,t){this.m_halfEdgeData.setField(e,3,t)}getHalfEdgeParentageMask_(e){return this.m_halfEdgeData.getField(e,3)}setHalfEdgeVertexIterator_(e,t){this.m_halfEdgeData.setField(e,7,t)}updateVertexToHalfEdgeConnectionHelper_(e,t){const s=t?c:e;for(let i=this.getHalfEdgeVertexIterator(e);i!==c;i=this.incrementVertexIterator(i)){const e=this.getVertexFromVertexIterator(i);this.m_shape.setUserIndex(e,this.m_halfEdgeIndex,s)}}updateVertexToHalfEdgeConnection_(e,t){e!==c&&(this.updateVertexToHalfEdgeConnectionHelper_(e,t),this.updateVertexToHalfEdgeConnectionHelper_(this.getHalfEdgeTwin(e),t))}getChainIndex_(e){return this.m_chainData.elementToIndex(e)}setChainHalfEdge_(e,t){this.m_chainData.setField(e,1,t)}setChainParentage_(e,t){this.m_chainData.setField(e,2,t)}setChainParent_(e,t){this.m_chainData.setField(e,3,t);const s=this.getChainFirstIsland(t);this.setChainNextInParent_(e,s),this.setChainFirstIsland_(t,e)}setChainFirstIsland_(e,t){this.m_chainData.setField(e,4,t)}setChainNextInParent_(e,t){this.m_chainData.setField(e,5,t)}setChainPrev_(e,t){this.m_chainData.setField(e,6,t)}setChainNext_(e,t){this.m_chainData.setField(e,7,t)}setChainArea_(e,t){const s=this.getChainIndex_(e);this.m_chainAreas.write(s,t)}setChainPerimeter_(e,t){const s=this.getChainIndex_(e);this.m_chainPerimeters.write(s,t)}updateChainAreaAndPerimeter_(e){const t=this.m_shape.hasCurves(),s=new Ce(0),i=new Ce(0),r=this.getChainHalfEdge(e),n=_e.getNAN(),h=_e.getNAN(),o=_e.getNAN();this.getHalfEdgeFromXY(r,n),h.setCoordsPoint2D(n);let a=r;do{this.getHalfEdgeToXY(a,o),t&&this.isCurveEdge(a)||i.pe(_e.distance(h,o));this.getHalfEdgeChain(this.getHalfEdgeTwin(a))!==e&&s.pe((o.x-n.x-(h.x-n.x))*(o.y-n.y+(h.y-n.y))*.5),h.setCoordsPoint2D(o),a=this.getHalfEdgeNext(a)}while(a!==r);if(t){const t=new f;a=r;do{this.getHalfEdgeToXY(a,o);const r=this.isCurveEdge(a);r&&(this.querySegmentXY(a,t),i.pe(t.get().calculateLength2D()));if(this.getHalfEdgeChain(this.getHalfEdgeTwin(a))!==e&&r){const e=t.get().calculateArea2DHelper();s.pe(e)}a=this.getHalfEdgeNext(a)}while(a!==r)}const m=this.getChainIndex_(e);this.m_chainAreas.write(m,s.getResult()),this.m_chainPerimeters.write(m,i.getResult())}getChainTopmostEdge_(e){return o(0),0}planeSweepParentage_(e,t){const s=new Ue(this),i=new ee;i.setCapacity(Math.trunc(this.m_pointCount/2)),i.setComparator(s);const r=[],n=this.createUserIndexForHalfEdges();let h=null;const o=_e.getNAN();for(let a=this.getFirstCluster();a!==c;a=this.getNextCluster(a)){this.progress_(t);const m=this.getClusterHalfEdge(a);if(m!==c){if(r.length=0,!this.tryOptimizedInsertion_(i,n,r,a,m)){this.queryXY(a,o),s.setY(o.y);let e=m;do{const t=this.getHalfEdgeUserIndex(e,n);-1!==t&&(i.deleteNode(t),this.setHalfEdgeUserIndex(e,n,Q.impossibleIndex2())),e=this.getHalfEdgeNext(this.getHalfEdgeTwin(e))}while(m!==e);e=m;do{if(-1===this.getHalfEdgeUserIndex(e,n)){const t=i.addElement(e);r.push(t)}e=this.getHalfEdgeNext(this.getHalfEdgeTwin(e))}while(m!==e)}for(let t=r.length-1;t>=0;t--){const s=r[t],h=i.getElement(s),o=this.getHalfEdgeTwin(h);this.setHalfEdgeUserIndex(o,n,s),this.planeSweepParentagePropagateParentage_(i,s,e)}}else if(this.getClusterChain(a)===c){null===h&&(h=new ke(this)),this.queryXY(a,o),h.setPointXY(o);const e=i.searchLowerBound(h);let t=this.m_universeChain;if(-1!==e){let s=i.getElement(e);this.getHalfEdgeChain(s)===this.getHalfEdgeChain(this.getHalfEdgeTwin(s))&&(s=this.getLeftSkipPolylines_(i,e)),s!==c&&(t=this.getHalfEdgeChain(s))}this.addClusterToExteriorChain_(t,a)}}this.deleteUserIndexForHalfEdges(n)}planeSweepParentagePropagateParentage_(e,t,s){const i=e.getElement(t),r=this.getHalfEdgeChain(i);if(this.getChainParent(r)!==c)return;const n=this.getLeftSkipPolylines_(e,t),h=this.getHalfEdgeTwin(i),a=this.getHalfEdgeChain(h);let m=this.getChainParent(r),g=this.getChainParent(a);if(n===c)m===c&&(a===r?(this.setChainParent_(a,this.m_universeChain),g=this.m_universeChain,m=g):(g===c&&(this.setChainParent_(a,this.m_universeChain),g=this.m_universeChain),this.setChainParent_(r,a),m=a));else{const e=this.getHalfEdgeChain(n);if(g===c){if(this.getChainArea(e)<=0){const t=this.getChainParent(e);this.setChainParent_(a,t),g=t}else this.setChainParent_(a,e),g=e;a===r&&(m=g)}}m===c&&(this.trySetChainParentFromTwin_(r,a),m=this.getChainParent(r)),o(m!==c),s===De.enumInputModeBuildGraph?this.propagateParentageBuildGraph_(e,t,i,n):s===De.enumInputModeSimplifyWinding?this.propagateParentageWinding_(e,t,i,n,h,r,a):s===De.enumInputModeSimplifyAlternate&&this.propagateParentageAlternate_(e,t,i,n,h,r,a)}propagateParentageBuildGraph_(e,t,s,i){let r,n=t;i===c?(n=e.getNext(n),r=this.getHalfEdgeChain(s)):r=this.getHalfEdgeChain(i);let h=null,o=this.getChainParentage(r);for(this.m_bBuildGeometryParentageSets&&(h=this.getChainBitSet(r));-1!==n;n=e.getNext(n)){const t=e.getElement(n),s=this.getHalfEdgeTwin(t);r=this.getHalfEdgeChain(t);const i=this.getHalfEdgeChain(s);if(this.m_bBuildGeometryParentageSets){let e=this.getChainBitSet(i);e=new be({copy:e}),e.assignOr(h),this.setChainBitSet_(i,e);let s=this.getChainBitSet(r);const n=this.getLeftEdgeBitSet_(t),o=new be({copy:h});if(o.assignSubtract(n),o.isZero())break;s=new be({copy:s}),s.assignOr(o),this.setChainBitSet_(r,s),h=s}const a=this.getChainParentage(i),m=a|o;m!==a&&this.setChainParentage_(i,m);let g=this.getChainParentage(r);const l=o&~this.getHalfEdgeUserIndex(t,this.m_tmpHalfEdgeParentageIndexLeft);if(l&&(g|=l,this.setChainParentage_(r,g)),0===l)break;o=g}}propagateParentageWinding_(e,t,s,i,r,n,h){if(n===h)return;let a=this.getHalfEdgeUserIndex(s,this.m_tmpHalfEdgeWindingNumberIndex);a+=this.getHalfEdgeUserIndex(r,this.m_tmpHalfEdgeWindingNumberIndex);let m=0;const g=[],l=[];l.push(0);for(let d=e.getFirst();d!==t;d=e.getNext(d)){const t=e.getElement(d),s=this.getHalfEdgeTwin(t),i=this.getHalfEdgeChain(t),r=this.getHalfEdgeChain(s);if(i!==r){let e=this.getHalfEdgeUserIndex(t,this.m_tmpHalfEdgeWindingNumberIndex);e+=this.getHalfEdgeUserIndex(s,this.m_tmpHalfEdgeWindingNumberIndex),m+=e;let n=!1;0!==g.length&&g.at(-1)===r&&(l.pop(),g.pop(),n=!0),o(this.getChainParent(r)!==c),n&&this.getChainParent(r)===i||(l.push(m),g.push(i))}}if(m+=a,0!==g.length&&g.at(-1)===h&&(l.pop(),g.pop()),0!==m){if(0===l.at(-1)){const e=this.m_simplifiedGeometry,t=this.getGeometryID(e);this.setChainParentage_(n,t)}}else if(0!==l.at(-1)){const e=this.m_simplifiedGeometry,t=this.getGeometryID(e);this.setChainParentage_(n,t)}}propagateParentageAlternate_(e,t,s,i,r,n,h){const o=this.m_simplifiedGeometry,a=this.getGeometryID(o);if(i===c){this.setChainParentage_(h,this.m_universeGeomID);1&this.getHalfEdgeUserIndex(s,this.m_tmpHalfEdgeOddEvenNumberIndex)?this.setChainParentage_(n,a):this.setChainParentage_(n,this.m_universeGeomID)}else{const e=this.getChainParentage(h);if(0===e){const e=this.getHalfEdgeChain(i),t=this.getChainParentage(e);this.setChainParentage_(h,t);1&this.getHalfEdgeUserIndex(s,this.m_tmpHalfEdgeOddEvenNumberIndex)?this.setChainParentage_(n,t===a?this.m_universeGeomID:a):this.setChainParentage_(n,t)}else{1&this.getHalfEdgeUserIndex(s,this.m_tmpHalfEdgeOddEvenNumberIndex)?this.setChainParentage_(n,e===a?this.m_universeGeomID:a):this.setChainParentage_(n,e)}}}tryOptimizedInsertion_(e,t,s,i,r){let n=r,h=-1,o=c,a=0;do{if(2===a)return!1;const e=this.getHalfEdgeUserIndex(n,t);if(-1!==e){if(-1!==h)return!1;h=e}else{if(o!==c)return!1;o=n}a++,n=this.getHalfEdgeNext(this.getHalfEdgeTwin(n))}while(r!==n);return o!==c&&-1!==h&&(this.setHalfEdgeUserIndex(e.getElement(h),t,Q.impossibleIndex2()),e.setElement(h,o),s.push(h),!0)}trySetChainParentFromTwin_(e,t){const s=this.getChainArea(e);if(0===s)return!1;const i=this.getChainArea(t);if(s>0&&i<0||s<0&&i>0)return this.setChainParent_(e,t),!0;{const s=this.getChainParent(t);if(s!==c)return this.setChainParent_(e,s),!0}return!1}createHalfEdges_(e,t){this.m_halfEdgeIndex=this.m_shape.createUserIndex();for(let s=0,r=t.size();s<r;s++){const r=t.read(s),n=this.m_shape.getUserIndex(r,this.m_clusterIndex),h=this.m_shape.getPathFromVertex(r),o=this.m_shape.getGeometryFromPath(h),m=this.m_shape.getGeometryType(o);if(a(m)){const t=this.m_shape.getNextVertex(r);if(t===c)continue;const s=this.m_shape.getUserIndex(t,this.m_clusterIndex);if(n===s)continue;const h=this.newHalfEdgePair_(),a=this.getHalfEdgeTwin(h),g=this.m_clusterVertices.newElement();this.m_clusterVertices.setField(g,0,r),this.m_clusterVertices.setField(g,1,-1),this.setHalfEdgeVertexIterator_(h,g),this.m_shape.setUserIndex(r,this.m_halfEdgeIndex,h),this.setHalfEdgeOrigin_(h,n);const l=this.getClusterHalfEdge(n);if(l===c)this.setClusterHalfEdge_(n,h),this.setHalfEdgePrev_(h,a),this.setHalfEdgeNext_(a,h);else{const e=this.getHalfEdgePrev(l);this.setHalfEdgePrev_(l,a),this.setHalfEdgeNext_(a,l),this.setHalfEdgeNext_(e,h),this.setHalfEdgePrev_(h,e)}this.setHalfEdgeOrigin_(a,s);const d=this.getClusterHalfEdge(s);if(d===c)this.setClusterHalfEdge_(s,a),this.setHalfEdgeNext_(h,a),this.setHalfEdgePrev_(a,h);else{const e=this.getHalfEdgePrev(d);this.setHalfEdgePrev_(d,h),this.setHalfEdgeNext_(h,d),this.setHalfEdgeNext_(e,a),this.setHalfEdgePrev_(a,e)}const _=this.getGeometryID(o);if(e===De.enumInputModeBuildGraph){const e=m===i.enumPolygon?_:0;if(this.setHalfEdgeUserIndex(a,this.m_tmpHalfEdgeParentageIndex,0),this.setHalfEdgeUserIndex(h,this.m_tmpHalfEdgeParentageIndex,e),this.setHalfEdgeUserIndex(a,this.m_tmpHalfEdgeParentageIndexLeft,e),this.setHalfEdgeUserIndex(h,this.m_tmpHalfEdgeParentageIndexLeft,0),this.m_bBuildGeometryParentageSets){const e=new be,t=this.m_shape.getGeometryUserIndex(o,this.m_geometryIDIndex);e.setBit(t),this.setEdgeBitSet_(h,e),this.setEdgeBitSet_(a,null),this.setLeftEdgeBitSet_(a,e),this.setLeftEdgeBitSet_(h,null)}}else if(e===De.enumInputModeSimplifyWinding){const e=this.m_shape.getXY(r),s=this.m_shape.getXY(t);let i=0,n=0;e.compare(s)<0?i=1:n=-1,this.setHalfEdgeUserIndex(h,this.m_tmpHalfEdgeWindingNumberIndex,i),this.setHalfEdgeUserIndex(a,this.m_tmpHalfEdgeWindingNumberIndex,n)}else e===De.enumInputModeSimplifyAlternate&&(this.setHalfEdgeUserIndex(h,this.m_tmpHalfEdgeOddEvenNumberIndex,1),this.setHalfEdgeUserIndex(a,this.m_tmpHalfEdgeOddEvenNumberIndex,1));const p=m===i.enumPolygon?Ye.c_EdgeBitMask:0;this.setHalfEdgeParentage_(h,_|p),this.setHalfEdgeParentage_(a,_|p)}}if(this.m_shape.hasCurves()){this.m_segmentIndexHe=this.createUserIndexForHalfEdges();for(let e=0,s=t.size();e<s;e++){const s=t.read(e);if(this.m_shape.getSegment(s)){const e=this.m_shape.getUserIndex(s,this.m_halfEdgeIndex);e!==c&&(this.setHalfEdgeUserIndex(e,this.m_segmentIndexHe,this.m_shape.getVertexIndex(s)),this.setHalfEdgeUserIndex(this.getHalfEdgeTwin(e),this.m_segmentIndexHe,-2))}}}}mergeVertexListsOfEdges_(e,t){{const s=this.getHalfEdgeVertexIterator(t);if(s!==c){const i=this.getHalfEdgeVertexIterator(e);this.m_clusterVertices.setField(s,1,i),this.setHalfEdgeVertexIterator_(e,s),this.setHalfEdgeVertexIterator_(t,c)}}const s=this.getHalfEdgeTwin(e),i=this.getHalfEdgeTwin(t);{const e=this.getHalfEdgeVertexIterator(i);if(e!==c){const t=this.getHalfEdgeVertexIterator(s);this.m_clusterVertices.setField(e,1,t),this.setHalfEdgeVertexIterator_(s,e),this.setHalfEdgeVertexIterator_(i,c)}}if(-1!==this.m_segmentIndexHe){let r=this.getHalfEdgeUserIndex(e,this.m_segmentIndexHe);if(-1!==r){if(-2===r){const s=this.getHalfEdgeUserIndex(t,this.m_segmentIndexHe);this.setHalfEdgeUserIndex(e,this.m_segmentIndexHe,s)}if(r=this.getHalfEdgeUserIndex(s,this.m_segmentIndexHe),-2===r){const e=this.getHalfEdgeUserIndex(i,this.m_segmentIndexHe);this.setHalfEdgeUserIndex(s,this.m_segmentIndexHe,e)}}}}sortHalfEdgesByAngle_(e){const t=[];for(let s=this.getFirstCluster();s!==c;s=this.getNextCluster(s)){t.length=0;const i=this.getClusterHalfEdge(s);if(i!==c){let r=i;do{t.push(r),r=this.getHalfEdgeNext(this.getHalfEdgeTwin(r))}while(r!==i);if(t.length>1){let r=!0;t.length>2?(t.sort(((e,t)=>this.compareEdgeAngles_(e,t))),t.push(t[0])):this.compareEdgeAnglesForPair_(t[0],t[1])>0?t[1]=ue(t[0],t[0]=t[1]):r=!1;let n=t[0],h=n,o=this.getHalfEdgeTo(h),a=this.getHalfEdgeTwin(h),m=c;for(let s=1,i=t.length;s<i;s++){const i=t[s],r=this.getHalfEdgeTwin(i),g=this.getHalfEdgeOrigin(r);if(g!==o||i===h)this.updateVertexToHalfEdgeConnection_(m,!1),m=c,h=i,o=g,a=r;else{if(e===De.enumInputModeBuildGraph){const e=this.getHalfEdgeParentageMask_(h)|this.getHalfEdgeParentageMask_(i);if(this.setHalfEdgeParentage_(h,e),this.setHalfEdgeParentage_(a,e),this.setHalfEdgeUserIndex(h,this.m_tmpHalfEdgeParentageIndex,this.getHalfEdgeUserIndex(h,this.m_tmpHalfEdgeParentageIndex)|this.getHalfEdgeUserIndex(i,this.m_tmpHalfEdgeParentageIndex)),this.setHalfEdgeUserIndex(a,this.m_tmpHalfEdgeParentageIndex,this.getHalfEdgeUserIndex(a,this.m_tmpHalfEdgeParentageIndex)|this.getHalfEdgeUserIndex(r,this.m_tmpHalfEdgeParentageIndex)),this.setHalfEdgeUserIndex(h,this.m_tmpHalfEdgeParentageIndexLeft,this.getHalfEdgeUserIndex(h,this.m_tmpHalfEdgeParentageIndexLeft)|this.getHalfEdgeUserIndex(i,this.m_tmpHalfEdgeParentageIndexLeft)),this.setHalfEdgeUserIndex(a,this.m_tmpHalfEdgeParentageIndexLeft,this.getHalfEdgeUserIndex(a,this.m_tmpHalfEdgeParentageIndexLeft)|this.getHalfEdgeUserIndex(r,this.m_tmpHalfEdgeParentageIndexLeft)),this.m_bBuildGeometryParentageSets){let e,t,s;e=this.getEdgeBitSet_(h),t=this.getEdgeBitSet_(i),s=new be({copy:e}),s.assignOr(t),this.setEdgeBitSet_(h,s),e=this.getEdgeBitSet_(a),t=this.getEdgeBitSet_(r),s=new be({copy:e}),s.assignOr(t),this.setEdgeBitSet_(a,s),e=this.getLeftEdgeBitSet_(h),t=this.getLeftEdgeBitSet_(i),s=new be({copy:e}),s.assignOr(t),this.setLeftEdgeBitSet_(h,s),e=this.getLeftEdgeBitSet_(a),t=this.getLeftEdgeBitSet_(r),s=new be({copy:e}),s.assignOr(t),this.setLeftEdgeBitSet_(a,s)}}else if(-1!==this.m_tmpHalfEdgeWindingNumberIndex){const e=this.getHalfEdgeUserIndex(h,this.m_tmpHalfEdgeWindingNumberIndex)+this.getHalfEdgeUserIndex(i,this.m_tmpHalfEdgeWindingNumberIndex),t=this.getHalfEdgeUserIndex(a,this.m_tmpHalfEdgeWindingNumberIndex)+this.getHalfEdgeUserIndex(r,this.m_tmpHalfEdgeWindingNumberIndex);this.setHalfEdgeUserIndex(h,this.m_tmpHalfEdgeWindingNumberIndex,e),this.setHalfEdgeUserIndex(a,this.m_tmpHalfEdgeWindingNumberIndex,t)}else if(-1!==this.m_tmpHalfEdgeOddEvenNumberIndex){const e=this.getHalfEdgeUserIndex(h,this.m_tmpHalfEdgeOddEvenNumberIndex)+this.getHalfEdgeUserIndex(i,this.m_tmpHalfEdgeOddEvenNumberIndex),t=this.getHalfEdgeUserIndex(a,this.m_tmpHalfEdgeOddEvenNumberIndex)+this.getHalfEdgeUserIndex(r,this.m_tmpHalfEdgeOddEvenNumberIndex);this.setHalfEdgeUserIndex(h,this.m_tmpHalfEdgeOddEvenNumberIndex,e),this.setHalfEdgeUserIndex(a,this.m_tmpHalfEdgeOddEvenNumberIndex,t)}this.mergeVertexListsOfEdges_(h,i),this.deleteEdgeImpl_(i),m=h,t[s]=c,i===n&&(t[0]=c,n=c)}}if(this.updateVertexToHalfEdgeConnection_(m,!1),m=c,!r){n=c;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(s!==c){n=s;break}}i!==n&&this.setClusterHalfEdge_(s,n);continue}n=c;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(s===c)continue;if(n===c){n=s,h=n,o=this.getHalfEdgeTo(h),a=this.getHalfEdgeTwin(h);continue}if(s===h)continue;const i=this.getHalfEdgeTwin(s),r=this.getHalfEdgeOrigin(i);this.setHalfEdgeNext_(a,s),this.setHalfEdgePrev_(s,a),h=s,o=r,a=i}this.setClusterHalfEdge_(s,n)}}}}sortHalfEdgesByAngle3D_(e){o(0)}buildChains_(e){this.m_universeChain=this.newChain_(),this.setChainHalfEdge_(this.m_universeChain,c);let t=this.m_universeChain;const s=this.createUserIndexForHalfEdges();for(let i=this.getFirstCluster();i!==c;i=this.getNextCluster(i)){const e=this.getClusterHalfEdge(i);if(e!==c){let i=e;do{if(1!==this.getHalfEdgeUserIndex(i,s)){const e=this.newChain_();this.setChainHalfEdge_(e,i),this.setChainPrev_(e,t),this.setChainNext_(t,e);let r=null;this.m_bBuildGeometryParentageSets&&(r=new be),t=e;let n=0,h=i;do{-1!==this.m_tmpHalfEdgeParentageIndex&&(n|=this.getHalfEdgeUserIndex(h,this.m_tmpHalfEdgeParentageIndex)),this.m_bBuildGeometryParentageSets&&r.assignOr(this.getEdgeBitSet_(h)),this.setHalfEdgeChain_(h,e),this.setHalfEdgeUserIndex(h,s,1),h=this.getHalfEdgeNext(h)}while(h!==i);this.m_bBuildGeometryParentageSets&&this.setChainBitSet_(e,r),this.setChainParentage_(e,n)}i=this.getHalfEdgeNext(this.getHalfEdgeTwin(i))}while(i!==e)}}this.m_chainAreas=new J(this.m_chainData.size(),Number.NaN),this.m_chainPerimeters=new J(this.m_chainData.size(),Number.NaN),this.setChainArea_(this.m_universeChain,Number.POSITIVE_INFINITY),this.setChainPerimeter_(this.m_universeChain,Number.POSITIVE_INFINITY),this.deleteUserIndexForHalfEdges(s)}simplify_(e){o(0)}simplifyAlternate_(){o(0)}simplifyWinding_(){o(0)}setEditShapeImpl_(e,t,s,i,r){this.removeShape(),this.m_bBuildChains=r,this.m_shape=e,this.m_geometryIDIndex=this.m_shape.createGeometryUserIndex();let n=this.m_shape.getTotalPointCount();if(s){n=0;for(let e=0,t=s.length;e<t;e++)n+=this.m_shape.getPointCount(s[e])}const h=new K(0);let o=0,a=0;{let e=null!=s?s[0]:this.m_shape.getFirstGeometry(),t=1;for(;e!==c;){this.m_shape.setGeometryUserIndex(e,this.m_geometryIDIndex,a++);for(let t=this.m_shape.getFirstPath(e);t!==c;t=this.m_shape.getNextPath(t)){let e=this.m_shape.getFirstVertex(t);for(let s=0,i=this.m_shape.getPathSize(t);s<i;s++)h.add(e),e=this.m_shape.getNextVertex(e)}g(this.m_shape.getGeometryType(e))||(o+=this.m_shape.getPathCount(e)),null!=s?(e=t<s.length?s[t]:c,t++):e=this.m_shape.getNextGeometry(e)}}this.m_universeGeomID=1<<Math.min(a,31),this.m_pointCount=h.size(),this.m_shape.sortVerticesSimpleByY(h,0,this.m_pointCount),this.m_clusterVertices.setCapacity(this.m_pointCount),this.progress_(i,!0),this.m_clusterData.setCapacity(this.m_pointCount+10),this.m_halfEdgeData.setCapacity(2*this.m_pointCount+32),this.m_chainData.setCapacity(Math.max(32,o)),this.m_clusterIndex=this.m_shape.createUserIndex();const m=_e.getNAN();let l=0;const d=_e.getNAN();for(let g=0;g<=this.m_pointCount;g++){if(g<this.m_pointCount){const e=h.read(g);this.m_shape.queryXY(e,d)}else d.setNAN();if(!m.isEqualPoint2D(d)){if(l<g){const e=this.newCluster_();let t=c,s=-1;for(let i=l;i<g;i++){s=h.read(i),this.m_shape.setUserIndex(s,this.m_clusterIndex,e);const r=this.m_clusterVertices.newElement();this.m_clusterVertices.setField(r,0,s),this.m_clusterVertices.setField(r,1,t),t=r;const n=this.m_shape.getPathFromVertex(s),o=this.m_shape.getGeometryFromPath(n),a=this.getGeometryID(o);this.setClusterParentage_(e,this.getClusterParentage(e)|a)}this.setClusterVertexIterator_(e,t),this.setClusterVertexIndex_(e,this.m_shape.getVertexIndex(s)),this.m_lastCluster!==c&&this.setNextCluster_(this.m_lastCluster,e),this.setPrevCluster_(e,this.m_lastCluster),this.m_lastCluster=e,this.m_firstCluster===c&&(this.m_firstCluster=e)}l=g,m.setCoordsPoint2D(d)}}if(this.m_shape.hasSegmentParentage()){-1===this.m_clusterBreakNodeIndex&&(this.m_clusterBreakNodeIndex=this.createUserIndexForClusters());for(let e=0;e<this.m_pointCount;e++){const t=h.read(e);if(this.m_shape.getSegmentParentageBreakVertex(t)){const e=this.getClusterFromVertex(t);this.setBreakNode(e,!0)}}}this.progress_(i,!0);{let e=null!=s?s[0]:this.m_shape.getFirstGeometry(),t=1;for(;e!==c;){for(let t=this.m_shape.getFirstPath(e);t!==c;t=this.m_shape.getNextPath(t)){if(this.m_shape.isStrongPathStart(t)){const e=this.m_shape.getFirstVertex(t),s=this.getClusterFromVertex(e);this.setStrongPathNode(s,!0)}if(this.m_shape.isStrongPathEnd(t)){const e=this.m_shape.isClosedPath(t)?this.m_shape.getFirstVertex(t):this.m_shape.getLastVertex(t),s=this.getClusterFromVertex(e);this.setStrongPathNode(s,!0)}}null!=s?(e=t<s.length?s[t]:c,t++):e=this.m_shape.getNextGeometry(e)}}if(t===De.enumInputModeBuildGraph&&(this.m_tmpHalfEdgeParentageIndex=this.createUserIndexForHalfEdges(),this.m_tmpHalfEdgeParentageIndexLeft=this.createUserIndexForHalfEdges()),t===De.enumInputModeSimplifyWinding&&(this.m_tmpHalfEdgeWindingNumberIndex=this.createUserIndexForHalfEdges()),t===De.enumInputModeSimplifyAlternate&&(this.m_tmpHalfEdgeOddEvenNumberIndex=this.createUserIndexForHalfEdges()),this.createHalfEdges_(t,h),this.dbgNavigate_(),this.sortHalfEdgesByAngle_(t),!Number.isNaN(this.m_checkDirtyPlanesweepTolerance)&&!this.checkStructureAfterDirtySweep_())return this.m_bDirtyCheckFailed=!0,void this.cleanSetEditShapeImpl_();this.buildChains_(t),-1!==this.m_tmpHalfEdgeParentageIndex&&(this.deleteUserIndexForHalfEdges(this.m_tmpHalfEdgeParentageIndex),this.m_tmpHalfEdgeParentageIndex=-1),this.m_bBuildChains&&this.planeSweepParentage_(t,i),-1!==this.m_tmpHalfEdgeParentageIndexLeft&&(this.deleteUserIndexForHalfEdges(this.m_tmpHalfEdgeParentageIndexLeft),this.m_tmpHalfEdgeParentageIndexLeft=-1),this.dbgChkChainParents_(),this.dbgDumpChains_(),this.mergeSegmentParentage_(),this.dbgNavigate_(),this.dbgDumpChains_(),this.cleanSetEditShapeImpl_()}setEditShapeImpl3D_(e,t,s,i,r){o(0)}cleanSetEditShapeImpl_(){-1!==this.m_tmpHalfEdgeParentageIndex&&(this.deleteUserIndexForHalfEdges(this.m_tmpHalfEdgeParentageIndex),this.m_tmpHalfEdgeParentageIndex=-1),-1!==this.m_tmpHalfEdgeParentageIndexLeft&&(this.deleteUserIndexForHalfEdges(this.m_tmpHalfEdgeParentageIndexLeft),this.m_tmpHalfEdgeParentageIndexLeft=-1),-1!==this.m_tmpHalfEdgeWindingNumberIndex&&(this.deleteUserIndexForHalfEdges(this.m_tmpHalfEdgeWindingNumberIndex),this.m_tmpHalfEdgeWindingNumberIndex=-1),-1!==this.m_tmpHalfEdgeOddEvenNumberIndex&&(this.deleteUserIndexForHalfEdges(this.m_tmpHalfEdgeOddEvenNumberIndex),this.m_tmpHalfEdgeOddEvenNumberIndex=-1)}cleanSetEditShapeImpl3D_(){o(0)}dbgNavigate_(){}dbgChkChainParents_(){}deleteEdgeImpl_(e){const t=this.getHalfEdgeNext(e),s=this.getHalfEdgePrev(e),i=this.getHalfEdgeTwin(e),r=this.getHalfEdgeNext(i),n=this.getHalfEdgePrev(i);t!==i&&(this.setHalfEdgeNext_(n,t),this.setHalfEdgePrev_(t,n)),s!==i&&(this.setHalfEdgeNext_(s,r),this.setHalfEdgePrev_(r,s));const h=this.getHalfEdgeOrigin(e);this.getClusterHalfEdge(h)===e&&(r!==e?this.setClusterHalfEdge_(h,r):this.setClusterHalfEdge_(h,c));const o=this.getHalfEdgeOrigin(i);this.getClusterHalfEdge(o)===i&&(t!==i?this.setClusterHalfEdge_(o,t):this.setClusterHalfEdge_(o,c)),this.m_halfEdgeData.deleteElement(e),this.m_halfEdgeData.deleteElement(i)}getLeftSkipPolylines_(e,t){let s=t;for(;;){if(s=e.getPrev(s),-1===s)return c;{const t=e.getElement(s);if(this.getHalfEdgeChain(t)!==this.getHalfEdgeChain(this.getHalfEdgeTwin(t)))return t}}}checkStructureAfterDirtySweep_(){const e=fe(this.m_checkDirtyPlanesweepTolerance),t=new _e,s=new _e,i=new _e,r=new _e,n=new _e;for(let h=this.getFirstCluster();h!==c;h=this.getNextCluster(h)){const o=this.getClusterHalfEdge(h);if(o!==c){let h=o;this.getHalfEdgeFromXY(h,t),this.getHalfEdgeToXY(h,s),i.setSub(s,t);let a=i.sqrLength();do{const o=h;if(h=this.getHalfEdgeNext(this.getHalfEdgeTwin(h)),h!==o){this.getHalfEdgeToXY(h,r),n.setSub(r,t);const o=n.sqrLength(),m=n.crossProduct(i),g=m*m/(o*a);if(Math.min(o,a)*g<=e){if(n.dotProduct(i)>=0)return!1}i.assign(n),a=o,s.assign(r)}}while(h!==o)}}return!0}extractPolygonPathFromChain_(e,t,s,i,r){const n=this.m_shape.hasSegmentParentage(),h=this.getChainHalfEdge(s);let o=h,a=c;const m=new $;do{const h=this.getHalfEdgeTwin(o);if(this.getHalfEdgeChain(h)!==s){let s=c;const h=this.getHalfEdgeOrigin(o);if(i===c){const e=this.getClusterVertexIterator(h);s=this.getVertexFromVertexIterator(e)}else for(let e=this.getClusterVertexIterator(h);e!==c;e=this.incrementVertexIterator(e)){const t=this.getVertexFromVertexIterator(e);s===c&&(s=t);const r=this.m_shape.getPathFromVertex(t);if(this.m_shape.getGeometryFromPath(r)===i){s=t;break}}let g;if(a===c&&(a=e.insertPath(t,c),e.setClosedPath(a,!0)),this.m_shape===e?g=e.addVertex(a,s):(this.m_shape.queryPoint(s,m),g=e.addPoint(a,m)),this.isHalfEdgeCurve(o)&&(this.querySegmentXY(o,r),e.setSegmentToIndex(e.getVertexIndex(g),r.get().clone())),n){const t=this.getSegmentParentage(o);e.setSegmentParentageAndBreak(g,t,this.isBreakNode(h))}}o=this.getHalfEdgeNext(o)}while(o!==h)}mergeSegmentParentage_(){if(!this.m_shape.hasSegmentParentage())return;o(-1!==this.m_clusterBreakNodeIndex),o(-1===this.m_segmentParentageIndex);for(let i=this.getFirstCluster();i!==c;i=this.getNextCluster(i)){let e=0;const t=this.getClusterHalfEdge(i);if(t!==c){let s=t;do{e++,s=this.getHalfEdgeNext(this.getHalfEdgeTwin(s))}while(s!==t&&e<3)}2!==e&&this.setBreakNode(i,!0)}let e=[],t=[];this.m_segmentParentageIndex=this.createUserIndexForHalfEdges();const s=this.createUserIndexForHalfEdges();for(let i=this.getFirstCluster();i!==c;i=this.getNextCluster(i)){const r=this.getClusterHalfEdge(i);if(r!==c){let i=!1,n=r;do{let r=n;for(;-1===this.getHalfEdgeUserIndex(r,s);){const n=this.getHalfEdgeNext(r),h=this.getHalfEdgeTwin(r);Re(this,r,t);const o=t.at(-1).parentage;if(!i){const t=this.getHalfEdgeOrigin(r);if(!this.isBreakNode(t)){const t=this.getHalfEdgePrev(r);r!==t&&(Re(this,t,e),i=!0)}}if(i&&!Oe(t,e)){const e=this.getHalfEdgeOrigin(r);this.setBreakNode(e,!0)}e=ue(t,t=e),i=!0;const a=this.getHalfEdgeOrigin(n);this.isBreakNode(a)&&(i=!1),this.setHalfEdgeUserIndex(r,this.m_segmentParentageIndex,o),this.setHalfEdgeUserIndex(h,this.m_segmentParentageIndex,o),this.setHalfEdgeUserIndex(r,s,1),this.setHalfEdgeUserIndex(h,s,1),r=n}n=this.getHalfEdgeNext(this.getHalfEdgeTwin(n))}while(n!==r)}}this.deleteUserIndexForHalfEdges(s)}registerNewBitSet(e){if(null===this.m_uniqueBitSets&&(this.m_uniqueBitSets=Le(),this.m_uniqueBitSets.add(this.getEmptySet())),null===e)return this.getEmptySet();return this.m_uniqueBitSets.has(e)?this.m_uniqueBitSets.get(e):(this.m_uniqueBitSets.add(e),e)}getLeftEdgeBitSet_(e){const t=this.getHalfEdgeUserIndex(e,this.m_edgeBitSetIndexLeft);return o(t>=0),o(this.m_edgeBitSets.at(t)),this.m_edgeBitSets.at(t)}getEdgeBitSet_(e){const t=this.getHalfEdgeUserIndex(e,this.m_edgeBitSetIndex);return o(t>=0),this.m_edgeBitSets.at(t)}setEdgeBitSet_(e,t){o(this.m_bBuildGeometryParentageSets),t=this.registerNewBitSet(t),-1===this.m_edgeBitSetIndex&&(this.m_edgeBitSetIndex=this.createUserIndexForHalfEdges());const s=this.getHalfEdgeUserIndex(e,this.m_edgeBitSetIndex);-1!==s?this.m_edgeBitSets[s]=t:(this.setHalfEdgeUserIndex(e,this.m_edgeBitSetIndex,this.m_edgeBitSets.length),this.m_edgeBitSets.push(t))}setLeftEdgeBitSet_(e,t){o(this.m_bBuildGeometryParentageSets),t=this.registerNewBitSet(t),-1===this.m_edgeBitSetIndexLeft&&(this.m_edgeBitSetIndexLeft=this.createUserIndexForHalfEdges());const s=this.getHalfEdgeUserIndex(e,this.m_edgeBitSetIndexLeft);-1!==s?this.m_edgeBitSets[s]=t:(this.setHalfEdgeUserIndex(e,this.m_edgeBitSetIndexLeft,this.m_edgeBitSets.length),this.m_edgeBitSets.push(t))}setChainBitSet_(e,t){o(this.m_bBuildGeometryParentageSets),t=this.registerNewBitSet(t),-1===this.m_chainBitSetIndex&&(this.m_chainBitSetIndex=this.createUserIndexForChains());const s=this.getChainUserIndex(e,this.m_chainBitSetIndex);-1!==s?this.m_chainBitSets[s]=t:(this.setChainUserIndex(e,this.m_chainBitSetIndex,this.m_chainBitSets.length),this.m_chainBitSets.push(t))}getEmptySet(){return this.m_emptyBitSet||(this.m_emptyBitSet=new be),this.m_emptyBitSet}deleteEdgeBitSets_(){-1!==this.m_edgeBitSetIndex&&(this.deleteUserIndexForHalfEdges(this.m_edgeBitSetIndex),this.m_edgeBitSetIndex=-1),-1!==this.m_edgeBitSetIndexLeft&&(this.deleteUserIndexForHalfEdges(this.m_edgeBitSetIndexLeft),this.m_edgeBitSetIndexLeft=-1),this.m_edgeBitSets.length=0,this.m_uniqueBitSets=null}deleteChainBitSets_(){-1!==this.m_chainBitSetIndex&&(this.deleteUserIndexForChains(this.m_chainBitSetIndex),this.m_chainBitSetIndex=-1,this.m_chainBitSets.length=0)}dbgPrintEdge_(e){}dbgVerifyEdgeSegment(e){}}function Me(e,t,s,i){s>0&&T(e,s,t,!1,i);new qe(i).executeImpl_(e,t)}function Xe(e,t,s){return{vertex0:e,vertex1:t,dir:s}}Ye.c_EdgeParentageMask=~(1<<31),Ye.c_EdgeBitMask=1<<31;class qe{constructor(e){this.m_shape=null,this.m_spikes=[],this.m_points=new K(0),this.m_pointsIndex=-1,this.m_dissolvedEdges=0,this.m_progressTracker=e}executeImpl_(e,t){if(this.m_shape=e,e.getPathCount(t)<2&&e.getPointCount(t)<6)return;this.m_points.resize(0);for(let o=e.getFirstPath(t);o!==c;o=e.getNextPath(o)){let t=e.getFirstVertex(o);for(let s=0,i=e.getPathSize(o);s<i;s++,t=e.getNextVertex(t))this.m_points.add(t)}this.m_pointsIndex=e.createUserIndex();for(let o=0,l=this.m_points.size();o<l;++o)e.setUserIndex(this.m_points.read(o),this.m_pointsIndex,o);e.sortVerticesSimpleByY(this.m_points,0,this.m_points.size());let s=this.m_points.read(0);const i=e.getXY(s);let r=1,n=0;const h=[];for(let o=1;o<this.m_points.size();o++){const t=this.m_points.read(o);if(t===c)continue;if(-1===e.getUserIndex(t,this.m_pointsIndex))continue;const a=e.getXY(t);if(a.isEqualPoint2D(i))r++;else{if(r>1){for(let t=n;t<o;t++){const s=this.m_points.read(t);if(-1===e.getUserIndex(s,this.m_pointsIndex))continue;const r=e.getNextVertex(s),n=e.getPrevVertex(s);if(s!==r&&!e.isEqualXYPoint2D(r,i)){const e=Xe(s,r,1);h.push(e)}if(s!==n&&n!==r&&!e.isEqualXYPoint2D(n,i)){const e=Xe(s,n,-1);h.push(e)}}h.length>0&&this.processBunch_(h,i)}s=t,i.assign(a),r=1,n=o}}if(0===this.m_dissolvedEdges)return e.removeUserIndex(this.m_pointsIndex),void(this.m_pointsIndex=-1);let a=e.getPointCount(t);for(let o=0;o<this.m_points.size();o++){const t=this.m_points.read(o);if(t===c)continue;if(-1!==e.getUserIndex(t,this.m_pointsIndex)){e.setUserIndex(t,this.m_pointsIndex,-1);continue}const s=e.getPathFromVertex(t);e.getFirstVertex(s)===t&&e.setFirstVertex(s,c),e.freeVertex(t),this.m_points.write(o,c),a--}const m=e.createPathUserIndex();let g=e.getPathCount(t);for(let l=0,d=this.m_points.size();l<d;++l){if(this.m_points.read(l)===c)continue;let s=this.m_points.read(l);if(-1!==e.getUserIndex(s,this.m_pointsIndex))continue;let i=e.getPathFromVertex(s),r=-1;if(2===e.getPathUserIndex(i,m)){i=c;for(let t=e.getNextVertex(s);t!==s;t=e.getNextVertex(t)){const r=e.getPathFromVertex(t);if(2!==e.getPathUserIndex(r,m)){i=r,s=t;break}}i===c&&(i=e.insertPath(t,c),e.setClosedPath(i,!0),g++),o(i!==c)}e.setPathUserIndex(i,m,2),r=e.getFirstVertex(i);let n=0,h=!1,a=s;do{r===a&&(h=!0),e.setUserIndex(a,this.m_pointsIndex,1);const t=e.getPathFromVertex(a);t!==i&&(2!==e.getPathUserIndex(t,m)&&(e.setPathUserIndex(t,m,1),e.setFirstVertex(t,c)),e.setPathToVertex(a,i)),n++,a=e.getNextVertex(a)}while(a!==s);h||e.setFirstVertex(i,s),e.setPathSize(i,n)}for(let o=e.getFirstPath(t);o!==c;){const t=e.getNextPath(o);1!==e.getPathUserIndex(o,m)&&e.getFirstVertex(o)!==c||(e.removePathOnly(o),g--),o=t}e.setGeometryVertexCount(t,a),e.setGeometryPathCount(t,g),e.removePathUserIndex(m),e.removeUserIndex(this.m_pointsIndex),this.m_pointsIndex=-1,e.dbgVerifyVertexCounts(),e.filterClosePoints(0,!0,!1,!1,t)}processBunch_(e,t){e.sort(((e,s)=>{const i=this.m_shape.getXY(e.vertex1).sub(t),r=this.m_shape.getXY(s.vertex1).sub(t),n=_e.compareVectors(i,r);return 0===n?e.dir<s.dir?-1:1:n}));let s=0;const i=this.m_shape.getXY(e[0].vertex1);let r=1;const n=this.m_shape.hasCurves();for(let h=1,o=e.length;h<o;h++){const t=this.m_shape.getXY(e[h].vertex1);if(!(t.isEqualPoint2D(i)&&(r++,h+1<o))){if(2===r){const t=e[s],i=e[s+1],r=t.dir;if(r!==i.dir){let e=!0;if(n&&(e=!this.m_shape.isCurve(1===t.dir?t.vertex0:t.vertex1)&&!this.m_shape.isCurve(1===i.dir?i.vertex0:i.vertex1)),e){if(1===r){const e=t.vertex0,s=i.vertex0;this.m_shape.setNextVertex(e,s),this.m_shape.setPrevVertex(s,e),this.m_shape.getPrevVertex(e)===s&&(this.m_shape.setUserIndex(e,this.m_pointsIndex,-1),this.m_shape.setUserIndex(s,this.m_pointsIndex,-1));const r=t.vertex1,n=i.vertex1;this.m_shape.setPrevVertex(r,n),this.m_shape.setNextVertex(n,r),this.m_shape.getNextVertex(r)===n&&(this.m_shape.setUserIndex(r,this.m_pointsIndex,-1),this.m_shape.setUserIndex(n,this.m_pointsIndex,-1))}else{const e=t.vertex0,s=i.vertex0;this.m_shape.setPrevVertex(e,s),this.m_shape.setNextVertex(s,e),this.m_shape.getNextVertex(e)===s&&(this.m_shape.setUserIndex(e,this.m_pointsIndex,-1),this.m_shape.setUserIndex(s,this.m_pointsIndex,-1));const r=t.vertex1,n=i.vertex1;this.m_shape.setNextVertex(r,n),this.m_shape.setPrevVertex(n,r),this.m_shape.getPrevVertex(r)===n&&(this.m_shape.setUserIndex(r,this.m_pointsIndex,-1),this.m_shape.setUserIndex(n,this.m_pointsIndex,-1))}this.m_dissolvedEdges+=2}}}i.assign(t),s=h,r=1}}e.length=0}}function ze(e,t,s,i,r){const n=new Ke(r);return n.m_shape=e,n.m_geometry=t,n.m_sortedVertices=s,n.m_bFixSelfTangency=i,n.fixRingOrientation_()}function We(e,t,s){const i=new Ke(s);return i.m_shape=e,i.m_geometry=t,i.m_sortedVertices=null,i.m_bFixSelfTangency=!1,i.fixRingOrientationForMp2sp_()}class Ze{getDirection_(e){return this.m_shape.getNextVertex(this.getEnd1(e))===this.getEnd2(e)}getEnd_(e){const t=this.getEnd1(e),s=this.getEnd2(e);return this.m_shape.getNextVertex(t)===s?s:t}constructor(e){this.m_end1Nodes=[],this.m_end2Nodes=[],this.m_directions=[],this.m_shape=e,this.m_firstFree=-1}getSegment(e){return this.m_shape.getSegment(this.getStart(e))}isBottomUp(e){let t=this.getEnd1(e),s=this.getEnd2(e);this.m_shape.getPrevVertex(t)===s&&(s=ue(t,t=s));const i=_e.getNAN(),r=_e.getNAN();return this.m_shape.queryXY(t,i),this.m_shape.queryXY(s,r),o(!i.equals(r)),i.y<r.y}getStart(e){const t=this.getEnd1(e),s=this.getEnd2(e);return this.m_shape.getNextVertex(t)===s?t:s}getEnd1(e){return this.m_end1Nodes[e]}getEnd2(e){return this.m_end2Nodes[e]}freeEdge(e){this.m_end1Nodes[e]=this.m_firstFree,this.m_firstFree=e}newEdge(e){if(-1!==this.m_firstFree){const t=this.m_firstFree;return this.m_firstFree=this.m_end1Nodes[t],this.m_end1Nodes[t]=e,this.m_end2Nodes[t]=this.m_shape.getNextVertex(e),t}const t=this.m_end1Nodes.length;return this.m_end1Nodes.push(e),this.m_end2Nodes.push(this.m_shape.getNextVertex(e)),t}getShape(){return this.m_shape}getPath(e){return this.m_shape.getPathFromVertex(this.getEnd1(e))}}let je=class extends le{constructor(e){super(),this.m_line1=new S,this.m_line2=new S,this.m_leftElm=-1,this.m_leftx=0,this.m_seg1=null,this.m_helper=e}compare(e,t,s){const i=e.getElement(s),r=this.m_helper.m_edges;let n;if(this.m_leftElm===t)n=this.m_leftx;else{if(this.m_seg1=r.getSegment(t),this.m_seg1)n=this.m_seg1.intersectionOfYMonotonicWithAxisX(this.m_helper.m_yScanline,0);else{r.getShape().queryLineConnector(r.getStart(t),this.m_line1,!0),this.m_seg1=this.m_line1,n=this.m_line1.intersectionOfYMonotonicWithAxisX(this.m_helper.m_yScanline,0)}this.m_leftx=n,this.m_leftElm=t}let h,o=r.getSegment(i);if(o)h=o.intersectionOfYMonotonicWithAxisX(this.m_helper.m_yScanline,0);else{r.getShape().queryLineConnector(r.getStart(i),this.m_line2,!0),o=this.m_line2,h=this.m_line2.intersectionOfYMonotonicWithAxisX(this.m_helper.m_yScanline,0)}if(n===h){const e=r.isBottomUp(t),s=r.isBottomUp(i),a=e?this.m_seg1.getEndY():this.m_seg1.getStartY(),m=s?o.getEndY():o.getStartY(),g=Math.min(a,m);let l=.5*(g+this.m_helper.m_yScanline);l===this.m_helper.m_yScanline&&(l=g),n=this.m_seg1.intersectionOfYMonotonicWithAxisX(l,0),h=o.intersectionOfYMonotonicWithAxisX(l,0),n===h&&_("")}return n<h?-1:n>h?1:0}reset(){this.m_leftElm=-1}};class Qe{constructor(e){this.m_node=-1,this.m_index=0,this.m_sortedVertices=e.m_sortedVertices,this.m_sortedVerticesArray=e.m_sortedVerticesArray,this.m_sortedVertices&&(this.m_node=this.m_sortedVertices.getFirst(this.m_sortedVertices.getFirstList()))}next(){if(this.m_sortedVertices){const e=this.m_node;if(-1===e)return c;const t=this.m_sortedVertices.getData(e);return this.m_node=this.m_sortedVertices.getNext(e),t}if(this.m_index<this.m_sortedVerticesArray.size()){const e=this.m_sortedVerticesArray.read(this.m_index);return this.m_index++,e}return c}}class Ke{constructor(e){this.m_edges=null,this.m_shape=null,this.m_AET=new ee,this.m_yScanline=0,this.m_geometry=c,this.m_unknownRingOrientationCount=-1,this.m_sortedVertices=null,this.m_sortedVerticesArray=null,this.m_unknownNodes=[],this.m_node1UserIndex=-1,this.m_node2UserIndex=-1,this.m_pathOrientationIndex=-1,this.m_pathParentageIndex=-1,this.m_pathParentsIndex=-1,this.m_progressCounter=0,this.m_bFixSelfTangency=!1,this.m_progressTracker=e,this.m_AET.disableBalancing(),this.m_sweepComparator=new je(this),this.m_AET.setComparator(this.m_sweepComparator)}fixRingOrientation_(){const e=this.fixRingOrientationImplMain_();return-1===this.m_pathOrientationIndex||this.fixRingOrientationImplSimplify_(),e}fixRingOrientationForMp2sp_(){return this.fixRingOrientationImplMain_(),-1===this.m_pathOrientationIndex?-1:this.fixRingOrientationImplMp2sp_()}processBunchForRingOrientationTest_(e){return this.processBunchForRingOrientationTestOddEven_(e)}processBunchForRingOrientationTestOddEven_(e){let t=!1;if(this.m_edges||(this.m_edges=new Ze(this.m_shape)),this.m_unknownNodes.length=0,this.processBunchForRingOrientationRemoveEdges_(e),!this.m_AET.isAutoBalancing()){let t=0;for(let s=0,i=e.length;s<i;s++){-1!==e[s]&&t++}(t>10||this.m_AET.getMaxDepthEver()>4)&&this.m_AET.enableBalancing()}for(let s=0,i=e.length;s<i;s++){const t=e[s];t!==c&&this.insertEdge_(t,-1)}for(let s=0;s<this.m_unknownNodes.length&&this.m_unknownRingOrientationCount>0;s++){const e=this.m_unknownNodes[s],i=this.m_AET.getElement(e),r=this.m_edges.getPath(i),n=this.m_shape.getPathUserIndex(r,this.m_pathOrientationIndex);let h=c;if(0===n){let s=this.m_AET.getPrev(e),i=e,r=!1;for(;s!==ee.st_nullNode();){const e=this.m_AET.getElement(s),t=this.m_edges.getPath(e);if(0!==this.m_shape.getPathUserIndex(t,this.m_pathOrientationIndex)){h=t;break}i=s,s=this.m_AET.getPrev(s)}if(s===ee.st_nullNode())r=!0,s=i;else{const e=this.m_AET.getElement(s);r=this.m_edges.isBottomUp(e),s=this.m_AET.getNext(s),r=!r}do{const e=this.m_AET.getElement(s),n=this.m_edges.getPath(e);if(0===this.m_shape.getPathUserIndex(n,this.m_pathOrientationIndex)){if(r!==this.m_edges.isBottomUp(e)){const e=this.m_shape.getFirstVertex(n);this.m_shape.reverseRingInternal(e),this.m_shape.setLastVertex(n,this.m_shape.getPrevVertex(e)),t=!0}if(this.m_shape.setPathUserIndex(n,this.m_pathOrientationIndex,r?3:2),!r){let e=this.m_shape.getPathUserIndex(h,this.m_pathOrientationIndex);2===e?(h=this.m_shape.getPathUserIndex(h,this.m_pathParentsIndex),e=this.m_shape.getPathUserIndex(h,this.m_pathOrientationIndex),o(3===e)):o(3===e);const t=this.m_shape.getPathUserIndex(h,this.m_pathParentageIndex);this.m_shape.setPathUserIndex(h,this.m_pathParentageIndex,n),this.m_shape.setPathUserIndex(n,this.m_pathParentageIndex,t),this.m_shape.setPathUserIndex(n,this.m_pathParentsIndex,h)}if(this.m_unknownRingOrientationCount--,!this.m_unknownRingOrientationCount)return t}h=n,i=s,s=this.m_AET.getNext(s),r=!r}while(i!==e)}}return t}processBunchForRingOrientationRemoveEdges_(e){for(let t=0,s=e.length;t<s;t++){const s=e[t],i=this.m_shape.getUserIndex(s,this.m_node1UserIndex),r=this.m_shape.getUserIndex(s,this.m_node2UserIndex);if(-1!==i){const e=this.m_AET.getElement(i);this.m_edges.freeEdge(e),this.m_shape.setUserIndex(s,this.m_node1UserIndex,-1)}if(-1!==r){const e=this.m_AET.getElement(r);this.m_edges.freeEdge(e),this.m_shape.setUserIndex(s,this.m_node2UserIndex,-1)}let n=-1;-1!==i&&-1!==r?(this.m_AET.deleteNode(i),this.m_AET.deleteNode(r),e[t]=c):n=-1!==i?i:r,-1!==n&&(this.insertEdge_(s,n)||this.m_AET.deleteNode(n),e[t]=c)}}dbgVerifyRingOrientation_(){}insertEdge_(e,t){const s=_e.getNAN(),i=_e.getNAN();this.m_shape.queryXY(e,s);const r=this.m_shape.getNextVertex(e);this.m_shape.queryXY(r,i);let n=!1;if(s.y<i.y){n=!0;const s=this.m_edges.newEdge(e);let i;-1===t?i=this.m_AET.addElement(s):(i=t,this.m_AET.setElement(i,s));-1===this.m_shape.getUserIndex(r,this.m_node1UserIndex)?this.m_shape.setUserIndex(r,this.m_node1UserIndex,i):this.m_shape.setUserIndex(r,this.m_node2UserIndex,i);const h=this.m_shape.getPathFromVertex(e);0===this.m_shape.getPathUserIndex(h,this.m_pathOrientationIndex)&&this.m_unknownNodes.push(i)}const h=this.m_shape.getPrevVertex(e);if(this.m_shape.queryXY(h,i),s.y<i.y){n=!0;const s=this.m_edges.newEdge(h);let i;-1===t?i=this.m_AET.addElement(s):(i=t,this.m_AET.setElement(i,s));-1===this.m_shape.getUserIndex(h,this.m_node1UserIndex)?this.m_shape.setUserIndex(h,this.m_node1UserIndex,i):this.m_shape.setUserIndex(h,this.m_node2UserIndex,i);const r=this.m_shape.getPathFromVertex(e);0===this.m_shape.getPathUserIndex(r,this.m_pathOrientationIndex)&&this.m_unknownNodes.push(i)}return n}fixRingSelfTangency_(){const e=[],t=[];let s=-1,i=-1;const r=new _e;let n=c,h=c,a=-1;const m=new Qe(this);for(let o=m.next();o!==c;o=m.next()){const m=new _e;this.m_shape.queryXY(o,m);const g=this.m_shape.getPathFromVertex(o);if(r.equals(m)&&h===g){if(-1===i&&(s=this.m_shape.createPathUserIndex(),this.m_shape.fillPathUserIndexForGeometry(this.m_geometry,s,-1),i=this.m_shape.createUserIndex(),this.m_shape.fillUserIndexForGeometry(this.m_geometry,i,-1)),-1===a){a=t.length,this.m_shape.setUserIndex(n,i,a),t.push(1);-1===this.m_shape.getPathUserIndex(g,s)&&(this.m_shape.setPathUserIndex(g,s,n),e.push(g))}this.m_shape.setUserIndex(o,i,a),t[t.length-1]++}else a=-1,r.assign(m);n=o,h=g}if(0===e.length)return!1;o(-1!==s);for(let o=0,g=e.length;o<g;o++){const r=e[o];let n=this.m_shape.getPathUserIndex(r,s);const h=this.m_shape.getUserIndex(n,i),a=[],m=[];a.push(n),m.push(h);for(let e=this.m_shape.getNextVertex(n);e!==n;e=this.m_shape.getNextVertex(e)){const s=e,r=this.m_shape.getUserIndex(s,i);if(-1!==r){if(0===m.length){m.push(r),a.push(s);continue}if(m.at(-1)===r){const h=a.at(-1);this.m_shape.peelALoopIntoAPath(h,s),this.m_shape.setUserIndex(e,i,-1),t[r]--,1===t[r]&&(t[r]=0,m.pop(),a.pop()),n=h,e=h}else a.push(e),m.push(r)}}}return this.m_shape.removePathUserIndex(s),this.m_shape.removeUserIndex(i),this.m_shape.dbgVerifyVertexCounts(),!0}progress_(e=!1){}fixRingOrientationImplMain_(){const e={stack:[],error:void 0,hasError:!1};try{let t,s=!1;const i=Ve(e,xe((()=>{this.m_sortedVerticesArray=null})),!1);if(null===this.m_sortedVertices){const e=this.m_shape.getPointCount(this.m_geometry);t=new K(0);for(let s=this.m_shape.getFirstPath(this.m_geometry);s!==c;s=this.m_shape.getNextPath(s)){let e=this.m_shape.getFirstVertex(s);for(let i=0,r=this.m_shape.getPathSize(s);i<r;i++)t.add(e),e=this.m_shape.getNextVertex(e)}this.m_shape.sortVerticesSimpleByY(t,0,e),this.progress_(!0),this.m_sortedVerticesArray=t}else i.bForget=!0;if(this.m_bFixSelfTangency&&(s=this.fixRingSelfTangency_()),1===this.m_shape.getPathCount(this.m_geometry)){const e=this.m_shape.getFirstPath(this.m_geometry),t=this.m_shape.getRingArea(e);if(this.m_shape.setExterior(e,!0),t<0){const t=this.m_shape.getFirstVertex(e);return this.m_shape.reverseRingInternal(t),this.m_shape.setLastVertex(e,this.m_shape.getPrevVertex(t)),!0}return!1}this.m_shape.dbgVerifyCurves(),this.m_pathOrientationIndex=this.m_shape.createPathUserIndex(),this.m_pathParentageIndex=this.m_shape.createPathUserIndex(),this.m_pathParentsIndex=this.m_shape.createPathUserIndex();for(let e=this.m_shape.getFirstPath(this.m_geometry);e!==c;e=this.m_shape.getNextPath(e))this.m_shape.setPathUserIndex(e,this.m_pathOrientationIndex,0),this.m_shape.setPathUserIndex(e,this.m_pathParentageIndex,-1),this.m_shape.setPathUserIndex(e,this.m_pathParentsIndex,-1);const r=[];this.m_yScanline=Number.NaN;const n=_e.getNAN();this.m_unknownRingOrientationCount=this.m_shape.getPathCount(this.m_geometry),this.m_node1UserIndex=this.m_shape.createUserIndexUninitialized(),this.m_shape.fillUserIndexForGeometry(this.m_geometry,this.m_node1UserIndex,-1),this.m_node2UserIndex=this.m_shape.createUserIndexUninitialized(),this.m_shape.fillUserIndexForGeometry(this.m_geometry,this.m_node2UserIndex,-1);const h=new Qe(this);for(let e=h.next();e!==c&&(this.progress_(),this.m_shape.queryXY(e,n),n.y!==this.m_yScanline&&r.length&&(s=this.processBunchForRingOrientationTest_(r)||s,this.m_sweepComparator.reset(),r.length=0),r.push(e),this.m_yScanline=n.y,0!==this.m_unknownRingOrientationCount);e=h.next());return this.m_unknownRingOrientationCount>0&&(s=this.processBunchForRingOrientationTest_(r)||s,r.length=0),this.m_shape.removeUserIndex(this.m_node1UserIndex),this.m_shape.removeUserIndex(this.m_node2UserIndex),this.dbgVerifyRingOrientation_(),s}catch(t){e.error=t,e.hasError=!0}finally{ve(e)}}fixRingOrientationImplSimplify_(){const e=[];for(let t=this.m_shape.getFirstPath(this.m_geometry);t!==c;)if(this.progress_(),3===this.m_shape.getPathUserIndex(t,this.m_pathOrientationIndex)){this.m_shape.setExterior(t,!0);for(let r=this.m_shape.getPathUserIndex(t,this.m_pathParentageIndex);r!==c;){const s=this.m_shape.getPathUserIndex(r,this.m_pathParentageIndex);e.push(r),this.m_shape.setExterior(r,!1),this.m_shape.setPathUserIndex(r,this.m_pathParentageIndex,t),r=s}let s=t,i=e.length;for(let e=this.m_shape.getNextPath(t);i>0&&e!==c;e=this.m_shape.getNextPath(e),--i){if(this.m_shape.getPathUserIndex(e,this.m_pathParentageIndex)!==t){s=c;break}s=e}if(0!==i){s=t;for(let t=0,i=e.length;t<i;t++){const i=e[t];this.m_shape.setPathUserIndex(i,this.m_pathParentageIndex,te),this.m_shape.movePath(this.m_geometry,this.m_shape.getNextPath(s),i),s=i}}e.length=0,t=this.m_shape.getNextPath(s)}else t=this.m_shape.getNextPath(t);this.m_shape.removePathUserIndex(this.m_pathOrientationIndex),this.m_shape.removePathUserIndex(this.m_pathParentageIndex),this.m_shape.removePathUserIndex(this.m_pathParentsIndex)}fixRingOrientationImplMp2sp_(){const e=this.m_shape.createPathUserIndex();let t=0;const s=[];for(let i=this.m_shape.getFirstPath(this.m_geometry);i!==c;)if(this.progress_(),3===this.m_shape.getPathUserIndex(i,this.m_pathOrientationIndex)){this.m_shape.setExterior(i,!0),this.m_shape.setPathUserIndex(i,e,t),t++;for(let e=this.m_shape.getPathUserIndex(i,this.m_pathParentageIndex);e!==c;){const t=this.m_shape.getPathUserIndex(e,this.m_pathParentageIndex);s.push(e),this.m_shape.setExterior(e,!1),this.m_shape.setPathUserIndex(e,this.m_pathParentageIndex,i),e=t}let r=i,n=s.length,h=t;for(let t=this.m_shape.getNextPath(i);n>0&&t!==c;t=this.m_shape.getNextPath(t),--n){if(this.m_shape.getPathUserIndex(t,this.m_pathParentageIndex)!==i){r=c;break}r=t,this.m_shape.setPathUserIndex(t,e,-h),h++}if(0!==n){r=i,h=t;for(let t=0,i=s.length;t<i;t++){const i=s[t];this.m_shape.setPathUserIndex(i,e,-h),h++,this.m_shape.setPathUserIndex(i,this.m_pathParentageIndex,te)}r=i}t=h,s.length=0,i=this.m_shape.getNextPath(r)}else i=this.m_shape.getNextPath(i);return this.m_shape.removePathUserIndex(this.m_pathOrientationIndex),this.m_shape.removePathUserIndex(this.m_pathParentageIndex),this.m_shape.removePathUserIndex(this.m_pathParentsIndex),e}}function Je(e,t,s,i,r,n){const h=new $e(n);return h.m_shape=e,h.m_geometry=t,h.m_knownSimpleResult=s,h.m_bFixSelfTangency=i,h.m_polylineDegeneracies=r,h.m_bHasSegmentParentage=e.hasSegmentParentage(),h.m_bHasSegments=e.hasCurves(),h.simplify_()}class $e{constructor(e){this.m_shape=null,this.m_geometry=c,this.m_sortedVertices=new re,this.m_bunchEdgeEndPoints=[],this.m_bunchEdgeCenterPoints=[],this.m_bunchEdgeIndices=[],this.m_knownSimpleResult=-1,this.m_sortedVerticesListIndex=-1,this.m_polylineDegeneracies=c,this.m_userIndexSortedIndexToVertex=-1,this.m_userIndexSortedAngleIndexToVertex=-1,this.m_nextVertexToProcess=-1,this.m_firstCoincidentVertex=-1,this.m_progressCounter=0,this.m_bFixSelfTangency=!1,this.m_bHasSegmentParentage=!1,this.m_bHasSegments=!1,this.m_progressTracker=e}compareAngles_(e,t){if(this.m_bHasSegments)return this.compareAnglesCurves_(e,t);const s=this.m_bunchEdgeEndPoints[e],i=new _e;this.m_shape.queryXY(s,i);const r=new _e,n=this.m_bunchEdgeEndPoints[t];if(this.m_shape.queryXY(n,r),i.equals(r))return 0;const h=this.m_bunchEdgeCenterPoints[e],o=new _e;this.m_shape.queryXY(h,o);const a=this.m_bunchEdgeCenterPoints[t],m=new _e;this.m_shape.queryXY(a,m);const g=new _e;g.setSub(i,o);const l=new _e;l.setSub(r,m),(g.isZero()||l.isZero())&&_("");return _e.compareVectors(g,l)}compareAnglesCurves_(e,t){const s=this.m_bunchEdgeEndPoints[e],i=this.m_bunchEdgeEndPoints[t],r=this.m_bunchEdgeCenterPoints[e],n=this.m_bunchEdgeCenterPoints[t],h=this.m_shape.getNextVertex(r)===s,o=this.m_shape.getNextVertex(n)===i,a=new f,m=new _e;h?(this.m_shape.querySegment(r,a,!1,!0),m.assign(a.get().getTangent(0))):(this.m_shape.querySegment(s,a,!1,!0),m.assign(a.get().getTangent(1)),m.negateThis());const g=new _e;o?(this.m_shape.querySegment(n,a,!1,!0),g.assign(a.get().getTangent(0))):(this.m_shape.querySegment(i,a,!1,!0),g.assign(a.get().getTangent(1)),g.negateThis()),(m.isZero()||g.isZero())&&_("");return _e.compareVectors(m,g)}beforeRemoveVertex_(e,t){const s=this.m_shape.getUserIndex(e,this.m_userIndexSortedIndexToVertex);if(this.m_nextVertexToProcess===s&&(this.m_nextVertexToProcess=this.m_sortedVertices.getNext(this.m_nextVertexToProcess)),this.m_firstCoincidentVertex===s&&(this.m_firstCoincidentVertex=this.m_sortedVertices.getNext(this.m_firstCoincidentVertex)),this.m_sortedVertices.deleteElement(this.m_sortedVerticesListIndex,s),this.removeAngleSortInfo_(e),t){const t=this.m_shape.getPathFromVertex(e);if(t!==c){if(this.m_shape.getFirstVertex(t)===e){const s=this.m_shape.getNextVertex(e);if(s!==e){if(this.m_shape.getPathFromVertex(s)===t)return void this.m_shape.setFirstVertex(t,s);{const s=this.m_shape.getPrevVertex(e);if(s!==e){if(this.m_shape.getPathFromVertex(s)===t)return void this.m_shape.setFirstVertex(t,s)}}}this.m_shape.setFirstVertex(t,c),this.m_shape.setLastVertex(t,c)}}}}processBunch_(){let e=!1;const t=new _e(0,0);for(;;){this.m_bunchEdgeEndPoints.length=0,this.m_bunchEdgeCenterPoints.length=0,this.m_bunchEdgeIndices.length=0;let s=this.m_firstCoincidentVertex,i=0,r=!0;for(;s!==this.m_nextVertexToProcess;){const e=this.m_sortedVertices.getData(s);r&&(this.m_shape.queryXY(e,t),r=!1);const n=this.m_shape.getPrevVertex(e),h=this.m_shape.getNextVertex(e);this.m_shape.getUserIndex(n,this.m_userIndexSortedAngleIndexToVertex)!==te&&(this.m_bunchEdgeEndPoints.push(n),this.m_shape.setUserIndex(n,this.m_userIndexSortedAngleIndexToVertex,te),this.m_bunchEdgeCenterPoints.push(e),this.m_bunchEdgeIndices.push(i++));this.m_shape.getUserIndex(h,this.m_userIndexSortedAngleIndexToVertex)!==te&&(this.m_bunchEdgeEndPoints.push(h),this.m_shape.setUserIndex(h,this.m_userIndexSortedAngleIndexToVertex,te),this.m_bunchEdgeCenterPoints.push(e),this.m_bunchEdgeIndices.push(i++)),s=this.m_sortedVertices.getNext(s)}if(this.m_bunchEdgeEndPoints.length<2){1===this.m_bunchEdgeEndPoints.length&&this.m_shape.setUserIndex(this.m_bunchEdgeEndPoints[0],this.m_userIndexSortedAngleIndexToVertex,-1);break}this.m_bunchEdgeIndices.sort(((e,t)=>this.compareAngles_(e,t)));for(let e=0,t=this.m_bunchEdgeIndices.length;e<t;e++){const t=this.m_bunchEdgeIndices[e],s=this.m_bunchEdgeEndPoints[t];this.m_shape.setUserIndex(s,this.m_userIndexSortedAngleIndexToVertex,e)}const n=this.processCrossOvers_(t);for(let e=0,t=this.m_bunchEdgeIndices.length;e<t;e++){const t=this.m_bunchEdgeIndices[e];if(-1===t)continue;const s=this.m_bunchEdgeEndPoints[t];this.m_shape.setUserIndex(s,this.m_userIndexSortedAngleIndexToVertex,-1)}if(!n)break;e=!0}return e}processCrossOvers_(e){let t=!1,s=!0;for(;s;){s=!1;let i=0;-1===this.m_bunchEdgeIndices[i]&&(i=this.getNextEdgeIndex_(i));let r=this.getNextEdgeIndex_(i);for(let n=0,h=this.m_bunchEdgeIndices.length;n<h&&-1!==i&&-1!==r&&i!==r;n++){const n=this.m_bunchEdgeIndices[i],h=this.m_bunchEdgeIndices[r],o=this.m_bunchEdgeEndPoints[n],a=this.m_bunchEdgeEndPoints[h];let m=this.m_shape.getNextVertex(o),g=!1;this.m_shape.isEqualXYPoint2D(m,e)||(m=this.m_shape.getPrevVertex(o),g=!0);let l=this.m_shape.getNextVertex(a),d=!1;this.m_shape.isEqualXYPoint2D(l,e)||(l=this.m_shape.getPrevVertex(a),d=!0);const _=g?this.m_shape.getPrevVertex(m):this.m_shape.getNextVertex(m),p=d?this.m_shape.getPrevVertex(l):this.m_shape.getNextVertex(l);let u=!1;(this.removeSpike_(m)||this.removeSpike_(l)||this.removeSpike_(o)||this.removeSpike_(a)||this.removeSpike_(_)||this.removeSpike_(p))&&(u=!0),m!==l&&(!u&&this.m_shape.isEqualXY(o,a)&&(u=this.resolveOverlap_(g,d,m,o,l,a)),!u&&this.m_shape.isEqualXY(_,p)&&(u=this.resolveOverlap_(!g,!d,m,_,l,p)),!u&&this.m_shape.isEqualXY(o,p)&&(u=this.resolveOverlap_(g,!d,m,o,l,p)),!u&&this.m_shape.isEqualXY(_,a)&&(u=this.resolveOverlap_(!g,d,m,_,l,a))),u&&(t=!0),s||=u,i=u?this.getNextEdgeIndex_(i):r,r=this.getNextEdgeIndex_(i)}}if(!t){let s=0;-1===this.m_bunchEdgeIndices[s]&&(s=this.getNextEdgeIndex_(s));let i=this.getNextEdgeIndex_(s);for(let r=0,n=this.m_bunchEdgeIndices.length;r<n&&-1!==s&&-1!==i&&s!==i;r++){const r=this.m_bunchEdgeIndices[s],n=this.m_bunchEdgeIndices[i],h=this.m_bunchEdgeEndPoints[r],o=this.m_bunchEdgeEndPoints[n];let a=this.m_shape.getNextVertex(h);this.m_shape.isEqualXYPoint2D(a,e)||(a=this.m_shape.getPrevVertex(h));let m=this.m_shape.getNextVertex(o);this.m_shape.isEqualXYPoint2D(m,e)||(m=this.m_shape.getPrevVertex(o));const g=this.getDirection_(a,h),l=this.getDirection_(m,o),d=g?this.m_shape.getPrevVertex(a):this.m_shape.getNextVertex(a),_=l?this.m_shape.getPrevVertex(m):this.m_shape.getNextVertex(m),p=this.detectAndResolveCrossOver_(g,l,h,a,d,o,m,_);1!==p?0===p?(s=this.getNextEdgeIndex_(s),i=this.getNextEdgeIndex_(s)):(s=this.getPrevEdgeIndex_(s),i=this.getNextEdgeIndex_(s)):t=!0}}return t}simplify_(){if(this.m_shape.getGeometryType(this.m_geometry)===i.enumPolygon&&1===this.m_shape.getFillRule(this.m_geometry)){new Et(this.m_progressTracker).planarSimplifyNoCrackingAndCluster(this.m_bFixSelfTangency,this.m_shape,this.m_geometry,0)}let e=!1;this.m_userIndexSortedIndexToVertex=-1,this.m_userIndexSortedAngleIndexToVertex=-1,this.m_userIndexSortedAngleIndexToVertex=this.m_shape.createUserIndexUninitialized();const t=this.m_shape.getPointCount(this.m_geometry),s=new K(0);this.m_shape.dbgVerifyMonotone();for(let i=this.m_shape.getFirstPath(this.m_geometry);i!==c;i=this.m_shape.getNextPath(i)){let e=this.m_shape.getFirstVertex(i);for(let t=0,r=this.m_shape.getPathSize(i);t<r;t++)this.m_shape.setUserIndex(e,this.m_userIndexSortedAngleIndexToVertex,-1),s.add(e),e=this.m_shape.getNextVertex(e)}this.m_shape.sortVerticesSimpleByY(s,0,t),this.progress_(!0),this.m_userIndexSortedIndexToVertex=this.m_shape.createUserIndexUninitialized(),this.m_sortedVertices.reserveNodes(t),this.m_sortedVerticesListIndex=this.m_sortedVertices.createList(0);for(let i=0;i<t;i++){const e=s.read(i),t=this.m_sortedVertices.addElement(this.m_sortedVerticesListIndex,e);this.m_shape.setUserIndex(e,this.m_userIndexSortedIndexToVertex,t)}this.m_nextVertexToProcess=-1,this.cleanupSpikes_()&&(e=!0);let r=0,h=!1;do{h=!1,this.m_nextVertexToProcess=-1,this.m_firstCoincidentVertex=this.m_sortedVertices.getFirst(this.m_sortedVerticesListIndex);const t=new _e(0,0);this.m_firstCoincidentVertex!==re.st_nullNode()&&this.m_shape.queryXY(this.m_sortedVertices.getData(this.m_firstCoincidentVertex),t);let s=0,i=this.m_firstCoincidentVertex;for(;i!==re.st_nullNode()&&(i=this.m_sortedVertices.getNext(i),i!==re.st_nullNode());){this.progress_();const e=this.m_sortedVertices.getData(i),r=_e.getNAN();if(this.m_shape.queryXY(e,r),t.equals(r))s++;else{if(s>0){this.m_nextVertexToProcess=i;const e=this.processBunch_();i=this.m_nextVertexToProcess,i!==re.st_nullNode()&&this.m_shape.queryXY(this.m_sortedVertices.getData(i),r),e&&(h=!0)}t.setCoordsPoint2D(r),this.m_firstCoincidentVertex=i,s=0}}if(this.m_nextVertexToProcess=-1,s>0){this.processBunch_()&&(h=!0)}r++>10&&n(""),h&&this.fixOrphanVertices_(),this.cleanupSpikes_()&&(h=!0),e||=h}while(h);return this.m_shape.dbgVerifyMonotone(),this.m_shape.dbgVerifyCurves(),this.m_shape.removeUserIndex(this.m_userIndexSortedIndexToVertex),this.m_shape.removeUserIndex(this.m_userIndexSortedAngleIndexToVertex),e=ze(this.m_shape,this.m_geometry,this.m_sortedVertices,this.m_bFixSelfTangency,this.m_progressTracker)||e,this.m_shape.dbgVerifyCurves(),e}getDirection_(e,t){return this.m_shape.getNextVertex(t)!==e}detectAndResolveCrossOver_(e,t,s,i,r,n,h,o){if(i===h)return this.removeAngleSortInfo_(s),this.removeAngleSortInfo_(n),-1;const a=this.m_shape.getUserIndex(s,this.m_userIndexSortedAngleIndexToVertex),m=this.m_shape.getUserIndex(r,this.m_userIndexSortedAngleIndexToVertex),g=this.m_shape.getUserIndex(n,this.m_userIndexSortedAngleIndexToVertex),l=this.m_shape.getUserIndex(o,this.m_userIndexSortedAngleIndexToVertex),d=new Array(8),_=new Array(4);d[0]=0,_[0]=a,d[1]=0,_[1]=m,d[2]=1,_[2]=g,d[3]=1,_[3]=l;for(let u=1;u<4;u++){const e=_[u],t=d[u];let s=u-1;for(;s>=0&&_[s]>e;)_[s+1]=_[s],d[s+1]=d[s],s--;_[s+1]=e,d[s+1]=t}let p=0;if(d[0]&&(p|=1),d[1]&&(p|=2),d[2]&&(p|=4),d[3]&&(p|=8),5!==p&&10!==p)return 0;if(e!==t&&(o=ue(n,n=o)),e)this.m_shape.setNextVertex(o,i),this.m_shape.setPrevVertex(i,o),this.m_shape.setNextVertex(r,h),this.m_shape.setPrevVertex(h,r),this.m_bHasSegmentParentage&&(this.m_shape.setSegmentParentageBreakVertex(i,!0),this.m_shape.setSegmentParentageBreakVertex(h,!0));else{if(this.m_shape.setPrevVertex(o,i),this.m_shape.setNextVertex(i,o),this.m_shape.setPrevVertex(r,h),this.m_shape.setNextVertex(h,r),this.m_bHasSegmentParentage){const e=this.m_shape.getSegmentParentage(i),t=this.m_shape.getSegmentParentage(h);this.m_shape.setSegmentParentageAndBreak(i,t,!0),this.m_shape.setSegmentParentageAndBreak(h,e,!0)}if(this.m_bHasSegments){const e=this.m_shape.getVertexIndex(i),t=this.m_shape.getVertexIndex(h),s=this.m_shape.getSegmentFromIndex(e);this.m_shape.setSegmentToIndex(e,null);const r=this.m_shape.getSegmentFromIndex(t);this.m_shape.setSegmentToIndex(t,null),this.m_shape.setSegmentToIndex(e,r),this.m_shape.setSegmentToIndex(t,s)}}return 1}resolveOverlap_(e,t,s,i,r,n){return this.resolveOverlapOddEven_(e,t,s,i,r,n)}resolveOverlapOddEven_(e,t,s,i,r,n){if(e!==t){e||(r=ue(s,s=r),n=ue(i,i=n));const t=this.m_shape.getNextVertex(r),h=this.m_shape.getNextVertex(s);if(this.m_shape.setNextVertex(s,t),this.m_shape.setPrevVertex(t,s),this.m_shape.setNextVertex(r,h),this.m_shape.setPrevVertex(h,r),this.m_bHasSegments){const e=this.m_shape.getVertexIndex(s),t=this.m_shape.getVertexIndex(r),i=this.m_shape.getSegmentFromIndex(e);this.m_shape.setSegmentToIndex(e,null);const n=this.m_shape.getSegmentFromIndex(t);this.m_shape.setSegmentToIndex(t,null),this.m_shape.setSegmentToIndex(e,n),this.m_shape.setSegmentToIndex(t,i)}if(this.m_bHasSegmentParentage){const e=this.m_shape.getSegmentParentage(s),t=this.m_shape.getSegmentParentage(r);this.m_shape.setSegmentParentageAndBreak(s,t,!0),this.m_shape.setSegmentParentageAndBreak(r,e,!0),this.m_shape.setSegmentParentageBreakVertex(i,!0),this.m_shape.setSegmentParentageBreakVertex(n,!0)}this.removeSpike_(r)}else{const h=e?s:i,o=t?r:n,a=e?i:s,m=t?n:r;let g=null;if(this.m_bHasSegments){const e=this.m_shape.getVertexIndex(m);g=this.m_shape.getSegmentFromIndex(e),this.m_shape.setSegmentToIndex(e,null);const t=this.m_shape.getVertexIndex(o);this.m_shape.setSegmentToIndex(t,null);const s=this.m_shape.getVertexIndex(h);this.m_shape.setSegmentToIndex(s,null)}let l=-1;this.m_bHasSegmentParentage&&(l=this.m_shape.getSegmentParentage(m));let d=!1;this.m_shape.setNextVertex(h,o),this.m_shape.setNextVertex(o,h),this.m_shape.setPrevVertex(a,m),this.m_shape.setPrevVertex(m,a);let _=m;for(;_!==o;){const e=this.m_shape.getPrevVertex(_),t=this.m_shape.getNextVertex(_);if(this.m_shape.setPrevVertex(_,t),this.m_shape.setNextVertex(_,e),d||=_===h,this.m_bHasSegments&&_!==h){const e=this.m_shape.getVertexIndex(t),s=g;g=this.m_shape.getSegmentFromIndex(e),null!==s&&s.reverse(),this.m_shape.setSegmentToIndex(e,s)}if(this.m_bHasSegmentParentage){const e=this.m_shape.getSegmentParentage(t);this.m_shape.setSegmentParentagePreserveBreak(t,l),l=e}_=t}let p=null;if(!d){const e=this.m_shape.getPrevVertex(o),t=this.m_shape.getNextVertex(o);if(this.m_shape.setPrevVertex(o,t),this.m_shape.setNextVertex(o,e),this.m_bHasSegments){const e=this.m_shape.getVertexIndex(o);p=this.m_shape.getSegmentFromIndex(e),this.m_shape.setSegmentToIndex(e,null)}}let u=-1,c=-1;if(this.m_bHasSegmentParentage&&(u=d?this.m_shape.getSegmentParentage(h):this.m_shape.getSegmentParentage(o),c=this.m_shape.getSegmentParentage(a)),this.transferVertexData_(o,h),this.beforeRemoveVertex_(o,!0),this.m_shape.removeVertexInternal(o,!0),this.removeAngleSortInfo_(h),this.transferVertexData_(m,a),this.beforeRemoveVertex_(m,!0),this.m_shape.removeVertexInternal(m,!0),this.removeAngleSortInfo_(a),this.m_bHasSegmentParentage&&(this.m_shape.setSegmentParentageAndBreak(h,u,!0),this.m_shape.setSegmentParentageAndBreak(a,c,!0)),p){const e=this.m_shape.getVertexIndex(h);this.m_shape.setSegmentToIndex(e,p)}}return!0}cleanupSpikes_(){let e=!1;for(let t=this.m_shape.getFirstPath(this.m_geometry);t!==c;){const s=this.m_shape.getNextPath(t);let i=this.m_shape.getFirstVertex(t);for(let r=0,n=this.m_shape.getPathSize(t);r<n&&n>1;){this.progress_();const{v:s,bModified:h}=this.checkAndCleanupSpike_(t,i);if(s===c)break;h?(e=!0,i=s,r=0,n=this.m_shape.getPathSize(t)):(i=s,r++)}t=s}return e}checkAndCleanupSpike_(e,t){const s={v:c,bModified:!1};let i=this.m_shape.getPrevVertex(t),r=this.m_shape.getNextVertex(t),n=c,h=c;for(;this.m_shape.isEqualXY(i,r)&&(n=i,h=r,r!==t);)i=this.m_shape.getPrevVertex(i),r=this.m_shape.getNextVertex(r);if(n===c)return s.v=r,s;s.bModified=!0;for(let o=this.m_shape.getNextVertex(n);this.beforeRemoveVertex_(o,!1),o!==h;o=this.m_shape.getNextVertex(o));if(n===t)return this.m_polylineDegeneracies!==c?this.m_shape.movePath(this.m_polylineDegeneracies,c,e):this.m_shape.removePath(e),s.v=c,s;{const e=this.m_shape.peelALoopIntoAPath(n,h);this.m_polylineDegeneracies!==c?this.m_shape.movePath(this.m_polylineDegeneracies,c,e):this.m_shape.removePath(e)}return s.v=n,s}removeSpike_(e){let t=this.m_shape.getPrevVertex(e),s=this.m_shape.getNextVertex(e),i=c,r=c;for(;this.m_shape.isEqualXY(t,s)&&(i=t,r=s,s!==e);)t=this.m_shape.getPrevVertex(t),s=this.m_shape.getNextVertex(s);if(i===c)return!1;if(this.m_shape.peelALoop(i,r),this.m_bHasSegmentParentage&&(this.m_shape.setSegmentParentageBreakVertex(i,!0),this.m_shape.setSegmentParentageBreakVertex(r,!0)),this.removeAngleSortInfo_(i),this.m_polylineDegeneracies===c)for(let n=this.m_shape.getNextVertex(r);;){const e=this.m_shape.getNextVertex(n);if(this.removeAngleSortInfo_(n),this.beforeRemoveVertex_(n,!0),this.m_shape.setSegmentToIndex(this.m_shape.getVertexIndex(n),null),this.m_shape.removeVertexInternal(n,!1),n===r)break;n=e}else{for(let t=r;;){const e=this.m_shape.getNextVertex(t);if(this.removeAngleSortInfo_(t),this.beforeRemoveVertex_(t,!1),t=e,t===r)break}const e=[!1];this.m_shape.insertClosedPath(this.m_polylineDegeneracies,c,r,r,e)}return!0}fixOrphanVertices_(){let e=0;for(let i=this.m_sortedVertices.getFirst(this.m_sortedVertices.getFirstList());-1!==i;i=this.m_sortedVertices.getNext(i)){const e=this.m_sortedVertices.getData(i);this.m_shape.setPathToVertex(e,c)}let t=0;for(let i=this.m_shape.getFirstPath(this.m_geometry);i!==c;){const s=this.m_shape.getFirstVertex(i);if(s===c||this.m_shape.getPathFromVertex(s)!==c){const e=i;i=this.m_shape.getNextPath(i),this.m_shape.removePathOnly(e);continue}this.m_shape.setPathToVertex(s,i);let r=1;for(let e=this.m_shape.getNextVertex(s);e!==s;e=this.m_shape.getNextVertex(e))this.m_shape.setPathToVertex(e,i),r++;this.m_shape.setRingAreaValid(i,!1),this.m_shape.setPathSize(i,r),this.m_shape.setLastVertex(i,this.m_shape.getPrevVertex(s)),t+=r,e++,i=this.m_shape.getNextPath(i)}for(let i=this.m_sortedVertices.getFirst(this.m_sortedVertices.getFirstList());-1!==i;i=this.m_sortedVertices.getNext(i)){const s=this.m_sortedVertices.getData(i);if(this.m_shape.getPathFromVertex(s)!==c)continue;const r=[!1],n=this.m_shape.insertClosedPath(this.m_geometry,c,s,s,r);t+=this.m_shape.getPathSize(n),e++}this.m_shape.setGeometryPathCount(this.m_geometry,e),this.m_shape.setGeometryVertexCount(this.m_geometry,t);let s=0;for(let i=this.m_shape.getFirstGeometry();i!==c;i=this.m_shape.getNextGeometry(i))s+=this.m_shape.getPointCount(i);this.m_shape.setTotalPointCount(s)}getNextEdgeIndex_(e){if(-1===e)return-1;for(let t=0,s=this.m_bunchEdgeIndices.length-1;t<s;t++)if(e=(e+1)%this.m_bunchEdgeIndices.length,-1!==this.m_bunchEdgeIndices[e])return e;return-1}getPrevEdgeIndex_(e){if(-1===e)return-1;for(let t=0,s=this.m_bunchEdgeIndices.length-1;t<s;t++)if(e=(this.m_bunchEdgeIndices.length+e-1)%this.m_bunchEdgeIndices.length,-1!==this.m_bunchEdgeIndices[e])return e;return-1}transferVertexData_(e,t){const s=this.m_shape.getUserIndex(t,this.m_userIndexSortedIndexToVertex),i=this.m_shape.getUserIndex(t,this.m_userIndexSortedAngleIndexToVertex);this.m_shape.transferAllDataToTheVertex(e,t),this.m_shape.setUserIndex(t,this.m_userIndexSortedIndexToVertex,s),this.m_shape.setUserIndex(t,this.m_userIndexSortedAngleIndexToVertex,i)}removeAngleSortInfo_(e){const t=this.m_shape.getUserIndex(e,this.m_userIndexSortedAngleIndexToVertex);-1!==t&&(this.m_bunchEdgeIndices[t]=-1,this.m_shape.setUserIndex(e,this.m_userIndexSortedAngleIndexToVertex,-1))}progress_(e=!1){}}var et=a,tt=h,st=r;function it(e){switch(e){case 1:return 1;case 2:return 2;case 3:return 3;case 4:return 4;case 0:return 0;default:o(0,"unrecognized cut side")}return 3}function rt(){return{unsplitBehavior:0,allCrossRoadsImpassable:!1,ogcRule:!1}}function nt(e,t,s,i){return new Et(i).autoCompleteImpl(e,t,s)}function ht(e,t,s,r,n,h,o){const a=new Et(n);a.m_bOGCOutput=!0;const m=e.getGeometryType()===i.enumPolygon&&1===e.getFillRule()&&!Z(r);return a.planarSimplifyImpl_(e,t,m,s,r,n,h,o)}function ot(e,t,s,i,r,n,h,o){return new Et(n).planarSimplifyImpl_(e,t,s,i,r,n,h,o)}function at(e,t,s,i){const r=new Et(i),n=new u,h=n.addGeometry(t),a=r.planarSimplifyNoCrackingAndCluster(e,n,h,s);o(a,"planar_simplify_no_cracking_and_cluster");return n.getGeometry(h)}function mt(e,t,s,i,r,n,h){return o(0),{}}function gt(e,t,s,i){return o(0),{}}function lt(e,t,s){return yt(e,t,s)}function dt(e,t,s,r){if(e.isEmpty()||t.isEmpty()||e.getDimension()>t.getDimension())return St(Ct(e),e,t,"-");const n=new de;e.queryEnvelope(n);const h=new de;t.queryEnvelope(h);const o=new de;o.setCoords({env2D:n}),o.mergeEnvelope2D(h);const a=Y(s,o,!0),m=h.clone(),g=z(a);if(m.inflateCoords(g,g),!n.isIntersecting(m))return St(Ct(e),e,t,"-");const l=new Et(r),d=new u,_=d.addGeometry(Ct(e)),p=d.addGeometry(Ct(t));let c=0,f=0,x=null;if(d.hasCurves()){x=new F;const e=d.getEnvelope2D(r);f=C(a.total());const t=G(a.total(),e);c=b(t,f),H(d,t,a.total(),12e3,x,null,r)}l.setEditShapeCrackAndCluster(d,a.add(c));const I=l.difference(_,p);null!==x&&x.stitchCurves(d,I,f,!0);const E=St(d.getGeometry(I),e,t,"-");return et(E.getGeometryType())&&(E.getImpl().setIsSimple(4,a.total()),E.getGeometryType()===i.enumPolygon&&E.getImpl().updateOGCFlagsProtected()),E}function _t(e,t,s,r){if(e.getDimension()>t.getDimension())return St(Ct(e),e,t,"^");if(e.getDimension()<t.getDimension())return St(Ct(t),e,t,"^");if(e.isEmpty())return St(Ct(t),e,t,"^");if(t.isEmpty())return St(Ct(e),e,t,"^");const n=new de;e.queryEnvelope(n);const h=new de;t.queryEnvelope(h);const o=new de;o.setCoords({env2D:n}),o.mergeEnvelope2D(h);const a=Y(s,o,!0),m=new Et(r),g=new u,l=g.addGeometry(Ct(e)),d=g.addGeometry(Ct(t));let _=0,p=null;if(g.hasCurves()){p=new F;const e=g.getEnvelope2D(r);_=C(a.total());const t=G(a.total(),e);H(g,t,a.total(),12e3,p,null,r)}m.setEditShapeCrackAndCluster(g,a);const c=m.symmetricDifference(l,d);null!==p&&p.stitchCurves(g,c,_,!0);const f=St(g.getGeometry(c),e,t,"^");return et(f.getGeometryType())&&(f.getImpl().setIsSimple(4,a.total()),f.getGeometryType()===i.enumPolygon&&f.getImpl().updateOGCFlagsProtected()),f}function pt(e,t,s){return Pt(e,t,s,!0)}function ut(e,t,s){return e.isEmpty()||t.isEmpty()?e.createInstance():B(s,e,t)?new $({copy:A(e,t)}):e.createInstance()}function ct(e,t,s,r){const n=de.constructEmpty();e.queryEnvelope(n);const h=de.constructEmpty();t.queryEnvelope(h);const o=de.constructEmpty();o.setCoords({env2D:n}),o.mergeEnvelope2D(h);const a=Y(s,o,!0),m=new de(h),g=z(a);if(m.inflateCoords(g,g),!n.isIntersecting(m)){if(e.getDimension()<=t.getDimension())return St(Ct(e.createInstance()),e,t,"&");if(e.getDimension()>t.getDimension())return St(Ct(t.createInstance()),e,t,"&")}const l=new Et(r),d=new u,_=d.addGeometry(Ct(e)),p=d.addGeometry(Ct(t));let c=0,f=0,x=null;if(d.hasCurves()){x=new F;const e=d.getEnvelope2D(r);f=C(a.total());const t=G(a.total(),e);c=b(t,f),H(d,t,a.total(),12e3,x,null,r)}l.setEditShapeCrackAndCluster(d,a.add(c));const I=l.intersection(_,p);null!==x&&x.stitchCurves(d,I,f,!0);const E=St(d.getGeometry(I),e,t,"&");return et(E.getGeometryType())&&(E.getImpl().setIsSimple(4,a.total()),E.getGeometryType()===i.enumPolygon&&E.getImpl().updateOGCFlagsProtected()),E}function ft(e,t,s,r){const n=new Array(3),h=de.constructEmpty();e.queryEnvelope(h);const o=de.constructEmpty();t.queryEnvelope(o);const a=de.constructEmpty();a.setCoords({env2D:h}),a.mergeEnvelope2D(o);const m=Y(s,a,!0),g=new de(o),l=z(m);if(g.inflateCoords(l,l),!h.isIntersecting(g)){if(e.getDimension()<=t.getDimension()){const s=St(Ct(e.createInstance()),e,t,"&");return n[s.getDimension()]=s,n}if(e.getDimension()>t.getDimension()){const s=St(Ct(t.createInstance()),e,t,"&");return n[s.getDimension()]=s,n}}const d=new Et(r),_=new u,p=_.addGeometry(Ct(e)),c=_.addGeometry(Ct(t));let f=0,x=0,I=null;if(_.hasCurves()){I=new F;const e=_.getEnvelope2D(r);x=C(m.total());const t=G(m.total(),e);f=b(t,x),H(_,t,m.total(),12e3,I,null,r)}d.setEditShapeCrackAndCluster(_,m.add(f)),_.dbgVerifyCurves();const E=d.intersectionEx(p,c);for(const u of E){null!==I&&I.stitchCurves(_,u,x,!1);const s=St(_.getGeometry(u),e,t,"&");et(s.getGeometryType())&&(s.getImpl().setIsSimple(4,m.total()),s.getGeometryType()===i.enumPolygon&&s.getImpl().updateOGCFlagsProtected()),n[s.getDimension()]=s}return null!==I&&I.clearStitcher(_),n}function xt(e,t,i,r,n,h=!1){0===t&&s("not enough geometries to dissolve");let o=0;for(let s=0,u=t;s<u;s++)o=Math.max(e[s].getDimension(),o);if(2===o||1===o)return new Et(r).dissolveMultiPaths_(o,!1,e,t,i,n,h);let a=0,m=-1;for(let s=0,u=t;s<u;s++)e[s].getDimension()===o&&(-1===m&&(m=s),e[s].isEmpty()||(m=s,a++));if(a<2)return Ct(e[m]);const g=L.constructEmpty(),l=new u;let d=c;for(let s=0,u=t;s<u;s++)if(e[s].getDimension()===o&&!e[s].isEmpty()){d===c?d=l.addGeometry(Ct(e[s])):l.appendGeometry(d,Ct(e[s]));const t=L.constructEmpty();e[s].queryLooseEnvelope(t),g.mergeEnv3D(t)}const _=Y(i,g.getEnvelope2D(),!0),p=new Et(r);if(h){const e=M(i,g.getEnvelopeZs(),!0);return p.planarSimplify3DImpl_(l,_,e,0,!0)}return p.m_bOGCOutput=!0,p.planarSimplifyMultiPoints(l,_,!1,-1)}function It(e,t,i,r,n,h=!1){t<2&&s("not enough geometries to dissolve");let o=0;for(let s=0,u=t;s<u;s++)o=Math.max(e[s].getDimension(),o);if(2===o||1===o)return new Et(r).dissolveMultiPaths_(o,!0,e,t,i,n,h);const a=L.constructEmpty(),m=new u;let g=c,l=0,d=-1;for(let s=0,u=t;s<u;s++)if(e[s].getDimension()===o&&(-1===d&&(d=s),!e[s].isEmpty())){d=s,g===c?g=m.addGeometry(Ct(e[s])):m.appendGeometry(g,Ct(e[s]));const t=L.constructEmpty();e[s].queryLooseEnvelope(t),a.mergeEnv3D(t),l++}if(l<2)return Ct(e[d]);const _=0===o?i:null,p=Y(_,a.getEnvelope2D(),!0),f=new Et(r);if(h){const e=M(_,a.getEnvelopeZs(),!0);return f.m_bOGCOutput=!0,f.planarSimplify3DImpl_(m,p,e,0,!0)}return f.planarSimplifyMultiPoints(m,p,!0,-1)}class Et{constructor(e){this.m_topoGraph=null,this.m_maskLookup=[],this.m_dummyPt1=_e.getNAN(),this.m_dummyPt2=_e.getNAN(),this.m_fromEdgeForPolylines=c,this.m_progressCounter=0,this.m_bOGCOutput=!1,this.m_progressTracker=e}linesToPolygonsImpl(t,s){let i=0,r=0,n=null;if(t.hasCurves()){n=new F;const e=t.getEnvelope2D(this.m_progressTracker);r=C(s.total());const h=G(s.total(),e);i=b(h,r),H(t,h,s.total(),12e3,n,null,this.m_progressTracker)}this.setEditShapeCrackAndCluster(t,s.add(i));const h=this.m_topoGraph.createUserIndexForChains(),o=this.m_topoGraph.getFirstChain();this.m_topoGraph.setChainUserIndex(o,h,1);for(let e=this.m_topoGraph.getChainFirstIsland(o);e!==c;e=this.m_topoGraph.getChainNextInParent(e))this.m_topoGraph.setChainUserIndex(e,h,1);const a=[];for(let e=this.m_topoGraph.getFirstChain();e!==c;e=this.m_topoGraph.getChainNext(e)){if(1===this.m_topoGraph.getChainUserIndex(e,h))continue;this.m_topoGraph.setChainUserIndex(e,h,1);for(let t=this.m_topoGraph.getChainFirstIsland(e);t!==c;t=this.m_topoGraph.getChainNextInParent(t))this.m_topoGraph.setChainUserIndex(t,h,1);if(0===this.m_topoGraph.getChainArea(e))continue;const s=this.m_topoGraph.extractPolygonFromChainAndIslands(t,c,e,c);null!=n&&n.stitchCurves(t,s,r,!1);const i=t.getGeometry(s);a.push(i)}return new e(a)}autoCompleteImpl(t,s,i){let r=0,n=0,h=null;if(t.hasCurves()){h=new F;const e=t.getEnvelope2D(this.m_progressTracker);n=C(i.total());const s=G(i.total(),e);r=b(s,n),H(t,s,i.total(),12e3,h,null,this.m_progressTracker)}this.setEditShapeCrackAndCluster(t,i.add(r));const o=this.m_topoGraph.getGeometryID(s),a=this.m_topoGraph.createUserIndexForChains(),m=this.m_topoGraph.getFirstChain();this.m_topoGraph.setChainUserIndex(m,a,1);for(let e=this.m_topoGraph.getChainFirstIsland(m);e!==c;e=this.m_topoGraph.getChainNextInParent(e))this.m_topoGraph.setChainUserIndex(e,a,1);const g=[];for(let e=this.m_topoGraph.getFirstChain();e!==c;e=this.m_topoGraph.getChainNext(e)){if(1===this.m_topoGraph.getChainUserIndex(e,a))continue;this.m_topoGraph.setChainUserIndex(e,a,1);for(let t=this.m_topoGraph.getChainFirstIsland(e);t!==c;t=this.m_topoGraph.getChainNextInParent(t))this.m_topoGraph.setChainUserIndex(t,a,1);if(0!==this.m_topoGraph.getChainParentage(e))continue;const s=this.m_topoGraph.getChainHalfEdge(e);let i=s,r=!1;do{const t=this.m_topoGraph.getHalfEdgeTwin(i);if(this.m_topoGraph.getHalfEdgeChain(t)!==e&&this.m_topoGraph.getHalfEdgeParentage(i)&o){r=!0;break}i=this.m_topoGraph.getHalfEdgeNext(i)}while(i!==s);if(!r)continue;if(0===this.m_topoGraph.getChainArea(e))continue;const m=this.m_topoGraph.extractPolygonFromChainAndIslands(t,c,e,c);null!==h&&h.stitchCurves(t,m,n,!1);const l=t.getGeometry(m);g.push(l)}return new e(g)}setEditShape(e,t=!1){null===this.m_topoGraph&&(this.m_topoGraph=new Ye),this.m_topoGraph.setEditShape(e,this.m_progressTracker,!0,t)}setEditShapeCrackAndCluster(e,t){V(e,t,this.m_progressTracker,!0,!1);for(let s=e.getFirstGeometry();s!==c;s=e.getNextGeometry(s))e.getGeometryType(s)===i.enumPolygon&&Je(e,s,-1,this.m_bOGCOutput,c,this.m_progressTracker);this.setEditShape(e)}setHalfEdgeOrientations_(e,t){const s=this.m_topoGraph.getShape();for(let i=s.getFirstGeometry();i!==c;i=s.getNextGeometry(i))if(i===t)for(let t=s.getFirstPath(i);t!==c;t=s.getNextPath(t)){let i=s.getFirstVertex(t);if(i===c)continue;let r=s.getNextVertex(i);for(;r!==c;){const t=this.m_topoGraph.getClusterFromVertex(i),n=this.m_topoGraph.getClusterFromVertex(r),h=this.m_topoGraph.getHalfEdgeConnector(t,n);if(h!==c){const t=this.m_topoGraph.getHalfEdgeTwin(h);this.m_topoGraph.setHalfEdgeUserIndex(h,e,1),this.m_topoGraph.setHalfEdgeUserIndex(t,e,2)}i=r,r=s.getNextVertex(i)}}}flushVertices_(e,t){const s=this.m_topoGraph.getShape(),i=s.hasSegmentParentage(),r=new f,n=s.insertPath(e,c);t.push(t[0]);const h=t.length;let o=c;for(let a=0;a<h;a++){const e=t[a];if(o=s.addVertex(n,e),!i)continue;const m=this.m_topoGraph.getClusterFromVertex(e);if(a>0&&this.m_topoGraph.isBreakNode(m)&&s.setSegmentParentageBreakVertex(o,!0),a<h-1){const e=this.m_topoGraph.getHalfEdgeConnector(m,this.m_topoGraph.getClusterFromVertex(t[a+1])),i=this.m_topoGraph.getSegmentParentage(e);s.setSegmentParentageAndBreak(o,i,a>0||this.m_topoGraph.isBreakNode(m)),this.m_topoGraph.isHalfEdgeCurve(e)&&(this.m_topoGraph.querySegmentXY(e,r),s.setSegmentToIndex(s.getVertexIndex(o),r.get().clone()))}}if(i){const e=this.m_topoGraph.getClusterFromVertex(t[h-1]);this.m_topoGraph.isBreakNode(e)&&s.setSegmentParentageBreakVertex(o,!0)}s.setClosedPath(n,!0)}processPolygonCuts_(e,t,s,r){const n=this.m_topoGraph.getGeometryID(s),h=this.m_topoGraph.getGeometryID(r),o=[],a=this.m_topoGraph.getShape(),m=this.m_topoGraph.createUserIndexForHalfEdges();for(let g=this.m_topoGraph.getFirstCluster();g!==c;g=this.m_topoGraph.getNextCluster(g)){const s=this.m_topoGraph.getClusterHalfEdge(g);if(s===c)continue;let r=s;do{if(1!==this.m_topoGraph.getHalfEdgeUserIndex(r,m)){let s=r,g=r,l=!1,d=0;do{if(this.m_topoGraph.setHalfEdgeUserIndex(s,m,1),!l){if(this.m_topoGraph.getHalfEdgeParentage(s)&h){this.m_topoGraph.getHalfEdgeFaceParentage(s)&n&&(g=s,l=!0)}}if(l){const t=this.m_topoGraph.getHalfEdgeOrigin(s),i=this.m_topoGraph.getClusterVertexIterator(t),r=this.m_topoGraph.getVertexFromVertexIterator(i);if(o.push(r),-1!==e){if(this.m_topoGraph.getHalfEdgeParentage(s)&h){d|=this.m_topoGraph.getHalfEdgeUserIndex(s,e)}}}s=this.m_topoGraph.getHalfEdgeNext(s)}while(s!==g);if(l&&this.m_topoGraph.getChainArea(this.m_topoGraph.getHalfEdgeChain(g))>0){const e=a.createGeometry(i.enumPolygon);this.flushVertices_(e,o),-1!==t&&a.setGeometryUserIndex(e,t,d)}o.length=0}r=this.m_topoGraph.getHalfEdgeNext(this.m_topoGraph.getHalfEdgeTwin(r))}while(r!==s)}this.m_topoGraph.deleteUserIndexForHalfEdges(m)}cutPolygonPolyline_(e,t,s,i){this.m_topoGraph.removeSpikes_();let r=-1;-1!==e&&(r=this.m_topoGraph.createUserIndexForHalfEdges(),this.setHalfEdgeOrientations_(r,s)),this.processPolygonCuts_(r,e,t,s),-1!==r&&(this.m_topoGraph.deleteUserIndexForHalfEdges(r),r=-1);const n=this.m_topoGraph.getShape();for(let h=n.getFirstGeometry();h!==c;h=n.getNextGeometry(h))h!==t&&h!==s&&i.push(h);i.sort(((e,t)=>{const s=n.getFirstPath(e),i=n.getRingArea(s),r=n.getFirstPath(t),h=n.getRingArea(r);return i<h?-1:i>h?1:0}))}cut(e,t,s,i,h){const o=this.m_topoGraph.getShape().getGeometryType(s),a=this.m_topoGraph.getShape().getGeometryType(i),m=r(o),g=r(a);if(2!==m||1!==g)if(1!==m||1!==g)n("");else{new Ht(this,e,t,s,i,h).Do()}else this.cutPolygonPolyline_(t,s,i,h)}progress_(e=!1){}isGoodParentage(e){return e>=0&&e<this.m_maskLookup.length&&this.m_maskLookup[e]}normalizeInputGeometry(e){const t=e.getGeometryType();if(t===i.enumEnvelope){const t=new x({vd:e.getDescription()});return e.isEmpty()||t.addEnvelope(e,!1),t}if(t===i.enumPoint){const t=new I({vd:e.getDescription()});return e.isEmpty()||t.add(e),t}if(h(t)){const t=new E({vd:e.getDescription()});return e.isEmpty()||t.addSegment(e,!0),t}return t!==i.enumMultiPoint&&t!==i.enumPolyline&&t!==i.enumPolygon&&s("Unexpected geometry type"),e}dissolveNonSimplePolygons(e,t,s,i){o(t>0);const r=new u;let n=0,h=-1;for(let o=0,a=t;o<a;o++)2===e[o].getDimension()&&(-1===h&&(h=o),e[o].isEmpty()||(n++,r.addGeometry(e[o])));return 0===n?(o(h>=0),this.normalizeInputGeometry(e[h])):this.planarSimplifyPolygons(r,s,!0,!1,-1,!0)}dissolveMultiPaths_(e,t,s,r,n,g,l){o(e>=1&&e<=2),o(r>0);const d=8&g?1:2,_=L.constructEmpty();let p=0,f=-1,I=!0;for(let h=0,o=r;h<o;h++)if(s[h].getDimension()===e&&(-1===f&&(f=h),!s[h].isEmpty())){f=h,p++;const t=L.constructEmpty();if(s[h].queryLooseEnvelope(t),_.mergeEnv3D(t),2===e&&I&&s[h].getGeometryType()===i.enumPolygon)if(16&g){const e=[0],t=s[h].getImpl().getIsSimple(0,e),i=this.m_bOGCOutput?5===t:q(t);I&&=i}else{const e=X(s[h],0);I&&=e}}if(p<2&&(o(f>=0),0===p||!(16&g)))return this.normalizeInputGeometry(s[f]);if(!I){const e=Y(t?null:n,_.getEnvelope2D(),!0);return this.dissolveNonSimplePolygons(s,r,e,g)}const P=s.slice(0,r),y=Y(n,_.getEnvelope2D(),!0),S=10*z(y);let V=new se(0,0);if(l&&(V=M(n,_.getEnvelopeZs(),!0)),1===p&&1===e&&2===d&&!t)return l?mt():this.m_bOGCOutput?ht(P[f],y,!1,-1,this.m_progressTracker,d,!1):ot(P[f],y,!1,!1,-1,this.m_progressTracker,d,!1);const v=new W;v.startConstruction();let N=2===e?3:4,T=0;for(let m=0,u=r;m<u;m++){if(P[m].getDimension()!==e||P[m].isEmpty())continue;let s=P[m].getGeometryType();if(s!==i.enumEnvelope){if(h(s)?(P[m]=this.normalizeInputGeometry(P[m]),s=i.enumPolyline):o(a(s)),1===e){o(s===i.enumPolyline);let e=-1;if(l)o(0,"3d not implemented yet");else{const t=[0];e=P[m].getImpl().getIsSimple(y.total(),t)}if(this.m_bOGCOutput?5!==e:!q(e))if(t)N=-1;else{l?o(0,"3d not implemented yet"):this.m_bOGCOutput?P[m]=ht(P[m],y,!1,-1,this.m_progressTracker,d,!1):P[m]=ot(P[m],y,!1,!1,-1,this.m_progressTracker,d,!1);const e=[0];o(q(P[m].getImpl().getIsSimple(y.total(),e)))}}else{o(s===i.enumPolygon);const e=[0],t=P[m].getImpl().getIsSimple(0,e);o(Z(t))}const r=P[m].getImpl();for(let e=0,t=r.getPathCount();e<t;e++){const t=de.constructEmpty();r.queryLoosePathEnvelope(e,t),t.inflateCoords(S,S),v.addEnvelope(T,t),T++}}else{o(s===i.enumEnvelope);const e=de.constructEmpty();P[m].queryLooseEnvelope(e),e.inflateCoords(S,S),v.addEnvelope(T,e),T++,N=-1}}v.endConstruction();const b=T,w=pe(b,-2147483647),U=pe(b,-1);let k=0;f=-1,T=0;for(let h=0,m=r;h<m;h++){if(P[h].getDimension()!==e)continue;if(-1===f&&(f=h),P[h].isEmpty())continue;f=h,k++;const t=P[h].getGeometryType();if(a(t)){for(let e=0,t=P[h].getPathCount();e<t;e++)U[T]=h,w[T]=-e-1,T++}else o(t===i.enumEnvelope),U[T]=h,w[T]=-1,T++}if(k<2&&2===e)return o(f>=0),this.normalizeInputGeometry(P[f]);let D=b;for(;v.next()&&D>0;){this.progress_();const e=v.getHandleA(),t=v.getHandleB(),s=v.getElement(e),i=v.getElement(t);U[s]!==U[i]&&(w[s]<0&&(D--,w[s]=-(w[s]+1)),w[i]<0&&(D--,w[i]=-(w[i]+1)))}const B=new u;let A=!1,O=0;for(let h=0,u=r;h<u;h++){if(P[h].getDimension()!==e||P[h].isEmpty())continue;const t=P[h].getGeometryType(),s=O;let r=0,n=0;const g=a(t)?P[h]:null;for(let e=s,i=w.length;e<i&&U[e]===h;e++)w[e]>=0&&(r++,n+=g?g.getPathSize(w[e]):m(P[h])),O++;if(n>.95*m(P[h])){B.addGeometry(this.normalizeInputGeometry(P[h]));for(let e=s;e<O;e++)w[e]<0&&(w[e]=-(w[e]+1))}else{if(0===r){A=!0;continue}{A=!0,o(a(t)),o(null!=g);const e=new x({vd:P[h].getDescription()}),r=new E({vd:P[h].getDescription()}),n=t===i.enumPolygon?e:r;for(let t=s;t<O;t++)w[t]>=0&&n.addPath(g,w[t],!0);B.addGeometry(n)}}}let R;if(B.getFirstGeometry()!==c){const s=2===e,i=t?Y(null,_.getEnvelope2D(),!0):y;let r=new se(0,0);if(l&&(r=t?M(null,_.getEnvelopeZs(),!0):V),2===e&&!(2&g)){B.collapseAllGeometriesToFirst();let e=0,t=null;if(B.hasCurves()&&!B.hasSegmentParentage()){t=new F;const s=B.getEnvelope2D(this.m_progressTracker);e=C(i.total());const r=G(i.total(),s);H(B,r,i.total(),12e3,t,null,this.m_progressTracker)}Me(B,B.getFirstGeometry(),i.total(),this.m_progressTracker),null!==t&&t.stitchCurves(B,c,e,!0)}if(l)R=this.planarSimplify3DImpl_(B,i,r,d,!0);else if(2===e)R=this.planarSimplifyPolygons(B,i,s,t,-1,!1);else{const e=rt();e.ogcRule=this.m_bOGCOutput,e.allCrossRoadsImpassable=!0,e.unsplitBehavior=d,R=this.planarSimplifyPolylines(B,i,t,e,-1)}if(!A){const e=[0];N=R.getImpl().getIsSimple(i.total(),e)}}else o(A),o(f>=0),R=2===e?new x({vd:P[f].getDescription()}):new E({vd:P[f].getDescription()});if(A){let e=0;for(let t=0,s=w.length;t<s;t++){const s=U[t];if(!(s<0)&&w[t]<0){const i=P[s].getGeometryType(),r=a(i)?P[s]:null;if(r){const s=-(w[t]+1);e+=r.getPathSize(s)}else e+=4}}R.reserve(R.getPointCount()+e);for(let t=0,s=w.length;t<s;t++){const e=U[t];if(!(e<0)&&w[t]<0){const s=P[e].getGeometryType(),r=a(s)?P[e]:null;if(r){const e=-(w[t]+1);R.addPath(r,e,!0)}else s===i.enumEnvelope?R.addEnvelope(P[e],!1):(o(h(s)),R.addSegment(P[e],!0))}}}let j=0;if(2===e?-1!==N&&(N=3,j=t?0:y.total()):(o(1===e),t||-1===N||(j=y.total())),l||R.getImpl().setIsSimple(N,j),!t&&A)if(2===e){if(!l)return(new qt).execute(R,n,!1,this.m_progressTracker);o(0,"3d not yet implemented")}else 1===e&&1!==d&&(R=l?gt():at(this.m_bOGCOutput,R,d,this.m_progressTracker),R.getImpl().setIsSimple(N,j));return R}dissolveTopoGraphCommonEdges_(){const e=this.m_topoGraph.createUserIndexForHalfEdges(),t=[];for(let s=this.m_topoGraph.getFirstCluster();s!==c;s=this.m_topoGraph.getNextCluster(s)){const i=this.m_topoGraph.getClusterHalfEdge(s);let r=i;if(i!==c)do{this.progress_();if(1!==this.m_topoGraph.getHalfEdgeUserIndex(r,e)){const s=this.m_topoGraph.getHalfEdgeTwin(r);this.m_topoGraph.setHalfEdgeUserIndex(s,e,1),this.m_topoGraph.setHalfEdgeUserIndex(r,e,1);const i=this.m_topoGraph.getHalfEdgeFaceParentage(r);if(this.isGoodParentage(i)){const e=this.m_topoGraph.getHalfEdgeFaceParentage(s);this.isGoodParentage(e)&&t.push(r)}}r=this.m_topoGraph.getHalfEdgeNext(this.m_topoGraph.getHalfEdgeTwin(r))}while(r!==i)}this.m_topoGraph.deleteUserIndexForHalfEdges(e),this.m_topoGraph.deleteEdgesBreakFaces_(t)}chooseVertexByOrder(e,t,s,i){let r=Ge(),n=c;for(let o=this.m_topoGraph.getClusterVertexIterator(e);o!==c;o=this.m_topoGraph.incrementVertexIterator(o)){const e=this.m_topoGraph.getVertexFromVertexIterator(o),i=t.getUserIndex(e,s);i>=0&&i<r&&(r=i,n=e)}o(n!==c);let h=t.getUserIndex(n,i);return h>0&&(t.setUserIndex(n,i,--h),0===h&&t.setUserIndex(n,s,-1)),n}chooseVertexFromCluster_(e,t){return this.m_topoGraph.getVertexDominantFromCluster(e,t)}chooseVertexFromVertexCluster_(e,t){return this.m_topoGraph.getVertexDominant(e,t)}collectPolygonPathsPreservingFrom_(e,t,s,r,n){const h=this.m_topoGraph.getShape();if(h.getGeometryType(e)!==i.enumPolygon)return;const o=h.hasSegmentParentage(),a=new f;for(let i=h.getFirstPath(e);i!==c;i=h.getNextPath(i)){const e=h.getFirstVertex(i);this.m_topoGraph.getClusterFromVertex(e);const m=this.m_topoGraph.getHalfEdgeFromVertex(e);if(m===c)continue;const g=this.m_topoGraph.getHalfEdgeUserIndex(m,s);if(1===g||2===g)continue;const l=this.m_topoGraph.getHalfEdgeFaceParentage(m);if(!this.isGoodParentage(l)){this.m_topoGraph.setHalfEdgeUserIndex(m,s,2);continue}this.m_topoGraph.setHalfEdgeUserIndex(m,s,1);const d=h.insertPath(t,c);h.setClosedPath(d,!0);let _=m,p=e,u=this.m_topoGraph.getClusterFromVertex(p),f=1;do{this.progress_();const e=this.chooseVertexFromVertexCluster_(p,n),t=h.addVertex(d,e);if(this.m_topoGraph.isHalfEdgeCurve(_)&&(this.m_topoGraph.querySegmentXY(_,a),h.setSegmentToIndex(h.getVertexIndex(t),a.get().clone())),o){const e=this.m_topoGraph.getSegmentParentage(_);h.setSegmentParentageAndBreak(t,e,this.m_topoGraph.isBreakNode(u))}let i,m;-1!==r&&this.m_topoGraph.setClusterUserIndex(u,r,1),this.m_topoGraph.setHalfEdgeUserIndex(_,s,1),_=this.m_topoGraph.getHalfEdgeNext(_);do{i=1===f?h.getNextVertex(p):h.getPrevVertex(p),m=i!==c?this.m_topoGraph.getClusterFromVertex(i):c}while(m===u);const g=this.m_topoGraph.getHalfEdgeOrigin(_);if(g!==m){do{i=1===f?h.getPrevVertex(p):h.getNextVertex(p),m=i!==c?this.m_topoGraph.getClusterFromVertex(i):c}while(m===u);if(g!==m){m=g;const e=this.m_topoGraph.getClusterVertexIterator(m);i=this.m_topoGraph.getVertexFromVertexIterator(e)}else f=-f}u=m,p=i}while(_!==m)}}topoOperationPolygonPolygonHelper_(e,t,s,i,r,n){this.progress_(!0),e!==c&&this.collectPolygonPathsPreservingFrom_(e,s,r,n,i),t!==c&&this.collectPolygonPathsPreservingFrom_(t,s,r,n,i);const h=new f,o=this.m_topoGraph.getShape();o.dbgVerifyCurves();const a=o.hasSegmentParentage();for(let m=this.m_topoGraph.getFirstCluster();m!==c;m=this.m_topoGraph.getNextCluster(m)){const e=this.m_topoGraph.getClusterHalfEdge(m);if(e===c)continue;let t=e;do{this.progress_();const e=this.m_topoGraph.getHalfEdgeUserIndex(t,r);if(1!==e&&2!==e){const e=this.m_topoGraph.getHalfEdgeFaceParentage(t);if(this.isGoodParentage(e)){const e=o.insertPath(s,c);o.setClosedPath(e,!0);let m=t;do{const t=this.m_topoGraph.getHalfEdgeVertexIterator(m);let s=c;if(t!==c)s=this.m_topoGraph.getVertexFromVertexIterator(t);else{const e=this.m_topoGraph.getHalfEdgeVertexIterator(this.m_topoGraph.getHalfEdgeTwin(m));s=this.m_topoGraph.getVertexFromVertexIterator(e),s=o.getNextVertex(s)}const g=this.chooseVertexFromVertexCluster_(s,i),l=o.addVertex(e,g);if(a){const e=this.m_topoGraph.getSegmentParentage(m),t=this.m_topoGraph.getHalfEdgeOrigin(m);o.setSegmentParentageAndBreak(l,e,this.m_topoGraph.isBreakNode(t))}if(this.m_topoGraph.isHalfEdgeCurve(m)&&(this.m_topoGraph.querySegmentXY(m,h),o.setSegmentToIndex(o.getVertexIndex(l),h.get().clone())),this.m_topoGraph.setHalfEdgeUserIndex(m,r,1),-1!==n){const e=this.m_topoGraph.getClusterFromVertex(g);this.m_topoGraph.setClusterUserIndex(e,n,1)}m=this.m_topoGraph.getHalfEdgeNext(m)}while(m!==t)}else this.m_topoGraph.setHalfEdgeUserIndex(t,r,2)}t=this.m_topoGraph.getHalfEdgeNext(this.m_topoGraph.getHalfEdgeTwin(t))}while(t!==e)}}topoOperationPolygonPolygon_(e,t,s,r=!1){this.dissolveTopoGraphCommonEdges_();const n=this.m_topoGraph.getShape(),h=n.createGeometry(i.enumPolygon),o=this.m_topoGraph.createUserIndexForHalfEdges();return this.topoOperationPolygonPolygonHelper_(e,t,h,s,o,-1),this.m_topoGraph.deleteUserIndexForHalfEdges(o),r||Je(n,h,3,this.m_bOGCOutput,c,this.m_progressTracker),h}topoOperationPolyline_(e,t){const s=rt();return s.allCrossRoadsImpassable=!1,s.ogcRule=t,s.unsplitBehavior=0,this.topoOperationPolylineSimplifyOrPolylineTopoHelper_(c,e,!1,s).first}topoOperationMultiPoint_(){const e=this.m_topoGraph.getShape(),t=e.createGeometry(i.enumMultiPoint),s=e.insertPath(t,c);for(let i=this.m_topoGraph.getFirstCluster();i!==c;i=this.m_topoGraph.getNextCluster(i)){const t=this.m_topoGraph.getClusterParentage(i);if(this.isGoodParentage(t)){let t=c;for(let s=this.m_topoGraph.getClusterVertexIterator(i);s!==c;s=this.m_topoGraph.incrementVertexIterator(s)){const i=this.m_topoGraph.getVertexFromVertexIterator(s);t===c&&(t=i);const r=e.getGeometryFromPath(e.getPathFromVertex(i)),n=this.m_topoGraph.getGeometryID(r);if(this.isGoodParentage(n)){t=i;break}}e.addVertex(s,t)}}return t}intersection(e,t){const s=this.m_topoGraph.getShape().getGeometryType(e),i=this.m_topoGraph.getShape().getGeometryType(t),h=r(s),a=r(i),m=this.m_topoGraph.getGeometryID(e),g=this.m_topoGraph.getGeometryID(t);o(m>=0),o(g>=0),this.m_maskLookup.length=0,this.m_maskLookup.length=1+(m|g),this.m_maskLookup[m|g]=!0;let l=c;return this.m_topoGraph.getShape().getVertexDescription().getAttributeCount()>1&&(l=e),2===h&&2===a?this.topoOperationPolygonPolygon_(e,t,l):1===h&&a>0||1===a&&h>0?this.topoOperationPolyline_(l,this.m_bOGCOutput):0===h||0===a?this.topoOperationMultiPoint_():void n("")}topoOperationPolygonPolygonEx(e,t,s){const r=this.m_topoGraph.getShape(),n=r.createGeometry(i.enumPolygon),h=r.createGeometry(i.enumPolyline),o=r.createGeometry(i.enumMultiPoint);this.dissolveTopoGraphCommonEdges_();let a=c;const m=this.m_topoGraph.createUserIndexForHalfEdges(),g=this.m_topoGraph.createUserIndexForClusters();r.dbgVerifyCurves(),this.topoOperationPolygonPolygonHelper_(e,t,n,s,m,g),r.dbgVerifyCurves();const l=r.hasSegmentParentage(),d=new f;for(let i=this.m_topoGraph.getFirstCluster();i!==c;i=this.m_topoGraph.getNextCluster(i)){const e=this.m_topoGraph.getClusterHalfEdge(i);if(e===c)continue;let t=e;do{let e=this.m_topoGraph.getHalfEdgeUserIndex(t,m),n=this.m_topoGraph.getHalfEdgeUserIndex(this.m_topoGraph.getHalfEdgeTwin(t),m),o=e|n;if(2===o){let a=this.m_topoGraph.getHalfEdgeParentage(t);if(this.isGoodParentage(a)){const _=r.insertPath(h,c);let p=t;const u=this.chooseVertexFromCluster_(i,s);let f=r.addVertex(_,u);if(l){const e=this.m_topoGraph.getSegmentParentage(t),s=this.m_topoGraph.getHalfEdgeOrigin(t);r.setSegmentParentageAndBreak(f,e,this.m_topoGraph.isBreakNode(s))}this.m_topoGraph.isHalfEdgeCurve(t)&&(this.m_topoGraph.querySegmentXY(t,d),r.setSegmentToIndex(r.getVertexIndex(f),d.get().clone())),this.m_topoGraph.setClusterUserIndex(i,g,1);do{this.progress_();const i=this.m_topoGraph.getHalfEdgeTo(p),h=this.chooseVertexFromCluster_(i,s);if(f=r.addVertex(_,h),l){const e=this.m_topoGraph.getSegmentParentage(t),s=this.m_topoGraph.getHalfEdgeOrigin(t);r.setSegmentParentageAndBreak(f,e,this.m_topoGraph.isBreakNode(s))}if(this.m_topoGraph.setHalfEdgeUserIndex(p,m,1),this.m_topoGraph.setHalfEdgeUserIndex(this.m_topoGraph.getHalfEdgeTwin(p),m,1),this.m_topoGraph.setClusterUserIndex(i,g,1),p=this.m_topoGraph.getHalfEdgeNext(p),e=this.m_topoGraph.getHalfEdgeUserIndex(p,m),n=this.m_topoGraph.getHalfEdgeUserIndex(this.m_topoGraph.getHalfEdgeTwin(p),m),o=e|n,2!==o)break;if(a=this.m_topoGraph.getHalfEdgeParentage(p),!this.isGoodParentage(a)){this.m_topoGraph.setHalfEdgeUserIndex(p,m,1),this.m_topoGraph.setHalfEdgeUserIndex(this.m_topoGraph.getHalfEdgeTwin(p),m,1);break}this.m_topoGraph.isHalfEdgeCurve(t)&&p!==t&&(this.m_topoGraph.querySegmentXY(t,d),r.setSegmentToIndex(r.getVertexIndex(f),d.get().clone()))}while(p!==t)}else this.m_topoGraph.setHalfEdgeUserIndex(t,m,1),this.m_topoGraph.setHalfEdgeUserIndex(this.m_topoGraph.getHalfEdgeTwin(t),m,1)}t=this.m_topoGraph.getHalfEdgeNext(this.m_topoGraph.getHalfEdgeTwin(t))}while(t!==e)}for(let i=this.m_topoGraph.getFirstCluster();i!==c;i=this.m_topoGraph.getNextCluster(i)){this.progress_();if(1===this.m_topoGraph.getClusterUserIndex(i,g))continue;const e=this.m_topoGraph.getClusterParentage(i);if(this.isGoodParentage(e)){a===c&&(a=r.insertPath(o,c));const e=this.m_topoGraph.getClusterVertexIterator(i);let t=c;if(e!==c){t=this.m_topoGraph.getVertexFromVertexIterator(e);const i=this.chooseVertexFromVertexCluster_(t,s);r.addVertex(a,i)}}}this.m_topoGraph.deleteUserIndexForClusters(g),this.m_topoGraph.deleteUserIndexForHalfEdges(m),r.dbgVerifyCurves(),Je(r,n,3,this.m_bOGCOutput,c,this.m_progressTracker);const _=[c,c,c];return _[0]=o,_[1]=h,_[2]=n,_}topoOperationPolylinePolylineOrPolygonEx(e,t){const s=rt();return s.allCrossRoadsImpassable=!1,s.ogcRule=t,s.unsplitBehavior=0,this.topoOperationPolylineSimplifyOrPolylineTopoHelper_(c,e,!0,s)}topoOperationMultiPoint(){const e=this.m_topoGraph.getShape(),t=e.createGeometry(i.enumMultiPoint),s=e.insertPath(t,c);for(let i=this.m_topoGraph.getFirstCluster();i!==c;i=this.m_topoGraph.getNextCluster(i)){const t=this.m_topoGraph.getClusterParentage(i);if(this.isGoodParentage(t)){let t=c;for(let s=this.m_topoGraph.getClusterVertexIterator(i);s!==c;s=this.m_topoGraph.incrementVertexIterator(s)){const i=this.m_topoGraph.getVertexFromVertexIterator(s);t===c&&(t=i);const r=e.getGeometryFromPath(e.getPathFromVertex(i)),n=this.m_topoGraph.getGeometryID(r);if(this.isGoodParentage(n)){t=i;break}}e.addVertex(s,t)}}return t}intersectionEx(e,t){const s=this.m_topoGraph.getShape().getGeometryType(e),i=this.m_topoGraph.getShape().getGeometryType(t),r=st(s),h=st(i),a=this.m_topoGraph.getGeometryID(e),m=this.m_topoGraph.getGeometryID(t);o(a>=0),o(m>=0),this.m_maskLookup.length=0,this.m_maskLookup.length=1+(a|m),this.m_maskLookup[a|m]=!0;let g=c;if(this.m_topoGraph.getShape().getVertexDescription().getAttributeCount()>1&&(g=e),2===r&&2===h)return this.topoOperationPolygonPolygonEx(e,t,g);if(1===r&&h>0||1===h&&r>0){const{first:e,second:t}=this.topoOperationPolylinePolylineOrPolygonEx(g,this.m_bOGCOutput);return[t,e]}if(0===r||0===h){const e=[];return e.push(this.topoOperationMultiPoint()),e}n("")}getCombinedHalfEdgeParentage(e){return this.m_topoGraph.getHalfEdgeParentage(e)|this.m_topoGraph.getHalfEdgeFaceParentage(e)|this.m_topoGraph.getHalfEdgeFaceParentage(this.m_topoGraph.getHalfEdgeTwin(e))}prevailingDirection(e,t){const s=this.getCombinedHalfEdgeParentage(t),i=this.m_topoGraph.getHalfEdgeOrigin(t),r=this.m_topoGraph.getHalfEdgeTo(t);let n=0,h=0;for(let o=this.m_topoGraph.getClusterVertexIterator(i);o!==c;o=this.m_topoGraph.incrementVertexIterator(o)){const i=this.m_topoGraph.getVertexFromVertexIterator(o),a=e.getPathFromVertex(i),m=e.getGeometryFromPath(a),g=this.m_topoGraph.getGeometryID(m),l=e.getFirstVertex(a),d=!!(g&s);d&&l===i&&(this.m_fromEdgeForPolylines=t);const _=e.getNextVertex(i);if(_!==c&&this.m_topoGraph.getClusterFromVertex(_)===r){if(n++,d){if(this.m_fromEdgeForPolylines===c&&l===_){const e=this.m_topoGraph.getHalfEdgeNext(t);this.isGoodParentage(this.getCombinedHalfEdgeParentage(e))&&(this.m_fromEdgeForPolylines=e)}h++}}else{const s=e.getPrevVertex(i);if(s!==c&&this.m_topoGraph.getClusterFromVertex(s)===r&&(n--,d)){if(this.m_fromEdgeForPolylines===c&&l===s){const e=this.m_topoGraph.getHalfEdgeNext(t);this.isGoodParentage(this.getCombinedHalfEdgeParentage(e))&&(this.m_fromEdgeForPolylines=e)}h--}}}this.m_topoGraph.queryXY(i,this.m_dummyPt1),this.m_topoGraph.queryXY(r,this.m_dummyPt2);return(0!==h?h:n)*_e.distance(this.m_dummyPt1,this.m_dummyPt2)}tryMoveThroughCrossroadBackwards(e,t){const s=this.m_topoGraph.getHalfEdgePrev(e),i=this.m_topoGraph.getHalfEdgeTwin(s);if(!t){if(this.m_topoGraph.isStrongPathNode(this.m_topoGraph.getHalfEdgeOrigin(e)))return c;const t=this.m_topoGraph.getHalfEdgeTwin(e);if(i===this.m_topoGraph.getHalfEdgeNext(t))return s}let r=i,n=c;for(;r!==e;){const e=this.getCombinedHalfEdgeParentage(r);if(this.isGoodParentage(e)){if(n!==c)return c;n=this.m_topoGraph.getHalfEdgeTwin(r)}r=this.m_topoGraph.getHalfEdgeTwin(this.m_topoGraph.getHalfEdgePrev(r))}return n}tryMoveThroughCrossroadForward(e,t){const s=this.m_topoGraph.getHalfEdgeNext(e),i=this.m_topoGraph.getHalfEdgeTwin(s);if(!t){const t=this.m_topoGraph.getHalfEdgeTwin(e);if(this.m_topoGraph.isStrongPathNode(this.m_topoGraph.getHalfEdgeOrigin(t)))return c;if(i===this.m_topoGraph.getHalfEdgePrev(t))return s}let r=i,n=c;for(;r!==e;){const e=this.getCombinedHalfEdgeParentage(r);if(this.isGoodParentage(e)){if(n!==c)return c;n=this.m_topoGraph.getHalfEdgeTwin(r)}r=this.m_topoGraph.getHalfEdgeTwin(this.m_topoGraph.getHalfEdgeNext(r))}return n}isOnALoop(e,t){let s=e;const i=2*this.m_topoGraph.getShape().getTotalPointCount()+10;for(let r=0;r<i;r++){if(1===this.m_topoGraph.getHalfEdgeUserIndex(s,t))return!1;const i=this.m_topoGraph.getHalfEdgeNext(s);if(i===this.m_topoGraph.getHalfEdgeTwin(s))return!1;if(s=i,s===e)return!0}n("is_on_a_loop_")}restorePolylineParts(e,t,s,i,r,n,h,a,m,g){o(r===c&&n>=0&&h>=0||-1===n&&-1===h),o(-1===a&&1!==g.unsplitBehavior||-1!==a&&1===g.unsplitBehavior);const l=g.ogcRule,d=g.allCrossRoadsImpassable,_=1===g.unsplitBehavior,p=0===g.unsplitBehavior,u=this.m_topoGraph.getShape(),x=u.hasSegmentParentage();let I=e,E=this.m_topoGraph.getHalfEdgeTwin(I);const P=new f;this.m_fromEdgeForPolylines=c;let y=this.prevailingDirection(u,I),S=I,C=c,G=!1,H=!1,V=!1;if(!_)for(;;){const t=this.m_topoGraph.getHalfEdgePrev(I);if(t===E){V=!0;break}const i=this.m_topoGraph.getHalfEdgeNext(E);if(this.m_topoGraph.isStrongPathNode(this.m_topoGraph.getHalfEdgeOrigin(i))){G=!0;break}if(this.m_topoGraph.getHalfEdgeTwin(t)!==i){if(d){G=!0;break}if(I=this.tryMoveThroughCrossroadBackwards(I,!0),I===c){G=!0;break}E=this.m_topoGraph.getHalfEdgeTwin(I)}else I=t,E=i;if(1===this.m_topoGraph.getHalfEdgeUserIndex(I,s)){V=!0;break}if(I===e){C=e,H=!0;break}const r=this.getCombinedHalfEdgeParentage(I);if(!this.isGoodParentage(r))break;S=I,y+=this.prevailingDirection(u,I)}if(C===c){for(I=e,E=this.m_topoGraph.getHalfEdgeTwin(I),C=I;;){const e=this.m_topoGraph.getHalfEdgeNext(I),t=this.m_topoGraph.isStrongPathNode(this.m_topoGraph.getHalfEdgeOrigin(e));if(t){G=!0;break}if(e===E){V=!0;break}if(-1!==a){const e=this.m_topoGraph.getHalfEdgeOrigin(E);if(1===this.m_topoGraph.getClusterUserIndex(e,a)){G=!0;break}}const i=this.m_topoGraph.getHalfEdgePrev(E);if(this.m_topoGraph.getHalfEdgeTwin(e)!==i){if(t||d){G=!0;break}if(I=this.tryMoveThroughCrossroadForward(I,!0),I===c){G=!0;break}E=this.m_topoGraph.getHalfEdgeTwin(I)}else I=e,E=i;if(1===this.m_topoGraph.getHalfEdgeUserIndex(I,s)){V=!0;break}const r=this.getCombinedHalfEdgeParentage(I);if(!this.isGoodParentage(r))break;C=I,y+=this.prevailingDirection(u,I)}const t=this.m_topoGraph.getHalfEdgeOrigin(S);H=this.m_topoGraph.getHalfEdgeTo(C)===t}else if(this.m_fromEdgeForPolylines!==c){S=e,C=this.tryMoveThroughCrossroadBackwards(S,!1),o(C!==c);const t=this.m_topoGraph.getHalfEdgeTwin(S);this.m_topoGraph.getHalfEdgeNext(t)}let v=H;H||V||m&&(v=this.isOnALoop(e,s),v||(v=this.isOnALoop(E,s)));const N=y>=0;let T=!1;v&&G&&(H?(T=l,N&&(T||_||p)&&S!==e&&(o(!_),S=e,T=!1)):(_||N&&p)&&(S=e));let F=0;for(I=S;E=this.m_topoGraph.getHalfEdgeTwin(I),this.m_topoGraph.setHalfEdgeUserIndex(I,s,1),this.m_topoGraph.setHalfEdgeUserIndex(E,s,1),F++,I!==C;)I=d?this.m_topoGraph.getHalfEdgeNext(I):this.tryMoveThroughCrossroadForward(I,!1);N||(C=ue(S,S=C),C=this.m_topoGraph.getHalfEdgeTwin(C),S=this.m_topoGraph.getHalfEdgeTwin(S));let b=u.insertPath(t,c);I=S;const w=this.m_topoGraph.getHalfEdgeOrigin(S);let U;U=-1!==n?this.chooseVertexByOrder(w,u,n,h):this.chooseVertexFromCluster_(w,r),this.m_topoGraph.isStrongPathNode(w)&&u.setStrongPathStart(b,!0);let k=u.addVertex(b,U),D=k;-1!==i&&this.m_topoGraph.setClusterUserIndex(w,i,1);let B=0;const A=T?Math.trunc((F+1)/2):-1;let O=c,R=!0,L=c;for(;;){if(x){const e=this.m_topoGraph.getSegmentParentage(I),t=this.m_topoGraph.getHalfEdgeOrigin(I);u.setSegmentParentageAndBreak(D,e,R||this.m_topoGraph.isBreakNode(t))}R=!1,this.m_topoGraph.isHalfEdgeCurve(I)&&(this.m_topoGraph.querySegmentXY(I,P),u.setSegmentToIndex(u.getVertexIndex(D),P.get().clone())),O!==c&&-1!==h&&u.addToUserIndex(O,h,-1);const e=d?this.m_topoGraph.getHalfEdgeNext(I):this.tryMoveThroughCrossroadForward(I,!1),s=this.m_topoGraph.getHalfEdgeTo(I);let o;if(o=-1!==n?this.chooseVertexByOrder(s,u,n,h):this.chooseVertexFromCluster_(s,r),k=u.addVertex(b,o),L=s,-1!==i&&this.m_topoGraph.setClusterUserIndex(s,i,1),x&&this.m_topoGraph.isBreakNode(s)&&u.setSegmentParentageBreakVertex(k,!0),O=o,B++,T&&B===A&&(b=u.insertPath(t,c),k=u.addVertex(b,o),R=!0,-1!==h&&u.addToUserIndex(o,h,-1),O=c),I===C)break;I=e,D=k}L!==c&&this.m_topoGraph.isStrongPathNode(L)&&u.setStrongPathEnd(b,!0)}topoOperationPolylineSimplify_(e,t){return this.topoOperationPolylineSimplifyOrPolylineTopoHelper_(e,c,!1,t).first}topoOperationPolylineSimplifyOrPolylineTopoHelper_(e,t,s,r){o(t===c||e===c);const n=this.m_topoGraph.getShape(),h=t=>t=e===c?t===c?n.getFirstGeometry():n.getNextGeometry(t):t===c?e:c,a=n.createGeometry(i.enumPolyline);let m=-1;s&&(m=this.m_topoGraph.createUserIndexForClusters());const g=this.m_topoGraph.createUserIndexForHalfEdges(),l=t===c?n.createUserIndex():-1,d=t===c?n.createUserIndex():-1;let _=-1;if(1===r.unsplitBehavior){_=this.m_topoGraph.createUserIndexForClusters();for(let e=h(c);e!==c;e=h(e))for(let t=n.getFirstPath(e);t!==c;t=n.getNextPath(t)){{const e=n.getFirstVertex(t),s=this.m_topoGraph.getClusterFromVertex(e);this.m_topoGraph.setClusterUserIndex(s,_,1)}if(!n.isClosedPath(t)){const e=n.getLastVertex(t),s=this.m_topoGraph.getClusterFromVertex(e);this.m_topoGraph.setClusterUserIndex(s,_,1)}}}if(t===c){let e=0;for(let t=h(c);t!==c;t=h(t))for(let s=n.getFirstPath(t);s!==c;s=n.getNextPath(s)){if(n.isClosedPath(s)){let t=n.getFirstVertex(s);for(let i=0,r=n.getPathSize(s);i<r;i++,t=n.getNextVertex(t))n.setUserIndex(t,l,e++),n.setUserIndex(t,d,2)}else{const t=n.getFirstVertex(s);n.setUserIndex(t,l,e++),n.setUserIndex(t,d,1);let i=n.getNextVertex(t);for(let r=1,h=n.getPathSize(s)-1;r<h;++r)n.setUserIndex(i,l,e++),n.setUserIndex(i,d,2),i=n.getNextVertex(i);n.setUserIndex(i,l,e++),n.setUserIndex(i,d,1)}}}for(let i=h(c);i!==c;i=h(i))for(let e=n.getFirstPath(i);e!==c;e=n.getNextPath(e)){let s=n.getFirstVertex(e);for(let i=0,h=n.getPathSize(e);i<h;i++,s=n.getNextVertex(s)){const e=this.m_topoGraph.getHalfEdgeFromVertex(s);if(e===c)continue;if(1===this.m_topoGraph.getHalfEdgeUserIndex(e,g))continue;const n=this.getCombinedHalfEdgeParentage(e);if(this.isGoodParentage(n)){const s=0===i;this.restorePolylineParts(e,a,g,m,t,l,d,_,s,r)}}}let p=c;if(s){p=n.createGeometry(i.enumMultiPoint);let e=c;for(let s=this.m_topoGraph.getFirstCluster();s!==c;s=this.m_topoGraph.getNextCluster(s)){this.progress_();if(1!==this.m_topoGraph.getClusterUserIndex(s,m)){const i=this.m_topoGraph.getClusterParentage(s);if(this.isGoodParentage(i)){e===c&&(e=n.insertPath(p,c));const i=this.m_topoGraph.getClusterVertexIterator(s);if(i!==c){let r;this.m_topoGraph.getVertexFromVertexIterator(i),r=-1!==l?this.chooseVertexByOrder(s,n,l,d):this.chooseVertexFromCluster_(s,t),n.addVertex(e,r)}}}}}return-1!==d&&n.removeUserIndex(d),-1!==l&&n.removeUserIndex(l),-1!==m&&n.removeUserIndex(m),this.m_topoGraph.deleteUserIndexForHalfEdges(g),ce(a,p)}difference(e,t){const s=this.m_topoGraph.getShape().getGeometryType(e),i=this.m_topoGraph.getShape().getGeometryType(t),h=r(s),o=r(i);if(h>o)return e;const a=this.m_topoGraph.getGeometryID(e),m=this.m_topoGraph.getGeometryID(t);if(this.m_maskLookup.length=0,this.m_maskLookup.length=1+(a|m),this.m_maskLookup[a]=!0,2===h&&2===o){let s=c;return this.m_topoGraph.getShape().getVertexDescription().getAttributeCount()>1&&(s=e),this.topoOperationPolygonPolygon_(e,t,s)}if(1===h&&2===o){const t=rt();return t.allCrossRoadsImpassable=!1,t.ogcRule=this.m_bOGCOutput,t.unsplitBehavior=0,this.topoOperationPolylineSimplifyOrPolylineTopoHelper_(e,c,!1,t).first}if(1===h&&1===o){const t=rt();return t.allCrossRoadsImpassable=!0,t.ogcRule=this.m_bOGCOutput,t.unsplitBehavior=0,this.topoOperationPolylineSimplifyOrPolylineTopoHelper_(e,c,!1,t).first}if(0===h)return this.topoOperationMultiPoint_();n("")}symmetricDifference(e,t){const s=this.m_topoGraph.getShape().getGeometryType(e),i=this.m_topoGraph.getShape().getGeometryType(t),r=st(s),h=st(i),a=this.m_topoGraph.getGeometryID(e),m=this.m_topoGraph.getGeometryID(t);return o(a>=0),o(m>=0),this.m_maskLookup.length=0,this.m_maskLookup.length=1+(a|m),this.m_maskLookup[a]=!0,this.m_maskLookup[a]=!0,this.m_maskLookup[m]=!0,2===r&&2===h?this.topoOperationPolygonPolygon_(e,t,c):1===r&&1===h?this.topoOperationPolyline_(c,this.m_bOGCOutput):0===r&&0===h?this.topoOperationMultiPoint():void n("")}planarSimplifyNoCrackingAndCluster(e,t,s,r){this.m_bOGCOutput=e,this.m_topoGraph=new Ye;const h=t.getFillRule(s),a=t.getGeometryType(s);if(1!==h||a===i.enumMultiPoint?this.m_topoGraph.setAndSimplifyEditShapeAlternate(t,s,this.m_progressTracker):this.m_topoGraph.setAndSimplifyEditShapeWinding(t,s,this.m_progressTracker),this.m_topoGraph.dirtyCheckFailed())return!1;this.m_topoGraph.setCheckDirtyPlanesweepTolerance(Number.NaN);const m=this.m_topoGraph.getGeometryID(s);if(o(m>=0),this.m_maskLookup.length=0,this.m_maskLookup.length=m+1,this.m_maskLookup[m]=!0,t.getGeometryType(s)===i.enumPolygon||1===h&&t.getGeometryType(s)!==i.enumMultiPoint){t.setFillRule(s,0);const i=this.topoOperationPolygonPolygon_(s,c,c);if(t.swapGeometry(i,s),t.removeGeometry(i),1===h&&this.m_bOGCOutput)return this.planarSimplifyNoCrackingAndCluster(e,t,s,r)}else if(t.getGeometryType(s)===i.enumPolyline){const e=rt();e.ogcRule=this.m_bOGCOutput,e.allCrossRoadsImpassable=!0,e.unsplitBehavior=r;const i=this.topoOperationPolylineSimplify_(t.getFirstGeometry(),e);t.swapGeometry(i,s),t.removeGeometry(i)}else if(t.getGeometryType(s)===i.enumMultiPoint){const e=this.topoOperationMultiPoint_();t.swapGeometry(e,s),t.removeGeometry(e)}else n("");return!0}unsplitPolylineExact(e){return o(0),new E}planarSimplifyPolylines(e,t,s,r,n){for(let p=e.getFirstGeometry();p!==c;p=e.getNextGeometry(p)){const t=e.getGeometryType(p);o(t===i.enumPolyline)}let h=0,a=0,m=null;if(e.hasCurves()&&!e.hasSegmentParentage()){m=new F;const s=e.getEnvelope2D(this.m_progressTracker);a=C(t.total());const i=G(t.total(),s);h=b(i,a),H(e,i,t.total(),12e3,m,null,this.m_progressTracker)}{const s=v(t.add(h));e.filterClosePoints(s,!1,!1,!1,c)}if(this.m_topoGraph=new Ye,4!==n&&5!==n)if(null===m&&s){const i=new N(this.m_progressTracker,!1);i.sweepVertical(e,t.total()),i.hadComplications()?(V(e,t,this.m_progressTracker,!0,!1),s=!1):this.m_topoGraph.setCheckDirtyPlanesweepTolerance(t.total())}else V(e,t.add(h),this.m_progressTracker,!0,!1),s=!1;else s=!1;e.removeSelection(),e.collapseAllGeometriesToFirst();const g=e.getFirstGeometry();if(this.m_topoGraph.setAndSimplifyEditShapeAlternate(e,g,this.m_progressTracker),this.m_topoGraph.dirtyCheckFailed())return o(s&&null===m),this.m_topoGraph.removeShape(),this.m_topoGraph=null,this.planarSimplifyPolylines(e,t,!1,r,-1);this.m_topoGraph.setCheckDirtyPlanesweepTolerance(Number.NaN);const l=this.m_topoGraph.getGeometryID(g);o(l>=0),this.m_maskLookup.length=0,this.m_maskLookup.length=l+1,this.m_maskLookup[l]=!0;const d=this.topoOperationPolylineSimplify_(e.getFirstGeometry(),r);null!==m&&m.stitchCurves(e,d,a,!0);const _=e.getGeometry(d);return s||_.getImpl().setIsSimple(4,t.total()),_}planarSimplifyMultiPoints(e,t,s,r){for(let g=e.getFirstGeometry();g!==c;g=e.getNextGeometry(g)){const t=e.getGeometryType(g);o(t===i.enumMultiPoint)}this.m_topoGraph=new Ye,4!==r&&5!==r?(V(e,t,this.m_progressTracker,!0,!1),s=!1):s=!1,e.removeSelection(),e.collapseAllGeometriesToFirst();const n=e.getFirstGeometry();if(this.m_topoGraph.setAndSimplifyEditShapeAlternate(e,n,this.m_progressTracker),this.m_topoGraph.dirtyCheckFailed())return o(s),this.m_topoGraph.removeShape(),this.m_topoGraph=null,this.planarSimplifyMultiPoints(e,t,!1,-1);this.m_topoGraph.setCheckDirtyPlanesweepTolerance(Number.NaN);const h=this.m_topoGraph.getGeometryID(n);o(h>=0),this.m_maskLookup.length=0,this.m_maskLookup.length=h+1,this.m_maskLookup[h]=!0;const a=this.topoOperationMultiPoint(),m=e.getGeometry(a);return s||m.getImpl().setIsSimple(4,t.total()),m}planarSimplifyPolygons(e,t,s,r,n,h){for(let x=e.getFirstGeometry();x!==c;x=e.getNextGeometry(x)){const t=e.getGeometryType(x);o(t===i.enumPolygon||t===i.enumPolyline&&s)}let a=0,m=0,g=null;if(e.hasCurves()&&!e.hasSegmentParentage()){g=new F;const s=e.getEnvelope2D(this.m_progressTracker);m=C(t.total());const i=G(t.total(),s);a=b(i,m),H(e,i,t.total(),12e3,g,null,this.m_progressTracker)}if(h){V(e,t.add(a),this.m_progressTracker,!0,!1);for(let t=e.getFirstGeometry();t!==c;t=e.getNextGeometry(t))e.getGeometryType(t)===i.enumPolygon&&Je(e,t,-1,!1,c,this.m_progressTracker)}if(this.m_topoGraph=new Ye,h||4===n||5===n)r=!1;else if(null===g&&r){const s=new N(this.m_progressTracker,!1);s.sweepVertical(e,t.total()),s.hadComplications()?(V(e,t,this.m_progressTracker,!0,!1),r=!1):this.m_topoGraph.setCheckDirtyPlanesweepTolerance(t.total())}else V(e,t.add(a),this.m_progressTracker,!0,!1),r=!1;e.removeSelection(),e.collapseAllGeometriesToFirst();const l=e.getFirstGeometry();if(s?this.m_topoGraph.setAndSimplifyEditShapeWinding(e,l,this.m_progressTracker):this.m_topoGraph.setAndSimplifyEditShapeAlternate(e,l,this.m_progressTracker),this.m_topoGraph.dirtyCheckFailed())return o(r&&null===g),this.m_topoGraph.removeShape(),this.m_topoGraph=null,this.planarSimplifyPolygons(e,t,s,!1,-1,!1);this.m_topoGraph.setCheckDirtyPlanesweepTolerance(Number.NaN);const d=this.m_topoGraph.getGeometryID(l);o(d>=0),this.m_maskLookup.length=0,this.m_maskLookup.length=d+1,this.m_maskLookup[d]=!0,e.setFillRule(l,0);const _=this.m_bOGCOutput&&s,p=_;let u=this.topoOperationPolygonPolygon_(l,c,c,p);if(_){this.m_topoGraph.removeShape(),this.m_topoGraph=null,e.removeGeometry(l),this.m_topoGraph=new Ye,this.m_topoGraph.setAndSimplifyEditShapeAlternate(e,u,this.m_progressTracker);u=this.topoOperationPolygonPolygon_(u,c,c,!1)}null!==g&&g.stitchCurves(e,u,m,!0);const f=e.getGeometry(u);return f.setFillRule(0),r?f.getImpl().setIsSimple(3,0):(f.getImpl().setIsSimple(4,t.total()),f.getImpl().updateOGCFlagsProtected()),f}planarSimplify3DImpl_(e,t,s,i,r){return o(0),{}}planarSimplifyImpl_(e,t,s,r,h,o,a,m){if(e.isEmpty())return e.clone();const g=e.getGeometryType(),l=new u,d=l.addGeometry(e);if(Z(h)&&g===i.enumPolygon&&(s=!1,l.setFillRule(d,0)),m&&(e.hasAttribute(1)&&l.replaceNaNs(1,0),l.removeNaNVertices()),g===i.enumPolygon||g===i.enumPolyline&&s)return this.planarSimplifyPolygons(l,t,s,r,h,!1);if(g===E.type){const e=rt();return e.allCrossRoadsImpassable=!0,e.ogcRule=this.m_bOGCOutput,e.unsplitBehavior=a,this.planarSimplifyPolylines(l,t,r,e,h)}if(g===i.enumMultiPoint)return this.planarSimplifyMultiPoints(l,t,r,h);n("what else?")}}function Pt(e,t,s,i){if(e.isEmpty())return e.createInstance();if(t.isEmpty())return i?e.createInstance():new $({copy:e});const r=[new _e],h=[0],o=2===t.getDimension();1!==t.getDimension()&&2!==t.getDimension()&&n(""),r[0]=e.getXY(),o?O(t,r,1,s.total(),h):R(t,r,1,s.total(),h);let a=0===h[0];return i||(a=!a),a?e.createInstance():e}function yt(e,t,s,i){const r=e.createInstance(),h=He(_e,100),o=new Array(100),a=e.getPointCount();let m=!0;const g=2===t.getDimension();1!==t.getDimension()&&2!==t.getDimension()&&n("");for(let n=0;n<a;){const i=e.queryCoordinates(h,h.length,n,-1)-n;g?O(t,h,i,s.total(),o):R(t,h,i,s.total(),o);let a=0;for(let t=0;t<i;t++){0===o[t]&&(m&&(m=!1,r.addPoints(e,0,n)),a!==t&&r.addPoints(e,n+a,n+t),a=t+1)}m||a===i||r.addPoints(e,n+a,n+i),n+=i}return m?e:r}function St(e,t,s,r){const n=e.getGeometryType();if(n===i.enumEnvelope){const t=new x({vd:e.getDescription()});return e.isEmpty()||t.addEnvelope(e,!1),t}if(n===i.enumPoint&&("|"===r||"^"===r)){const t=new I({vd:e.getDescription()});return e.isEmpty()||t.add(e),t}if(n===i.enumLine){const t=new E({vd:e.getDescription()});return e.isEmpty()||t.addSegment(e,!0),t}if(n===i.enumMultiPoint&&"-"===r&&t.getGeometryType()===i.enumPoint){const t=new $({vd:e.getDescription()});return e.isEmpty()||e.getPointByVal(0,t),t}if(n===i.enumMultiPoint&&"&"===r&&t.getGeometryType()===i.enumPoint){const t=new $({vd:e.getDescription()});return e.isEmpty()||e.getPointByVal(0,t),t}return e}function Ct(e){const t=e.getGeometryType();if(t===i.enumEnvelope){const t=new x({vd:e.getDescription()});return e.isEmpty()||t.addEnvelope(e,!1),t}if(t===i.enumPoint){const t=new I({vd:e.getDescription()});return e.isEmpty()||t.add(e),t}if(tt(t)){const t=new E({vd:e.getDescription()});return e.isEmpty()||t.addSegment(e,!0),t}return t!==i.enumMultiPoint&&t!==i.enumPolyline&&t!==i.enumPolygon&&s("Unexpected geometry type"),e}function Gt(e,t,s,i){const r=s===c?e.getClusterHalfEdge(t):s;let n=r;o(e.getHalfEdgeOrigin(r)===t);do{i(n),n=e.getHalfEdgeNext(e.getHalfEdgeTwin(n))}while(n!==r)}class Ht{constructor(e,t,s,i,r,n){this.m_rParent=e,this.m_rTopoGraph=e.m_topoGraph,this.m_rShape=this.m_rTopoGraph.getShape(),this.m_IDCuttee=this.m_rTopoGraph.getGeometryID(i),this.m_IDCutter=this.m_rTopoGraph.getGeometryID(r),this.m_IDBoth=this.m_IDCuttee|this.m_IDCutter,this.m_bConsiderTouch=t,this.m_sideIndex=s,this.m_cuttee=i,this.m_cutter=r,this.m_rCutHandles=n,this.m_cutteeBreadcrumbsIndex=this.m_rShape.createUserIndexUninitialized(),this.m_clusterParentageIndex=this.m_rShape.createUserIndexUninitialized();for(let h=this.m_rShape.getFirstPath(this.m_cuttee);h!==c;h=this.m_rShape.getNextPath(h)){let e=0;const t=this.m_rShape.getPathSize(h);for(let s=this.m_rShape.getFirstVertex(h);e<t;e++,s=this.m_rShape.getNextVertex(s))this.m_rShape.setUserIndex(s,this.m_clusterParentageIndex,this.m_rTopoGraph.getClusterParentage(this.m_rTopoGraph.getClusterFromVertex(s)))}}Do(){this.cutPolylinePolyline_(),this.m_rShape.removeUserIndex(this.m_cutteeBreadcrumbsIndex),this.m_rShape.removeUserIndex(this.m_clusterParentageIndex)}setTbd(e){return 8|e}classifyStandardCut(e,t,s,i){const r=this.m_rShape.getPrevVertex(e),n=this.m_rShape.getNextVertex(e),h=r===c?c:this.m_rTopoGraph.getHalfEdgeConnector(t,this.m_rTopoGraph.getClusterFromVertex(r)),o=n===c?c:this.m_rTopoGraph.getHalfEdgeConnector(t,this.m_rTopoGraph.getClusterFromVertex(n)),a=this.m_rTopoGraph.getHalfEdgeConnector(t,this.m_rTopoGraph.getClusterFromVertex(s)),m=this.m_rTopoGraph.getHalfEdgeConnector(t,this.m_rTopoGraph.getClusterFromVertex(i));let g=1,l=32,d=32;if(Gt(this.m_rTopoGraph,t,m,(e=>{e===a&&(g=2),e===h&&(l=g),e===o&&(d=g)})),this.m_bConsiderTouch)32!==l&&this.m_rShape.setUserIndex(r,this.m_cutteeBreadcrumbsIndex,this.m_rShape.getUserIndex(r,this.m_cutteeBreadcrumbsIndex)|l),32!==d&&this.m_rShape.setUserIndex(e,this.m_cutteeBreadcrumbsIndex,this.m_rShape.getUserIndex(e,this.m_cutteeBreadcrumbsIndex)|d);else{if(32===l||32===d)return 1;if(l===d&&!(h===a||h===m||o===a||o===m))return 1;this.m_rShape.setUserIndex(r,this.m_cutteeBreadcrumbsIndex,this.m_rShape.getUserIndex(r,this.m_cutteeBreadcrumbsIndex)|l),this.m_rShape.setUserIndex(e,this.m_cutteeBreadcrumbsIndex,this.m_rShape.getUserIndex(e,this.m_cutteeBreadcrumbsIndex)|d)}return 0}classifyTouchCut(e,t,s,i){const r=this.m_rShape.getPrevVertex(e),n=this.m_rShape.getNextVertex(e),h=r===c?c:this.m_rTopoGraph.getHalfEdgeConnector(t,this.m_rTopoGraph.getClusterFromVertex(r)),o=n===c?c:this.m_rTopoGraph.getHalfEdgeConnector(t,this.m_rTopoGraph.getClusterFromVertex(n)),a=s===c?c:this.m_rTopoGraph.getHalfEdgeConnector(t,this.m_rTopoGraph.getClusterFromVertex(s)),m=i===c?c:this.m_rTopoGraph.getHalfEdgeConnector(t,this.m_rTopoGraph.getClusterFromVertex(i));if(!this.m_bConsiderTouch){let t;return(t=a===h||m===h)?this.m_rShape.setUserIndex(e,this.m_cutteeBreadcrumbsIndex,this.setTbd(this.m_rShape.getUserIndex(e,this.m_cutteeBreadcrumbsIndex))):(t=a===o||m===o)&&this.m_rShape.setUserIndex(r,this.m_cutteeBreadcrumbsIndex,this.setTbd(this.m_rShape.getUserIndex(r,this.m_cutteeBreadcrumbsIndex))),t?0:1}if(h===c)return this.m_rShape.setUserIndex(e,this.m_cutteeBreadcrumbsIndex,this.setTbd(this.m_rShape.getUserIndex(e,this.m_cutteeBreadcrumbsIndex))),0;if(o===c)return this.m_rShape.setUserIndex(r,this.m_cutteeBreadcrumbsIndex,this.setTbd(this.m_rShape.getUserIndex(r,this.m_cutteeBreadcrumbsIndex))),0;if(h===o)return this.m_rShape.setUserIndex(r,this.m_cutteeBreadcrumbsIndex,this.setTbd(this.m_rShape.getUserIndex(r,this.m_cutteeBreadcrumbsIndex))),this.m_rShape.setUserIndex(e,this.m_cutteeBreadcrumbsIndex,this.setTbd(this.m_rShape.getUserIndex(e,this.m_cutteeBreadcrumbsIndex))),0;if(m!==c){if(h===m)return this.m_rShape.setUserIndex(e,this.m_cutteeBreadcrumbsIndex,this.setTbd(this.m_rShape.getUserIndex(e,this.m_cutteeBreadcrumbsIndex))),0;if(o===m)return this.m_rShape.setUserIndex(r,this.m_cutteeBreadcrumbsIndex,this.setTbd(this.m_rShape.getUserIndex(r,this.m_cutteeBreadcrumbsIndex))),0;let s=1;Gt(this.m_rTopoGraph,t,m,(t=>{if(t===h){const e=this.m_rShape.getUserIndex(r,this.m_cutteeBreadcrumbsIndex)|s;this.m_rShape.setUserIndex(r,this.m_cutteeBreadcrumbsIndex,e),s=2}else if(t===o){const t=this.m_rShape.getUserIndex(e,this.m_cutteeBreadcrumbsIndex)|s;this.m_rShape.setUserIndex(e,this.m_cutteeBreadcrumbsIndex,t),s=2}}))}else{if(h===a)return this.m_rShape.setUserIndex(e,this.m_cutteeBreadcrumbsIndex,this.setTbd(this.m_rShape.getUserIndex(e,this.m_cutteeBreadcrumbsIndex))),0;if(o===a)return this.m_rShape.setUserIndex(r,this.m_cutteeBreadcrumbsIndex,this.setTbd(this.m_rShape.getUserIndex(r,this.m_cutteeBreadcrumbsIndex))),0;let s=2;Gt(this.m_rTopoGraph,t,a,(t=>{if(t===h){const e=this.m_rShape.getUserIndex(r,this.m_cutteeBreadcrumbsIndex)|s;this.m_rShape.setUserIndex(r,this.m_cutteeBreadcrumbsIndex,e),s=1}else if(t===o){const t=this.m_rShape.getUserIndex(e,this.m_cutteeBreadcrumbsIndex)|s;this.m_rShape.setUserIndex(e,this.m_cutteeBreadcrumbsIndex,t),s=1}}))}return 0}classifyCutVertex(e,t){let s=0,i=0;for(let r=this.m_rTopoGraph.getClusterVertexIterator(t);r!==c;r=this.m_rTopoGraph.incrementVertexIterator(r)){const n=this.m_rTopoGraph.getVertexFromVertexIterator(r);if(this.m_rShape.getGeometryFromVertex(n)===this.m_cutter){i++;const r=this.m_rShape.getPrevVertex(n),h=this.m_rShape.getNextVertex(n);s+=r===c||h===c?this.classifyTouchCut(e,t,r,h):this.classifyStandardCut(e,t,r,h)}}i&&s===i&&!this.m_bConsiderTouch&&this.m_rShape.setUserIndex(e,this.m_clusterParentageIndex,this.m_IDCuttee)}cutPolylinePolyline_(){this.m_rShape.getGeometryType(this.m_cuttee),this.m_rShape.getGeometryType(this.m_cutter),this.m_rParent.m_maskLookup.length=0,this.m_rParent.m_maskLookup.length=this.m_IDBoth+1,this.m_rParent.m_maskLookup[this.m_IDBoth]=!0;for(let i=this.m_rShape.getFirstPath(this.m_cuttee);i!==c;i=this.m_rShape.getNextPath(i)){const e=this.m_rShape.getPathSize(i);let t=this.m_rShape.getFirstVertex(i);for(let s=0;s<e;++s,t=this.m_rShape.getNextVertex(t))this.m_rShape.setUserIndex(t,this.m_cutteeBreadcrumbsIndex,0);t=this.m_rShape.getFirstVertex(i);for(let s=0;s<e;++s,t=this.m_rShape.getNextVertex(t)){const e=this.m_rTopoGraph.getClusterFromVertex(t);this.m_rTopoGraph.getClusterParentage(e)===this.m_IDBoth&&this.classifyCutVertex(t,e)}}const e=(e,t)=>{let s=this.m_rShape.getUserIndex(e,this.m_cutteeBreadcrumbsIndex);const i=this.m_rTopoGraph.getHalfEdgeConnector(this.m_rTopoGraph.getClusterFromVertex(e),this.m_rTopoGraph.getClusterFromVertex(t));return(this.m_rTopoGraph.getHalfEdgeParentage(i)&this.m_IDBoth)===this.m_IDBoth&&(s|=4),s};for(let i=this.m_rShape.getFirstPath(this.m_cuttee);i!==c;i=this.m_rShape.getNextPath(i)){let t=this.m_rShape.getFirstVertex(i);const s=this.m_rShape.isClosedPath(i),r=this.m_rShape.getPathSize(i)+(s?1:0);let n=1,h=32;for(let i=this.m_rShape.getNextVertex(t);n<r;++n,t=i,i=this.m_rShape.getNextVertex(i)){const s=e(t,i);this.m_rShape.getUserIndex(t,this.m_clusterParentageIndex)===this.m_IDBoth&&(h=s),32!==h&&this.m_rShape.setUserIndex(t,this.m_cutteeBreadcrumbsIndex,h|s)}t=this.m_rShape.getLastVertex(i);let o=32;n=1;for(let i=this.m_rShape.getPrevVertex(t);n<r;++n,t=i,i=this.m_rShape.getPrevVertex(i)){const s=e(i,t);this.m_rShape.getUserIndex(t,this.m_clusterParentageIndex)===this.m_IDBoth&&(o=s),32!==o&&this.m_rShape.setUserIndex(i,this.m_cutteeBreadcrumbsIndex,o|s)}}let t=c,s=c,r=32;const n=this.m_rShape.hasSegmentParentage(),h=new f;for(let o=this.m_rShape.getFirstPath(this.m_cuttee);o!==c;o=this.m_rShape.getNextPath(o)){const e=this.m_rShape.isClosedPath(o),a=this.m_rShape.getPathSize(o)+(e?1:0);let m=1,g=this.m_rShape.getFirstVertex(o),l=c,d=!0;for(let o=this.m_rShape.getNextVertex(g);m<a;++m,o=this.m_rShape.getNextVertex(o)){let e=this.m_rShape.getUserIndex(g,this.m_cutteeBreadcrumbsIndex);8===e?e=3:(e&=-9,4&e?e=4:3&~e||(e=3)),e!==r?(t!==c&&(l=this.m_rShape.addVertex(s,g),n&&this.m_rTopoGraph.isBreakNode(this.m_rTopoGraph.getClusterFromVertex(g))&&this.m_rShape.setSegmentParentageBreakVertex(l,!0),this.m_rCutHandles.push(t),this.m_rShape.setGeometryUserIndex(t,this.m_sideIndex,r)),t=this.m_rShape.createGeometry(i.enumPolyline),s=this.m_rShape.insertPath(t,c),r=e,d=!0):this.m_rShape.getUserIndex(g,this.m_clusterParentageIndex)===this.m_IDBoth&&4!==e&&(l=this.m_rShape.addVertex(s,g),n&&this.m_rTopoGraph.isBreakNode(this.m_rTopoGraph.getClusterFromVertex(g))&&this.m_rShape.setSegmentParentageBreakVertex(l,!0),s=this.m_rShape.insertPath(t,c),d=!0),l=this.m_rShape.addVertex(s,g);const a=this.m_rTopoGraph.getClusterFromVertex(g);!d&&n&&this.m_rTopoGraph.isBreakNode(a)&&this.m_rShape.setSegmentParentageBreakVertex(l,!0);const m=this.m_rTopoGraph.getHalfEdgeFromVertex(g);if(n){const e=this.m_rTopoGraph.getSegmentParentage(m);this.m_rShape.setSegmentParentageAndBreak(l,e,d||this.m_rTopoGraph.isBreakNode(a))}this.m_rTopoGraph.isHalfEdgeCurve(m)&&(this.m_rTopoGraph.querySegmentXY(m,h),this.m_rShape.setSegmentToIndex(this.m_rShape.getVertexIndex(l),h.get().clone())),g=o,d=!1}l=this.m_rShape.addVertex(s,g),n&&this.m_rTopoGraph.isBreakNode(this.m_rTopoGraph.getClusterFromVertex(g))&&this.m_rShape.setSegmentParentageBreakVertex(l,!0),this.m_rCutHandles.push(t),this.m_rShape.setGeometryUserIndex(t,this.m_sideIndex,r),t=c,s=c,r=32}}}function Vt(e,t,s){return new Et(s).linesToPolygonsImpl(e,t)}function vt(e,t,s,r,o){if(r&&(r.m_reason=0,r.m_vertexIndex1=-1,r.m_vertexIndex2=-1),e.isEmpty())return 5;const a=e.getGeometryType();if(a===i.enumPoint)return wt(e,r);const m=ie(t,e,!1).total();if(a===i.enumEnvelope){const t=e,s=new de;return t.queryEnvelope(s),s.isDegenerate(m)?(r&&(r.m_reason=4,r.m_vertexIndex1=-1,r.m_vertexIndex2=-1),0):5}if(h(a)){const i=e,n=new E({vd:i.getDescription()});return n.addSegment(i,!0),Tt(n,t,s,r,o)}const g=[0],l=e.getImpl().getIsSimple(m,g);let d=s?-1:l;if(q(d)||0===d)return d;const _=new Xt(e,t,d,o,!1);a===i.enumMultiPoint||a===i.enumPolyline||a===i.enumPolygon?d=_.isSimplePlanarImpl():n("");return e.getImpl().setIsSimple(d,m),r&&r.assign(_.m_nonSimpleResult),d}function Nt(e,t,s,r,o){if(r&&(r.m_reason=0,r.m_vertexIndex1=-1,r.m_vertexIndex2=-1),e.isEmpty())return 5;const a=e.getGeometryType();if(a===i.enumPoint)return wt(e,r);const m=ie(t,e,!1).total();if(a===i.enumEnvelope){const t=e,s=new de;return t.queryEnvelope(s),s.isDegenerate(m)?(r&&(r.m_reason=4,r.m_vertexIndex1=-1,r.m_vertexIndex2=-1),0):5}if(h(a)){const i=e,n=new E({vd:i.getDescription()});return n.addSegment(i,!0),Nt(n,t,s,r,o)}l(a),d(a)||p("OGC simplify is not implemented for this geometry type");const g=[0],_=e.getImpl().getIsSimple(m,g);let u=s?-1:_;if(5===u||0===u)return u;const c=new Xt(e,t,u,o,!0);a===i.enumMultiPoint||a===i.enumPolyline||a===i.enumPolygon?(u=c.isSimplePlanarImpl(),q(u)&&(u=5)):n("");return e.getImpl().setIsSimple(u,m),r&&r.assign(c.m_nonSimpleResult),u}function Tt(e,t,s,r,o){if(r&&(r.m_reason=0,r.m_vertexIndex1=-1,r.m_vertexIndex2=-1),e.isEmpty())return 5;const a=e.getGeometryType();if(a===i.enumPoint)return wt(e,r);const m=ie(t,e,!1).total();if(a===i.enumEnvelope){const t=e,s=de.constructEmpty();return t.queryEnvelope(s),s.isDegenerate(m)?(r&&(r.m_reason=4,r.m_vertexIndex1=-1,r.m_vertexIndex2=-1),0):5}if(h(a)){const i=e,n=new E({vd:i.getDescription()});return n.addSegment(i,!0),Tt(n,t,s,r,o)}const g=[0],l=e.getImpl().getIsSimple(m,g);let d=s?-1:l;if(-1!==d)return d;const _=new Xt(e,t,d,o,!1);return a===i.enumMultiPoint?d=_.multipointIsSimpleAsFeature():a===i.enumPolyline?d=_.polylineIsSimpleAsFeature():a===i.enumPolygon?d=_.polygonIsSimpleAsFeature():n(""),e.getImpl().setIsSimple(d,m),r&&r.assign(_.m_nonSimpleResult),d}function Ft(e,t,s,r){if(e.isEmpty())return e;const o=e.getGeometryType();if(o===i.enumPoint){const t=new w;if(wt(e,t),3===t.m_reason){const t=e.clone();return t.replaceNaNs(1,0),t}return 2===t.m_reason?e.createInstance():e}if(o===i.enumEnvelope){const s=ie(t,e,!0).total(),i=e,r=de.constructEmpty();return i.queryEnvelope(r),r.isDegenerate(s)?i.createInstance():e}if(h(o)){const i=e,n=new E({vd:i.getDescription()});return n.addSegment(i,!0),Ft(n,t,s,r)}l(o);const a=ie(t,e,!1).total(),m=[0],g=e.getImpl().getIsSimple(a,m),d=s?-1:g;if(q(d)){if(o===i.enumPolygon&&0!==e.getFillRule()){const t=e.clone();return t.setFillRule(0),t}return e}if((o===i.enumMultiPoint||o===i.enumPolyline)&&d>=1)return e;const _=new Xt(e,t,d,r,!1);let p;return o===i.enumMultiPoint?p=_.multipointSimplifyAsFeature():o===i.enumPolyline?p=_.polylineSimplifyAsFeature():o===i.enumPolygon?p=_.polygonSimplifyAsFeature():n(""),p}function bt(e,t,s,r){if(e.isEmpty())return e;const n=e.getGeometryType();if(n===i.enumPoint){const t=new w;if(wt(e,t),3===t.m_reason){const t=e.clone();return t.replaceNaNs(1,0),t}return 2===t.m_reason?e.createInstance():e}if(n===i.enumEnvelope){const s=e,i=new de;s.queryEnvelope(i);const r=ie(t,e,!0).total();return i.isDegenerate(r)?s.createInstance():e}if(h(n)){const i=e,n=new E({vd:i.getDescription()});return n.addSegment(i,!0),bt(n,t,s,r)}l(n),d(n)||p("OGC simplify is not implemented for this geometry type");const o=ie(t,e,!1).total(),a=[0],m=e.getImpl().getIsSimple(o,a),g=s?-1:m;if(5===g){if(n===i.enumPolygon&&0!==e.getFillRule()){const t=e.clone();return t.setFillRule(0),t}return e}return ht(e,ie(t,e,!0),!1,g,r,0,!0)}function wt(e,t){const s=e.getX(),i=e.getY();if(!Number.isFinite(s)||!Number.isFinite(i))return t&&(t.m_reason=2,t.m_vertexIndex1=-1,t.m_vertexIndex2=-1),0;if(e.hasAttribute(1)){const s=e.getZ();if(!Number.isFinite(s))return t&&(t.m_reason=Number.isNaN(s)?3:2,t.m_vertexIndex1=-1,t.m_vertexIndex2=-1),0}return 5}class Ut{constructor(){this.m_segment=null,this.m_vertexIndex=-1,this.m_pathIndex=-1,this.m_flags=0}setReversed(e){this.m_flags&=-2,this.m_flags=this.m_flags|(e?1:0)}getReversed(){return!!(1&this.m_flags)}getRightSide(){return this.getReversed()?0:1}}function kt(){return{x:-1,y:-1,ipath:-1,ivertex:-1,ipolygon:-1}}function Dt(e,t,s,i,r){return{x:e,y:t,ipath:s,ivertex:i,ipolygon:r}}function Bt(e,t){return e.x===t.x&&e.y===t.y&&e.ipath===t.ipath&&e.ivertex===t.ivertex&&e.ipolygon===t.ipolygon}function At(e,t){e.x=t.x,e.y=t.y,e.ipath=t.ipath,e.ivertex=t.ivertex,e.ipolygon=t.ipolygon}function Ot(){return{x:-1,y:-1,ipath:-1,ivertex:-1,bBoundary:!1,bEndPoint:!1}}function Rt(e,t,s,i,r,n){return{x:e,y:t,ipath:s,ivertex:i,bBoundary:r,bEndPoint:n}}function Lt(e,t){e.x=t.x,e.y=t.y,e.ipath=t.ipath,e.ivertex=t.ivertex,e.bBoundary=t.bBoundary,e.bEndPoint=t.bEndPoint}class Yt extends le{constructor(e){super(),this.m_helper=e}compare(e,t,s){const i=e.getElement(s),r=this.m_helper.m_xy.read(2*t)-this.m_helper.m_xy.read(2*i);return r<0?-1:r>0?1:0}}class Mt extends le{constructor(e){super(),this.m_helper=e}compare(e,t,s){const i=e.getElement(s),r=this.m_helper.m_edges[t],n=this.m_helper.m_edges[i],h=r.getReversed(),o=n.getReversed();let a=r.m_segment.intersectionOfYMonotonicWithAxisX(this.m_helper.m_yScanline,0),m=n.m_segment.intersectionOfYMonotonicWithAxisX(this.m_helper.m_yScanline,0);if(a===m){const e=h?r.m_segment.getStartY():r.m_segment.getEndY(),t=o?n.m_segment.getStartY():n.m_segment.getEndY(),s=Math.min(e,t);let i=.5*(s-this.m_helper.m_yScanline)+this.m_helper.m_yScanline;i===this.m_helper.m_yScanline&&(i=s),a=r.m_segment.intersectionOfYMonotonicWithAxisX(i,0),m=n.m_segment.intersectionOfYMonotonicWithAxisX(i,0)}return a<m?-1:a>m?1:0}}class Xt{constructor(e,t,s,i,r){this.m_multiVertexGeom=null,this.m_edges=[],this.m_freeEdges=[],this.m_lineEdgesRecycle=[],this.m_newEdges=[],this.m_recycledSegIter=null,this.m_crossOverHelperList=new re,this.m_progressTracker=null,this.m_progressCounter=0,this.m_AET=new ee,this.m_xyToNode1=null,this.m_xyToNode2=null,this.m_pathOrientations=null,this.m_pathParentage=null,this.m_xy=null,this.m_pairs=[],this.m_pairIndices=null,this.m_pathsForOGCTests=[],this.m_curveStitcher=null,this.m_editShape=null,this.m_multiPathStitcher=null,this.m_nonSimpleResult=new w,this.m_progressCounter=0,this.m_progressTracker=i,this.m_geometry=e,this.m_knownSimpleResult=s,this.m_sr=t;const n=ie(t,e,!1);this.m_toleranceIsSimple=n,this.m_toleranceIsSimpleClustering=z(n),this.m_toleranceIsSimpleCracking=ne(n),this.m_toleranceSimplify=ie(t,e,!0),this.m_description=this.m_geometry.getDescription(),this.m_attributeCount=this.m_description.getAttributeCount(),this.m_bOGCRestrictions=r,this.m_bPlanarSimplify=this.m_bOGCRestrictions,this.m_unknownOrientationPathCount=-1,this.m_yScanline=0,this.m_progressCounter=0}isSimplePlanarImpl(){if(this.m_bPlanarSimplify=!0,!this.checkStructure())return 0;const e=this.m_geometry.getGeometryType();return a(e)&&!this.checkDegenerateSegments(!1)?0:this._CheckClustering()?a(e)?this._CheckCracking()?this.m_geometry.getGeometryType()===i.enumPolyline?this.checkSelfIntersectionsPolylinePlanar()?4:0:this._CheckSelfIntersections()?this._CheckValidRingOrientation():0:0:5:0}isSimplePlanarImpl3D(){return o(0),7}generateSortedPairs(e){let t=null;a(e.getGeometryType())&&(t=e);const s=(this.m_bPlanarSimplify||this.m_bOGCRestrictions)&&null!==t,i=e.getPointCount();this.m_xy=e.getAttributeStreamRef(0),this.m_pairs.length=0,this.m_pairIndices=new K(0),s&&(this.m_pathsForOGCTests.length=0);let r=0;for(let o=0;o<i;o++)if(this.m_pairs.push(2*o),this.m_pairs.push(2*o+1),this.m_pairIndices.add(2*o),this.m_pairIndices.add(2*o+1),s){for(;o>=t.getPathEnd(r);)r++;this.m_pathsForOGCTests.push(r)}const n=new he,h={parent:this,workPt:new _e,userSort(e,t,i){i.sort(e,t,((e,t)=>this.parent.compareVerticesForPlanarClustering(e,t,s)))},getValue(e){const t=this.parent.m_pairs[e],s=t>>1;this.parent.m_xy.queryPoint2D(2*s,this.workPt);return this.workPt.y+(1&t?this.parent.m_toleranceIsSimpleClustering:-this.parent.m_toleranceIsSimpleClustering)}};n.sort(this.m_pairIndices,0,2*i,h)}_TestToleranceDistancePlanar(e,t){const s=this.m_xy.read(2*e),i=this.m_xy.read(2*e+1),r=this.m_xy.read(2*t),n=this.m_xy.read(2*t+1);if(!!U(s,i,r,n,this.m_toleranceIsSimpleClustering*this.m_toleranceIsSimpleClustering)){if(0===this.m_geometry.getDimension())return!1;return s===r&&i===n}return!0}checkStructure(){const e=this.m_geometry.getGeometryType();if(a(e)){const e=this.m_geometry.getImpl(),t=this.m_geometry.getGeometryType()===i.enumPolygon?3:2;for(let s=0,i=e.getPathCount();s<i;s++)if(e.getPathSize(s)<t){if(e.hasNonLinearSegments()&&e.hasNonLinearSegmentsPath(s)&&e.getPathSize(s)>0)continue;return this.m_nonSimpleResult=new w(1,s,0),!1}}if(d(e)){const e=this.m_geometry.getImpl(),t=e.getAttributeStreamRef(0);for(let s=0,i=e.getPointCount();s<i;s++){if(!t.readPoint2D(2*s).isFinite())return this.m_nonSimpleResult=new w(2,s,0),!1}if(this.m_geometry.hasAttribute(1)){const t=e.getAttributeStreamRef(1);for(let s=0,i=e.getPointCount();s<i;s++){const e=t.read(s);if(!Number.isFinite(e))return Number.isNaN(e)?this.m_nonSimpleResult=new w(3,s,0):this.m_nonSimpleResult=new w(2,s,0),!1}}}return!0}checkDegenerateSegments(e){const t=this.m_geometry.getImpl(),s=t.querySegmentIterator(),i=t.hasAttribute(1),r=i?oe(this.m_sr,t,!1).total():0,n=t.hasNonLinearSegments(),h=this.m_toleranceIsSimple.total();for(;s.nextPath();)for(;s.hasNextSegment();){const t=s.nextSegment();let o=t.calculateLowerLength2D();if(!(o>h)&&!(n&&t.isCurve()&&(o=t.calculateLength2D(),o>h))){if(e&&i){const e=t.getStartAttributeAsDbl(1,0),s=t.getEndAttributeAsDbl(1,0);if(Math.abs(s-e)>r)continue}return this.m_nonSimpleResult=new w(4,s.getStartPointIndex(),-1),!1}}return!0}checkDegenerateSegments3D(){return o(0),!1}_CheckClustering(){const e=this.m_geometry.getImpl();this.generateSortedPairs(e);const t=e.getPointCount();this.m_AET.clear(),this.m_AET.setComparator(new Yt(this)),this.m_AET.setCapacity(t);for(let s=0,i=2*t;s<i;s++){this.progress_();const e=this.m_pairIndices.read(s),t=this.m_pairs[e],i=t>>1;if(1&t){const e=this.m_AET.search(i),t=this.m_AET.getPrev(e),s=this.m_AET.getNext(e);if(this.m_AET.deleteNode(e),t!==ee.st_nullNode()&&s!==ee.st_nullNode()&&!this._TestToleranceDistancePlanar(this.m_AET.getElement(t),this.m_AET.getElement(s)))return this.m_nonSimpleResult=new w(5,this.m_AET.getElement(t),this.m_AET.getElement(s)),!1}else{const e=this.m_AET.addElement(i),t=this.m_AET.getPrev(e);if(t!==ee.st_nullNode()&&!this._TestToleranceDistancePlanar(this.m_AET.getElement(t),i))return this.m_nonSimpleResult=new w(5,i,this.m_AET.getElement(t)),!1;const s=this.m_AET.getNext(e);if(s!==ee.st_nullNode()&&!this._TestToleranceDistancePlanar(this.m_AET.getElement(s),i))return this.m_nonSimpleResult=new w(5,i,this.m_AET.getElement(s)),!1}}return!0}_CheckCracking(){const e=this.m_geometry.getImpl(),t=e.getPointCount();return!e.hasNonLinearSegments()&&t<10?this._CheckCrackingBrute():this._CheckCrackingPlanesweep()}_CheckCrackingPlanesweep(){if(this.m_editShape=new u,this.m_editShape.addGeometry(this.m_geometry),this.m_editShape.hasCurves()){this.m_curveStitcher=new F;const e=de.constructEmpty();this.m_geometry.queryEnvelope(e);const t=G(this.m_toleranceSimplify.total(),e),s=new w;if(k(this.m_editShape,t,this.m_toleranceSimplify.total(),12e3,s,this.m_curveStitcher,null,this.m_progressTracker),0!==s.m_reason)return this.m_editShape=null,this.m_nonSimpleResult.assign(s),!1}const e=new w;return D(!1,this.m_editShape,this.m_toleranceIsSimpleCracking,e,this.m_progressTracker)?(null!=this.m_curveStitcher?(e.m_vertexIndex1=this.m_curveStitcher.getOriginalVertexIndex(this.m_editShape,e.m_vertexIndex1),e.m_vertexIndex2=this.m_curveStitcher.getOriginalVertexIndex(this.m_editShape,e.m_vertexIndex2),this.m_curveStitcher=null):(e.m_vertexIndex1=this.m_editShape.getVertexIndex(e.m_vertexIndex1),e.m_vertexIndex2=this.m_editShape.getVertexIndex(e.m_vertexIndex2)),this.m_editShape=null,this.m_nonSimpleResult.assign(e),!1):(null==this.m_curveStitcher&&(this.m_editShape=null),!0)}_CheckCrackingBrute(){const e=this.m_geometry.getImpl(),t=e.querySegmentIterator(),s=e.querySegmentIterator();for(;t.nextPath();)for(;t.hasNextSegment();){const e=t.nextSegment();if(!t.isLastSegmentInPath()||!t.isLastPath()){s.resetTo(t);do{for(;s.hasNextSegment();){const i=s.nextSegment(),r=y(!0,e,i,this.m_toleranceIsSimpleCracking,!0);if(r){const e=2===r?7:6;return this.m_nonSimpleResult=new w(e,t.getStartPointIndex(),s.getStartPointIndex()),!1}}}while(s.nextPath())}}return!0}_CheckSelfIntersections(){let e=this.m_geometry.getImpl();null!==this.m_curveStitcher&&(this.m_multiPathStitcher=this.m_editShape.getGeometry(this.m_editShape.getFirstGeometry()),e=this.m_multiPathStitcher.getImpl(),this.generateSortedPairs(e)),this.m_edges.length=0,this.m_lineEdgesRecycle.length=0,this.m_recycledSegIter=e.querySegmentIterator(),this.m_recycledSegIter.setCirculator(!0);const t=new Array(0),s=e.getPointCount();let i=Number.NaN,r=0;for(let n=0,h=2*s;n<h;n++){this.progress_();const e=this.m_pairIndices.read(n),s=this.m_pairs[e];if(1&s)continue;const h=s>>1,o=this.m_xy.read(2*h),a=this.m_xy.read(2*h+1);if(t.length&&(o!==i||a!==r)){if(!this.processBunchForSelfIntersectionTest(t))return!1;t.length=0}t.push(h),i=o,r=a}return!!this.processBunchForSelfIntersectionTest(t)}checkSelfIntersectionsPolylinePlanar(){const e=this.m_geometry.getImpl(),t=[];for(let h=0,o=e.getPathCount();h<o;h++)t.push(e.isClosedPathInXYPlane(h));const s=Ot();let i,r,n;{const h=this.m_pairIndices.read(0),o=this.m_pairs[h]>>1,a=this.m_xy.readPoint2D(2*o),m=this.m_pathsForOGCTests[o];i=t[m],r=e.getPathStart(m),n=e.getPathEnd(m)-1,s.bEndPoint=o===r||o===n,this.m_bOGCRestrictions?s.bBoundary=!i&&s.bEndPoint:s.bBoundary=s.bEndPoint,s.ipath=m,s.x=a.x,s.y=a.y,s.ivertex=o}for(let h=1,o=this.m_pairIndices.size();h<o;h++){const o=this.m_pairIndices.read(h),a=this.m_pairs[o];if(1&a)continue;const m=a>>1,g=this.m_xy.readPoint2D(2*m),l=this.m_pathsForOGCTests[m];let d;l!==s.ipath&&(i=t[l],r=e.getPathStart(l),n=e.getPathEnd(l)-1);const _=m===r||m===n;d=this.m_bOGCRestrictions?!i&&_:_;const p=Rt(g.x,g.y,l,m,d,_);if(p.x===s.x&&p.y===s.y)if(this.m_bOGCRestrictions){if(!(p.bBoundary&&s.bBoundary||p.ipath===s.ipath&&p.bEndPoint&&s.bEndPoint))return this.m_nonSimpleResult=new w(10,p.ivertex,s.ivertex),!1}else if(!p.bEndPoint||!s.bEndPoint)return this.m_nonSimpleResult=new w(7,p.ivertex,s.ivertex),!1;Lt(s,p)}return!0}checkSelfIntersectionsPolylinePlanar3D(e){return o(0),!1}checkSelfIntersectionsPolygonsOGC(){const e=this.m_geometry.getImpl(),t=[];let s=-1,i=!1;for(let g=0,l=e.getPathCount();g<l;g++)e.isExteriorRingOGC(g)&&(i=!1,s++,g<l-1&&(e.isExteriorRingOGC(g+1)||(i=!0))),t.push(i?s:-1);const r=kt();{const e=this.m_pairIndices.read(0),s=this.m_pairs[e]>>1,i=this.m_xy.readPoint2D(2*s),n=this.m_pathsForOGCTests[s];r.ipath=n,r.x=i.x,r.y=i.y,r.ivertex=s,r.ipolygon=t[n]}const n=[];for(let g=1,l=this.m_pairIndices.size();g<l;g++){const e=this.m_pairIndices.read(g),s=this.m_pairs[e];if(1&s)continue;const i=s>>1,h=this.m_xy.readPoint2D(2*i),o=this.m_pathsForOGCTests[i],a=Dt(h.x,h.y,o,i,t[o]);if(a.x===r.x&&a.y===r.y){if(a.ipath===r.ipath)return this.m_nonSimpleResult=new w(11,a.ivertex,r.ivertex),!1;t[a.ipath]>=0&&t[a.ipath]===t[r.ipath]&&(0!==n.length&&Bt(n.at(-1),r)||n.push({...r}),n.push(a))}At(r,a)}if(0===n.length)return!0;const h=new re(!0);t.fill(-1);let o=-1;const a=new _e;for(let g=0,l=n.length;g<l;g++){const e=n[g];e.x===a.x&&e.y===a.y||(o=h.createList(0),a.x=e.x,a.y=e.y);let s=t[e.ipath];-1===s&&(s=h.createList(2),t[e.ipath]=s),h.addElement(s,o),h.addElement(o,s)}const m=[];for(let g=h.getFirstList();-1!==g;g=h.getNextList(g)){const e=h.getListData(g);if(1&e||!(2&e))continue;let s=-1;for(m.push(g),m.push(-1);m.length;){const e=m.at(-1);m.pop();const t=m.at(-1);m.pop();const i=h.getListData(t);if(1&i){s=2&i?t:e;break}h.setListData(t,1|i);for(let s=h.getFirst(t);-1!==s;s=h.getNext(s)){const i=h.getData(s);i!==e&&(m.push(i),m.push(t))}}if(-1!==s){const e=t.indexOf(s);return this.m_nonSimpleResult=new w(12,e,-1),!1}}return!0}_CheckValidRingOrientation(){const e=null!==this.m_multiPathStitcher?this.m_multiPathStitcher.getImpl():this.m_geometry.getImpl();if(e.calculateArea2D()<=0)return this.m_nonSimpleResult=new w(8,1===e.getPathCount()?1:-1,-1),0;if(1===e.getPathCount())return this.m_bOGCRestrictions&&!this.checkSelfIntersectionsPolygonsOGC()?0:4;this.m_pathOrientations=new ae(e.getPathCount(),0),this.m_pathParentage=new K(e.getPathCount(),-1);let t=-1,s=0;for(let n=0,h=e.getPathCount();n<h;n++){const i=e.calculateRingArea2D(n);if(this.m_pathOrientations.write(n,i<0?0:8),i>0)t=n,s=i;else{if(0===i)return this.m_nonSimpleResult=new w(8,n,-1),0;if((t<0||s<Math.abs(i))&&(this.m_nonSimpleResult=new w(9,n,-1),this.m_bOGCRestrictions))return 0;this.m_pathParentage.write(n,t)}}this.m_unknownOrientationPathCount=e.getPathCount(),this.m_newEdges.length=0;const i=e.getPointCount();this.m_yScanline=Number.NaN;const r=[];this.m_xyToNode1=new K(i,ee.st_nullNode()),this.m_xyToNode2=new K(i,ee.st_nullNode()),this.m_freeEdges.length=0,this.m_AET.clear(),this.m_AET.setComparator(new Mt(this));for(let n=0,h=2*i;this.m_unknownOrientationPathCount>0&&n<h;n++){const e=this.m_pairIndices.read(n),t=this.m_pairs[e];if(1&t)continue;const s=t>>1,i=this.m_xy.read(2*s+1);if(i!==this.m_yScanline&&r.length){if(!this.processBunchForRingOrientationTest(r))return 0;r.length=0}r.push(s),this.m_yScanline=i}return this.m_unknownOrientationPathCount>0&&!this.processBunchForRingOrientationTest(r)?0:this.m_bOGCRestrictions?0!==this.m_nonSimpleResult.m_reason?0:this.checkSelfIntersectionsPolygonsOGC()?5:0:0===this.m_nonSimpleResult.m_reason?4:3}processBunchForSelfIntersectionTest(e){if(1===e.length)return!0;for(let h=0,o=e.length;h<o;h++){const t=e[h];this.m_recycledSegIter.resetToVertex(t,-1);const s=this.m_recycledSegIter.previousSegment();this.m_edges.push(this.createEdge(s,t,this.m_recycledSegIter.getPathIndex(),!0)),this.m_recycledSegIter.nextSegment();const i=this.m_recycledSegIter.nextSegment();this.m_edges.push(this.createEdge(i,t,this.m_recycledSegIter.getPathIndex(),!1))}this.m_edges.sort(((e,t)=>this.edgeAngleCompare(e,t)));let t=this.m_crossOverHelperList.getFirstList();-1===t&&(t=this.m_crossOverHelperList.createList(0)),this.m_crossOverHelperList.reserveNodes(this.m_edges.length);for(let h=0,o=this.m_edges.length;h<o;h++)this.m_crossOverHelperList.addElement(t,h);let s=!0,i=-1,r=-1;for(;s;){s=!1;let e=this.m_crossOverHelperList.getFirst(t);if(-1===e)break;let n=this.m_crossOverHelperList.getNext(e);for(;-1!==n;){const h=this.m_crossOverHelperList.getData(e),o=this.m_crossOverHelperList.getData(n);if(i=this.m_edges[h].m_vertexIndex,r=this.m_edges[o].m_vertexIndex,i!==r)e=n,n=this.m_crossOverHelperList.getNext(e);else if(s=!0,this.m_crossOverHelperList.deleteElement(t,e),e=this.m_crossOverHelperList.getPrev(n),n=this.m_crossOverHelperList.deleteElement(t,n),-1===n||-1===e)break}}const n=this.m_crossOverHelperList.getListSize(t);if(this.m_crossOverHelperList.clear(t),n>0)return this.m_nonSimpleResult=new w(7,i,r),!1;for(let h=0,o=e.length;h<o;h++)this.recycleEdge(this.m_edges[h]);return this.m_edges.length=0,!0}processBunchForRingOrientationTest(e){for(let t=0,s=e.length;t<s;t++){const s=e[t];let i=this.m_xyToNode1.read(s);if(i!==ee.st_nullNode()){const e=this.m_AET.getElement(i);this.m_freeEdges.push(e),this.m_AET.deleteNode(i),this.recycleEdge(this.m_edges[e]),this.m_edges[e]=null,this.m_xyToNode1.write(s,ee.st_nullNode())}if(i=this.m_xyToNode2.read(s),i!==ee.st_nullNode()){const e=this.m_AET.getElement(i);this.m_freeEdges.push(e),this.m_AET.deleteNode(i),this.recycleEdge(this.m_edges[e]),this.m_edges[e]=null,this.m_xyToNode2.write(s,ee.st_nullNode())}}for(let t=0,s=e.length;t<s;t++){const s=e[t];this.m_recycledSegIter.resetToVertex(s,-1);const i=this.m_recycledSegIter.previousSegment();if(i.getStartY()>i.getEndY()){const e=this.m_recycledSegIter.getStartPointIndex(),t=this.createEdge(i,s,this.m_recycledSegIter.getPathIndex(),!0);let r;this.m_freeEdges.length>0?(r=this.m_freeEdges.at(-1),this.m_freeEdges.pop(),this.m_edges[r]=t):(r=this.m_edges.length,this.m_edges.push(t));const n=this.m_AET.addElement(r);this.m_xyToNode1.read(e)===ee.st_nullNode()?this.m_xyToNode1.write(e,n):this.m_xyToNode2.write(e,n),3&this.m_pathOrientations.read(this.m_recycledSegIter.getPathIndex())||this.m_newEdges.push(n)}this.m_recycledSegIter.nextSegment();const r=this.m_recycledSegIter.nextSegment();if(r.getStartY()<r.getEndY()){const e=this.m_recycledSegIter.getEndPointIndex(),t=this.createEdge(r,s,this.m_recycledSegIter.getPathIndex(),!1);let i;this.m_freeEdges.length>0?(i=this.m_freeEdges.at(-1),this.m_freeEdges.pop(),this.m_edges[i]=t):(i=this.m_edges.length,this.m_edges.push(t));const n=this.m_AET.addElement(i);this.m_xyToNode1.read(e)===ee.st_nullNode()?this.m_xyToNode1.write(e,n):this.m_xyToNode2.write(e,n),3&this.m_pathOrientations.read(this.m_recycledSegIter.getPathIndex())||this.m_newEdges.push(n)}}for(let t=0,s=this.m_newEdges.length;t<s&&this.m_unknownOrientationPathCount>0;t++){const e=this.m_newEdges[t],s=this.m_AET.getElement(e),i=this.m_edges[s].m_pathIndex;if(!(3&this.m_pathOrientations.read(i))){let t=-1,s=this.m_AET.getPrev(e),i=e,r=0;{let e=-1,n=null,h=-1,o=0;for(;s!==ee.st_nullNode()&&(e=this.m_AET.getElement(s),n=this.m_edges[e],h=n.m_pathIndex,o=this.m_pathOrientations.read(h),!(3&o));)i=s,s=this.m_AET.getPrev(s);s===ee.st_nullNode()?(r=1,s=i):(t=1==(3&o)?h:this.m_pathParentage.read(h),r=n.getRightSide()?0:1,s=this.m_AET.getNext(s))}do{const e=this.m_AET.getElement(s),n=this.m_edges[e],h=n.m_pathIndex;let o=this.m_pathOrientations.read(h);if(!(3&o)){if(r!==n.getRightSide())return this.m_nonSimpleResult=new w(8,h,-1),!1;const e=r&&!n.getReversed()?1:2;if(o=-4&o|e,this.m_pathOrientations.write(h,o),2===e&&0===this.m_nonSimpleResult.m_reason){const e=this.m_pathParentage.read(h);if(e!==t&&(this.m_nonSimpleResult=new w(9,h,e),this.m_bOGCRestrictions))return!1}if(this.m_unknownOrientationPathCount--,!this.m_unknownOrientationPathCount)return!0}t=1==(3&o)?h:this.m_pathParentage.read(h),i=s,s=this.m_AET.getNext(s),r=r?0:1}while(i!==e)}}return this.m_newEdges.length=0,!0}createEdge(e,t,s,r){let n;return e.getGeometryType()===i.enumLine?n=this.createEdgeLine(e):(n=new Ut,n.m_segment=e.clone()),n.m_vertexIndex=t,n.m_pathIndex=s,n.m_flags=0,n.setReversed(r),n}createEdgeLine(e){let t;return this.m_lineEdgesRecycle.length>0?(t=this.m_lineEdgesRecycle.at(-1),this.m_lineEdgesRecycle.pop(),e.copyTo(t.m_segment)):(t=new Ut,t.m_segment=e.clone()),t}recycleEdge(e){e.m_segment.getGeometryType()===i.enumLine&&this.m_lineEdgesRecycle.push(e)}static isShortSegment(e,t,s,i){let r=e.calculateLowerLength2D();if(r<=s){let n=!0;if(e.isCurve()&&(r=e.calculateLength2D(),n=r<=s),n){if(t){let t=e.getEndAttributeAsDbl(1,0);Number.isNaN(t)&&(t=0);let s=e.getStartAttributeAsDbl(1,0);return Number.isNaN(s)&&(s=0),Math.abs(s-t)<=i}return!0}return!1}return!1}static isShortSegmentPoints(e,t,s,i,r){if(s){const s=e.getXYZ(),n=t.getXYZ();return me(s,n,i,r)}{const s=e.getXY(),r=t.getXY();return _e.sqrDistance(s,r)<=i*i}}removeDegenerateSegmentsFromCurvedPath(e,t,s,i){const r=e.hasAttribute(1),n=e.querySegmentIterator();n.resetToPath(t),o(n.nextPath());const h=this.m_toleranceSimplify.total();let a=!1,m=!0;const g=new $,l=new $,d=new _e;for(;n.hasNextSegment();){this.progress_();const e=n.nextSegment();if(Xt.isShortSegment(e,r,h,s))if(a){if(e.queryEnd(l),Xt.isShortSegmentPoints(g,l,r,h,s))continue;m&&(i.startPathPoint(g),m=!1),e.queryEnd(g),i.lineToPoint(g),a=!1}else d.assign(e.getStartXY()),e.queryStart(g),a=!0;else if(a)if(e.isCurve()){const t=e.clone();if(t.setCoordsForIntersector(d,e.getEndXY(),!1),t.setStart(g),Xt.isShortSegment(t,r,h,s))continue;i.addSegment(t,m),m=!1,a=!1}else{if(e.queryEnd(l),Xt.isShortSegmentPoints(g,l,r,h,s))continue;m&&(i.startPathPoint(g),m=!1),i.lineToPoint(l),a=!1}else i.addSegment(e,m),m=!1}if(m)return;if(!a)return;e.isClosedPath(t)?e.getPointByVal(e.getPathStart(t),g):e.getPointByVal(e.getPathEnd(t)-1,g);const _=i.querySegmentIterator();_.resetToLastPath(),_.resetToLastSegment();const p=i.getDescription().getAttributeCount()>1;for(o(_.previousPath());_.hasPreviousSegment();){const e=_.previousSegment();if(e.isCurve()){const t=e.clone();if(t.setCoordsForIntersector(e.getStartXY(),g.getXY(),!1),!Xt.isShortSegment(t,r,h,s)){p&&t.setEnd(g);const e=_.getEndPointIndex();for(let t=i.getPointCount()-1;t>=e;t--)i.removePoint(t);return void i.addSegment(t,!1)}}else if(e.queryStart(l),!Xt.isShortSegmentPoints(l,g,r,h,s)){const e=_.getEndPointIndex();for(let t=i.getPointCount()-1;t>=e;t--)i.removePoint(t);return void i.lineToPoint(g)}}i.removePath(i.getPathCount()-1)}multipointIsSimpleAsFeature(){if(!this.checkStructure())return 0;const e=this.m_geometry.getImpl();this.m_multiVertexGeom=e;const t=e.getPointCount(),s=new Array(t);for(let i=0;i<t;i++)s[i]=i;s.sort(((e,t)=>this.compareVerticesMultiPoint(e,t)));for(let i=1;i<t;i++)if(0===this.compareVerticesMultiPoint(s[i-1],s[i]))return this.m_nonSimpleResult=new w(5,s[i-1],s[i]),0;return 1}polylineIsSimpleAsFeature(){return this.checkStructure()&&this.checkDegenerateSegments(!0)?1:0}polygonIsSimpleAsFeature(){return this.isSimplePlanarImpl()}multipointSimplifyAsFeature(){let e=this.m_geometry.getImpl();const t=Xt.hasNanZs(e);let s,i=this.m_geometry;t&&(s=this.m_geometry.clone(),e=s.getImpl(),s.replaceNaNs(1,ge.getDefaultValue(1)),i=s),this.m_multiVertexGeom=e;const r=e.getPointCount(),n=new Array(r);for(let l=0;l<r;l++)n[l]=l;n.sort(((e,t)=>this.compareVerticesMultiPoint(e,t)));const h=new Array(r);h.fill(!1);let o=-1;for(let l=0;l<r;l++){const t=n[l];e.getXY(t).isFinite()&&((o<0||0!==this.compareVerticesMultiPoint(o,t))&&(h[t]=!0),o=t)}const a=this.m_geometry.createInstance();let m=0,g=0;for(let l=0;l<r;l++)h[l]?g=l+1:(m<g&&a.addPoints(i,m,g),m=l+1);return m<g&&a.addPoints(i,m,g),a.getImpl().setIsSimple(1,this.m_toleranceSimplify.total()),a}polylineSimplifyAsFeature(){const e=this.m_geometry.getImpl(),t=e.querySegmentIterator(),s=e.querySegmentIterator(),i=this.m_geometry.createInstance(),r=this.m_geometry,n=e.hasAttribute(1),h=n?oe(this.m_sr,e,!0).total():0,o=[],a=[];let m=null;n&&(m=e.getAttributeStreamRef(1));const g=new $,l=e.hasNonLinearSegments(),d=this.m_toleranceSimplify.total();for(;t.nextPath();){if(s.nextPath(),e.getPathSize(t.getPathIndex())<2)continue;if(l&&e.hasNonLinearSegmentsPath(t.getPathIndex())){this.removeDegenerateSegmentsFromCurvedPath(e,t.getPathIndex(),h,i);continue}s.resetToLastSegment();let _=0,p=0,u=!0,c=!0;for(;t.hasNextSegment();){this.progress_();const i=t.nextSegment(),r=s.previousSegment();if(t.getStartPointIndex()>s.getStartPointIndex())break;if(u){const s=t.getStartPointIndex();e.getXY(s).isNAN()||(u=!1,o.push(s))}if(c){const t=s.getEndPointIndex();e.getXY(t).isNAN()||(a.push(t),c=!1)}if(!u){const s=o.at(-1),r=t.getEndPointIndex();if(r-s>1){const t=new _e;t.setSub(e.getXY(s),e.getXY(r)),_=t.length()}else _=i.calculateLength2D();if(_>d)o.push(r),_=0;else if(n){let e=m.read(s);Number.isNaN(e)&&(e=0);let t=m.read(r);Number.isNaN(t)&&(t=0),Math.abs(t-e)>h&&(o.push(r),_=0)}}if(!c){const t=a.at(-1),i=s.getStartPointIndex();if(i-t>1){const s=new _e;s.setSub(e.getXY(t),e.getXY(i)),p=s.length()}else p=r.calculateLength2D();if(p>d)a.push(i),p=0;else if(n){let e=m.read(t);Number.isNaN(e)&&(e=0);let s=m.read(i);Number.isNaN(s)&&(s=0),Math.abs(s-e)>h&&(a.push(i),p=0)}}}if(o.length>0&&a.length>0&&(o.at(-1)<a.at(-1)?o.length>a.length?o.pop():a.pop():(o.at(-1)===a.at(-1)||a.pop(),a.pop())),a.length+o.length>=2){let e=!1;for(let t=0,s=o.length;t<s;t++)r.getPointByVal(o[t],g),e?i.lineToPoint(g):(i.startPathPoint(g),e=!0);for(let t=a.length-1;t>0;t--)r.getPointByVal(a[t],g),e?i.lineToPoint(g):(i.startPathPoint(g),e=!0);r.isClosedPath(t.getPathIndex())?i.closePathWithLine():a.length>0&&(r.getPointByVal(a[0],g),i.lineToPoint(g))}o.length=0,a.length=0}return n&&i.replaceNaNs(1,0),i.getImpl().setIsSimple(1,d),i}polygonSimplifyAsFeature(){return this.simplifyPlanar()}simplifyPlanar(){if(1===this.m_geometry.getFillRule()&&!Z(this.m_knownSimpleResult))return ot(this.m_geometry,this.m_toleranceSimplify,!0,!1,this.m_knownSimpleResult,this.m_progressTracker,0,!0);const e=new u;if(e.addGeometry(this.m_geometry),this.m_geometry.hasAttribute(1)&&e.replaceNaNs(1,0),e.removeNaNVertices(),0!==e.getTotalPointCount()){let t=null,s=0,r=0;if(e.hasCurves()){t=new F;const i=de.constructEmpty();this.m_geometry.queryEnvelope(i);const n=G(this.m_toleranceSimplify.total(),i);s=C(this.m_toleranceSimplify.total()),r=b(n,s),H(e,n,this.m_toleranceSimplify.total(),12e3,t,null,this.m_progressTracker)}if(!Z(this.m_knownSimpleResult)){const t=this.m_toleranceSimplify.add(r);V(e,t,this.m_progressTracker,!0,!1)}this.m_geometry.getGeometryType()===i.enumPolygon&&Je(e,e.getFirstGeometry(),this.m_knownSimpleResult,!1,-1,this.m_progressTracker),null!==t&&t.stitchCurves(e,e.getFirstGeometry(),s,!0)}const t=e.getGeometry(e.getFirstGeometry());return t.getGeometryType()===i.enumPolygon&&(t.getImpl().updateOGCFlagsProtected(),t.setFillRule(0)),t.getImpl().setIsSimple(4,this.m_toleranceSimplify.total()),t}progress_(){}static hasNanZs(e){if(e.hasAttribute(1)){const t=e.getAttributeStreamRef(1);for(let s=0,i=e.getPointCount();s<i;s++){const e=t.read(s);if(Number.isNaN(e))return!0}}return!1}compareVerticesForPlanarClustering(e,t,s){if(e===t)return 0;const i=this.m_pairs[e],r=this.m_pairs[t],n=i>>1,h=r>>1,o=this.m_xy.readPoint2D(2*n);o.y+=1&i?this.m_toleranceIsSimpleClustering:-this.m_toleranceIsSimpleClustering;const a=this.m_xy.readPoint2D(2*h);a.y+=1&r?this.m_toleranceIsSimpleClustering:-this.m_toleranceIsSimpleClustering;const m=o.compare(a);if(0===m&&s){const e=this.m_pathsForOGCTests[n]-this.m_pathsForOGCTests[h];return Ie(e)}return m}compareVerticesMultiPoint(e,t){if(e===t)return 0;const s=this.m_multiVertexGeom.getXY(e),i=this.m_multiVertexGeom.getXY(t),r=!s.isFinite(),n=!i.isFinite();if(r||n)return r<n?-1:r>n?1:0;if(s.y<i.y)return-1;if(s.y>i.y)return 1;if(s.x<i.x)return-1;if(s.x>i.x)return 1;for(let h=1;h<this.m_attributeCount;h++){const s=this.m_description.getSemantics(h),i=ge.getComponentCount(s);for(let r=0;r<i;r++){const i=this.m_multiVertexGeom.getAttributeAsDbl(s,e,r),n=this.m_multiVertexGeom.getAttributeAsDbl(s,t,r),h=Ee(i,n);if(0!==h)return h}}return 0}edgeAngleCompare(e,t){if(e===t)return 0;const s=e.m_segment.getTangent(e.getReversed()?1:0);e.getReversed()&&s.negateThis();const i=t.m_segment.getTangent(t.getReversed()?1:0);t.getReversed()&&i.negateThis();const r=s.getQuarter(),n=i.getQuarter();if(n===r){const e=s.crossProduct(i);return e<0?1:e>0?-1:0}return r<n?-1:1}}class qt{getOperatorType(){return 10103}accelerateGeometry(e,t,s){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}isSimpleAsFeature(e,t,s,i,r){const n=Tt(e,t,s,i,r);return j(e.getGeometryType(),n)}isSimplePlanarDONOTUSE(e,t,s,i,r){const n=vt(e,t,s,i,r);return q(n)}executeMany(e,t,s,i){return new zt(e,t,s,i)}execute(t,s,i,r){const h=new e([t]),o=this.executeMany(h,s,i,r).next();return o||n("null geometry"),o}}class zt extends t{constructor(e,t,s,i){super(),this.m_progressTracker=i,this.m_bForceSimplify=s,this.m_index=-1,this.m_inputGeometryCursor=e,this.m_spatialReference=t}next(){const e=this.m_inputGeometryCursor.next();return e?(this.m_index=this.m_inputGeometryCursor.getGeometryID(),this.simplify(e)):null}getGeometryID(){return this.m_index}tock(){return!1}getRank(){return 1}simplify(e){if(e||s(""),e.getGeometryType()===i.enumGeometryCollection){const t=P(e,-1),s=(new qt).executeMany(t,this.m_spatialReference,this.m_bForceSimplify,this.m_progressTracker),i=e.createInstance();for(let e=s.next();null!=e;e=s.next())i.addGeometry(e);return i}return Ft(e,this.m_spatialReference,this.m_bForceSimplify,this.m_progressTracker)}}export{qt as O,Et as T,Ne as U,It as a,dt as b,ft as c,xt as d,ut as e,lt as f,pt as g,We as h,ct as i,_t as j,Nt as k,bt as l,nt as m,Je as n,Vt as o,ot as p,Ye as q,it as s};
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
- */
5
- import{S as e,G as t}from"./SimpleGeometryCursor.js";import{c as s,g as i,G as n,v as o,m,t as r,d as h}from"./Geometry.js";import{o as _,f as u,P as a,p as l}from"./Point2D.js";import{M as c}from"./QuadraticBezier.js";import{Envelope2D as p}from"./Envelope2D.js";import{O as d}from"./OperatorDifference.js";import{e as g}from"./Envelope.js";import{d as f,O as D,a as G}from"./OperatorSimplify.js";class x{getOperatorType(){return 10001}supportsCurves(){return!0}accelerateGeometry(e,t,s){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,s,i=0){return new U(e,t,s,i)}execute(t,i,n,o){const m=new e([t,i]),r=new U(m,n,o,0).next();return r||s("null output"),r}}function b(){return{geom:null,vertexCount:-1,bUnioned:!1,location:new a}}function y(e,t){return a.compareZorder(e.location,t.location)?-1:e.location.equals(t.location)?0:1}class C{constructor(){this.binVertexCount=0,this.geometries=[]}addPair(e){this.binVertexCount+=e.vertexCount,this.geometries.push(e)}sort(){this.geometries.sort(((e,t)=>y(e,t)))}geomCount(){return this.geometries.length}geomPairs(){return this.geometries}clear(){this.binVertexCount=0,this.geometries.length=0}getBinVertexCount(){return this.binVertexCount}}class U extends t{constructor(e,t,s,i,n=!1){super(),this.m_index=-1,this.m_currentDim=-1,this.m_bDone=!1,this.m_unionBins=[],this.m_readyGeoms=_(4),this.m_dimGeomCounts=u(4,0),this.m_addedGeoms=0,this.m_maxDimension=-1,this.m_bHadGeometry=u(4,!1),this.m_complexUnionGeoms=_(4),this.m_totalNonEmptyGeomCounters=u(4,0),this.m_progressTracker=s,this.m_bUnionAllDimensions=!!(4&i),this.m_bPreserveAllPathEnds=!!(8&i),this.m_inputGeoms=e,this.m_spatialReference=t,this.m_options=i,this.m_bIs3D=n}next(){if(this.m_bDone&&this.m_currentDim===this.m_maxDimension)return null;for(;!this.step_(););if(-1===this.m_maxDimension)return null;if(this.m_bUnionAllDimensions){if(-1===this.m_currentDim)for(let e=0;e<=this.m_maxDimension;e++)if(this.m_bHadGeometry[e]){this.m_complexUnionGeoms[e]=this.getResultGeometry(e);for(let t=e+1;t<=this.m_maxDimension;t++)this.m_complexUnionGeoms[t]=this.getResultGeometry(t),this.m_bHadGeometry[t]&&!this.m_complexUnionGeoms[t].isEmpty()&&(this.m_bIs3D?i(0):this.m_complexUnionGeoms[e]=(new d).execute(this.m_complexUnionGeoms[e],this.m_complexUnionGeoms[t],this.m_spatialReference,this.m_progressTracker))}for(;this.m_currentDim++,(this.m_currentDim>this.m_maxDimension||this.m_currentDim<0)&&s(""),!this.m_bHadGeometry[this.m_currentDim];);if(this.m_index++,0===this.m_currentDim&&this.m_complexUnionGeoms[this.m_currentDim].getGeometryType()===n.enumPoint){const e=new c({vd:this.m_complexUnionGeoms[this.m_currentDim].getDescription()});return this.m_complexUnionGeoms[this.m_currentDim].isEmpty()||e.add(this.m_complexUnionGeoms[this.m_currentDim]),e}return this.m_complexUnionGeoms[this.m_currentDim]}return this.m_index=0,this.m_currentDim=this.m_maxDimension,this.getResultGeometry(this.m_maxDimension)}getGeometryID(){return this.m_index}getRank(){return 1}tock(){return this.step_()}getResultGeometry(e){return this.m_readyGeoms[e]}finishDim(e,t,s){let o=t;if(!s)return 16&this.m_options?(o=f([o],1,this.m_spatialReference,this.m_progressTracker,this.m_options,this.m_bIs3D),o):o;if(1&this.m_options)return o;if(1===e){if(!(8&this.m_options)&&(!!(16&this.m_options)||this.m_totalNonEmptyGeomCounters[e]>1)){o=f([o],1,this.m_spatialReference,this.m_progressTracker,16|this.m_options,this.m_bIs3D);const e=[0],t=o.getImpl().getIsSimple(0,e);i(this.m_bIs3D||g(t))}else 1===this.m_totalNonEmptyGeomCounters[e]&&(this.m_bIs3D?i(0):o=(new D).execute(o,this.m_spatialReference,!1,this.m_progressTracker))}else this.m_bIs3D?i(0):o=(new D).execute(o,this.m_spatialReference,!1,this.m_progressTracker);if(0===e&&o.getGeometryType()===n.enumPoint){const e=new c({vd:o.getDescription()});o.isEmpty()||e.add(o),o=e}return o}static getLevel(e){const t=4,s=o(e);let i=s>0?(Math.log(s)-Math.log(32))/Math.log(t):0;return i<0&&(i=0),Math.floor(i)}step_(){if(this.m_bDone)return!0;let e;if(this.m_inputGeoms?(e=this.m_inputGeoms.next(),null===e?(this.m_bDone=!0,this.m_inputGeoms=null):(this.checkAndThrow(e),e.isEmpty()||this.m_totalNonEmptyGeomCounters[e.getDimension()]++)):e=null,null!==e){const t=e.getDimension();this.m_bHadGeometry[t]=!0,(t>=this.m_maxDimension||this.m_bUnionAllDimensions)&&(this.addGeom(t,!1,e),t>this.m_maxDimension&&!this.m_bUnionAllDimensions&&this.removeAllBinsWithLowerDimension(t))}if(this.m_addedGeoms>0)for(let t=0;t<=this.m_maxDimension;t++){for(;this.m_dimGeomCounts[t]>1;){const e=this.collectGeometriesToUnion(t);if(null===e)break;{let s;s=1&this.m_options?f(e,e.length,this.m_spatialReference,this.m_progressTracker,this.m_options,this.m_bIs3D):G(e,e.length,this.m_spatialReference,this.m_progressTracker,8|this.m_options,this.m_bIs3D),this.addGeom(t,!0,s)}}if(this.m_bDone&&(i(this.m_dimGeomCounts[t]<=1),0!==this.m_dimGeomCounts[t])){const e=this.m_unionBins[t].entries().next().value,s=e[1].geomPairs()[0].geom,i=e[1].geomPairs()[0].bUnioned;this.m_unionBins[t].clear(),this.m_readyGeoms[t]=this.finishDim(t,s,i)}}return this.m_bDone}addGeom(e,t,s){const i=b();i.geom=s;const n=o(s);i.vertexCount=n;const m=p.constructEmpty();s.queryEnvelope(m),i.location=n>0?m.getCenter():new a(0,0);const r=U.getLevel(s);if(e+1>this.m_unionBins.length)for(;this.m_unionBins.length<Math.max(2,e+1);)this.m_unionBins.push(new Map);let h=null;const _=this.m_unionBins[e].get(r);_&&(h=_),null===h&&(h=new C,this.m_unionBins[e].set(r,h)),i.bUnioned=t,h.addPair(i),this.m_dimGeomCounts[e]++,this.m_addedGeoms++,this.m_maxDimension=Math.max(this.m_maxDimension,e)}removeAllBinsWithLowerDimension(e){for(let t=0;t<e;t++)this.m_unionBins[t].clear(),this.m_addedGeoms-=this.m_dimGeomCounts[t],this.m_dimGeomCounts[t]=0}collectGeometriesToUnion(e){if(1&this.m_options&&!this.m_bDone)return null;let t=null;const s=[];for(const i of this.m_unionBins[e].keys())s.push(i);l(s);for(let i=0;i<s.length;i++){if(-1===s[i])continue;const n=this.m_unionBins[e].get(s[i]);{const o=5e3,m=4,r=n.getBinVertexCount()>o&&n.geomCount()>=m;if(this.m_bDone||r){for(let n=0;n<i;n++){if(-1===s[n])continue;const i=this.m_unionBins[e].get(s[n]);i.sort(),this.m_dimGeomCounts[e]-=i.geomCount(),this.m_addedGeoms-=i.geomCount();for(const e of i.geomPairs())t||(t=new Array),t.push(e.geom);i.clear(),this.m_unionBins[e].delete(s[n]),s[n]=-1}n.sort(),this.m_dimGeomCounts[e]-=n.geomCount(),this.m_addedGeoms-=n.geomCount();for(const e of n.geomPairs())t||(t=new Array),t.push(e.geom);if(n.clear(),this.m_unionBins[e].delete(s[i]),s[i]=-1,!this.m_bDone)break}}}return t}checkAndThrow(e){this.m_bIs3D&&(e.getDimension()>1&&m(),e.hasAttribute(1)||r("Geometry must have Zs")),h(e)}}export{x as O};
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
- */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import{clone as s}from"../../core/lang.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import r from"./LabelClass.js";var o;let l=o=class extends r{constructor(e){super(e),this.trackLabelType="latestObservation"}clone(){return new o({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:s(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:s(this.symbol),trackLabelType:this.trackLabelType,where:this.where,useCodedValues:this.useCodedValues})}};e([t({type:["latestObservation","previousObservations","trackLine","allObservations"],json:{write:!0}})],l.prototype,"trackLabelType",void 0),l=o=e([a("esri.layers.support.TrackLabelClass")],l);const i=l;export{i as default};
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
- */
5
- import e from"../../../../../core/Error.js";import"../../../../../core/has.js";import r from"../../../../../core/Logger.js";import{BindType as t}from"../../../../3d/webgl-engine/core/shaderTechnique/BindType.js";import{assert as n}from"../../../../3d/webgl-engine/lib/Util.js";const s=()=>r.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder");class i{constructor(){this._includedModules=new Map}include(e,r){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,r),e(this.builder,r))}}class o extends i{constructor(){super(...arguments),this.vertex=new u,this.fragment=new u,this.attributes=new m,this.varyings=new h,this.extensions=new l,this.constants=new d}get fragmentUniforms(){return this.fragment.uniforms.entries}get builder(){return this}generate(e,r=!0){const t=this.extensions.generateSource(e),n=this.attributes.generateSource(e),s=this.varyings.generateSource(e),i="vertex"===e?this.vertex:this.fragment,o=i.uniforms.generateSource(),a=i.code.generateSource(),c="vertex"===e?f:_(),u=this.constants.generateSource().concat(i.constants.generateSource());return`${r?"#version 300 es":""}\n${t.join("\n")}\n${c}\n${u.join("\n")}\n${o.join("\n")}\n${n.join("\n")}\n${s.join("\n")}\n${a.join("\n")}`}generateBind(e){const r=new Map;this.vertex.uniforms.entries.forEach((e=>{const n=e.bind[t.Bind];n&&r.set(e.name,n)})),this.fragment.uniforms.entries.forEach((e=>{const n=e.bind[t.Bind];n&&r.set(e.name,n)}));const n=Array.from(r.values()),s=n.length;return r=>{for(let t=0;t<s;++t)n[t](e,r)}}generateBindPass(e){const r=new Map;this.vertex.uniforms.entries.forEach((e=>{const n=e.bind[t.Pass];n&&r.set(e.name,n)})),this.fragment.uniforms.entries.forEach((e=>{const n=e.bind[t.Pass];n&&r.set(e.name,n)}));const n=Array.from(r.values()),s=n.length;return(r,t)=>{for(let i=0;i<s;++i)n[i](e,r,t)}}generateBindDraw(e){const r=new Map;this.vertex.uniforms.entries.forEach((e=>{const n=e.bind[t.Draw];n&&r.set(e.name,n)})),this.fragment.uniforms.entries.forEach((e=>{const n=e.bind[t.Draw];n&&r.set(e.name,n)}));const n=Array.from(r.values()),s=n.length;return(r,t,i)=>{for(let o=0;o<s;++o)n[o](e,i,r,t)}}}class a{constructor(){this._entries=new Map}add(...e){for(const r of e)this._add(r)}get(e){return this._entries.get(e)}_add(r){if(null!=r){if(this._entries.has(r.name)&&!this._entries.get(r.name).equals(r))throw new e(`Duplicate uniform name ${r.name} for different uniform type`);this._entries.set(r.name,r)}else s().error(`Trying to add null Uniform from ${(new Error).stack}.`)}generateSource(){return Array.from(this._entries.values()).map((e=>null!=e.arraySize?`uniform ${e.type} ${e.name}[${e.arraySize}];`:`uniform ${e.type} ${e.name};`))}get entries(){return Array.from(this._entries.values())}}class c{constructor(){this._entries=new Array}add(e){this._entries.push(e)}generateSource(){return this._entries}}class u extends i{constructor(){super(...arguments),this.uniforms=new a,this.code=new c,this.constants=new d}get builder(){return this}}class m{constructor(){this._entries=new Array}add(e,r){this._entries.push([e,r])}generateSource(e){return"fragment"===e?[]:this._entries.map((e=>`in ${e[1]} ${e[0]};`))}}class h{constructor(){this._entries=new Map}add(e,r){this._entries.has(e)&&n(this._entries.get(e)===r),this._entries.set(e,r)}generateSource(e){const r=new Array;return this._entries.forEach(((t,n)=>r.push("vertex"===e?`out ${t} ${n};`:`in ${t} ${n};`))),r}}class l{constructor(){this._entries=new Set}add(e){this._entries.add(e)}generateSource(e){const r="vertex"===e?l.ALLOWLIST_VERTEX:l.ALLOWLIST_FRAGMENT;return Array.from(this._entries).filter((e=>r.includes(e))).map((e=>`#extension ${e} : enable`))}}l.ALLOWLIST_FRAGMENT=["GL_EXT_shader_texture_lod","GL_OES_standard_derivatives"],l.ALLOWLIST_VERTEX=[];class d{constructor(){this._entries=new Set}add(e,r,t){let n="ERROR_CONSTRUCTOR_STRING";switch(r){case"float":n=d._numberToFloatStr(t);break;case"int":n=d._numberToIntStr(t);break;case"bool":n=t.toString();break;case"vec2":n=`vec2(${d._numberToFloatStr(t[0])}, ${d._numberToFloatStr(t[1])})`;break;case"vec3":n=`vec3(${d._numberToFloatStr(t[0])}, ${d._numberToFloatStr(t[1])}, ${d._numberToFloatStr(t[2])})`;break;case"vec4":n=`vec4(${d._numberToFloatStr(t[0])}, ${d._numberToFloatStr(t[1])}, ${d._numberToFloatStr(t[2])}, ${d._numberToFloatStr(t[3])})`;break;case"ivec2":n=`ivec2(${d._numberToIntStr(t[0])}, ${d._numberToIntStr(t[1])})`;break;case"ivec3":n=`ivec3(${d._numberToIntStr(t[0])}, ${d._numberToIntStr(t[1])}, ${d._numberToIntStr(t[2])})`;break;case"ivec4":n=`ivec4(${d._numberToIntStr(t[0])}, ${d._numberToIntStr(t[1])}, ${d._numberToIntStr(t[2])}, ${d._numberToIntStr(t[3])})`;break;case"mat2":case"mat3":case"mat4":n=`${r}(${Array.prototype.map.call(t,(e=>d._numberToFloatStr(e))).join(", ")})`}return this._entries.add(`const ${r} ${e} = ${n};`),this}static _numberToIntStr(e){return e.toFixed(0)}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}function _(){return"#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp sampler2D;\n#else\n precision mediump float;\n precision mediump sampler2D;\n#endif\n"}const f="precision highp float;\nprecision highp sampler2D;";export{c as Code,i as Includes,o as ShaderBuilder2D,u as Stage,a as Uniforms};
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
- */
5
- import t from"../../../../../core/Error.js";import e from"../../../../../core/Logger.js";import{create as i}from"../../../../../geometry/support/aaBoundingRect.js";import{getBoundsXY as s}from"../../../../../geometry/support/boundsUtils.js";import{normalizeQueryLike as r}from"../../../../../layers/graphics/data/queryUtils.js";import{getSpatialQueryOperator as o}from"../../../../../layers/graphics/data/spatialQuerySupport.js";import{getTimeOperator as a}from"../../../../../layers/graphics/data/timeSupport.js";import h from"../../../../../rest/support/Query.js";import{FeatureStoreQueryAdapter as l}from"../FeatureStoreQueryAdapter.js";import{createWhereClause as n}from"./whereUtils.js";const d=1,m=2;class p{constructor(t){this._geometryBounds=i(),this._idToVisibility=new Map,this._serviceInfo=t}static async create(t){const e=new p(t);return await e.update(t.filterJSON,t.spatialReference),e}get hash(){return this._hash}check(t){return this._applyFilter(t)}clear(){const t=this._resetAllHiddenIds();return this.update(),{show:t,hide:[]}}invalidate(){this._idToVisibility.forEach(((t,e)=>{this._idToVisibility.set(e,0)}))}setKnownIds(t){for(const e of t)this._idToVisibility.set(e,d)}setTrue(t){const e=[],i=[],s=new Set(t);return this._idToVisibility.forEach(((t,r)=>{const o=!!(this._idToVisibility.get(r)&d),a=s.has(r);!o&&a?e.push(r):o&&!a&&i.push(r),this._idToVisibility.set(r,a?d|m:0)})),{show:e,hide:i}}createQuery(){const{geometry:t,spatialRel:e,where:i,timeExtent:s,objectIds:r}=this;return h.fromJSON({geometry:t,spatialRel:e,where:i,timeExtent:s,objectIds:r})}async update(t,e){this._hash=JSON.stringify(t);const i=await r(t,null,e);await Promise.all([this._setGeometryFilter(i),this._setIdFilter(i),this._setAttributeFilter(i),this._setTimeFilter(i)])}async _setAttributeFilter(t){if(!t?.where)return this._clause=null,void(this.where=null);this._clause=await n(t.where,this._serviceInfo.fieldsIndex),this.where=t.where}_setIdFilter(t){this._idsToShow=t?.objectIds&&new Set(t.objectIds),this._idsToHide=t?.hiddenIds&&new Set(t.hiddenIds),this.objectIds=t?.objectIds}async _setGeometryFilter(t){if(!t?.geometry)return this._spatialQueryOperator=null,this.geometry=null,void(this.spatialRel=null);const e=t.geometry,i=t.spatialRel??"esriSpatialRelIntersects",r=await o(i,e,this._serviceInfo.geometryType,this._serviceInfo.hasZ,this._serviceInfo.hasM);s(this._geometryBounds,e),this._spatialQueryOperator=r,this.geometry=e,this.spatialRel=i}_setTimeFilter(i){if(this.timeExtent=this._timeOperator=null,i?.timeExtent)if(this._serviceInfo.timeInfo)this.timeExtent=i.timeExtent,this._timeOperator=a(this._serviceInfo.timeInfo,i.timeExtent,l.Shared);else{const s=new t("feature-layer-view:time-filter-not-available","Unable to apply time filter, as layer doesn't have time metadata.",i.timeExtent);e.getLogger("esri.views.2d.layers.features.controllers.FeatureFilter").error(s)}}_applyFilter(t){return this._filterByGeometry(t)&&this._filterById(t)&&this._filterByTime(t)&&this._filterByExpression(t)}_filterByExpression(t){return!this.where||this._clause(t)}_filterById(t){return(!this._idsToHide?.size||!this._idsToHide.has(t.getObjectId()))&&(!this._idsToShow?.size||this._idsToShow.has(t.getObjectId()))}_filterByGeometry(t){if(!this.geometry)return!0;const e=t.readGeometryWorldSpace();return!!e&&this._spatialQueryOperator(e)}_filterByTime(t){return null==this._timeOperator||this._timeOperator(t)}_resetAllHiddenIds(){const t=[];return this._idToVisibility.forEach(((e,i)=>{e&d||(this._idToVisibility.set(i,d),t.push(i))})),t}}export{p as default};
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
- */
5
- import e from"../../../../../core/Error.js";import"../../../../../core/has.js";import t from"../../../../../core/Logger.js";import{BindType as r}from"../shaderTechnique/BindType.js";import{assert as n}from"../../lib/Util.js";const s=()=>t.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder");class i{constructor(){this._includedModules=new Map}include(e,t){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,t),e(this.builder,t))}}class o extends i{constructor(){super(...arguments),this.vertex=new h,this.fragment=new h,this.attributes=new m,this.varyings=new _,this.extensions=new d,this.outputs=new l}get fragmentUniforms(){return this.fragment.uniforms.entries}get builder(){return this}generate(e){const t=this.extensions.generateSource(e),r=this.attributes.generateSource(e),n=this.varyings.generateSource(e),s="vertex"===e?this.vertex:this.fragment,i=s.uniforms.generateSource(),o=s.code.generateSource(),a=s.main.generateSource(),c="vertex"===e?p:f,u=s.constants.generateSource(),h=this.outputs.generateSource(e);return`#version 300 es\n${t.join("\n")}\n\n${c}\n\n${u.join("\n")}\n\n${i.join("\n")}\n\n${r.join("\n")}\n\n${n.join("\n")}\n\n${h.join("\n")}\n\n${o.join("\n")}\n\n${a.join("\n")}`}generateBind(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const n=e.bind[r.Bind];n&&t.set(e.name,n)})),this.fragment.uniforms.entries.forEach((e=>{const n=e.bind[r.Bind];n&&t.set(e.name,n)}));const n=Array.from(t.values()),s=n.length;return t=>{for(let r=0;r<s;++r)n[r](e,t)}}generateBindPass(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const n=e.bind[r.Pass];n&&t.set(e.name,n)})),this.fragment.uniforms.entries.forEach((e=>{const n=e.bind[r.Pass];n&&t.set(e.name,n)}));const n=Array.from(t.values()),s=n.length;return(t,r)=>{for(let i=0;i<s;++i)n[i](e,t,r)}}generateBindDraw(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const n=e.bind[r.Draw];n&&t.set(e.name,n)})),this.fragment.uniforms.entries.forEach((e=>{const n=e.bind[r.Draw];n&&t.set(e.name,n)}));const n=Array.from(t.values()),s=n.length;return(t,r,i)=>{for(let o=0;o<s;++o)n[o](e,i,t,r)}}}class a{constructor(e){this._stage=e,this._entries=new Map}add(...e){for(const t of e)this._add(t);return this._stage}get(e){return this._entries.get(e)}_add(t){if(null!=t){if(this._entries.has(t.name)&&!this._entries.get(t.name).equals(t))throw new e(`Duplicate uniform name ${t.name} for different uniform type`);this._entries.set(t.name,t)}else s().error(`Trying to add null Uniform from ${(new Error).stack}.`)}generateSource(){return Array.from(this._entries.values()).map((e=>null!=e.arraySize?`uniform ${e.type} ${e.name}[${e.arraySize}];`:`uniform ${e.type} ${e.name};`))}get entries(){return Array.from(this._entries.values())}}class c{constructor(e){this._stage=e,this._bodies=new Array}add(e){return this._bodies.push(e),this._stage}generateSource(){if(this._bodies.length>0)return[`void main() {\n ${this._bodies.join("\n")||""} \n}`];throw new e("Shader does not contain main function body.")}}class u{constructor(e){this._stage=e,this._entries=new Array}add(e){return this._entries.push(e),this._stage}generateSource(){return this._entries}}class h extends i{constructor(){super(...arguments),this.uniforms=new a(this),this.main=new c(this),this.code=new u(this),this.constants=new g(this)}get builder(){return this}}class m{constructor(){this._entries=new Array}add(e,t){this._entries.push([e,t])}generateSource(e){return"fragment"===e?[]:this._entries.map((e=>`in ${e[1]} ${e[0]};`))}}class _{constructor(){this._entries=new Map}add(e,t){this._entries.has(e)&&n(this._entries.get(e)===t),this._entries.set(e,t)}generateSource(e){const t=new Array;return this._entries.forEach(((r,n)=>t.push("vertex"===e?`out ${r} ${n};`:`in ${r} ${n};`))),t}}class d{constructor(){this._entries=new Set}add(e){this._entries.add(e)}generateSource(e){const t="vertex"===e?d.ALLOWLIST_VERTEX:d.ALLOWLIST_FRAGMENT;return Array.from(this._entries).filter((e=>t.includes(e))).map((e=>`#extension ${e} : enable`))}}d.ALLOWLIST_FRAGMENT=["GL_EXT_shader_texture_lod","GL_OES_standard_derivatives"],d.ALLOWLIST_VERTEX=[];class l{constructor(){this._entries=new Map}add(e,t,r=0){const s=this._entries.get(r);s?n(s.name===e&&s.type===t,`Fragment shader output location ${r} occupied`):this._entries.set(r,{name:e,type:t})}generateSource(e){if("vertex"===e)return[];0===this._entries.size&&this._entries.set(0,{name:l.DEFAULT_NAME,type:l.DEFAULT_TYPE});const t=new Array;return this._entries.forEach(((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`))),t}}l.DEFAULT_TYPE="vec4",l.DEFAULT_NAME="fragColor";class g{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let n="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":n=g._numberToFloatStr(r);break;case"int":n=g._numberToIntStr(r);break;case"bool":n=r.toString();break;case"vec2":n=`vec2(${g._numberToFloatStr(r[0])}, ${g._numberToFloatStr(r[1])})`;break;case"vec3":n=`vec3(${g._numberToFloatStr(r[0])}, ${g._numberToFloatStr(r[1])}, ${g._numberToFloatStr(r[2])})`;break;case"vec4":n=`vec4(${g._numberToFloatStr(r[0])}, ${g._numberToFloatStr(r[1])}, ${g._numberToFloatStr(r[2])}, ${g._numberToFloatStr(r[3])})`;break;case"ivec2":n=`ivec2(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])})`;break;case"ivec3":n=`ivec3(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])}, ${g._numberToIntStr(r[2])})`;break;case"ivec4":n=`ivec4(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])}, ${g._numberToIntStr(r[2])}, ${g._numberToIntStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":n=`${t}(${Array.prototype.map.call(r,(e=>g._numberToFloatStr(e))).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${n};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}const f="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n#else\n precision mediump float;\n precision mediump int;\n precision mediump sampler2D;\n#endif",p="precision highp float;\nprecision highp sampler2D;";export{u as Code,i as Includes,c as Main,o as ShaderBuilder,h as Stage,a as Uniforms};
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
- */
5
- import"../../../../../core/has.js";import{BindType as s}from"../shaderTechnique/BindType.js";class i{constructor(i,a,e,r,t=null){if(this.name=i,this.type=a,this.arraySize=t,this.bind={[s.Bind]:null,[s.Pass]:null,[s.Draw]:null},r)switch(e){case void 0:break;case s.Bind:this.bind[s.Bind]=r;break;case s.Pass:this.bind[s.Pass]=r;break;case s.Draw:this.bind[s.Draw]=r}}equals(s){return this.type===s.type&&this.name===s.name&&this.arraySize===s.arraySize}}export{i as Uniform};
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
- */
5
- class n{}const t=n;function o(n,...t){let o="";for(let r=0;r<t.length;r++)o+=n[r]+t[r];return o+=n[n.length-1],o}function r(n,t,o=""){return n?t:o}!function(n){function t(n){return Math.round(n).toString()}function o(n){return n.toPrecision(8)}n.int=t,n.float=o}(o);export{r as If,t as NoParameters,o as glsl};
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
- */
5
- import{_ as e}from"../../../../../chunks/tslib.es6.js";import{property as t}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{RenderCategory as r}from"../../../webgl.js";import{ColorFormat as o}from"../../../webgl/formats.js";import i from"../../../webgl/RenderNode.js";import{FocusAreaColorTechnique as a}from"./FocusAreaColorTechnique.js";import{FocusAreaMaskTechnique as n}from"./FocusAreaMaskTechnique.js";import{Default3D as c}from"../../lib/DefaultVertexAttributeLocations.js";import{Pos3 as h}from"../../lib/DefaultVertexBufferLayouts.js";import{VertexArrayObject as l}from"../../lib/VertexArrayObject.js";import{F as u}from"../../../../../chunks/FocusAreaColor.glsl.js";import{F as p}from"../../../../../chunks/FocusAreaMask.glsl.js";import{BufferObject as m}from"../../../../webgl/BufferObject.js";import{FramebufferBit as f,CompareFunction as d,Face as g,StencilOperation as A,PrimitiveType as _,Usage as E}from"../../../../webgl/enums.js";let b=class extends i{constructor(e){super(e),this.consumes={required:[r.FINAL]},this.produces=r.FINAL,this.focusAreaGeometries=new Array,this._vaos=Array(),this._count=new Array,this._origins=new Array,this._colorParameters=new u,this._maskParameters=new p,e.techniques.precompile(n),e.techniques.precompile(a)}initialize(){this.setExtrudedVolume()}destroy(){this._vaos.forEach((e=>e.dispose())),this._vaos=[],this._count=[],this._origins=[]}render(e){const t=this.techniques.acquire(n),s=this.techniques.acquire(a),i=this.bindParameters,c=e.find((({name:e})=>e===r.FINAL)),h=c?.getTexture(),l=i.camera,u=l.fullViewport[2],p=l.fullViewport[3],m=this.fboCache.acquire(u,p,"focusArea",o.RGBA),E=this.fboCache.acquire(u,p,this.produces);if(!t.compiled||!s.compiled||!this._vaos||this.effect===C.NONE)return this.requestRender(),t.release(),s.release(),E.release(),m.release(),c;const b=this.renderingContext;m.attachDepth(c.getAttachment(this.gl.DEPTH_STENCIL_ATTACHMENT)),b.bindFramebuffer(m.fbo),b.clear(f.COLOR|f.STENCIL),b.setViewport(0,0,u,p),b.gl.clearStencil(0),b.gl.clear(b.gl.STENCIL_BUFFER_BIT),b.setClearStencil(0);for(let r=0;r<this._vaos.length;r++){const e=this._vaos[r],s=this._count[r];e&&(this._maskParameters.origin=this._origins[r],b.bindTechnique(t,i,this._maskParameters),b.setFaceCullingEnabled(!1),b.setStencilTestEnabled(!0),b.setStencilWriteMask(255),b.setStencilFunction(d.ALWAYS,0,255),b.setStencilOpSeparate(g.FRONT,A.KEEP,A.INCR_WRAP,A.KEEP),b.setStencilOpSeparate(g.BACK,A.KEEP,A.DECR_WRAP,A.KEEP),b.setDepthWriteEnabled(!1),b.setColorMask(!1,!1,!1,!1),b.bindVAO(e),b.drawArrays(_.TRIANGLES,0,s),b.setFaceCullingEnabled(!1),b.setDepthTestEnabled(!1),b.setStencilFunction(d.NOTEQUAL,0,255),b.setStencilWriteMask(0),b.setColorMask(!0,!0,!0,!0),b.drawArrays(_.TRIANGLES,0,s))}return t.release(),b.gl.clear(b.gl.STENCIL_BUFFER_BIT),b.bindFramebuffer(E.fbo),this._colorParameters.color=h,this._colorParameters.focusArea=m.getTexture(),this._colorParameters.effect=this.effect,b.bindTechnique(s,i,this._colorParameters),b.screen.draw(),m.release(),s.release(),E.attachDepth(c.getAttachment(this.gl.DEPTH_STENCIL_ATTACHMENT)),E}setExtrudedVolume(){const e=this.focusAreaGeometries;this._vaos=[],this._count=[],this._origins=[];for(let t=0;t<e.length;t++){const s=e[t],r=new Array,o=s.indicesBottom;this._origins.push(s.origin);for(let e=0;e<o.length;e++)r.push(s.positions[3*(o[e]-1)]),r.push(s.positions[3*(o[e]-1)+1]),r.push(s.positions[3*(o[e]-1)+2]);const i=s.indicesExtruded;for(let e=0;e<i.length;e++)r.push(s.positions[3*i[e]]),r.push(s.positions[3*i[e]+1]),r.push(s.positions[3*i[e]+2]);const a=new Float32Array(r),n=new l(this.renderingContext,c,new Map([["geometry",h]]),new Map([["geometry",m.createVertex(this.renderingContext,E.STATIC_DRAW,a)]]));this._vaos?.push(n),this._count.push(o.length+i.length)}}};e([t()],b.prototype,"consumes",void 0),e([t()],b.prototype,"produces",void 0),e([t({constructOnly:!0})],b.prototype,"techniques",void 0),e([t()],b.prototype,"focusAreaGeometries",void 0),e([t()],b.prototype,"effect",void 0),b=e([s("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaRenderNode")],b);class T{constructor(e,t,s,r,o){this.positions=e,this.indicesBottom=t,this.indicesExtruded=s,this.height=r,this.origin=o}}var C;!function(e){e[e.NONE=0]="NONE",e[e.BRIGHT=1]="BRIGHT",e[e.DARK=2]="DARK"}(C||(C={}));export{C as FocusAreaEffect,T as FocusAreaGeometry,b as FocusAreaRenderNode};
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
- */
5
- import{_ as e}from"../../../../../chunks/tslib.es6.js";import{property as r}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as o}from"../../../../../core/accessorSupport/decorators/subclass.js";import t from"../../../webgl/RenderNode.js";import{FocusAreaColorTechnique as s}from"./FocusAreaColorTechnique.js";import{F as c}from"../../../../../chunks/FocusAreaColor.glsl.js";let i=class extends t{constructor(e){super(e),this.consumes={required:["composite-color","focusArea"]},this.produces="composite-color",this._colorParameters=new c,e.techniques.precompile(s)}initialize(){}destroy(){}render(e){const r=this.techniques.acquire(s),o=this.bindParameters,t=e.find((({name:e})=>"composite-color"===e)),c=t?.getTexture(),i=o.camera,n=i.fullViewport[2],p=i.fullViewport[3],u=e.find((({name:e})=>"focusArea"===e)),l=this.fboCache.acquire(n,p,this.produces);if(!r.compiled||this.effect===a.NONE)return this.requestRender(),l.release(),u.release(),t;const m=this.renderingContext;return m.gl.clear(m.gl.STENCIL_BUFFER_BIT),m.bindFramebuffer(l.fbo),this._colorParameters.color=c,this._colorParameters.focusArea=u.getTexture(),this._colorParameters.effect=this.effect,m.bindTechnique(r,o,this._colorParameters),m.screen.draw(),u.release(),r.release(),l.attachDepth(t.getAttachment(this.gl.DEPTH_STENCIL_ATTACHMENT)),l}};var a;e([r()],i.prototype,"consumes",void 0),e([r()],i.prototype,"produces",void 0),e([r({constructOnly:!0})],i.prototype,"techniques",void 0),e([r()],i.prototype,"effect",void 0),i=e([o("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaRenderNodeColorEffects")],i),function(e){e[e.NONE=0]="NONE",e[e.BRIGHT=1]="BRIGHT",e[e.DARK=2]="DARK"}(a||(a={}));const n={none:a.NONE,bright:a.BRIGHT,dark:a.DARK};export{a as FocusAreaEffect,i as FocusAreaRenderNodeColorEffects,n as effectsMapping};
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
- */
5
- import{_ as e}from"../../../../../chunks/tslib.es6.js";import{property as t}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{ColorFormat as r}from"../../../webgl/formats.js";import o from"../../../webgl/RenderNode.js";import{FocusAreaMaskTechnique as i}from"./FocusAreaMaskTechnique.js";import{Default3D as n}from"../../lib/DefaultVertexAttributeLocations.js";import{Pos3 as a}from"../../lib/DefaultVertexBufferLayouts.js";import{VertexArrayObject as c}from"../../lib/VertexArrayObject.js";import{F as h}from"../../../../../chunks/FocusAreaMask.glsl.js";import{BufferObject as l}from"../../../../webgl/BufferObject.js";import{FramebufferBit as p,CompareFunction as u,Face as m,StencilOperation as d,PrimitiveType as f,Usage as g}from"../../../../webgl/enums.js";let A=class extends o{constructor(e){super(e),this.consumes={required:["focusArea","transparent-color"]},this.produces="focusArea",this.focusAreaGeometries=new Array,this._vaos=Array(),this._count=new Array,this._origins=new Array,this._maskParameters=new h,e.techniques.precompile(i)}initialize(){this.setExtrudedVolume()}destroy(){this._vaos.forEach((e=>e.dispose())),this._vaos=[],this._count=[],this._origins=[]}render(e){const t=this.techniques.acquire(i),s=this.bindParameters,o=e.find((({name:e})=>"transparent-color"===e)),n=s.camera,a=n.fullViewport[2],c=n.fullViewport[3],h=this.fboCache.acquire(a,c,"focusArea",r.RGBA);if(!t.compiled||!this._vaos||this.effect===_.NONE)return this.requestRender(),h;const l=this.renderingContext;h.attachDepth(o.getAttachment(this.gl.DEPTH_STENCIL_ATTACHMENT)),l.bindFramebuffer(h.fbo),l.clear(p.COLOR|p.STENCIL),l.setViewport(0,0,a,c),l.gl.clearStencil(0),l.gl.clear(l.gl.STENCIL_BUFFER_BIT),l.setClearStencil(0);for(let r=0;r<this._vaos.length;r++){const e=this._vaos[r],o=this._count[r];e&&(this._maskParameters.origin=this._origins[r],l.bindTechnique(t,s,this._maskParameters),l.setFaceCullingEnabled(!1),l.setStencilTestEnabled(!0),l.setStencilWriteMask(255),l.setStencilFunction(u.ALWAYS,0,255),l.setStencilOpSeparate(m.FRONT,d.KEEP,d.INCR_WRAP,d.KEEP),l.setStencilOpSeparate(m.BACK,d.KEEP,d.DECR_WRAP,d.KEEP),l.setDepthWriteEnabled(!1),l.setColorMask(!1,!1,!1,!1),l.bindVAO(e),l.drawArrays(f.TRIANGLES,0,o),l.setFaceCullingEnabled(!1),l.setDepthTestEnabled(!1),l.setStencilFunction(u.NOTEQUAL,0,255),l.setStencilWriteMask(0),l.setColorMask(!0,!0,!0,!0),l.drawArrays(f.TRIANGLES,0,o))}return t.release(),h}setExtrudedVolume(){if(!this.view._stage)return;const e=this.focusAreaGeometries;this._vaos.forEach((e=>e.dispose())),this._vaos=[],this._count=[],this._origins=[];for(let t=0;t<e.length;t++){const s=e[t],r=new Array,o=s.indicesBottom;this._origins.push(s.origin);for(let e=0;e<o.length;e++)r.push(s.positions[3*(o[e]-1)]),r.push(s.positions[3*(o[e]-1)+1]),r.push(s.positions[3*(o[e]-1)+2]);const i=s.indicesExtruded;for(let e=0;e<i.length;e++)r.push(s.positions[3*i[e]]),r.push(s.positions[3*i[e]+1]),r.push(s.positions[3*i[e]+2]);const h=new Float32Array(r),p=new c(this.renderingContext,n,new Map([["geometry",a]]),new Map([["geometry",l.createVertex(this.renderingContext,g.STATIC_DRAW,h)]]));this._vaos?.push(p),this._count.push(o.length+i.length)}}};e([t()],A.prototype,"consumes",void 0),e([t()],A.prototype,"produces",void 0),e([t({constructOnly:!0})],A.prototype,"techniques",void 0),e([t()],A.prototype,"focusAreaGeometries",void 0),e([t()],A.prototype,"effect",void 0),A=e([s("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaRenderNodeGeometryMasking")],A);class E{constructor(e,t,s,r,o,i){this.positions=e,this.indicesBottom=t,this.indicesExtruded=s,this.height=r,this.origin=o,this.color=i}}var _;!function(e){e[e.NONE=0]="NONE",e[e.BRIGHT=1]="BRIGHT",e[e.DARK=2]="DARK"}(_||(_={}));export{_ as FocusAreaEffect,E as FocusAreaGeometry,A as FocusAreaRenderNodeGeometryMasking};