@arcgis/core 5.2.0-next.6 → 5.2.0-next.8

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 (712) hide show
  1. package/WebLinkChart.d.ts +1 -1
  2. package/WebMap.d.ts +2 -2
  3. package/WebScene.d.ts +3 -3
  4. package/arcade.d.ts +9 -9
  5. package/arcgisGlobal.d.ts +8 -0
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/07cc5743cb6a9fd68adb.js +1 -0
  8. package/assets/esri/core/workers/chunks/09d0e430c66788a2626f.js +640 -0
  9. package/assets/esri/core/workers/chunks/{829a0583b8a228c65379.js → 0b169bb1969f86232a1a.js} +1 -1
  10. package/assets/esri/core/workers/chunks/0cbd7f5fe24271942abd.js +1 -0
  11. package/assets/esri/core/workers/chunks/{20e2d11f6de438ee883e.js → 0ded58ccb83f624f1460.js} +1 -1
  12. package/assets/esri/core/workers/chunks/0ecc1bc1686844cdd60e.js +1 -0
  13. package/assets/esri/core/workers/chunks/{d1ac98f48bb6d43d97c8.js → 0f3654c8157ec8f22869.js} +3 -3
  14. package/assets/esri/core/workers/chunks/0f75c19d8e296a32e329.js +1 -0
  15. package/assets/esri/core/workers/chunks/174cc2e69e5b5a13d880.js +1 -0
  16. package/assets/esri/core/workers/chunks/18f980465db5a86153d1.js +1 -0
  17. package/assets/esri/core/workers/chunks/1996f0a930abdd97b855.js +1 -0
  18. package/assets/esri/core/workers/chunks/1c8436b27a3d3cde5cfc.js +1 -0
  19. package/assets/esri/core/workers/chunks/1cb1f125dccbf8c8cac9.js +1 -0
  20. package/assets/esri/core/workers/chunks/1dd06335bb2d35c66339.js +1 -0
  21. package/assets/esri/core/workers/chunks/1f289aa69dd6b6be534a.js +1 -0
  22. package/assets/esri/core/workers/chunks/2185e8a52c5e29d46680.js +1 -0
  23. package/assets/esri/core/workers/chunks/{bf706a5d065a357de51b.js → 2413b383b7f2bdcd4ced.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{da29cf0e64065631a470.js → 24810c36ae09bb4e83dc.js} +1 -1
  25. package/assets/esri/core/workers/chunks/26583db2af1a1cc456e5.js +1 -0
  26. package/assets/esri/core/workers/chunks/274b82cb183ddd0042f3.js +1 -0
  27. package/assets/esri/core/workers/chunks/277718031c903da2b3b9.js +1 -0
  28. package/assets/esri/core/workers/chunks/27c6def22c2b0791ce9e.js +1 -0
  29. package/assets/esri/core/workers/chunks/{7ed5b669010db58845f8.js → 294f2803aac000c99693.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{093f27e4e4781870b431.js → 297ae764445e6f73a5ea.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{be0eab592db0e651b023.js → 2b814bb51704a5b4fdc2.js} +6 -6
  32. package/assets/esri/core/workers/chunks/2c9ba638d1f31c82f9f5.js +1 -0
  33. package/assets/esri/core/workers/chunks/2d2895f1fdf44d212a4d.js +1 -0
  34. package/assets/esri/core/workers/chunks/2dbc2fd0f2dde505c465.js +1 -0
  35. package/assets/esri/core/workers/chunks/2dbcdfdf000226bfe746.js +1 -0
  36. package/assets/esri/core/workers/chunks/2e6382d50bf012064eae.js +1 -0
  37. package/assets/esri/core/workers/chunks/30f1909c5ef1835b8507.js +1 -0
  38. package/assets/esri/core/workers/chunks/3172d7fc23787a287191.js +1 -0
  39. package/assets/esri/core/workers/chunks/31918a0d9886dedf385f.js +1 -0
  40. package/assets/esri/core/workers/chunks/{1c029b03ed836f393a50.js → 3248001d9dfb9153699e.js} +1 -1
  41. package/assets/esri/core/workers/chunks/3297658ccd8d4b9ce733.js +1 -0
  42. package/assets/esri/core/workers/chunks/{716a4d7e8b908b81870b.js → 32f26757e36704923286.js} +1 -1
  43. package/assets/esri/core/workers/chunks/3529afab0c2444275d91.js +1 -0
  44. package/assets/esri/core/workers/chunks/36dac6ab51d9dbdd091d.js +1 -0
  45. package/assets/esri/core/workers/chunks/{a2159df718a7f2f59271.js → 38a2f34661563c7c29c1.js} +1 -1
  46. package/assets/esri/core/workers/chunks/390fda094fa8695d98cf.js +1 -0
  47. package/assets/esri/core/workers/chunks/39596715e84d0da2f803.js +30 -0
  48. package/assets/esri/core/workers/chunks/398eb3100a282e4736bb.js +1 -0
  49. package/assets/esri/core/workers/chunks/{6af77529c977d034d287.js → 3b15933f65f59625a650.js} +1 -1
  50. package/assets/esri/core/workers/chunks/3b3f91a61e3f29af1fb2.js +1 -0
  51. package/assets/esri/core/workers/chunks/{f815106d439ff1f76e51.js → 3b837b512999e6ab24bc.js} +1 -1
  52. package/assets/esri/core/workers/chunks/3d20c86f1fe877bf884b.js +1 -0
  53. package/assets/esri/core/workers/chunks/{a96c7432ca97cbeef4b8.js → 3db898a38a7c5f0efb48.js} +1 -1
  54. package/assets/esri/core/workers/chunks/3dc5fbecc427df1fd827.js +1 -0
  55. package/assets/esri/core/workers/chunks/3e65b4b18760bde8ceee.js +1 -0
  56. package/assets/esri/core/workers/chunks/3ff7aa216cd794d951e8.js +1 -0
  57. package/assets/esri/core/workers/chunks/{8e1865392681d390ab2e.js → 401ee7fa500adad77db1.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{60915a3708a34da1977e.js → 426156137f279d979ddd.js} +1 -1
  59. package/assets/esri/core/workers/chunks/4517630bf869205bab87.js +1 -0
  60. package/assets/esri/core/workers/chunks/{b002304a45856b024b46.js → 4714241189c13d0db897.js} +1 -1
  61. package/assets/esri/core/workers/chunks/48f1c3a7c9f16d6896f6.js +1 -0
  62. package/assets/esri/core/workers/chunks/49308bdc36373555f1af.js +1 -0
  63. package/assets/esri/core/workers/chunks/5075e85e1eafd431a8c0.js +1 -0
  64. package/assets/esri/core/workers/chunks/5121768c70f1e03b685c.js +1 -0
  65. package/assets/esri/core/workers/chunks/5201105ca11a2d450460.js +1 -0
  66. package/assets/esri/core/workers/chunks/{0e774f14ba274832f390.js → 520e0e5307eef27becc6.js} +1 -1
  67. package/assets/esri/core/workers/chunks/528ed0bd8dc149ead023.js +1 -0
  68. package/assets/esri/core/workers/chunks/52f354bf80ee5ab0379a.js +1 -0
  69. package/assets/esri/core/workers/chunks/538537f9bc866d9caa75.js +1 -0
  70. package/assets/esri/core/workers/chunks/53d165b4f30fd64e5d8a.js +1 -0
  71. package/assets/esri/core/workers/chunks/58a7cdebc3d182c15ec6.js +1 -0
  72. package/assets/esri/core/workers/chunks/58ac245ff7fb57c1004f.js +1 -0
  73. package/assets/esri/core/workers/chunks/58acc18b92533166135d.js +1 -0
  74. package/assets/esri/core/workers/chunks/597aa39cdb5366ef9a74.js +1 -0
  75. package/assets/esri/core/workers/chunks/5bfae465872760e7af6d.js +1 -0
  76. package/assets/esri/core/workers/chunks/{cda99b543a0e1979346c.js → 5cb1b950249d651f3837.js} +1 -1
  77. package/assets/esri/core/workers/chunks/5cb274e5759f7ca0d4ed.js +1 -0
  78. package/assets/esri/core/workers/chunks/5d3ddbf94539cb4f493e.js +1 -0
  79. package/assets/esri/core/workers/chunks/{c83fea0d0ebd0d8e43fd.js → 5d62d1920e3e35fc0192.js} +1 -1
  80. package/assets/esri/core/workers/chunks/5dd441db1e74dc9b56e9.js +1 -0
  81. package/assets/esri/core/workers/chunks/{c216cd5d6b5d4fe4bab3.js → 62e77e3c5ca9b4887923.js} +2 -2
  82. package/assets/esri/core/workers/chunks/630ad47857de3cf726d1.js +1 -0
  83. package/assets/esri/core/workers/chunks/64114a7d2da162987958.js +1 -0
  84. package/assets/esri/core/workers/chunks/6821462e5c1e9c76010a.js +1 -0
  85. package/assets/esri/core/workers/chunks/684d3cb4fb233180b2d0.js +1 -0
  86. package/assets/esri/core/workers/chunks/686c51fd2144e132783e.js +1 -0
  87. package/assets/esri/core/workers/chunks/68f9b2da1fd08785320f.js +2 -0
  88. package/assets/esri/core/workers/chunks/69e98de578f467a35054.js +1 -0
  89. package/assets/esri/core/workers/chunks/6a3d207308b29651f397.js +1 -0
  90. package/assets/esri/core/workers/chunks/6aabde21b0b376d95888.js +1 -0
  91. package/assets/esri/core/workers/chunks/6c6396bfcdab12e68deb.js +1 -0
  92. package/assets/esri/core/workers/chunks/6d616b66fb32904b55a1.js +1 -0
  93. package/assets/esri/core/workers/chunks/{bcb021a167580bb1619f.js → 6ef3b8d67b498d655a99.js} +1 -1
  94. package/assets/esri/core/workers/chunks/6f125b4ed06c0022dee6.js +1 -0
  95. package/assets/esri/core/workers/chunks/6f4825c3ef1fe202ab82.js +1 -0
  96. package/assets/esri/core/workers/chunks/6f5d61f734ec40dafabb.js +1 -0
  97. package/assets/esri/core/workers/chunks/{fce7995c26953bfd8d3d.js → 70229007d594536ba6a3.js} +1 -1
  98. package/assets/esri/core/workers/chunks/71e55381fdff3fc2542e.js +1 -0
  99. package/assets/esri/core/workers/chunks/{5abe34bb0110694f7b42.js → 72cfb186e50537bcdd19.js} +1 -1
  100. package/assets/esri/core/workers/chunks/72d67cc3a382e83bf1a2.js +1 -0
  101. package/assets/esri/core/workers/chunks/7748743d4be047094d67.js +1 -0
  102. package/assets/esri/core/workers/chunks/77a4f6f224d7ca4b69f4.js +1 -0
  103. package/assets/esri/core/workers/chunks/78c53aeb0a408ab3c80c.js +1 -0
  104. package/assets/esri/core/workers/chunks/7b5c1030a7cf0f382cc4.js +1 -0
  105. package/assets/esri/core/workers/chunks/7cee81c5aa1e6b7d2452.js +1 -0
  106. package/assets/esri/core/workers/chunks/7e89cb9ff615742e0894.js +1 -0
  107. package/assets/esri/core/workers/chunks/80f4f686ce403cb2693f.js +1 -0
  108. package/assets/esri/core/workers/chunks/{8477b5fdd99c6ac5c27b.js → 851705cf276eae8d4d37.js} +1 -1
  109. package/assets/esri/core/workers/chunks/{c319c3b85cdec73a9f45.js → 877c848beaf9a939862c.js} +1 -1
  110. package/assets/esri/core/workers/chunks/{ae74f722fb385e45fcf1.js → 893c0d28a5bf3f9f29f1.js} +1 -1
  111. package/assets/esri/core/workers/chunks/89e09276086745aa21fa.js +1 -0
  112. package/assets/esri/core/workers/chunks/{16b90d8f628a412ba4ba.js → 8a8c5e5ce457ca004687.js} +1 -1
  113. package/assets/esri/core/workers/chunks/{1f55d60d3adc31283296.js → 8b0a01ebc86ab226f01f.js} +1 -1
  114. package/assets/esri/core/workers/chunks/{452c01cecbbd1e370098.js → 8f93e6fc11a158d4f1ee.js} +1 -1
  115. package/assets/esri/core/workers/chunks/93bd56396b8cd020f965.js +1 -0
  116. package/assets/esri/core/workers/chunks/{359d3acb3953e64e5a78.js → 93ceb74ac88ef460fe5f.js} +1 -1
  117. package/assets/esri/core/workers/chunks/{4e676e888a935c507d90.js → 93d4bda22bde33fafa57.js} +1 -1
  118. package/assets/esri/core/workers/chunks/957f7b8de4aecb6f644e.js +1 -0
  119. package/assets/esri/core/workers/chunks/{50dc9893e13396f5e35d.js → 9629601de5e44ffe90ea.js} +2 -2
  120. package/assets/esri/core/workers/chunks/976ab2be6c244768c08a.js +1 -0
  121. package/assets/esri/core/workers/chunks/{e785f76c1a75cb1d1e1f.js → 99101789035f1787c630.js} +1 -1
  122. package/assets/esri/core/workers/chunks/{fbb23db01f3cf629d32e.js → 992a90ecbab931198fd0.js} +1 -1
  123. package/assets/esri/core/workers/chunks/99e5296192ab98fd0d99.js +1 -0
  124. package/assets/esri/core/workers/chunks/9d5f7573bfe3b051daf1.js +1 -0
  125. package/assets/esri/core/workers/chunks/a0c00c6fe60db49b3ab9.js +1 -0
  126. package/assets/esri/core/workers/chunks/a2247f4c3116efb16c4f.js +1 -0
  127. package/assets/esri/core/workers/chunks/a4245bd4e67a428fd835.js +1 -0
  128. package/assets/esri/core/workers/chunks/a442534ac0956a68b769.js +1 -0
  129. package/assets/esri/core/workers/chunks/a4d3cbc02dc1186a9a6d.js +1 -0
  130. package/assets/esri/core/workers/chunks/a4e9a17dacbb52444d75.js +1 -0
  131. package/assets/esri/core/workers/chunks/{8bdca6f06c8b5fedd917.js → a5abba59e738c3240c22.js} +1 -1
  132. package/assets/esri/core/workers/chunks/a8ec5b85c2fa6fb4f391.js +1 -0
  133. package/assets/esri/core/workers/chunks/{f5a2c28dc26c065ea355.js → a9a1293b1d5302fb3b54.js} +28 -30
  134. package/assets/esri/core/workers/chunks/a9fc53ae040320e49834.js +1 -0
  135. package/assets/esri/core/workers/chunks/aa118c1bcd922b8ac328.js +1 -0
  136. package/assets/esri/core/workers/chunks/aae0049c2c3e15a813e8.js +1 -0
  137. package/assets/esri/core/workers/chunks/ac33b10fe65f9e9e824f.js +1 -0
  138. package/assets/esri/core/workers/chunks/adc32f6b45ea3026fc34.js +1 -0
  139. package/assets/esri/core/workers/chunks/af31e62499d45bdab3c3.js +1 -0
  140. package/assets/esri/core/workers/chunks/b22a1c98271c2e4d8808.js +1 -0
  141. package/assets/esri/core/workers/chunks/{9f4681713f03365a2a53.js → b666027b9022fa346a79.js} +1 -1
  142. package/assets/esri/core/workers/chunks/b73c146d3e550eaf07eb.js +1 -0
  143. package/assets/esri/core/workers/chunks/b9bdb1f05e904c3655e4.js +1 -0
  144. package/assets/esri/core/workers/chunks/c0cbc50e5afd68bd485c.js +1 -0
  145. package/assets/esri/core/workers/chunks/c2a65de34f6a6c89c652.js +1 -0
  146. package/assets/esri/core/workers/chunks/c357c0a08b99c1e7f290.js +1 -0
  147. package/assets/esri/core/workers/chunks/{4a23b27bfbcfa08fd9a7.js → c3cf9e6e91f71c9cc5f3.js} +1 -1
  148. package/assets/esri/core/workers/chunks/c3ff2ff0a86a9143d7a5.js +1 -0
  149. package/assets/esri/core/workers/chunks/{3e3134e4bc34d4e07179.js → c424a66f1546275e2bcb.js} +1 -1
  150. package/assets/esri/core/workers/chunks/c4fc85281ca83af7abaf.js +1 -0
  151. package/assets/esri/core/workers/chunks/c60b4f2dd5fccdf362a7.js +1 -0
  152. package/assets/esri/core/workers/chunks/c6d0b4875b6b8d6bc25a.js +1 -0
  153. package/assets/esri/core/workers/chunks/c911f0b5bdd43b66b731.js +1 -0
  154. package/assets/esri/core/workers/chunks/c983e5ce0ff952b65d7f.js +1 -0
  155. package/assets/esri/core/workers/chunks/c9a4601073e1a3eee9d0.js +1 -0
  156. package/assets/esri/core/workers/chunks/ccffaba50674adba7a0f.js +1 -0
  157. package/assets/esri/core/workers/chunks/{24646a1176ce34039155.js → cdf6ad970dc1893dac58.js} +1 -1
  158. package/assets/esri/core/workers/chunks/d13e003c9293cb7e2852.js +1 -0
  159. package/assets/esri/core/workers/chunks/d24e027bb8b2c09f25c8.js +1 -0
  160. package/assets/esri/core/workers/chunks/d2df8c328054dc6cb7b7.js +1 -0
  161. package/assets/esri/core/workers/chunks/d5c35a75fd4c41def420.js +1 -0
  162. package/assets/esri/core/workers/chunks/{ace1899a8e5162b4018d.js → d6bb8db22ba85ad05fd7.js} +1 -1
  163. package/assets/esri/core/workers/chunks/{7601278ebced0c0c31cf.js → d78b7cac322755e87eb8.js} +1 -1
  164. package/assets/esri/core/workers/chunks/d7be278aed1fb37ad5ec.js +1 -0
  165. package/assets/esri/core/workers/chunks/d9695794cfaa014a55b1.js +1 -0
  166. package/assets/esri/core/workers/chunks/{8244b74e9c3a30d8d2f6.js → d9d4754062758789f186.js} +2 -2
  167. package/assets/esri/core/workers/chunks/da1e8b338ab9fe9e0a8e.js +1 -0
  168. package/assets/esri/core/workers/chunks/e1bf87077541da6853c6.js +1 -0
  169. package/assets/esri/core/workers/chunks/e279bcbe4f10e87bde6c.js +1 -0
  170. package/assets/esri/core/workers/chunks/e33d2ede6c9f1527d51b.js +1 -0
  171. package/assets/esri/core/workers/chunks/e4406baf206b9e4c7e4f.js +1 -0
  172. package/assets/esri/core/workers/chunks/e499252cb52f7aed49a0.js +1 -0
  173. package/assets/esri/core/workers/chunks/{e178cd0e9178d6716410.js → e5837e5ac6ef761f26a2.js} +1 -1
  174. package/assets/esri/core/workers/chunks/e6a7272b59a4c2e34dca.js +1 -0
  175. package/assets/esri/core/workers/chunks/e912b515704e20313e53.js +1 -0
  176. package/assets/esri/core/workers/chunks/eac683a37339aa558455.js +1 -0
  177. package/assets/esri/core/workers/chunks/ec1841e6e498d54012eb.js +1 -0
  178. package/assets/esri/core/workers/chunks/ed3d16a5b4084ef61f8a.js +1 -0
  179. package/assets/esri/core/workers/chunks/ee07f54bc77fe9f8575a.js +1 -0
  180. package/assets/esri/core/workers/chunks/{d35c475f004367e333eb.js → eeea5710275c967e8d51.js} +1 -1
  181. package/assets/esri/core/workers/chunks/ef46ef4f0ee9f2aeaa4a.js +1 -0
  182. package/assets/esri/core/workers/chunks/efb4aa5886730ea377bd.js +1 -0
  183. package/assets/esri/core/workers/chunks/f2a268c69f2a5566381b.js +1 -0
  184. package/assets/esri/core/workers/chunks/{d1ccc5f2d8892328ab01.js → f5731ad4cfbbf1cc569a.js} +2 -2
  185. package/assets/esri/core/workers/chunks/f590db684d88e72bd79b.js +1 -0
  186. package/assets/esri/core/workers/chunks/f69df22a5c64389ebe28.js +1 -0
  187. package/assets/esri/core/workers/chunks/{f60292d97bcdbf19165b.js → f6d047358d14328f3622.js} +1 -1
  188. package/assets/esri/core/workers/chunks/f7fca88d120d45bb782a.js +1 -0
  189. package/assets/esri/core/workers/chunks/f819854098d63fe4ccdb.js +1 -0
  190. package/assets/esri/core/workers/chunks/f8f3579d0c1b65762902.js +1 -0
  191. package/assets/esri/core/workers/chunks/f98118127469449ca145.js +1 -0
  192. package/assets/esri/core/workers/chunks/f9ed05d4ad1f44d033bb.js +1 -0
  193. package/assets/esri/core/workers/chunks/fb6605be0c5e36785543.js +1 -0
  194. package/assets/esri/core/workers/chunks/fbe7dae0b4bf2d172487.js +1 -0
  195. package/assets/esri/core/workers/chunks/fc4d9be62cf5e9758842.js +1 -0
  196. package/assets/esri/core/workers/chunks/fd70a25ffdf2cc6c5be2.js +1 -0
  197. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  198. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  199. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  200. package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
  201. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +38 -8
  202. package/assets/esri/themes/base/widgets/_DatePicker.scss +1 -1
  203. package/assets/esri/themes/dark/main.css +1 -1
  204. package/assets/esri/themes/light/main.css +1 -1
  205. package/assets/esri/themes/light/view.css +1 -1
  206. package/chunks/GlowComposition.glsl.js +2 -2
  207. package/chunks/RealisticTree.glsl.js +17 -15
  208. package/chunks/bundle2.js +1 -1
  209. package/chunks/lyr3DMain.js +1 -1
  210. package/chunks/lyr3DWorker.js +1 -1
  211. package/chunks/vxlLayer.js +1 -1
  212. package/config.d.ts +2 -2
  213. package/config.js +1 -1
  214. package/core/Collection.d.ts +25 -25
  215. package/core/Error.d.ts +1 -1
  216. package/core/JSONSupport.d.ts +1 -1
  217. package/core/promiseUtils.d.ts +3 -3
  218. package/core/reactiveUtils.d.ts +4 -4
  219. package/core/screenUtils.js +1 -1
  220. package/core/sql/WhereClause.d.ts +1 -1
  221. package/core/sql.d.ts +1 -1
  222. package/core/timeUtils.d.ts +1 -1
  223. package/core/workers/Connection.d.ts +9 -9
  224. package/core/workers.d.ts +1 -1
  225. package/editing/types.d.ts +3 -3
  226. package/geometry/Extent.d.ts +0 -13
  227. package/geometry/Geometry.d.ts +10 -8
  228. package/geometry/Mesh.d.ts +9 -2
  229. package/geometry/Mesh.js +1 -1
  230. package/geometry/Multipoint.d.ts +9 -0
  231. package/geometry/Multipoint.js +1 -1
  232. package/geometry/Point.d.ts +15 -71
  233. package/geometry/Polygon.js +1 -1
  234. package/geometry/support/MeshMaterial.d.ts +5 -5
  235. package/geometry/support/MeshTexture.d.ts +19 -19
  236. package/geometry/support/geometryUtils.js +1 -1
  237. package/geometry/support/jsonUtils.d.ts +1 -1
  238. package/geometry/support/meshUtils.d.ts +130 -2
  239. package/geometry/support/meshUtils.js +1 -1
  240. package/graphic/AnnotationGraphicOrigin.d.ts +34 -0
  241. package/graphic/AnnotationGraphicOrigin.js +2 -0
  242. package/graphic/DimensionFeatureGraphicOrigin.d.ts +34 -0
  243. package/graphic/DimensionFeatureGraphicOrigin.js +2 -0
  244. package/identity/Credential.d.ts +1 -1
  245. package/identity/IdentityManager.d.ts +1 -1
  246. package/identity/IdentityManagerBase.js +1 -1
  247. package/identity/OAuthInfo.d.ts +1 -1
  248. package/identity/ServerInfo.d.ts +2 -2
  249. package/interfaces.d.ts +23 -0
  250. package/intl/number.d.ts +3 -3
  251. package/intl/substitute.d.ts +2 -2
  252. package/intl.d.ts +28 -28
  253. package/kernel.js +1 -1
  254. package/layers/AnnotationLayer.d.ts +263 -32
  255. package/layers/AnnotationLayer.js +1 -1
  256. package/layers/BaseDynamicLayer.d.ts +5 -5
  257. package/layers/BaseTileLayer.d.ts +4 -4
  258. package/layers/BuildingSceneLayer.d.ts +1 -1
  259. package/layers/CSVLayer.d.ts +7 -1
  260. package/layers/CatalogLayer.d.ts +6 -0
  261. package/layers/DimensionFeatureLayer.d.ts +263 -32
  262. package/layers/DimensionFeatureLayer.js +1 -1
  263. package/layers/FeatureLayer.d.ts +45 -8
  264. package/layers/FeatureLayer.js +1 -1
  265. package/layers/GeoJSONLayer.d.ts +14 -8
  266. package/layers/LinkChartLayer.js +1 -1
  267. package/layers/MapImageLayer.d.ts +5 -5
  268. package/layers/MediaLayer.d.ts +2 -2
  269. package/layers/OrientedImageryLayer.d.ts +29 -2
  270. package/layers/ParquetLayer.d.ts +7 -1
  271. package/layers/SceneLayer.d.ts +5 -3
  272. package/layers/SceneLayer.js +1 -1
  273. package/layers/StreamLayer.d.ts +1 -1
  274. package/layers/SubtypeGroupLayer.d.ts +7 -1
  275. package/layers/TileLayer.d.ts +2 -2
  276. package/layers/VideoLayer.d.ts +8 -2
  277. package/layers/VideoLayer.js +1 -1
  278. package/layers/VoxelLayer.d.ts +4 -4
  279. package/layers/WCSLayer.d.ts +2 -2
  280. package/layers/WFSLayer.d.ts +6 -0
  281. package/layers/WebTileLayer.d.ts +1 -1
  282. package/layers/catalog/CatalogFootprintLayer.d.ts +60 -11
  283. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  284. package/layers/graphics/sources/parquet/FileProvider.js +1 -1
  285. package/layers/graphics/sources/parquet/ParquetFileInfo.js +2 -0
  286. package/layers/graphics/sources/parquet/ParquetFileStatistics.js +2 -0
  287. package/layers/graphics/sources/parquet/PortalParquetFileProvider.js +1 -1
  288. package/layers/graphics/sources/parquet/PortalParquetLayerFileProvider.js +1 -1
  289. package/layers/graphics/sources/parquet/UrlsFileProvider.js +1 -1
  290. package/layers/graphics/sources/parquet/createFileProvider.js +1 -1
  291. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  292. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +6 -0
  293. package/layers/mixins/ArcGISImageService.d.ts +7 -1
  294. package/layers/mixins/BlendLayer.d.ts +1 -1
  295. package/layers/mixins/DataSeriesLayer.d.ts +161 -0
  296. package/layers/mixins/DataSeriesLayer.js +2 -0
  297. package/layers/mixins/FeatureLayerBase.d.ts +43 -19
  298. package/layers/mixins/TemporalLayer.d.ts +4 -2
  299. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  300. package/layers/support/AnnotationSublayer.d.ts +44 -0
  301. package/layers/support/AnnotationSublayer.js +2 -0
  302. package/layers/support/DateTimeFieldFormat.d.ts +10 -10
  303. package/layers/support/FeatureEffect.d.ts +22 -22
  304. package/layers/support/FeatureReductionBinning.d.ts +12 -0
  305. package/layers/support/FeatureReductionCluster.d.ts +12 -0
  306. package/layers/support/Field.d.ts +2 -2
  307. package/layers/support/ImageElement.d.ts +1 -1
  308. package/layers/support/MosaicRule.d.ts +0 -2
  309. package/layers/support/NumberFieldFormat.d.ts +5 -5
  310. package/layers/support/StreamConnection.d.ts +1 -1
  311. package/layers/support/Sublayer.d.ts +2 -2
  312. package/layers/support/SubtypeSublayer.d.ts +14 -1
  313. package/layers/support/TimeSeriesFieldTimeMapping.d.ts +30 -0
  314. package/layers/support/TimeSeriesFieldTimeMapping.js +2 -0
  315. package/layers/support/TimeSeriesInfo.d.ts +149 -0
  316. package/layers/support/TimeSeriesInfo.js +2 -0
  317. package/layers/support/VideoElement.d.ts +1 -1
  318. package/layers/support/commonProperties.js +1 -1
  319. package/layers/support/dataSeriesUtils.d.ts +18 -0
  320. package/layers/support/dataSeriesUtils.js +2 -0
  321. package/layers/support/featureLayerUtils.js +1 -1
  322. package/layers/support/kmlUtils.js +1 -1
  323. package/layers/support/layerUtils.js +1 -1
  324. package/layers/support/parquetUtils.js +1 -1
  325. package/layers/support/tiles3DUtils.js +1 -1
  326. package/layers/support/timeSeriesUtils.d.ts +27 -0
  327. package/layers/support/timeSeriesUtils.js +2 -0
  328. package/layers/types.d.ts +1 -1
  329. package/layers/video/types.d.ts +61 -1
  330. package/libs/parquet/parquet.js +1 -1
  331. package/linkChart/ChronologicalLayoutSettings.d.ts +1 -1
  332. package/networks/CircuitManager.d.ts +1 -1
  333. package/networks/Network.d.ts +1 -1
  334. package/networks/UnitIdentifierManager.d.ts +1 -1
  335. package/networks/support/NamedTraceConfiguration.d.ts +1 -1
  336. package/networks/support/TraceConfiguration.d.ts +2 -2
  337. package/networks/support/UNTraceConfiguration.d.ts +3 -3
  338. package/networks/support/jsonTypes.d.ts +7 -1
  339. package/networks/support/utils.js +1 -1
  340. package/package.json +3 -3
  341. package/popup/content/CustomContent.d.ts +1 -1
  342. package/portal/Portal.d.ts +2 -2
  343. package/portal/jsonTypes.d.ts +2 -2
  344. package/renderers/support/AuthoringInfo.d.ts +14 -1
  345. package/renderers/support/AuthoringInfo.js +1 -1
  346. package/renderers/support/AuthoringInfoVisualVariable.d.ts +14 -1
  347. package/renderers/support/AuthoringInfoVisualVariable.js +1 -1
  348. package/renderers/support/jsonUtils.d.ts +1 -1
  349. package/renderers/support/utils.d.ts +1 -1
  350. package/renderers/visualVariables/RotationVariable.d.ts +16 -1
  351. package/renderers/visualVariables/RotationVariable.js +1 -1
  352. package/request/types.d.ts +41 -43
  353. package/rest/geometryService.d.ts +1 -1
  354. package/rest/knowledgeGraph/CreateReplicaResponse.d.ts +1 -1
  355. package/rest/knowledgeGraph/GraphApplyEdits.d.ts +1 -1
  356. package/rest/knowledgeGraph/GraphProperty.d.ts +5 -1
  357. package/rest/knowledgeGraph/GraphQueryStreamingResult.d.ts +2 -2
  358. package/rest/knowledgeGraph/wasmInterface/wasmToDataModelFactories.js +1 -1
  359. package/rest/knowledgeGraph/wasmInterface/wasmToQueryResponseObjFactories.js +1 -1
  360. package/rest/knowledgeGraph/wasmInterface/wasmToReplicaFactories.js +1 -1
  361. package/rest/knowledgeGraphService.d.ts +13 -13
  362. package/rest/layerSources/DynamicDataLayer.d.ts +1 -1
  363. package/rest/print.d.ts +1 -1
  364. package/rest/support/AttributeBinsQuery.d.ts +16 -2
  365. package/rest/support/ClosestFacilityParameters.d.ts +6 -6
  366. package/rest/support/LastMileDeliveryParameters.d.ts +4 -4
  367. package/rest/support/LocationToAddressParameters.d.ts +1 -1
  368. package/rest/support/PrintTemplate.d.ts +5 -5
  369. package/rest/support/Query.d.ts +18 -4
  370. package/rest/support/RouteParameters.d.ts +5 -5
  371. package/rest/support/ServiceAreaParameters.d.ts +6 -6
  372. package/rest/support/TopFeaturesQuery.d.ts +16 -2
  373. package/rest/support/meshFeatureSet.js +1 -1
  374. package/smartMapping/renderers/color.d.ts +40 -0
  375. package/smartMapping/renderers/color.js +1 -1
  376. package/smartMapping/renderers/opacity.d.ts +8 -0
  377. package/smartMapping/renderers/opacity.js +1 -1
  378. package/smartMapping/renderers/size.d.ts +38 -0
  379. package/smartMapping/renderers/size.js +1 -1
  380. package/smartMapping/renderers/support/regenerateUtils.js +1 -1
  381. package/smartMapping/renderers/support/timeSeriesUtils.js +2 -0
  382. package/smartMapping/renderers/type.d.ts +20 -1
  383. package/smartMapping/renderers/type.js +1 -1
  384. package/smartMapping/renderers/univariateColorSize.d.ts +19 -0
  385. package/smartMapping/renderers/univariateColorSize.js +1 -1
  386. package/support/revision.js +1 -1
  387. package/support/tests/setupServiceMocksMesh.js +1 -1
  388. package/support/timeUtils.d.ts +3 -3
  389. package/symbols/Font.d.ts +7 -7
  390. package/symbols/WebStyleSymbol.d.ts +11 -11
  391. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  392. package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
  393. package/symbols/support/Symbol3DEmissive.d.ts +8 -2
  394. package/symbols/support/jsonUtils.d.ts +1 -1
  395. package/time/TimeExtent.d.ts +2 -2
  396. package/versionManagement/VersionManagementService.d.ts +8 -8
  397. package/versionManagement/VersionManager.d.ts +13 -3
  398. package/versionManagement/VersioningState.d.ts +4 -4
  399. package/views/2d/MapViewConstraints.d.ts +29 -25
  400. package/views/2d/engine/flow/styles/Imagery.js +1 -1
  401. package/views/2d/engine/flow/styles/Particles.js +1 -1
  402. package/views/2d/engine/flow/styles/Streamlines.js +1 -1
  403. package/views/2d/engine/vectorTiles/VectorTileFeatureIndex.js +1 -1
  404. package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
  405. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
  406. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader.js +1 -1
  407. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  408. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexOutlineFillShader.js +1 -1
  409. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapAccumulateShader.js +1 -1
  410. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
  411. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
  412. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  413. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  414. package/views/2d/layers/BaseLayerView2D.d.ts +4 -20
  415. package/views/2d/layers/BaseLayerViewGL2D.d.ts +6 -22
  416. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  417. package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
  418. package/views/2d/layers/GraphicsLayerView2D.js +1 -1
  419. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  420. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  421. package/views/2d/layers/KMLLayerView2D.js +1 -1
  422. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  423. package/views/2d/layers/MediaLayerView2D.js +1 -1
  424. package/views/2d/layers/RouteLayerView2D.js +1 -1
  425. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  426. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
  427. package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
  428. package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
  429. package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
  430. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  431. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  432. package/views/2d/layers/graphics/GraphicStore.js +1 -1
  433. package/views/2d/support/hitTestUtils.js +1 -1
  434. package/views/3d/analysis/LineOfSight/LineOfSightAggregateManipulatedObject3D.js +2 -0
  435. package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +1 -1
  436. package/views/3d/analysis/LineOfSight/LineOfSightConfiguration.js +1 -1
  437. package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
  438. package/views/3d/analysis/LineOfSight/LineOfSightObserverPlugin.js +1 -1
  439. package/views/3d/analysis/LineOfSight/LineOfSightPlacementLeafPlugin.js +2 -0
  440. package/views/3d/analysis/LineOfSight/LineOfSightPlacementTool.js +1 -1
  441. package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +2 -0
  442. package/views/3d/analysis/LineOfSight/LineOfSightRootPlugin.js +1 -1
  443. package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
  444. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  445. package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +1 -1
  446. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
  447. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  448. package/views/3d/analysis/Viewshed/ViewshedSnappingController.js +1 -1
  449. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  450. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementError.d.ts +1 -1
  451. package/views/3d/glTF/internal/resourceUtils.js +1 -1
  452. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  453. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  454. package/views/3d/interactive/editingTools/reshape/isSupportedObject.js +1 -1
  455. package/views/3d/interactive/editingTools/reshape/reshapeTooltipUtils3D.js +1 -1
  456. package/views/3d/interactive/editingTools/visualElementUtils.js +1 -1
  457. package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
  458. package/views/3d/layers/FlowSubView3D.js +1 -1
  459. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  460. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  461. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  462. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  463. package/views/3d/terrain/OverlayManager.js +1 -1
  464. package/views/3d/webgl/RenderNode.d.ts +32 -11
  465. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  466. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  467. package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
  468. package/views/3d/webgl-engine/shaders/ToneMapping.glsl.js +6 -10
  469. package/views/BreakpointsOwner.d.ts +1 -1
  470. package/views/DOMContainer.d.ts +6 -6
  471. package/views/Magnifier.d.ts +1 -1
  472. package/views/MapView.d.ts +1 -1
  473. package/views/SceneView.d.ts +2 -2
  474. package/views/View2D.d.ts +62 -54
  475. package/views/Viewport2DMixin.d.ts +1 -1
  476. package/views/analysis/ElevationProfile/ElevationProfileError.d.ts +1 -1
  477. package/views/draw/plugins/PolygonPlugin.js +1 -1
  478. package/views/input/gamepad/GamepadInputDevice.d.ts +1 -1
  479. package/views/input/types.d.ts +15 -15
  480. package/views/interactive/interactiveToolUtils.js +1 -1
  481. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  482. package/views/interactive/snapping/LineSnapper.js +1 -1
  483. package/views/interactive/snapping/ParallelLineSnapper.js +1 -1
  484. package/views/interactive/snapping/RightAngleSnapper.js +1 -1
  485. package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
  486. package/views/interactive/snapping/SnappingAlgorithm.js +1 -1
  487. package/views/interactive/snapping/SnappingManager.js +1 -1
  488. package/views/interactive/snapping/snappingUtils.js +1 -1
  489. package/views/layers/FeatureLikeLayerView.d.ts +32 -5
  490. package/views/layers/FeatureLikeLayerView.js +1 -1
  491. package/views/layers/GraphicsLayerView.d.ts +6 -3
  492. package/views/layers/ImageryLayerView.d.ts +4 -0
  493. package/views/navigation/Navigation.d.ts +1 -1
  494. package/views/support/WebAssemblyRequirements.js +1 -1
  495. package/views/types.d.ts +5 -5
  496. package/webdoc/support/webdocSaveUtils.js +1 -1
  497. package/webscene/Glow.d.ts +0 -4
  498. package/widgets/BasemapGallery.d.ts +1 -1
  499. package/widgets/BasemapLayerList.d.ts +1 -1
  500. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +10 -2
  501. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  502. package/widgets/BatchAttributeForm/ReactiveContingentValuesManager.js +1 -1
  503. package/widgets/BatchAttributeForm/attachmentUtils.d.ts +14 -0
  504. package/widgets/BatchAttributeForm/attachmentUtils.js +1 -1
  505. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  506. package/widgets/BatchAttributeForm/css.js +1 -1
  507. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +8 -6
  508. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  509. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  510. package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +1 -1
  511. package/widgets/BatchAttributeForm/inputs/support/attachmentValidationCriteriaState.d.ts +5 -0
  512. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  513. package/widgets/BatchAttributeForm/inputs/types.d.ts +8 -1
  514. package/widgets/BatchAttributeForm/interfaceUtils.js +1 -1
  515. package/widgets/BatchAttributeForm/rendered-content/RelationshipDetails.js +1 -1
  516. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  517. package/widgets/BatchAttributeForm.d.ts +10 -2
  518. package/widgets/BatchAttributeForm.js +1 -1
  519. package/widgets/Bookmarks.d.ts +1 -1
  520. package/widgets/BuildingExplorer.d.ts +1 -1
  521. package/widgets/CoordinateConversion/CoordinateConversionViewModel.d.ts +2 -2
  522. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  523. package/widgets/CoordinateConversion.d.ts +2 -2
  524. package/widgets/Daylight.d.ts +1 -1
  525. package/widgets/Directions.d.ts +1 -1
  526. package/widgets/Editor.d.ts +1 -1
  527. package/widgets/Feature.d.ts +1 -1
  528. package/widgets/FeatureForm.d.ts +1 -1
  529. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  530. package/widgets/FeatureTable/FieldColumn.d.ts +1 -14
  531. package/widgets/FeatureTable/Grid/Column.d.ts +1 -1
  532. package/widgets/FeatureTable/Grid/Column.js +1 -1
  533. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  534. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  535. package/widgets/FeatureTable/Grid/GroupColumn.js +1 -1
  536. package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +1 -1
  537. package/widgets/FeatureTable.js +1 -1
  538. package/widgets/FeatureTemplates.d.ts +1 -1
  539. package/widgets/FloorFilter.d.ts +1 -1
  540. package/widgets/Fullscreen/FullscreenViewModel.d.ts +3 -3
  541. package/widgets/Fullscreen/FullscreenViewModel.js +1 -1
  542. package/widgets/Fullscreen.d.ts +3 -3
  543. package/widgets/LayerList/ListItemPanel.d.ts +5 -5
  544. package/widgets/Legend.d.ts +1 -1
  545. package/widgets/Locate/LocateViewModel.d.ts +2 -2
  546. package/widgets/Locate.d.ts +1 -1
  547. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  548. package/widgets/PanoramicViewer/utils.js +1 -1
  549. package/widgets/Popup.d.ts +1 -1
  550. package/widgets/Print/PrintViewModel.d.ts +2 -2
  551. package/widgets/Print/PrintViewModel.js +1 -1
  552. package/widgets/Print/TemplateOptions.d.ts +4 -4
  553. package/widgets/Print.d.ts +6 -6
  554. package/widgets/Search/SearchViewModel.d.ts +5 -5
  555. package/widgets/Search.d.ts +4 -4
  556. package/widgets/ShadowCast.d.ts +1 -1
  557. package/widgets/Sketch/SketchViewModel.d.ts +1 -1
  558. package/widgets/Slice.d.ts +1 -1
  559. package/widgets/TableList/ListItemPanel.d.ts +5 -5
  560. package/widgets/Track/TrackViewModel.d.ts +3 -3
  561. package/widgets/Track.d.ts +3 -3
  562. package/widgets/UtilityNetworkTrace.d.ts +1 -1
  563. package/widgets/VersionManagement/VersionManagementViewModel.d.ts +2 -2
  564. package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +7 -1
  565. package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
  566. package/widgets/Weather.d.ts +1 -1
  567. package/widgets/Widget.d.ts +1 -1
  568. package/widgets/support/ContingentValuesManager.js +1 -1
  569. package/widgets/support/forms/formUtils.js +1 -1
  570. package/widgets/support/types.d.ts +1 -1
  571. package/widgets/support/widget.d.ts +6 -6
  572. package/assets/esri/core/workers/chunks/02aaeaa988e9e7d65a7f.js +0 -1
  573. package/assets/esri/core/workers/chunks/07a242ea908aa8e2ba28.js +0 -1
  574. package/assets/esri/core/workers/chunks/0a780a883abfcdf0b900.js +0 -1
  575. package/assets/esri/core/workers/chunks/0fbf9bf52ecb4cd8293b.js +0 -1
  576. package/assets/esri/core/workers/chunks/119d352dd586f2bb61ec.js +0 -1
  577. package/assets/esri/core/workers/chunks/130784a27661de6b52a5.js +0 -1
  578. package/assets/esri/core/workers/chunks/145364aa20b4435294c2.js +0 -1
  579. package/assets/esri/core/workers/chunks/14c6419568d8a7a15cd6.js +0 -1
  580. package/assets/esri/core/workers/chunks/153dc2a0b08a0e44a881.js +0 -1
  581. package/assets/esri/core/workers/chunks/1595dc499a06b23b6a96.js +0 -1
  582. package/assets/esri/core/workers/chunks/16713986893adfbc9331.js +0 -1
  583. package/assets/esri/core/workers/chunks/1765042635084f75d2b3.js +0 -1
  584. package/assets/esri/core/workers/chunks/179c9fe4ac83b42e5976.js +0 -1
  585. package/assets/esri/core/workers/chunks/1c1515e020e32e177b54.js +0 -1
  586. package/assets/esri/core/workers/chunks/1c64e10f966e26af6fed.js +0 -1
  587. package/assets/esri/core/workers/chunks/1ddbf5f507ac153234be.js +0 -1
  588. package/assets/esri/core/workers/chunks/201007cf1a91e2b126fc.js +0 -1
  589. package/assets/esri/core/workers/chunks/20d0adc678f11981059c.js +0 -1
  590. package/assets/esri/core/workers/chunks/227eff8aa4a6f5f03bc2.js +0 -1
  591. package/assets/esri/core/workers/chunks/233ff588798c8a5eedf4.js +0 -1
  592. package/assets/esri/core/workers/chunks/24647e7424798dccdaf5.js +0 -1
  593. package/assets/esri/core/workers/chunks/249616ea2d90d40a8299.js +0 -1
  594. package/assets/esri/core/workers/chunks/24d9e4f1c7b8ff0d2cce.js +0 -1
  595. package/assets/esri/core/workers/chunks/24eaf1349ffe10e616e6.js +0 -1
  596. package/assets/esri/core/workers/chunks/29615df388a0df022d8c.js +0 -1
  597. package/assets/esri/core/workers/chunks/2bcd4d395bfe6a19ccc8.js +0 -1
  598. package/assets/esri/core/workers/chunks/2bd334f9ab89334df713.js +0 -1
  599. package/assets/esri/core/workers/chunks/2c8584ec1c3c9fd5aba2.js +0 -1
  600. package/assets/esri/core/workers/chunks/2d374cc8c54a722a7afe.js +0 -1
  601. package/assets/esri/core/workers/chunks/2e11b4e9d66474a60064.js +0 -1
  602. package/assets/esri/core/workers/chunks/2fa080539d039c92ce08.js +0 -1
  603. package/assets/esri/core/workers/chunks/3109b05fe4fc40d4f25b.js +0 -1
  604. package/assets/esri/core/workers/chunks/31442f25d550ead58fc4.js +0 -1
  605. package/assets/esri/core/workers/chunks/319ff04282dc8ae38b56.js +0 -2
  606. package/assets/esri/core/workers/chunks/32323b0e0fcecd8f640e.js +0 -1
  607. package/assets/esri/core/workers/chunks/330da3828eefd8d72d3f.js +0 -1
  608. package/assets/esri/core/workers/chunks/3402fb9c596b582311c7.js +0 -1
  609. package/assets/esri/core/workers/chunks/388e71e8f2ec41bfa5a9.js +0 -1
  610. package/assets/esri/core/workers/chunks/3a6678ee9990d7e83e15.js +0 -1
  611. package/assets/esri/core/workers/chunks/3aacaa1be5efeac23a37.js +0 -1
  612. package/assets/esri/core/workers/chunks/3b3986276e70297d573b.js +0 -1
  613. package/assets/esri/core/workers/chunks/3b765a8cac9e92f644f2.js +0 -1
  614. package/assets/esri/core/workers/chunks/3bf6d55511cd7722eb93.js +0 -1
  615. package/assets/esri/core/workers/chunks/3e012cd3ca4451f89f59.js +0 -1
  616. package/assets/esri/core/workers/chunks/40910c69307e2d2d3f28.js +0 -1
  617. package/assets/esri/core/workers/chunks/423a9882abd4a6dadf86.js +0 -1
  618. package/assets/esri/core/workers/chunks/428561df7ba6f02e2d80.js +0 -1
  619. package/assets/esri/core/workers/chunks/45323491f9005629c602.js +0 -1
  620. package/assets/esri/core/workers/chunks/46d0a25d33b5b328cfce.js +0 -1
  621. package/assets/esri/core/workers/chunks/46fbd519cc1a37923bfc.js +0 -1
  622. package/assets/esri/core/workers/chunks/47dd2bfecc5c4b5f10f0.js +0 -1
  623. package/assets/esri/core/workers/chunks/4845df00f6ebcce6ea3e.js +0 -1
  624. package/assets/esri/core/workers/chunks/48fcc10768d93e95a04e.js +0 -1
  625. package/assets/esri/core/workers/chunks/49f6c9e9980b8c624fd7.js +0 -1
  626. package/assets/esri/core/workers/chunks/4a9dd9f8aa98882218f3.js +0 -1
  627. package/assets/esri/core/workers/chunks/4bfffdfbe6d467f143a4.js +0 -1
  628. package/assets/esri/core/workers/chunks/4ef53455c8bc6efee80e.js +0 -1
  629. package/assets/esri/core/workers/chunks/518046d2b95a7590a092.js +0 -1
  630. package/assets/esri/core/workers/chunks/51ee6102f5f4840a5b47.js +0 -1
  631. package/assets/esri/core/workers/chunks/54dad475dc806a38c287.js +0 -1
  632. package/assets/esri/core/workers/chunks/552945a73a95cd2a9f54.js +0 -1
  633. package/assets/esri/core/workers/chunks/58155f24f8ed6aca7a21.js +0 -1
  634. package/assets/esri/core/workers/chunks/5838f46d341d2fde42ee.js +0 -1
  635. package/assets/esri/core/workers/chunks/58994b6bfcda5f2ada80.js +0 -1
  636. package/assets/esri/core/workers/chunks/592a599f514de373dead.js +0 -1
  637. package/assets/esri/core/workers/chunks/5aba23584e0b230c75f5.js +0 -1
  638. package/assets/esri/core/workers/chunks/5f9bacee6fbf9ac1bca0.js +0 -1
  639. package/assets/esri/core/workers/chunks/62206d5d497b95fc4caf.js +0 -1
  640. package/assets/esri/core/workers/chunks/624b1bb269744142b835.js +0 -1
  641. package/assets/esri/core/workers/chunks/64daa2a714e59d22bbd4.js +0 -1
  642. package/assets/esri/core/workers/chunks/65621650a53f69f7b05a.js +0 -1
  643. package/assets/esri/core/workers/chunks/6637f19b82555738a1d5.js +0 -1
  644. package/assets/esri/core/workers/chunks/6c9933f948efd7923aa1.js +0 -1
  645. package/assets/esri/core/workers/chunks/6cab67fc7044ee9b863b.js +0 -1
  646. package/assets/esri/core/workers/chunks/6db274f6767102a39021.js +0 -1
  647. package/assets/esri/core/workers/chunks/7014e73dfd3c8baa704c.js +0 -1
  648. package/assets/esri/core/workers/chunks/76589434d573111a8fb4.js +0 -1
  649. package/assets/esri/core/workers/chunks/767ea5b455b3823afd09.js +0 -1
  650. package/assets/esri/core/workers/chunks/77769663cd712822d33e.js +0 -1
  651. package/assets/esri/core/workers/chunks/77859a61d059738d057f.js +0 -1
  652. package/assets/esri/core/workers/chunks/7b564226def99fcf79d8.js +0 -1
  653. package/assets/esri/core/workers/chunks/7bbffe07e62897928773.js +0 -1
  654. package/assets/esri/core/workers/chunks/7cadfd7444a2a05cf2fb.js +0 -1
  655. package/assets/esri/core/workers/chunks/823789261ca3338f0fa8.js +0 -1
  656. package/assets/esri/core/workers/chunks/84b0b6e099d949e0fea5.js +0 -1
  657. package/assets/esri/core/workers/chunks/8c5a41ae68775bac3446.js +0 -1
  658. package/assets/esri/core/workers/chunks/8f94c90fdb0333da2d0f.js +0 -1
  659. package/assets/esri/core/workers/chunks/9133c1b7cc1c9da27deb.js +0 -1
  660. package/assets/esri/core/workers/chunks/9a6e62ef984e9c5babc4.js +0 -1
  661. package/assets/esri/core/workers/chunks/9d27cc631bab8aa7479e.js +0 -1
  662. package/assets/esri/core/workers/chunks/9dcfaca1f4fa8c8026ac.js +0 -1
  663. package/assets/esri/core/workers/chunks/9f23a61c60949459c14f.js +0 -30
  664. package/assets/esri/core/workers/chunks/a03c4c0bf138734a002e.js +0 -1
  665. package/assets/esri/core/workers/chunks/a0fa60a24e58f7a47e41.js +0 -1
  666. package/assets/esri/core/workers/chunks/a806ac351ef5da04c250.js +0 -1
  667. package/assets/esri/core/workers/chunks/ab94c9f62462d7a98f6a.js +0 -1
  668. package/assets/esri/core/workers/chunks/abdb05754c50776c3edd.js +0 -1
  669. package/assets/esri/core/workers/chunks/ad488985824fbb830ed6.js +0 -1
  670. package/assets/esri/core/workers/chunks/b08a1255dacf6cfcf139.js +0 -640
  671. package/assets/esri/core/workers/chunks/b098469e0010a6b44df9.js +0 -1
  672. package/assets/esri/core/workers/chunks/b0ac4b0b7aec70cfe6eb.js +0 -1
  673. package/assets/esri/core/workers/chunks/b1f1271434af302938e8.js +0 -1
  674. package/assets/esri/core/workers/chunks/bfbd1ca28ed2f263e58f.js +0 -1
  675. package/assets/esri/core/workers/chunks/c1b6de0d728d25d7905a.js +0 -1
  676. package/assets/esri/core/workers/chunks/c27cb2a83a1d2e004501.js +0 -1
  677. package/assets/esri/core/workers/chunks/c44be4aaba829e6d149d.js +0 -1
  678. package/assets/esri/core/workers/chunks/ca1b0cb14ea9ae1bf2a3.js +0 -1
  679. package/assets/esri/core/workers/chunks/ca4245414d8ecd217f9d.js +0 -1
  680. package/assets/esri/core/workers/chunks/cc479daacd2cf715baa8.js +0 -1
  681. package/assets/esri/core/workers/chunks/ce0e627a5e1cb78adce8.js +0 -1
  682. package/assets/esri/core/workers/chunks/cf7acf5acb6d322fd996.js +0 -1
  683. package/assets/esri/core/workers/chunks/d3af51a6d9014ff46170.js +0 -1
  684. package/assets/esri/core/workers/chunks/d561dc933d8fe1672d85.js +0 -1
  685. package/assets/esri/core/workers/chunks/d81291dac1932350eccd.js +0 -1
  686. package/assets/esri/core/workers/chunks/da3c54e27a808f4fcc18.js +0 -1
  687. package/assets/esri/core/workers/chunks/dc6d50e1097a920ff820.js +0 -1
  688. package/assets/esri/core/workers/chunks/dd58286dde3b20356f84.js +0 -1
  689. package/assets/esri/core/workers/chunks/dfeddb7b17fa9eaae64c.js +0 -1
  690. package/assets/esri/core/workers/chunks/e38836bfcc7a15a2fd1f.js +0 -1
  691. package/assets/esri/core/workers/chunks/e4e0c5a45cf32973d5d5.js +0 -1
  692. package/assets/esri/core/workers/chunks/e638391801ad83fe4a68.js +0 -1
  693. package/assets/esri/core/workers/chunks/e645f992ec6f935ee3a5.js +0 -1
  694. package/assets/esri/core/workers/chunks/e755477dc78e9d6038d4.js +0 -1
  695. package/assets/esri/core/workers/chunks/e7712467db46e1385cf4.js +0 -1
  696. package/assets/esri/core/workers/chunks/e9dcc3e9dbafe9bbed84.js +0 -1
  697. package/assets/esri/core/workers/chunks/ea8f642b1db933d2c26f.js +0 -1
  698. package/assets/esri/core/workers/chunks/eabd4a78221b7e733793.js +0 -1
  699. package/assets/esri/core/workers/chunks/ed2cb60e4f17f46fb78d.js +0 -1
  700. package/assets/esri/core/workers/chunks/edb55329305becdb204f.js +0 -1
  701. package/assets/esri/core/workers/chunks/eedee0af459e6b8a6116.js +0 -1
  702. package/assets/esri/core/workers/chunks/f05932aea4eb267cba4d.js +0 -1
  703. package/assets/esri/core/workers/chunks/f1fb2f12371f4c562079.js +0 -1
  704. package/assets/esri/core/workers/chunks/f3dfe1bd1146a6927407.js +0 -1
  705. package/assets/esri/core/workers/chunks/f79bd469b25099a31274.js +0 -1
  706. package/assets/esri/core/workers/chunks/ff48334528d2554db4fe.js +0 -1
  707. package/views/3d/analysis/LineOfSight/LineOfSightAuthoringStore.js +0 -2
  708. /package/assets/esri/core/workers/chunks/{50dc9893e13396f5e35d.js.LICENSE.txt → 62e77e3c5ca9b4887923.js.LICENSE.txt} +0 -0
  709. /package/assets/esri/core/workers/chunks/{319ff04282dc8ae38b56.js.LICENSE.txt → 68f9b2da1fd08785320f.js.LICENSE.txt} +0 -0
  710. /package/assets/esri/core/workers/chunks/{c216cd5d6b5d4fe4bab3.js.LICENSE.txt → 9629601de5e44ffe90ea.js.LICENSE.txt} +0 -0
  711. /package/assets/esri/core/workers/chunks/{8244b74e9c3a30d8d2f6.js.LICENSE.txt → d9d4754062758789f186.js.LICENSE.txt} +0 -0
  712. /package/assets/esri/core/workers/chunks/{d1ccc5f2d8892328ab01.js.LICENSE.txt → f5731ad4cfbbf1cc569a.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{defaultFontFamily as t}from"../../core/fontUtils.js";import has from"../../core/has.js";import{clone as e}from"../../core/lang.js";import r from"../../core/Logger.js";import{deg2rad as s}from"../../core/mathUtils.js";import i from"../../core/ObjectPool.js";import{px2pt as n,pt2px as o}from"../../core/screenUtils.js";import{GeometryCursor as a}from"../../geometry/GeometryCursor.js";import{fromValues as l,empty as h,expandPointInPlace as c,center as m,width as f,height as u,diagonal as d,create as g}from"../../geometry/support/aaBoundingRect.js";import{getBoundsXY as p}from"../../geometry/support/boundsUtils.js";import{polygonCentroid as _}from"../../geometry/support/centroid.js";import{segmentIntersects as y}from"../../geometry/support/intersectsBase.js";import{isPolygon as P,isPolyline as S,isExtent as x,isMultipoint as w,isPoint as M}from"../../geometry/support/jsonTypeUtils.js";import{SimpleEffectCursor as b}from"./CIMEffects.js";import k from"./CIMImageColorSubstitutionHelper.js";import{getEffectOperator as T,getPlacementOperator as C}from"./CIMOperators.js";import{Placement as v}from"./CIMPlacements.js";import{defaultCIMValues as I}from"./defaultCIMValues.js";import{getFirstFrame as R}from"./imageUtils.js";import{rotate as z}from"./mathUtils.js";import{addColorStops as L}from"./rasterizingUtils.js";import U from"./Rect.js";import F from"./TextRasterizer.js";import{getNumericValue as A,isSVGImage as j,getRelativeGradientSize as G,getEffectsInflateSize as D,fromCIMFontDecoration as H,fromCIMFontStyle as E,fromCIMHorizontalAlignment as B,fromCIMVerticalAlignment as X,getFillColor as J,getStrokeColor as N,getStrokeWidth as O,getFontWeight as q,getFontStyle as V,isCIMFill as W,getSize as Y}from"./utils.js";import{destroyHiddenSvg as K,createHiddenSvg as $,createSvgElement as Q}from"../../views/2d/engine/svgUtils.js";import{magicLabelLineHeight as Z,glyphSize as tt,hittestToleranceSmallSymbol as et,hittestSmallSymbolThreshold as rt}from"../../views/2d/engine/webgl/definitions.js";import{shapeGlyphs as st}from"../../views/2d/engine/webgl/mesh/templates/shapingUtils.js";import{roundPtToWholePixel as it,getLineWidth as nt}from"../../views/2d/layers/graphics/graphicsUtils.js";const ot=Math.PI/180,at=.5,lt=()=>r.getLogger("esri.symbols.cim.CIMSymbolDrawHelper");class ht{constructor(t){this._t=t}static createIdentity(){return new ht([1,0,0,0,1,0])}clone(){const t=this._t;return new ht(t.slice())}transform(t){const e=this._t;return[e[0]*t[0]+e[1]*t[1]+e[2],e[3]*t[0]+e[4]*t[1]+e[5]]}static createScale(t,e){return new ht([t,0,0,0,e,0])}scale(t,e){const r=this._t;return r[0]*=t,r[1]*=t,r[2]*=t,r[3]*=e,r[4]*=e,r[5]*=e,this}scaleRatio(){return Math.sqrt(this._t[0]*this._t[0]+this._t[1]*this._t[1])}static createTranslate(t,e){return new ht([0,0,t,0,0,e])}translate(t,e){const r=this._t;return r[2]+=t,r[5]+=e,this}static createRotate(t){const e=Math.cos(t),r=Math.sin(t);return new ht([e,-r,0,r,e,0])}rotate(t){return ht.multiply(this,ht.createRotate(t),this)}angle(){const t=this._t[0],e=this._t[3],r=Math.sqrt(t*t+e*e);return[t/r,e/r]}static multiply(t,e,r){const s=t._t,i=e._t,n=s[0]*i[0]+s[3]*i[1],o=s[1]*i[0]+s[4]*i[1],a=s[2]*i[0]+s[5]*i[1]+i[2],l=s[0]*i[3]+s[3]*i[4],h=s[1]*i[3]+s[4]*i[4],c=s[2]*i[3]+s[5]*i[4]+i[5],m=r._t;return m[0]=n,m[1]=o,m[2]=a,m[3]=l,m[4]=h,m[5]=c,r}invert(){const t=this._t;let e=t[0]*t[4]-t[1]*t[3];if(0===e)return new ht([0,0,0,0,0,0]);e=1/e;const r=(t[1]*t[5]-t[2]*t[4])*e,s=(t[2]*t[3]-t[0]*t[5])*e,i=t[4]*e,n=-t[1]*e,o=-t[3]*e,a=t[0]*e;return new ht([i,n,r,o,a,s])}}class ct{constructor(t,e){this._resourceManager=t,this._transfos=[],this._sizeTransfos=[],this._geomUnitsPerPoint=1,this._placementPool=new i(()=>new v,void 0,void 0,100),this._earlyReturn=!1,this._mapRotation=0,this._transfos.push(e||ht.createIdentity()),this._sizeTransfos.push(e?e.scaleRatio():1)}setTransform(t,e){this._transfos=[t||ht.createIdentity()],this._sizeTransfos=[e||(t?t.scaleRatio():1)]}setGeomUnitsPerPoint(t){this._geomUnitsPerPoint=t}transformPt(t){return this._transfos[this._transfos.length-1].transform(t)}transformSize(t){return t*this._sizeTransfos[this._sizeTransfos.length-1]}reverseTransformPt(t){return this._transfos[this._transfos.length-1].invert().transform(t)}reverseTransformSize(t){return t/this._sizeTransfos[this._sizeTransfos.length-1]}reverseTransformScalar(t){return t/this._transfos[this._transfos.length-1].scaleRatio()}getTransformAngle(){return this._transfos[this._transfos.length-1].angle()}geomUnitsPerPoint(){return this.isEmbedded()?1:this._geomUnitsPerPoint}prevGeomUnitsPerPoint(){return this._transfos.length>2?1:this._geomUnitsPerPoint}isEmbedded(){return this._transfos.length>1}back(){return this._transfos[this._transfos.length-1]}push(t,e){const r=e?t.scaleRatio():1;ht.multiply(t,this.back(),t),this._transfos.push(t),this._sizeTransfos.push(this._sizeTransfos[this._sizeTransfos.length-1]*r)}pop(){this._transfos.splice(-1,1),this._sizeTransfos.splice(-1,1)}drawSymbol(t,e,r){if(t)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":this.drawMultiLayerSymbol(t,e);break;case"CIMTextSymbol":this.drawTextSymbol(t,e,r)}}drawMultiLayerSymbol(t,e){if(!t||!e)return;const r=t.symbolLayers;if(!r)return;const s=t.effects;if(s&&s.length>0){const t=this.executeEffects(s,e);if(t){let e=t.next();for(;e;)this.drawSymbolLayers(r,e.asJSON()),e=t.next()}}else this.drawSymbolLayers(r,e)}executeEffects(t,e){const r=this.geomUnitsPerPoint(),s=null,i=D(t),n=!1;let o=new b(a.fromJSONCIM(e));for(const a of t){const t=T(a);t&&(o=t.execute(o,a,{geomUnitsPerPoint:r,tileKey:s,maxInflateSize:i,scale:null,spatialReference:e.spatialReference,preventClipping:n}))}return o}drawSymbolLayers(t,e){let r=t.length;for(;r--;){const s=t[r];if(!s||!1===s.enable)continue;const i=s.effects;if(i&&i.length>0){const t=this.executeEffects(i,e);if(t){let e=null;for(;(e=t.next())&&(this.drawSymbolLayer(s,e.asJSON()),!this._earlyReturn););}}else this.drawSymbolLayer(s,e);if(this._earlyReturn)return}}drawSymbolLayer(t,e){switch(t.type){case"CIMSolidFill":this.drawSolidFill(e,t.color,t.path);break;case"CIMHatchFill":this.drawHatchFill(e,t);break;case"CIMPictureFill":this.drawPictureFill(e,t);break;case"CIMGradientFill":this.drawGradientFill(e,t);break;case"CIMSolidStroke":this.drawSolidStroke(e,t.color,t.width,t.capStyle,t.joinStyle,t.miterLimit,t.path);break;case"CIMPictureStroke":this.drawPictureStroke(e,t);break;case"CIMGradientStroke":this.drawGradientStroke(e,t);break;case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":this.drawMarkerLayer(t,e)}}drawHatchFill(t,e){const r=dt(e,t,this.geomUnitsPerPoint());r&&(this.pushClipPath(t),this.drawMultiLayerSymbol(e.lineSymbol,r),this.popClipPath())}drawPictureFill(t,e){}drawGradientFill(t,e){}drawPictureStroke(t,e){}drawGradientStroke(t,e){}drawMarkerLayer(t,e){const r=t.markerPlacement;if(r){const s=C(r);if(s){const i="CIMMarkerPlacementInsidePolygon"===r.type||"CIMMarkerPlacementPolygonCenter"===r.type&&r.clipAtBoundary;i&&this.pushClipPath(e);const n=s.execute(a.fromJSONCIM(e),r,this.geomUnitsPerPoint(),null);if(n){let e=null;for(;(e=n.next())&&(this.drawMarker(t,e),!this._earlyReturn););}i&&this.popClipPath()}}else{const r=this._placementPool.acquire();if(M(e))r.tx=e.x,r.ty=e.y,this.drawMarker(t,r);else if(P(e)){const s=_(e);s&&([r.tx,r.ty]=s,this.drawMarker(t,r))}else if(S(e)){for(const s of e.paths)for(const e of s)if(r.tx=e[0],r.ty=e[1],this.drawMarker(t,r),this._earlyReturn)break}else for(const s of e.points)if(r.tx=s[0],r.ty=s[1],this.drawMarker(t,r),this._earlyReturn)break;this._placementPool.release(r)}}drawMarker(t,e){switch(t.type){case"CIMCharacterMarker":case"CIMPictureMarker":this.drawPictureMarker(t,e);break;case"CIMVectorMarker":this.drawVectorMarker(t,e)}}drawPictureMarker(t,e){if(!t)return;const r=this._resourceManager.getResource(t.url),s=A(t.size,I.CIMPictureMarker.size);if(null==r||s<=0)return;const i=r.width,n=r.height;if(!i||!n)return;const o=i/n,a=A(t.scaleX,1),l=ht.createIdentity(),h=t.anchorPoint;if(h){let e=h.x,r=h.y;"Absolute"!==t.anchorPointUnits&&(e*=s*o*a,r*=s),l.translate(-e,-r)}let c=A(t.rotation);t.rotateClockwise&&(c=-c),this._mapRotation&&(c+=this._mapRotation),c&&l.rotate(c*ot);let m=A(t.offsetX),f=A(t.offsetY);if(m||f){if(this._mapRotation){const t=ot*this._mapRotation,e=Math.cos(t),r=Math.sin(t),s=m*r+f*e;m=m*e-f*r,f=s}l.translate(m,f)}const u=this.geomUnitsPerPoint();1!==u&&l.scale(u,u);const d=e.getAngle();d&&l.rotate(d),l.translate(e.tx,e.ty),this.push(l,!1),this.drawImage(t,s),this.pop()}drawVectorMarker(t,e){if(!t)return;const r=t.markerGraphics;if(!r)return;const s=A(t.size,I.CIMVectorMarker.size),i=t.frame,n=i?i.ymax-i.ymin:0,o=s&&n?s/n:1,a=ht.createIdentity();i&&a.translate(.5*-(i.xmax+i.xmin),.5*-(i.ymax+i.ymin));const l=t.anchorPoint;if(l){let e=l.x,r=l.y;"Absolute"!==t.anchorPointUnits?i&&(e*=i.xmax-i.xmin,r*=i.ymax-i.ymin):(e/=o,r/=o),a.translate(-e,-r)}1!==o&&a.scale(o,o);let h=A(t.rotation);t.rotateClockwise&&(h=-h),this._mapRotation&&(h+=this._mapRotation),h&&a.rotate(h*ot);let c=A(t.offsetX),m=A(t.offsetY);if(c||m){if(this._mapRotation){const t=ot*this._mapRotation,e=Math.cos(t),r=Math.sin(t),s=c*r+m*e;c=c*e-m*r,m=s}a.translate(c,m)}const f=this.geomUnitsPerPoint();1!==f&&a.scale(f,f);const u=e.getAngle();u&&a.rotate(u),a.translate(e.tx,e.ty),this.push(a,t.scaleSymbolsProportionally);for(const d of r){d?.symbol&&d.geometry||lt().error("Invalid marker graphic",d);let t=d.textString;if("number"==typeof t&&(t=t.toString()),this.drawSymbol(d.symbol,d.geometry,t),this._earlyReturn)break}this.pop()}drawTextSymbol(t,e,r){if(!t)return;if(!M(e))return;if(A(t.height,I.CIMTextSymbol.height)<=0)return;const s=ht.createIdentity();let i=A(t.angle);i=-i,i&&s.rotate(i*ot);const n=A(t.offsetX),o=A(t.offsetY);(n||o)&&s.translate(n,o);const a=this.geomUnitsPerPoint();1!==a&&s.scale(a,a),s.translate(e.x,e.y),this.push(s,!1),this.drawText(t,r),this.pop()}}class mt extends ct{constructor(t,e){super(t,e),this.reset()}reset(){this._xmin=this._ymin=1/0,this._xmax=this._ymax=-1/0,this._clipCount=0}envelope(){return new U(this._xmin,this._ymin,this._xmax-this._xmin,this._ymax-this._ymin)}bounds(){return l(this._xmin,this._ymin,this._xmax,this._ymax)}drawSolidFill(t){if(t&&!(this._clipCount>0))if(P(t))this._processPath(t.rings,0);else if(S(t))this._processPath(t.paths,0);else if(x(t)){const e=yt(t);e&&this._processPath(e.rings,0)}else console.error("drawSolidFill Unexpected geometry type!")}drawSolidStroke(t,e,r){if(!t||this._clipCount>0||null==r||r<=0)return;const s=Math.max(.5*this.transformSize(A(r,I.CIMSolidStroke.width)),.5*at);if(P(t))this._processPath(t.rings,s);else if(S(t))this._processPath(t.paths,s);else if(x(t)){const e=yt(t);e&&this._processPath(e.rings,s)}else console.error("drawSolidStroke unexpected geometry type!")}drawMarkerLayer(t,e){P(e)&&t.markerPlacement&&("CIMMarkerPlacementInsidePolygon"===t.markerPlacement.type||"CIMMarkerPlacementPolygonCenter"===t.markerPlacement.type&&t.markerPlacement.clipAtBoundary)?this._processPath(e.rings,0):super.drawMarkerLayer(t,e)}drawHatchFill(t,e){this.drawSolidFill(t)}drawPictureFill(t,e){this.drawSolidFill(t)}drawGradientFill(t,e){this.drawSolidFill(t)}drawPictureStroke(t,e){this.drawSolidStroke(t,null,e.width)}drawGradientStroke(t,e){this.drawSolidStroke(t,null,e.width)}pushClipPath(t){this.drawSolidFill(t),this._clipCount++}popClipPath(){this._clipCount--}drawImage(t,e){const{url:r}=t,s=A(t.scaleX,1);let i=s*e,n=e;const o=this._resourceManager.getResource(r);if(null!=o){const t=o.height/o.width;i=s*(e?t>1?e:e/t:o.width),n=e?t>1?e*t:e:o.height}this._merge(this.transformPt([-i/2,-n/2]),0),this._merge(this.transformPt([-i/2,n/2]),0),this._merge(this.transformPt([i/2,-n/2]),0),this._merge(this.transformPt([i/2,n/2]),0)}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new F);const r=St(t);let[s,i]=this._textRasterizer.computeTextSize(e,r);s=n(s),i=n(i);const o=this.transformSize(1)*this.reverseTransformScalar(1);s*=o,i*=o;const a=t.horizontalAlignment??I.CIMTextSymbol.horizontalalignment,l=t.verticalAlignment??I.CIMTextSymbol.verticalalignment;let h=0;switch(a){case"Left":h=s/2;break;case"Right":h=-s/2}let c=0;switch(l){case"Bottom":c=i/2;break;case"Top":c=-i/2;break;case"Baseline":c=i/6}this._merge(this.transformPt([-s/2+h,-i/2+c]),0),this._merge(this.transformPt([-s/2+h,i/2+c]),0),this._merge(this.transformPt([s/2+h,-i/2+c]),0),this._merge(this.transformPt([s/2+h,i/2+c]),0)}_processPath(t,e){if(t)for(const r of t){const t=r?r.length:0;if(t>1){this._merge(this.transformPt(r[0]),e);for(let s=1;s<t;s++)this._merge(this.transformPt(r[s]),e)}}}_merge(t,e){t[0]-e<this._xmin&&(this._xmin=t[0]-e),t[0]+e>this._xmax&&(this._xmax=t[0]+e),t[1]-e<this._ymin&&(this._ymin=t[1]-e),t[1]+e>this._ymax&&(this._ymax=t[1]+e)}}class ft extends ct{constructor(){super(...arguments),this._hittestType="point",this._searchTarget=[],this._searchDistPoint=0,this._textInfo=null,this._svg=null,this._path=null,this._canvas=null}destroy(){this._svg=K(this._svg),this._path=null,this._canvas=null}hitTest(t,e,r,s,i,a,l,h){this._resetHittest();const c=a*o(1);switch(this.setGeomUnitsPerPoint(c),h){case"point":if(1!==t.length)return lt().error("Unexpected hittest area",t),!1;this._hittestType="point",this._searchDistPoint=l/2/c,this._searchTarget=[[t[0].x,t[0].y]];break;case"rect":if(4!==t.length)return lt().error("Unexpected hittest area",t),!1;this._hittestType="rect",this._searchDistPoint=0,this._searchTarget=t.map(t=>[t.x,t.y])}this._textInfo=s;const m=e&&("CIMPointSymbol"===e.type&&"Map"!==e.angleAlignment||"CIMTextSymbol"===e.type);if(this._mapRotation=m?i:0,!has("esri-mobile")){const t=n(et*window.devicePixelRatio),r=n(rt);!(("CIMLineSymbol"===e?.type||"CIMPolygonSymbol"===e?.type)&&e.symbolLayers?.some(W))&&"CIMMeshSymbol"!==e?.type&&(Y(e)??0)<r&&(this._searchDistPoint=t)}return this._earlyReturn=!1,this.drawSymbol(e,r),this._earlyReturn}executeEffects(t,e){return"CIMGeometricEffectDashes"===t.at(-1)?.type&&(t=t.slice(0,-1)),super.executeEffects(t,e)}drawSolidFill(t,e,r){null!=r?this._hittestSvgPath(t,r,!0):this._hitTestFill(t)}drawHatchFill(t,e){this._hitTestFill(t)}drawPictureFill(t,e){this._hitTestFill(t)}drawGradientFill(t,e){this._hitTestFill(t)}drawSolidStroke(t,e,r,s,i,n,o){null!=o?this._hittestSvgPath(t,o,!1,r):this._hitTestStroke(t,r)}drawPictureStroke(t,e){this._hitTestStroke(t,e.width)}drawGradientStroke(t,e){this._hitTestStroke(t,e.width)}drawMarkerLayer(t,e){t.markerPlacement&&("CIMMarkerPlacementInsidePolygon"===t.markerPlacement.type||"CIMMarkerPlacementPolygonCenter"===t.markerPlacement.type&&t.markerPlacement.clipAtBoundary)?this._hitTestFill(e):super.drawMarkerLayer(t,e)}pushClipPath(t){}popClipPath(){}drawImage(t,e){const{url:r}=t,s=A(t.scaleX,1),i=this._resourceManager.getResource(r);if(null==i||0===i.height||0===e)return;const n=e*this.geomUnitsPerPoint(),o=n*s*(i.width/i.height);if("point"===this._hittestType){const t=this.reverseTransformPt(this._searchTarget[0]),e=this._searchDistPoint;Math.abs(t[0])<o/2+e&&Math.abs(t[1])<n/2+e&&(this._earlyReturn=!0)}else{const t=o/2,e=n/2,r=[[-t,e],[t,e],[t,-e],[-t,-e],[-t,e]];bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,[r])&&(this._earlyReturn=!0)}}drawText(t,e){const r=this._textInfo;if(!r)return;const s=r.get(t);if(!s)return;if(!s.glyphMosaicItems.glyphs.length)return;const i=it(A(t.height,I.CIMTextSymbol.height)),{lineGapType:n,lineGap:o}=t,a=n?Pt(n,A(o),i):0,l=t.horizontalAlignment??I.CIMTextSymbol.horizontalalignment,h=t.verticalAlignment??I.CIMTextSymbol.verticalalignment,c="CIMBackgroundCallout"===t.callout?.type,m=st(s.glyphMosaicItems,{scale:i/tt,angle:0,xOffset:0,yOffset:0,horizontalAlignment:l,verticalAlignment:h,maxLineWidth:nt(t.lineWidth),lineHeight:Z*Math.max(.25,Math.min(a||1,4)),decoration:t.font.decoration||"none",useCIMAngleBehavior:!0,hasBackground:c});if("point"===this._hittestType){const t=this.reverseTransformPt(this._searchTarget[0]),e=t[0],r=t[1];for(const s of m.glyphs){const[t,i]=s.offsets.topLeft,[n,o]=s.offsets.bottomRight;if(e>t&&e<n&&r>-o&&r<-i){this._earlyReturn=!0;break}}}else for(const f of m.glyphs){const[t,e]=f.offsets.topLeft,[r,s]=f.offsets.bottomRight,i=[[t,-e],[r,-e],[r,-s],[t,-s],[t,-e]];if(bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,[i])){this._earlyReturn=!0;break}}}_hitTestFill(t){let e=null;if(x(t)){const r=t;e=[[[r.xmin,r.ymin],[r.xmin,r.ymax],[r.xmax,r.ymax],[r.xmax,r.ymin],[r.xmin,r.ymin]]]}else if(P(t))e=t.rings;else{if(!S(t))return;e=t.paths}if("point"===this._hittestType){const t=this.reverseTransformPt(this._searchTarget[0]);if(gt(t,e)&&(this._earlyReturn=!0),!this._earlyReturn){pt(t,e,this.reverseTransformScalar(this._searchDistPoint)*this.prevGeomUnitsPerPoint())&&(this._earlyReturn=!0)}}else{bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,e)&&(this._earlyReturn=!0)}}_getSvgPath(){return null!=this._svg&&null!=this._path||(this._svg??=$(),this._path??=Q("path"),this._svg.appendChild(this._path)),this._path}_getCanvasContext(t,e){return this._canvas??=document.createElement("canvas"),this._canvas.width=t,this._canvas.height=e,this._canvas.getContext("2d",{willReadFrequently:!0})}_hittestSvgPath(t,e,r,s=0){const i=g();p(i,t);const n={x:i[0],y:i[1],width:i[2]-i[0],height:i[3]-i[1]},o=this._getSvgPath();o.setAttribute("d",e);const a=o.getBBox();if("point"===this._hittestType){const t=this.reverseTransformScalar(this._searchDistPoint)*this.prevGeomUnitsPerPoint(),i=this.reverseTransformPt(this._searchTarget[0]);let o=Math.max(a.width/n.width,a.height/n.height),l=1;const h=2*t*o;h<1&&(l=2/h,o*=l,a.x*=l,a.y*=l,a.width*=l,a.height*=l);const c=1+s*o/2,m=this._getCanvasContext(a.width+2*c,a.height+2*c);m.setTransform(l,0,0,l,-a.x+c,-a.y+c);const f=new Path2D(e);r?m.fill(f):(m.lineWidth=s*(o/l),m.stroke(f));const u=(n.width*o-a.width)/2,d=(n.height*o-a.height)/2,g=Math.floor((i[0]-n.x-t)*o-u+c),p=Math.floor((n.height-(i[1]-n.y)-t)*o+d+c),_=Math.ceil(2*t*o),y=Math.ceil(2*t*o),P=m.getImageData(g,p,_,y).data;for(let e=3;e<P.length;e+=4)if(P[e]>127.5)return void(this._earlyReturn=!0)}else{const t=[[n.x,n.y],[n.x,n.y+n.height],[n.x+n.width,n.y+n.height],[n.x+n.width,n.y],[n.x,n.y]];if(bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,[t]))return void(this._earlyReturn=!0)}}_hitTestStroke(t,e){let r=null;if(x(t)){const e=t;r=[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}else if(P(t))r=t.rings;else{if(!S(t))return;r=t.paths}if("point"===this._hittestType){pt(this.reverseTransformPt(this._searchTarget[0]),r,A(e,I.CIMSolidStroke.width)*this.geomUnitsPerPoint()/2+this.reverseTransformScalar(this._searchDistPoint)*this.prevGeomUnitsPerPoint())&&(this._earlyReturn=!0)}else{bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,r)&&(this._earlyReturn=!0)}}_resetHittest(){this.setTransform(),this._hittestType="point",this._searchTarget=[],this._searchDistPoint=0,this._textInfo=null}}class ut extends ct{constructor(t,e,r,s){super(e,r),this._applyAdditionalRenderProps=s,this._colorSubstitutionHelper=new k,this._ctx=t}drawSolidFill(t,e){if(!t)return;if(P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!0);else if(x(t))this._buildPath(yt(t).rings,!0);else{if(!w(t))return;console.log("CanvasDrawHelper.drawSolidFill - No implementation!")}const r=this._ctx;r.fillStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",r.fill("evenodd")}drawSolidStroke(t,e,r,s,i,n){if(!t||!e||0===r)return;if(P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!1);else{if(!x(t))return void console.log("CanvasDrawHelper.drawSolidStroke isn't implemented!");this._buildPath(yt(t).rings,!0)}const o=this._ctx;o.strokeStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",o.lineWidth=Math.max(this.transformSize(r),at),this._setCapStyle(s),this._setJoinStyle(i),o.miterLimit=n,o.stroke()}pushClipPath(t){if(this._ctx.save(),P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!0);else{if(!x(t))return;this._buildPath(yt(t).rings,!0)}this._ctx.clip("evenodd")}popClipPath(){this._ctx.restore()}drawImage(t,e){const{colorSubstitutions:r,url:s,tintColor:i}=t,n=A(t.scaleX,1),o=this._resourceManager.getResource(s);if(null==o)return;let a=e*(o.width/o.height),l=e;e||(a=o.width,l=o.height);const h=j(s)||"src"in o&&j(o.src);let c="getFrame"in o?R(o):o;r&&(c=this._colorSubstitutionHelper.applyColorSubstitution(c,r)),this._applyAdditionalRenderProps&&!h&&i&&(c=this._colorSubstitutionHelper.tintImageData(c,i));const m=this.transformPt([0,0]),[f,u]=this.getTransformAngle(),d=this.transformSize(1),g=this._ctx;g.save(),g.setTransform({m11:n*d*f,m12:n*d*u,m21:-d*u,m22:d*f,m41:m[0],m42:m[1]}),g.drawImage(c,-a/2,-l/2,a,l),g.restore()}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new F);const r=St(t,this.transformSize(n(1))),s=this._textRasterizer.rasterizeText(e,r);if(!s)return;const{size:i,anchorX:o,anchorY:a,canvas:l}=s,h=i[0]*(o+.5),c=i[1]*(a-.5),m=this._ctx,f=this.transformPt([0,0]),[u,d]=this.getTransformAngle(),g=1;m.save(),m.setTransform({m11:g*u,m12:g*d,m21:-g*d,m22:g*u,m41:f[0]-g*h,m42:f[1]+g*c}),m.drawImage(l,0,0),m.restore()}drawPictureFill(t,e){if(!t)return;let{colorSubstitutions:r,height:s,offsetX:i,offsetY:n,rotation:o,scaleX:a,tintColor:l,url:h}=e;const c=this._resourceManager.getResource(h);if(null==c)return;if(P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!0);else if(x(t))this._buildPath(yt(t).rings,!0);else{if(!w(t))return;console.log("CanvasDrawHelper.drawPictureFill - No implementation!")}const m=this._ctx,f=j(h)||"src"in c&&j(c.src);let u,d="getFrame"in c?R(c):c;if(r&&(d=this._colorSubstitutionHelper.applyColorSubstitution(d,r)),this._applyAdditionalRenderProps){f||l&&(d=this._colorSubstitutionHelper.tintImageData(d,l)),u=m.createPattern(d,"repeat");const t=this.transformSize(1);o||(o=0),i?i*=t:i=0,n?n*=t:n=0,s&&(s*=t);const e=s?s/c.height:1,r=a&&s?a*s/c.width:1;if(0!==o||1!==e||1!==r||0!==i||0!==n){const t=new DOMMatrix;t.rotateSelf(0,0,-o).translateSelf(i,n).scaleSelf(r,e,1),u.setTransform(t)}}else u=m.createPattern(d,"repeat");m.save(),m.fillStyle=u,m.fill("evenodd"),m.restore()}drawPictureStroke(t,r){if(!t)return;let{colorSubstitutions:s,capStyle:i,joinStyle:n,miterLimit:a,tintColor:l,url:h,width:c}=r;const m=this._resourceManager.getResource(h);if(null==m)return;let f;if(P(t))f=t.rings;else if(S(t))f=t.paths;else{if(!x(t))return w(t)?void console.log("CanvasDrawHelper.drawPictureStroke - No implementation!"):void 0;f=yt(t).rings}c||(c=m.width);const u=j(h)||"src"in m&&j(m.src);let d="getFrame"in m?R(m):m;s&&(d=this._colorSubstitutionHelper.applyColorSubstitution(d,s)),this._applyAdditionalRenderProps&&(u||l&&(d=this._colorSubstitutionHelper.tintImageData(d,l)));const g=Math.max(this.transformSize(o(c)),.5),p=g/d.width,_=this._ctx,y=_.createPattern(d,"repeat-y");let M,b;_.save(),this._setCapStyle(i),this._setJoinStyle(n),void 0!==a&&(_.miterLimit=a),_.lineWidth=g;for(let o of f)if(o=e(o),wt(o),o&&!(o.length<=1)){M=this.transformPt(o[0]);for(let t=1;t<o.length;t++){b=this.transformPt(o[t]);const e=_t(M,b),r=new DOMMatrix;r.translateSelf(0,M[1]-g/2).scaleSelf(p,p,1).rotateSelf(0,0,90-e),y.setTransform(r),_.strokeStyle=y,_.beginPath(),_.moveTo(M[0],M[1]),_.lineTo(b[0],b[1]),_.stroke(),M=b}}_.restore()}drawGradientFill(t,e){if(!t)return;let r;if(P(t))r=t.rings;else if(S(t))r=t.paths;else{if(!x(t))return void lt().error("Unable to draw gradient fill");r=yt(t).rings}this._buildPath(r,!0);const{angle:i,gradientMethod:n,gradientSize:a,gradientSizeUnits:l}=e,g=I.CIMGradientFill,p=e.gradientType??g.gradientType,_=-s(i??0),y=h();for(const s of r){const t=s?s.length:0;if(t>1)for(let e=0;e<t;e++){let t=this.transformPt(s[e]);"Linear"!==n&&"Rectangular"!==n||(t=z(t,-_)),c(y,t)}}const[w,M,b,k]=y,T=this._ctx;switch(T.save(),n){case"Buffered":lt().error(`Gradient method "${n}" currently unsupported.`);break;case"Linear":{const t=(M+k)/2,r="Absolute"===l?this.transformSize(o(a)):G(a,g.gradientSize)*(b-w),[s,i]="Discrete"===p?[b,b-r]:[w+r,w],n=z([s,t],_),h=z([i,t],_),c=T.createLinearGradient(n[0],n[1],h[0],h[1]);L(c,e),T.fillStyle=c,T.fill("evenodd");break}case"Circular":{const t=m(y),r=d(y)/2,s="Absolute"===l?this.transformSize(o(a)):G(a,g.gradientSize)*r,[i,n]="Discrete"===p?[r,r-s]:[s,0],h=T.createRadialGradient(t[0],t[1],i,t[0],t[1],n);L(h,e),T.fillStyle=h,T.fill("evenodd");break}case"Rectangular":{const r=m(y),s=r[0],i=r[1],n=z(r,_),h=(r,s,i,o,a,l,h,c)=>{T.save(),this.pushClipPath(t);const m=z([a,l],_),f=z([h,c],_);T.beginPath(),T.moveTo(n[0],n[1]),T.lineTo(m[0],m[1]),T.lineTo(f[0],f[1]),T.lineTo(n[0],n[1]),T.clip();const u=z([r,s],_),d=z([i,o],_),g=T.createLinearGradient(u[0],u[1],d[0],d[1]);L(g,e),T.fillStyle=g,T.fill("evenodd"),T.restore()};let c="Absolute"===l?this.transformSize(o(a)):G(a,g.gradientSize)*(f(y)/2),[d,P]="Discrete"===p?[b,b-c]:[s+c,s];h(d,i,P,i,b,M,b,k),[d,P]="Discrete"===p?[w,w+c]:[s-c,s],h(d,i,P,i,w,k,w,M),c="Absolute"===l?this.transformSize(o(a)):G(a,g.gradientSize)*(u(y)/2);let[S,x]="Discrete"===p?[k,k-c]:[i+c,i];h(s,S,s,x,b,k,w,k),[S,x]="Discrete"===p?[M,M+c]:[i-c,i],h(s,S,s,x,w,M,b,M);break}}T.restore()}drawGradientStroke(t,r){const{capStyle:s,gradientMethod:i,gradientSize:n,gradientSizeUnits:a,joinStyle:l,miterLimit:h,width:c}=r;if(!t||0===c)return;let m;if(P(t))m=t.rings;else if(S(t))m=t.paths;else{if(!x(t))return void lt().error("Unable to draw gradient stroke");m=yt(t).rings}const f=r.gradientType??I.CIMGradientStroke.gradientType,u=Math.max(this.transformSize(o(c)),.5),d=this._ctx;let g,p;d.save(),this._setCapStyle(s),this._setJoinStyle(l),void 0!==h&&(d.miterLimit=h),d.lineWidth=u;for(let _ of m){if(_=e(_),wt(_),!_||_.length<=1)continue;let t=0;g=this.transformPt(_[0]);for(let e=1;e<_.length;e++){p=this.transformPt(_[e]);const r=p[0]-g[0],s=p[1]-g[1];t+=Math.sqrt(r*r+s*s),g=p}const s="Absolute"===a?this.transformSize(o(n)):G(n,I.CIMGradientStroke.gradientSize)*("AcrossLine"===i?u:t);let l=0;g=this.transformPt(_[0]);for(let e=1;e<_.length;e++){p=this.transformPt(_[e]);const n=p[0]-g[0],o=p[1]-g[1],a=Math.sqrt(n*n+o*o);let h,c,m,y;switch(i){case"AcrossLine":{const[t,e]=z([n/a,o/a],-Math.PI/2),r=u/2,i="Discrete"===f?r:s-r;h=(g[0]+p[0])/2+t*i,c=(g[1]+p[1])/2+e*i,m=h-t*s,y=c-e*s;break}case"AlongLine":{const e=n/a,r=o/a;"Discrete"===f?(h=g[0]-e*l,c=g[1]-r*l,m=h+e*s,y=c+r*s):(m=g[0]+e*(t-l),y=g[1]+r*(t-l),h=m-e*s,c=y-r*s);break}default:return lt().error("Unrecognized gradient method:",i),void d.restore()}const P=d.createLinearGradient(h,c,m,y);L(P,r),d.strokeStyle=P,d.beginPath(),d.moveTo(g[0],g[1]),d.lineTo(p[0],p[1]),d.stroke(),l+=a,g=p}}d.restore()}_buildPath(t,e){const r=this._ctx;if(r.beginPath(),t)for(const s of t){const t=s?s.length:0;if(t>1){let i=this.transformPt(s[0]);r.moveTo(i[0],i[1]);for(let e=1;e<t;e++)i=this.transformPt(s[e]),r.lineTo(i[0],i[1]);e&&r.closePath()}}}_setCapStyle(t){switch(t){case"Butt":this._ctx.lineCap="butt";break;case"Round":this._ctx.lineCap="round";break;case"Square":this._ctx.lineCap="square"}}_setJoinStyle(t){switch(t){case"Bevel":this._ctx.lineJoin="bevel";break;case"Round":this._ctx.lineJoin="round";break;case"Miter":this._ctx.lineJoin="miter"}}}function dt(t,e,r){let s=A(t.separation,I.CIMHatchFill.separation)*r,i=A(t.rotation);if(0===s)return null;s<0&&(s=-s);let n=0;const o=.5*s;for(;n>o;)n-=s;for(;n<-o;)n+=s;const a=g();p(a,e),a[0]-=o,a[1]-=o,a[2]+=o,a[3]+=o;const l=[[a[0],a[1]],[a[0],a[3]],[a[2],a[3]],[a[2],a[1]]];for(;i>180;)i-=180;for(;i<0;)i+=180;const h=Math.cos(i*ot),c=Math.sin(i*ot),m=-s*c,f=s*h;let u,d,_,y;n=A(t.offsetX)*r*c-A(t.offsetY)*r*h,u=_=Number.MAX_VALUE,d=y=-Number.MAX_VALUE;for(const g of l){const t=g[0],e=g[1],r=h*t+c*e,s=-c*t+h*e;u=Math.min(u,r),_=Math.min(_,s),d=Math.max(d,r),y=Math.max(y,s)}_=Math.floor(_/s)*s;let P=h*u-c*_-m*n/s,S=c*u+h*_-f*n/s,x=h*d-c*_-m*n/s,w=c*d+h*_-f*n/s;const M=1+Math.round((y-_)/s),b=[];for(let g=0;g<M;g++)P+=m,S+=f,x+=m,w+=f,b.push([[P,S],[x,w]]);return{paths:b}}function gt(t,e){let r=0;for(const s of e){const e=s.length;for(let i=1;i<e;i++){const e=s[i-1],n=s[i];if(e[1]>t[1]==n[1]>t[1])continue;(n[0]-e[0])*(t[1]-e[1])-(n[1]-e[1])*(t[0]-e[0])>0?r++:r--}}return 0!==r}function pt(t,e,r){for(const s of e){const e=s.length;for(let i=1;i<e;i++){const e=s[i-1],n=s[i];let o=(n[0]-e[0])*(n[0]-e[0])+(n[1]-e[1])*(n[1]-e[1]);if(0===o)continue;o=Math.sqrt(o);const a=((n[0]-e[0])*(t[1]-e[1])-(n[1]-e[1])*(t[0]-e[0]))/o;if(Math.abs(a)<r){const s=((n[0]-e[0])*(t[0]-e[0])+(n[1]-e[1])*(t[1]-e[1]))/o;if(s>-r&&s<o+r)return!0}}}return!1}function _t(t,e){const r=e[0]-t[0],s=e[1]-t[1];return 180/Math.PI*Math.atan2(s,r)}const yt=t=>t?{spatialReference:t.spatialReference,rings:[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]]}:null,Pt=(t,e,r)=>{switch(t){case"ExtraLeading":return 1+e/r;case"Multiple":return e;case"Exact":return e/r}};function St(e,r=1){const s=H(e),i=E(e.fontStyleName),n=e.fontFamilyName??t,{weight:o,style:a}=i,l=r*(e.height||5),h=B(e.horizontalAlignment),c=X(e.verticalAlignment),m=J(e),f=J(e.haloSymbol),u=null!=f?r*(e.haloSize??0):0,d=N(e.symbol),g=r*(O(e.symbol)||0),p="CIMBackgroundCallout"===e.callout?.type?e.callout.backgroundSymbol:null,_=J(p),y=O(p),P=N(p);return{color:m,size:l,horizontalAlignment:h,verticalAlignment:c,font:{family:n,style:V(a),weight:q(o),decoration:s},outline:{size:g||0,color:d},halo:{size:u||0,color:f,style:a},backgroundColor:_,borderLine:null!=y&&null!=P?{size:y,color:P}:null,pixelRatio:1,premultiplyColors:!0}}const xt=1e-4;function wt(t){let e,r,s,i,n,o=t[0],a=1;for(;a<t.length;)e=t[a][0]-o[0],r=t[a][1]-o[1],i=0!==e?r/e:Math.PI/2,void 0!==s&&Math.abs(i-s)<=xt?(t.splice(a-1,1),o=n):(n=o,o=t[a],a++),s=i}function Mt(t){const e=1e-6,r=t[0],s=t[t.length-1];return Math.abs(r[0]-s[0])<=e&&Math.abs(r[1]-s[1])<=e}function bt(t,e){t.length>1&&!Mt(t)&&(t=[...t,t[0]]);for(let r=0;r<e.length;r++){const s=e[r],i=s.length;for(const e of s)if(gt(e,[t]))return!0;if(Mt(s))for(const r of t)if(gt(r,e))return!0;for(let e=1;e<i;e++){const r=s[e-1],i=s[e];for(let e=0;e<t.length;e++){const s=t[e],n=t[(e+1)%t.length];if(y(r,i,s,n))return!0}}}return!1}export{ct as CIMSymbolDrawHelper,ut as CanvasDrawHelper,mt as EnvDrawHelper,ft as HittestDrawHelper,ht as Transformation,ot as cDegToRad,Pt as lineGapType2LineHeight};
2
+ import{defaultFontFamily as t}from"../../core/fontUtils.js";import has from"../../core/has.js";import{clone as e}from"../../core/lang.js";import r from"../../core/Logger.js";import{deg2rad as i}from"../../core/mathUtils.js";import s from"../../core/ObjectPool.js";import{px2pt as n,pt2px as a}from"../../core/screenUtils.js";import{GeometryCursor as o}from"../../geometry/GeometryCursor.js";import{fromValues as l,empty as h,expandPointInPlace as c,center as m,width as f,height as u,diagonal as d,create as g}from"../../geometry/support/aaBoundingRect.js";import{getBoundsXY as p}from"../../geometry/support/boundsUtils.js";import{polygonCentroid as _}from"../../geometry/support/centroid.js";import{segmentIntersects as y}from"../../geometry/support/intersectsBase.js";import{isPolygon as P,isPolyline as S,isExtent as x,isMultipoint as w,isPoint as M}from"../../geometry/support/jsonTypeUtils.js";import{SimpleEffectCursor as b}from"./CIMEffects.js";import T from"./CIMImageColorSubstitutionHelper.js";import{getEffectOperator as k,getPlacementOperator as C}from"./CIMOperators.js";import{Placement as v}from"./CIMPlacements.js";import{defaultCIMValues as I}from"./defaultCIMValues.js";import{getFirstFrame as R}from"./imageUtils.js";import{rotate as z}from"./mathUtils.js";import{addColorStops as L}from"./rasterizingUtils.js";import U from"./Rect.js";import F from"./TextRasterizer.js";import{getNumericValue as A,isSVGImage as j,getRelativeGradientSize as D,getEffectsInflateSize as G,fromCIMFontDecoration as H,fromCIMFontStyle as E,fromCIMHorizontalAlignment as B,fromCIMVerticalAlignment as X,getFillColor as J,getStrokeColor as N,getStrokeWidth as O,getFontWeight as q,getFontStyle as V,isCIMFill as Y,getSize as W}from"./utils.js";import{destroyHiddenSvg as K,createHiddenSvg as $,createSvgElement as Q}from"../../views/2d/engine/svgUtils.js";import{magicLabelLineHeight as Z,glyphSize as tt,hittestToleranceSmallSymbol as et,hittestSmallSymbolThreshold as rt}from"../../views/2d/engine/webgl/definitions.js";import{shapeGlyphs as it}from"../../views/2d/engine/webgl/mesh/templates/shapingUtils.js";import{roundPtToWholePixel as st,getLineWidth as nt}from"../../views/2d/layers/graphics/graphicsUtils.js";const at=Math.PI/180,ot=.5,lt=()=>r.getLogger("esri.symbols.cim.CIMSymbolDrawHelper");class ht{constructor(t){this._t=t}static createIdentity(){return new ht([1,0,0,0,1,0])}clone(){const t=this._t;return new ht(t.slice())}transform(t){const e=this._t;return[e[0]*t[0]+e[1]*t[1]+e[2],e[3]*t[0]+e[4]*t[1]+e[5]]}static createScale(t,e){return new ht([t,0,0,0,e,0])}scale(t,e){const r=this._t;return r[0]*=t,r[1]*=t,r[2]*=t,r[3]*=e,r[4]*=e,r[5]*=e,this}scaleRatio(){return Math.sqrt(this._t[0]*this._t[0]+this._t[1]*this._t[1])}static createTranslate(t,e){return new ht([0,0,t,0,0,e])}translate(t,e){const r=this._t;return r[2]+=t,r[5]+=e,this}static createRotate(t){const e=Math.cos(t),r=Math.sin(t);return new ht([e,-r,0,r,e,0])}rotate(t){return ht.multiply(this,ht.createRotate(t),this)}angle(){const t=this._t[0],e=this._t[3],r=Math.sqrt(t*t+e*e);return[t/r,e/r]}static multiply(t,e,r){const i=t._t,s=e._t,n=i[0]*s[0]+i[3]*s[1],a=i[1]*s[0]+i[4]*s[1],o=i[2]*s[0]+i[5]*s[1]+s[2],l=i[0]*s[3]+i[3]*s[4],h=i[1]*s[3]+i[4]*s[4],c=i[2]*s[3]+i[5]*s[4]+s[5],m=r._t;return m[0]=n,m[1]=a,m[2]=o,m[3]=l,m[4]=h,m[5]=c,r}invert(){const t=this._t;let e=t[0]*t[4]-t[1]*t[3];if(0===e)return new ht([0,0,0,0,0,0]);e=1/e;const r=(t[1]*t[5]-t[2]*t[4])*e,i=(t[2]*t[3]-t[0]*t[5])*e,s=t[4]*e,n=-t[1]*e,a=-t[3]*e,o=t[0]*e;return new ht([s,n,r,a,o,i])}}class ct{constructor(t,e){this._resourceManager=t,this._transfos=[],this._sizeTransfos=[],this._textScaling=[],this._geomUnitsPerPoint=1,this._placementPool=new s(()=>new v,void 0,void 0,100),this._earlyReturn=!1,this._mapRotation=0,this._transfos.push(e||ht.createIdentity()),this._sizeTransfos.push(e?e.scaleRatio():1),this._textScaling.push(1)}setTransform(t,e){this._transfos=[t||ht.createIdentity()],this._sizeTransfos=[e||(t?t.scaleRatio():1)],this._textScaling=[1]}setGeomUnitsPerPoint(t){this._geomUnitsPerPoint=t}transformPt(t){return this._transfos[this._transfos.length-1].transform(t)}transformSize(t){return t*this._sizeTransfos[this._sizeTransfos.length-1]}scaleText(t){return t*this._textScaling[this._textScaling.length-1]}reverseTransformPt(t){return this._transfos[this._transfos.length-1].invert().transform(t)}reverseTransformSize(t){return t/this._sizeTransfos[this._sizeTransfos.length-1]}reverseTransformScalar(t){return t/this._transfos[this._transfos.length-1].scaleRatio()}reverseScaleText(t){return t/this._textScaling[this._textScaling.length-1]}getTransformAngle(){return this._transfos[this._transfos.length-1].angle()}geomUnitsPerPoint(){return this.isEmbedded()?1:this._geomUnitsPerPoint}prevGeomUnitsPerPoint(){return this._transfos.length>2?1:this._geomUnitsPerPoint}isEmbedded(){return this._transfos.length>1}back(){return this._transfos[this._transfos.length-1]}push(t,e=!1,r=1){const i=e?t.scaleRatio():1;ht.multiply(t,this.back(),t),this._transfos.push(t),this._sizeTransfos.push(this._sizeTransfos[this._sizeTransfos.length-1]*i),this._textScaling.push(this._textScaling[this._textScaling.length-1]*r)}pop(){this._transfos.splice(-1,1),this._sizeTransfos.splice(-1,1),this._textScaling.splice(-1,1)}drawSymbol(t,e,r){if(t)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":this.drawMultiLayerSymbol(t,e);break;case"CIMTextSymbol":this.drawTextSymbol(t,e,r)}}drawMultiLayerSymbol(t,e){if(!t||!e)return;const r=t.symbolLayers;if(!r)return;const i=t.effects;if(i&&i.length>0){const t=this.executeEffects(i,e);if(t){let e=t.next();for(;e;)this.drawSymbolLayers(r,e.asJSON()),e=t.next()}}else this.drawSymbolLayers(r,e)}executeEffects(t,e){const r=this.geomUnitsPerPoint(),i=null,s=G(t),n=!1;let a=new b(o.fromJSONCIM(e));for(const o of t){const t=k(o);t&&(a=t.execute(a,o,{geomUnitsPerPoint:r,tileKey:i,maxInflateSize:s,scale:null,spatialReference:e.spatialReference,preventClipping:n}))}return a}drawSymbolLayers(t,e){let r=t.length;for(;r--;){const i=t[r];if(!i||!1===i.enable)continue;const s=i.effects;if(s&&s.length>0){const t=this.executeEffects(s,e);if(t){let e=null;for(;(e=t.next())&&(this.drawSymbolLayer(i,e.asJSON()),!this._earlyReturn););}}else this.drawSymbolLayer(i,e);if(this._earlyReturn)return}}drawSymbolLayer(t,e){switch(t.type){case"CIMSolidFill":this.drawSolidFill(e,t.color,t.path);break;case"CIMHatchFill":this.drawHatchFill(e,t);break;case"CIMPictureFill":this.drawPictureFill(e,t);break;case"CIMGradientFill":this.drawGradientFill(e,t);break;case"CIMSolidStroke":this.drawSolidStroke(e,t.color,t.width,t.capStyle,t.joinStyle,t.miterLimit,t.path);break;case"CIMPictureStroke":this.drawPictureStroke(e,t);break;case"CIMGradientStroke":this.drawGradientStroke(e,t);break;case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":this.drawMarkerLayer(t,e)}}drawHatchFill(t,e){const r=dt(e,t,this.geomUnitsPerPoint());r&&(this.pushClipPath(t),this.drawMultiLayerSymbol(e.lineSymbol,r),this.popClipPath())}drawPictureFill(t,e){}drawGradientFill(t,e){}drawPictureStroke(t,e){}drawGradientStroke(t,e){}drawMarkerLayer(t,e){const r=t.markerPlacement;if(r){const i=C(r);if(i){const s="CIMMarkerPlacementInsidePolygon"===r.type||"CIMMarkerPlacementPolygonCenter"===r.type&&r.clipAtBoundary;s&&this.pushClipPath(e);const n=i.execute(o.fromJSONCIM(e),r,this.geomUnitsPerPoint(),null);if(n){let e=null;for(;(e=n.next())&&(this.drawMarker(t,e),!this._earlyReturn););}s&&this.popClipPath()}}else{const r=this._placementPool.acquire();if(M(e))r.tx=e.x,r.ty=e.y,this.drawMarker(t,r);else if(P(e)){const i=_(e);i&&([r.tx,r.ty]=i,this.drawMarker(t,r))}else if(S(e)){for(const i of e.paths)for(const e of i)if(r.tx=e[0],r.ty=e[1],this.drawMarker(t,r),this._earlyReturn)break}else for(const i of e.points)if(r.tx=i[0],r.ty=i[1],this.drawMarker(t,r),this._earlyReturn)break;this._placementPool.release(r)}}drawMarker(t,e){switch(t.type){case"CIMCharacterMarker":case"CIMPictureMarker":this.drawPictureMarker(t,e);break;case"CIMVectorMarker":this.drawVectorMarker(t,e)}}drawPictureMarker(t,e){if(!t)return;const r=this._resourceManager.getResource(t.url),i=A(t.size,I.CIMPictureMarker.size);if(null==r||i<=0)return;const s=r.width,n=r.height;if(!s||!n)return;const a=s/n,o=A(t.scaleX,1),l=ht.createIdentity(),h=t.anchorPoint;if(h){let e=h.x,r=h.y;"Absolute"!==t.anchorPointUnits&&(e*=i*a*o,r*=i),l.translate(-e,-r)}let c=A(t.rotation);t.rotateClockwise&&(c=-c),this._mapRotation&&(c+=this._mapRotation),c&&l.rotate(c*at);let m=A(t.offsetX),f=A(t.offsetY);if(m||f){if(this._mapRotation){const t=at*this._mapRotation,e=Math.cos(t),r=Math.sin(t),i=m*r+f*e;m=m*e-f*r,f=i}l.translate(m,f)}const u=this.geomUnitsPerPoint();1!==u&&l.scale(u,u);const d=e.getAngle();d&&l.rotate(d),l.translate(e.tx,e.ty),this.push(l),this.drawImage(t,i),this.pop()}drawVectorMarker(t,e){if(!t)return;const r=t.markerGraphics;if(!r)return;const i=A(t.size,I.CIMVectorMarker.size),s=t.frame,n=s?s.ymax-s.ymin:0,a=i&&n?i/n:1,o=ht.createIdentity();s&&o.translate(.5*-(s.xmax+s.xmin),.5*-(s.ymax+s.ymin));const l=t.anchorPoint;if(l){let e=l.x,r=l.y;"Absolute"!==t.anchorPointUnits?s&&(e*=s.xmax-s.xmin,r*=s.ymax-s.ymin):(e/=a,r/=a),o.translate(-e,-r)}1!==a&&o.scale(a,a);let h=A(t.rotation);t.rotateClockwise&&(h=-h),this._mapRotation&&(h+=this._mapRotation),h&&o.rotate(h*at);let c=A(t.offsetX),m=A(t.offsetY);if(c||m){if(this._mapRotation){const t=at*this._mapRotation,e=Math.cos(t),r=Math.sin(t),i=c*r+m*e;c=c*e-m*r,m=i}o.translate(c,m)}const f=this.geomUnitsPerPoint();1!==f&&o.scale(f,f);const u=e.getAngle();u&&o.rotate(u),o.translate(e.tx,e.ty);const d=t.scaleSymbolsProportionally?1:a;this.push(o,t.scaleSymbolsProportionally,d);for(const g of r){g?.symbol&&g.geometry||lt().error("Invalid marker graphic",g);let t=g.textString;if("number"==typeof t&&(t=t.toString()),this.drawSymbol(g.symbol,g.geometry,t),this._earlyReturn)break}this.pop()}drawTextSymbol(t,e,r){if(!t)return;if(!M(e))return;if(A(t.height,I.CIMTextSymbol.height)<=0)return;const i=ht.createIdentity();let s=A(t.angle);s=-s,s&&i.rotate(s*at);const n=A(t.offsetX),a=A(t.offsetY);(n||a)&&i.translate(n,a);const o=this.geomUnitsPerPoint();1!==o&&i.scale(o,o),i.translate(e.x,e.y),this.push(i),this.drawText(t,r),this.pop()}}class mt extends ct{constructor(t,e){super(t,e),this.reset()}reset(){this._xmin=this._ymin=1/0,this._xmax=this._ymax=-1/0,this._clipCount=0}envelope(){return new U(this._xmin,this._ymin,this._xmax-this._xmin,this._ymax-this._ymin)}bounds(){return l(this._xmin,this._ymin,this._xmax,this._ymax)}drawSolidFill(t){if(t&&!(this._clipCount>0))if(P(t))this._processPath(t.rings,0);else if(S(t))this._processPath(t.paths,0);else if(x(t)){const e=yt(t);e&&this._processPath(e.rings,0)}else console.error("drawSolidFill Unexpected geometry type!")}drawSolidStroke(t,e,r){if(!t||this._clipCount>0||null==r||r<=0)return;const i=Math.max(.5*this.transformSize(A(r,I.CIMSolidStroke.width)),.5*ot);if(P(t))this._processPath(t.rings,i);else if(S(t))this._processPath(t.paths,i);else if(x(t)){const e=yt(t);e&&this._processPath(e.rings,i)}else console.error("drawSolidStroke unexpected geometry type!")}drawMarkerLayer(t,e){P(e)&&t.markerPlacement&&("CIMMarkerPlacementInsidePolygon"===t.markerPlacement.type||"CIMMarkerPlacementPolygonCenter"===t.markerPlacement.type&&t.markerPlacement.clipAtBoundary)?this._processPath(e.rings,0):super.drawMarkerLayer(t,e)}drawHatchFill(t,e){this.drawSolidFill(t)}drawPictureFill(t,e){this.drawSolidFill(t)}drawGradientFill(t,e){this.drawSolidFill(t)}drawPictureStroke(t,e){this.drawSolidStroke(t,null,e.width)}drawGradientStroke(t,e){this.drawSolidStroke(t,null,e.width)}pushClipPath(t){this.drawSolidFill(t),this._clipCount++}popClipPath(){this._clipCount--}drawImage(t,e){const{url:r}=t,i=A(t.scaleX,1);let s=i*e,n=e;const a=this._resourceManager.getResource(r);if(null!=a){const t=a.height/a.width;s=i*(e?t>1?e:e/t:a.width),n=e?t>1?e*t:e:a.height}this._merge(this.transformPt([-s/2,-n/2]),0),this._merge(this.transformPt([-s/2,n/2]),0),this._merge(this.transformPt([s/2,-n/2]),0),this._merge(this.transformPt([s/2,n/2]),0)}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new F);const r=St(t);let[i,s]=this._textRasterizer.computeTextSize(e,r);i=n(i),s=n(s);const a=this.transformSize(1)*this.reverseTransformScalar(1);i*=a,s*=a;const o=t.horizontalAlignment??I.CIMTextSymbol.horizontalalignment,l=t.verticalAlignment??I.CIMTextSymbol.verticalalignment;let h=0;switch(o){case"Left":h=i/2;break;case"Right":h=-i/2}let c=0;switch(l){case"Bottom":c=s/2;break;case"Top":c=-s/2;break;case"Baseline":c=s/6}this._merge(this.transformPt([-i/2+h,-s/2+c]),0),this._merge(this.transformPt([-i/2+h,s/2+c]),0),this._merge(this.transformPt([i/2+h,-s/2+c]),0),this._merge(this.transformPt([i/2+h,s/2+c]),0)}_processPath(t,e){if(t)for(const r of t){const t=r?r.length:0;if(t>1){this._merge(this.transformPt(r[0]),e);for(let i=1;i<t;i++)this._merge(this.transformPt(r[i]),e)}}}_merge(t,e){t[0]-e<this._xmin&&(this._xmin=t[0]-e),t[0]+e>this._xmax&&(this._xmax=t[0]+e),t[1]-e<this._ymin&&(this._ymin=t[1]-e),t[1]+e>this._ymax&&(this._ymax=t[1]+e)}}class ft extends ct{constructor(){super(...arguments),this._hittestType="point",this._searchTarget=[],this._searchDistPoint=0,this._textInfo=null,this._svg=null,this._path=null,this._canvas=null}destroy(){this._svg=K(this._svg),this._path=null,this._canvas=null}hitTest(t,e,r,i){const{textInfo:s,mapRotation:o,resolution:l,searchDist:h,hittestType:c,isScreenAligned:m}=i;this._resetHittest();const f=l*a(1);switch(this.setGeomUnitsPerPoint(f),c){case"point":if(1!==t.length)return lt().error("Unexpected hittest area",t),!1;this._hittestType="point",this._searchDistPoint=h/2/f,this._searchTarget=[[t[0].x,t[0].y]];break;case"rect":if(4!==t.length)return lt().error("Unexpected hittest area",t),!1;this._hittestType="rect",this._searchDistPoint=0,this._searchTarget=t.map(t=>[t.x,t.y])}if(this._textInfo=s,this._mapRotation=m?o:0,!has("esri-mobile")){const t=n(et*window.devicePixelRatio),r=n(rt);!(("CIMLineSymbol"===e?.type||"CIMPolygonSymbol"===e?.type)&&e.symbolLayers?.some(Y))&&"CIMMeshSymbol"!==e?.type&&(W(e)??0)<r&&(this._searchDistPoint=t)}return this._earlyReturn=!1,this.drawSymbol(e,r),this._earlyReturn}executeEffects(t,e){return"CIMGeometricEffectDashes"===t.at(-1)?.type&&(t=t.slice(0,-1)),super.executeEffects(t,e)}drawSolidFill(t,e,r){null!=r?this._hittestSvgPath(t,r,!0):this._hitTestFill(t)}drawHatchFill(t,e){this._hitTestFill(t)}drawPictureFill(t,e){this._hitTestFill(t)}drawGradientFill(t,e){this._hitTestFill(t)}drawSolidStroke(t,e,r,i,s,n,a){null!=a?this._hittestSvgPath(t,a,!1,r):this._hitTestStroke(t,r)}drawPictureStroke(t,e){this._hitTestStroke(t,e.width)}drawGradientStroke(t,e){this._hitTestStroke(t,e.width)}drawMarkerLayer(t,e){t.markerPlacement&&("CIMMarkerPlacementInsidePolygon"===t.markerPlacement.type||"CIMMarkerPlacementPolygonCenter"===t.markerPlacement.type&&t.markerPlacement.clipAtBoundary)?this._hitTestFill(e):super.drawMarkerLayer(t,e)}drawTextSymbol(t,e,r){if(!t||!M(e))return;if(A(t.height,I.CIMTextSymbol.height)<=0)return;const i=ht.createIdentity(),s=this.geomUnitsPerPoint();1!==s&&i.scale(s,s),i.translate(e.x,e.y),this.push(i),this.drawText(t,r),this.pop()}pushClipPath(t){}popClipPath(){}drawImage(t,e){const{url:r}=t,i=A(t.scaleX,1),s=this._resourceManager.getResource(r);if(null==s||0===s.height||0===e)return;const n=e*this.geomUnitsPerPoint(),a=n*i*(s.width/s.height);if("point"===this._hittestType){const t=this.reverseTransformPt(this._searchTarget[0]),e=this._searchDistPoint;Math.abs(t[0])<a/2+e&&Math.abs(t[1])<n/2+e&&(this._earlyReturn=!0)}else{const t=a/2,e=n/2,r=[[-t,e],[t,e],[t,-e],[-t,-e],[-t,e]];bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,[r])&&(this._earlyReturn=!0)}}drawText(t,e){const r=this._textInfo;if(!r)return;const i=r.get(t);if(!i)return;if(!i.glyphMosaicItems.glyphs.length)return;const s=st(A(t.height,I.CIMTextSymbol.height)),{lineGapType:n,lineGap:a}=t,o=n?Pt(n,A(a),s):0,l=t.horizontalAlignment??I.CIMTextSymbol.horizontalalignment,h=t.verticalAlignment??I.CIMTextSymbol.verticalalignment,c="CIMBackgroundCallout"===t.callout?.type,m=it(i.glyphMosaicItems,{scale:s/tt,angle:A(t.angle),xOffset:A(t.offsetX),yOffset:A(t.offsetY),horizontalAlignment:l,verticalAlignment:h,maxLineWidth:nt(t.lineWidth),lineHeight:Z*Math.max(.25,Math.min(o||1,4)),decoration:t.font.decoration||"none",useCIMAngleBehavior:!1,hasBackground:c}),f=this.reverseScaleText(1);for(const u of m.glyphs){const t=u.offsets,e=[[t.topLeft[0]*f,-t.topLeft[1]*f],[t.topRight[0]*f,-t.topRight[1]*f],[t.bottomRight[0]*f,-t.bottomRight[1]*f],[t.bottomLeft[0]*f,-t.bottomLeft[1]*f],[t.topLeft[0]*f,-t.topLeft[1]*f]];if("point"===this._hittestType){gt(this.reverseTransformPt(this._searchTarget[0]),[e])&&(this._earlyReturn=!0)}else{bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,[e])&&(this._earlyReturn=!0)}}}_hitTestFill(t){let e=null;if(x(t)){const r=t;e=[[[r.xmin,r.ymin],[r.xmin,r.ymax],[r.xmax,r.ymax],[r.xmax,r.ymin],[r.xmin,r.ymin]]]}else if(P(t))e=t.rings;else{if(!S(t))return;e=t.paths}if("point"===this._hittestType){const t=this.reverseTransformPt(this._searchTarget[0]);if(gt(t,e)&&(this._earlyReturn=!0),!this._earlyReturn){pt(t,e,this.reverseTransformScalar(this._searchDistPoint)*this.prevGeomUnitsPerPoint())&&(this._earlyReturn=!0)}}else{bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,e)&&(this._earlyReturn=!0)}}_getSvgPath(){return null!=this._svg&&null!=this._path||(this._svg??=$(),this._path??=Q("path"),this._svg.appendChild(this._path)),this._path}_getCanvasContext(t,e){return this._canvas??=document.createElement("canvas"),this._canvas.width=t,this._canvas.height=e,this._canvas.getContext("2d",{willReadFrequently:!0})}_hittestSvgPath(t,e,r,i=0){const s=g();p(s,t);const n={x:s[0],y:s[1],width:s[2]-s[0],height:s[3]-s[1]},a=this._getSvgPath();a.setAttribute("d",e);const o=a.getBBox();if("point"===this._hittestType){const t=this.reverseTransformScalar(this._searchDistPoint)*this.prevGeomUnitsPerPoint(),s=this.reverseTransformPt(this._searchTarget[0]);let a=Math.max(o.width/n.width,o.height/n.height),l=1;const h=2*t*a;h<1&&(l=2/h,a*=l,o.x*=l,o.y*=l,o.width*=l,o.height*=l);const c=1+i*a/2,m=this._getCanvasContext(o.width+2*c,o.height+2*c);m.setTransform(l,0,0,l,-o.x+c,-o.y+c);const f=new Path2D(e);r?m.fill(f):(m.lineWidth=i*(a/l),m.stroke(f));const u=(n.width*a-o.width)/2,d=(n.height*a-o.height)/2,g=Math.floor((s[0]-n.x-t)*a-u+c),p=Math.floor((n.height-(s[1]-n.y)-t)*a+d+c),_=Math.ceil(2*t*a),y=Math.ceil(2*t*a),P=m.getImageData(g,p,_,y).data;for(let e=3;e<P.length;e+=4)if(P[e]>127.5)return void(this._earlyReturn=!0)}else{const t=[[n.x,n.y],[n.x,n.y+n.height],[n.x+n.width,n.y+n.height],[n.x+n.width,n.y],[n.x,n.y]];if(bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,[t]))return void(this._earlyReturn=!0)}}_hitTestStroke(t,e){let r=null;if(x(t)){const e=t;r=[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}else if(P(t))r=t.rings;else{if(!S(t))return;r=t.paths}if("point"===this._hittestType){pt(this.reverseTransformPt(this._searchTarget[0]),r,A(e,I.CIMSolidStroke.width)*this.geomUnitsPerPoint()/2+this.reverseTransformScalar(this._searchDistPoint)*this.prevGeomUnitsPerPoint())&&(this._earlyReturn=!0)}else{bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,r)&&(this._earlyReturn=!0)}}_resetHittest(){this.setTransform(),this._hittestType="point",this._searchTarget=[],this._searchDistPoint=0,this._textInfo=null}}class ut extends ct{constructor(t,e,r,i){super(e,r),this._applyAdditionalRenderProps=i,this._colorSubstitutionHelper=new T,this._ctx=t}drawSolidFill(t,e){if(!t)return;if(P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!0);else if(x(t))this._buildPath(yt(t).rings,!0);else{if(!w(t))return;console.log("CanvasDrawHelper.drawSolidFill - No implementation!")}const r=this._ctx;r.fillStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",r.fill("evenodd")}drawSolidStroke(t,e,r,i,s,n){if(!t||!e||0===r)return;if(P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!1);else{if(!x(t))return void console.log("CanvasDrawHelper.drawSolidStroke isn't implemented!");this._buildPath(yt(t).rings,!0)}const a=this._ctx;a.strokeStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",a.lineWidth=Math.max(this.transformSize(r),ot),this._setCapStyle(i),this._setJoinStyle(s),a.miterLimit=n,a.stroke()}pushClipPath(t){if(this._ctx.save(),P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!0);else{if(!x(t))return;this._buildPath(yt(t).rings,!0)}this._ctx.clip("evenodd")}popClipPath(){this._ctx.restore()}drawImage(t,e){const{colorSubstitutions:r,url:i,tintColor:s}=t,n=A(t.scaleX,1),a=this._resourceManager.getResource(i);if(null==a)return;let o=e*(a.width/a.height),l=e;e||(o=a.width,l=a.height);const h=j(i)||"src"in a&&j(a.src);let c="getFrame"in a?R(a):a;r&&(c=this._colorSubstitutionHelper.applyColorSubstitution(c,r)),this._applyAdditionalRenderProps&&!h&&s&&(c=this._colorSubstitutionHelper.tintImageData(c,s));const m=this.transformPt([0,0]),[f,u]=this.getTransformAngle(),d=this.transformSize(1),g=this._ctx;g.save(),g.setTransform({m11:n*d*f,m12:n*d*u,m21:-d*u,m22:d*f,m41:m[0],m42:m[1]}),g.drawImage(c,-o/2,-l/2,o,l),g.restore()}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new F);const r=St(t,this.transformSize(n(1))),i=this._textRasterizer.rasterizeText(e,r);if(!i)return;const{size:s,anchorX:a,anchorY:o,canvas:l}=i,h=s[0]*(a+.5),c=s[1]*(o-.5),m=this._ctx,f=this.transformPt([0,0]),[u,d]=this.getTransformAngle(),g=1;m.save(),m.setTransform({m11:g*u,m12:g*d,m21:-g*d,m22:g*u,m41:f[0]-g*h,m42:f[1]+g*c}),m.drawImage(l,0,0),m.restore()}drawPictureFill(t,e){if(!t)return;let{colorSubstitutions:r,height:i,offsetX:s,offsetY:n,rotation:a,scaleX:o,tintColor:l,url:h}=e;const c=this._resourceManager.getResource(h);if(null==c)return;if(P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!0);else if(x(t))this._buildPath(yt(t).rings,!0);else{if(!w(t))return;console.log("CanvasDrawHelper.drawPictureFill - No implementation!")}const m=this._ctx,f=j(h)||"src"in c&&j(c.src);let u,d="getFrame"in c?R(c):c;if(r&&(d=this._colorSubstitutionHelper.applyColorSubstitution(d,r)),this._applyAdditionalRenderProps){f||l&&(d=this._colorSubstitutionHelper.tintImageData(d,l)),u=m.createPattern(d,"repeat");const t=this.transformSize(1);a||(a=0),s?s*=t:s=0,n?n*=t:n=0,i&&(i*=t);const e=i?i/c.height:1,r=o&&i?o*i/c.width:1;if(0!==a||1!==e||1!==r||0!==s||0!==n){const t=new DOMMatrix;t.rotateSelf(0,0,-a).translateSelf(s,n).scaleSelf(r,e,1),u.setTransform(t)}}else u=m.createPattern(d,"repeat");m.save(),m.fillStyle=u,m.fill("evenodd"),m.restore()}drawPictureStroke(t,r){if(!t)return;let{colorSubstitutions:i,capStyle:s,joinStyle:n,miterLimit:o,tintColor:l,url:h,width:c}=r;const m=this._resourceManager.getResource(h);if(null==m)return;let f;if(P(t))f=t.rings;else if(S(t))f=t.paths;else{if(!x(t))return w(t)?void console.log("CanvasDrawHelper.drawPictureStroke - No implementation!"):void 0;f=yt(t).rings}c||(c=m.width);const u=j(h)||"src"in m&&j(m.src);let d="getFrame"in m?R(m):m;i&&(d=this._colorSubstitutionHelper.applyColorSubstitution(d,i)),this._applyAdditionalRenderProps&&(u||l&&(d=this._colorSubstitutionHelper.tintImageData(d,l)));const g=Math.max(this.transformSize(a(c)),.5),p=g/d.width,_=this._ctx,y=_.createPattern(d,"repeat-y");let M,b;_.save(),this._setCapStyle(s),this._setJoinStyle(n),void 0!==o&&(_.miterLimit=o),_.lineWidth=g;for(let a of f)if(a=e(a),wt(a),a&&!(a.length<=1)){M=this.transformPt(a[0]);for(let t=1;t<a.length;t++){b=this.transformPt(a[t]);const e=_t(M,b),r=new DOMMatrix;r.translateSelf(0,M[1]-g/2).scaleSelf(p,p,1).rotateSelf(0,0,90-e),y.setTransform(r),_.strokeStyle=y,_.beginPath(),_.moveTo(M[0],M[1]),_.lineTo(b[0],b[1]),_.stroke(),M=b}}_.restore()}drawGradientFill(t,e){if(!t)return;let r;if(P(t))r=t.rings;else if(S(t))r=t.paths;else{if(!x(t))return void lt().error("Unable to draw gradient fill");r=yt(t).rings}this._buildPath(r,!0);const{angle:s,gradientMethod:n,gradientSize:o,gradientSizeUnits:l}=e,g=I.CIMGradientFill,p=e.gradientType??g.gradientType,_=-i(s??0),y=h();for(const i of r){const t=i?i.length:0;if(t>1)for(let e=0;e<t;e++){let t=this.transformPt(i[e]);"Linear"!==n&&"Rectangular"!==n||(t=z(t,-_)),c(y,t)}}const[w,M,b,T]=y,k=this._ctx;switch(k.save(),n){case"Buffered":lt().error(`Gradient method "${n}" currently unsupported.`);break;case"Linear":{const t=(M+T)/2,r="Absolute"===l?this.transformSize(a(o)):D(o,g.gradientSize)*(b-w),[i,s]="Discrete"===p?[b,b-r]:[w+r,w],n=z([i,t],_),h=z([s,t],_),c=k.createLinearGradient(n[0],n[1],h[0],h[1]);L(c,e),k.fillStyle=c,k.fill("evenodd");break}case"Circular":{const t=m(y),r=d(y)/2,i="Absolute"===l?this.transformSize(a(o)):D(o,g.gradientSize)*r,[s,n]="Discrete"===p?[r,r-i]:[i,0],h=k.createRadialGradient(t[0],t[1],s,t[0],t[1],n);L(h,e),k.fillStyle=h,k.fill("evenodd");break}case"Rectangular":{const r=m(y),i=r[0],s=r[1],n=z(r,_),h=(r,i,s,a,o,l,h,c)=>{k.save(),this.pushClipPath(t);const m=z([o,l],_),f=z([h,c],_);k.beginPath(),k.moveTo(n[0],n[1]),k.lineTo(m[0],m[1]),k.lineTo(f[0],f[1]),k.lineTo(n[0],n[1]),k.clip();const u=z([r,i],_),d=z([s,a],_),g=k.createLinearGradient(u[0],u[1],d[0],d[1]);L(g,e),k.fillStyle=g,k.fill("evenodd"),k.restore()};let c="Absolute"===l?this.transformSize(a(o)):D(o,g.gradientSize)*(f(y)/2),[d,P]="Discrete"===p?[b,b-c]:[i+c,i];h(d,s,P,s,b,M,b,T),[d,P]="Discrete"===p?[w,w+c]:[i-c,i],h(d,s,P,s,w,T,w,M),c="Absolute"===l?this.transformSize(a(o)):D(o,g.gradientSize)*(u(y)/2);let[S,x]="Discrete"===p?[T,T-c]:[s+c,s];h(i,S,i,x,b,T,w,T),[S,x]="Discrete"===p?[M,M+c]:[s-c,s],h(i,S,i,x,w,M,b,M);break}}k.restore()}drawGradientStroke(t,r){const{capStyle:i,gradientMethod:s,gradientSize:n,gradientSizeUnits:o,joinStyle:l,miterLimit:h,width:c}=r;if(!t||0===c)return;let m;if(P(t))m=t.rings;else if(S(t))m=t.paths;else{if(!x(t))return void lt().error("Unable to draw gradient stroke");m=yt(t).rings}const f=r.gradientType??I.CIMGradientStroke.gradientType,u=Math.max(this.transformSize(a(c)),.5),d=this._ctx;let g,p;d.save(),this._setCapStyle(i),this._setJoinStyle(l),void 0!==h&&(d.miterLimit=h),d.lineWidth=u;for(let _ of m){if(_=e(_),wt(_),!_||_.length<=1)continue;let t=0;g=this.transformPt(_[0]);for(let e=1;e<_.length;e++){p=this.transformPt(_[e]);const r=p[0]-g[0],i=p[1]-g[1];t+=Math.sqrt(r*r+i*i),g=p}const i="Absolute"===o?this.transformSize(a(n)):D(n,I.CIMGradientStroke.gradientSize)*("AcrossLine"===s?u:t);let l=0;g=this.transformPt(_[0]);for(let e=1;e<_.length;e++){p=this.transformPt(_[e]);const n=p[0]-g[0],a=p[1]-g[1],o=Math.sqrt(n*n+a*a);let h,c,m,y;switch(s){case"AcrossLine":{const[t,e]=z([n/o,a/o],-Math.PI/2),r=u/2,s="Discrete"===f?r:i-r;h=(g[0]+p[0])/2+t*s,c=(g[1]+p[1])/2+e*s,m=h-t*i,y=c-e*i;break}case"AlongLine":{const e=n/o,r=a/o;"Discrete"===f?(h=g[0]-e*l,c=g[1]-r*l,m=h+e*i,y=c+r*i):(m=g[0]+e*(t-l),y=g[1]+r*(t-l),h=m-e*i,c=y-r*i);break}default:return lt().error("Unrecognized gradient method:",s),void d.restore()}const P=d.createLinearGradient(h,c,m,y);L(P,r),d.strokeStyle=P,d.beginPath(),d.moveTo(g[0],g[1]),d.lineTo(p[0],p[1]),d.stroke(),l+=o,g=p}}d.restore()}_buildPath(t,e){const r=this._ctx;if(r.beginPath(),t)for(const i of t){const t=i?i.length:0;if(t>1){let s=this.transformPt(i[0]);r.moveTo(s[0],s[1]);for(let e=1;e<t;e++)s=this.transformPt(i[e]),r.lineTo(s[0],s[1]);e&&r.closePath()}}}_setCapStyle(t){switch(t){case"Butt":this._ctx.lineCap="butt";break;case"Round":this._ctx.lineCap="round";break;case"Square":this._ctx.lineCap="square"}}_setJoinStyle(t){switch(t){case"Bevel":this._ctx.lineJoin="bevel";break;case"Round":this._ctx.lineJoin="round";break;case"Miter":this._ctx.lineJoin="miter"}}}function dt(t,e,r){let i=A(t.separation,I.CIMHatchFill.separation)*r,s=A(t.rotation);if(0===i)return null;i<0&&(i=-i);let n=0;const a=.5*i;for(;n>a;)n-=i;for(;n<-a;)n+=i;const o=g();p(o,e),o[0]-=a,o[1]-=a,o[2]+=a,o[3]+=a;const l=[[o[0],o[1]],[o[0],o[3]],[o[2],o[3]],[o[2],o[1]]];for(;s>180;)s-=180;for(;s<0;)s+=180;const h=Math.cos(s*at),c=Math.sin(s*at),m=-i*c,f=i*h;let u,d,_,y;n=A(t.offsetX)*r*c-A(t.offsetY)*r*h,u=_=Number.MAX_VALUE,d=y=-Number.MAX_VALUE;for(const g of l){const t=g[0],e=g[1],r=h*t+c*e,i=-c*t+h*e;u=Math.min(u,r),_=Math.min(_,i),d=Math.max(d,r),y=Math.max(y,i)}_=Math.floor(_/i)*i;let P=h*u-c*_-m*n/i,S=c*u+h*_-f*n/i,x=h*d-c*_-m*n/i,w=c*d+h*_-f*n/i;const M=1+Math.round((y-_)/i),b=[];for(let g=0;g<M;g++)P+=m,S+=f,x+=m,w+=f,b.push([[P,S],[x,w]]);return{paths:b}}function gt(t,e){let r=0;for(const i of e){const e=i.length;for(let s=1;s<e;s++){const e=i[s-1],n=i[s];if(e[1]>t[1]==n[1]>t[1])continue;(n[0]-e[0])*(t[1]-e[1])-(n[1]-e[1])*(t[0]-e[0])>0?r++:r--}}return 0!==r}function pt(t,e,r){for(const i of e){const e=i.length;for(let s=1;s<e;s++){const e=i[s-1],n=i[s];let a=(n[0]-e[0])*(n[0]-e[0])+(n[1]-e[1])*(n[1]-e[1]);if(0===a)continue;a=Math.sqrt(a);const o=((n[0]-e[0])*(t[1]-e[1])-(n[1]-e[1])*(t[0]-e[0]))/a;if(Math.abs(o)<r){const i=((n[0]-e[0])*(t[0]-e[0])+(n[1]-e[1])*(t[1]-e[1]))/a;if(i>-r&&i<a+r)return!0}}}return!1}function _t(t,e){const r=e[0]-t[0],i=e[1]-t[1];return 180/Math.PI*Math.atan2(i,r)}const yt=t=>t?{spatialReference:t.spatialReference,rings:[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]]}:null,Pt=(t,e,r)=>{switch(t){case"ExtraLeading":return 1+e/r;case"Multiple":return e;case"Exact":return e/r}};function St(e,r=1){const i=H(e),s=E(e.fontStyleName),n=e.fontFamilyName??t,{weight:a,style:o}=s,l=r*(e.height||5),h=B(e.horizontalAlignment),c=X(e.verticalAlignment),m=J(e),f=J(e.haloSymbol),u=null!=f?r*(e.haloSize??0):0,d=N(e.symbol),g=r*(O(e.symbol)||0),p="CIMBackgroundCallout"===e.callout?.type?e.callout.backgroundSymbol:null,_=J(p),y=O(p),P=N(p);return{color:m,size:l,horizontalAlignment:h,verticalAlignment:c,font:{family:n,style:V(o),weight:q(a),decoration:i},outline:{size:g||0,color:d},halo:{size:u||0,color:f,style:o},backgroundColor:_,borderLine:null!=y&&null!=P?{size:y,color:P}:null,pixelRatio:1,premultiplyColors:!0}}const xt=1e-4;function wt(t){let e,r,i,s,n,a=t[0],o=1;for(;o<t.length;)e=t[o][0]-a[0],r=t[o][1]-a[1],s=0!==e?r/e:Math.PI/2,void 0!==i&&Math.abs(s-i)<=xt?(t.splice(o-1,1),a=n):(n=a,a=t[o],o++),i=s}function Mt(t){const e=1e-6,r=t[0],i=t[t.length-1];return Math.abs(r[0]-i[0])<=e&&Math.abs(r[1]-i[1])<=e}function bt(t,e){t.length>1&&!Mt(t)&&(t=[...t,t[0]]);for(let r=0;r<e.length;r++){const i=e[r],s=i.length;for(const e of i)if(gt(e,[t]))return!0;if(Mt(i))for(const r of t)if(gt(r,e))return!0;for(let e=1;e<s;e++){const r=i[e-1],s=i[e];for(let e=0;e<t.length;e++){const i=t[e],n=t[(e+1)%t.length];if(y(r,s,i,n))return!0}}}return!1}export{ct as CIMSymbolDrawHelper,ut as CanvasDrawHelper,mt as EnvDrawHelper,ft as HittestDrawHelper,ht as Transformation,at as cDegToRad,Pt as lineGapType2LineHeight};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{inchesPerMeter as s}from"../../../core/units.js";import{GeometryCursor as t}from"../../../geometry/GeometryCursor.js";import{collectMultipath as i}from"../../../geometry/geometryCursorCollectUtils.js";import h from"../../../geometry/SpatialReference.js";import{getPathLength as e}from"../../../geometry/support/coordsUtils.js";import{setId as r}from"../CIMCursor.js";import{lazyOffsetOperator as _}from"../CIMEffects.js";class c{static{this.instance=null}static local(){return null===c.instance&&(c.instance=new c),c.instance}execute(s,t,i){return new o(s,t,i)}}class o{constructor(s,t,i){this._defaultPointSize=20,this._inputGeometries=s,this._geomUnitsPerPoint=i.geomUnitsPerPoint??1,this._scale=i?.scale,this._rule=t.rule??"FullGeometry",this._spatialReference=i?.spatialReference??h.WebMercator,this._width=this._computeWidth(t.width??25),this._defaultSize=this._defaultPointSize*this._geomUnitsPerPoint}next(){let s;for(;s=this._inputGeometries.next();){const h=this._processGeom(i(s));if(h?.length)return t.fromJSONCIM({paths:h})}return null}_computeWidth(t){if(!u(this._rule)||null==this._scale||!this._spatialReference.metersPerUnit)return t*this._geomUnitsPerPoint;const i=this._scale/(96*s*this._spatialReference.metersPerUnit);return t/(this._spatialReference.metersPerUnit*i)}_clone(s){return[s[0],s[1]]}_mid(s,t){return[(s[0]+t[0])/2,(s[1]+t[1])/2]}_mix(s,t,i,h){return[s[0]*t+i[0]*h,s[1]*t+i[1]*h]}_add(s,t){return[s[0]+t[0],s[1]+t[1]]}_add2(s,t,i){return[s[0]+t,s[1]+i]}_sub(s,t){return[s[0]-t[0],s[1]-t[1]]}_dist(s,t){return Math.sqrt((s[0]-t[0])*(s[0]-t[0])+(s[1]-t[1])*(s[1]-t[1]))}_norm(s){return Math.sqrt(s[0]*s[0]+s[1]*s[1])}_normalize(s,t=1){const i=t/this._norm(s);s[0]*=i,s[1]*=i}_leftPerpendicular(s){const t=-s[1],i=s[0];s[0]=t,s[1]=i}_leftPerp(s){return[-s[1],s[0]]}_rightPerpendicular(s){const t=s[1],i=-s[0];s[0]=t,s[1]=i}_rightPerp(s){return[s[1],-s[0]]}_dotProduct(s,t){return s[0]*t[0]+s[1]*t[1]}_crossProduct(s,t){return s[0]*t[1]-s[1]*t[0]}_rotateDirect(s,t,i){const h=s[0]*t-s[1]*i,e=s[0]*i+s[1]*t;s[0]=h,s[1]=e}_makeCtrlPt(s){const t=[s[0],s[1]];return r(t,1),t}_addAngledTicks(s,t,i,h){const e=this._sub(i,t);this._normalize(e);const r=this._crossProduct(e,this._sub(h,t));let _;_=r>0?this._rightPerp(e):this._leftPerp(e);const c=Math.abs(r)/2,o=[];o.push([t[0]+(_[0]-e[0])*c,t[1]+(_[1]-e[1])*c]),o.push(t),o.push(i),o.push([i[0]+(_[0]+e[0])*c,i[1]+(_[1]+e[1])*c]),s.push(o)}_addBezier2(s,t,i,h,e){if(0===e--)return void s.push(h);const r=this._mid(t,i),_=this._mid(i,h),c=this._mid(r,_);this._addBezier2(s,t,r,c,e),this._addBezier2(s,c,_,h,e)}_addBezier3(s,t,i,h,e,r){if(0===r--)return void s.push(e);const _=this._mid(t,i),c=this._mid(i,h),o=this._mid(h,e),u=this._mid(_,c),a=this._mid(c,o),n=this._mid(u,a);this._addBezier3(s,t,_,u,n,r),this._addBezier3(s,n,a,o,e,r)}_add90DegArc(s,t,i,h,e){const r=e??this._crossProduct(this._sub(i,t),this._sub(h,t))>0,_=this._mid(t,i),c=this._sub(_,t);r?this._leftPerpendicular(c):this._rightPerpendicular(c),_[0]+=c[0],_[1]+=c[1],this._addBezier3(s,t,this._mix(t,.33333,_,.66667),this._mix(i,.33333,_,.66667),i,4)}_addArrow(s,t,i){const h=t[0],e=t[1],r=t[t.length-1],_=this._sub(h,e),c=this._norm(_);this._normalize(_);const o=Math.abs(this._crossProduct(_,this._sub(r,e)));let u=this._dotProduct(_,this._sub(r,e));u<.05*c?u=.05*c:u>.95*c&&(u=.95*c);const a=.5*o,n=this._leftPerp(_),p=[e[0]+_[0]*u,e[1]+_[1]*u],d=t.length-1,l=[];l.push(i?[-n[0],-n[1]]:n);let b=[-_[0],-_[1]];for(let m=1;m<d-1;m++){const s=this._sub(t[m+1],t[m]);this._normalize(s);const i=this._dotProduct(s,b),h=this._crossProduct(s,b),e=Math.sqrt((1+i)/2),r=this._sub(s,b);this._normalize(r),r[0]/=e,r[1]/=e,l.push(h<0?[-r[0],-r[1]]:r),b=s}l.push(this._rightPerp(b));for(let m=l.length-1;m>0;m--)s.push([t[m][0]+l[m][0]*a,t[m][1]+l[m][1]*a]);s.push([p[0]+l[0][0]*a,p[1]+l[0][1]*a]),s.push([p[0]+l[0][0]*o,p[1]+l[0][1]*o]),s.push(h),s.push([p[0]-l[0][0]*o,p[1]-l[0][1]*o]),s.push([p[0]-l[0][0]*a,p[1]-l[0][1]*a]);for(let m=1;m<l.length;m++)s.push([t[m][0]-l[m][0]*a,t[m][1]-l[m][1]*a])}_addDash(s,t,i){const h=this._norm(i)/7;this._normalize(i);let e=[];for(let r=0;r<=7;r++)e.push([t[0]+i[0]*r*h,t[1]+i[1]*r*h]),1&r&&(s.push(e),e=[])}_cp2(s,t,i){return s.length>=2?s[1]:this._add2(s[0],t*this._defaultSize,i*this._defaultSize)}_cp3(s,t,i,h){if(s.length>=3)return s[2];const e=this._mix(s[0],1-i,t,i),r=this._sub(t,s[0]);return this._normalize(r),this._rightPerpendicular(r),[e[0]+r[0]*h*this._defaultSize,e[1]+r[1]*h*this._defaultSize]}_arrowPath(s){if(s.length>2)return s;const t=s[0],i=this._cp2(s,-4,0),h=this._sub(t,i);this._normalize(h);const e=this._rightPerp(h);return[t,i,[t[0]+(e[0]-h[0])*this._defaultSize,t[1]+(e[1]-h[1])*this._defaultSize]]}_arrowLastSeg(s){const t=s[0],i=this._cp2(s,-4,0);let h;if(s.length>=3)h=s[s.length-1];else{const s=this._sub(t,i);this._normalize(s);const e=this._rightPerp(s);h=[t[0]+(e[0]-s[0])*this._defaultSize,t[1]+(e[1]-s[1])*this._defaultSize]}return[i,h]}_offsetPath(s,h){const e=_.module.execute({paths:[s],spatialReference:this._spatialReference.toJSON()},h,{joins:"miter",miterLimit:4}),[r]=i(t.fromJSONCIM(e));return r?.length?r:null}_processGeom(s){if(!s)return null;const t=[];for(const i of s){const s=i.length>1&&e(i)<this._defaultSize;if(!i||0===i.length||s)continue;const h=i.length;let _=i[0];switch(this._rule){case"PerpendicularFromFirstSegment":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,4),e=[];e.push(h),e.push(this._mid(_,s)),t.push(e);break}case"ReversedFirstSegment":{const s=this._cp2(i,0,-1);t.push([s,_]);break}case"PerpendicularToSecondSegment":{if(i.length<3)return[];const s=this._cp2(i,-4,1),h=this._cp3(i,s,.882353,-1.94),e=[];e.push(this._mid(s,h)),e.push(_),t.push(e);break}case"SecondSegmentWithTicks":{if(i.length<3)return[];const s=this._cp2(i,-4,1),h=this._cp3(i,s,.882353,-1.94),e=this._sub(h,s);let r;r=this._crossProduct(e,this._sub(_,s))>0?this._rightPerp(e):this._leftPerp(e);const c=[];c.push([s[0]+(r[0]-e[0])/3,s[1]+(r[1]-e[1])/3]),c.push(s),c.push(h),c.push([h[0]+(r[0]+e[0])/3,h[1]+(r[1]+e[1])/3]),t.push(c);break}case"DoublePerpendicular":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,3),e=this._mid(_,s),r=this._sub(e,h);this._normalize(r);const c=this._crossProduct(r,this._sub(_,h));this._leftPerpendicular(r);const o=[];o.push(_),o.push([h[0]+r[0]*c,h[1]+r[1]*c]),t.push(o);const u=[];u.push([h[0]-r[0]*c,h[1]-r[1]*c]),u.push(s),t.push(u);break}case"OppositeToFirstSegment":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,3),e=this._mid(_,s),r=this._sub(e,h);this._normalize(r);const c=this._crossProduct(r,this._sub(_,h));this._leftPerpendicular(r);const o=[];o.push([h[0]+r[0]*c,h[1]+r[1]*c]),o.push([h[0]-r[0]*c,h[1]-r[1]*c]),t.push(o);break}case"TriplePerpendicular":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,4),e=this._mid(_,s),r=this._sub(e,h);this._normalize(r);const c=this._crossProduct(r,this._sub(_,h));this._leftPerpendicular(r);const o=[];o.push([h[0]+r[0]*c*.8,h[1]+r[1]*c*.8]),o.push([e[0]+.8*(_[0]-e[0]),e[1]+.8*(_[1]-e[1])]),t.push(o),t.push([h,e]);const u=[];u.push([h[0]-r[0]*c*.8,h[1]-r[1]*c*.8]),u.push([e[0]+.8*(s[0]-e[0]),e[1]+.8*(s[1]-e[1])]),t.push(u);break}case"HalfCircleFirstSegment":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,4),e=this._mid(_,s);let r=this._sub(s,_);const c=Math.cos(Math.PI/18),o=Math.sin(Math.PI/18),u=Math.sqrt((1+c)/2),a=Math.sqrt((1-c)/2),n=[];let p;this._crossProduct(r,this._sub(h,_))>0?(n.push(_),r=this._sub(_,e),p=s):(n.push(s),r=this._sub(s,e),p=_),this._rotateDirect(r,u,a),r[0]/=u,r[1]/=u;for(let t=1;t<=18;t++)n.push(this._add(e,r)),this._rotateDirect(r,c,o);n.push(p),t.push(n);break}case"HalfCircleSecondSegment":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,1,-1);let e=this._sub(_,s);this._normalize(e);const r=this._crossProduct(e,this._sub(h,s))/2;this._leftPerpendicular(e);const c=[s[0]+e[0]*r,s[1]+e[1]*r];e=this._sub(s,c);const o=Math.cos(Math.PI/18);let u=Math.sin(Math.PI/18);r>0&&(u=-u);const a=[s];for(let t=1;t<=18;t++)this._rotateDirect(e,o,u),a.push(this._add(c,e));t.push(a);break}case"HalfCircleExtended":{const s=this._cp2(i,0,-2),e=this._cp3(i,s,1,-1);let r;if(h>=4)r=i[3];else{const t=this._sub(_,s);r=this._add(e,t)}const c=this._dist(s,e)/2/.75,o=this._sub(s,_);this._normalize(o,c);const u=this._sub(e,r);this._normalize(u,c);const a=[r,e];t.push(a);const n=[this._clone(e)];this._addBezier3(n,e,this._add(e,u),this._add(s,o),s,4),n.push(_),t.push(n);break}case"OpenCircle":{const s=this._cp2(i,-2,0),h=this._sub(s,_),e=Math.cos(Math.PI/18),r=-Math.sin(Math.PI/18),c=[s];for(let t=1;t<=33;t++)this._rotateDirect(h,e,r),c.push(this._add(_,h));t.push(c);break}case"CoverageEdgesWithTicks":{const s=this._cp2(i,0,-1);let e,r;if(h>=3)e=i[2];else{const t=this._sub(s,_),i=this._leftPerp(t);e=[_[0]+i[0]-.25*t[0],_[1]+i[1]-.25*t[1]]}if(h>=4)r=i[3];else{const t=this._mid(_,s),i=this._sub(_,s);this._normalize(i),this._leftPerpendicular(i);const h=this._crossProduct(i,this._sub(e,t));this._rightPerpendicular(i),r=[e[0]+i[0]*h*2,e[1]+i[1]*h*2]}const c=this._sub(s,_);let o,u;o=this._crossProduct(c,this._sub(e,_))>0?this._rightPerp(c):this._leftPerp(c),u=[],u.push(e),u.push(_),u.push([_[0]+(o[0]-c[0])/3,_[1]+(o[1]-c[1])/3]),t.push(u),o=this._crossProduct(c,this._sub(r,s))>0?this._rightPerp(c):this._leftPerp(c),u=[],u.push([s[0]+(o[0]+c[0])/3,s[1]+(o[1]+c[1])/3]),u.push(s),u.push(r),t.push(u);break}case"GapExtentWithDoubleTicks":{const s=this._cp2(i,0,2),e=this._cp3(i,s,0,1);let r;if(h>=4)r=i[3];else{const t=this._sub(s,_);r=this._add(e,t)}this._addAngledTicks(t,_,s,this._mid(e,r)),this._addAngledTicks(t,e,r,this._mid(_,s));break}case"GapExtentMidline":{const s=this._cp2(i,2,0),e=this._cp3(i,s,0,1);let r;if(h>=4)r=i[3];else{const t=this._sub(s,_);r=this._add(e,t)}const c=[];c.push(this._mid(_,e)),c.push(this._mid(s,r)),t.push(c);break}case"Chevron":{const s=this._cp2(i,-1,-1);let e;if(h>=3)e=i[2];else{const t=this._sub(s,_);this._leftPerpendicular(t),e=this._add(_,t)}t.push([s,this._makeCtrlPt(_),e]);break}case"PerpendicularWithArc":{const s=this._cp2(i,0,-2),e=this._cp3(i,s,.5,-1),r=this._sub(s,_),c=this._norm(r);r[0]/=c,r[1]/=c;const o=this._crossProduct(r,this._sub(e,_));let u=this._dotProduct(r,this._sub(e,_));u<.05*c?u=.05*c:u>.95*c&&(u=.95*c);const a=[_[0]+r[0]*u,_[1]+r[1]*u];let n=this._leftPerp(r),p=[];if(p.push([a[0]-n[0]*o,a[1]-n[1]*o]),p.push([a[0]+n[0]*o,a[1]+n[1]*o]),t.push(p),h>=4){const s=i[3];let h=this._dotProduct(r,this._sub(s,_));h<.1*c?h=.1*c:h>.9*c&&(h=.9*c);const e=[_[0]+r[0]*h,_[1]+r[1]*h],o=this._crossProduct(r,this._sub(s,_)),u=[];u.push([e[0]-n[0]*o,e[1]-n[1]*o]),u.push([e[0]+n[0]*o,e[1]+n[1]*o]),t.push(u)}const d=[s[0]+n[0]*o,s[1]+n[1]*o];n=this._sub(s,d);const l=Math.cos(Math.PI/18);let b=Math.sin(Math.PI/18);o<0&&(b=-b),p=[_,s];for(let t=1;t<=9;t++)this._rotateDirect(n,l,b),p.push(this._add(d,n));t.push(p);break}case"ClosedHalfCircle":{const s=this._cp2(i,2,0),h=this._mid(_,s),e=this._sub(s,h),r=Math.cos(Math.PI/18),c=Math.sin(Math.PI/18),o=[_,s];for(let t=1;t<=18;t++)this._rotateDirect(e,r,c),o.push(this._add(h,e));t.push(o);break}case"TripleParallelExtended":{const s=this._cp2(i,0,-2),h=this._cp3(i,s,1,-2),e=this._mid(_,s),c=this._sub(h,s);this._normalize(c);const o=Math.abs(this._crossProduct(c,this._sub(e,s)))/2,u=this._dist(s,h),a=[s,_];a.push([_[0]+c[0]*u*.5,_[1]+c[1]*u*.5]),t.push(a);const n=[];n.push([e[0]-c[0]*o,e[1]-c[1]*o]),n.push([e[0]+c[0]*u*.375,e[1]+c[1]*u*.375]),r(n[n.length-1],1),n.push([e[0]+c[0]*u*.75,e[1]+c[1]*u*.75]),t.push(n);const p=[s,h];t.push(p);break}case"ParallelWithTicks":{const s=this._cp2(i,3,0),h=this._cp3(i,s,.5,-1),e=this._sub(h,s);this._normalize(e);const r=this._crossProduct(e,this._sub(h,_));this._leftPerpendicular(e),this._addAngledTicks(t,_,s,h),this._addAngledTicks(t,this._mix(_,1,e,r),this._mix(s,1,e,r),this._mid(_,s));break}case"Parallel":{const s=this._cp2(i,3,0),h=this._cp3(i,s,.5,-1),e=this._sub(s,_);this._normalize(e);const r=this._leftPerp(e),c=this._crossProduct(e,this._sub(h,_));let o=[_,s];t.push(o),o=[],o.push([_[0]+r[0]*c,_[1]+r[1]*c]),o.push([s[0]+r[0]*c,s[1]+r[1]*c]),t.push(o);break}case"PerpendicularToFirstSegment":{const s=this._cp2(i,3,0),h=this._cp3(i,s,.5,-1),e=this._mid(_,s),r=this._sub(s,_);this._normalize(r);const c=this._crossProduct(r,this._sub(h,_));this._leftPerpendicular(r);const o=[];o.push([e[0]-r[0]*c*.25,e[1]-r[1]*c*.25]),o.push([e[0]+r[0]*c*1.25,e[1]+r[1]*c*1.25]),t.push(o);break}case"ParallelOffset":{const s=this._cp2(i,3,0),h=this._cp3(i,s,.5,-1),e=this._sub(s,_);this._normalize(e);const r=this._crossProduct(e,this._sub(h,_));this._leftPerpendicular(e);const c=[];c.push([_[0]-e[0]*r,_[1]-e[1]*r]),c.push([s[0]-e[0]*r,s[1]-e[1]*r]),t.push(c);const o=[];o.push([_[0]+e[0]*r,_[1]+e[1]*r]),o.push([s[0]+e[0]*r,s[1]+e[1]*r]),t.push(o);break}case"OffsetOpposite":{const s=this._cp2(i,3,0),h=this._cp3(i,s,.5,-1),e=this._sub(s,_);this._normalize(e);const r=this._crossProduct(e,this._sub(h,_));this._leftPerpendicular(e);const c=[];c.push([_[0]-e[0]*r,_[1]-e[1]*r]),c.push([s[0]-e[0]*r,s[1]-e[1]*r]),t.push(c);break}case"OffsetSame":{const s=this._cp2(i,3,0),h=this._cp3(i,s,.5,-1),e=this._sub(s,_);this._normalize(e);const r=this._crossProduct(e,this._sub(h,_));this._leftPerpendicular(e);const c=[];c.push([_[0]+e[0]*r,_[1]+e[1]*r]),c.push([s[0]+e[0]*r,s[1]+e[1]*r]),t.push(c);break}case"CircleWithArc":{let s=this._cp2(i,3,0);const e=this._cp3(i,s,.5,-1);let c,o;if(h>=4)c=i[3],o=this._crossProduct(this._sub(c,s),this._sub(e,s))>0;else{c=s,o=this._crossProduct(this._sub(c,_),this._sub(e,_))>0;const t=24*this._geomUnitsPerPoint,i=this._sub(c,_);this._normalize(i,t);const h=Math.sqrt(2)/2;this._rotateDirect(i,h,o?h:-h),s=this._add(_,i)}const u=this._sub(s,_),a=Math.cos(Math.PI/18),n=Math.sin(Math.PI/18),p=[s];for(let t=1;t<=36;t++)this._rotateDirect(u,a,n),p.push(this._add(_,u));this._add90DegArc(p,s,c,e,o),r(p[p.length-8],1),t.push(p);break}case"DoubleJog":{let s,e=this._cp2(i,-3,1),r=this._cp3(i,e,-1,-.5);if(h>=4)s=i[3];else{const t=_;_=e,s=r;const i=this._dist(_,t),h=this._dist(s,t);let c=30*this._geomUnitsPerPoint;.5*i<c&&(c=.5*i),.5*h<c&&(c=.5*h),e=this._mix(_,c/i,t,(i-c)/i),r=this._mix(s,c/h,t,(h-c)/h)}const c=this._mid(_,e),o=this._mid(s,r),u=this._dist(_,e),a=this._dist(r,s);let n=Math.min(u,a)/8;n=Math.min(n,24*this._geomUnitsPerPoint);const p=Math.cos(Math.PI/4);let d=this._sub(_,e);this._normalize(d,n),this._crossProduct(d,this._sub(s,e))>0?this._rotateDirect(d,p,-p):this._rotateDirect(d,p,p);let l=[];l.push(e),l.push(this._add(c,d)),l.push(this._sub(c,d)),l.push(_),t.push(l),d=this._sub(s,r),this._normalize(d,n),this._crossProduct(d,this._sub(_,r))<0?this._rotateDirect(d,p,p):this._rotateDirect(d,p,-p),l=[],l.push(r),l.push(this._add(o,d)),l.push(this._sub(o,d)),l.push(s),t.push(l);break}case"PerpendicularOffset":{const s=this._cp2(i,-4,1),h=this._cp3(i,s,.882353,-1.94),e=this._sub(h,s);this._crossProduct(e,this._sub(_,s))>0?this._rightPerpendicular(e):this._leftPerpendicular(e);const r=[e[0]/8,e[1]/8],c=this._sub(this._mid(s,h),r);t.push([c,_]);break}case"LineExcludingLastSegment":{const s=this._arrowPath(i),h=[];let e=s.length-2;for(;e--;)h.push(s[e]);t.push(h);break}case"MultivertexArrow":{const s=this._arrowPath(i),h=[];this._addArrow(h,s,!1),t.push(h);break}case"CrossedArrow":{const s=this._arrowPath(i),h=[];this._addArrow(h,s,!0),t.push(h);break}case"ChevronArrow":{const[s,h]=this._arrowLastSeg(i),e=10*this._geomUnitsPerPoint,r=this._sub(_,s),c=this._norm(r);this._normalize(r);const o=this._crossProduct(r,this._sub(h,s));let u=this._dotProduct(r,this._sub(h,s));u<.05*c?u=.05*c:u>.95*c-e&&(u=.95*c-e);const a=[s[0]+r[0]*u,s[1]+r[1]*u],n=this._leftPerp(r),p=[];p.push([a[0]+n[0]*o+r[0]*e,a[1]+n[1]*o+r[1]*e]),p.push(_),p.push([a[0]-n[0]*o+r[0]*e,a[1]-n[1]*o+r[1]*e]),t.push(p);break}case"ChevronArrowOffset":{const[s,h]=this._arrowLastSeg(i),e=this._sub(_,s),r=this._norm(e);this._normalize(e);const c=this._crossProduct(e,this._sub(h,s));let o=this._dotProduct(e,this._sub(h,s));o<.05*r?o=.05*r:o>.95*r&&(o=.95*r);const u=[s[0]+e[0]*o,s[1]+e[1]*o];this._leftPerpendicular(e);const a=[];a.push([u[0]+e[0]*c*.5,u[1]+e[1]*c*.5]),a.push(this._mid(u,_)),a.push([u[0]-e[0]*c*.5,u[1]-e[1]*c*.5]),t.push(a);break}case"PartialFirstSegment":{const[s,h]=this._arrowLastSeg(i),e=this._sub(_,s),r=this._norm(e);this._normalize(e);let c=this._dotProduct(e,this._sub(h,s));c<.05*r?c=.05*r:c>.95*r&&(c=.95*r);const o=[s[0]+e[0]*c,s[1]+e[1]*c];t.push([s,o]);break}case"Arch":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,1),e=this._sub(_,s),r=this._mix(h,1,e,.55),c=this._mix(h,1,e,-.55),o=[_];this._addBezier2(o,_,r,h,4),this._addBezier2(o,h,c,s,4),t.push(o);break}case"CurvedParallelTicks":{const s=this._cp2(i,-4,1),h=this._cp3(i,s,.882353,-1.94),e=this._sub(h,s);this._crossProduct(e,this._sub(_,s))>0?this._rightPerpendicular(e):this._leftPerpendicular(e);const r=[e[0]/8,e[1]/8],c=this._sub(this._mid(s,h),r),o=this._sub(this._mix(s,.75,h,.25),r),u=this._sub(this._mix(s,.25,h,.75),r),a=[s];this._addBezier2(a,s,o,c,3),this._addBezier2(a,c,u,h,3),t.push(a);for(let i=0;i<8;i++){const s=a[2*i+1],h=[this._clone(s)];h.push(this._add(s,[e[0]/4,e[1]/4])),t.push(h)}break}case"Arc90Degrees":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,1),e=[s];this._add90DegArc(e,s,_,h),t.push(e);break}case"TipWithPerpendicularAndTicks":{const[s,h]=this._arrowLastSeg(i),e=10*this._geomUnitsPerPoint,r=this._sub(_,s),c=this._norm(r);this._normalize(r);let o=this._crossProduct(r,this._sub(h,s)),u=this._dotProduct(r,this._sub(h,s));u<.05*c?u=.05*c:u>.95*c-e&&(u=.95*c-e);const a=this._leftPerp(r),n=[_[0]-r[0]*e,_[1]-r[1]*e],p=.5*Math.max(c-u-e,e);o=Math.abs(o);const d=[];d.push([n[0]+a[0]*(o+p)-r[0]*p,n[1]+a[1]*(o+p)-r[1]*p]),d.push([n[0]+a[0]*o,n[1]+a[1]*o]),d.push([n[0]-a[0]*o,n[1]-a[1]*o]),d.push([n[0]-a[0]*(o+p)-r[0]*p,n[1]-a[1]*(o+p)-r[1]*p]),t.push(d),t.push([n,_]);break}case"ConcentricCircles":{const s=this._cp2(i,1,0),e=this._cp3(i,s,2,0),c=Math.cos(Math.PI/18),o=Math.sin(Math.PI/18);let u=this._dist(s,_),a=[u,0],n=[];for(let t=0;t<=36;t++)n.push(this._add(_,a)),this._rotateDirect(a,c,o);if(t.push(n),h>=4){n=[];const s=i[3];u=this._dist(s,_),a=[u,0];for(let t=0;t<=36;t++)n.push(this._add(_,a)),0===t&&(n.push(this._add(_,a)),r(n[1],1)),this._rotateDirect(a,c,o);t.push(n)}n=[],u=this._dist(e,_),a=[u,0];for(let t=0;t<=36;t++)n.push(this._add(_,a)),this._rotateDirect(a,c,o);t.push(n);break}case"DoubleJogArrow":{_=this._arrowPath(i)[0];const[s,h]=this._arrowLastSeg(i),e=this._sub(_,s),r=this._norm(e);this._normalize(e);const c=Math.abs(this._crossProduct(e,this._sub(h,_)));let o=Math.abs(this._dotProduct(e,this._sub(h,_)));o<.05*r?o=.05*r:o>.95*r&&(o=.95*r);const u=Math.max(c,o),a=this._leftPerp(e);let n=[];const p=[_[0]-e[0]*o*.5+a[0]*c*.5,_[1]-e[1]*o*.5+a[1]*c*.5];n.push([p[0],p[1]]),p[0]+=e[0]*u*.5+a[0]*u*.4,p[1]+=e[1]*u*.5+a[1]*u*.4,n.push([p[0],p[1]]),p[0]-=a[0]*u*.25,p[1]-=a[1]*u*.25,n.push([p[0],p[1]]),p[0]+=e[0]*u*.5+a[0]*u*.4,p[1]+=e[1]*u*.5+a[1]*u*.4,n.push([p[0],p[1]]),t.push(n),n=[],p[0]=_[0]-e[0]*o*.5-a[0]*c*.5,p[1]=_[1]-e[1]*o*.5-a[1]*c*.5,n.push([p[0],p[1]]),p[0]+=e[0]*u*.5-a[0]*u*.4,p[1]+=e[1]*u*.5-a[1]*u*.4,n.push([p[0],p[1]]),p[0]+=a[0]*u*.25,p[1]+=a[1]*u*.25,n.push([p[0],p[1]]),p[0]+=e[0]*u*.5-a[0]*u*.4,p[1]+=e[1]*u*.5-a[1]*u*.4,n.push([p[0],p[1]]),t.push(n);break}case"LinkedChevrons":{const s=this._cp2(i,-5,0),h=this._cp3(i,s,-.2,1),e=this._sub(_,s);this._normalize(e);const r=this._leftPerp(e),c=Math.abs(this._crossProduct(e,this._sub(h,s)));t.push([s,_]);const o=[];o.push([_[0]-e[0]*c+r[0]*c,_[1]-e[1]*c+r[1]*c]),o.push(_),o.push([_[0]-e[0]*c-r[0]*c,_[1]-e[1]*c-r[1]*c]),t.push(o),this._addDash(t,s,[-e[0]*c+r[0]*c,-e[1]*c+r[1]*c]),this._addDash(t,s,[-e[0]*c-r[0]*c,-e[1]*c-r[1]*c]);break}case"SegmentThenHalfCircle":{const s=this._cp2(i,2,0),e=this._cp3(i,s,1.5,0);let r;r=h>=4?i[3]:this._cp3(i,s,1.25,-.5);const c=this._sub(s,_);this._normalize(c);const o=.5*this._dist(s,e),u=this._crossProduct(c,this._sub(r,_))>0,a=Math.cos(Math.PI/18);let n=Math.sin(Math.PI/18);u&&(n=-n);const p=[_,s];c[0]*=o,c[1]*=o;const d=this._add(s,c);c[0]=-c[0],c[1]=-c[1];for(let t=1;t<=18;t++)this._rotateDirect(c,a,n),p.push(this._add(d,c));t.push(p);break}case"LineWithStraightTicks":{const s=this._cp2(i,-2,1),h=this._cp3(i,s,-1,-.5),e=this._sub(h,s);this._normalize(e);const r=this._dotProduct(e,this._sub(s,_)),c=this._dotProduct(e,this._sub(h,_));let o=[_];o.push([_[0]+e[0]*r,_[1]+e[1]*r]),o.push(s),t.push(o),o=[_],o.push([_[0]+e[0]*c,_[1]+e[1]*c]),o.push(h),t.push(o);break}case"DoubleCurve":{const s=this._cp2(i,-5,-1),h=this._cp3(i,s,2,0),e=Math.atan2(1,5),c=Math.cos(e),o=Math.sin(e),u=this._sub(s,_),a=this._dist(_,s);this._normalize(u),this._rotateDirect(u,c,-o);const n=[_];n.push([_[0]+u[0]*a*.5,_[1]+u[1]*a*.5]),r(n[1],1),n.push([_[0]+u[0]*a*.8,_[1]+u[1]*a*.8]),this._addBezier2(n,n[2],[_[0]+u[0]*a,_[1]+u[1]*a],s,3);const p=this._sub(h,s),d=this._dist(s,h);this._normalize(p),this._rotateDirect(p,c,-o),this._addBezier2(n,s,[h[0]-p[0]*d,h[1]-p[1]*d],[h[0]-p[0]*d*.8,h[1]-p[1]*d*.8],3),n.push(h),t.push(n);break}case"ParallelWithTicksByWidth":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,3),e=this._sub(s,_);this._normalize(e);const r=this._crossProduct(e,this._sub(h,_));this._leftPerpendicular(e),r>0?(this._addAngledTicks(t,_,[_[0]+e[0]*r,_[1]+e[1]*r],s),this._addAngledTicks(t,s,[s[0]+e[0]*r,s[1]+e[1]*r],_)):(this._addAngledTicks(t,[_[0]+e[0]*r,_[1]+e[1]*r],_,s),this._addAngledTicks(t,[s[0]+e[0]*r,s[1]+e[1]*r],_,s));break}case"EnclosingRoundedRectangle":{const s=this._cp2(i,3,-2),t=[Math.min(_[0],s[0]),Math.max(_[1],s[1])],h=[Math.max(_[0],s[0]),Math.min(_[1],s[1])],e=h[0]-t[0],r=t[1]-h[1],c=Math.min(e,r)/10,o=[];o.push([t[0]+c+.75*(e-2*c),t[1]]),o.push([h[0]-c,t[1]]),this._add90DegArc(o,[h[0]-c,t[1]],[h[0],t[1]-c],[h[0],t[1]]),o.push([h[0],h[1]+c]),this._add90DegArc(o,[h[0],h[1]+c],[h[0]-c,h[1]],h),o.push([t[0]+c,h[1]]),this._add90DegArc(o,[t[0]+c,h[1]],[t[0],h[1]+c],[t[0],h[1]]),o.push([t[0],t[1]-c]),this._add90DegArc(o,[t[0],t[1]-c],[t[0]+c,t[1]],t),o.push([t[0]+c+.75*(e-2*c),t[1]]);break}case"ParallelOffsetByValue":{if(i.length<2||0===this._width)break;const s=this._offsetPath(i,.5*this._width);s&&t.push(s);const h=this._offsetPath(i,.5*-this._width);h&&t.push(h);break}default:t.push(i)}}return t}}function u(s){return"ParallelOffsetByValue"===s}export{c as EffectControlMeasureLine};
2
+ import{inchesPerMeter as s}from"../../../core/units.js";import{GeometryCursor as t}from"../../../geometry/GeometryCursor.js";import{collectMultipath as i}from"../../../geometry/geometryCursorCollectUtils.js";import h from"../../../geometry/SpatialReference.js";import{getPathLength as e}from"../../../geometry/support/coordsUtils.js";import{setId as r}from"../CIMCursor.js";import{lazyOffsetOperator as _}from"../CIMEffects.js";class c{static{this.instance=null}static local(){return null===c.instance&&(c.instance=new c),c.instance}execute(s,t,i){return new o(s,t,i)}}class o{constructor(s,t,i){this._defaultPointSize=20,this._inputGeometries=s,this._geomUnitsPerPoint=i.geomUnitsPerPoint??1,this._scale=i?.scale,this._rule=t.rule??"FullGeometry",this._spatialReference=i?.spatialReference??h.WebMercator,this._width=this._computeWidth(t.width??25),this._defaultSize=this._defaultPointSize*this._geomUnitsPerPoint}next(){let s;for(;s=this._inputGeometries.next();){const h=this._processGeom(i(s));if(h?.length)return t.fromJSONCIM({paths:h})}return null}_computeWidth(t){if(!u(this._rule)||null==this._scale||!this._spatialReference.metersPerUnit)return t*this._geomUnitsPerPoint;const i=this._scale/(96*s*this._spatialReference.metersPerUnit);return t/(this._spatialReference.metersPerUnit*i)}_clone(s){return[s[0],s[1]]}_mid(s,t){return[(s[0]+t[0])/2,(s[1]+t[1])/2]}_mix(s,t,i,h){return[s[0]*t+i[0]*h,s[1]*t+i[1]*h]}_add(s,t){return[s[0]+t[0],s[1]+t[1]]}_add2(s,t,i){return[s[0]+t,s[1]+i]}_sub(s,t){return[s[0]-t[0],s[1]-t[1]]}_dist(s,t){return Math.sqrt((s[0]-t[0])*(s[0]-t[0])+(s[1]-t[1])*(s[1]-t[1]))}_norm(s){return Math.sqrt(s[0]*s[0]+s[1]*s[1])}_normalize(s,t=1){const i=t/this._norm(s);s[0]*=i,s[1]*=i}_leftPerpendicular(s){const t=-s[1],i=s[0];s[0]=t,s[1]=i}_leftPerp(s){return[-s[1],s[0]]}_rightPerpendicular(s){const t=s[1],i=-s[0];s[0]=t,s[1]=i}_rightPerp(s){return[s[1],-s[0]]}_dotProduct(s,t){return s[0]*t[0]+s[1]*t[1]}_crossProduct(s,t){return s[0]*t[1]-s[1]*t[0]}_rotateDirect(s,t,i){const h=s[0]*t-s[1]*i,e=s[0]*i+s[1]*t;s[0]=h,s[1]=e}_makeCtrlPt(s){const t=[s[0],s[1]];return r(t,1),t}_addAngledTicks(s,t,i,h){const e=this._sub(i,t);this._normalize(e);const r=this._crossProduct(e,this._sub(h,t));let _;_=r>0?this._rightPerp(e):this._leftPerp(e);const c=Math.abs(r)/2,o=[];o.push([t[0]+(_[0]-e[0])*c,t[1]+(_[1]-e[1])*c]),o.push(t),o.push(i),o.push([i[0]+(_[0]+e[0])*c,i[1]+(_[1]+e[1])*c]),s.push(o)}_addBezier2(s,t,i,h,e){if(0===e--)return void s.push(h);const r=this._mid(t,i),_=this._mid(i,h),c=this._mid(r,_);this._addBezier2(s,t,r,c,e),this._addBezier2(s,c,_,h,e)}_addBezier3(s,t,i,h,e,r){if(0===r--)return void s.push(e);const _=this._mid(t,i),c=this._mid(i,h),o=this._mid(h,e),u=this._mid(_,c),a=this._mid(c,o),n=this._mid(u,a);this._addBezier3(s,t,_,u,n,r),this._addBezier3(s,n,a,o,e,r)}_add90DegArc(s,t,i,h,e){const r=e??this._crossProduct(this._sub(i,t),this._sub(h,t))>0,_=this._mid(t,i),c=this._sub(_,t);r?this._leftPerpendicular(c):this._rightPerpendicular(c),_[0]+=c[0],_[1]+=c[1],this._addBezier3(s,t,this._mix(t,.33333,_,.66667),this._mix(i,.33333,_,.66667),i,4)}_addArrow(s,t,i){const h=t[0],e=t[1],r=t[t.length-1],_=this._sub(h,e),c=this._norm(_);this._normalize(_);const o=Math.abs(this._crossProduct(_,this._sub(r,e)));let u=this._dotProduct(_,this._sub(r,e));u<.05*c?u=.05*c:u>.95*c&&(u=.95*c);const a=.5*o,n=this._leftPerp(_),p=[e[0]+_[0]*u,e[1]+_[1]*u],d=t.length-1,l=[];l.push(i?[-n[0],-n[1]]:n);let b=[-_[0],-_[1]];for(let P=1;P<d-1;P++){const s=this._sub(t[P+1],t[P]);this._normalize(s);const i=this._dotProduct(s,b),h=this._crossProduct(s,b),e=Math.sqrt((1+i)/2),r=this._sub(s,b);this._normalize(r),r[0]/=e,r[1]/=e,l.push(h<0?[-r[0],-r[1]]:r),b=s}l.push(this._rightPerp(b));for(let P=l.length-1;P>0;P--)s.push([t[P][0]+l[P][0]*a,t[P][1]+l[P][1]*a]);s.push([p[0]+l[0][0]*a,p[1]+l[0][1]*a]),s.push([p[0]+l[0][0]*o,p[1]+l[0][1]*o]),s.push(h),s.push([p[0]-l[0][0]*o,p[1]-l[0][1]*o]),s.push([p[0]-l[0][0]*a,p[1]-l[0][1]*a]);for(let P=1;P<l.length;P++)s.push([t[P][0]-l[P][0]*a,t[P][1]-l[P][1]*a])}_addDash(s,t,i){const h=this._norm(i)/7;this._normalize(i);let e=[];for(let r=0;r<=7;r++)e.push([t[0]+i[0]*r*h,t[1]+i[1]*r*h]),1&r&&(s.push(e),e=[])}_cp2(s,t,i){return s.length>=2?s[1]:this._add2(s[0],t*this._defaultSize,i*this._defaultSize)}_cp3(s,t,i,h){if(s.length>=3)return s[2];const e=this._mix(s[0],1-i,t,i),r=this._sub(t,s[0]);return this._normalize(r),this._rightPerpendicular(r),[e[0]+r[0]*h*this._defaultSize,e[1]+r[1]*h*this._defaultSize]}_arrowPath(s){if(s.length>2)return s;const t=s[0],i=this._cp2(s,-4,0),h=this._sub(t,i);this._normalize(h);const e=this._rightPerp(h);return[t,i,[t[0]+(e[0]-h[0])*this._defaultSize,t[1]+(e[1]-h[1])*this._defaultSize]]}_arrowLastSeg(s){const t=s[0],i=this._cp2(s,-4,0);let h;if(s.length>=3)h=s[s.length-1];else{const s=this._sub(t,i);this._normalize(s);const e=this._rightPerp(s);h=[t[0]+(e[0]-s[0])*this._defaultSize,t[1]+(e[1]-s[1])*this._defaultSize]}return[i,h]}_offsetPath(s,h){const e=_.module.execute({paths:[s],spatialReference:this._spatialReference.toJSON()},h,{joins:"miter",miterLimit:4}),[r]=i(t.fromJSONCIM(e));return r?.length?r:null}_processGeom(s){if(!s)return null;const t=[];for(const i of s){const s=i.length>1&&e(i)<this._defaultSize;if(!i||0===i.length||s)continue;const h=i.length;let _=i[0];switch(this._rule){case"PerpendicularFromFirstSegment":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,4),e=[];e.push(h),e.push(this._mid(_,s)),t.push(e);break}case"ReversedFirstSegment":{const s=this._cp2(i,0,-1);t.push([s,_]);break}case"PerpendicularToSecondSegment":{if(i.length<3)return[];const s=this._cp2(i,-4,1),h=this._cp3(i,s,.882353,-1.94),e=[];e.push(this._mid(s,h)),e.push(_),t.push(e);break}case"SecondSegmentWithTicks":{if(i.length<3)return[];const s=this._cp2(i,-4,1),h=this._cp3(i,s,.882353,-1.94),e=this._sub(h,s);let r;r=this._crossProduct(e,this._sub(_,s))>0?this._rightPerp(e):this._leftPerp(e);const c=[];c.push([s[0]+(r[0]-e[0])/3,s[1]+(r[1]-e[1])/3]),c.push(s),c.push(h),c.push([h[0]+(r[0]+e[0])/3,h[1]+(r[1]+e[1])/3]),t.push(c);break}case"DoublePerpendicular":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,3),e=this._mid(_,s),r=this._sub(e,h);this._normalize(r);const c=this._crossProduct(r,this._sub(_,h));this._leftPerpendicular(r);const o=[];o.push(_),o.push([h[0]+r[0]*c,h[1]+r[1]*c]),t.push(o);const u=[];u.push([h[0]-r[0]*c,h[1]-r[1]*c]),u.push(s),t.push(u);break}case"OppositeToFirstSegment":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,3),e=this._mid(_,s),r=this._sub(e,h);this._normalize(r);const c=this._crossProduct(r,this._sub(_,h));this._leftPerpendicular(r);const o=[];o.push([h[0]+r[0]*c,h[1]+r[1]*c]),o.push([h[0]-r[0]*c,h[1]-r[1]*c]),t.push(o);break}case"TriplePerpendicular":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,4),e=this._mid(_,s),r=this._sub(e,h);this._normalize(r);const c=this._crossProduct(r,this._sub(_,h));this._leftPerpendicular(r);const o=[];o.push([h[0]+r[0]*c*.8,h[1]+r[1]*c*.8]),o.push([e[0]+.8*(_[0]-e[0]),e[1]+.8*(_[1]-e[1])]),t.push(o),t.push([h,e]);const u=[];u.push([h[0]-r[0]*c*.8,h[1]-r[1]*c*.8]),u.push([e[0]+.8*(s[0]-e[0]),e[1]+.8*(s[1]-e[1])]),t.push(u);break}case"HalfCircleFirstSegment":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,4),e=this._mid(_,s);let r=this._sub(s,_);const c=Math.cos(Math.PI/18),o=Math.sin(Math.PI/18),u=Math.sqrt((1+c)/2),a=Math.sqrt((1-c)/2),n=[];let p;this._crossProduct(r,this._sub(h,_))>0?(n.push(_),r=this._sub(_,e),p=s):(n.push(s),r=this._sub(s,e),p=_),this._rotateDirect(r,u,a),r[0]/=u,r[1]/=u;for(let t=1;t<=18;t++)n.push(this._add(e,r)),this._rotateDirect(r,c,o);n.push(p),t.push(n);break}case"HalfCircleSecondSegment":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,1,-1);let e=this._sub(_,s);this._normalize(e);const r=this._crossProduct(e,this._sub(h,s))/2;this._leftPerpendicular(e);const c=[s[0]+e[0]*r,s[1]+e[1]*r];e=this._sub(s,c);const o=Math.cos(Math.PI/18);let u=Math.sin(Math.PI/18);r>0&&(u=-u);const a=[s];for(let t=1;t<=18;t++)this._rotateDirect(e,o,u),a.push(this._add(c,e));t.push(a);break}case"HalfCircleExtended":{const s=this._cp2(i,0,-2),e=this._cp3(i,s,1,-1);let r;if(h>=4)r=i[3];else{const t=this._sub(_,s);r=this._add(e,t)}const c=this._dist(s,e)/2/.75,o=this._sub(s,_);this._normalize(o,c);const u=this._sub(e,r);this._normalize(u,c);const a=[r,e];t.push(a);const n=[this._clone(e)];this._addBezier3(n,e,this._add(e,u),this._add(s,o),s,4),n.push(_),t.push(n);break}case"OpenCircle":{const s=this._cp2(i,-2,0),h=this._sub(s,_),e=Math.cos(Math.PI/18),r=-Math.sin(Math.PI/18),c=[s];for(let t=1;t<=33;t++)this._rotateDirect(h,e,r),c.push(this._add(_,h));t.push(c);break}case"CoverageEdgesWithTicks":{const s=this._cp2(i,0,-1);let e,r;if(h>=3)e=i[2];else{const t=this._sub(s,_),i=this._leftPerp(t);e=[_[0]+i[0]-.25*t[0],_[1]+i[1]-.25*t[1]]}if(h>=4)r=i[3];else{const t=this._mid(_,s),i=this._sub(_,s);this._normalize(i),this._leftPerpendicular(i);const h=this._crossProduct(i,this._sub(e,t));this._rightPerpendicular(i),r=[e[0]+i[0]*h*2,e[1]+i[1]*h*2]}const c=this._sub(s,_);let o,u;o=this._crossProduct(c,this._sub(e,_))>0?this._rightPerp(c):this._leftPerp(c),u=[],u.push(e),u.push(_),u.push([_[0]+(o[0]-c[0])/3,_[1]+(o[1]-c[1])/3]),t.push(u),o=this._crossProduct(c,this._sub(r,s))>0?this._rightPerp(c):this._leftPerp(c),u=[],u.push([s[0]+(o[0]+c[0])/3,s[1]+(o[1]+c[1])/3]),u.push(s),u.push(r),t.push(u);break}case"GapExtentWithDoubleTicks":{const s=this._cp2(i,0,2),e=this._cp3(i,s,0,1);let r;if(h>=4)r=i[3];else{const t=this._sub(s,_);r=this._add(e,t)}this._addAngledTicks(t,_,s,this._mid(e,r)),this._addAngledTicks(t,e,r,this._mid(_,s));break}case"GapExtentMidline":{const s=this._cp2(i,2,0),e=this._cp3(i,s,0,1);let r;if(h>=4)r=i[3];else{const t=this._sub(s,_);r=this._add(e,t)}const c=[];c.push(this._mid(_,e)),c.push(this._mid(s,r)),t.push(c);break}case"Chevron":{const s=this._cp2(i,-1,-1);let e;if(h>=3)e=i[2];else{const t=this._sub(s,_);this._leftPerpendicular(t),e=this._add(_,t)}t.push([s,this._makeCtrlPt(_),e]);break}case"PerpendicularWithArc":{const s=this._cp2(i,0,-2),e=this._cp3(i,s,.5,-1),r=this._sub(s,_),c=this._norm(r);r[0]/=c,r[1]/=c;const o=this._crossProduct(r,this._sub(e,_));let u=this._dotProduct(r,this._sub(e,_));u<.05*c?u=.05*c:u>.95*c&&(u=.95*c);const a=[_[0]+r[0]*u,_[1]+r[1]*u];let n=this._leftPerp(r),p=[];if(p.push([a[0]-n[0]*o,a[1]-n[1]*o]),p.push([a[0]+n[0]*o,a[1]+n[1]*o]),t.push(p),h>=4){const s=i[3];let h=this._dotProduct(r,this._sub(s,_));h<.1*c?h=.1*c:h>.9*c&&(h=.9*c);const e=[_[0]+r[0]*h,_[1]+r[1]*h],o=this._crossProduct(r,this._sub(s,_)),u=[];u.push([e[0]-n[0]*o,e[1]-n[1]*o]),u.push([e[0]+n[0]*o,e[1]+n[1]*o]),t.push(u)}const d=[s[0]+n[0]*o,s[1]+n[1]*o];n=this._sub(s,d);const l=Math.cos(Math.PI/18);let b=Math.sin(Math.PI/18);o<0&&(b=-b),p=[_,s];for(let t=1;t<=9;t++)this._rotateDirect(n,l,b),p.push(this._add(d,n));t.push(p);break}case"ClosedHalfCircle":{const s=this._cp2(i,2,0),h=this._mid(_,s),e=this._sub(s,h),r=Math.cos(Math.PI/18),c=Math.sin(Math.PI/18),o=[_,s];for(let t=1;t<=18;t++)this._rotateDirect(e,r,c),o.push(this._add(h,e));t.push(o);break}case"TripleParallelExtended":{const s=this._cp2(i,0,-2),h=this._cp3(i,s,1,-2),e=this._mid(_,s),c=this._sub(h,s);this._normalize(c);const o=Math.abs(this._crossProduct(c,this._sub(e,s)))/2,u=this._dist(s,h),a=[s,_];a.push([_[0]+c[0]*u*.5,_[1]+c[1]*u*.5]),t.push(a);const n=[];n.push([e[0]-c[0]*o,e[1]-c[1]*o]),n.push([e[0]+c[0]*u*.375,e[1]+c[1]*u*.375]),r(n[n.length-1],1),n.push([e[0]+c[0]*u*.75,e[1]+c[1]*u*.75]),t.push(n);const p=[s,h];t.push(p);break}case"ParallelWithTicks":{const s=this._cp2(i,3,0),h=this._cp3(i,s,.5,-1),e=this._sub(s,_);this._normalize(e);const r=this._crossProduct(e,this._sub(h,_)),c=this._leftPerp(e);this._addAngledTicks(t,_,s,h),this._addAngledTicks(t,this._add2(_,c[0]*r,c[1]*r),this._add2(s,c[0]*r,c[1]*r),this._mid(_,s));break}case"Parallel":{const s=this._cp2(i,3,0),h=this._cp3(i,s,.5,-1),e=this._sub(s,_);this._normalize(e);const r=this._leftPerp(e),c=this._crossProduct(e,this._sub(h,_));let o=[_,s];t.push(o),o=[],o.push([_[0]+r[0]*c,_[1]+r[1]*c]),o.push([s[0]+r[0]*c,s[1]+r[1]*c]),t.push(o);break}case"PerpendicularToFirstSegment":{const s=this._cp2(i,3,0),h=this._cp3(i,s,.5,-1),e=this._mid(_,s),r=this._sub(s,_);this._normalize(r);const c=this._crossProduct(r,this._sub(h,_));this._leftPerpendicular(r);const o=[];o.push([e[0]-r[0]*c*.25,e[1]-r[1]*c*.25]),o.push([e[0]+r[0]*c*1.25,e[1]+r[1]*c*1.25]),t.push(o);break}case"ParallelOffset":{const s=this._cp2(i,3,0),h=this._cp3(i,s,.5,-1),e=this._sub(s,_);this._normalize(e);const r=this._crossProduct(e,this._sub(h,_));this._leftPerpendicular(e);const c=[];c.push([_[0]-e[0]*r,_[1]-e[1]*r]),c.push([s[0]-e[0]*r,s[1]-e[1]*r]),t.push(c);const o=[];o.push([_[0]+e[0]*r,_[1]+e[1]*r]),o.push([s[0]+e[0]*r,s[1]+e[1]*r]),t.push(o);break}case"OffsetOpposite":{const s=this._cp2(i,3,0),h=this._cp3(i,s,.5,-1),e=this._sub(s,_);this._normalize(e);const r=this._crossProduct(e,this._sub(h,_));this._leftPerpendicular(e);const c=[];c.push([_[0]-e[0]*r,_[1]-e[1]*r]),c.push([s[0]-e[0]*r,s[1]-e[1]*r]),t.push(c);break}case"OffsetSame":{const s=this._cp2(i,3,0),h=this._cp3(i,s,.5,-1),e=this._sub(s,_);this._normalize(e);const r=this._crossProduct(e,this._sub(h,_));this._leftPerpendicular(e);const c=[];c.push([_[0]+e[0]*r,_[1]+e[1]*r]),c.push([s[0]+e[0]*r,s[1]+e[1]*r]),t.push(c);break}case"CircleWithArc":{let s=this._cp2(i,3,0);const e=this._cp3(i,s,.5,-1);let c,o;if(h>=4)c=i[3],o=this._crossProduct(this._sub(c,s),this._sub(e,s))>0;else{c=s,o=this._crossProduct(this._sub(c,_),this._sub(e,_))>0;const t=24*this._geomUnitsPerPoint,i=this._sub(c,_);this._normalize(i,t);const h=Math.sqrt(2)/2;this._rotateDirect(i,h,o?h:-h),s=this._add(_,i)}const u=this._sub(s,_),a=Math.cos(Math.PI/18),n=Math.sin(Math.PI/18),p=[s];for(let t=1;t<=36;t++)this._rotateDirect(u,a,n),p.push(this._add(_,u));this._add90DegArc(p,s,c,e,o),r(p[p.length-8],1),t.push(p);break}case"DoubleJog":{let s,e=this._cp2(i,-3,1),r=this._cp3(i,e,-1,-.5);if(h>=4)s=i[3];else{const t=_;_=e,s=r;const i=this._dist(_,t),h=this._dist(s,t);let c=30*this._geomUnitsPerPoint;.5*i<c&&(c=.5*i),.5*h<c&&(c=.5*h),e=this._mix(_,c/i,t,(i-c)/i),r=this._mix(s,c/h,t,(h-c)/h)}const c=this._mid(_,e),o=this._mid(s,r),u=this._dist(_,e),a=this._dist(r,s);let n=Math.min(u,a)/8;n=Math.min(n,24*this._geomUnitsPerPoint);const p=Math.cos(Math.PI/4);let d=this._sub(_,e);this._normalize(d,n),this._crossProduct(d,this._sub(s,e))>0?this._rotateDirect(d,p,-p):this._rotateDirect(d,p,p);let l=[];l.push(e),l.push(this._add(c,d)),l.push(this._sub(c,d)),l.push(_),t.push(l),d=this._sub(s,r),this._normalize(d,n),this._crossProduct(d,this._sub(_,r))<0?this._rotateDirect(d,p,p):this._rotateDirect(d,p,-p),l=[],l.push(r),l.push(this._add(o,d)),l.push(this._sub(o,d)),l.push(s),t.push(l);break}case"PerpendicularOffset":{const s=this._cp2(i,-4,1),h=this._cp3(i,s,.882353,-1.94),e=this._sub(h,s);this._crossProduct(e,this._sub(_,s))>0?this._rightPerpendicular(e):this._leftPerpendicular(e);const r=[e[0]/8,e[1]/8],c=this._sub(this._mid(s,h),r);t.push([c,_]);break}case"LineExcludingLastSegment":{const s=this._arrowPath(i),h=[];let e=s.length-2;for(;e--;)h.push(s[e]);t.push(h);break}case"MultivertexArrow":{const s=this._arrowPath(i),h=[];this._addArrow(h,s,!1),t.push(h);break}case"CrossedArrow":{const s=this._arrowPath(i),h=[];this._addArrow(h,s,!0),t.push(h);break}case"ChevronArrow":{const[s,h]=this._arrowLastSeg(i),e=10*this._geomUnitsPerPoint,r=this._sub(_,s),c=this._norm(r);this._normalize(r);const o=this._crossProduct(r,this._sub(h,s));let u=this._dotProduct(r,this._sub(h,s));u<.05*c?u=.05*c:u>.95*c-e&&(u=.95*c-e);const a=[s[0]+r[0]*u,s[1]+r[1]*u],n=this._leftPerp(r),p=[];p.push([a[0]+n[0]*o+r[0]*e,a[1]+n[1]*o+r[1]*e]),p.push(_),p.push([a[0]-n[0]*o+r[0]*e,a[1]-n[1]*o+r[1]*e]),t.push(p);break}case"ChevronArrowOffset":{const[s,h]=this._arrowLastSeg(i),e=this._sub(_,s),r=this._norm(e);this._normalize(e);const c=this._crossProduct(e,this._sub(h,s));let o=this._dotProduct(e,this._sub(h,s));o<.05*r?o=.05*r:o>.95*r&&(o=.95*r);const u=[s[0]+e[0]*o,s[1]+e[1]*o];this._leftPerpendicular(e);const a=[];a.push([u[0]+e[0]*c*.5,u[1]+e[1]*c*.5]),a.push(this._mid(u,_)),a.push([u[0]-e[0]*c*.5,u[1]-e[1]*c*.5]),t.push(a);break}case"PartialFirstSegment":{const[s,h]=this._arrowLastSeg(i),e=this._sub(_,s),r=this._norm(e);this._normalize(e);let c=this._dotProduct(e,this._sub(h,s));c<.05*r?c=.05*r:c>.95*r&&(c=.95*r);const o=[s[0]+e[0]*c,s[1]+e[1]*c];t.push([s,o]);break}case"Arch":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,1),e=this._sub(_,s),r=this._mix(h,1,e,.55),c=this._mix(h,1,e,-.55),o=[_];this._addBezier2(o,_,r,h,4),this._addBezier2(o,h,c,s,4),t.push(o);break}case"CurvedParallelTicks":{const s=this._cp2(i,-4,1),h=this._cp3(i,s,.882353,-1.94),e=this._sub(h,s);this._crossProduct(e,this._sub(_,s))>0?this._rightPerpendicular(e):this._leftPerpendicular(e);const r=[e[0]/8,e[1]/8],c=this._sub(this._mid(s,h),r),o=this._sub(this._mix(s,.75,h,.25),r),u=this._sub(this._mix(s,.25,h,.75),r),a=[s];this._addBezier2(a,s,o,c,3),this._addBezier2(a,c,u,h,3),t.push(a);for(let i=0;i<8;i++){const s=a[2*i+1],h=[this._clone(s)];h.push(this._add(s,[e[0]/4,e[1]/4])),t.push(h)}break}case"Arc90Degrees":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,1),e=[s];this._add90DegArc(e,s,_,h),t.push(e);break}case"TipWithPerpendicularAndTicks":{const[s,h]=this._arrowLastSeg(i),e=10*this._geomUnitsPerPoint,r=this._sub(_,s),c=this._norm(r);this._normalize(r);let o=this._crossProduct(r,this._sub(h,s)),u=this._dotProduct(r,this._sub(h,s));u<.05*c?u=.05*c:u>.95*c-e&&(u=.95*c-e);const a=this._leftPerp(r),n=[_[0]-r[0]*e,_[1]-r[1]*e],p=.5*Math.max(c-u-e,e);o=Math.abs(o);const d=[];d.push([n[0]+a[0]*(o+p)-r[0]*p,n[1]+a[1]*(o+p)-r[1]*p]),d.push([n[0]+a[0]*o,n[1]+a[1]*o]),d.push([n[0]-a[0]*o,n[1]-a[1]*o]),d.push([n[0]-a[0]*(o+p)-r[0]*p,n[1]-a[1]*(o+p)-r[1]*p]),t.push(d),t.push([n,_]);break}case"ConcentricCircles":{const s=this._cp2(i,1,0),e=this._cp3(i,s,2,0),c=Math.cos(Math.PI/18),o=Math.sin(Math.PI/18);let u=this._dist(s,_),a=[u,0],n=[];for(let t=0;t<=36;t++)n.push(this._add(_,a)),this._rotateDirect(a,c,o);if(t.push(n),h>=4){n=[];const s=i[3];u=this._dist(s,_),a=[u,0];for(let t=0;t<=36;t++)n.push(this._add(_,a)),0===t&&(n.push(this._add(_,a)),r(n[1],1)),this._rotateDirect(a,c,o);t.push(n)}n=[],u=this._dist(e,_),a=[u,0];for(let t=0;t<=36;t++)n.push(this._add(_,a)),this._rotateDirect(a,c,o);t.push(n);break}case"DoubleJogArrow":{_=this._arrowPath(i)[0];const[s,h]=this._arrowLastSeg(i),e=this._sub(_,s),r=this._norm(e);this._normalize(e);const c=Math.abs(this._crossProduct(e,this._sub(h,_)));let o=Math.abs(this._dotProduct(e,this._sub(h,_)));o<.05*r?o=.05*r:o>.95*r&&(o=.95*r);const u=Math.max(c,o),a=this._leftPerp(e);let n=[];const p=[_[0]-e[0]*o*.5+a[0]*c*.5,_[1]-e[1]*o*.5+a[1]*c*.5];n.push([p[0],p[1]]),p[0]+=e[0]*u*.5+a[0]*u*.4,p[1]+=e[1]*u*.5+a[1]*u*.4,n.push([p[0],p[1]]),p[0]-=a[0]*u*.25,p[1]-=a[1]*u*.25,n.push([p[0],p[1]]),p[0]+=e[0]*u*.5+a[0]*u*.4,p[1]+=e[1]*u*.5+a[1]*u*.4,n.push([p[0],p[1]]),t.push(n),n=[],p[0]=_[0]-e[0]*o*.5-a[0]*c*.5,p[1]=_[1]-e[1]*o*.5-a[1]*c*.5,n.push([p[0],p[1]]),p[0]+=e[0]*u*.5-a[0]*u*.4,p[1]+=e[1]*u*.5-a[1]*u*.4,n.push([p[0],p[1]]),p[0]+=a[0]*u*.25,p[1]+=a[1]*u*.25,n.push([p[0],p[1]]),p[0]+=e[0]*u*.5-a[0]*u*.4,p[1]+=e[1]*u*.5-a[1]*u*.4,n.push([p[0],p[1]]),t.push(n);break}case"LinkedChevrons":{const s=this._cp2(i,-5,0),h=this._cp3(i,s,-.2,1),e=this._sub(_,s);this._normalize(e);const r=this._leftPerp(e),c=Math.abs(this._crossProduct(e,this._sub(h,s)));t.push([s,_]);const o=[];o.push([_[0]-e[0]*c+r[0]*c,_[1]-e[1]*c+r[1]*c]),o.push(_),o.push([_[0]-e[0]*c-r[0]*c,_[1]-e[1]*c-r[1]*c]),t.push(o),this._addDash(t,s,[-e[0]*c+r[0]*c,-e[1]*c+r[1]*c]),this._addDash(t,s,[-e[0]*c-r[0]*c,-e[1]*c-r[1]*c]);break}case"SegmentThenHalfCircle":{const s=this._cp2(i,2,0),e=this._cp3(i,s,1.5,0);let r;r=h>=4?i[3]:this._cp3(i,s,1.25,-.5);const c=this._sub(s,_);this._normalize(c);const o=.5*this._dist(s,e),u=this._crossProduct(c,this._sub(r,_))>0,a=Math.cos(Math.PI/18);let n=Math.sin(Math.PI/18);u&&(n=-n);const p=[_,s];c[0]*=o,c[1]*=o;const d=this._add(s,c);c[0]=-c[0],c[1]=-c[1];for(let t=1;t<=18;t++)this._rotateDirect(c,a,n),p.push(this._add(d,c));t.push(p);break}case"LineWithStraightTicks":{const s=this._cp2(i,-2,1),h=this._cp3(i,s,-1,-.5),e=this._sub(h,s);this._normalize(e);const r=this._dotProduct(e,this._sub(s,_)),c=this._dotProduct(e,this._sub(h,_));let o=[_];o.push([_[0]+e[0]*r,_[1]+e[1]*r]),o.push(s),t.push(o),o=[_],o.push([_[0]+e[0]*c,_[1]+e[1]*c]),o.push(h),t.push(o);break}case"DoubleCurve":{const s=this._cp2(i,-5,-1),h=this._cp3(i,s,2,0),e=Math.atan2(1,5),c=Math.cos(e),o=Math.sin(e),u=this._sub(s,_),a=this._dist(_,s);this._normalize(u),this._rotateDirect(u,c,-o);const n=[_];n.push([_[0]+u[0]*a*.5,_[1]+u[1]*a*.5]),r(n[1],1),n.push([_[0]+u[0]*a*.8,_[1]+u[1]*a*.8]),this._addBezier2(n,n[2],[_[0]+u[0]*a,_[1]+u[1]*a],s,3);const p=this._sub(h,s),d=this._dist(s,h);this._normalize(p),this._rotateDirect(p,c,-o),this._addBezier2(n,s,[h[0]-p[0]*d,h[1]-p[1]*d],[h[0]-p[0]*d*.8,h[1]-p[1]*d*.8],3),n.push(h),t.push(n);break}case"ParallelWithTicksByWidth":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,3),e=this._sub(s,_);this._normalize(e);const r=this._crossProduct(e,this._sub(h,_));this._leftPerpendicular(e),r>0?(this._addAngledTicks(t,_,[_[0]+e[0]*r,_[1]+e[1]*r],s),this._addAngledTicks(t,s,[s[0]+e[0]*r,s[1]+e[1]*r],_)):(this._addAngledTicks(t,[_[0]+e[0]*r,_[1]+e[1]*r],_,s),this._addAngledTicks(t,[s[0]+e[0]*r,s[1]+e[1]*r],_,s));break}case"EnclosingRoundedRectangle":{const s=this._cp2(i,3,-2),t=[Math.min(_[0],s[0]),Math.max(_[1],s[1])],h=[Math.max(_[0],s[0]),Math.min(_[1],s[1])],e=h[0]-t[0],r=t[1]-h[1],c=Math.min(e,r)/10,o=[];o.push([t[0]+c+.75*(e-2*c),t[1]]),o.push([h[0]-c,t[1]]),this._add90DegArc(o,[h[0]-c,t[1]],[h[0],t[1]-c],[h[0],t[1]]),o.push([h[0],h[1]+c]),this._add90DegArc(o,[h[0],h[1]+c],[h[0]-c,h[1]],h),o.push([t[0]+c,h[1]]),this._add90DegArc(o,[t[0]+c,h[1]],[t[0],h[1]+c],[t[0],h[1]]),o.push([t[0],t[1]-c]),this._add90DegArc(o,[t[0],t[1]-c],[t[0]+c,t[1]],t),o.push([t[0]+c+.75*(e-2*c),t[1]]);break}case"ParallelOffsetByValue":{if(i.length<2||0===this._width)break;const s=this._offsetPath(i,.5*this._width);s&&t.push(s);const h=this._offsetPath(i,.5*-this._width);h&&t.push(h);break}default:t.push(i)}}return t}}function u(s){return"ParallelOffsetByValue"===s}export{c as EffectControlMeasureLine};
@@ -21,8 +21,6 @@ export interface Symbol3DEmissiveProperties extends Partial<Pick<Symbol3DEmissiv
21
21
  * >
22
22
  * > **Known Limitations**
23
23
  * >
24
- * > [Symbol3DEmissive](https://developers.arcgis.com/javascript/latest/references/core/symbols/support/Symbol3DEmissive/) and [Glow](https://developers.arcgis.com/javascript/latest/references/core/webscene/Glow/) require support for the WebGL2 extension
25
- * > `EXT_float_blend`, not available on iOS.
26
24
  * > [Symbol3DEmissive](https://developers.arcgis.com/javascript/latest/references/core/symbols/support/Symbol3DEmissive/) is supported on [ObjectSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/ObjectSymbol3DLayer/),
27
25
  * > [ExtrudeSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/ExtrudeSymbol3DLayer/), [PathSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/PathSymbol3DLayer/), or [FillSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/FillSymbol3DLayer/) on
28
26
  * > [MeshSymbol3D](https://developers.arcgis.com/javascript/latest/references/core/symbols/MeshSymbol3D/).
@@ -88,6 +86,14 @@ export class Symbol3DEmissive extends Symbol3DEmissiveSuperclass {
88
86
  * is emitted and 1 represents the full emission color. Values greater than 1 increase the amount of emitted light and
89
87
  * may lead to overexposure, causing colors to shift toward white.
90
88
  *
89
+ * > [!WARNING]
90
+ * >
91
+ * > **Known Limitations**
92
+ * > The displayed emissive strength is clamped to `16`. Values above this maximum do not increase the amount of light emitted.
93
+ * > If the source model defines emissive strength greater than 1 by using the glTF
94
+ * > `KHR_materials_emissive_strength` extension, the API `strength` value is multiplied with that source contribution and can reach
95
+ * > the maximum value sooner.
96
+ *
91
97
  * Increasing [strength](https://developers.arcgis.com/javascript/latest/references/core/symbols/support/Symbol3DEmissive/#strength) makes emissive elements appear more prominent and can
92
98
  * amplify their visual impact when the optional [Glow](https://developers.arcgis.com/javascript/latest/references/core/webscene/Glow/) effect is enabled.
93
99
  *
@@ -11,7 +11,7 @@ import type { SymbolUnion } from "../types.js";
11
11
  * Creates a new instance of an appropriate [Symbol](https://developers.arcgis.com/javascript/latest/references/core/symbols/Symbol/) class and initializes it with values from a JSON object
12
12
  * generated from an ArcGIS product. The object passed into the input `json`
13
13
  * parameter often comes from a response to a query operation in the REST API or a
14
- * [toJSON()](https://pro.arcgis.com/en/pro-app/latest/tool-reference/conversion/features-to-json.htm)
14
+ * [toJSON()](https://doc.esri.com/en/arcgis-pro/latest/tool-reference/conversion/features-to-json.html?tabs=dialog)
15
15
  * method from another ArcGIS product. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/using-fromjson)
16
16
  * topic in the Guide for details and examples of when and how to use this function.
17
17
  *
@@ -15,10 +15,10 @@ export interface TimeExtentProperties {
15
15
  * [query](https://developers.arcgis.com/javascript/latest/references/core/views/layers/FeatureLayerView/#queryFeatures) features that fall within the specified time period.
16
16
  * To represent an instant of time, set the [start](https://developers.arcgis.com/javascript/latest/references/core/time/TimeExtent/#start) and [end](https://developers.arcgis.com/javascript/latest/references/core/time/TimeExtent/#end) times to the same date.
17
17
  *
18
- * When creating a [JavaScript Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date),
18
+ * When creating a [JavaScript Date](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date),
19
19
  * be mindful that most constructors will create a date with respect to your local timezone rather than
20
20
  * [UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) (i.e. universal time). To create a date with
21
- * respect to UTC, use the [UTC method](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC)
21
+ * respect to UTC, use the [UTC method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC)
22
22
  * on the Date object.
23
23
  *
24
24
  * @since 4.31
@@ -84,8 +84,8 @@ export default class VersionManagementService extends VersionManagementServiceSu
84
84
  * >
85
85
  * > **License**
86
86
  * >
87
- * > This method requires the feature service and version management service to be published with [ArcGIS Enterprise](https://enterprise.arcgis.com/en/get-started/latest/windows/what-is-arcgis-enterprise-.htm) version 11.2 or higher.
88
- * > Organization members must be assigned a license for the [ArcGIS Advanced Editing user type extension](https://enterprise.arcgis.com/en/portal/latest/administer/windows/license-user-type-extensions.htm#ESRI_SECTION1_B75DA80066744473AD5DD1312734654A) to use this method.
87
+ * > This method requires the feature service and version management service to be published with [ArcGIS Enterprise](https://doc.esri.com/en/arcgis-enterprise/latest/introduction/what-is-arcgis-enterprise-.html) version 11.2 or higher.
88
+ * > Organization members must be assigned a license for the [ArcGIS Advanced Editing user type extension](https://doc.esri.com/en/arcgis-enterprise/latest/plan/license-user-type-extensions.html#ESRI_SECTION1_B75DA80066744473AD5DD1312734654A) to use this method.
89
89
  *
90
90
  * @param versionIdentifier - Identifier for a version.
91
91
  * @param props - Contains properties that will be altered.
@@ -218,8 +218,8 @@ export default class VersionManagementService extends VersionManagementServiceSu
218
218
  * >
219
219
  * > **License**
220
220
  * >
221
- * > This method requires the feature service and version management service to be published with [ArcGIS Enterprise](https://enterprise.arcgis.com/en/get-started/latest/windows/what-is-arcgis-enterprise-.htm) version 11.2 or higher.
222
- * > Organization members must be assigned a license for the [ArcGIS Advanced Editing user type extension](https://enterprise.arcgis.com/en/portal/latest/administer/windows/license-user-type-extensions.htm#ESRI_SECTION1_B75DA80066744473AD5DD1312734654A) to use this method.
221
+ * > This method requires the feature service and version management service to be published with [ArcGIS Enterprise](https://doc.esri.com/en/arcgis-enterprise/latest/introduction/what-is-arcgis-enterprise-.html) version 11.2 or higher.
222
+ * > Organization members must be assigned a license for the [ArcGIS Advanced Editing user type extension](https://doc.esri.com/en/arcgis-enterprise/latest/plan/license-user-type-extensions.html#ESRI_SECTION1_B75DA80066744473AD5DD1312734654A) to use this method.
223
223
  *
224
224
  * @param versionIdentifier - Identifier for a version.
225
225
  * @returns Specifies if the selected version was deleted.
@@ -304,8 +304,8 @@ export default class VersionManagementService extends VersionManagementServiceSu
304
304
  * >
305
305
  * > **License**
306
306
  * >
307
- * > This method requires the feature service and version management service to be published with [ArcGIS Enterprise](https://enterprise.arcgis.com/en/get-started/latest/windows/what-is-arcgis-enterprise-.htm) version 11.2 or higher.
308
- * > Organization members must be assigned a license for the [ArcGIS Advanced Editing user type extension](https://enterprise.arcgis.com/en/portal/latest/administer/windows/license-user-type-extensions.htm#ESRI_SECTION1_B75DA80066744473AD5DD1312734654A) to use this method.
307
+ * > This method requires the feature service and version management service to be published with [ArcGIS Enterprise](https://doc.esri.com/en/arcgis-enterprise/latest/introduction/what-is-arcgis-enterprise-.html) version 11.2 or higher.
308
+ * > Organization members must be assigned a license for the [ArcGIS Advanced Editing user type extension](https://doc.esri.com/en/arcgis-enterprise/latest/plan/license-user-type-extensions.html#ESRI_SECTION1_B75DA80066744473AD5DD1312734654A) to use this method.
309
309
  *
310
310
  * @param versionIdentifier - Identifier for a version.
311
311
  * @returns Returns the result of the post.
@@ -330,8 +330,8 @@ export default class VersionManagementService extends VersionManagementServiceSu
330
330
  * >
331
331
  * > **License**
332
332
  * >
333
- * > This method requires the feature service and version management service to be published with [ArcGIS Enterprise](https://enterprise.arcgis.com/en/get-started/latest/windows/what-is-arcgis-enterprise-.htm) version 11.2 or higher.
334
- * > Organization members must be assigned a license for the [ArcGIS Advanced Editing user type extension](https://enterprise.arcgis.com/en/portal/latest/administer/windows/license-user-type-extensions.htm#ESRI_SECTION1_B75DA80066744473AD5DD1312734654A) to use this method.
333
+ * > This method requires the feature service and version management service to be published with [ArcGIS Enterprise](https://doc.esri.com/en/arcgis-enterprise/latest/introduction/what-is-arcgis-enterprise-.html) version 11.2 or higher.
334
+ * > Organization members must be assigned a license for the [ArcGIS Advanced Editing user type extension](https://doc.esri.com/en/arcgis-enterprise/latest/plan/license-user-type-extensions.html#ESRI_SECTION1_B75DA80066744473AD5DD1312734654A) to use this method.
335
335
  *
336
336
  * > **Changes to Reconcile**
337
337
  * >
@@ -99,7 +99,7 @@ export type VersionManagerExecutionError = "no-feature-service-found" | "no-vali
99
99
  export type VersionManagerLoadError = "no-feature-services" | "no-layers-property" | undefined;
100
100
 
101
101
  /** @since 5.0 */
102
- export type VersionManagerState = "loading" | "ready" | "executing" | "success" | "failed" | "disabled";
102
+ export type VersionManagerState = "loading" | "ready" | "executing" | "failed" | "disabled";
103
103
 
104
104
  /**
105
105
  * This class allows you to manage versions from a variety of [feature services](https://developers.arcgis.com/javascript/latest/references/core/rest/featureService/FeatureService/).
@@ -126,6 +126,8 @@ export type VersionManagerState = "loading" | "ready" | "executing" | "success"
126
126
  * webMap.layers.add(featureLayer);
127
127
  *
128
128
  * const versionManager = new VersionManager({ view });
129
+ *
130
+ * // Wait for the version manager instance to be ready before performing operations.
129
131
  * await whenOnce(() => versionManager.state === "ready");
130
132
  */
131
133
  export default class VersionManager extends Accessor {
@@ -164,6 +166,14 @@ export default class VersionManager extends Accessor {
164
166
  /**
165
167
  * The current state of this object.
166
168
  *
169
+ * | Value | Description |
170
+ * | ----- |------------ |
171
+ * | disabled | An error occured during initialization. |
172
+ * | executing | An operation is being performed. |
173
+ * | failed | An error occurred during execution. |
174
+ * | loading | The object is loading. |
175
+ * | ready | Object loaded successfully or operation completed successfully. All items in [versioningStates](https://developers.arcgis.com/javascript/latest/references/core/versionManagement/VersionManager/#versioningStates) are loaded. |
176
+ *
167
177
  * @since 5.0
168
178
  */
169
179
  get state(): VersionManagerState;
@@ -200,7 +210,7 @@ export default class VersionManager extends Accessor {
200
210
  * >
201
211
  * > **License**
202
212
  * >
203
- * > This method requires the feature service and version management service to be published with [ArcGIS Enterprise](https://enterprise.arcgis.com/en/get-started/latest/windows/what-is-arcgis-enterprise-.htm) version 11.2 or higher.
213
+ * > This method requires the feature service and version management service to be published with [ArcGIS Enterprise](https://doc.esri.com/en/arcgis-enterprise/latest/introduction/what-is-arcgis-enterprise-.html) version 11.2 or higher.
204
214
  *
205
215
  * @param parameters - Parameters used to alter a version.
206
216
  * @returns When resolved, returns `true` if the alter operation completes successfully.
@@ -254,7 +264,7 @@ export default class VersionManager extends Accessor {
254
264
  * >
255
265
  * > **License**
256
266
  * >
257
- * > This method requires the feature service and version management service to be published with [ArcGIS Enterprise](https://enterprise.arcgis.com/en/get-started/latest/windows/what-is-arcgis-enterprise-.htm) version 11.2 or higher.
267
+ * > This method requires the feature service and version management service to be published with [ArcGIS Enterprise](https://doc.esri.com/en/arcgis-enterprise/latest/introduction/what-is-arcgis-enterprise-.html) version 11.2 or higher.
258
268
  *
259
269
  * @param featureServerUrl - The url of a feature service.
260
270
  * @param versionName - The name of the version that is to be deleted.
@@ -76,8 +76,8 @@ export default class VersioningState extends VersioningStateSuperclass {
76
76
  * >
77
77
  * > **License**
78
78
  * >
79
- * > This method requires the feature service and version management service to be published with [ArcGIS Enterprise](https://enterprise.arcgis.com/en/get-started/latest/windows/what-is-arcgis-enterprise-.htm) version 11.2 or higher.
80
- * > Organization members must be assigned a license for the [ArcGIS Advanced Editing user type extension](https://enterprise.arcgis.com/en/portal/latest/administer/windows/license-user-type-extensions.htm#ESRI_SECTION1_B75DA80066744473AD5DD1312734654A) to use this method.
79
+ * > This method requires the feature service and version management service to be published with [ArcGIS Enterprise](https://doc.esri.com/en/arcgis-enterprise/latest/introduction/what-is-arcgis-enterprise-.html) version 11.2 or higher.
80
+ * > Organization members must be assigned a license for the [ArcGIS Advanced Editing user type extension](https://doc.esri.com/en/arcgis-enterprise/latest/plan/license-user-type-extensions.html#ESRI_SECTION1_B75DA80066744473AD5DD1312734654A) to use this method.
81
81
  *
82
82
  * @param versionIdentifier - Identifier for a version.
83
83
  * @param props - Contains properties that will be altered.
@@ -115,8 +115,8 @@ export default class VersioningState extends VersioningStateSuperclass {
115
115
  * >
116
116
  * > **License**
117
117
  * >
118
- * > This method requires the feature service and version management service to be published with [ArcGIS Enterprise](https://enterprise.arcgis.com/en/get-started/latest/windows/what-is-arcgis-enterprise-.htm) version 11.2 or higher.
119
- * > Organization members must be assigned a license for the [ArcGIS Advanced Editing user type extension](https://enterprise.arcgis.com/en/portal/latest/administer/windows/license-user-type-extensions.htm#ESRI_SECTION1_B75DA80066744473AD5DD1312734654A) to use this method.
118
+ * > This method requires the feature service and version management service to be published with [ArcGIS Enterprise](https://doc.esri.com/en/arcgis-enterprise/latest/introduction/what-is-arcgis-enterprise-.html) version 11.2 or higher.
119
+ * > Organization members must be assigned a license for the [ArcGIS Advanced Editing user type extension](https://doc.esri.com/en/arcgis-enterprise/latest/plan/license-user-type-extensions.html#ESRI_SECTION1_B75DA80066744473AD5DD1312734654A) to use this method.
120
120
  *
121
121
  * @param versionIdentifier - Identifier for a version.
122
122
  * @returns Specifies if the selected version was deleted.
@@ -28,6 +28,7 @@ export interface MapViewConstraintsProperties extends Partial<Pick<MapViewConstr
28
28
  * @see [View2D.constraints](https://developers.arcgis.com/javascript/latest/references/core/views/View2D/#constraints)
29
29
  * @since 5.0
30
30
  * @example
31
+ * ```js
31
32
  * view.constraints = {
32
33
  * geometry: { // Constrain lateral movement to Lower Manhattan
33
34
  * type: "extent",
@@ -39,35 +40,38 @@ export interface MapViewConstraintsProperties extends Partial<Pick<MapViewConstr
39
40
  * minScale: 500000, // User cannot zoom out beyond a scale of 1:500,000
40
41
  * maxScale: 0, // User can overzoom tiles
41
42
  * rotationEnabled: false // Disables map rotation
43
+ * ```
42
44
  * @example
45
+ * ```js
43
46
  * // This snippet shows how to set the MapView scale 1:1 while generating additional LODs for the MapView.constraints.
44
- * const spatialReference = new SpatialReference({
45
- * wkid: 2154
46
- * });
47
- * const center = new Point({
48
- * x: 0,
49
- * y: 0,
50
- * spatialReference
51
- * });
47
+ * const spatialReference = new SpatialReference({
48
+ * wkid: 2154
49
+ * });
50
+ * const center = new Point({
51
+ * x: 0,
52
+ * y: 0,
53
+ * spatialReference
54
+ * });
52
55
  *
53
- * // Create LODs from level 0 to 31
54
- * const tileInfo = TileInfo.create({
55
- * spatialReference,
56
- * numLODs: 32
57
- * });
58
- * const lods = tileInfo.lods;
56
+ * // Create LODs from level 0 to 31
57
+ * const tileInfo = TileInfo.create({
58
+ * spatialReference,
59
+ * numLODs: 32
60
+ * });
61
+ * const lods = tileInfo.lods;
59
62
  *
60
- * let view = new MapView({
61
- * container: "viewDiv",
62
- * map,
63
- * scale: 1,
64
- * center,
65
- * spatialReference,
66
- * constraints: {
67
- * lods: lods,
68
- * snapToZoom: false
69
- * }
70
- * });
63
+ * let view = new MapView({
64
+ * container: "viewDiv",
65
+ * map,
66
+ * scale: 1,
67
+ * center,
68
+ * spatialReference,
69
+ * constraints: {
70
+ * lods: lods,
71
+ * snapToZoom: false
72
+ * }
73
+ * });
74
+ * ````
71
75
  * @see [Zoom and LODs](https://developers.arcgis.com/javascript/latest/references/core/views/View2D/#mapview-lods)
72
76
  * @see [TileInfo.create()](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TileInfo/#create)
73
77
  */
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{timeExtentsEqual as a,getFlowFloatUniforms as s,getFlowColorUniforms as e}from"../utils.js";import{AFlowResources as i}from"./AFlowResources.js";import{Mesh as r}from"../../webgl/meshing/Mesh.js";import{FlowImageryShader as o}from"../../webgl/shaderGraph/techniques/shaders/flow/FlowImageryShader.js";import{PrimitiveType as m,DataType as n}from"../../../../webgl/enums.js";import l from"../../../../webgl/Texture.js";import{TextureDescriptor as p}from"../../../../webgl/TextureDescriptor.js";import{VertexElementDescriptor as h}from"../../../../webgl/VertexElementDescriptor.js";class c{constructor(t){this._params=t,this.supportsContinuation=!1,this.slideoutDuration=0,this.animated=!1}isCompatible(t){if(!(t instanceof c))return!1;if(!a(this._params.timeExtent,t._params.timeExtent))return!1;let s=!0;return s=s&&this._params.loadImagery===t._params.loadImagery,s=s&&this._params.color.kind===t._params.color.kind,s=s&&this._params.opacity.kind===t._params.opacity.kind,s}updateResource(t){t.updateValues(this._params.color,this._params.opacity)}async load(a,s,e){const{extent:i,size:r}=a;t(e);const o=await this._params.loadImagery(i,r[0],r[1],this._params.timeExtent,e);return new d(o,a,[],o,{color:this._params.color,opacity:this._params.opacity})}}const u=[new h("position",2,n.UNSIGNED_SHORT,0,8),new h("texcoord",2,n.UNSIGNED_SHORT,4,8)];class d extends i{static{this._shader=new o}constructor(t,a,s,e,i){super(a,s,e),this._flowData=t,this._values=i,this.kind="imagery"}attach(t){const{context:a}=t,{width:s,height:e}=this._flowData;this.mesh=new r(a,{vertex:{geometry:{data:new Uint16Array([0,0,0,1,s,0,1,1,0,e,0,0,s,e,1,0]),layout:u}},groups:[{primitive:m.TRIANGLE_STRIP}],parts:[{group:0,start:0,count:4}]});let i=1e6,o=-1e6;for(let r=0;r<e;r++)for(let t=0;t<s;t++)if(0!==this._flowData.mask[r*s+t]){const a=this._flowData.data[2*(r*s+t)],e=this._flowData.data[2*(r*s+t)+1],m=Math.sqrt(a*a+e*e);i=Math.min(i,m),o=Math.max(o,m)}const n=new Uint8Array(4*s*e);for(let r=0;r<e;r++)for(let t=0;t<s;t++)if(0!==this._flowData.mask[r*s+t]){const a=this._flowData.data[2*(r*s+t)],e=this._flowData.data[2*(r*s+t)+1],m=(Math.sqrt(a*a+e*e)-i)/(o-i);n[4*(r*s+t)]=255*m,n[4*(r*s+t)+1]=0,n[4*(r*s+t)+2]=0,n[4*(r*s+t)+3]=255}else n[4*(r*s+t)]=0,n[4*(r*s+t)+1]=0,n[4*(r*s+t)+2]=0,n[4*(r*s+t)+3]=0;const h=new p(s,e);h.internalFormat=6408,h.wrapMode=33071,h.flipped=!0;const c=new l(a,h,n);this.texture=c,this.min=i,this.max=o,this._flowData=null}detach(){this.mesh.destroy(),this.texture.dispose()}get ready(){return!0}updateValues(t,a){this._values={color:t,opacity:a}}getProgramSpec(t){return{shader:d._shader,uniforms:{state:{time:t.time,dvsMat3:t.dvsMat3,displayViewMat3:t.displayViewMat3,displayOpacity:t.displayOpacity,startTime:t.startTime,endTime:t.endTime},config:{min:this.min,max:this.max},color:e(this._values.color),opacity:s(this._values.opacity)},textures:{texture:{texture:this.texture,unit:0}},defines:{vvColor:"ramp"===this._values.color.kind,vvOpacity:"ramp"===this._values.opacity.kind},optionalAttributes:null}}}export{c as Imagery,d as ImageryResources};
2
+ import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{timeExtentsEqual as a,getFlowFloatUniforms as s,getFlowColorUniforms as e}from"../utils.js";import{AFlowResources as i}from"./AFlowResources.js";import{Mesh as r}from"../../webgl/meshing/Mesh.js";import{FlowImageryShader as o}from"../../webgl/shaderGraph/techniques/shaders/flow/FlowImageryShader.js";import{PrimitiveType as m,DataType as n}from"../../../../webgl/enums.js";import p from"../../../../webgl/Texture.js";import{TextureDescriptor as l}from"../../../../webgl/TextureDescriptor.js";import{VertexElementDescriptor as h}from"../../../../webgl/VertexElementDescriptor.js";class c{constructor(t){this._params=t,this.supportsContinuation=!1,this.slideoutDuration=0,this.animated=!1}isCompatible(t){if(!(t instanceof c))return!1;if(!a(this._params.timeExtent,t._params.timeExtent))return!1;let s=!0;return s=s&&this._params.loadImagery===t._params.loadImagery,s=s&&this._params.color.kind===t._params.color.kind,s=s&&this._params.opacity.kind===t._params.opacity.kind,s}updateResource(t){t.update(this._params.color,this._params.opacity)}async load(a,s,e){const{extent:i,size:r}=a;t(e);const o=await this._params.loadImagery(i,r[0],r[1],this._params.timeExtent,e);return new u(o,a,[],o,{color:this._params.color,opacity:this._params.opacity})}}const d=[new h("position",2,n.UNSIGNED_SHORT,0,8),new h("texcoord",2,n.UNSIGNED_SHORT,4,8)];class u extends i{static{this._shader=new o}constructor(t,a,s,e,i){super(a,s,e),this._flowData=t,this._values=i,this.kind="imagery"}attach(t){const{context:a}=t,{width:s,height:e}=this._flowData;this.mesh=new r(a,{vertex:{geometry:{data:new Uint16Array([0,0,0,1,s,0,1,1,0,e,0,0,s,e,1,0]),layout:d}},groups:[{primitive:m.TRIANGLE_STRIP}],parts:[{group:0,start:0,count:4}]});let i=1e6,o=-1e6;for(let r=0;r<e;r++)for(let t=0;t<s;t++)if(0!==this._flowData.mask[r*s+t]){const a=this._flowData.data[2*(r*s+t)],e=this._flowData.data[2*(r*s+t)+1],m=Math.sqrt(a*a+e*e);i=Math.min(i,m),o=Math.max(o,m)}const n=new Uint8Array(4*s*e);for(let r=0;r<e;r++)for(let t=0;t<s;t++)if(0!==this._flowData.mask[r*s+t]){const a=this._flowData.data[2*(r*s+t)],e=this._flowData.data[2*(r*s+t)+1],m=(Math.sqrt(a*a+e*e)-i)/(o-i);n[4*(r*s+t)]=255*m,n[4*(r*s+t)+1]=0,n[4*(r*s+t)+2]=0,n[4*(r*s+t)+3]=255}else n[4*(r*s+t)]=0,n[4*(r*s+t)+1]=0,n[4*(r*s+t)+2]=0,n[4*(r*s+t)+3]=0;const h=new l(s,e);h.internalFormat=6408,h.wrapMode=33071,h.flipped=!0;const c=new p(a,h,n);this.texture=c,this.min=i,this.max=o,this._flowData=null}detach(){this.mesh.destroy(),this.texture.dispose()}get ready(){return!0}update(t,a){this._values={color:t,opacity:a}}getProgramSpec(t){return{shader:u._shader,uniforms:{state:{time:t.time,dvsMat3:t.dvsMat3,displayViewMat3:t.displayViewMat3,displayOpacity:t.displayOpacity,startTime:t.startTime,endTime:t.endTime},config:{min:this.min,max:this.max},color:e(this._values.color),opacity:s(this._values.opacity)},textures:{texture:{texture:this.texture,unit:0}},defines:{vvColor:"ramp"===this._values.color.kind,vvOpacity:"ramp"===this._values.opacity.kind},optionalAttributes:null}}}export{c as Imagery,u as ImageryResources};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{deserializeFlowPaths as a}from"../flowPathsIO.js";import{areStreamlinesCompatible as s,getFlowFloatUniforms as e,getFlowColorUniforms as i}from"../utils.js";import{AFlowResources as r}from"./AFlowResources.js";import{Mesh as o}from"../../webgl/meshing/Mesh.js";import{FlowParticlesShader as p}from"../../webgl/shaderGraph/techniques/shaders/flow/FlowParticlesShader.js";import{getPositions as n}from"../../../../support/flow/utils.js";import{PrimitiveType as m,DataType as h}from"../../../../webgl/enums.js";import{VertexElementDescriptor as l}from"../../../../webgl/VertexElementDescriptor.js";class d{constructor(t){this._params=t,this.supportsContinuation=!1,this.slideoutDuration=0}get animated(){return this._params.flowSpeed>0}isCompatible(t){return t instanceof d&&s(this._params,t._params)}updateResource(t){t.updateParams(this._params.flowSpeed,this._params.trailLength)}async load(s,e,i){const{extent:r,size:o}=s;t(i);const p=await this._params.loadImagery(r,o[0],o[1],this._params.timeExtent,i),m={...p,data:p.data.slice(),mask:p.mask?.slice()},h=e&&this._params.simulationSettings.continuous?n(e.flowPaths,e.query,s,this._params.flowSpeed):[],{vertexData:l,indexData:d,pathData:c}=await this._params.createFlowMesh("Particles",this._params.simulationSettings,p,{positions:h},i),_=a(c);return new u(l,d,s,_,m,{color:this._params.color,opacity:this._params.opacity,size:this._params.size},this._params)}}const c=[new l("xyts0",4,h.FLOAT,0,64),new l("xyts1",4,h.FLOAT,16,64),new l("typeIdFirstTimeLastTime",4,h.FLOAT,32,64),new l("extrudeInfo",4,h.FLOAT,48,64)];class u extends r{static{this._shader=new p}constructor(t,a,s,e,i,r,o){super(s,e,i),this._vertexData=t,this._indexData=a,this._values=r,this._params=o,this.kind="particles"}attach(t){const{context:a}=t;this.mesh=new o(a,{vertex:{geometry:{data:this._vertexData,layout:c}},index:{indices:{data:this._indexData}},groups:[{index:"indices",primitive:m.TRIANGLES}],parts:[{group:0,start:0,count:this._indexData.length}]}),this._vertexData=null,this._indexData=null}detach(){this.mesh.destroy()}get ready(){return!0}updateParams(t,a){this._params.flowSpeed=t,this._params.trailLength=a}getProgramSpec(t){return{shader:u._shader,uniforms:{state:{time:t.time,dvsMat3:t.dvsMat3,displayViewMat3:t.displayViewMat3,displayOpacity:t.displayOpacity,startTime:t.startTime,endTime:t.endTime},config:{trailLength:this._params.trailLength,flowSpeed:this._params.flowSpeed,featheringSize:this._params.featheringSize,featheringOffset:this._params.featheringOffset,introFade:this._params.introFade?1:0,fadeToZero:this._params.fadeToZero?1:0,decayRate:this._params.decayRate},color:i(this._values.color),opacity:e(this._values.opacity),size:e(this._values.size)},textures:{},defines:{vvColor:"ramp"===this._values.color.kind,vvOpacity:"ramp"===this._values.opacity.kind,vvSize:"ramp"===this._values.size.kind},optionalAttributes:null}}}export{d as Particles,u as ParticlesResources};
2
+ import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{deserializeFlowPaths as s}from"../flowPathsIO.js";import{areStreamlinesCompatible as a,getFlowFloatUniforms as e,getFlowColorUniforms as i}from"../utils.js";import{AFlowResources as r}from"./AFlowResources.js";import{Mesh as o}from"../../webgl/meshing/Mesh.js";import{FlowParticlesShader as p}from"../../webgl/shaderGraph/techniques/shaders/flow/FlowParticlesShader.js";import{getPositions as n}from"../../../../support/flow/utils.js";import{PrimitiveType as m,DataType as h}from"../../../../webgl/enums.js";import{VertexElementDescriptor as l}from"../../../../webgl/VertexElementDescriptor.js";class d{constructor(t){this._params=t,this.supportsContinuation=!1,this.slideoutDuration=0}get animated(){return this._params.flowSpeed>0}isCompatible(t){return t instanceof d&&a(this._params,t._params)}updateResource(t){t.update(this._params)}async load(a,e,i){const{extent:r,size:o}=a;t(i);const p=await this._params.loadImagery(r,o[0],o[1],this._params.timeExtent,i),m={...p,data:p.data.slice(),mask:p.mask?.slice()},h=e&&this._params.simulationSettings.continuous?n(e.flowPaths,e.query,a,this._params.flowSpeed):[],{vertexData:l,indexData:d,pathData:c}=await this._params.createFlowMesh("Particles",this._params.simulationSettings,p,{positions:h},i),_=s(c);return new u(l,d,a,_,m,this._params)}}const c=[new l("xyts0",4,h.FLOAT,0,64),new l("xyts1",4,h.FLOAT,16,64),new l("typeIdFirstTimeLastTime",4,h.FLOAT,32,64),new l("extrudeInfo",4,h.FLOAT,48,64)];class u extends r{static{this._shader=new p}constructor(t,s,a,e,i,r){super(a,e,i),this._vertexData=t,this._indexData=s,this._params=r,this.kind="particles",this.update(r)}attach(t){const{context:s}=t;this.mesh=new o(s,{vertex:{geometry:{data:this._vertexData,layout:c}},index:{indices:{data:this._indexData}},groups:[{index:"indices",primitive:m.TRIANGLES}],parts:[{group:0,start:0,count:this._indexData.length}]}),this._vertexData=null,this._indexData=null}detach(){this.mesh.destroy()}get ready(){return!0}update(t){this._params=t,this._values={color:this._params.color,opacity:this._params.opacity,size:this._params.size}}getProgramSpec(t){return{shader:u._shader,uniforms:{state:{time:t.time,dvsMat3:t.dvsMat3,displayViewMat3:t.displayViewMat3,displayOpacity:t.displayOpacity,startTime:t.startTime,endTime:t.endTime},config:{trailLength:this._params.trailLength,flowSpeed:this._params.flowSpeed,featheringSize:this._params.featheringSize,featheringOffset:this._params.featheringOffset,introFade:this._params.introFade?1:0,fadeToZero:this._params.fadeToZero?1:0,decayRate:this._params.decayRate},color:i(this._values.color),opacity:e(this._values.opacity),size:e(this._values.size)},textures:{},defines:{vvColor:"ramp"===this._values.color.kind,vvOpacity:"ramp"===this._values.opacity.kind,vvSize:"ramp"===this._values.size.kind},optionalAttributes:null}}}export{d as Particles,u as ParticlesResources};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{deserializeFlowPaths as e}from"../flowPathsIO.js";import{areStreamlinesCompatible as s,getFlowFloatUniforms as a,getFlowColorUniforms as i}from"../utils.js";import{AFlowResources as r}from"./AFlowResources.js";import{Mesh as o}from"../../webgl/meshing/Mesh.js";import{FlowStreamlinesShader as n}from"../../webgl/shaderGraph/techniques/shaders/flow/FlowStreamlinesShader.js";import{getPositions as m}from"../../../../support/flow/utils.js";import{PrimitiveType as p,DataType as h}from"../../../../webgl/enums.js";import{VertexElementDescriptor as l}from"../../../../webgl/VertexElementDescriptor.js";class d{constructor(t){this._params=t,this.supportsContinuation=!1,this.slideoutDuration=20}get animated(){return this._params.flowSpeed>0}isCompatible(t){return t instanceof d&&s(this._params,t._params)}updateResource(t){t.updateParams(this._params.flowSpeed,this._params.trailLength)}async load(s,a,i){const{extent:r,size:o}=s;t(i);const n=await this._params.loadImagery(r,o[0],o[1],this._params.timeExtent,i),p={...n,data:n.data.slice(),mask:n.mask?.slice()},h=a&&this._params.simulationSettings.continuous?m(a.flowPaths,a.query,s,this._params.flowSpeed):[],{vertexData:l,indexData:d,pathData:u}=await this._params.createFlowMesh("Streamlines",this._params.simulationSettings,n,{positions:h},i),_=e(u);return new c(l,d,s,_,p,{color:this._params.color,opacity:this._params.opacity,size:this._params.size},this._params)}}const u=[new l("positionAndSide",3,h.FLOAT,0,36),new l("timeInfo",3,h.FLOAT,12,36),new l("extrude",2,h.FLOAT,24,36),new l("speed",1,h.FLOAT,32,36)];class c extends r{static{this._shader=new n}constructor(t,e,s,a,i,r,o){super(s,a,i),this._vertexData=t,this._indexData=e,this._values=r,this._params=o,this.kind="streamlines"}attach(t){const{context:e}=t;this.mesh=new o(e,{vertex:{geometry:{data:this._vertexData,layout:u}},index:{indices:{data:this._indexData}},groups:[{index:"indices",primitive:p.TRIANGLES}],parts:[{group:0,start:0,count:this._indexData.length}]}),this._vertexData=null,this._indexData=null}detach(){this.mesh.destroy()}get ready(){return!0}updateParams(t,e){this._params.flowSpeed=t,this._params.trailLength=e}getProgramSpec(t){return{shader:c._shader,uniforms:{state:{time:t.time-this.query.time,dvsMat3:t.dvsMat3,displayViewMat3:t.displayViewMat3,displayOpacity:t.displayOpacity,startTime:t.startTime-this.query.time,endTime:t.endTime-this.query.time},config:{trailLength:this._params.trailLength,flowSpeed:this._params.flowSpeed,featheringSize:this._params.featheringSize,featheringOffset:this._params.featheringOffset,introFade:this._params.introFade?1:0,fadeToZero:this._params.fadeToZero?1:0,decayRate:this._params.decayRate},color:i(this._values.color),opacity:a(this._values.opacity),size:a(this._values.size)},textures:{},defines:{vvColor:"ramp"===this._values.color.kind,vvOpacity:"ramp"===this._values.opacity.kind,vvSize:"ramp"===this._values.size.kind},optionalAttributes:null}}}export{d as default};
2
+ import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{deserializeFlowPaths as e}from"../flowPathsIO.js";import{areStreamlinesCompatible as s,getFlowFloatUniforms as a,getFlowColorUniforms as i}from"../utils.js";import{AFlowResources as r}from"./AFlowResources.js";import{Mesh as o}from"../../webgl/meshing/Mesh.js";import{FlowStreamlinesShader as n}from"../../webgl/shaderGraph/techniques/shaders/flow/FlowStreamlinesShader.js";import{getPositions as m}from"../../../../support/flow/utils.js";import{PrimitiveType as p,DataType as h}from"../../../../webgl/enums.js";import{VertexElementDescriptor as l}from"../../../../webgl/VertexElementDescriptor.js";class d{constructor(t){this._params=t,this.supportsContinuation=!1,this.slideoutDuration=20}get animated(){return this._params.flowSpeed>0}isCompatible(t){return t instanceof d&&s(this._params,t._params)}updateResource(t){t.update(this._params)}async load(s,a,i){const{extent:r,size:o}=s;t(i);const n=await this._params.loadImagery(r,o[0],o[1],this._params.timeExtent,i),p={...n,data:n.data.slice(),mask:n.mask?.slice()},h=a&&this._params.simulationSettings.continuous?m(a.flowPaths,a.query,s,this._params.flowSpeed):[],{vertexData:l,indexData:d,pathData:u}=await this._params.createFlowMesh("Streamlines",this._params.simulationSettings,n,{positions:h},i),_=e(u);return new c(l,d,s,_,p,this._params)}}const u=[new l("positionAndSide",3,h.FLOAT,0,36),new l("timeInfo",3,h.FLOAT,12,36),new l("extrude",2,h.FLOAT,24,36),new l("speed",1,h.FLOAT,32,36)];class c extends r{static{this._shader=new n}constructor(t,e,s,a,i,r){super(s,a,i),this._vertexData=t,this._indexData=e,this._params=r,this.kind="streamlines",this.update(r)}attach(t){const{context:e}=t;this.mesh=new o(e,{vertex:{geometry:{data:this._vertexData,layout:u}},index:{indices:{data:this._indexData}},groups:[{index:"indices",primitive:p.TRIANGLES}],parts:[{group:0,start:0,count:this._indexData.length}]}),this._vertexData=null,this._indexData=null}detach(){this.mesh.destroy()}get ready(){return!0}update(t){this._params=t,this._values={color:this._params.color,opacity:this._params.opacity,size:this._params.size}}getProgramSpec(t){return{shader:c._shader,uniforms:{state:{time:t.time-this.query.time,dvsMat3:t.dvsMat3,displayViewMat3:t.displayViewMat3,displayOpacity:t.displayOpacity,startTime:t.startTime-this.query.time,endTime:t.endTime-this.query.time},config:{trailLength:this._params.trailLength,flowSpeed:this._params.flowSpeed,featheringSize:this._params.featheringSize,featheringOffset:this._params.featheringOffset,introFade:this._params.introFade?1:0,fadeToZero:this._params.fadeToZero?1:0,decayRate:this._params.decayRate},color:i(this._values.color),opacity:a(this._values.opacity),size:a(this._values.size)},textures:{},defines:{vvColor:"ramp"===this._values.color.kind,vvOpacity:"ramp"===this._values.opacity.kind,vvSize:"ramp"===this._values.size.kind},optionalAttributes:null}}}export{d as default};