vue-data-ui 3.29.3 → 3.29.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 (192) hide show
  1. package/dist/{Arrow-CITPKnWF.js → Arrow-DhkzHBsL.js} +1 -1
  2. package/dist/{BaseDraggableDialog-DVstuNhT.js → BaseDraggableDialog-MyWIeEtr.js} +1 -1
  3. package/dist/{BaseIcon-CoY0vuL3.js → BaseIcon-CQFjKDhE.js} +1 -1
  4. package/dist/{BaseLegendToggle-VzX69MCo.js → BaseLegendToggle-CnQ_U5rI.js} +1 -1
  5. package/dist/{BaseZoomControls-D4i_j6vc.js → BaseZoomControls-OZwEB4vm.js} +1 -1
  6. package/dist/{ColorPicker-DmVnJGVv.js → ColorPicker-dbxPO2fg.js} +1 -1
  7. package/dist/{DataTable-KeuZB1JM.js → DataTable-BHW5xD9B.js} +1 -1
  8. package/dist/{HillActions-D--h5brJ.js → HillActions-KXWY_FyA.js} +1 -1
  9. package/dist/{Legend-W9YVYVX-.js → Legend-D5I3jeGD.js} +1 -1
  10. package/dist/{NonSvgPenAndPaper-B2kuh5Yb.js → NonSvgPenAndPaper-RQzq8DqO.js} +1 -1
  11. package/dist/{PackageVersion-DAF5ApGl.js → PackageVersion-B-1JX0wI.js} +1 -1
  12. package/dist/{PenAndPaper-BV5ODysA.js → PenAndPaper-B2UOwiJM.js} +1 -1
  13. package/dist/{Shape-CRe8woTu.js → Shape-DgpYvQc4.js} +1 -1
  14. package/dist/{SlicerPreview-BVgz_p4G.js → SlicerPreview-QaJuNJhX.js} +1 -1
  15. package/dist/{SparkTooltip-Ch06CV71.js → SparkTooltip-dnNSazTu.js} +1 -1
  16. package/dist/{StackChartTable-rTC6w378.js → StackChartTable-mMKxPOnc.js} +1 -1
  17. package/dist/{Title-BliHuXfT.js → Title-DlhGIAWX.js} +1 -1
  18. package/dist/{Tooltip-B432XpvC.js → Tooltip-CL3U31cL.js} +1 -1
  19. package/dist/UserOptions-B97cPcKc.js +1 -0
  20. package/dist/{XyAnalysisOptions-Cyt8w5B3.js → XyAnalysisOptions-DeJOjnC3.js} +1 -1
  21. package/dist/{chartImage-DPGnEuYM.js → chartImage-Dvrx_F7P.js} +1 -1
  22. package/dist/components/arrow.js +1 -1
  23. package/dist/components/vue-ui-3d-bar.js +1 -1
  24. package/dist/components/vue-ui-accordion.js +1 -1
  25. package/dist/components/vue-ui-age-pyramid.js +1 -1
  26. package/dist/components/vue-ui-annotator.js +1 -1
  27. package/dist/components/vue-ui-bullet.js +1 -1
  28. package/dist/components/vue-ui-bump.js +1 -1
  29. package/dist/components/vue-ui-candlestick.js +1 -1
  30. package/dist/components/vue-ui-carousel-table.js +1 -1
  31. package/dist/components/vue-ui-chestnut.js +1 -1
  32. package/dist/components/vue-ui-chord.js +1 -1
  33. package/dist/components/vue-ui-circle-pack.js +1 -1
  34. package/dist/components/vue-ui-cursor.js +1 -1
  35. package/dist/components/vue-ui-dag.js +1 -1
  36. package/dist/components/vue-ui-dashboard.js +1 -1
  37. package/dist/components/vue-ui-digits.js +1 -1
  38. package/dist/components/vue-ui-donut-evolution.js +1 -1
  39. package/dist/components/vue-ui-donut.js +1 -1
  40. package/dist/components/vue-ui-dumbbell.js +1 -1
  41. package/dist/components/vue-ui-flow.js +1 -1
  42. package/dist/components/vue-ui-funnel.js +1 -1
  43. package/dist/components/vue-ui-galaxy.js +1 -1
  44. package/dist/components/vue-ui-gauge.js +1 -1
  45. package/dist/components/vue-ui-geo.js +1 -1
  46. package/dist/components/vue-ui-gizmo.js +1 -1
  47. package/dist/components/vue-ui-graph.js +1 -1
  48. package/dist/components/vue-ui-heatmap.js +1 -1
  49. package/dist/components/vue-ui-hill.js +1 -1
  50. package/dist/components/vue-ui-history-plot.js +1 -1
  51. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  52. package/dist/components/vue-ui-icon.js +1 -1
  53. package/dist/components/vue-ui-kpi.js +1 -1
  54. package/dist/components/vue-ui-label.js +1 -1
  55. package/dist/components/vue-ui-mini-loader.js +1 -1
  56. package/dist/components/vue-ui-molecule.js +1 -1
  57. package/dist/components/vue-ui-mood-radar.js +1 -1
  58. package/dist/components/vue-ui-nested-donuts.js +1 -1
  59. package/dist/components/vue-ui-onion.js +1 -1
  60. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  61. package/dist/components/vue-ui-quadrant.js +1 -1
  62. package/dist/components/vue-ui-quick-chart.js +1 -1
  63. package/dist/components/vue-ui-radar.js +1 -1
  64. package/dist/components/vue-ui-rating.js +1 -1
  65. package/dist/components/vue-ui-relation-circle.js +1 -1
  66. package/dist/components/vue-ui-ridgeline.js +1 -1
  67. package/dist/components/vue-ui-rings.js +1 -1
  68. package/dist/components/vue-ui-scatter.js +1 -1
  69. package/dist/components/vue-ui-skeleton.js +1 -1
  70. package/dist/components/vue-ui-smiley.js +1 -1
  71. package/dist/components/vue-ui-spark-trend.js +1 -1
  72. package/dist/components/vue-ui-sparkbar.js +1 -1
  73. package/dist/components/vue-ui-sparkgauge.js +1 -1
  74. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  75. package/dist/components/vue-ui-sparkline.js +1 -1
  76. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  77. package/dist/components/vue-ui-stackbar.js +1 -1
  78. package/dist/components/vue-ui-stackline.js +1 -1
  79. package/dist/components/vue-ui-strip-plot.js +1 -1
  80. package/dist/components/vue-ui-table-heatmap.js +1 -1
  81. package/dist/components/vue-ui-table-sparkline.js +1 -1
  82. package/dist/components/vue-ui-table.js +1 -1
  83. package/dist/components/vue-ui-thermometer.js +1 -1
  84. package/dist/components/vue-ui-timer.js +1 -1
  85. package/dist/components/vue-ui-tiremarks.js +1 -1
  86. package/dist/components/vue-ui-treemap.js +1 -1
  87. package/dist/components/vue-ui-vertical-bar.js +1 -1
  88. package/dist/components/vue-ui-waffle.js +1 -1
  89. package/dist/components/vue-ui-wheel.js +1 -1
  90. package/dist/components/vue-ui-word-cloud.js +1 -1
  91. package/dist/components/vue-ui-world.js +1 -1
  92. package/dist/components/vue-ui-xy-canvas.js +1 -1
  93. package/dist/components/vue-ui-xy.js +1 -1
  94. package/dist/{dom-to-png-D56-Zgv4.js → dom-to-png-BciywWcQ.js} +1 -1
  95. package/dist/{exposedLib-BRtClmZy.js → exposedLib-BaycYTOv.js} +1 -1
  96. package/dist/{img-D4RQwASc.js → img-Dwb4XSud.js} +1 -1
  97. package/dist/{labelUtils-CdtU-yB_.js → labelUtils-D_AyGvLO.js} +1 -1
  98. package/dist/{lib-rPeBMZrn.js → lib-BaWaqwnJ.js} +7 -7
  99. package/dist/package-CfW2xYyy.js +1 -0
  100. package/dist/{pdf-CVdqBWVS.js → pdf-Bd6zav8D.js} +1 -1
  101. package/dist/{render-common-B7aQrXBR.js → render-common-CxohOkPd.js} +1 -1
  102. package/dist/{resolveChartConfig-0IvbmIE_.js → resolveChartConfig-QgMumfgd.js} +1 -1
  103. package/dist/ssr/vue-ui-donut.js +1 -1
  104. package/dist/ssr/vue-ui-xy.js +1 -1
  105. package/dist/ssr.js +1 -1
  106. package/dist/style.css +1 -1
  107. package/dist/types/vue-data-ui.d.ts +20 -0
  108. package/dist/{useConfig-B8qvYKdK.js → useConfig-B-AzS3w-.js} +1 -1
  109. package/dist/{useNestedProp-DnGoh-XS.js → useNestedProp-ri-deXpG.js} +1 -1
  110. package/dist/{useObjectBindings-CztjiAzG.js → useObjectBindings-DsvXXciT.js} +1 -1
  111. package/dist/{usePrinter-DVf3YcG5.js → usePrinter-CUD8gosC.js} +1 -1
  112. package/dist/utils.js +1 -1
  113. package/dist/vue-data-ui-orKuQ-0A.js +1 -0
  114. package/dist/vue-data-ui.js +1 -1
  115. package/dist/{vue-ui-3d-bar-D3pDUYiG.js → vue-ui-3d-bar-BxIOe5pW.js} +1 -1
  116. package/dist/{vue-ui-accordion-BpTfjWvH.js → vue-ui-accordion-B8LYfVG9.js} +1 -1
  117. package/dist/{vue-ui-age-pyramid-bJmGRZ59.js → vue-ui-age-pyramid-CsQ6Zx79.js} +1 -1
  118. package/dist/{vue-ui-annotator-C-gyszpf.js → vue-ui-annotator-xYv2xrXs.js} +1 -1
  119. package/dist/{vue-ui-bullet-5ZNUgPS7.js → vue-ui-bullet-CsaTMHaa.js} +1 -1
  120. package/dist/{vue-ui-bump-DYGbmTko.js → vue-ui-bump-BOVB5hWu.js} +1 -1
  121. package/dist/{vue-ui-candlestick-BwETH5d4.js → vue-ui-candlestick-C8W4sGST.js} +1 -1
  122. package/dist/{vue-ui-carousel-table-_V-HWzd-.js → vue-ui-carousel-table-DAMT9bn5.js} +1 -1
  123. package/dist/{vue-ui-chestnut-Cg8m6-N6.js → vue-ui-chestnut-XdPEyosT.js} +1 -1
  124. package/dist/{vue-ui-chord-CaJ-uclL.js → vue-ui-chord-CeYpAizS.js} +1 -1
  125. package/dist/{vue-ui-circle-pack-BiVPm8ii.js → vue-ui-circle-pack-Brhoqu25.js} +1 -1
  126. package/dist/{vue-ui-cursor-jkuEvFtX.js → vue-ui-cursor-CieGBz32.js} +1 -1
  127. package/dist/{vue-ui-dag-wkBDTIcz.js → vue-ui-dag-CC7fXGUn.js} +1 -1
  128. package/dist/{vue-ui-dashboard-CDekEQNH.js → vue-ui-dashboard-C7oXScoZ.js} +1 -1
  129. package/dist/{vue-ui-digits-ByjwG9Hv.js → vue-ui-digits-Cn_wqq4Y.js} +1 -1
  130. package/dist/{vue-ui-donut-BB7BW0dE.js → vue-ui-donut-BHRes5Ak.js} +1 -1
  131. package/dist/{vue-ui-donut-BV3btR0S.js → vue-ui-donut-BXlWXh2v.js} +1 -1
  132. package/dist/{vue-ui-donut-evolution-CPIVtWxh.js → vue-ui-donut-evolution-DHPd3KRv.js} +1 -1
  133. package/dist/{vue-ui-dumbbell-bTQpX8A6.js → vue-ui-dumbbell-BmqFCL_t.js} +1 -1
  134. package/dist/{vue-ui-flow-BRC3pGzL.js → vue-ui-flow-CvRa8Ija.js} +1 -1
  135. package/dist/{vue-ui-funnel-7RjzjVqE.js → vue-ui-funnel-Ds4JV24L.js} +1 -1
  136. package/dist/vue-ui-galaxy-DSHlkl9t.js +1 -0
  137. package/dist/{vue-ui-gauge-DM3p5s8H.js → vue-ui-gauge-2XPqwRR4.js} +1 -1
  138. package/dist/{vue-ui-geo-BUQL79cU.js → vue-ui-geo-IDzNLYVX.js} +1 -1
  139. package/dist/{vue-ui-gizmo-CoET_abC.js → vue-ui-gizmo-BXEnFICN.js} +1 -1
  140. package/dist/{vue-ui-graph-CCLd8bTj.js → vue-ui-graph-DdY8jDH-.js} +2 -2
  141. package/dist/{vue-ui-heatmap-BvVHrOcc.js → vue-ui-heatmap-DmgXUHFz.js} +1 -1
  142. package/dist/{vue-ui-hill-BkcY-Zbf.js → vue-ui-hill-CTuh5311.js} +1 -1
  143. package/dist/{vue-ui-history-plot-DVoOwR1y.js → vue-ui-history-plot-qpbsJ706.js} +1 -1
  144. package/dist/{vue-ui-horizontal-bar-Khi_qtla.js → vue-ui-horizontal-bar-BnIRG4Da.js} +1 -1
  145. package/dist/{vue-ui-kpi-BPL64spX.js → vue-ui-kpi-BvGMMvPY.js} +1 -1
  146. package/dist/{vue-ui-label-OvoE3A_k.js → vue-ui-label-CcVh3FeS.js} +1 -1
  147. package/dist/{vue-ui-mini-loader-DyefvJIr.js → vue-ui-mini-loader-C7rLQ7JE.js} +1 -1
  148. package/dist/{vue-ui-molecule-B7KJzavj.js → vue-ui-molecule-BLCwrefH.js} +1 -1
  149. package/dist/{vue-ui-mood-radar-6q5OUW6D.js → vue-ui-mood-radar-Bm12y-t8.js} +1 -1
  150. package/dist/{vue-ui-nested-donuts-C137tg5U.js → vue-ui-nested-donuts-BGz-1VHL.js} +1 -1
  151. package/dist/{vue-ui-onion-ClMux968.js → vue-ui-onion-C23btxVO.js} +1 -1
  152. package/dist/{vue-ui-parallel-coordinate-plot-JbfDQzwN.js → vue-ui-parallel-coordinate-plot-E17cuXGN.js} +1 -1
  153. package/dist/{vue-ui-quadrant-BPKWN3Ac.js → vue-ui-quadrant-NJPbHq0p.js} +1 -1
  154. package/dist/{vue-ui-quick-chart-BvqQnNn1.js → vue-ui-quick-chart-CI1n75li.js} +1 -1
  155. package/dist/{vue-ui-radar-DIdTBEet.js → vue-ui-radar-CD1Ge3r9.js} +1 -1
  156. package/dist/{vue-ui-rating-CFu9LjID.js → vue-ui-rating-mDoJ2Rkg.js} +1 -1
  157. package/dist/{vue-ui-relation-circle-5Noti3DC.js → vue-ui-relation-circle-CQPFqgsl.js} +1 -1
  158. package/dist/{vue-ui-ridgeline-DUrvAa8z.js → vue-ui-ridgeline-C0fxNnYy.js} +1 -1
  159. package/dist/{vue-ui-rings-B-cJIyAX.js → vue-ui-rings-D2XUhWg-.js} +1 -1
  160. package/dist/{vue-ui-scatter-DcchOWYi.js → vue-ui-scatter-DgfuFep8.js} +1 -1
  161. package/dist/{vue-ui-skeleton-DtHam8Oi.js → vue-ui-skeleton-BUMvfDJX.js} +1 -1
  162. package/dist/{vue-ui-smiley-C8ES41OS.js → vue-ui-smiley-aTCVrK-n.js} +1 -1
  163. package/dist/{vue-ui-spark-trend-m_ybZFN7.js → vue-ui-spark-trend-B1S6SaGz.js} +1 -1
  164. package/dist/{vue-ui-sparkbar-CVJo0I__.js → vue-ui-sparkbar-DtGqqvGS.js} +1 -1
  165. package/dist/{vue-ui-sparkgauge-UXQOQCQ6.js → vue-ui-sparkgauge-yEOfuIEu.js} +1 -1
  166. package/dist/{vue-ui-sparkhistogram-DVyAev-n.js → vue-ui-sparkhistogram-nM2G2AJx.js} +1 -1
  167. package/dist/{vue-ui-sparkline-DXJpSvr5.js → vue-ui-sparkline-B7ZZzccR.js} +1 -1
  168. package/dist/{vue-ui-sparkstackbar-CI7LeTy9.js → vue-ui-sparkstackbar-CTCvV0UA.js} +1 -1
  169. package/dist/{vue-ui-stackbar-BAdE_agj.js → vue-ui-stackbar-DTlq5Fmr.js} +1 -1
  170. package/dist/{vue-ui-stackline-CEcCgYrY.js → vue-ui-stackline-DgV0GCOn.js} +1 -1
  171. package/dist/{vue-ui-strip-plot-D2JTssjF.js → vue-ui-strip-plot-DlIqyn9G.js} +1 -1
  172. package/dist/{vue-ui-table-CcBJ_hPp.js → vue-ui-table-B1QawDAY.js} +1 -1
  173. package/dist/{vue-ui-table-heatmap-CwV82zwm.js → vue-ui-table-heatmap-DFjVopuI.js} +1 -1
  174. package/dist/{vue-ui-table-sparkline-D1OPXi2z.js → vue-ui-table-sparkline-D15wq2iu.js} +1 -1
  175. package/dist/{vue-ui-thermometer-D2LlLcEV.js → vue-ui-thermometer-gK8M0jyN.js} +1 -1
  176. package/dist/{vue-ui-timer-Ca8KPZNl.js → vue-ui-timer-Be4jnf30.js} +2 -2
  177. package/dist/{vue-ui-tiremarks-BsKJi3S0.js → vue-ui-tiremarks-B1PF45Fh.js} +1 -1
  178. package/dist/{vue-ui-treemap-5HkhmOD4.js → vue-ui-treemap-CProQJII.js} +1 -1
  179. package/dist/{vue-ui-waffle-2BJYwpwv.js → vue-ui-waffle-C9QBRGRd.js} +1 -1
  180. package/dist/{vue-ui-wheel-Dr-mMZrH.js → vue-ui-wheel-EBNVnATV.js} +1 -1
  181. package/dist/{vue-ui-word-cloud-CF_k1x_e.js → vue-ui-word-cloud-D_wT_OgE.js} +1 -1
  182. package/dist/{vue-ui-world-BuzOXOPx.js → vue-ui-world-CvjzqQPz.js} +1 -1
  183. package/dist/{vue-ui-xy-Cr5w4DsW.js → vue-ui-xy-B0z97XdU.js} +1 -1
  184. package/dist/{vue-ui-xy-Cwkavs_B.js → vue-ui-xy-ZTbijg4Q.js} +3 -3
  185. package/dist/{vue-ui-xy-canvas-DnWzhq9y.js → vue-ui-xy-canvas-QqaK6zlu.js} +1 -1
  186. package/dist/vue_ui_galaxy-fL8NyfDy.js +1 -0
  187. package/package.json +14 -14
  188. package/dist/UserOptions-K1N7zQRx.js +0 -1
  189. package/dist/package-Dd1ZNT5Q.js +0 -1
  190. package/dist/vue-data-ui-BmTsLaNH.js +0 -1
  191. package/dist/vue-ui-galaxy-D91dIUfs.js +0 -1
  192. package/dist/vue_ui_galaxy-iCWLHLBY.js +0 -1
@@ -1,2 +1,2 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s,t as c}from"./tableIntegration-CNoJ1CIY.js";import{t as ee}from"./chartImage-DPGnEuYM.js";import{n as te}from"./resolveChartConfig-0IvbmIE_.js";import{$ as l,D as ne,Dt as re,Ft as ie,Ht as ae,J as oe,Q as se,S as ce,X as le,Zt as ue,_ as de,at as fe,b as pe,i as me,in as he,nt as ge,pt as _e,rn as ve,sn as ye,t as be,v as xe,w as Se,x as Ce,yt as we,zt as Te}from"./lib-rPeBMZrn.js";import{n as Ee,t as De}from"./useHints-C-TwxM0Y.js";import{t as Oe}from"./useConfig-B8qvYKdK.js";import{t as ke}from"./useSvgLabelLayout-42Kats14.js";import{t as Ae}from"./useLoading-DoqqfnmS.js";import{t as je}from"./usePrinter-DVf3YcG5.js";import{t as Me}from"./useResponsive-CENUxfEL.js";import{t as Ne}from"./useChartExport-BZts4KFb.js";import{t as Pe}from"./useTransitions-ChGGrtrv.js";import{t as Fe}from"./useUserOptionState-CXlFnwPv.js";import{t as Ie}from"./useChartAccessibility-DOMuYJfm.js";import{t as Le}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Re}from"./Shape-CRe8woTu.js";import{n as ze}from"./Title-BliHuXfT.js";import{t as Be}from"./vue_ui_strip_plot-BcrT-Tvm.js";import{t as Ve}from"./BaseScanner-m6QR9rwD.js";import{t as He}from"./A11yDataTable-DWNlWXzs.js";import{t as Ue}from"./DefGrad-DKMq1REY.js";import{t as We}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as u,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Ge,createTextVNode as Ke,createVNode as qe,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as Je,nextTick as Ye,normalizeClass as Xe,normalizeProps as v,normalizeStyle as Ze,onBeforeUnmount as Qe,onMounted as $e,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as et,shallowRef as tt,toDisplayString as C,toRefs as nt,unref as w,watch as rt,withCtx as T}from"vue";var it=/* @__PURE__ */ e({default:()=>It}),at=[`id`],ot=[`id`],st={style:{position:`relative`}},ct=[`xmlns`,`viewBox`,`aria-describedby`],lt=[`x`,`y`,`width`,`height`],ut={key:1},dt={key:0},ft=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],pt={key:1},mt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],ht=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],gt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],_t=[`transform`,`fill`,`font-size`],vt=[`transform`,`font-size`,`fill`,`text-anchor`],yt=[`transform`,`font-size`,`fill`,`text-anchor`,`innerHTML`],bt=[`fill`,`font-size`,`transform`],xt=[`fill`,`font-size`,`x`,`y`],St=[`x1`,`x2`,`y1`,`y2`,`stroke`],Ct=[`cx`,`cy`,`fill`],wt=[`cx`,`cy`,`fill`],Tt=[`d`,`fill`,`stroke`,`fill-opacity`,`stroke-opacity`,`stroke-width`,`onMouseenter`],Et=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-opacity`,`stroke-width`],Dt=[`onMouseenter`],Ot=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],kt=[`x`,`y`,`width`,`height`,`fill`,`stroke`,`stroke-width`,`rx`],At=[`cx`,`cy`,`r`,`fill`,`stroke`],jt={key:1},Mt=[`x`,`y`,`font-size`,`fill`],Nt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Pt={key:5,class:`vue-data-ui-watermark`},Ft={style:{display:`flex`,"align-items":`center`}},It=/*#__PURE__*/ We({__name:`vue-ui-strip-plot`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectDatapoint`,`copyAlt`],setup(e,{expose:We,emit:it}){let It=g(()=>import(`./Tooltip-B432XpvC.js`)),Lt=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Rt=g(()=>import(`./vue-ui-accordion-BpTfjWvH.js`).then(e=>e.n)),zt=g(()=>import(`./DataTable-KeuZB1JM.js`)),Bt=g(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Vt=g(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Ht=g(()=>import(`./PackageVersion-DAF5ApGl.js`).then(e=>e.t)),Ut=g(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),Wt=[`classic`,`scatter`,`violin`],{vue_ui_strip_plot:Gt}=Oe(),E=e,Kt=it,qt=d({get(){return!!E.dataset&&E.dataset.length},set(e){return e}}),Jt=b(le()),Yt=b(0),Xt=b(!1),Zt=b(``),D=b(null),Qt=b(null),$t=b(null),en=b(null),tn=b(!1),nn=b(0),rn=b(0),an=b(null),on=b(null),sn=b(null),cn=b(null),ln=b(null),un=b(null),dn=b(null),fn=b(null),O=b(`pointer`),pn=b({x:0,y:0}),mn=b(!1),k=b(wn()),A=d(()=>k.value.userOptions),j=d(()=>k.value.style.chart.tooltip),M=d(()=>k.value.style.chart.labels),N=d(()=>k.value.style.chart.violin),P=d(()=>k.value.style.chart.grid),F=d(()=>k.value.style.chart);Ee({config:()=>k.value,dataset:()=>E.dataset,component:`VueUiStripPlot`,rules:[De.emptyArray,{test:e=>e.length>12,message:[`👀 The number of series is > 12. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using multiple instances of the chart to display related series.`]}]});let{transitionEnabled:hn}=Pe({config:()=>k.value.transitions,dataset:()=>E.dataset}),gn=d(()=>Tn(k.value.type)),I=d(()=>k.value.userOptions.useCursorPointer),_n=d(()=>he({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,padding:{top:24,left:24,right:24,bottom:24},grid:{stroke:`#6A6A6A`,horizontalGrid:{stroke:`#6A6A6A`},verticalGrid:{stroke:`#6A6A6A`}},plots:{stroke:`#6A6A6A`},labels:{bestPlotLabel:{show:!1},axis:{xLabel:``,yLabel:``},xAxisLabels:{show:!1},yAxisLabels:{show:!1}}}}},userConfig:k.value.skeletonConfig??{}})),{loading:vn,FINAL_DATASET:yn,manualLoading:bn}=Ae({...nt(E),FINAL_CONFIG:k,prepareConfig:wn,skeletonDataset:E.config?.skeletonDataset??[{name:`_`,color:`#DBDBDB`,plots:[{name:`_`,value:1},{name:`_`,value:2},{name:`_`,value:3}]},{name:`_`,color:`#C4C4C4`,plots:[{name:`_`,value:3},{name:`_`,value:5},{name:`_`,value:8}]},{name:`_`,color:`#ADADAD`,plots:[{name:`_`,value:8},{name:`_`,value:13},{name:`_`,value:21}]},{name:`_`,color:`#969696`,plots:[{name:`_`,value:21},{name:`_`,value:34},{name:`_`,value:55}]},{name:`_`,color:`#808080`,plots:[{name:`_`,value:55},{name:`_`,value:89},{name:`_`,value:144}]}],skeletonConfig:he({defaultConfig:k.value,userConfig:_n.value})}),{userOptionsVisible:xn,setUserOptionsVisibility:Sn,keepUserOptionState:Cn}=Fe({config:k.value}),{svgRef:L}=Ie({config:F.value.title});function wn(){return te(E.config,Gt,Be)}function Tn(e){return Wt.includes(e)?e:`classic`}let En=ue(E.config);rt(()=>E.config,async(e,t)=>{let n=ue(e),r=n!==En;En=n;let i=wn();r?(vn.value||(k.value=i),xn.value=!k.value.userOptions.showOnChartHover,jn(),nn.value+=1,rn.value+=1,V.value.dataLabels.show=M.value.bestPlotLabel.show,V.value.showTable=k.value.table.show,V.value.showTooltip=j.value.show,k.value.responsive||(z.value=F.value.width,B.value=F.value.height,Vn.value=F.value.plots.radius)):(k.value.style.chart.tooltip=i.style.chart.tooltip,V.value.showTooltip=k.value.style.chart.tooltip.show)},{deep:!0}),rt(()=>E.dataset,e=>{Array.isArray(e)&&e.length>0&&(bn.value=!1)},{deep:!0});let R=tt(null),Dn=tt(null),On=b(!1),kn=0;$e(()=>{jn()});let An=d(()=>k.value.debug);function jn(){Te(E.dataset)?(fe({componentName:`VueUiStripPlot`,type:`dataset`,debug:An.value}),bn.value=!0):E.dataset.forEach((e,t)=>{we({datasetObject:e,requiredAttributes:[`name`,`plots`]}).forEach(e=>{qt.value=!1,fe({componentName:`VueUiStripPlot`,type:`datasetSerieAttribute`,property:e,index:t,debug:An.value})}),e.plots&&e.plots.forEach((e,n)=>{we({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{qt.value=!1,fe({componentName:`VueUiStripPlot`,type:`datasetSerieAttribute`,property:e,index:`${t},${n}`,debug:An.value})})})}),Te(E.dataset)||(bn.value=k.value.loading),k.value.responsive&&(R.value&&(Dn.value&&R.value.unobserve(Dn.value),R.value.disconnect()),R.value=new ResizeObserver(()=>{let{width:e,height:t}=Me({chart:D.value,title:F.value.title.text?Qt.value:null,source:$t.value,noTitle:en.value});cancelAnimationFrame(kn),kn=requestAnimationFrame(()=>{Bn.value=t,z.value=Math.max(.1,e),B.value=Math.max(.1,t-12),On.value=!0,k.value.responsiveProportionalSizing?Vn.value=ve({relator:Math.min(t,e),adjuster:600,source:F.value.plots.radius,threshold:6,fallback:6}):Vn.value=F.value.plots.radius})}),Dn.value=D.value.parentNode,R.value.observe(Dn.value)),tn.value=!0,setTimeout(()=>{Rn.value=!1},Zn.value*50)}Qe(()=>{cancelAnimationFrame(kn),R.value&&(Dn.value&&R.value.unobserve(Dn.value),R.value.disconnect())});let{isPrinting:Mn,isImaging:Nn,generatePdf:Pn,generateImage:Fn}=je({elementId:`strip-plot_${Jt.value}`,fileName:F.value.title.text||`vue-ui-strip-plot`,options:k.value.userOptions.print}),In=d(()=>k.value.userOptions.show&&!F.value.title.text),Ln=d(()=>Se(k.value.customPalette)),Rn=b(k.value.useCssAnimation),zn=b({top:F.value.padding.top,bottom:F.value.padding.bottom,left:F.value.padding.left,right:F.value.padding.right}),z=b(F.value.width),B=b(F.value.height),Bn=b(F.value.height),Vn=b(F.value.plots.radius),V=b({showTable:k.value.table.show,dataLabels:{show:M.value.bestPlotLabel.show},showTooltip:j.value.show});rt(k,()=>{V.value={showTable:k.value.table.show,dataLabels:{show:M.value.bestPlotLabel.show},showTooltip:j.value.show},k.value.responsive||(z.value=F.value.width,B.value=F.value.height,Vn.value=F.value.plots.radius)},{immediate:!0});let H=d(()=>Math.min(Vn.value,W.value.stripWidth/2*.9));function U(e){return Number.isFinite(e)?Number(e.toFixed(2)):0}function Hn(){return Math.max(0,(W.value.stripWidth/2-H.value*1.8)*.86)*Math.min(1,N.value.widthRatio)}let{metrics:Un,ready:Wn,settling:Gn,update:Kn}=ke({svgRef:L,canMeasure:()=>!k.value.responsive||On.value,initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:e(un.value).textWidth,yAxisLabelWidth:e(cn.value).rotatedWidth,xAxisLabelHeight:e(sn.value).height,timeLabelsHeight:e(ln.value).height})});function qn(){let e=Un.value.scaleLabelsWidth,t=Un.value.yAxisLabelWidth;return e+t+(t?24:0)}let Jn=d(()=>Un.value.xAxisLabelHeight+Un.value.timeLabelsHeight+(sn.value?M.value.axis.fontSize/3+12+M.value.axis.xLabelOffsetY:0)+(ln.value?12:0)),W=d(()=>{let e=qn(),t=zn.value.left+e+M.value.axis.yLabelOffsetX+5,n=z.value-zn.value.right,r=Math.max(0,n-t),i=zn.value.top+F.value.plots.radius+M.value.bestPlotLabel.fontSize,a=B.value-zn.value.bottom-Jn.value,o=Math.max(0,a-i),s=Array.isArray(yn.value)?yn.value.length:0;return{left:t,right:n,top:i,bottom:a,width:r,height:o,stripWidth:s>0?r/s:0,absoluteHeight:B.value}});function Yn(e){return W.value.left+(e+1)*W.value.stripWidth-W.value.stripWidth/2}let Xn=d(()=>yn.value.map((e,t)=>{let n=le();return{...e,id:n,color:e.color?ce(e.color):Ln.value[t]||ae[t]||ae[t%ae.length],plots:e.plots.map((r,i)=>({...r,value:pe(r.value),parentId:n,parentName:e.name,parentIndex:t,plotIndex:i,color:e.color?ce(e.color):Ln.value[t]||ae[t]||ae[t%ae.length],id:le()})).sort((e,t)=>e.value-t.value)}})),G=d(()=>(Xn.value||[]).map((e,t)=>({...e,plots:e.plots.map(e=>({...e,x:Yn(t)}))}))),Zn=d(()=>Math.max(...G.value.map(e=>e.plots.length))),Qn=d(()=>{let e=G.value.flatMap(e=>e.plots.map(e=>e.value));return{max:Math.max(...e),min:Math.min(...e)}}),$n=d(()=>{let e=P.value.scaleMin,t=P.value.scaleMax,n=Math.max(2,P.value.scaleSteps),r=Qn.value.min<0?Qn.value.min:0,i=Qn.value.max;if(e===null&&t===null)return de(r,i,n);if(e!==null&&t!==null)return xe(e,t,n);let a=de(e===null?r:e,t===null?i:t,n);return xe(e===null?a.min:e,t===null?a.max:t,n)});function K(e){let t=$n.value.max-$n.value.min;return t?W.value.bottom-(e-$n.value.min)/t*W.value.height:W.value.bottom}let q=d(()=>(G.value||[]).map((e,t)=>{let n=e.plots.map(e=>({...e,y:K(e.value)})),r=gn.value===`classic`?n.map(()=>0):nr(n);return{...e,plots:n.map((e,t)=>({...e,x:e.x+r[t]}))}})),J=d(()=>gn.value===`violin`&&!!N.value?.boxPlot?.show);function er(e,t){if(!e.length)return 0;if(e.length===1)return e[0];let n=(e.length-1)*t,r=Math.floor(n),i=n-r,a=e[r+1];return a===void 0?e[r]:e[r]+i*(a-e[r])}let Y=d(()=>J.value?q.value.map((e,t)=>{let n=e.plots.map(e=>e.value).sort((e,t)=>e-t),r=er(n,.25),i=er(n,.5),a=er(n,.75),o=a-r,s=r-o*1.5,c=a+o*1.5,ee=n.find(e=>e>=s),te=n.slice().reverse().find(e=>e<=c),l=Yn(t),ne=Math.max(H.value*2.8,Math.min(Hn()*.32,W.value.stripWidth*.12))*Math.min(1.5,N.value.boxPlot.widthRatio);return{id:e.id,boxPlotColor:N.value.boxPlot.useSerieColor?e.color:N.value.boxPlot.color,color:e.color,name:e.name,count:n.length,lowerAdjacent:ee??n[0],q1:r,median:i,q3:a,upperAdjacent:te??n[n.length-1],iqr:o,lowerFence:s,upperFence:c,centerX:l,boxLeft:l-ne/2,boxWidth:ne,q1Y:K(r),medianY:K(i),q3Y:K(a),lowerY:K(ee??n[0]),upperY:K(te??n[n.length-1])}}):[]),tr=d(()=>[k.value.table.columnNames.series,N.value.tooltipLabels.lowerAdjacent,N.value.tooltipLabels.q1,N.value.tooltipLabels.median,N.value.tooltipLabels.q3,N.value.tooltipLabels.upperAdjacent,N.value.tooltipLabels.iqr,N.value.tooltipLabels.count]);function X(e){return l({p:M.value.prefix,v:e,s:M.value.suffix,r:k.value.table.td.roundingValue})}function nr(e){let t=gn.value===`violin`?Math.max(0,Hn()-H.value*1.15):Math.max(0,W.value.stripWidth/2-H.value*1.5);if(!e.length||!t)return e.map(()=>0);let n=e.map(()=>0),r=H.value*2.1,i=Math.min(t,r),a=[0];for(let e=i;e<=t+i/2;e+=i)a.push(-Math.min(e,t)),a.push(Math.min(e,t));let o=[];return e.forEach((e,t)=>{let i=a.find(t=>o.every(n=>{let i=t-n.offset,a=e.y-n.y;return Math.hypot(i,a)>=r}))??0;n[t]=i,o.push({y:e.y,offset:i})}),n}let rr=d(()=>gn.value===`violin`?q.value.map((e,t)=>({id:e.id,color:N.value.useSerieColor?e.color:N.value.stroke,fill:N.value.useSerieColor?e.color:N.value.fill,path:ir(e.plots,t),connectors:ar(e.plots,t)})):[]);function ir(e,t){let n=Hn();if(!e.length||!W.value.height||!n)return``;let r=Yn(t),i=e.map(e=>e.y),a=Z(i),o=sr({yValues:i,bandwidth:a});return o.length>1?o.map(e=>lr({yValues:e,centerX:r,maxWidth:or({clusterLength:e.length,totalLength:i.length,maxWidth:n}),bandwidth:Z(e)})).join(` `):lr({yValues:i,centerX:r,maxWidth:n,bandwidth:a})}function ar(e,t){if(!e.length)return[];let n=Yn(t),r=e.map(e=>e.y),i=sr({yValues:r,bandwidth:Z(r)});return i.length<2?[]:i.slice(1).map((e,t)=>{let r=i[t],a=Z(r),o=Z(e),s=Ce(Math.max(...r)+a*2.35,W.value.top,W.value.bottom),c=Ce(Math.min(...e)-o*2.35,W.value.top,W.value.bottom);return{x:U(n),y1:U(s),y2:U(c)}})}function or({clusterLength:e,totalLength:t,maxWidth:n}){let r=(e/t)**.6,i=e<=2?.72:1;return Math.max(H.value*2.2,n*Ce(r*i,.18,1))}function Z(e){let t=e.reduce((e,t)=>e+t,0)/Math.max(1,e.length),n=e.reduce((e,n)=>e+(n-t)**2,0)/Math.max(1,e.length),r=Math.sqrt(n),i=e.length<2?Math.max(H.value*2.6,W.value.height/48):H.value*2.1;return Ce(1.06*r*e.length**-.2,i,W.value.height/5)}function sr({yValues:e,bandwidth:t}){if(e.length<2)return[e];let n=[...e].sort((e,t)=>e-t),r=Math.max(t*1.45,H.value*5),i=[],a=[n[0]];for(let e=1;e<n.length;e+=1)Math.abs(n[e]-n[e-1])>r?(i.push(a),a=[n[e]]):a.push(n[e]);return i.push(a),cr(i)}function cr(e){return e.reduce((e,t)=>{let n=e[e.length-1];if(!n)return e.push(t),e;let r=Z(n),i=Z(t);return Math.max(...n)+r*2.35>=Math.min(...t)-i*2.35?n.push(...t):e.push(t),e},[])}function lr({yValues:e,centerX:t,maxWidth:n,bandwidth:r}){let i=Ce(Math.min(...e)-r*2.35,W.value.top,W.value.bottom),a=Ce(Math.max(...e)+r*2.35,W.value.top,W.value.bottom),o=Math.max(48,Math.min(120,Math.round((a-i)/Math.max(1,r/4)))),s=Array.from({length:o},(t,n)=>{let s=i+(a-i)*n/Math.max(1,o-1);return{y:s,density:e.reduce((e,t)=>{let n=(s-t)/r;return e+Math.exp(-.5*n*n)},0)}}),c=Math.max(...s.map(e=>e.density));if(!c)return``;let ee=s.map((e,t)=>{let r=t===0||t===s.length-1?0:e.density/c*n;return{y:U(e.y),width:U(r)}}),te=ee.map(e=>({x:U(t-e.width),y:e.y})),l=ee.slice(0,-1).reverse().map(e=>({x:U(t+e.width),y:e.y}));return`${ur([...te,...l])} Z`}function ur(e){if(!e.length)return``;if(e.length===1)return`M ${e[0].x} ${e[0].y}`;let t=`M ${e[0].x} ${e[0].y}`;for(let n=1;n<e.length-1;n+=1){let r=e[n],i=e[n+1],a=U((r.x+i.x)/2),o=U((r.y+i.y)/2);t+=` Q ${r.x} ${r.y} ${a} ${o}`}let n=e[e.length-1];return`${t} L ${n.x} ${n.y}`}let dr=d(()=>$n.value.ticks.map(e=>({y:K(e),x1:W.value.left,x2:W.value.right,value:e}))),fr=b(null),Q=b(null);function pr({datapoint:e,seriesIndex:t}){O.value!==`keyboard`&&(Xt.value=!1,Q.value=null,k.value.events.datapointLeave&&k.value.events.datapointLeave({datapoint:e,seriesIndex:t}))}function mr({datapoint:e,seriesIndex:t}){Kt(`selectDatapoint`,e),k.value.events.datapointClick&&k.value.events.datapointClick({datapoint:e,seriesIndex:t})}function hr(e,t={}){return me(M.value.formatter,e,l({p:M.value.prefix,v:e,s:M.value.suffix,r:j.value.roundingValue}),t)}function gr({datapoint:e,seriesIndex:t,triggerMode:n=`pointer`}){k.value.events.datapointEnter&&k.value.events.datapointEnter({datapoint:e,seriesIndex:t}),O.value=n,fr.value={datapoint:e,seriesIndex:t,config:k.value,series:Xn.value},Xt.value=!0,Q.value=e;let r=j.value.customFormat;if(re(r)&&_e(()=>r({seriesIndex:t,datapoint:e,series:Xn.value,config:k.value})))Zt.value=r({seriesIndex:t,datapoint:e,series:Xn.value,config:k.value});else{let n=``;n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${F.value.plots.gradient.show?`url(#${e.parentId})`:e.color}"/></svg>${e.name}</div>`,n+=`<div>${hr(e.value,{datapoint:e,seriesIndex:t})}</div>`,Zt.value=`<div>${n}</div>`}}function _r(){O.value!==`keyboard`&&(Xt.value=!1,Q.value=null)}function vr({boxPlot:e,seriesIndex:t,triggerMode:n=`pointer`}){O.value=n,Q.value=null,Xt.value=!0,fr.value={boxPlot:e,seriesIndex:t,config:k.value,series:Xn.value};let r=j.value.customFormat;if(re(r))try{let n={boxPlot:e,seriesIndex:t,series:Xn.value,config:k.value};if(_e(()=>r(n))){Zt.value=r(n);return}}catch{}let i=[[N.value.tooltipLabels.upperAdjacent,e.upperAdjacent],[N.value.tooltipLabels.q3,e.q3],[N.value.tooltipLabels.median,e.median],[N.value.tooltipLabels.q1,e.q1],[N.value.tooltipLabels.lowerAdjacent,e.lowerAdjacent],[N.value.tooltipLabels.iqr,e.iqr]],a=`<svg viewBox="0 0 12 12" height="14" width="14"><rect x="1" y="1" width="10" height="10" rx="2" stroke="none" fill="${e.color}"/></svg>`,o=i.map(([n,r])=>`<div style="display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:space-between;"><span>${n}</span><b>${hr(r,{boxPlot:e,seriesIndex:t})}</b></div>`).join(``);Zt.value=`<div style="min-width:160px;"><div style="display:flex;flex-direction:row;gap:6px;align-items:center;margin-bottom:6px;">${a}${e.name}</div>`+o+`<div style="display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:space-between;margin-top:6px;"><span>${N.value.tooltipLabels.count}</span><b>${e.count}</b></div></div>`}let yr=d(()=>({head:G.value.flatMap(e=>JSON.parse(JSON.stringify(e.plots)).sort((e,t)=>t.value-e.value).map(t=>({name:`${e.name} - ${t.name}`,color:t.color}))),body:G.value.flatMap(e=>JSON.parse(JSON.stringify(e.plots)).sort((e,t)=>t.value-e.value).map(e=>e.value))}));function br(e=null){Ye(()=>{let t=[],n=[k.value.table.columnNames.series,k.value.table.columnNames.value];J.value?(n=tr.value,t=Y.value.map(e=>[[e.name],[e.lowerAdjacent],[e.q1],[e.median],[e.q3],[e.upperAdjacent],[e.iqr],[e.count]])):t=yr.value.head.map((e,t)=>[[e.name],[yr.value.body[t]]]);let r=[[F.value.title.text],[F.value.title.subtitle.text],n.map(e=>[e])].concat(t),i=ne(r);e?e(i):ge({csvContent:i,title:F.value.title.text||`vue-ui-strip-plot`})})}let xr=d(()=>{if(J.value){let e=tr.value;return{colNames:e,head:e,body:Y.value.map(e=>[{color:e.color,name:e.name},X(e.lowerAdjacent),X(e.q1),X(e.median),X(e.q3),X(e.upperAdjacent),X(e.iqr),e.count]),config:{th:{backgroundColor:k.value.table.th.backgroundColor,color:k.value.table.th.color,outline:k.value.table.th.outline},td:{backgroundColor:k.value.table.td.backgroundColor,color:k.value.table.td.color,outline:k.value.table.td.outline},breakpoint:k.value.table.responsiveBreakpoint}}}let e=[k.value.table.columnNames.series,k.value.table.columnNames.value],t=yr.value.head.map((e,t)=>{let n=l({p:M.value.prefix,v:yr.value.body[t],s:M.value.suffix,r:k.value.table.td.roundingValue});return[{color:e.color,name:e.name},n]}),n={th:{backgroundColor:k.value.table.th.backgroundColor,color:k.value.table.th.color,outline:k.value.table.th.outline},td:{backgroundColor:k.value.table.td.backgroundColor,color:k.value.table.td.color,outline:k.value.table.td.outline},breakpoint:k.value.table.responsiveBreakpoint};return{colNames:[k.value.table.columnNames.series,k.value.table.columnNames.value],head:e,body:t,config:n}}),$=b(!1);function Sr(e){$.value=e,Yt.value+=1}function Cr(){return G.value}function wr(){V.value.showTable=!V.value.showTable}function Tr(){V.value.dataLabels.show=!V.value.dataLabels.show}function Er(){V.value.showTooltip=!V.value.showTooltip}let Dr=b(!1);function Or(){Dr.value=!Dr.value}let kr=ee(D,()=>F.value.title.text),Ar=d(()=>G.value.map(e=>e.name)),jr=b({start:0,end:G.value.length});Le({timeLabelsEls:ln,timeLabels:Ar,slicer:jr,configRef:k,rotationPath:[`style`,`chart`,`labels`,`xAxisLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`labels`,`xAxisLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:z,height:B,targetClass:`.vue-ui-strip-plot-category-name`,rotation:M.value.xAxisLabels.autoRotate.angle});let Mr=d(()=>c({config:k,style:F,mutableConfig:V,dialog:Ut,accordion:Rt,isFullscreen:$,parent:D,maxWidth:800,isCursorPointer:I}));rt(()=>V.value.showTable,e=>s(e,k,an));function Nr(){V.value.showTable=!1,on.value&&on.value.setTableIconState(!1)}let Pr=d(()=>F.value.backgroundColor),Fr=d(()=>F.value.title),{isCallbackImaging:Ir,isCallbackSvg:Lr,generateSvg:Rr,onGenerateImage:zr}=Ne({svg:L,title:Fr,legend:null,legendItems:null,backgroundColor:Pr,getSvgCallback:()=>k.value.userOptions.callbacks.svg,generateImage:Fn});async function Br(){Kt(`copyAlt`,{config:k.value,dataset:q.value}),k.value.userOptions.callbacks.altCopy?await Promise.resolve(k.value.userOptions.callbacks.altCopy({config:k.value,dataset:q.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Vr(){return q.value.length}function Hr(e){return q.value[e]?.plots??[]}function Ur(e=dn.value,t=fn.value){return!Number.isInteger(e)||!Number.isInteger(t)?null:Hr(e)[t]??null}function Wr(){dn.value=null,fn.value=null,O.value=`pointer`,Xt.value=!1,Q.value=null}function Gr(e){if(!e||!L.value)return;let t=L.value.getBoundingClientRect();pn.value={x:t.left+e.x/z.value*t.width,y:t.top+e.y/B.value*t.height}}function Kr(e,t){let n=Ur(e,t);n&&(dn.value=e,fn.value=t,O.value=`keyboard`,Gr(n),gr({datapoint:n,seriesIndex:e,triggerMode:`keyboard`}))}function qr(){mn.value=!0,dn.value=null,fn.value=null}function Jr(){mn.value=!1,Wr()}function Yr(e){if(!L.value||Dr.value||document.activeElement!==L.value||!Vr())return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`ArrowUp`,i=e.key===`ArrowDown`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;if(!t&&!n&&!r&&!i&&!a&&!o)return;if(e.preventDefault(),e.stopPropagation(),o){Wr();return}let s=dn.value,c=fn.value;if(s===null||c===null)s=0,c=0;else if(t||n){let e=Vr();s=n?(s+1)%e:(s-1+e)%e;let t=Hr(s);if(!t.length)return;c=Math.min(c,t.length-1)}else if(r||i){let e=Hr(s);if(!e.length)return;c=r?(c+1)%e.length:(c-1+e.length)%e.length}if(a){let e=Ur();if(!e)return;mr({datapoint:e,seriesIndex:dn.value})}else Kr(s,c)}let Xr=d(()=>({headers:xr.value?.colNames??[],rows:xr.value?.body?.map(e=>e.map(e=>e&&typeof e==`object`&&`name`in e?e.name:e))??[]}));return We({getData:Cr,getImage:kr,generatePdf:Pn,generateCsv:br,generateImage:Fn,generateSvg:Rr,toggleTable:wr,toggleLabels:Tr,toggleTooltip:Er,toggleAnnotator:Or,toggleFullscreen:Sr,copyAlt:Br}),rt(()=>[z.value,B.value,M.value,F.value,k.value.style.fontFamily,E.dataset,On.value,un.value,ln.value,sn.value,cn.value],Kn,{flush:`post`,deep:!0}),(e,s)=>(y(),m(`div`,{ref_key:`stripPlotChart`,ref:D,class:Xe(`vue-data-ui-component vue-ui-strip-plot ${$.value?`vue-data-ui-wrapper-fullscreen`:``} ${k.value.useCssAnimation?``:`vue-ui-dna`}`),style:Ze(`font-family:${k.value.style.fontFamily};width:100%; text-align:center;background:${F.value.backgroundColor};${k.value.responsive?`height:100%`:``}`),id:`strip-plot_${Jt.value}`,onMouseenter:s[2]||=()=>w(Sn)(!0),onMouseleave:s[3]||=()=>w(Sn)(!1)},[h(`div`,{id:`chart-instructions-${Jt.value}`,class:`sr-only`},[h(`p`,null,C(k.value.a11y.translations.keyboardNavigation),1)],8,ot),k.value.a11y.includeTable&&Xr.value?.rows?.length?(y(),f(He,{key:0,uid:Jt.value,head:Xr.value.headers,body:Xr.value.rows,notice:k.value.a11y.translations.tableAvailable,caption:k.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):p(``,!0),A.value.buttons.annotator?(y(),f(w(Vt),Je({key:1},w(a)(A.value.annotator),{svgRef:w(L),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Dr.value,isCursorPointer:I.value,palette:A.value.annotatorPalette,onClose:Or}),Ge({_:2},[x(w(o),t=>({name:t,fn:T(n=>[S(e.$slots,t,v(_(w(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),In.value?(y(),m(`div`,{key:2,ref_key:`noTitle`,ref:en,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),F.value.title.text?(y(),m(`div`,{key:3,ref_key:`chartTitle`,ref:Qt,style:`width:100%;background:transparent;padding-bottom:24px`},[(y(),f(ze,{key:`title_${nn.value}`,config:{title:{cy:`donut-div-title`,...F.value.title},subtitle:{cy:`donut-div-subtitle`,...F.value.title.subtitle}}},null,8,[`config`]))],512)):p(``,!0),A.value.show&&qt.value&&(w(Cn)||w(xn))?(y(),f(w(Bt),Je({ref_key:`userOptionsRef`,ref:on,key:`user_option_${Yt.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isPrinting:w(Mn),isImaging:w(Nn),uid:Jt.value,hasTooltip:A.value.buttons.tooltip&&j.value.show,hasLabel:A.value.buttons.labels&&k.value.type!==`violin`,isTooltip:V.value.showTooltip,isFullscreen:$.value,chartElement:D.value},w(n)(A.value,`pdf csv img svg table fullscreen altCopy annotator`),{isAnnotation:Dr.value,tableDialog:k.value.table.useDialog,isCursorPointer:I.value,onToggleFullscreen:Sr,onGeneratePdf:w(Pn),onGenerateCsv:br,onGenerateImage:w(zr),onGenerateSvg:w(Rr),onToggleTable:wr,onToggleLabels:Tr,onToggleTooltip:Er,onToggleAnnotator:Or,onCopyAlt:Br,style:{visibility:w(Cn)?w(xn)?`visible`:`hidden`:`visible`}}),Ge({_:2},[x(w(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:T(n=>[S(e.$slots,t,v(_(w(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasTooltip`,`hasLabel`,`isTooltip`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):p(``,!0),h(`div`,st,[(y(),m(`svg`,{ref_key:`svgRef`,ref:L,xmlns:w(be),class:Xe({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value,"vue-data-ui-no-transition":!w(hn)||w(Gn)}),viewBox:`0 0 ${z.value} ${B.value}`,style:Ze(`max-width:100%; overflow: visible; background:transparent;color:${F.value.color};;visibility:${w(Wn)?`visible`:`hidden`}`),"aria-describedby":`chart-instructions-${Jt.value}`,tabindex:`0`,onFocus:qr,onBlur:Jr,onKeydown:Yr},[qe(w(Ht)),S(e.$slots,`svg-underlayer`,{svg:{...W.value,isPrintingImg:w(Mn)||w(Nn)||w(Ir),isPrintingSvg:w(Lr),boxPlotSummaries:Y.value,series:G.value}},void 0,!0),e.$slots[`chart-background`]?(y(),m(`foreignObject`,{key:0,x:W.value.left,y:W.value.top,width:Math.max(.1,W.value.width),height:Math.max(.1,W.value.height),style:{pointerEvents:`none`}},[S(e.$slots,`chart-background`,{},void 0,!0)],8,lt)):p(``,!0),P.value.show?(y(),m(`g`,ut,[P.value.horizontalGrid.show?(y(),m(`g`,dt,[(y(!0),m(u,null,x(dr.value,e=>(y(),m(`line`,{x1:e.x1,x2:e.x2,y1:e.y,y2:e.y,stroke:P.value.horizontalGrid.stroke,"stroke-width":P.value.horizontalGrid.strokeWidth,"stroke-dasharray":P.value.horizontalGrid.strokeDasharray,"stroke-linecap":`round`},null,8,ft))),256))])):p(``,!0),P.value.verticalGrid.show?(y(),m(`g`,pt,[(y(!0),m(u,null,x(G.value,(e,t)=>(y(),m(`line`,{x1:W.value.left+(t+1)*W.value.stripWidth,x2:W.value.left+(t+1)*W.value.stripWidth,y1:W.value.top,y2:W.value.bottom,stroke:P.value.verticalGrid.stroke,"stroke-width":P.value.verticalGrid.strokeWidth,"stroke-dasharray":P.value.verticalGrid.strokeDasharray,"stroke-linecap":`round`},null,8,mt))),256))])):p(``,!0),h(`line`,{x1:W.value.left,x2:W.value.left,y1:W.value.top,y2:W.value.bottom,stroke:P.value.stroke,"stroke-width":P.value.strokeWidth,"stroke-linecap":`round`},null,8,ht),h(`line`,{x1:W.value.left,x2:W.value.right,y1:W.value.bottom,y2:W.value.bottom,stroke:P.value.stroke,"stroke-width":P.value.strokeWidth,"stroke-linecap":`round`},null,8,gt)])):p(``,!0),M.value.yAxisLabels.show?(y(),m(`g`,{key:2,ref_key:`scaleLabels`,ref:un},[(y(!0),m(u,null,x(dr.value,(e,t)=>(y(),m(`text`,{class:Xe({"vue-data-ui-transition":w(hn)&&!w(Gn)}),key:`sl_${t}`,transform:`translate(${e.x1+M.value.yAxisLabels.offsetX-5}, ${e.y+M.value.yAxisLabels.fontSize/3})`,fill:M.value.yAxisLabels.color,"font-size":M.value.yAxisLabels.fontSize,"text-anchor":`end`},C(w(me)(M.value.formatter,e.value,w(l)({p:M.value.prefix,v:e.value,s:M.value.suffix,r:M.value.yAxisLabels.rounding}),{datapoint:e,seriesIndex:t})),11,_t))),128))],512)):p(``,!0),M.value.xAxisLabels.show?(y(),m(`g`,{key:3,ref_key:`timeLabelsEls`,ref:ln},[(y(!0),m(u,null,x(Ar.value,(e,t)=>(y(),m(`g`,null,[String(e).includes(`
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s,t as c}from"./tableIntegration-CNoJ1CIY.js";import{t as ee}from"./chartImage-Dvrx_F7P.js";import{n as te}from"./resolveChartConfig-QgMumfgd.js";import{$ as l,D as ne,Dt as re,Ft as ie,Ht as ae,J as oe,Q as se,S as ce,X as le,Zt as ue,_ as de,at as fe,b as pe,i as me,in as he,nt as ge,pt as _e,rn as ve,sn as ye,t as be,v as xe,w as Se,x as Ce,yt as we,zt as Te}from"./lib-BaWaqwnJ.js";import{n as Ee,t as De}from"./useHints-C-TwxM0Y.js";import{t as Oe}from"./useConfig-B-AzS3w-.js";import{t as ke}from"./useSvgLabelLayout-42Kats14.js";import{t as Ae}from"./useLoading-DoqqfnmS.js";import{t as je}from"./usePrinter-CUD8gosC.js";import{t as Me}from"./useResponsive-CENUxfEL.js";import{t as Ne}from"./useChartExport-BZts4KFb.js";import{t as Pe}from"./useTransitions-ChGGrtrv.js";import{t as Fe}from"./useUserOptionState-CXlFnwPv.js";import{t as Ie}from"./useChartAccessibility-DOMuYJfm.js";import{t as Le}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Re}from"./Shape-DgpYvQc4.js";import{n as ze}from"./Title-DlhGIAWX.js";import{t as Be}from"./vue_ui_strip_plot-BcrT-Tvm.js";import{t as Ve}from"./BaseScanner-m6QR9rwD.js";import{t as He}from"./A11yDataTable-DWNlWXzs.js";import{t as Ue}from"./DefGrad-DKMq1REY.js";import{t as We}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as u,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Ge,createTextVNode as Ke,createVNode as qe,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as Je,nextTick as Ye,normalizeClass as Xe,normalizeProps as v,normalizeStyle as Ze,onBeforeUnmount as Qe,onMounted as $e,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as et,shallowRef as tt,toDisplayString as C,toRefs as nt,unref as w,watch as rt,withCtx as T}from"vue";var it=/* @__PURE__ */ e({default:()=>It}),at=[`id`],ot=[`id`],st={style:{position:`relative`}},ct=[`xmlns`,`viewBox`,`aria-describedby`],lt=[`x`,`y`,`width`,`height`],ut={key:1},dt={key:0},ft=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],pt={key:1},mt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],ht=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],gt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],_t=[`transform`,`fill`,`font-size`],vt=[`transform`,`font-size`,`fill`,`text-anchor`],yt=[`transform`,`font-size`,`fill`,`text-anchor`,`innerHTML`],bt=[`fill`,`font-size`,`transform`],xt=[`fill`,`font-size`,`x`,`y`],St=[`x1`,`x2`,`y1`,`y2`,`stroke`],Ct=[`cx`,`cy`,`fill`],wt=[`cx`,`cy`,`fill`],Tt=[`d`,`fill`,`stroke`,`fill-opacity`,`stroke-opacity`,`stroke-width`,`onMouseenter`],Et=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-opacity`,`stroke-width`],Dt=[`onMouseenter`],Ot=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],kt=[`x`,`y`,`width`,`height`,`fill`,`stroke`,`stroke-width`,`rx`],At=[`cx`,`cy`,`r`,`fill`,`stroke`],jt={key:1},Mt=[`x`,`y`,`font-size`,`fill`],Nt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Pt={key:5,class:`vue-data-ui-watermark`},Ft={style:{display:`flex`,"align-items":`center`}},It=/*#__PURE__*/ We({__name:`vue-ui-strip-plot`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectDatapoint`,`copyAlt`],setup(e,{expose:We,emit:it}){let It=g(()=>import(`./Tooltip-CL3U31cL.js`)),Lt=g(()=>import(`./BaseIcon-CQFjKDhE.js`).then(e=>e.n)),Rt=g(()=>import(`./vue-ui-accordion-B8LYfVG9.js`).then(e=>e.n)),zt=g(()=>import(`./DataTable-BHW5xD9B.js`)),Bt=g(()=>import(`./UserOptions-B97cPcKc.js`).then(e=>e.n)),Vt=g(()=>import(`./PenAndPaper-B2UOwiJM.js`).then(e=>e.t)),Ht=g(()=>import(`./PackageVersion-B-1JX0wI.js`).then(e=>e.t)),Ut=g(()=>import(`./BaseDraggableDialog-MyWIeEtr.js`).then(e=>e.n)),Wt=[`classic`,`scatter`,`violin`],{vue_ui_strip_plot:Gt}=Oe(),E=e,Kt=it,qt=d({get(){return!!E.dataset&&E.dataset.length},set(e){return e}}),Jt=b(le()),Yt=b(0),Xt=b(!1),Zt=b(``),D=b(null),Qt=b(null),$t=b(null),en=b(null),tn=b(!1),nn=b(0),rn=b(0),an=b(null),on=b(null),sn=b(null),cn=b(null),ln=b(null),un=b(null),dn=b(null),fn=b(null),O=b(`pointer`),pn=b({x:0,y:0}),mn=b(!1),k=b(wn()),A=d(()=>k.value.userOptions),j=d(()=>k.value.style.chart.tooltip),M=d(()=>k.value.style.chart.labels),N=d(()=>k.value.style.chart.violin),P=d(()=>k.value.style.chart.grid),F=d(()=>k.value.style.chart);Ee({config:()=>k.value,dataset:()=>E.dataset,component:`VueUiStripPlot`,rules:[De.emptyArray,{test:e=>e.length>12,message:[`👀 The number of series is > 12. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using multiple instances of the chart to display related series.`]}]});let{transitionEnabled:hn}=Pe({config:()=>k.value.transitions,dataset:()=>E.dataset}),gn=d(()=>Tn(k.value.type)),I=d(()=>k.value.userOptions.useCursorPointer),_n=d(()=>he({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,padding:{top:24,left:24,right:24,bottom:24},grid:{stroke:`#6A6A6A`,horizontalGrid:{stroke:`#6A6A6A`},verticalGrid:{stroke:`#6A6A6A`}},plots:{stroke:`#6A6A6A`},labels:{bestPlotLabel:{show:!1},axis:{xLabel:``,yLabel:``},xAxisLabels:{show:!1},yAxisLabels:{show:!1}}}}},userConfig:k.value.skeletonConfig??{}})),{loading:vn,FINAL_DATASET:yn,manualLoading:bn}=Ae({...nt(E),FINAL_CONFIG:k,prepareConfig:wn,skeletonDataset:E.config?.skeletonDataset??[{name:`_`,color:`#DBDBDB`,plots:[{name:`_`,value:1},{name:`_`,value:2},{name:`_`,value:3}]},{name:`_`,color:`#C4C4C4`,plots:[{name:`_`,value:3},{name:`_`,value:5},{name:`_`,value:8}]},{name:`_`,color:`#ADADAD`,plots:[{name:`_`,value:8},{name:`_`,value:13},{name:`_`,value:21}]},{name:`_`,color:`#969696`,plots:[{name:`_`,value:21},{name:`_`,value:34},{name:`_`,value:55}]},{name:`_`,color:`#808080`,plots:[{name:`_`,value:55},{name:`_`,value:89},{name:`_`,value:144}]}],skeletonConfig:he({defaultConfig:k.value,userConfig:_n.value})}),{userOptionsVisible:xn,setUserOptionsVisibility:Sn,keepUserOptionState:Cn}=Fe({config:k.value}),{svgRef:L}=Ie({config:F.value.title});function wn(){return te(E.config,Gt,Be)}function Tn(e){return Wt.includes(e)?e:`classic`}let En=ue(E.config);rt(()=>E.config,async(e,t)=>{let n=ue(e),r=n!==En;En=n;let i=wn();r?(vn.value||(k.value=i),xn.value=!k.value.userOptions.showOnChartHover,jn(),nn.value+=1,rn.value+=1,V.value.dataLabels.show=M.value.bestPlotLabel.show,V.value.showTable=k.value.table.show,V.value.showTooltip=j.value.show,k.value.responsive||(z.value=F.value.width,B.value=F.value.height,Vn.value=F.value.plots.radius)):(k.value.style.chart.tooltip=i.style.chart.tooltip,V.value.showTooltip=k.value.style.chart.tooltip.show)},{deep:!0}),rt(()=>E.dataset,e=>{Array.isArray(e)&&e.length>0&&(bn.value=!1)},{deep:!0});let R=tt(null),Dn=tt(null),On=b(!1),kn=0;$e(()=>{jn()});let An=d(()=>k.value.debug);function jn(){Te(E.dataset)?(fe({componentName:`VueUiStripPlot`,type:`dataset`,debug:An.value}),bn.value=!0):E.dataset.forEach((e,t)=>{we({datasetObject:e,requiredAttributes:[`name`,`plots`]}).forEach(e=>{qt.value=!1,fe({componentName:`VueUiStripPlot`,type:`datasetSerieAttribute`,property:e,index:t,debug:An.value})}),e.plots&&e.plots.forEach((e,n)=>{we({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{qt.value=!1,fe({componentName:`VueUiStripPlot`,type:`datasetSerieAttribute`,property:e,index:`${t},${n}`,debug:An.value})})})}),Te(E.dataset)||(bn.value=k.value.loading),k.value.responsive&&(R.value&&(Dn.value&&R.value.unobserve(Dn.value),R.value.disconnect()),R.value=new ResizeObserver(()=>{let{width:e,height:t}=Me({chart:D.value,title:F.value.title.text?Qt.value:null,source:$t.value,noTitle:en.value});cancelAnimationFrame(kn),kn=requestAnimationFrame(()=>{Bn.value=t,z.value=Math.max(.1,e),B.value=Math.max(.1,t-12),On.value=!0,k.value.responsiveProportionalSizing?Vn.value=ve({relator:Math.min(t,e),adjuster:600,source:F.value.plots.radius,threshold:6,fallback:6}):Vn.value=F.value.plots.radius})}),Dn.value=D.value.parentNode,R.value.observe(Dn.value)),tn.value=!0,setTimeout(()=>{Rn.value=!1},Zn.value*50)}Qe(()=>{cancelAnimationFrame(kn),R.value&&(Dn.value&&R.value.unobserve(Dn.value),R.value.disconnect())});let{isPrinting:Mn,isImaging:Nn,generatePdf:Pn,generateImage:Fn}=je({elementId:`strip-plot_${Jt.value}`,fileName:F.value.title.text||`vue-ui-strip-plot`,options:k.value.userOptions.print}),In=d(()=>k.value.userOptions.show&&!F.value.title.text),Ln=d(()=>Se(k.value.customPalette)),Rn=b(k.value.useCssAnimation),zn=b({top:F.value.padding.top,bottom:F.value.padding.bottom,left:F.value.padding.left,right:F.value.padding.right}),z=b(F.value.width),B=b(F.value.height),Bn=b(F.value.height),Vn=b(F.value.plots.radius),V=b({showTable:k.value.table.show,dataLabels:{show:M.value.bestPlotLabel.show},showTooltip:j.value.show});rt(k,()=>{V.value={showTable:k.value.table.show,dataLabels:{show:M.value.bestPlotLabel.show},showTooltip:j.value.show},k.value.responsive||(z.value=F.value.width,B.value=F.value.height,Vn.value=F.value.plots.radius)},{immediate:!0});let H=d(()=>Math.min(Vn.value,W.value.stripWidth/2*.9));function U(e){return Number.isFinite(e)?Number(e.toFixed(2)):0}function Hn(){return Math.max(0,(W.value.stripWidth/2-H.value*1.8)*.86)*Math.min(1,N.value.widthRatio)}let{metrics:Un,ready:Wn,settling:Gn,update:Kn}=ke({svgRef:L,canMeasure:()=>!k.value.responsive||On.value,initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:e(un.value).textWidth,yAxisLabelWidth:e(cn.value).rotatedWidth,xAxisLabelHeight:e(sn.value).height,timeLabelsHeight:e(ln.value).height})});function qn(){let e=Un.value.scaleLabelsWidth,t=Un.value.yAxisLabelWidth;return e+t+(t?24:0)}let Jn=d(()=>Un.value.xAxisLabelHeight+Un.value.timeLabelsHeight+(sn.value?M.value.axis.fontSize/3+12+M.value.axis.xLabelOffsetY:0)+(ln.value?12:0)),W=d(()=>{let e=qn(),t=zn.value.left+e+M.value.axis.yLabelOffsetX+5,n=z.value-zn.value.right,r=Math.max(0,n-t),i=zn.value.top+F.value.plots.radius+M.value.bestPlotLabel.fontSize,a=B.value-zn.value.bottom-Jn.value,o=Math.max(0,a-i),s=Array.isArray(yn.value)?yn.value.length:0;return{left:t,right:n,top:i,bottom:a,width:r,height:o,stripWidth:s>0?r/s:0,absoluteHeight:B.value}});function Yn(e){return W.value.left+(e+1)*W.value.stripWidth-W.value.stripWidth/2}let Xn=d(()=>yn.value.map((e,t)=>{let n=le();return{...e,id:n,color:e.color?ce(e.color):Ln.value[t]||ae[t]||ae[t%ae.length],plots:e.plots.map((r,i)=>({...r,value:pe(r.value),parentId:n,parentName:e.name,parentIndex:t,plotIndex:i,color:e.color?ce(e.color):Ln.value[t]||ae[t]||ae[t%ae.length],id:le()})).sort((e,t)=>e.value-t.value)}})),G=d(()=>(Xn.value||[]).map((e,t)=>({...e,plots:e.plots.map(e=>({...e,x:Yn(t)}))}))),Zn=d(()=>Math.max(...G.value.map(e=>e.plots.length))),Qn=d(()=>{let e=G.value.flatMap(e=>e.plots.map(e=>e.value));return{max:Math.max(...e),min:Math.min(...e)}}),$n=d(()=>{let e=P.value.scaleMin,t=P.value.scaleMax,n=Math.max(2,P.value.scaleSteps),r=Qn.value.min<0?Qn.value.min:0,i=Qn.value.max;if(e===null&&t===null)return de(r,i,n);if(e!==null&&t!==null)return xe(e,t,n);let a=de(e===null?r:e,t===null?i:t,n);return xe(e===null?a.min:e,t===null?a.max:t,n)});function K(e){let t=$n.value.max-$n.value.min;return t?W.value.bottom-(e-$n.value.min)/t*W.value.height:W.value.bottom}let q=d(()=>(G.value||[]).map((e,t)=>{let n=e.plots.map(e=>({...e,y:K(e.value)})),r=gn.value===`classic`?n.map(()=>0):nr(n);return{...e,plots:n.map((e,t)=>({...e,x:e.x+r[t]}))}})),J=d(()=>gn.value===`violin`&&!!N.value?.boxPlot?.show);function er(e,t){if(!e.length)return 0;if(e.length===1)return e[0];let n=(e.length-1)*t,r=Math.floor(n),i=n-r,a=e[r+1];return a===void 0?e[r]:e[r]+i*(a-e[r])}let Y=d(()=>J.value?q.value.map((e,t)=>{let n=e.plots.map(e=>e.value).sort((e,t)=>e-t),r=er(n,.25),i=er(n,.5),a=er(n,.75),o=a-r,s=r-o*1.5,c=a+o*1.5,ee=n.find(e=>e>=s),te=n.slice().reverse().find(e=>e<=c),l=Yn(t),ne=Math.max(H.value*2.8,Math.min(Hn()*.32,W.value.stripWidth*.12))*Math.min(1.5,N.value.boxPlot.widthRatio);return{id:e.id,boxPlotColor:N.value.boxPlot.useSerieColor?e.color:N.value.boxPlot.color,color:e.color,name:e.name,count:n.length,lowerAdjacent:ee??n[0],q1:r,median:i,q3:a,upperAdjacent:te??n[n.length-1],iqr:o,lowerFence:s,upperFence:c,centerX:l,boxLeft:l-ne/2,boxWidth:ne,q1Y:K(r),medianY:K(i),q3Y:K(a),lowerY:K(ee??n[0]),upperY:K(te??n[n.length-1])}}):[]),tr=d(()=>[k.value.table.columnNames.series,N.value.tooltipLabels.lowerAdjacent,N.value.tooltipLabels.q1,N.value.tooltipLabels.median,N.value.tooltipLabels.q3,N.value.tooltipLabels.upperAdjacent,N.value.tooltipLabels.iqr,N.value.tooltipLabels.count]);function X(e){return l({p:M.value.prefix,v:e,s:M.value.suffix,r:k.value.table.td.roundingValue})}function nr(e){let t=gn.value===`violin`?Math.max(0,Hn()-H.value*1.15):Math.max(0,W.value.stripWidth/2-H.value*1.5);if(!e.length||!t)return e.map(()=>0);let n=e.map(()=>0),r=H.value*2.1,i=Math.min(t,r),a=[0];for(let e=i;e<=t+i/2;e+=i)a.push(-Math.min(e,t)),a.push(Math.min(e,t));let o=[];return e.forEach((e,t)=>{let i=a.find(t=>o.every(n=>{let i=t-n.offset,a=e.y-n.y;return Math.hypot(i,a)>=r}))??0;n[t]=i,o.push({y:e.y,offset:i})}),n}let rr=d(()=>gn.value===`violin`?q.value.map((e,t)=>({id:e.id,color:N.value.useSerieColor?e.color:N.value.stroke,fill:N.value.useSerieColor?e.color:N.value.fill,path:ir(e.plots,t),connectors:ar(e.plots,t)})):[]);function ir(e,t){let n=Hn();if(!e.length||!W.value.height||!n)return``;let r=Yn(t),i=e.map(e=>e.y),a=Z(i),o=sr({yValues:i,bandwidth:a});return o.length>1?o.map(e=>lr({yValues:e,centerX:r,maxWidth:or({clusterLength:e.length,totalLength:i.length,maxWidth:n}),bandwidth:Z(e)})).join(` `):lr({yValues:i,centerX:r,maxWidth:n,bandwidth:a})}function ar(e,t){if(!e.length)return[];let n=Yn(t),r=e.map(e=>e.y),i=sr({yValues:r,bandwidth:Z(r)});return i.length<2?[]:i.slice(1).map((e,t)=>{let r=i[t],a=Z(r),o=Z(e),s=Ce(Math.max(...r)+a*2.35,W.value.top,W.value.bottom),c=Ce(Math.min(...e)-o*2.35,W.value.top,W.value.bottom);return{x:U(n),y1:U(s),y2:U(c)}})}function or({clusterLength:e,totalLength:t,maxWidth:n}){let r=(e/t)**.6,i=e<=2?.72:1;return Math.max(H.value*2.2,n*Ce(r*i,.18,1))}function Z(e){let t=e.reduce((e,t)=>e+t,0)/Math.max(1,e.length),n=e.reduce((e,n)=>e+(n-t)**2,0)/Math.max(1,e.length),r=Math.sqrt(n),i=e.length<2?Math.max(H.value*2.6,W.value.height/48):H.value*2.1;return Ce(1.06*r*e.length**-.2,i,W.value.height/5)}function sr({yValues:e,bandwidth:t}){if(e.length<2)return[e];let n=[...e].sort((e,t)=>e-t),r=Math.max(t*1.45,H.value*5),i=[],a=[n[0]];for(let e=1;e<n.length;e+=1)Math.abs(n[e]-n[e-1])>r?(i.push(a),a=[n[e]]):a.push(n[e]);return i.push(a),cr(i)}function cr(e){return e.reduce((e,t)=>{let n=e[e.length-1];if(!n)return e.push(t),e;let r=Z(n),i=Z(t);return Math.max(...n)+r*2.35>=Math.min(...t)-i*2.35?n.push(...t):e.push(t),e},[])}function lr({yValues:e,centerX:t,maxWidth:n,bandwidth:r}){let i=Ce(Math.min(...e)-r*2.35,W.value.top,W.value.bottom),a=Ce(Math.max(...e)+r*2.35,W.value.top,W.value.bottom),o=Math.max(48,Math.min(120,Math.round((a-i)/Math.max(1,r/4)))),s=Array.from({length:o},(t,n)=>{let s=i+(a-i)*n/Math.max(1,o-1);return{y:s,density:e.reduce((e,t)=>{let n=(s-t)/r;return e+Math.exp(-.5*n*n)},0)}}),c=Math.max(...s.map(e=>e.density));if(!c)return``;let ee=s.map((e,t)=>{let r=t===0||t===s.length-1?0:e.density/c*n;return{y:U(e.y),width:U(r)}}),te=ee.map(e=>({x:U(t-e.width),y:e.y})),l=ee.slice(0,-1).reverse().map(e=>({x:U(t+e.width),y:e.y}));return`${ur([...te,...l])} Z`}function ur(e){if(!e.length)return``;if(e.length===1)return`M ${e[0].x} ${e[0].y}`;let t=`M ${e[0].x} ${e[0].y}`;for(let n=1;n<e.length-1;n+=1){let r=e[n],i=e[n+1],a=U((r.x+i.x)/2),o=U((r.y+i.y)/2);t+=` Q ${r.x} ${r.y} ${a} ${o}`}let n=e[e.length-1];return`${t} L ${n.x} ${n.y}`}let dr=d(()=>$n.value.ticks.map(e=>({y:K(e),x1:W.value.left,x2:W.value.right,value:e}))),fr=b(null),Q=b(null);function pr({datapoint:e,seriesIndex:t}){O.value!==`keyboard`&&(Xt.value=!1,Q.value=null,k.value.events.datapointLeave&&k.value.events.datapointLeave({datapoint:e,seriesIndex:t}))}function mr({datapoint:e,seriesIndex:t}){Kt(`selectDatapoint`,e),k.value.events.datapointClick&&k.value.events.datapointClick({datapoint:e,seriesIndex:t})}function hr(e,t={}){return me(M.value.formatter,e,l({p:M.value.prefix,v:e,s:M.value.suffix,r:j.value.roundingValue}),t)}function gr({datapoint:e,seriesIndex:t,triggerMode:n=`pointer`}){k.value.events.datapointEnter&&k.value.events.datapointEnter({datapoint:e,seriesIndex:t}),O.value=n,fr.value={datapoint:e,seriesIndex:t,config:k.value,series:Xn.value},Xt.value=!0,Q.value=e;let r=j.value.customFormat;if(re(r)&&_e(()=>r({seriesIndex:t,datapoint:e,series:Xn.value,config:k.value})))Zt.value=r({seriesIndex:t,datapoint:e,series:Xn.value,config:k.value});else{let n=``;n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${F.value.plots.gradient.show?`url(#${e.parentId})`:e.color}"/></svg>${e.name}</div>`,n+=`<div>${hr(e.value,{datapoint:e,seriesIndex:t})}</div>`,Zt.value=`<div>${n}</div>`}}function _r(){O.value!==`keyboard`&&(Xt.value=!1,Q.value=null)}function vr({boxPlot:e,seriesIndex:t,triggerMode:n=`pointer`}){O.value=n,Q.value=null,Xt.value=!0,fr.value={boxPlot:e,seriesIndex:t,config:k.value,series:Xn.value};let r=j.value.customFormat;if(re(r))try{let n={boxPlot:e,seriesIndex:t,series:Xn.value,config:k.value};if(_e(()=>r(n))){Zt.value=r(n);return}}catch{}let i=[[N.value.tooltipLabels.upperAdjacent,e.upperAdjacent],[N.value.tooltipLabels.q3,e.q3],[N.value.tooltipLabels.median,e.median],[N.value.tooltipLabels.q1,e.q1],[N.value.tooltipLabels.lowerAdjacent,e.lowerAdjacent],[N.value.tooltipLabels.iqr,e.iqr]],a=`<svg viewBox="0 0 12 12" height="14" width="14"><rect x="1" y="1" width="10" height="10" rx="2" stroke="none" fill="${e.color}"/></svg>`,o=i.map(([n,r])=>`<div style="display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:space-between;"><span>${n}</span><b>${hr(r,{boxPlot:e,seriesIndex:t})}</b></div>`).join(``);Zt.value=`<div style="min-width:160px;"><div style="display:flex;flex-direction:row;gap:6px;align-items:center;margin-bottom:6px;">${a}${e.name}</div>`+o+`<div style="display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:space-between;margin-top:6px;"><span>${N.value.tooltipLabels.count}</span><b>${e.count}</b></div></div>`}let yr=d(()=>({head:G.value.flatMap(e=>JSON.parse(JSON.stringify(e.plots)).sort((e,t)=>t.value-e.value).map(t=>({name:`${e.name} - ${t.name}`,color:t.color}))),body:G.value.flatMap(e=>JSON.parse(JSON.stringify(e.plots)).sort((e,t)=>t.value-e.value).map(e=>e.value))}));function br(e=null){Ye(()=>{let t=[],n=[k.value.table.columnNames.series,k.value.table.columnNames.value];J.value?(n=tr.value,t=Y.value.map(e=>[[e.name],[e.lowerAdjacent],[e.q1],[e.median],[e.q3],[e.upperAdjacent],[e.iqr],[e.count]])):t=yr.value.head.map((e,t)=>[[e.name],[yr.value.body[t]]]);let r=[[F.value.title.text],[F.value.title.subtitle.text],n.map(e=>[e])].concat(t),i=ne(r);e?e(i):ge({csvContent:i,title:F.value.title.text||`vue-ui-strip-plot`})})}let xr=d(()=>{if(J.value){let e=tr.value;return{colNames:e,head:e,body:Y.value.map(e=>[{color:e.color,name:e.name},X(e.lowerAdjacent),X(e.q1),X(e.median),X(e.q3),X(e.upperAdjacent),X(e.iqr),e.count]),config:{th:{backgroundColor:k.value.table.th.backgroundColor,color:k.value.table.th.color,outline:k.value.table.th.outline},td:{backgroundColor:k.value.table.td.backgroundColor,color:k.value.table.td.color,outline:k.value.table.td.outline},breakpoint:k.value.table.responsiveBreakpoint}}}let e=[k.value.table.columnNames.series,k.value.table.columnNames.value],t=yr.value.head.map((e,t)=>{let n=l({p:M.value.prefix,v:yr.value.body[t],s:M.value.suffix,r:k.value.table.td.roundingValue});return[{color:e.color,name:e.name},n]}),n={th:{backgroundColor:k.value.table.th.backgroundColor,color:k.value.table.th.color,outline:k.value.table.th.outline},td:{backgroundColor:k.value.table.td.backgroundColor,color:k.value.table.td.color,outline:k.value.table.td.outline},breakpoint:k.value.table.responsiveBreakpoint};return{colNames:[k.value.table.columnNames.series,k.value.table.columnNames.value],head:e,body:t,config:n}}),$=b(!1);function Sr(e){$.value=e,Yt.value+=1}function Cr(){return G.value}function wr(){V.value.showTable=!V.value.showTable}function Tr(){V.value.dataLabels.show=!V.value.dataLabels.show}function Er(){V.value.showTooltip=!V.value.showTooltip}let Dr=b(!1);function Or(){Dr.value=!Dr.value}let kr=ee(D,()=>F.value.title.text),Ar=d(()=>G.value.map(e=>e.name)),jr=b({start:0,end:G.value.length});Le({timeLabelsEls:ln,timeLabels:Ar,slicer:jr,configRef:k,rotationPath:[`style`,`chart`,`labels`,`xAxisLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`labels`,`xAxisLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:z,height:B,targetClass:`.vue-ui-strip-plot-category-name`,rotation:M.value.xAxisLabels.autoRotate.angle});let Mr=d(()=>c({config:k,style:F,mutableConfig:V,dialog:Ut,accordion:Rt,isFullscreen:$,parent:D,maxWidth:800,isCursorPointer:I}));rt(()=>V.value.showTable,e=>s(e,k,an));function Nr(){V.value.showTable=!1,on.value&&on.value.setTableIconState(!1)}let Pr=d(()=>F.value.backgroundColor),Fr=d(()=>F.value.title),{isCallbackImaging:Ir,isCallbackSvg:Lr,generateSvg:Rr,onGenerateImage:zr}=Ne({svg:L,title:Fr,legend:null,legendItems:null,backgroundColor:Pr,getSvgCallback:()=>k.value.userOptions.callbacks.svg,generateImage:Fn});async function Br(){Kt(`copyAlt`,{config:k.value,dataset:q.value}),k.value.userOptions.callbacks.altCopy?await Promise.resolve(k.value.userOptions.callbacks.altCopy({config:k.value,dataset:q.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Vr(){return q.value.length}function Hr(e){return q.value[e]?.plots??[]}function Ur(e=dn.value,t=fn.value){return!Number.isInteger(e)||!Number.isInteger(t)?null:Hr(e)[t]??null}function Wr(){dn.value=null,fn.value=null,O.value=`pointer`,Xt.value=!1,Q.value=null}function Gr(e){if(!e||!L.value)return;let t=L.value.getBoundingClientRect();pn.value={x:t.left+e.x/z.value*t.width,y:t.top+e.y/B.value*t.height}}function Kr(e,t){let n=Ur(e,t);n&&(dn.value=e,fn.value=t,O.value=`keyboard`,Gr(n),gr({datapoint:n,seriesIndex:e,triggerMode:`keyboard`}))}function qr(){mn.value=!0,dn.value=null,fn.value=null}function Jr(){mn.value=!1,Wr()}function Yr(e){if(!L.value||Dr.value||document.activeElement!==L.value||!Vr())return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`ArrowUp`,i=e.key===`ArrowDown`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;if(!t&&!n&&!r&&!i&&!a&&!o)return;if(e.preventDefault(),e.stopPropagation(),o){Wr();return}let s=dn.value,c=fn.value;if(s===null||c===null)s=0,c=0;else if(t||n){let e=Vr();s=n?(s+1)%e:(s-1+e)%e;let t=Hr(s);if(!t.length)return;c=Math.min(c,t.length-1)}else if(r||i){let e=Hr(s);if(!e.length)return;c=r?(c+1)%e.length:(c-1+e.length)%e.length}if(a){let e=Ur();if(!e)return;mr({datapoint:e,seriesIndex:dn.value})}else Kr(s,c)}let Xr=d(()=>({headers:xr.value?.colNames??[],rows:xr.value?.body?.map(e=>e.map(e=>e&&typeof e==`object`&&`name`in e?e.name:e))??[]}));return We({getData:Cr,getImage:kr,generatePdf:Pn,generateCsv:br,generateImage:Fn,generateSvg:Rr,toggleTable:wr,toggleLabels:Tr,toggleTooltip:Er,toggleAnnotator:Or,toggleFullscreen:Sr,copyAlt:Br}),rt(()=>[z.value,B.value,M.value,F.value,k.value.style.fontFamily,E.dataset,On.value,un.value,ln.value,sn.value,cn.value],Kn,{flush:`post`,deep:!0}),(e,s)=>(y(),m(`div`,{ref_key:`stripPlotChart`,ref:D,class:Xe(`vue-data-ui-component vue-ui-strip-plot ${$.value?`vue-data-ui-wrapper-fullscreen`:``} ${k.value.useCssAnimation?``:`vue-ui-dna`}`),style:Ze(`font-family:${k.value.style.fontFamily};width:100%; text-align:center;background:${F.value.backgroundColor};${k.value.responsive?`height:100%`:``}`),id:`strip-plot_${Jt.value}`,onMouseenter:s[2]||=()=>w(Sn)(!0),onMouseleave:s[3]||=()=>w(Sn)(!1)},[h(`div`,{id:`chart-instructions-${Jt.value}`,class:`sr-only`},[h(`p`,null,C(k.value.a11y.translations.keyboardNavigation),1)],8,ot),k.value.a11y.includeTable&&Xr.value?.rows?.length?(y(),f(He,{key:0,uid:Jt.value,head:Xr.value.headers,body:Xr.value.rows,notice:k.value.a11y.translations.tableAvailable,caption:k.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):p(``,!0),A.value.buttons.annotator?(y(),f(w(Vt),Je({key:1},w(a)(A.value.annotator),{svgRef:w(L),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Dr.value,isCursorPointer:I.value,palette:A.value.annotatorPalette,onClose:Or}),Ge({_:2},[x(w(o),t=>({name:t,fn:T(n=>[S(e.$slots,t,v(_(w(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),In.value?(y(),m(`div`,{key:2,ref_key:`noTitle`,ref:en,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),F.value.title.text?(y(),m(`div`,{key:3,ref_key:`chartTitle`,ref:Qt,style:`width:100%;background:transparent;padding-bottom:24px`},[(y(),f(ze,{key:`title_${nn.value}`,config:{title:{cy:`donut-div-title`,...F.value.title},subtitle:{cy:`donut-div-subtitle`,...F.value.title.subtitle}}},null,8,[`config`]))],512)):p(``,!0),A.value.show&&qt.value&&(w(Cn)||w(xn))?(y(),f(w(Bt),Je({ref_key:`userOptionsRef`,ref:on,key:`user_option_${Yt.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isPrinting:w(Mn),isImaging:w(Nn),uid:Jt.value,hasTooltip:A.value.buttons.tooltip&&j.value.show,hasLabel:A.value.buttons.labels&&k.value.type!==`violin`,isTooltip:V.value.showTooltip,isFullscreen:$.value,chartElement:D.value},w(n)(A.value,`pdf csv img svg table fullscreen altCopy annotator`),{isAnnotation:Dr.value,tableDialog:k.value.table.useDialog,isCursorPointer:I.value,onToggleFullscreen:Sr,onGeneratePdf:w(Pn),onGenerateCsv:br,onGenerateImage:w(zr),onGenerateSvg:w(Rr),onToggleTable:wr,onToggleLabels:Tr,onToggleTooltip:Er,onToggleAnnotator:Or,onCopyAlt:Br,style:{visibility:w(Cn)?w(xn)?`visible`:`hidden`:`visible`}}),Ge({_:2},[x(w(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:T(n=>[S(e.$slots,t,v(_(w(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasTooltip`,`hasLabel`,`isTooltip`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):p(``,!0),h(`div`,st,[(y(),m(`svg`,{ref_key:`svgRef`,ref:L,xmlns:w(be),class:Xe({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value,"vue-data-ui-no-transition":!w(hn)||w(Gn)}),viewBox:`0 0 ${z.value} ${B.value}`,style:Ze(`max-width:100%; overflow: visible; background:transparent;color:${F.value.color};;visibility:${w(Wn)?`visible`:`hidden`}`),"aria-describedby":`chart-instructions-${Jt.value}`,tabindex:`0`,onFocus:qr,onBlur:Jr,onKeydown:Yr},[qe(w(Ht)),S(e.$slots,`svg-underlayer`,{svg:{...W.value,isPrintingImg:w(Mn)||w(Nn)||w(Ir),isPrintingSvg:w(Lr),boxPlotSummaries:Y.value,series:G.value}},void 0,!0),e.$slots[`chart-background`]?(y(),m(`foreignObject`,{key:0,x:W.value.left,y:W.value.top,width:Math.max(.1,W.value.width),height:Math.max(.1,W.value.height),style:{pointerEvents:`none`}},[S(e.$slots,`chart-background`,{},void 0,!0)],8,lt)):p(``,!0),P.value.show?(y(),m(`g`,ut,[P.value.horizontalGrid.show?(y(),m(`g`,dt,[(y(!0),m(u,null,x(dr.value,e=>(y(),m(`line`,{x1:e.x1,x2:e.x2,y1:e.y,y2:e.y,stroke:P.value.horizontalGrid.stroke,"stroke-width":P.value.horizontalGrid.strokeWidth,"stroke-dasharray":P.value.horizontalGrid.strokeDasharray,"stroke-linecap":`round`},null,8,ft))),256))])):p(``,!0),P.value.verticalGrid.show?(y(),m(`g`,pt,[(y(!0),m(u,null,x(G.value,(e,t)=>(y(),m(`line`,{x1:W.value.left+(t+1)*W.value.stripWidth,x2:W.value.left+(t+1)*W.value.stripWidth,y1:W.value.top,y2:W.value.bottom,stroke:P.value.verticalGrid.stroke,"stroke-width":P.value.verticalGrid.strokeWidth,"stroke-dasharray":P.value.verticalGrid.strokeDasharray,"stroke-linecap":`round`},null,8,mt))),256))])):p(``,!0),h(`line`,{x1:W.value.left,x2:W.value.left,y1:W.value.top,y2:W.value.bottom,stroke:P.value.stroke,"stroke-width":P.value.strokeWidth,"stroke-linecap":`round`},null,8,ht),h(`line`,{x1:W.value.left,x2:W.value.right,y1:W.value.bottom,y2:W.value.bottom,stroke:P.value.stroke,"stroke-width":P.value.strokeWidth,"stroke-linecap":`round`},null,8,gt)])):p(``,!0),M.value.yAxisLabels.show?(y(),m(`g`,{key:2,ref_key:`scaleLabels`,ref:un},[(y(!0),m(u,null,x(dr.value,(e,t)=>(y(),m(`text`,{class:Xe({"vue-data-ui-transition":w(hn)&&!w(Gn)}),key:`sl_${t}`,transform:`translate(${e.x1+M.value.yAxisLabels.offsetX-5}, ${e.y+M.value.yAxisLabels.fontSize/3})`,fill:M.value.yAxisLabels.color,"font-size":M.value.yAxisLabels.fontSize,"text-anchor":`end`},C(w(me)(M.value.formatter,e.value,w(l)({p:M.value.prefix,v:e.value,s:M.value.suffix,r:M.value.yAxisLabels.rounding}),{datapoint:e,seriesIndex:t})),11,_t))),128))],512)):p(``,!0),M.value.xAxisLabels.show?(y(),m(`g`,{key:3,ref_key:`timeLabelsEls`,ref:ln},[(y(!0),m(u,null,x(Ar.value,(e,t)=>(y(),m(`g`,null,[String(e).includes(`
2
2
  `)?(y(),m(`text`,{key:1,class:`vue-ui-strip-plot-category-name`,transform:`translate(${W.value.left+(t+1)*W.value.stripWidth-W.value.stripWidth/2}, ${W.value.bottom+M.value.xAxisLabels.fontSize*2+M.value.xAxisLabels.offsetY}), rotate(${M.value.xAxisLabels.rotation})`,"font-size":M.value.xAxisLabels.fontSize,fill:M.value.xAxisLabels.color,"text-anchor":M.value.xAxisLabels.rotation>0?`start`:M.value.xAxisLabels.rotation<0?`end`:`middle`,innerHTML:w(oe)({content:w(ye)(String(e)),fontSize:M.value.xAxisLabels.fontSize,fill:M.value.xAxisLabels.color,x:0,y:0})},null,8,yt)):(y(),m(`text`,{key:0,class:`vue-ui-strip-plot-category-name`,transform:`translate(${W.value.left+(t+1)*W.value.stripWidth-W.value.stripWidth/2}, ${W.value.bottom+M.value.xAxisLabels.fontSize*2+M.value.xAxisLabels.offsetY}), rotate(${M.value.xAxisLabels.rotation})`,"font-size":M.value.xAxisLabels.fontSize,fill:M.value.xAxisLabels.color,"text-anchor":M.value.xAxisLabels.rotation>0?`start`:M.value.xAxisLabels.rotation<0?`end`:`middle`},C(String(e)),9,vt))]))),256))],512)):p(``,!0),M.value.axis.yLabel?(y(),m(`text`,{key:4,ref_key:`yAxisLabel`,ref:cn,fill:M.value.axis.color,"font-size":M.value.axis.fontSize,transform:`translate(${M.value.axis.fontSize}, ${W.value.top+W.value.height/2}) rotate(-90)`,"text-anchor":`middle`},C(M.value.axis.yLabel),9,bt)):p(``,!0),M.value.axis.xLabel?(y(),m(`text`,{key:5,ref_key:`xAxisLabel`,ref:sn,fill:M.value.axis.color,"font-size":M.value.axis.fontSize,x:W.value.left+W.value.width/2,y:B.value-M.value.axis.fontSize/3,"text-anchor":`middle`},C(M.value.axis.xLabel),9,xt)):p(``,!0),Q.value?(y(),m(u,{key:6},[h(`line`,{x1:W.value.left,x2:W.value.right,y1:Q.value.y,y2:Q.value.y,stroke:Q.value.color,"stroke-width":1,class:Xe({"select-circle":k.value.useCssAnimation})},null,10,St),h(`circle`,{cx:W.value.left,cy:Q.value.y,r:3,fill:Q.value.color,class:Xe({"select-circle":k.value.useCssAnimation})},null,10,Ct),h(`circle`,{cx:W.value.right,cy:Q.value.y,r:3,fill:Q.value.color,class:Xe({"select-circle":k.value.useCssAnimation})},null,10,wt)],64)):p(``,!0),h(`defs`,null,[(y(!0),m(u,null,x(G.value,e=>(y(),f(Ue,{t:`radial`,id:e.id,key:`r_${e.id}`,fy:`30%`,stops:[[`10%`,w(ie)(e.color,F.value.plots.gradient.intensity/100),1],[`90%`,w(se)(e.color,.1),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128))]),(y(!0),m(u,null,x(rr.value,(e,t)=>(y(),m(u,{key:e.id},[e.path?(y(),m(`path`,{key:0,d:e.path,fill:e.fill,stroke:e.color,"fill-opacity":N.value.opacity,"stroke-opacity":N.value.strokeOpacity,"stroke-width":N.value.strokeWidth,style:Ze({pointerEvents:J.value?`auto`:`none`,cursor:J.value&&I.value?`pointer`:`default`}),onMouseenter:e=>J.value&&Y.value[t]&&vr({boxPlot:Y.value[t],seriesIndex:t,triggerMode:`pointer`}),onMouseleave:s[0]||=e=>J.value&&_r()},null,44,Tt)):p(``,!0),(y(!0),m(u,null,x(e.connectors,(t,n)=>(y(),m(`line`,{key:`violin_connector_${e.id}_${n}`,x1:t.x,x2:t.x,y1:t.y1,y2:t.y2,stroke:e.color,"stroke-opacity":N.value.strokeOpacity,"stroke-width":N.value.strokeWidth,"stroke-linecap":`round`,style:{"pointer-events":`none`}},null,8,Et))),128))],64))),128)),(y(!0),m(u,null,x(Y.value,(e,t)=>(y(),m(`g`,{key:`boxplot_${e.id}`,style:Ze({cursor:I.value?`pointer`:`default`}),onMouseenter:n=>vr({boxPlot:e,seriesIndex:t,triggerMode:`pointer`}),onMouseleave:_r},[h(`line`,{x1:e.centerX,x2:e.centerX,y1:e.upperY,y2:e.lowerY,stroke:w(se)(e.boxPlotColor,.2),"stroke-width":Math.max(1,N.value.strokeWidth),"stroke-linecap":`round`},null,8,Ot),h(`rect`,{x:e.boxLeft,y:Math.min(e.q1Y,e.q3Y),width:e.boxWidth,height:Math.max(1,Math.abs(e.q3Y-e.q1Y)),fill:e.boxPlotColor,stroke:w(se)(e.boxPlotColor,.2),"stroke-width":Math.max(1,N.value.strokeWidth),rx:e.boxWidth/20},null,8,kt),h(`circle`,{cx:e.boxLeft+e.boxWidth/2,cy:e.medianY,r:e.boxWidth/3*Math.min(1,N.value.boxPlot.medianCircleRadiusRatio),fill:N.value.boxPlot.medianCircleFill,stroke:w(se)(e.boxPlotColor,.2)},null,8,At)],44,Dt))),128)),(y(!0),m(u,null,x(q.value,(t,n)=>(y(),m(u,null,[J.value?p(``,!0):(y(!0),m(u,{key:0},x(t.plots,(n,r)=>(y(),f(Re,Je({ref_for:!0},e.$attrs,{plot:{x:n.x,y:tn.value?n.y:W.value.top},radius:Q.value&&Q.value.id===n.id?H.value*1.5:H.value,shape:F.value.plots.shape,stroke:F.value.plots.stroke,strokeWidth:F.value.plots.strokeWidth,color:F.value.plots.gradient.show?`url(#${t.id})`:t.color,style:`transition: all 0.2s ease-in-out; opacity:${Q.value?Q.value.id===n.id?1:.2:F.value.plots.opacity};${Rn.value?`transition-delay:${r*50}ms`:``}`,class:{"vue-ui-strip-plot-animated":k.value.useCssAnimation&&Rn.value&&!w(vn),"vue-ui-strip-plot-select-circle":k.value.useCssAnimation&&!Rn.value},onMouseenter:e=>gr({datapoint:n,seriesIndex:r,triggerMode:`pointer`}),onMouseleave:e=>pr({datapoint:n,seriesIndex:r}),onClick:e=>mr({datapoint:n,seriesIndex:r})}),null,16,[`plot`,`radius`,`shape`,`stroke`,`strokeWidth`,`color`,`style`,`class`,`onMouseenter`,`onMouseleave`,`onClick`]))),256)),V.value.dataLabels.show&&!J.value?(y(),m(`g`,jt,[(y(!0),m(u,null,x(t.plots,(e,n)=>(y(),m(u,null,[n===t.plots.length-1||Q.value&&Q.value.id===e.id&&!V.value.showTooltip?(y(),m(`text`,{key:0,x:e.x,y:e.y+M.value.bestPlotLabel.offsetY-H.value*(Q.value&&Q.value.id===e.id&&!V.value.showTooltip?2:1.5),"font-size":M.value.bestPlotLabel.fontSize,fill:M.value.bestPlotLabel.color,"text-anchor":`middle`,style:Ze(`opacity:${k.value.useCssAnimation?+!Rn.value:1};transition:opacity 0.2s ease-in;`)},C(e.name)+` `+C(M.value.bestPlotLabel.showValue?w(me)(M.value.formatter,e.value,w(l)({p:`(${M.value.prefix}`,v:e.value,s:`${M.value.suffix})`,r:F.value.labels.bestPlotLabel.rounding}),{datapoint:e,seriesIndex:n}):``),13,Mt)):p(``,!0)],64))),256))])):p(``,!0)],64))),256)),S(e.$slots,`svg`,{svg:{...W.value,isPrintingImg:w(Mn)||w(Nn)||w(Ir),isPrintingSvg:w(Lr),boxPlotSummaries:Y.value,series:G.value}},void 0,!0)],46,ct)),e.$slots.hint?(y(),m(`div`,Nt,[S(e.$slots,`hint`,v(_({hint:k.value.a11y.translations.keyboardNavigation,isVisible:mn.value})),void 0,!0)])):p(``,!0)]),e.$slots.watermark?(y(),m(`div`,Pt,[S(e.$slots,`watermark`,v(_({isPrinting:w(Mn)||w(Nn)||w(Ir)||w(Lr)})),void 0,!0)])):p(``,!0),e.$slots.source?(y(),m(`div`,{key:6,ref_key:`source`,ref:$t,dir:`auto`},[S(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),qe(w(It),{teleportTo:j.value.teleportTo,show:V.value.showTooltip&&Xt.value,backgroundColor:j.value.backgroundColor,color:j.value.color,borderRadius:j.value.borderRadius,borderColor:j.value.borderColor,borderWidth:j.value.borderWidth,fontSize:j.value.fontSize,backgroundOpacity:j.value.backgroundOpacity,position:j.value.position,offsetX:j.value.offsetX,offsetY:j.value.offsetY,parent:D.value,content:Zt.value,isFullscreen:$.value,isCustom:w(re)(j.value.customFormat),smooth:j.value.smooth,backdropFilter:j.value.backdropFilter,smoothForce:j.value.smoothForce,smoothSnapThreshold:j.value.smoothSnapThreshold,isA11yMode:O.value===`keyboard`,a11yPosition:pn.value},{"tooltip-before":T(()=>[S(e.$slots,`tooltip-before`,v(_({...fr.value})),void 0,!0)]),tooltip:T(()=>[S(e.$slots,`tooltip`,v(_({...fr.value})),void 0,!0)]),"tooltip-after":T(()=>[S(e.$slots,`tooltip-after`,v(_({...fr.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),qt.value&&A.value.buttons.table?(y(),f(et(Mr.value.component),Je({key:7},Mr.value.props,{ref_key:`tableUnit`,ref:an,onClose:Nr}),Ge({content:T(()=>[(y(),f(w(zt),{key:`table_${rn.value}`,colNames:xr.value.colNames,head:xr.value.head,body:xr.value.body,config:xr.value.config,title:k.value.table.useDialog?``:Mr.value.title,withCloseButton:!k.value.table.useDialog,isCursorPointer:I.value,onClose:Nr},{th:T(({th:e})=>[h(`div`,Ft,C(e),1)]),td:T(({td:e})=>[Ke(C(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[k.value.table.useDialog?{name:`title`,fn:T(()=>[Ke(C(Mr.value.title),1)]),key:`0`}:void 0,k.value.table.useDialog?{name:`actions`,fn:T(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:s[1]||=e=>br(A.value.callbacks.csv),style:Ze({cursor:I.value?`pointer`:`default`})},[qe(w(Lt),{name:`fileCsv`,stroke:Mr.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),S(e.$slots,`skeleton`,{},()=>[w(vn)?(y(),f(Ve,{key:0})):p(``,!0)],!0)],46,at))}},[[`__scopeId`,`data-v-15e44b60`]]);export{it as n,It as t};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{$ as t,C as n,D as r,Ft as i,Ht as a,Jt as o,X as ee,d as te,in as s,nt as ne,r as re}from"./lib-rPeBMZrn.js";import{t as ie}from"./useConfig-B8qvYKdK.js";import{n as ae,t as oe}from"./useHints-C-TwxM0Y.js";import{t as se}from"./vue-ui-xy-Cwkavs_B.js";import{t as ce}from"./vue-ui-donut-BV3btR0S.js";import{t as le}from"./BaseIcon-CoY0vuL3.js";import{t as c}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as l,computed as u,createBlock as ue,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createTextVNode as m,createVNode as de,defineAsyncComponent as fe,mergeProps as pe,nextTick as me,normalizeClass as h,normalizeStyle as g,onBeforeUnmount as he,onMounted as ge,openBlock as _,ref as v,renderList as y,toDisplayString as b,unref as x,useCssVars as _e,vModelSelect as ve,vModelText as ye,watch as be,withCtx as xe,withDirectives as Se,withKeys as Ce,withModifiers as we}from"vue";var Te=/* @__PURE__ */ e({default:()=>rn}),Ee=[`innerHTML`],De=[`data-is-open`],Oe={class:`vue-ui-table-export-hub-options`},ke={class:`label`},Ae=[`id`,`onClick`],je=[`innerHTML`],Me={class:`vue-ui-table-dialog-field`},Ne={class:`label vue-ui-table-dialog-input-label`,style:{width:`100%`}},Pe={style:{width:`fit-content`}},Fe={class:`vue-ui-table`},Ie={key:0},Le={key:0},Re={key:1},ze={key:0,style:{display:`flex`,"align-items":`center`,"justify-content":`flex-end`}},Be=[`innerHTML`],Ve={key:0,style:{"margin-left":`3px`}},He={key:0},Ue={class:`th-filter`},We={key:0,class:`th-date`},Ge={class:`date-wrapper--inputs`},Ke={class:`date-fieldset`},qe=[`for`],Je=[`id`,`onUpdate:modelValue`,`onInput`],Ye={class:`date-fieldset`},Xe=[`for`],Ze=[`id`,`onUpdate:modelValue`,`onInput`],Qe={class:`date-wrapper--button`},$e=[`onClick`],et=[`innerHTML`],tt=[`innerHTML`],nt=[`innerHTML`],rt=[`onClick`,`disabled`],it=[`placeholder`,`onUpdate:modelValue`,`name`],at=[`onClick`],ot=[`innerHTML`],st=[`innerHTML`],ct=[`innerHTML`],lt=[`onClick`,`innerHTML`],ut=[`innerHTML`],dt={key:5,class:`th-range-filter`},ft=[`for`],pt=[`id`,`max`,`min`,`onUpdate:modelValue`],mt=[`id`,`max`,`min`,`onUpdate:modelValue`],ht=[`for`],gt=[`onClick`,`disabled`],_t=[`id`],vt=[`onClick`],yt=[`onClick`,`onKeyup`],bt=[`innerHTML`,`onClick`,`onKeyup`],xt=[`data-row`],St=[`data-row`],Ct=[`data-row`,`onClick`,`onKeyup`,`id`],wt=[`innerHTML`],Tt={key:1},Et={key:2},Dt={key:5},Ot=[`innerHTML`],kt={key:0},At={style:{"margin-left":`12px`}},jt={class:`format-num`},Mt={key:0,class:`format-num`},Nt={key:1,class:`format-num`},Pt={key:2},Ft={key:1,class:`vue-ui-table-paginator format-num`},It={key:2,class:`vue-ui-table-size-warning`},Lt=[`innerHTML`],Rt={key:4,class:`vue-ui-table-pagination format-num`},zt=[`innerHTML`],Bt={for:`pageScroller`,style:{"font-size":`14px`}},Vt=[`max`,`value`],Ht={key:1},Ut=[`innerHTML`],Wt={class:`vue-ui-table-chart-modal-options`},Gt=[`innerHTML`],Kt=[`innerHTML`],qt=[`innerHTML`],Jt={style:{width:`100%`,height:`fit-content`}},Yt={class:`vue-ui-table-fieldset`},Xt={class:`vue-ui-table-fieldset-wrapper`},Zt=[`name`,`id`,`checked`,`onInput`],Qt=[`for`],$t=[`disabled`],en=[`innerHTML`],tn={style:{width:`100%`,"margin-bottom":`12px`}},nn={key:2,style:{width:`100%`,"margin-bottom":`32px`}},rn=/*#__PURE__*/ c({__name:`vue-ui-table`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`page-change`],setup(e,{expose:c,emit:Te}){_e(e=>({v1963bdc6:In.value,v65c97fa0:Ln.value,v5bb9dfbe:Vn.value,v1e9a6f90:Rn.value,v08a6a8ea:Hn.value,v438d66f0:Un.value,v4581052e:zn.value,c4e8e4bc:Bn.value,v2e03e998:Wn.value}));let rn=fe(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),S=e,an=Te,{vue_ui_table:on}=ie(),C=ee(),sn=v(null),cn=v(null),ln=v(null),w=v({height:316,type:`bar`,width:512}),T=v({ASC:1,BAR:`bar`,DATE:`date`,DESC:-1,DONUT:`donut`,LINE:`line`,NUMERIC:`numeric`,PERCENTAGE:`percentage`,TEXT:`text`}),un=v(100),dn=v(100),fn=v(0),pn=v(0);v(400),v(200);let mn=v({CELL:`smart-td-selected`,FIRST_TD:`smart-td-selected-first`,LAST_TD:`smart-td-selected-last`,ROW:`smart-td-selected-neighbor`}),hn=v(void 0),gn=v(void 0),E=v({col:void 0,rows:[]}),D=v(0),O=v(20),_n=v(!1),vn=v(!1),k=v({}),A=v({}),yn=v({}),j=v({}),M=v({}),N=v({}),P=v({}),F=v({}),I=v({}),bn=v(S.config.rowsPerPage?S.config.rowsPerPage:25),xn=v([.../* @__PURE__ */ new Set([10,25,50,100,250,500,S.config.rowsPerPage?S.config.rowsPerPage:25,S.dataset.body.length])].sort((e,t)=>e-t)),Sn=v(void 0),L=v(void 0),Cn=v(void 0),R=v(!1),wn=v(0),Tn=v(``),En=v(``),z=v(!1),B=v(JSON.parse(JSON.stringify(S.dataset.body)).map((e,t)=>({...e,absoluteIndex:t}))),Dn=v(JSON.parse(JSON.stringify(S.dataset.body)).map((e,t)=>({...e,absoluteIndex:t}))),V=v(JSON.parse(JSON.stringify(S.dataset.header)).map((e,t)=>({average:Object.hasOwn(e,`average`)?e.average:!1,decimals:Object.hasOwn(e,`decimals`)?e.decimals:0,isMultiselect:Object.hasOwn(e,`isMultiselect`)?e.isMultiselect:!1,isPercentage:Object.hasOwn(e,`isPercentage`)?e.isPercentage:!1,isSearch:Object.hasOwn(e,`isSearch`)?e.isSearch:!1,isSort:Object.hasOwn(e,`isSort`)?e.isSort:!1,name:e.name,percentageTo:Object.hasOwn(e,`percentageTo`)?e.percentageTo:void 0,prefix:Object.hasOwn(e,`prefix`)?e.prefix:``,rangeFilter:Object.hasOwn(e,`rangeFilter`)?e.rangeFilter:!1,suffix:Object.hasOwn(e,`suffix`)?e.suffix:``,sum:Object.hasOwn(e,`sum`)?e.sum:!1,type:e.type,index:t}))),On=u(()=>`background:${G.value.backgroundColor};color:${G.value.color};outline:${G.value.outline}`);function kn(e){return{disabled:e,style:`cursor:${Y.value?`pointer`:`default`};background:${Pn.value.buttons.backgroundColor};color:${Pn.value.buttons.color};opacity:${e?Pn.value.buttons.opacityDisabled:1}`}}function An(e,n){return t({p:n.prefix,v:Number(e),s:n.suffix,r:n.decimals})}let jn=u(()=>cn.value?cn.value.getBoundingClientRect().height+3:3),H=u(()=>{if(!Object.keys(S.config||{}).length)return on;let e=s({defaultConfig:on,userConfig:S.config});return n(e)}),U=u(()=>H.value.style.exportMenu),W=u(()=>H.value.style.title),G=u(()=>H.value.style.th),K=u(()=>H.value.style.inputs),Mn=u(()=>H.value.style.dropdowns),Nn=u(()=>H.value.style.closeButtons),q=u(()=>H.value.style.rows),Pn=u(()=>H.value.style.pagination),J=u(()=>H.value.style.chart),Fn=u(()=>H.value.style);ae({config:()=>H.value,dataset:()=>S.dataset,component:`VueUiTable`,rules:[oe.noHint]});let Y=u(()=>H.value.useCursorPointer),In=u(()=>G.value.buttons.cancel.inactive.backgroundColor),Ln=u(()=>G.value.buttons.cancel.inactive.color),Rn=u(()=>G.value.buttons.cancel.active.backgroundColor),zn=u(()=>G.value.buttons.filter.active.backgroundColor),Bn=u(()=>G.value.buttons.filter.active.color),Vn=u(()=>i(Rn.value,.33)),Hn=u(()=>o(Rn.value,33)),Un=u(()=>i(zn.value,.33)),Wn=u(()=>o(zn,33)),Gn=u(()=>[...V.value].filter(e=>e.type===T.value.DATE)),Kn=u(()=>[``,...Gn.value.map(e=>e.name)]),qn=u(()=>{let e=Gn.value.find(e=>e.name===Tn.value);return e?e.index:null}),X=u(()=>{let e=[];if(B.value.length)for(let t=0;t<B.value.length;t+=bn.value)e.push(B.value.slice(t,t+bn.value));return e}),Jn=u(()=>X.value[D.value]),Yn=u(()=>qn.value==null?[]:Jn.value.map(e=>e.td[qn.value])),Xn=u(()=>Object.keys(M.value).map(e=>({index:e,name:S.dataset.header[e].name,options:M.value[e]}))),Zn=u(()=>H.value.useChart&&E.value.rows.length>1),Qn=u(()=>S.dataset.header.map(e=>e.type).includes(T.value.NUMERIC)),Z=u(()=>({arrowSort:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 9l4 -4l4 4m-4 -4v14" /><path d="M21 15l-4 4l-4 -4m4 4v-14" /></svg>`,bar:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 12m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M9 8m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M15 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M4 20l14 0" /></svg>`,chart:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 19l16 0" /><path d="M4 15l4 -6l4 2l4 -5l4 4" /></svg>`,chevronDown:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 9l6 6l6 -6" /></svg>`,chevronLeft:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value*1.6}" height="${O.value*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 6l-6 6l6 6" /></svg>`,chevronRight:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value*1.6}" height="${O.value*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 6l6 6l-6 6" /></svg>`,donut:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value*.8}" height="${O.value*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 3v5m4 4h5" /><path d="M8.929 14.582l-3.429 2.918" /><path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" /><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /></svg>`,export:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5" /><path d="M3 10h18" /><path d="M10 3v18" /><path d="M16 19h6" /><path d="M19 16l3 3l-3 3" /></svg>`,fileDownload:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 3v4a1 1 0 0 0 1 1h4" /><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /><path d="M12 17v-6" /><path d="M9.5 14.5l2.5 2.5l2.5 -2.5" /></svg>`,filter:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" /></svg>`,move:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 9l3 3l-3 3" /><path d="M15 12h6" /><path d="M6 9l-3 3l3 3" /><path d="M3 12h6" /><path d="M9 18l3 3l3 -3" /><path d="M12 15v6" /><path d="M15 6l-3 -3l-3 3" /><path d="M12 3v6" /></svg>`,sort09:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 3a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 16m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 16v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sort90:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 14a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 5v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sortAZ:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 10v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 21h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sortZA:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 21v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 10h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sum:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>`,table:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" fill="white" d="M 10 2, 21 2, 21 21, 10 21Z"/><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" /><path d="M3 10h18" /><path d="M10 3v18" /></svg>`,warning:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value*.8}" height="${O.value*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`,grip:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M5 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M5 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M19 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M19 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /></svg>`})),$n=u(()=>B.value.map(e=>e.td)),er=u(()=>S.dataset.header[E.value.col]),tr=u(()=>{let e=E.value.rows.map(e=>e.value).reduce((e,t)=>e+t,0),t=e/E.value.rows.length,n=e=>Number(e.toFixed(er.value.decimals)).toLocaleString();return{sumPercentage:n(e*100),sumRegular:n(e),averagePercentage:n(t*100),averageRegular:n(t)}}),nr=v({width:1e3,height:500});function rr({width:e,height:t}){nr.value={width:e,height:t}}let ir=u(()=>{if(!Zn.value)return[];let e=er.value,t={pdf:!1,csv:!1,table:!1,annotator:!1},n=nr.value.height,r=nr.value.width,a=r/E.value.rows.length,o=Math.max(...E.value.rows.map(e=>e.value)),ee=Math.min(...E.value.rows.map(e=>e.value)),s=e.isPercentage&&e.percentageTo,ne=w.value.type===T.value.DONUT&&L.value&&L.value.name,ie=e.name+(s?` / ${S.dataset.header[N.value[E.value.col].referenceIndex].name}`:``)+(ne?` ${H.value.translations.by} ${L.value.name}`:``),ae=e.prefix,oe=e.suffix,se=e=>[{name:ie,series:E.value.rows.map(e=>e.value),type:e,useProgression:!0,...e===`line`?{smooth:J.value.layout.line.smooth,color:J.value.layout.line.stroke,useArea:J.value.layout.line.useArea}:{color:J.value.layout.bar.fill}}],ce=se(`line`),le=se(`bar`),c=J.value.modal.backgroundColor,l=re(c),u=e.decimals,ue={useCssAnimation:!1,chart:{width:r,height:n-250,backgroundColor:c,color:l,labels:{fontSize:18,prefix:ae,suffix:oe},grid:{stroke:i(l,.5),labels:{color:l,xAxisLabels:{color:l,show:Yn.value.length,values:Yn.value,datetimeFormatter:J.value.layout.datetimeFormatter,showOnlyAtModulo:J.value.layout.timeLabels.showOnlyAtModulo,modulo:J.value.layout.timeLabels.modulo}}},highlighter:{color:l},legend:{color:l,show:!1},title:{text:ie,color:l,textAlign:`center`,fontSize:18},tooltip:{showTimeLabel:Yn.value.length,backgroundOpacity:30,color:l,backgroundColor:c,showPercentage:!1,roundingValue:u},userOptions:{buttons:{...t}},zoom:{show:J.value.layout.zoom.show,autoFit:J.value.layout.zoom.autoFit,focusOnDrag:!0,minimap:{show:!0}}},line:{labels:{show:!0,color:l,rounding:u},dot:{useSerieColor:!1,fill:J.value.layout.line.plot.fill,strokeWidth:J.value.layout.line.plot.strokeWidth}},bar:{useGradient:!1,border:{useSerieColor:!1,stroke:J.value.layout.bar.stroke,strokeWidth:J.value.layout.bar.strokeWidth},labels:{show:!0,color:l,rounding:u}}},d=ee>=0?0:Math.abs(ee),f=o+d,p=e.isPercentage,m=E.value.rows.map((t,r)=>({x:a*r+a/2,y:(1-(t.value+d)/f)*n,value:p?t.value*100:t.value,suffix:p?`%`:e.suffix?e.suffix:``,prefix:e.prefix?e.prefix:``,index:t.index,absoluteValue:p?Math.abs(t.value)*100:Math.abs(t.value)}));return{donutConfig:{useCssAnimation:!1,userOptions:{position:`left`,buttons:{...t}},style:{chart:{backgroundColor:c,color:l,layout:{curvedMarkers:!0,donut:{strokeWidth:64},labels:{dataLabels:{suffix:p?`%`:``,prefix:ae},value:{rounding:u},percentage:{color:l,rounding:u},name:{color:l},hollow:{average:{color:l,text:H.value.translations.average,value:{color:l}},total:{color:l,offsetY:-12,text:H.value.translations.total,value:{color:l,offsetY:-12}}}}},legend:{backgroundColor:c,color:l,roundingValue:u,roundingPercentage:u},padding:{left:12,right:12},title:{text:ie,color:l,fontSize:18},tooltip:{backgroundOpacity:30,color:l,backgroundColor:c,roundingValue:u,roundingValue:u}}}},xyConfig:ue,xyDatasetLine:ce,xyDatasetBar:le,progression:m.length>=2&&te(m)}});function ar(){let e=L.value.options.map((e,t)=>({name:e,color:a[t]||a[t%a.length],values:[Jn.value.filter((t,n)=>t.td[L.value.index]===e&&E.value.rows.map(e=>e.index).includes(n)).map(e=>e.td[E.value.col]).reduce((e,t)=>Math.abs(e)+Math.abs(t),0)],absoluteValue:Jn.value.filter((t,n)=>t.td[L.value.index]===e&&E.value.rows.map(e=>e.index).includes(n)).map(e=>e.td[E.value.col]).reduce((e,t)=>e+t,0)})).sort((e,t)=>t.value-e.value);hn.value=e,me(()=>{w.value.type=T.value.DONUT,z.value=!1})}function or(e,t){return!A.value[e]&&(t.isSort||t.isSearch||t.isMultiselect||t.rangeFilter)&&![T.value.DATE].includes(t.type)}function sr(e=`all`){let t=S.dataset.header.map(e=>e.name),n=e===`all`?B.value.map(e=>e.td):Jn.value.map(e=>e.td),i=[t].concat(n),a=r(i);ne({csvContent:a,title:En.value})}function cr(){let e=document.getElementsByClassName(`th-dropdown`);e.length&&Array.from(e).forEach(e=>{e.dataset.isOpen=!1})}function lr(e,t){let n;clearTimeout(n),n=setTimeout(e,t)}function ur(){let e=document.getElementsByClassName(`tr_${C}`);Array.from(e).forEach(e=>{Array.from(e.getElementsByTagName(`td`)).forEach(e=>{e.dataset.row===`even`?(e.style.background=q.value.even.backgroundColor,e.style.color=q.value.even.color):(e.style.background=q.value.odd.backgroundColor,e.style.color=q.value.odd.color)})}),Array.from(e).forEach(e=>e.dataset.selected=`false`),D.value>X.value.length-1&&(D.value=X.value.length-1),R.value=!1,hn.value=void 0,Sn.value=void 0,w.value.type=T.value.BAR,E.value={col:void 0,rows:[]},un.value=100,dn.value=100}function dr(e,t){B.value=e.filter(e=>e.td[t]>=P.value[t].min&&e[t]<=P.value[t].max)}function fr(e,t){if(I.value[t]===T.value.ASC&&(e=e.sort((e,n)=>e[t]-n[t])),I.value[t]===T.value.DESC)e=e.sort((e,n)=>n[t]-e[t]);else return 0}function pr(){ur(),Object.keys(P.value).forEach(e=>{dr(B.value,e)}),Object.keys(I.value).forEach(e=>{fr(B.value,e)}),gn.value!==void 0&&fr(B.value,gn.value),S.dataset.header.forEach((e,t)=>{if(e.isPercentage){let e=N.value[t].referenceIndex,n=B.value.map(t=>t.td[e]).reduce((e,t)=>e+t,0);B.value.forEach(r=>{r.td[t]=r.td[e]/n})}}),D.value>X.value.length-1&&(D.value=X.value.length-1),[-1].includes(D.value)&&(D.value=0)}function Q(){B.value=Dn.value.filter(e=>{for(let t in F.value)if(!e.td[t].toUpperCase().includes(F.value[t].toUpperCase()))return!1;for(let t in M.value)if(!M.value[t].some(n=>n===e.td[t]))return!1;for(let t in k.value){let n=new Date(e.td[t]),r=new Date(k.value[t].from),i=new Date(k.value[t].to);if(n<r||n>i)return!1}return!0}),pr()}function mr(e){return gr(e)/B.value.length}function hr(e){let t=S.dataset.body.map(t=>new Date(t.td[e])),n=new Date(Math.min(...t)),r=new Date(Math.max(...t)),i=n.getFullYear(),a=r.getFullYear(),o=String(n.getMonth()+1).padStart(2,`0`),ee=String(r.getMonth()+1).padStart(2,`0`),te=String(n.getDate()).padStart(2,`0`),s=String(r.getDate()).padStart(2,`0`);return{from:`${i}-${o}-${te}`,to:`${a}-${ee}-${s}`}}function $(e){return[...new Set(S.dataset.body.map(t=>t.td[e]))]}function gr(e){return $n.value.map(t=>t[e]).map(e=>isNaN(Number(e))?0:e).reduce((e,t)=>e+t,0)}function _r(e){return e.includes(NaN)}function vr(e,t){return!M.value[t]||M.value[t].includes(e)}function yr(e){return!isNaN(Number(String(e).replaceAll(`%`,``)))}function br(e,t){let n=t.isSort,r=t.isSearch,i=t.isMultiselect&&M.value[e],a=t.rangeFilter,o=e=>{if(a&&P.value[e])return Math.round(P.value[e].min)===j.value[e].min&&Math.round(P.value[e].max)===j.value[e].max};if(n&&r&&i&&a)return[``,void 0].includes(F.value[e])&&[void 0].includes(I.value[e])&&M.value[e].length===$(e).length&&o(e);if(n&&r&&i)return[``,void 0].includes(F.value[e])&&[void 0].includes(I.value[e])&&M.value[e].length===$(e).length;if(n&&r&&a)return[``,void 0].includes(F.value[e])&&[void 0].includes(I.value[e])&&o(e);if(n&&r)return[``,void 0].includes(F.value[e])&&[void 0].includes(I.value[e]);if(n&&i&&a)return[void 0].includes(I.value[e])&&M.value[e].length===$(e).length&&o(e);if(n&&i)return[void 0].includes(I.value[e])&&M.value[e].length===$(e).length;if(r&&i&&a)return[``,void 0].includes(F.value[e])&&M.value[e].length===$(e).length&&o(e);if(r&&i)return[``,void 0].includes(F.value[e])&&M.value[e].length===$(e).length;if(r&&a)return[``,void 0].includes(F.value[e])&&o(e);if(r)return[``,void 0].includes(F.value[e]);if(n&&a)return[void 0].includes(I.value[e])&&o(e);if(n)return[void 0].includes(I.value[e]);if(i&&a)return M.value[e].length===$(e).length&&o(e);if(i)return M.value[e].length===$(e).length}function xr(){return{totalPages:X.value.length,itemsPerPage:bn.value,currentPage:D.value,currentPageData:Jn.value.map(e=>e.td)}}c({getCurrentPageData:xr});function Sr(){an(`page-change`,xr())}let Cr=v(null);function wr(e){if(ur(),e===`next`&&D.value<X.value.length){if(D.value+1>X.value.length-1)return;D.value+=1}else if(e===`previous`&&D.value>=1)--D.value;else{if(e-1<0||e>X.value.length||e===`previous`)return;D.value=e-1}Sr(),Cr.value&&Cr.value.scrollTo({top:0,left:0,behavior:`smooth`})}function Tr(e){e.preventDefault();let t=e.keyCode;if(![38,40,37,39].includes(t))return;let n=e.target.id.match(/cell_(\d+)_(\d+)_([0-9a-fA-F-]{36})/),r=parseInt(n[1]),i=parseInt(n[2]),a=document.getElementById(`cell_${r}_${i+1}_${C}`),o=document.getElementById(`cell_${r}_${i-1}_${C}`),ee=document.getElementById(`cell_${r+1}_${i}_${C}`),te=document.getElementById(`cell_${r-1}_${i}_${C}`),s;switch(!0){case t===39:s=a;break;case t===37:s=o;break;case t===38:s=te;break;case t===40:s=ee;break;default:return}s&&(s.focus(),s.scrollIntoView({behavior:`smooth`,block:`center`}))}function Er(e){let t=0;for(let n=0;n<e.length;n+=1)t+=e.charCodeAt(n);return t}async function Dr(){return new Promise(e=>{let t=[];V.value.forEach((e,n)=>{if(e.isSearch&&Object.assign(F.value,{[n]:``}),e.isMultiselect&&Object.assign(M.value,{[n]:$(n)}),e.type===T.value.DATE&&(Object.assign(k.value,{[n]:hr(n)}),Object.assign(yn.value,{[n]:!1})),(e.isPercentage||e.percentageTo)&&Object.assign(N.value,{[n]:{reference:e.percentageTo,referenceIndex:S.dataset.header.map(e=>e.name).indexOf(e.percentageTo)}}),e.rangeFilter&&(Object.assign(P.value,{[n]:{min:Math.round(Math.min(...S.dataset.body.map(e=>e.td).map(e=>e[n]))),max:Math.round(Math.max(...S.dataset.body.map(e=>e.td).map(e=>e[n])))}}),Object.assign(j.value,{[n]:{min:Math.round(Math.min(...S.dataset.body.map(e=>e.td).map(e=>e[n]))),max:Math.round(Math.max(...S.dataset.body.map(e=>e.td).map(e=>e[n])))}})),e.isPercentage){let r=S.dataset.header.map(e=>e.name).indexOf(e.percentageTo),i=S.dataset.body.map(e=>e.td[r]).reduce((e,t)=>e+t,0);t.push([n,r,i])}e.type===T.value.NUMERIC&&!e.isPercentage&&Object.assign(A.value,{[n]:_r(S.dataset.body.map(e=>Number(e.td[n])))})}),B.value.forEach((e,n)=>{t.map(t=>{let[n,r,i]=t;e.td[n]=e.td[r]/i}),e.td.forEach((t,r)=>{S.dataset.header[r].type===T.value.TEXT&&S.dataset.header[r].isSearch&&(e[r]=Er(t)),S.dataset.header[r].type===T.value.DATE&&(e[r]=new Date(t).getTime()),S.dataset.header[r].type===T.value.NUMERIC&&(e[r]=isNaN(Number(t))?r:t),Dn.value[n][r]=e[r]})}),e(!0)})}function Or(e,t){return new Promise((n,r)=>{e().then(e=>{try{n(t(e))}catch(e){r(e)}}).catch(e=>{r(e)})})}async function kr(e){k.value[e]={from:hr(e).from,to:hr(e).to},yn.value[e]=!1,await me(),Q()}function Ar(e,t,n){let r=n.currentTarget;clearTimeout(ln.value),r.classList.add(`clicked`),ln.value=setTimeout(()=>{r.classList.remove(`clicked`)},200),gn.value=void 0,t.rangeFilter&&(P.value[e].min=j.value[e].min,P.value[e].max=j.value[e].max),t.isMultiselect?(M.value[e]=$(e),t.type===T.value.TEXT&&(I.value[e]=void 0),t.isSearch&&(F.value[e]=``)):t.type===T.value.NUMERIC?I.value[e]=void 0:t.type===T.value.TEXT?(I.value[e]=void 0,F.value[e]=``):t.type===T.value.DATE&&(I.value[e]=void 0),Q()}function jr({td:e,rowIndex:t,colIndex:n,headerType:r,event:i}){if(r!==T.value.NUMERIC||isNaN(Number(e))){ur();return}E.value.col!==n&&ur();let a=i.currentTarget.parentNode;E.value.col=n,E.value.rows.map(e=>e.index).includes(t)?(a.dataset.selected=`false`,E.value.rows=E.value.rows.filter(e=>e.index!==t),i.currentTarget.classList.remove(mn.value.CELL),Array.from(a.children).forEach((e,t)=>{e.dataset.row===`even`?(e.style.background=q.value.even.backgroundColor,e.style.color=q.value.even.color):(e.style.background=q.value.odd.backgroundColor,e.style.color=q.value.odd.color)}),i.currentTarget.dataset.row===`even`?(i.currentTarget.style.background=q.value.even.backgroundColor,i.currentTarget.style.color=q.value.even.color):(i.currentTarget.style.background=q.value.odd.backgroundColor,i.currentTarget.style.color=q.value.odd.color)):(a.dataset.selected=`true`,E.value.rows.push({index:t,value:e}),Array.from(a.children).forEach((e,t)=>{e.dataset.row===`even`?(e.style.background=q.value.even.selectedNeighbors.backgroundColor,e.style.color=q.value.even.selectedNeighbors.color):(e.style.background=q.value.odd.selectedNeighbors.backgroundColor,e.style.color=q.value.odd.selectedNeighbors.color)}),i.currentTarget.dataset.row===`odd`?(i.currentTarget.style.background=q.value.odd.selectedCell.backgroundColor,i.currentTarget.style.color=q.value.odd.selectedCell.color):(i.currentTarget.style.background=q.value.even.selectedCell.backgroundColor,i.currentTarget.style.color=q.value.even.selectedCell.color)),E.value.rows=E.value.rows.sort((e,t)=>e.index-t.index),w.value.type===T.value.DONUT&&E.value.rows.length>0&&ar()}function Mr(e){E.value.col===e?(Sn.value=void 0,ur()):(Jn.value.forEach((t,n)=>{jr({td:t.td[e],rowIndex:n,colIndex:e,headerType:T.value.NUMERIC,event:{currentTarget:document.getElementById(`cell_${n}_${e}_${C}`)}})}),Sn.value=e)}async function Nr(e,t){M.value[t].includes(e)?M.value[t]=M.value[t].filter(t=>t!==e):M.value[t].push(e),await me(),Q()}function Pr(e){yn.value[e]=hr(e).from!==k.value[e].from||hr(e).to!==k.value[e].to}function Fr(e,t){gn.value=e;let n=t.currentTarget;clearTimeout(ln.value),n.classList.add(`clicked`),ln.value=setTimeout(()=>{n.classList.remove(`clicked`)},200),I.value[e]===1?I.value[e]=T.value.DESC:I.value[e]=T.value.ASC,pr()}function Ir(e,t,n){let r=n.currentTarget;clearTimeout(ln.value),r.classList.add(`clicked`),ln.value=setTimeout(()=>{r.classList.remove(`clicked`)},200);let i=document.getElementById(`th_dropdown_${e}`);i.dataset.isOpen===`false`?i.dataset.isOpen=`true`:i.dataset.isOpen=`false`}function Lr(e){ur(),!e||!e.target.value?D.value=0:D.value=Number(e.target.value),Sr()}function Rr(e){let t=document.activeElement;(t&&Array.from(t.classList).includes(`td-focusable`)&&e.key.includes(`Arrow`)||e.code===`Space`)&&e.preventDefault()}he(()=>{document.removeEventListener(`keydown`,Rr),zr(),clearTimeout(ln.value)});function zr(){document.removeEventListener(`mouseup`,zr),document.removeEventListener(`mousemove`,Vr)}let Br=v(null);function Vr(e){if(!sn.value&&Br.value){let t=Br.value.getBoundingClientRect();un.value=e.clientX-fn.value,dn.value=e.clientY-pn.value-40,un.value<0&&(un.value=0),un.value+t.width>window.innerWidth&&(un.value=window.innerWidth-t.width-48),dn.value<0&&(dn.value=0),dn.value+t.height>window.innerHeight&&(dn.value=window.innerHeight-t.height-24)}}ge(()=>{if(S.dataset.header.length===0)throw Error(`vue-ui-table error: missing header data.
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{$ as t,C as n,D as r,Ft as i,Ht as a,Jt as o,X as ee,d as te,in as s,nt as ne,r as re}from"./lib-BaWaqwnJ.js";import{t as ie}from"./useConfig-B-AzS3w-.js";import{n as ae,t as oe}from"./useHints-C-TwxM0Y.js";import{t as se}from"./vue-ui-xy-ZTbijg4Q.js";import{t as ce}from"./vue-ui-donut-BXlWXh2v.js";import{t as le}from"./BaseIcon-CQFjKDhE.js";import{t as c}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as l,computed as u,createBlock as ue,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createTextVNode as m,createVNode as de,defineAsyncComponent as fe,mergeProps as pe,nextTick as me,normalizeClass as h,normalizeStyle as g,onBeforeUnmount as he,onMounted as ge,openBlock as _,ref as v,renderList as y,toDisplayString as b,unref as x,useCssVars as _e,vModelSelect as ve,vModelText as ye,watch as be,withCtx as xe,withDirectives as Se,withKeys as Ce,withModifiers as we}from"vue";var Te=/* @__PURE__ */ e({default:()=>rn}),Ee=[`innerHTML`],De=[`data-is-open`],Oe={class:`vue-ui-table-export-hub-options`},ke={class:`label`},Ae=[`id`,`onClick`],je=[`innerHTML`],Me={class:`vue-ui-table-dialog-field`},Ne={class:`label vue-ui-table-dialog-input-label`,style:{width:`100%`}},Pe={style:{width:`fit-content`}},Fe={class:`vue-ui-table`},Ie={key:0},Le={key:0},Re={key:1},ze={key:0,style:{display:`flex`,"align-items":`center`,"justify-content":`flex-end`}},Be=[`innerHTML`],Ve={key:0,style:{"margin-left":`3px`}},He={key:0},Ue={class:`th-filter`},We={key:0,class:`th-date`},Ge={class:`date-wrapper--inputs`},Ke={class:`date-fieldset`},qe=[`for`],Je=[`id`,`onUpdate:modelValue`,`onInput`],Ye={class:`date-fieldset`},Xe=[`for`],Ze=[`id`,`onUpdate:modelValue`,`onInput`],Qe={class:`date-wrapper--button`},$e=[`onClick`],et=[`innerHTML`],tt=[`innerHTML`],nt=[`innerHTML`],rt=[`onClick`,`disabled`],it=[`placeholder`,`onUpdate:modelValue`,`name`],at=[`onClick`],ot=[`innerHTML`],st=[`innerHTML`],ct=[`innerHTML`],lt=[`onClick`,`innerHTML`],ut=[`innerHTML`],dt={key:5,class:`th-range-filter`},ft=[`for`],pt=[`id`,`max`,`min`,`onUpdate:modelValue`],mt=[`id`,`max`,`min`,`onUpdate:modelValue`],ht=[`for`],gt=[`onClick`,`disabled`],_t=[`id`],vt=[`onClick`],yt=[`onClick`,`onKeyup`],bt=[`innerHTML`,`onClick`,`onKeyup`],xt=[`data-row`],St=[`data-row`],Ct=[`data-row`,`onClick`,`onKeyup`,`id`],wt=[`innerHTML`],Tt={key:1},Et={key:2},Dt={key:5},Ot=[`innerHTML`],kt={key:0},At={style:{"margin-left":`12px`}},jt={class:`format-num`},Mt={key:0,class:`format-num`},Nt={key:1,class:`format-num`},Pt={key:2},Ft={key:1,class:`vue-ui-table-paginator format-num`},It={key:2,class:`vue-ui-table-size-warning`},Lt=[`innerHTML`],Rt={key:4,class:`vue-ui-table-pagination format-num`},zt=[`innerHTML`],Bt={for:`pageScroller`,style:{"font-size":`14px`}},Vt=[`max`,`value`],Ht={key:1},Ut=[`innerHTML`],Wt={class:`vue-ui-table-chart-modal-options`},Gt=[`innerHTML`],Kt=[`innerHTML`],qt=[`innerHTML`],Jt={style:{width:`100%`,height:`fit-content`}},Yt={class:`vue-ui-table-fieldset`},Xt={class:`vue-ui-table-fieldset-wrapper`},Zt=[`name`,`id`,`checked`,`onInput`],Qt=[`for`],$t=[`disabled`],en=[`innerHTML`],tn={style:{width:`100%`,"margin-bottom":`12px`}},nn={key:2,style:{width:`100%`,"margin-bottom":`32px`}},rn=/*#__PURE__*/ c({__name:`vue-ui-table`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`page-change`],setup(e,{expose:c,emit:Te}){_e(e=>({v1963bdc6:In.value,v65c97fa0:Ln.value,v5bb9dfbe:Vn.value,v1e9a6f90:Rn.value,v08a6a8ea:Hn.value,v438d66f0:Un.value,v4581052e:zn.value,c4e8e4bc:Bn.value,v2e03e998:Wn.value}));let rn=fe(()=>import(`./BaseDraggableDialog-MyWIeEtr.js`).then(e=>e.n)),S=e,an=Te,{vue_ui_table:on}=ie(),C=ee(),sn=v(null),cn=v(null),ln=v(null),w=v({height:316,type:`bar`,width:512}),T=v({ASC:1,BAR:`bar`,DATE:`date`,DESC:-1,DONUT:`donut`,LINE:`line`,NUMERIC:`numeric`,PERCENTAGE:`percentage`,TEXT:`text`}),un=v(100),dn=v(100),fn=v(0),pn=v(0);v(400),v(200);let mn=v({CELL:`smart-td-selected`,FIRST_TD:`smart-td-selected-first`,LAST_TD:`smart-td-selected-last`,ROW:`smart-td-selected-neighbor`}),hn=v(void 0),gn=v(void 0),E=v({col:void 0,rows:[]}),D=v(0),O=v(20),_n=v(!1),vn=v(!1),k=v({}),A=v({}),yn=v({}),j=v({}),M=v({}),N=v({}),P=v({}),F=v({}),I=v({}),bn=v(S.config.rowsPerPage?S.config.rowsPerPage:25),xn=v([.../* @__PURE__ */ new Set([10,25,50,100,250,500,S.config.rowsPerPage?S.config.rowsPerPage:25,S.dataset.body.length])].sort((e,t)=>e-t)),Sn=v(void 0),L=v(void 0),Cn=v(void 0),R=v(!1),wn=v(0),Tn=v(``),En=v(``),z=v(!1),B=v(JSON.parse(JSON.stringify(S.dataset.body)).map((e,t)=>({...e,absoluteIndex:t}))),Dn=v(JSON.parse(JSON.stringify(S.dataset.body)).map((e,t)=>({...e,absoluteIndex:t}))),V=v(JSON.parse(JSON.stringify(S.dataset.header)).map((e,t)=>({average:Object.hasOwn(e,`average`)?e.average:!1,decimals:Object.hasOwn(e,`decimals`)?e.decimals:0,isMultiselect:Object.hasOwn(e,`isMultiselect`)?e.isMultiselect:!1,isPercentage:Object.hasOwn(e,`isPercentage`)?e.isPercentage:!1,isSearch:Object.hasOwn(e,`isSearch`)?e.isSearch:!1,isSort:Object.hasOwn(e,`isSort`)?e.isSort:!1,name:e.name,percentageTo:Object.hasOwn(e,`percentageTo`)?e.percentageTo:void 0,prefix:Object.hasOwn(e,`prefix`)?e.prefix:``,rangeFilter:Object.hasOwn(e,`rangeFilter`)?e.rangeFilter:!1,suffix:Object.hasOwn(e,`suffix`)?e.suffix:``,sum:Object.hasOwn(e,`sum`)?e.sum:!1,type:e.type,index:t}))),On=u(()=>`background:${G.value.backgroundColor};color:${G.value.color};outline:${G.value.outline}`);function kn(e){return{disabled:e,style:`cursor:${Y.value?`pointer`:`default`};background:${Pn.value.buttons.backgroundColor};color:${Pn.value.buttons.color};opacity:${e?Pn.value.buttons.opacityDisabled:1}`}}function An(e,n){return t({p:n.prefix,v:Number(e),s:n.suffix,r:n.decimals})}let jn=u(()=>cn.value?cn.value.getBoundingClientRect().height+3:3),H=u(()=>{if(!Object.keys(S.config||{}).length)return on;let e=s({defaultConfig:on,userConfig:S.config});return n(e)}),U=u(()=>H.value.style.exportMenu),W=u(()=>H.value.style.title),G=u(()=>H.value.style.th),K=u(()=>H.value.style.inputs),Mn=u(()=>H.value.style.dropdowns),Nn=u(()=>H.value.style.closeButtons),q=u(()=>H.value.style.rows),Pn=u(()=>H.value.style.pagination),J=u(()=>H.value.style.chart),Fn=u(()=>H.value.style);ae({config:()=>H.value,dataset:()=>S.dataset,component:`VueUiTable`,rules:[oe.noHint]});let Y=u(()=>H.value.useCursorPointer),In=u(()=>G.value.buttons.cancel.inactive.backgroundColor),Ln=u(()=>G.value.buttons.cancel.inactive.color),Rn=u(()=>G.value.buttons.cancel.active.backgroundColor),zn=u(()=>G.value.buttons.filter.active.backgroundColor),Bn=u(()=>G.value.buttons.filter.active.color),Vn=u(()=>i(Rn.value,.33)),Hn=u(()=>o(Rn.value,33)),Un=u(()=>i(zn.value,.33)),Wn=u(()=>o(zn,33)),Gn=u(()=>[...V.value].filter(e=>e.type===T.value.DATE)),Kn=u(()=>[``,...Gn.value.map(e=>e.name)]),qn=u(()=>{let e=Gn.value.find(e=>e.name===Tn.value);return e?e.index:null}),X=u(()=>{let e=[];if(B.value.length)for(let t=0;t<B.value.length;t+=bn.value)e.push(B.value.slice(t,t+bn.value));return e}),Jn=u(()=>X.value[D.value]),Yn=u(()=>qn.value==null?[]:Jn.value.map(e=>e.td[qn.value])),Xn=u(()=>Object.keys(M.value).map(e=>({index:e,name:S.dataset.header[e].name,options:M.value[e]}))),Zn=u(()=>H.value.useChart&&E.value.rows.length>1),Qn=u(()=>S.dataset.header.map(e=>e.type).includes(T.value.NUMERIC)),Z=u(()=>({arrowSort:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 9l4 -4l4 4m-4 -4v14" /><path d="M21 15l-4 4l-4 -4m4 4v-14" /></svg>`,bar:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 12m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M9 8m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M15 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M4 20l14 0" /></svg>`,chart:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 19l16 0" /><path d="M4 15l4 -6l4 2l4 -5l4 4" /></svg>`,chevronDown:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 9l6 6l6 -6" /></svg>`,chevronLeft:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value*1.6}" height="${O.value*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 6l-6 6l6 6" /></svg>`,chevronRight:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value*1.6}" height="${O.value*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 6l6 6l-6 6" /></svg>`,donut:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value*.8}" height="${O.value*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 3v5m4 4h5" /><path d="M8.929 14.582l-3.429 2.918" /><path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" /><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /></svg>`,export:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5" /><path d="M3 10h18" /><path d="M10 3v18" /><path d="M16 19h6" /><path d="M19 16l3 3l-3 3" /></svg>`,fileDownload:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 3v4a1 1 0 0 0 1 1h4" /><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /><path d="M12 17v-6" /><path d="M9.5 14.5l2.5 2.5l2.5 -2.5" /></svg>`,filter:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" /></svg>`,move:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 9l3 3l-3 3" /><path d="M15 12h6" /><path d="M6 9l-3 3l3 3" /><path d="M3 12h6" /><path d="M9 18l3 3l3 -3" /><path d="M12 15v6" /><path d="M15 6l-3 -3l-3 3" /><path d="M12 3v6" /></svg>`,sort09:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 3a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 16m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 16v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sort90:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 14a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 5v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sortAZ:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 10v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 21h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sortZA:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 21v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 10h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sum:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>`,table:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" fill="white" d="M 10 2, 21 2, 21 21, 10 21Z"/><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" /><path d="M3 10h18" /><path d="M10 3v18" /></svg>`,warning:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value*.8}" height="${O.value*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`,grip:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M5 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M5 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M19 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M19 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /></svg>`})),$n=u(()=>B.value.map(e=>e.td)),er=u(()=>S.dataset.header[E.value.col]),tr=u(()=>{let e=E.value.rows.map(e=>e.value).reduce((e,t)=>e+t,0),t=e/E.value.rows.length,n=e=>Number(e.toFixed(er.value.decimals)).toLocaleString();return{sumPercentage:n(e*100),sumRegular:n(e),averagePercentage:n(t*100),averageRegular:n(t)}}),nr=v({width:1e3,height:500});function rr({width:e,height:t}){nr.value={width:e,height:t}}let ir=u(()=>{if(!Zn.value)return[];let e=er.value,t={pdf:!1,csv:!1,table:!1,annotator:!1},n=nr.value.height,r=nr.value.width,a=r/E.value.rows.length,o=Math.max(...E.value.rows.map(e=>e.value)),ee=Math.min(...E.value.rows.map(e=>e.value)),s=e.isPercentage&&e.percentageTo,ne=w.value.type===T.value.DONUT&&L.value&&L.value.name,ie=e.name+(s?` / ${S.dataset.header[N.value[E.value.col].referenceIndex].name}`:``)+(ne?` ${H.value.translations.by} ${L.value.name}`:``),ae=e.prefix,oe=e.suffix,se=e=>[{name:ie,series:E.value.rows.map(e=>e.value),type:e,useProgression:!0,...e===`line`?{smooth:J.value.layout.line.smooth,color:J.value.layout.line.stroke,useArea:J.value.layout.line.useArea}:{color:J.value.layout.bar.fill}}],ce=se(`line`),le=se(`bar`),c=J.value.modal.backgroundColor,l=re(c),u=e.decimals,ue={useCssAnimation:!1,chart:{width:r,height:n-250,backgroundColor:c,color:l,labels:{fontSize:18,prefix:ae,suffix:oe},grid:{stroke:i(l,.5),labels:{color:l,xAxisLabels:{color:l,show:Yn.value.length,values:Yn.value,datetimeFormatter:J.value.layout.datetimeFormatter,showOnlyAtModulo:J.value.layout.timeLabels.showOnlyAtModulo,modulo:J.value.layout.timeLabels.modulo}}},highlighter:{color:l},legend:{color:l,show:!1},title:{text:ie,color:l,textAlign:`center`,fontSize:18},tooltip:{showTimeLabel:Yn.value.length,backgroundOpacity:30,color:l,backgroundColor:c,showPercentage:!1,roundingValue:u},userOptions:{buttons:{...t}},zoom:{show:J.value.layout.zoom.show,autoFit:J.value.layout.zoom.autoFit,focusOnDrag:!0,minimap:{show:!0}}},line:{labels:{show:!0,color:l,rounding:u},dot:{useSerieColor:!1,fill:J.value.layout.line.plot.fill,strokeWidth:J.value.layout.line.plot.strokeWidth}},bar:{useGradient:!1,border:{useSerieColor:!1,stroke:J.value.layout.bar.stroke,strokeWidth:J.value.layout.bar.strokeWidth},labels:{show:!0,color:l,rounding:u}}},d=ee>=0?0:Math.abs(ee),f=o+d,p=e.isPercentage,m=E.value.rows.map((t,r)=>({x:a*r+a/2,y:(1-(t.value+d)/f)*n,value:p?t.value*100:t.value,suffix:p?`%`:e.suffix?e.suffix:``,prefix:e.prefix?e.prefix:``,index:t.index,absoluteValue:p?Math.abs(t.value)*100:Math.abs(t.value)}));return{donutConfig:{useCssAnimation:!1,userOptions:{position:`left`,buttons:{...t}},style:{chart:{backgroundColor:c,color:l,layout:{curvedMarkers:!0,donut:{strokeWidth:64},labels:{dataLabels:{suffix:p?`%`:``,prefix:ae},value:{rounding:u},percentage:{color:l,rounding:u},name:{color:l},hollow:{average:{color:l,text:H.value.translations.average,value:{color:l}},total:{color:l,offsetY:-12,text:H.value.translations.total,value:{color:l,offsetY:-12}}}}},legend:{backgroundColor:c,color:l,roundingValue:u,roundingPercentage:u},padding:{left:12,right:12},title:{text:ie,color:l,fontSize:18},tooltip:{backgroundOpacity:30,color:l,backgroundColor:c,roundingValue:u,roundingValue:u}}}},xyConfig:ue,xyDatasetLine:ce,xyDatasetBar:le,progression:m.length>=2&&te(m)}});function ar(){let e=L.value.options.map((e,t)=>({name:e,color:a[t]||a[t%a.length],values:[Jn.value.filter((t,n)=>t.td[L.value.index]===e&&E.value.rows.map(e=>e.index).includes(n)).map(e=>e.td[E.value.col]).reduce((e,t)=>Math.abs(e)+Math.abs(t),0)],absoluteValue:Jn.value.filter((t,n)=>t.td[L.value.index]===e&&E.value.rows.map(e=>e.index).includes(n)).map(e=>e.td[E.value.col]).reduce((e,t)=>e+t,0)})).sort((e,t)=>t.value-e.value);hn.value=e,me(()=>{w.value.type=T.value.DONUT,z.value=!1})}function or(e,t){return!A.value[e]&&(t.isSort||t.isSearch||t.isMultiselect||t.rangeFilter)&&![T.value.DATE].includes(t.type)}function sr(e=`all`){let t=S.dataset.header.map(e=>e.name),n=e===`all`?B.value.map(e=>e.td):Jn.value.map(e=>e.td),i=[t].concat(n),a=r(i);ne({csvContent:a,title:En.value})}function cr(){let e=document.getElementsByClassName(`th-dropdown`);e.length&&Array.from(e).forEach(e=>{e.dataset.isOpen=!1})}function lr(e,t){let n;clearTimeout(n),n=setTimeout(e,t)}function ur(){let e=document.getElementsByClassName(`tr_${C}`);Array.from(e).forEach(e=>{Array.from(e.getElementsByTagName(`td`)).forEach(e=>{e.dataset.row===`even`?(e.style.background=q.value.even.backgroundColor,e.style.color=q.value.even.color):(e.style.background=q.value.odd.backgroundColor,e.style.color=q.value.odd.color)})}),Array.from(e).forEach(e=>e.dataset.selected=`false`),D.value>X.value.length-1&&(D.value=X.value.length-1),R.value=!1,hn.value=void 0,Sn.value=void 0,w.value.type=T.value.BAR,E.value={col:void 0,rows:[]},un.value=100,dn.value=100}function dr(e,t){B.value=e.filter(e=>e.td[t]>=P.value[t].min&&e[t]<=P.value[t].max)}function fr(e,t){if(I.value[t]===T.value.ASC&&(e=e.sort((e,n)=>e[t]-n[t])),I.value[t]===T.value.DESC)e=e.sort((e,n)=>n[t]-e[t]);else return 0}function pr(){ur(),Object.keys(P.value).forEach(e=>{dr(B.value,e)}),Object.keys(I.value).forEach(e=>{fr(B.value,e)}),gn.value!==void 0&&fr(B.value,gn.value),S.dataset.header.forEach((e,t)=>{if(e.isPercentage){let e=N.value[t].referenceIndex,n=B.value.map(t=>t.td[e]).reduce((e,t)=>e+t,0);B.value.forEach(r=>{r.td[t]=r.td[e]/n})}}),D.value>X.value.length-1&&(D.value=X.value.length-1),[-1].includes(D.value)&&(D.value=0)}function Q(){B.value=Dn.value.filter(e=>{for(let t in F.value)if(!e.td[t].toUpperCase().includes(F.value[t].toUpperCase()))return!1;for(let t in M.value)if(!M.value[t].some(n=>n===e.td[t]))return!1;for(let t in k.value){let n=new Date(e.td[t]),r=new Date(k.value[t].from),i=new Date(k.value[t].to);if(n<r||n>i)return!1}return!0}),pr()}function mr(e){return gr(e)/B.value.length}function hr(e){let t=S.dataset.body.map(t=>new Date(t.td[e])),n=new Date(Math.min(...t)),r=new Date(Math.max(...t)),i=n.getFullYear(),a=r.getFullYear(),o=String(n.getMonth()+1).padStart(2,`0`),ee=String(r.getMonth()+1).padStart(2,`0`),te=String(n.getDate()).padStart(2,`0`),s=String(r.getDate()).padStart(2,`0`);return{from:`${i}-${o}-${te}`,to:`${a}-${ee}-${s}`}}function $(e){return[...new Set(S.dataset.body.map(t=>t.td[e]))]}function gr(e){return $n.value.map(t=>t[e]).map(e=>isNaN(Number(e))?0:e).reduce((e,t)=>e+t,0)}function _r(e){return e.includes(NaN)}function vr(e,t){return!M.value[t]||M.value[t].includes(e)}function yr(e){return!isNaN(Number(String(e).replaceAll(`%`,``)))}function br(e,t){let n=t.isSort,r=t.isSearch,i=t.isMultiselect&&M.value[e],a=t.rangeFilter,o=e=>{if(a&&P.value[e])return Math.round(P.value[e].min)===j.value[e].min&&Math.round(P.value[e].max)===j.value[e].max};if(n&&r&&i&&a)return[``,void 0].includes(F.value[e])&&[void 0].includes(I.value[e])&&M.value[e].length===$(e).length&&o(e);if(n&&r&&i)return[``,void 0].includes(F.value[e])&&[void 0].includes(I.value[e])&&M.value[e].length===$(e).length;if(n&&r&&a)return[``,void 0].includes(F.value[e])&&[void 0].includes(I.value[e])&&o(e);if(n&&r)return[``,void 0].includes(F.value[e])&&[void 0].includes(I.value[e]);if(n&&i&&a)return[void 0].includes(I.value[e])&&M.value[e].length===$(e).length&&o(e);if(n&&i)return[void 0].includes(I.value[e])&&M.value[e].length===$(e).length;if(r&&i&&a)return[``,void 0].includes(F.value[e])&&M.value[e].length===$(e).length&&o(e);if(r&&i)return[``,void 0].includes(F.value[e])&&M.value[e].length===$(e).length;if(r&&a)return[``,void 0].includes(F.value[e])&&o(e);if(r)return[``,void 0].includes(F.value[e]);if(n&&a)return[void 0].includes(I.value[e])&&o(e);if(n)return[void 0].includes(I.value[e]);if(i&&a)return M.value[e].length===$(e).length&&o(e);if(i)return M.value[e].length===$(e).length}function xr(){return{totalPages:X.value.length,itemsPerPage:bn.value,currentPage:D.value,currentPageData:Jn.value.map(e=>e.td)}}c({getCurrentPageData:xr});function Sr(){an(`page-change`,xr())}let Cr=v(null);function wr(e){if(ur(),e===`next`&&D.value<X.value.length){if(D.value+1>X.value.length-1)return;D.value+=1}else if(e===`previous`&&D.value>=1)--D.value;else{if(e-1<0||e>X.value.length||e===`previous`)return;D.value=e-1}Sr(),Cr.value&&Cr.value.scrollTo({top:0,left:0,behavior:`smooth`})}function Tr(e){e.preventDefault();let t=e.keyCode;if(![38,40,37,39].includes(t))return;let n=e.target.id.match(/cell_(\d+)_(\d+)_([0-9a-fA-F-]{36})/),r=parseInt(n[1]),i=parseInt(n[2]),a=document.getElementById(`cell_${r}_${i+1}_${C}`),o=document.getElementById(`cell_${r}_${i-1}_${C}`),ee=document.getElementById(`cell_${r+1}_${i}_${C}`),te=document.getElementById(`cell_${r-1}_${i}_${C}`),s;switch(!0){case t===39:s=a;break;case t===37:s=o;break;case t===38:s=te;break;case t===40:s=ee;break;default:return}s&&(s.focus(),s.scrollIntoView({behavior:`smooth`,block:`center`}))}function Er(e){let t=0;for(let n=0;n<e.length;n+=1)t+=e.charCodeAt(n);return t}async function Dr(){return new Promise(e=>{let t=[];V.value.forEach((e,n)=>{if(e.isSearch&&Object.assign(F.value,{[n]:``}),e.isMultiselect&&Object.assign(M.value,{[n]:$(n)}),e.type===T.value.DATE&&(Object.assign(k.value,{[n]:hr(n)}),Object.assign(yn.value,{[n]:!1})),(e.isPercentage||e.percentageTo)&&Object.assign(N.value,{[n]:{reference:e.percentageTo,referenceIndex:S.dataset.header.map(e=>e.name).indexOf(e.percentageTo)}}),e.rangeFilter&&(Object.assign(P.value,{[n]:{min:Math.round(Math.min(...S.dataset.body.map(e=>e.td).map(e=>e[n]))),max:Math.round(Math.max(...S.dataset.body.map(e=>e.td).map(e=>e[n])))}}),Object.assign(j.value,{[n]:{min:Math.round(Math.min(...S.dataset.body.map(e=>e.td).map(e=>e[n]))),max:Math.round(Math.max(...S.dataset.body.map(e=>e.td).map(e=>e[n])))}})),e.isPercentage){let r=S.dataset.header.map(e=>e.name).indexOf(e.percentageTo),i=S.dataset.body.map(e=>e.td[r]).reduce((e,t)=>e+t,0);t.push([n,r,i])}e.type===T.value.NUMERIC&&!e.isPercentage&&Object.assign(A.value,{[n]:_r(S.dataset.body.map(e=>Number(e.td[n])))})}),B.value.forEach((e,n)=>{t.map(t=>{let[n,r,i]=t;e.td[n]=e.td[r]/i}),e.td.forEach((t,r)=>{S.dataset.header[r].type===T.value.TEXT&&S.dataset.header[r].isSearch&&(e[r]=Er(t)),S.dataset.header[r].type===T.value.DATE&&(e[r]=new Date(t).getTime()),S.dataset.header[r].type===T.value.NUMERIC&&(e[r]=isNaN(Number(t))?r:t),Dn.value[n][r]=e[r]})}),e(!0)})}function Or(e,t){return new Promise((n,r)=>{e().then(e=>{try{n(t(e))}catch(e){r(e)}}).catch(e=>{r(e)})})}async function kr(e){k.value[e]={from:hr(e).from,to:hr(e).to},yn.value[e]=!1,await me(),Q()}function Ar(e,t,n){let r=n.currentTarget;clearTimeout(ln.value),r.classList.add(`clicked`),ln.value=setTimeout(()=>{r.classList.remove(`clicked`)},200),gn.value=void 0,t.rangeFilter&&(P.value[e].min=j.value[e].min,P.value[e].max=j.value[e].max),t.isMultiselect?(M.value[e]=$(e),t.type===T.value.TEXT&&(I.value[e]=void 0),t.isSearch&&(F.value[e]=``)):t.type===T.value.NUMERIC?I.value[e]=void 0:t.type===T.value.TEXT?(I.value[e]=void 0,F.value[e]=``):t.type===T.value.DATE&&(I.value[e]=void 0),Q()}function jr({td:e,rowIndex:t,colIndex:n,headerType:r,event:i}){if(r!==T.value.NUMERIC||isNaN(Number(e))){ur();return}E.value.col!==n&&ur();let a=i.currentTarget.parentNode;E.value.col=n,E.value.rows.map(e=>e.index).includes(t)?(a.dataset.selected=`false`,E.value.rows=E.value.rows.filter(e=>e.index!==t),i.currentTarget.classList.remove(mn.value.CELL),Array.from(a.children).forEach((e,t)=>{e.dataset.row===`even`?(e.style.background=q.value.even.backgroundColor,e.style.color=q.value.even.color):(e.style.background=q.value.odd.backgroundColor,e.style.color=q.value.odd.color)}),i.currentTarget.dataset.row===`even`?(i.currentTarget.style.background=q.value.even.backgroundColor,i.currentTarget.style.color=q.value.even.color):(i.currentTarget.style.background=q.value.odd.backgroundColor,i.currentTarget.style.color=q.value.odd.color)):(a.dataset.selected=`true`,E.value.rows.push({index:t,value:e}),Array.from(a.children).forEach((e,t)=>{e.dataset.row===`even`?(e.style.background=q.value.even.selectedNeighbors.backgroundColor,e.style.color=q.value.even.selectedNeighbors.color):(e.style.background=q.value.odd.selectedNeighbors.backgroundColor,e.style.color=q.value.odd.selectedNeighbors.color)}),i.currentTarget.dataset.row===`odd`?(i.currentTarget.style.background=q.value.odd.selectedCell.backgroundColor,i.currentTarget.style.color=q.value.odd.selectedCell.color):(i.currentTarget.style.background=q.value.even.selectedCell.backgroundColor,i.currentTarget.style.color=q.value.even.selectedCell.color)),E.value.rows=E.value.rows.sort((e,t)=>e.index-t.index),w.value.type===T.value.DONUT&&E.value.rows.length>0&&ar()}function Mr(e){E.value.col===e?(Sn.value=void 0,ur()):(Jn.value.forEach((t,n)=>{jr({td:t.td[e],rowIndex:n,colIndex:e,headerType:T.value.NUMERIC,event:{currentTarget:document.getElementById(`cell_${n}_${e}_${C}`)}})}),Sn.value=e)}async function Nr(e,t){M.value[t].includes(e)?M.value[t]=M.value[t].filter(t=>t!==e):M.value[t].push(e),await me(),Q()}function Pr(e){yn.value[e]=hr(e).from!==k.value[e].from||hr(e).to!==k.value[e].to}function Fr(e,t){gn.value=e;let n=t.currentTarget;clearTimeout(ln.value),n.classList.add(`clicked`),ln.value=setTimeout(()=>{n.classList.remove(`clicked`)},200),I.value[e]===1?I.value[e]=T.value.DESC:I.value[e]=T.value.ASC,pr()}function Ir(e,t,n){let r=n.currentTarget;clearTimeout(ln.value),r.classList.add(`clicked`),ln.value=setTimeout(()=>{r.classList.remove(`clicked`)},200);let i=document.getElementById(`th_dropdown_${e}`);i.dataset.isOpen===`false`?i.dataset.isOpen=`true`:i.dataset.isOpen=`false`}function Lr(e){ur(),!e||!e.target.value?D.value=0:D.value=Number(e.target.value),Sr()}function Rr(e){let t=document.activeElement;(t&&Array.from(t.classList).includes(`td-focusable`)&&e.key.includes(`Arrow`)||e.code===`Space`)&&e.preventDefault()}he(()=>{document.removeEventListener(`keydown`,Rr),zr(),clearTimeout(ln.value)});function zr(){document.removeEventListener(`mouseup`,zr),document.removeEventListener(`mousemove`,Vr)}let Br=v(null);function Vr(e){if(!sn.value&&Br.value){let t=Br.value.getBoundingClientRect();un.value=e.clientX-fn.value,dn.value=e.clientY-pn.value-40,un.value<0&&(un.value=0),un.value+t.width>window.innerWidth&&(un.value=window.innerWidth-t.width-48),dn.value<0&&(dn.value=0),dn.value+t.height>window.innerHeight&&(dn.value=window.innerHeight-t.height-24)}}ge(()=>{if(S.dataset.header.length===0)throw Error(`vue-ui-table error: missing header data.
2
2
  Provide an array of objects of type:
3
3
  {
4
4
  name: string;
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{t as i}from"./resolveChartConfig-0IvbmIE_.js";import{D as ee,Tt as te,X as a,at as ne,m as re,nt as ie,r as ae,zt as oe}from"./lib-rPeBMZrn.js";import{n as se,t as ce}from"./useHints-C-TwxM0Y.js";import{t as le}from"./useConfig-B8qvYKdK.js";import{t as ue}from"./usePrinter-DVf3YcG5.js";import{t as de}from"./useUserOptionState-CXlFnwPv.js";import{t as fe}from"./vue_ui_table_heatmap-BtRnWTud.js";import{t as pe}from"./Shape-CRe8woTu.js";import{t as o}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as s,computed as c,createBlock as me,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as he,createVNode as ge,defineAsyncComponent as _e,guardReactiveProps as ve,mergeProps as f,nextTick as p,normalizeClass as m,normalizeProps as ye,normalizeStyle as h,onBeforeUnmount as be,onMounted as g,openBlock as _,ref as v,renderList as y,renderSlot as b,unref as x,useCssVars as xe,useSlots as Se,watch as Ce,withCtx as S}from"vue";var C=/* @__PURE__ */ e({default:()=>M}),w=[`id`],T={role:`cell`},E={role:`row`},D=[`data-cell`],O={key:0,style:{display:`flex`,"flex-direction":`row`,gap:`2px`,"align-items":`center`}},k=[`height`,`width`],A={key:0,role:`cell`,"data-cell":`sum`},we={key:1,role:`cell`,"data-cell":`average`},j={key:2,role:`cell`,"data-cell":`median`},Te={key:1,ref:`source`,dir:`auto`},M=/*#__PURE__*/ o({__name:`vue-ui-table-heatmap`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(e,{expose:o}){xe(e=>({v456a187f:Ne.value,c373804c:Me.value}));let C=_e(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),{vue_ui_table_heatmap:M}=le(),N=e,P=v(a()),F=v(!1),I=v(null),L=null,R=!1;be(()=>{R=!0,L?.disconnect(),L=null});let z=v(!1),B=v(0),Ee=Se(),V=c({get:()=>K(),set:e=>e}),H=c(()=>V.value.debug);g(()=>{Ee[`chart-background`]&&H.value&&console.warn(`VueUiTableHeatmap does not support the #chart-background slot.`)}),se({config:()=>V.value,dataset:()=>N.dataset,component:`VueUiTableHeatmap`,rules:[ce.emptyArray,{test:e=>e.length>31,message:[`👀 The number of series is > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display.`]},{test:e=>e.some(e=>e?.values&&e?.values.length>31),message:[`👀 Some series have a number of data points > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of data points to display.`]}]});let{userOptionsVisible:U,setUserOptionsVisibility:W,keepUserOptionState:G}=de({config:V.value});function K(){return i(N.config,M,fe)}Ce(()=>N.config,e=>{V.value=K(),U.value=!V.value.userOptions.showOnChartHover,Y()},{deep:!0});let{isPrinting:De,isImaging:Oe,generatePdf:q,generateImage:J}=ue({elementId:`table_heatmap_${P.value}`,fileName:`vue-ui-table-heatmap`,options:V.value.userOptions.print}),ke=c(()=>V.value.table.responsiveBreakpoint),Ae=c(()=>!!N.dataset&&N.dataset.length);g(()=>{Y()});function Y(){if(oe(N.dataset)&&ne({componentName:`VueUiTableHeatmap`,type:`dataset`,debug:H.value}),L?.disconnect(),L=null,R||!I.value)return;let e=new ResizeObserver(t=>{R||L!==e||t.forEach(e=>{F.value=e.contentRect.width<ke.value})});L=e,e.observe(I.value)}let X=c(()=>N.dataset.map(e=>{let t=e.values.map(e=>isNaN(e)?0:e),n=t.reduce((e,t)=>e+t,0);return{...e,values:t,serieExtremes:{max:Math.max(...t),min:Math.min(...t)},sum:n,average:n/t.length,median:re(t),displayValues:[e.name,...e.values],id:a()}})),Z=c(()=>{let e=X.value.flatMap(e=>e.values);return{min:Math.min(...e),max:Math.max(...e)}});function je(e,t){let n=V.value.style.heatmapColors.useIndividualScale;return te(V.value.style.heatmapColors.min,V.value.style.heatmapColors.max,n?t.min:Z.value.min,n?t.max:Z.value.max,e)}let Q=c(()=>X.value.map(e=>({...e,colors:e.displayValues.map(t=>isNaN(t)?V.value.style.backgroundColor:je(t,e.serieExtremes))}))),Me=c(()=>V.value.style.backgroundColor),Ne=c(()=>`${V.value.table.borderWidth}px`);function $(e=null){p(()=>{let t=Q.value.map(e=>[[e.name],e.displayValues,[e.sum],[e.average],[e.median]]),n=[[[``],V.value.table.head.values,[`sum`],[`average`],[`median`]]].concat(t),r=ee(n);e?e(r):ie({csvContent:r,title:`vue-ui-table-heatmap`})})}function Pe(e){z.value=e,B.value+=1}return o({generatePdf:q,generateCsv:$,generateImage:J}),(e,i)=>(_(),u(`div`,{ref_key:`tableContainer`,ref:I,style:h(`width:100%; overflow-x:auto; container-type: inline-size;padding-top:${V.value.userOptions.show?`36px`:``}; ${z.value?`vue-data-ui-wrapper-fullscreen`:``}; position:relative;`),class:m({"vue-data-ui-component":!0,"vue-ui-responsive":F.value}),id:`table_heatmap_${P.value}`,onMouseenter:i[0]||=()=>x(W)(!0),onMouseleave:i[1]||=()=>x(W)(!1)},[V.value.userOptions.show&&Ae.value&&(x(G)||x(U))?(_(),me(x(C),f({ref:`details`,key:`user_option_${B.value}`,backgroundColor:V.value.style.backgroundColor,color:V.value.style.color,isPrinting:x(De),isImaging:x(Oe),uid:P.value,isFullscreen:z.value,chartElement:I.value},x(n)(V.value.userOptions,`pdf csv img fullscreen`),{onToggleFullscreen:Pe,onGeneratePdf:x(q),onGenerateCsv:$,onGenerateImage:x(J),style:{visibility:x(G)?x(U)?`visible`:`hidden`:`visible`}}),he({_:2},[y(x(t)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionFullscreen custom-menu-before custom-menu-after`),t=>({name:t,fn:S(n=>[b(e.$slots,t,ye(ve(x(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`onGeneratePdf`,`onGenerateImage`,`style`])):l(``,!0),d(`table`,{class:m({"vue-ui-table-heatmap":!0}),style:h(`width:100%;font-family:${V.value.style.fontFamily};background:${V.value.style.backgroundColor};`)},[d(`caption`,null,[b(e.$slots,`caption`,{},void 0,!0)]),d(`thead`,null,[d(`tr`,{role:`row`,style:h(`background:${V.value.table.head.backgroundColor};color:${V.value.table.head.color}`)},[(_(!0),u(s,null,y(V.value.table.head.values,(t,n)=>(_(),u(`th`,T,[b(e.$slots,`head`,f({ref_for:!0},{value:t,rowIndex:n,type:typeof t,isResponsive:F.value}),void 0,!0)]))),256))],4)]),d(`tbody`,null,[(_(!0),u(s,null,y(Q.value,(t,n)=>(_(),u(`tr`,E,[(_(!0),u(s,null,y(t.displayValues,(r,i)=>(_(),u(`td`,{role:`cell`,"data-cell":V.value.table.head.values[i]},[t.color&&i===0?(_(),u(`div`,O,[t.color?(_(),u(`svg`,{key:0,height:V.value.style.shapeSize,width:V.value.style.shapeSize,viewBox:`0 0 20 20`,style:{background:`none`,overflow:`visible`}},[ge(pe,{plot:{x:10,y:10},color:t.color,radius:9,shape:t.shape||`circle`},null,8,[`color`,`shape`])],8,k)):l(``,!0),b(e.$slots,`rowTitle`,f({ref_for:!0},{value:r,rowIndex:n,colIndex:i,type:typeof r,isResponsive:F.value}),void 0,!0)])):(_(),u(s,{key:1},[i===0?b(e.$slots,`rowTitle`,f({ref_for:!0},{value:r,rowIndex:n,colIndex:i,type:typeof r,isResponsive:F.value}),void 0,!0,0):l(``,!0),i>0?b(e.$slots,`cell`,f({ref_for:!0},{value:r,rowIndex:n,colIndex:i,type:typeof r,isResponsive:F.value,color:t.colors[i],textColor:x(ae)(t.colors[i])}),void 0,!0,1):l(``,!0)],64))],8,D))),256)),V.value.table.showSum?(_(),u(`td`,A,[b(e.$slots,`sum`,f({ref_for:!0},{value:t.sum,rowIndex:n,isResponsive:F.value}),void 0,!0)])):l(``,!0),V.value.table.showAverage?(_(),u(`td`,we,[b(e.$slots,`average`,f({ref_for:!0},{value:t.average,rowIndex:n,isResponsive:F.value}),void 0,!0)])):l(``,!0),V.value.table.showMedian?(_(),u(`td`,j,[b(e.$slots,`median`,f({ref_for:!0},{value:t.median,rowIndex:n,isResponsive:F.value}),void 0,!0)])):l(``,!0)]))),256))])],4),e.$slots.source?(_(),u(`div`,Te,[b(e.$slots,`source`,{},void 0,!0)],512)):l(``,!0)],46,w))}},[[`__scopeId`,`data-v-b22ddf12`]]);export{C as n,M as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{t as i}from"./resolveChartConfig-QgMumfgd.js";import{D as ee,Tt as te,X as a,at as ne,m as re,nt as ie,r as ae,zt as oe}from"./lib-BaWaqwnJ.js";import{n as se,t as ce}from"./useHints-C-TwxM0Y.js";import{t as le}from"./useConfig-B-AzS3w-.js";import{t as ue}from"./usePrinter-CUD8gosC.js";import{t as de}from"./useUserOptionState-CXlFnwPv.js";import{t as fe}from"./vue_ui_table_heatmap-BtRnWTud.js";import{t as pe}from"./Shape-DgpYvQc4.js";import{t as o}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as s,computed as c,createBlock as me,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as he,createVNode as ge,defineAsyncComponent as _e,guardReactiveProps as ve,mergeProps as f,nextTick as p,normalizeClass as m,normalizeProps as ye,normalizeStyle as h,onBeforeUnmount as be,onMounted as g,openBlock as _,ref as v,renderList as y,renderSlot as b,unref as x,useCssVars as xe,useSlots as Se,watch as Ce,withCtx as S}from"vue";var C=/* @__PURE__ */ e({default:()=>M}),w=[`id`],T={role:`cell`},E={role:`row`},D=[`data-cell`],O={key:0,style:{display:`flex`,"flex-direction":`row`,gap:`2px`,"align-items":`center`}},k=[`height`,`width`],A={key:0,role:`cell`,"data-cell":`sum`},we={key:1,role:`cell`,"data-cell":`average`},j={key:2,role:`cell`,"data-cell":`median`},Te={key:1,ref:`source`,dir:`auto`},M=/*#__PURE__*/ o({__name:`vue-ui-table-heatmap`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(e,{expose:o}){xe(e=>({v456a187f:Ne.value,c373804c:Me.value}));let C=_e(()=>import(`./UserOptions-B97cPcKc.js`).then(e=>e.n)),{vue_ui_table_heatmap:M}=le(),N=e,P=v(a()),F=v(!1),I=v(null),L=null,R=!1;be(()=>{R=!0,L?.disconnect(),L=null});let z=v(!1),B=v(0),Ee=Se(),V=c({get:()=>K(),set:e=>e}),H=c(()=>V.value.debug);g(()=>{Ee[`chart-background`]&&H.value&&console.warn(`VueUiTableHeatmap does not support the #chart-background slot.`)}),se({config:()=>V.value,dataset:()=>N.dataset,component:`VueUiTableHeatmap`,rules:[ce.emptyArray,{test:e=>e.length>31,message:[`👀 The number of series is > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display.`]},{test:e=>e.some(e=>e?.values&&e?.values.length>31),message:[`👀 Some series have a number of data points > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of data points to display.`]}]});let{userOptionsVisible:U,setUserOptionsVisibility:W,keepUserOptionState:G}=de({config:V.value});function K(){return i(N.config,M,fe)}Ce(()=>N.config,e=>{V.value=K(),U.value=!V.value.userOptions.showOnChartHover,Y()},{deep:!0});let{isPrinting:De,isImaging:Oe,generatePdf:q,generateImage:J}=ue({elementId:`table_heatmap_${P.value}`,fileName:`vue-ui-table-heatmap`,options:V.value.userOptions.print}),ke=c(()=>V.value.table.responsiveBreakpoint),Ae=c(()=>!!N.dataset&&N.dataset.length);g(()=>{Y()});function Y(){if(oe(N.dataset)&&ne({componentName:`VueUiTableHeatmap`,type:`dataset`,debug:H.value}),L?.disconnect(),L=null,R||!I.value)return;let e=new ResizeObserver(t=>{R||L!==e||t.forEach(e=>{F.value=e.contentRect.width<ke.value})});L=e,e.observe(I.value)}let X=c(()=>N.dataset.map(e=>{let t=e.values.map(e=>isNaN(e)?0:e),n=t.reduce((e,t)=>e+t,0);return{...e,values:t,serieExtremes:{max:Math.max(...t),min:Math.min(...t)},sum:n,average:n/t.length,median:re(t),displayValues:[e.name,...e.values],id:a()}})),Z=c(()=>{let e=X.value.flatMap(e=>e.values);return{min:Math.min(...e),max:Math.max(...e)}});function je(e,t){let n=V.value.style.heatmapColors.useIndividualScale;return te(V.value.style.heatmapColors.min,V.value.style.heatmapColors.max,n?t.min:Z.value.min,n?t.max:Z.value.max,e)}let Q=c(()=>X.value.map(e=>({...e,colors:e.displayValues.map(t=>isNaN(t)?V.value.style.backgroundColor:je(t,e.serieExtremes))}))),Me=c(()=>V.value.style.backgroundColor),Ne=c(()=>`${V.value.table.borderWidth}px`);function $(e=null){p(()=>{let t=Q.value.map(e=>[[e.name],e.displayValues,[e.sum],[e.average],[e.median]]),n=[[[``],V.value.table.head.values,[`sum`],[`average`],[`median`]]].concat(t),r=ee(n);e?e(r):ie({csvContent:r,title:`vue-ui-table-heatmap`})})}function Pe(e){z.value=e,B.value+=1}return o({generatePdf:q,generateCsv:$,generateImage:J}),(e,i)=>(_(),u(`div`,{ref_key:`tableContainer`,ref:I,style:h(`width:100%; overflow-x:auto; container-type: inline-size;padding-top:${V.value.userOptions.show?`36px`:``}; ${z.value?`vue-data-ui-wrapper-fullscreen`:``}; position:relative;`),class:m({"vue-data-ui-component":!0,"vue-ui-responsive":F.value}),id:`table_heatmap_${P.value}`,onMouseenter:i[0]||=()=>x(W)(!0),onMouseleave:i[1]||=()=>x(W)(!1)},[V.value.userOptions.show&&Ae.value&&(x(G)||x(U))?(_(),me(x(C),f({ref:`details`,key:`user_option_${B.value}`,backgroundColor:V.value.style.backgroundColor,color:V.value.style.color,isPrinting:x(De),isImaging:x(Oe),uid:P.value,isFullscreen:z.value,chartElement:I.value},x(n)(V.value.userOptions,`pdf csv img fullscreen`),{onToggleFullscreen:Pe,onGeneratePdf:x(q),onGenerateCsv:$,onGenerateImage:x(J),style:{visibility:x(G)?x(U)?`visible`:`hidden`:`visible`}}),he({_:2},[y(x(t)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionFullscreen custom-menu-before custom-menu-after`),t=>({name:t,fn:S(n=>[b(e.$slots,t,ye(ve(x(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`onGeneratePdf`,`onGenerateImage`,`style`])):l(``,!0),d(`table`,{class:m({"vue-ui-table-heatmap":!0}),style:h(`width:100%;font-family:${V.value.style.fontFamily};background:${V.value.style.backgroundColor};`)},[d(`caption`,null,[b(e.$slots,`caption`,{},void 0,!0)]),d(`thead`,null,[d(`tr`,{role:`row`,style:h(`background:${V.value.table.head.backgroundColor};color:${V.value.table.head.color}`)},[(_(!0),u(s,null,y(V.value.table.head.values,(t,n)=>(_(),u(`th`,T,[b(e.$slots,`head`,f({ref_for:!0},{value:t,rowIndex:n,type:typeof t,isResponsive:F.value}),void 0,!0)]))),256))],4)]),d(`tbody`,null,[(_(!0),u(s,null,y(Q.value,(t,n)=>(_(),u(`tr`,E,[(_(!0),u(s,null,y(t.displayValues,(r,i)=>(_(),u(`td`,{role:`cell`,"data-cell":V.value.table.head.values[i]},[t.color&&i===0?(_(),u(`div`,O,[t.color?(_(),u(`svg`,{key:0,height:V.value.style.shapeSize,width:V.value.style.shapeSize,viewBox:`0 0 20 20`,style:{background:`none`,overflow:`visible`}},[ge(pe,{plot:{x:10,y:10},color:t.color,radius:9,shape:t.shape||`circle`},null,8,[`color`,`shape`])],8,k)):l(``,!0),b(e.$slots,`rowTitle`,f({ref_for:!0},{value:r,rowIndex:n,colIndex:i,type:typeof r,isResponsive:F.value}),void 0,!0)])):(_(),u(s,{key:1},[i===0?b(e.$slots,`rowTitle`,f({ref_for:!0},{value:r,rowIndex:n,colIndex:i,type:typeof r,isResponsive:F.value}),void 0,!0,0):l(``,!0),i>0?b(e.$slots,`cell`,f({ref_for:!0},{value:r,rowIndex:n,colIndex:i,type:typeof r,isResponsive:F.value,color:t.colors[i],textColor:x(ae)(t.colors[i])}),void 0,!0,1):l(``,!0)],64))],8,D))),256)),V.value.table.showSum?(_(),u(`td`,A,[b(e.$slots,`sum`,f({ref_for:!0},{value:t.sum,rowIndex:n,isResponsive:F.value}),void 0,!0)])):l(``,!0),V.value.table.showAverage?(_(),u(`td`,we,[b(e.$slots,`average`,f({ref_for:!0},{value:t.average,rowIndex:n,isResponsive:F.value}),void 0,!0)])):l(``,!0),V.value.table.showMedian?(_(),u(`td`,j,[b(e.$slots,`median`,f({ref_for:!0},{value:t.median,rowIndex:n,isResponsive:F.value}),void 0,!0)])):l(``,!0)]))),256))])],4),e.$slots.source?(_(),u(`div`,Te,[b(e.$slots,`source`,{},void 0,!0)],512)):l(``,!0)],46,w))}},[[`__scopeId`,`data-v-b22ddf12`]]);export{C as n,M as t};
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./userOptionsSlots-CWtXN5Q6.js";import{n as r}from"./resolveChartConfig-0IvbmIE_.js";import{$ as i,D as a,Ht as o,Jt as ee,S as te,X as ne,at as re,i as ie,m as ae,nt as oe,w as se,yt as ce,zt as le}from"./lib-rPeBMZrn.js";import{n as ue,t as de}from"./useHints-C-TwxM0Y.js";import{t as fe}from"./useConfig-B8qvYKdK.js";import{t as pe}from"./usePrinter-DVf3YcG5.js";import{t as me}from"./useUserOptionState-CXlFnwPv.js";import{t as he}from"./vClickOutside-BxNzkY17.js";import{t as ge}from"./vue_ui_table_sparkline-DZQYAsyS.js";import{t as _e}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as s,computed as c,createBlock as ve,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as ye,createVNode as f,defineAsyncComponent as p,mergeProps as be,nextTick as xe,normalizeClass as m,normalizeStyle as h,onBeforeUnmount as Se,onMounted as Ce,openBlock as g,ref as _,renderList as v,renderSlot as we,shallowRef as Te,toDisplayString as y,unref as b,useCssVars as Ee,useSlots as De,watch as Oe,withCtx as ke,withDirectives as Ae}from"vue";var je=/* @__PURE__ */ e({default:()=>Ge}),Me=[`id`],Ne={style:{"z-index":`1`,"padding-right":`24px`}},Pe={key:0,style:{display:`flex`,flexDirection:`row`,alignItems:`center`}},Fe={key:0,style:{display:`flex`,flexDirection:`row`,alignItems:`center`}},Ie=[`onClick`],Le=[`onClick`],Re=[`data-cell`],ze=[`data-cell`,`onPointerenter`],Be=[`data-cell`],Ve=[`data-cell`],He=[`data-cell`],Ue=[`data-cell`],We={key:1,ref:`source`,dir:`auto`},Ge=/*#__PURE__*/ _e({__name:`vue-ui-table-sparkline`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`],setup(e,{expose:_e,emit:je}){Ee(e=>({v5fe3988e:e.tdo}));let Ge=p(()=>import(`./vue-ui-sparkline-DXJpSvr5.js`).then(e=>e.n)),x=p(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Ke=p(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),{vue_ui_table_sparkline:qe}=fe(),S=e,Je=je,C=_(ne()),Ye=_(0),w=_(0),T=_(null),Xe=De(),Ze=_(!1),E=c({get:()=>et(),set:e=>e}),D=c(()=>E.value.userOptions),O=c(()=>E.value.sparkline),k=c(()=>E.value.thead),A=c(()=>E.value.tbody),j=c(()=>E.value.title);Ce(()=>{Xe[`chart-background`]&&E.value.debug&&console.warn(`VueUiTableSparkline does not support the #chart-background slot.`)}),ue({config:()=>E.value,dataset:()=>S.dataset,component:`VueUiTableSparkline`,rules:[de.emptyArray,{test:e=>e.some(e=>e?.values&&e.values.length>500),message:[`👀 One or more series have > 500 datapoints. Consider if you really need this level of detail.`,``,`▶️ Use larger time scales, or aggregated values`]},{test:e=>e.some(e=>e?.values&&e.values.length>1095),message:[`👀 One or more series have > 1095 datapoints. Above this threshold, the dataset is computed through an LTTB algorithm, to preserve the shape of the data without increasing the number of datapoints.`,``,`▶️ If you need this level of detail, you can change config.downsample.threshold and set a higher value. Note that performance will be impacted.`]}]});let M=c(()=>E.value.userOptions.useCursorPointer),{userOptionsVisible:N,setUserOptionsVisibility:Qe,keepUserOptionState:$e}=me({config:E.value});function et(){return r(S.config,qe,ge)}Oe(()=>S.config,e=>{E.value=et(),N.value=!E.value.userOptions.showOnChartHover,ct(),w.value+=1},{deep:!0}),Oe(()=>S.dataset,e=>{U.value=H.value,w.value+=1},{deep:!0});let{isPrinting:tt,isImaging:nt,generatePdf:rt,generateImage:it}=pe({elementId:`table_${C.value}`,fileName:j.value.text||`vue-ui-table-sparkline`,options:E.value.userOptions.print}),at=c(()=>se(E.value.customPalette)),P=_(null),F=_(!1),ot=c(()=>E.value.responsiveBreakpoint);Ce(()=>{ct()});let st=_(E.value.colNames),I=Te(null);function ct(){le(S.dataset)&&re({componentName:`VueUiTableSparkline`,type:`dataset`}),I.value&&I.value.disconnect(),I.value=new ResizeObserver(e=>{e.forEach(e=>{F.value=e.contentRect.width<ot.value})}),P.value&&I.value.observe(P.value),st.value=[];for(let e=0;e<pt.value;e+=1)st.value.push(E.value.colNames[e]||`col ${e}`)}Se(()=>{I.value&&I.value.disconnect()});function L(e){if([null,void 0].includes(e))return null;let t=Number(e);return Number.isFinite(t)?t:null}function R(e){return typeof e==`number`&&Number.isFinite(e)}function lt(e=[]){return e.map(L).filter(R)}function z(e,t,n){let r=L(e),i=L(t),a=R(r),o=R(i);return a&&o?n===-1?r-i:i-r:a?-1:+!!o}function B(e,t,n={}){let r=L(e);return r===null?`-`:ie(E.value.formatter,r,i({p:E.value.prefix,v:r,s:E.value.suffix,r:t}),n)}let V=c(()=>(S.dataset.forEach((e,t)=>{ce({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{re({componentName:`VueUiTableSparkline`,type:`datasetSerieAttribute`,property:e,index:t})})}),S.dataset.map((e,t)=>{let n=e.values||[],r=lt(n),i=r.length?r.reduce((e,t)=>e+t,0):null,a=r.length?i/r.length:null,ee=r.length?ae(r):null;return{...e,values:n,color:te(e.color)||at.value[t]||o[t]||o[t%o.length],sum:i,average:a,median:ee,sparklineDataset:n.map((e,t)=>({period:E.value.colNames[t]||`col ${t}`,value:L(e)}))}})));function ut(e){let t=(e[0]?.values||[]).map((t,n)=>e.map(e=>e?.values?.[n]??null)).map(e=>e.map((e,t)=>[e,t]).sort((e,t)=>z(e[0],t[0],1)).map(e=>e[1]));return e.map((e,n)=>({...e,values:e.values||[],orders:t[n]}))}let H=c(()=>ut(V.value)),U=_(H.value),dt=c(()=>Math.max(...U.value.map(e=>(e.values||[]).length))),W=_(void 0),G=_(!1),K=_(void 0),ft=_(1);function q(){G.value=!1,K.value=void 0,Z.value=void 0,ft.value=1,$.value.forEach(e=>e.state=1),X.value={name:1,sum:1,average:1,median:1},U.value=H.value}function J(e,t,n){if([`name`,`sum`,`average`,`median`].includes(e.type)){mt(e.type,t,n);return}if(!bt(t))return;if(Q.value=t,Z.value=void 0,![null,void 0].includes(K.value)&&t!==K.value&&(K.value=void 0,q()),$.value[t].state===n&&K.value===t){K.value=void 0,q();return}G.value=!0,K.value=t;let r=H.value.map(e=>e.values?.[t]??null),i=n;$.value[t].state=i,ft.value=i,t===W.value?W.value=void 0:W.value=t;let a=r.map((e,t)=>[t,e]).sort((e,t)=>z(e[1],t[1],i)).map(e=>e[0]).map(e=>H.value[e]);U.value=a,w.value+=1}let pt=c(()=>Math.max(...S.dataset.map(e=>(e.values||[]).length))),Y=c(()=>{let e=st.value.map(e=>({type:`reg`,value:e}));if(!e.length)for(let t=0;t<pt.value;t+=1)e.push({type:`reg`,value:`col ${t+1}`});E.value.showTotal&&(e=[...e,{type:`sum`,value:E.value.translations.total}]);let t;return t=E.value.showAverage&&E.value.showMedian?[...e,{type:`average`,value:E.value.translations.average},{type:`median`,value:E.value.translations.median}]:E.value.showAverage&&!E.value.showMedian?[...e,{type:`average`,value:E.value.translations.average}]:!E.value.showAverage&&E.value.showMedian?[...e,{type:`median`,value:E.value.translations.median}]:e,E.value.showSparklines?[...t,{type:`chart`,value:E.value.translations.chart}]:t}),X=_({name:1,sum:1,average:1,median:1}),Z=_(void 0);function mt(e,t,n){if(!U.value||U.value.length===0||!xt(e))return;if(Z.value!==e&&(Z.value=void 0),![null,void 0].includes(K.value)&&t!==K.value&&q(),K.value=void 0,X.value[e]===n&&Z.value){Z.value=void 0,q();return}Z.value=e,G.value=!0,X.value[e]=n,[null,void 0].includes(t)||($.value[t].state=X.value[e]);let r=X.value[e],i=[...U.value].sort((t,n)=>{let i=t[e],a=n[e];return typeof i==`string`&&typeof a==`string`?r===-1?i.localeCompare(a):a.localeCompare(i):z(i,a,r)});U.value=i}let Q=_(void 0),ht=_(void 0);function gt({dataIndex:e,serieIndex:t}){Q.value=e,ht.value=t,T.value[e]&&!F.value&&T.value[e].scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})}let _t=_(!1);function vt(e){_t.value=e,Ye.value+=1}function yt(e=null){xe(()=>{let t=[E.value.translations.serie].concat(Y.value),n=V.value.map((e,t)=>[[e.name],e.values,[e.sum],[e.average],[e.median]]),r=[t].concat(n),i=a(r);e?e(i):oe({csvContent:i,title:j.value.text||`vue-ui-table-sparkline`})})}function bt(e){return E.value.sortedDataColumnIndices.includes(e)}function xt(e){return e.type===`name`||e===`name`?E.value.sortedSeriesName:e.type===`sum`||e===`sum`?E.value.sortedSum:e.type===`average`||e===`average`?E.value.sortedAverage:e.type===`median`||e===`median`?E.value.sortedMedian:!1}function St(e,t,n){return[`sum`,`average`,`median`].includes(t.type)?Z.value===t.type&&X.value[t.type]===n?1:.3:e===K.value&&$.value[e].state===n?1:.3}function Ct(){E.value.resetSortOnClickOutside&&q()}let $=c({get:()=>Y.value.map(e=>({state:1})),set:e=>e});function wt(e){e?.stage===`start`?Ze.value=!0:e?.stage===`end`?Ze.value=!1:it()}async function Tt(){Je(`copyAlt`,{config:E.value,dataset:V.value}),E.value.userOptions.callbacks.altCopy?await Promise.resolve(E.value.userOptions.callbacks.altCopy({config:E.value,dataset:V.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}return _e({generatePdf:rt,generateImage:it,generateCsv:yt,restoreOrder:q,copyAlt:Tt}),(e,r)=>(g(),u(`div`,{ref_key:`tableContainer`,ref:P,class:m({"vue-data-ui-component":!0,"vue-ui-table-sparkline":!0,"vue-ui-responsive":F.value}),style:{overflow:`hidden`},id:`table_${C.value}`,onMouseenter:r[3]||=()=>b(Qe)(!0),onMouseleave:r[4]||=()=>b(Qe)(!1)},[j.value.text?(g(),u(`div`,{key:0,class:`vue-ui-table-sparkline-caption`,style:h({backgroundColor:j.value.backgroundColor})},[d(`div`,{class:`atom-title`,style:h({fontSize:`${j.value.fontSize}px`,fontWeight:j.value.bold?`bold`:`normal`,color:j.value.color,textAlign:j.value.textAlign})},y(j.value.text),5),j.value.subtitle.text?(g(),u(`div`,{key:0,class:`atom-subtitle`,style:h({fontSize:`${j.value.subtitle.fontSize}px`,fontWeight:j.value.subtitle.bold?`bold`:`normal`,color:j.value.subtitle.color,textAlign:j.value.textAlign})},y(j.value.subtitle.text),5)):l(``,!0)],4)):l(``,!0),d(`div`,{style:{overflow:`auto`},onPointerleave:r[2]||=e=>{ht.value=void 0,Q.value=void 0}},[d(`table`,{class:`vue-ui-data-table`,style:h({fontFamily:E.value.fontFamily,position:`relative`})},[d(`thead`,Ne,[Ae((g(),u(`tr`,{role:`row`,class:`vue-ui-data-table__thead-row`,style:h({backgroundColor:k.value.backgroundColor,color:k.value.color})},[d(`th`,{role:`cell`,style:h({backgroundColor:k.value.backgroundColor,border:k.value.outline,textAlign:k.value.textAlign,fontWeight:k.value.bold?`bold`:`normal`}),class:`sticky-col-first`},[d(`div`,{style:h({display:`flex`,flexDirection:`row`,alignItems:`center`,gap:`3px`,justifyContent:k.value.textAlign})},[d(`span`,null,y(E.value.translations.serie),1),U.value.length>1&&E.value.sortedSeriesName?(g(),u(`div`,Pe,[d(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down`,onClick:r[0]||=e=>J({type:`name`},null,-1),style:h({cursor:M.value?`pointer`:`default`})},[f(b(x),{size:12,name:`arrowBottom`,stroke:k.value.color,style:h({opacity:Z.value===`name`&&X.value.name===-1?1:.3})},null,8,[`stroke`,`style`])],4),d(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up`,onClick:r[1]||=e=>J({type:`name`},null,1),style:h({cursor:M.value?`pointer`:`default`})},[f(b(x),{size:12,name:`arrowTop`,stroke:k.value.color,style:h({opacity:Z.value===`name`&&X.value.name===1?1:.3})},null,8,[`stroke`,`style`])],4)])):l(``,!0)],4)],4),(g(!0),u(s,null,v(Y.value,(r,i)=>(g(),u(`th`,{role:`cell`,style:h({background:k.value.backgroundColor,border:k.value.outline,textAlign:k.value.textAlign,fontWeight:k.value.bold?`bold`:`normal`,minWidth:i===Y.value.length-1?`${O.value.dimensions.width}px`:`48px`,paddingRight:i===Y.value.length-1&&D.value.show?`36px`:``}),class:m({"sticky-col":i===Y.value.length-1&&E.value.showSparklines})},[d(`div`,{style:h({display:`flex`,flexDirection:`row`,alignItems:`center`,gap:`3px`,justifyContent:k.value.textAlign})},[d(`span`,null,y(r.value),1),U.value.length>1&&(bt(i)||xt(r))?(g(),u(`div`,Fe,[d(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down`,onClick:()=>J(r,i,-1),style:h({cursor:M.value?`pointer`:`default`})},[f(b(x),{size:12,name:`arrowBottom`,stroke:k.value.color,style:h({opacity:St(i,r,-1)})},null,8,[`stroke`,`style`])],12,Ie),d(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up`,onClick:()=>J(r,i,1),style:h({cursor:M.value?`pointer`:`default`})},[f(b(x),{size:12,name:`arrowTop`,stroke:k.value.color,style:h({opacity:St(i,r,1)})},null,8,[`stroke`,`style`])],12,Le)])):l(``,!0)],4),D.value.show&&i===Y.value.length-1&&(b($e)||b(N))?(g(),ve(b(Ke),{ref_for:!0,ref:`details`,key:`user_option_${Ye.value}`,backgroundColor:k.value.backgroundColor,color:k.value.color,isPrinting:b(tt),isImaging:b(nt),uid:C.value,hasPdf:D.value.buttons.pdf,hasXls:D.value.buttons.csv,hasImg:D.value.buttons.img,hasFullscreen:D.value.buttons.fullscreen,hasAltCopy:D.value.buttons.altCopy,isFullscreen:_t.value,titles:{...D.value.buttonTitles},chartElement:P.value,position:D.value.position,callbacks:D.value.callbacks,printScale:D.value.print.scale,isCursorPointer:M.value,onToggleFullscreen:vt,onGeneratePdf:b(rt),onGenerateImage:wt,onGenerateCsv:yt,onCopyAlt:Tt,style:h({visibility:b($e)?b(N)?`visible`:`hidden`:`visible`})},ye({_:2},[v(b(t)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionFullscreen optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:ke(r=>[we(e.$slots,t,be({ref_for:!0},b(n)(t,r)),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasXls`,`hasImg`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`titles`,`chartElement`,`position`,`callbacks`,`printScale`,`isCursorPointer`,`onGeneratePdf`,`style`])):l(``,!0)],6))),256))],4)),[[b(he),Ct]])]),d(`tbody`,null,[(g(!0),u(s,null,v(U.value,(e,t)=>(g(),u(`tr`,{role:`row`,style:h({backgroundColor:A.value.backgroundColor,color:A.value.color}),class:m({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":t%2==0,"vue-ui-data-table__tbody__row-odd":t%2!=0})},[d(`td`,{role:`cell`,style:h({backgroundColor:A.value.backgroundColor,border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign}),"data-cell":E.value.translations.serie,class:`vue-ui-data-table__tbody__td sticky-col-first`},[d(`div`,{dir:`auto`,style:h({display:`flex`,flexDirection:`row`,alignItems:`center`,gap:`6px`,justifyContent:A.value.textAlign})},[A.value.showColorMarker?(g(),u(`span`,{key:0,style:h({color:e.color})},`⬤`,4)):l(``,!0),d(`span`,null,y(e.name??`-`),1)],4)],12,Re),(g(!0),u(s,null,v(dt.value,(n,r)=>(g(),u(`td`,{dir:`auto`,role:`cell`,ref_for:!0,ref_key:`TD`,ref:T,style:h({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign,background:Q.value!==void 0&&r===Q.value?A.value.selectedColor.useSerieColor?b(ee)(e.color,20):A.value.selectedColor.fallback:``}),"data-cell":Y.value[r]?Y.value[r].value:``,class:`vue-ui-data-table__tbody__td`,onPointerenter:e=>{ht.value=t,Q.value=r}},y(B(e.values[r],E.value.roundingValues,{datapoint:e,seriesIndex:t,datapointIndex:r})),45,ze))),256)),E.value.showTotal?(g(),u(`td`,{key:0,dir:`auto`,role:`cell`,style:h({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign}),"data-cell":E.value.translations.total,class:`vue-ui-data-table__tbody__td`},y(B(e.sum,E.value.roundingTotal,{datapoint:e.sum,seriesIndex:t})),13,Be)):l(``,!0),E.value.showAverage?(g(),u(`td`,{key:1,dir:`auto`,role:`cell`,style:h({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign}),"data-cell":E.value.translations.average,class:`vue-ui-data-table__tbody__td`},y(B(e.average,E.value.roundingAverage,{datapoint:e.average,seriesIndex:t})),13,Ve)):l(``,!0),E.value.showMedian?(g(),u(`td`,{key:2,dir:`auto`,role:`cell`,style:h({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign}),"data-cell":E.value.translations.median,class:`vue-ui-data-table__tbody__td`},y(B(e.median,E.value.roundingMedian,{datapoint:e.median,seriesIndex:t})),13,He)):l(``,!0),E.value.showSparklines?(g(),u(`td`,{key:3,role:`cell`,"data-cell":E.value.translations.chart,style:h({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign,backgroundColor:A.value.backgroundColor,padding:`0`}),class:`vue-ui-data-table__tbody__td sticky-col`},[f(b(Ge),{onHoverIndex:({index:e})=>gt({dataIndex:e,serieIndex:t}),"height-ratio":O.value.dimensions.heightRatio,"forced-padding":30,dataset:e.sparklineDataset,showInfo:!1,selectedIndex:Q.value,config:{type:O.value.type,style:{backgroundColor:`transparent`,animation:{show:O.value.animation.show&&!b(tt)&&!b(nt),animationFrames:O.value.animation.animationFrames},padding:{right:12},line:{color:e.color,smooth:O.value.smooth,cutNullValues:O.value.cutNullValues,strokeWidth:O.value.strokeWidth},bar:{color:e.color},area:{color:e.color,opacity:O.value.showArea?16:0,useGradient:O.value.useGradient},verticalIndicator:{color:e.color},plot:{radius:9,stroke:A.value.backgroundColor,strokeWidth:3}}}},null,8,[`onHoverIndex`,`height-ratio`,`dataset`,`selectedIndex`,`config`])],12,Ue)):l(``,!0)],6))),256))])],4)],32),e.$slots.source?(g(),u(`div`,We,[we(e.$slots,`source`,{},void 0,!0)],512)):l(``,!0)],42,Me))}},[[`__scopeId`,`data-v-bb68c573`]]);export{je as n,Ge as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./userOptionsSlots-CWtXN5Q6.js";import{n as r}from"./resolveChartConfig-QgMumfgd.js";import{$ as i,D as a,Ht as o,Jt as ee,S as te,X as ne,at as re,i as ie,m as ae,nt as oe,w as se,yt as ce,zt as le}from"./lib-BaWaqwnJ.js";import{n as ue,t as de}from"./useHints-C-TwxM0Y.js";import{t as fe}from"./useConfig-B-AzS3w-.js";import{t as pe}from"./usePrinter-CUD8gosC.js";import{t as me}from"./useUserOptionState-CXlFnwPv.js";import{t as he}from"./vClickOutside-BxNzkY17.js";import{t as ge}from"./vue_ui_table_sparkline-DZQYAsyS.js";import{t as _e}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as s,computed as c,createBlock as ve,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as ye,createVNode as f,defineAsyncComponent as p,mergeProps as be,nextTick as xe,normalizeClass as m,normalizeStyle as h,onBeforeUnmount as Se,onMounted as Ce,openBlock as g,ref as _,renderList as v,renderSlot as we,shallowRef as Te,toDisplayString as y,unref as b,useCssVars as Ee,useSlots as De,watch as Oe,withCtx as ke,withDirectives as Ae}from"vue";var je=/* @__PURE__ */ e({default:()=>Ge}),Me=[`id`],Ne={style:{"z-index":`1`,"padding-right":`24px`}},Pe={key:0,style:{display:`flex`,flexDirection:`row`,alignItems:`center`}},Fe={key:0,style:{display:`flex`,flexDirection:`row`,alignItems:`center`}},Ie=[`onClick`],Le=[`onClick`],Re=[`data-cell`],ze=[`data-cell`,`onPointerenter`],Be=[`data-cell`],Ve=[`data-cell`],He=[`data-cell`],Ue=[`data-cell`],We={key:1,ref:`source`,dir:`auto`},Ge=/*#__PURE__*/ _e({__name:`vue-ui-table-sparkline`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`],setup(e,{expose:_e,emit:je}){Ee(e=>({v5fe3988e:e.tdo}));let Ge=p(()=>import(`./vue-ui-sparkline-B7ZZzccR.js`).then(e=>e.n)),x=p(()=>import(`./BaseIcon-CQFjKDhE.js`).then(e=>e.n)),Ke=p(()=>import(`./UserOptions-B97cPcKc.js`).then(e=>e.n)),{vue_ui_table_sparkline:qe}=fe(),S=e,Je=je,C=_(ne()),Ye=_(0),w=_(0),T=_(null),Xe=De(),Ze=_(!1),E=c({get:()=>et(),set:e=>e}),D=c(()=>E.value.userOptions),O=c(()=>E.value.sparkline),k=c(()=>E.value.thead),A=c(()=>E.value.tbody),j=c(()=>E.value.title);Ce(()=>{Xe[`chart-background`]&&E.value.debug&&console.warn(`VueUiTableSparkline does not support the #chart-background slot.`)}),ue({config:()=>E.value,dataset:()=>S.dataset,component:`VueUiTableSparkline`,rules:[de.emptyArray,{test:e=>e.some(e=>e?.values&&e.values.length>500),message:[`👀 One or more series have > 500 datapoints. Consider if you really need this level of detail.`,``,`▶️ Use larger time scales, or aggregated values`]},{test:e=>e.some(e=>e?.values&&e.values.length>1095),message:[`👀 One or more series have > 1095 datapoints. Above this threshold, the dataset is computed through an LTTB algorithm, to preserve the shape of the data without increasing the number of datapoints.`,``,`▶️ If you need this level of detail, you can change config.downsample.threshold and set a higher value. Note that performance will be impacted.`]}]});let M=c(()=>E.value.userOptions.useCursorPointer),{userOptionsVisible:N,setUserOptionsVisibility:Qe,keepUserOptionState:$e}=me({config:E.value});function et(){return r(S.config,qe,ge)}Oe(()=>S.config,e=>{E.value=et(),N.value=!E.value.userOptions.showOnChartHover,ct(),w.value+=1},{deep:!0}),Oe(()=>S.dataset,e=>{U.value=H.value,w.value+=1},{deep:!0});let{isPrinting:tt,isImaging:nt,generatePdf:rt,generateImage:it}=pe({elementId:`table_${C.value}`,fileName:j.value.text||`vue-ui-table-sparkline`,options:E.value.userOptions.print}),at=c(()=>se(E.value.customPalette)),P=_(null),F=_(!1),ot=c(()=>E.value.responsiveBreakpoint);Ce(()=>{ct()});let st=_(E.value.colNames),I=Te(null);function ct(){le(S.dataset)&&re({componentName:`VueUiTableSparkline`,type:`dataset`}),I.value&&I.value.disconnect(),I.value=new ResizeObserver(e=>{e.forEach(e=>{F.value=e.contentRect.width<ot.value})}),P.value&&I.value.observe(P.value),st.value=[];for(let e=0;e<pt.value;e+=1)st.value.push(E.value.colNames[e]||`col ${e}`)}Se(()=>{I.value&&I.value.disconnect()});function L(e){if([null,void 0].includes(e))return null;let t=Number(e);return Number.isFinite(t)?t:null}function R(e){return typeof e==`number`&&Number.isFinite(e)}function lt(e=[]){return e.map(L).filter(R)}function z(e,t,n){let r=L(e),i=L(t),a=R(r),o=R(i);return a&&o?n===-1?r-i:i-r:a?-1:+!!o}function B(e,t,n={}){let r=L(e);return r===null?`-`:ie(E.value.formatter,r,i({p:E.value.prefix,v:r,s:E.value.suffix,r:t}),n)}let V=c(()=>(S.dataset.forEach((e,t)=>{ce({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{re({componentName:`VueUiTableSparkline`,type:`datasetSerieAttribute`,property:e,index:t})})}),S.dataset.map((e,t)=>{let n=e.values||[],r=lt(n),i=r.length?r.reduce((e,t)=>e+t,0):null,a=r.length?i/r.length:null,ee=r.length?ae(r):null;return{...e,values:n,color:te(e.color)||at.value[t]||o[t]||o[t%o.length],sum:i,average:a,median:ee,sparklineDataset:n.map((e,t)=>({period:E.value.colNames[t]||`col ${t}`,value:L(e)}))}})));function ut(e){let t=(e[0]?.values||[]).map((t,n)=>e.map(e=>e?.values?.[n]??null)).map(e=>e.map((e,t)=>[e,t]).sort((e,t)=>z(e[0],t[0],1)).map(e=>e[1]));return e.map((e,n)=>({...e,values:e.values||[],orders:t[n]}))}let H=c(()=>ut(V.value)),U=_(H.value),dt=c(()=>Math.max(...U.value.map(e=>(e.values||[]).length))),W=_(void 0),G=_(!1),K=_(void 0),ft=_(1);function q(){G.value=!1,K.value=void 0,Z.value=void 0,ft.value=1,$.value.forEach(e=>e.state=1),X.value={name:1,sum:1,average:1,median:1},U.value=H.value}function J(e,t,n){if([`name`,`sum`,`average`,`median`].includes(e.type)){mt(e.type,t,n);return}if(!bt(t))return;if(Q.value=t,Z.value=void 0,![null,void 0].includes(K.value)&&t!==K.value&&(K.value=void 0,q()),$.value[t].state===n&&K.value===t){K.value=void 0,q();return}G.value=!0,K.value=t;let r=H.value.map(e=>e.values?.[t]??null),i=n;$.value[t].state=i,ft.value=i,t===W.value?W.value=void 0:W.value=t;let a=r.map((e,t)=>[t,e]).sort((e,t)=>z(e[1],t[1],i)).map(e=>e[0]).map(e=>H.value[e]);U.value=a,w.value+=1}let pt=c(()=>Math.max(...S.dataset.map(e=>(e.values||[]).length))),Y=c(()=>{let e=st.value.map(e=>({type:`reg`,value:e}));if(!e.length)for(let t=0;t<pt.value;t+=1)e.push({type:`reg`,value:`col ${t+1}`});E.value.showTotal&&(e=[...e,{type:`sum`,value:E.value.translations.total}]);let t;return t=E.value.showAverage&&E.value.showMedian?[...e,{type:`average`,value:E.value.translations.average},{type:`median`,value:E.value.translations.median}]:E.value.showAverage&&!E.value.showMedian?[...e,{type:`average`,value:E.value.translations.average}]:!E.value.showAverage&&E.value.showMedian?[...e,{type:`median`,value:E.value.translations.median}]:e,E.value.showSparklines?[...t,{type:`chart`,value:E.value.translations.chart}]:t}),X=_({name:1,sum:1,average:1,median:1}),Z=_(void 0);function mt(e,t,n){if(!U.value||U.value.length===0||!xt(e))return;if(Z.value!==e&&(Z.value=void 0),![null,void 0].includes(K.value)&&t!==K.value&&q(),K.value=void 0,X.value[e]===n&&Z.value){Z.value=void 0,q();return}Z.value=e,G.value=!0,X.value[e]=n,[null,void 0].includes(t)||($.value[t].state=X.value[e]);let r=X.value[e],i=[...U.value].sort((t,n)=>{let i=t[e],a=n[e];return typeof i==`string`&&typeof a==`string`?r===-1?i.localeCompare(a):a.localeCompare(i):z(i,a,r)});U.value=i}let Q=_(void 0),ht=_(void 0);function gt({dataIndex:e,serieIndex:t}){Q.value=e,ht.value=t,T.value[e]&&!F.value&&T.value[e].scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})}let _t=_(!1);function vt(e){_t.value=e,Ye.value+=1}function yt(e=null){xe(()=>{let t=[E.value.translations.serie].concat(Y.value),n=V.value.map((e,t)=>[[e.name],e.values,[e.sum],[e.average],[e.median]]),r=[t].concat(n),i=a(r);e?e(i):oe({csvContent:i,title:j.value.text||`vue-ui-table-sparkline`})})}function bt(e){return E.value.sortedDataColumnIndices.includes(e)}function xt(e){return e.type===`name`||e===`name`?E.value.sortedSeriesName:e.type===`sum`||e===`sum`?E.value.sortedSum:e.type===`average`||e===`average`?E.value.sortedAverage:e.type===`median`||e===`median`?E.value.sortedMedian:!1}function St(e,t,n){return[`sum`,`average`,`median`].includes(t.type)?Z.value===t.type&&X.value[t.type]===n?1:.3:e===K.value&&$.value[e].state===n?1:.3}function Ct(){E.value.resetSortOnClickOutside&&q()}let $=c({get:()=>Y.value.map(e=>({state:1})),set:e=>e});function wt(e){e?.stage===`start`?Ze.value=!0:e?.stage===`end`?Ze.value=!1:it()}async function Tt(){Je(`copyAlt`,{config:E.value,dataset:V.value}),E.value.userOptions.callbacks.altCopy?await Promise.resolve(E.value.userOptions.callbacks.altCopy({config:E.value,dataset:V.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}return _e({generatePdf:rt,generateImage:it,generateCsv:yt,restoreOrder:q,copyAlt:Tt}),(e,r)=>(g(),u(`div`,{ref_key:`tableContainer`,ref:P,class:m({"vue-data-ui-component":!0,"vue-ui-table-sparkline":!0,"vue-ui-responsive":F.value}),style:{overflow:`hidden`},id:`table_${C.value}`,onMouseenter:r[3]||=()=>b(Qe)(!0),onMouseleave:r[4]||=()=>b(Qe)(!1)},[j.value.text?(g(),u(`div`,{key:0,class:`vue-ui-table-sparkline-caption`,style:h({backgroundColor:j.value.backgroundColor})},[d(`div`,{class:`atom-title`,style:h({fontSize:`${j.value.fontSize}px`,fontWeight:j.value.bold?`bold`:`normal`,color:j.value.color,textAlign:j.value.textAlign})},y(j.value.text),5),j.value.subtitle.text?(g(),u(`div`,{key:0,class:`atom-subtitle`,style:h({fontSize:`${j.value.subtitle.fontSize}px`,fontWeight:j.value.subtitle.bold?`bold`:`normal`,color:j.value.subtitle.color,textAlign:j.value.textAlign})},y(j.value.subtitle.text),5)):l(``,!0)],4)):l(``,!0),d(`div`,{style:{overflow:`auto`},onPointerleave:r[2]||=e=>{ht.value=void 0,Q.value=void 0}},[d(`table`,{class:`vue-ui-data-table`,style:h({fontFamily:E.value.fontFamily,position:`relative`})},[d(`thead`,Ne,[Ae((g(),u(`tr`,{role:`row`,class:`vue-ui-data-table__thead-row`,style:h({backgroundColor:k.value.backgroundColor,color:k.value.color})},[d(`th`,{role:`cell`,style:h({backgroundColor:k.value.backgroundColor,border:k.value.outline,textAlign:k.value.textAlign,fontWeight:k.value.bold?`bold`:`normal`}),class:`sticky-col-first`},[d(`div`,{style:h({display:`flex`,flexDirection:`row`,alignItems:`center`,gap:`3px`,justifyContent:k.value.textAlign})},[d(`span`,null,y(E.value.translations.serie),1),U.value.length>1&&E.value.sortedSeriesName?(g(),u(`div`,Pe,[d(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down`,onClick:r[0]||=e=>J({type:`name`},null,-1),style:h({cursor:M.value?`pointer`:`default`})},[f(b(x),{size:12,name:`arrowBottom`,stroke:k.value.color,style:h({opacity:Z.value===`name`&&X.value.name===-1?1:.3})},null,8,[`stroke`,`style`])],4),d(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up`,onClick:r[1]||=e=>J({type:`name`},null,1),style:h({cursor:M.value?`pointer`:`default`})},[f(b(x),{size:12,name:`arrowTop`,stroke:k.value.color,style:h({opacity:Z.value===`name`&&X.value.name===1?1:.3})},null,8,[`stroke`,`style`])],4)])):l(``,!0)],4)],4),(g(!0),u(s,null,v(Y.value,(r,i)=>(g(),u(`th`,{role:`cell`,style:h({background:k.value.backgroundColor,border:k.value.outline,textAlign:k.value.textAlign,fontWeight:k.value.bold?`bold`:`normal`,minWidth:i===Y.value.length-1?`${O.value.dimensions.width}px`:`48px`,paddingRight:i===Y.value.length-1&&D.value.show?`36px`:``}),class:m({"sticky-col":i===Y.value.length-1&&E.value.showSparklines})},[d(`div`,{style:h({display:`flex`,flexDirection:`row`,alignItems:`center`,gap:`3px`,justifyContent:k.value.textAlign})},[d(`span`,null,y(r.value),1),U.value.length>1&&(bt(i)||xt(r))?(g(),u(`div`,Fe,[d(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down`,onClick:()=>J(r,i,-1),style:h({cursor:M.value?`pointer`:`default`})},[f(b(x),{size:12,name:`arrowBottom`,stroke:k.value.color,style:h({opacity:St(i,r,-1)})},null,8,[`stroke`,`style`])],12,Ie),d(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up`,onClick:()=>J(r,i,1),style:h({cursor:M.value?`pointer`:`default`})},[f(b(x),{size:12,name:`arrowTop`,stroke:k.value.color,style:h({opacity:St(i,r,1)})},null,8,[`stroke`,`style`])],12,Le)])):l(``,!0)],4),D.value.show&&i===Y.value.length-1&&(b($e)||b(N))?(g(),ve(b(Ke),{ref_for:!0,ref:`details`,key:`user_option_${Ye.value}`,backgroundColor:k.value.backgroundColor,color:k.value.color,isPrinting:b(tt),isImaging:b(nt),uid:C.value,hasPdf:D.value.buttons.pdf,hasXls:D.value.buttons.csv,hasImg:D.value.buttons.img,hasFullscreen:D.value.buttons.fullscreen,hasAltCopy:D.value.buttons.altCopy,isFullscreen:_t.value,titles:{...D.value.buttonTitles},chartElement:P.value,position:D.value.position,callbacks:D.value.callbacks,printScale:D.value.print.scale,isCursorPointer:M.value,onToggleFullscreen:vt,onGeneratePdf:b(rt),onGenerateImage:wt,onGenerateCsv:yt,onCopyAlt:Tt,style:h({visibility:b($e)?b(N)?`visible`:`hidden`:`visible`})},ye({_:2},[v(b(t)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionFullscreen optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:ke(r=>[we(e.$slots,t,be({ref_for:!0},b(n)(t,r)),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasXls`,`hasImg`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`titles`,`chartElement`,`position`,`callbacks`,`printScale`,`isCursorPointer`,`onGeneratePdf`,`style`])):l(``,!0)],6))),256))],4)),[[b(he),Ct]])]),d(`tbody`,null,[(g(!0),u(s,null,v(U.value,(e,t)=>(g(),u(`tr`,{role:`row`,style:h({backgroundColor:A.value.backgroundColor,color:A.value.color}),class:m({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":t%2==0,"vue-ui-data-table__tbody__row-odd":t%2!=0})},[d(`td`,{role:`cell`,style:h({backgroundColor:A.value.backgroundColor,border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign}),"data-cell":E.value.translations.serie,class:`vue-ui-data-table__tbody__td sticky-col-first`},[d(`div`,{dir:`auto`,style:h({display:`flex`,flexDirection:`row`,alignItems:`center`,gap:`6px`,justifyContent:A.value.textAlign})},[A.value.showColorMarker?(g(),u(`span`,{key:0,style:h({color:e.color})},`⬤`,4)):l(``,!0),d(`span`,null,y(e.name??`-`),1)],4)],12,Re),(g(!0),u(s,null,v(dt.value,(n,r)=>(g(),u(`td`,{dir:`auto`,role:`cell`,ref_for:!0,ref_key:`TD`,ref:T,style:h({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign,background:Q.value!==void 0&&r===Q.value?A.value.selectedColor.useSerieColor?b(ee)(e.color,20):A.value.selectedColor.fallback:``}),"data-cell":Y.value[r]?Y.value[r].value:``,class:`vue-ui-data-table__tbody__td`,onPointerenter:e=>{ht.value=t,Q.value=r}},y(B(e.values[r],E.value.roundingValues,{datapoint:e,seriesIndex:t,datapointIndex:r})),45,ze))),256)),E.value.showTotal?(g(),u(`td`,{key:0,dir:`auto`,role:`cell`,style:h({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign}),"data-cell":E.value.translations.total,class:`vue-ui-data-table__tbody__td`},y(B(e.sum,E.value.roundingTotal,{datapoint:e.sum,seriesIndex:t})),13,Be)):l(``,!0),E.value.showAverage?(g(),u(`td`,{key:1,dir:`auto`,role:`cell`,style:h({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign}),"data-cell":E.value.translations.average,class:`vue-ui-data-table__tbody__td`},y(B(e.average,E.value.roundingAverage,{datapoint:e.average,seriesIndex:t})),13,Ve)):l(``,!0),E.value.showMedian?(g(),u(`td`,{key:2,dir:`auto`,role:`cell`,style:h({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign}),"data-cell":E.value.translations.median,class:`vue-ui-data-table__tbody__td`},y(B(e.median,E.value.roundingMedian,{datapoint:e.median,seriesIndex:t})),13,He)):l(``,!0),E.value.showSparklines?(g(),u(`td`,{key:3,role:`cell`,"data-cell":E.value.translations.chart,style:h({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign,backgroundColor:A.value.backgroundColor,padding:`0`}),class:`vue-ui-data-table__tbody__td sticky-col`},[f(b(Ge),{onHoverIndex:({index:e})=>gt({dataIndex:e,serieIndex:t}),"height-ratio":O.value.dimensions.heightRatio,"forced-padding":30,dataset:e.sparklineDataset,showInfo:!1,selectedIndex:Q.value,config:{type:O.value.type,style:{backgroundColor:`transparent`,animation:{show:O.value.animation.show&&!b(tt)&&!b(nt),animationFrames:O.value.animation.animationFrames},padding:{right:12},line:{color:e.color,smooth:O.value.smooth,cutNullValues:O.value.cutNullValues,strokeWidth:O.value.strokeWidth},bar:{color:e.color},area:{color:e.color,opacity:O.value.showArea?16:0,useGradient:O.value.useGradient},verticalIndicator:{color:e.color},plot:{radius:9,stroke:A.value.backgroundColor,strokeWidth:3}}}},null,8,[`onHoverIndex`,`height-ratio`,`dataset`,`selectedIndex`,`config`])],12,Ue)):l(``,!0)],6))),256))])],4)],32),e.$slots.source?(g(),u(`div`,We,[we(e.$slots,`source`,{},void 0,!0)],512)):l(``,!0)],42,Me))}},[[`__scopeId`,`data-v-bb68c573`]]);export{je as n,Ge as t};
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useAnimationFrame-D8gcRfnW.js";import{n,r,t as i}from"./userOptionsSlots-CWtXN5Q6.js";import{n as a,r as ee,t as te}from"./annotationSlots-OLiW25XN.js";import{n as ne}from"./resolveChartConfig-0IvbmIE_.js";import{$ as re,Ht as o,Jt as ie,S as s,X as ae,at as oe,b as c,i as se,in as ce,t as le,w as ue,yt as de,zt as fe}from"./lib-rPeBMZrn.js";import{c as pe}from"./canvas-lib-22VpOI4_.js";import{n as me,t as he}from"./useHints-C-TwxM0Y.js";import{t as ge}from"./useConfig-B8qvYKdK.js";import{t as _e}from"./useLoading-DoqqfnmS.js";import{t as ve}from"./usePrinter-DVf3YcG5.js";import{t as ye}from"./useResponsive-CENUxfEL.js";import{t as be}from"./useChartExport-BZts4KFb.js";import{t as xe}from"./useUserOptionState-CXlFnwPv.js";import{t as Se}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ce}from"./usePrefersMotion-XLHwega2.js";import{t as we}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Te}from"./vue_ui_thermometer-DsLnfqd2.js";import{n as Ee}from"./Title-BliHuXfT.js";import{t as De}from"./img-D4RQwASc.js";import{t as Oe}from"./BaseScanner-m6QR9rwD.js";import{t as ke}from"./DefGrad-DKMq1REY.js";import{t as Ae}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as je,createVNode as Me,defineAsyncComponent as h,guardReactiveProps as g,mergeProps as Ne,normalizeClass as _,normalizeProps as v,normalizeStyle as Pe,onBeforeUnmount as Fe,onMounted as Ie,openBlock as y,ref as b,renderList as x,renderSlot as S,toDisplayString as C,toRefs as Le,unref as w,useCssVars as Re,watch as ze,withCtx as Be}from"vue";var Ve=/* @__PURE__ */ e({default:()=>T}),He=[`id`],Ue={key:1,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},We=[`xmlns`,`viewBox`,`aria-labelledby`,`aria-describedby`],Ge=[`id`],Ke=[`id`],qe=[`width`,`height`],Je=[`id`],Ye=[`x`,`y`,`width`,`height`,`rx`,`ry`],Xe=[`clip-path`],Ze=[`x`,`y`,`height`,`width`],Qe=[`x`,`y`,`height`,`width`,`fill`],$e=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],et=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],tt=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],nt=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],rt=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],it=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],at=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],ot=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],st=[`x`,`y`,`height`,`width`],ct=[`aria-label`],lt=[`x`,`y`,`height`],ut=[`y`,`x`,`fill`,`font-size`,`font-weight`],dt={key:4,class:`vue-data-ui-watermark`},T=/*#__PURE__*/ Ae({__name:`vue-ui-thermometer`,props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:Ae,emit:Ve}){Re(e=>({fdaea97c:zt.value,dee374e8:Rt.value,v77c7cd79:Lt.value}));let T=h(()=>import(`./PackageVersion-DAF5ApGl.js`).then(e=>e.t)),ft=h(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),pt=h(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),{vue_ui_thermometer:mt}=ge(),ht=Ce(),E=e,gt=Ve,D=b(ae()),O=b(null),_t=b(0),vt=b(0),yt=b(null),bt=b(null),k=b(null),A=b(null),xt=t(),j=0;function St(){j+=1,xt.cancel(),k.value?.disconnect(),k.value=null,A.value=null}Fe(St);let Ct=u(()=>!!E.dataset&&Object.keys(E.dataset).length);Ie(()=>{Ot()});let M=b(V()),N=u(()=>M.value.userOptions),P=u(()=>M.value.style.chart.graduations),F=u(()=>M.value.style.chart);me({config:()=>M.value,dataset:()=>E.dataset,component:`VueUiThermometer`,rules:[he.noHint]});let wt=b(F.value.thermometer.width),I=b(F.value.height),L=b(F.value.width),Tt=u(()=>M.value.userOptions.useCursorPointer),Et=u(()=>ce({defaultConfig:{userOptions:{show:!1},style:{chart:{animation:{use:!1},backgroundColor:`#99999930`,graduations:{stroke:`#6A6A6A`}}}},userConfig:M.value.skeletonConfig??{}})),{loading:R,FINAL_DATASET:z}=_e({...Le(E),FINAL_CONFIG:M,prepareConfig:V,skeletonDataset:E.config?.skeletonDataset??{value:0,from:-100,to:100,steps:20,colors:{from:`#A1A1A1`,to:`#CACACA`}},skeletonConfig:ce({defaultConfig:M.value,userConfig:Et.value})}),Dt=u(()=>M.value.debug);function Ot(){if(St(),fe(E.dataset)?oe({componentName:`VueUiThermometer`,type:`dataset`,debug:Dt.value}):de({datasetObject:E.dataset,requiredAttributes:[`value`,`from`,`to`]}).forEach(e=>{oe({componentName:`VueUiThermometer`,type:`datasetAttribute`,property:e,debug:Dt.value})}),M.value.responsive&&O.value){let e=j,t=pe(()=>{if(e!==j||xt.isDisposed())return;let{width:t,height:n}=ye({chart:O.value,title:M.value.style.title.text?yt.value:null,source:bt.value});xt.request(()=>{I.value=Math.max(.1,n-12),L.value=t,Gt()})});k.value=new ResizeObserver(t),A.value=O.value,k.value.observe(A.value)}Gt()}let{userOptionsVisible:kt,setUserOptionsVisibility:At,keepUserOptionState:jt}=xe({config:M.value}),{svgRef:B}=Se({config:M.value.style.title});function V(){return ne(E.config,mt,Te)}ze(()=>E.config,e=>{M.value=V(),kt.value=!M.value.userOptions.showOnChartHover,wt.value=F.value.thermometer.width,I.value=F.value.height,L.value=F.value.width,Ot(),vt.value+=1},{deep:!0});let{isPrinting:H,isImaging:U,generatePdf:Mt,generateImage:Nt}=ve({elementId:`thermometer__${D.value}`,fileName:M.value.style.title.text||`vue-ui-thermometer`,options:M.value.userOptions.print}),Pt=u(()=>M.value.userOptions.show&&!M.value.style.title.text),W=u(()=>ue(M.value.customPalette)),G=u(()=>z.value.steps||10);function K(e,t,n){let r=[],i=Ft(e),a=Ft(t);for(let e=0;e<n;e+=1){let t=q(i.red,a.red,e,n),ee=q(i.green,a.green,e,n),te=q(i.blue,a.blue,e,n),ne=`#${J(t)}${J(ee)}${J(te)}`;r.push(ne)}return r}function Ft(e){let t=e.slice(1);return{red:parseInt(t.slice(0,2),16),green:parseInt(t.slice(2,4),16),blue:parseInt(t.slice(4,6),16)}}function q(e,t,n,r){return Math.round(e+(t-e)*n/r)}function J(e){return e.toString(16).padStart(2,`0`)}let Y=u(()=>{let e=Math.max(.1,L.value),t=Math.max(.1,I.value),n=F.value.padding;return{width:e,left:e/2-F.value.thermometer.width/2,right:e/2+F.value.thermometer.width/2,top:n.top,bottom:t-n.bottom-n.top,height:t,thermoHeight:t-n.top-n.bottom,thermoWidth:F.value.thermometer.width}}),It=u(()=>Y.value),X=u(()=>{let e=c(z.value.from)<0?Math.abs(c(z.value.from)):c(z.value.from),t=c(z.value.to)<0?Math.abs(c(z.value.to)):c(z.value.to),n=0;return n=c(z.value.to)>0?e+t:e>t?e-t:t-e,(1-(Math.abs(c(z.value.from))+c(z.value.value))/n)*Y.value.thermoHeight}),Lt=u(()=>`${X.value}px`),Rt=u(()=>`${Y.value.thermoHeight}px`),zt=u(()=>ht.value?`0ms`:`${F.value.animation.speedMs}ms`),Bt=u(()=>{if(z.value.colors){if(!z.value.colors.from)return K(W.value[0]||o[0],s(z.value.colors.to),G.value||10);if(!z.value.colors.to)return K(s(z.value.colors.from),W.value[1]||o[1],G.value||10)}else return K(W.value[1]||o[1],W.value[0]||o[0],G.value||10);return K(s(z.value.colors.from),s(z.value.colors.to),G.value||10)}),Vt=u(()=>{let e=[],t=0,n=Y.value.thermoHeight;for(let r=0;r<n-1;r+=n/G.value)e.push({x:Y.value.left,y:Y.value.top+r,qYLess:Y.value.top+r+n/G.value/4,halfY:Y.value.top+r+n/G.value/2,qYMore:Y.value.top+r+n/G.value/4*3,color:Bt.value[t],height:Math.max(.1,n/G.value)}),t+=1;return e}),Z=b(!1);function Ht(e){Z.value=e,_t.value+=1}let Q=b(!1);function Ut(){Q.value=!Q.value}async function Wt({scale:e=2}={}){if(!O.value)return;let{width:t,height:n}=O.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await De({domElement:O.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:M.value.style.title.text,width:t,height:n,aspectRatio:r}}let $=u({get:()=>F.value.label.fontSize,set:e=>e}),{autoSizeLabels:Gt}=we({svgRef:B,fontSize:F.value.label.fontSize,minFontSize:F.value.label.minFontSize,sizeRef:$,labelClass:`.vue-ui-thermometer-label`}),Kt=u(()=>F.value.backgroundColor),qt=u(()=>M.value.style.title),{isCallbackImaging:Jt,isCallbackSvg:Yt,generateSvg:Xt,onGenerateImage:Zt}=be({svg:B,title:qt,legend:null,legendItems:null,backgroundColor:Kt,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:Nt});async function Qt(){gt(`copyAlt`,{config:M.value,dataset:z.value}),M.value.userOptions.callbacks.altCopy?await Promise.resolve(M.value.userOptions.callbacks.altCopy({config:M.value,dataset:z.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let $t=u(()=>`${D.value}-title`),en=u(()=>`${D.value}-desc`),tn=u(()=>se(F.value.label.formatter,z.value.value,re({p:F.value.label.prefix,v:z.value.value,s:F.value.label.suffix,r:F.value.label.rounding}),{datapoint:z.value})),nn=u(()=>M.value.style.title.text||``),rn=u(()=>{if(R.value)return`...`;let e=c(z.value.from),t=c(z.value.to);return`Thermometer value: ${tn.value}. Range: ${e} to ${t}.`});return Ae({getImage:Wt,generatePdf:Mt,generateImage:Nt,generateSvg:Xt,toggleAnnotator:Ut,toggleFullscreen:Ht,copyAlt:Qt}),(e,t)=>(y(),p(`div`,{ref_key:`thermoChart`,ref:O,class:_(`vue-data-ui-component vue-ui-thermometer ${Z.value?`vue-data-ui-wrapper-fullscreen`:``}`),style:Pe(`width:100%;background:${F.value.backgroundColor};color:${F.value.color};font-family:${M.value.style.fontFamily}`),id:`thermometer__${D.value}`,onMouseenter:t[0]||=()=>w(At)(!0),onMouseleave:t[1]||=()=>w(At)(!1)},[N.value.buttons.annotator?(y(),d(w(ft),Ne({key:0},w(ee)(N.value.annotator),{svgRef:w(B),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Q.value,isCursorPointer:Tt.value,palette:N.value.annotatorPalette,onClose:Ut}),je({_:2},[x(w(te),t=>({name:t,fn:Be(n=>[S(e.$slots,t,v(g(w(a)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),Pt.value?(y(),p(`div`,Ue,null,512)):f(``,!0),M.value.style.title.text?(y(),p(`div`,{key:2,ref_key:`chartTitle`,ref:yt,style:`width:100%`},[(y(),d(Ee,{key:`title_${vt.value}`,config:{title:{cy:`thermometer-div-title`,...M.value.style.title},subtitle:{cy:`thermometer-div-subtitle`,...M.value.style.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),N.value.show&&Ct.value&&(w(jt)||w(kt))?(y(),d(w(pt),Ne({ref:`details`,key:`user_options_${_t.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isImaging:w(U),isPrinting:w(H),uid:D.value,hasXls:!1,isFullscreen:Z.value,chartElement:O.value},w(r)(N.value,`pdf img svg fullscreen altCopy annotator`),{isAnnotation:Q.value,isCursorPointer:Tt.value,onToggleFullscreen:Ht,onGeneratePdf:w(Mt),onGenerateImage:w(Zt),onGenerateSvg:w(Xt),onToggleAnnotator:Ut,onCopyAlt:Qt,style:{visibility:w(jt)?w(kt)?`visible`:`hidden`:`visible`}}),je({_:2},[x(w(n)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Be(n=>[S(e.$slots,t,v(g(w(i)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isImaging`,`isPrinting`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):f(``,!0),(y(),p(`svg`,{ref_key:`svgRef`,ref:B,xmlns:w(le),class:_({"vue-data-ui-fullscreen--on":Z.value,"vue-data-ui-fulscreen--off":!Z.value}),width:`100%`,viewBox:`0 0 ${Y.value.width} ${Y.value.height}`,style:`background:transparent`,"aria-labelledby":$t.value,"aria-describedby":en.value},[m(`title`,{id:$t.value},C(nn.value),9,Ge),m(`desc`,{id:en.value},C(rn.value),9,Ke),Me(w(T)),S(e.$slots,`svg-underlayer`,{svg:{...It.value,isPrintingImg:w(H)||w(U)||w(Jt),isPrintingSvg:w(Yt)}},void 0,!0),e.$slots[`chart-background`]?(y(),p(`foreignObject`,{key:0,x:0,y:0,width:Y.value.width,height:Y.value.height,style:{pointerEvents:`none`}},[S(e.$slots,`chart-background`,{},void 0,!0)],8,qe)):f(``,!0),m(`defs`,null,[m(`clipPath`,{id:`vueUiPill-${D.value}`,clipPathUnits:`userSpaceOnUse`},[m(`rect`,{x:Y.value.left,y:Y.value.top,width:Y.value.thermoWidth,height:Y.value.thermoHeight,rx:Y.value.thermoWidth/2,ry:Y.value.thermoWidth/2},null,8,Ye)],8,Je),(y(!0),p(l,null,x(Vt.value,(e,t)=>(y(),d(ke,{t:`linear`,id:`vueUiThermometerGradient_${t}_${D.value}`,key:`t_${t}_${D.value}`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,stops:[[`0%`,e.color,1],[`50%`,w(ie)(e.color,100-P.value.gradient.intensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128))]),m(`g`,{"clip-path":`url(#vueUiPill-${D.value})`},[m(`rect`,{x:Y.value.left,y:Y.value.top,height:Y.value.thermoHeight,width:Y.value.thermoWidth,fill:`#FFFFFF`},null,8,Ze),(y(!0),p(l,null,x(Vt.value,(e,t)=>(y(),p(`g`,{key:`graduation_${t}`},[m(`rect`,{x:e.x,y:e.y,height:e.height,width:Y.value.thermoWidth,fill:P.value.gradient.show?`url(#vueUiThermometerGradient_${t}_${D.value})`:e.color,"shape-rendering":`crispEdges`},null,8,Qe),P.value.show&&[`both`,`left`].includes(P.value.sides)?(y(),p(`line`,{key:0,x1:e.x,x2:e.x+10,y1:e.y,y2:e.y,"stroke-width":P.value.strokeWidth,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,$e)):f(``,!0),P.value.showIntermediate?(y(),p(l,{key:1},[P.value.show&&[`both`,`left`].includes(P.value.sides)?(y(),p(`line`,{key:0,x1:e.x,x2:e.x+5,y1:e.halfY,y2:e.halfY,"stroke-width":P.value.strokeWidth/2,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,et)):f(``,!0),P.value.show&&[`both`,`left`].includes(P.value.sides)?(y(),p(`line`,{key:1,x1:e.x,x2:e.x+2.5,y1:e.qYLess,y2:e.qYLess,"stroke-width":P.value.strokeWidth/2,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,tt)):f(``,!0),P.value.show&&[`both`,`left`].includes(P.value.sides)?(y(),p(`line`,{key:2,x1:e.x,x2:e.x+2.5,y1:e.qYMore,y2:e.qYMore,"stroke-width":P.value.strokeWidth/2,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,nt)):f(``,!0)],64)):f(``,!0),P.value.show&&[`both`,`right`].includes(P.value.sides)?(y(),p(`line`,{key:2,x1:Y.value.right,x2:Y.value.right-10,y1:e.y,y2:e.y,"stroke-width":P.value.strokeWidth,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,rt)):f(``,!0),P.value.showIntermediate?(y(),p(l,{key:3},[P.value.show&&[`both`,`right`].includes(P.value.sides)?(y(),p(`line`,{key:0,x1:Y.value.right,x2:Y.value.right-5,y1:e.halfY,y2:e.halfY,"stroke-width":P.value.strokeWidth/2,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,it)):f(``,!0),P.value.show&&[`both`,`right`].includes(P.value.sides)?(y(),p(`line`,{key:1,x1:Y.value.right,x2:Y.value.right-2.5,y1:e.qYLess,y2:e.qYLess,"stroke-width":P.value.strokeWidth/2,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,at)):f(``,!0),P.value.show&&[`both`,`right`].includes(P.value.sides)?(y(),p(`line`,{key:2,x1:Y.value.right,x2:Y.value.right-2.5,y1:e.qYMore,y2:e.qYMore,"stroke-width":P.value.strokeWidth/2,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,ot)):f(``,!0)],64)):f(``,!0)]))),128)),m(`rect`,{class:_({"vue-ui-thermometer-temperature":F.value.animation.use}),x:Y.value.left,y:Y.value.top,height:X.value,width:Y.value.thermoWidth,fill:`#FFFFFF66`},null,10,st)],8,Xe),F.value.label.show?(y(),p(`g`,{key:1,role:`status`,"aria-live":`polite`,"aria-label":w(R)?`Loading data`:tn.value},[w(R)?(y(),p(`rect`,{key:0,x:Y.value.left-60,y:X.value+Y.value.top-$.value/2,width:50,height:$.value,fill:`#6A6A6A40`,rx:`3`},null,8,lt)):(y(),p(`text`,{key:1,"aria-hidden":`true`,class:_({"vue-ui-thermometer-temperature-value":F.value.animation.use,"vue-ui-thermometer-label":!0}),y:X.value+Y.value.top+$.value/3,x:Y.value.left-10,"text-anchor":`end`,fill:F.value.label.color,"font-size":$.value,"font-weight":F.value.label.bold?`bold`:`normal`},C(tn.value),11,ut))],8,ct)):f(``,!0),S(e.$slots,`svg`,{svg:{...It.value,isPrintingImg:w(H)||w(U)||w(Jt),isPrintingSvg:w(Yt)}},void 0,!0)],10,We)),e.$slots.watermark?(y(),p(`div`,dt,[S(e.$slots,`watermark`,v(g({isPrinting:w(H)||w(U)||w(Jt)||w(Yt)})),void 0,!0)])):f(``,!0),e.$slots.source?(y(),p(`div`,{key:5,ref_key:`source`,ref:bt,dir:`auto`},[S(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),S(e.$slots,`skeleton`,{},()=>[w(R)?(y(),d(Oe,{key:0})):f(``,!0)],!0)],46,He))}},[[`__scopeId`,`data-v-e6779ee0`]]);export{Ve as n,T as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useAnimationFrame-D8gcRfnW.js";import{n,r,t as i}from"./userOptionsSlots-CWtXN5Q6.js";import{n as a,r as ee,t as te}from"./annotationSlots-OLiW25XN.js";import{n as ne}from"./resolveChartConfig-QgMumfgd.js";import{$ as re,Ht as o,Jt as ie,S as s,X as ae,at as oe,b as c,i as se,in as ce,t as le,w as ue,yt as de,zt as fe}from"./lib-BaWaqwnJ.js";import{c as pe}from"./canvas-lib-22VpOI4_.js";import{n as me,t as he}from"./useHints-C-TwxM0Y.js";import{t as ge}from"./useConfig-B-AzS3w-.js";import{t as _e}from"./useLoading-DoqqfnmS.js";import{t as ve}from"./usePrinter-CUD8gosC.js";import{t as ye}from"./useResponsive-CENUxfEL.js";import{t as be}from"./useChartExport-BZts4KFb.js";import{t as xe}from"./useUserOptionState-CXlFnwPv.js";import{t as Se}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ce}from"./usePrefersMotion-XLHwega2.js";import{t as we}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Te}from"./vue_ui_thermometer-DsLnfqd2.js";import{n as Ee}from"./Title-DlhGIAWX.js";import{t as De}from"./img-Dwb4XSud.js";import{t as Oe}from"./BaseScanner-m6QR9rwD.js";import{t as ke}from"./DefGrad-DKMq1REY.js";import{t as Ae}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as je,createVNode as Me,defineAsyncComponent as h,guardReactiveProps as g,mergeProps as Ne,normalizeClass as _,normalizeProps as v,normalizeStyle as Pe,onBeforeUnmount as Fe,onMounted as Ie,openBlock as y,ref as b,renderList as x,renderSlot as S,toDisplayString as C,toRefs as Le,unref as w,useCssVars as Re,watch as ze,withCtx as Be}from"vue";var Ve=/* @__PURE__ */ e({default:()=>T}),He=[`id`],Ue={key:1,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},We=[`xmlns`,`viewBox`,`aria-labelledby`,`aria-describedby`],Ge=[`id`],Ke=[`id`],qe=[`width`,`height`],Je=[`id`],Ye=[`x`,`y`,`width`,`height`,`rx`,`ry`],Xe=[`clip-path`],Ze=[`x`,`y`,`height`,`width`],Qe=[`x`,`y`,`height`,`width`,`fill`],$e=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],et=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],tt=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],nt=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],rt=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],it=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],at=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],ot=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],st=[`x`,`y`,`height`,`width`],ct=[`aria-label`],lt=[`x`,`y`,`height`],ut=[`y`,`x`,`fill`,`font-size`,`font-weight`],dt={key:4,class:`vue-data-ui-watermark`},T=/*#__PURE__*/ Ae({__name:`vue-ui-thermometer`,props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:Ae,emit:Ve}){Re(e=>({fdaea97c:zt.value,dee374e8:Rt.value,v77c7cd79:Lt.value}));let T=h(()=>import(`./PackageVersion-B-1JX0wI.js`).then(e=>e.t)),ft=h(()=>import(`./PenAndPaper-B2UOwiJM.js`).then(e=>e.t)),pt=h(()=>import(`./UserOptions-B97cPcKc.js`).then(e=>e.n)),{vue_ui_thermometer:mt}=ge(),ht=Ce(),E=e,gt=Ve,D=b(ae()),O=b(null),_t=b(0),vt=b(0),yt=b(null),bt=b(null),k=b(null),A=b(null),xt=t(),j=0;function St(){j+=1,xt.cancel(),k.value?.disconnect(),k.value=null,A.value=null}Fe(St);let Ct=u(()=>!!E.dataset&&Object.keys(E.dataset).length);Ie(()=>{Ot()});let M=b(V()),N=u(()=>M.value.userOptions),P=u(()=>M.value.style.chart.graduations),F=u(()=>M.value.style.chart);me({config:()=>M.value,dataset:()=>E.dataset,component:`VueUiThermometer`,rules:[he.noHint]});let wt=b(F.value.thermometer.width),I=b(F.value.height),L=b(F.value.width),Tt=u(()=>M.value.userOptions.useCursorPointer),Et=u(()=>ce({defaultConfig:{userOptions:{show:!1},style:{chart:{animation:{use:!1},backgroundColor:`#99999930`,graduations:{stroke:`#6A6A6A`}}}},userConfig:M.value.skeletonConfig??{}})),{loading:R,FINAL_DATASET:z}=_e({...Le(E),FINAL_CONFIG:M,prepareConfig:V,skeletonDataset:E.config?.skeletonDataset??{value:0,from:-100,to:100,steps:20,colors:{from:`#A1A1A1`,to:`#CACACA`}},skeletonConfig:ce({defaultConfig:M.value,userConfig:Et.value})}),Dt=u(()=>M.value.debug);function Ot(){if(St(),fe(E.dataset)?oe({componentName:`VueUiThermometer`,type:`dataset`,debug:Dt.value}):de({datasetObject:E.dataset,requiredAttributes:[`value`,`from`,`to`]}).forEach(e=>{oe({componentName:`VueUiThermometer`,type:`datasetAttribute`,property:e,debug:Dt.value})}),M.value.responsive&&O.value){let e=j,t=pe(()=>{if(e!==j||xt.isDisposed())return;let{width:t,height:n}=ye({chart:O.value,title:M.value.style.title.text?yt.value:null,source:bt.value});xt.request(()=>{I.value=Math.max(.1,n-12),L.value=t,Gt()})});k.value=new ResizeObserver(t),A.value=O.value,k.value.observe(A.value)}Gt()}let{userOptionsVisible:kt,setUserOptionsVisibility:At,keepUserOptionState:jt}=xe({config:M.value}),{svgRef:B}=Se({config:M.value.style.title});function V(){return ne(E.config,mt,Te)}ze(()=>E.config,e=>{M.value=V(),kt.value=!M.value.userOptions.showOnChartHover,wt.value=F.value.thermometer.width,I.value=F.value.height,L.value=F.value.width,Ot(),vt.value+=1},{deep:!0});let{isPrinting:H,isImaging:U,generatePdf:Mt,generateImage:Nt}=ve({elementId:`thermometer__${D.value}`,fileName:M.value.style.title.text||`vue-ui-thermometer`,options:M.value.userOptions.print}),Pt=u(()=>M.value.userOptions.show&&!M.value.style.title.text),W=u(()=>ue(M.value.customPalette)),G=u(()=>z.value.steps||10);function K(e,t,n){let r=[],i=Ft(e),a=Ft(t);for(let e=0;e<n;e+=1){let t=q(i.red,a.red,e,n),ee=q(i.green,a.green,e,n),te=q(i.blue,a.blue,e,n),ne=`#${J(t)}${J(ee)}${J(te)}`;r.push(ne)}return r}function Ft(e){let t=e.slice(1);return{red:parseInt(t.slice(0,2),16),green:parseInt(t.slice(2,4),16),blue:parseInt(t.slice(4,6),16)}}function q(e,t,n,r){return Math.round(e+(t-e)*n/r)}function J(e){return e.toString(16).padStart(2,`0`)}let Y=u(()=>{let e=Math.max(.1,L.value),t=Math.max(.1,I.value),n=F.value.padding;return{width:e,left:e/2-F.value.thermometer.width/2,right:e/2+F.value.thermometer.width/2,top:n.top,bottom:t-n.bottom-n.top,height:t,thermoHeight:t-n.top-n.bottom,thermoWidth:F.value.thermometer.width}}),It=u(()=>Y.value),X=u(()=>{let e=c(z.value.from)<0?Math.abs(c(z.value.from)):c(z.value.from),t=c(z.value.to)<0?Math.abs(c(z.value.to)):c(z.value.to),n=0;return n=c(z.value.to)>0?e+t:e>t?e-t:t-e,(1-(Math.abs(c(z.value.from))+c(z.value.value))/n)*Y.value.thermoHeight}),Lt=u(()=>`${X.value}px`),Rt=u(()=>`${Y.value.thermoHeight}px`),zt=u(()=>ht.value?`0ms`:`${F.value.animation.speedMs}ms`),Bt=u(()=>{if(z.value.colors){if(!z.value.colors.from)return K(W.value[0]||o[0],s(z.value.colors.to),G.value||10);if(!z.value.colors.to)return K(s(z.value.colors.from),W.value[1]||o[1],G.value||10)}else return K(W.value[1]||o[1],W.value[0]||o[0],G.value||10);return K(s(z.value.colors.from),s(z.value.colors.to),G.value||10)}),Vt=u(()=>{let e=[],t=0,n=Y.value.thermoHeight;for(let r=0;r<n-1;r+=n/G.value)e.push({x:Y.value.left,y:Y.value.top+r,qYLess:Y.value.top+r+n/G.value/4,halfY:Y.value.top+r+n/G.value/2,qYMore:Y.value.top+r+n/G.value/4*3,color:Bt.value[t],height:Math.max(.1,n/G.value)}),t+=1;return e}),Z=b(!1);function Ht(e){Z.value=e,_t.value+=1}let Q=b(!1);function Ut(){Q.value=!Q.value}async function Wt({scale:e=2}={}){if(!O.value)return;let{width:t,height:n}=O.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await De({domElement:O.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:M.value.style.title.text,width:t,height:n,aspectRatio:r}}let $=u({get:()=>F.value.label.fontSize,set:e=>e}),{autoSizeLabels:Gt}=we({svgRef:B,fontSize:F.value.label.fontSize,minFontSize:F.value.label.minFontSize,sizeRef:$,labelClass:`.vue-ui-thermometer-label`}),Kt=u(()=>F.value.backgroundColor),qt=u(()=>M.value.style.title),{isCallbackImaging:Jt,isCallbackSvg:Yt,generateSvg:Xt,onGenerateImage:Zt}=be({svg:B,title:qt,legend:null,legendItems:null,backgroundColor:Kt,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:Nt});async function Qt(){gt(`copyAlt`,{config:M.value,dataset:z.value}),M.value.userOptions.callbacks.altCopy?await Promise.resolve(M.value.userOptions.callbacks.altCopy({config:M.value,dataset:z.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let $t=u(()=>`${D.value}-title`),en=u(()=>`${D.value}-desc`),tn=u(()=>se(F.value.label.formatter,z.value.value,re({p:F.value.label.prefix,v:z.value.value,s:F.value.label.suffix,r:F.value.label.rounding}),{datapoint:z.value})),nn=u(()=>M.value.style.title.text||``),rn=u(()=>{if(R.value)return`...`;let e=c(z.value.from),t=c(z.value.to);return`Thermometer value: ${tn.value}. Range: ${e} to ${t}.`});return Ae({getImage:Wt,generatePdf:Mt,generateImage:Nt,generateSvg:Xt,toggleAnnotator:Ut,toggleFullscreen:Ht,copyAlt:Qt}),(e,t)=>(y(),p(`div`,{ref_key:`thermoChart`,ref:O,class:_(`vue-data-ui-component vue-ui-thermometer ${Z.value?`vue-data-ui-wrapper-fullscreen`:``}`),style:Pe(`width:100%;background:${F.value.backgroundColor};color:${F.value.color};font-family:${M.value.style.fontFamily}`),id:`thermometer__${D.value}`,onMouseenter:t[0]||=()=>w(At)(!0),onMouseleave:t[1]||=()=>w(At)(!1)},[N.value.buttons.annotator?(y(),d(w(ft),Ne({key:0},w(ee)(N.value.annotator),{svgRef:w(B),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Q.value,isCursorPointer:Tt.value,palette:N.value.annotatorPalette,onClose:Ut}),je({_:2},[x(w(te),t=>({name:t,fn:Be(n=>[S(e.$slots,t,v(g(w(a)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),Pt.value?(y(),p(`div`,Ue,null,512)):f(``,!0),M.value.style.title.text?(y(),p(`div`,{key:2,ref_key:`chartTitle`,ref:yt,style:`width:100%`},[(y(),d(Ee,{key:`title_${vt.value}`,config:{title:{cy:`thermometer-div-title`,...M.value.style.title},subtitle:{cy:`thermometer-div-subtitle`,...M.value.style.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),N.value.show&&Ct.value&&(w(jt)||w(kt))?(y(),d(w(pt),Ne({ref:`details`,key:`user_options_${_t.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isImaging:w(U),isPrinting:w(H),uid:D.value,hasXls:!1,isFullscreen:Z.value,chartElement:O.value},w(r)(N.value,`pdf img svg fullscreen altCopy annotator`),{isAnnotation:Q.value,isCursorPointer:Tt.value,onToggleFullscreen:Ht,onGeneratePdf:w(Mt),onGenerateImage:w(Zt),onGenerateSvg:w(Xt),onToggleAnnotator:Ut,onCopyAlt:Qt,style:{visibility:w(jt)?w(kt)?`visible`:`hidden`:`visible`}}),je({_:2},[x(w(n)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Be(n=>[S(e.$slots,t,v(g(w(i)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isImaging`,`isPrinting`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):f(``,!0),(y(),p(`svg`,{ref_key:`svgRef`,ref:B,xmlns:w(le),class:_({"vue-data-ui-fullscreen--on":Z.value,"vue-data-ui-fulscreen--off":!Z.value}),width:`100%`,viewBox:`0 0 ${Y.value.width} ${Y.value.height}`,style:`background:transparent`,"aria-labelledby":$t.value,"aria-describedby":en.value},[m(`title`,{id:$t.value},C(nn.value),9,Ge),m(`desc`,{id:en.value},C(rn.value),9,Ke),Me(w(T)),S(e.$slots,`svg-underlayer`,{svg:{...It.value,isPrintingImg:w(H)||w(U)||w(Jt),isPrintingSvg:w(Yt)}},void 0,!0),e.$slots[`chart-background`]?(y(),p(`foreignObject`,{key:0,x:0,y:0,width:Y.value.width,height:Y.value.height,style:{pointerEvents:`none`}},[S(e.$slots,`chart-background`,{},void 0,!0)],8,qe)):f(``,!0),m(`defs`,null,[m(`clipPath`,{id:`vueUiPill-${D.value}`,clipPathUnits:`userSpaceOnUse`},[m(`rect`,{x:Y.value.left,y:Y.value.top,width:Y.value.thermoWidth,height:Y.value.thermoHeight,rx:Y.value.thermoWidth/2,ry:Y.value.thermoWidth/2},null,8,Ye)],8,Je),(y(!0),p(l,null,x(Vt.value,(e,t)=>(y(),d(ke,{t:`linear`,id:`vueUiThermometerGradient_${t}_${D.value}`,key:`t_${t}_${D.value}`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,stops:[[`0%`,e.color,1],[`50%`,w(ie)(e.color,100-P.value.gradient.intensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128))]),m(`g`,{"clip-path":`url(#vueUiPill-${D.value})`},[m(`rect`,{x:Y.value.left,y:Y.value.top,height:Y.value.thermoHeight,width:Y.value.thermoWidth,fill:`#FFFFFF`},null,8,Ze),(y(!0),p(l,null,x(Vt.value,(e,t)=>(y(),p(`g`,{key:`graduation_${t}`},[m(`rect`,{x:e.x,y:e.y,height:e.height,width:Y.value.thermoWidth,fill:P.value.gradient.show?`url(#vueUiThermometerGradient_${t}_${D.value})`:e.color,"shape-rendering":`crispEdges`},null,8,Qe),P.value.show&&[`both`,`left`].includes(P.value.sides)?(y(),p(`line`,{key:0,x1:e.x,x2:e.x+10,y1:e.y,y2:e.y,"stroke-width":P.value.strokeWidth,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,$e)):f(``,!0),P.value.showIntermediate?(y(),p(l,{key:1},[P.value.show&&[`both`,`left`].includes(P.value.sides)?(y(),p(`line`,{key:0,x1:e.x,x2:e.x+5,y1:e.halfY,y2:e.halfY,"stroke-width":P.value.strokeWidth/2,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,et)):f(``,!0),P.value.show&&[`both`,`left`].includes(P.value.sides)?(y(),p(`line`,{key:1,x1:e.x,x2:e.x+2.5,y1:e.qYLess,y2:e.qYLess,"stroke-width":P.value.strokeWidth/2,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,tt)):f(``,!0),P.value.show&&[`both`,`left`].includes(P.value.sides)?(y(),p(`line`,{key:2,x1:e.x,x2:e.x+2.5,y1:e.qYMore,y2:e.qYMore,"stroke-width":P.value.strokeWidth/2,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,nt)):f(``,!0)],64)):f(``,!0),P.value.show&&[`both`,`right`].includes(P.value.sides)?(y(),p(`line`,{key:2,x1:Y.value.right,x2:Y.value.right-10,y1:e.y,y2:e.y,"stroke-width":P.value.strokeWidth,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,rt)):f(``,!0),P.value.showIntermediate?(y(),p(l,{key:3},[P.value.show&&[`both`,`right`].includes(P.value.sides)?(y(),p(`line`,{key:0,x1:Y.value.right,x2:Y.value.right-5,y1:e.halfY,y2:e.halfY,"stroke-width":P.value.strokeWidth/2,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,it)):f(``,!0),P.value.show&&[`both`,`right`].includes(P.value.sides)?(y(),p(`line`,{key:1,x1:Y.value.right,x2:Y.value.right-2.5,y1:e.qYLess,y2:e.qYLess,"stroke-width":P.value.strokeWidth/2,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,at)):f(``,!0),P.value.show&&[`both`,`right`].includes(P.value.sides)?(y(),p(`line`,{key:2,x1:Y.value.right,x2:Y.value.right-2.5,y1:e.qYMore,y2:e.qYMore,"stroke-width":P.value.strokeWidth/2,stroke:P.value.stroke,"stroke-linecap":`round`},null,8,ot)):f(``,!0)],64)):f(``,!0)]))),128)),m(`rect`,{class:_({"vue-ui-thermometer-temperature":F.value.animation.use}),x:Y.value.left,y:Y.value.top,height:X.value,width:Y.value.thermoWidth,fill:`#FFFFFF66`},null,10,st)],8,Xe),F.value.label.show?(y(),p(`g`,{key:1,role:`status`,"aria-live":`polite`,"aria-label":w(R)?`Loading data`:tn.value},[w(R)?(y(),p(`rect`,{key:0,x:Y.value.left-60,y:X.value+Y.value.top-$.value/2,width:50,height:$.value,fill:`#6A6A6A40`,rx:`3`},null,8,lt)):(y(),p(`text`,{key:1,"aria-hidden":`true`,class:_({"vue-ui-thermometer-temperature-value":F.value.animation.use,"vue-ui-thermometer-label":!0}),y:X.value+Y.value.top+$.value/3,x:Y.value.left-10,"text-anchor":`end`,fill:F.value.label.color,"font-size":$.value,"font-weight":F.value.label.bold?`bold`:`normal`},C(tn.value),11,ut))],8,ct)):f(``,!0),S(e.$slots,`svg`,{svg:{...It.value,isPrintingImg:w(H)||w(U)||w(Jt),isPrintingSvg:w(Yt)}},void 0,!0)],10,We)),e.$slots.watermark?(y(),p(`div`,dt,[S(e.$slots,`watermark`,v(g({isPrinting:w(H)||w(U)||w(Jt)||w(Yt)})),void 0,!0)])):f(``,!0),e.$slots.source?(y(),p(`div`,{key:5,ref_key:`source`,ref:bt,dir:`auto`},[S(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),S(e.$slots,`skeleton`,{},()=>[w(R)?(y(),d(Oe,{key:0})):f(``,!0)],!0)],46,He))}},[[`__scopeId`,`data-v-e6779ee0`]]);export{Ve as n,T as t};