vue-data-ui 3.22.13 → 3.23.0

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 (224) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +13 -1
  3. package/dist/{Arrow-DKx74WtM.js → Arrow-o2qHNvrC.js} +1 -1
  4. package/dist/{BaseDraggableDialog-3n8udWmh.js → BaseDraggableDialog-qTnfhLBz.js} +2 -2
  5. package/dist/{BaseIcon-CP5RWnqt.js → BaseIcon-91MZoczJ.js} +4 -3
  6. package/dist/{BaseLegendToggle-DsWphmIb.js → BaseLegendToggle-CtAPwzr2.js} +1 -1
  7. package/dist/{BaseZoomControls-C9_ygNN4.js → BaseZoomControls-rdzlicuz.js} +2 -2
  8. package/dist/{ColorPicker-3N_HVgXs.js → ColorPicker-CIAkdPrj.js} +2 -2
  9. package/dist/{DataTable-DzPEVvSo.js → DataTable-D4tM9s5Y.js} +2 -2
  10. package/dist/HillActions-BWhxHlrj.js +187 -0
  11. package/dist/{Legend-C0xAnJdO.js → Legend-CQTRlzK-.js} +2 -2
  12. package/dist/{NonSvgPenAndPaper-B_mE5UbR.js → NonSvgPenAndPaper-Cawacw1W.js} +19 -19
  13. package/dist/{PackageVersion-B6Hokxw9.js → PackageVersion--QCMh5k_.js} +1 -1
  14. package/dist/{PenAndPaper-CSMVXpg2.js → PenAndPaper-cE4J8-rA.js} +11 -11
  15. package/dist/{Shape-BfnXr1nJ.js → Shape-BPMV94Ij.js} +3 -3
  16. package/dist/{Slicer-C6qNUmZ4.js → Slicer-5yIrdoJv.js} +15 -15
  17. package/dist/SlicerPreview-DvjLV2TW.js +1689 -0
  18. package/dist/{SparkTooltip-uoUiL_P8.js → SparkTooltip-BaYtEKS6.js} +6 -6
  19. package/dist/Title-BODtwViI.js +87 -0
  20. package/dist/{Tooltip-CA1rtSyl.js → Tooltip-CMTGxeYO.js} +1 -1
  21. package/dist/{UserOptions-DzAFK9cY.js → UserOptions-3ujTo3LD.js} +2 -2
  22. package/dist/components/arrow.js +1 -1
  23. package/dist/components/vue-ui-3d-bar.js +1 -1
  24. package/dist/components/vue-ui-accordion.js +1 -1
  25. package/dist/components/vue-ui-age-pyramid.js +1 -1
  26. package/dist/components/vue-ui-annotator.js +1 -1
  27. package/dist/components/vue-ui-bullet.js +1 -1
  28. package/dist/components/vue-ui-bump.js +1 -1
  29. package/dist/components/vue-ui-candlestick.js +1 -1
  30. package/dist/components/vue-ui-carousel-table.js +1 -1
  31. package/dist/components/vue-ui-chestnut.js +1 -1
  32. package/dist/components/vue-ui-chord.js +1 -1
  33. package/dist/components/vue-ui-circle-pack.js +1 -1
  34. package/dist/components/vue-ui-cursor.js +1 -1
  35. package/dist/components/vue-ui-dag.js +1 -1
  36. package/dist/components/vue-ui-dashboard.js +1 -1
  37. package/dist/components/vue-ui-digits.js +1 -1
  38. package/dist/components/vue-ui-donut-evolution.js +1 -1
  39. package/dist/components/vue-ui-donut.js +1 -1
  40. package/dist/components/vue-ui-dumbbell.js +1 -1
  41. package/dist/components/vue-ui-flow.js +1 -1
  42. package/dist/components/vue-ui-funnel.js +1 -1
  43. package/dist/components/vue-ui-galaxy.js +1 -1
  44. package/dist/components/vue-ui-gauge.js +1 -1
  45. package/dist/components/vue-ui-geo.js +1 -1
  46. package/dist/components/vue-ui-gizmo.js +1 -1
  47. package/dist/components/vue-ui-heatmap.js +1 -1
  48. package/dist/components/vue-ui-hill.js +2 -0
  49. package/dist/components/vue-ui-history-plot.js +1 -1
  50. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  51. package/dist/components/vue-ui-icon.js +1 -1
  52. package/dist/components/vue-ui-kpi.js +1 -1
  53. package/dist/components/vue-ui-mini-loader.js +1 -1
  54. package/dist/components/vue-ui-molecule.js +1 -1
  55. package/dist/components/vue-ui-mood-radar.js +1 -1
  56. package/dist/components/vue-ui-nested-donuts.js +1 -1
  57. package/dist/components/vue-ui-onion.js +1 -1
  58. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  59. package/dist/components/vue-ui-quadrant.js +1 -1
  60. package/dist/components/vue-ui-quick-chart.js +1 -1
  61. package/dist/components/vue-ui-radar.js +1 -1
  62. package/dist/components/vue-ui-rating.js +1 -1
  63. package/dist/components/vue-ui-relation-circle.js +1 -1
  64. package/dist/components/vue-ui-ridgeline.js +1 -1
  65. package/dist/components/vue-ui-rings.js +1 -1
  66. package/dist/components/vue-ui-scatter.js +1 -1
  67. package/dist/components/vue-ui-skeleton.js +1 -1
  68. package/dist/components/vue-ui-smiley.js +1 -1
  69. package/dist/components/vue-ui-spark-trend.js +1 -1
  70. package/dist/components/vue-ui-sparkbar.js +1 -1
  71. package/dist/components/vue-ui-sparkgauge.js +1 -1
  72. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  73. package/dist/components/vue-ui-sparkline.js +1 -1
  74. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  75. package/dist/components/vue-ui-stackbar.js +1 -1
  76. package/dist/components/vue-ui-stackline.js +1 -1
  77. package/dist/components/vue-ui-strip-plot.js +1 -1
  78. package/dist/components/vue-ui-table-heatmap.js +1 -1
  79. package/dist/components/vue-ui-table-sparkline.js +1 -1
  80. package/dist/components/vue-ui-table.js +1 -1
  81. package/dist/components/vue-ui-thermometer.js +1 -1
  82. package/dist/components/vue-ui-timer.js +1 -1
  83. package/dist/components/vue-ui-tiremarks.js +1 -1
  84. package/dist/components/vue-ui-treemap.js +1 -1
  85. package/dist/components/vue-ui-vertical-bar.js +1 -1
  86. package/dist/components/vue-ui-waffle.js +1 -1
  87. package/dist/components/vue-ui-wheel.js +1 -1
  88. package/dist/components/vue-ui-word-cloud.js +1 -1
  89. package/dist/components/vue-ui-world.js +1 -1
  90. package/dist/components/vue-ui-xy-canvas.js +1 -1
  91. package/dist/components/vue-ui-xy.js +1 -1
  92. package/dist/{dom-to-png-BdAFKZQg.js → dom-to-png-4tdMNGPX.js} +1 -1
  93. package/dist/exposedLib-DWLRqRhv.js +25 -0
  94. package/dist/{img-Bikk1dGb.js → img-DIQG5q8T.js} +1 -1
  95. package/dist/{labelUtils-BUhssos9.js → labelUtils-C5lnc_xc.js} +1 -1
  96. package/dist/{lib-CFm_J26b.js → lib-BuMGJ_a0.js} +216 -173
  97. package/dist/{package-DmDydylu.js → package-BMc_ZieJ.js} +1 -1
  98. package/dist/{pdf-zmz3l2uy.js → pdf-Cnz4NKM9.js} +1 -1
  99. package/dist/{render-common-BIG8JYGK.js → render-common-Ktg2LZFG.js} +21 -21
  100. package/dist/ssr/vue-ui-donut.js +1 -1
  101. package/dist/ssr/vue-ui-xy.js +1 -1
  102. package/dist/ssr.js +2 -2
  103. package/dist/style.css +1 -1
  104. package/dist/types/vue-data-ui.d.ts +493 -0
  105. package/dist/types/vue-ui-hill.d.ts +90 -0
  106. package/dist/useAutoSizeLabelsInsideViewbox-DvDwcwi_.js +122 -0
  107. package/dist/{useConfig-C0V0eG7L.js → useConfig-BilxnBNr.js} +767 -476
  108. package/dist/useHints-Dq_w2E8B.js +66 -0
  109. package/dist/{useNestedProp-BY6DNN3i.js → useNestedProp--NSEmhOH.js} +1 -1
  110. package/dist/{useObjectBindings-Djwpii4d.js → useObjectBindings-Cwq7NcQz.js} +3 -2
  111. package/dist/{usePrinter-BH-xle1O.js → usePrinter-BFvi4jVy.js} +2 -2
  112. package/dist/useTransitions-g_zBREk2.js +39 -0
  113. package/dist/utils.js +14 -14
  114. package/dist/{vue-data-ui-rkzh6EkO.js → vue-data-ui-EsawKe_W.js} +85 -81
  115. package/dist/vue-data-ui.js +77 -76
  116. package/dist/vue-ui-3d-bar-RSUS2xpL.js +1849 -0
  117. package/dist/{vue-ui-accordion-UA88lv4d.js → vue-ui-accordion-61MlW-Ge.js} +4 -4
  118. package/dist/vue-ui-age-pyramid-CgnPWA93.js +1263 -0
  119. package/dist/vue-ui-annotator-DBRT85HG.js +2913 -0
  120. package/dist/vue-ui-bullet-Bc3-WaN1.js +724 -0
  121. package/dist/{vue-ui-bump-BS7RCf0Z.js → vue-ui-bump-Dvv3iSKr.js} +332 -295
  122. package/dist/{vue-ui-candlestick-BZSGDKrM.js → vue-ui-candlestick-DvvsrIdp.js} +464 -440
  123. package/dist/vue-ui-carousel-table-DtsNVim8.js +463 -0
  124. package/dist/vue-ui-chestnut-ArloORzP.js +2068 -0
  125. package/dist/{vue-ui-chord-D6G7ceE-.js → vue-ui-chord-xX5gWZy8.js} +430 -424
  126. package/dist/vue-ui-circle-pack-D8wykmqg.js +1638 -0
  127. package/dist/{vue-ui-cursor-BpN5MsXM.js → vue-ui-cursor-CxgE6Phh.js} +61 -61
  128. package/dist/{vue-ui-dag-BzgOgXzU.js → vue-ui-dag-C9Sf9vH7.js} +924 -916
  129. package/dist/vue-ui-dashboard-bGmaglAj.js +520 -0
  130. package/dist/{vue-ui-digits-OMPrn8fb.js → vue-ui-digits-DgDE-_Fn.js} +58 -50
  131. package/dist/vue-ui-donut-B_n6wF6B.js +2440 -0
  132. package/dist/{vue-ui-donut-Cp5NbZ1r.js → vue-ui-donut-Bmo149AR.js} +113 -113
  133. package/dist/{vue-ui-donut-evolution-DHVi5rOn.js → vue-ui-donut-evolution-D6vH_hfx.js} +528 -447
  134. package/dist/vue-ui-dumbbell-BX4Ao_wR.js +1582 -0
  135. package/dist/{vue-ui-flow-BusUK3H0.js → vue-ui-flow-Bshw8pT_.js} +415 -407
  136. package/dist/vue-ui-funnel-CjYosIik.js +797 -0
  137. package/dist/vue-ui-galaxy-CvXgy-dy.js +1111 -0
  138. package/dist/vue-ui-gauge-CByT0_vF.js +953 -0
  139. package/dist/{vue-ui-geo-CyFgFKlh.js → vue-ui-geo-C-gSZL2q.js} +378 -363
  140. package/dist/{vue-ui-gizmo-DdeXwCQp.js → vue-ui-gizmo-CJdxyPID.js} +57 -49
  141. package/dist/{vue-ui-heatmap-D8-qJ7fg.js → vue-ui-heatmap-DEEKv8ip.js} +498 -490
  142. package/dist/vue-ui-hill-D7LYAgAL.js +1768 -0
  143. package/dist/{vue-ui-history-plot-C2Aqk2ON.js → vue-ui-history-plot-BhcU94Pt.js} +553 -556
  144. package/dist/vue-ui-horizontal-bar-CfFye5tL.js +1733 -0
  145. package/dist/vue-ui-kpi-DCBnNfTb.js +104 -0
  146. package/dist/vue-ui-mini-loader-CtWpqnLW.js +133 -0
  147. package/dist/vue-ui-molecule-D3igGyOy.js +958 -0
  148. package/dist/{vue-ui-mood-radar-BiOjxFEN.js → vue-ui-mood-radar-sl6DMxqR.js} +349 -341
  149. package/dist/{vue-ui-nested-donuts-Cl1HVvDp.js → vue-ui-nested-donuts-aS4YzaB3.js} +449 -413
  150. package/dist/vue-ui-onion-EhPTZpW_.js +1258 -0
  151. package/dist/vue-ui-parallel-coordinate-plot-DE9wTmQQ.js +1455 -0
  152. package/dist/{vue-ui-quadrant-B21LkUc8.js → vue-ui-quadrant-SaY_RPSE.js} +625 -617
  153. package/dist/vue-ui-quick-chart-CJ9rejnj.js +2389 -0
  154. package/dist/{vue-ui-radar-CyzAyVos.js → vue-ui-radar-CaNen5Fj.js} +356 -310
  155. package/dist/vue-ui-rating--K7rX2an.js +360 -0
  156. package/dist/vue-ui-relation-circle-FLs8vOxQ.js +925 -0
  157. package/dist/vue-ui-ridgeline-Beg5hshN.js +1663 -0
  158. package/dist/{vue-ui-rings-FtcdX8xl.js → vue-ui-rings-BevKD8P-.js} +449 -423
  159. package/dist/{vue-ui-scatter-Cp_-2ahf.js → vue-ui-scatter-CNA7jF-o.js} +721 -702
  160. package/dist/{vue-ui-skeleton-COytVrfN.js → vue-ui-skeleton-B9ZP1w-i.js} +395 -387
  161. package/dist/{vue-ui-smiley-Da2jgkb7.js → vue-ui-smiley-DYnqqk6u.js} +128 -120
  162. package/dist/{vue-ui-spark-trend-DC2KUlEY.js → vue-ui-spark-trend-R0ebpg-G.js} +132 -117
  163. package/dist/{vue-ui-sparkbar-DdxQOFIF.js → vue-ui-sparkbar-DYC3By0v.js} +119 -111
  164. package/dist/{vue-ui-sparkgauge-DTA-fORH.js → vue-ui-sparkgauge-Bw6no-In.js} +76 -68
  165. package/dist/vue-ui-sparkhistogram-DvRKy8rq.js +590 -0
  166. package/dist/{vue-ui-sparkline-DcR_N-zT.js → vue-ui-sparkline-Dz1uzBos.js} +389 -364
  167. package/dist/vue-ui-sparkstackbar-DlnPdZih.js +692 -0
  168. package/dist/vue-ui-stackbar-B-THcavY.js +2350 -0
  169. package/dist/vue-ui-stackline-3dBPoI0h.js +2464 -0
  170. package/dist/{vue-ui-strip-plot-NLCwYvyw.js → vue-ui-strip-plot-ACeYOoHj.js} +505 -484
  171. package/dist/vue-ui-table-heatmap-DVwMqzje.js +364 -0
  172. package/dist/{vue-ui-table-AM9brdwU.js → vue-ui-table-rFy16bp0.js} +512 -504
  173. package/dist/{vue-ui-table-sparkline-BE6DAvur.js → vue-ui-table-sparkline-CABJzK8p.js} +207 -181
  174. package/dist/vue-ui-thermometer-CVQ-H69Q.js +777 -0
  175. package/dist/{vue-ui-timer-BZM5ITG9.js → vue-ui-timer-Bm8LpsnI.js} +66 -58
  176. package/dist/{vue-ui-tiremarks-BCncDpHX.js → vue-ui-tiremarks-DB3f5qiz.js} +127 -119
  177. package/dist/vue-ui-treemap-DP0Sx8Y8.js +1760 -0
  178. package/dist/vue-ui-waffle-iPpdk1Bm.js +1412 -0
  179. package/dist/vue-ui-wheel-BJkEYfLj.js +892 -0
  180. package/dist/{vue-ui-word-cloud-D7R7nhk1.js → vue-ui-word-cloud-B2sxtel9.js} +440 -432
  181. package/dist/{vue-ui-world-DZBt-07p.js → vue-ui-world-BBQZLnzm.js} +343 -335
  182. package/dist/vue-ui-xy-ChZg7AtI.js +1364 -0
  183. package/dist/{vue-ui-xy-CluEZ7lS.js → vue-ui-xy-DZj5DT-q.js} +1633 -1587
  184. package/dist/{vue-ui-xy-canvas-7YSYRdwr.js → vue-ui-xy-canvas-BN2u0bOJ.js} +456 -430
  185. package/dist/vue_ui_hill-dnltu0L-.js +368 -0
  186. package/package.json +2 -2
  187. package/dist/SlicerPreview-Cw6WMVhG.js +0 -1689
  188. package/dist/Title-BuPs74IB.js +0 -87
  189. package/dist/exposedLib-Ciw6TGtP.js +0 -25
  190. package/dist/useAutoSizeLabelsInsideViewbox-C9RNjsGv.js +0 -50
  191. package/dist/useMountedDelay-BAjrhRJb.js +0 -14
  192. package/dist/vue-ui-3d-bar-D5xHEWr1.js +0 -1824
  193. package/dist/vue-ui-age-pyramid-CAJg01c7.js +0 -1246
  194. package/dist/vue-ui-annotator-q3ZKx6ua.js +0 -2905
  195. package/dist/vue-ui-bullet-ByeaWGfI.js +0 -709
  196. package/dist/vue-ui-carousel-table-DO5NRXvX.js +0 -455
  197. package/dist/vue-ui-chestnut-BfeSPeEh.js +0 -2042
  198. package/dist/vue-ui-circle-pack-Cqmlw7AV.js +0 -1610
  199. package/dist/vue-ui-dashboard-DLvGJXJY.js +0 -512
  200. package/dist/vue-ui-donut-ZIRebAWc.js +0 -2418
  201. package/dist/vue-ui-dumbbell-gDYjU2oF.js +0 -1564
  202. package/dist/vue-ui-funnel-BtaYaU0r.js +0 -781
  203. package/dist/vue-ui-galaxy-BMp-HzDh.js +0 -1076
  204. package/dist/vue-ui-gauge-CBou0cFE.js +0 -925
  205. package/dist/vue-ui-horizontal-bar-BuwxI7d1.js +0 -1689
  206. package/dist/vue-ui-kpi-ByxoO01r.js +0 -96
  207. package/dist/vue-ui-mini-loader-D9pprk2c.js +0 -125
  208. package/dist/vue-ui-molecule-BqJJq49_.js +0 -932
  209. package/dist/vue-ui-onion-CRQOxurS.js +0 -1199
  210. package/dist/vue-ui-parallel-coordinate-plot-Dhn18RtR.js +0 -1412
  211. package/dist/vue-ui-quick-chart-DAhSXYnp.js +0 -2443
  212. package/dist/vue-ui-rating-DbxK-ftN.js +0 -352
  213. package/dist/vue-ui-relation-circle-Cb33DMZo.js +0 -917
  214. package/dist/vue-ui-ridgeline-D7aArzQk.js +0 -1627
  215. package/dist/vue-ui-sparkhistogram-D1oFTrvt.js +0 -575
  216. package/dist/vue-ui-sparkstackbar-BlFio0lP.js +0 -674
  217. package/dist/vue-ui-stackbar-Cu13EdVa.js +0 -2322
  218. package/dist/vue-ui-stackline-DKL0o_-3.js +0 -2427
  219. package/dist/vue-ui-table-heatmap-CSI482KG.js +0 -338
  220. package/dist/vue-ui-thermometer-D6Czx7Fb.js +0 -769
  221. package/dist/vue-ui-treemap-BOEYCOdk.js +0 -1727
  222. package/dist/vue-ui-waffle-BrM8IHdG.js +0 -1367
  223. package/dist/vue-ui-wheel-BNsajigQ.js +0 -884
  224. package/dist/vue-ui-xy-Dt_1bSBT.js +0 -1364
@@ -1,2905 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { K as t, Mt as n, S as r, qt as i } from "./lib-CFm_J26b.js";
3
- import { t as a } from "./useConfig-C0V0eG7L.js";
4
- import { t as o } from "./usePrinter-BH-xle1O.js";
5
- import { t as s } from "./dom-to-png-BdAFKZQg.js";
6
- import { t as c } from "./_plugin-vue_export-helper-B3ysoDQm.js";
7
- import { t as l } from "./BaseIcon-CP5RWnqt.js";
8
- import { t as ee } from "./vue-ui-accordion-UA88lv4d.js";
9
- import { t as te } from "./ColorPicker-3N_HVgXs.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(t()), { 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 = n, 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 ? r(i({
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
- if (!e) return;
848
- i.undo -= a(e);
849
- let t = o();
850
- l("redo", t), s(e), c();
851
- },
852
- redo() {
853
- let e = r.redo.pop();
854
- if (!e) return;
855
- i.redo -= a(e);
856
- let t = o();
857
- l("undo", t), s(e), c();
858
- },
859
- size() {
860
- return {
861
- undo: r.undo.length,
862
- redo: r.redo.length,
863
- approxBytes: {
864
- undo: i.undo,
865
- redo: i.redo
866
- }
867
- };
868
- }
869
- };
870
- }
871
- function un() {
872
- if (!Ut.value) return;
873
- let e = Ut.value.getBoundingClientRect();
874
- G.value = {
875
- x: e.left + e.width / 2,
876
- y: e.top
877
- };
878
- }
879
- function Q(e, t, n = "top") {
880
- W.value = e, Ut.value = t.currentTarget || t.target, un(), U.value = !0, window.addEventListener("scroll", un, !0), window.addEventListener("resize", un, { passive: !0 });
881
- }
882
- function $() {
883
- U.value = !1, W.value = null, Ut.value = null, window.removeEventListener("scroll", un, !0), window.removeEventListener("resize", un);
884
- }
885
- function dn(e) {
886
- let t = e?.target && e.target.id || E.value && E.value.id, n = z.value.find((e) => e.id === t);
887
- if (!n) {
888
- Ht.value = null;
889
- return;
890
- }
891
- I.value = n;
892
- let r = L.value.x, i = L.value.y;
893
- switch (n.type) {
894
- case "rect":
895
- case "circle":
896
- case "text":
897
- Ht.value = {
898
- dx: r - n.x,
899
- dy: i - n.y
900
- };
901
- break;
902
- case "arrow":
903
- Ht.value = {
904
- dx: r - n.x,
905
- dy: i - n.y,
906
- endDx: r - n.endX,
907
- endDy: i - n.endY
908
- };
909
- break;
910
- case "group":
911
- Ht.value = {
912
- dx: r - (n.x || 0),
913
- dy: i - (n.y || 0)
914
- };
915
- break;
916
- default:
917
- Ht.value = {
918
- dx: 0,
919
- dy: 0
920
- };
921
- break;
922
- }
923
- }
924
- function fn(e) {
925
- let t = z.value.find((e) => e.id === I.value.id);
926
- switch (!0) {
927
- case e === "front":
928
- z.value = z.value.filter((e) => e.id !== t.id), z.value.push(t);
929
- break;
930
- case e === "back":
931
- z.value = z.value.filter((e) => e.id !== t.id), z.value = [t, ...z.value];
932
- break;
933
- default: return;
934
- }
935
- }
936
- function pn() {
937
- if (!I.value?.id) return;
938
- let e = {
939
- ...I.value,
940
- id: `${I.value.id}_copy_${t()}`,
941
- x: I.value.x - 100 < 0 ? 1 : I.value.x - 100,
942
- y: I.value.y - 100 < 0 ? 1 : I.value.y - 100
943
- };
944
- z.value.push(e);
945
- }
946
- function mn(e) {
947
- e.preventDefault(), At.value = !1, e.target && e.target.id && (D.value = e.target.id);
948
- }
949
- function hn() {
950
- !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));
951
- }
952
- function gn(e) {
953
- if (k.value) return;
954
- e.preventDefault(), e.stopPropagation(), hn(), P.value ? (F.value = !0, V.value = !0) : (F.value = !1, V.value = !1, P.value = !1);
955
- let n = `text_${t()}`;
956
- if (F.value) {
957
- K.value?.begin(), z.value.push({
958
- id: n,
959
- type: "text",
960
- lines: 0,
961
- x: L.value.x,
962
- y: L.value.y,
963
- textContent: "",
964
- fontSize: Z(zt.value),
965
- textAlign: Z(H.value),
966
- isBold: Z(xt.value),
967
- isItalic: Z(Tt.value),
968
- isUnderline: Z(kt.value),
969
- color: Z(Pt.value),
970
- isBulletTextMode: Z(O.value)
971
- }), E.value = z.value.at(-1), I.value = z.value.at(-1), K.value?.end();
972
- return;
973
- }
974
- let r = () => {
975
- St.value = z.value.find((t) => t.id === e.target.id).isDash;
976
- }, i = () => {
977
- bt.value = z.value.find((t) => t.id === e.target.id).strokeWidth;
978
- };
979
- if (N.value = !1, e.target.id.includes("arrow")) {
980
- w.value = "arrow", r(), i();
981
- return;
982
- }
983
- if (e.target.id.includes("circle")) {
984
- w.value = "circle", B.value.circle.filled = z.value.find((t) => t.id === e.target.id).isFilled, r(), i();
985
- return;
986
- }
987
- if (e.target.id.includes("rect")) {
988
- w.value = "rect", B.value.rect.filled = z.value.find((t) => t.id === e.target.id).isFilled, r(), i();
989
- return;
990
- }
991
- if (e.target.id.includes("line")) {
992
- w.value = "line", i();
993
- return;
994
- }
995
- if (e.target.id.includes("text")) {
996
- P.value = !0, F.value = !0, V.value = !0;
997
- let t = z.value.find((t) => t.id === e.target.id);
998
- 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);
999
- return;
1000
- }
1001
- }
1002
- function _n(e) {
1003
- !I.value || I.value.type !== "text" || (I.value.textAlign = e);
1004
- }
1005
- function vn() {
1006
- K.value?.undo?.();
1007
- }
1008
- function yn() {
1009
- K.value?.redo?.();
1010
- }
1011
- let bn = [
1012
- 16,
1013
- 17,
1014
- 18,
1015
- 20,
1016
- 27,
1017
- 33,
1018
- 34,
1019
- 35,
1020
- 36,
1021
- 37,
1022
- 38,
1023
- 39,
1024
- 40,
1025
- 45,
1026
- 91,
1027
- 112,
1028
- 113,
1029
- 114,
1030
- 115,
1031
- 116,
1032
- 117,
1033
- 118,
1034
- 119,
1035
- 120,
1036
- 121,
1037
- 122,
1038
- 123,
1039
- 221,
1040
- 255,
1041
- "Unidentified"
1042
- ];
1043
- function xn(e) {
1044
- if (At.value) return;
1045
- e.preventDefault();
1046
- let t = e.keyCode;
1047
- if (!F.value) return;
1048
- V.value = !0;
1049
- let n;
1050
- 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) {
1051
- case [8, 46].includes(t):
1052
- n.textContent = n.textContent.slice(0, -1);
1053
- break;
1054
- case t === 9:
1055
- n.textContent += "&nbsp; &nbsp; &nbsp; &nbsp;";
1056
- break;
1057
- case t === 13:
1058
- n.lines += 1, n.textContent += "‎";
1059
- return;
1060
- case bn.includes(t): return;
1061
- default: n.textContent += e.key;
1062
- }
1063
- }
1064
- function Sn() {
1065
- if (R.value = [], w.value !== "group") {
1066
- N.value = !1, z.value = z.value.filter((e) => e.type !== "group");
1067
- return;
1068
- }
1069
- let e = z.value.at(-1);
1070
- if (z.value.forEach((t) => {
1071
- if (t.type !== "group") switch (!0) {
1072
- case t.type === "arrow":
1073
- 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;
1074
- (n || r || i || a) && R.value.push(t);
1075
- break;
1076
- case t.type === "circle":
1077
- 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);
1078
- break;
1079
- case t.type === "rect":
1080
- 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);
1081
- break;
1082
- case t.type === "text":
1083
- e.x <= t.x && e.y <= t.y && R.value.push(t);
1084
- break;
1085
- default: break;
1086
- }
1087
- }), R.value = R.value.map((t) => ({
1088
- ...t,
1089
- id: e.id,
1090
- oldId: t.id,
1091
- diffX: t.x - e.x,
1092
- diffY: t.y - e.y,
1093
- diffEndX: t.endX ? t.endX - e.x : 0,
1094
- diffEndY: t.endY ? t.endY - e.y : 0
1095
- })), e.source = R.value, R.value.length > 1) {
1096
- let n = Z(R.value).map((e) => e.oldId);
1097
- z.value = z.value.filter((e) => !n.includes(e.id)), R.value.forEach((n) => {
1098
- switch (!0) {
1099
- case n.type === "circle":
1100
- e.content += `
1101
- <circle
1102
- id="${n.id}"
1103
- cx="${n.x}"
1104
- cy="${n.y}"
1105
- r="${n.circleRadius ? n.circleRadius : Number.MIN_VALUE}"
1106
- fill="${n.isFilled ? n.color + n.alpha : "rgba(255,255,255,0.001)"}"
1107
- stroke="${n.color + n.alpha}"
1108
- stroke-width="${n.strokeWidth}"
1109
- style="${n.isDash ? `stroke-dasharray: ${n.strokeWidth * 3}` : ""}"
1110
- />
1111
- `;
1112
- break;
1113
- case n.type === "rect":
1114
- e.content += `
1115
- <rect
1116
- id="${M.value ? "" : n.id}"
1117
- x="${n.x}"
1118
- y="${n.y}"
1119
- fill="${n.isFilled ? n.color + n.alpha : "rgba(255,255,255,0.001)"}"
1120
- height="${n.rectHeight}"
1121
- width="${n.rectWidth}"
1122
- stroke="${n.color + n.alpha}"
1123
- stroke-width="${n.strokeWidth}"
1124
- style="rx:1 !important; ry:1 !important; ${n.isDash ? `stroke-dasharray: ${n.strokeWidth * 3}` : ""}"
1125
- />
1126
- `;
1127
- break;
1128
- case n.type === "arrow":
1129
- let r = n.strokeWidth > 3 ? 5 : 10, i = n.strokeWidth > 3 ? 2.5 : 5, a = t();
1130
- e.content += `
1131
- <g id="${n.id}">
1132
- <defs>
1133
- <marker
1134
- id="${a}"
1135
- markerWidth="${r}"
1136
- markerHeight="${r}"
1137
- refX="0"
1138
- refY="${i}"
1139
- orient="auto"
1140
- >
1141
- <polygon
1142
- points="0 0,${r} ${i}, 0 ${r}"
1143
- fill="${n.color}"
1144
- />
1145
- </marker>
1146
- </defs>
1147
-
1148
- <path
1149
- style="stroke-linecap: round !important; ${n.isDash ? `stroke-dasharray: ${n.strokeWidth * 3}` : ""}"
1150
- stroke="${n.color}"
1151
- id="${n.id}"
1152
- d="M${n.x},${n.y} ${n.endX},${n.endY}"
1153
- stroke-width="${n.strokeWidth}"
1154
- marker-end="url(#${a})"
1155
- />
1156
- </g>
1157
- `;
1158
- break;
1159
- case n.type === "text":
1160
- let o = n.textContent.split("‎"), s = [];
1161
- for (let e = 0; e < o.length; e += 1) s.push(`
1162
- ${n.isBulletTextMode ? `<tspan x="${n.x - n.fontSize}" y="${n.y + n.fontSize * e}" id="${n.id}" font-size="${n.fontSize / 2}">⬤</tspan>` : ""}
1163
- <tspan id="${n.id}" x="${n.x}" y="${n.y + n.fontSize * e}">
1164
- ${o[e]}
1165
- </tspan>`);
1166
- e.content += `
1167
- ${nn(n, s, n.isBulletTextMode)}
1168
- `;
1169
- break;
1170
- default: break;
1171
- }
1172
- });
1173
- } else z.value = z.value.filter((t) => t.id !== e.id);
1174
- }
1175
- function Cn(e) {
1176
- e.content = "";
1177
- let n = e.x || 0, r = e.y || 0;
1178
- (e.source || []).forEach((i) => {
1179
- switch (i.type) {
1180
- case "circle": {
1181
- let t = n + i.diffX, a = r + i.diffY;
1182
- e.content += `
1183
- <circle
1184
- id="${i.id}"
1185
- cx="${t}"
1186
- cy="${a}"
1187
- r="${i.circleRadius ? i.circleRadius : Number.MIN_VALUE}"
1188
- fill="${i.isFilled ? i.color + i.alpha : "rgba(255,255,255,0.001)"}"
1189
- stroke="${i.color + i.alpha}"
1190
- stroke-width="${i.strokeWidth}"
1191
- style="${i.isDash ? `stroke-dasharray: ${i.strokeWidth * 3}` : ""}"
1192
- />
1193
- `;
1194
- break;
1195
- }
1196
- case "rect": {
1197
- let t = n + i.diffX, a = r + i.diffY;
1198
- e.content += `
1199
- <rect
1200
- id="${M.value ? "" : i.id}"
1201
- x="${t}"
1202
- y="${a}"
1203
- fill="${i.isFilled ? i.color + i.alpha : "rgba(255,255,255,0.001)"}"
1204
- height="${i.rectHeight}"
1205
- width="${i.rectWidth}"
1206
- stroke="${i.color + i.alpha}"
1207
- stroke-width="${i.strokeWidth}"
1208
- style="rx:1 !important; ry:1 !important; ${i.isDash ? `stroke-dasharray: ${i.strokeWidth * 3}` : ""}"
1209
- />
1210
- `;
1211
- break;
1212
- }
1213
- case "arrow": {
1214
- let a = n + i.diffX, o = r + i.diffY, s = n + i.diffEndX, c = r + i.diffEndY, l = i.strokeWidth > 3 ? 5 : 10, ee = i.strokeWidth > 3 ? 2.5 : 5, te = `m_${i.id}_${t()}`;
1215
- e.content += `
1216
- <g id="${i.id}">
1217
- <defs>
1218
- <marker
1219
- id="${te}"
1220
- markerWidth="${l}"
1221
- markerHeight="${l}"
1222
- refX="0"
1223
- refY="${ee}"
1224
- orient="auto">
1225
- <polygon points="0 0,${l} ${ee}, 0 ${l}" fill="${i.color}" />
1226
- </marker>
1227
- </defs>
1228
- <path
1229
- style="stroke-linecap: round !important; ${i.isDash ? `stroke-dasharray: ${i.strokeWidth * 3}` : ""}"
1230
- stroke="${i.color}"
1231
- id="${i.id}"
1232
- d="M${a},${o} ${s},${c}"
1233
- stroke-width="${i.strokeWidth}"
1234
- marker-end="url(#${te})"
1235
- />
1236
- </g>
1237
- `;
1238
- break;
1239
- }
1240
- case "text": {
1241
- let t = (i.textContent || "").split("‎").map((e, t) => `
1242
- ${i.isBulletTextMode ? `<tspan x="${n + i.diffX - i.fontSize}" y="${r + i.diffY + i.fontSize * t}" id="${i.id}" font-size="${i.fontSize / 2}">⬤</tspan>` : ""}
1243
- <tspan id="${i.id}" x="${n + i.diffX}" y="${r + i.diffY + i.fontSize * t}">
1244
- ${e}
1245
- </tspan>
1246
- `).join("");
1247
- e.content += `
1248
- <g id="${i.id}">
1249
- <text
1250
- style="user-select:none; height:100px;"
1251
- id="${i.id}"
1252
- x="${n + i.diffX}"
1253
- y="${r + i.diffY}"
1254
- text-anchor="${i.textAlign}"
1255
- font-size="${i.fontSize}"
1256
- fill="${i.color}"
1257
- font-weight="${i.isBold ? "bold" : "normal"}"
1258
- font-style="${i.isItalic ? "italic" : "normal"}"
1259
- text-decoration="${i.isUnderline ? "underline" : "none"}">
1260
- ${t}
1261
- </text>
1262
- </g>
1263
- `;
1264
- break;
1265
- }
1266
- default: break;
1267
- }
1268
- });
1269
- }
1270
- function wn(e) {
1271
- e.relatedTarget && X.value && X.value.contains(e.relatedTarget) || (At.value = !0, D.value = void 0);
1272
- }
1273
- function Tn() {
1274
- if (Ct.value = !0, !w.value && !N.value || !Ct.value) return;
1275
- wt.value = !0, T.value.start = {
1276
- x: L.value.x,
1277
- y: L.value.y
1278
- };
1279
- let e = `${N.value ? "group" : w.value}_${t()}`;
1280
- switch (!0) {
1281
- case w.value === "arrow":
1282
- z.value.push({
1283
- id: e,
1284
- x: L.value.x,
1285
- y: L.value.y,
1286
- endX: L.value.x,
1287
- endY: L.value.y,
1288
- type: w.value,
1289
- color: Z(Pt.value),
1290
- strokeWidth: Z(Math.abs(bt.value)),
1291
- isDash: Z(St.value)
1292
- }), I.value = z.value.at(-1);
1293
- break;
1294
- case w.value === "circle":
1295
- z.value.push({
1296
- alpha: B.value.circle.filled ? Xt.value : "",
1297
- id: e,
1298
- color: Z(Pt.value),
1299
- isFilled: Z(B.value.circle.filled),
1300
- circleRadius: Z(B.value.circle.radius),
1301
- circleStrokeWidth: Z(B.value.circle.strokeWidth),
1302
- type: w.value,
1303
- x: L.value.x,
1304
- y: L.value.y,
1305
- strokeWidth: Z(Math.abs(bt.value)),
1306
- isDash: Z(St.value)
1307
- }), I.value = z.value.at(-1);
1308
- break;
1309
- case w.value === "line":
1310
- z.value.push({
1311
- alpha: Z(Xt.value),
1312
- id: e,
1313
- x: L.value.x,
1314
- y: L.value.y,
1315
- type: w.value,
1316
- color: Z(Pt.value),
1317
- strokeWidth: Z(Math.abs(bt.value)),
1318
- isDash: Z(St.value),
1319
- path: `${L.value.x} ${L.value.y}`
1320
- }), I.value = z.value.at(-1);
1321
- break;
1322
- case w.value === "rect":
1323
- z.value.push({
1324
- alpha: B.value.rect.filled ? Xt.value : "",
1325
- id: e,
1326
- color: Z(Pt.value),
1327
- isFilled: Z(B.value.rect.filled),
1328
- rectStrokeWidth: Z(B.value.rect.strokeWidth),
1329
- rectHeight: Z(B.value.rect.height),
1330
- rectWidth: Z(B.value.rect.width),
1331
- type: w.value,
1332
- x: L.value.x,
1333
- y: L.value.y,
1334
- strokeWidth: Z(Math.abs(bt.value)),
1335
- isDash: Z(St.value)
1336
- }), I.value = z.value.at(-1);
1337
- break;
1338
- case w.value === "group":
1339
- z.value.push({
1340
- alpha: 1,
1341
- id: `group_${t()}`,
1342
- x: L.value.x,
1343
- y: L.value.y,
1344
- isFilled: !1,
1345
- rectHeight: Z(B.value.rect.height),
1346
- rectWidth: Z(B.value.rect.width),
1347
- rectStrokeWidth: 1,
1348
- type: "group",
1349
- color: "grey",
1350
- strokeWidth: 1,
1351
- isDash: !0,
1352
- content: ""
1353
- });
1354
- break;
1355
- default: break;
1356
- }
1357
- qt.value ||= requestAnimationFrame(on);
1358
- }
1359
- function En(e) {
1360
- if (k.value) {
1361
- Et.value = !1;
1362
- return;
1363
- }
1364
- if (e.preventDefault(), e.stopPropagation(), Et.value = !0, e.pointerId != null) {
1365
- try {
1366
- X.value?.setPointerCapture?.(e.pointerId);
1367
- } catch {}
1368
- Jt.value = e.pointerId;
1369
- } else Jt.value = null;
1370
- if ((A.value || j.value || M.value || N.value) && K.value?.begin?.(), A.value) {
1371
- Tn();
1372
- return;
1373
- }
1374
- if (j.value) {
1375
- let t = cn(e) || D.value || I.value?.id;
1376
- t && (sn(t), E.value = { id: t }), dn(e);
1377
- }
1378
- }
1379
- function Dn(e) {
1380
- if (!e || !e.id || e.type === "line" || !Ht.value && (dn({ target: { id: e.id } }), !Ht.value)) return;
1381
- let { dx: t, dy: n, endDx: r, endDy: i } = Ht.value, a = L.value.x, o = L.value.y;
1382
- switch (I.value = e, e.type) {
1383
- case "arrow":
1384
- e.x = a - t, e.y = o - n, e.endX = a - (r ?? t), e.endY = o - (i ?? n);
1385
- break;
1386
- case "circle":
1387
- e.x = a - t, e.y = o - n;
1388
- break;
1389
- case "rect":
1390
- e.x = a - t, e.y = o - n;
1391
- break;
1392
- case "text":
1393
- e.x = a - t, e.y = o - n;
1394
- break;
1395
- case "group":
1396
- e.x = a - t, e.y = o - n, Cn(e);
1397
- break;
1398
- default: break;
1399
- }
1400
- }
1401
- function On() {
1402
- let e = E.value?.id || D.value;
1403
- if (!e) return;
1404
- let t = z.value.find((t) => t.id === e);
1405
- t && Dn(t);
1406
- }
1407
- function kn() {
1408
- wt.value = !1;
1409
- let e = E.value.id;
1410
- if (!e) return;
1411
- Ct.value = !0;
1412
- let t = z.value.find((t) => t.id === e);
1413
- w.value = t.type, z.value = z.value.filter((t) => t.id !== e), z.value.push(t), an(!0);
1414
- }
1415
- function An(e) {
1416
- k.value || (e.preventDefault(), e.stopPropagation(), e.target.localName !== "svg" && (E.value = e.target), j.value && Et.value ? On() : M.value && Et.value && kn());
1417
- }
1418
- function jn(e) {
1419
- let t = e.target.id;
1420
- switch (!0) {
1421
- case k.value:
1422
- K.value?.begin(), z.value = [...z.value].filter((e) => e.id !== t), I.value = void 0, K.value?.end();
1423
- return;
1424
- default:
1425
- I.value = z.value.find((e) => e.id === t);
1426
- break;
1427
- }
1428
- }
1429
- let Mn = b(null);
1430
- function Nn(e, t) {
1431
- for (t(e), e = e.firstChild; e;) Nn(e, t), e = e.nextSibling;
1432
- }
1433
- function Pn() {
1434
- 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 () => {
1435
- let e = Mn.value;
1436
- if (e) {
1437
- Nn(e, (e) => {
1438
- e && e.nodeType === 1 && (e.setAttribute("font-family", "Helvetica"), e.style.fontFamily = "Helvetica");
1439
- });
1440
- try {
1441
- let t;
1442
- try {
1443
- t = (await import("jspdf")).default;
1444
- } catch {
1445
- throw Error("jspdf is not installed. Run npm install jspdf");
1446
- }
1447
- let n = await s({
1448
- container: e,
1449
- scale: 2
1450
- }), r = new Image();
1451
- r.src = n, r.onload = () => {
1452
- let e = {
1453
- width: 595.28,
1454
- height: 841.89
1455
- }, 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;
1456
- if (te < o) l.addImage(n, "PNG", 0, 0, s, c, "", "FAST");
1457
- else for (; te > 0;) l.addImage(n, "PNG", 0, ee, s, c, "", "FAST"), te -= o, ee -= e.height, te > 0 && l.addPage();
1458
- l.save(`${(/* @__PURE__ */ new Date()).toLocaleDateString()}_annotations.pdf`);
1459
- };
1460
- } catch (e) {
1461
- console.error("Error generating image:", e);
1462
- } finally {
1463
- Dt.value = !1, Nn(e, (e) => {
1464
- e && e.nodeType === 1 && (e.setAttribute("font-family", q.value.style.fontFamily), e.style.fontFamily = q.value.style.fontFamily);
1465
- });
1466
- }
1467
- }
1468
- });
1469
- }
1470
- function Fn(e) {
1471
- if (!k.value && e && (e.preventDefault(), e.stopPropagation()), Ct.value = !1, Et.value = !1, Ht.value = null, Jt.value != null) {
1472
- try {
1473
- X.value?.releasePointerCapture?.(Jt.value);
1474
- } catch {}
1475
- Jt.value = null;
1476
- }
1477
- qt.value &&= (cancelAnimationFrame(qt.value), null), N.value && Sn(), K.value?.end();
1478
- }
1479
- function In() {
1480
- !I.value || !I.value.id.includes("rect") || (I.value.isFilled = !I.value.isFilled);
1481
- }
1482
- function Ln() {
1483
- !I.value || !I.value.id.includes("circle") || (I.value.isFilled = !I.value.isFilled);
1484
- }
1485
- function Rn() {
1486
- !I.value || I.value.type === "text" || (I.value.isDash = Z(St.value));
1487
- }
1488
- function zn() {
1489
- !I.value || ["arrow", "text"].includes(I.value.id) || (I.value.alpha = Z(Xt.value));
1490
- }
1491
- function Bn() {
1492
- !I.value || ![
1493
- "arrow",
1494
- "circle",
1495
- "rect",
1496
- "line"
1497
- ].includes(I.value.type) || (I.value.strokeWidth = Z(Math.abs(bt.value)));
1498
- }
1499
- function Vn() {
1500
- !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));
1501
- }
1502
- function Hn(e) {
1503
- if (e.preventDefault(), !X.value) return;
1504
- let t = X.value.getBoundingClientRect(), n, r;
1505
- 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;
1506
- }
1507
- function Un(e) {
1508
- if (V.value = !1, hn(), e === w.value) {
1509
- w.value = void 0, A.value = !1;
1510
- return;
1511
- }
1512
- A.value = !0, k.value = !1, j.value = !1, M.value = !1, P.value = !1, w.value = e;
1513
- }
1514
- function Wn() {
1515
- 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 });
1516
- }
1517
- function Gn() {
1518
- ge("saveAnnotations", {
1519
- shapes: z.value,
1520
- lastSelectedShape: I.value
1521
- });
1522
- }
1523
- let Kn = null;
1524
- return oe(() => {
1525
- if (Mn.value) {
1526
- let e = !1;
1527
- Nn(Mn.value, (t) => {
1528
- if (!e && [
1529
- "DIV",
1530
- "svg",
1531
- "section",
1532
- "canvas"
1533
- ].includes(t.tagName)) {
1534
- It.value = t, e = !0;
1535
- return;
1536
- }
1537
- });
1538
- }
1539
- Wt.value = (() => {
1540
- if (typeof navigator > "u") return !1;
1541
- let e = navigator.userAgentData?.platform ?? "";
1542
- if (e) return /mac|ios/i.test(e);
1543
- let t = navigator.userAgent ?? "";
1544
- return /(Mac|iPhone|iPad|iPod)/i.test(t);
1545
- })();
1546
- let e = It?.value.getBoundingClientRect();
1547
- 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) => {
1548
- e.forEach((e) => {
1549
- Lt.value = e.contentRect.width, Rt.value = e.contentRect.height, Ft.value = e.contentRect.height / e.contentRect.width, Mt.value = Ft.value * 1e3;
1550
- });
1551
- }).observe(It.value), Gt.value = (e) => xn(e), window.addEventListener("keydown", Gt.value), K.value = ln(), K.value.size) {
1552
- let e = K.value.size();
1553
- Kt.value.undo = e.undo, Kt.value.redo = e.redo;
1554
- }
1555
- Kn = he({
1556
- isMacLike: Wt,
1557
- isSummaryOpen: Ot,
1558
- isWriting: F,
1559
- isDeleteMode: k,
1560
- isMoveMode: j,
1561
- isResizeMode: M,
1562
- isSelectMode: N,
1563
- isDrawMode: A,
1564
- isTextMode: P,
1565
- activeShape: w,
1566
- showCaret: V,
1567
- lastSelectedShape: I,
1568
- shapes: z,
1569
- history: K,
1570
- setShapeTo: Un,
1571
- undoLastShape: vn,
1572
- redoLastShape: yn
1573
- });
1574
- }), ae(() => {
1575
- $(), qt.value && cancelAnimationFrame(qt.value), Gt.value && window.removeEventListener("keydown", Gt.value), Kn && Kn(), window.removeEventListener("keydown", xn);
1576
- }), fe(z, (e) => {
1577
- e.length === 0 && (I.value = void 0);
1578
- }), fe(P, (e) => {
1579
- V.value = e;
1580
- }), (e, t) => (y(), p("div", ve, [m("div", ye, [g(ee, {
1581
- config: {
1582
- maxHeight: 1e3,
1583
- useCursorPointer: J.value,
1584
- head: {
1585
- backgroundColor: q.value.style.backgroundColor,
1586
- color: q.value.style.color,
1587
- iconColor: q.value.style.color,
1588
- iconSize: 20,
1589
- icon: Ot.value ? "close" : "annotator",
1590
- padding: "6px"
1591
- },
1592
- body: {
1593
- backgroundColor: q.value.style.backgroundColor,
1594
- color: q.value.style.color
1595
- }
1596
- },
1597
- onToggle: Wn
1598
- }, {
1599
- title: S(({ color: e }) => [m("div", { style: v({ color: e }) }, x(q.value.translations.title), 5)]),
1600
- content: S(({ backgroundColor: e }) => [m("div", {
1601
- class: "tool-selection",
1602
- style: v({ backgroundColor: e })
1603
- }, [
1604
- m("button", {
1605
- disabled: z.value.length === 0,
1606
- style: v({
1607
- background: j.value ? q.value.style.buttons.controls.selected.backgroundColor : q.value.style.buttons.controls.backgroundColor,
1608
- border: j.value ? q.value.style.buttons.controls.selected.border : q.value.style.buttons.controls.border,
1609
- color: j.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color,
1610
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
1611
- cursor: J.value ? "pointer" : "default"
1612
- }),
1613
- class: _({
1614
- "button-tool": !0,
1615
- "button-tool--selected": j.value,
1616
- tooltip: !0
1617
- }),
1618
- onClick: t[0] ||= (e) => {
1619
- 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;
1620
- },
1621
- onMouseenter: t[1] ||= (e) => q.value.style.showTooltips && Q("move", e, "top"),
1622
- onMouseleave: $,
1623
- onFocus: t[2] ||= (e) => q.value.style.showTooltips && Q("move", e, "top"),
1624
- onBlur: $
1625
- }, [g(l, {
1626
- name: "move",
1627
- stroke: j.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color
1628
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
1629
- key: 0,
1630
- show: U.value && W.value === "move",
1631
- x: G.value.x,
1632
- y: G.value.y - 6,
1633
- placement: "top",
1634
- styleObject: Y.value
1635
- }, {
1636
- default: S(() => [h(x(q.value.translations.tooltipMove) + " ", 1), t[91] ||= m("kbd", null, "M", -1)]),
1637
- _: 1
1638
- }, 8, [
1639
- "show",
1640
- "x",
1641
- "y",
1642
- "styleObject"
1643
- ])) : f("", !0)], 46, be),
1644
- m("button", {
1645
- disabled: z.value.length === 0 || w.value === "line",
1646
- style: v({
1647
- background: M.value ? q.value.style.buttons.controls.selected.backgroundColor : q.value.style.buttons.controls.backgroundColor,
1648
- border: M.value ? q.value.style.buttons.controls.selected.border : q.value.style.buttons.controls.border,
1649
- color: M.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color,
1650
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
1651
- cursor: J.value ? "pointer" : "default"
1652
- }),
1653
- class: _({
1654
- "button-tool": !0,
1655
- "button-tool--selected": M.value,
1656
- tooltip: !0
1657
- }),
1658
- onClick: t[3] ||= (e) => {
1659
- 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;
1660
- },
1661
- onMouseenter: t[4] ||= (e) => q.value.style.showTooltips && Q("resize", e, "top"),
1662
- onMouseleave: $,
1663
- onFocus: t[5] ||= (e) => q.value.style.showTooltips && Q("resize", e, "top"),
1664
- onBlur: $
1665
- }, [g(l, {
1666
- name: "resize",
1667
- stroke: M.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color
1668
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
1669
- key: 0,
1670
- show: U.value && W.value === "resize",
1671
- x: G.value.x,
1672
- y: G.value.y - 6,
1673
- placement: "top",
1674
- styleObject: Y.value
1675
- }, {
1676
- default: S(() => [h(x(q.value.translations.tooltipResize) + " ", 1), t[92] ||= m("kbd", null, "R", -1)]),
1677
- _: 1
1678
- }, 8, [
1679
- "show",
1680
- "x",
1681
- "y",
1682
- "styleObject"
1683
- ])) : f("", !0)], 46, xe),
1684
- m("button", {
1685
- disabled: z.value.length === 0,
1686
- style: v({
1687
- background: k.value ? q.value.style.buttons.controls.selected.backgroundColor : q.value.style.buttons.controls.backgroundColor,
1688
- border: k.value ? q.value.style.buttons.controls.selected.border : q.value.style.buttons.controls.border,
1689
- color: k.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color,
1690
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
1691
- cursor: J.value ? "pointer" : "default"
1692
- }),
1693
- class: _({
1694
- "button-tool": !0,
1695
- "button-tool--selected": k.value,
1696
- tooltip: !0
1697
- }),
1698
- onClick: t[6] ||= (e) => {
1699
- 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;
1700
- },
1701
- onMouseenter: t[7] ||= (e) => q.value.style.showTooltips && Q("delete", e, "top"),
1702
- onMouseleave: $,
1703
- onFocus: t[8] ||= (e) => q.value.style.showTooltips && Q("delete", e, "top"),
1704
- onBlur: $
1705
- }, [g(l, {
1706
- name: "trash",
1707
- stroke: k.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color
1708
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
1709
- key: 0,
1710
- show: U.value && W.value === "delete",
1711
- x: G.value.x,
1712
- y: G.value.y - 6,
1713
- placement: "top",
1714
- styleObject: Y.value
1715
- }, {
1716
- default: S(() => [h(x(q.value.translations.tooltipDelete) + " ", 1), t[93] ||= m("kbd", null, "D", -1)]),
1717
- _: 1
1718
- }, 8, [
1719
- "show",
1720
- "x",
1721
- "y",
1722
- "styleObject"
1723
- ])) : f("", !0)], 46, Se),
1724
- m("button", {
1725
- disabled: !Yt.value,
1726
- style: v({
1727
- background: N.value ? q.value.style.buttons.controls.selected.backgroundColor : q.value.style.buttons.controls.backgroundColor,
1728
- border: N.value ? q.value.style.buttons.controls.selected.border : q.value.style.buttons.controls.border,
1729
- color: N.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color,
1730
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
1731
- cursor: J.value ? "pointer" : "default"
1732
- }),
1733
- class: _({
1734
- "button-tool": !0,
1735
- "button-tool--selected": N.value,
1736
- tooltip: !0
1737
- }),
1738
- onClick: t[9] ||= (e) => {
1739
- 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;
1740
- },
1741
- onMouseenter: t[10] ||= (e) => q.value.style.showTooltips && Q("selectAndGroup", e, "top"),
1742
- onMouseleave: $,
1743
- onFocus: t[11] ||= (e) => q.value.style.showTooltips && Q("selectAndGroup", e, "top"),
1744
- onBlur: $
1745
- }, [g(l, {
1746
- name: "selectAndGroup",
1747
- stroke: N.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color
1748
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
1749
- key: 0,
1750
- show: U.value && W.value === "selectAndGroup",
1751
- x: G.value.x,
1752
- y: G.value.y - 6,
1753
- placement: "top",
1754
- styleObject: Y.value
1755
- }, {
1756
- default: S(() => [h(x(q.value.translations.tooltipGroup) + " ", 1), t[94] ||= m("kbd", null, "G", -1)]),
1757
- _: 1
1758
- }, 8, [
1759
- "show",
1760
- "x",
1761
- "y",
1762
- "styleObject"
1763
- ])) : f("", !0)], 46, Ce),
1764
- m("button", {
1765
- disabled: z.value.length === 0,
1766
- style: v({
1767
- background: q.value.style.buttons.controls.backgroundColor,
1768
- border: q.value.style.buttons.controls.border,
1769
- color: q.value.style.buttons.controls.color,
1770
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
1771
- cursor: J.value ? "pointer" : "default"
1772
- }),
1773
- class: _({
1774
- "button-tool": !0,
1775
- tooltip: !0
1776
- }),
1777
- onClick: t[12] ||= (e) => {
1778
- 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");
1779
- },
1780
- onMouseenter: t[13] ||= (e) => q.value.style.showTooltips && Q("bringToFront", e, "top"),
1781
- onMouseleave: $,
1782
- onFocus: t[14] ||= (e) => q.value.style.showTooltips && Q("bringToFront", e, "top"),
1783
- onBlur: $
1784
- }, [g(l, {
1785
- name: "bringToFront",
1786
- stroke: q.value.style.buttons.controls.color
1787
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
1788
- key: 0,
1789
- show: U.value && W.value === "bringToFront",
1790
- x: G.value.x,
1791
- y: G.value.y - 6,
1792
- placement: "top",
1793
- styleObject: Y.value
1794
- }, {
1795
- default: S(() => [h(x(q.value.translations.tooltipBringToFront), 1)]),
1796
- _: 1
1797
- }, 8, [
1798
- "show",
1799
- "x",
1800
- "y",
1801
- "styleObject"
1802
- ])) : f("", !0)], 44, we),
1803
- m("button", {
1804
- disabled: z.value.length === 0,
1805
- style: v({
1806
- background: q.value.style.buttons.controls.backgroundColor,
1807
- border: q.value.style.buttons.controls.border,
1808
- color: q.value.style.buttons.controls.color,
1809
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
1810
- cursor: J.value ? "pointer" : "default"
1811
- }),
1812
- class: _({
1813
- "button-tool": !0,
1814
- tooltip: !0
1815
- }),
1816
- onClick: t[15] ||= (e) => {
1817
- 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");
1818
- },
1819
- onMouseenter: t[16] ||= (e) => q.value.style.showTooltips && Q("bringToBack", e, "top"),
1820
- onMouseleave: $,
1821
- onFocus: t[17] ||= (e) => q.value.style.showTooltips && Q("bringToBack", e, "top"),
1822
- onBlur: $
1823
- }, [g(l, {
1824
- name: "bringToBack",
1825
- stroke: q.value.style.buttons.controls.color
1826
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
1827
- key: 0,
1828
- show: U.value && W.value === "bringToBack",
1829
- x: G.value.x,
1830
- y: G.value.y - 6,
1831
- placement: "top",
1832
- styleObject: Y.value
1833
- }, {
1834
- default: S(() => [h(x(q.value.translations.tooltipBringToBack), 1)]),
1835
- _: 1
1836
- }, 8, [
1837
- "show",
1838
- "x",
1839
- "y",
1840
- "styleObject"
1841
- ])) : f("", !0)], 44, Te),
1842
- m("button", {
1843
- disabled: z.value.length === 0 || w.value === "line",
1844
- style: v({
1845
- background: q.value.style.buttons.controls.backgroundColor,
1846
- border: q.value.style.buttons.controls.border,
1847
- color: q.value.style.buttons.controls.color,
1848
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
1849
- cursor: J.value ? "pointer" : "default"
1850
- }),
1851
- class: _({
1852
- "button-tool": !0,
1853
- tooltip: !0
1854
- }),
1855
- onClick: t[18] ||= (e) => {
1856
- 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();
1857
- },
1858
- onMouseenter: t[19] ||= (e) => q.value.style.showTooltips && Q("duplicate", e, "top"),
1859
- onMouseleave: $,
1860
- onFocus: t[20] ||= (e) => q.value.style.showTooltips && Q("duplicate", e, "top"),
1861
- onBlur: $
1862
- }, [g(l, {
1863
- name: "copy",
1864
- stroke: q.value.style.buttons.controls.color,
1865
- size: 18
1866
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
1867
- key: 0,
1868
- show: U.value && W.value === "duplicate",
1869
- x: G.value.x,
1870
- y: G.value.y - 6,
1871
- placement: "top",
1872
- styleObject: Y.value
1873
- }, {
1874
- default: S(() => [h(x(q.value.translations.tooltipDuplicate), 1)]),
1875
- _: 1
1876
- }, 8, [
1877
- "show",
1878
- "x",
1879
- "y",
1880
- "styleObject"
1881
- ])) : f("", !0)], 44, Ee),
1882
- m("button", {
1883
- disabled: Kt.value.undo === 0,
1884
- style: v({
1885
- background: q.value.style.buttons.controls.backgroundColor,
1886
- border: q.value.style.buttons.controls.border,
1887
- color: q.value.style.buttons.controls.color,
1888
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
1889
- cursor: J.value ? "pointer" : "default"
1890
- }),
1891
- class: _({
1892
- "button-tool": !0,
1893
- "button-tool--one-shot": !0,
1894
- tooltip: !0
1895
- }),
1896
- onClick: t[21] ||= (e) => {
1897
- 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();
1898
- },
1899
- onMouseenter: t[22] ||= (e) => q.value.style.showTooltips && Q("undoLast", e, "top"),
1900
- onMouseleave: $,
1901
- onFocus: t[23] ||= (e) => q.value.style.showTooltips && Q("undoLast", e, "top"),
1902
- onBlur: $
1903
- }, [g(l, {
1904
- name: "refresh",
1905
- stroke: q.value.style.buttons.controls.color,
1906
- size: 20
1907
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
1908
- key: 0,
1909
- show: U.value && W.value === "undoLast",
1910
- x: G.value.x,
1911
- y: G.value.y - 6,
1912
- placement: "top",
1913
- styleObject: Y.value
1914
- }, {
1915
- default: S(() => [
1916
- h(x(q.value.translations.tooltipUndo) + " ", 1),
1917
- m("kbd", null, x(Wt.value ? "⌘" : "Ctrl"), 1),
1918
- t[95] ||= m("kbd", null, "Z", -1)
1919
- ]),
1920
- _: 1
1921
- }, 8, [
1922
- "show",
1923
- "x",
1924
- "y",
1925
- "styleObject"
1926
- ])) : f("", !0)], 44, De),
1927
- m("button", {
1928
- disabled: Kt.value.redo === 0,
1929
- style: v({
1930
- background: q.value.style.buttons.controls.backgroundColor,
1931
- border: q.value.style.buttons.controls.border,
1932
- color: q.value.style.buttons.controls.color,
1933
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
1934
- cursor: J.value ? "pointer" : "default"
1935
- }),
1936
- class: _({
1937
- "button-tool": !0,
1938
- "button-tool--one-shot": !0,
1939
- tooltip: !0
1940
- }),
1941
- onClick: t[24] ||= (e) => {
1942
- 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();
1943
- },
1944
- onMouseenter: t[25] ||= (e) => q.value.style.showTooltips && Q("redoLast", e, "top"),
1945
- onMouseleave: $,
1946
- onFocus: t[26] ||= (e) => q.value.style.showTooltips && Q("redoLast", e, "top"),
1947
- onBlur: $
1948
- }, [g(l, {
1949
- name: "refresh",
1950
- stroke: q.value.style.buttons.controls.color,
1951
- size: 20,
1952
- style: { transform: "rotateX(0deg) rotateY(180deg)" }
1953
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
1954
- key: 0,
1955
- show: U.value && W.value === "redoLast",
1956
- x: G.value.x,
1957
- y: G.value.y - 6,
1958
- placement: "top",
1959
- styleObject: Y.value
1960
- }, {
1961
- default: S(() => [
1962
- h(x(q.value.translations.tooltipRedo) + " ", 1),
1963
- m("kbd", null, x(Wt.value ? "⌘" : "Ctrl"), 1),
1964
- t[96] ||= m("kbd", null, "Y", -1)
1965
- ]),
1966
- _: 1
1967
- }, 8, [
1968
- "show",
1969
- "x",
1970
- "y",
1971
- "styleObject"
1972
- ])) : f("", !0)], 44, Oe),
1973
- q.value.style.showPrint ? (y(), p("button", {
1974
- key: 0,
1975
- style: v({
1976
- background: q.value.style.buttons.controls.backgroundColor,
1977
- border: q.value.style.buttons.controls.border,
1978
- color: q.value.style.buttons.controls.color,
1979
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
1980
- cursor: J.value ? "pointer" : "default"
1981
- }),
1982
- class: _({
1983
- "button-tool": !0,
1984
- tooltip: !0
1985
- }),
1986
- onClick: Pn,
1987
- onMouseenter: t[27] ||= (e) => q.value.style.showTooltips && Q("printPdf", e, "top"),
1988
- onMouseleave: $,
1989
- onFocus: t[28] ||= (e) => q.value.style.showTooltips && Q("printPdf", e, "top"),
1990
- onBlur: $
1991
- }, [g(l, {
1992
- name: "printer",
1993
- stroke: q.value.style.buttons.controls.color
1994
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
1995
- key: 0,
1996
- show: U.value && W.value === "printPdf",
1997
- x: G.value.x,
1998
- y: G.value.y - 6,
1999
- placement: "top",
2000
- styleObject: Y.value
2001
- }, {
2002
- default: S(() => [h(x(q.value.translations.tooltipPdf), 1)]),
2003
- _: 1
2004
- }, 8, [
2005
- "show",
2006
- "x",
2007
- "y",
2008
- "styleObject"
2009
- ])) : f("", !0)], 36)) : f("", !0),
2010
- q.value.style.showImage ? (y(), p("button", {
2011
- key: 1,
2012
- style: v({
2013
- background: q.value.style.buttons.controls.backgroundColor,
2014
- border: q.value.style.buttons.controls.border,
2015
- color: q.value.style.buttons.controls.color,
2016
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2017
- cursor: J.value ? "pointer" : "default"
2018
- }),
2019
- class: _({
2020
- "button-tool": !0,
2021
- tooltip: !0
2022
- }),
2023
- onClick: t[29] ||= (...e) => le(yt) && le(yt)(...e),
2024
- onMouseenter: t[30] ||= (e) => q.value.style.showTooltips && Q("printImage", e, "top"),
2025
- onMouseleave: $,
2026
- onFocus: t[31] ||= (e) => q.value.style.showTooltips && Q("printImage", e, "top"),
2027
- onBlur: $
2028
- }, [g(l, {
2029
- name: "image",
2030
- stroke: q.value.style.buttons.controls.color,
2031
- size: 20
2032
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
2033
- key: 0,
2034
- show: U.value && W.value === "printImage",
2035
- x: G.value.x,
2036
- y: G.value.y - 6,
2037
- placement: "top",
2038
- styleObject: Y.value
2039
- }, {
2040
- default: S(() => [h(x(q.value.translations.tooltipImage), 1)]),
2041
- _: 1
2042
- }, 8, [
2043
- "show",
2044
- "x",
2045
- "y",
2046
- "styleObject"
2047
- ])) : f("", !0)], 36)) : f("", !0),
2048
- q.value.style.showSave ? (y(), p("button", {
2049
- key: 2,
2050
- style: v({
2051
- background: q.value.style.buttons.controls.backgroundColor,
2052
- border: q.value.style.buttons.controls.border,
2053
- color: q.value.style.buttons.controls.color,
2054
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2055
- cursor: J.value ? "pointer" : "default"
2056
- }),
2057
- class: _({
2058
- "button-tool": !0,
2059
- tooltip: !0
2060
- }),
2061
- onClick: Gn,
2062
- onMouseenter: t[32] ||= (e) => q.value.style.showTooltips && Q("saveAction", e, "top"),
2063
- onMouseleave: $,
2064
- onFocus: t[33] ||= (e) => q.value.style.showTooltips && Q("saveAction", e, "top"),
2065
- onBlur: $
2066
- }, [g(l, {
2067
- name: "save",
2068
- stroke: q.value.style.buttons.controls.color
2069
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
2070
- key: 0,
2071
- show: U.value && W.value === "saveAction",
2072
- x: G.value.x,
2073
- y: G.value.y - 6,
2074
- placement: "top",
2075
- styleObject: Y.value
2076
- }, {
2077
- default: S(() => [h(x(q.value.translations.tooltipSave), 1)]),
2078
- _: 1
2079
- }, 8, [
2080
- "show",
2081
- "x",
2082
- "y",
2083
- "styleObject"
2084
- ])) : f("", !0)], 36)) : f("", !0)
2085
- ], 4), m("div", ke, [
2086
- m("button", {
2087
- class: _({
2088
- "button-tool": !0,
2089
- "button-tool--selected": w.value === "circle",
2090
- tooltip: !0
2091
- }),
2092
- style: v({
2093
- background: w.value === "circle" ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2094
- border: w.value === "circle" ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2095
- color: w.value === "circle" ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2096
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2097
- cursor: J.value ? "pointer" : "default"
2098
- }),
2099
- onClick: t[34] ||= (e) => {
2100
- Un("circle"), N.value = !1;
2101
- },
2102
- onMouseenter: t[35] ||= (e) => q.value.style.showTooltips && Q("setCircle", e, "top"),
2103
- onMouseleave: $,
2104
- onFocus: t[36] ||= (e) => q.value.style.showTooltips && Q("setCircle", e, "top"),
2105
- onBlur: $
2106
- }, [(y(), p("svg", Ae, [m("circle", {
2107
- cx: 6,
2108
- cy: 6,
2109
- r: "4",
2110
- fill: B.value.circle.filled ? (w.value, Pt.value + Xt.value) : "none",
2111
- stroke: "currentColor"
2112
- }, null, 8, je)])), q.value.style.showTooltips ? (y(), d(C, {
2113
- key: 0,
2114
- show: U.value && W.value === "setCircle",
2115
- x: G.value.x,
2116
- y: G.value.y - 6,
2117
- placement: "top",
2118
- styleObject: Y.value
2119
- }, {
2120
- default: S(() => [h(x(q.value.translations.tooltipShapeCircle) + " ", 1), t[97] ||= m("kbd", null, "C", -1)]),
2121
- _: 1
2122
- }, 8, [
2123
- "show",
2124
- "x",
2125
- "y",
2126
- "styleObject"
2127
- ])) : f("", !0)], 38),
2128
- w.value === "circle" ? (y(), p("div", Me, [m("label", Ne, [h(x(q.value.translations.filled) + " ", 1), pe(m("input", {
2129
- type: "checkbox",
2130
- "onUpdate:modelValue": t[37] ||= (e) => B.value.circle.filled = e,
2131
- onChange: Ln,
2132
- checked: B.value.circle.filled,
2133
- style: v({
2134
- all: "revert",
2135
- appearance: "auto",
2136
- "-webkit-appearance": "auto",
2137
- accentColor: q.value.style.color + " !important"
2138
- })
2139
- }, null, 44, Pe), [[ue, B.value.circle.filled]])])])) : f("", !0),
2140
- m("button", {
2141
- class: _({
2142
- "button-tool": !0,
2143
- "button-tool--selected": w.value === "rect",
2144
- tooltip: !0
2145
- }),
2146
- style: v({
2147
- background: w.value === "rect" ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2148
- border: w.value === "rect" ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2149
- color: w.value === "rect" ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2150
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2151
- cursor: J.value ? "pointer" : "default"
2152
- }),
2153
- onClick: t[38] ||= (e) => {
2154
- Un("rect"), N.value = !1;
2155
- },
2156
- onMouseenter: t[39] ||= (e) => q.value.style.showTooltips && Q("setRect", e, "top"),
2157
- onMouseleave: $,
2158
- onFocus: t[40] ||= (e) => q.value.style.showTooltips && Q("setRect", e, "top"),
2159
- onBlur: $
2160
- }, [(y(), p("svg", Fe, [m("rect", {
2161
- x: "3",
2162
- y: "3",
2163
- style: {
2164
- rx: "0 !important",
2165
- ry: "0 !important"
2166
- },
2167
- height: "6",
2168
- width: "6",
2169
- fill: B.value.rect.filled ? (w.value, Pt.value + Xt.value) : "none",
2170
- stroke: "currentColor"
2171
- }, null, 8, Ie)])), q.value.style.showTooltips ? (y(), d(C, {
2172
- key: 0,
2173
- show: U.value && W.value === "setRect",
2174
- x: G.value.x,
2175
- y: G.value.y - 6,
2176
- placement: "top",
2177
- styleObject: Y.value
2178
- }, {
2179
- default: S(() => [h(x(q.value.translations.tooltipShapeRect) + " ", 1), t[98] ||= m("kbd", null, "S", -1)]),
2180
- _: 1
2181
- }, 8, [
2182
- "show",
2183
- "x",
2184
- "y",
2185
- "styleObject"
2186
- ])) : f("", !0)], 38),
2187
- w.value === "rect" ? (y(), p("div", Le, [m("label", Re, [h(x(q.value.translations.filled) + " ", 1), pe(m("input", {
2188
- type: "checkbox",
2189
- "onUpdate:modelValue": t[41] ||= (e) => B.value.rect.filled = e,
2190
- onChange: In,
2191
- checked: B.value.rect.filled,
2192
- style: v({
2193
- all: "revert",
2194
- appearance: "auto",
2195
- "-webkit-appearance": "auto",
2196
- accentColor: q.value.style.color + " !important"
2197
- })
2198
- }, null, 44, ze), [[ue, B.value.rect.filled]])])])) : f("", !0),
2199
- m("button", {
2200
- class: _({
2201
- "button-tool": !0,
2202
- "button-tool--selected": w.value === "arrow",
2203
- tooltip: !0
2204
- }),
2205
- style: v({
2206
- background: w.value === "arrow" ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2207
- border: w.value === "arrow" ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2208
- color: w.value === "arrow" ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2209
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2210
- cursor: J.value ? "pointer" : "default"
2211
- }),
2212
- onClick: t[42] ||= (e) => {
2213
- Un("arrow"), N.value = !1;
2214
- },
2215
- onMouseenter: t[43] ||= (e) => q.value.style.showTooltips && Q("setArrow", e, "top"),
2216
- onMouseleave: $,
2217
- onFocus: t[44] ||= (e) => q.value.style.showTooltips && Q("setArrow", e, "top"),
2218
- onBlur: $
2219
- }, [(y(), p("svg", Be, [m("path", {
2220
- stroke: B.value.arrow.filled ? w.value === "arrow" ? "white" : "grey" : "none",
2221
- "stroke-width": "2",
2222
- d: "M5,19 19,5 14,5 19,10.5 19,5",
2223
- fill: "none",
2224
- "stroke-linecap": "round",
2225
- "stroke-linejoin": "round"
2226
- }, null, 8, Ve)])), q.value.style.showTooltips ? (y(), d(C, {
2227
- key: 0,
2228
- show: U.value && W.value === "setArrow",
2229
- x: G.value.x,
2230
- y: G.value.y - 6,
2231
- placement: "top",
2232
- styleObject: Y.value
2233
- }, {
2234
- default: S(() => [h(x(q.value.translations.tooltipShapeArrow) + " ", 1), t[99] ||= m("kbd", null, "A", -1)]),
2235
- _: 1
2236
- }, 8, [
2237
- "show",
2238
- "x",
2239
- "y",
2240
- "styleObject"
2241
- ])) : f("", !0)], 38),
2242
- m("button", {
2243
- class: _({
2244
- "button-tool": !0,
2245
- "button-tool--selected": w.value === "line",
2246
- tooltip: !0
2247
- }),
2248
- style: v({
2249
- background: w.value === "line" ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2250
- border: w.value === "line" ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2251
- color: w.value === "line" ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2252
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2253
- cursor: J.value ? "pointer" : "default"
2254
- }),
2255
- onClick: t[45] ||= (e) => {
2256
- Un("line"), N.value = !1;
2257
- },
2258
- onMouseenter: t[46] ||= (e) => q.value.style.showTooltips && Q("setFreehand", e, "top"),
2259
- onMouseleave: $,
2260
- onFocus: t[47] ||= (e) => q.value.style.showTooltips && Q("setFreehand", e, "top"),
2261
- onBlur: $
2262
- }, [t[101] ||= m("svg", {
2263
- width: "80%",
2264
- viewBox: "0 0 24 24",
2265
- "stroke-width": "2",
2266
- stroke: "currentColor",
2267
- fill: "none",
2268
- "stroke-linecap": "round",
2269
- "stroke-linejoin": "round"
2270
- }, [m("path", {
2271
- stroke: "none",
2272
- d: "M0 0h24v24H0z",
2273
- fill: "none"
2274
- }), 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, {
2275
- key: 0,
2276
- show: U.value && W.value === "setFreehand",
2277
- x: G.value.x,
2278
- y: G.value.y - 6,
2279
- placement: "top",
2280
- styleObject: Y.value
2281
- }, {
2282
- default: S(() => [h(x(q.value.translations.tooltipShapeFreehand) + " ", 1), t[100] ||= m("kbd", null, "L", -1)]),
2283
- _: 1
2284
- }, 8, [
2285
- "show",
2286
- "x",
2287
- "y",
2288
- "styleObject"
2289
- ])) : f("", !0)], 38),
2290
- [
2291
- "arrow",
2292
- "circle",
2293
- "rect",
2294
- "line"
2295
- ].includes(w.value) ? (y(), p("div", He, [m("div", Ue, [m("label", We, [h(x(q.value.translations.thickness) + " ", 1), pe(m("input", {
2296
- type: "number",
2297
- "onUpdate:modelValue": t[48] ||= (e) => bt.value = e,
2298
- onInput: Bn,
2299
- min: 1,
2300
- style: {
2301
- padding: "0 4px",
2302
- width: "40px",
2303
- border: "1px solid #dadada",
2304
- "border-radius": "3px"
2305
- }
2306
- }, null, 544), [[de, bt.value]])])])])) : f("", !0),
2307
- [
2308
- "arrow",
2309
- "circle",
2310
- "rect"
2311
- ].includes(w.value) ? (y(), p("div", Ge, [m("div", Ke, [m("label", qe, [
2312
- h(x(q.value.translations.dashedLines) + " ", 1),
2313
- (y(), p("svg", Je, [...t[102] ||= [m("line", {
2314
- x1: "0",
2315
- x2: "24",
2316
- y1: "12",
2317
- y2: "12",
2318
- "stroke-width": "2",
2319
- stroke: "black",
2320
- "stroke-dasharray": "3"
2321
- }, null, -1)]])),
2322
- pe(m("input", {
2323
- name: "dashStyle",
2324
- type: "checkbox",
2325
- "onUpdate:modelValue": t[49] ||= (e) => St.value = e,
2326
- onChange: Rn,
2327
- checked: St.value,
2328
- style: v({
2329
- all: "revert",
2330
- appearance: "auto",
2331
- "-webkit-appearance": "auto",
2332
- accentColor: q.value.style.color + " !important"
2333
- })
2334
- }, null, 44, Ye), [[ue, St.value]])
2335
- ])])])) : f("", !0),
2336
- m("button", {
2337
- class: _({
2338
- "button-tool": !0,
2339
- "button-tool--selected": P.value,
2340
- tooltip: !0
2341
- }),
2342
- style: v({
2343
- background: P.value ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2344
- border: P.value ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2345
- color: P.value ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2346
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2347
- cursor: J.value ? "pointer" : "default"
2348
- }),
2349
- onClick: t[50] ||= (e) => {
2350
- hn(), P.value = !P.value, k.value = !1, j.value = !1, M.value = !1, N.value = !1, A.value = !1, w.value = void 0;
2351
- },
2352
- onMouseenter: t[51] ||= (e) => q.value.style.showTooltips && Q("setText", e, "top"),
2353
- onMouseleave: $,
2354
- onFocus: t[52] ||= (e) => q.value.style.showTooltips && Q("setText", e, "top"),
2355
- onBlur: $
2356
- }, [g(l, {
2357
- name: "text",
2358
- stroke: P.value ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color
2359
- }, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
2360
- key: 0,
2361
- show: U.value && W.value === "setText",
2362
- x: G.value.x,
2363
- y: G.value.y - 6,
2364
- placement: "top",
2365
- styleObject: Y.value
2366
- }, {
2367
- default: S(() => [h(x(q.value.translations.tooltipShapeText) + " ", 1), t[103] ||= m("kbd", null, "T", -1)]),
2368
- _: 1
2369
- }, 8, [
2370
- "show",
2371
- "x",
2372
- "y",
2373
- "styleObject"
2374
- ])) : f("", !0)], 38),
2375
- P.value ? (y(), p("div", Xe, [m("div", Ze, [m("label", Qe, [h(x(q.value.translations.fontSize) + " ", 1), pe(m("input", {
2376
- type: "number",
2377
- "onUpdate:modelValue": t[53] ||= (e) => zt.value = e,
2378
- onInput: Vn,
2379
- style: {
2380
- padding: "0 4px",
2381
- width: "40px",
2382
- border: "1px solid #dadada",
2383
- "border-radius": "3px"
2384
- }
2385
- }, null, 544), [[de, zt.value]])])])])) : f("", !0),
2386
- P.value ? (y(), p("div", $e, [m("button", {
2387
- class: _({
2388
- "button-tool": !0,
2389
- "button-tool--selected": H.value === "start",
2390
- tooltip: !0
2391
- }),
2392
- style: v({
2393
- background: H.value === "start" ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2394
- border: H.value === "start" ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2395
- color: H.value === "start" ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2396
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2397
- cursor: J.value ? "pointer" : "default"
2398
- }),
2399
- onClick: t[54] ||= (e) => {
2400
- k.value = !1, j.value = !1, M.value = !1, A.value = !1, N.value = !1, w.value = void 0, H.value = "start", _n("start");
2401
- },
2402
- onMouseenter: t[55] ||= (e) => q.value.style.showTooltips && Q("setAlignStart", e, "top"),
2403
- onMouseleave: $,
2404
- onFocus: t[56] ||= (e) => q.value.style.showTooltips && Q("setAlignStart", e, "top"),
2405
- onBlur: $
2406
- }, [t[104] ||= m("svg", {
2407
- width: "80%",
2408
- viewBox: "0 0 24 24",
2409
- "stroke-width": "2",
2410
- stroke: "currentColor",
2411
- fill: "none",
2412
- "stroke-linecap": "round",
2413
- "stroke-linejoin": "round"
2414
- }, [
2415
- m("path", {
2416
- stroke: "none",
2417
- d: "M0 0h24v24H0z",
2418
- fill: "none"
2419
- }),
2420
- m("path", { d: "M4 6l16 0" }),
2421
- m("path", { d: "M4 12l10 0" }),
2422
- m("path", { d: "M4 18l14 0" })
2423
- ], -1), q.value.style.showTooltips ? (y(), d(C, {
2424
- key: 0,
2425
- show: U.value && W.value === "setAlignStart",
2426
- x: G.value.x,
2427
- y: G.value.y - 6,
2428
- placement: "top",
2429
- styleObject: Y.value
2430
- }, {
2431
- default: S(() => [h(x(q.value.translations.tooltipShapeTextLeft), 1)]),
2432
- _: 1
2433
- }, 8, [
2434
- "show",
2435
- "x",
2436
- "y",
2437
- "styleObject"
2438
- ])) : f("", !0)], 38)])) : f("", !0),
2439
- P.value ? (y(), p("div", et, [m("button", {
2440
- class: _({
2441
- "button-tool": !0,
2442
- "button-tool--selected": H.value === "middle",
2443
- tooltip: !0
2444
- }),
2445
- style: v({
2446
- background: H.value === "middle" ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2447
- border: H.value === "middle" ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2448
- color: H.value === "middle" ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2449
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2450
- cursor: J.value ? "pointer" : "default"
2451
- }),
2452
- disabled: O.value,
2453
- onClick: t[57] ||= (e) => {
2454
- k.value = !1, j.value = !1, M.value = !1, A.value = !1, N.value = !1, w.value = void 0, H.value = "middle", _n("middle");
2455
- },
2456
- onMouseenter: t[58] ||= (e) => q.value.style.showTooltips && Q("setAlignMiddle", e, "top"),
2457
- onMouseleave: $,
2458
- onFocus: t[59] ||= (e) => q.value.style.showTooltips && Q("setAlignMiddle", e, "top"),
2459
- onBlur: $
2460
- }, [t[105] ||= m("svg", {
2461
- width: "80%",
2462
- viewBox: "0 0 24 24",
2463
- "stroke-width": "2",
2464
- stroke: "currentColor",
2465
- fill: "none",
2466
- "stroke-linecap": "round",
2467
- "stroke-linejoin": "round"
2468
- }, [
2469
- m("path", {
2470
- stroke: "none",
2471
- d: "M0 0h24v24H0z",
2472
- fill: "none"
2473
- }),
2474
- m("path", { d: "M4 6l16 0" }),
2475
- m("path", { d: "M8 12l8 0" }),
2476
- m("path", { d: "M6 18l12 0" })
2477
- ], -1), q.value.style.showTooltips ? (y(), d(C, {
2478
- key: 0,
2479
- show: U.value && W.value === "setAlignMiddle",
2480
- x: G.value.x,
2481
- y: G.value.y - 6,
2482
- placement: "top",
2483
- styleObject: Y.value
2484
- }, {
2485
- default: S(() => [h(x(q.value.translations.tooltipShapeTextCenter), 1)]),
2486
- _: 1
2487
- }, 8, [
2488
- "show",
2489
- "x",
2490
- "y",
2491
- "styleObject"
2492
- ])) : f("", !0)], 46, tt)])) : f("", !0),
2493
- P.value ? (y(), p("div", nt, [m("button", {
2494
- class: _({
2495
- "button-tool": !0,
2496
- "button-tool--selected": H.value === "end",
2497
- tooltip: !0
2498
- }),
2499
- style: v({
2500
- background: H.value === "end" ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2501
- border: H.value === "end" ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2502
- color: H.value === "end" ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2503
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2504
- cursor: J.value ? "pointer" : "default"
2505
- }),
2506
- disabled: O.value,
2507
- onClick: t[60] ||= (e) => {
2508
- k.value = !1, j.value = !1, M.value = !1, A.value = !1, N.value = !1, w.value = void 0, H.value = "end", _n("end");
2509
- },
2510
- onMouseenter: t[61] ||= (e) => q.value.style.showTooltips && Q("setAlignEnd", e, "top"),
2511
- onMouseleave: $,
2512
- onFocus: t[62] ||= (e) => q.value.style.showTooltips && Q("setAlignEnd", e, "top"),
2513
- onBlur: $
2514
- }, [t[106] ||= m("svg", {
2515
- width: "80%",
2516
- viewBox: "0 0 24 24",
2517
- "stroke-width": "2",
2518
- stroke: "currentColor",
2519
- fill: "none",
2520
- "stroke-linecap": "round",
2521
- "stroke-linejoin": "round"
2522
- }, [
2523
- m("path", {
2524
- stroke: "none",
2525
- d: "M0 0h24v24H0z",
2526
- fill: "none"
2527
- }),
2528
- m("path", { d: "M4 6l16 0" }),
2529
- m("path", { d: "M10 12l10 0" }),
2530
- m("path", { d: "M6 18l14 0" })
2531
- ], -1), q.value.style.showTooltips ? (y(), d(C, {
2532
- key: 0,
2533
- show: U.value && W.value === "setAlignEnd",
2534
- x: G.value.x,
2535
- y: G.value.y - 6,
2536
- placement: "top",
2537
- styleObject: Y.value
2538
- }, {
2539
- default: S(() => [h(x(q.value.translations.tooltipShapeTextRight), 1)]),
2540
- _: 1
2541
- }, 8, [
2542
- "show",
2543
- "x",
2544
- "y",
2545
- "styleObject"
2546
- ])) : f("", !0)], 46, rt)])) : f("", !0),
2547
- P.value ? (y(), p("div", it, [m("button", {
2548
- class: _({
2549
- "button-tool": !0,
2550
- "button-tool--selected": O.value,
2551
- tooltip: !0
2552
- }),
2553
- style: v({
2554
- background: O.value ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2555
- border: O.value ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2556
- color: O.value ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2557
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2558
- cursor: J.value ? "pointer" : "default"
2559
- }),
2560
- onClick: t[63] ||= (e) => {
2561
- 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();
2562
- },
2563
- onMouseenter: t[64] ||= (e) => q.value.style.showTooltips && Q("setBulletMode", e, "top"),
2564
- onMouseleave: $,
2565
- onFocus: t[65] ||= (e) => q.value.style.showTooltips && Q("setBulletMode", e, "top"),
2566
- onBlur: $
2567
- }, [t[107] ||= m("svg", {
2568
- width: "100%",
2569
- viewBox: "0 0 24 24",
2570
- "stroke-width": "2",
2571
- stroke: "currentColor",
2572
- fill: "none",
2573
- "stroke-linecap": "round",
2574
- "stroke-linejoin": "round"
2575
- }, [
2576
- m("path", {
2577
- stroke: "none",
2578
- d: "M0 0h24v24H0z",
2579
- fill: "none"
2580
- }),
2581
- m("path", { d: "M9 6l11 0" }),
2582
- m("path", { d: "M9 12l11 0" }),
2583
- m("path", { d: "M9 18l11 0" }),
2584
- m("path", { d: "M5 6l0 .01" }),
2585
- m("path", { d: "M5 12l0 .01" }),
2586
- m("path", { d: "M5 18l0 .01" })
2587
- ], -1), q.value.style.showTooltips ? (y(), d(C, {
2588
- key: 0,
2589
- show: U.value && W.value === "setBulletMode",
2590
- x: G.value.x,
2591
- y: G.value.y - 6,
2592
- placement: "top",
2593
- styleObject: Y.value
2594
- }, {
2595
- default: S(() => [h(x(q.value.translations.tooltipShapeTextBullet), 1)]),
2596
- _: 1
2597
- }, 8, [
2598
- "show",
2599
- "x",
2600
- "y",
2601
- "styleObject"
2602
- ])) : f("", !0)], 38)])) : f("", !0),
2603
- P.value ? (y(), p("div", at, [m("button", {
2604
- class: _({
2605
- "button-tool": !0,
2606
- "button-tool--selected": xt.value,
2607
- tooltip: !0
2608
- }),
2609
- style: v({
2610
- background: xt.value ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2611
- border: xt.value ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2612
- color: xt.value ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2613
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2614
- cursor: J.value ? "pointer" : "default"
2615
- }),
2616
- onClick: t[66] ||= (e) => {
2617
- k.value = !1, j.value = !1, M.value = !1, A.value = !1, N.value = !1, w.value = void 0, xt.value = !xt.value, Vn();
2618
- },
2619
- onMouseenter: t[67] ||= (e) => q.value.style.showTooltips && Q("setBold", e, "top"),
2620
- onMouseleave: $,
2621
- onFocus: t[68] ||= (e) => q.value.style.showTooltips && Q("setBold", e, "top"),
2622
- onBlur: $
2623
- }, [t[108] ||= m("svg", {
2624
- width: "100%",
2625
- viewBox: "0 0 24 24",
2626
- "stroke-width": "3",
2627
- stroke: "currentColor",
2628
- fill: "none",
2629
- "stroke-linecap": "round",
2630
- "stroke-linejoin": "round"
2631
- }, [
2632
- m("path", {
2633
- stroke: "none",
2634
- d: "M0 0h24v24H0z",
2635
- fill: "none"
2636
- }),
2637
- m("path", { d: "M7 5h6a3.5 3.5 0 0 1 0 7h-6z" }),
2638
- m("path", { d: "M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7" })
2639
- ], -1), q.value.style.showTooltips ? (y(), d(C, {
2640
- key: 0,
2641
- show: U.value && W.value === "setBold",
2642
- x: G.value.x,
2643
- y: G.value.y - 6,
2644
- placement: "top",
2645
- styleObject: Y.value
2646
- }, {
2647
- default: S(() => [h(x(q.value.translations.tooltipShapeTextBold), 1)]),
2648
- _: 1
2649
- }, 8, [
2650
- "show",
2651
- "x",
2652
- "y",
2653
- "styleObject"
2654
- ])) : f("", !0)], 38)])) : f("", !0),
2655
- P.value ? (y(), p("div", ot, [m("button", {
2656
- class: _({
2657
- "button-tool": !0,
2658
- "button-tool--selected": Tt.value,
2659
- tooltip: !0
2660
- }),
2661
- style: v({
2662
- background: Tt.value ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2663
- border: Tt.value ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2664
- color: Tt.value ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2665
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2666
- cursor: J.value ? "pointer" : "default"
2667
- }),
2668
- onClick: t[69] ||= (e) => {
2669
- k.value = !1, j.value = !1, M.value = !1, A.value = !1, N.value = !1, w.value = void 0, Tt.value = !Tt.value, Vn();
2670
- },
2671
- onMouseenter: t[70] ||= (e) => q.value.style.showTooltips && Q("setItalic", e, "top"),
2672
- onMouseleave: $,
2673
- onFocus: t[71] ||= (e) => q.value.style.showTooltips && Q("setItalic", e, "top"),
2674
- onBlur: $
2675
- }, [t[109] ||= m("svg", {
2676
- width: "100%",
2677
- height: "44",
2678
- viewBox: "0 0 24 24",
2679
- "stroke-width": "2",
2680
- stroke: "currentColor",
2681
- fill: "none",
2682
- "stroke-linecap": "round",
2683
- "stroke-linejoin": "round"
2684
- }, [
2685
- m("path", {
2686
- stroke: "none",
2687
- d: "M0 0h24v24H0z",
2688
- fill: "none"
2689
- }),
2690
- m("path", { d: "M11 5l6 0" }),
2691
- m("path", { d: "M7 19l6 0" }),
2692
- m("path", { d: "M14 5l-4 14" })
2693
- ], -1), q.value.style.showTooltips ? (y(), d(C, {
2694
- key: 0,
2695
- show: U.value && W.value === "setItalic",
2696
- x: G.value.x,
2697
- y: G.value.y - 6,
2698
- placement: "top",
2699
- styleObject: Y.value
2700
- }, {
2701
- default: S(() => [h(x(q.value.translations.tooltipShapeTextItalic), 1)]),
2702
- _: 1
2703
- }, 8, [
2704
- "show",
2705
- "x",
2706
- "y",
2707
- "styleObject"
2708
- ])) : f("", !0)], 38)])) : f("", !0),
2709
- P.value ? (y(), p("div", st, [m("button", {
2710
- class: _({
2711
- "button-tool": !0,
2712
- "button-tool--selected": kt.value,
2713
- tooltip: !0
2714
- }),
2715
- style: v({
2716
- background: kt.value ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
2717
- border: kt.value ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
2718
- color: kt.value ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
2719
- borderRadius: `${q.value.style.buttons.borderRadius}px`,
2720
- cursor: J.value ? "pointer" : "default"
2721
- }),
2722
- onClick: t[72] ||= (e) => {
2723
- k.value = !1, j.value = !1, M.value = !1, A.value = !1, N.value = !1, w.value = void 0, kt.value = !kt.value, Vn();
2724
- },
2725
- onMouseenter: t[73] ||= (e) => q.value.style.showTooltips && Q("setUnderline", e, "top"),
2726
- onMouseleave: $,
2727
- onFocus: t[74] ||= (e) => q.value.style.showTooltips && Q("setUnderline", e, "top"),
2728
- onBlur: $
2729
- }, [t[110] ||= m("svg", {
2730
- width: "100%",
2731
- viewBox: "0 0 24 24",
2732
- "stroke-width": "2",
2733
- stroke: "currentColor",
2734
- fill: "none",
2735
- "stroke-linecap": "round",
2736
- "stroke-linejoin": "round"
2737
- }, [
2738
- m("path", {
2739
- stroke: "none",
2740
- d: "M0 0h24v24H0z",
2741
- fill: "none"
2742
- }),
2743
- m("path", { d: "M7 5v5a5 5 0 0 0 10 0v-5" }),
2744
- m("path", { d: "M5 19h14" })
2745
- ], -1), q.value.style.showTooltips ? (y(), d(C, {
2746
- key: 0,
2747
- show: U.value && W.value === "setUnderline",
2748
- x: G.value.x,
2749
- y: G.value.y - 6,
2750
- placement: "top",
2751
- styleObject: Y.value
2752
- }, {
2753
- default: S(() => [h(x(q.value.translations.tooltipShapeTextUnderline), 1)]),
2754
- _: 1
2755
- }, 8, [
2756
- "show",
2757
- "x",
2758
- "y",
2759
- "styleObject"
2760
- ])) : f("", !0)], 38)])) : f("", !0),
2761
- m("div", ct, [m("button", {
2762
- class: _({
2763
- "button-tool": !0,
2764
- tooltip: !0
2765
- }),
2766
- style: { borderRadius: "6px" },
2767
- onMouseenter: t[76] ||= (e) => q.value.style.showTooltips && Q("setColor", e, "top"),
2768
- onMouseleave: $,
2769
- onFocus: t[77] ||= (e) => q.value.style.showTooltips && Q("setColor", e, "top"),
2770
- onBlur: $
2771
- }, [g(te, {
2772
- value: Pt.value,
2773
- "onUpdate:value": t[75] ||= (e) => Pt.value = e,
2774
- backgroundColor: q.value.style.backgroundColor,
2775
- buttonBorderColor: q.value.style.color,
2776
- isCursorPointer: J.value,
2777
- teleported: ""
2778
- }, null, 8, [
2779
- "value",
2780
- "backgroundColor",
2781
- "buttonBorderColor",
2782
- "isCursorPointer"
2783
- ])], 32), q.value.style.showTooltips ? (y(), d(C, {
2784
- key: 0,
2785
- show: U.value && W.value === "setColor",
2786
- x: G.value.x,
2787
- y: G.value.y - 6,
2788
- placement: "top",
2789
- styleObject: Y.value
2790
- }, {
2791
- default: S(() => [h(x(q.value.translations.tooltipShapeColor), 1)]),
2792
- _: 1
2793
- }, 8, [
2794
- "show",
2795
- "x",
2796
- "y",
2797
- "styleObject"
2798
- ])) : f("", !0)]),
2799
- m("div", lt, [m("label", ut, [h(x(q.value.translations.colorAlpha) + ": " + x(Bt.value > 98 ? 100 : Bt.value) + " % ", 1), pe(m("input", {
2800
- name: "colorTransparency",
2801
- type: "range",
2802
- "onUpdate:modelValue": t[78] ||= (e) => Bt.value = e,
2803
- onInput: zn,
2804
- min: 0,
2805
- max: 100,
2806
- style: v({
2807
- width: "100%",
2808
- accentColor: q.value.style.color + " !important"
2809
- })
2810
- }, null, 36), [[de, Bt.value]])])])
2811
- ])]),
2812
- _: 1
2813
- }, 8, ["config"])]), m("div", {
2814
- class: "annotator annotator__wrapper",
2815
- ref_key: "drawSvgContainer",
2816
- ref: Mn,
2817
- style: { position: "relative" },
2818
- id: _e.value,
2819
- "data-annotator-content": ""
2820
- }, [
2821
- m("div", {
2822
- class: "annotator__content-layer",
2823
- style: v(`${Ot.value ? "pointer-events: none;" : ""}`)
2824
- }, [ce(e.$slots, "default", {}, void 0, !0)], 4),
2825
- Ot.value || q.value.alwaysVisible ? (y(), p("svg", {
2826
- id: "annotatorSvg",
2827
- key: jt.value,
2828
- ref_key: "mainSvg",
2829
- ref: X,
2830
- class: _({
2831
- annotator__overlay: !0,
2832
- draw: !0,
2833
- "draw--free": w.value === "line"
2834
- }),
2835
- viewBox: `0 0 ${Nt.value} ${Mt.value}`,
2836
- width: Lt.value,
2837
- height: Rt.value,
2838
- onPointerdown: t[83] ||= (e) => En(e),
2839
- onPointerup: t[84] ||= (e) => Fn(e),
2840
- onTouchend: t[85] ||= (e) => Fn(e),
2841
- onTouchstart: t[86] ||= (e) => {
2842
- Hn(e), gn(e);
2843
- },
2844
- onPointermove: t[87] ||= (e) => {
2845
- Hn(e), An(e);
2846
- },
2847
- onPointerout: t[88] ||= (e) => wn(e),
2848
- onPointerover: t[89] ||= (e) => mn(e),
2849
- onClick: t[90] ||= (e) => gn(e),
2850
- style: v({
2851
- position: "absolute",
2852
- top: 0,
2853
- left: 0,
2854
- cursor: Zt.value,
2855
- fontFamily: "Helvetica",
2856
- zIndex: 1e8,
2857
- pointerEvents: Ot.value ? "all" : "none"
2858
- })
2859
- }, [m("rect", {
2860
- class: "annotator__glass",
2861
- x: "0",
2862
- y: "0",
2863
- width: Nt.value,
2864
- height: Mt.value,
2865
- fill: "transparent",
2866
- "pointer-events": Ot.value ? "all" : "none",
2867
- style: { cursor: "inherit" },
2868
- onPointerdown: t[79] ||= me((e) => En(e), ["stop", "prevent"]),
2869
- onPointermove: t[80] ||= me((e) => {
2870
- Hn(e), An(e);
2871
- }, ["stop", "prevent"]),
2872
- onPointerup: me(Fn, ["stop", "prevent"]),
2873
- onClick: t[81] ||= me(() => {}, ["stop", "prevent"])
2874
- }, null, 40, pt), (y(!0), p(ne, null, se(rn.value, (e) => (y(), p("g", {
2875
- key: e.id,
2876
- innerHTML: e.html,
2877
- onClick: t[82] ||= (e) => {
2878
- jn(e), j.value = !1;
2879
- }
2880
- }, null, 8, mt))), 128))], 46, ft)) : f("", !0),
2881
- Dt.value || le(vt) ? (y(), p("svg", {
2882
- key: 1,
2883
- style: {
2884
- position: "absolute",
2885
- top: "0",
2886
- left: "0"
2887
- },
2888
- height: Rt.value,
2889
- viewBox: `0 0 ${Nt.value} ${Mt.value}`,
2890
- width: Lt.value,
2891
- "data-dom-to-png-ignore": ""
2892
- }, [m("circle", {
2893
- class: "animated-circle-print",
2894
- cx: Nt.value / 2,
2895
- cy: Mt.value / 2,
2896
- r: "50",
2897
- stroke: "#6376DD",
2898
- "stroke-width": "10",
2899
- fill: "none"
2900
- }, null, 8, gt)], 8, ht)) : f("", !0)
2901
- ], 8, dt)]));
2902
- }
2903
- }, [["__scopeId", "data-v-3a11f6f4"]]);
2904
- //#endregion
2905
- export { _e as n, vt as t };