@arcgis/charts-components 5.0.0-next.7 → 5.0.0-next.71

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 (599) hide show
  1. package/dist/cdn/{YQWLSKE5.js → 2I3GKM3T.js} +2 -2
  2. package/dist/cdn/{BJKNKWUC.js → 2JAIKCLJ.js} +2 -2
  3. package/dist/cdn/2NZE3D7B.js +4 -0
  4. package/dist/cdn/{HGPUKDP2.js → 2VICYT6D.js} +2 -2
  5. package/dist/cdn/2WGPEGCA.js +4 -0
  6. package/dist/cdn/2WSQ7R6D.js +4 -0
  7. package/dist/cdn/2ZGGLOEX.js +4 -0
  8. package/dist/cdn/32MMV3V2.js +4 -0
  9. package/dist/cdn/{5MAIXE7Z.js → 3BRQVYQI.js} +2 -2
  10. package/dist/cdn/3G6RT7LA.js +4 -0
  11. package/dist/cdn/3IMEL6HX.js +4 -0
  12. package/dist/cdn/{36FSYONF.js → 3LFGIDFP.js} +2 -2
  13. package/dist/cdn/42SGCX24.js +4 -0
  14. package/dist/cdn/45KAHL4L.js +4 -0
  15. package/dist/cdn/4DCOT6GV.js +6 -0
  16. package/dist/cdn/4OI6VIPQ.js +4 -0
  17. package/dist/cdn/4TABNFLP.js +4 -0
  18. package/dist/cdn/4XVXOZE6.js +4 -0
  19. package/dist/cdn/52O5MN7M.js +4 -0
  20. package/dist/cdn/5FSO25N5.js +129 -0
  21. package/dist/cdn/5XBEKJ4O.js +144 -0
  22. package/dist/cdn/{LKODXNVB.js → 63DTMO64.js} +2 -2
  23. package/dist/cdn/67E56EQO.js +4 -0
  24. package/dist/cdn/{3MIHZORV.js → 6ANHPLB6.js} +2 -2
  25. package/dist/cdn/6HRHQDJO.js +4 -0
  26. package/dist/cdn/{DEVWLG2D.js → 6LOTF3OT.js} +2 -2
  27. package/dist/cdn/6SFEU45I.js +4 -0
  28. package/dist/cdn/{DK2IDH6K.js → 6XT6VSBZ.js} +2 -2
  29. package/dist/cdn/6ZR3ZY6K.js +4 -0
  30. package/dist/cdn/{ZOAJJO3O.js → 73776P54.js} +2 -2
  31. package/dist/cdn/73XDMNOH.js +4 -0
  32. package/dist/cdn/74QFMBZK.js +42 -0
  33. package/dist/cdn/7BB2J24Q.js +4 -0
  34. package/dist/cdn/{5JCKBVWB.js → 7CT4UWDZ.js} +2 -2
  35. package/dist/cdn/{AGVHBT7L.js → 7DBKQ5CO.js} +2 -2
  36. package/dist/cdn/7OJ7UEVF.js +4 -0
  37. package/dist/cdn/{XDM2ZTX6.js → 7P4LMHTT.js} +2 -2
  38. package/dist/cdn/{35JE4FBY.js → 7YO2XENZ.js} +2 -2
  39. package/dist/cdn/{RMULKO4A.js → A3CXYYAQ.js} +2 -2
  40. package/dist/cdn/{BFJORTOJ.js → AI3EUM2T.js} +2 -2
  41. package/dist/cdn/AIQ6PJWS.js +4 -0
  42. package/dist/cdn/{54VAST3T.js → ALUDVNDN.js} +2 -2
  43. package/dist/cdn/{N3XXFNB3.js → AOERX2EI.js} +2 -2
  44. package/dist/cdn/AY3MHYAH.js +4 -0
  45. package/dist/cdn/B36QMQHD.js +11 -0
  46. package/dist/cdn/{V6YYT4N6.js → BFVSWDG2.js} +1 -1
  47. package/dist/cdn/{R6AY7KMB.js → BUOHGUGB.js} +1 -1
  48. package/dist/cdn/{3NL3DNER.js → C7GONUOE.js} +2 -2
  49. package/dist/cdn/CDMDCPPS.js +4 -0
  50. package/dist/cdn/CHSOH4KH.js +4 -0
  51. package/dist/cdn/{7BXZTRWV.js → CKCV3NMB.js} +2 -2
  52. package/dist/cdn/CQC2TW5Q.js +4 -0
  53. package/dist/cdn/CQEPX7UD.js +4 -0
  54. package/dist/cdn/{3VQN2LGT.js → CSQQA63U.js} +2 -2
  55. package/dist/cdn/{UVU6XYFU.js → CVCGESNT.js} +2 -2
  56. package/dist/cdn/DAE4JQQH.js +4 -0
  57. package/dist/cdn/{YRBD3LRY.js → DDBC2EK3.js} +2 -2
  58. package/dist/cdn/DPGEC6Z7.js +4 -0
  59. package/dist/cdn/DQKWUKIK.js +144 -0
  60. package/dist/cdn/DSRQKYDG.js +4 -0
  61. package/dist/cdn/DVGBY2XI.js +4 -0
  62. package/dist/cdn/DYLECDXF.js +4 -0
  63. package/dist/cdn/{5HQH5MLS.js → E55UIM54.js} +2 -2
  64. package/dist/cdn/E56HYXWK.js +4 -0
  65. package/dist/cdn/ELGSHTDD.js +4 -0
  66. package/dist/cdn/ENQ6NLI5.js +4 -0
  67. package/dist/cdn/{T4VPS2H5.js → EQ4ICCCN.js} +2 -2
  68. package/dist/cdn/{QCQKZSWJ.js → EQJEG56R.js} +1 -1
  69. package/dist/cdn/EXAGPUF2.js +4 -0
  70. package/dist/cdn/{P6EF5I4O.js → F25X5WNV.js} +2 -2
  71. package/dist/cdn/{C6QAPYPQ.js → FBGOTBT5.js} +2 -2
  72. package/dist/cdn/FDRU5CJN.js +4 -0
  73. package/dist/cdn/{YPKHBQXA.js → FKECJMSW.js} +2 -2
  74. package/dist/cdn/FKP5ARI6.js +4 -0
  75. package/dist/cdn/FSN67JQB.js +4 -0
  76. package/dist/cdn/G5PQBD4N.js +4 -0
  77. package/dist/cdn/G7H6G5ED.js +4 -0
  78. package/dist/cdn/{TQIUCTSC.js → GF4OV5EW.js} +2 -2
  79. package/dist/cdn/GKIIY5UT.js +4 -0
  80. package/dist/cdn/GKZVCUPW.js +4 -0
  81. package/dist/cdn/GNRPP6I5.js +4 -0
  82. package/dist/cdn/{PVFDK245.js → GTF3YRG5.js} +2 -2
  83. package/dist/cdn/GYC76WI6.js +4 -0
  84. package/dist/cdn/GZMQJNCN.js +4 -0
  85. package/dist/cdn/H35TSKWU.js +4 -0
  86. package/dist/cdn/HJ4RFU3Z.js +4 -0
  87. package/dist/cdn/HK6WYV6G.js +4 -0
  88. package/dist/cdn/HR5LZSO7.js +4 -0
  89. package/dist/cdn/{TV7CPNRC.js → HU5FFL7F.js} +2 -2
  90. package/dist/cdn/HV77XAIQ.js +4 -0
  91. package/dist/cdn/I5S7COTQ.js +4 -0
  92. package/dist/cdn/I5SEYV4X.js +4 -0
  93. package/dist/cdn/I7CEYNVD.js +4 -0
  94. package/dist/cdn/IBL5V57I.js +4 -0
  95. package/dist/cdn/{F3ASXT26.js → ILQZPRGD.js} +2 -2
  96. package/dist/cdn/{US5HMCBY.js → ITRQLALV.js} +2 -2
  97. package/dist/cdn/{NXFX5LYZ.js → IYXFPXGU.js} +2 -2
  98. package/dist/cdn/{7VLZEZW3.js → JCU2ABRL.js} +2 -2
  99. package/dist/cdn/JKJ4KIVM.js +4 -0
  100. package/dist/cdn/KDHLWDQ6.js +4 -0
  101. package/dist/cdn/{W56FLWGR.js → KSLR4KL2.js} +2 -2
  102. package/dist/cdn/L36M4W66.js +4 -0
  103. package/dist/cdn/LOSK6R22.js +4 -0
  104. package/dist/cdn/LQFTC3TU.js +4 -0
  105. package/dist/cdn/LUIR74LK.js +4 -0
  106. package/dist/cdn/LURCISXG.js +4 -0
  107. package/dist/cdn/MB5XYXSC.js +4 -0
  108. package/dist/cdn/MM4WEGQV.js +4 -0
  109. package/dist/cdn/MWVETRI2.js +4 -0
  110. package/dist/cdn/N24IHAMU.js +4 -0
  111. package/dist/cdn/N4EYUYCZ.js +4 -0
  112. package/dist/cdn/NFMDCKX3.js +6 -0
  113. package/dist/cdn/{3JUPCICW.js → NINR5RHA.js} +2 -2
  114. package/dist/cdn/NJ3JO35T.js +58 -0
  115. package/dist/cdn/NJJS2BJV.js +4 -0
  116. package/dist/cdn/{JY73OE3Q.js → NLGGQYRM.js} +2 -2
  117. package/dist/cdn/NQZJWJY7.js +4 -0
  118. package/dist/cdn/{UXHFLB27.js → NWVEKHID.js} +2 -2
  119. package/dist/cdn/{7P4IBWJL.js → O5QIWSHX.js} +2 -2
  120. package/dist/cdn/{FVDOVNZW.js → OB7USCD2.js} +2 -2
  121. package/dist/cdn/{VVQUAG2Z.js → ONZQFHD5.js} +2 -2
  122. package/dist/cdn/ORDUZDW5.js +4 -0
  123. package/dist/cdn/P2OYFA75.js +4 -0
  124. package/dist/cdn/P4H5SA5X.js +4 -0
  125. package/dist/cdn/{3FEUSO2P.js → PCJIHVHD.js} +2 -2
  126. package/dist/cdn/{FZGGAYGV.js → PPTTHS23.js} +1 -1
  127. package/dist/cdn/{NSIFTLPN.js → PUACNQDX.js} +2 -2
  128. package/dist/cdn/Q33UJZNG.js +4 -0
  129. package/dist/cdn/QMUW5ATP.js +4 -0
  130. package/dist/cdn/QSWU4TLC.js +4 -0
  131. package/dist/cdn/QTIRMMBE.js +4 -0
  132. package/dist/cdn/{AHD5DXJH.js → R5FLCKXS.js} +2 -2
  133. package/dist/cdn/R6H7CW7H.js +4 -0
  134. package/dist/cdn/R7KGH3WV.js +4 -0
  135. package/dist/cdn/{EH3V2H3C.js → RAVQSEZD.js} +2 -2
  136. package/dist/cdn/RIH5O6F5.js +4 -0
  137. package/dist/cdn/{ZHASJHAE.js → RLW5T6PE.js} +2 -2
  138. package/dist/cdn/RMIRDTLF.js +4 -0
  139. package/dist/cdn/{NDCBXVWX.js → S5KRCUNX.js} +2 -2
  140. package/dist/cdn/SHJ5BR63.js +4 -0
  141. package/dist/cdn/SNKA5RGQ.js +4 -0
  142. package/dist/cdn/{IHINU2YO.js → SQ3LCLVN.js} +2 -2
  143. package/dist/cdn/TMQFL5KD.js +4 -0
  144. package/dist/cdn/{5Q2NBC5N.js → TOXRPAGM.js} +2 -2
  145. package/dist/cdn/TQZOPN3O.js +4 -0
  146. package/dist/cdn/{2SYFETGI.js → U7GKEVYA.js} +2 -2
  147. package/dist/cdn/UARYJZUN.js +4 -0
  148. package/dist/cdn/UB3YOHAZ.js +4 -0
  149. package/dist/cdn/UBCBPEQS.js +4 -0
  150. package/dist/cdn/{36FDIBPI.js → UBLUKCCV.js} +2 -2
  151. package/dist/cdn/UCUJXWVQ.js +4 -0
  152. package/dist/cdn/UEWIWLFR.js +4 -0
  153. package/dist/cdn/{S2TUX5TL.js → UIHFPGZB.js} +2 -2
  154. package/dist/cdn/UK4J426U.js +4 -0
  155. package/dist/cdn/UNDNZXC3.js +4 -0
  156. package/dist/cdn/UOHGH2P3.js +244 -0
  157. package/dist/cdn/USCGJG2Q.js +4 -0
  158. package/dist/cdn/UVMUHW66.js +4 -0
  159. package/dist/cdn/{FUQG7YN4.js → VEHQCKNV.js} +2 -2
  160. package/dist/cdn/VQOWPS5W.js +4 -0
  161. package/dist/cdn/VYQV5RMJ.js +4 -0
  162. package/dist/cdn/W7PQJNGB.js +4 -0
  163. package/dist/cdn/{26CEMPJQ.js → WCIR52PQ.js} +2 -2
  164. package/dist/cdn/WEVF5XQT.js +4 -0
  165. package/dist/cdn/WIISU4HL.js +4 -0
  166. package/dist/cdn/XB6WWFKB.js +4 -0
  167. package/dist/cdn/XFHD5MYX.js +4 -0
  168. package/dist/cdn/{CVE7ZPXC.js → XHYABFPN.js} +2 -2
  169. package/dist/cdn/XJBI6736.js +4 -0
  170. package/dist/cdn/{BKORDP3O.js → XKGKPZZC.js} +2 -2
  171. package/dist/cdn/{KSQGYVZK.js → XMDMIKZO.js} +2 -2
  172. package/dist/cdn/XNG65IJB.js +4 -0
  173. package/dist/cdn/XU4HVRMW.js +4 -0
  174. package/dist/cdn/{VW66WZ7U.js → Y6LM3MQU.js} +2 -2
  175. package/dist/cdn/{JGXYK2XS.js → YDZQ34K5.js} +2 -2
  176. package/dist/cdn/YKAS4B3R.js +4 -0
  177. package/dist/cdn/ZFBDTNXM.js +4 -0
  178. package/dist/cdn/ZN5YPWAJ.js +4 -0
  179. package/dist/cdn/ZTR46XJO.js +4 -0
  180. package/dist/cdn/ZX3IQKXF.js +4 -0
  181. package/dist/cdn/assets/common/t9n/messages.en.json +1 -1
  182. package/dist/cdn/index.js +2 -2
  183. package/dist/chart-rendering/common/axes/index.d.ts +1 -1
  184. package/dist/chart-rendering/common/axes/utils/axis-renderer/index.d.ts +18 -0
  185. package/dist/chart-rendering/common/color-match/renderer-color-match/index.d.ts +2 -3
  186. package/dist/chart-rendering/common/config-utils/index.d.ts +13 -120
  187. package/dist/chart-rendering/common/data/index.d.ts +9 -6
  188. package/dist/chart-rendering/common/data/selection/filter/index.d.ts +9 -0
  189. package/dist/chart-rendering/common/data/selection/filter/interfaces.d.ts +3 -0
  190. package/dist/chart-rendering/common/data/utils/misc/index.d.ts +3 -166
  191. package/dist/chart-rendering/common/data/utils/query-parser/time-binning/index.d.ts +18 -1
  192. package/dist/chart-rendering/common/data/utils/selection/index.d.ts +2 -2
  193. package/dist/chart-rendering/common/data/utils/summarize-data/index.d.ts +39 -1
  194. package/dist/chart-rendering/common/data/utils/summarize-data/interfaces.d.ts +5 -1
  195. package/dist/chart-rendering/common/data/utils/summarize-data/time-binning/index.d.ts +2 -2
  196. package/dist/chart-rendering/common/defaults/interfaces.d.ts +7 -8
  197. package/dist/chart-rendering/common/error-utils/index.d.ts +2 -2
  198. package/dist/chart-rendering/common/events/index.d.ts +7 -7
  199. package/dist/chart-rendering/common/interfaces.d.ts +20 -7
  200. package/dist/chart-rendering/common/loading-indicator/index.d.ts +4 -0
  201. package/dist/chart-rendering/common/memory-storage/interfaces.d.ts +2 -3
  202. package/dist/chart-rendering/common/series/pie-chart/index.d.ts +1 -1
  203. package/dist/chart-rendering/common/symbols/utils/index.d.ts +9 -0
  204. package/dist/chart-rendering/common/t9n/errors/index.d.ts +1 -1
  205. package/dist/chart-rendering/next/chart-library-elements/axes/gauge/index.d.ts +1 -1
  206. package/dist/chart-rendering/next/chart-library-elements/axes/histogram/index.d.ts +8 -2
  207. package/dist/chart-rendering/next/chart-library-elements/axes/index.d.ts +11 -2
  208. package/dist/chart-rendering/next/chart-library-elements/axes/utils/axis-format/index.d.ts +1 -1
  209. package/dist/chart-rendering/next/chart-library-elements/axes/utils/axis-renderer/index.d.ts +3 -8
  210. package/dist/chart-rendering/next/chart-library-elements/labels/data-label/utils.d.ts +6 -1
  211. package/dist/chart-rendering/next/chart-library-elements/legend/heat-legend/index.d.ts +2 -2
  212. package/dist/chart-rendering/next/chart-library-elements/legend/index.d.ts +8 -6
  213. package/dist/chart-rendering/next/chart-library-elements/legend/interfaces.d.ts +15 -1
  214. package/dist/chart-rendering/next/chart-library-elements/line-fill-marker/index.d.ts +1 -1
  215. package/dist/chart-rendering/next/chart-library-elements/line-fill-marker/interfaces.d.ts +0 -1
  216. package/dist/chart-rendering/next/chart-library-elements/loading-indicator/index.d.ts +1 -1
  217. package/dist/chart-rendering/next/chart-library-elements/loading-indicator/interfaces.d.ts +0 -4
  218. package/dist/chart-rendering/next/chart-library-elements/series/bar-chart/index.d.ts +4 -1
  219. package/dist/chart-rendering/next/chart-library-elements/series/heat-chart/index.d.ts +15 -0
  220. package/dist/chart-rendering/next/chart-library-elements/series/index.d.ts +9 -1
  221. package/dist/chart-rendering/next/chart-library-elements/series/interfaces.d.ts +2 -1
  222. package/dist/chart-rendering/next/chart-library-elements/series/line-chart/index.d.ts +1 -0
  223. package/dist/chart-rendering/next/chart-library-elements/series/pie-chart/index.d.ts +2 -0
  224. package/dist/chart-rendering/next/chart-library-elements/series/radar-chart/index.d.ts +1 -0
  225. package/dist/chart-rendering/next/chart-library-elements/series/scatter-plot/interfaces.d.ts +3 -0
  226. package/dist/chart-rendering/next/chart-library-elements/series/scatter-plot/size-policy/index.d.ts +8 -17
  227. package/dist/chart-rendering/next/chart-library-elements/series/utils/index.d.ts +13 -16
  228. package/dist/chart-rendering/next/chart-library-elements/symbols/utils/property-map/index.d.ts +1 -9
  229. package/dist/chart-rendering/next/defaults/index.d.ts +8 -1
  230. package/dist/chart-rendering/next/index.d.ts +2 -2
  231. package/dist/chart-rendering/next/interfaces.d.ts +4 -0
  232. package/dist/chart-rendering/next/utils/chart-modal/index.d.ts +4 -4
  233. package/dist/chart-rendering/next/utils/index.d.ts +15 -7
  234. package/dist/chart-rendering/next/utils/misc/index.d.ts +9 -3
  235. package/dist/chart-rendering/stable/chart-library-elements/axes/index.d.ts +1 -1
  236. package/dist/chart-rendering/stable/chart-library-elements/axes/utils/axis-format/index.d.ts +1 -1
  237. package/dist/chart-rendering/stable/chart-library-elements/axes/utils/axis-renderer/index.d.ts +4 -22
  238. package/dist/chart-rendering/stable/chart-library-elements/cursor/index.d.ts +1 -1
  239. package/dist/chart-rendering/stable/chart-library-elements/guides-and-ticks/index.d.ts +0 -2
  240. package/dist/chart-rendering/stable/chart-library-elements/label/axis-label/index.d.ts +1 -2
  241. package/dist/chart-rendering/stable/chart-library-elements/label/data-label/index.d.ts +1 -1
  242. package/dist/chart-rendering/stable/chart-library-elements/label/data-label/interfaces.d.ts +3 -3
  243. package/dist/chart-rendering/stable/chart-library-elements/label/utils/gauge/index.d.ts +5 -0
  244. package/dist/chart-rendering/stable/chart-library-elements/legends/index.d.ts +4 -4
  245. package/dist/chart-rendering/stable/chart-library-elements/line-fill-marker/index.d.ts +1 -1
  246. package/dist/chart-rendering/stable/chart-library-elements/line-fill-marker/interfaces.d.ts +2 -3
  247. package/dist/chart-rendering/stable/chart-library-elements/loading-indicator/index.d.ts +2 -1
  248. package/dist/chart-rendering/stable/chart-library-elements/loading-indicator/interfaces.d.ts +0 -4
  249. package/dist/chart-rendering/stable/chart-library-elements/series/interfaces.d.ts +4 -6
  250. package/dist/chart-rendering/stable/chart-library-elements/series/pie-chart/index.d.ts +1 -1
  251. package/dist/chart-rendering/stable/chart-library-elements/series/utils/index.d.ts +3 -15
  252. package/dist/chart-rendering/stable/chart-library-elements/symbols/utils/property-map/index.d.ts +1 -9
  253. package/dist/chart-rendering/stable/chart-library-elements/tooltips/interfaces.d.ts +3 -3
  254. package/dist/chart-rendering/stable/index.d.ts +8 -4
  255. package/dist/chart-rendering/stable/interfaces.d.ts +2 -1
  256. package/dist/chart-rendering/stable/selection/switch/index.d.ts +1 -1
  257. package/dist/chart-rendering/stable/utils/error-modal/index.d.ts +8 -10
  258. package/dist/chart-rendering/stable/utils/memory-storage/interfaces.d.ts +1 -0
  259. package/dist/chart-rendering/stable/utils/misc/index.d.ts +3 -9
  260. package/dist/chunks/action-bar-utils.js +52 -39
  261. package/dist/chunks/axis-model-wrapper.js +1 -1
  262. package/dist/chunks/bar-chart-model.js +22 -13
  263. package/dist/chunks/bar-chart-series.js +21 -12
  264. package/dist/chunks/baseline-stacking.js +49 -40
  265. package/dist/chunks/bg_BG.js +1 -1
  266. package/dist/chunks/bg_BG2.js +1 -1
  267. package/dist/chunks/box-plot-data.js +216 -194
  268. package/dist/chunks/box-plot-model.js +37 -29
  269. package/dist/chunks/chart-ui-utils.js +37 -32
  270. package/dist/chunks/chart-ui-utils2.js +58 -50
  271. package/dist/chunks/combo-bar-line-chart-model.js +51 -56
  272. package/dist/chunks/common.js +1 -1
  273. package/dist/chunks/config-update.js +151 -5393
  274. package/dist/chunks/data.js +61 -924
  275. package/dist/chunks/default.js +1 -1
  276. package/dist/chunks/gauge-model.js +22 -14
  277. package/dist/chunks/heat-chart-model.js +201 -56
  278. package/dist/chunks/histogram-data.js +57 -49
  279. package/dist/chunks/histogram-model.js +19 -11
  280. package/dist/chunks/index.js +23862 -2206
  281. package/dist/chunks/index2.js +670 -36
  282. package/dist/chunks/index3.js +90 -63
  283. package/dist/chunks/index4.js +63 -91
  284. package/dist/chunks/interfaces.js +90 -16256
  285. package/dist/chunks/line-chart-model.js +17 -9
  286. package/dist/chunks/model-with-baseline-stacking.js +18 -28
  287. package/dist/chunks/model-with-data-labels.js +35 -26
  288. package/dist/chunks/model-with-multi-axes.js +143 -144
  289. package/dist/chunks/model-with-rotation.js +15 -6
  290. package/dist/chunks/pie-chart-data.js +144 -128
  291. package/dist/chunks/pie-chart-model.js +65 -56
  292. package/dist/chunks/popover-ui-utils.js +1 -1
  293. package/dist/chunks/radar-chart-model.js +15 -7
  294. package/dist/chunks/resource.js +1 -1
  295. package/dist/chunks/rest-js-object-literals.js +1 -1
  296. package/dist/chunks/runtime.js +1 -1
  297. package/dist/chunks/scatterplot-model.js +45 -37
  298. package/dist/chunks/serial-chart-data.js +912 -0
  299. package/dist/chunks/serial-chart-model.js +60 -44
  300. package/dist/chunks/series-types.js +3 -2
  301. package/dist/chunks/series.js +18 -9
  302. package/dist/chunks/sk_SK.js +1 -1
  303. package/dist/chunks/store.js +22 -13
  304. package/dist/chunks/type-guards.js +1 -1
  305. package/dist/chunks/useT9n.js +1 -1
  306. package/dist/chunks/web-component-utils.js +224 -218
  307. package/dist/components/arcgis-chart/customElement.d.ts +734 -161
  308. package/dist/components/arcgis-chart/customElement.js +9484 -10135
  309. package/dist/components/arcgis-charts-action-bar/customElement.d.ts +74 -74
  310. package/dist/components/arcgis-charts-action-bar/customElement.js +57 -48
  311. package/dist/components/arcgis-charts-config-axes/customElement.d.ts +6 -6
  312. package/dist/components/arcgis-charts-config-axes/customElement.js +2 -2
  313. package/dist/components/arcgis-charts-config-axis/customElement.d.ts +5 -5
  314. package/dist/components/arcgis-charts-config-axis/customElement.js +24 -24
  315. package/dist/components/arcgis-charts-config-axis/resource.d.ts +0 -1
  316. package/dist/components/arcgis-charts-config-bar-chart/customElement.d.ts +9 -4
  317. package/dist/components/arcgis-charts-config-bar-chart/customElement.js +45 -41
  318. package/dist/components/arcgis-charts-config-bar-chart-data/customElement.js +116 -109
  319. package/dist/components/arcgis-charts-config-bar-chart-data/resource.d.ts +0 -1
  320. package/dist/components/arcgis-charts-config-bar-chart-popover/customElement.d.ts +3 -3
  321. package/dist/components/arcgis-charts-config-bar-chart-popover/customElement.js +19 -12
  322. package/dist/components/arcgis-charts-config-bar-chart-series/customElement.d.ts +3 -9
  323. package/dist/components/arcgis-charts-config-bar-chart-series/customElement.js +41 -31
  324. package/dist/components/arcgis-charts-config-bar-chart-series-popover/customElement.d.ts +2 -2
  325. package/dist/components/arcgis-charts-config-bar-chart-series-popover/customElement.js +18 -9
  326. package/dist/components/arcgis-charts-config-box-plot/customElement.d.ts +2 -2
  327. package/dist/components/arcgis-charts-config-box-plot/customElement.js +34 -30
  328. package/dist/components/arcgis-charts-config-box-plot-data/customElement.js +36 -23
  329. package/dist/components/arcgis-charts-config-box-plot-data/resource.d.ts +0 -1
  330. package/dist/components/arcgis-charts-config-box-plot-popover/customElement.d.ts +12 -2
  331. package/dist/components/arcgis-charts-config-box-plot-popover/customElement.js +52 -45
  332. package/dist/components/arcgis-charts-config-box-plot-series/customElement.d.ts +3 -10
  333. package/dist/components/arcgis-charts-config-box-plot-series/customElement.js +22 -17
  334. package/dist/components/arcgis-charts-config-box-plot-series-popover/customElement.d.ts +3 -3
  335. package/dist/components/arcgis-charts-config-box-plot-series-popover/customElement.js +24 -15
  336. package/dist/components/arcgis-charts-config-category-format/customElement.js +2 -2
  337. package/dist/components/arcgis-charts-config-chart-rename-popover/customElement.d.ts +2 -2
  338. package/dist/components/arcgis-charts-config-chart-rename-popover/customElement.js +26 -23
  339. package/dist/components/arcgis-charts-config-color-style/customElement.d.ts +2 -2
  340. package/dist/components/arcgis-charts-config-color-style/customElement.js +3 -3
  341. package/dist/components/arcgis-charts-config-colors/customElement.d.ts +1 -1
  342. package/dist/components/arcgis-charts-config-colors/customElement.js +6 -6
  343. package/dist/components/arcgis-charts-config-create-flow/customElement.d.ts +9 -9
  344. package/dist/components/arcgis-charts-config-create-flow/customElement.js +143 -148
  345. package/dist/components/arcgis-charts-config-field-select/customElement.d.ts +2 -2
  346. package/dist/components/arcgis-charts-config-field-select/customElement.js +2 -2
  347. package/dist/components/arcgis-charts-config-font-style/customElement.d.ts +2 -2
  348. package/dist/components/arcgis-charts-config-font-style/customElement.js +21 -12
  349. package/dist/components/arcgis-charts-config-format/customElement.js +34 -25
  350. package/dist/components/arcgis-charts-config-format-popover/customElement.d.ts +2 -2
  351. package/dist/components/arcgis-charts-config-format-popover/customElement.js +13 -4
  352. package/dist/components/arcgis-charts-config-general/customElement.js +26 -17
  353. package/dist/components/arcgis-charts-config-guide/customElement.d.ts +2 -2
  354. package/dist/components/arcgis-charts-config-guide/customElement.js +29 -30
  355. package/dist/components/arcgis-charts-config-guide-popover/customElement.d.ts +2 -2
  356. package/dist/components/arcgis-charts-config-guide-popover/customElement.js +17 -8
  357. package/dist/components/arcgis-charts-config-guides/customElement.d.ts +3 -3
  358. package/dist/components/arcgis-charts-config-guides/customElement.js +32 -36
  359. package/dist/components/arcgis-charts-config-guides-type-popover/customElement.d.ts +4 -4
  360. package/dist/components/arcgis-charts-config-guides-type-popover/customElement.js +21 -12
  361. package/dist/components/arcgis-charts-config-histogram/customElement.d.ts +1 -1
  362. package/dist/components/arcgis-charts-config-histogram/customElement.js +37 -33
  363. package/dist/components/arcgis-charts-config-histogram-data/customElement.d.ts +5 -0
  364. package/dist/components/arcgis-charts-config-histogram-data/customElement.js +31 -22
  365. package/dist/components/arcgis-charts-config-histogram-popover/customElement.d.ts +6 -1
  366. package/dist/components/arcgis-charts-config-histogram-popover/customElement.js +16 -7
  367. package/dist/components/arcgis-charts-config-invalid-input-message/customElement.d.ts +1 -1
  368. package/dist/components/arcgis-charts-config-invalid-input-message/customElement.js +2 -2
  369. package/dist/components/arcgis-charts-config-line-chart/customElement.d.ts +8 -3
  370. package/dist/components/arcgis-charts-config-line-chart/customElement.js +37 -33
  371. package/dist/components/arcgis-charts-config-line-chart-data/customElement.js +68 -51
  372. package/dist/components/arcgis-charts-config-line-chart-data/resource.d.ts +0 -1
  373. package/dist/components/arcgis-charts-config-line-chart-popover/customElement.d.ts +1 -1
  374. package/dist/components/arcgis-charts-config-line-chart-popover/customElement.js +20 -11
  375. package/dist/components/arcgis-charts-config-line-chart-series/customElement.d.ts +2 -2
  376. package/dist/components/arcgis-charts-config-line-chart-series/customElement.js +36 -27
  377. package/dist/components/arcgis-charts-config-line-chart-series-popover/customElement.d.ts +1 -1
  378. package/dist/components/arcgis-charts-config-line-chart-series-popover/customElement.js +14 -5
  379. package/dist/components/arcgis-charts-config-line-style/customElement.d.ts +13 -3
  380. package/dist/components/arcgis-charts-config-line-style/customElement.js +3 -3
  381. package/dist/components/arcgis-charts-config-number-format/customElement.js +5 -5
  382. package/dist/components/arcgis-charts-config-pie-chart/customElement.d.ts +3 -3
  383. package/dist/components/arcgis-charts-config-pie-chart/customElement.js +48 -44
  384. package/dist/components/arcgis-charts-config-pie-chart-data/customElement.js +48 -35
  385. package/dist/components/arcgis-charts-config-pie-chart-data/resource.d.ts +0 -1
  386. package/dist/components/arcgis-charts-config-pie-chart-popover/customElement.d.ts +1 -1
  387. package/dist/components/arcgis-charts-config-pie-chart-popover/customElement.js +46 -37
  388. package/dist/components/arcgis-charts-config-pie-chart-slices/customElement.d.ts +1 -1
  389. package/dist/components/arcgis-charts-config-pie-chart-slices/customElement.js +31 -22
  390. package/dist/components/arcgis-charts-config-pie-chart-slices-popover/customElement.d.ts +2 -2
  391. package/dist/components/arcgis-charts-config-pie-chart-slices-popover/customElement.js +14 -5
  392. package/dist/components/arcgis-charts-config-scatter-plot/customElement.d.ts +7 -2
  393. package/dist/components/arcgis-charts-config-scatter-plot/customElement.js +33 -29
  394. package/dist/components/arcgis-charts-config-scatter-plot-data/customElement.d.ts +1 -1
  395. package/dist/components/arcgis-charts-config-scatter-plot-data/customElement.js +60 -45
  396. package/dist/components/arcgis-charts-config-scatter-plot-data/resource.d.ts +0 -1
  397. package/dist/components/arcgis-charts-config-scatter-plot-popover/customElement.d.ts +1 -1
  398. package/dist/components/arcgis-charts-config-scatter-plot-popover/customElement.js +21 -12
  399. package/dist/components/arcgis-charts-config-select-chart-type-popover/customElement.d.ts +1 -1
  400. package/dist/components/arcgis-charts-config-select-chart-type-popover/customElement.js +23 -10
  401. package/dist/components/arcgis-charts-config-view-charts/customElement.d.ts +2 -2
  402. package/dist/components/arcgis-charts-config-view-charts/customElement.js +22 -13
  403. package/dist/docs/api.json +243 -367
  404. package/dist/docs/docs.json +259 -294
  405. package/dist/docs/vscode.html-custom-data.json +57 -48
  406. package/dist/docs/web-types.json +148 -120
  407. package/dist/index.d.ts +4 -3
  408. package/dist/index.js +429 -405
  409. package/dist/json-schema/index.d.ts +19 -3
  410. package/dist/loader.d.ts +1 -1
  411. package/dist/loader.js +2 -2
  412. package/dist/model/chart-model/chart-model.d.ts +4 -9
  413. package/dist/model/combo-bar-line-chart-model/combo-bar-line-chart-model.d.ts +30 -43
  414. package/dist/model/heat-chart-model/heat-chart-model.d.ts +85 -11
  415. package/dist/model/heat-chart-model/utils/heat-chart-data.d.ts +74 -8
  416. package/dist/model/mixins/model-with-baseline-stacking.d.ts +4 -10
  417. package/dist/model/mixins/model-with-line-marker-styling.d.ts +13 -17
  418. package/dist/model/mixins/model-with-multi-axes.d.ts +4 -3
  419. package/dist/model/mixins/utils/baseline-stacking.d.ts +5 -11
  420. package/dist/model/mixins/utils/line-marker-styling.d.ts +18 -23
  421. package/dist/model/pie-chart-model/pie-chart-model.d.ts +5 -2
  422. package/dist/model/serial-chart-model/serial-chart-model.d.ts +4 -0
  423. package/dist/model/shared/data.d.ts +44 -2
  424. package/dist/model.js +1 -1
  425. package/dist/spec/chart-object-literals.d.ts +1 -0
  426. package/dist/spec/data-source.d.ts +11 -0
  427. package/dist/spec/web-chart.d.ts +11 -4
  428. package/dist/store.d.ts +24 -3
  429. package/dist/types/components.d.ts +1 -1
  430. package/dist/types/lumina.d.ts +4 -3
  431. package/dist/types/preact.d.ts +4 -3
  432. package/dist/types/preact10.d.ts +4 -3
  433. package/dist/types/react.d.ts +4 -3
  434. package/dist/types/stencil.d.ts +4 -3
  435. package/dist/utils/chart-config/converter/index.d.ts +27 -3
  436. package/dist/utils/chart-config/utils/index.d.ts +286 -1
  437. package/dist/utils/chart-config/validator/index.d.ts +10 -10
  438. package/dist/utils/components/config-update.d.ts +29 -9
  439. package/dist/utils/components/data-update.d.ts +36 -0
  440. package/dist/utils/components/event-payloads.d.ts +0 -3
  441. package/dist/utils/components/watch-handlers.d.ts +12 -12
  442. package/dist/utils/components/web-component-utils.d.ts +7 -2
  443. package/dist/utils/data/index.d.ts +3 -2
  444. package/dist/utils/data/interfaces.d.ts +31 -2
  445. package/dist/utils/data/time-binning/interfaces.d.ts +0 -4
  446. package/dist/utils/defaults/index.d.ts +1 -1
  447. package/dist/utils/defaults/interfaces.d.ts +1 -1
  448. package/dist/utils/layer/index.d.ts +46 -3
  449. package/dist/utils/layer/interfaces.d.ts +1 -0
  450. package/dist/utils/layer/query-features/index.d.ts +3 -3
  451. package/dist/utils/layer/query-parser/index.d.ts +8 -0
  452. package/dist/utils/layer/utils/index.d.ts +3 -3
  453. package/dist/utils/misc/index.d.ts +1 -8
  454. package/dist/utils/misc/interfaces.d.ts +14 -2
  455. package/dist/utils/types/index.d.ts +1 -0
  456. package/dist/utils/ui/chart-ui-utils.d.ts +8 -2
  457. package/package.json +5 -5
  458. package/dist/cdn/2PIQUZLJ.js +0 -4
  459. package/dist/cdn/2RSSSCRW.js +0 -4
  460. package/dist/cdn/35DOK57F.js +0 -4
  461. package/dist/cdn/3B37QR3P.js +0 -4
  462. package/dist/cdn/3DA7RNJY.js +0 -4
  463. package/dist/cdn/3S7LJRMK.js +0 -4
  464. package/dist/cdn/3ZRCK4IC.js +0 -4
  465. package/dist/cdn/4IE6XELI.js +0 -4
  466. package/dist/cdn/4KKRP2RP.js +0 -4
  467. package/dist/cdn/4NMFDCAD.js +0 -4
  468. package/dist/cdn/4O4ROBLA.js +0 -4
  469. package/dist/cdn/56SMODPT.js +0 -4
  470. package/dist/cdn/5FYUIGBI.js +0 -4
  471. package/dist/cdn/5H5O4VGE.js +0 -4
  472. package/dist/cdn/5N7TBD2B.js +0 -4
  473. package/dist/cdn/6ESQM7VJ.js +0 -4
  474. package/dist/cdn/6WGTEKAS.js +0 -4
  475. package/dist/cdn/7COTPB7J.js +0 -4
  476. package/dist/cdn/A5VFUO5X.js +0 -4
  477. package/dist/cdn/AHAIODUA.js +0 -4
  478. package/dist/cdn/BNCIYGUY.js +0 -4
  479. package/dist/cdn/BTGG3TDM.js +0 -4
  480. package/dist/cdn/BTTBM7EP.js +0 -4
  481. package/dist/cdn/BYLHBOT7.js +0 -4
  482. package/dist/cdn/C5YUFRP7.js +0 -4
  483. package/dist/cdn/COKTZFQ7.js +0 -4
  484. package/dist/cdn/D3V3OSTL.js +0 -4
  485. package/dist/cdn/DCYBICHJ.css +0 -1
  486. package/dist/cdn/DEIRRBWT.js +0 -4
  487. package/dist/cdn/DHP3YSOY.js +0 -4
  488. package/dist/cdn/DK4C5EIX.js +0 -4
  489. package/dist/cdn/DUWTAEND.js +0 -4
  490. package/dist/cdn/EOUCNE3D.js +0 -4
  491. package/dist/cdn/EQ7ZCKDE.js +0 -4
  492. package/dist/cdn/EUY3ZXB3.js +0 -4
  493. package/dist/cdn/EXVFMAUT.js +0 -4
  494. package/dist/cdn/F5NUFIWE.js +0 -4
  495. package/dist/cdn/FGVGUOKQ.js +0 -4
  496. package/dist/cdn/FISKRQXW.js +0 -4
  497. package/dist/cdn/FQD4ELGL.js +0 -11
  498. package/dist/cdn/FQJVMD7O.js +0 -4
  499. package/dist/cdn/FVLZ7XGV.js +0 -4
  500. package/dist/cdn/G3J7PGIE.js +0 -4
  501. package/dist/cdn/GPBCWFS5.js +0 -4
  502. package/dist/cdn/GSVQ6ZVK.js +0 -4
  503. package/dist/cdn/H7X2PNIT.js +0 -6
  504. package/dist/cdn/HBXUKZX5.js +0 -4
  505. package/dist/cdn/HMFJXRJR.js +0 -4
  506. package/dist/cdn/I75CJSCE.js +0 -6
  507. package/dist/cdn/IJUTRTZW.js +0 -4
  508. package/dist/cdn/IPHAOMVD.js +0 -4
  509. package/dist/cdn/JB4CUM2L.js +0 -4
  510. package/dist/cdn/JDDNTQT5.js +0 -4
  511. package/dist/cdn/JQUU4BVY.js +0 -4
  512. package/dist/cdn/JTNRW7OL.js +0 -4
  513. package/dist/cdn/JUS6XSRW.js +0 -4
  514. package/dist/cdn/JXTAQEQJ.js +0 -4
  515. package/dist/cdn/K2D64HXF.js +0 -4
  516. package/dist/cdn/K46NAK7K.js +0 -58
  517. package/dist/cdn/K76D3WKW.js +0 -4
  518. package/dist/cdn/LH6NEIUE.js +0 -4
  519. package/dist/cdn/LHHFMWDQ.js +0 -4
  520. package/dist/cdn/LILH3A6H.js +0 -4
  521. package/dist/cdn/M5AYHPO2.js +0 -4
  522. package/dist/cdn/MJWADCAF.js +0 -4
  523. package/dist/cdn/MJWLRF2C.js +0 -4
  524. package/dist/cdn/NBMNKZEZ.js +0 -4
  525. package/dist/cdn/NOIKL326.js +0 -4
  526. package/dist/cdn/O3TSFTUW.js +0 -4
  527. package/dist/cdn/OBHYEK6P.js +0 -4
  528. package/dist/cdn/OGUNKDKJ.js +0 -4
  529. package/dist/cdn/OK3PQBYT.js +0 -4
  530. package/dist/cdn/P275QL34.js +0 -4
  531. package/dist/cdn/P36WOGBI.js +0 -4
  532. package/dist/cdn/PAX3ETZN.js +0 -4
  533. package/dist/cdn/PE5HKCVC.js +0 -129
  534. package/dist/cdn/PMSJEK4U.js +0 -4
  535. package/dist/cdn/PTCDABQ4.js +0 -4
  536. package/dist/cdn/PWQYDJL2.js +0 -144
  537. package/dist/cdn/Q3NGO47M.js +0 -4
  538. package/dist/cdn/Q3OSKDAI.js +0 -4
  539. package/dist/cdn/Q4LHRNFI.js +0 -4
  540. package/dist/cdn/Q6DK5UET.js +0 -4
  541. package/dist/cdn/R5FNA5SX.js +0 -4
  542. package/dist/cdn/RGDSO37U.js +0 -4
  543. package/dist/cdn/RWQUICHT.js +0 -4
  544. package/dist/cdn/SAOUVNZI.js +0 -4
  545. package/dist/cdn/SNLY7Y2R.js +0 -4
  546. package/dist/cdn/ST4G6ALP.js +0 -4
  547. package/dist/cdn/SVQ4R6WJ.js +0 -4
  548. package/dist/cdn/SVXVMMAK.js +0 -4
  549. package/dist/cdn/SZKBCG3U.js +0 -4
  550. package/dist/cdn/TALLNCA4.js +0 -4
  551. package/dist/cdn/TFBUW7HW.js +0 -4
  552. package/dist/cdn/THTADIQM.js +0 -4
  553. package/dist/cdn/TPQ47UXE.js +0 -4
  554. package/dist/cdn/TVVIHKAP.js +0 -4
  555. package/dist/cdn/TWS2ARTZ.js +0 -4
  556. package/dist/cdn/TYBTROL2.js +0 -4
  557. package/dist/cdn/TYXWYGLJ.js +0 -4
  558. package/dist/cdn/TZX762W2.js +0 -4
  559. package/dist/cdn/UFRVAEDG.js +0 -4
  560. package/dist/cdn/UIWMRHDG.js +0 -4
  561. package/dist/cdn/UNK7THP6.js +0 -4
  562. package/dist/cdn/UNKXLW6W.js +0 -4
  563. package/dist/cdn/UZNIN5RB.js +0 -4
  564. package/dist/cdn/UZTBNWU5.js +0 -4
  565. package/dist/cdn/VIHTTIVI.js +0 -4
  566. package/dist/cdn/WRZII4FY.js +0 -144
  567. package/dist/cdn/XKMQOAUO.js +0 -4
  568. package/dist/cdn/XLEIBCVC.js +0 -4
  569. package/dist/cdn/XOGLMU5O.js +0 -4
  570. package/dist/cdn/XUEJREON.js +0 -4
  571. package/dist/cdn/Y36SXMLN.js +0 -244
  572. package/dist/cdn/YITCW2WB.js +0 -42
  573. package/dist/cdn/ZAK6PFTO.js +0 -4
  574. package/dist/cdn/ZAVVIRNK.js +0 -4
  575. package/dist/cdn/ZMBVRTCZ.js +0 -4
  576. package/dist/cdn/ZW7QBYVY.js +0 -4
  577. package/dist/cdn/stdin.css +0 -1
  578. package/dist/chart-rendering/common/data/utils/misc/interfaces.d.ts +0 -30
  579. package/dist/chart-rendering/stable/chart-library-elements/axes/histogram/index.d.ts +0 -23
  580. package/dist/chart-rendering/stable/chart-library-elements/axes/histogram/interfaces.d.ts +0 -18
  581. package/dist/chart-rendering/stable/chart-library-elements/axes/scatter-plot/index.d.ts +0 -15
  582. package/dist/chart-rendering/stable/chart-library-elements/guides-and-ticks/interfaces.d.ts +0 -14
  583. package/dist/chart-rendering/stable/chart-library-elements/label/data-label/histogram/index.d.ts +0 -15
  584. package/dist/chart-rendering/stable/chart-library-elements/label/data-label/scatter-plot/index.d.ts +0 -15
  585. package/dist/chart-rendering/stable/chart-library-elements/series/histogram/index.d.ts +0 -14
  586. package/dist/chart-rendering/stable/chart-library-elements/series/histogram/interfaces.d.ts +0 -58
  587. package/dist/chart-rendering/stable/chart-library-elements/series/scatter-plot/index.d.ts +0 -14
  588. package/dist/chart-rendering/stable/chart-library-elements/series/scatter-plot/interfaces.d.ts +0 -35
  589. package/dist/chart-rendering/stable/chart-library-elements/series/scatter-plot/size-policy/index.d.ts +0 -28
  590. package/dist/chart-rendering/stable/chart-library-elements/tooltips/histogram/index.d.ts +0 -15
  591. package/dist/chart-rendering/stable/chart-library-elements/tooltips/histogram/interfaces.d.ts +0 -5
  592. package/dist/chart-rendering/stable/chart-library-elements/tooltips/scatter-plot/index.d.ts +0 -16
  593. package/dist/chart-rendering/stable/chart-library-elements/tooltips/scatter-plot/interfaces.d.ts +0 -5
  594. package/dist/chunks/index5.js +0 -66
  595. package/dist/chunks/interfaces2.js +0 -18
  596. package/dist/chunks/interfaces3.js +0 -96
  597. package/dist/chunks/interfaces4.js +0 -491
  598. package/dist/test/chart-rendering/test-utils/utils.d.ts +0 -15
  599. package/dist/test/utils/test-utils/utils.d.ts +0 -13
@@ -0,0 +1,4 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.71 */
4
+ import"./BFVSWDG2.js";var _={_decimalSeparator:",",_thousandSeparator:"\xA0",_percentPrefix:null,_percentSuffix:"%",_big_number_suffix_3:"k",_big_number_suffix_6:"M",_big_number_suffix_9:"G",_big_number_suffix_12:"T",_big_number_suffix_15:"P",_big_number_suffix_18:"E",_big_number_suffix_21:"Z",_big_number_suffix_24:"Y",_small_number_suffix_3:"m",_small_number_suffix_6:"\u03BC",_small_number_suffix_9:"n",_small_number_suffix_12:"p",_small_number_suffix_15:"f",_small_number_suffix_18:"a",_small_number_suffix_21:"z",_small_number_suffix_24:"y",_byte_suffix_B:"B",_byte_suffix_KB:"KB",_byte_suffix_MB:"MB",_byte_suffix_GB:"GB",_byte_suffix_TB:"TB",_byte_suffix_PB:"PB",_date_millisecond:"mm:ss SSS",_date_millisecond_full:"HH:mm:ss SSS",_date_second:"HH:mm:ss",_date_second_full:"HH:mm:ss",_date_minute:"HH:mm",_date_minute_full:"HH:mm - MMM dd, yyyy",_date_hour:"HH:mm",_date_hour_short:"HH",_date_hour_full:"HH:mm - MMM dd, yyyy",_date_day:"MMM dd",_date_day_full:"MMM dd, yyyy",_date_week:"ww",_date_week_full:"MMM dd, yyyy",_date_month:"MMM",_date_month_full:"MMM, yyyy",_date_year:"yyyy",_duration_millisecond:"SSS",_duration_millisecond_second:"ss.SSS",_duration_millisecond_minute:"mm:ss SSS",_duration_millisecond_hour:"hh:mm:ss SSS",_duration_millisecond_day:"d'd' mm:ss SSS",_duration_millisecond_week:"d'd' mm:ss SSS",_duration_millisecond_month:"M'm' dd'd' mm:ss SSS",_duration_millisecond_year:"y'y' MM'm' dd'd' mm:ss SSS",_duration_second:"ss",_duration_second_minute:"mm:ss",_duration_second_hour:"hh:mm:ss",_duration_second_day:"d'd' hh:mm:ss",_duration_second_week:"d'd' hh:mm:ss",_duration_second_month:"M'm' dd'd' hh:mm:ss",_duration_second_year:"y'y' MM'm' dd'd' hh:mm:ss",_duration_minute:"mm",_duration_minute_hour:"hh:mm",_duration_minute_day:"d'd' hh:mm",_duration_minute_week:"d'd' hh:mm",_duration_minute_month:"M'm' dd'd' hh:mm",_duration_minute_year:"y'y' MM'm' dd'd' hh:mm",_duration_hour:"hh'h'",_duration_hour_day:"d'd' hh'h'",_duration_hour_week:"d'd' hh'h'",_duration_hour_month:"M'm' dd'd' hh'h'",_duration_hour_year:"y'y' MM'm' dd'd' hh'h'",_duration_day:"d'd'",_duration_day_week:"d'd'",_duration_day_month:"M'm' dd'd'",_duration_day_year:"y'y' MM'm' dd'd'",_duration_week:"w'w'",_duration_week_month:"w'w'",_duration_week_year:"w'w'",_duration_month:"M'm'",_duration_month_year:"y'y' MM'm'",_duration_year:"y'y'",_era_ad:"\u043D. \u0435.",_era_bc:"\u0434\u043E \u043D. \u0435.",A:"\u0434\u043F",P:"\u043F\u043F",AM:"\u0434\u043F",PM:"\u043F\u043F","A.M.":"\u0434\u043F","P.M.":"\u043F\u043F",January:"\u0441\u0456\u0447\u043D\u044F",February:"\u043B\u044E\u0442\u043E\u0433\u043E",March:"\u0431\u0435\u0440\u0435\u0437\u043D\u044F",April:"\u043A\u0432\u0456\u0442\u043D\u044F",May:"\u0442\u0440\u0430\u0432\u043D\u044F",June:"\u0447\u0435\u0440\u0432\u043D\u044F",July:"\u043B\u0438\u043F\u043D\u044F",August:"\u0441\u0435\u0440\u043F\u043D\u044F",September:"\u0432\u0435\u0440\u0435\u0441\u043D\u044F",October:"\u0436\u043E\u0432\u0442\u043D\u044F",November:"\u043B\u0438\u0441\u0442\u043E\u043F\u0430\u0434\u0430",December:"\u0433\u0440\u0443\u0434\u043D\u044F",Jan:"\u0441\u0456\u0447.",Feb:"\u043B\u044E\u0442.",Mar:"\u0431\u0435\u0440.",Apr:"\u043A\u0432\u0456\u0442.","May(short)":"\u0442\u0440\u0430\u0432.",Jun:"\u0447\u0435\u0440\u0432.",Jul:"\u043B\u0438\u043F.",Aug:"\u0441\u0435\u0440\u043F.",Sep:"\u0432\u0435\u0440.",Oct:"\u0436\u043E\u0432\u0442.",Nov:"\u043B\u0438\u0441\u0442.",Dec:"\u0433\u0440\u0443\u0434.",Sunday:"\u043D\u0435\u0434\u0456\u043B\u044F",Monday:"\u043F\u043E\u043D\u0435\u0434\u0456\u043B\u043E\u043A",Tuesday:"\u0432\u0456\u0432\u0442\u043E\u0440\u043E\u043A",Wednesday:"\u0441\u0435\u0440\u0435\u0434\u0430",Thursday:"\u0447\u0435\u0442\u0432\u0435\u0440",Friday:"\u043F\u02BC\u044F\u0442\u043D\u0438\u0446\u044F",Saturday:"\u0441\u0443\u0431\u043E\u0442\u0430",Sun:"\u043D\u0434",Mon:"\u043F\u043D",Tue:"\u0432\u0442",Wed:"\u0441\u0440",Thu:"\u0447\u0442",Fri:"\u043F\u0442",Sat:"\u0441\u0431",_dateOrd:function(e){return""},"Zoom Out":"\u041C\u0430\u0441\u0448\u0442\u0430\u0431\u0443\u0432\u0430\u043D\u043D\u044F",Play:"\u0412\u0456\u0434\u0442\u0432\u043E\u0440\u044E\u0432\u0430\u0442\u0438",Stop:"\u0417\u0443\u043F\u0438\u043D\u043A\u0430",Legend:"\u041B\u0435\u0433\u0435\u043D\u0434\u0430","Press ENTER to toggle":"",Loading:"\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0443\u0454\u0442\u044C\u0441\u044F",Home:"\u0413\u043E\u043B\u043E\u0432\u043D\u0430 \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0430",Chart:"","Serial chart":"","X/Y chart":"","Pie chart":"","Gauge chart":"","Radar chart":"","Sankey diagram":"","Flow diagram":"","Chord diagram":"","TreeMap chart":"","Sliced chart":"",Series:"","Candlestick Series":"","OHLC Series":"","Column Series":"","Line Series":"","Pie Slice Series":"","Funnel Series":"","Pyramid Series":"","X/Y Series":"",Map:"\u043A\u0430\u0440\u0442\u0430","Press ENTER to zoom in":"","Press ENTER to zoom out":"","Use arrow keys to zoom in and out":"","Use plus and minus keys on your keyboard to zoom in and out":"",Export:"\u0414\u0440\u0443\u043A",Image:"\u0417\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F",Data:"\u0414\u0430\u043D\u0456",Print:"\u0414\u0440\u0443\u043A","Press ENTER to open":"","Press ENTER to print.":"","Press ENTER to export as %1.":"","(Press ESC to close this message)":"","Image Export Complete":"","Export operation took longer than expected. Something might have gone wrong.":"","Saved from":"",PNG:"",JPG:"",GIF:"",SVG:"",PDF:"",JSON:"",CSV:"",XLSX:"",HTML:"","Use TAB to select grip buttons or left and right arrows to change selection":"","Use left and right arrows to move selection":"","Use left and right arrows to move left selection":"","Use left and right arrows to move right selection":"","Use TAB select grip buttons or up and down arrows to change selection":"","Use up and down arrows to move selection":"","Use up and down arrows to move lower selection":"","Use up and down arrows to move upper selection":"","From %1 to %2":"\u0412\u0456\u0434 %1 \u0434\u043E %2","From %1":"\u0412\u0456\u0434 %1","To %1":"\u0414\u043E %1","No parser available for file: %1":"","Error parsing file: %1":"","Unable to load file: %1":"","Invalid date":"",Close:"",Minimize:"",Confirm:""};export{_ as default};
@@ -0,0 +1,4 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.71 */
4
+ import"./BFVSWDG2.js";var _={_decimalSeparator:",",_thousandSeparator:".",_percentPrefix:null,_percentSuffix:"%",_big_number_suffix_3:"k",_big_number_suffix_6:"M",_big_number_suffix_9:"G",_big_number_suffix_12:"T",_big_number_suffix_15:"P",_big_number_suffix_18:"E",_big_number_suffix_21:"Z",_big_number_suffix_24:"Y",_small_number_suffix_3:"m",_small_number_suffix_6:"\u03BC",_small_number_suffix_9:"n",_small_number_suffix_12:"p",_small_number_suffix_15:"f",_small_number_suffix_18:"a",_small_number_suffix_21:"z",_small_number_suffix_24:"y",_byte_suffix_B:"B",_byte_suffix_KB:"KB",_byte_suffix_MB:"MB",_byte_suffix_GB:"GB",_byte_suffix_TB:"TB",_byte_suffix_PB:"PB",_date_millisecond:"mm:ss SSS",_date_millisecond_full:"HH:mm:ss SSS",_date_second:"HH:mm:ss",_date_second_full:"HH:mm:ss",_date_minute:"HH:mm",_date_minute_full:"HH:mm - MMM dd, yyyy",_date_hour:"HH:mm",_date_hour_short:"HH",_date_hour_full:"HH:mm - MMM dd, yyyy",_date_day:"MMM dd",_date_day_full:"MMM dd, yyyy",_date_week:"ww",_date_week_full:"MMM dd, yyyy",_date_month:"MMM",_date_month_full:"MMM, yyyy",_date_year:"yyyy",_duration_millisecond:"SSS",_duration_millisecond_second:"ss.SSS",_duration_millisecond_minute:"mm:ss SSS",_duration_millisecond_hour:"hh:mm:ss SSS",_duration_millisecond_day:"d'd' mm:ss SSS",_duration_millisecond_week:"d'd' mm:ss SSS",_duration_millisecond_month:"M'm' dd'd' mm:ss SSS",_duration_millisecond_year:"y'y' MM'm' dd'd' mm:ss SSS",_duration_second:"ss",_duration_second_minute:"mm:ss",_duration_second_hour:"hh:mm:ss",_duration_second_day:"d'd' hh:mm:ss",_duration_second_week:"d'd' hh:mm:ss",_duration_second_month:"M'm' dd'd' hh:mm:ss",_duration_second_year:"y'y' MM'm' dd'd' hh:mm:ss",_duration_minute:"mm",_duration_minute_hour:"hh:mm",_duration_minute_day:"d'd' hh:mm",_duration_minute_week:"d'd' hh:mm",_duration_minute_month:"M'm' dd'd' hh:mm",_duration_minute_year:"y'y' MM'm' dd'd' hh:mm",_duration_hour:"hh'h'",_duration_hour_day:"d'd' hh'h'",_duration_hour_week:"d'd' hh'h'",_duration_hour_month:"M'm' dd'd' hh'h'",_duration_hour_year:"y'y' MM'm' dd'd' hh'h'",_duration_day:"d'd'",_duration_day_week:"d'd'",_duration_day_month:"M'm' dd'd'",_duration_day_year:"y'y' MM'm' dd'd'",_duration_week:"w'w'",_duration_week_month:"w'w'",_duration_week_year:"w'w'",_duration_month:"M'm'",_duration_month_year:"y'y' MM'm'",_duration_year:"y'y'",_era_ad:"M",_era_bc:"SM",A:"AM",P:"PM",AM:"AM",PM:"PM","A.M.":"AM","P.M.":"PM",January:"Januari",February:"Februari",March:"Maret",April:"April",May:"Mei",June:"Juni",July:"Juli",August:"Agustus",September:"September",October:"Oktober",November:"November",December:"Desember",Jan:"Jan",Feb:"Feb",Mar:"Mar",Apr:"Apr","May(short)":"Mei",Jun:"Jun",Jul:"Jul",Aug:"Agu",Sep:"Sep",Oct:"Okt",Nov:"Nov",Dec:"Des",Sunday:"Minggu",Monday:"Senin",Tuesday:"Selasa",Wednesday:"Rabu",Thursday:"Kamis",Friday:"Jumat",Saturday:"Sabtu",Sun:"Min",Mon:"Sen",Tue:"Sel",Wed:"Rab",Thu:"Kam",Fri:"Jum",Sat:"Sab",_dateOrd:function(a){let e="th";if(a<11||a>13)switch(a%10){case 1:e="st";break;case 2:e="nd";break;case 3:e="rd";break}return e},"Zoom Out":"Perkecil",Play:"Putar",Stop:"Hentikan",Legend:"Legenda","Press ENTER to toggle":"Klik, ketuk atau tekan ENTER untuk beralih",Loading:"Memuat",Home:"Beranda",Chart:"","Serial chart":"","X/Y chart":"","Pie chart":"","Gauge chart":"","Radar chart":"","Sankey diagram":"","Flow diagram":"","Chord diagram":"","TreeMap chart":"","Sliced chart":"",Series:"","Candlestick Series":"","OHLC Series":"","Column Series":"","Line Series":"","Pie Slice Series":"","Funnel Series":"","Pyramid Series":"","X/Y Series":"",Map:"Peta","Press ENTER to zoom in":"Tekan ENTER untuk memperbesar","Press ENTER to zoom out":"Tekan ENTER untuk memperkecil","Use arrow keys to zoom in and out":"Gunakan tombol panah untuk memperbesar dan memperkecil","Use plus and minus keys on your keyboard to zoom in and out":"Gunakan tombol plus dan minus pada keyboard Anda untuk memperbesar dan memperkecil",Export:"Cetak",Image:"Gambar",Data:"Data",Print:"Cetak","Press ENTER to open":"Klik, ketuk atau tekan ENTER untuk membuka","Press ENTER to print.":"Klik, ketuk atau tekan ENTER untuk mencetak","Press ENTER to export as %1.":"Klik, ketuk atau tekan ENTER untuk mengekspor sebagai %1","(Press ESC to close this message)":"Tekan ESC untuk menutup pesan ini","Image Export Complete":"Ekspor gambar selesai","Export operation took longer than expected. Something might have gone wrong.":"","Saved from":"",PNG:"",JPG:"",GIF:"",SVG:"",PDF:"",JSON:"",CSV:"",XLSX:"",HTML:"","Use TAB to select grip buttons or left and right arrows to change selection":"","Use left and right arrows to move selection":"","Use left and right arrows to move left selection":"","Use left and right arrows to move right selection":"","Use TAB select grip buttons or up and down arrows to change selection":"","Use up and down arrows to move selection":"","Use up and down arrows to move lower selection":"","Use up and down arrows to move upper selection":"","From %1 to %2":"Dari %1 ke %2","From %1":"Dari %1","To %1":"Ke %1","No parser available for file: %1":"","Error parsing file: %1":"","Unable to load file: %1":"","Invalid date":"",Close:"",Minimize:"",Confirm:""};export{_ as default};
@@ -0,0 +1,4 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.71 */
4
+ import{i as S,j as I,k as A,l as Le,m as qe,o as Ne}from"./O5QIWSHX.js";import b from"./G7H6G5ED.js";import a from"./74QFMBZK.js";import{d as ee,f as D,i as ce,q as ie,w as fe}from"./3IMEL6HX.js";import{a as k}from"./EQJEG56R.js";import{a as w,b as h,f as ge,h as $,k as z,n as U,o as de,v as j,w as ye}from"./JCU2ABRL.js";export default $arcgis.t(([,,,,,,,{substitute:C},,,,,,,,{Bc:ae,Cc:he,Dc:Ae,Ec:R,Ed:W,Fc:G,Fd:oe,Hb:Te,L:B,N:L,O:me,P:_,Q:ue,R:xe,Rc:K,Sc:Be,Tc:H,Vc:q,ba:pe,da:Fe,e:E,ea:be,ga:ve,nb:X,sb:Se,uc:se,vb:N,w:v,za:te,zb:Ie},{c:V,d:Z,f:ne}])=>{async function _e(i){let{config:e,layer:t,xAxisField:s,splitByField:a,layerFieldsInfo:o,aggregationFields:n,fetchNullValues:l}=i,r=o.filter(F=>F.name===a)[0]?.type,m=l!==!0?`${a} IS NOT NULL`:"",x=s&&l!==!0?`${s} IS NOT NULL`:"",{where:c}=e?.dataFilters??{},p={where:se([c,m,x]),orderByFields:Ie(a)?[]:[`${a} ${$.Ascending}`],geometry:e?.dataFilters?.geometry},u=t,d="";n.length===0?d=u?.objectIdField??"":[d]=n;let y=await oe({queryObject:u,category:e?.series[0].x??"",splitByField:a,queryConfig:p});if(e){let F=e?.series.map(f=>K({where:f.query?.where})?.toString()??"").filter(f=>f!==void 0&&f!=="");y=Te({arrayA:y,arrayB:F,getKey:f=>f===null?null:f?.toString()})}return{categoriesArray:y,splitByFieldType:r,numericalField:d}}function ji(i,e){let t=e==="";for(let s of i)if(e===s.name){t=!0;break}return t}function Vi(i,e){let t=Ae(i),s=e.length===0,a=0;for(let o of e){for(let n of t)if(o===n&&(a+=1),a===e.length){s=!0;break}if(s)break}return s}function Di(i,e){e.forEach(t=>{Object.getOwnPropertyNames(t.prototype).forEach(s=>{Object.defineProperty(i.prototype,s,Object.getOwnPropertyDescriptor(t.prototype,s)||Object.create(null))})})}async function Re(i){let{layerInfo:e,config:t,category:s}=i,{layer:a}=e,{where:o}=t?.dataFilters??{},{fetchNullValues:n}=t?.series?.[0]?.query??{},l=n!==!0?`${s} IS NOT NULL`:"",r={where:se([o,l]),orderByFields:[],geometry:t?.dataFilters?.geometry},m=R(a);return(await oe({queryObject:a,category:s,queryConfig:r})).map(x=>{let c=String(x);return G({fieldName:s,fieldValueToMatch:c,subtypeInfo:m,fieldList:e.layerFieldsInfo})??c})}function Me(i,e,t){let s=i?.axes?.[e];s?.title!==void 0?s.title.content.text=t:s!==void 0&&(s.title=L({text:t,visible:!0,font:B(v.AxisTitle)}))}function Ce(i){let{config:e,layerInfo:t,commonStrings:s,numericFields:a,aggregationType:o}=i,n="";if(e)if(Se(e)===ge.Stacked100)n=s.utilsStrings.statistics.percent;else{let l=te(o,s);if(a.length===1){let r=N(t.layerFieldsInfo,a[0]);o===h.NoAggregation?n=r:o===h.Count&&a[0]===t.objectIdField?n=s.utilsStrings.statistics.count:n=C(s.axisLabels.aggregationOfFieldName,{aggregation:l,fieldName:r})}else a.length>1&&(o===h.NoAggregation?n=s.axisLabels.values:n=C(s.axisLabels.aggregationOfValues,{aggregation:l}))}return n}var Oe=(i,e,t)=>i.axes?.[e]??pe(t,i.type)[e],ke=i=>{let{config:e,axis:t,axisIndex:s}=i;e.axes!==void 0&&(e.axes[s]=t)},$i=i=>{let{config:e,axisIndex:t,isMax:s}=i,a=Number.NaN;return s?a=e.axes?.[t]?.maximum:a=e.axes?.[t]?.minimum,a??Number.NaN},b=i=>{let{config:e,value:t,axisIndex:s,isMax:a}=i,o=e?.axes?.[s];o!==void 0&&(a?o.maximum=t:o.minimum=t)},Ei=(i,e)=>{b({config:i,value:e,axisIndex:0,isMax:!1})},je=i=>i.axes?.[0]?.valueFormat??_(),Ge=(i,e,t)=>{let s=Oe(i,0,e);if(s!==void 0&&t!==void 0){let a={...s,valueFormat:t};ke({config:i,axis:a,axisIndex:0})}},we=(i,e,t)=>{let s=i.axes?.[e];s!==void 0&&(s.integerOnlyValues=t)},Ke=i=>{let e=ye(i.series);return e===w.BarSeries||e===w.ComboLineAndBarSeries||e===w.LineSeries},He=i=>{let{axisIndex:e,config:t,isMultiAxis:s}=i,a=!1;return e===0||e===1&&s?a=!0:e===2&&(a=Ke(t)),a},Xi=i=>{let{axisIndex:e,func:t,config:s}=i;return He({axisIndex:e,config:s,isMultiAxis:!0})?t(e):void 0},Pi=(i,e)=>{let t,s=e.axes?.[i]?.valueFormat;return(i===0||i>=1&&Ne(s))&&(t=s),t},zi=i=>{let{config:e,commonStrings:t,valueFormat:s,axisIndex:a=0}=i,o=Oe(e,a,t);if(o!==void 0&&s!==void 0){let n={...o,valueFormat:s};ke({config:e,axis:n,axisIndex:a})}},Ui=(i,e)=>i.axes?.[e]?.isLogarithmic??!1,_i=i=>{let{config:e,isLogarithmic:t,axisIndex:s}=i,a=e.axes?.[s];a&&(a.isLogarithmic=t,b({config:e,value:null,axisIndex:s,isMax:!0}),b({config:e,value:null,axisIndex:s,isMax:!1}))},Ri=i=>{let{config:e,scrollbar:t,axisIndex:s}=i;e.axes?.[s]!==void 0&&(e.axes[s].scrollbar=t)},Gi=i=>i.version,We=i=>i.title?.content.text??"",Ki=(i,e)=>{e.title!==void 0?e.title.content.text=i:e.title===void 0&&i!==void 0&&(e.title=L({text:i,visible:!0,font:B(v.ChartTitle)}))},Hi=i=>i.subtitle?.content.text??"",Wi=(i,e)=>{e.subtitle!==void 0?e.subtitle.content.text=i:e.subtitle===void 0&&i!==void 0&&(e.subtitle=L({text:i,visible:!0,font:B(v.ChartSubtitle)}))},Zi=i=>i.footer?.content.text??"",Ji=(i,e)=>{e.footer!==void 0?e.footer.content.text=i:e.footer===void 0&&i!==void 0&&(e.footer=L({text:i,visible:!0,font:B(v.DescriptionText)}))},Qi=i=>i.title?i.title.visible??!0:!1,Yi=(i,e)=>{e.title!==void 0?e.title.visible=i:e.title===void 0&&(e.title=L({text:"",visible:i,font:B(v.ChartTitle)}))},et=i=>i.subtitle?i.subtitle.visible??!0:!1,it=(i,e)=>{e.subtitle!==void 0?e.subtitle.visible=i:e.subtitle===void 0&&(e.subtitle=L({text:"",visible:i,font:B(v.ChartSubtitle)}))},Ze=i=>i.footer?.visible??!1,tt=(i,e)=>{e.footer!==void 0?e.footer.visible=i:e.footer===void 0&&i!==Ze(e)&&(e.footer=L({text:"",visible:!0,font:B(v.DescriptionText)}))},st=i=>i.chartRenderer,at=(i,e)=>{e.chartRenderer=i},ot=(i,e)=>i.axes?.[e]?.title?.content,nt=i=>{let{config:e,axisIndex:t,symbol:s}=i,a=e.axes?.[t];if(a!==void 0){let o=a.title?.content.text;(a.title===void 0||s===void 0)&&(a.title=L({text:"",visible:!0,font:B(v.AxisTitle),type:v.AxisTitle})),s!==void 0&&(a.title.content=s),a.title.content.text=o}},rt=i=>{for(let e of i.axes??[])if(e?.labels!==void 0)return e.labels.content},lt=(i,e)=>{for(let t of e.axes??[])if(t!==void 0){let s=t.labels?.content.text;i===void 0?t.labels=L({text:"",visible:!0,font:B(v.AxisLabels),type:v.AxisLabels}):t.labels.content=D(i),t.labels.content.text=s}},ct=i=>{for(let e of i.axes??[])if(e?.lineSymbol!==void 0)return e.lineSymbol},gt=(i,e)=>{for(let t of e.axes??[])t!==void 0&&(t.lineSymbol=D(i)??me())},dt=i=>{for(let e of i.axes??[])if(e?.grid!==void 0)return e.grid},yt=(i,e,t)=>{let s=e.axes;t.forEach(a=>{s?.[a]!==void 0&&(s[a].grid=D(i))})},re=(i,e)=>e.axes?.[i]?.title?.content.text??"",ft=(i,e,t)=>{let s=t.axes?.[e];s?.title!==void 0?s.title.content.text=i:s!==void 0&&s?.title===void 0&&(s.title=L({text:i,visible:!0,font:B(v.AxisTitle)}))},mt=(i,e)=>e.axes?.[i]?.title?.visible??!1,ut=(i,e,t)=>{let s=t.axes?.[e];s?.title!==void 0?s.title.visible=i:s!==void 0&&s?.title===void 0&&(s.title=L({text:re(e,t),visible:i,font:B(v.AxisTitle)}))},xt=(i,e)=>i.axes?.[e]?.displayZeroLine??!1,pt=(i,e,t)=>{i.axes?.[t]!==void 0&&(i.axes[t].displayZeroLine=e)},Ft=(i,e)=>i.axes?.[e]?.displayCursorTooltip??!1,bt=i=>{let{config:e,displayCursorTooltip:t,axisIndex:s}=i;e.axes?.[s]!==void 0&&(e.axes[s].displayCursorTooltip=t)},vt=(i,e)=>i.axes?.[e]?.buffer??!1,St=i=>{let{config:e,buffer:t,axisIndex:s}=i,a=e.axes?.[s];a!==void 0&&(a.buffer=t)},It=(i,e)=>i.axes?.[e]?.tickSpacing,Tt=i=>{let{config:e,tickSpacing:t,axisIndex:s}=i;e.axes?.[s]!==void 0&&(e.axes[s].tickSpacing=t)},ht=(i,e)=>i.axes?.[e]?.integerOnlyValues??!1,At=i=>{let{config:e,integerOnlyValues:t,axisIndex:s}=i;e.axes?.[s]!==void 0&&(e.axes[s].integerOnlyValues=t)},Bt=(i,e)=>{e.series.forEach(t=>{t.query&&(t.query.fetchNullValues=i)})},Lt=i=>i.series.some(e=>e.query?.fetchNullValues),qt=i=>i.series.map(e=>String(K({where:e.query?.where}))).filter(e=>e!==void 0&&e.trim()!==""),Nt=i=>i.dataFilters,Mt=(i,e)=>{i!==void 0?e.dataFilters=i:delete e.dataFilters},Je=i=>{let e,t=i.series[0];return q(t)&&(e=t.temporalBinning?.size),e},Qe=i=>{let e,t=i.series[0];return q(t)&&(e=t.temporalBinning?.unit),e},Ye=i=>{let e,t=i.series[0];return q(t)&&(e=t.temporalBinning?.timeAggregationType),e},ei=i=>{let e,t=i.series[0];return q(t)&&(e=t.temporalBinning?.trimIncompleteTimeInterval),e},ii=i=>{let e,t=i.series[0];return q(t)&&(e=t.temporalBinning?.nullPolicy),e},Ve=(i,e)=>{e?.series?.forEach(t=>{q(t)&&(t.temporalBinning??={},t.temporalBinning.size=i)}),b({config:e,value:null,axisIndex:1,isMax:!1}),b({config:e,value:null,axisIndex:1,isMax:!0})},ti=(i,e)=>{e?.series?.forEach(t=>{q(t)&&(t.temporalBinning??={},t.temporalBinning.nullPolicy=i)}),b({config:e,value:null,axisIndex:1,isMax:!1}),b({config:e,value:null,axisIndex:1,isMax:!0})},wt=(i,e)=>{e.series?.forEach(t=>{q(t)&&(t.temporalBinning??={},t.temporalBinning.unit=i)}),b({config:e,value:null,axisIndex:1,isMax:!1}),b({config:e,value:null,axisIndex:1,isMax:!0})},Ct=(i,e)=>{e.series?.forEach(t=>{q(t)&&(t.temporalBinning??={},t.temporalBinning.timeAggregationType=i)}),b({config:e,value:null,axisIndex:1,isMax:!1}),b({config:e,value:null,axisIndex:1,isMax:!0})},Ot=(i,e)=>{e.series?.forEach(t=>{q(t)&&(t.temporalBinning??={},t.temporalBinning.trimIncompleteTimeInterval=i)}),b({config:e,value:null,axisIndex:1,isMax:!1}),b({config:e,value:null,axisIndex:1,isMax:!0})},kt=i=>{Ve(0,i)},jt=(i,e)=>e.series[i]?.id,Vt=(i,e)=>e.series.findIndex(t=>t.id===i),si=i=>i.series.length??0,Dt=(i,e)=>e.series[i].visible??!0;function $t(i,e){let t;return i.length!==0&&e<i.length&&(t=i[e].dataTooltipValueFormat),t}function Et(i){let{series:e,seriesIndex:t,valueFormat:s}=i;e.length!==0&&t<e.length&&(e[t].dataTooltipValueFormat=s)}function P(i){let{seriesIndex:e,xAxisField:t,aggregationType:s,config:a,layerInfo:o,commonStrings:n}=i,{objectIdField:l}=o??{},r,m=a.series[e??0],x=!1,c=!1;if(m===void 0){let d=a.series;x=d.slice(0,e).every(y=>S(y)),c=d.slice(0,e).every(y=>I(y))}else x=S(m),c=I(m);x?r=Fe({commonStrings:n,seriesIndex:e,objectIDField:l}):c?r=be({commonStrings:n,seriesIndex:e,objectIDField:l}):r=ve({seriesIndex:e,objectIDField:l,commonStrings:n});let p=a.series[0]?.dataLabels,u={...r,x:t,y:"",dataLabels:{...r.dataLabels,type:r.dataLabels?.type??w.Text,content:{...r.dataLabels?.content,...p?.content,type:fe.TS},visible:p?.visible??!1}};if(u.query={groupByFieldsForStatistics:[t]},s!==h.NoAggregation&&l!==void 0){let d=`${s}_${l}_0`.toUpperCase();u.y=d,u.query.outStatistics=[{statisticType:s,onStatisticField:l,outStatisticFieldName:d}]}if(S(u)||I(u)||A(u)&&a.series[0]?.binTemporalData){let d;if(a?.series?.[0]!==void 0&&(d=H(a.series)),d!==X.BarAndLineNoAggregation&&d!==X.BarAndLineSplitByNoAggregation){let y=Qe(a);y===z.Quarter&&(y=z.Month),u.temporalBinning={size:Je(a),unit:y,timeAggregationType:Ye(a),trimIncompleteTimeInterval:ei(a),nullPolicy:ii(a)}}}return D(u)}function De(i,e,t){let{layerFieldsInfo:s,objectIdField:a}=e,o=V(i),n=le(i),l=Ee(i),r=J(i),m=n.length===0||n.includes(a),x=te(l,t),c=m?"":n.map(g=>N(s??[],g)).join(", "),p=N(s??[],o),u=N(s??[],r),d=i.series.some(g=>A(g)),y=d?"category":"xAxisField",F=p,f="";if(ne({fieldName:o,numericFields:n,fieldList:s}))f=C(t.titleLabels.aggrTypeOfAggrFields,{aggregationType:x,aggregationFields:c});else if(l===h.NoAggregation){let g=m?a:c;if(r===""){let O=d?"aggrTypeCategory":"aggrTypeXAxisField";f=C(t.titleLabels[O],{aggregationType:g,[y]:F})}else{let O=d?"aggrTypeCategoryBySplitBy":"aggrTypeXAxisFieldBySplitBy";f=C(t.titleLabels[O],{aggregationType:g,[y]:F,splitByField:u})}}else if(l===h.Count)if(r===""){let g=d?"aggrTypeCategory":"aggrTypeXAxisField";f=C(t.titleLabels[g],{aggregationType:x,[y]:F})}else{let g=d?"aggrTypeCategoryBySplitBy":"aggrTypeXAxisFieldBySplitBy";f=C(t.titleLabels[g],{aggregationType:x,[y]:F,splitByField:u})}else if(r!==""){let g=d?"aggrTypeOfAggrFieldByCategoryBySplitByField":"aggrTypeOfAggrFieldByXAxisFieldBySplitByField";f=C(t.titleLabels[g],{aggregationType:x,aggregationField:c,[y]:F,splitByField:u})}else if(n.length>0){let g=d?"aggrTypeOfAggrFieldsByCategory":"aggrTypeOfAggrFieldsByXAxisField";f=C(t.titleLabels[g],{aggregationType:x,aggregationFields:c,[y]:F})}return f}var $e=i=>K({where:i.query?.where,normalize:!1,escape:!1})??"",Ee=i=>i?.series?.[0]?.query?.outStatistics?.[0]?.statisticType??h.NoAggregation,J=ee(i=>{let e=i?.series?.[0]?.query?.where?.split("=")[0].trim()??"";return Be(i?.series?.[0]?.query?.where)?"":e},i=>i?.series?.[0]?.query?.where),le=ee(i=>{let e=[];if(J(i)==="")e=i?.series.map(t=>{let s=t.query?.outStatistics?.map(a=>a.onStatisticField)??[];return s?.length>0?s:t.y}).flat()??[];else{let t=i?.series?.[0],s=t?.query?.outStatistics?.[0]?.onStatisticField??[t?.y].flat()[0];e=s!==void 0?[s]:[]}return[...new Set(e.filter(t=>t!==""))]},i=>i?.series);function ai(i){let{numericFields:e,aggregationType:t,config:s,layerInfo:a}=i,o=!1;t===h.Count?o=!0:t===h.NoAggregation&&(o=e.every(r=>{let m=a.layerFieldsInfo.find(x=>x.name===r);return m!==void 0?ae(m):!1})),we(s,1,o);let n=s.series.some(r=>S(r)),l=s.series.some(r=>I(r));if(n||l){let r=V(s),m=a.layerFieldsInfo.find(c=>c.name===r),x=m!==void 0&&ae(m);we(s,0,x)}}var oi=i=>{let e=k.xAxisAsc,t=i.orderOptions?.data?.orderType??j.Category,s=i.orderOptions?.data?.orderBy??$.Ascending;return t===j.Category&&Array.isArray(s)?e=k.customSort:t===j.Category?s===$.Ascending?e=k.xAxisAsc:e=k.xAxisDesc:s===$.Ascending?e=k.yAxisAsc:e=k.yAxisDesc,e};function ni(i){let{xAxisField:e,numericFields:t,aggregationType:s,config:a,layerInfo:o,commonStrings:n}=i,{layerFieldsInfo:l}=o,r=!1,m=P({config:a,xAxisField:e,aggregationType:s,layerInfo:o,seriesIndex:0,commonStrings:n}),x=Z({config:a,xAxisField:e,numericFields:t,aggregationType:s,layer:o.layer,fieldList:l}).name,c={...m,id:`series_${Date.now()}`,name:n.axisLabels.values,x:E,y:x},p=[];for(let d of t)p.push({onStatisticField:d,outStatisticFieldName:`${d}_0`.toUpperCase(),statisticType:s});c.query={outStatistics:p};let u=a.series[0];return u!==void 0&&(c.id=u.id,a.colorMatch||(A(u)&&A(c)?c.fillSymbol=u.fillSymbol:(S(c)&&S(u)||I(c)&&I(u))&&(c.lineSymbol=u.lineSymbol,c.markerSymbol=u.markerSymbol),r=!0),c.id=u.id,u.name!==m.name&&(c.name=u.name)),a.series.length===1&&!a.colorMatch&&(A(c)?c.fillSymbol=a.series[0].fillSymbol:(S(c)||I(c))&&(c.lineSymbol=a.series[0].lineSymbol,c.markerSymbol=a.series[0].markerSymbol),r=!0),a.colorMatch=!r,[c]}function Xe(i){let{xAxisField:e,numericFields:t,aggregationType:s,config:a,layerInfo:o,commonStrings:n}=i,{layerFieldsInfo:l,objectIdField:r}=o,m=[],x=!1;for(let c=0;c<t.length;c+=1){let p=P({config:a,xAxisField:e,aggregationType:s,layerInfo:o,seriesIndex:c,commonStrings:n}),u=Z({config:a,xAxisField:e,numericFields:t,aggregationType:s,layer:o.layer,numericFieldIndex:c,fieldList:l}).name,d=t[c],y={...p,query:{...p.query}};d!==r&&(y={...y,id:d,name:N(l,d)});let F=d;y.query!==void 0&&(s!==h.NoAggregation?(F=u,y.query.outStatistics=[{...p.query?.outStatistics?.[0]??{},onStatisticField:d,outStatisticFieldName:u,statisticType:s}]):delete y.query.outStatistics),y.y=F;let f=a.series.find(g=>g.query?.outStatistics?.[0]?.onStatisticField===d&&g.query.where===void 0);if(f!==void 0&&typeof f.y=="string"&&f.y.trim()!==""){a.colorMatch||(A(y)&&A(f)?y.fillSymbol=f.fillSymbol:(S(y)&&S(f)||I(y)&&I(f))&&(y.lineSymbol=f.lineSymbol,y.markerSymbol=f.markerSymbol),x=!0);let g=P({config:a,xAxisField:e,aggregationType:s,layerInfo:o,seriesIndex:c,commonStrings:n});y.id=f.id,f.id!==g.id&&f.name!==g.name&&(y.id=f.id,y.name=f.name)}m.push(y)}return a.series.length===1&&m.length===1&&!a.colorMatch&&(A(a.series[0])&&A(m[0])?m[0].fillSymbol=a.series[0].fillSymbol:(S(a.series[0])&&S(m[0])||I(a.series[0])&&I(m[0]))&&(m[0].lineSymbol=a.series[0].lineSymbol,m[0].markerSymbol=a.series[0].markerSymbol),x=!0),a.colorMatch=!x,m}async function ri(i){let{splitByField:e,xAxisField:t,numericFields:s,aggregationType:a,config:o,layerInfo:n,commonStrings:l}=i,{layer:r,layerFieldsInfo:m}=n,{fetchNullValues:x}=o?.series?.[0]?.query??{},c=t!==E?t:void 0,{categoriesArray:p,splitByFieldType:u,numericalField:d}=await _e({config:o,layer:r,layerFieldsInfo:m,xAxisField:c,aggregationFields:s,splitByField:e,fetchNullValues:x}),y=[],F=!1;if(p.length===0){y=Xe({xAxisField:t,numericFields:s,aggregationType:a,config:o,layerInfo:n,commonStrings:l});for(let f of y)f.query&&(f.query.where=`${e}=''`)}else for(let f=0;f<p.length;f+=1){let g=p[f],O=Z({config:o,xAxisField:t,numericFields:s,aggregationType:a,layer:n.layer,seriesIndex:f,splitByField:e,fieldList:m}).name,Q=P({config:o,xAxisField:t,aggregationType:a,layerInfo:n,seriesIndex:f,commonStrings:l}),Pe={fieldName:e,fieldValueToMatch:g??"",subtypeInfo:R(n.layer),fieldList:n.layerFieldsInfo},ze=G(Pe),Y=`${g}`,T={...Q,id:Y,name:ze??Y,y:O,query:{...Q.query,where:`${e}=${u===ie.String&&g!==null?`'${g}'`:g}`,outStatistics:a!==h.NoAggregation?[{...Q.query?.outStatistics?.[0]??{},onStatisticField:d,outStatisticFieldName:O,statisticType:a}]:void 0}};a===h.NoAggregation&&(T.query!==void 0&&(delete T.query.outStatistics,delete T.query.groupByFieldsForStatistics),T.y=d);let M=o.series.find(Ue=>String($e(Ue)).trim().replace(/'/gu,"")===Y);M!==void 0&&(o.colorMatch||(A(T)&&A(M)?T.fillSymbol=M.fillSymbol:(S(T)&&S(M)||I(T)&&I(M))&&(T.lineSymbol=M.lineSymbol,T.markerSymbol=M.markerSymbol),F=!0),T.id=M.id,T.name=M.name),y.push(T)}return o.colorMatch=!F,y}var Xt=async i=>{let{xAxisField:e,splitByField:t,numericFields:s,aggregationType:a,config:o,layerInfo:n,commonStrings:l}=i,{layerFieldsInfo:r}=n??{},m=si(o),x=V(o),c=li(o,n,l),p=ci(o,n,l),u=gi(o,n),d=je(o),y=o.series.some(g=>A(g)),F=Le(o.series),f=qe(o.series);if(r!==void 0){let g=he(r);!g.includes(x)&&g.includes(e)?d=ue():g.includes(x)&&!g.includes(e)&&(y?d=_():d=xe()),r.find(O=>O.name===e)?.type===ie.String&&(d=_()),d!==void 0&&Ge(o,l,d)}if(m===0&&(o.series=[P({config:o,xAxisField:e,aggregationType:a,layerInfo:n,commonStrings:l})]),o.series.forEach(g=>{g.x=e,g.query!==void 0&&(g.query.groupByFieldsForStatistics=[e])}),t===""||s.length>1?ne({fieldName:e,numericFields:s,fieldList:r})?o.series=ni({config:o,layerInfo:n,xAxisField:e,numericFields:s,aggregationType:a,commonStrings:l}):o.series=Xe({config:o,layerInfo:n,xAxisField:e,numericFields:s,aggregationType:a,commonStrings:l}):(await Promise.resolve(),o.series=await ri({config:o,layerInfo:n,splitByField:t,xAxisField:e,numericFields:s,aggregationType:a,commonStrings:l})),u){let g=N(r,e);Me(o,0,g)}if(p){let g=Ce({config:o,layerInfo:n,commonStrings:l,numericFields:s,aggregationType:a});Me(o,1,g)}if(o.title&&c&&(o.title.content.text=De(o,n,l)),b({config:o,value:null,axisIndex:1,isMax:!1}),b({config:o,value:null,axisIndex:1,isMax:!0}),ai({numericFields:s,aggregationType:a,config:o,layerInfo:n}),F||f){b({config:o,value:null,axisIndex:0,isMax:!1}),b({config:o,value:null,axisIndex:0,isMax:!0}),Ve(0,o);let g=d?.type===w.DateAxisFormat?U.Null:U.Interpolate;ti(g,o)}},Pt=i=>{let{config:e,seriesIndex:t,layerInfo:s,commonStrings:a}=i,o=e.series?.[t],n=J(e),l;if(H(e.series)===X.BarAndLineFromFields)l=a.axisLabels.values;else if(ce(n)){let r=o.query?.outStatistics?.[0]?.onStatisticField;r!==void 0&&r!==s.objectIdField&&(l=N(s.layerFieldsInfo,r))}else{let r=String($e(o)).trim().replace(/'/gu,""),m={fieldName:J(e),fieldValueToMatch:r??"",subtypeInfo:R(s.layer),fieldList:s.layerFieldsInfo};l=G(m)??r}return l??o.id},zt=(i,e)=>{e.orderOptions??={};let t=e.orderOptions?.data?.orderType;oi(e)===k.customSort&&t===j.Category&&(e.orderOptions.data={orderType:j.Category,orderBy:[...i]})},Ut=async(i,e)=>{let t=V(i),s=je(i)?.type,a=le(i),o=H(i.series),n=[];return s===w.CategoryAxisFormat&&(o===X.BarAndLineFromFields||t===E?n=a.map(l=>N(e?.layerFieldsInfo,l)):t.trim()!==""&&t!==E&&e!==void 0&&(n=await Re({layerInfo:e,config:i,category:t}))),n};function li(i,e,t){let s=De(i,e,t),a=We(i),o=W(i);return s===a||o}function ci(i,e,t){let s=Ce({config:i,layerInfo:e,commonStrings:t,numericFields:le(i),aggregationType:Ee(i)}),a=re(1,i),o=W(i);return s===a||o}function gi(i,e){let t=N(e.layerFieldsInfo,V(i)),s=re(0,i),a=W(i);return t===s||a}function _t(i){return i.series[0]?.binTemporalData??!1}function Rt(i,e){e?.series.forEach(t=>{(t?.type===w.BarSeries||t?.type===w.LineSeries)&&(t.binTemporalData=i,i?t.temporalBinning={unit:z.Day,size:0,timeAggregationType:de.Start,trimIncompleteTimeInterval:!0,nullPolicy:U.Null}:delete t.temporalBinning)})}return{a:_e,b:ji,c:Vi,d:Di,e:Re,f:Me,g:Ce,h:$i,i:b,j:Ei,k:je,l:Ge,m:we,n:Xi,o:Pi,p:zi,q:Ui,r:_i,s:Ri,t:Gi,u:We,v:Ki,w:Hi,x:Wi,y:Zi,z:Ji,A:Qi,B:Yi,C:et,D:it,E:Ze,F:tt,G:st,H:at,I:ot,J:nt,K:rt,L:lt,M:ct,N:gt,O:dt,P:yt,Q:re,R:ft,S:mt,T:ut,U:xt,V:pt,W:Ft,X:bt,Y:vt,Z:St,_:It,$:Tt,aa:ht,ba:At,ca:Bt,da:Lt,ea:qt,fa:Nt,ga:Mt,ha:Je,ia:Qe,ja:Ye,ka:ei,la:ii,ma:Ve,na:ti,oa:wt,pa:Ct,qa:Ot,ra:kt,sa:jt,ta:Vt,ua:si,va:Dt,wa:$t,xa:Et,ya:De,za:Ee,Aa:J,Ba:le,Ca:oi,Da:Xt,Ea:Pt,Fa:zt,Ga:Ut,Ha:_t,Ia:Rt}},"geometry/support/jsonUtils","rest/support/AttributeBinsQuery","rest/support/Query","rest/support/StatisticDefinition","time/TimeExtent","core/promiseUtils","request","intl","Graphic","renderers/support/jsonUtils","symbols/support/symbolUtils","layers/support/FeatureFilter","smartMapping/statistics/histogram","smartMapping/statistics/summaryStatistics","AttributeBinsGraphic",a,b)
@@ -0,0 +1,129 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.71 */
4
+ import"./BFVSWDG2.js";var G=function(o,e){return(G=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,s){t.__proto__=s}||function(t,s){for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(t[r]=s[r])})(o,e)};function u(o,e){function t(){this.constructor=o}G(o,e),o.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function H(o,e,t,s){return new(t||(t=Promise))((function(r,i){function n(p){try{c(s.next(p))}catch(l){i(l)}}function a(p){try{c(s.throw(p))}catch(l){i(l)}}function c(p){var l;p.done?r(p.value):(l=p.value,l instanceof t?l:new t((function(d){d(l)}))).then(n,a)}c((s=s.apply(o,e||[])).next())}))}function z(o,e){var t,s,r,i,n={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(c){return function(p){return(function(l){if(t)throw new TypeError("Generator is already executing.");for(;n;)try{if(t=1,s&&(r=2&l[0]?s.return:l[0]?s.throw||((r=s.return)&&r.call(s),0):s.next)&&!(r=r.call(s,l[1])).done)return r;switch(s=0,r&&(l=[2&l[0],r.value]),l[0]){case 0:case 1:r=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,s=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(r=n.trys,!((r=r.length>0&&r[r.length-1])||l[0]!==6&&l[0]!==2)){n=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){n.label=l[1];break}if(l[0]===6&&n.label<r[1]){n.label=r[1],r=l;break}if(r&&n.label<r[2]){n.label=r[2],n.ops.push(l);break}r[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(o,n)}catch(d){l=[6,d],s=0}finally{t=r=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}})([c,p])}}}function E(){for(var o=0,e=0,t=arguments.length;e<t;e++)o+=arguments[e].length;var s=Array(o),r=0;for(e=0;e<t;e++)for(var i=arguments[e],n=0,a=i.length;n<a;n++,r++)s[r]=i[n];return s}var h=(function(){function o(){}return o.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},o.setAttributes=function(e,t){for(var s=0,r=t;s<r.length;s++){var i=r[s],n=i[0],a=i[1];e.setAttribute(n,a)}},o.createRect=function(e,t,s){var r=document.createElementNS("http://www.w3.org/2000/svg","rect");return r.setAttribute("width",e.toString()),r.setAttribute("height",t.toString()),s&&o.setAttributes(r,s),r},o.createLine=function(e,t,s,r,i){var n=document.createElementNS("http://www.w3.org/2000/svg","line");return n.setAttribute("x1",e.toString()),n.setAttribute("y1",t.toString()),n.setAttribute("x2",s.toString()),n.setAttribute("y2",r.toString()),i&&o.setAttributes(n,i),n},o.createPolygon=function(e,t){var s=document.createElementNS("http://www.w3.org/2000/svg","polygon");return s.setAttribute("points",e),t&&o.setAttributes(s,t),s},o.createCircle=function(e,t){var s=document.createElementNS("http://www.w3.org/2000/svg","circle");return s.setAttribute("cx",(e/2).toString()),s.setAttribute("cy",(e/2).toString()),s.setAttribute("r",e.toString()),t&&o.setAttributes(s,t),s},o.createEllipse=function(e,t,s){var r=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return r.setAttribute("cx",(e/2).toString()),r.setAttribute("cy",(t/2).toString()),r.setAttribute("rx",(e/2).toString()),r.setAttribute("ry",(t/2).toString()),s&&o.setAttributes(r,s),r},o.createGroup=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","g");return e&&o.setAttributes(t,e),t},o.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},o.createMarker=function(e,t,s,r,i,n,a){var c=document.createElementNS("http://www.w3.org/2000/svg","marker");return o.setAttributes(c,[["id",e],["orient",t],["markerWidth",s.toString()],["markerHeight",r.toString()],["refX",i.toString()],["refY",n.toString()]]),c.appendChild(a),c},o.createText=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","text");return t.setAttribute("x","0"),t.setAttribute("y","0"),e&&o.setAttributes(t,e),t},o.createTSpan=function(e,t){var s=document.createElementNS("http://www.w3.org/2000/svg","tspan");return s.textContent=e,t&&o.setAttributes(s,t),s},o.createImage=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","image");return e&&o.setAttributes(t,e),t},o.createPoint=function(e,t){var s=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return s.x=e,s.y=t,s},o.createPath=function(e,t){var s=document.createElementNS("http://www.w3.org/2000/svg","path");return s.setAttribute("d",e),t&&o.setAttributes(s,t),s},o})(),R=(function(){function o(){}return o.addKey=function(e){o.key=e},Object.defineProperty(o,"isLicensed",{get:function(){return!!o.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(o.key)},enumerable:!1,configurable:!0}),o})(),J=(function(){function o(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return o.prototype.rasterize=function(e,t,s){var r=this;return new Promise((function(i){var n=s!==void 0?s:document.createElement("canvas");e===null&&(r.markersOnly=!0,r.naturalSize=!1);var a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("width",t.width.baseVal.valueAsString),a.setAttribute("height",t.height.baseVal.valueAsString),a.setAttribute("viewBox","0 0 "+t.viewBox.baseVal.width.toString()+" "+t.viewBox.baseVal.height.toString()),a.innerHTML=t.innerHTML,r.naturalSize===!0?(a.width.baseVal.value=e.naturalWidth,a.height.baseVal.value=e.naturalHeight):r.width!==void 0&&r.height!==void 0&&(a.width.baseVal.value=r.width,a.height.baseVal.value=r.height),n.width=a.width.baseVal.value,n.height=a.height.baseVal.value;var c=a.outerHTML,p=n.getContext("2d");r.markersOnly!==!0&&p.drawImage(e,0,0,n.width,n.height);var l=window.URL,d=new Image(n.width,n.height);d.setAttribute("crossOrigin","anonymous");var f=new Blob([c],{type:"image/svg+xml"}),C=l.createObjectURL(f);d.onload=function(){p.drawImage(d,0,0),l.revokeObjectURL(C);var K=n.toDataURL(r.imageType,r.imageQuality);i(K)},d.src=C}))},o})(),O=function(){},Q=(function(){function o(e){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+e+"_"}return Object.defineProperty(o.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),o.prototype.addClass=function(e){return this.styleSheet===void 0&&this.addStyleSheet(),e.name=""+this.classNamePrefix+e.localName,this.classes.push(e),this.styleSheet.sheet.insertRule("."+e.name+" {"+e.style+"}",this.styleSheet.sheet.cssRules.length),e},o.prototype.addRule=function(e){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(e),this.styleSheet.sheet.insertRule(e.selector+" {"+e.style+"}",this.styleSheet.sheet.cssRules.length)},o.prototype.addStyleSheet=function(){var e;this.styleSheet=document.createElement("style"),((e=this.styleSheetRoot)!==null&&e!==void 0?e:document.head).appendChild(this.styleSheet),this.addRule(new m("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new m("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
5
+ from {
6
+ opacity: 0;
7
+ }
8
+ to {
9
+ opacity: 1;
10
+ }
11
+ `)),this.addRule(new m("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
12
+ from {
13
+ opacity: 1;
14
+ }
15
+ to {
16
+ opacity: 0;
17
+ }
18
+ `)),this.addClass(new y("fade_in",`
19
+ animation-duration: 0.3s;
20
+ animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
21
+ `)),this.addClass(new y("fade_out",`
22
+ animation-duration: 0.3s;
23
+ animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
24
+ `))},o.prototype.removeStyleSheet=function(){var e;this.styleSheet&&(((e=this.styleSheetRoot)!==null&&e!==void 0?e:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},o})(),m=function(o,e){this.selector=o,this.style=e},y=function(o,e){this.localName=o,this.style=e},q=(function(){function o(e,t,s,r,i){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=e,this.displayMode=t,this.markerItems=s,this.uiStyleSettings=r,this.styles=i,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return o.prototype.show=function(e){var t=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=e,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var s=document.createElement("div");s.className=this.toolbarBlockStyleClass.name,s.style.whiteSpace="nowrap",this.uiContainer.appendChild(s),this.addActionButton(s,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select","Select mode"),this.addActionButton(s,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete","Delete marker"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(s,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear","Delete all markers"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(s,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo","Undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(s,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo","Redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(s,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom","Zoom in"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(s,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out","Zoom out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(s,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes","Notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach((function(i){var n=document.createElement("div");n.className=""+t.toolbarButtonStyleClass.name,n.setAttribute("data-type-name",i.typeName),n.setAttribute("aria-label",i.title),n.setAttribute("title",i.title),n.innerHTML=i.icon,n.addEventListener("click",(function(){t.markerToolbarButtonClicked(n,i)})),t.buttons.push(n),t.markerButtons.push(n)})),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var r=document.createElement("div");r.className=this.toolbarBlockStyleClass.name,r.style.whiteSpace="nowrap",r.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(r),this.addActionButton(r,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render","Save and close"),this.addActionButton(r,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close","Close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},o.prototype.addButtonClickListener=function(e){this.buttonClickListeners.push(e)},o.prototype.removeButtonClickListener=function(e){this.buttonClickListeners.indexOf(e)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(e),1)},o.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},o.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var e=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var t=0;t<this.markerButtons.length;t++)t<e||t===e&&this.markerButtons.length-1===e?this.markerButtonBlock.appendChild(this.markerButtons[t]):(t===e&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[t]))}},o.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},o.prototype.resetButtonStyles=function(){var e=this;this.buttons.forEach((function(t){t.className=t.className.replace(e.uiStyleSettings.toolbarButtonStyleColorsClassName?e.uiStyleSettings.toolbarButtonStyleColorsClassName:e.toolbarButtonStyleColorsClass.name,"").trim(),t.className=t.className.replace(e.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?e.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:e.toolbarActiveButtonStyleColorsClass.name,"").trim(),t.className+=" "+(e.uiStyleSettings.toolbarButtonStyleColorsClassName?e.uiStyleSettings.toolbarButtonStyleColorsClassName:e.toolbarButtonStyleColorsClass.name)}))},o.prototype.addActionButton=function(e,t,s,r){var i=this,n=document.createElement("div");switch(n.className=""+this.toolbarButtonStyleClass.name,n.innerHTML=t,n.setAttribute("role","button"),n.setAttribute("data-action",s),n.title=r,n.setAttribute("aria-label",r),n.addEventListener("click",(function(){i.actionToolbarButtonClicked(n,s)})),s){case"select":n.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":n.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":n.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":n.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":n.style.fill=this.uiStyleSettings.closeButtonColor}e.appendChild(n),this.buttons.push(n)},o.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new y("toolbar",`
25
+ width: 100%;
26
+ flex-shrink: 0;
27
+ display: flex;
28
+ flex-direction: row;
29
+ justify-content: space-between;
30
+ height: `+this.uiStyleSettings.toolbarHeight+`px;
31
+ box-sizing: content-box;
32
+ `+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
33
+ `+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
34
+ overflow: hidden;
35
+ `)),this.toolbarStyleColorsClass=this.styles.addClass(new y("toolbar_colors",`
36
+ background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
37
+ box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
38
+ `)),this.toolbarBlockStyleClass=this.styles.addClass(new y("toolbar-block",`
39
+ display: inline-block;
40
+ box-sizing: content-box;
41
+ `)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new y("toolbar-overflow-block",`
42
+ position: absolute;
43
+ top: `+this.uiStyleSettings.toolbarHeight+`px;
44
+ max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
45
+ z-index: 10;
46
+ box-sizing: content-box;
47
+ `)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new y("toolbar-overflow-block_colors",`
48
+ background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
49
+ `));var e=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new y("toolbar_button",`
50
+ display: inline-block;
51
+ width: `+(this.uiStyleSettings.toolbarHeight-2*e)+`px;
52
+ height: `+(this.uiStyleSettings.toolbarHeight-2*e)+`px;
53
+ padding: `+e+`px;
54
+ box-sizing: content-box;
55
+ `)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new y("toolbar_button_colors",`
56
+ fill: `+this.uiStyleSettings.toolbarColor+`;
57
+ `)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new y("toolbar_active_button",`
58
+ fill: `+this.uiStyleSettings.toolbarColor+`;
59
+ background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
60
+ `)),this.styles.addRule(new m("."+this.toolbarButtonStyleClass.name+" svg",`
61
+ height: `+this.uiStyleSettings.toolbarHeight/2+`px;
62
+ `)),this.styles.addRule(new m("."+this.toolbarButtonStyleColorsClass.name+":hover",`
63
+ background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
64
+ `))},o.prototype.markerToolbarButtonClicked=function(e,t){this.setActiveButton(e),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(s){return s("marker",t)})),this.markerButtonOverflowBlock.style.display="none"},o.prototype.actionToolbarButtonClicked=function(e,t){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(s){return s("action",t)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},o.prototype.setActiveButton=function(e){this.resetButtonStyles(),e.className=e.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),e.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},o.prototype.setActiveMarkerButton=function(e){var t=this.markerButtons.find((function(s){return s.getAttribute("data-type-name")===e}));t&&this.setActiveButton(t)},o.prototype.setCurrentMarker=function(e){var t=this;this.currentMarker=e,this.buttons.filter((function(s){return/delete|notes/.test(s.getAttribute("data-action"))})).forEach((function(s){t.currentMarker===void 0?(s.style.fillOpacity="0.4",s.style.pointerEvents="none"):(s.style.fillOpacity="1",s.style.pointerEvents="all")}))},o})(),$=(function(){function o(e,t,s,r){this.panels=[],this.panelButtons=[],this.markerjsContainer=e,this.displayMode=t,this.uiStyleSettings=s,this.styles=r,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return o.prototype.addStyles=function(){var e;this.toolboxStyleClass=this.styles.addClass(new y("toolbox",`
65
+ width: 100%;
66
+ flex-shrink: 0;
67
+ display: flex;
68
+ flex-direction: column;
69
+ font-family: sans-serif;
70
+ `+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
71
+ box-sizing: content-box;
72
+ `+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
73
+ `+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
74
+ `+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
75
+ overflow: hidden;
76
+ `)),this.toolboxStyleColorsClass=this.styles.addClass(new y("toolbox_colors",`
77
+ color: `+this.uiStyleSettings.toolboxColor+`;
78
+ `));var t=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new y("toolbox-button-row",`
79
+ display: flex;
80
+ cursor: default;
81
+ box-sizing: content-box;
82
+ `)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new y("toolbox-button-row_colors",`
83
+ background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
84
+ `)),this.toolboxPanelRowStyleClass=this.styles.addClass(new y("toolbox-panel-row",`
85
+ display: flex;
86
+ `+(this.displayMode==="inline"?"position: absolute;":"")+`
87
+ `+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
88
+ cursor: default;
89
+ height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
90
+ `+(this.displayMode==="inline"?"width: 100%;":"")+`
91
+ box-sizing: content-box;
92
+ `)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new y("toolbox-panel-row_colors",`
93
+ background-color: `+((e=this.uiStyleSettings.toolboxBackgroundColor)!==null&&e!==void 0?e:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
94
+ `)),this.toolboxButtonStyleClass=this.styles.addClass(new y("toolbox_button",`
95
+ display: inline-block;
96
+ width: `+(this.uiStyleSettings.toolbarHeight-2*t)+`px;
97
+ height: `+(this.uiStyleSettings.toolbarHeight-2*t)+`px;
98
+ padding: `+t+`px;
99
+ box-sizing: content-box;
100
+ `)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new y("toolbox-button_colors",`
101
+ fill: `+this.uiStyleSettings.toolbarColor+`;
102
+ `)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new y("toolbox-active-button_colors",`
103
+ background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
104
+ fill: `+this.uiStyleSettings.toolbarColor+`;
105
+ `)),this.styles.addRule(new m("."+this.toolboxButtonStyleColorsClass.name+":hover",`
106
+ background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
107
+ `)),this.styles.addRule(new m("."+this.toolboxButtonStyleClass.name+" svg",`
108
+ height: `+this.uiStyleSettings.toolbarHeight/2+`px;
109
+ `)),this.styles.addRule(new m("."+this.toolboxPanelRowStyleClass.name+" > div",`
110
+ scrollbar-width: thin;
111
+ `)),this.styles.addRule(new m("."+this.toolboxPanelRowStyleClass.name+" > div::-webkit-scrollbar",`
112
+ height: 10px;
113
+ width: 10px;
114
+ `)),this.styles.addRule(new m("."+this.toolboxPanelRowStyleClass.name+" > div::-webkit-scrollbar-track",`
115
+ background-color: transparent;
116
+ `)),this.styles.addRule(new m("."+this.toolboxPanelRowStyleClass.name+" > div::-webkit-scrollbar-thumb",`
117
+ background-color: #444;
118
+ border-radius: 20px;
119
+ border: 2px solid #aaa;
120
+ `))},o.prototype.show=function(e){var t;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=e,this.uiContainer.className=this.toolboxStyleClass.name+" "+((t=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&t!==void 0?t:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},o.prototype.setPanelButtons=function(e){var t,s,r=this;this.panels=e,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((t=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&t!==void 0?t:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((s=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&s!==void 0?s:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(i){var n;i.uiStyleSettings=r.uiStyleSettings;var a=document.createElement("div");a.className=r.toolboxButtonStyleClass.name+" "+((n=r.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&n!==void 0?n:r.toolboxButtonStyleColorsClass.name),a.innerHTML=i.icon,a.title=i.title,a.setAttribute("role","button"),a.setAttribute("aria-label",i.title),i.id&&a.setAttribute("data-action",i.id),a.addEventListener("click",(function(){r.panelButtonClick(i)})),r.panelButtons.push(a),r.buttonRow.appendChild(a)})),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},o.prototype.panelButtonClick=function(e){var t=this,s=-1;if(e!==this.activePanel){s=this.panels.indexOf(e),this.panelRow.innerHTML="";var r=e.getUi();r.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(r),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=e}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){t.displayMode==="inline"?t.panelRow.style.display="none":t.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(i,n){var a,c;i.className=t.toolboxButtonStyleClass.name+" "+(n===s?""+((a=t.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&a!==void 0?a:t.toolboxActiveButtonStyleColorsClass.name):""+((c=t.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&c!==void 0?c:t.toolboxButtonStyleColorsClass.name))}))},o})(),x=(function(){function o(e,t,s){this.title=e,this.icon=t,this._id=s}return Object.defineProperty(o.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),o})(),g=(function(o){function e(t,s,r,i,n){var a=o.call(this,t,i||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>',n||"color-picker-panel")||this;return a.colors=[],a.addTransparent=!1,a.colorBoxes=[],a.colors=s,a.currentColor=r,a.setCurrentColor=a.setCurrentColor.bind(a),a.getColorBox=a.getColorBox.bind(a),a}return u(e,o),e.prototype.getUi=function(){var t=this,s=document.createElement("div");return s.style.overflow="hidden",s.style.overflowX="auto",s.style.whiteSpace="nowrap",this.colors.forEach((function(r){var i=t.getColorBox(r);s.appendChild(i),t.colorBoxes.push(i)})),s},e.prototype.getColorBox=function(t){var s=this,r=this.uiStyleSettings.toolbarHeight/4,i=this.uiStyleSettings.toolbarHeight-r,n=document.createElement("div");n.style.display="inline-block",n.style.boxSizing="content-box",n.style.width=i-2+"px",n.style.height=i-2+"px",n.style.padding="1px",n.style.marginRight="2px",n.style.marginBottom="2px",n.style.borderWidth="2px",n.style.borderStyle="solid",n.style.borderRadius=(i+2)/2+"px",n.style.borderColor=t===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",n.addEventListener("click",(function(){s.setCurrentColor(t,n)}));var a=document.createElement("div");return a.style.display="inline-block",a.style.width=i-2+"px",a.style.height=i-2+"px",a.style.backgroundColor=t,a.style.borderRadius=i/2+"px",t==="transparent"&&(a.style.fill=this.uiStyleSettings.toolboxAccentColor,a.innerHTML=`<svg viewBox="0 0 24 24">
121
+ <path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
122
+ </svg>`),n.appendChild(a),n},e.prototype.setCurrentColor=function(t,s){var r=this;this.currentColor=t,this.colorBoxes.forEach((function(i){i.style.borderColor=i===s?r.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(t)},e})(x),F=(function(){function o(e,t,s){this._state="new",this._isSelected=!1,this._container=e,this._overlayContainer=t,this.globalSettings=s,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(o.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),o.prototype.ownsTarget=function(e){return!1},Object.defineProperty(o.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),o.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},o.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},o.prototype.pointerDown=function(e,t){},o.prototype.dblClick=function(e,t){},o.prototype.manipulate=function(e){},o.prototype.pointerUp=function(e){this.stateChanged()},o.prototype.dispose=function(){},o.prototype.addMarkerVisualToContainer=function(e){this.container.childNodes.length>0?this.container.insertBefore(e,this.container.childNodes[0]):this.container.appendChild(e)},o.prototype.getState=function(){return{typeName:o.typeName,state:this.state,notes:this.notes}},o.prototype.restoreState=function(e){this._state=e.state,this.notes=e.notes},o.prototype.scale=function(e,t){},o.prototype.colorChanged=function(e){this.onColorChanged&&this.onColorChanged(e),this.stateChanged()},o.prototype.fillColorChanged=function(e){this.onFillColorChanged&&this.onFillColorChanged(e),this.stateChanged()},o.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var e=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),e.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(e)&&this.onStateChanged(this)}},o.typeName="MarkerBase",o})(),tt=(function(){function o(){this.findGripByVisual=this.findGripByVisual.bind(this)}return o.prototype.findGripByVisual=function(e){return this.topLeft.ownsTarget(e)?this.topLeft:this.topCenter.ownsTarget(e)?this.topCenter:this.topRight.ownsTarget(e)?this.topRight:this.centerLeft.ownsTarget(e)?this.centerLeft:this.centerRight.ownsTarget(e)?this.centerRight:this.bottomLeft.ownsTarget(e)?this.bottomLeft:this.bottomCenter.ownsTarget(e)?this.bottomCenter:this.bottomRight.ownsTarget(e)?this.bottomRight:void 0},o})(),_=(function(){function o(){this.GRIP_SIZE=10,this.visual=h.createGroup(),this.visual.appendChild(h.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(h.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return o.prototype.ownsTarget=function(e){return e===this.visual||e===this.visual.childNodes[0]||e===this.visual.childNodes[1]},o})(),T=(function(){function o(){}return o.toITransformMatrix=function(e){return{a:e.a,b:e.b,c:e.c,d:e.d,e:e.e,f:e.f}},o.toSVGMatrix=function(e,t){return e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.e=t.e,e.f=t.f,e},o})(),B=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.left=0,i.top=0,i.width=0,i.height=0,i.defaultSize={x:50,y:20},i.offsetX=0,i.offsetY=0,i.rotationAngle=0,i.CB_DISTANCE=10,i._suppressMarkerCreateEvent=!1,i.container.transform.baseVal.appendItem(h.createTransform()),i.setupControlBox(),i}return u(e,o),Object.defineProperty(e.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visual",{get:function(){return this._visual},set:function(t){this._visual=t;var s=h.createTransform();this._visual.transform.baseVal.appendItem(s)},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(t){return!!o.prototype.ownsTarget.call(this,t)||!!(this.controlGrips.findGripByVisual(t)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(t))},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.state==="new"&&(this.left=t.x,this.top=t.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var r=this.unrotatePoint(t);if(this.manipulationStartX=r.x,this.manipulationStartY=r.y,this.offsetX=r.x-this.left,this.offsetY=r.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(s),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(s)){this.activeGrip=this.rotatorGrip;var i=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=i.x-this.width/2,this.top=i.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var n=this.container.transform.baseVal.getItem(0);n.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(n,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},e.prototype.pointerUp=function(t){var s=this.state;o.prototype.pointerUp.call(this,t),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(t),this._state="select",s==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},e.prototype.moveVisual=function(t){this.visual.style.transform="translate("+t.x+"px, "+t.y+"px)"},e.prototype.manipulate=function(t){var s=this.unrotatePoint(t);this.state==="creating"?this.resize(t):this.state==="move"?(this.left=this.manipulationStartLeft+(s.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(s.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(s):this.state==="rotate"&&this.rotate(t)},e.prototype.resize=function(t){var s=this.manipulationStartLeft,r=this.manipulationStartWidth,i=this.manipulationStartTop,n=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:s=this.manipulationStartLeft+t.x-this.manipulationStartX,r=this.manipulationStartWidth+this.manipulationStartLeft-s;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:r=this.manipulationStartWidth+t.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:i=this.manipulationStartTop+t.y-this.manipulationStartY,n=this.manipulationStartHeight+this.manipulationStartTop-i;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:n=this.manipulationStartHeight+t.y-this.manipulationStartY}r>=0?(this.left=s,this.width=r):(this.left=s+r,this.width=-r),n>=0?(this.top=i,this.height=n):(this.top=i+n,this.height=-n),this.setSize()},e.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},e.prototype.rotate=function(t){if(Math.abs(t.x-this.centerX)>.1){var s=Math.sign(t.x-this.centerX);this.rotationAngle=180*Math.atan((t.y-this.centerY)/(t.x-this.centerX))/Math.PI+90*s,this.applyRotation()}},e.prototype.applyRotation=function(){var t=this.container.transform.baseVal.getItem(0);t.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(t,0)},e.prototype.rotatePoint=function(t){if(this.rotationAngle===0)return t;var s=this.container.getCTM(),r=h.createPoint(t.x,t.y);return{x:(r=r.matrixTransform(s)).x,y:r.y}},e.prototype.unrotatePoint=function(t){if(this.rotationAngle===0)return t;var s=this.container.getCTM();s=s.inverse();var r=h.createPoint(t.x,t.y);return{x:(r=r.matrixTransform(s)).x,y:r.y}},e.prototype.select=function(){o.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},e.prototype.deselect=function(){o.prototype.deselect.call(this),this.controlBox.style.display="none"},e.prototype.setupControlBox=function(){this.controlBox=h.createGroup();var t=h.createTransform();t.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(t),this.container.appendChild(this.controlBox),this.controlRect=h.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=h.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new tt,this.addControlGrips(),this.controlBox.style.display="none"},e.prototype.adjustControlBox=function(){var t=this.controlBox.transform.baseVal.getItem(0);t.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(t,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},e.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},e.prototype.createGrip=function(){var t=new _;return t.visual.transform.baseVal.appendItem(h.createTransform()),this.controlBox.appendChild(t.visual),t},e.prototype.positionGrips=function(){var t=this.controlGrips.topLeft.GRIP_SIZE,s=-t/2,r=s,i=(this.width+this.CB_DISTANCE)/2-t/2,n=(this.height+this.CB_DISTANCE)/2-t/2,a=this.height+this.CB_DISTANCE-t/2,c=this.width+this.CB_DISTANCE-t/2;this.positionGrip(this.controlGrips.topLeft.visual,s,r),this.positionGrip(this.controlGrips.topCenter.visual,i,r),this.positionGrip(this.controlGrips.topRight.visual,c,r),this.positionGrip(this.controlGrips.centerLeft.visual,s,n),this.positionGrip(this.controlGrips.centerRight.visual,c,n),this.positionGrip(this.controlGrips.bottomLeft.visual,s,a),this.positionGrip(this.controlGrips.bottomCenter.visual,i,a),this.positionGrip(this.controlGrips.bottomRight.visual,c,a),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,i,r-3*this.CB_DISTANCE)},e.prototype.positionGrip=function(t,s,r){var i=t.transform.baseVal.getItem(0);i.setTranslate(s,r),t.transform.baseVal.replaceItem(i,0)},e.prototype.hideControlBox=function(){this.controlBox.style.display="none"},e.prototype.showControlBox=function(){this.controlBox.style.display=""},e.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:T.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:T.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},o.prototype.getState.call(this))},e.prototype.restoreState=function(t){o.prototype.restoreState.call(this,t);var s=t;this.left=s.left,this.top=s.top,this.width=s.width,this.height=s.height,this.rotationAngle=s.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(T.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,s.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(T.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,s.containerTransformMatrix))},e.prototype.scale=function(t,s){o.prototype.scale.call(this,t,s);var r=this.rotatePoint({x:this.left,y:this.top}),i=this.unrotatePoint({x:r.x*t,y:r.y*s});this.left=i.x,this.top=i.y,this.width=this.width*t,this.height=this.height*s,this.adjustControlBox()},e})(F),j=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.opacity=1,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.createVisual=i.createVisual.bind(i),i}return u(e,o),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.visual)},e.prototype.createVisual=function(){this.visual=h.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.state==="new"&&(this.createVisual(),this.moveVisual(t),this._state="creating")},e.prototype.manipulate=function(t){o.prototype.manipulate.call(this,t)},e.prototype.resize=function(t){o.prototype.resize.call(this,t),this.setSize()},e.prototype.setSize=function(){o.prototype.setSize.call(this),h.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},e.prototype.pointerUp=function(t){o.prototype.pointerUp.call(this,t),this.setSize()},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.visual&&h.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&h.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&h.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&h.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},e.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},o.prototype.getState.call(this))},e.prototype.restoreState=function(t){var s=t;this.fillColor=s.fillColor,this.strokeColor=s.strokeColor,this.strokeWidth=s.strokeWidth,this.strokeDasharray=s.strokeDasharray,this.opacity=s.opacity,this.createVisual(),o.prototype.restoreState.call(this,t),this.setSize()},e.prototype.scale=function(t,s){o.prototype.scale.call(this,t,s),this.setSize()},e.title="Rectangle marker",e})(B),S=(function(o){function e(t,s,r,i,n){var a=o.call(this,t,i||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>',n||"line-width-panel")||this;return a.widths=[],a.widthBoxes=[],a.widths=s,a.currentWidth=r,a.setCurrentWidth=a.setCurrentWidth.bind(a),a}return u(e,o),e.prototype.getUi=function(){var t=this,s=document.createElement("div");return s.style.display="flex",s.style.overflow="hidden",s.style.flexGrow="2",this.widths.forEach((function(r){var i=document.createElement("div");i.style.display="flex",i.style.flexGrow="2",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderColor=r===t.currentWidth?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentWidth(r,i)})),s.appendChild(i);var n=document.createElement("div");n.innerText=r.toString(),n.style.marginRight="5px",i.appendChild(n);var a=document.createElement("div");a.style.minHeight="20px",a.style.flexGrow="2",a.style.display="flex",a.style.alignItems="center";var c=document.createElement("hr");c.style.minWidth="20px",c.style.border="0px",c.style.borderTop=r+"px solid "+t.uiStyleSettings.toolboxColor,c.style.flexGrow="2",a.appendChild(c),i.appendChild(a),t.widthBoxes.push(i)})),s},e.prototype.setCurrentWidth=function(t,s){var r=this;this.currentWidth=t,this.widthBoxes.forEach((function(i){i.style.borderColor=i===s?r.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},e})(x),M=(function(o){function e(t,s,r,i,n){var a=o.call(this,t,i||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>',n||"line-style-panel")||this;return a.styles=[],a.styleBoxes=[],a.styles=s,a.currentStyle=r,a.setCurrentStyle=a.setCurrentStyle.bind(a),a}return u(e,o),e.prototype.getUi=function(){var t=this,s=document.createElement("div");return s.style.display="flex",s.style.overflow="hidden",s.style.flexGrow="2",this.styles.forEach((function(r){var i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.overflow="hidden",i.style.maxWidth=100/t.styles.length-5+"%",i.style.borderColor=r===t.currentStyle?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentStyle(r,i)})),s.appendChild(i);var n=document.createElement("div");n.style.minHeight="20px",n.style.flexGrow="2",n.style.overflow="hidden";var a=`<svg width="100" height="20">
123
+ <line x1="0" y1="10" x2="100" y2="10" stroke="`+t.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(r!==""?'stroke-dasharray="'+r+'"':"")+` />
124
+ </svg>`;n.innerHTML=a,i.appendChild(n),t.styleBoxes.push(i)})),s},e.prototype.setCurrentStyle=function(t,s){var r=this;this.currentStyle=t,this.styleBoxes.forEach((function(i){i.style.borderColor=i===s?r.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},e})(x),P=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new g("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new S("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new M("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return u(e,o),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=o.prototype.getState.call(this);return t.typeName=e.typeName,t},e.typeName="FrameMarker",e.title="Frame marker",e.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',e})(j),et=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text",this.wrapText=!1,this.defaultText="Your text here"},U=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.x1=0,i.y1=0,i.x2=0,i.y2=0,i.defaultLength=50,i.manipulationStartX=0,i.manipulationStartY=0,i.manipulationStartX1=0,i.manipulationStartY1=0,i.manipulationStartX2=0,i.manipulationStartY2=0,i.setupControlBox(),i}return u(e,o),e.prototype.ownsTarget=function(t){return!!o.prototype.ownsTarget.call(this,t)||!(!this.grip1.ownsTarget(t)&&!this.grip2.ownsTarget(t))},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.manipulationStartX=t.x,this.manipulationStartY=t.y,this.state==="new"&&(this.x1=t.x,this.y1=t.y,this.x2=t.x,this.y2=t.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(s)?this.activeGrip=this.grip1:this.grip2.ownsTarget(s)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},e.prototype.pointerUp=function(t){var s=this.state;o.prototype.pointerUp.call(this,t),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(t),this._state="select",s==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},e.prototype.adjustVisual=function(){},e.prototype.manipulate=function(t){this.state==="creating"?this.resize(t):this.state==="move"?(this.x1=this.manipulationStartX1+t.x-this.manipulationStartX,this.y1=this.manipulationStartY1+t.y-this.manipulationStartY,this.x2=this.manipulationStartX2+t.x-this.manipulationStartX,this.y2=this.manipulationStartY2+t.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(t)},e.prototype.resize=function(t){switch(this.activeGrip){case this.grip1:this.x1=t.x,this.y1=t.y;break;case this.grip2:case void 0:this.x2=t.x,this.y2=t.y}this.adjustVisual(),this.adjustControlBox()},e.prototype.select=function(){o.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},e.prototype.deselect=function(){o.prototype.deselect.call(this),this.controlBox.style.display="none"},e.prototype.setupControlBox=function(){this.controlBox=h.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},e.prototype.adjustControlBox=function(){this.positionGrips()},e.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},e.prototype.createGrip=function(){var t=new _;return t.visual.transform.baseVal.appendItem(h.createTransform()),this.controlBox.appendChild(t.visual),t},e.prototype.positionGrips=function(){var t=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-t/2,this.y1-t/2),this.positionGrip(this.grip2.visual,this.x2-t/2,this.y2-t/2)},e.prototype.positionGrip=function(t,s,r){var i=t.transform.baseVal.getItem(0);i.setTranslate(s,r),t.transform.baseVal.replaceItem(i,0)},e.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},o.prototype.getState.call(this))},e.prototype.restoreState=function(t){o.prototype.restoreState.call(this,t);var s=t;this.x1=s.x1,this.y1=s.y1,this.x2=s.x2,this.y2=s.y2},e.prototype.scale=function(t,s){o.prototype.scale.call(this,t,s),this.x1=this.x1*t,this.y1=this.y1*s,this.x2=this.x2*t,this.y2=this.y2*s,this.adjustVisual(),this.adjustControlBox()},e})(F),I=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new g("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new S("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new M("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return u(e,o),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorLine&&t!==this.visibleLine)},e.prototype.createVisual=function(){this.visual=h.createGroup(),this.selectorLine=h.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=h.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},e.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),h.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),h.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),h.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},o.prototype.getState.call(this));return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){o.prototype.restoreState.call(this,t);var s=t;this.strokeColor=s.strokeColor,this.strokeWidth=s.strokeWidth,this.strokeDasharray=s.strokeDasharray,this.createVisual(),this.adjustVisual()},e.typeName="LineMarker",e.title="Line marker",e.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',e})(U),W=(function(o){function e(t,s,r,i,n){var a=o.call(this,t,i||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>',n||"font-family-panel")||this;return a.fonts=[],a.fontBoxes=[],a.fonts=s,a.currentFont=r,a.setCurrentFont=a.setCurrentFont.bind(a),a}return u(e,o),e.prototype.getUi=function(){var t=this,s=document.createElement("div");return s.style.overflow="hidden",s.style.flexGrow="2",this.fonts.forEach((function(r){var i=document.createElement("div");i.style.display="inline-block",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.overflow="hidden",i.style.maxWidth=100/t.fonts.length-5+"%",i.style.borderColor=r===t.currentFont?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentFont(r,i)})),s.appendChild(i);var n=document.createElement("div");n.style.display="flex",n.style.minHeight="20px",n.style.flexGrow="2",n.style.fontFamily=r,n.style.overflow="hidden";var a=document.createElement("div");a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.innerHTML="The quick brown fox jumps over the lazy dog",n.appendChild(a),i.appendChild(n),t.fontBoxes.push(i)})),s},e.prototype.setCurrentFont=function(t,s){var r=this;this.currentFont=t,this.fontBoxes.forEach((function(i){i.style.borderColor=i===s?r.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},e})(x),w=(function(o){function e(t,s,r){var i,n=o.call(this,t,s,r)||this;return n.color="transparent",n.padding=5,n.DEFAULT_TEXT="your text here",n.isMoved=!1,n.color=r.defaultColor,n.fontFamily=r.defaultFontFamily,n.text=(i=r.defaultText)!==null&&i!==void 0?i:n.DEFAULT_TEXT,n.defaultSize={x:100,y:30},n.setColor=n.setColor.bind(n),n.setFont=n.setFont.bind(n),n.renderText=n.renderText.bind(n),n.sizeText=n.sizeText.bind(n),n.textEditDivClicked=n.textEditDivClicked.bind(n),n.showTextEditor=n.showTextEditor.bind(n),n.setSize=n.setSize.bind(n),n.positionTextEditor=n.positionTextEditor.bind(n),n.wrapText=n.wrapText.bind(n),n.colorPanel=new g("Color",r.defaultColorSet,r.defaultColor),n.colorPanel.onColorChanged=n.setColor,n.fontFamilyPanel=new W("Font",r.defaultFontFamilies,r.defaultFontFamily),n.fontFamilyPanel.onFontChanged=n.setFont,n}return u(e,o),e.prototype.ownsTarget=function(t){if(o.prototype.ownsTarget.call(this,t)||t===this.visual||t===this.textElement||t===this.bgRectangle)return!0;var s=!1;return this.textElement.childNodes.forEach((function(r){r===t&&(s=!0)})),s},e.prototype.createVisual=function(){this.visual=h.createGroup(),this.bgRectangle=h.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=h.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(h.createTransform()),this.textElement.transform.baseVal.appendItem(h.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.isMoved=!1,this.pointerDownPoint=t,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(t),this._state="creating")},e.prototype.wrapText=function(){function t(p){var l=p[0].length;return p.forEach((function(d){d.length>l&&(l=d.length)})),.35*l/p.length}if(this.text!==""){for(var s=this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/),r=1*this.width/this.height,i=new(Array.bind.apply(Array,E([void 0],s))),n=t(i),a=Number.MAX_VALUE,c=function(){var p=i[0];i.forEach((function(l){l.length>p.length&&(p=l)})),(a=p.lastIndexOf(" ",a-1))>0?(i=[],s.forEach((function(l){for(var d=l;d.length>a;){var f=d.lastIndexOf(" ",a);f<0&&(f=d.indexOf(" ")),f>0?(i.push(d.substring(0,f)),d=d.substring(f).trim()):(i.push(d),d="")}i.push(d)})),n=t(i)):n=-1};n>r;)c();return i.join(`\r
125
+ `)}return this.text},e.prototype.renderText=function(){var t=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);(this.globalSettings.wrapText?this.wrapText():this.text).split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach((function(s){t.textElement.appendChild(h.createTSpan(s.trim()===""?" ":s.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},e.prototype.getTextScale=function(){var t=this.textElement.getBBox(),s=1;if(t.width>0&&t.height>0){var r=(1*this.width-this.width*this.padding*2/100)/t.width,i=(1*this.height-this.height*this.padding*2/100)/t.height;s=Math.min(r,i)}return s},e.prototype.getTextPosition=function(t){var s=window.getComputedStyle(this.textElement).direction==="rtl"?1:-1,r=this.textElement.getBBox(),i=0,n=0;return r.width>0&&r.height>0&&(i=(this.width+s*r.width*t)/2,n=this.height/2-r.height*t/2),{x:i,y:n}},e.prototype.sizeText=function(){var t=this.textElement.getBBox(),s=this.getTextScale(),r=this.getTextPosition(s);r.y-=t.y*s,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+r.x+"px, "+r.y+"px) scale("+s+", "+s+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(r.x,r.y),this.textElement.transform.baseVal.getItem(1).setScale(s,s))},e.prototype.manipulate=function(t){o.prototype.manipulate.call(this,t),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(t.x-this.pointerDownPoint.x)>5||Math.abs(t.y-this.pointerDownPoint.y)>5)},e.prototype.resize=function(t){o.prototype.resize.call(this,t),this.isMoved=!0,this.setSize(),this.globalSettings.wrapText?this.renderText():this.sizeText()},e.prototype.setSize=function(){o.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(h.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),h.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},e.prototype.pointerUp=function(t){var s=this.state;s==="creating"&&(this._suppressMarkerCreateEvent=!0),o.prototype.pointerUp.call(this,t),this.setSize(),(s==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},e.prototype.showTextEditor=function(){var t=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",(function(s){s.stopPropagation()})),this.globalSettings.wrapText||this.textEditor.addEventListener("input",(function(){for(var s=Number.parseFloat(t.textEditor.style.fontSize);t.textEditor.clientWidth>=Number.parseInt(t.textEditor.style.maxWidth)&&s>.9;)s-=.1,t.textEditor.style.fontSize=Math.max(s,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(s){s.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(s){if(s.clipboardData){var r=s.clipboardData.getData("text"),i=window.getSelection();if(!i.rangeCount)return!1;i.deleteFromDocument(),i.getRangeAt(0).insertNode(document.createTextNode(r)),s.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){t.textEditDivClicked(t.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},e.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else if(this.globalSettings.wrapText)this.textEditor.style.left=this.left+this.padding+"px",this.textEditor.style.top=this.top+this.padding+"px",this.textEditor.style.width=this.width-2*this.padding+"px",this.textEditor.style.height=this.height-2*this.padding+"px",this.textEditor.style.maxHeight=this.textEditor.style.height,this.textEditor.style.whiteSpace="wrap";else{this.textElement.style.display="";var t=this.getTextScale(),s=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),r=this.textElement.getBBox(),i={x:r.width*t,y:r.height*t};s.x-=i.x/2,s.y-=i.y/2,this.textEditor.style.top=s.y+"px",this.textEditor.style.left=s.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-s.x+"px",this.textEditor.style.fontSize=Math.max(16*t,12)+"px",this.textElement.style.display="none"}},e.prototype.textEditDivClicked=function(t){this.text=t.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},e.prototype.select=function(){o.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},e.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),o.prototype.deselect.call(this)},e.prototype.dblClick=function(t,s){o.prototype.dblClick.call(this,t,s),this.showTextEditor()},e.prototype.setColor=function(t){this.textElement&&h.setAttributes(this.textElement,[["fill",t]]),this.color=t,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(t)},e.prototype.setFont=function(t){this.textElement&&h.setAttributes(this.textElement,[["font-family",t]]),this.fontFamily=t,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},e.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},e.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text,wrapText:this.globalSettings.wrapText},o.prototype.getState.call(this));return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){var s=t;this.color=s.color,this.fontFamily=s.fontFamily,this.padding=s.padding,this.text=s.text,this.createVisual(),o.prototype.restoreState.call(this,t),this.setSize(),this.globalSettings.wrapText&&this.renderText()},e.prototype.scale=function(t,s){o.prototype.scale.call(this,t,s),this.setSize(),this.sizeText(),this.positionTextEditor()},e.typeName="TextMarker",e.title="Text marker",e.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',e})(B),k=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.color="transparent",i.lineWidth=3,i.drawing=!1,i.pixelRatio=1,i.color=r.defaultColor,i.lineWidth=r.defaultStrokeWidth,i.pixelRatio=r.freehandPixelRatio,i.setColor=i.setColor.bind(i),i.addCanvas=i.addCanvas.bind(i),i.finishCreation=i.finishCreation.bind(i),i.setLineWidth=i.setLineWidth.bind(i),i.colorPanel=new g("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.lineWidthPanel=new S("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.lineWidthPanel.onWidthChanged=i.setLineWidth,i}return u(e,o),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.drawingImage)},e.prototype.createVisual=function(){this.visual=h.createGroup(),this.drawingImage=h.createImage(),this.visual.appendChild(this.drawingImage);var t=h.createTransform();this.visual.transform.baseVal.appendItem(t),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(t,s){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(t.x,t.y),this.drawing=!0):o.prototype.pointerDown.call(this,t,s)},e.prototype.manipulate=function(t){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(t.x,t.y),this.canvasContext.stroke()):o.prototype.manipulate.call(this,t)},e.prototype.resize=function(t){o.prototype.resize.call(this,t),h.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),h.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},e.prototype.pointerUp=function(t){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):o.prototype.pointerUp.call(this,t)},e.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},e.prototype.select=function(){this.state==="creating"&&this.finishCreation(),o.prototype.select.call(this)},e.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),o.prototype.deselect.call(this)},e.prototype.finishCreation=function(){for(var t=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),s=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],r=s[0],i=s[1],n=s[2],a=s[3],c=!1,p=0;p<this.canvasElement.height;p++)for(var l=0;l<this.canvasElement.width;l++)t.data[p*this.canvasElement.width*4+4*l+3]>0&&(c=!0,p<i&&(i=p),l<r&&(r=l),p>a&&(a=p),l>n&&(n=l));if(c){this.left=r/this.pixelRatio,this.top=i/this.pixelRatio,this.width=(n-r)/this.pixelRatio,this.height=(a-i)/this.pixelRatio;var d=document.createElement("canvas");d.width=n-r,d.height=a-i,d.getContext("2d").putImageData(this.canvasContext.getImageData(r,i,n-r,a-i),0,0),this.drawingImgUrl=d.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},e.prototype.setDrawingImage=function(){h.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),h.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},e.prototype.setColor=function(t){this.color=t,this.colorChanged(t)},e.prototype.setLineWidth=function(t){this.lineWidth=t},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=Object.assign({drawingImgUrl:this.drawingImgUrl},o.prototype.getState.call(this));return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){this.createVisual(),o.prototype.restoreState.call(this,t),this.drawingImgUrl=t.drawingImgUrl,this.setDrawingImage()},e.prototype.scale=function(t,s){o.prototype.scale.call(this,t,s),this.setDrawingImage()},e.typeName="FreehandMarker",e.title="Freehand marker",e.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',e})(B),it=(function(o){function e(t,s,r,i){var n=o.call(this,t,r||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>',i||"arrow-type-panel")||this;return n.typeBoxes=[],n.currentType=s,n.setCurrentType=n.setCurrentType.bind(n),n}return u(e,o),e.prototype.getUi=function(){var t=this,s=document.createElement("div");s.style.display="flex",s.style.overflow="hidden",s.style.flexGrow="2";for(var r=function(a){var c="both";switch(a){case 0:c="both";break;case 1:c="start";break;case 2:c="end";break;case 3:c="none"}var p=document.createElement("div");if(p.style.display="flex",p.style.flexGrow="2",p.style.alignItems="center",p.style.justifyContent="space-between",p.style.padding="5px",p.style.borderWidth="2px",p.style.borderStyle="solid",p.style.borderColor=c===i.currentType?i.uiStyleSettings.toolboxAccentColor:"transparent",p.addEventListener("click",(function(){t.setCurrentType(c,p)})),s.appendChild(p),c==="both"||c==="start"){var l=document.createElement("div");l.style.display="flex",l.style.alignItems="center",l.style.minHeight="20px",l.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
126
+ <polygon points="0,5 10,0 10,10" fill="`+(i.uiStyleSettings!==void 0?i.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
127
+ </svg>`,l.style.marginLeft="5px",p.appendChild(l)}var d=document.createElement("div");d.style.display="flex",d.style.alignItems="center",d.style.minHeight="20px",d.style.flexGrow="2";var f=document.createElement("hr");if(f.style.minWidth="20px",f.style.border="0px",f.style.borderTop="3px solid "+(i.uiStyleSettings!==void 0?i.uiStyleSettings.toolboxColor:"#eeeeee"),f.style.flexGrow="2",d.appendChild(f),p.appendChild(d),c==="both"||c==="end"){var C=document.createElement("div");C.style.display="flex",C.style.alignItems="center",C.style.minHeight="20px",C.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
128
+ <polygon points="0,0 10,5 0,10" fill="`+(i.uiStyleSettings!==void 0?i.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
129
+ </svg>`,C.style.marginRight="5px",p.appendChild(C)}i.typeBoxes.push(p)},i=this,n=0;n<4;n++)r(n);return s},e.prototype.setCurrentType=function(t,s){var r=this;this.currentType=t,this.typeBoxes.forEach((function(i){i.style.borderColor=i===s?r.uiStyleSettings!==void 0?r.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},e})(x),L=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.arrowType="end",i.arrowBaseHeight=10,i.arrowBaseWidth=10,i.getArrowPoints=i.getArrowPoints.bind(i),i.setArrowType=i.setArrowType.bind(i),i.arrowTypePanel=new it("Arrow type","end"),i.arrowTypePanel.onArrowTypeChanged=i.setArrowType,i}return u(e,o),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.arrow1&&t!==this.arrow2)},e.prototype.getArrowPoints=function(t,s){var r=this.arrowBaseWidth+2*this.strokeWidth,i=this.arrowBaseHeight+2*this.strokeWidth;return t-r/2+","+(s+i/2)+" "+t+","+(s-i/2)+" "+(t+r/2)+","+(s+i/2)},e.prototype.createTips=function(){this.arrow1=h.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(h.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=h.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(h.createTransform()),this.visual.appendChild(this.arrow2)},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.state==="creating"&&this.createTips()},e.prototype.adjustVisual=function(){if(o.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",h.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),h.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var t=0;Math.abs(this.x1-this.x2)>.1&&(t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var s=this.arrow1.transform.baseVal.getItem(0);s.setRotate(t,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(s,0);var r=this.arrow2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(r,0)}},e.prototype.setArrowType=function(t){this.arrowType=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=Object.assign({arrowType:this.arrowType},o.prototype.getState.call(this));return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){o.prototype.restoreState.call(this,t);var s=t;this.arrowType=s.arrowType,this.createTips(),this.adjustVisual()},e.typeName="ArrowMarker",e.title="Arrow marker",e.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',e})(I),X=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.fillColor=r.defaultFillColor,i.strokeWidth=0,i.fillPanel=new g("Color",r.defaultColorSet,r.defaultFillColor),i.fillPanel.onColorChanged=i.setFillColor,i}return u(e,o),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=o.prototype.getState.call(this);return t.typeName=e.typeName,t},e.typeName="CoverMarker",e.title="Cover marker",e.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',e})(j),Y=(function(o){function e(t,s,r,i,n){var a=o.call(this,t,i||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>',n||"opacity-panel")||this;return a.opacities=[],a.opacityBoxes=[],a.opacities=s,a.currentOpacity=r,a.setCurrentOpacity=a.setCurrentOpacity.bind(a),a}return u(e,o),e.prototype.getUi=function(){var t=this,s=document.createElement("div");return s.style.display="flex",s.style.overflow="hidden",s.style.flexGrow="2",s.style.justifyContent="space-between",this.opacities.forEach((function(r){var i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="center",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderColor=r===t.currentOpacity?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentOpacity(r,i)})),s.appendChild(i);var n=document.createElement("div");n.innerText=100*r+"%",i.appendChild(n),t.opacityBoxes.push(i)})),s},e.prototype.setCurrentOpacity=function(t,s){var r=this;this.currentOpacity=t,this.opacityBoxes.forEach((function(i){i.style.borderColor=i===s?r.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},e})(x),D=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.setOpacity=i.setOpacity.bind(i),i.fillColor=r.defaultHighlightColor,i.strokeWidth=0,i.opacity=r.defaultHighlightOpacity,i.fillPanel=new g("Color",r.defaultColorSet,i.fillColor),i.fillPanel.onColorChanged=i.setFillColor,i.opacityPanel=new Y("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return u(e,o),e.prototype.setOpacity=function(t){this.opacity=t,this.visual&&h.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=o.prototype.getState.call(this);return t.typeName=e.typeName,t},e.typeName="HighlightMarker",e.title="Highlight marker",e.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',e})(X),Z='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',N='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',V=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.bgColor="transparent",i.tipPosition={x:0,y:0},i.tipBase1Position={x:0,y:0},i.tipBase2Position={x:0,y:0},i.tipMoving=!1,i.color=r.defaultStrokeColor,i.bgColor=r.defaultFillColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setBgColor=i.setBgColor.bind(i),i.getTipPoints=i.getTipPoints.bind(i),i.positionTip=i.positionTip.bind(i),i.setTipPoints=i.setTipPoints.bind(i),i.colorPanel=new g("Text color",r.defaultColorSet,i.color,Z,"text-color-panel"),i.colorPanel.onColorChanged=i.setColor,i.bgColorPanel=new g("Fill color",r.defaultColorSet,i.bgColor,N,"fill-color-panel"),i.bgColorPanel.onColorChanged=i.setBgColor,i.fontFamilyPanel=new W("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i.tipGrip=new _,i.tipGrip.visual.transform.baseVal.appendItem(h.createTransform()),i.controlBox.appendChild(i.tipGrip.visual),i}return u(e,o),e.prototype.ownsTarget=function(t){return o.prototype.ownsTarget.call(this,t)||this.tipGrip.ownsTarget(t)||this.tip===t},e.prototype.createTip=function(){h.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=h.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},e.prototype.pointerDown=function(t,s){this.state==="new"&&o.prototype.pointerDown.call(this,t,s),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(s)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):o.prototype.pointerDown.call(this,t,s)},e.prototype.pointerUp=function(t){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,o.prototype.pointerUp.call(this,t);else{var s=this.state==="creating";o.prototype.pointerUp.call(this,t),this.setTipPoints(s),this.positionTip()}},e.prototype.manipulate=function(t){if(this.tipMoving){var s=this.unrotatePoint(t);this.tipPosition={x:s.x-this.manipulationStartLeft,y:s.y-this.manipulationStartTop},this.positionTip()}else o.prototype.manipulate.call(this,t)},e.prototype.setBgColor=function(t){this.bgRectangle&&this.tip&&(h.setAttributes(this.bgRectangle,[["fill",t]]),h.setAttributes(this.tip,[["fill",t]])),this.bgColor=t,this.fillColorChanged(t)},e.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},e.prototype.setTipPoints=function(t){t===void 0&&(t=!1);var s=Math.min(this.height/2,15),r=this.height/5;t&&(this.tipPosition={x:s+r/2,y:this.height+20});var i=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?i<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(r=this.width/5,s=Math.min(this.width/2,15),this.tipBase1Position={x:s,y:0},this.tipBase2Position={x:s+r,y:0}):(this.tipBase1Position={x:0,y:s},this.tipBase2Position={x:0,y:s+r}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?i<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(r=this.width/5,s=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-s-r,y:0},this.tipBase2Position={x:this.width-s,y:0}):(this.tipBase1Position={x:this.width,y:s},this.tipBase2Position={x:this.width,y:s+r}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?i<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(r=this.width/5,s=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-s-r,y:this.height},this.tipBase2Position={x:this.width-s,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-s-r},this.tipBase2Position={x:this.width,y:this.height-s}):i<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(r=this.width/5,s=Math.min(this.width/2,15),this.tipBase1Position={x:s,y:this.height},this.tipBase2Position={x:s+r,y:this.height}):(this.tipBase1Position={x:0,y:this.height-s},this.tipBase2Position={x:0,y:this.height-s-r})},e.prototype.resize=function(t){o.prototype.resize.call(this,t),this.positionTip()},e.prototype.positionTip=function(){h.setAttributes(this.tip,[["points",this.getTipPoints()]]);var t=this.tipGrip.visual.transform.baseVal.getItem(0);t.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(t,0)},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),e.prototype.select=function(){this.positionTip(),o.prototype.select.call(this)},e.prototype.getState=function(){var t=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},o.prototype.getState.call(this));return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){var s=t;this.bgColor=s.bgColor,this.tipPosition=s.tipPosition,o.prototype.restoreState.call(this,t),this.createTip(),this.setTipPoints()},e.prototype.scale=function(t,s){o.prototype.scale.call(this,t,s),this.tipPosition={x:this.tipPosition.x*t,y:this.tipPosition.y*s},this.positionTip()},e.typeName="CalloutMarker",e.title="Callout marker",e.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',e})(w),A=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.opacity=1,i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.fillColor=r.defaultFillColor,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.setOpacity=i.setOpacity.bind(i),i.createVisual=i.createVisual.bind(i),i.strokePanel=new g("Line color",E(r.defaultColorSet,["transparent"]),r.defaultColor,void 0,"stroke-color-panel"),i.strokePanel.onColorChanged=i.setStrokeColor,i.fillPanel=new g("Fill color",E(r.defaultColorSet,["transparent"]),i.fillColor,N,"fill-color-panel"),i.fillPanel.onColorChanged=i.setFillColor,i.strokeWidthPanel=new S("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new M("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i.opacityPanel=new Y("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return u(e,o),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.visual)},e.prototype.createVisual=function(){this.visual=h.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.state==="new"&&(this.createVisual(),this.moveVisual(t),this._state="creating")},e.prototype.manipulate=function(t){o.prototype.manipulate.call(this,t)},e.prototype.resize=function(t){o.prototype.resize.call(this,t),this.setSize()},e.prototype.setSize=function(){o.prototype.setSize.call(this),h.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},e.prototype.pointerUp=function(t){o.prototype.pointerUp.call(this,t),this.setSize()},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.visual&&h.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&h.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(t),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&h.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&h.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},e.prototype.setOpacity=function(t){this.opacity=t,this.visual&&h.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},o.prototype.getState.call(this));return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){var s=t;this.fillColor=s.fillColor,this.strokeColor=s.strokeColor,this.strokeWidth=s.strokeWidth,this.strokeDasharray=s.strokeDasharray,this.opacity=s.opacity,this.createVisual(),o.prototype.restoreState.call(this,t),this.setSize()},e.prototype.scale=function(t,s){o.prototype.scale.call(this,t,s),this.setSize()},e.typeName="EllipseMarker",e.title="Ellipse marker",e.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',e})(B),st=(function(o){function e(t,s,r){return o.call(this,t,s,r)||this}return u(e,o),Object.defineProperty(e.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.tip1&&t!==this.tip2)},e.prototype.createTips=function(){this.tip1=h.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(h.createTransform()),this.visual.appendChild(this.tip1),this.tip2=h.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(h.createTransform()),this.visual.appendChild(this.tip2)},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.state==="creating"&&this.createTips()},e.prototype.adjustVisual=function(){if(o.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(h.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),h.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),s=this.tip1.transform.baseVal.getItem(0);s.setRotate(t,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(s,0);var r=this.tip2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(r,0)}},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=o.prototype.getState.call(this);return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){o.prototype.restoreState.call(this,t),this.createTips(),this.adjustVisual()},e.typeName="MeasurementMarker",e.title="Measurement marker",e.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',e})(I),ot=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.strokePanel.colors=r.defaultColorSet,i.fillColor="transparent",i}return u(e,o),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=o.prototype.getState.call(this);return t.typeName=e.typeName,t},e.typeName="EllipseFrameMarker",e.title="Ellipse frame marker",e.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',e})(A),rt=(function(){function o(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(o.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),o.prototype.addUndoStep=function(e){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(e)||(this.undoStack.push(e),JSON.stringify(this.lastRedoStep)!==JSON.stringify(e)&&this.redoStack.splice(0,this.redoStack.length))},o.prototype.replaceLastUndoStep=function(e){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=e)},o.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},o.prototype.undo=function(){if(this.undoStack.length>1){var e=this.undoStack.pop();return e!==void 0&&this.redoStack.push(e),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},o.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},o})(),nt=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.curveX=0,i.curveY=0,i.manipulationStartCurveX=0,i.manipulationStartCurveY=0,i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.positionGrips=i.positionGrips.bind(i),i.addControlGrips=i.addControlGrips.bind(i),i.adjustVisual=i.adjustVisual.bind(i),i.setupControlBox=i.setupControlBox.bind(i),i.resize=i.resize.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new g("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new S("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new M("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return u(e,o),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorCurve&&t!==this.visibleCurve&&!this.curveGrip.ownsTarget(t))},e.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},e.prototype.createVisual=function(){this.visual=h.createGroup(),this.selectorCurve=h.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=h.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=t.x,this.curveY=t.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(s)&&(this.activeGrip=this.curveGrip,this._state="resize")},e.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),h.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),h.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),h.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setupControlBox=function(){o.prototype.setupControlBox.call(this),this.curveControlLine1=h.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=h.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},e.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,o.prototype.addControlGrips.call(this)},e.prototype.positionGrips=function(){o.prototype.positionGrips.call(this);var t=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-t/2,this.curveY-t/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},e.prototype.manipulate=function(t){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+t.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+t.y-this.manipulationStartY),o.prototype.manipulate.call(this,t)},e.prototype.resize=function(t){this.activeGrip===this.curveGrip&&(this.curveX=t.x,this.curveY=t.y),o.prototype.resize.call(this,t),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual()},e.prototype.scale=function(t,s){this.curveX=this.curveX*t,this.curveY=this.curveY*s,o.prototype.scale.call(this,t,s)},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},o.prototype.getState.call(this));return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){o.prototype.restoreState.call(this,t);var s=t;this.strokeColor=s.strokeColor,this.strokeWidth=s.strokeWidth,this.strokeDasharray=s.strokeDasharray,this.curveX=s.curveX,this.curveY=s.curveY,this.createVisual(),this.adjustVisual()},e.typeName="CurveMarker",e.title="Curve marker",e.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',e})(U),at=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.textColor="transparent",i.fontSize="1rem",i.isMoved=!1,i.captionText="Caption",i.PADDING=5,i.captionBoxWidth=0,i.captionBoxHeight=0,i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.fillColor=r.defaultFillColor,i.textColor=r.defaultStrokeColor,i.fontFamily=r.defaultFontFamily,i.fontSize=r.defaultCaptionFontSize,i.captionText=r.defaultCaptionText,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.createVisual=i.createVisual.bind(i),i.sizeCaption=i.sizeCaption.bind(i),i.setCaptionText=i.setCaptionText.bind(i),i.showTextEditor=i.showTextEditor.bind(i),i.positionTextEditor=i.positionTextEditor.bind(i),i.finishTextEditing=i.finishTextEditing.bind(i),i.setFont=i.setFont.bind(i),i.setTextColor=i.setTextColor.bind(i),i.strokePanel=new g("Line color",E(r.defaultColorSet,["transparent"]),i.strokeColor,void 0,"stroke-color-panel"),i.strokePanel.onColorChanged=i.setStrokeColor,i.fillPanel=new g("Fill color",E(r.defaultColorSet,["transparent"]),i.fillColor,N,"fill-color-panel"),i.fillPanel.onColorChanged=i.setFillColor,i.strokeWidthPanel=new S("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new M("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i.fontFamilyPanel=new W("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i.textColorPanel=new g("Text color",r.defaultColorSet,i.textColor,Z,"text-color-panel"),i.textColorPanel.onColorChanged=i.setTextColor,i}return u(e,o),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.frame&&t!==this.captionBg&&t!==this.captionElement)},e.prototype.createVisual=function(){this.visual=h.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=h.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=h.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=h.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},e.prototype.setCaptionText=function(t){this.captionText=t,this.captionElement.textContent=this.captionText,this.sizeCaption()},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.isMoved=!1,this.pointerDownPoint=t,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(t),this._state="creating")},e.prototype.manipulate=function(t){o.prototype.manipulate.call(this,t),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(t.x-this.pointerDownPoint.x)>5||Math.abs(t.y-this.pointerDownPoint.y)>5)},e.prototype.resize=function(t){o.prototype.resize.call(this,t),this.setSize()},e.prototype.sizeCaption=function(){var t=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=t.width+2*this.PADDING,this.captionBoxHeight=t.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),h.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),h.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},e.prototype.showTextEditor=function(){var t=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",(function(s){s.stopPropagation()})),this.textEditBox.addEventListener("keypress",(function(s){s.key==="Enter"&&t.finishTextEditing(t.textEditBox.value)})),this.textEditBox.addEventListener("keyup",(function(s){s.cancelBubble=!0})),this.textEditBox.addEventListener("blur",(function(){t.finishTextEditing(t.textEditBox.value)})),this.textEditDiv.addEventListener("pointerup",(function(){t.finishTextEditing(t.textEditBox.value)})),this.positionTextEditor(),this.textEditBox.focus()},e.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},e.prototype.finishTextEditing=function(t){this.setCaptionText(t.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},e.prototype.setFont=function(t){this.captionElement&&h.setAttributes(this.captionElement,[["font-family",t]]),this.fontFamily=t,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},e.prototype.setTextColor=function(t){this.captionElement&&h.setAttributes(this.captionElement,[["fill",t]]),this.textColor=t,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},e.prototype.setSize=function(){o.prototype.setSize.call(this),h.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},e.prototype.pointerUp=function(t){o.prototype.pointerUp.call(this,t),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},e.prototype.dblClick=function(t,s){o.prototype.dblClick.call(this,t,s),this.showTextEditor()},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.frame&&h.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.captionBg&&h.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(t),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.frame&&h.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.frame&&h.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},o.prototype.getState.call(this));return t.typeName=this.typeName,t},e.prototype.restoreState=function(t){var s=t;this.fillColor=s.fillColor,this.strokeColor=s.strokeColor,this.strokeWidth=s.strokeWidth,this.strokeDasharray=s.strokeDasharray,this.textColor=s.textColor,this.fontFamily=s.fontFamily,this.captionText=s.captionText,this.fontSize=s.fontSize,this.createVisual(),o.prototype.restoreState.call(this,t),this.setSize()},e.prototype.scale=function(t,s){o.prototype.scale.call(this,t,s),this.setSize()},e.typeName="CaptionFrameMarker",e.title="Caption frame marker",e.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',e})(B),v=(function(){function o(e,t){t===void 0&&(t=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=e,this.cancelable=t}return Object.defineProperty(o.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),o.prototype.preventDefault=function(){this._defaultPrevented=!0},o})(),ht=(function(o){function e(t,s,r){var i=o.call(this,t,!1)||this;return i.dataUrl=s,i.state=r,i}return u(e,o),e})(v),b=(function(o){function e(t,s,r){r===void 0&&(r=!1);var i=o.call(this,t,r)||this;return i.marker=s,i}return u(e,o),e})(v),lt=(function(){function o(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return o.prototype.addEventListener=function(e,t){this[e].push(t)},o.prototype.removeEventListener=function(e,t){var s=this[e].indexOf(t);s>-1&&this[e].splice(s,1)},o})(),pt=(function(){function o(e){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new et,this._isOpen=!1,this.undoRedoManager=new rt,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new lt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=o.instanceCounter++,this.styles=new Q(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=e,this.targetRoot=document.body,this.width=e.clientWidth,this.height=e.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this),this.addMarkerEvents=this.addMarkerEvents.bind(this)}return Object.defineProperty(o.prototype,"ALL_MARKER_TYPES",{get:function(){return[P,k,L,w,ot,A,D,V,st,X,I,nt,at]},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[P,k,L,w,A,D,V]},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"BASIC_MARKER_TYPES",{get:function(){return[P,k,L,w,D]},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(e){var t=this;this._availableMarkerTypes.splice(0),e.forEach((function(s){if(typeof s=="string"){var r=t.ALL_MARKER_TYPES.find((function(i){return i.typeName===s}));r!==void 0&&t._availableMarkerTypes.push(r)}else t._availableMarkerTypes.push(s)}))},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(e){this._zoomLevel=e,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),o.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),R.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},o.prototype.show=function(){var e=this;this.styles.styleSheetRoot===void 0&&O.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=O.styleSheetRoot),this.markers.splice(0),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(t){return t(new v(e))}))},o.prototype.render=function(){return H(this,void 0,void 0,(function(){var e;return z(this,(function(t){switch(t.label){case 0:return this.setCurrentMarker(),(e=new J).naturalSize=this.renderAtNaturalSize,e.imageType=this.renderImageType,e.imageQuality=this.renderImageQuality,e.markersOnly=this.renderMarkersOnly,e.width=this.renderWidth,e.height=this.renderHeight,[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return t.sent(),[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,t.sent()]}}))}))},o.prototype.close=function(e){var t=this;if(e===void 0&&(e=!1),this.isOpen){var s=!1;e||this.eventListeners.beforeclose.forEach((function(r){var i=new v(t,!0);r(i),i.defaultPrevented&&(s=!0)})),s||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach((function(r){return r(new v(t))})),this.detachEvents(),this._isOpen=!1)}},o.prototype.addMarkersToToolbar=function(){for(var e,t=[],s=0;s<arguments.length;s++)t[s]=arguments[s];(e=this._availableMarkerTypes).push.apply(e,t)},o.prototype.addRenderEventListener=function(e){this.addEventListener("render",(function(t){e(t.dataUrl,t.state)}))},o.prototype.removeRenderEventListener=function(e){},o.prototype.addCloseEventListener=function(e){this.addEventListener("close",(function(){e()}))},o.prototype.removeCloseEventListener=function(e){},o.prototype.setupResizeObserver=function(){var e=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){e.resize(e.target.clientWidth,e.target.clientHeight)})),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){return e.onPopupTargetResize()})),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},o.prototype.onPopupTargetResize=function(){var e=1*this.target.clientWidth/this.target.clientHeight,t=this.editorCanvas.clientWidth/e>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*e:this.editorCanvas.clientWidth,s=t<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/e;this.resize(t,s)},o.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},o.prototype.resize=function(e,t){this._isResizing=!0;var s=e/this.imageWidth,r=t/this.imageHeight;this.imageWidth=Math.round(e),this.imageHeight=Math.round(t),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(s,r),this._isResizing=!1},o.prototype.scaleMarkers=function(e,t){var s,r=this;this._currentMarker&&this._currentMarker instanceof w?this._currentMarker.scale(e,t):(s=this._currentMarker,this.setCurrentMarker()),this.markers.forEach((function(i){i!==r._currentMarker&&i.scale(e,t)})),s!==void 0&&this.setCurrentMarker(s)},o.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},o.prototype.setTopLeft=function(){var e=this.editingTarget.getBoundingClientRect(),t=this.editorCanvas.getBoundingClientRect();this.left=e.left-t.left,this.top=e.top-t.top},o.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},o.prototype.addDefs=function(){for(var e,t=[],s=0;s<arguments.length;s++)t[s]=arguments[s];this.defs=h.createDefs(),this.addDefsToImage(),(e=this.defs).append.apply(e,t)},o.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},o.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},o.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},o.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("touchmove",(function(e){return e.preventDefault()})),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},o.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},o.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},o.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},o.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var e=document.createElement("a");e.href="https://markerjs.com/",e.target="_blank",e.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',e.title="Powered by marker.js",e.style.display="grid",e.style.alignItems="center",e.style.justifyItems="center",e.style.padding="3px",e.style.width="20px",e.style.height="20px",this.logoUI.appendChild(e),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},o.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},o.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},o.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},o.prototype.showUI=function(){var e;switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var t=this.settings.uiOffsetTop!==void 0?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0,s=this.target.offsetLeft+((e=this.settings.uiOffsetLeft)!==null&&e!==void 0?e:0);this.coverDiv.style.top=t+"px",this.coverDiv.style.left=s+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="fixed",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.settings.displayMode==="popup"&&(this.uiDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px"),this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new q(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.displayMode==="inline"&&this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new $(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},o.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv),this.coverDiv.remove(),this.coverDiv=null},o.prototype.removeMarker=function(e){this.markerImage.removeChild(e.container),this.markers.indexOf(e)>-1&&this.markers.splice(this.markers.indexOf(e),1),e.dispose()},o.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},o.prototype.toolbarButtonClicked=function(e,t){if(e==="marker"&&t!==void 0)this.createNewMarker(t);else if(e==="action")switch(t){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},o.prototype.deleteSelectedMarker=function(){var e=this;if(this._currentMarker!==void 0&&this._currentMarker.state==="select"){var t=!1;if(this.eventListeners.markerbeforedelete.forEach((function(r){var i=new b(e,e._currentMarker,!0);r(i),i.defaultPrevented&&(t=!0)})),!t){var s=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach((function(r){return r(new b(e,s))}))}}},o.prototype.clear=function(){var e=this,t=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(n){var a=new b(e,void 0,!0);n(a),a.defaultPrevented&&(t=!0)})),!t)){this.setCurrentMarker();for(var s=function(n){var a=r.markers[n];r.setCurrentMarker(r.markers[n]),r._currentMarker.dispose(),r.markerImage.removeChild(r._currentMarker.container),r.markers.splice(r.markers.indexOf(r._currentMarker),1),r.eventListeners.markerdelete.forEach((function(c){return c(new b(e,a))}))},r=this,i=this.markers.length-1;i>=0;i--)s(i);this.addUndoStep()}},Object.defineProperty(o.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),o.prototype.showNotesEditor=function(){var e;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(e=this._currentMarker.notes)!==null&&e!==void 0?e:"",this.overlayContainer.appendChild(this.notesArea))},o.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},o.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},o.prototype.addUndoStep=function(){var e=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var t=this.getState(),s=this.undoRedoManager.getLastUndoStep();if(!s||s.width===t.width&&s.height===t.height){var r=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(t),r<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach((function(i){return i(new v(e))}))}else this.undoRedoManager.replaceLastUndoStep(t)}},o.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},o.prototype.undoStep=function(){var e=this,t=this.undoRedoManager.undo();t!==void 0&&(this.restoreState(t),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(s){return s(new v(e))})))},o.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},o.prototype.redoStep=function(){var e=this,t=this.undoRedoManager.redo();t!==void 0&&(this.restoreState(t),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(s){return s(new v(e))})))},o.prototype.stepZoom=function(){var e=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=e<this.zoomSteps.length-1?this.zoomSteps[e+1]:this.zoomSteps[0]},o.prototype.panTo=function(e){this.contentDiv.scrollBy({left:this.prevPanPoint.x-e.x,top:this.prevPanPoint.y-e.y}),this.prevPanPoint=e},o.prototype.startRenderAndClose=function(){return H(this,void 0,void 0,(function(){var e,t,s=this;return z(this,(function(r){switch(r.label){case 0:return[4,this.render()];case 1:return e=r.sent(),t=this.getState(),this.eventListeners.render.forEach((function(i){return i(new ht(s,e,t))})),this.close(!0),[2]}}))}))},o.prototype.getState=function(e){e===!0&&this.setCurrentMarker();var t={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach((function(s){return t.markers.push(s.getState())})),t},o.prototype.restoreState=function(e){var t=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);e.markers.forEach((function(s){var r=t._availableMarkerTypes.find((function(n){return n.typeName===s.typeName}));if(r!==void 0){var i=t.addNewMarker(r);i.restoreState(s),t.addMarkerEvents(i),t.markers.push(i)}})),e.width&&e.height&&(e.width!==this.imageWidth||e.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/e.width,this.imageHeight/e.height),this.eventListeners.restorestate.forEach((function(s){return s(new v(t))}))},o.prototype.addNewMarker=function(e){var t=h.createGroup();return this.markerImage.appendChild(t),new e(t,this.overlayContainer,this.settings)},o.prototype.createNewMarker=function(e){var t,s=this;(t=typeof e=="string"?this._availableMarkerTypes.find((function(r){return r.typeName===e})):e)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(t),this.addMarkerEvents(this._currentMarker),this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(t.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach((function(r){return r(new b(s,s._currentMarker))})))},o.prototype.addMarkerEvents=function(e){e.onMarkerCreated=this.markerCreated,e.onColorChanged=this.colorChanged,e.onFillColorChanged=this.fillColorChanged,e.onStateChanged=this.markerStateChanged},o.prototype.markerCreated=function(e){var t=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(e),this.setCurrentMarker(e),e instanceof k&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(k):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach((function(s){return s(new b(t,e))}))},o.prototype.colorChanged=function(e){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=e,this.settings.defaultStrokeColor=e)},o.prototype.fillColorChanged=function(e){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=e)},o.prototype.markerStateChanged=function(e){var t=this;this.eventListeners.markerchange.forEach((function(s){return s(new b(t,e))}))},o.prototype.setCurrentMarker=function(e){var t=this;this._currentMarker!==e&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach((function(s){return s(new b(t,t._currentMarker))}))),this._currentMarker=e,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach((function(s){return s(new b(t,t._currentMarker))})))},o.prototype.onPointerDown=function(e){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||e.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var t=this.markers.find((function(s){return s.ownsTarget(e.target)}));t!==void 0?(this.setCurrentMarker(t),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(e.clientX,e.clientY),e.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:e.clientX,y:e.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(e.clientX,e.clientY))},o.prototype.onDblClick=function(e){if(this._isFocused||this.focus(),this.mode==="select"){var t=this.markers.find((function(s){return s.ownsTarget(e.target)}));t!==void 0&&t!==this._currentMarker&&this.setCurrentMarker(t),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(e.clientX,e.clientY),e.target):this.setCurrentMarker()}},o.prototype.onPointerMove=function(e){this.touchPoints!==1&&e.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||e.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(e.clientX,e.clientY)):this.zoomLevel>1&&this.panTo({x:e.clientX,y:e.clientY}))},o.prototype.onPointerUp=function(e){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(e.clientX,e.clientY)),this.isDragging=!1,this.addUndoStep()},o.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},o.prototype.onKeyUp=function(e){this._currentMarker===void 0||this.notesArea!==void 0||e.key!=="Delete"&&e.key!=="Backspace"||this.deleteSelectedMarker()},o.prototype.clientToLocalCoordinates=function(e,t){var s=this.markerImage.getBoundingClientRect(),r=s.width/this.imageWidth/this.zoomLevel,i=s.height/this.imageHeight/this.zoomLevel;return{x:(e-s.left)/this.zoomLevel/r,y:(t-s.top)/this.zoomLevel/i}},o.prototype.onWindowResize=function(){this.positionUI()},o.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var e=this.target.getClientRects(),t=e.length>0&&e.item(0)&&e.item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},o.prototype.addLicenseKey=function(e){R.addKey(e)},o.prototype.addEventListener=function(e,t){this.eventListeners.addEventListener(e,t)},o.prototype.removeEventListener=function(e,t){this.eventListeners.removeEventListener(e,t)},o.prototype.renderState=function(e){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(e),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(o.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),o.prototype.focus=function(){var e=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(t){return t(new v(e))})))},o.prototype.blur=function(){var e=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(t){return t(new v(e))})))},o.instanceCounter=0,o})();export{R as Activator,L as ArrowMarker,it as ArrowTypePanel,V as CalloutMarker,at as CaptionFrameMarker,g as ColorPickerPanel,X as CoverMarker,nt as CurveMarker,ot as EllipseFrameMarker,A as EllipseMarker,lt as EventListenerRepository,W as FontFamilyPanel,P as FrameMarker,k as FreehandMarker,D as HighlightMarker,I as LineMarker,M as LineStylePanel,S as LineWidthPanel,U as LinearMarkerBase,pt as MarkerArea,v as MarkerAreaEvent,ht as MarkerAreaRenderEvent,F as MarkerBase,b as MarkerEvent,st as MeasurementMarker,Y as OpacityPanel,j as RectangleMarker,B as RectangularBoxMarkerBase,tt as RectangularBoxMarkerGrips,_ as ResizeGrip,et as Settings,O as Style,y as StyleClass,Q as StyleManager,h as SvgHelper,w as TextMarker,x as ToolboxPanel,T as TransformMatrix};