vue-data-ui 3.20.0 → 3.20.1

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 (322) hide show
  1. package/package.json +120 -120
  2. package/dist/A11yDataTable-BCbtxMU6.js +0 -45
  3. package/dist/Arrow-D6j6ocXm.js +0 -116
  4. package/dist/BaseDraggableDialog-4hDW-Rj2.js +0 -272
  5. package/dist/BaseIcon-DfLoHNUj.js +0 -502
  6. package/dist/BaseLegendToggle-C_Db-y7s.js +0 -56
  7. package/dist/BaseScanner-Dr2a1Msy.js +0 -27
  8. package/dist/BaseZoomControls-CG7hI_1P.js +0 -111
  9. package/dist/ColorPicker-Bjwxnvfh.js +0 -255
  10. package/dist/DataTable-B--IN22e.js +0 -150
  11. package/dist/Legend-Cz2uQ5gs.js +0 -114
  12. package/dist/NonSvgPenAndPaper-gLNJ1Lmr.js +0 -577
  13. package/dist/PackageVersion-xcyrdRmY.js +0 -11
  14. package/dist/PenAndPaper-DqrClVfb.js +0 -461
  15. package/dist/RecursiveCircles-D6aDPmoe.js +0 -117
  16. package/dist/RecursiveLabels-D9rfID6q.js +0 -56
  17. package/dist/RecursiveLinks-BygcpDiT.js +0 -78
  18. package/dist/Shape-BPCJfphn.js +0 -141
  19. package/dist/Slicer-SHBj0VaV.js +0 -1144
  20. package/dist/SlicerPreview-DdihbUSJ.js +0 -1668
  21. package/dist/SparkTooltip-CfE6yCad.js +0 -93
  22. package/dist/Title-NWp4qB4K.js +0 -87
  23. package/dist/Tooltip-BENq327o.js +0 -312
  24. package/dist/UserOptions-C1NgoGu6.js +0 -1411
  25. package/dist/_plugin-vue_export-helper-B3ysoDQm.js +0 -8
  26. package/dist/canvas-lib-BOP_HS11.js +0 -79
  27. package/dist/components/arrow.js +0 -2
  28. package/dist/components/vue-ui-3d-bar.js +0 -2
  29. package/dist/components/vue-ui-accordion.js +0 -2
  30. package/dist/components/vue-ui-age-pyramid.js +0 -2
  31. package/dist/components/vue-ui-annotator.js +0 -2
  32. package/dist/components/vue-ui-bullet.js +0 -2
  33. package/dist/components/vue-ui-bump.js +0 -2
  34. package/dist/components/vue-ui-candlestick.js +0 -2
  35. package/dist/components/vue-ui-carousel-table.js +0 -2
  36. package/dist/components/vue-ui-chestnut.js +0 -2
  37. package/dist/components/vue-ui-chord.js +0 -2
  38. package/dist/components/vue-ui-circle-pack.js +0 -2
  39. package/dist/components/vue-ui-cursor.js +0 -2
  40. package/dist/components/vue-ui-dag.js +0 -2
  41. package/dist/components/vue-ui-dashboard.js +0 -2
  42. package/dist/components/vue-ui-digits.js +0 -2
  43. package/dist/components/vue-ui-donut-evolution.js +0 -2
  44. package/dist/components/vue-ui-donut.js +0 -2
  45. package/dist/components/vue-ui-dumbbell.js +0 -2
  46. package/dist/components/vue-ui-flow.js +0 -2
  47. package/dist/components/vue-ui-funnel.js +0 -2
  48. package/dist/components/vue-ui-galaxy.js +0 -2
  49. package/dist/components/vue-ui-gauge.js +0 -2
  50. package/dist/components/vue-ui-geo.js +0 -2
  51. package/dist/components/vue-ui-gizmo.js +0 -2
  52. package/dist/components/vue-ui-heatmap.js +0 -2
  53. package/dist/components/vue-ui-history-plot.js +0 -2
  54. package/dist/components/vue-ui-horizontal-bar.js +0 -2
  55. package/dist/components/vue-ui-icon.js +0 -2
  56. package/dist/components/vue-ui-kpi.js +0 -2
  57. package/dist/components/vue-ui-mini-loader.js +0 -2
  58. package/dist/components/vue-ui-molecule.js +0 -2
  59. package/dist/components/vue-ui-mood-radar.js +0 -2
  60. package/dist/components/vue-ui-nested-donuts.js +0 -2
  61. package/dist/components/vue-ui-onion.js +0 -2
  62. package/dist/components/vue-ui-parallel-coordinate-plot.js +0 -2
  63. package/dist/components/vue-ui-pattern-seed.js +0 -2
  64. package/dist/components/vue-ui-pattern.js +0 -2
  65. package/dist/components/vue-ui-quadrant.js +0 -2
  66. package/dist/components/vue-ui-quick-chart.js +0 -2
  67. package/dist/components/vue-ui-radar.js +0 -2
  68. package/dist/components/vue-ui-rating.js +0 -2
  69. package/dist/components/vue-ui-relation-circle.js +0 -2
  70. package/dist/components/vue-ui-ridgeline.js +0 -2
  71. package/dist/components/vue-ui-rings.js +0 -2
  72. package/dist/components/vue-ui-scatter.js +0 -2
  73. package/dist/components/vue-ui-skeleton.js +0 -2
  74. package/dist/components/vue-ui-smiley.js +0 -2
  75. package/dist/components/vue-ui-spark-trend.js +0 -2
  76. package/dist/components/vue-ui-sparkbar.js +0 -2
  77. package/dist/components/vue-ui-sparkgauge.js +0 -2
  78. package/dist/components/vue-ui-sparkhistogram.js +0 -2
  79. package/dist/components/vue-ui-sparkline.js +0 -2
  80. package/dist/components/vue-ui-sparkstackbar.js +0 -2
  81. package/dist/components/vue-ui-stackbar.js +0 -2
  82. package/dist/components/vue-ui-stackline.js +0 -2
  83. package/dist/components/vue-ui-strip-plot.js +0 -2
  84. package/dist/components/vue-ui-table-heatmap.js +0 -2
  85. package/dist/components/vue-ui-table-sparkline.js +0 -2
  86. package/dist/components/vue-ui-table.js +0 -2
  87. package/dist/components/vue-ui-thermometer.js +0 -2
  88. package/dist/components/vue-ui-timer.js +0 -2
  89. package/dist/components/vue-ui-tiremarks.js +0 -2
  90. package/dist/components/vue-ui-treemap.js +0 -2
  91. package/dist/components/vue-ui-vertical-bar.js +0 -2
  92. package/dist/components/vue-ui-waffle.js +0 -2
  93. package/dist/components/vue-ui-wheel.js +0 -2
  94. package/dist/components/vue-ui-word-cloud.js +0 -2
  95. package/dist/components/vue-ui-world.js +0 -2
  96. package/dist/components/vue-ui-xy-canvas.js +0 -2
  97. package/dist/components/vue-ui-xy.js +0 -2
  98. package/dist/dom-to-png-BYtB4BF3.js +0 -237
  99. package/dist/exposedLib-CI8ji8G-.js +0 -19
  100. package/dist/geoProjections-Czak6Jn1.js +0 -145
  101. package/dist/img-1cKsci8e.js +0 -74
  102. package/dist/labelUtils-CUctkYoA.js +0 -19
  103. package/dist/lib-DUeYQsS0.js +0 -1882
  104. package/dist/llms.txt +0 -232
  105. package/dist/patternUtils-CS7hn6at.js +0 -258
  106. package/dist/pdf-D0eZ99cP.js +0 -90
  107. package/dist/rolldown-runtime-Dy4uBu1J.js +0 -11
  108. package/dist/style.css +0 -2
  109. package/dist/types/arrow.d.ts +0 -4
  110. package/dist/types/utils.d.ts +0 -551
  111. package/dist/types/vue-data-ui.d.ts +0 -17190
  112. package/dist/types/vue-ui-3d-bar.d.ts +0 -93
  113. package/dist/types/vue-ui-accordion.d.ts +0 -11
  114. package/dist/types/vue-ui-age-pyramid.d.ts +0 -108
  115. package/dist/types/vue-ui-annotator.d.ts +0 -34
  116. package/dist/types/vue-ui-bullet.d.ts +0 -85
  117. package/dist/types/vue-ui-bump.d.ts +0 -92
  118. package/dist/types/vue-ui-candlestick.d.ts +0 -106
  119. package/dist/types/vue-ui-carousel-table.d.ts +0 -59
  120. package/dist/types/vue-ui-chestnut.d.ts +0 -98
  121. package/dist/types/vue-ui-chord.d.ts +0 -110
  122. package/dist/types/vue-ui-circle-pack.d.ts +0 -126
  123. package/dist/types/vue-ui-cursor.d.ts +0 -9
  124. package/dist/types/vue-ui-dag.d.ts +0 -125
  125. package/dist/types/vue-ui-dashboard.d.ts +0 -68
  126. package/dist/types/vue-ui-digits.d.ts +0 -12
  127. package/dist/types/vue-ui-donut-evolution.d.ts +0 -96
  128. package/dist/types/vue-ui-donut.d.ts +0 -123
  129. package/dist/types/vue-ui-dumbbell.d.ts +0 -94
  130. package/dist/types/vue-ui-flow.d.ts +0 -106
  131. package/dist/types/vue-ui-funnel.d.ts +0 -79
  132. package/dist/types/vue-ui-galaxy.d.ts +0 -114
  133. package/dist/types/vue-ui-gauge.d.ts +0 -89
  134. package/dist/types/vue-ui-geo.d.ts +0 -94
  135. package/dist/types/vue-ui-gizmo.d.ts +0 -22
  136. package/dist/types/vue-ui-heatmap.d.ts +0 -101
  137. package/dist/types/vue-ui-history-plot.d.ts +0 -114
  138. package/dist/types/vue-ui-horizontal-bar.d.ts +0 -116
  139. package/dist/types/vue-ui-icon.d.ts +0 -15
  140. package/dist/types/vue-ui-kpi.d.ts +0 -25
  141. package/dist/types/vue-ui-mini-loader.d.ts +0 -15
  142. package/dist/types/vue-ui-molecule.d.ts +0 -112
  143. package/dist/types/vue-ui-mood-radar.d.ts +0 -92
  144. package/dist/types/vue-ui-nested-donuts.d.ts +0 -111
  145. package/dist/types/vue-ui-onion.d.ts +0 -106
  146. package/dist/types/vue-ui-parallel-coordinate-plot.d.ts +0 -125
  147. package/dist/types/vue-ui-pattern-seed.d.ts +0 -14
  148. package/dist/types/vue-ui-pattern.d.ts +0 -15
  149. package/dist/types/vue-ui-quadrant.d.ts +0 -125
  150. package/dist/types/vue-ui-quick-chart.d.ts +0 -108
  151. package/dist/types/vue-ui-radar.d.ts +0 -116
  152. package/dist/types/vue-ui-rating.d.ts +0 -42
  153. package/dist/types/vue-ui-relation-circle.d.ts +0 -92
  154. package/dist/types/vue-ui-ridgeline.d.ts +0 -106
  155. package/dist/types/vue-ui-rings.d.ts +0 -98
  156. package/dist/types/vue-ui-scatter.d.ts +0 -97
  157. package/dist/types/vue-ui-skeleton.d.ts +0 -11
  158. package/dist/types/vue-ui-smiley.d.ts +0 -28
  159. package/dist/types/vue-ui-spark-trend.d.ts +0 -19
  160. package/dist/types/vue-ui-sparkbar.d.ts +0 -49
  161. package/dist/types/vue-ui-sparkgauge.d.ts +0 -28
  162. package/dist/types/vue-ui-sparkhistogram.d.ts +0 -46
  163. package/dist/types/vue-ui-sparkline.d.ts +0 -59
  164. package/dist/types/vue-ui-sparkstackbar.d.ts +0 -60
  165. package/dist/types/vue-ui-stackbar.d.ts +0 -118
  166. package/dist/types/vue-ui-stackline.d.ts +0 -114
  167. package/dist/types/vue-ui-strip-plot.d.ts +0 -96
  168. package/dist/types/vue-ui-table-heatmap.d.ts +0 -62
  169. package/dist/types/vue-ui-table-sparkline.d.ts +0 -53
  170. package/dist/types/vue-ui-table.d.ts +0 -38
  171. package/dist/types/vue-ui-thermometer.d.ts +0 -70
  172. package/dist/types/vue-ui-timer.d.ts +0 -49
  173. package/dist/types/vue-ui-tiremarks.d.ts +0 -70
  174. package/dist/types/vue-ui-treemap.d.ts +0 -104
  175. package/dist/types/vue-ui-vertical-bar.d.ts +0 -22
  176. package/dist/types/vue-ui-waffle.d.ts +0 -101
  177. package/dist/types/vue-ui-wheel.d.ts +0 -70
  178. package/dist/types/vue-ui-word-cloud.d.ts +0 -97
  179. package/dist/types/vue-ui-world.d.ts +0 -98
  180. package/dist/types/vue-ui-xy-canvas.d.ts +0 -101
  181. package/dist/types/vue-ui-xy.d.ts +0 -146
  182. package/dist/useAutoSizeLabelsInsideViewbox-BIVntRZp.js +0 -50
  183. package/dist/useChartAccessibility-DYqac8yF.js +0 -12
  184. package/dist/useConfig-DAyQk86L.js +0 -7479
  185. package/dist/useFitSvgText-CT3nmlaS.js +0 -63
  186. package/dist/useNestedProp-CNcoy38D.js +0 -10
  187. package/dist/useObjectBindings-BI7hP-BC.js +0 -189
  188. package/dist/usePanZoom-CYU3B4T3.js +0 -157
  189. package/dist/usePrefersMotion-BC-CsqR1.js +0 -15
  190. package/dist/usePrinter-C1Gqt_Sp.js +0 -49
  191. package/dist/useResponsive-BfnK0KxU.js +0 -19
  192. package/dist/useStableElementSize-C7KADDKj.js +0 -77
  193. package/dist/useSvgExport-SVIsDot8.js +0 -755
  194. package/dist/useTableResponsive-B24Uwt2E.js +0 -24
  195. package/dist/useThemeCheck-C43Tcqmk.js +0 -24
  196. package/dist/useTimeLabelCollider-AEcY4Ioe.js +0 -57
  197. package/dist/useTimeLabels-BmBRv27Y.js +0 -272
  198. package/dist/useUserOptionState-DK-_1ddE.js +0 -15
  199. package/dist/utils.js +0 -28
  200. package/dist/vClickOutside-DUrZWttG.js +0 -13
  201. package/dist/vue-data-ui-qpQv-4uP.js +0 -274
  202. package/dist/vue-data-ui.js +0 -76
  203. package/dist/vue-ui-3d-bar-C8cputoI.js +0 -1757
  204. package/dist/vue-ui-accordion-Dw4MHKVB.js +0 -81
  205. package/dist/vue-ui-age-pyramid-Cv2Ndbb5.js +0 -1238
  206. package/dist/vue-ui-annotator-DLPUAKlm.js +0 -2899
  207. package/dist/vue-ui-bullet-DLxmtMJ9.js +0 -710
  208. package/dist/vue-ui-bump-DVaqtZbd.js +0 -1249
  209. package/dist/vue-ui-candlestick-CkApimw1.js +0 -1826
  210. package/dist/vue-ui-carousel-table-CbfIBWl3.js +0 -455
  211. package/dist/vue-ui-chestnut-CQT4nCFL.js +0 -2010
  212. package/dist/vue-ui-chord-8IjSrg6f.js +0 -1391
  213. package/dist/vue-ui-circle-pack-B1CpTtpw.js +0 -1608
  214. package/dist/vue-ui-cursor-NaTj5i2-.js +0 -283
  215. package/dist/vue-ui-dag-DH4ocx0S.js +0 -2909
  216. package/dist/vue-ui-dashboard-Ckff1yim.js +0 -513
  217. package/dist/vue-ui-digits-DwLlJqbW.js +0 -209
  218. package/dist/vue-ui-donut-DQdIdwRU.js +0 -2410
  219. package/dist/vue-ui-donut-evolution-MfM5kK6w.js +0 -1510
  220. package/dist/vue-ui-dumbbell-B2T4vlK-.js +0 -1530
  221. package/dist/vue-ui-flow-CJh6f72m.js +0 -1235
  222. package/dist/vue-ui-funnel-C9gfXNCr.js +0 -777
  223. package/dist/vue-ui-galaxy-pBR_FESJ.js +0 -1077
  224. package/dist/vue-ui-gauge-CAemxCGl.js +0 -920
  225. package/dist/vue-ui-geo-BDQqaukJ.js +0 -1516
  226. package/dist/vue-ui-gizmo-B1ppjqPj.js +0 -225
  227. package/dist/vue-ui-heatmap-BiC9xp8L.js +0 -1568
  228. package/dist/vue-ui-history-plot-iAPjlOja.js +0 -1554
  229. package/dist/vue-ui-horizontal-bar-CcgClgLg.js +0 -1681
  230. package/dist/vue-ui-kpi-CJ5oyYLS.js +0 -96
  231. package/dist/vue-ui-mini-loader-CyqBt2g4.js +0 -125
  232. package/dist/vue-ui-molecule-Cg9ZHa6b.js +0 -925
  233. package/dist/vue-ui-mood-radar-N8osOTFR.js +0 -1148
  234. package/dist/vue-ui-nested-donuts-CwH3wKgX.js +0 -1487
  235. package/dist/vue-ui-onion-C56gFjO6.js +0 -1200
  236. package/dist/vue-ui-parallel-coordinate-plot-C-jj819p.js +0 -1416
  237. package/dist/vue-ui-pattern-DKozfnVn.js +0 -154
  238. package/dist/vue-ui-pattern-seed-BB1honLm.js +0 -61
  239. package/dist/vue-ui-quadrant-DYc9xZY3.js +0 -1978
  240. package/dist/vue-ui-quick-chart-BG7kK_-q.js +0 -2469
  241. package/dist/vue-ui-radar-CgKog9Xw.js +0 -1229
  242. package/dist/vue-ui-rating-BG4lf1z8.js +0 -343
  243. package/dist/vue-ui-relation-circle-D-rUk-0P.js +0 -924
  244. package/dist/vue-ui-ridgeline-DPrlVJTW.js +0 -1622
  245. package/dist/vue-ui-rings-CIvvHHsF.js +0 -1246
  246. package/dist/vue-ui-scatter-CeBQJbGx.js +0 -2413
  247. package/dist/vue-ui-skeleton-BKoa_G6d.js +0 -2556
  248. package/dist/vue-ui-smiley-G89TxRU-.js +0 -356
  249. package/dist/vue-ui-spark-trend-DGOrPr9I.js +0 -438
  250. package/dist/vue-ui-sparkbar-BVumo-YD.js +0 -393
  251. package/dist/vue-ui-sparkgauge-BoCwdQcu.js +0 -255
  252. package/dist/vue-ui-sparkhistogram-4qXY1LXW.js +0 -560
  253. package/dist/vue-ui-sparkline-C0kzXrwI.js +0 -1507
  254. package/dist/vue-ui-sparkstackbar-DG7hz_KM.js +0 -662
  255. package/dist/vue-ui-stackbar-Dnq4l5xs.js +0 -2270
  256. package/dist/vue-ui-stackline-CaNOHQYl.js +0 -2398
  257. package/dist/vue-ui-strip-plot-D2CcJw_5.js +0 -1340
  258. package/dist/vue-ui-table-NBQrkVnO.js +0 -1338
  259. package/dist/vue-ui-table-heatmap-CCGjbSzQ.js +0 -344
  260. package/dist/vue-ui-table-sparkline-BZDkOEEl.js +0 -707
  261. package/dist/vue-ui-thermometer-BXyHOQ7T.js +0 -763
  262. package/dist/vue-ui-timer-CcLK1wbi.js +0 -439
  263. package/dist/vue-ui-tiremarks-B6txvBg-.js +0 -552
  264. package/dist/vue-ui-treemap-O3SBpD3K.js +0 -1587
  265. package/dist/vue-ui-waffle-DN5zG3b0.js +0 -1362
  266. package/dist/vue-ui-wheel-CxnJGXkX.js +0 -885
  267. package/dist/vue-ui-word-cloud-CM5yPCXb.js +0 -1656
  268. package/dist/vue-ui-world-DCPgXKxh.js +0 -14264
  269. package/dist/vue-ui-xy-canvas-BUPnRZ3C.js +0 -1787
  270. package/dist/vue-ui-xy-lfMIx0wK.js +0 -4578
  271. package/dist/vue_ui_3d_bar-C4R7o-yX.js +0 -185
  272. package/dist/vue_ui_age_pyramid-BY6c-oX_.js +0 -301
  273. package/dist/vue_ui_bullet-ClzdLoOv.js +0 -186
  274. package/dist/vue_ui_bump-Vl-zYAtG.js +0 -201
  275. package/dist/vue_ui_candlestick-J8jmJvxP.js +0 -374
  276. package/dist/vue_ui_chestnut-D2oUhad6.js +0 -305
  277. package/dist/vue_ui_chord-DPfS1Umc.js +0 -275
  278. package/dist/vue_ui_circle_pack-DZC_rdfn.js +0 -172
  279. package/dist/vue_ui_dag-TsJ_azQq.js +0 -258
  280. package/dist/vue_ui_donut-BDGqG07h.js +0 -358
  281. package/dist/vue_ui_donut_evolution-D1yAAIHr.js +0 -717
  282. package/dist/vue_ui_dumbbell-Bfe_jFyi.js +0 -304
  283. package/dist/vue_ui_flow-BewZjjKG.js +0 -238
  284. package/dist/vue_ui_funnel-_Og4EEkO.js +0 -234
  285. package/dist/vue_ui_galaxy-Ig0cc1_h.js +0 -265
  286. package/dist/vue_ui_gauge-Cf1RZc9q.js +0 -178
  287. package/dist/vue_ui_geo-B8TODs-G.js +0 -248
  288. package/dist/vue_ui_heatmap-B2BBBSWG.js +0 -319
  289. package/dist/vue_ui_history_plot-CuN63VEc.js +0 -413
  290. package/dist/vue_ui_horizontal_bar-C4J4QzXf.js +0 -341
  291. package/dist/vue_ui_molecule-CO9L59SF.js +0 -231
  292. package/dist/vue_ui_mood_radar-BA6LAKhk.js +0 -281
  293. package/dist/vue_ui_nested_donuts-B8csIoVO.js +0 -273
  294. package/dist/vue_ui_onion-1FTFFS46.js +0 -293
  295. package/dist/vue_ui_parallel_coordinate_plot-CBiOBira.js +0 -278
  296. package/dist/vue_ui_quadrant-CDSTKTJz.js +0 -428
  297. package/dist/vue_ui_quick_chart-mZBdml3Z.js +0 -139
  298. package/dist/vue_ui_radar-jafTED5j.js +0 -306
  299. package/dist/vue_ui_relation_circle-D0p4mXmv.js +0 -98
  300. package/dist/vue_ui_ridgeline-VM8_mx4J.js +0 -767
  301. package/dist/vue_ui_rings-BVgD2aMn.js +0 -320
  302. package/dist/vue_ui_scatter-I0POnicu.js +0 -479
  303. package/dist/vue_ui_spark_trend-DxVmpkmC.js +0 -82
  304. package/dist/vue_ui_sparkbar-z6qO--Kf.js +0 -64
  305. package/dist/vue_ui_sparkgauge-BX1MS3bA.js +0 -90
  306. package/dist/vue_ui_sparkhistogram-BRgvKUH6.js +0 -123
  307. package/dist/vue_ui_sparkline-auZhap6Y.js +0 -151
  308. package/dist/vue_ui_sparkstackbar-BOjuQnZd.js +0 -175
  309. package/dist/vue_ui_stackbar-COOrQQdK.js +0 -412
  310. package/dist/vue_ui_stackline-DQqKPA9z.js +0 -460
  311. package/dist/vue_ui_strip_plot-CtJe8_gq.js +0 -301
  312. package/dist/vue_ui_table_heatmap-w8vx5k6f.js +0 -80
  313. package/dist/vue_ui_table_sparkline-DAbkUrNz.js +0 -124
  314. package/dist/vue_ui_thermometer-DxgqWKlE.js +0 -123
  315. package/dist/vue_ui_tiremarks-CdEPieWV.js +0 -122
  316. package/dist/vue_ui_treemap-DoEtkRN6.js +0 -328
  317. package/dist/vue_ui_vertical_bar-CP-MKz1j.js +0 -247
  318. package/dist/vue_ui_waffle-DIARFc7g.js +0 -292
  319. package/dist/vue_ui_wheel-DZ_nR--t.js +0 -133
  320. package/dist/vue_ui_word_cloud-C-qIMNLu.js +0 -254
  321. package/dist/vue_ui_xy-BLUkWEAm.js +0 -482
  322. package/dist/vue_ui_xy_canvas-Cb6dg3eK.js +0 -408
@@ -1,2899 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { Bt as t, H as n, Tt as r, b as i } from "./lib-DUeYQsS0.js";
3
- import { t as a } from "./useConfig-DAyQk86L.js";
4
- import { t as o } from "./usePrinter-C1Gqt_Sp.js";
5
- import { t as s } from "./dom-to-png-BYtB4BF3.js";
6
- import { t as c } from "./_plugin-vue_export-helper-B3ysoDQm.js";
7
- import { t as l } from "./BaseIcon-DfLoHNUj.js";
8
- import { t as ee } from "./vue-ui-accordion-Dw4MHKVB.js";
9
- import { t as te } from "./ColorPicker-Bjwxnvfh.js";
10
- import { Fragment as ne, Teleport as re, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as h, createVNode as g, nextTick as ie, normalizeClass as _, normalizeStyle as v, onBeforeUnmount as ae, onMounted as oe, openBlock as y, ref as b, renderList as se, renderSlot as ce, toDisplayString as x, unref as le, vModelCheckbox as ue, vModelText as de, watch as fe, withCtx as S, withDirectives as pe, withModifiers as me } from "vue";
11
- //#region src/registerAnnotatorShortcuts.js
12
- function he(e) {
13
- let t = (t) => e.isMacLike.value ? t.metaKey : t.ctrlKey, n = (e) => {
14
- let t = e;
15
- if (!t) return !1;
16
- let n = (t.tagName || "").toLowerCase();
17
- return t.isContentEditable || n === "input" || n === "textarea" || n === "select";
18
- }, r = (t) => !!(!e.isSummaryOpen.value || n(t.target) || e.isWriting.value), i = () => {
19
- e.isDeleteMode.value = !1, e.isMoveMode.value = !1, e.isResizeMode.value = !1, e.isSelectMode.value = !1, e.isDrawMode.value = !1, e.isTextMode.value = !1, e.activeShape.value = void 0, e.showCaret.value = !1;
20
- }, a = (t) => {
21
- switch (i(), t) {
22
- case "m":
23
- e.isMoveMode.value = !0;
24
- break;
25
- case "r":
26
- e.isResizeMode.value = !0;
27
- break;
28
- case "d":
29
- e.isDeleteMode.value = !0;
30
- break;
31
- case "g":
32
- e.isSelectMode.value = !0, e.setShapeTo("group"), e.activeShape.value = "group";
33
- break;
34
- case "t":
35
- e.isTextMode.value = !0, e.isWriting.value = !1, e.showCaret.value = !1;
36
- break;
37
- default: break;
38
- }
39
- }, o = (t) => {
40
- switch (t) {
41
- case "c":
42
- e.setShapeTo("circle");
43
- break;
44
- case "s":
45
- e.setShapeTo("rect");
46
- break;
47
- case "a":
48
- e.setShapeTo("arrow");
49
- break;
50
- case "l":
51
- e.setShapeTo("line");
52
- break;
53
- default: break;
54
- }
55
- }, s = (t, n) => {
56
- let r = e.lastSelectedShape.value;
57
- if (!r) return;
58
- let i = (e, t) => {
59
- typeof r[e] == "number" && (r[e] += t);
60
- };
61
- switch (r.type) {
62
- case "rect":
63
- case "circle":
64
- case "text":
65
- i("x", t), i("y", n);
66
- break;
67
- case "arrow":
68
- i("x", t), i("y", n), i("endX", t), i("endY", n);
69
- break;
70
- default: break;
71
- }
72
- }, c = () => {
73
- let t = e.lastSelectedShape.value;
74
- t && (e.shapes.value = e.shapes.value.filter((e) => e.id !== t.id), e.lastSelectedShape.value = void 0);
75
- }, l = !1, ee = null, te = () => {
76
- l || (l = !0, e.history?.value?.begin?.("nudge"));
77
- }, ne = () => {
78
- l && (clearTimeout(ee), ee = setTimeout(() => {
79
- l = !1, e.history?.value?.end?.();
80
- }, 160));
81
- }, re = () => {
82
- clearTimeout(ee), l && e.history?.value?.end?.(), l = !1;
83
- }, u = (n) => {
84
- if (t(n) && !n.shiftKey && n.key.toLowerCase() === "z") {
85
- if (r(n)) return;
86
- n.preventDefault(), e.undoLastShape?.();
87
- return;
88
- }
89
- if (t(n) && n.shiftKey && n.key.toLowerCase() === "z" || t(n) && n.key.toLowerCase() === "y") {
90
- if (r(n)) return;
91
- n.preventDefault(), typeof e.redoLastShape == "function" ? e.redoLastShape() : e.history?.value?.redo?.();
92
- return;
93
- }
94
- if (r(n)) return;
95
- let l = n.key.toLowerCase();
96
- if (l === "escape") {
97
- n.preventDefault(), i();
98
- return;
99
- }
100
- if (l === "delete" || l === "backspace") {
101
- n.preventDefault(), c();
102
- return;
103
- }
104
- if ([
105
- "m",
106
- "r",
107
- "d",
108
- "g",
109
- "t"
110
- ].includes(l)) {
111
- n.preventDefault(), a(l);
112
- return;
113
- }
114
- if ([
115
- "c",
116
- "a",
117
- "l",
118
- "s"
119
- ].includes(l)) {
120
- n.preventDefault(), o(l);
121
- return;
122
- }
123
- if (n.key === "ArrowUp" || n.key === "ArrowDown" || n.key === "ArrowLeft" || n.key === "ArrowRight") {
124
- n.preventDefault(), te();
125
- let e = n.shiftKey ? 10 : 1;
126
- n.key === "ArrowUp" && s(0, -e), n.key === "ArrowDown" && s(0, e), n.key === "ArrowLeft" && s(-e, 0), n.key === "ArrowRight" && s(e, 0), ne();
127
- }
128
- }, d = (e) => {
129
- e.key.startsWith("Arrow") && ne();
130
- };
131
- return window.addEventListener("keydown", u), window.addEventListener("keyup", d), function() {
132
- window.removeEventListener("keydown", u), window.removeEventListener("keyup", d), re();
133
- };
134
- }
135
- //#endregion
136
- //#region src/atoms/TeleportedTooltip.vue
137
- var ge = { class: "teleport-tooltip__inner" }, C = /* @__PURE__ */ c({
138
- __name: "TeleportedTooltip",
139
- props: {
140
- show: {
141
- type: Boolean,
142
- default: !1
143
- },
144
- x: {
145
- type: Number,
146
- required: !0
147
- },
148
- y: {
149
- type: Number,
150
- required: !0
151
- },
152
- placement: {
153
- type: String,
154
- default: "top"
155
- },
156
- styleObject: {
157
- type: Object,
158
- default() {
159
- return {};
160
- }
161
- },
162
- delay: {
163
- type: Number,
164
- default: 0
165
- },
166
- delayIn: {
167
- type: Number,
168
- default: 300
169
- },
170
- delayOut: {
171
- type: Number,
172
- default: 0
173
- }
174
- },
175
- setup(e) {
176
- let t = e, n = u(() => t.delayIn ?? t.delay), r = u(() => t.delayOut ?? t.delay), i = b(!1), a = null, o = null;
177
- function s() {
178
- a &&= (clearTimeout(a), null), o &&= (clearTimeout(o), null);
179
- }
180
- function c() {
181
- s();
182
- let e = Math.max(0, n.value || 0);
183
- e === 0 ? i.value = !0 : a = setTimeout(() => {
184
- i.value = !0, a = null;
185
- }, e);
186
- }
187
- function l() {
188
- s();
189
- let e = Math.max(0, r.value || 0);
190
- e === 0 ? i.value = !1 : o = setTimeout(() => {
191
- i.value = !1, o = null;
192
- }, e);
193
- }
194
- fe(() => t.show, (e) => {
195
- e ? c() : l();
196
- }, { immediate: !0 }), oe(() => {
197
- t.show && c();
198
- }), ae(() => {
199
- s();
200
- });
201
- let ee = u(() => ({
202
- position: "fixed",
203
- zIndex: 2147483647,
204
- top: `${t.y}px`,
205
- left: `${t.x}px`,
206
- transform: t.placement === "bottom" ? "translate(-50%, 8px)" : "translate(-50%, -100%)",
207
- pointerEvents: "none",
208
- ...t.styleObject
209
- }));
210
- return (t, n) => (y(), d(re, { to: "body" }, [i.value ? (y(), p("div", {
211
- key: 0,
212
- class: _(["teleport-tooltip", e.placement]),
213
- style: v(ee.value),
214
- role: "tooltip",
215
- "aria-hidden": "false"
216
- }, [m("div", ge, [ce(t.$slots, "default", {}, void 0, !0)])], 6)) : f("", !0)]));
217
- }
218
- }, [["__scopeId", "data-v-c292996f"]]), _e = /* @__PURE__ */ e({ default: () => vt }), ve = { class: "vue-data-ui-component vue-ui-annotator" }, ye = { "data-dom-to-png-ignore": "" }, be = ["disabled"], xe = ["disabled"], Se = ["disabled"], Ce = ["disabled"], we = ["disabled"], Te = ["disabled"], Ee = ["disabled"], De = ["disabled"], Oe = ["disabled"], ke = {
219
- class: "tool-selection",
220
- style: { "margin-top": "6px" }
221
- }, Ae = {
222
- viewBox: "0 0 12 12",
223
- style: { width: "100%" }
224
- }, je = ["fill"], Me = { key: 0 }, Ne = { class: "tool-input" }, Pe = ["checked"], Fe = {
225
- viewBox: "0 0 12 12",
226
- style: { width: "100%" }
227
- }, Ie = ["fill"], Le = { key: 1 }, Re = { class: "tool-input" }, ze = ["checked"], Be = {
228
- viewBox: "0 0 24 24",
229
- style: { width: "100%" }
230
- }, Ve = ["stroke"], He = { key: 2 }, Ue = { style: {
231
- display: "flex",
232
- "flex-direction": "column",
233
- "align-items": "center",
234
- "justify-content": "center"
235
- } }, We = { class: "tool-input" }, Ge = { key: 3 }, Ke = { style: {
236
- display: "flex",
237
- "flex-direction": "column",
238
- "align-items": "center",
239
- "justify-content": "center"
240
- } }, qe = { class: "tool-input" }, Je = {
241
- viewBox: "0 0 24 24",
242
- height: "24",
243
- width: "24",
244
- style: {
245
- "margin-bottom": "-5px",
246
- "margin-top": "-10px"
247
- }
248
- }, Ye = ["checked"], Xe = { key: 4 }, Ze = { style: {
249
- display: "flex",
250
- "flex-direction": "column",
251
- "align-items": "center",
252
- "justify-content": "center"
253
- } }, Qe = { class: "tool-input" }, $e = { key: 5 }, et = { key: 6 }, tt = ["disabled"], nt = { key: 7 }, rt = ["disabled"], it = { key: 8 }, at = { key: 9 }, ot = { key: 10 }, st = { key: 11 }, ct = {
254
- style: {
255
- display: "flex",
256
- "flex-direction": "column",
257
- "align-items": "center",
258
- "justify-content": "center"
259
- },
260
- class: "tooltip"
261
- }, lt = { style: {
262
- display: "flex",
263
- "flex-direction": "column",
264
- "align-items": "start",
265
- "justify-content": "center"
266
- } }, ut = {
267
- class: "tool-input",
268
- style: { "font-variant-numeric": "tabular-nums" }
269
- }, dt = ["id"], ft = [
270
- "viewBox",
271
- "width",
272
- "height"
273
- ], pt = [
274
- "width",
275
- "height",
276
- "pointer-events"
277
- ], mt = ["innerHTML"], ht = [
278
- "height",
279
- "viewBox",
280
- "width"
281
- ], gt = ["cx", "cy"], _t = "annotations", vt = /* @__PURE__ */ c({
282
- __name: "vue-ui-annotator",
283
- props: {
284
- config: {
285
- type: Object,
286
- default() {
287
- return {};
288
- }
289
- },
290
- dataset: {
291
- type: Object,
292
- default() {
293
- return {
294
- shapes: [],
295
- lastSelectedShape: void 0
296
- };
297
- }
298
- }
299
- },
300
- emits: ["toggleOpenState", "saveAnnotations"],
301
- setup(e, { emit: c }) {
302
- let re = e, ge = c, _e = b(n()), { isImaging: vt, generateImage: yt } = o({
303
- elementId: _e.value,
304
- fileName: _t
305
- }), w = b(void 0), bt = b(1), T = b({
306
- start: {
307
- x: 0,
308
- y: 0
309
- },
310
- end: {
311
- x: 0,
312
- y: 0
313
- }
314
- }), E = b(void 0), D = b(void 0), xt = b(!1), O = b(!1), St = b(!1), k = b(!1), Ct = b(!1), wt = b(!0), A = b(!1), Tt = b(!1), Et = b(!1), j = b(!1), Dt = b(!1), M = b(!1), N = b(!1), Ot = b(!1), P = b(!1), kt = b(!1), F = b(!1), I = b(re.dataset?.lastSelectedShape ?? void 0), L = b({
315
- x: 0,
316
- y: 0
317
- }), At = b(!0), R = b([]), z = b(re.dataset?.shapes || []);
318
- b([]);
319
- let jt = b(Math.round(Math.random()) * 1e5), Mt = b(1e3), Nt = b(1e3), B = b({
320
- arrow: {
321
- color: "grey",
322
- filled: !0
323
- },
324
- circle: {
325
- color: "grey",
326
- filled: !1,
327
- radius: 3,
328
- strokeWidth: 2
329
- },
330
- rect: {
331
- color: "grey",
332
- filled: !1,
333
- strokeWidth: 2,
334
- height: 12,
335
- width: 12
336
- }
337
- }), Pt = b("#1A1A1A"), V = b(!1), Ft = b(1), It = b(void 0), Lt = b(1), Rt = b(1), H = b("start"), zt = b(20), Bt = b(100), Vt = r, Ht = b(null), U = b(!1), W = b(null), G = b({
338
- x: 0,
339
- y: 0
340
- }), Ut = b(null), K = b([]), Wt = b(!1), Gt = b(null), Kt = b({
341
- undo: 0,
342
- redo: 0
343
- }), qt = b(null);
344
- b(null), b(null);
345
- let Jt = b(null), q = u(() => {
346
- let e = a().vue_ui_annotator;
347
- return Object.keys(re.config || {}).length ? i(t({
348
- defaultConfig: e,
349
- userConfig: re.config
350
- })) : e;
351
- }), J = u(() => q.value.useCursorPointer), Y = u(() => {
352
- let e = q.value.style.tooltips;
353
- return {
354
- backgroundColor: e.backgroundColor,
355
- color: e.color,
356
- border: e.border,
357
- borderRadius: `${e.borderRadius}px`,
358
- boxShadow: e.boxShadow
359
- };
360
- }), Yt = u(() => z.value.filter((e) => !["line", "group"].includes(e.type)).length > 1), Xt = u(() => Vt[Bt.value > 98 ? 98 : Bt.value]), Zt = u(() => {
361
- switch (!0) {
362
- case k.value: return "default";
363
- case j.value: return "move";
364
- case P.value: return "text";
365
- case M.value: return "se-resize";
366
- default: return "";
367
- }
368
- }), Qt = u(() => z.value), X = b(null);
369
- function $t(e) {
370
- if (e) switch (!0) {
371
- case e.type === "rect": return `
372
- <rect
373
- id="${e.id}"
374
- style="stroke-dasharray: 10; display:${D.value && D.value === e.id ? "initial" : "none"}"
375
- x="${e.x - 20}"
376
- y="${e.y - 20}"
377
- height="${e.rectHeight + 40}"
378
- width="${e.rectWidth + 40}"
379
- fill="transparent"
380
- stroke="grey"
381
- />
382
- `;
383
- case e.type === "circle": return `
384
- <rect
385
- id="${e.id}"
386
- style="stroke-dasharray: 10; display:${D.value && D.value === e.id ? "initial" : "none"}"
387
- x="${e.x - e.circleRadius - 20}"
388
- y="${e.y - e.circleRadius - 20}"
389
- height="${e.circleRadius * 2 + 40}"
390
- width="${e.circleRadius * 2 + 40}"
391
- fill="transparent"
392
- stroke="grey"
393
- />
394
- `;
395
- case e.type === "arrow":
396
- let t = e.endX - e.x > 0, n = e.endY - e.y > 0;
397
- return `
398
- <rect
399
- id="${e.id}"
400
- style="stroke-dasharray: 10; display:${D.value && D.value === e.id ? "initial" : "none"}"
401
- x="${t ? e.x - 20 : e.endX - 20}"
402
- y="${n ? e.y - 20 : e.endY - 20}"
403
- height="${n ? e.endY - e.y + 40 : e.y - e.endY + 40}"
404
- width="${t ? e.endX - e.x + 40 : e.x - e.endX + 40}"
405
- fill="transparent"
406
- stroke="grey"
407
- />
408
- `;
409
- case e.type === "text":
410
- let r = X.value ? Array.from(X.value.getElementsByTagName("text")).find((t) => t.id === e.id) : null;
411
- if (!r) return;
412
- let { x: i, y: a, width: o, height: s } = r.getBBox();
413
- return `
414
- <rect
415
- id="${e.id}"
416
- style="stroke-dasharray: 10; display:${D.value && D.value === e.id ? "initial" : "none"}"
417
- x="${i - 20}"
418
- y="${a - 20}"
419
- height="${s + 40}"
420
- width="${o + 40}"
421
- fill="transparent"
422
- stroke="grey"
423
- />
424
- `;
425
- default: return "";
426
- }
427
- }
428
- function en(e, t = !1) {
429
- switch (!0) {
430
- case e.type === "circle": return `
431
- <g id="${e.id}" style="display:${k.value ? "initial" : "none"};">
432
- <circle id="${e.id}" cx="${e.x}" cy="${e.y}" r="12" fill="red"/>
433
- <line stroke="white" stroke-width="2" id="${e.id}" x1="${e.x - 4}" y1="${e.y - 4}" x2="${e.x + 4}" y2="${e.y + 4}"/>
434
- <line stroke="white" stroke-width="2" id="${e.id}" x1="${e.x + 4}" y1="${e.y - 4}" x2="${e.x - 4}" y2="${e.y + 4}"/>
435
- </g>
436
- `;
437
- case e.type === "text":
438
- let n, r = [
439
- -8,
440
- -12,
441
- -4,
442
- -12,
443
- -4
444
- ];
445
- switch (!0) {
446
- case e.textAlign === "start":
447
- n = t ? [
448
- -20,
449
- -24,
450
- -16,
451
- -16,
452
- -24
453
- ] : [
454
- -16,
455
- -20,
456
- -12,
457
- -12,
458
- -20
459
- ];
460
- break;
461
- case e.textAlign === "middle":
462
- n = [
463
- 0,
464
- -4,
465
- 4,
466
- 4,
467
- -4
468
- ], r = [
469
- -32,
470
- -36,
471
- -28,
472
- -36,
473
- -28
474
- ];
475
- break;
476
- case e.textAlign === "end":
477
- n = [
478
- 16,
479
- 20,
480
- 12,
481
- 12,
482
- 20
483
- ];
484
- break;
485
- default:
486
- n = [
487
- 0,
488
- 0,
489
- 0
490
- ];
491
- break;
492
- }
493
- return `
494
- <g id="${e.id}" style="display:${k.value ? "initial" : "none"};">
495
- <circle id="${e.id}" cx="${e.x + n[0]}" cy="${e.y + r[0]}" r="12" fill="red"/>
496
- <line stroke="white" stroke-width="2" id="${e.id}" x1="${e.x + n[1]}" y1="${e.y + r[1]}" x2="${e.x + n[2]}" y2="${e.y + r[2]}"/>
497
- <line stroke="white" stroke-width="2" id="${e.id}" x1="${e.x + n[3]}" y1="${e.y + r[3]}" x2="${e.x + n[4]}" y2="${e.y + r[4]}"/>
498
- </g>
499
- `;
500
- default: return `
501
- <g id="${e.id}" style="display:${k.value ? "initial" : "none"};">
502
- <circle id="${e.id}" cx="${e.x - 4}" cy="${e.y - 4}" r="12" fill="red"/>
503
- <line stroke="white" stroke-width="2" id="${e.id}" x1="${e.x - 8}" y1="${e.y - 8}" x2="${e.x}" y2="${e.y}"/>
504
- <line stroke="white" stroke-width="2" id="${e.id}" x1="${e.x}" y1="${e.y - 8}" x2="${e.x - 8}" y2="${e.y}"/>
505
- </g>
506
- `;
507
- }
508
- }
509
- function tn(e) {
510
- switch (!0) {
511
- case e.textAlign === "middle": return `<path class="vue-ui-annotator-caret" stroke="black" stroke-width="2" d="M${e.x},${e.y - e.fontSize} ${e.x},${e.y - e.fontSize - 15}" /> <path class="vue-ui-annotator-caret" stroke="black" stroke-width="2" d="M${e.x - 3},${e.y - e.fontSize - 5} ${e.x},${e.y - e.fontSize} ${e.x + 3},${e.y - e.fontSize - 5}"/>`;
512
- case e.textAlign === "start":
513
- let t = e.isBulletTextMode ? e.fontSize : 0;
514
- return `<path class="vue-ui-annotator-caret" d="M${e.x - 20 - t},${e.y - e.fontSize / 6} ${e.x - 5 - t},${e.y - e.fontSize / 6}" stroke="black" stroke-width="2" />
515
- <path class="vue-ui-annotator-caret" d="M${e.x - 10 - t},${e.y - e.fontSize / 3} ${e.x - 5 - t},${e.y - e.fontSize / 6} ${e.x - 10 - t},${e.y}" stroke="black" stroke-width="2">`;
516
- case e.textAlign === "end": return `<path class="vue-ui-annotator-caret" d="M${e.x + 20},${e.y - e.fontSize / 6} ${e.x + 5},${e.y - e.fontSize / 6}" stroke="black" stroke-width="2" />
517
- <path class="vue-ui-annotator-caret" d="M${e.x + 10},${e.y - e.fontSize / 3} ${e.x + 5},${e.y - e.fontSize / 6} ${e.x + 10},${e.y}" stroke="black" stroke-width="2">`;
518
- default: return "";
519
- }
520
- }
521
- function nn(e, t, n = !1) {
522
- switch (!0) {
523
- case e.textAlign === "start": return `
524
- <g id="${e.id}">
525
- <rect
526
- id="${e.id}"
527
- style="display:${I.value && I.value.id === e.id ? "initial" : "none"};"
528
- x="${e.x}"
529
- y="${e.y - 50}"
530
- height="${e.lines === 0 || e.lines === 1 ? e.fontSize * 4 : e.fontSize * 2 * e.lines}"
531
- width="100"
532
- fill="rgba(0,0,0,0)"
533
- />
534
- <text
535
- style="user-select:none; height:100px;"
536
- id="${e.id}"
537
- x="${e.x}"
538
- y="${e.y}"
539
- text-anchor="${e.textAlign}"
540
- font-size="${e.fontSize}"
541
- fill="${e.color}"
542
- font-weight="${e.isBold ? "bold" : "normal"}"
543
- font-style="${e.isItalic ? "italic" : "normal"}"
544
- text-decoration="${e.isUnderline ? "underline" : "none"}"
545
- >
546
- ${t.join("")}
547
- </text>
548
- ${V.value && I.value && I.value.id === e.id ? tn(e) : ""}
549
- ${en(e, n)}
550
- </g>
551
- `;
552
- case e.textAlign === "middle": return `
553
- <g id="${e.id}">
554
- <rect
555
- id="${e.id}"
556
- style="display:${I.value && I.value.id === e.id ? "initial" : "none"};"
557
- x="${e.x - 50}"
558
- y="${e.y - 50}"
559
- height="${e.lines === 0 || e.lines === 1 ? e.fontSize * 4 : e.fontSize * 2 * e.lines}"
560
- width="100"
561
- fill="rgba(0,0,0,0)"
562
- />
563
- <text
564
- style="user-select:none; height:100px;"
565
- id="${e.id}"
566
- x="${e.x}"
567
- y="${e.y}"
568
- text-anchor="${e.textAlign}"
569
- font-size="${e.fontSize}"
570
- fill="${e.color}"
571
- font-weight="${e.isBold ? "bold" : "normal"}"
572
- font-style="${e.isItalic ? "italic" : "normal"}"
573
- text-decoration="${e.isUnderline ? "underline" : "none"}"
574
- >
575
- ${t.join("")}
576
- </text>
577
- ${V.value && I.value && I.value.id === e.id ? tn(e) : ""}
578
- ${en(e)}
579
- </g>
580
- `;
581
- case e.textAlign === "end": return `
582
- <g id="${e.id}">
583
- <rect
584
- id="${e.id}"
585
- style="display:${I.value && I.value.id === e.id ? "initial" : "none"};"
586
- x="${e.x - 100}"
587
- y="${e.y - 50}"
588
- height="${e.lines === 0 || e.lines === 1 ? e.fontSize * 4 : e.fontSize * 2 * e.lines}"
589
- width="100"
590
- fill="rgba(0,0,0,0)"
591
- />
592
- <text
593
- style="user-select:none; height:100px;"
594
- id="${e.id}"
595
- x="${e.x}"
596
- y="${e.y}"
597
- text-anchor="${e.textAlign}"
598
- font-size="${e.fontSize}"
599
- fill="${e.color}"
600
- font-weight="${e.isBold ? "bold" : "normal"}"
601
- font-style="${e.isItalic ? "italic" : "normal"}"
602
- text-decoration="${e.isUnderline ? "underline" : "none"}"
603
- >
604
- ${t.join("")}
605
- </text>
606
- ${V.value && I.value && I.value.id === e.id ? tn(e) : ""}
607
- ${en(e)}
608
- </g>
609
- `;
610
- default: return "";
611
- }
612
- }
613
- let rn = u(() => Qt.value.map((e) => {
614
- switch (!0) {
615
- case e && e.type === "arrow":
616
- let t = e.strokeWidth > 3 ? 5 : 10, n = e.strokeWidth > 3 ? 2.5 : 5;
617
- return {
618
- html: `
619
- <defs>
620
- <marker
621
- id="${e.id}"
622
- markerWidth="${t}"
623
- markerHeight="${t}"
624
- refX="0"
625
- refY="${n}"
626
- orient="auto"
627
- >
628
- <polygon
629
- points="0 0,${t} ${n}, 0 ${t}"
630
- fill="${e.color}"
631
- />
632
- </marker>
633
- </defs>
634
- ${$t(e)}
635
- <g id="${e.id}">
636
- <path
637
- style="stroke-linecap: round !important; ${e.isDash ? `stroke-dasharray: ${e.strokeWidth * 3}` : ""}"
638
- stroke="${e.color}"
639
- id="${e.id}"
640
- d="M${e.x},${e.y} ${e.endX},${e.endY}"
641
- stroke-width="${e.strokeWidth}"
642
- marker-end="url(#${e.id})"
643
- />
644
- </g>
645
- <g id="${e.id}">
646
- <rect
647
- id="${e.id}"
648
- x="${e.x - 10}"
649
- y="${e.y - 10}"
650
- height="20"
651
- width="20"
652
- fill="rgba(0,0,0,0.3)"
653
- style="display:${M.value || j.value ? "initial" : "none"}; rx:1 !important; ry:1 !important;"
654
- />
655
- </g>
656
- ${en(e)}
657
- </g>
658
- `,
659
- id: e.id
660
- };
661
- case e && e.type === "circle": return {
662
- html: `
663
- <g id="${e.id}">
664
- ${$t(e)}
665
- <circle
666
- id="${e.id}"
667
- cx="${e.x}"
668
- cy="${e.y}"
669
- r="${e.circleRadius ? e.circleRadius : Number.MIN_VALUE}"
670
- fill="${e.isFilled ? e.color + e.alpha : "rgba(255,255,255,0.001)"}"
671
- stroke="${e.color + e.alpha}"
672
- stroke-width="${e.strokeWidth}"
673
- style="${e.isDash ? `stroke-dasharray: ${e.strokeWidth * 3}` : ""}"
674
- >
675
- </circle>
676
- </g>
677
-
678
- ${en(e)}`,
679
- id: e.id
680
- };
681
- case e && e.type === "group": return {
682
- html: `<g id="${e.id}">
683
- <rect
684
- id="${M.value ? "" : e.id}"
685
- x="${e.x}"
686
- y="${e.y}"
687
- fill="transparent"
688
- height="${e.rectHeight}"
689
- width="${e.rectWidth}"
690
- stroke="grey"
691
- stroke-width="1"
692
- style="rx:1 !important; ry:1 !important; ${e.isDash ? `stroke-dasharray: ${e.strokeWidth * 3}` : ""}; display:${N.value || k.value || D.value && D.value === e.id ? "initial" : "none"};"
693
- />
694
- <g id="${e.id}">
695
- ${e.content ? e.content : ""}
696
- </g>
697
- ${en(e)}
698
- </g> `,
699
- id: e.id
700
- };
701
- case e && e.type === "rect": return {
702
- html: `<g id="${e.id}">
703
- ${$t(e)}
704
- <rect
705
- id="${M.value ? "" : e.id}"
706
- x="${e.x}"
707
- y="${e.y}"
708
- fill="${e.isFilled ? e.color + e.alpha : "rgba(255,255,255,0.001)"}"
709
- height="${e.rectHeight}"
710
- width="${e.rectWidth}"
711
- stroke="${e.color + e.alpha}"
712
- stroke-width="${e.strokeWidth}"
713
- style="rx:1 !important; ry:1 !important; ${e.isDash ? `stroke-dasharray: ${e.strokeWidth * 3}` : ""}"
714
- />
715
- <rect id="${e.id}"
716
- x="${e.x + e.rectWidth}"
717
- y="${e.y + e.rectHeight}"
718
- height="20"
719
- width="20"
720
- fill="rgba(0,0,0,0.3)"
721
- style="display:${M.value ? "initial" : "none"}; rx:1 !important; ry:1 !important;"
722
- />
723
- ${en(e)}
724
- </g> `,
725
- id: e.id
726
- };
727
- case e && e.type === "line": return {
728
- html: `
729
- <g id="${e.id}">
730
- <path
731
- id="${e.id}"
732
- d="M${e.path ? e.path : ""}"
733
- style="stroke:${e.color + e.alpha} !important; fill:none; stroke-width:${e.strokeWidth} !important; stroke-linecap: round !important; stroke-linejoin: round !important;"
734
- />
735
- ${en(e)}
736
- </g>
737
- `,
738
- id: e.id
739
- };
740
- case e && e.type === "text":
741
- let r = e.textContent.split("‎"), i = [];
742
- for (let t = 0; t < r.length; t += 1) i.push(`
743
- ${e.isBulletTextMode ? `<tspan x="${e.x - e.fontSize}" y="${e.y + e.fontSize * t}" id="${e.id}" font-size="${e.fontSize / 2}">⬤</tspan>` : ""}
744
- <tspan id="${e.id}" x="${e.x}" y="${e.y + e.fontSize * t}">
745
- ${r[t]}
746
- </tspan>`);
747
- return {
748
- html: `
749
- ${$t(e)}
750
- ${nn(e, i, e.isBulletTextMode)}
751
- `,
752
- id: e.id
753
- };
754
- default: break;
755
- }
756
- }));
757
- function Z(e) {
758
- if (e == null) return e;
759
- try {
760
- return typeof structuredClone == "function" ? structuredClone(e) : JSON.parse(JSON.stringify(e));
761
- } catch {
762
- return Array.isArray(e) ? e.map((e) => Z(e)) : typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, Z(t)])) : e;
763
- }
764
- }
765
- function an(e = !1) {
766
- if (!w.value || !Ct.value) return;
767
- T.value.end = {
768
- x: L.value.x,
769
- y: L.value.y
770
- };
771
- let t;
772
- z.value.length > 0 && E.value && (t = [...z.value].find((e) => e.id === E.value.id));
773
- let n, r, i;
774
- t && (n = t.x - T.value.end.x, r = t.y - T.value.end.y, i = Math.sqrt(n * n + r * r));
775
- let a, o;
776
- switch (e ? (a = Math.max(T.value.end.x, t.x), o = Math.min(T.value.end.x, t.x), Math.max(T.value.end.y, t.y), Math.min(T.value.end.y, t.y)) : (a = Math.max(T.value.end.x, T.value.start.x), o = Math.min(T.value.end.x, T.value.start.x), Math.max(T.value.end.y, T.value.start.y), Math.min(T.value.end.y, T.value.start.y)), !0) {
777
- case w.value === "arrow":
778
- z.value.at(-1).endX = T.value.end.x, z.value.at(-1).endY = T.value.end.y;
779
- break;
780
- case w.value === "circle":
781
- z.value.at(-1).circleRadius = wt.value ? Z(a - o) + 20 : i + 20;
782
- break;
783
- case w.value === "line":
784
- z.value.at(-1).path += ` ${L.value.x} ${L.value.y} `;
785
- break;
786
- case ["rect", "group"].includes(w.value): z.value.at(-1).rectWidth = Z(T.value.end.x - z.value.at(-1).x) > 0 ? Z(T.value.end.x - z.value.at(-1).x) : 20, z.value.at(-1).rectHeight = Z(T.value.end.y - z.value.at(-1).y) > 0 ? Z(T.value.end.y - z.value.at(-1).y) : 20;
787
- default: break;
788
- }
789
- }
790
- function on() {
791
- if (!Ct.value) {
792
- qt.value = null;
793
- return;
794
- }
795
- an(), qt.value = requestAnimationFrame(on);
796
- }
797
- function sn(e) {
798
- let t = z.value.findIndex((t) => t.id === e);
799
- if (t > -1 && t !== z.value.length - 1) {
800
- let [e] = z.value.splice(t, 1);
801
- z.value.push(e);
802
- }
803
- }
804
- function cn(e) {
805
- let t = (e) => !!e && z.value.some((t) => t.id === e);
806
- if (t(e?.target?.id)) return e.target.id;
807
- let n = X.value?.querySelector(".annotator__glass");
808
- if (!n) return null;
809
- let r = n.style.pointerEvents;
810
- n.style.pointerEvents = "none";
811
- let i = document.elementFromPoint(e.clientX, e.clientY);
812
- return n.style.pointerEvents = r || "all", t(i?.id) ? i.id : null;
813
- }
814
- function ln(e = {}) {
815
- let { maxEntries: t = 200, maxBytes: n = 2e6 } = e, r = {
816
- open: !1,
817
- before: null,
818
- undo: [],
819
- redo: []
820
- }, i = {
821
- undo: 0,
822
- redo: 0
823
- }, a = (e) => typeof e == "string" ? e.length * 2 : 0, o = () => JSON.stringify({
824
- shapes: Z(z.value),
825
- lastSelectedShape: Z(I.value)
826
- }), s = (e) => {
827
- let t = JSON.parse(e);
828
- z.value = t.shapes, I.value = t.lastSelectedShape;
829
- }, c = () => {
830
- Kt.value.undo = r.undo.length, Kt.value.redo = r.redo.length;
831
- }, l = (e, o) => {
832
- let s = r[e];
833
- for (s.push(o), i[e] += a(o); s.length > t || i[e] > n;) {
834
- let t = s.shift();
835
- i[e] -= a(t);
836
- }
837
- };
838
- return {
839
- begin() {
840
- r.open || (r.open = !0, r.before = o());
841
- },
842
- end() {
843
- r.open && (r.open = !1, o() !== r.before && (l("undo", r.before), r.redo.length = 0, i.redo = 0), r.before = null, c());
844
- },
845
- undo() {
846
- let e = r.undo.pop();
847
- e && (i.undo -= a(e), l("redo", o()), s(e), c());
848
- },
849
- redo() {
850
- let e = r.redo.pop();
851
- e && (i.redo -= a(e), l("undo", o()), s(e), c());
852
- },
853
- size() {
854
- return {
855
- undo: r.undo.length,
856
- redo: r.redo.length,
857
- approxBytes: {
858
- undo: i.undo,
859
- redo: i.redo
860
- }
861
- };
862
- }
863
- };
864
- }
865
- function un() {
866
- if (!Ut.value) return;
867
- let e = Ut.value.getBoundingClientRect();
868
- G.value = {
869
- x: e.left + e.width / 2,
870
- y: e.top
871
- };
872
- }
873
- function Q(e, t, n = "top") {
874
- W.value = e, Ut.value = t.currentTarget || t.target, un(), U.value = !0, window.addEventListener("scroll", un, !0), window.addEventListener("resize", un, { passive: !0 });
875
- }
876
- function $() {
877
- U.value = !1, W.value = null, Ut.value = null, window.removeEventListener("scroll", un, !0), window.removeEventListener("resize", un);
878
- }
879
- function dn(e) {
880
- let t = e?.target && e.target.id || E.value && E.value.id, n = z.value.find((e) => e.id === t);
881
- if (!n) {
882
- Ht.value = null;
883
- return;
884
- }
885
- I.value = n;
886
- let r = L.value.x, i = L.value.y;
887
- switch (n.type) {
888
- case "rect":
889
- case "circle":
890
- case "text":
891
- Ht.value = {
892
- dx: r - n.x,
893
- dy: i - n.y
894
- };
895
- break;
896
- case "arrow":
897
- Ht.value = {
898
- dx: r - n.x,
899
- dy: i - n.y,
900
- endDx: r - n.endX,
901
- endDy: i - n.endY
902
- };
903
- break;
904
- case "group":
905
- Ht.value = {
906
- dx: r - (n.x || 0),
907
- dy: i - (n.y || 0)
908
- };
909
- break;
910
- default:
911
- Ht.value = {
912
- dx: 0,
913
- dy: 0
914
- };
915
- break;
916
- }
917
- }
918
- function fn(e) {
919
- let t = z.value.find((e) => e.id === I.value.id);
920
- switch (!0) {
921
- case e === "front":
922
- z.value = z.value.filter((e) => e.id !== t.id), z.value.push(t);
923
- break;
924
- case e === "back":
925
- z.value = z.value.filter((e) => e.id !== t.id), z.value = [t, ...z.value];
926
- break;
927
- default: return;
928
- }
929
- }
930
- function pn() {
931
- if (!I.value?.id) return;
932
- let e = {
933
- ...I.value,
934
- id: `${I.value.id}_copy_${n()}`,
935
- x: I.value.x - 100 < 0 ? 1 : I.value.x - 100,
936
- y: I.value.y - 100 < 0 ? 1 : I.value.y - 100
937
- };
938
- z.value.push(e);
939
- }
940
- function mn(e) {
941
- e.preventDefault(), At.value = !1, e.target && e.target.id && (D.value = e.target.id);
942
- }
943
- function hn() {
944
- !I.value || !I.value.id.includes("text") || I.value.textContent === "" && (z.value = z.value.filter((e) => e.id !== I.value.id), I.value = z.value.at(-1));
945
- }
946
- function gn(e) {
947
- if (k.value) return;
948
- e.preventDefault(), e.stopPropagation(), hn(), P.value ? (F.value = !0, V.value = !0) : (F.value = !1, V.value = !1, P.value = !1);
949
- let t = `text_${n()}`;
950
- if (F.value) {
951
- K.value?.begin(), z.value.push({
952
- id: t,
953
- type: "text",
954
- lines: 0,
955
- x: L.value.x,
956
- y: L.value.y,
957
- textContent: "",
958
- fontSize: Z(zt.value),
959
- textAlign: Z(H.value),
960
- isBold: Z(xt.value),
961
- isItalic: Z(Tt.value),
962
- isUnderline: Z(kt.value),
963
- color: Z(Pt.value),
964
- isBulletTextMode: Z(O.value)
965
- }), E.value = z.value.at(-1), I.value = z.value.at(-1), K.value?.end();
966
- return;
967
- }
968
- let r = () => {
969
- St.value = z.value.find((t) => t.id === e.target.id).isDash;
970
- }, i = () => {
971
- bt.value = z.value.find((t) => t.id === e.target.id).strokeWidth;
972
- };
973
- if (N.value = !1, e.target.id.includes("arrow")) {
974
- w.value = "arrow", r(), i();
975
- return;
976
- }
977
- if (e.target.id.includes("circle")) {
978
- w.value = "circle", B.value.circle.filled = z.value.find((t) => t.id === e.target.id).isFilled, r(), i();
979
- return;
980
- }
981
- if (e.target.id.includes("rect")) {
982
- w.value = "rect", B.value.rect.filled = z.value.find((t) => t.id === e.target.id).isFilled, r(), i();
983
- return;
984
- }
985
- if (e.target.id.includes("line")) {
986
- w.value = "line", i();
987
- return;
988
- }
989
- if (e.target.id.includes("text")) {
990
- P.value = !0, F.value = !0, V.value = !0;
991
- let t = z.value.find((t) => t.id === e.target.id);
992
- t && t.textAlign && (H.value = z.value.find((t) => t.id === e.target.id).textAlign), t && (O.value = z.value.find((t) => t.id === e.target.id).isBulletTextMode);
993
- return;
994
- }
995
- }
996
- function _n(e) {
997
- !I.value || I.value.type !== "text" || (I.value.textAlign = e);
998
- }
999
- function vn() {
1000
- K.value?.undo?.();
1001
- }
1002
- function yn() {
1003
- K.value?.redo?.();
1004
- }
1005
- let bn = [
1006
- 16,
1007
- 17,
1008
- 18,
1009
- 20,
1010
- 27,
1011
- 33,
1012
- 34,
1013
- 35,
1014
- 36,
1015
- 37,
1016
- 38,
1017
- 39,
1018
- 40,
1019
- 45,
1020
- 91,
1021
- 112,
1022
- 113,
1023
- 114,
1024
- 115,
1025
- 116,
1026
- 117,
1027
- 118,
1028
- 119,
1029
- 120,
1030
- 121,
1031
- 122,
1032
- 123,
1033
- 221,
1034
- 255,
1035
- "Unidentified"
1036
- ];
1037
- function xn(e) {
1038
- if (At.value) return;
1039
- e.preventDefault();
1040
- let t = e.keyCode;
1041
- if (!F.value) return;
1042
- V.value = !0;
1043
- let n;
1044
- if (n = I.value.type === "text" ? z.value.find((e) => e.id === I.value.id) : z.value.at(-1), E.value = n, n.type === "text") switch (E.value.isBold = Z(xt.value), E.value.isItalic = Z(Tt.value), E.value.isUnderline = Z(kt.value), !0) {
1045
- case [8, 46].includes(t):
1046
- n.textContent = n.textContent.slice(0, -1);
1047
- break;
1048
- case t === 9:
1049
- n.textContent += "&nbsp; &nbsp; &nbsp; &nbsp;";
1050
- break;
1051
- case t === 13:
1052
- n.lines += 1, n.textContent += "‎";
1053
- return;
1054
- case bn.includes(t): return;
1055
- default: n.textContent += e.key;
1056
- }
1057
- }
1058
- function Sn() {
1059
- if (R.value = [], w.value !== "group") {
1060
- N.value = !1, z.value = z.value.filter((e) => e.type !== "group");
1061
- return;
1062
- }
1063
- let e = z.value.at(-1);
1064
- if (z.value.forEach((t) => {
1065
- if (t.type !== "group") switch (!0) {
1066
- case t.type === "arrow":
1067
- let n = t.x <= t.endX && t.y <= t.endY && e.x <= t.x && e.y <= t.y && e.x + e.rectWidth >= t.endX && e.y + e.rectHeight >= t.endY, r = t.endY < t.y && t.x < t.endX && e.x <= t.x && e.y <= t.y && e.x + e.rectWidth >= t.endX && e.y + e.rectHeight >= t.y, i = t.x > t.endX && t.y < t.endY && e.x <= t.endX && e.y <= t.endY && e.x + e.rectWidth >= t.x && e.y + e.rectHeight >= t.endY, a = t.x > t.endX && t.y > t.endY && e.x <= t.endX && e.y <= t.endY && e.x + e.rectWidth >= t.x && e.y + e.rectHeight >= t.y;
1068
- (n || r || i || a) && R.value.push(t);
1069
- break;
1070
- case t.type === "circle":
1071
- e.x <= t.x + t.circleRadius && e.y <= t.y + t.circleRadius && t.x + t.circleRadius <= e.x + e.rectWidth && t.y + t.circleRadius <= e.y + e.rectHeight && R.value.push(t);
1072
- break;
1073
- case t.type === "rect":
1074
- e.x <= t.x && e.y <= t.y && t.x <= e.x + e.rectWidth && t.y <= e.y + e.rectHeight && t.x + t.rectWidth <= e.x + e.rectWidth && t.y + t.rectHeight <= e.y + e.rectHeight && t.rectWidth <= e.rectWidth && t.rectHeight <= e.rectHeight && R.value.push(t);
1075
- break;
1076
- case t.type === "text":
1077
- e.x <= t.x && e.y <= t.y && R.value.push(t);
1078
- break;
1079
- default: break;
1080
- }
1081
- }), R.value = R.value.map((t) => ({
1082
- ...t,
1083
- id: e.id,
1084
- oldId: t.id,
1085
- diffX: t.x - e.x,
1086
- diffY: t.y - e.y,
1087
- diffEndX: t.endX ? t.endX - e.x : 0,
1088
- diffEndY: t.endY ? t.endY - e.y : 0
1089
- })), e.source = R.value, R.value.length > 1) {
1090
- let t = Z(R.value).map((e) => e.oldId);
1091
- z.value = z.value.filter((e) => !t.includes(e.id)), R.value.forEach((t) => {
1092
- switch (!0) {
1093
- case t.type === "circle":
1094
- e.content += `
1095
- <circle
1096
- id="${t.id}"
1097
- cx="${t.x}"
1098
- cy="${t.y}"
1099
- r="${t.circleRadius ? t.circleRadius : Number.MIN_VALUE}"
1100
- fill="${t.isFilled ? t.color + t.alpha : "rgba(255,255,255,0.001)"}"
1101
- stroke="${t.color + t.alpha}"
1102
- stroke-width="${t.strokeWidth}"
1103
- style="${t.isDash ? `stroke-dasharray: ${t.strokeWidth * 3}` : ""}"
1104
- />
1105
- `;
1106
- break;
1107
- case t.type === "rect":
1108
- e.content += `
1109
- <rect
1110
- id="${M.value ? "" : t.id}"
1111
- x="${t.x}"
1112
- y="${t.y}"
1113
- fill="${t.isFilled ? t.color + t.alpha : "rgba(255,255,255,0.001)"}"
1114
- height="${t.rectHeight}"
1115
- width="${t.rectWidth}"
1116
- stroke="${t.color + t.alpha}"
1117
- stroke-width="${t.strokeWidth}"
1118
- style="rx:1 !important; ry:1 !important; ${t.isDash ? `stroke-dasharray: ${t.strokeWidth * 3}` : ""}"
1119
- />
1120
- `;
1121
- break;
1122
- case t.type === "arrow":
1123
- let r = t.strokeWidth > 3 ? 5 : 10, i = t.strokeWidth > 3 ? 2.5 : 5, a = n();
1124
- e.content += `
1125
- <g id="${t.id}">
1126
- <defs>
1127
- <marker
1128
- id="${a}"
1129
- markerWidth="${r}"
1130
- markerHeight="${r}"
1131
- refX="0"
1132
- refY="${i}"
1133
- orient="auto"
1134
- >
1135
- <polygon
1136
- points="0 0,${r} ${i}, 0 ${r}"
1137
- fill="${t.color}"
1138
- />
1139
- </marker>
1140
- </defs>
1141
-
1142
- <path
1143
- style="stroke-linecap: round !important; ${t.isDash ? `stroke-dasharray: ${t.strokeWidth * 3}` : ""}"
1144
- stroke="${t.color}"
1145
- id="${t.id}"
1146
- d="M${t.x},${t.y} ${t.endX},${t.endY}"
1147
- stroke-width="${t.strokeWidth}"
1148
- marker-end="url(#${a})"
1149
- />
1150
- </g>
1151
- `;
1152
- break;
1153
- case t.type === "text":
1154
- let o = t.textContent.split("‎"), s = [];
1155
- for (let e = 0; e < o.length; e += 1) s.push(`
1156
- ${t.isBulletTextMode ? `<tspan x="${t.x - t.fontSize}" y="${t.y + t.fontSize * e}" id="${t.id}" font-size="${t.fontSize / 2}">⬤</tspan>` : ""}
1157
- <tspan id="${t.id}" x="${t.x}" y="${t.y + t.fontSize * e}">
1158
- ${o[e]}
1159
- </tspan>`);
1160
- e.content += `
1161
- ${nn(t, s, t.isBulletTextMode)}
1162
- `;
1163
- break;
1164
- default: break;
1165
- }
1166
- });
1167
- } else z.value = z.value.filter((t) => t.id !== e.id);
1168
- }
1169
- function Cn(e) {
1170
- e.content = "";
1171
- let t = e.x || 0, r = e.y || 0;
1172
- (e.source || []).forEach((i) => {
1173
- switch (i.type) {
1174
- case "circle": {
1175
- let n = t + i.diffX, a = r + i.diffY;
1176
- e.content += `
1177
- <circle
1178
- id="${i.id}"
1179
- cx="${n}"
1180
- cy="${a}"
1181
- r="${i.circleRadius ? i.circleRadius : Number.MIN_VALUE}"
1182
- fill="${i.isFilled ? i.color + i.alpha : "rgba(255,255,255,0.001)"}"
1183
- stroke="${i.color + i.alpha}"
1184
- stroke-width="${i.strokeWidth}"
1185
- style="${i.isDash ? `stroke-dasharray: ${i.strokeWidth * 3}` : ""}"
1186
- />
1187
- `;
1188
- break;
1189
- }
1190
- case "rect": {
1191
- let n = t + i.diffX, a = r + i.diffY;
1192
- e.content += `
1193
- <rect
1194
- id="${M.value ? "" : i.id}"
1195
- x="${n}"
1196
- y="${a}"
1197
- fill="${i.isFilled ? i.color + i.alpha : "rgba(255,255,255,0.001)"}"
1198
- height="${i.rectHeight}"
1199
- width="${i.rectWidth}"
1200
- stroke="${i.color + i.alpha}"
1201
- stroke-width="${i.strokeWidth}"
1202
- style="rx:1 !important; ry:1 !important; ${i.isDash ? `stroke-dasharray: ${i.strokeWidth * 3}` : ""}"
1203
- />
1204
- `;
1205
- break;
1206
- }
1207
- case "arrow": {
1208
- let a = t + i.diffX, o = r + i.diffY, s = t + i.diffEndX, c = r + i.diffEndY, l = i.strokeWidth > 3 ? 5 : 10, ee = i.strokeWidth > 3 ? 2.5 : 5, te = `m_${i.id}_${n()}`;
1209
- e.content += `
1210
- <g id="${i.id}">
1211
- <defs>
1212
- <marker
1213
- id="${te}"
1214
- markerWidth="${l}"
1215
- markerHeight="${l}"
1216
- refX="0"
1217
- refY="${ee}"
1218
- orient="auto">
1219
- <polygon points="0 0,${l} ${ee}, 0 ${l}" fill="${i.color}" />
1220
- </marker>
1221
- </defs>
1222
- <path
1223
- style="stroke-linecap: round !important; ${i.isDash ? `stroke-dasharray: ${i.strokeWidth * 3}` : ""}"
1224
- stroke="${i.color}"
1225
- id="${i.id}"
1226
- d="M${a},${o} ${s},${c}"
1227
- stroke-width="${i.strokeWidth}"
1228
- marker-end="url(#${te})"
1229
- />
1230
- </g>
1231
- `;
1232
- break;
1233
- }
1234
- case "text": {
1235
- let n = (i.textContent || "").split("‎").map((e, n) => `
1236
- ${i.isBulletTextMode ? `<tspan x="${t + i.diffX - i.fontSize}" y="${r + i.diffY + i.fontSize * n}" id="${i.id}" font-size="${i.fontSize / 2}">⬤</tspan>` : ""}
1237
- <tspan id="${i.id}" x="${t + i.diffX}" y="${r + i.diffY + i.fontSize * n}">
1238
- ${e}
1239
- </tspan>
1240
- `).join("");
1241
- e.content += `
1242
- <g id="${i.id}">
1243
- <text
1244
- style="user-select:none; height:100px;"
1245
- id="${i.id}"
1246
- x="${t + i.diffX}"
1247
- y="${r + i.diffY}"
1248
- text-anchor="${i.textAlign}"
1249
- font-size="${i.fontSize}"
1250
- fill="${i.color}"
1251
- font-weight="${i.isBold ? "bold" : "normal"}"
1252
- font-style="${i.isItalic ? "italic" : "normal"}"
1253
- text-decoration="${i.isUnderline ? "underline" : "none"}">
1254
- ${n}
1255
- </text>
1256
- </g>
1257
- `;
1258
- break;
1259
- }
1260
- default: break;
1261
- }
1262
- });
1263
- }
1264
- function wn(e) {
1265
- e.relatedTarget && X.value && X.value.contains(e.relatedTarget) || (At.value = !0, D.value = void 0);
1266
- }
1267
- function Tn() {
1268
- if (Ct.value = !0, !w.value && !N.value || !Ct.value) return;
1269
- wt.value = !0, T.value.start = {
1270
- x: L.value.x,
1271
- y: L.value.y
1272
- };
1273
- let e = `${N.value ? "group" : w.value}_${n()}`;
1274
- switch (!0) {
1275
- case w.value === "arrow":
1276
- z.value.push({
1277
- id: e,
1278
- x: L.value.x,
1279
- y: L.value.y,
1280
- endX: L.value.x,
1281
- endY: L.value.y,
1282
- type: w.value,
1283
- color: Z(Pt.value),
1284
- strokeWidth: Z(Math.abs(bt.value)),
1285
- isDash: Z(St.value)
1286
- }), I.value = z.value.at(-1);
1287
- break;
1288
- case w.value === "circle":
1289
- z.value.push({
1290
- alpha: B.value.circle.filled ? Xt.value : "",
1291
- id: e,
1292
- color: Z(Pt.value),
1293
- isFilled: Z(B.value.circle.filled),
1294
- circleRadius: Z(B.value.circle.radius),
1295
- circleStrokeWidth: Z(B.value.circle.strokeWidth),
1296
- type: w.value,
1297
- x: L.value.x,
1298
- y: L.value.y,
1299
- strokeWidth: Z(Math.abs(bt.value)),
1300
- isDash: Z(St.value)
1301
- }), I.value = z.value.at(-1);
1302
- break;
1303
- case w.value === "line":
1304
- z.value.push({
1305
- alpha: Z(Xt.value),
1306
- id: e,
1307
- x: L.value.x,
1308
- y: L.value.y,
1309
- type: w.value,
1310
- color: Z(Pt.value),
1311
- strokeWidth: Z(Math.abs(bt.value)),
1312
- isDash: Z(St.value),
1313
- path: `${L.value.x} ${L.value.y}`
1314
- }), I.value = z.value.at(-1);
1315
- break;
1316
- case w.value === "rect":
1317
- z.value.push({
1318
- alpha: B.value.rect.filled ? Xt.value : "",
1319
- id: e,
1320
- color: Z(Pt.value),
1321
- isFilled: Z(B.value.rect.filled),
1322
- rectStrokeWidth: Z(B.value.rect.strokeWidth),
1323
- rectHeight: Z(B.value.rect.height),
1324
- rectWidth: Z(B.value.rect.width),
1325
- type: w.value,
1326
- x: L.value.x,
1327
- y: L.value.y,
1328
- strokeWidth: Z(Math.abs(bt.value)),
1329
- isDash: Z(St.value)
1330
- }), I.value = z.value.at(-1);
1331
- break;
1332
- case w.value === "group":
1333
- z.value.push({
1334
- alpha: 1,
1335
- id: `group_${n()}`,
1336
- x: L.value.x,
1337
- y: L.value.y,
1338
- isFilled: !1,
1339
- rectHeight: Z(B.value.rect.height),
1340
- rectWidth: Z(B.value.rect.width),
1341
- rectStrokeWidth: 1,
1342
- type: "group",
1343
- color: "grey",
1344
- strokeWidth: 1,
1345
- isDash: !0,
1346
- content: ""
1347
- });
1348
- break;
1349
- default: break;
1350
- }
1351
- qt.value ||= requestAnimationFrame(on);
1352
- }
1353
- function En(e) {
1354
- if (k.value) {
1355
- Et.value = !1;
1356
- return;
1357
- }
1358
- if (e.preventDefault(), e.stopPropagation(), Et.value = !0, e.pointerId != null) {
1359
- try {
1360
- X.value?.setPointerCapture?.(e.pointerId);
1361
- } catch {}
1362
- Jt.value = e.pointerId;
1363
- } else Jt.value = null;
1364
- if ((A.value || j.value || M.value || N.value) && K.value?.begin?.(), A.value) {
1365
- Tn();
1366
- return;
1367
- }
1368
- if (j.value) {
1369
- let t = cn(e) || D.value || I.value?.id;
1370
- t && (sn(t), E.value = { id: t }), dn(e);
1371
- }
1372
- }
1373
- function Dn(e) {
1374
- if (!e || !e.id || e.type === "line" || !Ht.value && (dn({ target: { id: e.id } }), !Ht.value)) return;
1375
- let { dx: t, dy: n, endDx: r, endDy: i } = Ht.value, a = L.value.x, o = L.value.y;
1376
- switch (I.value = e, e.type) {
1377
- case "arrow":
1378
- e.x = a - t, e.y = o - n, e.endX = a - (r ?? t), e.endY = o - (i ?? n);
1379
- break;
1380
- case "circle":
1381
- e.x = a - t, e.y = o - n;
1382
- break;
1383
- case "rect":
1384
- e.x = a - t, e.y = o - n;
1385
- break;
1386
- case "text":
1387
- e.x = a - t, e.y = o - n;
1388
- break;
1389
- case "group":
1390
- e.x = a - t, e.y = o - n, Cn(e);
1391
- break;
1392
- default: break;
1393
- }
1394
- }
1395
- function On() {
1396
- let e = E.value?.id || D.value;
1397
- if (!e) return;
1398
- let t = z.value.find((t) => t.id === e);
1399
- t && Dn(t);
1400
- }
1401
- function kn() {
1402
- wt.value = !1;
1403
- let e = E.value.id;
1404
- if (!e) return;
1405
- Ct.value = !0;
1406
- let t = z.value.find((t) => t.id === e);
1407
- w.value = t.type, z.value = z.value.filter((t) => t.id !== e), z.value.push(t), an(!0);
1408
- }
1409
- function An(e) {
1410
- k.value || (e.preventDefault(), e.stopPropagation(), e.target.localName !== "svg" && (E.value = e.target), j.value && Et.value ? On() : M.value && Et.value && kn());
1411
- }
1412
- function jn(e) {
1413
- let t = e.target.id;
1414
- switch (!0) {
1415
- case k.value:
1416
- K.value?.begin(), z.value = [...z.value].filter((e) => e.id !== t), I.value = void 0, K.value?.end();
1417
- return;
1418
- default:
1419
- I.value = z.value.find((e) => e.id === t);
1420
- break;
1421
- }
1422
- }
1423
- let Mn = b(null);
1424
- function Nn(e, t) {
1425
- for (t(e), e = e.firstChild; e;) Nn(e, t), e = e.nextSibling;
1426
- }
1427
- function Pn() {
1428
- Dt.value = !0, k.value = !1, j.value = !1, M.value = !1, P.value = !1, F.value = !1, N.value = !1, w.value = void 0, V.value = !1, ie(async () => {
1429
- let e = Mn.value;
1430
- if (e) {
1431
- Nn(e, (e) => {
1432
- e && e.nodeType === 1 && (e.setAttribute("font-family", "Helvetica"), e.style.fontFamily = "Helvetica");
1433
- });
1434
- try {
1435
- let t;
1436
- try {
1437
- t = (await import("jspdf")).default;
1438
- } catch {
1439
- throw Error("jspdf is not installed. Run npm install jspdf");
1440
- }
1441
- let n = await s({
1442
- container: e,
1443
- scale: 2
1444
- }), r = new Image();
1445
- r.src = n, r.onload = () => {
1446
- let e = {
1447
- width: 595.28,
1448
- height: 841.89
1449
- }, i = r.width, a = r.height, o = i / e.width * e.height, s = e.width, c = s / i * a, l = new t("", "pt", "a4"), ee = 0, te = a;
1450
- if (te < o) l.addImage(n, "PNG", 0, 0, s, c, "", "FAST");
1451
- else for (; te > 0;) l.addImage(n, "PNG", 0, ee, s, c, "", "FAST"), te -= o, ee -= e.height, te > 0 && l.addPage();
1452
- l.save(`${(/* @__PURE__ */ new Date()).toLocaleDateString()}_annotations.pdf`);
1453
- };
1454
- } catch (e) {
1455
- console.error("Error generating image:", e);
1456
- } finally {
1457
- Dt.value = !1, Nn(e, (e) => {
1458
- e && e.nodeType === 1 && (e.setAttribute("font-family", q.value.style.fontFamily), e.style.fontFamily = q.value.style.fontFamily);
1459
- });
1460
- }
1461
- }
1462
- });
1463
- }
1464
- function Fn(e) {
1465
- if (!k.value && e && (e.preventDefault(), e.stopPropagation()), Ct.value = !1, Et.value = !1, Ht.value = null, Jt.value != null) {
1466
- try {
1467
- X.value?.releasePointerCapture?.(Jt.value);
1468
- } catch {}
1469
- Jt.value = null;
1470
- }
1471
- qt.value &&= (cancelAnimationFrame(qt.value), null), N.value && Sn(), K.value?.end();
1472
- }
1473
- function In() {
1474
- !I.value || !I.value.id.includes("rect") || (I.value.isFilled = !I.value.isFilled);
1475
- }
1476
- function Ln() {
1477
- !I.value || !I.value.id.includes("circle") || (I.value.isFilled = !I.value.isFilled);
1478
- }
1479
- function Rn() {
1480
- !I.value || I.value.type === "text" || (I.value.isDash = Z(St.value));
1481
- }
1482
- function zn() {
1483
- !I.value || ["arrow", "text"].includes(I.value.id) || (I.value.alpha = Z(Xt.value));
1484
- }
1485
- function Bn() {
1486
- !I.value || ![
1487
- "arrow",
1488
- "circle",
1489
- "rect",
1490
- "line"
1491
- ].includes(I.value.type) || (I.value.strokeWidth = Z(Math.abs(bt.value)));
1492
- }
1493
- function Vn() {
1494
- !I.value || I.value.type !== "text" || (I.value.isBold = Z(xt.value), I.value.isItalic = Z(Tt.value), I.value.isUnderline = Z(kt.value), I.value.fontSize = Z(zt.value), I.value.isBulletTextMode = Z(O.value));
1495
- }
1496
- function Hn(e) {
1497
- if (e.preventDefault(), !X.value) return;
1498
- let t = X.value.getBoundingClientRect(), n, r;
1499
- e.touches && e.touches.length > 0 ? (n = e.touches[0].clientX, r = e.touches[0].clientY) : (n = e.clientX, r = e.clientY), L.value.x = (n - t.left) / t.width * Nt.value, L.value.y = (r - t.top) / t.height * Mt.value;
1500
- }
1501
- function Un(e) {
1502
- if (V.value = !1, hn(), e === w.value) {
1503
- w.value = void 0, A.value = !1;
1504
- return;
1505
- }
1506
- A.value = !0, k.value = !1, j.value = !1, M.value = !1, P.value = !1, w.value = e;
1507
- }
1508
- function Wn() {
1509
- Ot.value = !Ot.value, Ot.value || (j.value = !1, M.value = !1, P.value = !1, F.value = !1, w.value = void 0, V.value = !1, k.value = !1, F.value = !1), ge("toggleOpenState", { isOpen: Ot.value });
1510
- }
1511
- function Gn() {
1512
- ge("saveAnnotations", {
1513
- shapes: z.value,
1514
- lastSelectedShape: I.value
1515
- });
1516
- }
1517
- let Kn = null;
1518
- return oe(() => {
1519
- if (Mn.value) {
1520
- let e = !1;
1521
- Nn(Mn.value, (t) => {
1522
- if (!e && [
1523
- "DIV",
1524
- "svg",
1525
- "section",
1526
- "canvas"
1527
- ].includes(t.tagName)) {
1528
- It.value = t, e = !0;
1529
- return;
1530
- }
1531
- });
1532
- }
1533
- Wt.value = (() => {
1534
- if (typeof navigator > "u") return !1;
1535
- let e = navigator.userAgentData?.platform ?? "";
1536
- if (e) return /mac|ios/i.test(e);
1537
- let t = navigator.userAgent ?? "";
1538
- return /(Mac|iPhone|iPad|iPod)/i.test(t);
1539
- })();
1540
- let e = It?.value.getBoundingClientRect();
1541
- if (Ft.value = e.height / e.width, Nt.value = 1e3, Mt.value = Ft.value * 1e3, Lt.value = e.width, Rt.value = e.height, new ResizeObserver((e) => {
1542
- e.forEach((e) => {
1543
- Lt.value = e.contentRect.width, Rt.value = e.contentRect.height, Ft.value = e.contentRect.height / e.contentRect.width, Mt.value = Ft.value * 1e3;
1544
- });
1545
- }).observe(It.value), Gt.value = (e) => xn(e), window.addEventListener("keydown", Gt.value), K.value = ln(), K.value.size) {
1546
- let e = K.value.size();
1547
- Kt.value.undo = e.undo, Kt.value.redo = e.redo;
1548
- }
1549
- Kn = he({
1550
- isMacLike: Wt,
1551
- isSummaryOpen: Ot,
1552
- isWriting: F,
1553
- isDeleteMode: k,
1554
- isMoveMode: j,
1555
- isResizeMode: M,
1556
- isSelectMode: N,
1557
- isDrawMode: A,
1558
- isTextMode: P,
1559
- activeShape: w,
1560
- showCaret: V,
1561
- lastSelectedShape: I,
1562
- shapes: z,
1563
- history: K,
1564
- setShapeTo: Un,
1565
- undoLastShape: vn,
1566
- redoLastShape: yn
1567
- });
1568
- }), ae(() => {
1569
- $(), qt.value && cancelAnimationFrame(qt.value), Gt.value && window.removeEventListener("keydown", Gt.value), Kn && Kn(), window.removeEventListener("keydown", xn);
1570
- }), fe(z, (e) => {
1571
- e.length === 0 && (I.value = void 0);
1572
- }), fe(P, (e) => {
1573
- V.value = e;
1574
- }), (e, t) => (y(), p("div", ve, [m("div", ye, [g(ee, {
1575
- config: {
1576
- maxHeight: 1e3,
1577
- useCursorPointer: J.value,
1578
- head: {
1579
- backgroundColor: q.value.style.backgroundColor,
1580
- color: q.value.style.color,
1581
- iconColor: q.value.style.color,
1582
- iconSize: 20,
1583
- icon: Ot.value ? "close" : "annotator",
1584
- padding: "6px"
1585
- },
1586
- body: {
1587
- backgroundColor: q.value.style.backgroundColor,
1588
- color: q.value.style.color
1589
- }
1590
- },
1591
- onToggle: Wn
1592
- }, {
1593
- title: S(({ color: e }) => [m("div", { style: v({ color: e }) }, x(q.value.translations.title), 5)]),
1594
- content: S(({ backgroundColor: e }) => [m("div", {
1595
- class: "tool-selection",
1596
- style: v({ backgroundColor: e })
1597
- }, [
1598
- m("button", {
1599
- disabled: z.value.length === 0,
1600
- style: v({
1601
- background: j.value ? q.value.style.buttons.controls.selected.backgroundColor : q.value.style.buttons.controls.backgroundColor,
1602
- border: j.value ? q.value.style.buttons.controls.selected.border : q.value.style.buttons.controls.border,
1603
- color: j.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color,
1604
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
1605
- cursor: J.value ? "pointer" : "default"
1606
- }),
1607
- class: _({
1608
- "button-tool": !0,
1609
- "button-tool--selected": j.value,
1610
- tooltip: !0
1611
- }),
1612
- onClick: t[0] ||= (e) => {
1613
- hn(), j.value = !j.value, w.value = void 0, k.value = !1, A.value = !1, M.value = !1, N.value = !1, P.value = !1, F.value = !1, V.value = !1;
1614
- },
1615
- onMouseenter: t[1] ||= (e) => q.value.style.showTooltips && Q("move", e, "top"),
1616
- onMouseleave: $,
1617
- onFocus: t[2] ||= (e) => q.value.style.showTooltips && Q("move", e, "top"),
1618
- onBlur: $
1619
- }, [g(l, {
1620
- name: "move",
1621
- stroke: j.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color
1622
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
1623
- key: 0,
1624
- show: U.value && W.value === "move",
1625
- x: G.value.x,
1626
- y: G.value.y - 6,
1627
- placement: "top",
1628
- styleObject: Y.value
1629
- }, {
1630
- default: S(() => [h(x(q.value.translations.tooltipMove) + " ", 1), t[91] ||= m("kbd", null, "M", -1)]),
1631
- _: 1
1632
- }, 8, [
1633
- "show",
1634
- "x",
1635
- "y",
1636
- "styleObject"
1637
- ])) : f("", !0)], 46, be),
1638
- m("button", {
1639
- disabled: z.value.length === 0 || w.value === "line",
1640
- style: v({
1641
- background: M.value ? q.value.style.buttons.controls.selected.backgroundColor : q.value.style.buttons.controls.backgroundColor,
1642
- border: M.value ? q.value.style.buttons.controls.selected.border : q.value.style.buttons.controls.border,
1643
- color: M.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color,
1644
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
1645
- cursor: J.value ? "pointer" : "default"
1646
- }),
1647
- class: _({
1648
- "button-tool": !0,
1649
- "button-tool--selected": M.value,
1650
- tooltip: !0
1651
- }),
1652
- onClick: t[3] ||= (e) => {
1653
- hn(), M.value = !M.value, j.value = !1, k.value = !1, A.value = !1, N.value = !1, P.value = !1, F.value = !1, w.value = void 0, V.value = !1;
1654
- },
1655
- onMouseenter: t[4] ||= (e) => q.value.style.showTooltips && Q("resize", e, "top"),
1656
- onMouseleave: $,
1657
- onFocus: t[5] ||= (e) => q.value.style.showTooltips && Q("resize", e, "top"),
1658
- onBlur: $
1659
- }, [g(l, {
1660
- name: "resize",
1661
- stroke: M.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color
1662
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
1663
- key: 0,
1664
- show: U.value && W.value === "resize",
1665
- x: G.value.x,
1666
- y: G.value.y - 6,
1667
- placement: "top",
1668
- styleObject: Y.value
1669
- }, {
1670
- default: S(() => [h(x(q.value.translations.tooltipResize) + " ", 1), t[92] ||= m("kbd", null, "R", -1)]),
1671
- _: 1
1672
- }, 8, [
1673
- "show",
1674
- "x",
1675
- "y",
1676
- "styleObject"
1677
- ])) : f("", !0)], 46, xe),
1678
- m("button", {
1679
- disabled: z.value.length === 0,
1680
- style: v({
1681
- background: k.value ? q.value.style.buttons.controls.selected.backgroundColor : q.value.style.buttons.controls.backgroundColor,
1682
- border: k.value ? q.value.style.buttons.controls.selected.border : q.value.style.buttons.controls.border,
1683
- color: k.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color,
1684
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
1685
- cursor: J.value ? "pointer" : "default"
1686
- }),
1687
- class: _({
1688
- "button-tool": !0,
1689
- "button-tool--selected": k.value,
1690
- tooltip: !0
1691
- }),
1692
- onClick: t[6] ||= (e) => {
1693
- hn(), k.value = !k.value, j.value = !1, M.value = !1, N.value = !1, P.value = !1, F.value = !1, w.value = void 0, V.value = !1;
1694
- },
1695
- onMouseenter: t[7] ||= (e) => q.value.style.showTooltips && Q("delete", e, "top"),
1696
- onMouseleave: $,
1697
- onFocus: t[8] ||= (e) => q.value.style.showTooltips && Q("delete", e, "top"),
1698
- onBlur: $
1699
- }, [g(l, {
1700
- name: "trash",
1701
- stroke: k.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color
1702
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
1703
- key: 0,
1704
- show: U.value && W.value === "delete",
1705
- x: G.value.x,
1706
- y: G.value.y - 6,
1707
- placement: "top",
1708
- styleObject: Y.value
1709
- }, {
1710
- default: S(() => [h(x(q.value.translations.tooltipDelete) + " ", 1), t[93] ||= m("kbd", null, "D", -1)]),
1711
- _: 1
1712
- }, 8, [
1713
- "show",
1714
- "x",
1715
- "y",
1716
- "styleObject"
1717
- ])) : f("", !0)], 46, Se),
1718
- m("button", {
1719
- disabled: !Yt.value,
1720
- style: v({
1721
- background: N.value ? q.value.style.buttons.controls.selected.backgroundColor : q.value.style.buttons.controls.backgroundColor,
1722
- border: N.value ? q.value.style.buttons.controls.selected.border : q.value.style.buttons.controls.border,
1723
- color: N.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color,
1724
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
1725
- cursor: J.value ? "pointer" : "default"
1726
- }),
1727
- class: _({
1728
- "button-tool": !0,
1729
- "button-tool--selected": N.value,
1730
- tooltip: !0
1731
- }),
1732
- onClick: t[9] ||= (e) => {
1733
- hn(), Un("group"), N.value = !N.value, k.value = !1, j.value = !1, M.value = !1, P.value = !1, F.value = !1, w.value = "group", V.value = !1;
1734
- },
1735
- onMouseenter: t[10] ||= (e) => q.value.style.showTooltips && Q("selectAndGroup", e, "top"),
1736
- onMouseleave: $,
1737
- onFocus: t[11] ||= (e) => q.value.style.showTooltips && Q("selectAndGroup", e, "top"),
1738
- onBlur: $
1739
- }, [g(l, {
1740
- name: "selectAndGroup",
1741
- stroke: N.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color
1742
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
1743
- key: 0,
1744
- show: U.value && W.value === "selectAndGroup",
1745
- x: G.value.x,
1746
- y: G.value.y - 6,
1747
- placement: "top",
1748
- styleObject: Y.value
1749
- }, {
1750
- default: S(() => [h(x(q.value.translations.tooltipGroup) + " ", 1), t[94] ||= m("kbd", null, "G", -1)]),
1751
- _: 1
1752
- }, 8, [
1753
- "show",
1754
- "x",
1755
- "y",
1756
- "styleObject"
1757
- ])) : f("", !0)], 46, Ce),
1758
- m("button", {
1759
- disabled: z.value.length === 0,
1760
- style: v({
1761
- background: q.value.style.buttons.controls.backgroundColor,
1762
- border: q.value.style.buttons.controls.border,
1763
- color: q.value.style.buttons.controls.color,
1764
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
1765
- cursor: J.value ? "pointer" : "default"
1766
- }),
1767
- class: _({
1768
- "button-tool": !0,
1769
- tooltip: !0
1770
- }),
1771
- onClick: t[12] ||= (e) => {
1772
- M.value = !1, j.value = !0, k.value = !1, A.value = !1, N.value = !1, P.value = !1, F.value = !1, V.value = !1, fn("front");
1773
- },
1774
- onMouseenter: t[13] ||= (e) => q.value.style.showTooltips && Q("bringToFront", e, "top"),
1775
- onMouseleave: $,
1776
- onFocus: t[14] ||= (e) => q.value.style.showTooltips && Q("bringToFront", e, "top"),
1777
- onBlur: $
1778
- }, [g(l, {
1779
- name: "bringToFront",
1780
- stroke: q.value.style.buttons.controls.color
1781
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
1782
- key: 0,
1783
- show: U.value && W.value === "bringToFront",
1784
- x: G.value.x,
1785
- y: G.value.y - 6,
1786
- placement: "top",
1787
- styleObject: Y.value
1788
- }, {
1789
- default: S(() => [h(x(q.value.translations.tooltipBringToFront), 1)]),
1790
- _: 1
1791
- }, 8, [
1792
- "show",
1793
- "x",
1794
- "y",
1795
- "styleObject"
1796
- ])) : f("", !0)], 44, we),
1797
- m("button", {
1798
- disabled: z.value.length === 0,
1799
- style: v({
1800
- background: q.value.style.buttons.controls.backgroundColor,
1801
- border: q.value.style.buttons.controls.border,
1802
- color: q.value.style.buttons.controls.color,
1803
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
1804
- cursor: J.value ? "pointer" : "default"
1805
- }),
1806
- class: _({
1807
- "button-tool": !0,
1808
- tooltip: !0
1809
- }),
1810
- onClick: t[15] ||= (e) => {
1811
- M.value = !1, j.value = !0, k.value = !1, A.value = !1, N.value = !1, P.value = !1, F.value = !1, V.value = !1, fn("back");
1812
- },
1813
- onMouseenter: t[16] ||= (e) => q.value.style.showTooltips && Q("bringToBack", e, "top"),
1814
- onMouseleave: $,
1815
- onFocus: t[17] ||= (e) => q.value.style.showTooltips && Q("bringToBack", e, "top"),
1816
- onBlur: $
1817
- }, [g(l, {
1818
- name: "bringToBack",
1819
- stroke: q.value.style.buttons.controls.color
1820
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
1821
- key: 0,
1822
- show: U.value && W.value === "bringToBack",
1823
- x: G.value.x,
1824
- y: G.value.y - 6,
1825
- placement: "top",
1826
- styleObject: Y.value
1827
- }, {
1828
- default: S(() => [h(x(q.value.translations.tooltipBringToBack), 1)]),
1829
- _: 1
1830
- }, 8, [
1831
- "show",
1832
- "x",
1833
- "y",
1834
- "styleObject"
1835
- ])) : f("", !0)], 44, Te),
1836
- m("button", {
1837
- disabled: z.value.length === 0 || w.value === "line",
1838
- style: v({
1839
- background: q.value.style.buttons.controls.backgroundColor,
1840
- border: q.value.style.buttons.controls.border,
1841
- color: q.value.style.buttons.controls.color,
1842
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
1843
- cursor: J.value ? "pointer" : "default"
1844
- }),
1845
- class: _({
1846
- "button-tool": !0,
1847
- tooltip: !0
1848
- }),
1849
- onClick: t[18] ||= (e) => {
1850
- hn(), M.value = !1, j.value = !0, k.value = !1, A.value = !1, N.value = !1, P.value = !1, F.value = !1, V.value = !1, pn();
1851
- },
1852
- onMouseenter: t[19] ||= (e) => q.value.style.showTooltips && Q("duplicate", e, "top"),
1853
- onMouseleave: $,
1854
- onFocus: t[20] ||= (e) => q.value.style.showTooltips && Q("duplicate", e, "top"),
1855
- onBlur: $
1856
- }, [g(l, {
1857
- name: "copy",
1858
- stroke: q.value.style.buttons.controls.color,
1859
- size: 18
1860
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
1861
- key: 0,
1862
- show: U.value && W.value === "duplicate",
1863
- x: G.value.x,
1864
- y: G.value.y - 6,
1865
- placement: "top",
1866
- styleObject: Y.value
1867
- }, {
1868
- default: S(() => [h(x(q.value.translations.tooltipDuplicate), 1)]),
1869
- _: 1
1870
- }, 8, [
1871
- "show",
1872
- "x",
1873
- "y",
1874
- "styleObject"
1875
- ])) : f("", !0)], 44, Ee),
1876
- m("button", {
1877
- disabled: Kt.value.undo === 0,
1878
- style: v({
1879
- background: q.value.style.buttons.controls.backgroundColor,
1880
- border: q.value.style.buttons.controls.border,
1881
- color: q.value.style.buttons.controls.color,
1882
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
1883
- cursor: J.value ? "pointer" : "default"
1884
- }),
1885
- class: _({
1886
- "button-tool": !0,
1887
- "button-tool--one-shot": !0,
1888
- tooltip: !0
1889
- }),
1890
- onClick: t[21] ||= (e) => {
1891
- M.value = !1, j.value = !1, k.value = !1, A.value = !1, N.value = !1, P.value = !1, F.value = !1, w.value = void 0, V.value = !1, vn();
1892
- },
1893
- onMouseenter: t[22] ||= (e) => q.value.style.showTooltips && Q("undoLast", e, "top"),
1894
- onMouseleave: $,
1895
- onFocus: t[23] ||= (e) => q.value.style.showTooltips && Q("undoLast", e, "top"),
1896
- onBlur: $
1897
- }, [g(l, {
1898
- name: "refresh",
1899
- stroke: q.value.style.buttons.controls.color,
1900
- size: 20
1901
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
1902
- key: 0,
1903
- show: U.value && W.value === "undoLast",
1904
- x: G.value.x,
1905
- y: G.value.y - 6,
1906
- placement: "top",
1907
- styleObject: Y.value
1908
- }, {
1909
- default: S(() => [
1910
- h(x(q.value.translations.tooltipUndo) + " ", 1),
1911
- m("kbd", null, x(Wt.value ? "⌘" : "Ctrl"), 1),
1912
- t[95] ||= m("kbd", null, "Z", -1)
1913
- ]),
1914
- _: 1
1915
- }, 8, [
1916
- "show",
1917
- "x",
1918
- "y",
1919
- "styleObject"
1920
- ])) : f("", !0)], 44, De),
1921
- m("button", {
1922
- disabled: Kt.value.redo === 0,
1923
- style: v({
1924
- background: q.value.style.buttons.controls.backgroundColor,
1925
- border: q.value.style.buttons.controls.border,
1926
- color: q.value.style.buttons.controls.color,
1927
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
1928
- cursor: J.value ? "pointer" : "default"
1929
- }),
1930
- class: _({
1931
- "button-tool": !0,
1932
- "button-tool--one-shot": !0,
1933
- tooltip: !0
1934
- }),
1935
- onClick: t[24] ||= (e) => {
1936
- M.value = !1, j.value = !1, k.value = !1, A.value = !1, N.value = !1, P.value = !1, F.value = !1, w.value = void 0, V.value = !1, yn();
1937
- },
1938
- onMouseenter: t[25] ||= (e) => q.value.style.showTooltips && Q("redoLast", e, "top"),
1939
- onMouseleave: $,
1940
- onFocus: t[26] ||= (e) => q.value.style.showTooltips && Q("redoLast", e, "top"),
1941
- onBlur: $
1942
- }, [g(l, {
1943
- name: "refresh",
1944
- stroke: q.value.style.buttons.controls.color,
1945
- size: 20,
1946
- style: { transform: "rotateX(0deg) rotateY(180deg)" }
1947
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
1948
- key: 0,
1949
- show: U.value && W.value === "redoLast",
1950
- x: G.value.x,
1951
- y: G.value.y - 6,
1952
- placement: "top",
1953
- styleObject: Y.value
1954
- }, {
1955
- default: S(() => [
1956
- h(x(q.value.translations.tooltipRedo) + " ", 1),
1957
- m("kbd", null, x(Wt.value ? "⌘" : "Ctrl"), 1),
1958
- t[96] ||= m("kbd", null, "Y", -1)
1959
- ]),
1960
- _: 1
1961
- }, 8, [
1962
- "show",
1963
- "x",
1964
- "y",
1965
- "styleObject"
1966
- ])) : f("", !0)], 44, Oe),
1967
- q.value.style.showPrint ? (y(), p("button", {
1968
- key: 0,
1969
- style: v({
1970
- background: q.value.style.buttons.controls.backgroundColor,
1971
- border: q.value.style.buttons.controls.border,
1972
- color: q.value.style.buttons.controls.color,
1973
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
1974
- cursor: J.value ? "pointer" : "default"
1975
- }),
1976
- class: _({
1977
- "button-tool": !0,
1978
- tooltip: !0
1979
- }),
1980
- onClick: Pn,
1981
- onMouseenter: t[27] ||= (e) => q.value.style.showTooltips && Q("printPdf", e, "top"),
1982
- onMouseleave: $,
1983
- onFocus: t[28] ||= (e) => q.value.style.showTooltips && Q("printPdf", e, "top"),
1984
- onBlur: $
1985
- }, [g(l, {
1986
- name: "printer",
1987
- stroke: q.value.style.buttons.controls.color
1988
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
1989
- key: 0,
1990
- show: U.value && W.value === "printPdf",
1991
- x: G.value.x,
1992
- y: G.value.y - 6,
1993
- placement: "top",
1994
- styleObject: Y.value
1995
- }, {
1996
- default: S(() => [h(x(q.value.translations.tooltipPdf), 1)]),
1997
- _: 1
1998
- }, 8, [
1999
- "show",
2000
- "x",
2001
- "y",
2002
- "styleObject"
2003
- ])) : f("", !0)], 36)) : f("", !0),
2004
- q.value.style.showImage ? (y(), p("button", {
2005
- key: 1,
2006
- style: v({
2007
- background: q.value.style.buttons.controls.backgroundColor,
2008
- border: q.value.style.buttons.controls.border,
2009
- color: q.value.style.buttons.controls.color,
2010
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2011
- cursor: J.value ? "pointer" : "default"
2012
- }),
2013
- class: _({
2014
- "button-tool": !0,
2015
- tooltip: !0
2016
- }),
2017
- onClick: t[29] ||= (...e) => le(yt) && le(yt)(...e),
2018
- onMouseenter: t[30] ||= (e) => q.value.style.showTooltips && Q("printImage", e, "top"),
2019
- onMouseleave: $,
2020
- onFocus: t[31] ||= (e) => q.value.style.showTooltips && Q("printImage", e, "top"),
2021
- onBlur: $
2022
- }, [g(l, {
2023
- name: "image",
2024
- stroke: q.value.style.buttons.controls.color,
2025
- size: 20
2026
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
2027
- key: 0,
2028
- show: U.value && W.value === "printImage",
2029
- x: G.value.x,
2030
- y: G.value.y - 6,
2031
- placement: "top",
2032
- styleObject: Y.value
2033
- }, {
2034
- default: S(() => [h(x(q.value.translations.tooltipImage), 1)]),
2035
- _: 1
2036
- }, 8, [
2037
- "show",
2038
- "x",
2039
- "y",
2040
- "styleObject"
2041
- ])) : f("", !0)], 36)) : f("", !0),
2042
- q.value.style.showSave ? (y(), p("button", {
2043
- key: 2,
2044
- style: v({
2045
- background: q.value.style.buttons.controls.backgroundColor,
2046
- border: q.value.style.buttons.controls.border,
2047
- color: q.value.style.buttons.controls.color,
2048
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2049
- cursor: J.value ? "pointer" : "default"
2050
- }),
2051
- class: _({
2052
- "button-tool": !0,
2053
- tooltip: !0
2054
- }),
2055
- onClick: Gn,
2056
- onMouseenter: t[32] ||= (e) => q.value.style.showTooltips && Q("saveAction", e, "top"),
2057
- onMouseleave: $,
2058
- onFocus: t[33] ||= (e) => q.value.style.showTooltips && Q("saveAction", e, "top"),
2059
- onBlur: $
2060
- }, [g(l, {
2061
- name: "save",
2062
- stroke: q.value.style.buttons.controls.color
2063
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
2064
- key: 0,
2065
- show: U.value && W.value === "saveAction",
2066
- x: G.value.x,
2067
- y: G.value.y - 6,
2068
- placement: "top",
2069
- styleObject: Y.value
2070
- }, {
2071
- default: S(() => [h(x(q.value.translations.tooltipSave), 1)]),
2072
- _: 1
2073
- }, 8, [
2074
- "show",
2075
- "x",
2076
- "y",
2077
- "styleObject"
2078
- ])) : f("", !0)], 36)) : f("", !0)
2079
- ], 4), m("div", ke, [
2080
- m("button", {
2081
- class: _({
2082
- "button-tool": !0,
2083
- "button-tool--selected": w.value === "circle",
2084
- tooltip: !0
2085
- }),
2086
- style: v({
2087
- background: w.value === "circle" ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2088
- border: w.value === "circle" ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2089
- color: w.value === "circle" ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2090
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2091
- cursor: J.value ? "pointer" : "default"
2092
- }),
2093
- onClick: t[34] ||= (e) => {
2094
- Un("circle"), N.value = !1;
2095
- },
2096
- onMouseenter: t[35] ||= (e) => q.value.style.showTooltips && Q("setCircle", e, "top"),
2097
- onMouseleave: $,
2098
- onFocus: t[36] ||= (e) => q.value.style.showTooltips && Q("setCircle", e, "top"),
2099
- onBlur: $
2100
- }, [(y(), p("svg", Ae, [m("circle", {
2101
- cx: 6,
2102
- cy: 6,
2103
- r: "4",
2104
- fill: B.value.circle.filled ? (w.value, Pt.value + Xt.value) : "none",
2105
- stroke: "currentColor"
2106
- }, null, 8, je)])), q.value.style.showTooltips ? (y(), d(C, {
2107
- key: 0,
2108
- show: U.value && W.value === "setCircle",
2109
- x: G.value.x,
2110
- y: G.value.y - 6,
2111
- placement: "top",
2112
- styleObject: Y.value
2113
- }, {
2114
- default: S(() => [h(x(q.value.translations.tooltipShapeCircle) + " ", 1), t[97] ||= m("kbd", null, "C", -1)]),
2115
- _: 1
2116
- }, 8, [
2117
- "show",
2118
- "x",
2119
- "y",
2120
- "styleObject"
2121
- ])) : f("", !0)], 38),
2122
- w.value === "circle" ? (y(), p("div", Me, [m("label", Ne, [h(x(q.value.translations.filled) + " ", 1), pe(m("input", {
2123
- type: "checkbox",
2124
- "onUpdate:modelValue": t[37] ||= (e) => B.value.circle.filled = e,
2125
- onChange: Ln,
2126
- checked: B.value.circle.filled,
2127
- style: v({
2128
- all: "revert",
2129
- appearance: "auto",
2130
- "-webkit-appearance": "auto",
2131
- accentColor: q.value.style.color + " !important"
2132
- })
2133
- }, null, 44, Pe), [[ue, B.value.circle.filled]])])])) : f("", !0),
2134
- m("button", {
2135
- class: _({
2136
- "button-tool": !0,
2137
- "button-tool--selected": w.value === "rect",
2138
- tooltip: !0
2139
- }),
2140
- style: v({
2141
- background: w.value === "rect" ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2142
- border: w.value === "rect" ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2143
- color: w.value === "rect" ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2144
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2145
- cursor: J.value ? "pointer" : "default"
2146
- }),
2147
- onClick: t[38] ||= (e) => {
2148
- Un("rect"), N.value = !1;
2149
- },
2150
- onMouseenter: t[39] ||= (e) => q.value.style.showTooltips && Q("setRect", e, "top"),
2151
- onMouseleave: $,
2152
- onFocus: t[40] ||= (e) => q.value.style.showTooltips && Q("setRect", e, "top"),
2153
- onBlur: $
2154
- }, [(y(), p("svg", Fe, [m("rect", {
2155
- x: "3",
2156
- y: "3",
2157
- style: {
2158
- rx: "0 !important",
2159
- ry: "0 !important"
2160
- },
2161
- height: "6",
2162
- width: "6",
2163
- fill: B.value.rect.filled ? (w.value, Pt.value + Xt.value) : "none",
2164
- stroke: "currentColor"
2165
- }, null, 8, Ie)])), q.value.style.showTooltips ? (y(), d(C, {
2166
- key: 0,
2167
- show: U.value && W.value === "setRect",
2168
- x: G.value.x,
2169
- y: G.value.y - 6,
2170
- placement: "top",
2171
- styleObject: Y.value
2172
- }, {
2173
- default: S(() => [h(x(q.value.translations.tooltipShapeRect) + " ", 1), t[98] ||= m("kbd", null, "S", -1)]),
2174
- _: 1
2175
- }, 8, [
2176
- "show",
2177
- "x",
2178
- "y",
2179
- "styleObject"
2180
- ])) : f("", !0)], 38),
2181
- w.value === "rect" ? (y(), p("div", Le, [m("label", Re, [h(x(q.value.translations.filled) + " ", 1), pe(m("input", {
2182
- type: "checkbox",
2183
- "onUpdate:modelValue": t[41] ||= (e) => B.value.rect.filled = e,
2184
- onChange: In,
2185
- checked: B.value.rect.filled,
2186
- style: v({
2187
- all: "revert",
2188
- appearance: "auto",
2189
- "-webkit-appearance": "auto",
2190
- accentColor: q.value.style.color + " !important"
2191
- })
2192
- }, null, 44, ze), [[ue, B.value.rect.filled]])])])) : f("", !0),
2193
- m("button", {
2194
- class: _({
2195
- "button-tool": !0,
2196
- "button-tool--selected": w.value === "arrow",
2197
- tooltip: !0
2198
- }),
2199
- style: v({
2200
- background: w.value === "arrow" ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2201
- border: w.value === "arrow" ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2202
- color: w.value === "arrow" ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2203
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2204
- cursor: J.value ? "pointer" : "default"
2205
- }),
2206
- onClick: t[42] ||= (e) => {
2207
- Un("arrow"), N.value = !1;
2208
- },
2209
- onMouseenter: t[43] ||= (e) => q.value.style.showTooltips && Q("setArrow", e, "top"),
2210
- onMouseleave: $,
2211
- onFocus: t[44] ||= (e) => q.value.style.showTooltips && Q("setArrow", e, "top"),
2212
- onBlur: $
2213
- }, [(y(), p("svg", Be, [m("path", {
2214
- stroke: B.value.arrow.filled ? w.value === "arrow" ? "white" : "grey" : "none",
2215
- "stroke-width": "2",
2216
- d: "M5,19 19,5 14,5 19,10.5 19,5",
2217
- fill: "none",
2218
- "stroke-linecap": "round",
2219
- "stroke-linejoin": "round"
2220
- }, null, 8, Ve)])), q.value.style.showTooltips ? (y(), d(C, {
2221
- key: 0,
2222
- show: U.value && W.value === "setArrow",
2223
- x: G.value.x,
2224
- y: G.value.y - 6,
2225
- placement: "top",
2226
- styleObject: Y.value
2227
- }, {
2228
- default: S(() => [h(x(q.value.translations.tooltipShapeArrow) + " ", 1), t[99] ||= m("kbd", null, "A", -1)]),
2229
- _: 1
2230
- }, 8, [
2231
- "show",
2232
- "x",
2233
- "y",
2234
- "styleObject"
2235
- ])) : f("", !0)], 38),
2236
- m("button", {
2237
- class: _({
2238
- "button-tool": !0,
2239
- "button-tool--selected": w.value === "line",
2240
- tooltip: !0
2241
- }),
2242
- style: v({
2243
- background: w.value === "line" ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2244
- border: w.value === "line" ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2245
- color: w.value === "line" ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2246
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2247
- cursor: J.value ? "pointer" : "default"
2248
- }),
2249
- onClick: t[45] ||= (e) => {
2250
- Un("line"), N.value = !1;
2251
- },
2252
- onMouseenter: t[46] ||= (e) => q.value.style.showTooltips && Q("setFreehand", e, "top"),
2253
- onMouseleave: $,
2254
- onFocus: t[47] ||= (e) => q.value.style.showTooltips && Q("setFreehand", e, "top"),
2255
- onBlur: $
2256
- }, [t[101] ||= m("svg", {
2257
- width: "80%",
2258
- viewBox: "0 0 24 24",
2259
- "stroke-width": "2",
2260
- stroke: "currentColor",
2261
- fill: "none",
2262
- "stroke-linecap": "round",
2263
- "stroke-linejoin": "round"
2264
- }, [m("path", {
2265
- stroke: "none",
2266
- d: "M0 0h24v24H0z",
2267
- fill: "none"
2268
- }), m("path", { d: "M3 15c2 3 4 4 7 4s7 -3 7 -7s-3 -7 -6 -7s-5 1.5 -5 4s2 5 6 5s8.408 -2.453 10 -5" })], -1), q.value.style.showTooltips ? (y(), d(C, {
2269
- key: 0,
2270
- show: U.value && W.value === "setFreehand",
2271
- x: G.value.x,
2272
- y: G.value.y - 6,
2273
- placement: "top",
2274
- styleObject: Y.value
2275
- }, {
2276
- default: S(() => [h(x(q.value.translations.tooltipShapeFreehand) + " ", 1), t[100] ||= m("kbd", null, "L", -1)]),
2277
- _: 1
2278
- }, 8, [
2279
- "show",
2280
- "x",
2281
- "y",
2282
- "styleObject"
2283
- ])) : f("", !0)], 38),
2284
- [
2285
- "arrow",
2286
- "circle",
2287
- "rect",
2288
- "line"
2289
- ].includes(w.value) ? (y(), p("div", He, [m("div", Ue, [m("label", We, [h(x(q.value.translations.thickness) + " ", 1), pe(m("input", {
2290
- type: "number",
2291
- "onUpdate:modelValue": t[48] ||= (e) => bt.value = e,
2292
- onInput: Bn,
2293
- min: 1,
2294
- style: {
2295
- padding: "0 4px",
2296
- width: "40px",
2297
- border: "1px solid #dadada",
2298
- "border-radius": "3px"
2299
- }
2300
- }, null, 544), [[de, bt.value]])])])])) : f("", !0),
2301
- [
2302
- "arrow",
2303
- "circle",
2304
- "rect"
2305
- ].includes(w.value) ? (y(), p("div", Ge, [m("div", Ke, [m("label", qe, [
2306
- h(x(q.value.translations.dashedLines) + " ", 1),
2307
- (y(), p("svg", Je, [...t[102] ||= [m("line", {
2308
- x1: "0",
2309
- x2: "24",
2310
- y1: "12",
2311
- y2: "12",
2312
- "stroke-width": "2",
2313
- stroke: "black",
2314
- "stroke-dasharray": "3"
2315
- }, null, -1)]])),
2316
- pe(m("input", {
2317
- name: "dashStyle",
2318
- type: "checkbox",
2319
- "onUpdate:modelValue": t[49] ||= (e) => St.value = e,
2320
- onChange: Rn,
2321
- checked: St.value,
2322
- style: v({
2323
- all: "revert",
2324
- appearance: "auto",
2325
- "-webkit-appearance": "auto",
2326
- accentColor: q.value.style.color + " !important"
2327
- })
2328
- }, null, 44, Ye), [[ue, St.value]])
2329
- ])])])) : f("", !0),
2330
- m("button", {
2331
- class: _({
2332
- "button-tool": !0,
2333
- "button-tool--selected": P.value,
2334
- tooltip: !0
2335
- }),
2336
- style: v({
2337
- background: P.value ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2338
- border: P.value ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2339
- color: P.value ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2340
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2341
- cursor: J.value ? "pointer" : "default"
2342
- }),
2343
- onClick: t[50] ||= (e) => {
2344
- hn(), P.value = !P.value, k.value = !1, j.value = !1, M.value = !1, N.value = !1, A.value = !1, w.value = void 0;
2345
- },
2346
- onMouseenter: t[51] ||= (e) => q.value.style.showTooltips && Q("setText", e, "top"),
2347
- onMouseleave: $,
2348
- onFocus: t[52] ||= (e) => q.value.style.showTooltips && Q("setText", e, "top"),
2349
- onBlur: $
2350
- }, [g(l, {
2351
- name: "text",
2352
- stroke: P.value ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color
2353
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
2354
- key: 0,
2355
- show: U.value && W.value === "setText",
2356
- x: G.value.x,
2357
- y: G.value.y - 6,
2358
- placement: "top",
2359
- styleObject: Y.value
2360
- }, {
2361
- default: S(() => [h(x(q.value.translations.tooltipShapeText) + " ", 1), t[103] ||= m("kbd", null, "T", -1)]),
2362
- _: 1
2363
- }, 8, [
2364
- "show",
2365
- "x",
2366
- "y",
2367
- "styleObject"
2368
- ])) : f("", !0)], 38),
2369
- P.value ? (y(), p("div", Xe, [m("div", Ze, [m("label", Qe, [h(x(q.value.translations.fontSize) + " ", 1), pe(m("input", {
2370
- type: "number",
2371
- "onUpdate:modelValue": t[53] ||= (e) => zt.value = e,
2372
- onInput: Vn,
2373
- style: {
2374
- padding: "0 4px",
2375
- width: "40px",
2376
- border: "1px solid #dadada",
2377
- "border-radius": "3px"
2378
- }
2379
- }, null, 544), [[de, zt.value]])])])])) : f("", !0),
2380
- P.value ? (y(), p("div", $e, [m("button", {
2381
- class: _({
2382
- "button-tool": !0,
2383
- "button-tool--selected": H.value === "start",
2384
- tooltip: !0
2385
- }),
2386
- style: v({
2387
- background: H.value === "start" ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2388
- border: H.value === "start" ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2389
- color: H.value === "start" ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2390
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2391
- cursor: J.value ? "pointer" : "default"
2392
- }),
2393
- onClick: t[54] ||= (e) => {
2394
- k.value = !1, j.value = !1, M.value = !1, A.value = !1, N.value = !1, w.value = void 0, H.value = "start", _n("start");
2395
- },
2396
- onMouseenter: t[55] ||= (e) => q.value.style.showTooltips && Q("setAlignStart", e, "top"),
2397
- onMouseleave: $,
2398
- onFocus: t[56] ||= (e) => q.value.style.showTooltips && Q("setAlignStart", e, "top"),
2399
- onBlur: $
2400
- }, [t[104] ||= m("svg", {
2401
- width: "80%",
2402
- viewBox: "0 0 24 24",
2403
- "stroke-width": "2",
2404
- stroke: "currentColor",
2405
- fill: "none",
2406
- "stroke-linecap": "round",
2407
- "stroke-linejoin": "round"
2408
- }, [
2409
- m("path", {
2410
- stroke: "none",
2411
- d: "M0 0h24v24H0z",
2412
- fill: "none"
2413
- }),
2414
- m("path", { d: "M4 6l16 0" }),
2415
- m("path", { d: "M4 12l10 0" }),
2416
- m("path", { d: "M4 18l14 0" })
2417
- ], -1), q.value.style.showTooltips ? (y(), d(C, {
2418
- key: 0,
2419
- show: U.value && W.value === "setAlignStart",
2420
- x: G.value.x,
2421
- y: G.value.y - 6,
2422
- placement: "top",
2423
- styleObject: Y.value
2424
- }, {
2425
- default: S(() => [h(x(q.value.translations.tooltipShapeTextLeft), 1)]),
2426
- _: 1
2427
- }, 8, [
2428
- "show",
2429
- "x",
2430
- "y",
2431
- "styleObject"
2432
- ])) : f("", !0)], 38)])) : f("", !0),
2433
- P.value ? (y(), p("div", et, [m("button", {
2434
- class: _({
2435
- "button-tool": !0,
2436
- "button-tool--selected": H.value === "middle",
2437
- tooltip: !0
2438
- }),
2439
- style: v({
2440
- background: H.value === "middle" ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2441
- border: H.value === "middle" ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2442
- color: H.value === "middle" ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2443
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2444
- cursor: J.value ? "pointer" : "default"
2445
- }),
2446
- disabled: O.value,
2447
- onClick: t[57] ||= (e) => {
2448
- k.value = !1, j.value = !1, M.value = !1, A.value = !1, N.value = !1, w.value = void 0, H.value = "middle", _n("middle");
2449
- },
2450
- onMouseenter: t[58] ||= (e) => q.value.style.showTooltips && Q("setAlignMiddle", e, "top"),
2451
- onMouseleave: $,
2452
- onFocus: t[59] ||= (e) => q.value.style.showTooltips && Q("setAlignMiddle", e, "top"),
2453
- onBlur: $
2454
- }, [t[105] ||= m("svg", {
2455
- width: "80%",
2456
- viewBox: "0 0 24 24",
2457
- "stroke-width": "2",
2458
- stroke: "currentColor",
2459
- fill: "none",
2460
- "stroke-linecap": "round",
2461
- "stroke-linejoin": "round"
2462
- }, [
2463
- m("path", {
2464
- stroke: "none",
2465
- d: "M0 0h24v24H0z",
2466
- fill: "none"
2467
- }),
2468
- m("path", { d: "M4 6l16 0" }),
2469
- m("path", { d: "M8 12l8 0" }),
2470
- m("path", { d: "M6 18l12 0" })
2471
- ], -1), q.value.style.showTooltips ? (y(), d(C, {
2472
- key: 0,
2473
- show: U.value && W.value === "setAlignMiddle",
2474
- x: G.value.x,
2475
- y: G.value.y - 6,
2476
- placement: "top",
2477
- styleObject: Y.value
2478
- }, {
2479
- default: S(() => [h(x(q.value.translations.tooltipShapeTextCenter), 1)]),
2480
- _: 1
2481
- }, 8, [
2482
- "show",
2483
- "x",
2484
- "y",
2485
- "styleObject"
2486
- ])) : f("", !0)], 46, tt)])) : f("", !0),
2487
- P.value ? (y(), p("div", nt, [m("button", {
2488
- class: _({
2489
- "button-tool": !0,
2490
- "button-tool--selected": H.value === "end",
2491
- tooltip: !0
2492
- }),
2493
- style: v({
2494
- background: H.value === "end" ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2495
- border: H.value === "end" ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2496
- color: H.value === "end" ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2497
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2498
- cursor: J.value ? "pointer" : "default"
2499
- }),
2500
- disabled: O.value,
2501
- onClick: t[60] ||= (e) => {
2502
- k.value = !1, j.value = !1, M.value = !1, A.value = !1, N.value = !1, w.value = void 0, H.value = "end", _n("end");
2503
- },
2504
- onMouseenter: t[61] ||= (e) => q.value.style.showTooltips && Q("setAlignEnd", e, "top"),
2505
- onMouseleave: $,
2506
- onFocus: t[62] ||= (e) => q.value.style.showTooltips && Q("setAlignEnd", e, "top"),
2507
- onBlur: $
2508
- }, [t[106] ||= m("svg", {
2509
- width: "80%",
2510
- viewBox: "0 0 24 24",
2511
- "stroke-width": "2",
2512
- stroke: "currentColor",
2513
- fill: "none",
2514
- "stroke-linecap": "round",
2515
- "stroke-linejoin": "round"
2516
- }, [
2517
- m("path", {
2518
- stroke: "none",
2519
- d: "M0 0h24v24H0z",
2520
- fill: "none"
2521
- }),
2522
- m("path", { d: "M4 6l16 0" }),
2523
- m("path", { d: "M10 12l10 0" }),
2524
- m("path", { d: "M6 18l14 0" })
2525
- ], -1), q.value.style.showTooltips ? (y(), d(C, {
2526
- key: 0,
2527
- show: U.value && W.value === "setAlignEnd",
2528
- x: G.value.x,
2529
- y: G.value.y - 6,
2530
- placement: "top",
2531
- styleObject: Y.value
2532
- }, {
2533
- default: S(() => [h(x(q.value.translations.tooltipShapeTextRight), 1)]),
2534
- _: 1
2535
- }, 8, [
2536
- "show",
2537
- "x",
2538
- "y",
2539
- "styleObject"
2540
- ])) : f("", !0)], 46, rt)])) : f("", !0),
2541
- P.value ? (y(), p("div", it, [m("button", {
2542
- class: _({
2543
- "button-tool": !0,
2544
- "button-tool--selected": O.value,
2545
- tooltip: !0
2546
- }),
2547
- style: v({
2548
- background: O.value ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2549
- border: O.value ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2550
- color: O.value ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2551
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2552
- cursor: J.value ? "pointer" : "default"
2553
- }),
2554
- onClick: t[63] ||= (e) => {
2555
- k.value = !1, j.value = !1, M.value = !1, A.value = !1, N.value = !1, w.value = void 0, O.value = !O.value, H.value = "start", _n("start"), Vn();
2556
- },
2557
- onMouseenter: t[64] ||= (e) => q.value.style.showTooltips && Q("setBulletMode", e, "top"),
2558
- onMouseleave: $,
2559
- onFocus: t[65] ||= (e) => q.value.style.showTooltips && Q("setBulletMode", e, "top"),
2560
- onBlur: $
2561
- }, [t[107] ||= m("svg", {
2562
- width: "100%",
2563
- viewBox: "0 0 24 24",
2564
- "stroke-width": "2",
2565
- stroke: "currentColor",
2566
- fill: "none",
2567
- "stroke-linecap": "round",
2568
- "stroke-linejoin": "round"
2569
- }, [
2570
- m("path", {
2571
- stroke: "none",
2572
- d: "M0 0h24v24H0z",
2573
- fill: "none"
2574
- }),
2575
- m("path", { d: "M9 6l11 0" }),
2576
- m("path", { d: "M9 12l11 0" }),
2577
- m("path", { d: "M9 18l11 0" }),
2578
- m("path", { d: "M5 6l0 .01" }),
2579
- m("path", { d: "M5 12l0 .01" }),
2580
- m("path", { d: "M5 18l0 .01" })
2581
- ], -1), q.value.style.showTooltips ? (y(), d(C, {
2582
- key: 0,
2583
- show: U.value && W.value === "setBulletMode",
2584
- x: G.value.x,
2585
- y: G.value.y - 6,
2586
- placement: "top",
2587
- styleObject: Y.value
2588
- }, {
2589
- default: S(() => [h(x(q.value.translations.tooltipShapeTextBullet), 1)]),
2590
- _: 1
2591
- }, 8, [
2592
- "show",
2593
- "x",
2594
- "y",
2595
- "styleObject"
2596
- ])) : f("", !0)], 38)])) : f("", !0),
2597
- P.value ? (y(), p("div", at, [m("button", {
2598
- class: _({
2599
- "button-tool": !0,
2600
- "button-tool--selected": xt.value,
2601
- tooltip: !0
2602
- }),
2603
- style: v({
2604
- background: xt.value ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2605
- border: xt.value ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2606
- color: xt.value ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2607
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2608
- cursor: J.value ? "pointer" : "default"
2609
- }),
2610
- onClick: t[66] ||= (e) => {
2611
- k.value = !1, j.value = !1, M.value = !1, A.value = !1, N.value = !1, w.value = void 0, xt.value = !xt.value, Vn();
2612
- },
2613
- onMouseenter: t[67] ||= (e) => q.value.style.showTooltips && Q("setBold", e, "top"),
2614
- onMouseleave: $,
2615
- onFocus: t[68] ||= (e) => q.value.style.showTooltips && Q("setBold", e, "top"),
2616
- onBlur: $
2617
- }, [t[108] ||= m("svg", {
2618
- width: "100%",
2619
- viewBox: "0 0 24 24",
2620
- "stroke-width": "3",
2621
- stroke: "currentColor",
2622
- fill: "none",
2623
- "stroke-linecap": "round",
2624
- "stroke-linejoin": "round"
2625
- }, [
2626
- m("path", {
2627
- stroke: "none",
2628
- d: "M0 0h24v24H0z",
2629
- fill: "none"
2630
- }),
2631
- m("path", { d: "M7 5h6a3.5 3.5 0 0 1 0 7h-6z" }),
2632
- m("path", { d: "M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7" })
2633
- ], -1), q.value.style.showTooltips ? (y(), d(C, {
2634
- key: 0,
2635
- show: U.value && W.value === "setBold",
2636
- x: G.value.x,
2637
- y: G.value.y - 6,
2638
- placement: "top",
2639
- styleObject: Y.value
2640
- }, {
2641
- default: S(() => [h(x(q.value.translations.tooltipShapeTextBold), 1)]),
2642
- _: 1
2643
- }, 8, [
2644
- "show",
2645
- "x",
2646
- "y",
2647
- "styleObject"
2648
- ])) : f("", !0)], 38)])) : f("", !0),
2649
- P.value ? (y(), p("div", ot, [m("button", {
2650
- class: _({
2651
- "button-tool": !0,
2652
- "button-tool--selected": Tt.value,
2653
- tooltip: !0
2654
- }),
2655
- style: v({
2656
- background: Tt.value ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2657
- border: Tt.value ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2658
- color: Tt.value ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2659
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2660
- cursor: J.value ? "pointer" : "default"
2661
- }),
2662
- onClick: t[69] ||= (e) => {
2663
- k.value = !1, j.value = !1, M.value = !1, A.value = !1, N.value = !1, w.value = void 0, Tt.value = !Tt.value, Vn();
2664
- },
2665
- onMouseenter: t[70] ||= (e) => q.value.style.showTooltips && Q("setItalic", e, "top"),
2666
- onMouseleave: $,
2667
- onFocus: t[71] ||= (e) => q.value.style.showTooltips && Q("setItalic", e, "top"),
2668
- onBlur: $
2669
- }, [t[109] ||= m("svg", {
2670
- width: "100%",
2671
- height: "44",
2672
- viewBox: "0 0 24 24",
2673
- "stroke-width": "2",
2674
- stroke: "currentColor",
2675
- fill: "none",
2676
- "stroke-linecap": "round",
2677
- "stroke-linejoin": "round"
2678
- }, [
2679
- m("path", {
2680
- stroke: "none",
2681
- d: "M0 0h24v24H0z",
2682
- fill: "none"
2683
- }),
2684
- m("path", { d: "M11 5l6 0" }),
2685
- m("path", { d: "M7 19l6 0" }),
2686
- m("path", { d: "M14 5l-4 14" })
2687
- ], -1), q.value.style.showTooltips ? (y(), d(C, {
2688
- key: 0,
2689
- show: U.value && W.value === "setItalic",
2690
- x: G.value.x,
2691
- y: G.value.y - 6,
2692
- placement: "top",
2693
- styleObject: Y.value
2694
- }, {
2695
- default: S(() => [h(x(q.value.translations.tooltipShapeTextItalic), 1)]),
2696
- _: 1
2697
- }, 8, [
2698
- "show",
2699
- "x",
2700
- "y",
2701
- "styleObject"
2702
- ])) : f("", !0)], 38)])) : f("", !0),
2703
- P.value ? (y(), p("div", st, [m("button", {
2704
- class: _({
2705
- "button-tool": !0,
2706
- "button-tool--selected": kt.value,
2707
- tooltip: !0
2708
- }),
2709
- style: v({
2710
- background: kt.value ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2711
- border: kt.value ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2712
- color: kt.value ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2713
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2714
- cursor: J.value ? "pointer" : "default"
2715
- }),
2716
- onClick: t[72] ||= (e) => {
2717
- k.value = !1, j.value = !1, M.value = !1, A.value = !1, N.value = !1, w.value = void 0, kt.value = !kt.value, Vn();
2718
- },
2719
- onMouseenter: t[73] ||= (e) => q.value.style.showTooltips && Q("setUnderline", e, "top"),
2720
- onMouseleave: $,
2721
- onFocus: t[74] ||= (e) => q.value.style.showTooltips && Q("setUnderline", e, "top"),
2722
- onBlur: $
2723
- }, [t[110] ||= m("svg", {
2724
- width: "100%",
2725
- viewBox: "0 0 24 24",
2726
- "stroke-width": "2",
2727
- stroke: "currentColor",
2728
- fill: "none",
2729
- "stroke-linecap": "round",
2730
- "stroke-linejoin": "round"
2731
- }, [
2732
- m("path", {
2733
- stroke: "none",
2734
- d: "M0 0h24v24H0z",
2735
- fill: "none"
2736
- }),
2737
- m("path", { d: "M7 5v5a5 5 0 0 0 10 0v-5" }),
2738
- m("path", { d: "M5 19h14" })
2739
- ], -1), q.value.style.showTooltips ? (y(), d(C, {
2740
- key: 0,
2741
- show: U.value && W.value === "setUnderline",
2742
- x: G.value.x,
2743
- y: G.value.y - 6,
2744
- placement: "top",
2745
- styleObject: Y.value
2746
- }, {
2747
- default: S(() => [h(x(q.value.translations.tooltipShapeTextUnderline), 1)]),
2748
- _: 1
2749
- }, 8, [
2750
- "show",
2751
- "x",
2752
- "y",
2753
- "styleObject"
2754
- ])) : f("", !0)], 38)])) : f("", !0),
2755
- m("div", ct, [m("button", {
2756
- class: _({
2757
- "button-tool": !0,
2758
- tooltip: !0
2759
- }),
2760
- style: { borderRadius: "6px" },
2761
- onMouseenter: t[76] ||= (e) => q.value.style.showTooltips && Q("setColor", e, "top"),
2762
- onMouseleave: $,
2763
- onFocus: t[77] ||= (e) => q.value.style.showTooltips && Q("setColor", e, "top"),
2764
- onBlur: $
2765
- }, [g(te, {
2766
- value: Pt.value,
2767
- "onUpdate:value": t[75] ||= (e) => Pt.value = e,
2768
- backgroundColor: q.value.style.backgroundColor,
2769
- buttonBorderColor: q.value.style.color,
2770
- isCursorPointer: J.value,
2771
- teleported: ""
2772
- }, null, 8, [
2773
- "value",
2774
- "backgroundColor",
2775
- "buttonBorderColor",
2776
- "isCursorPointer"
2777
- ])], 32), q.value.style.showTooltips ? (y(), d(C, {
2778
- key: 0,
2779
- show: U.value && W.value === "setColor",
2780
- x: G.value.x,
2781
- y: G.value.y - 6,
2782
- placement: "top",
2783
- styleObject: Y.value
2784
- }, {
2785
- default: S(() => [h(x(q.value.translations.tooltipShapeColor), 1)]),
2786
- _: 1
2787
- }, 8, [
2788
- "show",
2789
- "x",
2790
- "y",
2791
- "styleObject"
2792
- ])) : f("", !0)]),
2793
- m("div", lt, [m("label", ut, [h(x(q.value.translations.colorAlpha) + ": " + x(Bt.value > 98 ? 100 : Bt.value) + " % ", 1), pe(m("input", {
2794
- name: "colorTransparency",
2795
- type: "range",
2796
- "onUpdate:modelValue": t[78] ||= (e) => Bt.value = e,
2797
- onInput: zn,
2798
- min: 0,
2799
- max: 100,
2800
- style: v({
2801
- width: "100%",
2802
- accentColor: q.value.style.color + " !important"
2803
- })
2804
- }, null, 36), [[de, Bt.value]])])])
2805
- ])]),
2806
- _: 1
2807
- }, 8, ["config"])]), m("div", {
2808
- class: "annotator annotator__wrapper",
2809
- ref_key: "drawSvgContainer",
2810
- ref: Mn,
2811
- style: { position: "relative" },
2812
- id: _e.value,
2813
- "data-annotator-content": ""
2814
- }, [
2815
- m("div", {
2816
- class: "annotator__content-layer",
2817
- style: v(`${Ot.value ? "pointer-events: none;" : ""}`)
2818
- }, [ce(e.$slots, "default", {}, void 0, !0)], 4),
2819
- Ot.value || q.value.alwaysVisible ? (y(), p("svg", {
2820
- id: "annotatorSvg",
2821
- key: jt.value,
2822
- ref_key: "mainSvg",
2823
- ref: X,
2824
- class: _({
2825
- annotator__overlay: !0,
2826
- draw: !0,
2827
- "draw--free": w.value === "line"
2828
- }),
2829
- viewBox: `0 0 ${Nt.value} ${Mt.value}`,
2830
- width: Lt.value,
2831
- height: Rt.value,
2832
- onPointerdown: t[83] ||= (e) => En(e),
2833
- onPointerup: t[84] ||= (e) => Fn(e),
2834
- onTouchend: t[85] ||= (e) => Fn(e),
2835
- onTouchstart: t[86] ||= (e) => {
2836
- Hn(e), gn(e);
2837
- },
2838
- onPointermove: t[87] ||= (e) => {
2839
- Hn(e), An(e);
2840
- },
2841
- onPointerout: t[88] ||= (e) => wn(e),
2842
- onPointerover: t[89] ||= (e) => mn(e),
2843
- onClick: t[90] ||= (e) => gn(e),
2844
- style: v({
2845
- position: "absolute",
2846
- top: 0,
2847
- left: 0,
2848
- cursor: Zt.value,
2849
- fontFamily: "Helvetica",
2850
- zIndex: 1e8,
2851
- pointerEvents: Ot.value ? "all" : "none"
2852
- })
2853
- }, [m("rect", {
2854
- class: "annotator__glass",
2855
- x: "0",
2856
- y: "0",
2857
- width: Nt.value,
2858
- height: Mt.value,
2859
- fill: "transparent",
2860
- "pointer-events": Ot.value ? "all" : "none",
2861
- style: { cursor: "inherit" },
2862
- onPointerdown: t[79] ||= me((e) => En(e), ["stop", "prevent"]),
2863
- onPointermove: t[80] ||= me((e) => {
2864
- Hn(e), An(e);
2865
- }, ["stop", "prevent"]),
2866
- onPointerup: me(Fn, ["stop", "prevent"]),
2867
- onClick: t[81] ||= me(() => {}, ["stop", "prevent"])
2868
- }, null, 40, pt), (y(!0), p(ne, null, se(rn.value, (e) => (y(), p("g", {
2869
- key: e.id,
2870
- innerHTML: e.html,
2871
- onClick: t[82] ||= (e) => {
2872
- jn(e), j.value = !1;
2873
- }
2874
- }, null, 8, mt))), 128))], 46, ft)) : f("", !0),
2875
- Dt.value || le(vt) ? (y(), p("svg", {
2876
- key: 1,
2877
- style: {
2878
- position: "absolute",
2879
- top: "0",
2880
- left: "0"
2881
- },
2882
- height: Rt.value,
2883
- viewBox: `0 0 ${Nt.value} ${Mt.value}`,
2884
- width: Lt.value,
2885
- "data-dom-to-png-ignore": ""
2886
- }, [m("circle", {
2887
- class: "animated-circle-print",
2888
- cx: Nt.value / 2,
2889
- cy: Mt.value / 2,
2890
- r: "50",
2891
- stroke: "#6376DD",
2892
- "stroke-width": "10",
2893
- fill: "none"
2894
- }, null, 8, gt)], 8, ht)) : f("", !0)
2895
- ], 8, dt)]));
2896
- }
2897
- }, [["__scopeId", "data-v-3a11f6f4"]]);
2898
- //#endregion
2899
- export { _e as n, vt as t };