vue-data-ui 2.3.3 → 2.3.4

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 (148) hide show
  1. package/dist/Arrow-B6gJebT9.js +101 -0
  2. package/dist/Arrow-C5yj6zwY.cjs +1 -0
  3. package/dist/BaseIcon-7_g11dRj.js +174 -0
  4. package/dist/BaseIcon-JtWoVorZ.cjs +1 -0
  5. package/dist/DataTable-CwaOlAsy.js +127 -0
  6. package/dist/DataTable-Rm9II-m2.cjs +1 -0
  7. package/dist/Legend-CxvJTjEm.js +62 -0
  8. package/dist/Legend-D59FIuMs.cjs +1 -0
  9. package/dist/Shape-CVItL3vh.cjs +1 -0
  10. package/dist/Shape-CjLV0scA.js +107 -0
  11. package/dist/Slicer-Bxg5niHl.js +156 -0
  12. package/dist/Slicer-Cdss5Rus.cjs +1 -0
  13. package/dist/Title-2iks1ziC.js +46 -0
  14. package/dist/Title-Bb-A5OSV.cjs +1 -0
  15. package/dist/Tooltip-C3phqKuU.js +94 -0
  16. package/dist/Tooltip-C_UE6y-E.cjs +1 -0
  17. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
  18. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  19. package/dist/html2canvas.esm-BA_v9SIU.cjs +22 -0
  20. package/dist/html2canvas.esm-d2sM-0Wm.js +4870 -0
  21. package/dist/index-p5gfZSvB.cjs +4 -0
  22. package/dist/index-uOtklCCx.js +10268 -0
  23. package/dist/{index.es-ypwniJN8.js → index.es-YufTdp0y.js} +1 -1
  24. package/dist/{index.es-Dnua3tHc.cjs → index.es-uyeSCnWE.cjs} +1 -1
  25. package/dist/jspdf.es.min-C660YX78.js +8038 -0
  26. package/dist/jspdf.es.min-DLYY9DTT.cjs +243 -0
  27. package/dist/pdf-97UbtKC2.js +44 -0
  28. package/dist/pdf-Cz3729tZ.cjs +1 -0
  29. package/dist/style.css +1 -1
  30. package/dist/useNestedProp-2kIU-7On.cjs +1 -0
  31. package/dist/useNestedProp-BgWkUab_.js +13 -0
  32. package/dist/usePrinter-B6xQCyL-.js +464 -0
  33. package/dist/usePrinter-fZlsJid8.cjs +1 -0
  34. package/dist/useResponsive-B3TrDDIG.cjs +1 -0
  35. package/dist/useResponsive-NZB-WLRF.js +187 -0
  36. package/dist/vue-data-ui-Be0rgmbA.cjs +9 -0
  37. package/dist/vue-data-ui-Ccy6rBZN.js +246 -0
  38. package/dist/vue-data-ui.cjs +1 -1
  39. package/dist/vue-data-ui.js +62 -61
  40. package/dist/vue-ui-3d-bar-BKMPFDi2.js +1085 -0
  41. package/dist/vue-ui-3d-bar-CKa4UXq4.cjs +19 -0
  42. package/dist/vue-ui-accordion-C_pwrAJl.cjs +1 -0
  43. package/dist/vue-ui-accordion-HJPf7My0.js +77 -0
  44. package/dist/vue-ui-age-pyramid-CE1xnA-8.cjs +1 -0
  45. package/dist/vue-ui-age-pyramid-DB_CL-gu.js +596 -0
  46. package/dist/vue-ui-annotator-BAMZcPlH.cjs +371 -0
  47. package/dist/vue-ui-annotator-DQsAL-nZ.js +2177 -0
  48. package/dist/vue-ui-candlestick-DCl8fpNu.js +657 -0
  49. package/dist/vue-ui-candlestick-Duv6oG79.cjs +2 -0
  50. package/dist/vue-ui-chestnut-BYHA6MT4.js +1051 -0
  51. package/dist/vue-ui-chestnut-mIZ4-ZEM.cjs +6 -0
  52. package/dist/vue-ui-cursor-C96IChA3.js +229 -0
  53. package/dist/vue-ui-cursor-De7dy4Mo.cjs +1 -0
  54. package/dist/vue-ui-dashboard-B2Yz41yO.js +232 -0
  55. package/dist/vue-ui-dashboard-BMGwKr0K.cjs +1 -0
  56. package/dist/vue-ui-digits-BnxLp7zQ.js +153 -0
  57. package/dist/vue-ui-digits-DSWyL-5K.cjs +1 -0
  58. package/dist/vue-ui-donut-1kei9ws5.cjs +1 -0
  59. package/dist/vue-ui-donut-B9iXisHK.js +743 -0
  60. package/dist/vue-ui-donut-evolution-B7Sun8sw.js +799 -0
  61. package/dist/vue-ui-donut-evolution-yv17DnGy.cjs +1 -0
  62. package/dist/vue-ui-dumbbell-BJEf_JEq.cjs +9 -0
  63. package/dist/vue-ui-dumbbell-DIsDnD1d.js +624 -0
  64. package/dist/vue-ui-flow-BTivYoGd.js +454 -0
  65. package/dist/vue-ui-flow-DOxJa8di.cjs +1 -0
  66. package/dist/vue-ui-galaxy-BEmywfFB.js +485 -0
  67. package/dist/vue-ui-galaxy-CHGOwCwM.cjs +1 -0
  68. package/dist/vue-ui-gauge-QAfMl-8t.cjs +1 -0
  69. package/dist/vue-ui-gauge-o4rDOqF3.js +466 -0
  70. package/dist/vue-ui-heatmap-BS4EzedX.cjs +1 -0
  71. package/dist/vue-ui-heatmap-DwqQqEsk.js +598 -0
  72. package/dist/vue-ui-kpi-F4qkJ_U-.cjs +1 -0
  73. package/dist/vue-ui-kpi-h8elYTcA.js +54 -0
  74. package/dist/vue-ui-mini-loader-C_8B2Pm6.cjs +1 -0
  75. package/dist/vue-ui-mini-loader-Cgoi9rhH.js +131 -0
  76. package/dist/vue-ui-molecule-Bmv76SWz.js +750 -0
  77. package/dist/vue-ui-molecule-C5CY_YYc.cjs +1 -0
  78. package/dist/vue-ui-mood-radar-BN0dzlfp.cjs +1 -0
  79. package/dist/vue-ui-mood-radar-DeMouUIe.js +548 -0
  80. package/dist/vue-ui-nested-donuts-ZyFoV-Zn.cjs +16 -0
  81. package/dist/vue-ui-nested-donuts-wOUkSVyZ.js +771 -0
  82. package/dist/vue-ui-onion-DCOKG2wG.js +554 -0
  83. package/dist/vue-ui-onion-VmTUo7TR.cjs +1 -0
  84. package/dist/vue-ui-parallel-coordinate-plot-BGtO2P4a.js +651 -0
  85. package/dist/vue-ui-parallel-coordinate-plot-BziXRF8E.cjs +8 -0
  86. package/dist/vue-ui-quadrant--JOTjPZh.js +1178 -0
  87. package/dist/vue-ui-quadrant-DawUUrur.cjs +1 -0
  88. package/dist/vue-ui-quick-chart-LXKfaJgS.js +1310 -0
  89. package/dist/vue-ui-quick-chart-jFlFtiNV.cjs +13 -0
  90. package/dist/vue-ui-radar-CWNIqvcA.js +614 -0
  91. package/dist/vue-ui-radar-VGH-lhaT.cjs +1 -0
  92. package/dist/vue-ui-rating-BNrIoJHN.js +271 -0
  93. package/dist/vue-ui-rating-Dtu6pwGx.cjs +1 -0
  94. package/dist/vue-ui-relation-circle-B3NKudOy.js +304 -0
  95. package/dist/vue-ui-relation-circle-Dwpx9o18.cjs +1 -0
  96. package/dist/vue-ui-rings-CsUngX_F.js +510 -0
  97. package/dist/vue-ui-rings-D9_OG--0.cjs +1 -0
  98. package/dist/vue-ui-scatter-DUsuh7bd.cjs +1 -0
  99. package/dist/vue-ui-scatter-DgxTz4Jx.js +874 -0
  100. package/dist/vue-ui-screenshot-51H_VrYY.js +160 -0
  101. package/dist/vue-ui-screenshot-C2Dz7CAe.cjs +3 -0
  102. package/dist/vue-ui-skeleton-BM9rwmxY.js +2064 -0
  103. package/dist/vue-ui-skeleton-sjfOtCZr.cjs +41 -0
  104. package/dist/vue-ui-smiley-DNnBtHht.cjs +2 -0
  105. package/dist/vue-ui-smiley-H5rSN-1B.js +763 -0
  106. package/dist/vue-ui-spark-trend-CLXZDYlk.js +246 -0
  107. package/dist/vue-ui-spark-trend-R4JJvfry.cjs +1 -0
  108. package/dist/vue-ui-sparkbar-C0k4ah-7.js +242 -0
  109. package/dist/vue-ui-sparkbar-CEUDIw0A.cjs +1 -0
  110. package/dist/vue-ui-sparkgauge-BHj00A07.js +157 -0
  111. package/dist/vue-ui-sparkgauge-CaEw6nmI.cjs +1 -0
  112. package/dist/vue-ui-sparkhistogram-B6GuavEu.cjs +1 -0
  113. package/dist/vue-ui-sparkhistogram-DbMLYKqE.js +244 -0
  114. package/dist/vue-ui-sparkline-CJydanLS.cjs +1 -0
  115. package/dist/vue-ui-sparkline-CYova9x3.js +333 -0
  116. package/dist/vue-ui-sparkstackbar-Df__yM5b.cjs +1 -0
  117. package/dist/vue-ui-sparkstackbar-N5rVBM2h.js +244 -0
  118. package/dist/vue-ui-strip-plot-DJJ1vEWz.js +618 -0
  119. package/dist/vue-ui-strip-plot-b5lhB35d.cjs +1 -0
  120. package/dist/vue-ui-table-NHhOVDbs.cjs +14 -0
  121. package/dist/vue-ui-table-heatmap-Cro2etCY.js +237 -0
  122. package/dist/vue-ui-table-heatmap-DlL2nCqz.cjs +1 -0
  123. package/dist/vue-ui-table-sparkline-Bw2Gc_ur.cjs +1 -0
  124. package/dist/vue-ui-table-sparkline-DppMitqF.js +420 -0
  125. package/dist/vue-ui-table-xSvwJIa7.js +1430 -0
  126. package/dist/vue-ui-thermometer-M2kdp1x5.js +385 -0
  127. package/dist/vue-ui-thermometer-Q_3PX2V3.cjs +1 -0
  128. package/dist/vue-ui-timer-BtSDeIRp.cjs +64 -0
  129. package/dist/vue-ui-timer-CAaQ-QD6.js +453 -0
  130. package/dist/vue-ui-tiremarks-CbGOSEvD.cjs +1 -0
  131. package/dist/vue-ui-tiremarks-JFv4JLP0.js +249 -0
  132. package/dist/vue-ui-treemap-BqDX-bPf.cjs +1 -0
  133. package/dist/vue-ui-treemap-DCnv-xYr.js +722 -0
  134. package/dist/vue-ui-vertical-bar-CEbApJZl.js +737 -0
  135. package/dist/vue-ui-vertical-bar-CJB_KXyr.cjs +4 -0
  136. package/dist/vue-ui-waffle-CTS6C7gu.js +638 -0
  137. package/dist/vue-ui-waffle-IMEbGe-b.cjs +1 -0
  138. package/dist/vue-ui-wheel-CuOmEWMQ.cjs +1 -0
  139. package/dist/vue-ui-wheel-_zyCdFiI.js +227 -0
  140. package/dist/vue-ui-word-cloud-RDlXBEAN.js +346 -0
  141. package/dist/vue-ui-word-cloud-Y7Yk7uUJ.cjs +1 -0
  142. package/dist/vue-ui-xy-BZJQBKnU.cjs +3 -0
  143. package/dist/vue-ui-xy-DsvN9EIQ.js +2064 -0
  144. package/dist/vue-ui-xy-canvas-D_dnbyFS.cjs +9 -0
  145. package/dist/vue-ui-xy-canvas-Dbcw8-9Q.js +1006 -0
  146. package/package.json +1 -1
  147. package/dist/index-BcMihqI4.cjs +0 -843
  148. package/dist/index-C7FeCQ7K.js +0 -57303
@@ -0,0 +1,371 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("./html2canvas.esm-BA_v9SIU.cjs"),b=require("./jspdf.es.min-DLYY9DTT.cjs"),u=require("./index-p5gfZSvB.cjs"),o=require("vue"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),C={props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{shapes:[],lastSelectedShape:void 0}}}},data(){return{activeShape:void 0,strokeSize:1,currentPointer:{start:{x:0,y:0},end:{x:0,end:0}},currentTarget:void 0,hoveredShapeId:void 0,isBold:!1,isBulletTextMode:!1,isDash:!1,isDeleteMode:!1,isDrawing:!1,isDrawingNewShape:!0,isDrawMode:!1,isItalic:!1,isMouseDown:!1,isMoveMode:!1,isPrinting:!1,isResizeMode:!1,isSelectMode:!1,isSummaryOpen:!1,isTextMode:!1,isUnderline:!1,isWriting:!1,lastSelectedShape:this.dataset.lastSelectedShape,pointerDownId:-1,pointerPosition:{x:0,y:0},preventEdit:!0,selectedGroup:[],shapes:this.dataset.shapes?this.dataset.shapes:[],shapesOrder:[],step:Math.round(Math.random())*1e5,svgHeight:1e3,svgWidth:1e3,options:{arrow:{color:"grey",filled:!0},circle:{color:"grey",filled:!1,radius:3,strokeWidth:2},rect:{color:"grey",filled:!1,strokeWidth:2,height:12,width:12}},selectedColor:"#000000",showCaret:!1,sizeRatio:1,slottedSvg:void 0,sourceWidth:1,sourceHeight:1,textAlign:"start",textFont:20,transparency:100,transparencyCodes:u.opacity}},watch:{shapes:{handler(e){e.length===0&&(this.lastSelectedShape=void 0)}}},computed:{FINAL_CONFIG(){const e=u.useConfig().vue_ui_annotator;if(!Object.keys(this.config||{}).length)return e;const l=this.treeShake({defaultConfig:e,userConfig:this.config});return this.convertConfigColors(l)},canSelect(){return this.shapes.filter(e=>!["line","group"].includes(e.type)).length>1},colorTransparency(){return this.transparencyCodes[this.transparency>98?98:this.transparency]},cursorClass(){switch(!0){case this.isDeleteMode:return"default";case this.isMoveMode:return"move";case this.isTextMode:return"text";case this.isResizeMode:return"se-resize";default:return""}},records(){return this.shapes},userShapes(){return this.records.map(e=>{switch(!0){case(e&&e.type==="arrow"):const l=e.strokeWidth>3?5:10,s=e.strokeWidth>3?2.5:5;return`
2
+ <defs>
3
+ <marker
4
+ id="${e.id}"
5
+ markerWidth="${l}"
6
+ markerHeight="${l}"
7
+ refX="0"
8
+ refY="${s}"
9
+ orient="auto"
10
+ >
11
+ <polygon
12
+ points="0 0,${l} ${s}, 0 ${l}"
13
+ fill="${e.color}"
14
+ />
15
+ </marker>
16
+ </defs>
17
+ ${this.includeSelectionIndicator(e)}
18
+ <g id="${e.id}">
19
+ <path
20
+ style="stroke-linecap: round !important; ${e.isDash?`stroke-dasharray: ${e.strokeWidth*3}`:""}"
21
+ stroke="${e.color}"
22
+ id="${e.id}"
23
+ d="M${e.x},${e.y} ${e.endX},${e.endY}"
24
+ stroke-width="${e.strokeWidth}"
25
+ marker-end="url(#${e.id})"
26
+ />
27
+ </g>
28
+ <g id="${e.id}">
29
+ <rect
30
+ id="${e.id}"
31
+ x="${e.x-10}"
32
+ y="${e.y-10}"
33
+ height="20"
34
+ width="20"
35
+ fill="rgba(0,0,0,0.3)"
36
+ style="display:${this.isResizeMode||this.isMoveMode?"initial":"none"}; rx:1 !important; ry:1 !important;"
37
+ />
38
+ </g>
39
+ ${this.includeDeleteButton(e)}
40
+ </g>
41
+ `;case(e&&e.type==="circle"):return`
42
+ <g id="${e.id}">
43
+ ${this.includeSelectionIndicator(e)}
44
+ <circle
45
+ id="${e.id}"
46
+ cx="${e.x}"
47
+ cy="${e.y}"
48
+ r="${e.circleRadius?e.circleRadius:Number.MIN_VALUE}"
49
+ fill="${e.isFilled?e.color+e.alpha:"rgba(255,255,255,0.001)"}"
50
+ stroke="${e.color+e.alpha}"
51
+ stroke-width="${e.strokeWidth}"
52
+ style="${e.isDash?`stroke-dasharray: ${e.strokeWidth*3}`:""}"
53
+ >
54
+ </circle>
55
+ </g>
56
+
57
+ ${this.includeDeleteButton(e)}`;case(e&&e.type==="group"):return`<g id="${e.id}">
58
+ <rect
59
+ id="${this.isResizeMode?"":e.id}"
60
+ x="${e.x}"
61
+ y="${e.y}"
62
+ fill="transparent"
63
+ height="${e.rectHeight}"
64
+ width="${e.rectWidth}"
65
+ stroke="grey"
66
+ stroke-width="1"
67
+ style="rx:1 !important; ry:1 !important; ${e.isDash?`stroke-dasharray: ${e.strokeWidth*3}`:""}; display:${this.isSelectMode||this.isDeleteMode||this.hoveredShapeId&&this.hoveredShapeId===e.id?"initial":"none"};"
68
+ />
69
+ <g id="${e.id}">
70
+ ${e.content?e.content:""}
71
+ </g>
72
+ ${this.includeDeleteButton(e)}
73
+ </g> `;case(e&&e.type==="rect"):return`<g id="${e.id}">
74
+ ${this.includeSelectionIndicator(e)}
75
+ <rect
76
+ id="${this.isResizeMode?"":e.id}"
77
+ x="${e.x}"
78
+ y="${e.y}"
79
+ fill="${e.isFilled?e.color+e.alpha:"rgba(255,255,255,0.001)"}"
80
+ height="${e.rectHeight}"
81
+ width="${e.rectWidth}"
82
+ stroke="${e.color+e.alpha}"
83
+ stroke-width="${e.strokeWidth}"
84
+ style="rx:1 !important; ry:1 !important; ${e.isDash?`stroke-dasharray: ${e.strokeWidth*3}`:""}"
85
+ />
86
+ <rect id="${e.id}"
87
+ x="${e.x+e.rectWidth}"
88
+ y="${e.y+e.rectHeight}"
89
+ height="20"
90
+ width="20"
91
+ fill="rgba(0,0,0,0.3)"
92
+ style="display:${this.isResizeMode?"initial":"none"}; rx:1 !important; ry:1 !important;"
93
+ />
94
+ ${this.includeDeleteButton(e)}
95
+ </g> `;case(e&&e.type==="line"):return`
96
+ <g id="${e.id}">
97
+ <path
98
+ id="${e.id}"
99
+ d="M${e.path?e.path:""}"
100
+ style="stroke:${e.color+e.alpha} !important; fill:none; stroke-width:${e.strokeWidth} !important; stroke-linecap: round !important; stroke-linejoin: round !important;"
101
+ />
102
+ ${this.includeDeleteButton(e)}
103
+ </g>
104
+ `;case(e&&e.type==="text"):const n=e.textContent.split("‎"),i=[];for(let t=0;t<n.length;t+=1)i.push(`
105
+ ${e.isBulletTextMode?`<tspan x="${e.x-e.fontSize}" y="${e.y+e.fontSize*t}" id="${e.id}" font-size="${e.fontSize/2}">⬤</tspan>`:""}
106
+ <tspan id="${e.id}" x="${e.x}" y="${e.y+e.fontSize*t}">
107
+ ${n[t]}
108
+ </tspan>`);return`
109
+ ${this.includeSelectionIndicator(e)}
110
+ ${this.computeTextElement(e,i,e.isBulletTextMode)}
111
+ `}})}},mounted(){const e=this.$refs.drawSvgContainer;let l=!1;this.walkTheDOM(e,i=>{if(!l&&["DIV","svg","section","canvas"].includes(i.tagName)){this.slottedSvg=i,l=!0;return}});const s=this.slottedSvg.getBoundingClientRect();this.sizeRatio=s.height/s.width,this.svgWidth=1e3,this.svgHeight=this.sizeRatio*1e3,this.sourceWidth=s.width,this.sourceHeight=s.height,new ResizeObserver(i=>{i.forEach(t=>{this.sourceWidth=t.contentRect.width,this.sourceHeight=t.contentRect.height,this.sizeRatio=t.contentRect.height/t.contentRect.width,this.svgHeight=this.sizeRatio*1e3})}).observe(this.slottedSvg),window.addEventListener("keydown",i=>{this.write(i)})},destroyed(){window.removeEventListener("keydown",e=>{this.write(e)})},methods:{treeShake:u.treeShake,convertConfigColors:u.convertConfigColors,bringShapeTo(e){const l=this.shapes.find(s=>s.id===this.lastSelectedShape.id);switch(!0){case e==="front":this.shapes=this.shapes.filter(s=>s.id!==l.id),this.shapes.push(l);break;case e==="back":this.shapes=this.shapes.filter(s=>s.id!==l.id),this.shapes=[l,...this.shapes];break;default:return}},clickSvg(e){if(this.isDeleteMode)return;this.deleteEmptyTextElement(),this.isTextMode?(this.isWriting=!0,this.showCaret=!0):(this.isWriting=!1,this.showCaret=!1,this.isTextMode=!1);let l=`text_${Math.random()*1e4}_${Math.random()*99999}`;if(this.isWriting){this.shapes.push({id:l,type:"text",lines:0,x:this.pointerPosition.x,y:this.pointerPosition.y,textContent:"",fontSize:this.copy(this.textFont),textAlign:this.copy(this.textAlign),isBold:this.copy(this.isBold),isItalic:this.copy(this.isItalic),isUnderline:this.copy(this.isUnderline),color:this.copy(this.selectedColor),isBulletTextMode:this.copy(this.isBulletTextMode)}),this.currentTarget=this.shapes.at(-1),this.lastSelectedShape=this.shapes.at(-1);return}const s=()=>{this.isDash=this.shapes.find(i=>i.id===e.target.id).isDash},n=()=>{this.strokeSize=this.shapes.find(i=>i.id===e.target.id).strokeWidth};if(this.isSelectMode=!1,e.target.id.includes("arrow")){this.activeShape="arrow",s(),n();return}if(e.target.id.includes("circle")){this.activeShape="circle",this.options.circle.filled=this.shapes.find(i=>i.id===e.target.id).isFilled,s(),n();return}if(e.target.id.includes("rect")){this.activeShape="rect",this.options.rect.filled=this.shapes.find(i=>i.id===e.target.id).isFilled,s(),n();return}if(e.target.id.includes("line")){this.activeShape="line",n();return}if(e.target.id.includes("text")){this.isTextMode=!0,this.isWriting=!0,this.showCaret=!0;const i=this.shapes.find(t=>t.id===e.target.id);i&&i.textAlign&&(this.textAlign=this.shapes.find(t=>t.id===e.target.id).textAlign),i&&(this.isBulletTextMode=this.shapes.find(t=>t.id===e.target.id).isBulletTextMode);return}},copyPaste(){const e={...this.lastSelectedShape,id:`${this.lastSelectedShape.id}_copy`,x:this.lastSelectedShape.x-100<0?1:this.lastSelectedShape.x-100,y:this.lastSelectedShape.y-100<0?1:this.lastSelectedShape.y-100};this.shapes.push(e)},includeDeleteButton(e,l=!1){switch(!0){case e.type==="circle":return`
112
+ <g id="${e.id}" style="display:${this.isDeleteMode?"initial":"none"};">
113
+ <circle id="${e.id}" cx="${e.x}" cy="${e.y}" r="12" fill="red"/>
114
+ <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}"/>
115
+ <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}"/>
116
+ </g>
117
+ `;case e.type==="text":let s,n=[-8,-12,-4,-12,-4];switch(!0){case e.textAlign==="start":l?s=[-20,-24,-16,-16,-24]:s=[-16,-20,-12,-12,-20];break;case e.textAlign==="middle":s=[0,-4,4,4,-4],n=[-32,-36,-28,-36,-28];break;case e.textAlign==="end":s=[16,20,12,12,20];break;default:s=[0,0,0];break}return`
118
+ <g id="${e.id}" style="display:${this.isDeleteMode?"initial":"none"};">
119
+ <circle id="${e.id}" cx="${e.x+s[0]}" cy="${e.y+n[0]}" r="12" fill="red"/>
120
+ <line stroke="white" stroke-width="2" id="${e.id}" x1="${e.x+s[1]}" y1="${e.y+n[1]}" x2="${e.x+s[2]}" y2="${e.y+n[2]}"/>
121
+ <line stroke="white" stroke-width="2" id="${e.id}" x1="${e.x+s[3]}" y1="${e.y+n[3]}" x2="${e.x+s[4]}" y2="${e.y+n[4]}"/>
122
+ </g>
123
+ `;default:return`
124
+ <g id="${e.id}" style="display:${this.isDeleteMode?"initial":"none"};">
125
+ <circle id="${e.id}" cx="${e.x-4}" cy="${e.y-4}" r="12" fill="red"/>
126
+ <line stroke="white" stroke-width="2" id="${e.id}" x1="${e.x-8}" y1="${e.y-8}" x2="${e.x}" y2="${e.y}"/>
127
+ <line stroke="white" stroke-width="2" id="${e.id}" x1="${e.x}" y1="${e.y-8}" x2="${e.x-8}" y2="${e.y}"/>
128
+ </g>
129
+ `}},includeSelectionIndicator(e){if(e)switch(!0){case e.type==="rect":return`
130
+ <rect
131
+ id="${e.id}"
132
+ style="stroke-dasharray: 10; display:${this.hoveredShapeId&&this.hoveredShapeId===e.id?"initial":"none"}"
133
+ x="${e.x-20}"
134
+ y="${e.y-20}"
135
+ height="${e.rectHeight+40}"
136
+ width="${e.rectWidth+40}"
137
+ fill="transparent"
138
+ stroke="grey"
139
+ />
140
+ `;case e.type==="circle":return`
141
+ <rect
142
+ id="${e.id}"
143
+ style="stroke-dasharray: 10; display:${this.hoveredShapeId&&this.hoveredShapeId===e.id?"initial":"none"}"
144
+ x="${e.x-e.circleRadius-20}"
145
+ y="${e.y-e.circleRadius-20}"
146
+ height="${e.circleRadius*2+40}"
147
+ width="${e.circleRadius*2+40}"
148
+ fill="transparent"
149
+ stroke="grey"
150
+ />
151
+ `;case e.type==="arrow":const l=e.endX-e.x>0,s=e.endY-e.y>0;return`
152
+ <rect
153
+ id="${e.id}"
154
+ style="stroke-dasharray: 10; display:${this.hoveredShapeId&&this.hoveredShapeId===e.id?"initial":"none"}"
155
+ x="${l?e.x-20:e.endX-20}"
156
+ y="${s?e.y-20:e.endY-20}"
157
+ height="${s?e.endY-e.y+40:e.y-e.endY+40}"
158
+ width="${l?e.endX-e.x+40:e.x-e.endX+40}"
159
+ fill="transparent"
160
+ stroke="grey"
161
+ />
162
+ `;case e.type==="text":const n=Array.from(document.getElementsByTagName("text")).find(c=>c.id===e.id);if(!n)return;const{x:i,y:t,width:r,height:d}=n.getBBox();return`
163
+ <rect
164
+ id="${e.id}"
165
+ style="stroke-dasharray: 10; display:${this.hoveredShapeId&&this.hoveredShapeId===e.id?"initial":"none"}"
166
+ x="${i-20}"
167
+ y="${t-20}"
168
+ height="${d+40}"
169
+ width="${r+40}"
170
+ fill="transparent"
171
+ stroke="grey"
172
+ />
173
+ `;default:return""}},allowEditAndHoverShapes(e){e.preventDefault(),this.preventEdit=!1,e.target&&e.target.id&&(this.hoveredShapeId=e.target.id)},setSelectedTextAlignTo(e){!this.lastSelectedShape||this.lastSelectedShape.type!=="text"||(this.lastSelectedShape.textAlign=e)},undoLastShape(){this.lastSelectedShape=void 0,this.shapes=this.shapes.slice(0,-1)},write(e){if(this.preventEdit)return;e.preventDefault();const l=e.keyCode;if(!this.isWriting)return;this.showCaret=!0;let s;if(this.lastSelectedShape.type==="text"?s=this.shapes.find(i=>i.id===this.lastSelectedShape.id):s=this.shapes.at(-1),this.currentTarget=s,s.type!=="text")return;this.currentTarget.isBold=this.copy(this.isBold),this.currentTarget.isItalic=this.copy(this.isItalic),this.currentTarget.isUnderline=this.copy(this.isUnderline);const n=[16,17,18,20,27,33,34,35,36,37,38,39,40,45,91,112,113,114,115,116,117,118,119,120,121,122,123,221,255,"Unidentified"];switch(!0){case l===8:s.textContent=s.textContent.slice(0,-1);break;case l===9:s.textContent+="&nbsp; &nbsp; &nbsp; &nbsp;";break;case l===13:s.lines+=1,s.textContent+="‎";return;case n.includes(l):return;default:s.textContent+=e.key}},groupShapes(){if(this.selectedGroup=[],this.activeShape!=="group"){this.isSelectMode=!1,this.shapes=this.shapes.filter(l=>l.type!=="group");return}const e=this.shapes.at(-1);if(this.shapes.forEach(l=>{if(l.type!=="group")switch(!0){case l.type==="arrow":const s=l.x<=l.endX&&l.y<=l.endY&&e.x<=l.x&&e.y<=l.y&&e.x+e.rectWidth>=l.endX&&e.y+e.rectHeight>=l.endY,n=l.endY<l.y&&l.x<l.endX&&e.x<=l.x&&e.y<=l.y&&e.x+e.rectWidth>=l.endX&&e.y+e.rectHeight>=l.y,i=l.x>l.endX&&l.y<l.endY&&e.x<=l.endX&&e.y<=l.endY&&e.x+e.rectWidth>=l.x&&e.y+e.rectHeight>=l.endY,t=l.x>l.endX&&l.y>l.endY&&e.x<=l.endX&&e.y<=l.endY&&e.x+e.rectWidth>=l.x&&e.y+e.rectHeight>=l.y;(s||n||i||t)&&this.selectedGroup.push(l);break;case l.type==="circle":e.x<=l.x+l.circleRadius&&e.y<=l.y+l.circleRadius&&l.x+l.circleRadius<=e.x+e.rectWidth&&l.y+l.circleRadius<=e.y+e.rectHeight&&this.selectedGroup.push(l);break;case l.type==="rect":e.x<=l.x&&e.y<=l.y&&l.x<=e.x+e.rectWidth&&l.y<=e.y+e.rectHeight&&l.x+l.rectWidth<=e.x+e.rectWidth&&l.y+l.rectHeight<=e.y+e.rectHeight&&l.rectWidth<=e.rectWidth&&l.rectHeight<=e.rectHeight&&this.selectedGroup.push(l);break;case l.type==="text":e.x<=l.x&&e.y<=l.y&&this.selectedGroup.push(l);break}}),this.selectedGroup=this.selectedGroup.map(l=>({...l,id:e.id,oldId:l.id,diffX:l.x-e.x,diffY:l.y-e.y,diffEndX:l.endX?l.endX-e.x:0,diffEndY:l.endY?l.endY-e.y:0})),e.source=this.selectedGroup,this.selectedGroup.length>1){const l=this.copy(this.selectedGroup).map(s=>s.oldId);this.shapes=this.shapes.filter(s=>!l.includes(s.id)),this.selectedGroup.forEach(s=>{switch(!0){case s.type==="circle":e.content+=`
174
+ <circle
175
+ id="${s.id}"
176
+ cx="${s.x}"
177
+ cy="${s.y}"
178
+ r="${s.circleRadius?s.circleRadius:Number.MIN_VALUE}"
179
+ fill="${s.isFilled?s.color+s.alpha:"rgba(255,255,255,0.001)"}"
180
+ stroke="${s.color+s.alpha}"
181
+ stroke-width="${s.strokeWidth}"
182
+ style="${s.isDash?`stroke-dasharray: ${s.strokeWidth*3}`:""}"
183
+ />
184
+ `;break;case s.type==="rect":e.content+=`
185
+ <rect
186
+ id="${this.isResizeMode?"":s.id}"
187
+ x="${s.x}"
188
+ y="${s.y}"
189
+ fill="${s.isFilled?s.color+s.alpha:"rgba(255,255,255,0.001)"}"
190
+ height="${s.rectHeight}"
191
+ width="${s.rectWidth}"
192
+ stroke="${s.color+s.alpha}"
193
+ stroke-width="${s.strokeWidth}"
194
+ style="rx:1 !important; ry:1 !important; ${s.isDash?`stroke-dasharray: ${s.strokeWidth*3}`:""}"
195
+ />
196
+ `;break;case s.type==="arrow":const n=s.strokeWidth>3?5:10,i=s.strokeWidth>3?2.5:5,t=Date.now();e.content+=`
197
+ <g id="${s.id}">
198
+ <defs>
199
+ <marker
200
+ id="${t}"
201
+ markerWidth="${n}"
202
+ markerHeight="${n}"
203
+ refX="0"
204
+ refY="${i}"
205
+ orient="auto"
206
+ >
207
+ <polygon
208
+ points="0 0,${n} ${i}, 0 ${n}"
209
+ fill="${s.color}"
210
+ />
211
+ </marker>
212
+ </defs>
213
+
214
+ <path
215
+ style="stroke-linecap: round !important; ${s.isDash?`stroke-dasharray: ${s.strokeWidth*3}`:""}"
216
+ stroke="${s.color}"
217
+ id="${s.id}"
218
+ d="M${s.x},${s.y} ${s.endX},${s.endY}"
219
+ stroke-width="${s.strokeWidth}"
220
+ marker-end="url(#${t})"
221
+ />
222
+ </g>
223
+ `;break;case s.type==="text":const r=s.textContent.split("‎"),d=[];for(let c=0;c<r.length;c+=1)d.push(`
224
+ ${s.isBulletTextMode?`<tspan x="${s.x-s.fontSize}" y="${s.y+s.fontSize*c}" id="${s.id}" font-size="${s.fontSize/2}">⬤</tspan>`:""}
225
+ <tspan id="${s.id}" x="${s.x}" y="${s.y+s.fontSize*c}">
226
+ ${r[c]}
227
+ </tspan>`);e.content+=`
228
+ ${this.computeTextElement(s,d,s.isBulletTextMode)}
229
+ `;break}})}else this.shapes=this.shapes.filter(l=>l.id!==e.id)},moveGroup(e){e.content="",e.x=this.copy(this.pointerPosition.x)-e.rectWidth/2,e.y=this.copy(this.pointerPosition.y)-e.rectHeight/2,e.source.forEach(l=>{switch(!0){case l.type==="circle":e.content+=`
230
+ <circle
231
+ id="${l.id}"
232
+ cx="${this.copy(this.pointerPosition.x)+l.diffX-e.rectWidth/2}"
233
+ cy="${this.copy(this.pointerPosition.y)+l.diffY-e.rectHeight/2}"
234
+ r="${l.circleRadius?l.circleRadius:Number.MIN_VALUE}"
235
+ fill="${l.isFilled?l.color+l.alpha:"rgba(255,255,255,0.001)"}"
236
+ stroke="${l.color+l.alpha}"
237
+ stroke-width="${l.strokeWidth}"
238
+ style="${l.isDash?`stroke-dasharray: ${l.strokeWidth*3}`:""}"
239
+ />
240
+ `;break;case l.type==="rect":e.content+=`
241
+ <rect
242
+ id="${this.isResizeMode?"":l.id}"
243
+ x="${this.copy(this.pointerPosition.x)+l.diffX-e.rectWidth/2}"
244
+ y="${this.copy(this.pointerPosition.y)+l.diffY-e.rectHeight/2}"
245
+ fill="${l.isFilled?l.color+l.alpha:"rgba(255,255,255,0.001)"}"
246
+ height="${l.rectHeight}"
247
+ width="${l.rectWidth}"
248
+ stroke="${l.color+l.alpha}"
249
+ stroke-width="${l.strokeWidth}"
250
+ style="rx:1 !important; ry:1 !important; ${l.isDash?`stroke-dasharray: ${l.strokeWidth*3}`:""}"
251
+ />
252
+ `;break;case l.type==="arrow":const s=l.strokeWidth>3?5:10,n=l.strokeWidth>3?2.5:5,i=Date.now();e.content+=`
253
+ <g id="${l.id}">
254
+ <defs>
255
+ <marker
256
+ id="${i}"
257
+ markerWidth="${s}"
258
+ markerHeight="${s}"
259
+ refX="0"
260
+ refY="${n}"
261
+ orient="auto"
262
+ >
263
+ <polygon
264
+ points="0 0,${s} ${n}, 0 ${s}"
265
+ fill="${l.color}"
266
+ />
267
+ </marker>
268
+ </defs>
269
+
270
+ <path
271
+ style="stroke-linecap: round !important; ${l.isDash?`stroke-dasharray: ${l.strokeWidth*3}`:""}"
272
+ stroke="${l.color}"
273
+ id="${l.id}"
274
+ d="M${this.copy(this.pointerPosition.x)+l.diffX-e.rectWidth/2},${this.copy(this.pointerPosition.y)+l.diffY-e.rectHeight/2} ${this.copy(this.pointerPosition.x)+l.diffEndX-e.rectWidth/2},${this.copy(this.pointerPosition.y)+l.diffEndY-e.rectHeight/2}"
275
+ stroke-width="${l.strokeWidth}"
276
+ marker-end="url(#${i})"
277
+ />
278
+ </g>
279
+ `;break;case l.type==="text":const t=l.textContent.split("‎"),r=[];for(let d=0;d<t.length;d+=1)r.push(`
280
+ ${l.isBulletTextMode?`<tspan x="${this.copy(this.pointerPosition.x)+l.diffX-l.fontSize-e.rectWidth/2}" y="${this.copy(this.pointerPosition.y)+l.diffY+l.fontSize*d-e.rectHeight/2}" id="${l.id}" font-size="${l.fontSize/2}">⬤</tspan>`:""}
281
+ <tspan id="${l.id}" x="${this.copy(this.pointerPosition.x)+l.diffX-e.rectWidth/2}" y="${this.copy(this.pointerPosition.y)+l.diffY+l.fontSize*d-e.rectHeight/2}">
282
+ ${t[d]}
283
+ </tspan>`);e.content+=`
284
+ ${this.computeTextElement(l,r,l.isBulletTextMode)}
285
+ `;break}})},chooseAction(e){switch(e.preventDefault(),this.isMouseDown=!0,!0){case this.isDrawMode:this.drawDown();break}},chooseMove(e){switch(e.preventDefault(),e.target.localName!=="svg"&&(this.currentTarget=e.target),!0){case(this.isMoveMode&&this.isMouseDown):this.moveDown();break;case(this.isResizeMode&&this.isMouseDown):this.resize();break}},computeCaretPosition(e){switch(!0){case e.textAlign==="middle":return`<path stroke="black" stroke-width="2" d="M${e.x},${e.y-e.fontSize} ${e.x},${e.y-e.fontSize-15}" /> <path 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}"/>`;case e.textAlign==="start":const l=e.isBulletTextMode?e.fontSize:0;return`<path d="M${e.x-20-l},${e.y-e.fontSize/6} ${e.x-5-l},${e.y-e.fontSize/6}" stroke="black" stroke-width="2" />
286
+ <path d="M${e.x-10-l},${e.y-e.fontSize/3} ${e.x-5-l},${e.y-e.fontSize/6} ${e.x-10-l},${e.y}" stroke="black" stroke-width="2">`;case e.textAlign==="end":return`<path d="M${e.x+20},${e.y-e.fontSize/6} ${e.x+5},${e.y-e.fontSize/6}" stroke="black" stroke-width="2" />
287
+ <path 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">`;default:return""}},computeTextElement(e,l,s=!1){switch(!0){case e.textAlign==="start":return`
288
+ <g id="${e.id}">
289
+ <rect
290
+ id="${e.id}"
291
+ style="display:${this.lastSelectedShape&&this.lastSelectedShape.id===e.id?"initial":"none"};"
292
+ x="${e.x}"
293
+ y="${e.y-50}"
294
+ height="${e.lines===0||e.lines===1?e.fontSize*4:e.fontSize*2*e.lines}"
295
+ width="100"
296
+ fill="rgba(0,0,0,0)"
297
+ />
298
+ <text
299
+ style="user-select:none; height:100px;"
300
+ id="${e.id}"
301
+ x="${e.x}"
302
+ y="${e.y}"
303
+ text-anchor="${e.textAlign}"
304
+ font-size="${e.fontSize}"
305
+ fill="${e.color}"
306
+ font-weight="${e.isBold?"bold":"normal"}"
307
+ font-style="${e.isItalic?"italic":"normal"}"
308
+ text-decoration="${e.isUnderline?"underline":"none"}"
309
+ >
310
+ ${l.join("")}
311
+ </text>
312
+ ${this.showCaret&&this.lastSelectedShape&&this.lastSelectedShape.id===e.id?this.computeCaretPosition(e):""}
313
+ ${this.includeDeleteButton(e,s)}
314
+ </g>
315
+ `;case e.textAlign==="middle":return`
316
+ <g id="${e.id}">
317
+ <rect
318
+ id="${e.id}"
319
+ style="display:${this.lastSelectedShape&&this.lastSelectedShape.id===e.id?"initial":"none"};"
320
+ x="${e.x-50}"
321
+ y="${e.y-50}"
322
+ height="${e.lines===0||e.lines===1?e.fontSize*4:e.fontSize*2*e.lines}"
323
+ width="100"
324
+ fill="rgba(0,0,0,0)"
325
+ />
326
+ <text
327
+ style="user-select:none; height:100px;"
328
+ id="${e.id}"
329
+ x="${e.x}"
330
+ y="${e.y}"
331
+ text-anchor="${e.textAlign}"
332
+ font-size="${e.fontSize}"
333
+ fill="${e.color}"
334
+ font-weight="${e.isBold?"bold":"normal"}"
335
+ font-style="${e.isItalic?"italic":"normal"}"
336
+ text-decoration="${e.isUnderline?"underline":"none"}"
337
+ >
338
+ ${l.join("")}
339
+ </text>
340
+ ${this.showCaret&&this.lastSelectedShape&&this.lastSelectedShape.id===e.id?this.computeCaretPosition(e):""}
341
+ ${this.includeDeleteButton(e)}
342
+ </g>
343
+ `;case e.textAlign==="end":return`
344
+ <g id="${e.id}">
345
+ <rect
346
+ id="${e.id}"
347
+ style="display:${this.lastSelectedShape&&this.lastSelectedShape.id===e.id?"initial":"none"};"
348
+ x="${e.x-100}"
349
+ y="${e.y-50}"
350
+ height="${e.lines===0||e.lines===1?e.fontSize*4:e.fontSize*2*e.lines}"
351
+ width="100"
352
+ fill="rgba(0,0,0,0)"
353
+ />
354
+ <text
355
+ style="user-select:none; height:100px;"
356
+ id="${e.id}"
357
+ x="${e.x}"
358
+ y="${e.y}"
359
+ text-anchor="${e.textAlign}"
360
+ font-size="${e.fontSize}"
361
+ fill="${e.color}"
362
+ font-weight="${e.isBold?"bold":"normal"}"
363
+ font-style="${e.isItalic?"italic":"normal"}"
364
+ text-decoration="${e.isUnderline?"underline":"none"}"
365
+ >
366
+ ${l.join("")}
367
+ </text>
368
+ ${this.showCaret&&this.lastSelectedShape&&this.lastSelectedShape.id===e.id?this.computeCaretPosition(e):""}
369
+ ${this.includeDeleteButton(e)}
370
+ </g>
371
+ `;default:return""}},copy(e){return JSON.parse(JSON.stringify(e))},clickShape(e){const l=e.target.id;switch(!0){case this.isDeleteMode:this.shapes=[...this.shapes].filter(s=>s.id!==l),this.lastSelectedShape=void 0;break;default:this.lastSelectedShape=this.shapes.find(s=>s.id===l);break}},deleteEmptyTextElement(){!this.lastSelectedShape||!this.lastSelectedShape.id.includes("text")||this.lastSelectedShape.textContent===""&&(this.shapes=this.shapes.filter(e=>e.id!==this.lastSelectedShape.id),this.lastSelectedShape=this.shapes.at(-1))},drawUp(e=!1){if(!this.activeShape||!this.isDrawing)return;this.currentPointer.end={x:this.pointerPosition.x,y:this.pointerPosition.y};let l;this.shapes.length>0&&this.currentTarget&&(l=[...this.shapes].find(d=>d.id===this.currentTarget.id));let s,n,i;l&&(s=l.x-this.currentPointer.end.x,n=l.y-this.currentPointer.end.y,i=Math.sqrt(s*s+n*n));let t,r;e?(t=Math.max(this.currentPointer.end.x,l.x),r=Math.min(this.currentPointer.end.x,l.x),Math.max(this.currentPointer.end.y,l.y),Math.min(this.currentPointer.end.y,l.y)):(t=Math.max(this.currentPointer.end.x,this.currentPointer.start.x),r=Math.min(this.currentPointer.end.x,this.currentPointer.start.x),Math.max(this.currentPointer.end.y,this.currentPointer.start.y),Math.min(this.currentPointer.end.y,this.currentPointer.start.y)),this.$nextTick(()=>{switch(!0){case this.activeShape==="arrow":this.shapes.at(-1).endX=this.currentPointer.end.x,this.shapes.at(-1).endY=this.currentPointer.end.y;break;case this.activeShape==="circle":const d=20;this.shapes.at(-1).circleRadius=this.isDrawingNewShape?this.copy(t-r)+d:i+d;break;case this.activeShape==="line":this.shapes.at(-1).path+=` ${this.pointerPosition.x} ${this.pointerPosition.y} `;break;case["rect","group"].includes(this.activeShape):const c=20;this.shapes.at(-1).rectWidth=this.copy(this.currentPointer.end.x-this.shapes.at(-1).x)>0?this.copy(this.currentPointer.end.x-this.shapes.at(-1).x):c,this.shapes.at(-1).rectHeight=this.copy(this.currentPointer.end.y-this.shapes.at(-1).y)>0?this.copy(this.currentPointer.end.y-this.shapes.at(-1).y):c}})},drawDown(){if(this.isDrawing=!0,!this.activeShape&&!this.isSelectMode||!this.isDrawing)return;this.isDrawingNewShape=!0,this.currentPointer.start={x:this.pointerPosition.x,y:this.pointerPosition.y};let e=`${this.isSelectMode?"group":this.activeShape}_${Math.random()*1e4}_${Date.now()}`;switch(!0){case this.activeShape==="arrow":this.shapes.push({id:e,x:this.pointerPosition.x,y:this.pointerPosition.y,endX:this.pointerPosition.x,endY:this.pointerPosition.y,type:this.activeShape,color:this.copy(this.selectedColor),strokeWidth:this.copy(Math.abs(this.strokeSize)),isDash:this.copy(this.isDash)}),this.lastSelectedShape=this.shapes.at(-1);break;case this.activeShape==="circle":this.shapes.push({alpha:this.options.circle.filled?this.colorTransparency:"",id:e,color:this.copy(this.selectedColor),isFilled:this.copy(this.options.circle.filled),circleRadius:this.copy(this.options.circle.radius),circleStrokeWidth:this.copy(this.options.circle.strokeWidth),type:this.activeShape,x:this.pointerPosition.x,y:this.pointerPosition.y,strokeWidth:this.copy(Math.abs(this.strokeSize)),isDash:this.copy(this.isDash)}),this.lastSelectedShape=this.shapes.at(-1);break;case this.activeShape==="line":this.shapes.push({alpha:this.copy(this.colorTransparency),id:e,x:this.pointerPosition.x,y:this.pointerPosition.y,type:this.activeShape,color:this.copy(this.selectedColor),strokeWidth:this.copy(Math.abs(this.strokeSize)),isDash:this.copy(this.isDash),path:`${this.pointerPosition.x} ${this.pointerPosition.y}`}),this.lastSelectedShape=this.shapes.at(-1);break;case this.activeShape==="rect":this.shapes.push({alpha:this.options.rect.filled?this.colorTransparency:"",id:e,color:this.copy(this.selectedColor),isFilled:this.copy(this.options.rect.filled),rectStrokeWidth:this.copy(this.options.rect.strokeWidth),rectHeight:this.copy(this.options.rect.height),rectWidth:this.copy(this.options.rect.width),type:this.activeShape,x:this.pointerPosition.x,y:this.pointerPosition.y,strokeWidth:this.copy(Math.abs(this.strokeSize)),isDash:this.copy(this.isDash)}),this.lastSelectedShape=this.shapes.at(-1);break;case this.activeShape==="group":this.shapes.push({alpha:1,id:`group_${Math.random()*1e4}_${Date.now()}`,x:this.pointerPosition.x,y:this.pointerPosition.y,isFilled:!1,rectHeight:this.copy(this.options.rect.height),rectWidth:this.copy(this.options.rect.width),rectStrokeWidth:1,type:"group",color:"grey",strokeWidth:1,isDash:!0,content:""});break}if((this.pointerDownId!==-1||!this.isDrawing)&&(clearInterval(this.pointerDownId),this.pointerDownId=-1),this.pointerDownId===-1&&this.isDrawing){this.pointerDownId=setInterval(this.drawUp,1);return}},move(e){if(!(!e||!e.id||e.type==="line"))switch(this.lastSelectedShape=e,!0){case e.type==="arrow":e.x=this.copy(this.pointerPosition.x),e.y=this.copy(this.pointerPosition.y);break;case e.type==="circle":e.x=this.copy(this.pointerPosition.x),e.y=this.copy(this.pointerPosition.y);break;case e.type==="group":this.moveGroup(e);break;case e.type==="rect":e.x=this.copy(this.pointerPosition.x-e.rectWidth/2),e.y=this.copy(this.pointerPosition.y-e.rectHeight/2);break;case e.type==="text":const l=Array.from(document.getElementsByTagName("text")).find(r=>r.id===e.id);if(!l)return;const{x:s,y:n,width:i,height:t}=l.getBBox();e.textAlign==="start"&&(e.x=this.copy(this.pointerPosition.x-i/2)),e.textAlign==="middle"&&(e.x=this.copy(this.pointerPosition.x)),e.textAlign==="end"&&(e.x=this.copy(this.pointerPosition.x+i/2)),e.lines>1?e.y=this.copy(this.pointerPosition.y-t/3):e.y=this.copy(this.pointerPosition.y+e.fontSize/2);break}},moveDown(){if(!this.currentTarget||!this.currentTarget.id)return;const e=this.currentTarget.id,l=this.shapes.find(s=>s.id===e);this.shapes=this.shapes.filter(s=>s.id!==e),this.shapes.push(l),this.pointerDownId===-1&&e&&this.move(l)},print(){this.isPrinting=!0,this.isDeleteMode=!1,this.isMoveMode=!1,this.isResizeMode=!1,this.isTextMode=!1,this.isWriting=!1,this.isSelectMode=!1,this.activeShape=void 0,this.showCaret=!1,this.$nextTick(()=>{const e=this.$refs.drawSvgContainer,l={height:851.89,width:595.28};this.walkTheDOM(e,s=>{s&&s.nodeType===1&&(s.setAttribute("font-family","Helvetica"),s.style.fontFamily="Helvetica",s.replaceWith(s))}),I.default(e).then(s=>{const n=s.width,i=s.height,t=n/l.width*l.height;let r=i,d=0;const c=l.width,y=582.28/n*i,N=s.toDataURL("image/png",1),h=new b.E("","pt","a4");if(r<t)h.addImage(N,"PNG",0,0,c,y,"","FAST");else for(;r>0;)h.addImage(N,"PNG",0,d,c,y,"","FAST"),r-=t,d-=l.height-24,r>0&&h.addPage();h.save(`${new Date().toLocaleDateString()}_annotations.pdf`)}).finally(()=>{this.isPrinting=!1,this.walkTheDOM(e,s=>{s&&s.nodeType===1&&(s.setAttribute("font-family",this.FINAL_CONFIG.style.fontFamily),s.style.fontFamily=this.FINAL_CONFIG.style.fontFamily,s.replaceWith(s))})})})},resetDraw(){this.isDrawing=!1,this.isMouseDown=!1,this.pointerDownId=-1,this.isSelectMode&&this.groupShapes(),clearInterval(this.pointerDownId)},resize(){this.isDrawingNewShape=!1;const e=this.currentTarget.id;if(!e)return;this.isDrawing=!0;const l=this.shapes.find(s=>s.id===e);this.activeShape=l.type,this.shapes=this.shapes.filter(s=>s.id!==e),this.shapes.push(l),this.drawUp(!0)},setFillOfSelectedRect(){!this.lastSelectedShape||!this.lastSelectedShape.id.includes("rect")||(this.lastSelectedShape.isFilled=!this.lastSelectedShape.isFilled)},setFillOfSelectedCircle(){!this.lastSelectedShape||!this.lastSelectedShape.id.includes("circle")||(this.lastSelectedShape.isFilled=!this.lastSelectedShape.isFilled)},setColorOfSelectedShape(){this.lastSelectedShape&&(this.lastSelectedShape.color=this.copy(this.selectedColor),!["arrow","text"].includes(this.lastSelectedShape.id)&&(this.lastSelectedShape.alpha=this.copy(this.colorTransparency)))},setSelectedShapeToDash(){!this.lastSelectedShape||this.lastSelectedShape.type==="text"||(this.lastSelectedShape.isDash=this.copy(this.isDash))},setTransparencyOfSelectedShape(){!this.lastSelectedShape||["arrow","text"].includes(this.lastSelectedShape.id)||(this.lastSelectedShape.alpha=this.copy(this.colorTransparency))},setStrokeWidthOfSelectedShape(){!this.lastSelectedShape||!["arrow","circle","rect","line"].includes(this.lastSelectedShape.type)||(this.lastSelectedShape.strokeWidth=this.copy(Math.abs(this.strokeSize)))},setCurrentStyleOfSelectedText(){!this.lastSelectedShape||this.lastSelectedShape.type!=="text"||(this.lastSelectedShape.isBold=this.copy(this.isBold),this.lastSelectedShape.isItalic=this.copy(this.isItalic),this.lastSelectedShape.isUnderline=this.copy(this.isUnderline),this.lastSelectedShape.fontSize=this.copy(this.textFont),this.lastSelectedShape.isBulletTextMode=this.copy(this.isBulletTextMode))},setPointer(e){e.preventDefault();const s=this.$refs.mainSvg.getBoundingClientRect();let n,i;e.touches&&e.touches.length>0?(n=e.touches[0].clientX,i=e.touches[0].clientY):(n=e.clientX,i=e.clientY),this.pointerPosition.x=(n-s.left)/s.width*this.svgWidth,this.pointerPosition.y=(i-s.top)/s.height*this.svgHeight},setShapeTo(e){if(this.showCaret=!1,this.deleteEmptyTextElement(),e===this.activeShape){this.activeShape=void 0,this.isDrawMode=!1;return}this.isDrawMode=!0,this.isDeleteMode=!1,this.isMoveMode=!1,this.isResizeMode=!1,this.isTextMode=!1,this.activeShape=e},toggleSummary(){this.isSummaryOpen=!this.isSummaryOpen,this.isSummaryOpen||(this.isMoveMode=!1,this.isResizeMode=!1,this.isTextMode=!1,this.isWriting=!1,this.activeShape=void 0,this.showCaret=!1,this.isDeleteMode=!1,this.isWriting=!1),this.$emit("toggleOpenState",{isOpen:this.isSummaryOpen})},walkTheDOM(e,l){for(l(e),e=e.firstChild;e;)this.walkTheDOM(e,l),e=e.nextSibling},save(){this.$emit("saveAnnotations",{shapes:this.shapes,lastSelectedShape:this.lastSelectedShape})}}},a=e=>(o.pushScopeId("data-v-3611298e"),e=e(),o.popScopeId(),e),S={class:"vue-ui-annotator"},x={"data-html2canvas-ignore":""},f={class:"tool-selection",style:{"margin-top":"24px"}},k=["disabled"],g=o.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="80%" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" data-v-3611298e><path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3611298e></path><path d="M18 9l3 3l-3 3" data-v-3611298e></path><path d="M15 12h6" data-v-3611298e></path><path d="M6 9l-3 3l3 3" data-v-3611298e></path><path d="M3 12h6" data-v-3611298e></path><path d="M9 18l3 3l3 -3" data-v-3611298e></path><path d="M12 15v6" data-v-3611298e></path><path d="M15 6l-3 -3l-3 3" data-v-3611298e></path><path d="M12 3v6" data-v-3611298e></path></svg>',1),m=["disabled"],p=a(()=>o.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"80%",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),o.createElementVNode("path",{d:"M4 11v8a1 1 0 0 0 1 1h8m-9 -14v-1a1 1 0 0 1 1 -1h1m5 0h2m5 0h1a1 1 0 0 1 1 1v1m0 5v2m0 5v1a1 1 0 0 1 -1 1h-1"}),o.createElementVNode("path",{d:"M4 12h7a1 1 0 0 1 1 1v7"})],-1)),_=["disabled"],v=o.createStaticVNode('<svg width="80%" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" data-v-3611298e><path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3611298e></path><path d="M4 7l16 0" data-v-3611298e></path><path d="M10 11l0 6" data-v-3611298e></path><path d="M14 11l0 6" data-v-3611298e></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12" data-v-3611298e></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3" data-v-3611298e></path></svg>',1),w=["disabled"],A={style:{width:"80%"},viewBox:"0 0 24 24"},M=a(()=>o.createElementVNode("path",{fill:"currentColor",d:"M1,1V5H2V19H1V23H5V22H19V23H23V19H22V5H23V1H19V2H5V1M5,4H19V5H20V19H19V20H5V19H4V5H5M6,6V14H9V18H18V9H14V6M8,8H12V12H8M14,11H16V16H11V14H14"},null,-1)),O=[M],L=["disabled"],G={style:{width:"80%"},viewBox:"0 0 24 24"},z=a(()=>o.createElementVNode("path",{fill:"currentColor",d:"M2,2H11V6H9V4H4V9H6V11H2V2M22,13V22H13V18H15V20H20V15H18V13H22M8,8H16V16H8V8Z"},null,-1)),B=[z],T=["disabled"],D={style:{width:"80%"},viewBox:"0 0 24 24"},V=a(()=>o.createElementVNode("path",{fill:"currentColor",d:"M2,2H11V11H2V2M9,4H4V9H9V4M22,13V22H13V13H22M15,20H20V15H15V20M16,8V11H13V8H16M11,16H8V13H11V16Z"},null,-1)),E=[V],R=["disabled"],H=a(()=>o.createElementVNode("svg",{width:"80%",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),o.createElementVNode("path",{d:"M7 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"}),o.createElementVNode("path",{d:"M17 17v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h2"})],-1)),W=["disabled"],P=a(()=>o.createElementVNode("svg",{width:"80%",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),o.createElementVNode("path",{d:"M9 14l-4 -4l4 -4"}),o.createElementVNode("path",{d:"M5 10h11a4 4 0 1 1 0 8h-1"})],-1)),X=o.createStaticVNode('<svg width="80%" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" data-v-3611298e><path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3611298e></path><path d="M17 17h2a2 2 0 0 0 2 -2v-4a2 2 0 0 0 -2 -2h-14a2 2 0 0 0 -2 2v4a2 2 0 0 0 2 2h2" data-v-3611298e></path><path d="M17 9v-4a2 2 0 0 0 -2 -2h-6a2 2 0 0 0 -2 2v4" data-v-3611298e></path><path d="M7 13m0 2a2 2 0 0 1 2 -2h6a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-6a2 2 0 0 1 -2 -2z" data-v-3611298e></path></svg>',1),U=o.createStaticVNode('<svg width="100%" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" data-v-3611298e><path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3611298e></path><path d="M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2" data-v-3611298e></path><path d="M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" data-v-3611298e></path><path d="M14 4l0 4l-6 0l0 -4" data-v-3611298e></path></svg>',1),Y={class:"tool-selection",style:{"margin-top":"6px"}},j={viewBox:"0 0 12 12",style:{width:"100%"}},q=["fill"],Z={key:0,class:"tool-input"},J={for:"circleFill"},K=["checked"],Q={viewBox:"0 0 12 12",style:{width:"100%"}},$=["fill"],ee={key:1,class:"tool-input"},te={for:"rectFill"},oe=["checked"],ie={viewBox:"0 0 24 24",style:{width:"100%"}},le=["stroke"],se=a(()=>o.createElementVNode("svg",{width:"80%",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),o.createElementVNode("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)),re={key:2},ne={style:{display:"flex","flex-direction":"column","align-items":"center","justify-content":"center"}},de={for:"textFont",style:{"font-size":"0.7em"}},ce={key:3},ae={style:{display:"flex","flex-direction":"column","align-items":"center","justify-content":"center"}},he={for:"dashStyle",style:{"font-size":"0.7em"}},ue={viewBox:"0 0 24 24",height:"24",width:"24",style:{"margin-bottom":"-5px","margin-top":"-10px"}},ye=a(()=>o.createElementVNode("line",{x1:"0",x2:"24",y1:"12",y2:"12","stroke-width":"2",stroke:"black","stroke-dasharray":"3"},null,-1)),Ne=[ye],Ie=["checked"],be={style:{width:"80%"},viewBox:"0 0 24 24",fill:"currentColor"},Fe=a(()=>o.createElementVNode("path",{d:"M18.5,4L19.66,8.35L18.7,8.61C18.25,7.74 17.79,6.87 17.26,6.43C16.73,6 16.11,6 15.5,6H13V16.5C13,17 13,17.5 13.33,17.75C13.67,18 14.33,18 15,18V19H9V18C9.67,18 10.33,18 10.67,17.75C11,17.5 11,17 11,16.5V6H8.5C7.89,6 7.27,6 6.74,6.43C6.21,6.87 5.75,7.74 5.3,8.61L4.34,8.35L5.5,4H18.5Z"},null,-1)),Ce=[Fe],Se={key:4},xe={style:{display:"flex","flex-direction":"column","align-items":"center","justify-content":"center"}},fe={for:"textFont",style:{"font-size":"0.7em"}},ke={key:5},ge=o.createStaticVNode('<svg width="80%" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" data-v-3611298e><path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3611298e></path><path d="M4 6l16 0" data-v-3611298e></path><path d="M4 12l10 0" data-v-3611298e></path><path d="M4 18l14 0" data-v-3611298e></path></svg>',1),me={key:6},pe=["disabled"],_e=o.createStaticVNode('<svg width="80%" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" data-v-3611298e><path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3611298e></path><path d="M4 6l16 0" data-v-3611298e></path><path d="M8 12l8 0" data-v-3611298e></path><path d="M6 18l12 0" data-v-3611298e></path></svg>',1),ve={key:7},we=["disabled"],Ae=o.createStaticVNode('<svg width="80%" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" data-v-3611298e><path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3611298e></path><path d="M4 6l16 0" data-v-3611298e></path><path d="M10 12l10 0" data-v-3611298e></path><path d="M6 18l14 0" data-v-3611298e></path></svg>',1),Me={key:8},Oe=o.createStaticVNode('<svg width="100%" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" data-v-3611298e><path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3611298e></path><path d="M9 6l11 0" data-v-3611298e></path><path d="M9 12l11 0" data-v-3611298e></path><path d="M9 18l11 0" data-v-3611298e></path><path d="M5 6l0 .01" data-v-3611298e></path><path d="M5 12l0 .01" data-v-3611298e></path><path d="M5 18l0 .01" data-v-3611298e></path></svg>',1),Le={key:9},Ge=a(()=>o.createElementVNode("svg",{width:"100%",viewBox:"0 0 24 24","stroke-width":"3",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),o.createElementVNode("path",{d:"M7 5h6a3.5 3.5 0 0 1 0 7h-6z"}),o.createElementVNode("path",{d:"M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7"})],-1)),ze={key:10},Be=o.createStaticVNode('<svg width="100%" height="44" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" data-v-3611298e><path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3611298e></path><path d="M11 5l6 0" data-v-3611298e></path><path d="M7 19l6 0" data-v-3611298e></path><path d="M14 5l-4 14" data-v-3611298e></path></svg>',1),Te={key:11},De=a(()=>o.createElementVNode("svg",{width:"100%",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),o.createElementVNode("path",{d:"M7 5v5a5 5 0 0 0 10 0v-5"}),o.createElementVNode("path",{d:"M5 19h14"})],-1)),Ve={style:{display:"flex","flex-direction":"column","align-items":"center","justify-content":"center"},class:"tooltip"},Ee={style:{display:"flex","flex-direction":"column","align-items":"start","justify-content":"center"}},Re={for:"colorTransparency",style:{"font-size":"0.7em"}},He={class:"annotator annotator__wrapper",ref:"drawSvgContainer",style:{position:"relative"}},We=["viewBox","width","height"],Pe=["id","innerHTML"],Xe=["height","viewBox","width"],Ue=["cx","cy"];function Ye(e,l,s,n,i,t){return o.openBlock(),o.createElementBlock("div",S,[o.createElementVNode("div",x,[o.createElementVNode("details",{class:"vue-ui-annotator-summary",onToggle:l[36]||(l[36]=(...r)=>t.toggleSummary&&t.toggleSummary(...r)),style:o.normalizeStyle(`${i.isSummaryOpen?"padding-bottom: 12px":""}; background: ${t.FINAL_CONFIG.style.backgroundColor}; color:${t.FINAL_CONFIG.style.color}; ${t.FINAL_CONFIG.style.fixedTools&&i.isSummaryOpen?"position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 1;":""}`)},[o.createElementVNode("summary",null,o.toDisplayString(t.FINAL_CONFIG.translations.title),1),o.createElementVNode("div",f,[o.createElementVNode("button",{disabled:i.shapes.length===0,style:o.normalizeStyle({background:i.isMoveMode?t.FINAL_CONFIG.style.buttons.controls.selected.backgroundColor:t.FINAL_CONFIG.style.buttons.controls.backgroundColor,border:i.isMoveMode?t.FINAL_CONFIG.style.buttons.controls.selected.border:t.FINAL_CONFIG.style.buttons.controls.border,color:i.isMoveMode?t.FINAL_CONFIG.style.buttons.controls.selected.color:t.FINAL_CONFIG.style.buttons.controls.color,borderRadius:`${t.FINAL_CONFIG.style.buttons.borderRadius}px`}),class:o.normalizeClass({"button-tool":!0,"button-tool--selected":i.isMoveMode,tooltip:!0}),onClick:l[0]||(l[0]=r=>{t.deleteEmptyTextElement(),i.isMoveMode=!i.isMoveMode,i.activeShape=void 0,i.isDeleteMode=!1,i.isDrawMode=!1,i.isResizeMode=!1,i.isSelectMode=!1,i.isTextMode=!1,i.isWriting=!1,i.showCaret=!1})},[g,t.FINAL_CONFIG.style.showTooltips?(o.openBlock(),o.createElementBlock("span",{key:0,class:"tooltiptext",style:o.normalizeStyle({backgroundColor:t.FINAL_CONFIG.style.tooltips.backgroundColor,color:t.FINAL_CONFIG.style.tooltips.color,border:t.FINAL_CONFIG.style.tooltips.border,borderRadius:`${t.FINAL_CONFIG.style.tooltips.borderRadius}px`,boxShadow:t.FINAL_CONFIG.style.tooltips.boxShadow})},o.toDisplayString(t.FINAL_CONFIG.translations.tooltipMove),5)):o.createCommentVNode("",!0)],14,k),o.createElementVNode("button",{disabled:i.shapes.length===0||i.activeShape==="line",style:o.normalizeStyle({background:i.isResizeMode?t.FINAL_CONFIG.style.buttons.controls.selected.backgroundColor:t.FINAL_CONFIG.style.buttons.controls.backgroundColor,border:i.isResizeMode?t.FINAL_CONFIG.style.buttons.controls.selected.border:t.FINAL_CONFIG.style.buttons.controls.border,color:i.isResizeMode?t.FINAL_CONFIG.style.buttons.controls.selected.color:t.FINAL_CONFIG.style.buttons.controls.color,borderRadius:`${t.FINAL_CONFIG.style.buttons.borderRadius}px`}),class:o.normalizeClass({"button-tool":!0,"button-tool--selected":i.isResizeMode,tooltip:!0}),onClick:l[1]||(l[1]=r=>{t.deleteEmptyTextElement(),i.isResizeMode=!i.isResizeMode,i.isMoveMode=!1,i.isDeleteMode=!1,i.isDrawMode=!1,i.isSelectMode=!1,i.isTextMode=!1,i.isWriting=!1,i.activeShape=void 0,i.showCaret=!1})},[p,t.FINAL_CONFIG.style.showTooltips?(o.openBlock(),o.createElementBlock("span",{key:0,class:"tooltiptext",style:o.normalizeStyle({backgroundColor:t.FINAL_CONFIG.style.tooltips.backgroundColor,color:t.FINAL_CONFIG.style.tooltips.color,border:t.FINAL_CONFIG.style.tooltips.border,borderRadius:`${t.FINAL_CONFIG.style.tooltips.borderRadius}px`,boxShadow:t.FINAL_CONFIG.style.tooltips.boxShadow})},o.toDisplayString(t.FINAL_CONFIG.translations.tooltipResize),5)):o.createCommentVNode("",!0)],14,m),o.createElementVNode("button",{disabled:i.shapes.length===0,style:o.normalizeStyle({background:i.isDeleteMode?t.FINAL_CONFIG.style.buttons.controls.selected.backgroundColor:t.FINAL_CONFIG.style.buttons.controls.backgroundColor,border:i.isDeleteMode?t.FINAL_CONFIG.style.buttons.controls.selected.border:t.FINAL_CONFIG.style.buttons.controls.border,color:i.isDeleteMode?t.FINAL_CONFIG.style.buttons.controls.selected.color:t.FINAL_CONFIG.style.buttons.controls.color,borderRadius:`${t.FINAL_CONFIG.style.buttons.borderRadius}px`}),class:o.normalizeClass({"button-tool":!0,"button-tool--selected":i.isDeleteMode,tooltip:!0}),onClick:l[2]||(l[2]=r=>{t.deleteEmptyTextElement(),i.isDeleteMode=!i.isDeleteMode,i.isMoveMode=!1,i.isResizeMode=!1,i.isSelectMode=!1,i.isTextMode=!1,i.isWriting=!1,i.activeShape=void 0,i.showCaret=!1})},[v,t.FINAL_CONFIG.style.showTooltips?(o.openBlock(),o.createElementBlock("span",{key:0,class:"tooltiptext",style:o.normalizeStyle({backgroundColor:t.FINAL_CONFIG.style.tooltips.backgroundColor,color:t.FINAL_CONFIG.style.tooltips.color,border:t.FINAL_CONFIG.style.tooltips.border,borderRadius:`${t.FINAL_CONFIG.style.tooltips.borderRadius}px`,boxShadow:t.FINAL_CONFIG.style.tooltips.boxShadow})},o.toDisplayString(t.FINAL_CONFIG.translations.tooltipDelete),5)):o.createCommentVNode("",!0)],14,_),o.createElementVNode("button",{disabled:!t.canSelect,style:o.normalizeStyle({background:i.isSelectMode?t.FINAL_CONFIG.style.buttons.controls.selected.backgroundColor:t.FINAL_CONFIG.style.buttons.controls.backgroundColor,border:i.isSelectMode?t.FINAL_CONFIG.style.buttons.controls.selected.border:t.FINAL_CONFIG.style.buttons.controls.border,color:i.isSelectMode?t.FINAL_CONFIG.style.buttons.controls.selected.color:t.FINAL_CONFIG.style.buttons.controls.color,borderRadius:`${t.FINAL_CONFIG.style.buttons.borderRadius}px`}),class:o.normalizeClass({"button-tool":!0,"button-tool--selected":i.isSelectMode,tooltip:!0}),onClick:l[3]||(l[3]=r=>{t.deleteEmptyTextElement(),t.setShapeTo("group"),i.isSelectMode=!i.isSelectMode,i.isDeleteMode=!1,i.isMoveMode=!1,i.isResizeMode=!1,i.isTextMode=!1,i.isWriting=!1,i.activeShape="group",i.showCaret=!1})},[(o.openBlock(),o.createElementBlock("svg",A,O)),t.FINAL_CONFIG.style.showTooltips?(o.openBlock(),o.createElementBlock("span",{key:0,class:"tooltiptext",style:o.normalizeStyle({backgroundColor:t.FINAL_CONFIG.style.tooltips.backgroundColor,color:t.FINAL_CONFIG.style.tooltips.color,border:t.FINAL_CONFIG.style.tooltips.border,borderRadius:`${t.FINAL_CONFIG.style.tooltips.borderRadius}px`,boxShadow:t.FINAL_CONFIG.style.tooltips.boxShadow})},o.toDisplayString(t.FINAL_CONFIG.translations.tooltipGroup),5)):o.createCommentVNode("",!0)],14,w),o.createElementVNode("button",{disabled:i.shapes.length===0,style:o.normalizeStyle({background:t.FINAL_CONFIG.style.buttons.controls.backgroundColor,border:t.FINAL_CONFIG.style.buttons.controls.border,color:t.FINAL_CONFIG.style.buttons.controls.color,borderRadius:`${t.FINAL_CONFIG.style.buttons.borderRadius}px`}),class:o.normalizeClass({"button-tool":!0,tooltip:!0}),onClick:l[4]||(l[4]=r=>{i.isResizeMode=!1,i.isMoveMode=!0,i.isDeleteMode=!1,i.isDrawMode=!1,i.isSelectMode=!1,i.isTextMode=!1,i.isWriting=!1,i.showCaret=!1,t.bringShapeTo("front")})},[(o.openBlock(),o.createElementBlock("svg",G,B)),t.FINAL_CONFIG.style.showTooltips?(o.openBlock(),o.createElementBlock("span",{key:0,class:"tooltiptext",style:o.normalizeStyle({backgroundColor:t.FINAL_CONFIG.style.tooltips.backgroundColor,color:t.FINAL_CONFIG.style.tooltips.color,border:t.FINAL_CONFIG.style.tooltips.border,borderRadius:`${t.FINAL_CONFIG.style.tooltips.borderRadius}px`,boxShadow:t.FINAL_CONFIG.style.tooltips.boxShadow})},o.toDisplayString(t.FINAL_CONFIG.translations.tooltipBringToFront),5)):o.createCommentVNode("",!0)],12,L),o.createElementVNode("button",{disabled:i.shapes.length===0,style:o.normalizeStyle({background:t.FINAL_CONFIG.style.buttons.controls.backgroundColor,border:t.FINAL_CONFIG.style.buttons.controls.border,color:t.FINAL_CONFIG.style.buttons.controls.color,borderRadius:`${t.FINAL_CONFIG.style.buttons.borderRadius}px`}),class:o.normalizeClass({"button-tool":!0,tooltip:!0}),onClick:l[5]||(l[5]=r=>{i.isResizeMode=!1,i.isMoveMode=!0,i.isDeleteMode=!1,i.isDrawMode=!1,i.isSelectMode=!1,i.isTextMode=!1,i.isWriting=!1,i.showCaret=!1,t.bringShapeTo("back")})},[(o.openBlock(),o.createElementBlock("svg",D,E)),t.FINAL_CONFIG.style.showTooltips?(o.openBlock(),o.createElementBlock("span",{key:0,class:"tooltiptext",style:o.normalizeStyle({backgroundColor:t.FINAL_CONFIG.style.tooltips.backgroundColor,color:t.FINAL_CONFIG.style.tooltips.color,border:t.FINAL_CONFIG.style.tooltips.border,borderRadius:`${t.FINAL_CONFIG.style.tooltips.borderRadius}px`,boxShadow:t.FINAL_CONFIG.style.tooltips.boxShadow})},o.toDisplayString(t.FINAL_CONFIG.translations.tooltipBringToBack),5)):o.createCommentVNode("",!0)],12,T),o.createElementVNode("button",{disabled:i.shapes.length===0||i.activeShape==="line",style:o.normalizeStyle({background:t.FINAL_CONFIG.style.buttons.controls.backgroundColor,border:t.FINAL_CONFIG.style.buttons.controls.border,color:t.FINAL_CONFIG.style.buttons.controls.color,borderRadius:`${t.FINAL_CONFIG.style.buttons.borderRadius}px`}),class:o.normalizeClass({"button-tool":!0,tooltip:!0}),onClick:l[6]||(l[6]=r=>{t.deleteEmptyTextElement(),i.isResizeMode=!1,i.isMoveMode=!0,i.isDeleteMode=!1,i.isDrawMode=!1,i.isSelectMode=!1,i.isTextMode=!1,i.isWriting=!1,i.showCaret=!1,t.copyPaste()})},[H,t.FINAL_CONFIG.style.showTooltips?(o.openBlock(),o.createElementBlock("span",{key:0,class:"tooltiptext",style:o.normalizeStyle({backgroundColor:t.FINAL_CONFIG.style.tooltips.backgroundColor,color:t.FINAL_CONFIG.style.tooltips.color,border:t.FINAL_CONFIG.style.tooltips.border,borderRadius:`${t.FINAL_CONFIG.style.tooltips.borderRadius}px`,boxShadow:t.FINAL_CONFIG.style.tooltips.boxShadow})},o.toDisplayString(t.FINAL_CONFIG.translations.tooltipDuplicate),5)):o.createCommentVNode("",!0)],12,R),o.createElementVNode("button",{disabled:i.shapes.length===0,style:o.normalizeStyle({background:t.FINAL_CONFIG.style.buttons.controls.backgroundColor,border:t.FINAL_CONFIG.style.buttons.controls.border,color:t.FINAL_CONFIG.style.buttons.controls.color,borderRadius:`${t.FINAL_CONFIG.style.buttons.borderRadius}px`}),class:o.normalizeClass({"button-tool":!0,"button-tool--one-shot":!0,tooltip:!0}),onClick:l[7]||(l[7]=r=>{i.isResizeMode=!1,i.isMoveMode=!1,i.isDeleteMode=!1,i.isDrawMode=!1,i.isSelectMode=!1,i.isTextMode=!1,i.isWriting=!1,i.activeShape=void 0,i.showCaret=!1,t.undoLastShape()})},[P,t.FINAL_CONFIG.style.showTooltips?(o.openBlock(),o.createElementBlock("span",{key:0,class:"tooltiptext",style:o.normalizeStyle({backgroundColor:t.FINAL_CONFIG.style.tooltips.backgroundColor,color:t.FINAL_CONFIG.style.tooltips.color,border:t.FINAL_CONFIG.style.tooltips.border,borderRadius:`${t.FINAL_CONFIG.style.tooltips.borderRadius}px`,boxShadow:t.FINAL_CONFIG.style.tooltips.boxShadow})},o.toDisplayString(t.FINAL_CONFIG.translations.tooltipUndo),5)):o.createCommentVNode("",!0)],12,W),t.FINAL_CONFIG.style.showPrint?(o.openBlock(),o.createElementBlock("button",{key:0,style:o.normalizeStyle({background:t.FINAL_CONFIG.style.buttons.controls.backgroundColor,border:t.FINAL_CONFIG.style.buttons.controls.border,color:t.FINAL_CONFIG.style.buttons.controls.color,borderRadius:`${t.FINAL_CONFIG.style.buttons.borderRadius}px`}),class:o.normalizeClass({"button-tool":!0,tooltip:!0}),onClick:l[8]||(l[8]=(...r)=>t.print&&t.print(...r))},[X,t.FINAL_CONFIG.style.showTooltips?(o.openBlock(),o.createElementBlock("span",{key:0,class:"tooltiptext",style:o.normalizeStyle({backgroundColor:t.FINAL_CONFIG.style.tooltips.backgroundColor,color:t.FINAL_CONFIG.style.tooltips.color,border:t.FINAL_CONFIG.style.tooltips.border,borderRadius:`${t.FINAL_CONFIG.style.tooltips.borderRadius}px`,boxShadow:t.FINAL_CONFIG.style.tooltips.boxShadow})},o.toDisplayString(t.FINAL_CONFIG.translations.tooltipPdf),5)):o.createCommentVNode("",!0)],4)):o.createCommentVNode("",!0),t.FINAL_CONFIG.style.showSave?(o.openBlock(),o.createElementBlock("button",{key:1,style:o.normalizeStyle({background:t.FINAL_CONFIG.style.buttons.controls.backgroundColor,border:t.FINAL_CONFIG.style.buttons.controls.border,color:t.FINAL_CONFIG.style.buttons.controls.color,borderRadius:`${t.FINAL_CONFIG.style.buttons.borderRadius}px`}),class:o.normalizeClass({"button-tool":!0,tooltip:!0}),onClick:l[9]||(l[9]=(...r)=>t.save&&t.save(...r))},[U,t.FINAL_CONFIG.style.showTooltips?(o.openBlock(),o.createElementBlock("span",{key:0,class:"tooltiptext",style:o.normalizeStyle({backgroundColor:t.FINAL_CONFIG.style.tooltips.backgroundColor,color:t.FINAL_CONFIG.style.tooltips.color,border:t.FINAL_CONFIG.style.tooltips.border,borderRadius:`${t.FINAL_CONFIG.style.tooltips.borderRadius}px`,boxShadow:t.FINAL_CONFIG.style.tooltips.boxShadow})},o.toDisplayString(t.FINAL_CONFIG.translations.tooltipSave),5)):o.createCommentVNode("",!0)],4)):o.createCommentVNode("",!0)]),o.createElementVNode("div",Y,[o.createElementVNode("button",{class:o.normalizeClass({"button-tool":!0,"button-tool--selected":i.activeShape==="circle",tooltip:!0}),style:o.normalizeStyle({background:i.activeShape==="circle"?t.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor:t.FINAL_CONFIG.style.buttons.shapes.backgroundColor,border:i.activeShape==="circle"?t.FINAL_CONFIG.style.buttons.shapes.selected.border:t.FINAL_CONFIG.style.buttons.shapes.border,color:i.activeShape==="circle"?t.FINAL_CONFIG.style.buttons.shapes.selected.color:t.FINAL_CONFIG.style.buttons.shapes.color,borderRadius:`${t.FINAL_CONFIG.style.buttons.borderRadius}px`}),onClick:l[10]||(l[10]=r=>{t.setShapeTo("circle"),i.isSelectMode=!1})},[(o.openBlock(),o.createElementBlock("svg",j,[o.createElementVNode("circle",{cx:6,cy:6,r:"4",fill:i.options.circle.filled?(i.activeShape==="circle",i.selectedColor+t.colorTransparency):"none",stroke:"currentColor"},null,8,q)])),t.FINAL_CONFIG.style.showTooltips?(o.openBlock(),o.createElementBlock("span",{key:0,class:"tooltiptext",style:o.normalizeStyle({backgroundColor:t.FINAL_CONFIG.style.tooltips.backgroundColor,color:t.FINAL_CONFIG.style.tooltips.color,border:t.FINAL_CONFIG.style.tooltips.border,borderRadius:`${t.FINAL_CONFIG.style.tooltips.borderRadius}px`,boxShadow:t.FINAL_CONFIG.style.tooltips.boxShadow})},o.toDisplayString(t.FINAL_CONFIG.translations.tooltipShapeCircle),5)):o.createCommentVNode("",!0)],6),i.activeShape==="circle"?(o.openBlock(),o.createElementBlock("div",Z,[o.createElementVNode("label",J,o.toDisplayString(t.FINAL_CONFIG.translations.filled),1),o.withDirectives(o.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":l[11]||(l[11]=r=>i.options.circle.filled=r),onChange:l[12]||(l[12]=(...r)=>t.setFillOfSelectedCircle&&t.setFillOfSelectedCircle(...r)),checked:i.options.circle.filled},null,40,K),[[o.vModelCheckbox,i.options.circle.filled]])])):o.createCommentVNode("",!0),o.createElementVNode("button",{class:o.normalizeClass({"button-tool":!0,"button-tool--selected":i.activeShape==="rect",tooltip:!0}),style:o.normalizeStyle({background:i.activeShape==="rect"?t.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor:t.FINAL_CONFIG.style.buttons.shapes.backgroundColor,border:i.activeShape==="rect"?t.FINAL_CONFIG.style.buttons.shapes.selected.border:t.FINAL_CONFIG.style.buttons.shapes.border,color:i.activeShape==="rect"?t.FINAL_CONFIG.style.buttons.shapes.selected.color:t.FINAL_CONFIG.style.buttons.shapes.color,borderRadius:`${t.FINAL_CONFIG.style.buttons.borderRadius}px`}),onClick:l[13]||(l[13]=r=>{t.setShapeTo("rect"),i.isSelectMode=!1})},[(o.openBlock(),o.createElementBlock("svg",Q,[o.createElementVNode("rect",{x:"3",y:"3",style:{rx:"0 !important",ry:"0 !important"},height:"6",width:"6",fill:i.options.rect.filled?(i.activeShape==="rect",i.selectedColor+t.colorTransparency):"none",stroke:"currentColor"},null,8,$)])),t.FINAL_CONFIG.style.showTooltips?(o.openBlock(),o.createElementBlock("span",{key:0,class:"tooltiptext",style:o.normalizeStyle({backgroundColor:t.FINAL_CONFIG.style.tooltips.backgroundColor,color:t.FINAL_CONFIG.style.tooltips.color,border:t.FINAL_CONFIG.style.tooltips.border,borderRadius:`${t.FINAL_CONFIG.style.tooltips.borderRadius}px`,boxShadow:t.FINAL_CONFIG.style.tooltips.boxShadow})},o.toDisplayString(t.FINAL_CONFIG.translations.tooltipShapeRect),5)):o.createCommentVNode("",!0)],6),i.activeShape==="rect"?(o.openBlock(),o.createElementBlock("div",ee,[o.createElementVNode("label",te,o.toDisplayString(t.FINAL_CONFIG.translations.filled),1),o.withDirectives(o.createElementVNode("input",{id:"rectFill",type:"checkbox","onUpdate:modelValue":l[14]||(l[14]=r=>i.options.rect.filled=r),onChange:l[15]||(l[15]=(...r)=>t.setFillOfSelectedRect&&t.setFillOfSelectedRect(...r)),checked:i.options.rect.filled},null,40,oe),[[o.vModelCheckbox,i.options.rect.filled]])])):o.createCommentVNode("",!0),o.createElementVNode("button",{class:o.normalizeClass({"button-tool":!0,"button-tool--selected":i.activeShape==="arrow",tooltip:!0}),style:o.normalizeStyle({background:i.activeShape==="arrow"?t.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor:t.FINAL_CONFIG.style.buttons.shapes.backgroundColor,border:i.activeShape==="arrow"?t.FINAL_CONFIG.style.buttons.shapes.selected.border:t.FINAL_CONFIG.style.buttons.shapes.border,color:i.activeShape==="arrow"?t.FINAL_CONFIG.style.buttons.shapes.selected.color:t.FINAL_CONFIG.style.buttons.shapes.color,borderRadius:`${t.FINAL_CONFIG.style.buttons.borderRadius}px`}),onClick:l[16]||(l[16]=r=>{t.setShapeTo("arrow"),i.isSelectMode=!1})},[(o.openBlock(),o.createElementBlock("svg",ie,[o.createElementVNode("path",{stroke:i.options.arrow.filled?i.activeShape==="arrow"?"white":"grey":"none","stroke-width":"2",d:"M5,19 19,5 14,5 19,10.5 19,5",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},null,8,le)])),t.FINAL_CONFIG.style.showTooltips?(o.openBlock(),o.createElementBlock("span",{key:0,class:"tooltiptext",style:o.normalizeStyle({backgroundColor:t.FINAL_CONFIG.style.tooltips.backgroundColor,color:t.FINAL_CONFIG.style.tooltips.color,border:t.FINAL_CONFIG.style.tooltips.border,borderRadius:`${t.FINAL_CONFIG.style.tooltips.borderRadius}px`,boxShadow:t.FINAL_CONFIG.style.tooltips.boxShadow})},o.toDisplayString(t.FINAL_CONFIG.translations.tooltipShapeArrow),5)):o.createCommentVNode("",!0)],6),o.createElementVNode("button",{class:o.normalizeClass({"button-tool":!0,"button-tool--selected":i.activeShape==="line",tooltip:!0}),style:o.normalizeStyle({background:i.activeShape==="line"?t.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor:t.FINAL_CONFIG.style.buttons.shapes.backgroundColor,border:i.activeShape==="line"?t.FINAL_CONFIG.style.buttons.shapes.selected.border:t.FINAL_CONFIG.style.buttons.shapes.border,color:i.activeShape==="line"?t.FINAL_CONFIG.style.buttons.shapes.selected.color:t.FINAL_CONFIG.style.buttons.shapes.color,borderRadius:`${t.FINAL_CONFIG.style.buttons.borderRadius}px`}),onClick:l[17]||(l[17]=r=>{t.setShapeTo("line"),i.isSelectMode=!1})},[se,t.FINAL_CONFIG.style.showTooltips?(o.openBlock(),o.createElementBlock("span",{key:0,class:"tooltiptext",style:o.normalizeStyle({backgroundColor:t.FINAL_CONFIG.style.tooltips.backgroundColor,color:t.FINAL_CONFIG.style.tooltips.color,border:t.FINAL_CONFIG.style.tooltips.border,borderRadius:`${t.FINAL_CONFIG.style.tooltips.borderRadius}px`,boxShadow:t.FINAL_CONFIG.style.tooltips.boxShadow})},o.toDisplayString(t.FINAL_CONFIG.translations.tooltipShapeFreehand),5)):o.createCommentVNode("",!0)],6),["arrow","circle","rect","line"].includes(i.activeShape)?(o.openBlock(),o.createElementBlock("div",re,[o.createElementVNode("div",ne,[o.createElementVNode("label",de,o.toDisplayString(t.FINAL_CONFIG.translations.thickness),1),o.withDirectives(o.createElementVNode("input",{id:"textFont",type:"number","onUpdate:modelValue":l[18]||(l[18]=r=>i.strokeSize=r),onInput:l[19]||(l[19]=(...r)=>t.setStrokeWidthOfSelectedShape&&t.setStrokeWidthOfSelectedShape(...r)),style:{padding:"0 4px",width:"40px",border:"1px solid #dadada","border-radius":"3px"}},null,544),[[o.vModelText,i.strokeSize]])])])):o.createCommentVNode("",!0),["arrow","circle","rect"].includes(i.activeShape)?(o.openBlock(),o.createElementBlock("div",ce,[o.createElementVNode("div",ae,[o.createElementVNode("label",he,o.toDisplayString(t.FINAL_CONFIG.translations.dashedLines),1),(o.openBlock(),o.createElementBlock("svg",ue,Ne)),o.withDirectives(o.createElementVNode("input",{id:"dashStyle",name:"dashStyle",type:"checkbox","onUpdate:modelValue":l[20]||(l[20]=r=>i.isDash=r),onChange:l[21]||(l[21]=(...r)=>t.setSelectedShapeToDash&&t.setSelectedShapeToDash(...r)),checked:i.isDash},null,40,Ie),[[o.vModelCheckbox,i.isDash]])])])):o.createCommentVNode("",!0),o.createElementVNode("button",{class:o.normalizeClass({"button-tool":!0,"button-tool--selected":i.isTextMode,tooltip:!0}),style:o.normalizeStyle({background:i.isTextMode?t.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor:t.FINAL_CONFIG.style.buttons.shapes.backgroundColor,border:i.isTextMode?t.FINAL_CONFIG.style.buttons.shapes.selected.border:t.FINAL_CONFIG.style.buttons.shapes.border,color:i.isTextMode?t.FINAL_CONFIG.style.buttons.shapes.selected.color:t.FINAL_CONFIG.style.buttons.shapes.color,borderRadius:`${t.FINAL_CONFIG.style.buttons.borderRadius}px`}),onClick:l[22]||(l[22]=r=>{t.deleteEmptyTextElement(),i.isTextMode=!i.isTextMode,i.isDeleteMode=!1,i.isMoveMode=!1,i.isResizeMode=!1,i.isSelectMode=!1,i.isDrawMode=!1,i.activeShape=void 0})},[(o.openBlock(),o.createElementBlock("svg",be,Ce)),t.FINAL_CONFIG.style.showTooltips?(o.openBlock(),o.createElementBlock("span",{key:0,class:"tooltiptext",style:o.normalizeStyle({backgroundColor:t.FINAL_CONFIG.style.tooltips.backgroundColor,color:t.FINAL_CONFIG.style.tooltips.color,border:t.FINAL_CONFIG.style.tooltips.border,borderRadius:`${t.FINAL_CONFIG.style.tooltips.borderRadius}px`,boxShadow:t.FINAL_CONFIG.style.tooltips.boxShadow})},o.toDisplayString(t.FINAL_CONFIG.translations.tooltipShapeText),5)):o.createCommentVNode("",!0)],6),i.isTextMode?(o.openBlock(),o.createElementBlock("div",Se,[o.createElementVNode("div",xe,[o.createElementVNode("label",fe,o.toDisplayString(t.FINAL_CONFIG.translations.fontSize),1),o.withDirectives(o.createElementVNode("input",{id:"textFont",type:"number","onUpdate:modelValue":l[23]||(l[23]=r=>i.textFont=r),onInput:l[24]||(l[24]=(...r)=>t.setCurrentStyleOfSelectedText&&t.setCurrentStyleOfSelectedText(...r)),style:{padding:"0 4px",width:"40px",border:"1px solid #dadada","border-radius":"3px"}},null,544),[[o.vModelText,i.textFont]])])])):o.createCommentVNode("",!0),i.isTextMode?(o.openBlock(),o.createElementBlock("div",ke,[o.createElementVNode("button",{class:o.normalizeClass({"button-tool":!0,"button-tool--selected":i.textAlign==="start",tooltip:!0}),style:o.normalizeStyle({background:i.textAlign==="start"?t.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor:t.FINAL_CONFIG.style.buttons.shapes.backgroundColor,border:i.textAlign==="start"?t.FINAL_CONFIG.style.buttons.shapes.selected.border:t.FINAL_CONFIG.style.buttons.shapes.border,color:i.textAlign==="start"?t.FINAL_CONFIG.style.buttons.shapes.selected.color:t.FINAL_CONFIG.style.buttons.shapes.color,borderRadius:`${t.FINAL_CONFIG.style.buttons.borderRadius}px`}),onClick:l[25]||(l[25]=r=>{i.isDeleteMode=!1,i.isMoveMode=!1,i.isResizeMode=!1,i.isDrawMode=!1,i.isSelectMode=!1,i.activeShape=void 0,i.textAlign="start",t.setSelectedTextAlignTo("start")})},[ge,t.FINAL_CONFIG.style.showTooltips?(o.openBlock(),o.createElementBlock("span",{key:0,class:"tooltiptext",style:o.normalizeStyle({backgroundColor:t.FINAL_CONFIG.style.tooltips.backgroundColor,color:t.FINAL_CONFIG.style.tooltips.color,border:t.FINAL_CONFIG.style.tooltips.border,borderRadius:`${t.FINAL_CONFIG.style.tooltips.borderRadius}px`,boxShadow:t.FINAL_CONFIG.style.tooltips.boxShadow})},o.toDisplayString(t.FINAL_CONFIG.translations.tooltipShapeTextLeft),5)):o.createCommentVNode("",!0)],6)])):o.createCommentVNode("",!0),i.isTextMode?(o.openBlock(),o.createElementBlock("div",me,[o.createElementVNode("button",{class:o.normalizeClass({"button-tool":!0,"button-tool--selected":i.textAlign==="middle",tooltip:!0}),style:o.normalizeStyle({background:i.textAlign==="middle"?t.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor:t.FINAL_CONFIG.style.buttons.shapes.backgroundColor,border:i.textAlign==="middle"?t.FINAL_CONFIG.style.buttons.shapes.selected.border:t.FINAL_CONFIG.style.buttons.shapes.border,color:i.textAlign==="middle"?t.FINAL_CONFIG.style.buttons.shapes.selected.color:t.FINAL_CONFIG.style.buttons.shapes.color,borderRadius:`${t.FINAL_CONFIG.style.buttons.borderRadius}px`}),disabled:i.isBulletTextMode,onClick:l[26]||(l[26]=r=>{i.isDeleteMode=!1,i.isMoveMode=!1,i.isResizeMode=!1,i.isDrawMode=!1,i.isSelectMode=!1,i.activeShape=void 0,i.textAlign="middle",t.setSelectedTextAlignTo("middle")})},[_e,t.FINAL_CONFIG.style.showTooltips?(o.openBlock(),o.createElementBlock("span",{key:0,class:"tooltiptext",style:o.normalizeStyle({backgroundColor:t.FINAL_CONFIG.style.tooltips.backgroundColor,color:t.FINAL_CONFIG.style.tooltips.color,border:t.FINAL_CONFIG.style.tooltips.border,borderRadius:`${t.FINAL_CONFIG.style.tooltips.borderRadius}px`,boxShadow:t.FINAL_CONFIG.style.tooltips.boxShadow})},o.toDisplayString(t.FINAL_CONFIG.translations.tooltipShapeTextCenter),5)):o.createCommentVNode("",!0)],14,pe)])):o.createCommentVNode("",!0),i.isTextMode?(o.openBlock(),o.createElementBlock("div",ve,[o.createElementVNode("button",{class:o.normalizeClass({"button-tool":!0,"button-tool--selected":i.textAlign==="end",tooltip:!0}),style:o.normalizeStyle({background:i.textAlign==="end"?t.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor:t.FINAL_CONFIG.style.buttons.shapes.backgroundColor,border:i.textAlign==="end"?t.FINAL_CONFIG.style.buttons.shapes.selected.border:t.FINAL_CONFIG.style.buttons.shapes.border,color:i.textAlign==="end"?t.FINAL_CONFIG.style.buttons.shapes.selected.color:t.FINAL_CONFIG.style.buttons.shapes.color,borderRadius:`${t.FINAL_CONFIG.style.buttons.borderRadius}px`}),disabled:i.isBulletTextMode,onClick:l[27]||(l[27]=r=>{i.isDeleteMode=!1,i.isMoveMode=!1,i.isResizeMode=!1,i.isDrawMode=!1,i.isSelectMode=!1,i.activeShape=void 0,i.textAlign="end",t.setSelectedTextAlignTo("end")})},[Ae,t.FINAL_CONFIG.style.showTooltips?(o.openBlock(),o.createElementBlock("span",{key:0,class:"tooltiptext",style:o.normalizeStyle({backgroundColor:t.FINAL_CONFIG.style.tooltips.backgroundColor,color:t.FINAL_CONFIG.style.tooltips.color,border:t.FINAL_CONFIG.style.tooltips.border,borderRadius:`${t.FINAL_CONFIG.style.tooltips.borderRadius}px`,boxShadow:t.FINAL_CONFIG.style.tooltips.boxShadow})},o.toDisplayString(t.FINAL_CONFIG.translations.tooltipShapeTextRight),5)):o.createCommentVNode("",!0)],14,we)])):o.createCommentVNode("",!0),i.isTextMode?(o.openBlock(),o.createElementBlock("div",Me,[o.createElementVNode("button",{class:o.normalizeClass({"button-tool":!0,"button-tool--selected":i.isBulletTextMode,tooltip:!0}),style:o.normalizeStyle({background:i.isBulletTextMode?t.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor:t.FINAL_CONFIG.style.buttons.shapes.backgroundColor,border:i.isBulletTextMode?t.FINAL_CONFIG.style.buttons.shapes.selected.border:t.FINAL_CONFIG.style.buttons.shapes.border,color:i.isBulletTextMode?t.FINAL_CONFIG.style.buttons.shapes.selected.color:t.FINAL_CONFIG.style.buttons.shapes.color,borderRadius:`${t.FINAL_CONFIG.style.buttons.borderRadius}px`}),onClick:l[28]||(l[28]=r=>{i.isDeleteMode=!1,i.isMoveMode=!1,i.isResizeMode=!1,i.isDrawMode=!1,i.isSelectMode=!1,i.activeShape=void 0,i.isBulletTextMode=!i.isBulletTextMode,i.textAlign="start",t.setSelectedTextAlignTo("start"),t.setCurrentStyleOfSelectedText()})},[Oe,t.FINAL_CONFIG.style.showTooltips?(o.openBlock(),o.createElementBlock("span",{key:0,class:"tooltiptext",style:o.normalizeStyle({backgroundColor:t.FINAL_CONFIG.style.tooltips.backgroundColor,color:t.FINAL_CONFIG.style.tooltips.color,border:t.FINAL_CONFIG.style.tooltips.border,borderRadius:`${t.FINAL_CONFIG.style.tooltips.borderRadius}px`,boxShadow:t.FINAL_CONFIG.style.tooltips.boxShadow})},o.toDisplayString(t.FINAL_CONFIG.translations.tooltipShapeTextBullet),5)):o.createCommentVNode("",!0)],6)])):o.createCommentVNode("",!0),i.isTextMode?(o.openBlock(),o.createElementBlock("div",Le,[o.createElementVNode("button",{class:o.normalizeClass({"button-tool":!0,"button-tool--selected":i.isBold,tooltip:!0}),style:o.normalizeStyle({background:i.isBold?t.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor:t.FINAL_CONFIG.style.buttons.shapes.backgroundColor,border:i.isBold?t.FINAL_CONFIG.style.buttons.shapes.selected.border:t.FINAL_CONFIG.style.buttons.shapes.border,color:i.isBold?t.FINAL_CONFIG.style.buttons.shapes.selected.color:t.FINAL_CONFIG.style.buttons.shapes.color,borderRadius:`${t.FINAL_CONFIG.style.buttons.borderRadius}px`}),onClick:l[29]||(l[29]=r=>{i.isDeleteMode=!1,i.isMoveMode=!1,i.isResizeMode=!1,i.isDrawMode=!1,i.isSelectMode=!1,i.activeShape=void 0,i.isBold=!i.isBold,t.setCurrentStyleOfSelectedText()})},[Ge,t.FINAL_CONFIG.style.showTooltips?(o.openBlock(),o.createElementBlock("span",{key:0,class:"tooltiptext",style:o.normalizeStyle({backgroundColor:t.FINAL_CONFIG.style.tooltips.backgroundColor,color:t.FINAL_CONFIG.style.tooltips.color,border:t.FINAL_CONFIG.style.tooltips.border,borderRadius:`${t.FINAL_CONFIG.style.tooltips.borderRadius}px`,boxShadow:t.FINAL_CONFIG.style.tooltips.boxShadow})},o.toDisplayString(t.FINAL_CONFIG.translations.tooltipShapeTextBold),5)):o.createCommentVNode("",!0)],6)])):o.createCommentVNode("",!0),i.isTextMode?(o.openBlock(),o.createElementBlock("div",ze,[o.createElementVNode("button",{class:o.normalizeClass({"button-tool":!0,"button-tool--selected":i.isItalic,tooltip:!0}),style:o.normalizeStyle({background:i.isItalic?t.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor:t.FINAL_CONFIG.style.buttons.shapes.backgroundColor,border:i.isItalic?t.FINAL_CONFIG.style.buttons.shapes.selected.border:t.FINAL_CONFIG.style.buttons.shapes.border,color:i.isItalic?t.FINAL_CONFIG.style.buttons.shapes.selected.color:t.FINAL_CONFIG.style.buttons.shapes.color,borderRadius:`${t.FINAL_CONFIG.style.buttons.borderRadius}px`}),onClick:l[30]||(l[30]=r=>{i.isDeleteMode=!1,i.isMoveMode=!1,i.isResizeMode=!1,i.isDrawMode=!1,i.isSelectMode=!1,i.activeShape=void 0,i.isItalic=!i.isItalic,t.setCurrentStyleOfSelectedText()})},[Be,t.FINAL_CONFIG.style.showTooltips?(o.openBlock(),o.createElementBlock("span",{key:0,class:"tooltiptext",style:o.normalizeStyle({backgroundColor:t.FINAL_CONFIG.style.tooltips.backgroundColor,color:t.FINAL_CONFIG.style.tooltips.color,border:t.FINAL_CONFIG.style.tooltips.border,borderRadius:`${t.FINAL_CONFIG.style.tooltips.borderRadius}px`,boxShadow:t.FINAL_CONFIG.style.tooltips.boxShadow})},o.toDisplayString(t.FINAL_CONFIG.translations.tooltipShapeTextItalic),5)):o.createCommentVNode("",!0)],6)])):o.createCommentVNode("",!0),i.isTextMode?(o.openBlock(),o.createElementBlock("div",Te,[o.createElementVNode("button",{class:o.normalizeClass({"button-tool":!0,"button-tool--selected":i.isUnderline,tooltip:!0}),style:o.normalizeStyle({background:i.isUnderline?t.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor:t.FINAL_CONFIG.style.buttons.shapes.backgroundColor,border:i.isUnderline?t.FINAL_CONFIG.style.buttons.shapes.selected.border:t.FINAL_CONFIG.style.buttons.shapes.border,color:i.isUnderline?t.FINAL_CONFIG.style.buttons.shapes.selected.color:t.FINAL_CONFIG.style.buttons.shapes.color,borderRadius:`${t.FINAL_CONFIG.style.buttons.borderRadius}px`}),onClick:l[31]||(l[31]=r=>{i.isDeleteMode=!1,i.isMoveMode=!1,i.isResizeMode=!1,i.isDrawMode=!1,i.isSelectMode=!1,i.activeShape=void 0,i.isUnderline=!i.isUnderline,t.setCurrentStyleOfSelectedText()})},[De,t.FINAL_CONFIG.style.showTooltips?(o.openBlock(),o.createElementBlock("span",{key:0,class:"tooltiptext",style:o.normalizeStyle({backgroundColor:t.FINAL_CONFIG.style.tooltips.backgroundColor,color:t.FINAL_CONFIG.style.tooltips.color,border:t.FINAL_CONFIG.style.tooltips.border,borderRadius:`${t.FINAL_CONFIG.style.tooltips.borderRadius}px`,boxShadow:t.FINAL_CONFIG.style.tooltips.boxShadow})},o.toDisplayString(t.FINAL_CONFIG.translations.tooltipShapeTextUnderline),5)):o.createCommentVNode("",!0)],6)])):o.createCommentVNode("",!0),o.createElementVNode("div",Ve,[o.withDirectives(o.createElementVNode("input",{type:"color",id:"colorPicker",name:"colorPicker","onUpdate:modelValue":l[32]||(l[32]=r=>i.selectedColor=r),onInput:l[33]||(l[33]=(...r)=>t.setColorOfSelectedShape&&t.setColorOfSelectedShape(...r)),style:o.normalizeStyle(`height: 30px; width: 30px; border-radius: ${t.FINAL_CONFIG.style.buttons.borderRadius}px; cursor: pointer`)},null,36),[[o.vModelText,i.selectedColor]]),t.FINAL_CONFIG.style.showTooltips?(o.openBlock(),o.createElementBlock("span",{key:0,class:"tooltiptext",style:o.normalizeStyle({backgroundColor:t.FINAL_CONFIG.style.tooltips.backgroundColor,color:t.FINAL_CONFIG.style.tooltips.color,border:t.FINAL_CONFIG.style.tooltips.border,borderRadius:`${t.FINAL_CONFIG.style.tooltips.borderRadius}px`,boxShadow:t.FINAL_CONFIG.style.tooltips.boxShadow})},o.toDisplayString(t.FINAL_CONFIG.translations.tooltipShapeColor),5)):o.createCommentVNode("",!0)]),o.createElementVNode("div",Ee,[o.createElementVNode("label",Re,o.toDisplayString(t.FINAL_CONFIG.translations.colorAlpha)+": "+o.toDisplayString(i.transparency>98?100:i.transparency)+" % ",1),o.withDirectives(o.createElementVNode("input",{id:"colorTransparency",name:"colorTransparency",type:"range","onUpdate:modelValue":l[34]||(l[34]=r=>i.transparency=r),onInput:l[35]||(l[35]=(...r)=>t.setTransparencyOfSelectedShape&&t.setTransparencyOfSelectedShape(...r)),min:0,max:100,style:{width:"100px"}},null,544),[[o.vModelText,i.transparency]])])])],36)]),o.createElementVNode("div",He,[o.renderSlot(e.$slots,"default",{},void 0,!0),i.isSummaryOpen?(o.openBlock(),o.createElementBlock("svg",{id:"annotatorSvg",key:i.step,ref:"mainSvg",class:o.normalizeClass({draw:!0,"draw--free":i.activeShape==="line"}),style:o.normalizeStyle([`cursor:${t.cursorClass}; font-family: Helvetica; z-index: 100000000;`,{position:"absolute",top:"0",left:"0"}]),viewBox:`0 0 ${i.svgWidth} ${i.svgHeight}`,width:i.sourceWidth,height:i.sourceHeight,onPointerdown:l[38]||(l[38]=r=>t.chooseAction(r)),onPointerup:l[39]||(l[39]=(...r)=>t.resetDraw&&t.resetDraw(...r)),onTouchend:l[40]||(l[40]=(...r)=>t.resetDraw&&t.resetDraw(...r)),onTouchstart:l[41]||(l[41]=r=>{t.setPointer(r),t.clickSvg(r)}),onPointermove:l[42]||(l[42]=r=>{t.setPointer(r),t.chooseMove(r)}),onPointerout:l[43]||(l[43]=r=>{i.preventEdit=!0,i.hoveredShapeId=void 0}),onPointerover:l[44]||(l[44]=r=>t.allowEditAndHoverShapes(r)),onClick:l[45]||(l[45]=r=>t.clickSvg(r))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.userShapes,(r,d)=>(o.openBlock(),o.createElementBlock("g",{key:`shape_${d}`,id:r.id,innerHTML:r,onClick:l[37]||(l[37]=c=>{t.clickShape(c),i.isMoveMode=!1})},null,8,Pe))),128))],46,We)):o.createCommentVNode("",!0),i.isPrinting?(o.openBlock(),o.createElementBlock("svg",{key:1,style:{position:"absolute",top:"0",left:"0"},height:i.sourceHeight,viewBox:`0 0 ${i.svgWidth} ${i.svgHeight}`,width:i.sourceWidth},[o.createElementVNode("circle",{class:"animated-circle-print",cx:i.svgWidth/2,cy:i.svgHeight/2,r:"50",stroke:"#6376DD","stroke-width":"10",fill:"none"},null,8,Ue)],8,Xe)):o.createCommentVNode("",!0)],512)])}const je=F._export_sfc(C,[["render",Ye],["__scopeId","data-v-3611298e"]]);exports.default=je;