vue-data-ui 2.3.2 → 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-BoVO5twe.js → index.es-YufTdp0y.js} +1 -1
  24. package/dist/{index.es-w_iDpZ-o.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-C6KVJkgd.cjs +0 -843
  148. package/dist/index-bDBuMYfe.js +0 -57303
@@ -0,0 +1,6 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-p5gfZSvB.cjs"),U=require("./usePrinter-fZlsJid8.cjs"),ce=require("./vue-ui-skeleton-sjfOtCZr.cjs"),ie=require("./BaseIcon-JtWoVorZ.cjs"),de=require("./vue-ui-accordion-C_pwrAJl.cjs"),q=require("./useNestedProp-2kIU-7On.cjs"),ye=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ve=["id"],he=["xmlns","viewBox"],pe={key:0},fe=["fill","font-weight","font-size","x","y"],me=["fill","font-weight","font-size","x","y"],ge=["id"],be=["stop-color"],ke=["stop-color"],xe=["id"],_e=["stop-color"],Be=["stop-color"],Ee=["id"],Se=["stop-color"],Ne=["stop-color"],ze=["stop-color"],Ce=["id"],we=["stop-color"],Ve=["stop-color"],$e=["stop-color"],Te=["id"],Fe=["stop-color"],De=["stop-color"],Le=["stop-color"],Me={key:1},Ie=["x","y","font-size","font-weight","fill"],Pe=["x","y","font-size","font-weight","fill"],Oe=["d","stroke"],Re=["cx","cy","r","fill"],Xe=["cx","cy","r","fill","stroke","stroke-width","onClick"],je={key:2},Ae=["x","y","font-size","fill","onClick"],Ge={key:0},Ue=["x","y","fill","font-size","font-weight"],qe=["x","y","height","width","fill","rx","onClick"],Ye=["x","y","height","width","fill","rx","stroke","stroke-width","onClick"],He={key:3},We=["x","y","fill","font-size","onClick"],Ke=["d","stroke"],Je=["cx","cy","fill","onClick"],Qe=["fill","cx","cy","r","onClick"],Ze={key:4},et=["x","y","font-size","font-weight","fill"],tt=["x1","x2","y1","y2","stroke","stroke-width"],lt=["y","height","width"],at={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},ot={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},nt={viewBox:"0 0 20 20",height:"16",width:"16"},rt=["fill"],st={key:6},ut=["y","height","width"],ct={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},it={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},dt={viewBox:"0 0 20 20",height:"16",width:"16"},yt=["fill"],vt=["d","stroke"],ht=["cx","cy","fill"],pt=["cx","cy","fill"],ft=["d","stroke"],mt=["cx","cy","fill"],gt=["cx","cy","fill"],bt=["x","y","fill","font-size","font-weight"],kt=["x","y","fill","font-size","font-weight"],xt=["x","text-anchor","y","fill","font-size"],_t=["x","text-anchor","y","fill","font-size"],Bt=["x","text-anchor","y","fill","font-size"],Et=["x","text-anchor","y","fill","font-size"],St=["x","text-anchor","y","fill","font-size"],Nt=["x","y","font-size","fill"],zt=["x","y","font-size","fill"],Ct=["x","y","font-size","fill"],wt={style:{"padding-top":"36px",position:"relative"}},Vt={class:"vue-ui-data-table"},$t={key:0},Tt=["data-cell"],Ft={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Dt={key:0},Lt={key:1},Mt=["data-cell"],It={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Pt={key:0},Ot={key:1},Rt=["data-cell"],Xt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},jt={key:0},At={key:1},Gt=["data-cell"],Ut={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},qt={key:0},Yt={key:1},Ht=["data-cell"],Wt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Kt={key:0},Jt={key:1},Qt=["data-cell"],Zt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},el={key:0},tl={key:1},ll=["data-cell"],al={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ol={key:0},nl={key:1},rl=["data-cell"],sl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ul=["data-cell"],cl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},il=["data-cell"],dl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},yl=["data-cell"],vl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},hl=["data-cell"],pl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},fl={__name:"vue-ui-chestnut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectRoot","selectBranch","selectNut"],setup(Y,{expose:H,emit:N}){const k=Y;e.useCssVars(a=>({a08a8b28:a.tdo}));const{vue_ui_chestnut:W}=n.useConfig(),C=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(n.createUid()),D=e.ref(null),K=e.ref(null),L=e.ref(0),t=e.computed(()=>{const a=q.useNestedProp({userConfig:k.config,defaultConfig:W});return a.theme?{...q.useNestedProp({userConfig:n.themes.vue_ui_chestnut[a.theme]||k.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}),{isPrinting:J,isImaging:Q,generatePdf:M,generateImage:I}=U.usePrinter({elementId:`vue-ui-chestnut_${h.value}`,fileName:t.value.style.chart.layout.title.text||"vue-ui-chestnut"}),$=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),w=e.ref({showTable:t.value.table.show}),P=e.ref(null),O=e.ref(!1),Z=e.computed(()=>t.value.table.responsiveBreakpoint),r=e.ref({gap:6,padding:{top:102,left:12,right:12,bottom:96},width:1024,height:0,branchSize:32,branchStart:128}),f=e.computed(()=>({left:r.value.padding.left,top:r.value.padding.top,right:r.value.width-r.value.padding.right,bottom:r.value.height-r.value.padding.bottom,width:r.value.width-(r.value.padding.left+r.value.padding.right),height:r.value.height-(r.value.padding.top+r.value.padding.bottom),seedX:r.value.padding.left+64})),x=e.computed(()=>C.value?k.dataset.flatMap(a=>a.branches.map(s=>s.value)).reduce((a,s)=>a+s):0),m=e.computed(()=>(k.dataset.forEach((a,s)=>{n.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","branches"]}).forEach(l=>{n.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:l,index:s})}),a.branches&&a.branches.forEach((l,o)=>{n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(d=>{n.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:d,index:`${s} - ${o}`})}),l.breakdown&&l.breakdown.forEach((d,i)=>{n.getMissingDatasetAttributes({datasetObject:d,requiredAttributes:["name","value"]}).forEach(y=>{n.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:y,index:`${s} - ${o} - ${i}`})})})})}),k.dataset.map((a,s)=>{const l=a.branches.map(o=>o.value).reduce((o,d)=>o+d);return{...a,color:n.convertColorToHex(a.color)||$.value[s]||n.palette[s]||n.palette[s%n.palette.length],id:a.id||`root_${s}_${h.value}`,type:"root",total:l,rootIndex:s,branches:a.branches.map((o,d)=>({...o,rootName:a.name,rootIndex:s,color:n.convertColorToHex(a.color)||$.value[s]||n.palette[s]||n.palette[s%n.palette.length],value:o.value>=0?o.value:0,id:o.id||`branch_${s}_${d}_${h.value}`,proportionToRoot:o.value/l,type:"branch",breakdown:o.breakdown.map((i,y)=>({table:{rootName:a.name,rootValue:l,rootToTotal:l/x.value,branchName:o.name,branchValue:o.value,branchToTotal:o.value/x.value,branchToRoot:o.value/l,nutName:i.name,nutValue:i.value,nutToTotal:i.value/x.value,nutToRoot:i.value/l,nutToBranch:i.value/o.value},...i,type:"nut",branchName:o.name,rootName:a.name,branchTotal:o.value>=0?o.value:0,proportionToBranch:i.value/o.value,proportionToRoot:i.value/l,proportionToTree:i.value/x.value,rootIndex:s,id:i.id||`nut_${s}_${d}_${y}_${h.value}`,color:n.convertColorToHex(i.color)||$.value[y]||n.palette[y]||n.palette[y%n.palette.length],value:i.value>=0?i.value:0}))}))}})));function ee(){return m.value}const te=e.computed(()=>m.value.flatMap(a=>a.branches).length),le=e.computed(()=>Math.max(...m.value.map(a=>a.branches.map(s=>s.value).reduce((s,l)=>s+l,0)))),ae=e.computed(()=>Math.max(...m.value.flatMap(a=>a.branches.map(s=>s.value)))),R=e.computed(()=>256+r.value.padding.left),B=e.computed(()=>m.value.sort((a,s)=>s.total-a.total).map((a,s)=>{const l=f.value.height/m.value.length/2,o=a.total/le.value*(l>64?64:l);return{...a,x:f.value.seedX,y:f.value.top+f.value.height/m.value.length*(s+1)-(f.value.height/m.value.length/2+r.value.gap/2),r:o<r.value.branchSize/2?r.value.branchSize/2:o}})),oe=e.computed(()=>t.value.style.chart.layout.branches.widthRatio<=0?.1:t.value.style.chart.layout.branches.widthRatio>1.8?1.8:t.value.style.chart.layout.branches.widthRatio),ne=e.computed(()=>B.value.flatMap(a=>a.branches)),_=e.computed(()=>ne.value.sort((a,s)=>s.value-a.value).map((a,s)=>({...a,y1:s*r.value.branchSize+f.value.top+s*r.value.gap,y2:s*r.value.branchSize+r.value.branchSize,x1:R.value,x2:384*a.value/ae.value*oe.value+R.value})));function T(a){const s=B.value.find(l=>l.rootIndex===a.rootIndex);return{x:s.x,y:s.y,r:s.r}}const c=e.ref(null),E=e.ref(null),v=e.ref(null),g=e.ref(null);function p(){c.value=null,v.value=null,g.value=null}function b(a){return g.value?g.value===null?!0:a.type==="root"?a.id===g.value.id:a.rootIndex===g.value.rootIndex:c.value===null&&v.value===null?!0:a.type==="nut"?c.value.id===a.id:a.type==="branch"?v.value.id===a.id:a.type==="root"?v.value&&v.value.rootIndex===a.rootIndex||c.value&&c.value.rootIndex===a.rootIndex:!1}function X(a){p(),e.nextTick(()=>{c.value=a,v.value=a,E.value=n.makeDonut({series:a.breakdown,base:1},a.x2+24+t.value.style.chart.layout.nuts.offsetX,a.y1+r.value.branchSize/2,80,80),N("selectNut",a.breakdown)})}function S(){c.value=null,E.value=null,N("selectNut",null)}function F(a){v.value&&v.value.id===a.id?(v.value=null,p(),N("selectBranch",null)):(p(),v.value=a,N("selectBranch",a))}function j(a){g.value&&g.value.id===a.id?(p(),N("selectRoot",null)):(p(),g.value=a,N("selectRoot",a))}function re(){return f.value.bottom-(c.value.y1+180)<0?0:f.value.bottom}function z(a){return a.proportion*100>t.value.style.chart.layout.nuts.selected.labels.dataLabels.hideUnderValue}function se(){new ResizeObserver(s=>{s.forEach(l=>{O.value=l.contentRect.width<Z.value})}).observe(P.value)}e.onMounted(()=>{n.objectIsEmpty(k.dataset)&&n.error({componentName:"VueUiChestnut",type:"dataset"});const a=te.value*(r.value.branchSize+r.value.gap)+r.value.padding.top+r.value.padding.bottom;r.value.height=a,se()});const u=e.computed(()=>{const a=[t.value.table.th.translations.rootName,t.value.table.th.translations.rootValue,t.value.table.th.translations.rootToTotal,t.value.table.th.translations.branchName,t.value.table.th.translations.branchValue,t.value.table.th.translations.branchToRoot,t.value.table.th.translations.branchToTotal,t.value.table.th.translations.nutName,t.value.table.th.translations.nutValue,t.value.table.th.translations.nutToBranch,t.value.table.th.translations.nutToRoot,t.value.table.th.translations.nutToTotal],s=m.value.flatMap((l,o)=>l.branches.flatMap((d,i)=>d.breakdown.flatMap((y,gl)=>y.table)));return{head:a,body:s}});function A(){e.nextTick(()=>{const a=[[t.value.style.chart.layout.title.text],[t.value.style.chart.layout.title.subtitle.text],[""],["Grand total",x.value],[""]],s=u.value.head,l=u.value.body.map((i,y)=>[u.value.body[y-1]&&u.value.body[y-1].rootName===i.rootName?"":i.rootName,u.value.body[y-1]&&u.value.body[y-1].rootName===i.rootName?"":i.rootValue,u.value.body[y-1]&&u.value.body[y-1].rootName===i.rootName?"":i.rootToTotal,u.value.body[y-1]&&u.value.body[y-1].branchName===i.branchName?"":i.branchName,u.value.body[y-1]&&u.value.body[y-1].branchName===i.branchName?"":i.branchValue,u.value.body[y-1]&&u.value.body[y-1].branchName===i.branchName?"":i.branchToRoot,u.value.body[y-1]&&u.value.body[y-1].branchName===i.branchName?"":i.branchToTotal,i.nutName,i.nutValue,i.nutToBranch,i.nutToRoot,i.nutToTotal]),o=a.concat([s]).concat(l),d=n.createCsvContent(o);n.downloadCsv({csvContent:d,title:t.value.style.chart.layout.title.text||"vue-ui-chestnut"})})}const V=e.ref(!1);function ue(a){V.value=a,L.value+=1}function G(){w.value.showTable=!w.value.showTable}return H({getData:ee,generatePdf:M,generateCsv:A,generateImage:I,toggleTable:G}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-chestnut ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"chestnutChart",ref:D,id:`vue-ui-chestnut_${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;padding-top:36px;background:${t.value.style.chart.backgroundColor}`)},[t.value.userOptions.show&&C.value?(e.openBlock(),e.createBlock(U.UserOptions,{ref_key:"details",ref:K,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(Q),isPrinting:e.unref(J),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:D.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(M),onGenerateCsv:A,onGenerateImage:e.unref(I),onToggleTable:G},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),r.value.height>0&&C.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${r.value.width} ${r.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("g",pe,[t.value.style.chart.layout.title.text?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",fill:t.value.style.chart.layout.title.color,"font-weight":t.value.style.chart.layout.title.bold?"bold":"normal","font-size":t.value.style.chart.layout.title.fontSize,x:r.value.width/2,y:12+t.value.style.chart.layout.title.fontSize+t.value.style.chart.layout.title.offsetY,onClick:p},e.toDisplayString(t.value.style.chart.layout.title.text),9,fe)):e.createCommentVNode("",!0),t.value.style.chart.layout.title.subtitle.text?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",fill:t.value.style.chart.layout.title.subtitle.color,"font-weight":t.value.style.chart.layout.title.subtitle.bold?"bold":"normal","font-size":t.value.style.chart.layout.title.subtitle.fontSize,x:r.value.width/2,y:48+t.value.style.chart.layout.title.subtitle.fontSize+t.value.style.chart.layout.title.subtitle.offsetY,onClick:p},e.toDisplayString(t.value.style.chart.layout.title.subtitle.text),9,me)):e.createCommentVNode("",!0)])),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,o)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`root_gradient_${h.value}_${l.rootIndex}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(l.color,.05)}${e.unref(n.opacity)[100-t.value.style.chart.layout.roots.gradientIntensity]}`},null,8,be),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,ke)],8,ge))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,l=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`branch_gradient_${h.value}_${l.rootIndex}`},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color},null,8,_e),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(n.shiftHue)(l.color,.02)}${e.unref(n.opacity)[100-t.value.style.chart.layout.branches.gradientIntensity]}`},null,8,Be)],8,xe))),256)),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nutpick_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${e.unref(n.opacity)[0]}`},null,8,Se),e.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${e.unref(n.opacity)[t.value.style.chart.layout.nuts.selected.gradientIntensity]}`},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${e.unref(n.opacity)[0]}`},null,8,ze)],8,Ee),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${e.unref(n.opacity)[0]}`},null,8,we),e.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${e.unref(n.opacity)[t.value.style.chart.layout.nuts.gradientIntensity]}`},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${e.unref(n.opacity)[0]}`},null,8,$e)],8,Ce),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_underlayer_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${t.value.style.chart.backgroundColor}${e.unref(n.opacity)[100]}`},null,8,Fe),e.createElementVNode("stop",{offset:"80%","stop-color":`${t.value.style.chart.backgroundColor}${e.unref(n.opacity)[60]}`},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.chart.backgroundColor}${e.unref(n.opacity)[0]}`},null,8,Le)],8,Te)]),t.value.style.chart.layout.grandTotal.show?(e.openBlock(),e.createElementBlock("g",Me,[e.createElementVNode("text",{x:f.value.seedX,y:32+t.value.style.chart.layout.grandTotal.offsetY,"font-size":t.value.style.chart.layout.grandTotal.fontSize,"font-weight":t.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:t.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:p},e.toDisplayString(t.value.style.chart.layout.grandTotal.text),9,Ie),e.createElementVNode("text",{x:f.value.seedX,y:38+t.value.style.chart.layout.grandTotal.fontSize+t.value.style.chart.layout.grandTotal.offsetY,"font-size":t.value.style.chart.layout.grandTotal.fontSize,"font-weight":t.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:t.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:p},e.toDisplayString(t.value.style.chart.layout.grandTotal.prefix)+" "+e.toDisplayString(x.value.toFixed(t.value.style.chart.layout.grandTotal.roundingValue))+" "+e.toDisplayString(t.value.style.chart.layout.grandTotal.suffix),9,Pe)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,l=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.branchSize,(o,d)=>(e.openBlock(),e.createElementBlock("path",{d:`M
2
+ ${l.x1},${l.y1+d}
3
+ C${l.x1-20},${l.y1+d}
4
+ ${l.x1-80},${l.y1+d}
5
+ ${T(l).x+T(l).r/2}, ${T(l).y}
6
+ `,stroke:`${l.color}${e.unref(n.opacity)[t.value.style.chart.layout.links.opacity]}`,fill:"none","stroke-width":"2","shape-rendering":"cirspEdges",style:e.normalizeStyle(`opacity:${b(l)?1:0}`),onClick:p},null,12,Oe))),256))]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,l=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,r:l.r,fill:t.value.style.chart.layout.roots.underlayerColor,stroke:"none",style:e.normalizeStyle(`cursor:pointer; opacity:${b(l)?1:.05}`)},null,12,Re))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,r:l.r,fill:t.value.style.chart.layout.roots.useGradient?`url(#root_gradient_${h.value}_${l.rootIndex})`:l.color,stroke:t.value.style.chart.layout.roots.stroke,"stroke-width":t.value.style.chart.layout.roots.strokeWidth,style:e.normalizeStyle(`cursor:pointer; opacity:${b(l)?1:.05}`),onClick:d=>j(l)},null,12,Xe))),256)),t.value.style.chart.layout.roots.labels.show?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:l.x,y:l.y+t.value.style.chart.layout.roots.labels.fontSize/2.6,"text-anchor":"middle","font-size":t.value.style.chart.layout.roots.labels.fontSize,fill:t.value.style.chart.layout.roots.labels.adaptColorToBackground?e.unref(n.adaptColorToBackground)(l.color):t.value.style.chart.layout.roots.labels.color,"font-weight":"bold",style:e.normalizeStyle(`cursor:pointer; opacity:${b(l)?1:.05}`),onClick:d=>j(l)},e.toDisplayString(t.value.style.chart.layout.roots.labels.prefix)+" "+e.toDisplayString(l.total.toFixed(t.value.style.chart.layout.roots.labels.roundingValue))+" "+e.toDisplayString(t.value.style.chart.layout.roots.labels.suffix),13,Ae))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,l=>(e.openBlock(),e.createElementBlock("g",null,[c.value&&l.rootIndex===c.value.rootIndex||v.value&&l.rootIndex===v.value.rootIndex||g.value&&l.rootIndex===g.value.rootIndex?(e.openBlock(),e.createElementBlock("g",Ge,[e.createElementVNode("text",{x:l.x,y:l.y+l.r+24,"text-anchor":"middle",fill:t.value.style.chart.layout.roots.labels.name.color,"font-size":t.value.style.chart.layout.roots.labels.name.fontSize,"font-weight":t.value.style.chart.layout.roots.labels.name.bold?"bold":"normal",onClick:p},e.toDisplayString(l.name),9,Ue)])):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,l=>(e.openBlock(),e.createElementBlock("rect",{x:l.x1,y:l.y1,height:r.value.branchSize,width:l.x2-l.x1,fill:t.value.style.chart.layout.branches.underlayerColor,rx:t.value.style.chart.layout.branches.borderRadius,stroke:"none",style:e.normalizeStyle(`opacity:${b(l)?1:.05}`),onClick:o=>F(l)},null,12,qe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(l,o)=>(e.openBlock(),e.createElementBlock("rect",{x:l.x1,y:l.y1,height:r.value.branchSize,width:l.x2-l.x1,fill:t.value.style.chart.layout.branches.useGradient?`url(#branch_gradient_${h.value}_${l.rootIndex})`:l.color,rx:t.value.style.chart.layout.branches.borderRadius,stroke:t.value.style.chart.layout.branches.stroke,"stroke-width":t.value.style.chart.layout.branches.strokeWidth,style:e.normalizeStyle(`cursor:pointer; opacity:${b(l)?1:.05}`),onClick:d=>F(l)},null,12,Ye))),256)),t.value.style.chart.layout.branches.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",He,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,l=>(e.openBlock(),e.createElementBlock("g",null,[l.proportionToRoot*100>t.value.style.chart.layout.branches.labels.dataLabels.hideUnderValue?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.x1+6,y:l.y1+r.value.branchSize/1.5,"text-anchor":"start",fill:e.unref(n.adaptColorToBackground)(l.color),"font-size":t.value.style.chart.layout.branches.labels.dataLabels.fontSize,"font-weight":"bold",style:e.normalizeStyle(`cursor:pointer; opacity:${b(l)?1:.05}`),onClick:o=>F(l)},e.toDisplayString(t.value.style.chart.layout.branches.labels.dataLabels.prefix)+" "+e.toDisplayString(l.value.toFixed(t.value.style.chart.layout.branches.labels.dataLabels.roundingValue))+" "+e.toDisplayString(t.value.style.chart.layout.branches.labels.dataLabels.suffix),13,We)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n.makeDonut)({series:l.breakdown,base:1},l.x2+24+t.value.style.chart.layout.nuts.offsetX,l.y1+r.value.branchSize/2,r.value.branchSize/3,r.value.branchSize/3),(d,i)=>(e.openBlock(),e.createElementBlock("path",{d:d.path,stroke:d.color,"stroke-width":10,fill:"none",style:e.normalizeStyle(`opacity:${b(l)?1:.1}`)},null,12,Ke))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,d=>(e.openBlock(),e.createElementBlock("circle",{cx:d.x2+24+t.value.style.chart.layout.nuts.offsetX,cy:d.y1+r.value.branchSize/2,r:6,fill:t.value.style.chart.backgroundColor,onClick:i=>X(d),style:{cursor:"pointer"}},null,8,Je))),256)),e.createElementVNode("circle",{fill:t.value.style.chart.layout.nuts.useGradient?`url(#nut_${h.value})`:"transparent",cx:l.x2+24+t.value.style.chart.layout.nuts.offsetX,cy:l.y1+r.value.branchSize/2,r:r.value.branchSize/2+2,onClick:d=>X(l),style:e.normalizeStyle(`cursor:pointer;opacity:${b(l)?1:.1}`)},null,12,Qe)]))),256)),t.value.style.chart.layout.branches.labels.show&&!v.value?(e.openBlock(),e.createElementBlock("g",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,l=>(e.openBlock(),e.createElementBlock("text",{x:l.x2+r.value.branchSize+24+t.value.style.chart.layout.nuts.offsetX,y:l.y1+r.value.branchSize/2+5,"font-size":t.value.style.chart.layout.branches.labels.fontSize,"font-weight":t.value.style.chart.layout.branches.labels.bold?"bold":"normal",fill:t.value.style.chart.layout.branches.labels.color,"text-anchor":"start",style:e.normalizeStyle(`opacity:${b(l)?1:.1}`)},e.toDisplayString(l.name),13,et))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:256+r.value.padding.left,x2:256+r.value.padding.left,y1:f.value.top,y2:f.value.bottom,stroke:t.value.style.chart.layout.verticalSeparator.stroke,"stroke-width":t.value.style.chart.layout.verticalSeparator.strokeWidth},null,8,tt),!c.value&&!v.value?(e.openBlock(),e.createElementBlock("foreignObject",{key:5,x:0,y:f.value.bottom,height:r.value.height-f.value.bottom,width:r.value.width,style:{overflow:"visible"},onClick:p},[e.createElementVNode("div",at,[e.createElementVNode("div",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,l=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`display:flex;align-items:center;gap:3px;flex-direction:row;font-size:${t.value.style.chart.layout.legend.fontSize}px;`)},[(e.openBlock(),e.createElementBlock("svg",nt,[e.createElementVNode("circle",{cx:"10",cy:"10",r:"10",fill:l.color,stroke:"none"},null,8,rt)])),e.createElementVNode("span",null,e.toDisplayString(l.name)+":",1),e.createTextVNode(),e.createElementVNode("b",null,e.toDisplayString(t.value.style.chart.layout.legend.prefix)+" "+e.toDisplayString(l.total.toFixed(t.value.style.chart.layout.legend.roundingValue))+" "+e.toDisplayString(t.value.style.chart.layout.legend.suffix),1),e.createTextVNode("("+e.toDisplayString((l.total/x.value*100).toFixed(t.value.style.chart.layout.legend.roundingPercentage))+"%) ",1)],4))),256))])])],8,lt)):e.createCommentVNode("",!0),c.value&&E.value?(e.openBlock(),e.createElementBlock("g",st,[(e.openBlock(),e.createElementBlock("foreignObject",{x:0,y:re(),height:r.value.height-f.value.bottom,width:r.value.width,style:{overflow:"visible"},onClick:p},[e.createElementVNode("div",ct,[e.createElementVNode("b",null,e.toDisplayString(c.value.name),1),e.createElementVNode("div",it,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.breakdown,(l,o)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`display:flex;align-items:center;gap:6px;flex-direction:row;font-size:${t.value.style.chart.layout.legend.fontSize}px;`)},[(e.openBlock(),e.createElementBlock("svg",dt,[e.createElementVNode("circle",{cx:"10",cy:"10",r:"10",fill:l.color,stroke:"none"},null,8,yt)])),e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(l.name)+": ",1),e.createElementVNode("b",null,e.toDisplayString(t.value.style.chart.layout.legend.prefix)+" "+e.toDisplayString(l.value.toFixed(t.value.style.chart.layout.nuts.selected.labels.roundingValue))+" "+e.toDisplayString(t.value.style.chart.layout.legend.suffix),1),e.createTextVNode(" ("+e.toDisplayString((l.proportionToBranch*100).toFixed(t.value.style.chart.layout.nuts.selected.labels.roundingPercentage))+"%)",1)])],4))),256))])])],8,ut)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,l=>(e.openBlock(),e.createElementBlock("g",null,[z(l)?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(n.calcNutArrowPath)(l),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,vt)):e.createCommentVNode("",!0)]))),256)),e.createElementVNode("circle",{cx:c.value.x2+24+t.value.style.chart.layout.nuts.offsetX,cy:c.value.y1+r.value.branchSize/2,r:256,fill:`url(#nut_underlayer_${h.value})`,onClick:S,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,ht),e.createElementVNode("circle",{cx:c.value.x2+24+t.value.style.chart.layout.nuts.offsetX,cy:c.value.y1+r.value.branchSize/2,r:118,fill:t.value.style.chart.backgroundColor,onClick:S,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,pt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,l=>(e.openBlock(),e.createElementBlock("path",{d:l.path,stroke:l.color,"stroke-width":64,fill:"none",onClick:S,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,ft))),256)),e.createElementVNode("circle",{cx:c.value.x2+24+t.value.style.chart.layout.nuts.offsetX,cy:c.value.y1+r.value.branchSize/2,r:100,fill:`url(#nutpick_${h.value})`,onClick:S,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,mt),e.createElementVNode("circle",{cx:c.value.x2+24+t.value.style.chart.layout.nuts.offsetX,cy:c.value.y1+r.value.branchSize/2,r:48,fill:t.value.style.chart.backgroundColor,onClick:S,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,gt),e.createElementVNode("text",{x:c.value.x2+24+t.value.style.chart.layout.nuts.offsetX,y:c.value.y1+8,fill:t.value.style.chart.layout.nuts.selected.labels.core.total.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.core.total.fontSize,"font-weight":t.value.style.chart.layout.nuts.selected.labels.core.total.bold?"bold":"normal","text-anchor":"middle",onClick:S,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString(t.value.translations.total),11,bt),e.createElementVNode("text",{x:c.value.x2+24+t.value.style.chart.layout.nuts.offsetX,y:c.value.y1+36,fill:t.value.style.chart.layout.nuts.selected.labels.core.value.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.core.value.fontSize,"font-weight":t.value.style.chart.layout.nuts.selected.labels.core.value.bold?"bold":"normal","text-anchor":"middle",onClick:S,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString(t.value.style.chart.layout.nuts.selected.labels.core.value.prefix)+" "+e.toDisplayString(c.value.value.toFixed(t.value.style.chart.layout.nuts.selected.roundingValue))+" "+e.toDisplayString(t.value.style.chart.layout.nuts.selected.labels.core.value.suffix),11,kt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",null,[z(l)?(e.openBlock(),e.createElementBlock("text",{key:0,x:e.unref(n.calcMarkerOffsetX)(l).x,"text-anchor":e.unref(n.calcMarkerOffsetX)(l).anchor,y:e.unref(n.calcMarkerOffsetY)(l),fill:l.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")}," ⬤ ",14,xt)):e.createCommentVNode("",!0),z(l)?(e.openBlock(),e.createElementBlock("text",{key:1,x:e.unref(n.calcMarkerOffsetX)(l,!0).x,"text-anchor":e.unref(n.calcMarkerOffsetX)(l,!0).anchor,y:e.unref(n.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString(c.value.breakdown[o].name),15,_t)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",null,[z(l)?(e.openBlock(),e.createElementBlock("text",{key:0,x:e.unref(n.calcMarkerOffsetX)(l,!0).x,"text-anchor":e.unref(n.calcMarkerOffsetX)(l).anchor,y:e.unref(n.calcMarkerOffsetY)(l)+t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString((c.value.breakdown[o].value/c.value.value*100).toFixed(t.value.style.chart.layout.nuts.selected.labels.roundingPercentage))+"% "+e.toDisplayString(t.value.translations.of)+" "+e.toDisplayString(c.value.breakdown[o].branchName)+" ("+e.toDisplayString(t.value.style.chart.layout.nuts.selected.labels.dataLabels.prefix)+" "+e.toDisplayString(c.value.breakdown[o].value)+" "+e.toDisplayString(t.value.style.chart.layout.nuts.selected.labels.dataLabels.suffix)+") ",15,Bt)):e.createCommentVNode("",!0),z(l)?(e.openBlock(),e.createElementBlock("text",{key:1,x:e.unref(n.calcMarkerOffsetX)(l,!0).x,"text-anchor":e.unref(n.calcMarkerOffsetX)(l).anchor,y:e.unref(n.calcMarkerOffsetY)(l)+t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize*2,fill:t.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString((c.value.breakdown[o].proportionToRoot*100).toFixed(t.value.style.chart.layout.nuts.selected.labels.roundingPercentage))+"% "+e.toDisplayString(t.value.translations.of)+" "+e.toDisplayString(c.value.breakdown[o].rootName),15,Et)):e.createCommentVNode("",!0),z(l)?(e.openBlock(),e.createElementBlock("text",{key:2,x:e.unref(n.calcMarkerOffsetX)(l,!0).x,"text-anchor":e.unref(n.calcMarkerOffsetX)(l).anchor,y:e.unref(n.calcMarkerOffsetY)(l)+t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize*3,fill:t.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString((c.value.breakdown[o].proportionToTree*100).toFixed(t.value.style.chart.layout.nuts.selected.labels.roundingPercentage))+"% "+e.toDisplayString(t.value.translations.proportionToTree),15,St)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,l=>(e.openBlock(),e.createElementBlock("g",null,[v.value&&v.value.id===l.id&&!c.value?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.x1+6,y:l.y1+r.value.branchSize+24,"font-weight":"bold","text-anchor":"start","font-size":t.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.branches.labels.color,onClick:p},e.toDisplayString(l.name)+": "+e.toDisplayString(t.value.style.chart.layout.branches.labels.dataLabels.prefix)+" "+e.toDisplayString(l.value.toFixed(t.value.style.chart.layout.branches.labels.dataLabels.roundingValue))+" "+e.toDisplayString(t.value.style.chart.layout.branches.labels.dataLabels.suffix),9,Nt)):e.createCommentVNode("",!0),v.value&&v.value.id===l.id&&!c.value?(e.openBlock(),e.createElementBlock("text",{key:1,x:l.x1+6,y:l.y1+r.value.branchSize+48,"text-anchor":"start","font-size":t.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.branches.labels.color,onClick:p},e.toDisplayString((l.proportionToRoot*100).toFixed(t.value.style.chart.layout.branches.labels.dataLabels.roundingPercentage))+"% "+e.toDisplayString(t.value.translations.of)+" "+e.toDisplayString(l.rootName),9,zt)):e.createCommentVNode("",!0),v.value&&v.value.id===l.id&&!c.value?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.x1+6,y:l.y1+r.value.branchSize+72,"text-anchor":"start","font-size":t.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.branches.labels.color,onClick:p},e.toDisplayString((l.value/x.value*100).toFixed(t.value.style.chart.layout.branches.labels.dataLabels.roundingPercentage))+"% "+e.toDisplayString(t.value.translations.proportionToTree),9,Ct)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(a.$slots,"svg",{svg:r.value},void 0,!0)],14,he)):e.createCommentVNode("",!0),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ce.default,{key:2,config:{type:"chestnut",style:{backgroundColor:t.value.style.chart.backgroundColor,chestnut:{color:"#CCCCCC"}}}},null,8,["config"])),e.renderSlot(a.$slots,"legend",{legend:m.value},void 0,!0),C.value?(e.openBlock(),e.createBlock(de.default,{key:3,hideDetails:"",config:{open:w.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:P,class:"vue-ui-chestnut-table"},[e.createElementVNode("div",wt,[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:s[0]||(s[0]=l=>w.value.showTable=!1),onKeypress:s[1]||(s[1]=e.withKeys(l=>w.value.showTable=!1,["enter"]))},[e.createVNode(ie.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("div",{style:{width:"100%"},class:e.normalizeClass({"vue-ui-responsive":O.value})},[e.createElementVNode("table",Vt,[e.createElementVNode("caption",{style:e.normalizeStyle({backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline}),class:"vue-ui-data-table__caption"},[e.createTextVNode(e.toDisplayString(t.value.style.chart.layout.title.text)+" ",1),t.value.style.chart.layout.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",$t,e.toDisplayString(t.value.style.chart.layout.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.head,l=>(e.openBlock(),e.createElementBlock("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline}`)},e.toDisplayString(l),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.body,(l,o)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":o%2===0,"vue-ui-data-table__tbody__row-odd":o%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":u.value.head[0]},[e.createElementVNode("div",Ft,[u.value.body[o-1]&&u.value.body[o-1].rootName===l.rootName?(e.openBlock(),e.createElementBlock("span",Dt)):(e.openBlock(),e.createElementBlock("span",Lt,e.toDisplayString(l.rootName),1))])],12,Tt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":u.value.head[1]},[e.createElementVNode("div",It,[u.value.body[o-1]&&u.value.body[o-1].rootName===l.rootName?(e.openBlock(),e.createElementBlock("span",Pt)):(e.openBlock(),e.createElementBlock("span",Ot,e.toDisplayString(l.rootValue.toFixed(t.value.table.td.roundingValue)),1))])],12,Mt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":u.value.head[2]},[e.createElementVNode("div",Xt,[u.value.body[o-1]&&u.value.body[o-1].rootName===l.rootName?(e.openBlock(),e.createElementBlock("span",jt)):(e.openBlock(),e.createElementBlock("span",At,e.toDisplayString((l.rootToTotal*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1))])],12,Rt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":u.value.head[3]},[e.createElementVNode("div",Ut,[u.value.body[o-1]&&u.value.body[o-1].branchName===l.branchName?(e.openBlock(),e.createElementBlock("span",qt)):(e.openBlock(),e.createElementBlock("span",Yt,e.toDisplayString(l.branchName),1))])],12,Gt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":u.value.head[4]},[e.createElementVNode("div",Wt,[u.value.body[o-1]&&u.value.body[o-1].branchName===l.branchName?(e.openBlock(),e.createElementBlock("span",Kt)):(e.openBlock(),e.createElementBlock("span",Jt,e.toDisplayString(l.branchValue.toFixed(t.value.table.td.roundingValue)),1))])],12,Ht),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":u.value.head[5]},[e.createElementVNode("div",Zt,[u.value.body[o-1]&&u.value.body[o-1].branchName===l.branchName?(e.openBlock(),e.createElementBlock("span",el)):(e.openBlock(),e.createElementBlock("span",tl,e.toDisplayString((l.branchToRoot*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1))])],12,Qt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":u.value.head[6]},[e.createElementVNode("div",al,[u.value.body[o-1]&&u.value.body[o-1].branchName===l.branchName?(e.openBlock(),e.createElementBlock("span",ol)):(e.openBlock(),e.createElementBlock("span",nl,e.toDisplayString((l.branchToTotal*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1))])],12,ll),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":u.value.head[7]},[e.createElementVNode("div",sl,e.toDisplayString(l.nutName),1)],12,rl),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":u.value.head[8]},[e.createElementVNode("div",cl,e.toDisplayString(l.nutValue.toFixed(t.value.table.td.roundingValue)),1)],12,ul),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":u.value.head[9]},[e.createElementVNode("div",dl,e.toDisplayString((l.nutToBranch*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1)],12,il),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":u.value.head[10]},[e.createElementVNode("div",vl,e.toDisplayString((l.nutToRoot*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1)],12,yl),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":u.value.head[11]},[e.createElementVNode("div",pl,e.toDisplayString((l.nutToTotal*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1)],12,hl)],6))),256))])])],2)])],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ve))}},ml=ye._export_sfc(fl,[["__scopeId","data-v-bf0d15ab"]]);exports.default=ml;
@@ -0,0 +1,229 @@
1
+ import { ref as n, computed as m, onMounted as R, onBeforeUnmount as b, openBlock as o, createElementBlock as l, unref as C, normalizeStyle as E, createElementVNode as r, createCommentVNode as i, normalizeClass as p, toDisplayString as x, nextTick as F, pushScopeId as I, popScopeId as L } from "vue";
2
+ import { u as z } from "./useNestedProp-BgWkUab_.js";
3
+ import { u as O, c as B, X as N, r as T } from "./index-uOtklCCx.js";
4
+ import { _ as D } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ const g = (a) => (I("data-v-fe8d65eb"), a = a(), L(), a), $ = ["xmlns", "height", "width"], W = {
6
+ id: "follower",
7
+ fy: "30%",
8
+ fx: "30%"
9
+ }, G = ["stop-color", "stop-opacity"], A = /* @__PURE__ */ g(() => /* @__PURE__ */ r("stop", {
10
+ offset: "95%",
11
+ "stop-color": "transparent"
12
+ }, null, -1)), U = ["r", "fill", "stroke", "stroke-width", "stroke-dasharray"], V = ["r", "fill"], M = {
13
+ key: 2,
14
+ class: "wave"
15
+ }, P = ["id"], X = ["id"], j = /* @__PURE__ */ g(() => /* @__PURE__ */ r("feColorMatrix", {
16
+ type: "saturate",
17
+ values: "0"
18
+ }, null, -1)), Y = ["filter", "stroke"], q = {
19
+ key: 3,
20
+ class: "crosshair"
21
+ }, H = ["x1", "stroke", "stroke-width", "stroke-dasharray"], J = ["x1", "stroke", "stroke-width", "stroke-dasharray"], K = ["y1", "stroke", "stroke-width", "stroke-dasharray"], Q = ["y1", "stroke", "stroke-width", "stroke-dasharray"], Z = ["cy", "r", "fill"], ee = ["cy", "r", "fill"], te = ["cx", "r", "fill"], re = ["cx", "r", "fill"], se = {
22
+ key: 5,
23
+ class: "coordinates"
24
+ }, oe = ["x", "y", "font-size", "fill"], le = ["transform"], ie = ["font-size", "fill"], ae = {
25
+ __name: "vue-ui-cursor",
26
+ props: {
27
+ config: {
28
+ type: Object,
29
+ default: {}
30
+ }
31
+ },
32
+ setup(a) {
33
+ const w = a, { vue_ui_cursor: S } = O(), d = n(B()), e = m(() => z({
34
+ userConfig: w.config,
35
+ defaultConfig: S
36
+ })), s = n({
37
+ x: -100,
38
+ y: -100
39
+ });
40
+ function h({ clientX: t, clientY: k, ...ce }) {
41
+ s.value.x = t - e.value.centerCircleRadius, s.value.y = k - e.value.centerCircleRadius;
42
+ }
43
+ function f(t) {
44
+ s.value.x = t.targetTouches[0].clientX - e.value.centerCircleRadius, s.value.y = t.targetTouches[0].clientY - e.value.centerCircleRadius;
45
+ }
46
+ const y = n(!0);
47
+ function u(t) {
48
+ y.value = t;
49
+ }
50
+ const c = n(!1), v = n(null);
51
+ function _() {
52
+ c.value = !1, v.value && clearTimeout(v.value), F(() => {
53
+ c.value = !0, v.value = setTimeout(() => {
54
+ c.value = !1;
55
+ }, 1e3);
56
+ });
57
+ }
58
+ return R(() => {
59
+ const t = e.value.parentId ? document.getElementById(e.value.parentId) : document.getElementsByTagName("div")[0];
60
+ t.addEventListener("mousemove", h), t.addEventListener("touchmove", f), t.addEventListener("mouseleave", () => u(!1)), t.addEventListener("mouseenter", () => u(!0)), t.addEventListener("click", _);
61
+ }), b(() => {
62
+ const t = e.value.parentId ? document.getElementById(e.value.parentId) : document.getElementsByTagName("div")[0];
63
+ t.removeEventListener("mousemove", h), t.removeEventListener("touchmove", f), t.removeEventListener("mouseleave", () => u(!1)), t.removeEventListener("mouseenter", () => u(!0)), t.removeEventListener("click", _);
64
+ }), m(() => e.value.centerCircleRadius / 2.5), (t, k) => y.value ? (o(), l("svg", {
65
+ key: 0,
66
+ "data-html2canvas-ignore": "",
67
+ xmlns: C(N),
68
+ style: E(`z-index: 2147483647; overflow: visible; pointer-events: none;background: transparent; position:fixed; top:${s.value.y}px; left:${s.value.x}px;`),
69
+ viewBox: "0 0 100 100",
70
+ height: e.value.centerCircleRadius * 2,
71
+ width: e.value.centerCircleRadius * 2
72
+ }, [
73
+ r("defs", null, [
74
+ r("radialGradient", W, [
75
+ r("stop", {
76
+ offset: "10%",
77
+ "stop-color": e.value.bubbleEffectColor,
78
+ "stop-opacity": e.value.bubbleEffectOpacity
79
+ }, null, 8, G),
80
+ A
81
+ ])
82
+ ]),
83
+ e.value.showCenterCircle ? (o(), l("circle", {
84
+ key: 0,
85
+ cx: 50,
86
+ cy: 50,
87
+ r: e.value.centerCircleRadius,
88
+ fill: e.value.centerCircleColor + C(T)[e.value.centerCircleOpacity * 100],
89
+ stroke: e.value.centerCircleStroke,
90
+ "stroke-width": e.value.centerCircleStrokeWidth,
91
+ "stroke-dasharray": e.value.centerCircleDasharray
92
+ }, null, 8, U)) : i("", !0),
93
+ e.value.bubbleEffect ? (o(), l("circle", {
94
+ key: 1,
95
+ cx: 50,
96
+ cy: 50,
97
+ r: e.value.centerCircleRadius,
98
+ fill: "url(#follower)",
99
+ stroke: "none"
100
+ }, null, 8, V)) : i("", !0),
101
+ e.value.useWaveOnClick ? (o(), l("g", M, [
102
+ r("defs", null, [
103
+ r("filter", {
104
+ id: `blur_${d.value}`,
105
+ x: "-50%",
106
+ y: "-50%",
107
+ width: "200%",
108
+ height: "200%"
109
+ }, [
110
+ r("feGaussianBlur", {
111
+ in: "SourceGraphic",
112
+ stdDeviation: 4,
113
+ id: `blur_std_${d.value}`
114
+ }, null, 8, X),
115
+ j
116
+ ], 8, P)
117
+ ]),
118
+ c.value ? (o(), l("circle", {
119
+ key: 0,
120
+ class: p({ "circle-wave": c.value }),
121
+ cx: 50,
122
+ cy: 50,
123
+ r: 50,
124
+ filter: `url(#blur_${d.value})`,
125
+ stroke: e.value.centerCircleStroke,
126
+ fill: "none",
127
+ "stroke-width": "3"
128
+ }, null, 10, Y)) : i("", !0)
129
+ ])) : i("", !0),
130
+ e.value.showCrosshair ? (o(), l("g", q, [
131
+ r("line", {
132
+ x1: -e.value.centerCircleRadius + 50,
133
+ x2: -5e3,
134
+ y1: 50,
135
+ y2: 50,
136
+ stroke: e.value.crosshairStroke,
137
+ "stroke-width": e.value.crosshairStrokeWidth,
138
+ "stroke-dasharray": e.value.crosshairDasharray,
139
+ "stroke-linecap": "round"
140
+ }, null, 8, H),
141
+ r("line", {
142
+ x1: 50 + e.value.centerCircleRadius,
143
+ x2: 5e3,
144
+ y1: 50,
145
+ y2: 50,
146
+ stroke: e.value.crosshairStroke,
147
+ "stroke-width": e.value.crosshairStrokeWidth,
148
+ "stroke-dasharray": e.value.crosshairDasharray,
149
+ "stroke-linecap": "round"
150
+ }, null, 8, J),
151
+ r("line", {
152
+ x1: 50,
153
+ x2: 50,
154
+ y1: -e.value.centerCircleRadius + 50,
155
+ y2: -5e3,
156
+ stroke: e.value.crosshairStroke,
157
+ "stroke-width": e.value.crosshairStrokeWidth,
158
+ "stroke-dasharray": e.value.crosshairDasharray,
159
+ "stroke-linecap": "round"
160
+ }, null, 8, K),
161
+ r("line", {
162
+ x1: 50,
163
+ x2: 50,
164
+ y1: e.value.centerCircleRadius + 50,
165
+ y2: 5e3,
166
+ stroke: e.value.crosshairStroke,
167
+ "stroke-width": e.value.crosshairStrokeWidth,
168
+ "stroke-dasharray": e.value.crosshairDasharray,
169
+ "stroke-linecap": "round"
170
+ }, null, 8, Q)
171
+ ])) : i("", !0),
172
+ e.value.showIntersectCircles ? (o(), l("g", {
173
+ key: 4,
174
+ class: p({ "rotating-circles": e.value.isLoading })
175
+ }, [
176
+ r("circle", {
177
+ cx: 50,
178
+ cy: e.value.centerCircleRadius + 50,
179
+ r: e.value.intersectCirclesRadius,
180
+ fill: e.value.intersectCirclesFill
181
+ }, null, 8, Z),
182
+ r("circle", {
183
+ cx: 50,
184
+ cy: -e.value.centerCircleRadius + 50,
185
+ r: e.value.intersectCirclesRadius,
186
+ fill: e.value.intersectCirclesFill
187
+ }, null, 8, ee),
188
+ r("circle", {
189
+ cx: -e.value.centerCircleRadius + 50,
190
+ cy: 50,
191
+ r: e.value.intersectCirclesRadius,
192
+ fill: e.value.intersectCirclesFill
193
+ }, null, 8, te),
194
+ r("circle", {
195
+ cx: e.value.centerCircleRadius + 50,
196
+ cy: 50,
197
+ r: e.value.intersectCirclesRadius,
198
+ fill: e.value.intersectCirclesFill
199
+ }, null, 8, re)
200
+ ], 2)) : i("", !0),
201
+ e.value.showCoordinates ? (o(), l("g", se, [
202
+ r("text", {
203
+ "text-anchor": "end",
204
+ x: -e.value.centerCircleRadius + 50 - e.value.coordinatesFontSize / 2 + e.value.coordinatesOffset,
205
+ y: 50 - e.value.coordinatesFontSize / 2 + e.value.coordinatesOffset,
206
+ "font-size": e.value.coordinatesFontSize,
207
+ fill: e.value.coordinatesColor,
208
+ style: { "font-variant-numeric": "tabular-nums" },
209
+ "font-family": "Arial"
210
+ }, x(s.value.x.toFixed(0)), 9, oe),
211
+ r("g", {
212
+ transform: `translate(${50 - e.value.coordinatesFontSize / 2 + e.value.coordinatesOffset}, ${-e.value.centerCircleRadius + 50 - e.value.coordinatesFontSize / 2 + e.value.coordinatesOffset})`
213
+ }, [
214
+ r("text", {
215
+ "text-anchor": "start",
216
+ "font-size": e.value.coordinatesFontSize,
217
+ fill: e.value.coordinatesColor,
218
+ style: { "font-variant-numeric": "tabular-nums" },
219
+ transform: "rotate(-90)",
220
+ "font-family": "Arial"
221
+ }, x(s.value.y.toFixed(0)), 9, ie)
222
+ ], 8, le)
223
+ ])) : i("", !0)
224
+ ], 12, $)) : i("", !0);
225
+ }
226
+ }, he = /* @__PURE__ */ D(ae, [["__scopeId", "data-v-fe8d65eb"]]);
227
+ export {
228
+ he as default
229
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),_=require("./useNestedProp-2kIU-7On.cjs"),i=require("./index-p5gfZSvB.cjs"),C=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),m=l=>(t.pushScopeId("data-v-fe8d65eb"),l=l(),t.popScopeId(),l),p=["xmlns","height","width"],x={id:"follower",fy:"30%",fx:"30%"},E=["stop-color","stop-opacity"],N=m(()=>t.createElementVNode("stop",{offset:"95%","stop-color":"transparent"},null,-1)),g=["r","fill","stroke","stroke-width","stroke-dasharray"],V=["r","fill"],S={key:2,class:"wave"},w=["id"],b=["id"],B=m(()=>t.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),R=["filter","stroke"],F={key:3,class:"crosshair"},z=["x1","stroke","stroke-width","stroke-dasharray"],I=["x1","stroke","stroke-width","stroke-dasharray"],L=["y1","stroke","stroke-width","stroke-dasharray"],O=["y1","stroke","stroke-width","stroke-dasharray"],T=["cy","r","fill"],D=["cy","r","fill"],$=["cx","r","fill"],W=["cx","r","fill"],G={key:5,class:"coordinates"},P=["x","y","font-size","fill"],q=["transform"],A=["font-size","fill"],M={__name:"vue-ui-cursor",props:{config:{type:Object,default:{}}},setup(l){const k=l,{vue_ui_cursor:y}=i.useConfig(),c=t.ref(i.createUid()),e=t.computed(()=>_.useNestedProp({userConfig:k.config,defaultConfig:y})),o=t.ref({x:-100,y:-100});function u({clientX:r,clientY:h,...j}){o.value.x=r-e.value.centerCircleRadius,o.value.y=h-e.value.centerCircleRadius}function d(r){o.value.x=r.targetTouches[0].clientX-e.value.centerCircleRadius,o.value.y=r.targetTouches[0].clientY-e.value.centerCircleRadius}const v=t.ref(!0);function a(r){v.value=r}const s=t.ref(!1),n=t.ref(null);function f(){s.value=!1,n.value&&clearTimeout(n.value),t.nextTick(()=>{s.value=!0,n.value=setTimeout(()=>{s.value=!1},1e3)})}return t.onMounted(()=>{const r=e.value.parentId?document.getElementById(e.value.parentId):document.getElementsByTagName("div")[0];r.addEventListener("mousemove",u),r.addEventListener("touchmove",d),r.addEventListener("mouseleave",()=>a(!1)),r.addEventListener("mouseenter",()=>a(!0)),r.addEventListener("click",f)}),t.onBeforeUnmount(()=>{const r=e.value.parentId?document.getElementById(e.value.parentId):document.getElementsByTagName("div")[0];r.removeEventListener("mousemove",u),r.removeEventListener("touchmove",d),r.removeEventListener("mouseleave",()=>a(!1)),r.removeEventListener("mouseenter",()=>a(!0)),r.removeEventListener("click",f)}),t.computed(()=>e.value.centerCircleRadius/2.5),(r,h)=>v.value?(t.openBlock(),t.createElementBlock("svg",{key:0,"data-html2canvas-ignore":"",xmlns:t.unref(i.XMLNS),style:t.normalizeStyle(`z-index: 2147483647; overflow: visible; pointer-events: none;background: transparent; position:fixed; top:${o.value.y}px; left:${o.value.x}px;`),viewBox:"0 0 100 100",height:e.value.centerCircleRadius*2,width:e.value.centerCircleRadius*2},[t.createElementVNode("defs",null,[t.createElementVNode("radialGradient",x,[t.createElementVNode("stop",{offset:"10%","stop-color":e.value.bubbleEffectColor,"stop-opacity":e.value.bubbleEffectOpacity},null,8,E),N])]),e.value.showCenterCircle?(t.openBlock(),t.createElementBlock("circle",{key:0,cx:50,cy:50,r:e.value.centerCircleRadius,fill:e.value.centerCircleColor+t.unref(i.opacity)[e.value.centerCircleOpacity*100],stroke:e.value.centerCircleStroke,"stroke-width":e.value.centerCircleStrokeWidth,"stroke-dasharray":e.value.centerCircleDasharray},null,8,g)):t.createCommentVNode("",!0),e.value.bubbleEffect?(t.openBlock(),t.createElementBlock("circle",{key:1,cx:50,cy:50,r:e.value.centerCircleRadius,fill:"url(#follower)",stroke:"none"},null,8,V)):t.createCommentVNode("",!0),e.value.useWaveOnClick?(t.openBlock(),t.createElementBlock("g",S,[t.createElementVNode("defs",null,[t.createElementVNode("filter",{id:`blur_${c.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[t.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:4,id:`blur_std_${c.value}`},null,8,b),B],8,w)]),s.value?(t.openBlock(),t.createElementBlock("circle",{key:0,class:t.normalizeClass({"circle-wave":s.value}),cx:50,cy:50,r:50,filter:`url(#blur_${c.value})`,stroke:e.value.centerCircleStroke,fill:"none","stroke-width":"3"},null,10,R)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.value.showCrosshair?(t.openBlock(),t.createElementBlock("g",F,[t.createElementVNode("line",{x1:-e.value.centerCircleRadius+50,x2:-5e3,y1:50,y2:50,stroke:e.value.crosshairStroke,"stroke-width":e.value.crosshairStrokeWidth,"stroke-dasharray":e.value.crosshairDasharray,"stroke-linecap":"round"},null,8,z),t.createElementVNode("line",{x1:50+e.value.centerCircleRadius,x2:5e3,y1:50,y2:50,stroke:e.value.crosshairStroke,"stroke-width":e.value.crosshairStrokeWidth,"stroke-dasharray":e.value.crosshairDasharray,"stroke-linecap":"round"},null,8,I),t.createElementVNode("line",{x1:50,x2:50,y1:-e.value.centerCircleRadius+50,y2:-5e3,stroke:e.value.crosshairStroke,"stroke-width":e.value.crosshairStrokeWidth,"stroke-dasharray":e.value.crosshairDasharray,"stroke-linecap":"round"},null,8,L),t.createElementVNode("line",{x1:50,x2:50,y1:e.value.centerCircleRadius+50,y2:5e3,stroke:e.value.crosshairStroke,"stroke-width":e.value.crosshairStrokeWidth,"stroke-dasharray":e.value.crosshairDasharray,"stroke-linecap":"round"},null,8,O)])):t.createCommentVNode("",!0),e.value.showIntersectCircles?(t.openBlock(),t.createElementBlock("g",{key:4,class:t.normalizeClass({"rotating-circles":e.value.isLoading})},[t.createElementVNode("circle",{cx:50,cy:e.value.centerCircleRadius+50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,T),t.createElementVNode("circle",{cx:50,cy:-e.value.centerCircleRadius+50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,D),t.createElementVNode("circle",{cx:-e.value.centerCircleRadius+50,cy:50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,$),t.createElementVNode("circle",{cx:e.value.centerCircleRadius+50,cy:50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,W)],2)):t.createCommentVNode("",!0),e.value.showCoordinates?(t.openBlock(),t.createElementBlock("g",G,[t.createElementVNode("text",{"text-anchor":"end",x:-e.value.centerCircleRadius+50-e.value.coordinatesFontSize/2+e.value.coordinatesOffset,y:50-e.value.coordinatesFontSize/2+e.value.coordinatesOffset,"font-size":e.value.coordinatesFontSize,fill:e.value.coordinatesColor,style:{"font-variant-numeric":"tabular-nums"},"font-family":"Arial"},t.toDisplayString(o.value.x.toFixed(0)),9,P),t.createElementVNode("g",{transform:`translate(${50-e.value.coordinatesFontSize/2+e.value.coordinatesOffset}, ${-e.value.centerCircleRadius+50-e.value.coordinatesFontSize/2+e.value.coordinatesOffset})`},[t.createElementVNode("text",{"text-anchor":"start","font-size":e.value.coordinatesFontSize,fill:e.value.coordinatesColor,style:{"font-variant-numeric":"tabular-nums"},transform:"rotate(-90)","font-family":"Arial"},t.toDisplayString(o.value.y.toFixed(0)),9,A)],8,q)])):t.createCommentVNode("",!0)],12,p)):t.createCommentVNode("",!0)}},U=C._export_sfc(M,[["__scopeId","data-v-fe8d65eb"]]);exports.default=U;
@@ -0,0 +1,232 @@
1
+ import { useCssVars as J, computed as _, ref as r, watch as K, openBlock as w, createElementBlock as y, createElementVNode as g, normalizeStyle as z, createCommentVNode as I, Fragment as D, renderList as Q, normalizeClass as Z, renderSlot as ee, pushScopeId as te, popScopeId as oe, createStaticVNode as ae } from "vue";
2
+ import { p as le } from "./pdf-97UbtKC2.js";
3
+ import { u as ue } from "./useNestedProp-BgWkUab_.js";
4
+ import { u as ne } from "./index-uOtklCCx.js";
5
+ import { _ as se } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
+ const ie = (M) => (te("data-v-57895b3a"), M = M(), oe(), M), re = {
7
+ key: 0,
8
+ "data-html2canvas-ignore": "",
9
+ style: { width: "100%", display: "flex", "justify-content": "end" }
10
+ }, de = ["disabled"], ce = ["stroke"], he = /* @__PURE__ */ ae('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-57895b3a></path><path d="M18 16v.01" data-v-57895b3a></path><path d="M6 16v.01" data-v-57895b3a></path><path d="M12 5v.01" data-v-57895b3a></path><path d="M12 12v.01" data-v-57895b3a></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-57895b3a></path>', 6), ve = [
11
+ he
12
+ ], fe = { key: 1 }, pe = ["id"], ge = /* @__PURE__ */ ie(() => /* @__PURE__ */ g("div", { class: "vue-ui-dashboard-grid" }, null, -1)), be = ["onMousedown", "onTouchstart"], we = ["onMousedown", "onTouchstart"], ye = ["onMousedown", "onTouchstart"], _e = ["onMousedown", "onTouchstart"], Me = ["onMousedown", "onTouchstart"], x = 20, me = {
13
+ __name: "vue-ui-dashboard",
14
+ props: {
15
+ dataset: Array,
16
+ config: Object
17
+ },
18
+ emits: ["change"],
19
+ setup(M, { expose: W, emit: E }) {
20
+ const X = M;
21
+ J((e) => ({
22
+ "417957d3": V.value,
23
+ "60fae9e7": j.value
24
+ }));
25
+ const { vue_ui_dashboard: L } = ne(), s = _(() => ue({
26
+ userConfig: X.config,
27
+ defaultConfig: L
28
+ })), Y = r(`vue-ui-dashboard-${Math.random()}`), c = r(s.value.locked);
29
+ function N() {
30
+ c.value = !c.value;
31
+ }
32
+ const n = r(X.dataset), h = r(null), u = r(null), v = r({ x: 0, y: 0 }), f = r({ x: 0, y: 0 }), i = r(null), d = r(!1), p = r(null), T = r(!1);
33
+ function S() {
34
+ T.value = !0, le({
35
+ domElement: document.getElementById(`vue-ui-dashboard_${Y.value}`),
36
+ fileName: "vue-ui-dashboard"
37
+ }).finally(() => {
38
+ T.value = !1;
39
+ });
40
+ }
41
+ function R(e) {
42
+ if (!c.value && (d.value = !0, p.value = e, u.value === null)) {
43
+ h.value = e, v.value = { x: event.clientX, y: event.clientY };
44
+ const t = n.value[e], a = 100 - t.width, o = 100 - t.height;
45
+ t.left < 0 && (t.left = 0), t.top < 0 && (t.top = 0), t.left > a && (t.left = a), t.top > o && (t.top = o), t.left < 0 && (t.left = 0), t.top < 0 && (t.top = 0), t.left + t.width > 100 && (t.left = 100 - t.width), t.top + t.height > 100 && (t.top = 100 - t.height);
46
+ }
47
+ }
48
+ function k(e, t) {
49
+ d.value = !0, p.value = e, u.value = { index: e, direction: t };
50
+ const a = n.value[e];
51
+ f.value = { x: event.clientX, y: event.clientY, initialWidth: a.width, initialHeight: a.height };
52
+ }
53
+ function H(e, t, a) {
54
+ if (u.value.direction.includes("top")) {
55
+ const o = e.height - a / i.value.offsetHeight * 100;
56
+ o >= x && (e.top += a / i.value.offsetHeight * 100, e.height = o);
57
+ }
58
+ if (u.value.direction.includes("bottom")) {
59
+ const o = e.height + a / i.value.offsetHeight * 100;
60
+ o >= x && (e.height = o);
61
+ }
62
+ if (u.value.direction.includes("left")) {
63
+ const o = e.width - t / i.value.offsetWidth * 100;
64
+ o >= x && (e.left += t / i.value.offsetWidth * 100, e.width = o);
65
+ }
66
+ if (u.value.direction.includes("right")) {
67
+ const o = e.width + t / i.value.offsetWidth * 100;
68
+ o >= x && (e.width = o);
69
+ }
70
+ }
71
+ function B(e) {
72
+ if (!c.value) {
73
+ if (d.value = !0, h.value !== null) {
74
+ const t = n.value[h.value], a = e.clientX - v.value.x, o = e.clientY - v.value.y, l = t.left + a / i.value.offsetWidth * 100, b = t.top + o / i.value.offsetHeight * 100;
75
+ l >= 0 && b >= 0 && l + t.width <= 100 && b + t.height <= 100 && (t.left = l, t.top = b), v.value = { x: e.clientX, y: e.clientY };
76
+ }
77
+ if (u.value !== null) {
78
+ const t = n.value[u.value.index], a = e.clientX - f.value.x, o = e.clientY - f.value.y;
79
+ H(t, a, o), f.value = { x: e.clientX, y: e.clientY };
80
+ }
81
+ }
82
+ }
83
+ K(
84
+ n,
85
+ (e) => {
86
+ e && !d.value && E("change", n.value);
87
+ },
88
+ { deep: !0 }
89
+ );
90
+ function F() {
91
+ h.value = null, u.value = null, d.value = !1, p.value = null, n.value.forEach((e) => {
92
+ e.left = Math.round(e.left / 100 * 100), e.top = Math.round(e.top / 100 * 100), e.width = Math.round(e.width / 100 * 100), e.height = Math.round(e.height / 100 * 100);
93
+ });
94
+ }
95
+ function P(e) {
96
+ c.value || (d.value = !0, p.value = e, u.value === null && (h.value = e, v.value = { x: event.touches[0].clientX, y: event.touches[0].clientY }));
97
+ }
98
+ function C(e, t, a) {
99
+ if (d.value = !0, p.value = e, u.value === null) {
100
+ u.value = { index: e, direction: t };
101
+ const o = n.value[e];
102
+ f.value = { x: a.touches[0].clientX, y: a.touches[0].clientY, initialWidth: o.width, initialHeight: o.height };
103
+ }
104
+ }
105
+ function $(e) {
106
+ if (d.value = !0, e.preventDefault(), u.value !== null) {
107
+ const t = n.value[u.value.index], a = e.touches[0].clientX - f.value.x, o = e.touches[0].clientY - f.value.y;
108
+ H(t, a, o), f.value = { x: e.touches[0].clientX, y: e.touches[0].clientY };
109
+ }
110
+ }
111
+ function O(e) {
112
+ if (!c.value && (d.value = !0, e.preventDefault(), h.value !== null)) {
113
+ const t = n.value[h.value], a = e.touches[0].clientX - v.value.x, o = e.touches[0].clientY - v.value.y, l = t.left + a / i.value.offsetWidth * 100, b = t.top + o / i.value.offsetHeight * 100;
114
+ l >= 0 && b >= 0 && l + t.width <= 100 && b + t.height <= 100 && (t.left = l, t.top = b), v.value = { x: e.touches[0].clientX, y: e.touches[0].clientY };
115
+ }
116
+ }
117
+ function m() {
118
+ d.value = !1, p.value = null, h.value = null, u.value = null, n.value.forEach((e) => {
119
+ e.left = Math.round(e.left / 100 * 100), e.top = Math.round(e.top / 100 * 100), e.width = Math.round(e.width / 100 * 100), e.height = Math.round(e.height / 100 * 100);
120
+ });
121
+ }
122
+ const V = _(() => s.value.style.item.borderColor), j = _(() => s.value.style.resizeHandles.backgroundColor), A = _(() => s.value.style.board.aspectRatio), G = _(() => s.value.style.board.backgroundColor), U = _(() => s.value.style.board.border);
123
+ function q() {
124
+ return n.value;
125
+ }
126
+ return W({
127
+ generatePdf: S,
128
+ getItemsPositions: q,
129
+ toggleLock: N
130
+ }), (e, t) => (w(), y("div", null, [
131
+ s.value.allowPrint ? (w(), y("div", re, [
132
+ g("button", {
133
+ class: "vue-ui-dashboard-button",
134
+ onClick: S,
135
+ disabled: T.value,
136
+ style: z([{ "margin-top": "12px" }, `color:${s.value.style.board.color}`])
137
+ }, [
138
+ T.value ? (w(), y("svg", {
139
+ key: 0,
140
+ class: "vue-ui-dashboard-print-icon",
141
+ xmlns: "http://www.w3.org/2000/svg",
142
+ width: "20",
143
+ height: "20",
144
+ viewBox: "0 0 24 24",
145
+ "stroke-width": "1.5",
146
+ stroke: s.value.style.board.color,
147
+ fill: "none",
148
+ "stroke-linecap": "round",
149
+ "stroke-linejoin": "round"
150
+ }, ve, 8, ce)) : (w(), y("span", fe, "PDF"))
151
+ ], 12, de)
152
+ ])) : I("", !0),
153
+ g("div", {
154
+ class: "vue-ui-dashboard-container",
155
+ ref_key: "dashboardContainer",
156
+ ref: i,
157
+ id: `vue-ui-dashboard_${Y.value}`,
158
+ style: z(`border:${U.value}; sbackground:${G.value}; aspect-ratio:${A.value}`)
159
+ }, [
160
+ g("div", {
161
+ class: "vue-ui-dashboard-grid-container",
162
+ ref: "container",
163
+ onMousemove: B,
164
+ onMouseup: F,
165
+ onTouchmove: O,
166
+ onTouchend: m,
167
+ style: z(`background:${s.value.style.board.backgroundColor}`)
168
+ }, [
169
+ ge,
170
+ (w(!0), y(D, null, Q(n.value, (a, o) => (w(), y("div", {
171
+ key: a.id,
172
+ class: Z({ "vue-ui-dashboard-grid-item": !0, "vue-ui-dashboard-grid-item--locked": c.value }),
173
+ style: z({
174
+ width: `${a.width}%`,
175
+ height: `${a.height}%`,
176
+ left: `${a.left}%`,
177
+ top: `${a.top}%`,
178
+ cursor: "move",
179
+ boxShadow: p.value === o ? "0 6px 12px -3px rgba(0,0,0,0.3)" : "",
180
+ zIndex: p.value === o ? "1" : "0",
181
+ backgroundColor: s.value.style.item.backgroundColor
182
+ }),
183
+ onMousedown: (l) => R(o),
184
+ onTouchstart: (l) => P(o)
185
+ }, [
186
+ c.value ? I("", !0) : (w(), y(D, { key: 0 }, [
187
+ g("div", {
188
+ class: "vue-ui-dashboard-resize-handle vue-ui-dashboard-top-left",
189
+ onMousedown: (l) => k(o, "top-left"),
190
+ onTouchstart: (l) => C(o, "top-left", l),
191
+ onTouchmove: t[0] || (t[0] = (l) => $(l)),
192
+ onTouchend: m
193
+ }, null, 40, we),
194
+ g("div", {
195
+ class: "vue-ui-dashboard-resize-handle vue-ui-dashboard-top-right",
196
+ onMousedown: (l) => k(o, "top-right"),
197
+ onTouchstart: (l) => C(o, "top-right", l),
198
+ onTouchmove: t[1] || (t[1] = (l) => $(l)),
199
+ onTouchend: m
200
+ }, null, 40, ye),
201
+ g("div", {
202
+ class: "vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-left",
203
+ onMousedown: (l) => k(o, "bottom-left"),
204
+ onTouchstart: (l) => C(o, "bottom-left", l),
205
+ onTouchmove: t[2] || (t[2] = (l) => $(l)),
206
+ onTouchend: m
207
+ }, null, 40, _e),
208
+ g("div", {
209
+ class: "vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-right",
210
+ onMousedown: (l) => k(o, "bottom-right"),
211
+ onTouchstart: (l) => C(o, "bottom-right", l),
212
+ onTouchmove: t[3] || (t[3] = (l) => $(l)),
213
+ onTouchend: m
214
+ }, null, 40, Me)
215
+ ], 64)),
216
+ ee(e.$slots, "content", {
217
+ item: a,
218
+ index: o,
219
+ left: a.left,
220
+ top: a.top,
221
+ height: a.height,
222
+ width: a.width
223
+ }, void 0, !0)
224
+ ], 46, be))), 128))
225
+ ], 36)
226
+ ], 12, pe)
227
+ ]));
228
+ }
229
+ }, xe = /* @__PURE__ */ se(me, [["__scopeId", "data-v-57895b3a"]]);
230
+ export {
231
+ xe as default
232
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),R=require("./pdf-Cz3729tZ.cjs"),q=require("./useNestedProp-2kIU-7On.cjs"),O=require("./index-p5gfZSvB.cjs"),j=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=b=>(o.pushScopeId("data-v-57895b3a"),b=b(),o.popScopeId(),b),G={key:0,"data-html2canvas-ignore":"",style:{width:"100%",display:"flex","justify-content":"end"}},U=["disabled"],J=["stroke"],K=o.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-57895b3a></path><path d="M18 16v.01" data-v-57895b3a></path><path d="M6 16v.01" data-v-57895b3a></path><path d="M12 5v.01" data-v-57895b3a></path><path d="M12 12v.01" data-v-57895b3a></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-57895b3a></path>',6),Q=[K],Z={key:1},ee=["id"],te=A(()=>o.createElementVNode("div",{class:"vue-ui-dashboard-grid"},null,-1)),oe=["onMousedown","onTouchstart"],le=["onMousedown","onTouchstart"],ae=["onMousedown","onTouchstart"],ne=["onMousedown","onTouchstart"],ue=["onMousedown","onTouchstart"],M=20,se={__name:"vue-ui-dashboard",props:{dataset:Array,config:Object},emits:["change"],setup(b,{expose:$,emit:B}){const T=b;o.useCssVars(e=>({"417957d3":I.value,"60fae9e7":D.value}));const{vue_ui_dashboard:N}=O.useConfig(),i=o.computed(()=>q.useNestedProp({userConfig:T.config,defaultConfig:N})),z=o.ref(`vue-ui-dashboard-${Math.random()}`),d=o.ref(i.value.locked);function S(){d.value=!d.value}const s=o.ref(T.dataset),h=o.ref(null),u=o.ref(null),v=o.ref({x:0,y:0}),f=o.ref({x:0,y:0}),r=o.ref(null),c=o.ref(!1),p=o.ref(null),y=o.ref(!1);function E(){y.value=!0,R.pdf({domElement:document.getElementById(`vue-ui-dashboard_${z.value}`),fileName:"vue-ui-dashboard"}).finally(()=>{y.value=!1})}function x(e){if(!d.value&&(c.value=!0,p.value=e,u.value===null)){h.value=e,v.value={x:event.clientX,y:event.clientY};const t=s.value[e],a=100-t.width,l=100-t.height;t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left>a&&(t.left=a),t.top>l&&(t.top=l),t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left+t.width>100&&(t.left=100-t.width),t.top+t.height>100&&(t.top=100-t.height)}}function m(e,t){c.value=!0,p.value=e,u.value={index:e,direction:t};const a=s.value[e];f.value={x:event.clientX,y:event.clientY,initialWidth:a.width,initialHeight:a.height}}function C(e,t,a){if(u.value.direction.includes("top")){const l=e.height-a/r.value.offsetHeight*100;l>=M&&(e.top+=a/r.value.offsetHeight*100,e.height=l)}if(u.value.direction.includes("bottom")){const l=e.height+a/r.value.offsetHeight*100;l>=M&&(e.height=l)}if(u.value.direction.includes("left")){const l=e.width-t/r.value.offsetWidth*100;l>=M&&(e.left+=t/r.value.offsetWidth*100,e.width=l)}if(u.value.direction.includes("right")){const l=e.width+t/r.value.offsetWidth*100;l>=M&&(e.width=l)}}function X(e){if(!d.value){if(c.value=!0,h.value!==null){const t=s.value[h.value],a=e.clientX-v.value.x,l=e.clientY-v.value.y,n=t.left+a/r.value.offsetWidth*100,g=t.top+l/r.value.offsetHeight*100;n>=0&&g>=0&&n+t.width<=100&&g+t.height<=100&&(t.left=n,t.top=g),v.value={x:e.clientX,y:e.clientY}}if(u.value!==null){const t=s.value[u.value.index],a=e.clientX-f.value.x,l=e.clientY-f.value.y;C(t,a,l),f.value={x:e.clientX,y:e.clientY}}}}o.watch(s,e=>{e&&!c.value&&B("change",s.value)},{deep:!0});function Y(){h.value=null,u.value=null,c.value=!1,p.value=null,s.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}function V(e){d.value||(c.value=!0,p.value=e,u.value===null&&(h.value=e,v.value={x:event.touches[0].clientX,y:event.touches[0].clientY}))}function k(e,t,a){if(c.value=!0,p.value=e,u.value===null){u.value={index:e,direction:t};const l=s.value[e];f.value={x:a.touches[0].clientX,y:a.touches[0].clientY,initialWidth:l.width,initialHeight:l.height}}}function _(e){if(c.value=!0,e.preventDefault(),u.value!==null){const t=s.value[u.value.index],a=e.touches[0].clientX-f.value.x,l=e.touches[0].clientY-f.value.y;C(t,a,l),f.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function H(e){if(!d.value&&(c.value=!0,e.preventDefault(),h.value!==null)){const t=s.value[h.value],a=e.touches[0].clientX-v.value.x,l=e.touches[0].clientY-v.value.y,n=t.left+a/r.value.offsetWidth*100,g=t.top+l/r.value.offsetHeight*100;n>=0&&g>=0&&n+t.width<=100&&g+t.height<=100&&(t.left=n,t.top=g),v.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function w(){c.value=!1,p.value=null,h.value=null,u.value=null,s.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}const I=o.computed(()=>i.value.style.item.borderColor),D=o.computed(()=>i.value.style.resizeHandles.backgroundColor),W=o.computed(()=>i.value.style.board.aspectRatio),L=o.computed(()=>i.value.style.board.backgroundColor),P=o.computed(()=>i.value.style.board.border);function F(){return s.value}return $({generatePdf:E,getItemsPositions:F,toggleLock:S}),(e,t)=>(o.openBlock(),o.createElementBlock("div",null,[i.value.allowPrint?(o.openBlock(),o.createElementBlock("div",G,[o.createElementVNode("button",{class:"vue-ui-dashboard-button",onClick:E,disabled:y.value,style:o.normalizeStyle([{"margin-top":"12px"},`color:${i.value.style.board.color}`])},[y.value?(o.openBlock(),o.createElementBlock("svg",{key:0,class:"vue-ui-dashboard-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:i.value.style.board.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Q,8,J)):(o.openBlock(),o.createElementBlock("span",Z,"PDF"))],12,U)])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"vue-ui-dashboard-container",ref_key:"dashboardContainer",ref:r,id:`vue-ui-dashboard_${z.value}`,style:o.normalizeStyle(`border:${P.value}; sbackground:${L.value}; aspect-ratio:${W.value}`)},[o.createElementVNode("div",{class:"vue-ui-dashboard-grid-container",ref:"container",onMousemove:X,onMouseup:Y,onTouchmove:H,onTouchend:w,style:o.normalizeStyle(`background:${i.value.style.board.backgroundColor}`)},[te,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.value,(a,l)=>(o.openBlock(),o.createElementBlock("div",{key:a.id,class:o.normalizeClass({"vue-ui-dashboard-grid-item":!0,"vue-ui-dashboard-grid-item--locked":d.value}),style:o.normalizeStyle({width:`${a.width}%`,height:`${a.height}%`,left:`${a.left}%`,top:`${a.top}%`,cursor:"move",boxShadow:p.value===l?"0 6px 12px -3px rgba(0,0,0,0.3)":"",zIndex:p.value===l?"1":"0",backgroundColor:i.value.style.item.backgroundColor}),onMousedown:n=>x(l),onTouchstart:n=>V(l)},[d.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-left",onMousedown:n=>m(l,"top-left"),onTouchstart:n=>k(l,"top-left",n),onTouchmove:t[0]||(t[0]=n=>_(n)),onTouchend:w},null,40,le),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-right",onMousedown:n=>m(l,"top-right"),onTouchstart:n=>k(l,"top-right",n),onTouchmove:t[1]||(t[1]=n=>_(n)),onTouchend:w},null,40,ae),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-left",onMousedown:n=>m(l,"bottom-left"),onTouchstart:n=>k(l,"bottom-left",n),onTouchmove:t[2]||(t[2]=n=>_(n)),onTouchend:w},null,40,ne),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-right",onMousedown:n=>m(l,"bottom-right"),onTouchstart:n=>k(l,"bottom-right",n),onTouchmove:t[3]||(t[3]=n=>_(n)),onTouchend:w},null,40,ue)],64)),o.renderSlot(e.$slots,"content",{item:a,index:l,left:a.left,top:a.top,height:a.height,width:a.width},void 0,!0)],46,oe))),128))],36)],12,ee)]))}},ie=j._export_sfc(se,[["__scopeId","data-v-57895b3a"]]);exports.default=ie;