vue-data-ui 3.28.5 → 3.28.6

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 (143) hide show
  1. package/dist/{PackageVersion-DWlHsdPa.js → PackageVersion-u-p5bCcj.js} +1 -1
  2. package/dist/components/vue-ui-3d-bar.js +1 -1
  3. package/dist/components/vue-ui-age-pyramid.js +1 -1
  4. package/dist/components/vue-ui-bullet.js +1 -1
  5. package/dist/components/vue-ui-bump.js +1 -1
  6. package/dist/components/vue-ui-candlestick.js +1 -1
  7. package/dist/components/vue-ui-carousel-table.js +1 -1
  8. package/dist/components/vue-ui-chestnut.js +1 -1
  9. package/dist/components/vue-ui-chord.js +1 -1
  10. package/dist/components/vue-ui-circle-pack.js +1 -1
  11. package/dist/components/vue-ui-cursor.js +1 -1
  12. package/dist/components/vue-ui-dag.js +1 -1
  13. package/dist/components/vue-ui-dashboard.js +1 -1
  14. package/dist/components/vue-ui-digits.js +1 -1
  15. package/dist/components/vue-ui-donut-evolution.js +1 -1
  16. package/dist/components/vue-ui-donut.js +1 -1
  17. package/dist/components/vue-ui-dumbbell.js +1 -1
  18. package/dist/components/vue-ui-flow.js +1 -1
  19. package/dist/components/vue-ui-funnel.js +1 -1
  20. package/dist/components/vue-ui-galaxy.js +1 -1
  21. package/dist/components/vue-ui-gauge.js +1 -1
  22. package/dist/components/vue-ui-geo.js +1 -1
  23. package/dist/components/vue-ui-gizmo.js +1 -1
  24. package/dist/components/vue-ui-graph.js +1 -1
  25. package/dist/components/vue-ui-heatmap.js +1 -1
  26. package/dist/components/vue-ui-hill.js +1 -1
  27. package/dist/components/vue-ui-history-plot.js +1 -1
  28. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  29. package/dist/components/vue-ui-kpi.js +1 -1
  30. package/dist/components/vue-ui-molecule.js +1 -1
  31. package/dist/components/vue-ui-mood-radar.js +1 -1
  32. package/dist/components/vue-ui-nested-donuts.js +1 -1
  33. package/dist/components/vue-ui-onion.js +1 -1
  34. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  35. package/dist/components/vue-ui-quadrant.js +1 -1
  36. package/dist/components/vue-ui-quick-chart.js +1 -1
  37. package/dist/components/vue-ui-radar.js +1 -1
  38. package/dist/components/vue-ui-relation-circle.js +1 -1
  39. package/dist/components/vue-ui-ridgeline.js +1 -1
  40. package/dist/components/vue-ui-rings.js +1 -1
  41. package/dist/components/vue-ui-scatter.js +1 -1
  42. package/dist/components/vue-ui-skeleton.js +1 -1
  43. package/dist/components/vue-ui-spark-trend.js +1 -1
  44. package/dist/components/vue-ui-sparkbar.js +1 -1
  45. package/dist/components/vue-ui-sparkgauge.js +1 -1
  46. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  47. package/dist/components/vue-ui-sparkline.js +1 -1
  48. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  49. package/dist/components/vue-ui-stackbar.js +1 -1
  50. package/dist/components/vue-ui-stackline.js +1 -1
  51. package/dist/components/vue-ui-strip-plot.js +1 -1
  52. package/dist/components/vue-ui-table-sparkline.js +1 -1
  53. package/dist/components/vue-ui-table.js +1 -1
  54. package/dist/components/vue-ui-thermometer.js +1 -1
  55. package/dist/components/vue-ui-timer.js +1 -1
  56. package/dist/components/vue-ui-tiremarks.js +1 -1
  57. package/dist/components/vue-ui-treemap.js +1 -1
  58. package/dist/components/vue-ui-vertical-bar.js +1 -1
  59. package/dist/components/vue-ui-waffle.js +1 -1
  60. package/dist/components/vue-ui-wheel.js +1 -1
  61. package/dist/components/vue-ui-word-cloud.js +1 -1
  62. package/dist/components/vue-ui-world.js +1 -1
  63. package/dist/components/vue-ui-xy.js +1 -1
  64. package/dist/composables.js +1 -1
  65. package/dist/package-BdTnZDoM.js +1 -0
  66. package/dist/{render-common-Dkf3n13B.js → render-common-CTaC-_Nw.js} +1 -1
  67. package/dist/ssr/vue-ui-donut.js +1 -1
  68. package/dist/ssr/vue-ui-xy.js +1 -1
  69. package/dist/ssr.js +1 -1
  70. package/dist/style.css +1 -1
  71. package/dist/types/composables.d.ts +51 -0
  72. package/dist/types/vue-data-ui.d.ts +51 -0
  73. package/dist/useParentSize-DGkyQ711.js +1 -0
  74. package/dist/vue-data-ui-DRkivgOZ.js +1 -0
  75. package/dist/vue-data-ui.js +1 -1
  76. package/dist/{vue-ui-3d-bar-Bm-Oe_kr.js → vue-ui-3d-bar-BeM22sZn.js} +1 -1
  77. package/dist/{vue-ui-age-pyramid-DeN6_pms.js → vue-ui-age-pyramid-BpkEVmpT.js} +1 -1
  78. package/dist/{vue-ui-bullet-CXCjzBCa.js → vue-ui-bullet-Cx9Noxp_.js} +1 -1
  79. package/dist/{vue-ui-bump-DrphtYb-.js → vue-ui-bump-DIjSKk8F.js} +1 -1
  80. package/dist/{vue-ui-candlestick-CAdTTZzx.js → vue-ui-candlestick-Cfd63wqQ.js} +1 -1
  81. package/dist/{vue-ui-carousel-table-D-PSQEuw.js → vue-ui-carousel-table-CDgmtbuI.js} +1 -1
  82. package/dist/{vue-ui-chestnut-BhnQd90d.js → vue-ui-chestnut-24bmc5Rq.js} +1 -1
  83. package/dist/{vue-ui-chord-C6swlh_I.js → vue-ui-chord-fQZQ9hjU.js} +1 -1
  84. package/dist/{vue-ui-circle-pack-CXhm9rwh.js → vue-ui-circle-pack-C1CbpBNe.js} +1 -1
  85. package/dist/{vue-ui-cursor-CCx0hL1b.js → vue-ui-cursor-9khzj4l-.js} +1 -1
  86. package/dist/{vue-ui-dag-BNYDTrHG.js → vue-ui-dag-B6QkUUCe.js} +1 -1
  87. package/dist/{vue-ui-dashboard-C2KQNeNt.js → vue-ui-dashboard-BBaAZBSj.js} +1 -1
  88. package/dist/{vue-ui-digits-Bcg9Ocwc.js → vue-ui-digits-DdrPl8eP.js} +1 -1
  89. package/dist/{vue-ui-donut-CqasvTv0.js → vue-ui-donut-BbJFmKZh.js} +1 -1
  90. package/dist/{vue-ui-donut-CU-L5W3v.js → vue-ui-donut-H65cwWN-.js} +1 -1
  91. package/dist/{vue-ui-donut-evolution-DgLZRZkG.js → vue-ui-donut-evolution-DeHbG9Rx.js} +1 -1
  92. package/dist/{vue-ui-dumbbell-DCYDSSZf.js → vue-ui-dumbbell-ClCVHsrR.js} +1 -1
  93. package/dist/{vue-ui-flow-BzGZdOi-.js → vue-ui-flow-DyrpRWOP.js} +1 -1
  94. package/dist/{vue-ui-funnel-pJc9jVJO.js → vue-ui-funnel-bjH_hFeX.js} +1 -1
  95. package/dist/{vue-ui-galaxy-DHheME5Z.js → vue-ui-galaxy-BTgZs4Le.js} +1 -1
  96. package/dist/{vue-ui-gauge-C4v_qdpm.js → vue-ui-gauge-CXZklQPg.js} +1 -1
  97. package/dist/{vue-ui-geo-Fras0OVo.js → vue-ui-geo-0_HimFX5.js} +1 -1
  98. package/dist/{vue-ui-gizmo-Bqea3ZMn.js → vue-ui-gizmo-kebiFGRl.js} +1 -1
  99. package/dist/{vue-ui-graph-BZs3jwhv.js → vue-ui-graph-NTeJASbv.js} +1 -1
  100. package/dist/{vue-ui-heatmap-2ALnM7Oj.js → vue-ui-heatmap-aiEMlbZm.js} +1 -1
  101. package/dist/{vue-ui-hill-B8dCg3x5.js → vue-ui-hill-ZpLv0IMP.js} +1 -1
  102. package/dist/{vue-ui-history-plot-CegRxR-x.js → vue-ui-history-plot-4xG3oQtO.js} +1 -1
  103. package/dist/{vue-ui-horizontal-bar-DuRnq32M.js → vue-ui-horizontal-bar-DMyL8GM6.js} +1 -1
  104. package/dist/{vue-ui-kpi-DSwSDLcO.js → vue-ui-kpi-D4q8R7Uq.js} +1 -1
  105. package/dist/{vue-ui-molecule-DF9I7IDy.js → vue-ui-molecule-4t84pqvx.js} +1 -1
  106. package/dist/{vue-ui-mood-radar-BpDzg6P1.js → vue-ui-mood-radar-BGuw0U8y.js} +1 -1
  107. package/dist/{vue-ui-nested-donuts-CYU90SX-.js → vue-ui-nested-donuts-BTTJ6KAx.js} +1 -1
  108. package/dist/{vue-ui-onion-C9Y96_Pe.js → vue-ui-onion-BUbI3uaY.js} +1 -1
  109. package/dist/{vue-ui-parallel-coordinate-plot-CEX33A1e.js → vue-ui-parallel-coordinate-plot-Bn3Y28ZQ.js} +1 -1
  110. package/dist/{vue-ui-quadrant-BzD-dhcs.js → vue-ui-quadrant-CVKEUWqI.js} +1 -1
  111. package/dist/{vue-ui-quick-chart-DDXK6KTi.js → vue-ui-quick-chart-BgH0Arb4.js} +1 -1
  112. package/dist/{vue-ui-radar-fgVruUz1.js → vue-ui-radar-Bb0u6tqk.js} +1 -1
  113. package/dist/{vue-ui-relation-circle-TA-KH-2J.js → vue-ui-relation-circle-Csx30ROI.js} +1 -1
  114. package/dist/{vue-ui-ridgeline-GJ_EyeMs.js → vue-ui-ridgeline-Ce1ZrE0B.js} +1 -1
  115. package/dist/{vue-ui-rings-CQ4CQa-D.js → vue-ui-rings-DgILqhz8.js} +1 -1
  116. package/dist/{vue-ui-scatter-ecBr_qgs.js → vue-ui-scatter-CX_rE0cU.js} +1 -1
  117. package/dist/{vue-ui-skeleton-BqHwNz2O.js → vue-ui-skeleton-C0oElPXz.js} +1 -1
  118. package/dist/{vue-ui-spark-trend-DULUucQY.js → vue-ui-spark-trend-CRQ5JfVc.js} +1 -1
  119. package/dist/{vue-ui-sparkbar-CUzfk9Y4.js → vue-ui-sparkbar-BTclK0-F.js} +1 -1
  120. package/dist/{vue-ui-sparkgauge-CEYIZNGr.js → vue-ui-sparkgauge-zNl9Xmt3.js} +1 -1
  121. package/dist/{vue-ui-sparkhistogram-BATfvYil.js → vue-ui-sparkhistogram-ynyE3DOc.js} +1 -1
  122. package/dist/{vue-ui-sparkline-B2jYjPFT.js → vue-ui-sparkline-CtsijvdW.js} +1 -1
  123. package/dist/{vue-ui-sparkstackbar-CN-Xz72S.js → vue-ui-sparkstackbar-RHlqUD-0.js} +1 -1
  124. package/dist/vue-ui-stackbar-Zhl3to0r.js +29 -0
  125. package/dist/{vue-ui-stackline-BKcbKdrA.js → vue-ui-stackline-8JRhuHTg.js} +1 -1
  126. package/dist/{vue-ui-strip-plot-CKk6MJhD.js → vue-ui-strip-plot-DL7Ulgpz.js} +1 -1
  127. package/dist/{vue-ui-table-D-jfpSh1.js → vue-ui-table-BetuN-ZS.js} +1 -1
  128. package/dist/{vue-ui-table-sparkline-295WMuHK.js → vue-ui-table-sparkline-Fdjb-U1P.js} +1 -1
  129. package/dist/{vue-ui-thermometer-Ccasz0jb.js → vue-ui-thermometer-6kfYImU-.js} +1 -1
  130. package/dist/{vue-ui-timer-DeTZUIxO.js → vue-ui-timer-BKqG5HxS.js} +1 -1
  131. package/dist/{vue-ui-tiremarks-DWrBN1nz.js → vue-ui-tiremarks-D_ps9th8.js} +1 -1
  132. package/dist/{vue-ui-treemap-D8Se3_RA.js → vue-ui-treemap-BfOdhGl7.js} +1 -1
  133. package/dist/{vue-ui-waffle-BSfHWe_Z.js → vue-ui-waffle-BL0zzw6B.js} +1 -1
  134. package/dist/{vue-ui-wheel-BRaABy8K.js → vue-ui-wheel-v1o2eN3I.js} +1 -1
  135. package/dist/{vue-ui-word-cloud-9YYx_Xrj.js → vue-ui-word-cloud-HUnuPCyQ.js} +1 -1
  136. package/dist/{vue-ui-world-BmICer9M.js → vue-ui-world-BagJihbJ.js} +1 -1
  137. package/dist/{vue-ui-xy-DYnPKTpK.js → vue-ui-xy-D948j7de.js} +1 -1
  138. package/dist/{vue-ui-xy-D7IJvizz.js → vue-ui-xy-Y_rIBQj0.js} +1 -1
  139. package/package.json +1 -1
  140. package/dist/package-CM94W_P5.js +0 -1
  141. package/dist/useTooltipPosition-aoV8pZZ9.js +0 -1
  142. package/dist/vue-data-ui-B2f_qLvD.js +0 -1
  143. package/dist/vue-ui-stackbar-D9hp_pkz.js +0 -29
@@ -58,3 +58,54 @@ export type TooltipPositionTarget<T = TooltipPositionTargetValue> =
58
58
  export declare function useTooltipPosition<T>(
59
59
  chartRef: TooltipPositionTarget<T>,
60
60
  ): ComputedRef<TooltipPosition>;
61
+
62
+ /** A plain value, Vue ref, computed ref, template ref, or getter. */
63
+ export type ParentSizeValue<T> = T | { readonly value: T } | (() => T);
64
+
65
+ export type ParentSizeOptions = {
66
+ /** Multiplier applied after adding offsets. Defaults to 1. */
67
+ scale?: ParentSizeValue<number>;
68
+ /** Width adjustment before scaling. Defaults to 0. */
69
+ offsetWidth?: ParentSizeValue<number>;
70
+ /** Height adjustment before scaling. Defaults to 0. */
71
+ offsetHeight?: ParentSizeValue<number>;
72
+ /** Maximum final width after offsets and scaling. Defaults to viewport width. */
73
+ maxWidth?: ParentSizeValue<number>;
74
+ /** Maximum final height after offsets and scaling. Defaults to viewport height. */
75
+ maxHeight?: ParentSizeValue<number>;
76
+ /** Track parent resizes. Defaults to true. */
77
+ observe?: ParentSizeValue<boolean>;
78
+ };
79
+
80
+ export type ParentSize = {
81
+ height: ComputedRef<number | undefined>;
82
+ width: ComputedRef<number | undefined>;
83
+ stop: () => void;
84
+ };
85
+
86
+ /**
87
+ * Vue Data UI composable
88
+ * ---
89
+ * Returns dynamic parent dimensions, calculated as `(size + offset) * scale`
90
+ * and capped at the maximum width and height (viewport dimensions by default).
91
+ * ---
92
+ * These values can be passed to vue-data-ui component configurations using the
93
+ * `.width` and `.height` attributes.
94
+ *
95
+ * Call during setup with a template ref to measure after mounting and disconnect
96
+ * automatically on scope disposal. Outside an active Vue scope or component
97
+ * lifecycle hook, call `stop()` manually.
98
+ *
99
+ * @param element - A Vue ref, shallow ref, computed ref, readonly template ref,
100
+ * getter, raw HTMLElement, null, or undefined. Its parent is measured.
101
+ * @param options - Scale (default: 1), width and height offsets (default: 0),
102
+ * resize observation (default: true), and maximum width and height (default: viewport).
103
+ * Each option accepts a value, ref, or getter. Invalid or negative maximums fall back
104
+ * to viewport dimensions. During SSR, no viewport limit is applied.
105
+ * @returns Computed `width` and `height` values, or undefined dimensions when no
106
+ * parent exists, and a `stop` function to stop tracking changes.
107
+ */
108
+ export declare function useParentSize(
109
+ element: ParentSizeValue<HTMLElement | null | undefined>,
110
+ options?: ParentSizeOptions,
111
+ ): ParentSize;
@@ -19019,4 +19019,55 @@ export type TooltipPositionTarget<T = TooltipPositionTargetValue> =
19019
19019
  export function useTooltipPosition<T>(
19020
19020
  chartRef: TooltipPositionTarget<T>,
19021
19021
  ): ComputedRef<TooltipPosition>;
19022
+
19023
+ /** A plain value, Vue ref, computed ref, template ref, or getter. */
19024
+ export type ParentSizeValue<T> = T | { readonly value: T } | (() => T);
19025
+
19026
+ export type ParentSizeOptions = {
19027
+ /** Multiplier applied after adding offsets. Defaults to 1. */
19028
+ scale?: ParentSizeValue<number>;
19029
+ /** Width adjustment before scaling. Defaults to 0. */
19030
+ offsetWidth?: ParentSizeValue<number>;
19031
+ /** Height adjustment before scaling. Defaults to 0. */
19032
+ offsetHeight?: ParentSizeValue<number>;
19033
+ /** Maximum final width after offsets and scaling. Defaults to viewport width. */
19034
+ maxWidth?: ParentSizeValue<number>;
19035
+ /** Maximum final height after offsets and scaling. Defaults to viewport height. */
19036
+ maxHeight?: ParentSizeValue<number>;
19037
+ /** Track parent resizes. Defaults to true. */
19038
+ observe?: ParentSizeValue<boolean>;
19039
+ };
19040
+
19041
+ export type ParentSize = {
19042
+ height: ComputedRef<number | undefined>;
19043
+ width: ComputedRef<number | undefined>;
19044
+ stop: () => void;
19045
+ };
19046
+
19047
+ /**
19048
+ * Vue Data UI composable
19049
+ * ---
19050
+ * Returns dynamic parent dimensions, calculated as `(size + offset) * scale`
19051
+ * and capped at the maximum width and height (viewport dimensions by default).
19052
+ * ---
19053
+ * These values can be passed to vue-data-ui component configurations using the
19054
+ * `chart.width` and `chart.height` attributes.
19055
+ *
19056
+ * Call during setup with a template ref to measure after mounting and disconnect
19057
+ * automatically on scope disposal. Outside an active Vue scope or component
19058
+ * lifecycle hook, call `stop()` manually.
19059
+ *
19060
+ * @param element - A Vue ref, shallow ref, computed ref, readonly template ref,
19061
+ * getter, raw HTMLElement, null, or undefined. Its parent is measured.
19062
+ * @param options - Scale (default: 1), width and height offsets (default: 0),
19063
+ * resize observation (default: true), and maximum width and height (default: viewport).
19064
+ * Each option accepts a value, ref, or getter. Invalid or negative maximums fall back
19065
+ * to viewport dimensions. During SSR, no viewport limit is applied.
19066
+ * @returns Computed `width` and `height` values, or undefined dimensions when no
19067
+ * parent exists, and a `stop` function to stop tracking changes.
19068
+ */
19069
+ export function useParentSize(
19070
+ element: ParentSizeValue<HTMLElement | null | undefined>,
19071
+ options?: ParentSizeOptions,
19072
+ ): ParentSize;
19022
19073
  }
@@ -0,0 +1 @@
1
+ import{computed as e,getCurrentInstance as t,getCurrentScope as n,nextTick as r,onBeforeUnmount as i,onMounted as a,onScopeDispose as o,shallowRef as s,toValue as c,unref as l,watch as u}from"vue";var d=typeof window<`u`?window:void 0;function f(e){return Array.isArray(e)?e:[e]}function p(e){return Object.prototype.toString.call(e)===`[object Object]`}function m(e){return e!=null}function h(e,n=!0,i){i??t()?a(e,i):n?e():r(e)}function g(e,t){return n()?(o(e,t),!0):!1}function _(e){let t=c(e);return t?.$el??t}function v(t){let n=s(!1);return h(()=>{n.value=!0}),e(()=>(n.value,!!t()))}function y(...t){let n=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}),r=e(()=>{let e=f(c(t[0])).filter(e=>e!=null);return e.every(e=>typeof e!=`string`)?e:void 0});return u(()=>{let e=r.value;return[e?.map(e=>_(e))??[d].filter(e=>e!=null),f(c(e?t[1]:t[0])),f(l(e?t[2]:t[1])),c(e?t[3]:t[2])]},([e,t,r,i],a,o)=>{if(!e?.length||!t?.length||!r?.length)return;let s=p(i)?{...i}:i,c=e.flatMap(e=>t.flatMap(t=>r.map(r=>n(e,t,r,s))));o(()=>{c.forEach(e=>e())})},{immediate:!0,flush:`post`})}function b(t,n,r={}){let{window:i=d,...a}=r,o,s=v(()=>i&&`ResizeObserver`in i),l=()=>{o&&=(o.disconnect(),void 0)},f=e(()=>{let e=c(t);return Array.isArray(e)?e.map(e=>_(e)):[_(e)]}),p=u(f,e=>{if(l(),s.value&&i){o=new i.ResizeObserver(n);for(let t of e)t&&o.observe(t,a)}},{immediate:!0,flush:`post`}),m=()=>{l(),p()};return g(m),{isSupported:s,stop:m}}function x(t,n,r={}){let{window:i=d,...a}=r,o,s=v(()=>i&&`MutationObserver`in i),l=()=>{o&&=(o.disconnect(),void 0)},p=e(()=>{let e=f(c(t)).map(e=>_(e)).filter(m);return new Set(e)}),h=u(p,e=>{l(),s.value&&e.size&&(o=new i.MutationObserver(n),e.forEach(e=>{o.observe(e,a)}))},{immediate:!0,flush:`post`}),y=()=>o?.takeRecords(),b=()=>{h(),l()};return g(b),{isSupported:s,stop:b,takeRecords:y}}var S={page:e=>[e.pageX,e.pageY],client:e=>[e.clientX,e.clientY],screen:e=>[e.screenX,e.screenY],movement:e=>typeof MouseEvent<`u`&&e instanceof MouseEvent?[e.movementX,e.movementY]:null};function C(e={}){let{type:t=`page`,touch:n=!0,resetOnTouchEnds:r=!1,initialValue:i={x:0,y:0},window:a=d,target:o=a,scroll:c=!0,eventFilter:l}=e,u=null,f=0,p=0,m=s(i.x),h=s(i.y),g=s(null),_=typeof t==`function`?t:S[t],v=e=>{let t=_(e);u=e,t&&([m.value,h.value]=t,g.value=`mouse`),a&&(f=a.scrollX,p=a.scrollY)},b=e=>{if(e.touches.length>0){let t=_(e.touches[0]);t&&([m.value,h.value]=t,g.value=`touch`)}},x=()=>{if(!u||!a)return;let e=_(u);typeof MouseEvent<`u`&&u instanceof MouseEvent&&e&&(m.value=e[0]+a.scrollX-f,h.value=e[1]+a.scrollY-p)},C=()=>{m.value=i.x,h.value=i.y},w=l?e=>l(()=>v(e),{}):e=>v(e),T=l?e=>l(()=>b(e),{}):e=>b(e),E=l?()=>l(()=>x(),{}):()=>x();if(o){let e={passive:!0};y(o,[`mousemove`,`dragover`],w,e),n&&t!==`movement`&&(y(o,[`touchstart`,`touchmove`],T,e),r&&y(o,`touchend`,C,e)),c&&t===`page`&&y(a,`scroll`,E,e)}return{x:m,y:h,sourceType:g}}function w(e,t={}){let{windowResize:n=!0,windowScroll:r=!0,handleOutside:i=!0,window:a=d}=t,o=t.type||`page`,{x:c,y:l,sourceType:f}=C(t),p=s(e??a?.document.body),m=s(0),g=s(0),v=s(0),S=s(0),w=s(0),T=s(0),E=s(!0);function D(){if(!a)return;let e=_(p);if(e&&e instanceof Element)for(let t of e.getClientRects()){let{left:e,top:n,width:r,height:s}=t;v.value=e+(o===`page`?a.pageXOffset:0),S.value=n+(o===`page`?a.pageYOffset:0),w.value=s,T.value=r;let u=c.value-v.value,d=l.value-S.value;if(E.value=r===0||s===0||u<0||d<0||u>r||d>s,(i||!E.value)&&(m.value=u,g.value=d),!E.value)break}}let O=[];function k(){O.forEach(e=>e()),O.length=0}if(h(()=>{D()}),a){let{stop:e}=b(p,D),{stop:t}=x(p,D,{attributeFilter:[`style`,`class`]}),i=u([p,c,l],D);O.push(e,t,i),y(document,`mouseleave`,()=>{E.value=!0},{passive:!0}),r&&O.push(y(`scroll`,D,{capture:!0,passive:!0})),n&&O.push(y(`resize`,D,{passive:!0}))}return{x:c,y:l,sourceType:f,elementX:m,elementY:g,elementPositionX:v,elementPositionY:S,elementHeight:w,elementWidth:T,isOutside:E,stop:k}}function T(t){let{elementX:n,elementWidth:r,isOutside:i}=w(e(()=>{let e=c(t);return e?e instanceof HTMLElement?e:e.$el||null:null}));return e(()=>i.value||r.value===0?`center`:n.value>r.value/2?`left`:`right`)}function E(r,a={}){let l=typeof window>`u`?void 0:window,d=s({width:l?.innerWidth??1/0,height:l?.innerHeight??1/0});function f(){d.value={width:l.innerWidth,height:l.innerHeight}}l?.addEventListener(`resize`,f);function p(e,t){let n=c(e);return Number.isFinite(n)&&n>=0?n:t}let m=s({height:void 0,width:void 0}),h=u([()=>c(r)?.parentElement,()=>c(a.observe)??!0],([e,t],n,r)=>{let i=e?.getBoundingClientRect();if(m.value={height:i?.height,width:i?.width},!e||!t||typeof ResizeObserver>`u`)return;let a=new ResizeObserver(()=>{let{height:t,width:n}=e.getBoundingClientRect();m.value={height:t,width:n}});a.observe(e,{box:`border-box`}),r(()=>a.disconnect())},{immediate:!0,flush:`post`});function g(){h(),l?.removeEventListener(`resize`,f)}return n()?o(g):t()&&i(g),{height:e(()=>m.value.height===void 0?void 0:Math.min((m.value.height+(c(a.offsetHeight)||0))*(c(a.scale)??1),p(a.maxHeight,d.value.height))),width:e(()=>m.value.width===void 0?void 0:Math.min((m.value.width+(c(a.offsetWidth)||0))*(c(a.scale)??1),p(a.maxWidth,d.value.width))),stop:g}}export{T as n,E as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./BaseIcon-fYK0iID8.js";import{computed as n,createBlock as r,createCommentVNode as i,createElementBlock as a,createElementVNode as o,createSlots as s,createTextVNode as c,defineAsyncComponent as l,guardReactiveProps as u,mergeProps as d,normalizeProps as f,normalizeStyle as p,onMounted as m,openBlock as h,ref as g,renderList as _,renderSlot as v,resolveDynamicComponent as y,toDisplayString as b,useAttrs as x,watch as S,withCtx as C}from"vue";var w=/* @__PURE__ */ e({default:()=>E}),T={style:{width:`36px`}},E=/*@__PURE__*/ Object.assign({inheritAttrs:!1},{__name:`vue-data-ui`,props:{component:{type:String},dataset:{type:[Object,Array,Number,String]},config:{type:Object}},setup(e,{expose:w}){let E=e,D=x(),O={VueUiGraph:l(()=>import(`./vue-ui-graph-NTeJASbv.js`).then(e=>e.n)),VueUi3dBar:l(()=>import(`./vue-ui-3d-bar-BeM22sZn.js`).then(e=>e.n)),VueUiAgePyramid:l(()=>import(`./vue-ui-age-pyramid-BpkEVmpT.js`).then(e=>e.n)),VueUiAnnotator:l(()=>import(`./vue-ui-annotator-DuAQovkf.js`).then(e=>e.n)),VueUiCandlestick:l(()=>import(`./vue-ui-candlestick-Cfd63wqQ.js`).then(e=>e.n)),VueUiChestnut:l(()=>import(`./vue-ui-chestnut-24bmc5Rq.js`).then(e=>e.n)),VueUiDashboard:l(()=>import(`./vue-ui-dashboard-BBaAZBSj.js`).then(e=>e.n)),VueUiDigits:l(()=>import(`./vue-ui-digits-DdrPl8eP.js`).then(e=>e.n)),VueUiDonut:l(()=>import(`./vue-ui-donut-H65cwWN-.js`).then(e=>e.n)),VueUiDonutEvolution:l(()=>import(`./vue-ui-donut-evolution-DeHbG9Rx.js`).then(e=>e.n)),VueUiGalaxy:l(()=>import(`./vue-ui-galaxy-BTgZs4Le.js`).then(e=>e.n)),VueUiGauge:l(()=>import(`./vue-ui-gauge-CXZklQPg.js`).then(e=>e.n)),VueUiHeatmap:l(()=>import(`./vue-ui-heatmap-aiEMlbZm.js`).then(e=>e.n)),VueUiKpi:l(()=>import(`./vue-ui-kpi-D4q8R7Uq.js`).then(e=>e.n)),VueUiMiniLoader:l(()=>import(`./vue-ui-mini-loader-C6vhrfx3.js`).then(e=>e.n)),VueUiMolecule:l(()=>import(`./vue-ui-molecule-4t84pqvx.js`).then(e=>e.n)),VueUiMoodRadar:l(()=>import(`./vue-ui-mood-radar-BGuw0U8y.js`).then(e=>e.n)),VueUiNestedDonuts:l(()=>import(`./vue-ui-nested-donuts-BTTJ6KAx.js`).then(e=>e.n)),VueUiOnion:l(()=>import(`./vue-ui-onion-BUbI3uaY.js`).then(e=>e.n)),VueUiQuadrant:l(()=>import(`./vue-ui-quadrant-CVKEUWqI.js`).then(e=>e.n)),VueUiRadar:l(()=>import(`./vue-ui-radar-Bb0u6tqk.js`).then(e=>e.n)),VueUiRating:l(()=>import(`./vue-ui-rating-7RAJA7I4.js`).then(e=>e.n)),VueUiRelationCircle:l(()=>import(`./vue-ui-relation-circle-Csx30ROI.js`).then(e=>e.n)),VueUiRings:l(()=>import(`./vue-ui-rings-DgILqhz8.js`).then(e=>e.n)),VueUiScatter:l(()=>import(`./vue-ui-scatter-CX_rE0cU.js`).then(e=>e.n)),VueUiSkeleton:l(()=>import(`./vue-ui-skeleton-C0oElPXz.js`).then(e=>e.n)),VueUiSmiley:l(()=>import(`./vue-ui-smiley-BdhxsPGW.js`).then(e=>e.n)),VueUiSparkbar:l(()=>import(`./vue-ui-sparkbar-BTclK0-F.js`).then(e=>e.n)),VueUiSparkgauge:l(()=>import(`./vue-ui-sparkgauge-zNl9Xmt3.js`).then(e=>e.n)),VueUiSparkHistogram:l(()=>import(`./vue-ui-sparkhistogram-ynyE3DOc.js`).then(e=>e.n)),VueUiSparkline:l(()=>import(`./vue-ui-sparkline-CtsijvdW.js`).then(e=>e.n)),VueUiSparkStackbar:l(()=>import(`./vue-ui-sparkstackbar-RHlqUD-0.js`).then(e=>e.n)),VueUiTable:l(()=>import(`./vue-ui-table-BetuN-ZS.js`).then(e=>e.n)),VueUiTableSparkline:l(()=>import(`./vue-ui-table-sparkline-Fdjb-U1P.js`).then(e=>e.n)),VueUiThermometer:l(()=>import(`./vue-ui-thermometer-6kfYImU-.js`).then(e=>e.n)),VueUiTiremarks:l(()=>import(`./vue-ui-tiremarks-D_ps9th8.js`).then(e=>e.n)),VueUiTreemap:l(()=>import(`./vue-ui-treemap-BfOdhGl7.js`).then(e=>e.n)),VueUiVerticalBar:l(()=>import(`./vue-ui-horizontal-bar-DMyL8GM6.js`).then(e=>e.n)),VueUiHorizontalBar:l(()=>import(`./vue-ui-horizontal-bar-DMyL8GM6.js`).then(e=>e.n)),VueUiWaffle:l(()=>import(`./vue-ui-waffle-BL0zzw6B.js`).then(e=>e.n)),VueUiWheel:l(()=>import(`./vue-ui-wheel-v1o2eN3I.js`).then(e=>e.n)),VueUiXy:l(()=>import(`./vue-ui-xy-D948j7de.js`).then(e=>e.n)),VueUiTableHeatmap:l(()=>import(`./vue-ui-table-heatmap-IYPQ7LMg.js`).then(e=>e.n)),VueUiAccordion:l(()=>import(`./vue-ui-accordion-D4FHxzsL.js`).then(e=>e.n)),VueUiQuickChart:l(()=>import(`./vue-ui-quick-chart-BgH0Arb4.js`).then(e=>e.n)),VueUiCursor:l(()=>import(`./vue-ui-cursor-9khzj4l-.js`).then(e=>e.n)),VueUiSparkTrend:l(()=>import(`./vue-ui-spark-trend-CRQ5JfVc.js`).then(e=>e.n)),VueUiStripPlot:l(()=>import(`./vue-ui-strip-plot-DL7Ulgpz.js`).then(e=>e.n)),VueUiDumbbell:l(()=>import(`./vue-ui-dumbbell-ClCVHsrR.js`).then(e=>e.n)),VueUiWordCloud:l(()=>import(`./vue-ui-word-cloud-HUnuPCyQ.js`).then(e=>e.n)),VueUiXyCanvas:l(()=>import(`./vue-ui-xy-canvas-CjrbWdJJ.js`).then(e=>e.n)),VueUiFlow:l(()=>import(`./vue-ui-flow-DyrpRWOP.js`).then(e=>e.n)),VueUiParallelCoordinatePlot:l(()=>import(`./vue-ui-parallel-coordinate-plot-Bn3Y28ZQ.js`).then(e=>e.n)),VueUiTimer:l(()=>import(`./vue-ui-timer-BKqG5HxS.js`).then(e=>e.n)),VueUiCarouselTable:l(()=>import(`./vue-ui-carousel-table-CDgmtbuI.js`).then(e=>e.n)),VueUiGizmo:l(()=>import(`./vue-ui-gizmo-kebiFGRl.js`).then(e=>e.n)),VueUiStackbar:l(()=>import(`./vue-ui-stackbar-Zhl3to0r.js`).then(e=>e.n)),VueUiStackline:l(()=>import(`./vue-ui-stackline-8JRhuHTg.js`).then(e=>e.n)),VueUiBullet:l(()=>import(`./vue-ui-bullet-Cx9Noxp_.js`).then(e=>e.n)),VueUiFunnel:l(()=>import(`./vue-ui-funnel-bjH_hFeX.js`).then(e=>e.n)),VueUiHistoryPlot:l(()=>import(`./vue-ui-history-plot-4xG3oQtO.js`).then(e=>e.n)),VueUiCirclePack:l(()=>import(`./vue-ui-circle-pack-C1CbpBNe.js`).then(e=>e.n)),VueUiWorld:l(()=>import(`./vue-ui-world-BagJihbJ.js`).then(e=>e.n)),VueUiRidgeline:l(()=>import(`./vue-ui-ridgeline-Ce1ZrE0B.js`).then(e=>e.n)),VueUiChord:l(()=>import(`./vue-ui-chord-fQZQ9hjU.js`).then(e=>e.n)),VueUiDag:l(()=>import(`./vue-ui-dag-B6QkUUCe.js`).then(e=>e.n)),VueUiGeo:l(()=>import(`./vue-ui-geo-0_HimFX5.js`).then(e=>e.n)),VueUiBump:l(()=>import(`./vue-ui-bump-DIjSKk8F.js`).then(e=>e.n)),VueUiHill:l(()=>import(`./vue-ui-hill-ZpLv0IMP.js`).then(e=>e.n)),VueUiLabel:l(()=>import(`./vue-ui-label-0lSeoxvv.js`).then(e=>e.n))},k=/* @__PURE__ */ new Set([`VueUiMiniLoader`,`VueUiSkeleton`,`VueUiAccordion`,`VueUiCursor`,`VueUiTimer`]),A=/* @__PURE__ */ `fitToView.focusNode.resetLayout.autoSize.cancel.close.copyAlt.focusLocation.generateCsv.generateImage.generatePdf.generateSvg.getItemsPositions.hideSeries.lap.pause.pauseAnimation.recalculateHeight.reset.resetZoom.restart.restoreOrder.resumeAnimation.save.selectGroup.selectNode.selectRibbon.setZoomState.shoot.showSeries.start.switchOrientation.toggleAnimation.toggleAnnotator.toggleLabels.toggleLock.toggleReadonly.toggleSort.toggleStack.toggleTable.toggleFullscreen.toggleTooltip.toggleZoom.zoomIn.zoomOut`.split(`.`),j=g(null),M=n(()=>!O[E.component]),N=n(()=>O[E.component]||null);function P(){let e={...D,config:E.config};return k.has(E.component)||(e.dataset=E.dataset),e}let F=[];function I(e,t){return new Promise((n,r)=>{F.push({method:e,args:t,resolve:n,reject:r})})}function L(e){return/* @__PURE__ */ Error(`Method "${e}" not found on ${E.component}`)}function R(e,t){let n=j.value;if(!n)return null;let r=n[e];return typeof r==`function`?r.apply(n,t):null}function z(e,t){let n=j.value;if(!n)return I(e,t);let r=n[e];return typeof r==`function`?r.apply(n,t):Promise.reject(L(e))}S(j,e=>{if(e)for(;F.length;){let{method:t,args:n,resolve:r,reject:i}=F.shift(),a=e[t];typeof a==`function`?Promise.resolve().then(()=>a.apply(e,n)).then(r).catch(i):i(L(t))}}),w({getData(...e){return z(`getData`,e)},getImage(e={}){let{scale:t=2}=e;return z(`getImage`,[{scale:t}])},...Object.fromEntries(A.map(e=>[e,(...t)=>R(e,t)]))}),m(()=>{M.value&&console.error(`\n\nVue Data UI exception:\nThe provided component "${E.component}" does not exist. Check the spelling.\n\nAvailable components:\n\n${Object.keys(O).map(e=>`. ${e}\n`).join(``)}`)});let B=n(()=>{let e=`The provided component ${E.component} does not exist.`;return[`VueUiIcon`,`VueUiPattern`,`Arrow`].includes(E.component)?(e=`${E.component} is not supported by the VueDataUi universal component. You must import it individually.`,console.warn(e),{status:`notSupported`,message:e}):(console.warn(e),{status:`unknown`,message:e})});return(e,n)=>M.value?(h(),a(`div`,{key:0,style:p({width:`100%`,display:`flex`,gap:`6px`,alignItems:`center`,color:B.value.status===`notSupported`?`#FF9000`:`#FF0000`})},[o(`div`,T,[B.value.status===`unknown`?(h(),r(t,{key:0,name:`moodFlat`,stroke:`#FF0000`})):i(``,!0),B.value.status===`notSupported`?(h(),r(t,{key:1,name:`circleExclamation`,stroke:`#FF9000`})):i(``,!0)]),c(` `+b(B.value.message),1)],4)):(h(),r(y(N.value),d({key:1,ref_key:`currentComponentRef`,ref:j},P()),s({_:2},[_(e.$slots,(t,n)=>({name:n,fn:C(t=>[v(e.$slots,n,f(u(t)))])}))]),1040))}});export{w as n,E as t};
@@ -1 +1 @@
1
- import{E as e,P as t,U as ee,Z as n,bt as r,ft as i,ht as a,mt as o,n as s,q as c}from"./lib-rPeBMZrn.js";import{t as l}from"./vue-ui-graph-BZs3jwhv.js";import{a as u,i as d,n as f,o as p,r as m,t as h}from"./exposedLib-BRtClmZy.js";import{t as g}from"./BaseIcon-fYK0iID8.js";import{t as _}from"./vue-ui-xy-DYnPKTpK.js";import{t as v}from"./vue-ui-accordion-D4FHxzsL.js";import{t as y}from"./Arrow-CITPKnWF.js";import{t as b}from"./vue-ui-3d-bar-Bm-Oe_kr.js";import{t as x}from"./vue-ui-age-pyramid-DeN6_pms.js";import{t as S}from"./vue-ui-annotator-DuAQovkf.js";import{t as C}from"./vue-ui-candlestick-CAdTTZzx.js";import{t as w}from"./vue-ui-chestnut-BhnQd90d.js";import{t as T}from"./vue-ui-cursor-CCx0hL1b.js";import{t as E}from"./vue-ui-dashboard-C2KQNeNt.js";import{t as D}from"./vue-ui-digits-Bcg9Ocwc.js";import{t as O}from"./vue-ui-donut-CU-L5W3v.js";import{t as k}from"./vue-ui-donut-evolution-DgLZRZkG.js";import{t as A}from"./vue-ui-dumbbell-DCYDSSZf.js";import{t as j}from"./vue-ui-flow-BzGZdOi-.js";import{t as M}from"./vue-ui-galaxy-DHheME5Z.js";import{t as N}from"./vue-ui-gauge-C4v_qdpm.js";import{t as P}from"./vue-ui-heatmap-2ALnM7Oj.js";import{t as F}from"./vue-ui-kpi-DSwSDLcO.js";import{t as I}from"./vue-ui-mini-loader-C6vhrfx3.js";import{t as L}from"./vue-ui-molecule-DF9I7IDy.js";import{t as R}from"./vue-ui-mood-radar-BpDzg6P1.js";import{t as z}from"./vue-ui-nested-donuts-CYU90SX-.js";import{t as B}from"./vue-ui-onion-C9Y96_Pe.js";import{t as V}from"./vue-ui-parallel-coordinate-plot-CEX33A1e.js";import{t as H}from"./vue-ui-quadrant-BzD-dhcs.js";import{t as U}from"./vue-ui-quick-chart-DDXK6KTi.js";import{t as W}from"./vue-ui-radar-fgVruUz1.js";import{t as G}from"./vue-ui-rating-7RAJA7I4.js";import{t as K}from"./vue-ui-relation-circle-TA-KH-2J.js";import{t as q}from"./vue-ui-rings-CQ4CQa-D.js";import{t as J}from"./vue-ui-scatter-ecBr_qgs.js";import{t as te}from"./vue-ui-skeleton-BqHwNz2O.js";import{t as Y}from"./vue-ui-smiley-BdhxsPGW.js";import{t as X}from"./vue-ui-sparkhistogram-BATfvYil.js";import{t as Z}from"./vue-ui-sparkstackbar-CN-Xz72S.js";import{t as Q}from"./vue-ui-spark-trend-DULUucQY.js";import{t as ne}from"./vue-ui-sparkbar-CUzfk9Y4.js";import{t as re}from"./vue-ui-sparkgauge-CEYIZNGr.js";import{t as ie}from"./vue-ui-sparkline-B2jYjPFT.js";import{t as ae}from"./vue-ui-strip-plot-CKk6MJhD.js";import{t as oe}from"./vue-ui-table-D-jfpSh1.js";import{t as se}from"./vue-ui-table-heatmap-IYPQ7LMg.js";import{t as ce}from"./vue-ui-table-sparkline-295WMuHK.js";import{t as le}from"./vue-ui-thermometer-Ccasz0jb.js";import{t as ue}from"./vue-ui-timer-DeTZUIxO.js";import{t as de}from"./vue-ui-tiremarks-DWrBN1nz.js";import{t as fe}from"./vue-ui-treemap-D8Se3_RA.js";import{t as $}from"./vue-ui-horizontal-bar-DuRnq32M.js";import{t as pe}from"./vue-ui-waffle-BSfHWe_Z.js";import{t as me}from"./vue-ui-wheel-BRaABy8K.js";import{t as he}from"./vue-ui-word-cloud-9YYx_Xrj.js";import{t as ge}from"./vue-ui-xy-canvas-CjrbWdJJ.js";import{t as _e}from"./vue-ui-carousel-table-D-PSQEuw.js";import{t as ve}from"./vue-ui-gizmo-Bqea3ZMn.js";import{t as ye}from"./vue-ui-stackbar-D9hp_pkz.js";import{t as be}from"./vue-ui-stackline-BKcbKdrA.js";import{t as xe}from"./vue-ui-bullet-CXCjzBCa.js";import{t as Se}from"./vue-ui-funnel-pJc9jVJO.js";import{t as Ce}from"./vue-ui-history-plot-CegRxR-x.js";import{t as we}from"./vue-ui-pattern-DrPCu32G.js";import{t as Te}from"./vue-ui-circle-pack-CXhm9rwh.js";import{t as Ee}from"./vue-ui-world-BmICer9M.js";import{t as De}from"./vue-ui-ridgeline-GJ_EyeMs.js";import{t as Oe}from"./vue-ui-chord-C6swlh_I.js";import{t as ke}from"./vue-ui-dag-BNYDTrHG.js";import{t as Ae}from"./vue-data-ui-B2f_qLvD.js";import{t as je}from"./vue-ui-geo-Fras0OVo.js";import{t as Me}from"./vue-ui-bump-DrphtYb-.js";import{t as Ne}from"./vue-ui-hill-B8dCg3x5.js";import{t as Pe}from"./patternUtils-_q3ArM3g.js";import{t as Fe}from"./vue-ui-pattern-seed-B8YjAAEH.js";import{t as Ie}from"./vue-ui-label-0lSeoxvv.js";import{i as Le,n as Re,r as ze,t as Be}from"./useObjectBindings-BCi3Az41.js";import{t as Ve}from"./useTooltipPosition-aoV8pZZ9.js";export{y as Arrow,Ae as VueDataUi,b as VueUi3dBar,v as VueUiAccordion,x as VueUiAgePyramid,S as VueUiAnnotator,xe as VueUiBullet,Me as VueUiBump,C as VueUiCandlestick,_e as VueUiCarouselTable,w as VueUiChestnut,Oe as VueUiChord,Te as VueUiCirclePack,T as VueUiCursor,ke as VueUiDag,E as VueUiDashboard,D as VueUiDigits,O as VueUiDonut,k as VueUiDonutEvolution,A as VueUiDumbbell,j as VueUiFlow,Se as VueUiFunnel,M as VueUiGalaxy,N as VueUiGauge,je as VueUiGeo,ve as VueUiGizmo,l as VueUiGraph,P as VueUiHeatmap,Ne as VueUiHill,Ce as VueUiHistoryPlot,$ as VueUiHorizontalBar,$ as VueUiVerticalBar,g as VueUiIcon,F as VueUiKpi,Ie as VueUiLabel,I as VueUiMiniLoader,L as VueUiMolecule,R as VueUiMoodRadar,z as VueUiNestedDonuts,B as VueUiOnion,V as VueUiParallelCoordinatePlot,we as VueUiPattern,Fe as VueUiPatternSeed,H as VueUiQuadrant,U as VueUiQuickChart,W as VueUiRadar,G as VueUiRating,K as VueUiRelationCircle,De as VueUiRidgeline,q as VueUiRings,J as VueUiScatter,te as VueUiSkeleton,Y as VueUiSmiley,X as VueUiSparkHistogram,Z as VueUiSparkStackbar,Q as VueUiSparkTrend,ne as VueUiSparkbar,re as VueUiSparkgauge,ie as VueUiSparkline,ye as VueUiStackbar,be as VueUiStackline,ae as VueUiStripPlot,oe as VueUiTable,se as VueUiTableHeatmap,ce as VueUiTableSparkline,le as VueUiThermometer,ue as VueUiTimer,de as VueUiTiremarks,fe as VueUiTreemap,pe as VueUiWaffle,me as VueUiWheel,he as VueUiWordCloud,Ee as VueUiWorld,_ as VueUiXy,ge as VueUiXyCanvas,s as abbreviate,Re as applyDataCorrection,h as average,e as createColorWheel,Pe as createPatternDef,t as createSmoothPath,ee as createStraightPath,c as createTSpans,n as createWordCloudDatasetFromPlainText,f as darkenColor,i as formatSmallValue,o as getCumulativeAverage,a as getCumulativeMedian,r as getPalette,ze as getThemeConfig,Le as getVueDataUiConfig,m as lightenColor,d as median,u as mergeConfigs,p as shiftColorHue,Be as useObjectBindings,Ve as useTooltipPosition};
1
+ import{E as e,P as t,U as ee,Z as n,bt as r,ft as i,ht as a,mt as o,n as s,q as c}from"./lib-rPeBMZrn.js";import{t as l}from"./vue-ui-graph-NTeJASbv.js";import{a as u,i as d,n as f,o as p,r as m,t as h}from"./exposedLib-BRtClmZy.js";import{t as g}from"./BaseIcon-fYK0iID8.js";import{t as _}from"./vue-ui-xy-D948j7de.js";import{t as v}from"./vue-ui-accordion-D4FHxzsL.js";import{t as y}from"./Arrow-CITPKnWF.js";import{t as b}from"./vue-ui-3d-bar-BeM22sZn.js";import{t as x}from"./vue-ui-age-pyramid-BpkEVmpT.js";import{t as S}from"./vue-ui-annotator-DuAQovkf.js";import{t as C}from"./vue-ui-candlestick-Cfd63wqQ.js";import{t as w}from"./vue-ui-chestnut-24bmc5Rq.js";import{t as T}from"./vue-ui-cursor-9khzj4l-.js";import{t as E}from"./vue-ui-dashboard-BBaAZBSj.js";import{t as D}from"./vue-ui-digits-DdrPl8eP.js";import{t as O}from"./vue-ui-donut-H65cwWN-.js";import{t as k}from"./vue-ui-donut-evolution-DeHbG9Rx.js";import{t as A}from"./vue-ui-dumbbell-ClCVHsrR.js";import{t as j}from"./vue-ui-flow-DyrpRWOP.js";import{t as M}from"./vue-ui-galaxy-BTgZs4Le.js";import{t as N}from"./vue-ui-gauge-CXZklQPg.js";import{t as P}from"./vue-ui-heatmap-aiEMlbZm.js";import{t as F}from"./vue-ui-kpi-D4q8R7Uq.js";import{t as I}from"./vue-ui-mini-loader-C6vhrfx3.js";import{t as L}from"./vue-ui-molecule-4t84pqvx.js";import{t as R}from"./vue-ui-mood-radar-BGuw0U8y.js";import{t as z}from"./vue-ui-nested-donuts-BTTJ6KAx.js";import{t as B}from"./vue-ui-onion-BUbI3uaY.js";import{t as V}from"./vue-ui-parallel-coordinate-plot-Bn3Y28ZQ.js";import{t as H}from"./vue-ui-quadrant-CVKEUWqI.js";import{t as U}from"./vue-ui-quick-chart-BgH0Arb4.js";import{t as W}from"./vue-ui-radar-Bb0u6tqk.js";import{t as G}from"./vue-ui-rating-7RAJA7I4.js";import{t as K}from"./vue-ui-relation-circle-Csx30ROI.js";import{t as q}from"./vue-ui-rings-DgILqhz8.js";import{t as J}from"./vue-ui-scatter-CX_rE0cU.js";import{t as te}from"./vue-ui-skeleton-C0oElPXz.js";import{t as Y}from"./vue-ui-smiley-BdhxsPGW.js";import{t as X}from"./vue-ui-sparkhistogram-ynyE3DOc.js";import{t as Z}from"./vue-ui-sparkstackbar-RHlqUD-0.js";import{t as Q}from"./vue-ui-spark-trend-CRQ5JfVc.js";import{t as ne}from"./vue-ui-sparkbar-BTclK0-F.js";import{t as re}from"./vue-ui-sparkgauge-zNl9Xmt3.js";import{t as ie}from"./vue-ui-sparkline-CtsijvdW.js";import{t as ae}from"./vue-ui-strip-plot-DL7Ulgpz.js";import{t as oe}from"./vue-ui-table-BetuN-ZS.js";import{t as se}from"./vue-ui-table-heatmap-IYPQ7LMg.js";import{t as ce}from"./vue-ui-table-sparkline-Fdjb-U1P.js";import{t as le}from"./vue-ui-thermometer-6kfYImU-.js";import{t as ue}from"./vue-ui-timer-BKqG5HxS.js";import{t as de}from"./vue-ui-tiremarks-D_ps9th8.js";import{t as fe}from"./vue-ui-treemap-BfOdhGl7.js";import{t as $}from"./vue-ui-horizontal-bar-DMyL8GM6.js";import{t as pe}from"./vue-ui-waffle-BL0zzw6B.js";import{t as me}from"./vue-ui-wheel-v1o2eN3I.js";import{t as he}from"./vue-ui-word-cloud-HUnuPCyQ.js";import{t as ge}from"./vue-ui-xy-canvas-CjrbWdJJ.js";import{t as _e}from"./vue-ui-carousel-table-CDgmtbuI.js";import{t as ve}from"./vue-ui-gizmo-kebiFGRl.js";import{t as ye}from"./vue-ui-stackbar-Zhl3to0r.js";import{t as be}from"./vue-ui-stackline-8JRhuHTg.js";import{t as xe}from"./vue-ui-bullet-Cx9Noxp_.js";import{t as Se}from"./vue-ui-funnel-bjH_hFeX.js";import{t as Ce}from"./vue-ui-history-plot-4xG3oQtO.js";import{t as we}from"./vue-ui-pattern-DrPCu32G.js";import{t as Te}from"./vue-ui-circle-pack-C1CbpBNe.js";import{t as Ee}from"./vue-ui-world-BagJihbJ.js";import{t as De}from"./vue-ui-ridgeline-Ce1ZrE0B.js";import{t as Oe}from"./vue-ui-chord-fQZQ9hjU.js";import{t as ke}from"./vue-ui-dag-B6QkUUCe.js";import{t as Ae}from"./vue-data-ui-DRkivgOZ.js";import{t as je}from"./vue-ui-geo-0_HimFX5.js";import{t as Me}from"./vue-ui-bump-DIjSKk8F.js";import{t as Ne}from"./vue-ui-hill-ZpLv0IMP.js";import{t as Pe}from"./patternUtils-_q3ArM3g.js";import{t as Fe}from"./vue-ui-pattern-seed-B8YjAAEH.js";import{t as Ie}from"./vue-ui-label-0lSeoxvv.js";import{i as Le,n as Re,r as ze,t as Be}from"./useObjectBindings-BCi3Az41.js";import{n as Ve,t as He}from"./useParentSize-DGkyQ711.js";export{y as Arrow,Ae as VueDataUi,b as VueUi3dBar,v as VueUiAccordion,x as VueUiAgePyramid,S as VueUiAnnotator,xe as VueUiBullet,Me as VueUiBump,C as VueUiCandlestick,_e as VueUiCarouselTable,w as VueUiChestnut,Oe as VueUiChord,Te as VueUiCirclePack,T as VueUiCursor,ke as VueUiDag,E as VueUiDashboard,D as VueUiDigits,O as VueUiDonut,k as VueUiDonutEvolution,A as VueUiDumbbell,j as VueUiFlow,Se as VueUiFunnel,M as VueUiGalaxy,N as VueUiGauge,je as VueUiGeo,ve as VueUiGizmo,l as VueUiGraph,P as VueUiHeatmap,Ne as VueUiHill,Ce as VueUiHistoryPlot,$ as VueUiHorizontalBar,$ as VueUiVerticalBar,g as VueUiIcon,F as VueUiKpi,Ie as VueUiLabel,I as VueUiMiniLoader,L as VueUiMolecule,R as VueUiMoodRadar,z as VueUiNestedDonuts,B as VueUiOnion,V as VueUiParallelCoordinatePlot,we as VueUiPattern,Fe as VueUiPatternSeed,H as VueUiQuadrant,U as VueUiQuickChart,W as VueUiRadar,G as VueUiRating,K as VueUiRelationCircle,De as VueUiRidgeline,q as VueUiRings,J as VueUiScatter,te as VueUiSkeleton,Y as VueUiSmiley,X as VueUiSparkHistogram,Z as VueUiSparkStackbar,Q as VueUiSparkTrend,ne as VueUiSparkbar,re as VueUiSparkgauge,ie as VueUiSparkline,ye as VueUiStackbar,be as VueUiStackline,ae as VueUiStripPlot,oe as VueUiTable,se as VueUiTableHeatmap,ce as VueUiTableSparkline,le as VueUiThermometer,ue as VueUiTimer,de as VueUiTiremarks,fe as VueUiTreemap,pe as VueUiWaffle,me as VueUiWheel,he as VueUiWordCloud,Ee as VueUiWorld,_ as VueUiXy,ge as VueUiXyCanvas,s as abbreviate,Re as applyDataCorrection,h as average,e as createColorWheel,Pe as createPatternDef,t as createSmoothPath,ee as createStraightPath,c as createTSpans,n as createWordCloudDatasetFromPlainText,f as darkenColor,i as formatSmallValue,o as getCumulativeAverage,a as getCumulativeMedian,r as getPalette,ze as getThemeConfig,Le as getVueDataUiConfig,m as lightenColor,d as median,u as mergeConfigs,p as shiftColorHue,Be as useObjectBindings,He as useParentSize,Ve as useTooltipPosition};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{$ as n,D as r,Ft as i,Ht as a,It as o,Jt as s,Q as c,S as l,X as u,at as d,b as f,f as p,h as m,i as h,in as ee,nt as te,p as g,t as ne,w as re,yt as ie,zt as ae}from"./lib-rPeBMZrn.js";import{n as oe,t as se}from"./BaseScanner-8NdoBs7B.js";import{n as ce}from"./useHints-C-TwxM0Y.js";import{t as le}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as ue}from"./resolveChartConfig-CIhClE5R.js";import{t as de}from"./img-D4RQwASc.js";import{n as fe}from"./Title-BliHuXfT.js";import{t as pe}from"./useChartExport-BZts4KFb.js";import{n as me,t as he}from"./tableIntegration-CNoJ1CIY.js";import{n as ge,t as _e}from"./annotationSlots-RvQBEO9-.js";import{n as ve,t as ye}from"./userOptionsSlots-DYuo-E5m.js";import{t as be}from"./usePrinter-DVf3YcG5.js";import{c as xe}from"./canvas-lib-22VpOI4_.js";import{t as Se}from"./useResponsive-CENUxfEL.js";import{t as _}from"./DefGrad-DKMq1REY.js";import{t as Ce}from"./A11yDataTable-DWNlWXzs.js";import{t as we}from"./useUserOptionState-CXlFnwPv.js";import{t as Te}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ee}from"./vue_ui_3d_bar-DmAve5Ri.js";import{Fragment as v,computed as y,createBlock as b,createCommentVNode as x,createElementBlock as S,createElementVNode as C,createSlots as De,createTextVNode as Oe,createVNode as w,defineAsyncComponent as T,guardReactiveProps as ke,mergeProps as Ae,nextTick as je,normalizeClass as Me,normalizeProps as Ne,normalizeStyle as E,onMounted as Pe,openBlock as D,ref as O,renderList as k,renderSlot as A,resolveDynamicComponent as Fe,toDisplayString as j,toRefs as Ie,unref as M,watch as Le,withCtx as N,withKeys as Re,withModifiers as ze}from"vue";var Be=/* @__PURE__ */ e({default:()=>sn}),Ve=[`id`],He=[`id`],Ue={"aria-live":`polite`,class:`sr-only`},We={style:{position:`relative`}},Ge=[`xmlns`,`viewBox`,`aria-describedby`],Ke=[`width`,`height`],qe={key:1},Je=[`x`,`y`,`font-size`,`font-weight`,`fill`],Ye=[`x`,`y`],Xe=[`cx`,`cy`,`stroke`,`opacity`],Ze=[`d`,`stroke`],Qe=[`d`,`stroke`],$e={key:4},et={key:0},tt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],nt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],rt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],it=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],at={key:1},ot=[`d`,`stroke`,`stroke-width`,`fill`],st=[`d`,`stroke`,`stroke-width`,`fill`],ct=[`d`,`stroke`,`stroke-width`,`fill`],lt={key:2},ut=[`aria-label`],dt=[`d`,`fill`,`onMouseenter`,`onClick`,`onMouseout`],ft=[`d`,`fill`,`onMouseenter`,`onClick`,`onMouseout`],pt=[`d`,`fill`,`onMouseenter`,`onClick`,`onMouseout`],mt=[`d`,`onMouseenter`,`onClick`,`onMouseout`],ht=[`d`],gt=[`d`,`stroke`],_t=[`onClick`],vt=[`stroke`,`d`],yt=[`cx`,`cy`,`fill`,`stroke`],bt=[`x`,`y`,`width`,`height`],xt=[`x`,`y`,`width`,`height`],St={key:3},Ct=[`d`,`stroke`],wt=[`d`,`fill`,`stroke`],Tt={key:0},Et=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],Dt=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],Ot={key:4},kt=[`d`,`fill`,`stroke`],At={key:5},jt={key:0},Mt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],Nt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],Pt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],Ft=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],It=[`d`,`stroke`,`stroke-width`,`fill`],Lt=[`d`,`stroke`,`stroke-width`,`fill`],Rt=[`d`],zt={key:1},Bt=[`aria-label`],Vt=[`onMouseenter`,`onClick`,`onMouseout`,`d`,`fill`],Ht=[`onMouseenter`,`onClick`,`onMouseout`,`d`],Ut=[`onMouseenter`,`onClick`,`onMouseout`,`d`,`fill`],Wt=[`onClick`],Gt=[`stroke`,`d`],Kt=[`cx`,`cy`,`fill`,`stroke`],qt=[`x`,`y`,`width`,`height`],Jt=[`x`,`y`,`width`,`height`],Yt={key:3},Xt=[`d`,`stroke`],Zt=[`d`,`fill`,`stroke`],Qt={key:0},$t=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],en=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],tn={key:4},nn=[`d`,`fill`,`stroke`],rn={key:4,class:`vue-data-ui-watermark`},an={key:0},on={key:1},sn=/*#__PURE__*/ le({__name:`vue-ui-3d-bar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`selectDatapoint`,`copyAlt`],setup(e,{expose:le,emit:Be}){let sn=T(()=>import(`./BaseIcon-fYK0iID8.js`).then(e=>e.n)),cn=T(()=>import(`./vue-ui-accordion-D4FHxzsL.js`).then(e=>e.n)),ln=T(()=>import(`./DataTable-5Ug6gMAX.js`)),un=T(()=>import(`./PenAndPaper-r50tK3S4.js`).then(e=>e.t)),dn=T(()=>import(`./UserOptions-Em_JgDXM.js`).then(e=>e.n)),fn=T(()=>import(`./PackageVersion-DWlHsdPa.js`).then(e=>e.t)),pn=T(()=>import(`./BaseDraggableDialog-9d30Yx8c.js`).then(e=>e.n)),{vue_ui_3d_bar:mn}=t(),P=e,hn=Be,gn=y(()=>!!P.dataset&&Object.keys(P.dataset).length),F=O(u()),I=O(null),L=O(!1),_n=O(0),vn=O(0),yn=O(null),bn=O(null),xn=O(null),Sn=O(null),R=O(!1),Cn=O(null),wn=O(null),z=O(null),B=O(``),V=O(Nn()),Tn=y(()=>V.value.style),H=y(()=>V.value.style.chart),U=y(()=>V.value.userOptions);ce({config:()=>V.value,dataset:()=>P.dataset,component:`VueUi3dBar`,rules:[{test:e=>e?.series&&e.series.length>8,message:[`👀 The number of series is > 8. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]},{test:e=>e?.series&&e.series.some(e=>e?.breakdown&&e.breakdown.length>6),message:[`👀 Some donut breakdowns have > 6 data points. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" data point.`]}]});let En=y(()=>V.value.userOptions.useCursorPointer),Dn=y(()=>ee({defaultConfig:{customPalette:[`#808080`,`#ADADAD`,`#DBDBDB`],userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,color:`#6A6A6A`,bar:{color:`#ADADAD`,stroke:`#6A6A6A`},box:{stroke:`#6A6A6A`}}}},userConfig:V.value.skeletonConfig??{}})),{loading:On,FINAL_DATASET:W}=oe({...Ie(P),FINAL_CONFIG:V,prepareConfig:Nn,callback:()=>{Promise.resolve().then(async()=>{await je(),Hn()})},skeletonDataset:P.config?.skeletonDataset??{series:[{name:`_`,value:21,breakdown:[{name:`_`,value:13},{name:`_`,value:8}]},{name:`_`,value:13,breakdown:[{name:`_`,value:8},{name:`_`,value:5}]},{name:`_`,value:8,breakdown:[{name:`_`,value:5},{name:`_`,value:3}]}]},skeletonConfig:ee({defaultConfig:V.value,userConfig:Dn.value})}),{userOptionsVisible:kn,setUserOptionsVisibility:An,keepUserOptionState:jn}=we({config:V.value}),{svgRef:Mn}=Te({config:V.value.style.chart.title});function Nn(){return ue(P.config,mn,Ee)}Le(()=>P.config,e=>{On.value||(V.value=Nn()),kn.value=!V.value.userOptions.showOnChartHover,Gn(),_n.value+=1,vn.value+=1,G.value.showTable=V.value.table.show},{deep:!0});let{isPrinting:Pn,isImaging:Fn,generatePdf:In,generateImage:Ln}=be({elementId:`3d_bar_${F.value}`,fileName:H.value.title.text||`vue-ui-3d-bar`,options:V.value.userOptions.print}),Rn=y(()=>re(V.value.customPalette)),G=O({showTable:V.value.table.show});Le(V,()=>{G.value={showTable:V.value.table.show}},{immediate:!0});let K=y(()=>W.value.series&&W.value.series.length),zn=O(H.value.box.dimensions.width*(K.value?2:1)),Bn=O(H.value.box.dimensions.height),q=y(()=>({height:Bn.value,width:zn.value,absoluteWidth:zn.value,top:H.value.box.dimensions.top,bottom:H.value.box.dimensions.bottom,left:H.value.box.dimensions.left,right:H.value.box.dimensions.right,perspective:H.value.box.dimensions.perspective})),J=y(()=>{if(K.value){let e=W.value.series.map(e=>e.value||0).reduce((e,t)=>e+t,0),t=W.value.series.map((t,n)=>({...t,seriesIndex:n,id:u(),proportion:(t.value||0)/e,color:l(t.color)||Rn.value[n]||a[n]||a[n%a.length],breakdown:t.breakdown?t.breakdown.sort((e,t)=>t.value-e.value):null})).sort((e,t)=>t.value-e.value),n=[],r=0;for(let e=0;e<t.length;e+=1)n.push({...t[e],fill:qn(r,t[e].proportion,t[e].breakdown,t[e].color)}),r+=t[e].proportion;return n}return null}),Y=y(()=>{let e=q.value.width/2,t=q.value;return{right:`M${e},${t.top} ${t.width-t.right}, ${t.top+t.perspective} ${t.width-t.right},${t.height-t.bottom-t.perspective} ${e},${t.height-t.bottom}`,left:`M${e},${t.top} ${t.left},${t.top+t.perspective} ${t.left},${t.height-t.bottom-t.perspective} ${e},${t.height-t.bottom}`,side:`M${e},${t.height-t.bottom} ${e},${t.top+t.perspective*2}`,topSides:`M${t.left},${t.top+t.perspective} ${e},${t.top+t.perspective*2} ${t.width-t.right},${t.top+t.perspective}`,tubeTop:`M${t.left},${t.top+t.perspective} C ${t.left},${t.top-t.perspective/3} ${t.width-t.right},${t.top-t.perspective/3} ${t.width-t.right},${t.top+t.perspective} C ${t.width-t.right},${t.top+t.perspective*2.3} ${t.left},${t.top+t.perspective*2.3} ${t.left},${t.top+t.perspective}`,tubeLeft:`M${t.left},${t.top+t.perspective} ${t.left},${t.height-t.bottom-t.perspective}`,tubeRight:`M${t.width-t.right},${t.top+t.perspective} ${t.width-t.right},${t.height-t.bottom-t.perspective}`,tubeBottom:`M${t.width-t.right},${t.height-t.bottom-t.perspective} C ${t.width-t.right},${t.height} ${t.left},${t.height} ${t.left},${t.height-t.bottom-t.perspective}`}}),Vn=O(H.value.animation.use?0:W.value.percentage);function Hn(){let e=0,t=H.value.animation.speed,n=.005*H.value.animation.acceleration;function r(){Vn.value+=t+e,e+=n,Vn.value<W.value.percentage?requestAnimationFrame(r):Vn.value=W.value.percentage}H.value.animation.use&&(Vn.value=0,r())}Pe(()=>{Gn(),Hn()});let Un=y(()=>V.value.debug);function Wn(){Un.value&&(ae(P.dataset)?d({componentName:`VueUi3dBar`,type:`dataset`,debug:Un.value}):P.dataset.series?P.dataset.series.forEach((e,t)=>{ie({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{d({componentName:`VueUi3dBar`,type:`datasetSerieAttribute`,property:e,index:t,debug:Un.value})}),e.breakdown&&e.breakdown.forEach((e,n)=>{ie({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{d({componentName:`VueUi3dBar`,type:`datasetSerieAttribute`,property:e,index:`${t} - ${n}`,debug:Un.value})})})}):ie({datasetObject:P.dataset,requiredAttributes:[`percentage`]}).forEach(e=>{d({componentName:`VueUi3dBar`,type:`datasetAttribute`,property:e,debug:Un.value})}))}function Gn(){if(Wn(),V.value.responsive){let e=xe(()=>{let{width:e,height:t}=Se({chart:I.value,title:H.value.title.text?yn.value:null,source:Sn.value});requestAnimationFrame(()=>{Bn.value=t-12,zn.value=e})});bn.value&&(xn.value&&bn.value.unobserve(xn.value),bn.value.disconnect()),bn.value=new ResizeObserver(e),xn.value=I.value.parentNode,bn.value.observe(xn.value)}}let Kn=y(()=>q.value.width/4);function qn(e,t,n,r){let a=q.value.height-q.value.bottom-q.value.top-q.value.perspective*2,{width:s,height:c,bottom:l,right:u,left:d,perspective:f}=q.value,p=K.value?s/4:s/2,m=p*2+d,h=l+a*e,ee=c-h-f-a*t/2,te=ee>q.value.height/2?`top`:`bottom`,g=c*.25,ne=!!n,re=null,ie=null;return ne&&(n=n.map((e,t)=>({...e,value:e.value||0,color:i(r,t/n.length)})),re=o({series:n},s/2+s/5,te===`top`?ee-g:ee+g,s/10,s/10,1.99999,2,1,360,105.25,s/20),ie=o({series:n},s-m+s/14,c-h-f-a*t/2,s/40,s/40,1.99999,2,1,360,105.25,s/40)),{donut:re,miniDonut:ie,donutR:s/20,CENTER_X:p,sidePointer:{x:s-m,x2:s-m+s/14,xText:s-m+s/9,y:c-h-f-a*t/2,topY:c-h-f-a*t,height:a*t},apexBottom:{y:c-h,x:p},apexTop:{y:c-h-a*t,x:p},right:`M${p},${c-h} ${p},${c-h-a*t} ${s-m},${c-h-f-a*t} ${s-m},${c-h-f}Z`,left:`M${p},${c-h} ${p},${c-h-a*t} ${d}, ${c-h-f-a*t} ${d},${c-h-f}Z`,liningTop:`M${d},${c-h-f-a*t} ${p},${c-h-a*t} ${s-m},${c-h-f-a*t}`,liningTopShade:`M${d},${c-h-f-a*t-.5} ${p},${c-h-a*t-.5} ${s-m},${c-h-f-a*t-.5}`,top:`M${p},${c-h-a*t} ${d},${c-h-f-a*t} ${p},${c-h-f*2-a*t} ${s-m},${c-h-f-a*t} Z`,tubeTop:`M${d},${c-h-a*t-f} C ${d},${c-h-a*t-f*2.5} ${s-m},${c-h-a*t-f*2.5} ${s-m},${c-h-a*t-f} C ${s-m},${c-h-a*t+f/2} ${d},${c-h-a*t+f/2} ${d},${c-h-a*t-f}`,bottomTubeTop:`M ${s-m-.5},${c-h-f} C ${s-m-.5},${c-h+f/2} ${d},${c-h+f/2} ${d+.5},${c-h-f}`,tubeBody:`M
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{$ as n,D as r,Ft as i,Ht as a,It as o,Jt as s,Q as c,S as l,X as u,at as d,b as f,f as p,h as m,i as h,in as ee,nt as te,p as g,t as ne,w as re,yt as ie,zt as ae}from"./lib-rPeBMZrn.js";import{n as oe,t as se}from"./BaseScanner-8NdoBs7B.js";import{n as ce}from"./useHints-C-TwxM0Y.js";import{t as le}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as ue}from"./resolveChartConfig-CIhClE5R.js";import{t as de}from"./img-D4RQwASc.js";import{n as fe}from"./Title-BliHuXfT.js";import{t as pe}from"./useChartExport-BZts4KFb.js";import{n as me,t as he}from"./tableIntegration-CNoJ1CIY.js";import{n as ge,t as _e}from"./annotationSlots-RvQBEO9-.js";import{n as ve,t as ye}from"./userOptionsSlots-DYuo-E5m.js";import{t as be}from"./usePrinter-DVf3YcG5.js";import{c as xe}from"./canvas-lib-22VpOI4_.js";import{t as Se}from"./useResponsive-CENUxfEL.js";import{t as _}from"./DefGrad-DKMq1REY.js";import{t as Ce}from"./A11yDataTable-DWNlWXzs.js";import{t as we}from"./useUserOptionState-CXlFnwPv.js";import{t as Te}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ee}from"./vue_ui_3d_bar-DmAve5Ri.js";import{Fragment as v,computed as y,createBlock as b,createCommentVNode as x,createElementBlock as S,createElementVNode as C,createSlots as De,createTextVNode as Oe,createVNode as w,defineAsyncComponent as T,guardReactiveProps as ke,mergeProps as Ae,nextTick as je,normalizeClass as Me,normalizeProps as Ne,normalizeStyle as E,onMounted as Pe,openBlock as D,ref as O,renderList as k,renderSlot as A,resolveDynamicComponent as Fe,toDisplayString as j,toRefs as Ie,unref as M,watch as Le,withCtx as N,withKeys as Re,withModifiers as ze}from"vue";var Be=/* @__PURE__ */ e({default:()=>sn}),Ve=[`id`],He=[`id`],Ue={"aria-live":`polite`,class:`sr-only`},We={style:{position:`relative`}},Ge=[`xmlns`,`viewBox`,`aria-describedby`],Ke=[`width`,`height`],qe={key:1},Je=[`x`,`y`,`font-size`,`font-weight`,`fill`],Ye=[`x`,`y`],Xe=[`cx`,`cy`,`stroke`,`opacity`],Ze=[`d`,`stroke`],Qe=[`d`,`stroke`],$e={key:4},et={key:0},tt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],nt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],rt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],it=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],at={key:1},ot=[`d`,`stroke`,`stroke-width`,`fill`],st=[`d`,`stroke`,`stroke-width`,`fill`],ct=[`d`,`stroke`,`stroke-width`,`fill`],lt={key:2},ut=[`aria-label`],dt=[`d`,`fill`,`onMouseenter`,`onClick`,`onMouseout`],ft=[`d`,`fill`,`onMouseenter`,`onClick`,`onMouseout`],pt=[`d`,`fill`,`onMouseenter`,`onClick`,`onMouseout`],mt=[`d`,`onMouseenter`,`onClick`,`onMouseout`],ht=[`d`],gt=[`d`,`stroke`],_t=[`onClick`],vt=[`stroke`,`d`],yt=[`cx`,`cy`,`fill`,`stroke`],bt=[`x`,`y`,`width`,`height`],xt=[`x`,`y`,`width`,`height`],St={key:3},Ct=[`d`,`stroke`],wt=[`d`,`fill`,`stroke`],Tt={key:0},Et=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],Dt=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],Ot={key:4},kt=[`d`,`fill`,`stroke`],At={key:5},jt={key:0},Mt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],Nt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],Pt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],Ft=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],It=[`d`,`stroke`,`stroke-width`,`fill`],Lt=[`d`,`stroke`,`stroke-width`,`fill`],Rt=[`d`],zt={key:1},Bt=[`aria-label`],Vt=[`onMouseenter`,`onClick`,`onMouseout`,`d`,`fill`],Ht=[`onMouseenter`,`onClick`,`onMouseout`,`d`],Ut=[`onMouseenter`,`onClick`,`onMouseout`,`d`,`fill`],Wt=[`onClick`],Gt=[`stroke`,`d`],Kt=[`cx`,`cy`,`fill`,`stroke`],qt=[`x`,`y`,`width`,`height`],Jt=[`x`,`y`,`width`,`height`],Yt={key:3},Xt=[`d`,`stroke`],Zt=[`d`,`fill`,`stroke`],Qt={key:0},$t=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],en=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],tn={key:4},nn=[`d`,`fill`,`stroke`],rn={key:4,class:`vue-data-ui-watermark`},an={key:0},on={key:1},sn=/*#__PURE__*/ le({__name:`vue-ui-3d-bar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`selectDatapoint`,`copyAlt`],setup(e,{expose:le,emit:Be}){let sn=T(()=>import(`./BaseIcon-fYK0iID8.js`).then(e=>e.n)),cn=T(()=>import(`./vue-ui-accordion-D4FHxzsL.js`).then(e=>e.n)),ln=T(()=>import(`./DataTable-5Ug6gMAX.js`)),un=T(()=>import(`./PenAndPaper-r50tK3S4.js`).then(e=>e.t)),dn=T(()=>import(`./UserOptions-Em_JgDXM.js`).then(e=>e.n)),fn=T(()=>import(`./PackageVersion-u-p5bCcj.js`).then(e=>e.t)),pn=T(()=>import(`./BaseDraggableDialog-9d30Yx8c.js`).then(e=>e.n)),{vue_ui_3d_bar:mn}=t(),P=e,hn=Be,gn=y(()=>!!P.dataset&&Object.keys(P.dataset).length),F=O(u()),I=O(null),L=O(!1),_n=O(0),vn=O(0),yn=O(null),bn=O(null),xn=O(null),Sn=O(null),R=O(!1),Cn=O(null),wn=O(null),z=O(null),B=O(``),V=O(Nn()),Tn=y(()=>V.value.style),H=y(()=>V.value.style.chart),U=y(()=>V.value.userOptions);ce({config:()=>V.value,dataset:()=>P.dataset,component:`VueUi3dBar`,rules:[{test:e=>e?.series&&e.series.length>8,message:[`👀 The number of series is > 8. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]},{test:e=>e?.series&&e.series.some(e=>e?.breakdown&&e.breakdown.length>6),message:[`👀 Some donut breakdowns have > 6 data points. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" data point.`]}]});let En=y(()=>V.value.userOptions.useCursorPointer),Dn=y(()=>ee({defaultConfig:{customPalette:[`#808080`,`#ADADAD`,`#DBDBDB`],userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,color:`#6A6A6A`,bar:{color:`#ADADAD`,stroke:`#6A6A6A`},box:{stroke:`#6A6A6A`}}}},userConfig:V.value.skeletonConfig??{}})),{loading:On,FINAL_DATASET:W}=oe({...Ie(P),FINAL_CONFIG:V,prepareConfig:Nn,callback:()=>{Promise.resolve().then(async()=>{await je(),Hn()})},skeletonDataset:P.config?.skeletonDataset??{series:[{name:`_`,value:21,breakdown:[{name:`_`,value:13},{name:`_`,value:8}]},{name:`_`,value:13,breakdown:[{name:`_`,value:8},{name:`_`,value:5}]},{name:`_`,value:8,breakdown:[{name:`_`,value:5},{name:`_`,value:3}]}]},skeletonConfig:ee({defaultConfig:V.value,userConfig:Dn.value})}),{userOptionsVisible:kn,setUserOptionsVisibility:An,keepUserOptionState:jn}=we({config:V.value}),{svgRef:Mn}=Te({config:V.value.style.chart.title});function Nn(){return ue(P.config,mn,Ee)}Le(()=>P.config,e=>{On.value||(V.value=Nn()),kn.value=!V.value.userOptions.showOnChartHover,Gn(),_n.value+=1,vn.value+=1,G.value.showTable=V.value.table.show},{deep:!0});let{isPrinting:Pn,isImaging:Fn,generatePdf:In,generateImage:Ln}=be({elementId:`3d_bar_${F.value}`,fileName:H.value.title.text||`vue-ui-3d-bar`,options:V.value.userOptions.print}),Rn=y(()=>re(V.value.customPalette)),G=O({showTable:V.value.table.show});Le(V,()=>{G.value={showTable:V.value.table.show}},{immediate:!0});let K=y(()=>W.value.series&&W.value.series.length),zn=O(H.value.box.dimensions.width*(K.value?2:1)),Bn=O(H.value.box.dimensions.height),q=y(()=>({height:Bn.value,width:zn.value,absoluteWidth:zn.value,top:H.value.box.dimensions.top,bottom:H.value.box.dimensions.bottom,left:H.value.box.dimensions.left,right:H.value.box.dimensions.right,perspective:H.value.box.dimensions.perspective})),J=y(()=>{if(K.value){let e=W.value.series.map(e=>e.value||0).reduce((e,t)=>e+t,0),t=W.value.series.map((t,n)=>({...t,seriesIndex:n,id:u(),proportion:(t.value||0)/e,color:l(t.color)||Rn.value[n]||a[n]||a[n%a.length],breakdown:t.breakdown?t.breakdown.sort((e,t)=>t.value-e.value):null})).sort((e,t)=>t.value-e.value),n=[],r=0;for(let e=0;e<t.length;e+=1)n.push({...t[e],fill:qn(r,t[e].proportion,t[e].breakdown,t[e].color)}),r+=t[e].proportion;return n}return null}),Y=y(()=>{let e=q.value.width/2,t=q.value;return{right:`M${e},${t.top} ${t.width-t.right}, ${t.top+t.perspective} ${t.width-t.right},${t.height-t.bottom-t.perspective} ${e},${t.height-t.bottom}`,left:`M${e},${t.top} ${t.left},${t.top+t.perspective} ${t.left},${t.height-t.bottom-t.perspective} ${e},${t.height-t.bottom}`,side:`M${e},${t.height-t.bottom} ${e},${t.top+t.perspective*2}`,topSides:`M${t.left},${t.top+t.perspective} ${e},${t.top+t.perspective*2} ${t.width-t.right},${t.top+t.perspective}`,tubeTop:`M${t.left},${t.top+t.perspective} C ${t.left},${t.top-t.perspective/3} ${t.width-t.right},${t.top-t.perspective/3} ${t.width-t.right},${t.top+t.perspective} C ${t.width-t.right},${t.top+t.perspective*2.3} ${t.left},${t.top+t.perspective*2.3} ${t.left},${t.top+t.perspective}`,tubeLeft:`M${t.left},${t.top+t.perspective} ${t.left},${t.height-t.bottom-t.perspective}`,tubeRight:`M${t.width-t.right},${t.top+t.perspective} ${t.width-t.right},${t.height-t.bottom-t.perspective}`,tubeBottom:`M${t.width-t.right},${t.height-t.bottom-t.perspective} C ${t.width-t.right},${t.height} ${t.left},${t.height} ${t.left},${t.height-t.bottom-t.perspective}`}}),Vn=O(H.value.animation.use?0:W.value.percentage);function Hn(){let e=0,t=H.value.animation.speed,n=.005*H.value.animation.acceleration;function r(){Vn.value+=t+e,e+=n,Vn.value<W.value.percentage?requestAnimationFrame(r):Vn.value=W.value.percentage}H.value.animation.use&&(Vn.value=0,r())}Pe(()=>{Gn(),Hn()});let Un=y(()=>V.value.debug);function Wn(){Un.value&&(ae(P.dataset)?d({componentName:`VueUi3dBar`,type:`dataset`,debug:Un.value}):P.dataset.series?P.dataset.series.forEach((e,t)=>{ie({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{d({componentName:`VueUi3dBar`,type:`datasetSerieAttribute`,property:e,index:t,debug:Un.value})}),e.breakdown&&e.breakdown.forEach((e,n)=>{ie({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{d({componentName:`VueUi3dBar`,type:`datasetSerieAttribute`,property:e,index:`${t} - ${n}`,debug:Un.value})})})}):ie({datasetObject:P.dataset,requiredAttributes:[`percentage`]}).forEach(e=>{d({componentName:`VueUi3dBar`,type:`datasetAttribute`,property:e,debug:Un.value})}))}function Gn(){if(Wn(),V.value.responsive){let e=xe(()=>{let{width:e,height:t}=Se({chart:I.value,title:H.value.title.text?yn.value:null,source:Sn.value});requestAnimationFrame(()=>{Bn.value=t-12,zn.value=e})});bn.value&&(xn.value&&bn.value.unobserve(xn.value),bn.value.disconnect()),bn.value=new ResizeObserver(e),xn.value=I.value.parentNode,bn.value.observe(xn.value)}}let Kn=y(()=>q.value.width/4);function qn(e,t,n,r){let a=q.value.height-q.value.bottom-q.value.top-q.value.perspective*2,{width:s,height:c,bottom:l,right:u,left:d,perspective:f}=q.value,p=K.value?s/4:s/2,m=p*2+d,h=l+a*e,ee=c-h-f-a*t/2,te=ee>q.value.height/2?`top`:`bottom`,g=c*.25,ne=!!n,re=null,ie=null;return ne&&(n=n.map((e,t)=>({...e,value:e.value||0,color:i(r,t/n.length)})),re=o({series:n},s/2+s/5,te===`top`?ee-g:ee+g,s/10,s/10,1.99999,2,1,360,105.25,s/20),ie=o({series:n},s-m+s/14,c-h-f-a*t/2,s/40,s/40,1.99999,2,1,360,105.25,s/40)),{donut:re,miniDonut:ie,donutR:s/20,CENTER_X:p,sidePointer:{x:s-m,x2:s-m+s/14,xText:s-m+s/9,y:c-h-f-a*t/2,topY:c-h-f-a*t,height:a*t},apexBottom:{y:c-h,x:p},apexTop:{y:c-h-a*t,x:p},right:`M${p},${c-h} ${p},${c-h-a*t} ${s-m},${c-h-f-a*t} ${s-m},${c-h-f}Z`,left:`M${p},${c-h} ${p},${c-h-a*t} ${d}, ${c-h-f-a*t} ${d},${c-h-f}Z`,liningTop:`M${d},${c-h-f-a*t} ${p},${c-h-a*t} ${s-m},${c-h-f-a*t}`,liningTopShade:`M${d},${c-h-f-a*t-.5} ${p},${c-h-a*t-.5} ${s-m},${c-h-f-a*t-.5}`,top:`M${p},${c-h-a*t} ${d},${c-h-f-a*t} ${p},${c-h-f*2-a*t} ${s-m},${c-h-f-a*t} Z`,tubeTop:`M${d},${c-h-a*t-f} C ${d},${c-h-a*t-f*2.5} ${s-m},${c-h-a*t-f*2.5} ${s-m},${c-h-a*t-f} C ${s-m},${c-h-a*t+f/2} ${d},${c-h-a*t+f/2} ${d},${c-h-a*t-f}`,bottomTubeTop:`M ${s-m-.5},${c-h-f} C ${s-m-.5},${c-h+f/2} ${d},${c-h+f/2} ${d+.5},${c-h-f}`,tubeBody:`M
2
2
  ${d},${c-h-a*t-f}
3
3
  C ${d},${c-h-a*t+f/2}
4
4
  ${s-m},${c-h-a*t+f/2}
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{$ as n,D as r,Dt as i,Jt as a,X as o,Yt as ee,at as te,b as s,et as ne,i as c,in as re,nt as ie,pt as ae,t as oe,tn as se,zt as ce}from"./lib-rPeBMZrn.js";import{n as le,t as ue}from"./BaseScanner-8NdoBs7B.js";import{n as de,t as fe}from"./useHints-C-TwxM0Y.js";import{t as pe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as me}from"./resolveChartConfig-CIhClE5R.js";import{t as he}from"./img-D4RQwASc.js";import{n as ge}from"./Title-BliHuXfT.js";import{t as _e}from"./useChartExport-BZts4KFb.js";import{n as ve,t as ye}from"./tableIntegration-CNoJ1CIY.js";import{n as be,t as xe}from"./annotationSlots-RvQBEO9-.js";import{n as Se,t as Ce}from"./userOptionsSlots-DYuo-E5m.js";import{t as we}from"./usePrinter-DVf3YcG5.js";import{t as Te}from"./useSvgLabelLayout-42Kats14.js";import{t as Ee}from"./useTimeLabelCollider-BTybMUFi.js";import{t as De}from"./useResponsive-CENUxfEL.js";import{t as Oe}from"./DefGrad-DKMq1REY.js";import{t as ke}from"./A11yDataTable-DWNlWXzs.js";import{t as Ae}from"./useUserOptionState-CXlFnwPv.js";import{t as je}from"./useChartAccessibility-DOMuYJfm.js";import{t as Me}from"./vue_ui_age_pyramid-CL0Ef8Ov.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as Ne,createTextVNode as Pe,createVNode as h,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as Fe,nextTick as Ie,normalizeClass as Le,normalizeProps as v,normalizeStyle as Re,onBeforeUnmount as ze,onMounted as Be,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as Ve,shallowRef as He,toDisplayString as C,toRefs as Ue,unref as w,watch as T,withCtx as E}from"vue";var We=/* @__PURE__ */ e({default:()=>yt}),Ge=[`id`],Ke=[`id`],qe={style:{position:`relative`}},Je=[`xmlns`,`viewBox`,`aria-describedby`],Ye=[`x`,`y`,`width`,`height`],Xe=[`x`,`y`,`width`,`height`,`fill`,`rx`],Ze=[`x`,`y`,`width`,`height`,`fill`,`rx`],Qe=[`x`,`y`,`width`,`height`,`fill`,`rx`],$e=[`x`,`y`,`width`,`height`,`fill`,`rx`],et=[`x`,`y`,`font-size`,`font-weight`,`fill`,`stroke`],tt=[`x`,`y`,`font-size`,`font-weight`,`fill`,`stroke`],nt={key:0},rt=[`x`,`y`,`fill`,`font-size`,`font-weight`],it=[`x`,`y`,`fill`,`font-size`,`font-weight`],at={key:1},ot=[`x`,`y`,`font-size`,`fill`,`font-weight`],st={key:2},ct={key:0},lt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ut=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],dt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ft=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],pt=[`font-size`,`fill`,`text-anchor`,`font-weight`,`transform`],mt=[`font-size`,`fill`,`text-anchor`,`font-weight`,`transform`],ht=[`x`,`y`,`font-size`,`fill`,`font-weight`],gt=[`x`,`y`,`width`,`height`,`fill`,`onMouseover`,`onMouseleave`,`onClick`],_t={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},vt={key:5,class:`vue-data-ui-watermark`},yt=/*#__PURE__*/ pe({__name:`vue-ui-age-pyramid`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`],setup(e,{expose:pe,emit:We}){let yt=g(()=>import(`./Tooltip-C1q0Qoh7.js`)),bt=g(()=>import(`./BaseIcon-fYK0iID8.js`).then(e=>e.n)),xt=g(()=>import(`./vue-ui-accordion-D4FHxzsL.js`).then(e=>e.n)),St=g(()=>import(`./DataTable-5Ug6gMAX.js`)),Ct=g(()=>import(`./PenAndPaper-r50tK3S4.js`).then(e=>e.t)),wt=g(()=>import(`./UserOptions-Em_JgDXM.js`).then(e=>e.n)),Tt=g(()=>import(`./PackageVersion-DWlHsdPa.js`).then(e=>e.t)),Et=g(()=>import(`./BaseDraggableDialog-9d30Yx8c.js`).then(e=>e.n)),{vue_ui_age_pyramid:Dt}=t(),D=e,Ot=We,kt=u(()=>!!D.dataset&&D.dataset.length),O=b(o()),k=b(!1),At=b(``),A=b(null),jt=b(0),j=b(null),Mt=b(null),Nt=b(null),Pt=b(null),Ft=b(0),It=b(0),Lt=b(null),Rt=b(null),zt=b(null),M=b(null),Bt=b({x:0,y:0}),N=b(`pointer`),Vt=b(!1),P=b(Yt()),F=u(()=>P.value.style),I=u(()=>P.value.style.layout.dataLabels),L=u(()=>P.value.style.layout.bars),R=u(()=>P.value.style.layout.bars.labels);de({config:()=>P.value,dataset:()=>D.dataset,component:`VueUiAgePyramid`,rules:[fe.emptyArray,{test:e=>e.length>130,message:[`👀 Dataset has > 130 points. Consider:`,``,`▶️ Grouping small values into aggregated categories.`,``,`▶️ Using VueUiStackline to display data in a more compact way.`]}]});let z=u(()=>P.value.userOptions.useCursorPointer),Ht=u(()=>re({defaultConfig:{userOptions:{show:!1},table:{show:!1},translations:{male:``,female:``},style:{backgroundColor:`#99999930`,layout:{bars:{left:{color:`#CACACA`},right:{color:`#999999`}},dataLabels:{xAxis:{fontSize:0,scale:1e3,translation:``},yAxis:{show:!1}},grid:{stroke:`#6A6A6A`}}}},userConfig:P.value.skeletonConfig??{}})),{loading:Ut,FINAL_DATASET:Wt,manualLoading:Gt}=le({...Ue(D),FINAL_CONFIG:P,prepareConfig:Yt,skeletonDataset:D.config?.skeletonDataset??[[`_`,9,2,2],[`_`,8,3,3],[`_`,7,5,5],[`_`,6,8,8],[`_`,5,13,13],[`_`,4,21,21],[`_`,3,34,34],[`_`,2,55,55],[`_`,1,89,89],[`_`,0,144,144]],skeletonConfig:re({defaultConfig:P.value,userConfig:Ht.value})}),{userOptionsVisible:Kt,setUserOptionsVisibility:qt,keepUserOptionState:Jt}=Ae({config:P.value}),{svgRef:B}=je({config:P.value.style.title});function Yt(){return me(D.config,Dt,Me)}function Xt(e){let t=ne(e);return t?.style?.chart&&delete t.style.tooltip,JSON.stringify(t)}let Zt=Xt(D.config);T(()=>D.config,(e,t)=>{let n=Xt(e),r=n!==Zt;Zt=n;let i=Yt();r?(Ut.value||(P.value=i),Kt.value=!P.value.userOptions.showOnChartHover,tn(),Ft.value+=1,It.value+=1,U.value.showTable=P.value.table.show,U.value.showTooltip=P.value.style.tooltip.show):(P.value.style.tooltip=i.style.tooltip,U.value.showTooltip=P.value.style.tooltip.show)},{deep:!0}),T(()=>D.dataset,e=>{Array.isArray(e)&&e.length>0&&(Gt.value=!1)},{deep:!0});let V=He(null),H=He(null),Qt=b(!1),$t=0;Be(()=>{tn()});let en=u(()=>P.value.debug);function tn(){ce(D.dataset)&&(te({componentName:`VueUiAgePyramid`,type:`dataset`,debug:en.value}),Gt.value=!0),ce(D.dataset)||(Gt.value=P.value.loading),P.value.responsive&&(V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect()),V.value=new ResizeObserver(()=>{let{width:e,height:t}=De({chart:j.value,title:F.value.title.text?Mt.value:null,source:Nt.value,noTitle:Pt.value});cancelAnimationFrame($t),$t=requestAnimationFrame(()=>{W.value.width=e,W.value.height=t,Qt.value=!0})}),H.value=j.value.parentNode,V.value.observe(H.value))}ze(()=>{cancelAnimationFrame($t),V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect())});let{isPrinting:nn,isImaging:rn,generatePdf:an,generateImage:on}=we({elementId:`vue-ui-age-pyramid_${O.value}`,fileName:F.value.title.text||`vue-ui-age-pyramid`,options:P.value.userOptions.print}),sn=u(()=>P.value.userOptions.show&&!F.value.title.text),U=b({showTable:P.value.table.show,showTooltip:F.value.tooltip.show});T(P,()=>{U.value={showTable:P.value.table.show,showTooltip:F.value.tooltip.show}},{immediate:!0});let W=b({height:F.value.height,width:F.value.width}),cn=u(()=>W.value.width),ln=u(()=>W.value.height),{metrics:un,ready:dn,settling:fn,update:pn}=Te({svgRef:B,canMeasure:()=>!P.value.responsive||Qt.value,initialMetrics:{bottom:0},measure:e=>({bottom:e(Lt.value).height})}),mn=u(()=>un.value.bottom),G=u(()=>{let e=W.value.width-F.value.layout.padding.right-F.value.layout.padding.left,t=F.value.layout.padding.left,n=W.value.width-F.value.layout.padding.right;return{top:F.value.layout.padding.top+I.value.sideTitles.fontSize+I.value.sideTitles.offsetY+12,left:t,right:n,bottom:W.value.height-F.value.layout.padding.bottom-mn.value,width:e,height:W.value.height-F.value.layout.padding.top-F.value.layout.padding.bottom-mn.value-I.value.sideTitles.fontSize-I.value.sideTitles.offsetY-12,centerX:F.value.layout.padding.left+e/2,leftChart:{width:e/2-F.value.layout.centerSlit.width,right:t+e/2-F.value.layout.centerSlit.width},rightChart:{width:e/2-F.value.layout.centerSlit.width,left:t+e/2+F.value.layout.centerSlit.width}}}),hn=u(()=>Wt.value.map(e=>I.value.yAxis.display===`age`?e[1]:e[0])),K=u(()=>{let e=gn(q.value/5),t=[],n=[];for(let r=0;r<=5;r+=1){let i=e*r,a=e*(r-5);t.push({value:i,x:G.value.left+G.value.width/2+F.value.layout.centerSlit.width+i/q.value*G.value.leftChart.width}),n.push({value:Math.abs(a),x:G.value.left+G.value.width/2+a/q.value*G.value.leftChart.width-F.value.layout.centerSlit.width})}return{right:t,left:n}});function gn(e){if(e===0)return 0;let t=10**Math.floor(Math.log10(Math.abs(e))),n;return n=Math.round(e/t)*t,n}let q=u(()=>Math.max(...Wt.value.flatMap(e=>e.slice(-2).map(e=>s(e))))),J=u(()=>Wt.value.length),_n=u(()=>Wt.value.map(e=>({segment:e[0],age:e[1],left:{value:e[2],proportionToMax:e[2]/q.value},right:{value:e[3],proportionToMax:e[3]/q.value}}))),Y=u(()=>_n.value.map((e,t)=>{let n=G.value.top+G.value.height/J.value*t,r=G.value.height/J.value-L.value.gap;return{segment:e.segment,age:e.age,left:{...e.left,y:n,color:L.value.left.color,x:G.value.leftChart.right-e.left.proportionToMax*G.value.leftChart.width,width:s(e.left.proportionToMax*G.value.leftChart.width),height:r},right:{...e.right,y:n,color:L.value.right.color,x:G.value.rightChart.left,width:s(e.right.proportionToMax*G.value.rightChart.width),height:r}}})),vn=b(null);function yn(e){let[t,n,r,i]=e;return{segment:t,index:n,left:r,right:i}}function bn(e,t){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:yn(t),seriesIndex:e})}function xn(e,t){P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:yn(t),seriesIndex:e}),(N.value!==`keyboard`||M.value!==e)&&(A.value=null,k.value=!1)}function Sn(e){if(!B.value)return;let t=Y.value[e];if(!t)return;let n=se(G.value.left+G.value.width/2,t.left.y+t.left.height/2,B.value);n&&(Bt.value=n)}function Cn(e,t,r=`pointer`){P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:yn(t),seriesIndex:e}),A.value=e,M.value=e,N.value=r,vn.value={datapoint:t,seriesIndex:e,series:Y.value,config:P.value};let a=F.value.tooltip.customFormat;if(i(a)&&ae(()=>a({seriesIndex:e,datapoint:{segment:t[0],index:t[1],left:t[2],right:t[3]},series:Y.value,config:P.value})))At.value=a({seriesIndex:e,datapoint:{segment:t[0],index:t[1],left:t[2],right:t[3]},series:Y.value,config:P.value});else{let r=``,i=Y.value[e];r+=`<div><b>${i.segment}</b></div>`,r+=`<div>${P.value.translations.age}: ${c(I.value.yAxis.formatter,s(i.age),n({v:s(i.age)}),{datapoint:t,seriesIndex:e})}</div>`,r+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${F.value.tooltip.borderColor}">`,r+=`<div style="display:flex; flex-direction:row;gap:12px">`,r+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${L.value.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${L.value.gradient.show?`url(#age_pyramid_left_${O.value})`:L.value.left.color}"/></svg><div>${P.value.translations.female}</div><div><b>${c(I.value.xAxis.formatter,s(i.left.value),n({v:s(i.left.value)}),{datapoint:t,seriesIndex:e})}</b></div></div>`,r+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${L.value.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${L.value.gradient.show?`url(#age_pyramid_right_${O.value})`:L.value.right.color}"/></svg><div>${P.value.translations.male}</div><div><b>${c(I.value.xAxis.formatter,s(i.right.value),n({v:s(i.right.value)}),{datapoint:t,seriesIndex:e})}</b></div></div>`,r+=`</div>`,r+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${F.value.tooltip.borderColor}"><div>${P.value.translations.total}</div><div><b>${c(I.value.xAxis.formatter,s(i.right.value)+s(i.left.value),n({v:s(i.right.value)+s(i.left.value)}),{datapoint:t,seriesIndex:e})}</b></div></div>`,r+=`</div>`,At.value=`<div>${r}</div>`}k.value=!0,r===`keyboard`&&Ie(()=>{Sn(e)})}function wn(e=null){Ie(()=>{let t=[P.value.translations.year,P.value.translations.age,P.value.translations.female,P.value.translations.male,P.value.translations.total],n=D.dataset.map(e=>[e[0],e[1],e[2],e[3],e[2]??0+e[3]??0]),i=[[F.value.title.text],[F.value.title.subtitle.text],[[``],[``],[``]],t].concat(n),a=r(i);e?e(a):ie({csvContent:a,title:F.value.title.text||`vue-ui-heatmap`})})}let X=u(()=>{let e=[P.value.translations.year,P.value.translations.age,P.value.translations.female,P.value.translations.male,P.value.translations.total];return{head:e,body:D.dataset.map(e=>[e[0],e[1],e[2]==null?``:e[2].toLocaleString(),e[3]==null?``:e[3].toLocaleString(),(e[2]??0+e[3]??0).toLocaleString()]),config:{th:{backgroundColor:P.value.table.th.backgroundColor,color:P.value.table.th.color,outline:P.value.table.th.outline},td:{backgroundColor:P.value.table.td.backgroundColor,color:P.value.table.td.color,outline:P.value.table.td.outline},breakpoint:P.value.table.responsiveBreakpoint},colNames:e}}),Z=b(!1);function Tn(e){Z.value=e,jt.value+=1}function En(){U.value.showTable=!U.value.showTable}function Dn(){U.value.showTooltip=!U.value.showTooltip}let Q=b(!1);function On(){Q.value=!Q.value}async function kn({scale:e=2}={}){if(!j.value)return;let{width:t,height:n}=j.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await he({domElement:j.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:F.value.title.text,width:t,height:n,aspectRatio:r}}let An=b([]),jn=b({start:0,end:Y.value.length});Ee({timeLabelsEls:Lt,timeLabels:An,slicer:jn,configRef:P,rotationPath:[`style`,`layout`,`dataLabels`,`xAxis`,`rotation`],autoRotatePath:[`style`,`layout`,`dataLabels`,`xAxis`,`autoRotate`,`enable`],isAutoSize:!1,width:cn,height:ln,targetClass:`.vue-ui-age-pyramid-x-axis-label`,rotation:F.value.layout.dataLabels.xAxis.autoRotate.angle});let $=u(()=>ye({config:P,style:F,mutableConfig:U,dialog:Et,accordion:xt,isFullscreen:Z,parent:j,maxWidth:800,isCursorPointer:z}));T(()=>U.value.showTable,e=>ve(e,P,Rt));function Mn(){U.value.showTable=!1,zt.value&&zt.value.setTableIconState(!1)}let Nn=u(()=>P.value.style.backgroundColor),Pn=u(()=>P.value.style.title),{isCallbackImaging:Fn,isCallbackSvg:In,generateSvg:Ln,onGenerateImage:Rn}=_e({svg:B,title:Pn,legend:null,legendItems:null,backgroundColor:Nn,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:on});async function zn(){Ot(`copyAlt`,{config:P.value,dataset:Y.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:Y.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Bn(){Vt.value=!0}function Vn(){A.value=null,M.value=null,N.value=`pointer`,k.value=!1,Vt.value=!1}function Hn(e){if(!B.value||Q.value||document.activeElement!==B.value||!Y.value.length)return;let t=[`ArrowUp`,`ArrowLeft`].includes(e.key),n=[`ArrowDown`,`ArrowRight`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){A.value=null,M.value=null,N.value=`pointer`,k.value=!1;return}if(r){if(M.value===null)return;let e=D.dataset[M.value];if(!e)return;bn(M.value,e);return}let a=M.value,o=A.value,ee=a!==null&&a>=0&&a<Y.value.length,te=o!==null&&o>=0&&o<Y.value.length;ee?t?a=a-1<0?Y.value.length-1:a-1:n&&(a=a+1>Y.value.length-1?0:a+1):te?(a=n?o+1:o-1,a>=Y.value.length&&(a=0),a<0&&(a=Y.value.length-1)):a=n?0:Y.value.length-1;let s=D.dataset[a];s&&Cn(a,s,`keyboard`)}return pe({getImage:kn,generatePdf:an,generateCsv:wn,generateImage:on,generateSvg:Ln,toggleTable:En,toggleTooltip:Dn,toggleAnnotator:On,toggleFullscreen:Tn,copyAlt:zn}),T(()=>[W.value,I.value,Lt.value,D.dataset,Qt.value,P.value.style.fontFamily],pn,{flush:`post`,deep:!0}),(t,r)=>(y(),p(`div`,{class:Le(`vue-data-ui-component vue-ui-age-pyramid ${Z.value?`vue-data-ui-wrapper-fullscreen`:``}`),ref_key:`agePyramid`,ref:j,id:`vue-ui-age-pyramid_${O.value}`,style:Re(`font-family:${F.value.fontFamily};width:100%; text-align:center;background:${F.value.backgroundColor};${P.value.responsive?`height:100%`:``}`),onMouseenter:r[1]||=()=>w(qt)(!0),onMouseleave:r[2]||=()=>w(qt)(!1)},[m(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[m(`p`,null,C(P.value.a11y.translations.keyboardNavigation),1)],8,Ke),X.value?.body?.length?(y(),d(ke,{key:0,uid:O.value,head:X.value.head,body:X.value.body,notice:P.value.a11y.translations.tableAvailable,caption:P.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),P.value.userOptions.buttons.annotator?(y(),d(w(Ct),{key:1,showGroupActions:P.value.userOptions.annotator?.showGroupActions??!0,svgRef:w(B),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Q.value,isCursorPointer:z.value,palette:P.value.userOptions.annotatorPalette,onClose:On},Ne({_:2},[x(w(xe),e=>({name:e,fn:E(n=>[S(t.$slots,e,v(_(w(be)(e,n))),void 0,!0)])}))]),1032,[`showGroupActions`,`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),sn.value?(y(),p(`div`,{key:2,ref_key:`noTitle`,ref:Pt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),F.value.title.text?(y(),p(`div`,{key:3,ref_key:`chartTitle`,ref:Mt,style:`width:100%;background:transparent`},[(y(),d(ge,{key:`title_${Ft.value}`,config:{title:{cy:`pyramid-div-title`,...F.value.title},subtitle:{cy:`pyramid-div-subtitle`,...F.value.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),P.value.userOptions.show&&kt.value&&(w(Jt)||w(Kt))?(y(),d(w(wt),{ref_key:`userOptionsRef`,ref:zt,key:`user_options_${jt.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isImaging:w(rn),isPrinting:w(nn),uid:O.value,hasTooltip:P.value.userOptions.buttons.tooltip&&F.value.tooltip.show,hasPdf:P.value.userOptions.buttons.pdf,hasXls:P.value.userOptions.buttons.csv,hasImg:P.value.userOptions.buttons.img,hasSvg:P.value.userOptions.buttons.svg,hasTable:P.value.userOptions.buttons.table,hasFullscreen:P.value.userOptions.buttons.fullscreen,hasAltCopy:P.value.userOptions.buttons.altCopy,isFullscreen:Z.value,isTooltip:U.value.showTooltip,titles:{...P.value.userOptions.buttonTitles},chartElement:j.value,position:P.value.userOptions.position,hasAnnotator:P.value.userOptions.buttons.annotator,isAnnotation:Q.value,callbacks:P.value.userOptions.callbacks,printScale:P.value.userOptions.print.scale,tableDialog:P.value.table.useDialog,isCursorPointer:z.value,onToggleFullscreen:Tn,onGeneratePdf:w(an),onGenerateCsv:wn,onGenerateImage:w(Rn),onGenerateSvg:w(Ln),onToggleTable:En,onToggleTooltip:Dn,onToggleAnnotator:On,onCopyAlt:zn,style:Re({visibility:w(Jt)?w(Kt)?`visible`:`hidden`:`visible`})},Ne({_:2},[x(w(Se)(t.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:E(n=>[S(t.$slots,e,v(_(w(Ce)(e,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):f(``,!0),m(`div`,qe,[(y(),p(`svg`,{ref_key:`svgRef`,ref:B,xmlns:w(oe),class:Le({"vue-data-ui-fullscreen--on":Z.value,"vue-data-ui-fulscreen--off":!Z.value}),viewBox:`0 0 ${W.value.width<=0?10:W.value.width} ${W.value.height<=0?10:W.value.height}`,style:Re(`max-width:100%;overflow:visible;background:transparent;color:${F.value.color};visibility:${w(dn)?`visible`:`hidden`}`),tabindex:`0`,"aria-describedby":`chart-instructions-${O.value}`,onFocus:Bn,onBlur:Vn,onKeydown:Hn},[h(w(Tt)),S(t.$slots,`svg-underlayer`,{svg:{...W.value,drawingArea:G.value,isPrintingImg:w(nn)||w(rn)||w(Fn),isPrintingSvg:w(In)}},void 0,!0),t.$slots[`chart-background`]?(y(),p(`foreignObject`,{key:0,x:G.value.left,y:G.value.top,width:Math.max(.1,G.value.width),height:Math.max(.1,G.value.height),style:{pointerEvents:`none`}},[S(t.$slots,`chart-background`,{},void 0,!0)],8,Ye)):f(``,!0),m(`defs`,null,[h(Oe,{t:`linear`,id:`age_pyramid_left_${O.value}`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,stops:[[`0%`,L.value.left.color,1],[`100%`,w(a)(w(ee)(L.value.left.color,L.value.gradient.shiftHue),100-L.value.gradient.intensity),1]]},null,8,[`id`,`stops`]),h(Oe,{t:`linear`,id:`age_pyramid_right_${O.value}`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,stops:[[`0%`,w(a)(w(ee)(L.value.right.color,L.value.gradient.shiftHue),100-L.value.gradient.intensity),1],[`100%`,L.value.right.color,1]]},null,8,[`id`,`stops`])]),(y(!0),p(l,null,x(Y.value,(e,t)=>(y(),p(`g`,null,[m(`rect`,{x:e.left.x,y:e.left.y,width:w(s)(e.left.width<=0?1e-4:e.left.width),height:e.left.height<=0?1e-4:e.left.height,fill:L.value.gradient.underlayer,rx:L.value.borderRadius},null,8,Xe),m(`rect`,{x:e.left.x,y:e.left.y,width:e.left.width<=0?1e-4:e.left.width,height:e.left.height<=0?1e-4:e.left.height,fill:L.value.gradient.show?`url(#age_pyramid_left_${O.value})`:e.left.color,rx:L.value.borderRadius},null,8,Ze),m(`rect`,{x:e.right.x,y:e.right.y,width:e.right.width<=0?1e-4:e.right.width,height:e.right.height<=0?1e-4:e.right.height,fill:L.value.gradient.underlayer,rx:L.value.borderRadius},null,8,Qe),m(`rect`,{x:e.right.x,y:e.right.y,width:e.right.width<=0?1e-4:e.right.width,height:e.right.height<=0?1e-4:e.right.height,fill:L.value.gradient.show?`url(#age_pyramid_right_${O.value})`:e.right.color,rx:L.value.borderRadius},null,8,$e)]))),256)),(y(!0),p(l,null,x(Y.value,(e,t)=>(y(),p(`g`,null,[R.value.show?(y(),p(l,{key:0},[!R.value.showOnHover||R.value.showOnHover&&A.value===t?(y(),p(`text`,{key:0,x:e.left.x+Math.max(1e-4,e.left.width)-R.value.offsetX-6,y:e.left.y+Math.max(1e-4,e.left.height/2)+L.value.gap/2,"text-anchor":`end`,"dominant-baseline":`middle`,"font-size":R.value.fontSize,"font-weight":R.value.bold?`bold`:`normal`,fill:R.value.color,stroke:F.value.backgroundColor,"paint-order":`stroke fill`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`3`},C(w(c)(R.value.formatter,e.left.value,w(n)({v:e.left.value}),{datapoint:e.left,seriesIndex:t})),9,et)):f(``,!0)],64)):f(``,!0),R.value.show?(y(),p(l,{key:1},[!R.value.showOnHover||R.value.showOnHover&&A.value===t?(y(),p(`text`,{key:0,x:e.right.x+R.value.offsetX+6,y:e.right.y+Math.max(1e-4,e.right.height/2)+L.value.gap/2,"text-anchor":`start`,"dominant-baseline":`middle`,"font-size":R.value.fontSize,"font-weight":R.value.bold?`bold`:`normal`,fill:R.value.color,stroke:F.value.backgroundColor,"paint-order":`stroke fill`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`3`},C(w(c)(R.value.formatter,e.right.value,w(n)({v:e.right.value}),{datapoint:e.right,seriesIndex:t})),9,tt)):f(``,!0)],64)):f(``,!0)]))),256)),m(`g`,null,[I.value.sideTitles.show?(y(),p(`g`,nt,[m(`text`,{x:G.value.left,y:I.value.sideTitles.fontSize,fill:I.value.sideTitles.useSideColor?L.value.left.color:I.value.sideTitles.color,"font-size":I.value.sideTitles.fontSize,"text-anchor":`start`,"font-weight":I.value.sideTitles.bold?`bold`:`normal`},C(P.value.translations.female),9,rt),m(`text`,{x:G.value.right,y:I.value.sideTitles.fontSize,fill:I.value.sideTitles.useSideColor?L.value.right.color:I.value.sideTitles.color,"font-size":I.value.sideTitles.fontSize,"text-anchor":`end`,"font-weight":I.value.sideTitles.bold?`bold`:`normal`},C(P.value.translations.male),9,it)])):f(``,!0),I.value.yAxis.show?(y(),p(`g`,at,[(y(!0),p(l,null,x(hn.value,(e,t)=>(y(),p(l,null,[t%I.value.yAxis.showEvery===0&&(!R.value.show||R.value.showOnHover&&A.value===t||A.value===null)||(R.value.show||R.value.showOnHover)&&A.value===t?(y(),p(`text`,{key:0,x:G.value.centerX,y:G.value.top+G.value.height/J.value/2+G.value.height/J.value*t,"dominant-baseline":`middle`,"text-anchor":`middle`,"font-size":I.value.yAxis.fontSize,fill:I.value.yAxis.color,"font-weight":I.value.yAxis.bold?`bold`:`normal`},C(w(c)(I.value.yAxis.formatter,e,w(n)({v:e}),{datapoint:e,seriesIndex:t})),9,ot)):f(``,!0)],64))),256))])):f(``,!0),I.value.xAxis.show?(y(),p(`g`,st,[F.value.layout.grid.show?(y(),p(`g`,ct,[m(`line`,{x1:K.value.right[0].x,x2:K.value.right.at(-1).x,y1:G.value.bottom+I.value.xAxis.fontSize/2,y2:G.value.bottom+I.value.xAxis.fontSize/2,stroke:F.value.layout.grid.stroke,"stroke-width":F.value.layout.grid.strokeWidth,"stroke-linecap":`round`},null,8,lt),m(`line`,{x1:K.value.left[0].x,x2:K.value.left.at(-1).x,y1:G.value.bottom+I.value.xAxis.fontSize/2,y2:G.value.bottom+I.value.xAxis.fontSize/2,stroke:F.value.layout.grid.stroke,"stroke-width":F.value.layout.grid.strokeWidth,"stroke-linecap":`round`},null,8,ut)])):f(``,!0),(y(!0),p(l,null,x(K.value.right,(e,t)=>(y(),p(`g`,null,[F.value.layout.grid.show?(y(),p(`line`,{key:0,x1:e.x,x2:e.x,y1:G.value.bottom+I.value.xAxis.fontSize/2,y2:G.value.bottom+I.value.xAxis.fontSize/2+4,stroke:F.value.layout.grid.stroke,"stroke-width":F.value.layout.grid.strokeWidth,"stroke-linecap":`round`},null,8,dt)):f(``,!0)]))),256)),(y(!0),p(l,null,x(K.value.left,(e,t)=>(y(),p(`g`,null,[F.value.layout.grid.show?(y(),p(`line`,{key:0,x1:e.x,x2:e.x,y1:G.value.bottom+I.value.xAxis.fontSize/2,y2:G.value.bottom+I.value.xAxis.fontSize/2+4,stroke:F.value.layout.grid.stroke,"stroke-width":F.value.layout.grid.strokeWidth,"stroke-linecap":`round`},null,8,ft)):f(``,!0)]))),256)),m(`g`,{ref_key:`xAxisLabels`,ref:Lt},[(y(!0),p(l,null,x(K.value.right,(e,t)=>(y(),p(`text`,{class:`vue-ui-age-pyramid-x-axis-label`,"font-size":I.value.xAxis.fontSize,fill:I.value.xAxis.color,"text-anchor":I.value.xAxis.rotation>0?`start`:I.value.xAxis.rotation<0?`end`:`middle`,"font-weight":I.value.xAxis.bold?`bold`:`normal`,transform:`translate(${e.x}, ${G.value.bottom+I.value.xAxis.fontSize*2}) rotate(${I.value.xAxis.rotation})`},C(w(c)(I.value.xAxis.formatter,e.value/I.value.xAxis.scale,w(n)({v:e.value/F.value.layout.dataLabels.xAxis.scale}),{datapoint:e,seriesIndex:t})),9,pt))),256)),(y(!0),p(l,null,x(K.value.left,(e,t)=>(y(),p(`text`,{class:`vue-ui-age-pyramid-x-axis-label`,"font-size":I.value.xAxis.fontSize,fill:I.value.xAxis.color,"text-anchor":I.value.xAxis.rotation>0?`start`:I.value.xAxis.rotation<0?`end`:`middle`,"font-weight":I.value.xAxis.bold?`bold`:`normal`,transform:`translate(${e.x}, ${G.value.bottom+I.value.xAxis.fontSize*2}) rotate(${I.value.xAxis.rotation})`},C(w(c)(I.value.xAxis.formatter,e.value/I.value.xAxis.scale,w(n)({v:e.value/F.value.layout.dataLabels.xAxis.scale}),{datapoint:e,seriesIndex:t})),9,mt))),256))],512),m(`text`,{x:G.value.right,y:W.value.height,"text-anchor":`end`,"font-size":I.value.xAxis.fontSize,fill:I.value.xAxis.color,"font-weight":I.value.xAxis.bold?`bold`:`normal`},C(I.value.xAxis.translation),9,ht)])):f(``,!0)]),(y(!0),p(l,null,x(e.dataset,(e,t)=>(y(),p(`g`,null,[m(`rect`,{x:G.value.left,y:G.value.top+G.value.height/J.value*t-L.value.gap/2,width:G.value.width<=0?1e-4:G.value.width,height:G.value.height/J.value<=0?1e-4:G.value.height/J.value,fill:A.value!==null&&A.value===t?w(a)(F.value.highlighter.color,F.value.highlighter.opacity):`transparent`,onMouseover:n=>Cn(t,e,`pointer`),onMouseleave:n=>xn(t,e),onClick:n=>bn(t,e)},null,40,gt)]))),256)),S(t.$slots,`svg`,{svg:{...W.value,drawingArea:G.value,isPrintingImg:w(nn)||w(rn)||w(Fn),isPrintingSvg:w(In)}},void 0,!0)],46,Je)),t.$slots.hint?(y(),p(`div`,_t,[S(t.$slots,`hint`,v(_({hint:P.value.a11y.translations.keyboardNavigation,isVisible:Vt.value})),void 0,!0)])):f(``,!0)]),t.$slots.watermark?(y(),p(`div`,vt,[S(t.$slots,`watermark`,v(_({isPrinting:w(nn)||w(rn)||w(Fn)||w(In)})),void 0,!0)])):f(``,!0),S(t.$slots,`legend`,{legend:Y.value},void 0,!0),t.$slots.source?(y(),p(`div`,{key:6,ref_key:`source`,ref:Nt,dir:`auto`},[S(t.$slots,`source`,{},void 0,!0)],512)):f(``,!0),h(w(yt),{teleportTo:F.value.tooltip.teleportTo,show:U.value.showTooltip&&k.value,backgroundColor:F.value.tooltip.backgroundColor,color:F.value.tooltip.color,borderRadius:F.value.tooltip.borderRadius,borderColor:F.value.tooltip.borderColor,borderWidth:F.value.tooltip.borderWidth,fontSize:F.value.tooltip.fontSize,backgroundOpacity:F.value.tooltip.backgroundOpacity,position:F.value.tooltip.position,offsetX:F.value.tooltip.offsetX,offsetY:F.value.tooltip.offsetY,parent:j.value,content:At.value,isFullscreen:Z.value,isCustom:F.value.tooltip.customFormat&&typeof F.value.tooltip.customFormat==`function`,smooth:F.value.tooltip.smooth,backdropFilter:F.value.tooltip.backdropFilter,smoothForce:F.value.tooltip.smoothForce,smoothSnapThreshold:F.value.tooltip.smoothSnapThreshold,isA11yMode:N.value===`keyboard`,a11yPosition:Bt.value},{"tooltip-before":E(()=>[S(t.$slots,`tooltip-before`,v(_({...vn.value})),void 0,!0)]),tooltip:E(()=>[S(t.$slots,`tooltip`,v(_({...vn.value})),void 0,!0)]),"tooltip-after":E(()=>[S(t.$slots,`tooltip-after`,v(_({...vn.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`]),kt.value&&P.value.userOptions.buttons.table?(y(),d(Ve($.value.component),Fe({key:7},$.value.props,{ref_key:`tableUnit`,ref:Rt,onClose:Mn}),Ne({content:E(()=>[(y(),d(w(St),{key:`table_${It.value}`,colNames:X.value.colNames,head:X.value.head,body:X.value.body,config:X.value.config,title:P.value.table.useDialog?``:$.value.title,withCloseButton:!P.value.table.useDialog,isCursorPointer:z.value,onClose:Mn},{th:E(({th:e})=>[Pe(C(e),1)]),td:E(({td:e})=>[Pe(C(e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[P.value.table.useDialog?{name:`title`,fn:E(()=>[Pe(C($.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:E(()=>[m(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:r[0]||=e=>wn(P.value.userOptions.callbacks.csv),style:Re({cursor:z.value?`pointer`:`default`})},[h(w(bt),{name:`fileCsv`,stroke:$.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):f(``,!0),S(t.$slots,`skeleton`,{},()=>[w(Ut)?(y(),d(ue,{key:0})):f(``,!0)],!0)],46,Ge))}},[[`__scopeId`,`data-v-888d4aa4`]]);export{We as n,yt as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{$ as n,D as r,Dt as i,Jt as a,X as o,Yt as ee,at as te,b as s,et as ne,i as c,in as re,nt as ie,pt as ae,t as oe,tn as se,zt as ce}from"./lib-rPeBMZrn.js";import{n as le,t as ue}from"./BaseScanner-8NdoBs7B.js";import{n as de,t as fe}from"./useHints-C-TwxM0Y.js";import{t as pe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as me}from"./resolveChartConfig-CIhClE5R.js";import{t as he}from"./img-D4RQwASc.js";import{n as ge}from"./Title-BliHuXfT.js";import{t as _e}from"./useChartExport-BZts4KFb.js";import{n as ve,t as ye}from"./tableIntegration-CNoJ1CIY.js";import{n as be,t as xe}from"./annotationSlots-RvQBEO9-.js";import{n as Se,t as Ce}from"./userOptionsSlots-DYuo-E5m.js";import{t as we}from"./usePrinter-DVf3YcG5.js";import{t as Te}from"./useSvgLabelLayout-42Kats14.js";import{t as Ee}from"./useTimeLabelCollider-BTybMUFi.js";import{t as De}from"./useResponsive-CENUxfEL.js";import{t as Oe}from"./DefGrad-DKMq1REY.js";import{t as ke}from"./A11yDataTable-DWNlWXzs.js";import{t as Ae}from"./useUserOptionState-CXlFnwPv.js";import{t as je}from"./useChartAccessibility-DOMuYJfm.js";import{t as Me}from"./vue_ui_age_pyramid-CL0Ef8Ov.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as Ne,createTextVNode as Pe,createVNode as h,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as Fe,nextTick as Ie,normalizeClass as Le,normalizeProps as v,normalizeStyle as Re,onBeforeUnmount as ze,onMounted as Be,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as Ve,shallowRef as He,toDisplayString as C,toRefs as Ue,unref as w,watch as T,withCtx as E}from"vue";var We=/* @__PURE__ */ e({default:()=>yt}),Ge=[`id`],Ke=[`id`],qe={style:{position:`relative`}},Je=[`xmlns`,`viewBox`,`aria-describedby`],Ye=[`x`,`y`,`width`,`height`],Xe=[`x`,`y`,`width`,`height`,`fill`,`rx`],Ze=[`x`,`y`,`width`,`height`,`fill`,`rx`],Qe=[`x`,`y`,`width`,`height`,`fill`,`rx`],$e=[`x`,`y`,`width`,`height`,`fill`,`rx`],et=[`x`,`y`,`font-size`,`font-weight`,`fill`,`stroke`],tt=[`x`,`y`,`font-size`,`font-weight`,`fill`,`stroke`],nt={key:0},rt=[`x`,`y`,`fill`,`font-size`,`font-weight`],it=[`x`,`y`,`fill`,`font-size`,`font-weight`],at={key:1},ot=[`x`,`y`,`font-size`,`fill`,`font-weight`],st={key:2},ct={key:0},lt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ut=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],dt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ft=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],pt=[`font-size`,`fill`,`text-anchor`,`font-weight`,`transform`],mt=[`font-size`,`fill`,`text-anchor`,`font-weight`,`transform`],ht=[`x`,`y`,`font-size`,`fill`,`font-weight`],gt=[`x`,`y`,`width`,`height`,`fill`,`onMouseover`,`onMouseleave`,`onClick`],_t={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},vt={key:5,class:`vue-data-ui-watermark`},yt=/*#__PURE__*/ pe({__name:`vue-ui-age-pyramid`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`],setup(e,{expose:pe,emit:We}){let yt=g(()=>import(`./Tooltip-C1q0Qoh7.js`)),bt=g(()=>import(`./BaseIcon-fYK0iID8.js`).then(e=>e.n)),xt=g(()=>import(`./vue-ui-accordion-D4FHxzsL.js`).then(e=>e.n)),St=g(()=>import(`./DataTable-5Ug6gMAX.js`)),Ct=g(()=>import(`./PenAndPaper-r50tK3S4.js`).then(e=>e.t)),wt=g(()=>import(`./UserOptions-Em_JgDXM.js`).then(e=>e.n)),Tt=g(()=>import(`./PackageVersion-u-p5bCcj.js`).then(e=>e.t)),Et=g(()=>import(`./BaseDraggableDialog-9d30Yx8c.js`).then(e=>e.n)),{vue_ui_age_pyramid:Dt}=t(),D=e,Ot=We,kt=u(()=>!!D.dataset&&D.dataset.length),O=b(o()),k=b(!1),At=b(``),A=b(null),jt=b(0),j=b(null),Mt=b(null),Nt=b(null),Pt=b(null),Ft=b(0),It=b(0),Lt=b(null),Rt=b(null),zt=b(null),M=b(null),Bt=b({x:0,y:0}),N=b(`pointer`),Vt=b(!1),P=b(Yt()),F=u(()=>P.value.style),I=u(()=>P.value.style.layout.dataLabels),L=u(()=>P.value.style.layout.bars),R=u(()=>P.value.style.layout.bars.labels);de({config:()=>P.value,dataset:()=>D.dataset,component:`VueUiAgePyramid`,rules:[fe.emptyArray,{test:e=>e.length>130,message:[`👀 Dataset has > 130 points. Consider:`,``,`▶️ Grouping small values into aggregated categories.`,``,`▶️ Using VueUiStackline to display data in a more compact way.`]}]});let z=u(()=>P.value.userOptions.useCursorPointer),Ht=u(()=>re({defaultConfig:{userOptions:{show:!1},table:{show:!1},translations:{male:``,female:``},style:{backgroundColor:`#99999930`,layout:{bars:{left:{color:`#CACACA`},right:{color:`#999999`}},dataLabels:{xAxis:{fontSize:0,scale:1e3,translation:``},yAxis:{show:!1}},grid:{stroke:`#6A6A6A`}}}},userConfig:P.value.skeletonConfig??{}})),{loading:Ut,FINAL_DATASET:Wt,manualLoading:Gt}=le({...Ue(D),FINAL_CONFIG:P,prepareConfig:Yt,skeletonDataset:D.config?.skeletonDataset??[[`_`,9,2,2],[`_`,8,3,3],[`_`,7,5,5],[`_`,6,8,8],[`_`,5,13,13],[`_`,4,21,21],[`_`,3,34,34],[`_`,2,55,55],[`_`,1,89,89],[`_`,0,144,144]],skeletonConfig:re({defaultConfig:P.value,userConfig:Ht.value})}),{userOptionsVisible:Kt,setUserOptionsVisibility:qt,keepUserOptionState:Jt}=Ae({config:P.value}),{svgRef:B}=je({config:P.value.style.title});function Yt(){return me(D.config,Dt,Me)}function Xt(e){let t=ne(e);return t?.style?.chart&&delete t.style.tooltip,JSON.stringify(t)}let Zt=Xt(D.config);T(()=>D.config,(e,t)=>{let n=Xt(e),r=n!==Zt;Zt=n;let i=Yt();r?(Ut.value||(P.value=i),Kt.value=!P.value.userOptions.showOnChartHover,tn(),Ft.value+=1,It.value+=1,U.value.showTable=P.value.table.show,U.value.showTooltip=P.value.style.tooltip.show):(P.value.style.tooltip=i.style.tooltip,U.value.showTooltip=P.value.style.tooltip.show)},{deep:!0}),T(()=>D.dataset,e=>{Array.isArray(e)&&e.length>0&&(Gt.value=!1)},{deep:!0});let V=He(null),H=He(null),Qt=b(!1),$t=0;Be(()=>{tn()});let en=u(()=>P.value.debug);function tn(){ce(D.dataset)&&(te({componentName:`VueUiAgePyramid`,type:`dataset`,debug:en.value}),Gt.value=!0),ce(D.dataset)||(Gt.value=P.value.loading),P.value.responsive&&(V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect()),V.value=new ResizeObserver(()=>{let{width:e,height:t}=De({chart:j.value,title:F.value.title.text?Mt.value:null,source:Nt.value,noTitle:Pt.value});cancelAnimationFrame($t),$t=requestAnimationFrame(()=>{W.value.width=e,W.value.height=t,Qt.value=!0})}),H.value=j.value.parentNode,V.value.observe(H.value))}ze(()=>{cancelAnimationFrame($t),V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect())});let{isPrinting:nn,isImaging:rn,generatePdf:an,generateImage:on}=we({elementId:`vue-ui-age-pyramid_${O.value}`,fileName:F.value.title.text||`vue-ui-age-pyramid`,options:P.value.userOptions.print}),sn=u(()=>P.value.userOptions.show&&!F.value.title.text),U=b({showTable:P.value.table.show,showTooltip:F.value.tooltip.show});T(P,()=>{U.value={showTable:P.value.table.show,showTooltip:F.value.tooltip.show}},{immediate:!0});let W=b({height:F.value.height,width:F.value.width}),cn=u(()=>W.value.width),ln=u(()=>W.value.height),{metrics:un,ready:dn,settling:fn,update:pn}=Te({svgRef:B,canMeasure:()=>!P.value.responsive||Qt.value,initialMetrics:{bottom:0},measure:e=>({bottom:e(Lt.value).height})}),mn=u(()=>un.value.bottom),G=u(()=>{let e=W.value.width-F.value.layout.padding.right-F.value.layout.padding.left,t=F.value.layout.padding.left,n=W.value.width-F.value.layout.padding.right;return{top:F.value.layout.padding.top+I.value.sideTitles.fontSize+I.value.sideTitles.offsetY+12,left:t,right:n,bottom:W.value.height-F.value.layout.padding.bottom-mn.value,width:e,height:W.value.height-F.value.layout.padding.top-F.value.layout.padding.bottom-mn.value-I.value.sideTitles.fontSize-I.value.sideTitles.offsetY-12,centerX:F.value.layout.padding.left+e/2,leftChart:{width:e/2-F.value.layout.centerSlit.width,right:t+e/2-F.value.layout.centerSlit.width},rightChart:{width:e/2-F.value.layout.centerSlit.width,left:t+e/2+F.value.layout.centerSlit.width}}}),hn=u(()=>Wt.value.map(e=>I.value.yAxis.display===`age`?e[1]:e[0])),K=u(()=>{let e=gn(q.value/5),t=[],n=[];for(let r=0;r<=5;r+=1){let i=e*r,a=e*(r-5);t.push({value:i,x:G.value.left+G.value.width/2+F.value.layout.centerSlit.width+i/q.value*G.value.leftChart.width}),n.push({value:Math.abs(a),x:G.value.left+G.value.width/2+a/q.value*G.value.leftChart.width-F.value.layout.centerSlit.width})}return{right:t,left:n}});function gn(e){if(e===0)return 0;let t=10**Math.floor(Math.log10(Math.abs(e))),n;return n=Math.round(e/t)*t,n}let q=u(()=>Math.max(...Wt.value.flatMap(e=>e.slice(-2).map(e=>s(e))))),J=u(()=>Wt.value.length),_n=u(()=>Wt.value.map(e=>({segment:e[0],age:e[1],left:{value:e[2],proportionToMax:e[2]/q.value},right:{value:e[3],proportionToMax:e[3]/q.value}}))),Y=u(()=>_n.value.map((e,t)=>{let n=G.value.top+G.value.height/J.value*t,r=G.value.height/J.value-L.value.gap;return{segment:e.segment,age:e.age,left:{...e.left,y:n,color:L.value.left.color,x:G.value.leftChart.right-e.left.proportionToMax*G.value.leftChart.width,width:s(e.left.proportionToMax*G.value.leftChart.width),height:r},right:{...e.right,y:n,color:L.value.right.color,x:G.value.rightChart.left,width:s(e.right.proportionToMax*G.value.rightChart.width),height:r}}})),vn=b(null);function yn(e){let[t,n,r,i]=e;return{segment:t,index:n,left:r,right:i}}function bn(e,t){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:yn(t),seriesIndex:e})}function xn(e,t){P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:yn(t),seriesIndex:e}),(N.value!==`keyboard`||M.value!==e)&&(A.value=null,k.value=!1)}function Sn(e){if(!B.value)return;let t=Y.value[e];if(!t)return;let n=se(G.value.left+G.value.width/2,t.left.y+t.left.height/2,B.value);n&&(Bt.value=n)}function Cn(e,t,r=`pointer`){P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:yn(t),seriesIndex:e}),A.value=e,M.value=e,N.value=r,vn.value={datapoint:t,seriesIndex:e,series:Y.value,config:P.value};let a=F.value.tooltip.customFormat;if(i(a)&&ae(()=>a({seriesIndex:e,datapoint:{segment:t[0],index:t[1],left:t[2],right:t[3]},series:Y.value,config:P.value})))At.value=a({seriesIndex:e,datapoint:{segment:t[0],index:t[1],left:t[2],right:t[3]},series:Y.value,config:P.value});else{let r=``,i=Y.value[e];r+=`<div><b>${i.segment}</b></div>`,r+=`<div>${P.value.translations.age}: ${c(I.value.yAxis.formatter,s(i.age),n({v:s(i.age)}),{datapoint:t,seriesIndex:e})}</div>`,r+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${F.value.tooltip.borderColor}">`,r+=`<div style="display:flex; flex-direction:row;gap:12px">`,r+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${L.value.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${L.value.gradient.show?`url(#age_pyramid_left_${O.value})`:L.value.left.color}"/></svg><div>${P.value.translations.female}</div><div><b>${c(I.value.xAxis.formatter,s(i.left.value),n({v:s(i.left.value)}),{datapoint:t,seriesIndex:e})}</b></div></div>`,r+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${L.value.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${L.value.gradient.show?`url(#age_pyramid_right_${O.value})`:L.value.right.color}"/></svg><div>${P.value.translations.male}</div><div><b>${c(I.value.xAxis.formatter,s(i.right.value),n({v:s(i.right.value)}),{datapoint:t,seriesIndex:e})}</b></div></div>`,r+=`</div>`,r+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${F.value.tooltip.borderColor}"><div>${P.value.translations.total}</div><div><b>${c(I.value.xAxis.formatter,s(i.right.value)+s(i.left.value),n({v:s(i.right.value)+s(i.left.value)}),{datapoint:t,seriesIndex:e})}</b></div></div>`,r+=`</div>`,At.value=`<div>${r}</div>`}k.value=!0,r===`keyboard`&&Ie(()=>{Sn(e)})}function wn(e=null){Ie(()=>{let t=[P.value.translations.year,P.value.translations.age,P.value.translations.female,P.value.translations.male,P.value.translations.total],n=D.dataset.map(e=>[e[0],e[1],e[2],e[3],e[2]??0+e[3]??0]),i=[[F.value.title.text],[F.value.title.subtitle.text],[[``],[``],[``]],t].concat(n),a=r(i);e?e(a):ie({csvContent:a,title:F.value.title.text||`vue-ui-heatmap`})})}let X=u(()=>{let e=[P.value.translations.year,P.value.translations.age,P.value.translations.female,P.value.translations.male,P.value.translations.total];return{head:e,body:D.dataset.map(e=>[e[0],e[1],e[2]==null?``:e[2].toLocaleString(),e[3]==null?``:e[3].toLocaleString(),(e[2]??0+e[3]??0).toLocaleString()]),config:{th:{backgroundColor:P.value.table.th.backgroundColor,color:P.value.table.th.color,outline:P.value.table.th.outline},td:{backgroundColor:P.value.table.td.backgroundColor,color:P.value.table.td.color,outline:P.value.table.td.outline},breakpoint:P.value.table.responsiveBreakpoint},colNames:e}}),Z=b(!1);function Tn(e){Z.value=e,jt.value+=1}function En(){U.value.showTable=!U.value.showTable}function Dn(){U.value.showTooltip=!U.value.showTooltip}let Q=b(!1);function On(){Q.value=!Q.value}async function kn({scale:e=2}={}){if(!j.value)return;let{width:t,height:n}=j.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await he({domElement:j.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:F.value.title.text,width:t,height:n,aspectRatio:r}}let An=b([]),jn=b({start:0,end:Y.value.length});Ee({timeLabelsEls:Lt,timeLabels:An,slicer:jn,configRef:P,rotationPath:[`style`,`layout`,`dataLabels`,`xAxis`,`rotation`],autoRotatePath:[`style`,`layout`,`dataLabels`,`xAxis`,`autoRotate`,`enable`],isAutoSize:!1,width:cn,height:ln,targetClass:`.vue-ui-age-pyramid-x-axis-label`,rotation:F.value.layout.dataLabels.xAxis.autoRotate.angle});let $=u(()=>ye({config:P,style:F,mutableConfig:U,dialog:Et,accordion:xt,isFullscreen:Z,parent:j,maxWidth:800,isCursorPointer:z}));T(()=>U.value.showTable,e=>ve(e,P,Rt));function Mn(){U.value.showTable=!1,zt.value&&zt.value.setTableIconState(!1)}let Nn=u(()=>P.value.style.backgroundColor),Pn=u(()=>P.value.style.title),{isCallbackImaging:Fn,isCallbackSvg:In,generateSvg:Ln,onGenerateImage:Rn}=_e({svg:B,title:Pn,legend:null,legendItems:null,backgroundColor:Nn,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:on});async function zn(){Ot(`copyAlt`,{config:P.value,dataset:Y.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:Y.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Bn(){Vt.value=!0}function Vn(){A.value=null,M.value=null,N.value=`pointer`,k.value=!1,Vt.value=!1}function Hn(e){if(!B.value||Q.value||document.activeElement!==B.value||!Y.value.length)return;let t=[`ArrowUp`,`ArrowLeft`].includes(e.key),n=[`ArrowDown`,`ArrowRight`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){A.value=null,M.value=null,N.value=`pointer`,k.value=!1;return}if(r){if(M.value===null)return;let e=D.dataset[M.value];if(!e)return;bn(M.value,e);return}let a=M.value,o=A.value,ee=a!==null&&a>=0&&a<Y.value.length,te=o!==null&&o>=0&&o<Y.value.length;ee?t?a=a-1<0?Y.value.length-1:a-1:n&&(a=a+1>Y.value.length-1?0:a+1):te?(a=n?o+1:o-1,a>=Y.value.length&&(a=0),a<0&&(a=Y.value.length-1)):a=n?0:Y.value.length-1;let s=D.dataset[a];s&&Cn(a,s,`keyboard`)}return pe({getImage:kn,generatePdf:an,generateCsv:wn,generateImage:on,generateSvg:Ln,toggleTable:En,toggleTooltip:Dn,toggleAnnotator:On,toggleFullscreen:Tn,copyAlt:zn}),T(()=>[W.value,I.value,Lt.value,D.dataset,Qt.value,P.value.style.fontFamily],pn,{flush:`post`,deep:!0}),(t,r)=>(y(),p(`div`,{class:Le(`vue-data-ui-component vue-ui-age-pyramid ${Z.value?`vue-data-ui-wrapper-fullscreen`:``}`),ref_key:`agePyramid`,ref:j,id:`vue-ui-age-pyramid_${O.value}`,style:Re(`font-family:${F.value.fontFamily};width:100%; text-align:center;background:${F.value.backgroundColor};${P.value.responsive?`height:100%`:``}`),onMouseenter:r[1]||=()=>w(qt)(!0),onMouseleave:r[2]||=()=>w(qt)(!1)},[m(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[m(`p`,null,C(P.value.a11y.translations.keyboardNavigation),1)],8,Ke),X.value?.body?.length?(y(),d(ke,{key:0,uid:O.value,head:X.value.head,body:X.value.body,notice:P.value.a11y.translations.tableAvailable,caption:P.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),P.value.userOptions.buttons.annotator?(y(),d(w(Ct),{key:1,showGroupActions:P.value.userOptions.annotator?.showGroupActions??!0,svgRef:w(B),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Q.value,isCursorPointer:z.value,palette:P.value.userOptions.annotatorPalette,onClose:On},Ne({_:2},[x(w(xe),e=>({name:e,fn:E(n=>[S(t.$slots,e,v(_(w(be)(e,n))),void 0,!0)])}))]),1032,[`showGroupActions`,`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),sn.value?(y(),p(`div`,{key:2,ref_key:`noTitle`,ref:Pt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),F.value.title.text?(y(),p(`div`,{key:3,ref_key:`chartTitle`,ref:Mt,style:`width:100%;background:transparent`},[(y(),d(ge,{key:`title_${Ft.value}`,config:{title:{cy:`pyramid-div-title`,...F.value.title},subtitle:{cy:`pyramid-div-subtitle`,...F.value.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),P.value.userOptions.show&&kt.value&&(w(Jt)||w(Kt))?(y(),d(w(wt),{ref_key:`userOptionsRef`,ref:zt,key:`user_options_${jt.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isImaging:w(rn),isPrinting:w(nn),uid:O.value,hasTooltip:P.value.userOptions.buttons.tooltip&&F.value.tooltip.show,hasPdf:P.value.userOptions.buttons.pdf,hasXls:P.value.userOptions.buttons.csv,hasImg:P.value.userOptions.buttons.img,hasSvg:P.value.userOptions.buttons.svg,hasTable:P.value.userOptions.buttons.table,hasFullscreen:P.value.userOptions.buttons.fullscreen,hasAltCopy:P.value.userOptions.buttons.altCopy,isFullscreen:Z.value,isTooltip:U.value.showTooltip,titles:{...P.value.userOptions.buttonTitles},chartElement:j.value,position:P.value.userOptions.position,hasAnnotator:P.value.userOptions.buttons.annotator,isAnnotation:Q.value,callbacks:P.value.userOptions.callbacks,printScale:P.value.userOptions.print.scale,tableDialog:P.value.table.useDialog,isCursorPointer:z.value,onToggleFullscreen:Tn,onGeneratePdf:w(an),onGenerateCsv:wn,onGenerateImage:w(Rn),onGenerateSvg:w(Ln),onToggleTable:En,onToggleTooltip:Dn,onToggleAnnotator:On,onCopyAlt:zn,style:Re({visibility:w(Jt)?w(Kt)?`visible`:`hidden`:`visible`})},Ne({_:2},[x(w(Se)(t.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:E(n=>[S(t.$slots,e,v(_(w(Ce)(e,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):f(``,!0),m(`div`,qe,[(y(),p(`svg`,{ref_key:`svgRef`,ref:B,xmlns:w(oe),class:Le({"vue-data-ui-fullscreen--on":Z.value,"vue-data-ui-fulscreen--off":!Z.value}),viewBox:`0 0 ${W.value.width<=0?10:W.value.width} ${W.value.height<=0?10:W.value.height}`,style:Re(`max-width:100%;overflow:visible;background:transparent;color:${F.value.color};visibility:${w(dn)?`visible`:`hidden`}`),tabindex:`0`,"aria-describedby":`chart-instructions-${O.value}`,onFocus:Bn,onBlur:Vn,onKeydown:Hn},[h(w(Tt)),S(t.$slots,`svg-underlayer`,{svg:{...W.value,drawingArea:G.value,isPrintingImg:w(nn)||w(rn)||w(Fn),isPrintingSvg:w(In)}},void 0,!0),t.$slots[`chart-background`]?(y(),p(`foreignObject`,{key:0,x:G.value.left,y:G.value.top,width:Math.max(.1,G.value.width),height:Math.max(.1,G.value.height),style:{pointerEvents:`none`}},[S(t.$slots,`chart-background`,{},void 0,!0)],8,Ye)):f(``,!0),m(`defs`,null,[h(Oe,{t:`linear`,id:`age_pyramid_left_${O.value}`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,stops:[[`0%`,L.value.left.color,1],[`100%`,w(a)(w(ee)(L.value.left.color,L.value.gradient.shiftHue),100-L.value.gradient.intensity),1]]},null,8,[`id`,`stops`]),h(Oe,{t:`linear`,id:`age_pyramid_right_${O.value}`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,stops:[[`0%`,w(a)(w(ee)(L.value.right.color,L.value.gradient.shiftHue),100-L.value.gradient.intensity),1],[`100%`,L.value.right.color,1]]},null,8,[`id`,`stops`])]),(y(!0),p(l,null,x(Y.value,(e,t)=>(y(),p(`g`,null,[m(`rect`,{x:e.left.x,y:e.left.y,width:w(s)(e.left.width<=0?1e-4:e.left.width),height:e.left.height<=0?1e-4:e.left.height,fill:L.value.gradient.underlayer,rx:L.value.borderRadius},null,8,Xe),m(`rect`,{x:e.left.x,y:e.left.y,width:e.left.width<=0?1e-4:e.left.width,height:e.left.height<=0?1e-4:e.left.height,fill:L.value.gradient.show?`url(#age_pyramid_left_${O.value})`:e.left.color,rx:L.value.borderRadius},null,8,Ze),m(`rect`,{x:e.right.x,y:e.right.y,width:e.right.width<=0?1e-4:e.right.width,height:e.right.height<=0?1e-4:e.right.height,fill:L.value.gradient.underlayer,rx:L.value.borderRadius},null,8,Qe),m(`rect`,{x:e.right.x,y:e.right.y,width:e.right.width<=0?1e-4:e.right.width,height:e.right.height<=0?1e-4:e.right.height,fill:L.value.gradient.show?`url(#age_pyramid_right_${O.value})`:e.right.color,rx:L.value.borderRadius},null,8,$e)]))),256)),(y(!0),p(l,null,x(Y.value,(e,t)=>(y(),p(`g`,null,[R.value.show?(y(),p(l,{key:0},[!R.value.showOnHover||R.value.showOnHover&&A.value===t?(y(),p(`text`,{key:0,x:e.left.x+Math.max(1e-4,e.left.width)-R.value.offsetX-6,y:e.left.y+Math.max(1e-4,e.left.height/2)+L.value.gap/2,"text-anchor":`end`,"dominant-baseline":`middle`,"font-size":R.value.fontSize,"font-weight":R.value.bold?`bold`:`normal`,fill:R.value.color,stroke:F.value.backgroundColor,"paint-order":`stroke fill`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`3`},C(w(c)(R.value.formatter,e.left.value,w(n)({v:e.left.value}),{datapoint:e.left,seriesIndex:t})),9,et)):f(``,!0)],64)):f(``,!0),R.value.show?(y(),p(l,{key:1},[!R.value.showOnHover||R.value.showOnHover&&A.value===t?(y(),p(`text`,{key:0,x:e.right.x+R.value.offsetX+6,y:e.right.y+Math.max(1e-4,e.right.height/2)+L.value.gap/2,"text-anchor":`start`,"dominant-baseline":`middle`,"font-size":R.value.fontSize,"font-weight":R.value.bold?`bold`:`normal`,fill:R.value.color,stroke:F.value.backgroundColor,"paint-order":`stroke fill`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`3`},C(w(c)(R.value.formatter,e.right.value,w(n)({v:e.right.value}),{datapoint:e.right,seriesIndex:t})),9,tt)):f(``,!0)],64)):f(``,!0)]))),256)),m(`g`,null,[I.value.sideTitles.show?(y(),p(`g`,nt,[m(`text`,{x:G.value.left,y:I.value.sideTitles.fontSize,fill:I.value.sideTitles.useSideColor?L.value.left.color:I.value.sideTitles.color,"font-size":I.value.sideTitles.fontSize,"text-anchor":`start`,"font-weight":I.value.sideTitles.bold?`bold`:`normal`},C(P.value.translations.female),9,rt),m(`text`,{x:G.value.right,y:I.value.sideTitles.fontSize,fill:I.value.sideTitles.useSideColor?L.value.right.color:I.value.sideTitles.color,"font-size":I.value.sideTitles.fontSize,"text-anchor":`end`,"font-weight":I.value.sideTitles.bold?`bold`:`normal`},C(P.value.translations.male),9,it)])):f(``,!0),I.value.yAxis.show?(y(),p(`g`,at,[(y(!0),p(l,null,x(hn.value,(e,t)=>(y(),p(l,null,[t%I.value.yAxis.showEvery===0&&(!R.value.show||R.value.showOnHover&&A.value===t||A.value===null)||(R.value.show||R.value.showOnHover)&&A.value===t?(y(),p(`text`,{key:0,x:G.value.centerX,y:G.value.top+G.value.height/J.value/2+G.value.height/J.value*t,"dominant-baseline":`middle`,"text-anchor":`middle`,"font-size":I.value.yAxis.fontSize,fill:I.value.yAxis.color,"font-weight":I.value.yAxis.bold?`bold`:`normal`},C(w(c)(I.value.yAxis.formatter,e,w(n)({v:e}),{datapoint:e,seriesIndex:t})),9,ot)):f(``,!0)],64))),256))])):f(``,!0),I.value.xAxis.show?(y(),p(`g`,st,[F.value.layout.grid.show?(y(),p(`g`,ct,[m(`line`,{x1:K.value.right[0].x,x2:K.value.right.at(-1).x,y1:G.value.bottom+I.value.xAxis.fontSize/2,y2:G.value.bottom+I.value.xAxis.fontSize/2,stroke:F.value.layout.grid.stroke,"stroke-width":F.value.layout.grid.strokeWidth,"stroke-linecap":`round`},null,8,lt),m(`line`,{x1:K.value.left[0].x,x2:K.value.left.at(-1).x,y1:G.value.bottom+I.value.xAxis.fontSize/2,y2:G.value.bottom+I.value.xAxis.fontSize/2,stroke:F.value.layout.grid.stroke,"stroke-width":F.value.layout.grid.strokeWidth,"stroke-linecap":`round`},null,8,ut)])):f(``,!0),(y(!0),p(l,null,x(K.value.right,(e,t)=>(y(),p(`g`,null,[F.value.layout.grid.show?(y(),p(`line`,{key:0,x1:e.x,x2:e.x,y1:G.value.bottom+I.value.xAxis.fontSize/2,y2:G.value.bottom+I.value.xAxis.fontSize/2+4,stroke:F.value.layout.grid.stroke,"stroke-width":F.value.layout.grid.strokeWidth,"stroke-linecap":`round`},null,8,dt)):f(``,!0)]))),256)),(y(!0),p(l,null,x(K.value.left,(e,t)=>(y(),p(`g`,null,[F.value.layout.grid.show?(y(),p(`line`,{key:0,x1:e.x,x2:e.x,y1:G.value.bottom+I.value.xAxis.fontSize/2,y2:G.value.bottom+I.value.xAxis.fontSize/2+4,stroke:F.value.layout.grid.stroke,"stroke-width":F.value.layout.grid.strokeWidth,"stroke-linecap":`round`},null,8,ft)):f(``,!0)]))),256)),m(`g`,{ref_key:`xAxisLabels`,ref:Lt},[(y(!0),p(l,null,x(K.value.right,(e,t)=>(y(),p(`text`,{class:`vue-ui-age-pyramid-x-axis-label`,"font-size":I.value.xAxis.fontSize,fill:I.value.xAxis.color,"text-anchor":I.value.xAxis.rotation>0?`start`:I.value.xAxis.rotation<0?`end`:`middle`,"font-weight":I.value.xAxis.bold?`bold`:`normal`,transform:`translate(${e.x}, ${G.value.bottom+I.value.xAxis.fontSize*2}) rotate(${I.value.xAxis.rotation})`},C(w(c)(I.value.xAxis.formatter,e.value/I.value.xAxis.scale,w(n)({v:e.value/F.value.layout.dataLabels.xAxis.scale}),{datapoint:e,seriesIndex:t})),9,pt))),256)),(y(!0),p(l,null,x(K.value.left,(e,t)=>(y(),p(`text`,{class:`vue-ui-age-pyramid-x-axis-label`,"font-size":I.value.xAxis.fontSize,fill:I.value.xAxis.color,"text-anchor":I.value.xAxis.rotation>0?`start`:I.value.xAxis.rotation<0?`end`:`middle`,"font-weight":I.value.xAxis.bold?`bold`:`normal`,transform:`translate(${e.x}, ${G.value.bottom+I.value.xAxis.fontSize*2}) rotate(${I.value.xAxis.rotation})`},C(w(c)(I.value.xAxis.formatter,e.value/I.value.xAxis.scale,w(n)({v:e.value/F.value.layout.dataLabels.xAxis.scale}),{datapoint:e,seriesIndex:t})),9,mt))),256))],512),m(`text`,{x:G.value.right,y:W.value.height,"text-anchor":`end`,"font-size":I.value.xAxis.fontSize,fill:I.value.xAxis.color,"font-weight":I.value.xAxis.bold?`bold`:`normal`},C(I.value.xAxis.translation),9,ht)])):f(``,!0)]),(y(!0),p(l,null,x(e.dataset,(e,t)=>(y(),p(`g`,null,[m(`rect`,{x:G.value.left,y:G.value.top+G.value.height/J.value*t-L.value.gap/2,width:G.value.width<=0?1e-4:G.value.width,height:G.value.height/J.value<=0?1e-4:G.value.height/J.value,fill:A.value!==null&&A.value===t?w(a)(F.value.highlighter.color,F.value.highlighter.opacity):`transparent`,onMouseover:n=>Cn(t,e,`pointer`),onMouseleave:n=>xn(t,e),onClick:n=>bn(t,e)},null,40,gt)]))),256)),S(t.$slots,`svg`,{svg:{...W.value,drawingArea:G.value,isPrintingImg:w(nn)||w(rn)||w(Fn),isPrintingSvg:w(In)}},void 0,!0)],46,Je)),t.$slots.hint?(y(),p(`div`,_t,[S(t.$slots,`hint`,v(_({hint:P.value.a11y.translations.keyboardNavigation,isVisible:Vt.value})),void 0,!0)])):f(``,!0)]),t.$slots.watermark?(y(),p(`div`,vt,[S(t.$slots,`watermark`,v(_({isPrinting:w(nn)||w(rn)||w(Fn)||w(In)})),void 0,!0)])):f(``,!0),S(t.$slots,`legend`,{legend:Y.value},void 0,!0),t.$slots.source?(y(),p(`div`,{key:6,ref_key:`source`,ref:Nt,dir:`auto`},[S(t.$slots,`source`,{},void 0,!0)],512)):f(``,!0),h(w(yt),{teleportTo:F.value.tooltip.teleportTo,show:U.value.showTooltip&&k.value,backgroundColor:F.value.tooltip.backgroundColor,color:F.value.tooltip.color,borderRadius:F.value.tooltip.borderRadius,borderColor:F.value.tooltip.borderColor,borderWidth:F.value.tooltip.borderWidth,fontSize:F.value.tooltip.fontSize,backgroundOpacity:F.value.tooltip.backgroundOpacity,position:F.value.tooltip.position,offsetX:F.value.tooltip.offsetX,offsetY:F.value.tooltip.offsetY,parent:j.value,content:At.value,isFullscreen:Z.value,isCustom:F.value.tooltip.customFormat&&typeof F.value.tooltip.customFormat==`function`,smooth:F.value.tooltip.smooth,backdropFilter:F.value.tooltip.backdropFilter,smoothForce:F.value.tooltip.smoothForce,smoothSnapThreshold:F.value.tooltip.smoothSnapThreshold,isA11yMode:N.value===`keyboard`,a11yPosition:Bt.value},{"tooltip-before":E(()=>[S(t.$slots,`tooltip-before`,v(_({...vn.value})),void 0,!0)]),tooltip:E(()=>[S(t.$slots,`tooltip`,v(_({...vn.value})),void 0,!0)]),"tooltip-after":E(()=>[S(t.$slots,`tooltip-after`,v(_({...vn.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`]),kt.value&&P.value.userOptions.buttons.table?(y(),d(Ve($.value.component),Fe({key:7},$.value.props,{ref_key:`tableUnit`,ref:Rt,onClose:Mn}),Ne({content:E(()=>[(y(),d(w(St),{key:`table_${It.value}`,colNames:X.value.colNames,head:X.value.head,body:X.value.body,config:X.value.config,title:P.value.table.useDialog?``:$.value.title,withCloseButton:!P.value.table.useDialog,isCursorPointer:z.value,onClose:Mn},{th:E(({th:e})=>[Pe(C(e),1)]),td:E(({td:e})=>[Pe(C(e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[P.value.table.useDialog?{name:`title`,fn:E(()=>[Pe(C($.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:E(()=>[m(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:r[0]||=e=>wn(P.value.userOptions.callbacks.csv),style:Re({cursor:z.value?`pointer`:`default`})},[h(w(bt),{name:`fileCsv`,stroke:$.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):f(``,!0),S(t.$slots,`skeleton`,{},()=>[w(Ut)?(y(),d(ue,{key:0})):f(``,!0)],!0)],46,Ge))}},[[`__scopeId`,`data-v-888d4aa4`]]);export{We as n,yt as t};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{$ as n,Ft as r,S as i,X as a,_ as ee,at as te,i as o,in as ne,t as re,yt as ie,zt as ae}from"./lib-rPeBMZrn.js";import{n as oe,t as se}from"./BaseScanner-8NdoBs7B.js";import{n as ce}from"./useHints-C-TwxM0Y.js";import{t as le}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as ue}from"./resolveChartConfig-CIhClE5R.js";import{t as de}from"./chartImage-DPGnEuYM.js";import{n as fe}from"./Title-BliHuXfT.js";import{t as pe}from"./useChartExport-BZts4KFb.js";import{n as me,t as he}from"./annotationSlots-RvQBEO9-.js";import{n as ge,t as _e}from"./userOptionsSlots-DYuo-E5m.js";import{t as ve}from"./usePrinter-DVf3YcG5.js";import{c as ye}from"./canvas-lib-22VpOI4_.js";import{t as be}from"./useResponsive-CENUxfEL.js";import{t as xe}from"./useUserOptionState-CXlFnwPv.js";import{t as Se}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ce}from"./Legend-DM0ClX3D.js";import{t as we}from"./vue_ui_bullet-CwVYkpjd.js";import{Fragment as s,Teleport as Te,computed as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createSlots as Ee,createVNode as De,defineAsyncComponent as p,guardReactiveProps as m,normalizeClass as Oe,normalizeProps as h,normalizeStyle as g,onBeforeUnmount as ke,onMounted as Ae,openBlock as _,ref as v,renderList as y,renderSlot as b,toDisplayString as x,toRefs as je,unref as S,watch as Me,withCtx as C}from"vue";var Ne=/* @__PURE__ */ e({default:()=>w}),Pe=[`id`],Fe={key:1,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},Ie=[`id`],Le=[`xmlns`,`viewBox`,`aria-labelledby`,`aria-describedby`],Re=[`id`],ze=[`id`],Be=[`width`,`height`],Ve={key:1},He=[`x`,`y`,`height`,`width`,`fill`,`stroke`],Ue=[`x`,`y`,`height`,`width`,`rx`,`fill`,`stroke`,`stroke-width`],We=[`x`,`y`,`height`,`width`,`fill`,`stroke`,`stroke-width`],Ge=[`x`,`y`,`font-size`,`font-weight`,`fill`],Ke=[`x`,`y`,`height`,`width`,`rx`,`fill`,`stroke`,`stroke-width`],qe={key:3},Je=[`x`,`y`,`fill`,`font-size`,`font-weight`],Ye={key:4},Xe=[`x1`,`x2`,`y1`,`y2`,`stroke`],Ze={key:4,class:`vue-data-ui-watermark`},Qe=[`id`],$e={key:0,class:`vue-ui-bullet-legend-item`,dir:`auto`},et={style:{"margin-right":`2px`}},w=/*#__PURE__*/ le({__name:`vue-ui-bullet`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:le,emit:Ne}){let w=p(()=>import(`./PackageVersion-DWlHsdPa.js`).then(e=>e.t)),tt=p(()=>import(`./PenAndPaper-r50tK3S4.js`).then(e=>e.t)),nt=p(()=>import(`./UserOptions-Em_JgDXM.js`).then(e=>e.n)),{vue_ui_bullet:rt}=t(),T=e,it=Ne,E=v(null),at=v(null),ot=v(0),st=v(null),ct=v(null),lt=v(0),D=v(null),O=v(null),ut=v(!1),k=c({get:()=>B.value.hasOwnProperty(`value`),set:e=>e}),A=v(R()),j=c(()=>A.value.debug),M=c(()=>A.value.style.chart.target),N=c(()=>A.value.style.chart.segments),P=c(()=>A.value.style.chart),F=c(()=>A.value.userOptions),I=c(()=>B.value.segments?Array.isArray(B.value.segments)?B.value.segments.length?!0:(j.value&&console.warn(`VueUiBullet: dataset segments is empty. Provide segments with this datastructure:
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{$ as n,Ft as r,S as i,X as a,_ as ee,at as te,i as o,in as ne,t as re,yt as ie,zt as ae}from"./lib-rPeBMZrn.js";import{n as oe,t as se}from"./BaseScanner-8NdoBs7B.js";import{n as ce}from"./useHints-C-TwxM0Y.js";import{t as le}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as ue}from"./resolveChartConfig-CIhClE5R.js";import{t as de}from"./chartImage-DPGnEuYM.js";import{n as fe}from"./Title-BliHuXfT.js";import{t as pe}from"./useChartExport-BZts4KFb.js";import{n as me,t as he}from"./annotationSlots-RvQBEO9-.js";import{n as ge,t as _e}from"./userOptionsSlots-DYuo-E5m.js";import{t as ve}from"./usePrinter-DVf3YcG5.js";import{c as ye}from"./canvas-lib-22VpOI4_.js";import{t as be}from"./useResponsive-CENUxfEL.js";import{t as xe}from"./useUserOptionState-CXlFnwPv.js";import{t as Se}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ce}from"./Legend-DM0ClX3D.js";import{t as we}from"./vue_ui_bullet-CwVYkpjd.js";import{Fragment as s,Teleport as Te,computed as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createSlots as Ee,createVNode as De,defineAsyncComponent as p,guardReactiveProps as m,normalizeClass as Oe,normalizeProps as h,normalizeStyle as g,onBeforeUnmount as ke,onMounted as Ae,openBlock as _,ref as v,renderList as y,renderSlot as b,toDisplayString as x,toRefs as je,unref as S,watch as Me,withCtx as C}from"vue";var Ne=/* @__PURE__ */ e({default:()=>w}),Pe=[`id`],Fe={key:1,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},Ie=[`id`],Le=[`xmlns`,`viewBox`,`aria-labelledby`,`aria-describedby`],Re=[`id`],ze=[`id`],Be=[`width`,`height`],Ve={key:1},He=[`x`,`y`,`height`,`width`,`fill`,`stroke`],Ue=[`x`,`y`,`height`,`width`,`rx`,`fill`,`stroke`,`stroke-width`],We=[`x`,`y`,`height`,`width`,`fill`,`stroke`,`stroke-width`],Ge=[`x`,`y`,`font-size`,`font-weight`,`fill`],Ke=[`x`,`y`,`height`,`width`,`rx`,`fill`,`stroke`,`stroke-width`],qe={key:3},Je=[`x`,`y`,`fill`,`font-size`,`font-weight`],Ye={key:4},Xe=[`x1`,`x2`,`y1`,`y2`,`stroke`],Ze={key:4,class:`vue-data-ui-watermark`},Qe=[`id`],$e={key:0,class:`vue-ui-bullet-legend-item`,dir:`auto`},et={style:{"margin-right":`2px`}},w=/*#__PURE__*/ le({__name:`vue-ui-bullet`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:le,emit:Ne}){let w=p(()=>import(`./PackageVersion-u-p5bCcj.js`).then(e=>e.t)),tt=p(()=>import(`./PenAndPaper-r50tK3S4.js`).then(e=>e.t)),nt=p(()=>import(`./UserOptions-Em_JgDXM.js`).then(e=>e.n)),{vue_ui_bullet:rt}=t(),T=e,it=Ne,E=v(null),at=v(null),ot=v(0),st=v(null),ct=v(null),lt=v(0),D=v(null),O=v(null),ut=v(!1),k=c({get:()=>B.value.hasOwnProperty(`value`),set:e=>e}),A=v(R()),j=c(()=>A.value.debug),M=c(()=>A.value.style.chart.target),N=c(()=>A.value.style.chart.segments),P=c(()=>A.value.style.chart),F=c(()=>A.value.userOptions),I=c(()=>B.value.segments?Array.isArray(B.value.segments)?B.value.segments.length?!0:(j.value&&console.warn(`VueUiBullet: dataset segments is empty. Provide segments with this datastructure:
2
2
 
3
3
  segments: [
4
4
  {
@@ -1,4 +1,4 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{$ as n,At as r,D as i,Ht as a,J as o,P as s,S as ee,U as c,X as l,at as te,c as ne,i as re,in as ie,nn as ae,nt as oe,r as se,t as ce,w as le,yt as ue,zt as de}from"./lib-rPeBMZrn.js";import{n as fe,t as pe}from"./BaseScanner-8NdoBs7B.js";import{n as me,t as he}from"./useHints-C-TwxM0Y.js";import{t as ge}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as _e}from"./useNestedProp-DnGoh-XS.js";import{t as ve}from"./useThemeCheck-BKNRbGeC.js";import{t as ye}from"./chartImage-DPGnEuYM.js";import{n as be}from"./Title-BliHuXfT.js";import{t as xe}from"./useChartExport-BZts4KFb.js";import{n as Se,t as Ce}from"./tableIntegration-CNoJ1CIY.js";import{n as we,t as Te}from"./annotationSlots-RvQBEO9-.js";import{n as Ee,t as De}from"./userOptionsSlots-DYuo-E5m.js";import{t as Oe}from"./useTimeLabels-Das5O74F.js";import{t as ke}from"./usePrinter-DVf3YcG5.js";import{t as Ae}from"./useSvgLabelLayout-42Kats14.js";import{t as je}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Me}from"./useResponsive-CENUxfEL.js";import{t as Ne}from"./A11yDataTable-DWNlWXzs.js";import{t as Pe}from"./useUserOptionState-CXlFnwPv.js";import{t as Fe}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ie}from"./vue_ui_bump-KJL9GYr4.js";import{t as Le}from"./BaseDraggableDialog-9d30Yx8c.js";import{Fragment as u,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Re,createTextVNode as ze,createVNode as Be,defineAsyncComponent as g,guardReactiveProps as Ve,mergeProps as He,normalizeClass as Ue,normalizeProps as We,normalizeStyle as _,onBeforeUnmount as Ge,onMounted as Ke,openBlock as v,ref as y,renderList as b,renderSlot as x,resolveDynamicComponent as qe,shallowRef as Je,toDisplayString as S,toRefs as Ye,unref as C,watch as w,watchEffect as Xe,withCtx as T}from"vue";var Ze=/* @__PURE__ */ e({default:()=>_t}),Qe=[`id`],$e=[`id`],et={style:{position:`relative`}},tt=[`xmlns`,`aria-describedby`,`viewBox`],nt=[`x`,`y`,`width`,`height`],rt=[`d`,`stroke`,`stroke-width`,`onMouseenter`],it=[`d`,`stroke`,`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],at=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],ot=[`x`,`y`,`fill`,`font-size`],st=[`onMouseenter`,`onMouseleave`,`onClick`],ct=[`x`,`y`,`fill`,`font-size`],lt=[`x`,`y`,`fill`,`font-size`,`font--weight`,`innerHTML`,`onMouseenter`,`onMouseleave`,`onClick`],ut=[`x`,`y`,`fill`,`font-size`,`font--weight`,`innerHTML`,`onMouseenter`,`onMouseleave`,`onClick`],dt={key:0},ft={key:1},pt=[`text-anchor`,`font-size`,`font-weight`,`fill`,`stroke`,`transform`],mt=[`text-anchor`,`font-size`,`fill`,`transform`,`innerHTML`],ht={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},gt={key:5,class:`vue-data-ui-watermark`},_t=/*#__PURE__*/ ge({__name:`vue-ui-bump`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`],setup(e,{expose:ge,emit:Ze}){let _t=g(()=>import(`./BaseIcon-fYK0iID8.js`).then(e=>e.n)),vt=g(()=>import(`./vue-ui-accordion-D4FHxzsL.js`).then(e=>e.n)),yt=g(()=>import(`./DataTable-5Ug6gMAX.js`)),bt=g(()=>import(`./PenAndPaper-r50tK3S4.js`).then(e=>e.t)),xt=g(()=>import(`./UserOptions-Em_JgDXM.js`).then(e=>e.n)),St=g(()=>import(`./PackageVersion-DWlHsdPa.js`).then(e=>e.t)),{vue_ui_bump:Ct}=t(),{isThemeValid:wt,warnInvalidTheme:Tt}=ve(),E=e,Et=Ze,Dt=d({get(){return!!E.dataset&&E.dataset.length},set(e){return e}}),D=y(null),O=y(l()),Ot=y(0),kt=y(null),At=y(null),jt=y(null),Mt=y(!1),Nt=y(!1),Pt=y(0),Ft=y(0),It=y(null),Lt=y(null),Rt=y(!1),k=y(null),zt=y(null),Bt=y(null),Vt=y(null),A=y(null),Ht=y(!1),j=y(Yt()),M=d(()=>j.value.style.chart.layout.plots),N=d(()=>j.value.style.chart.layout),P=d(()=>j.value.style.chart),F=d(()=>j.value.userOptions);me({config:()=>j.value,dataset:()=>E.dataset,component:`VueUiBump`,rules:[he.emptyArray,{test:e=>e.length>31,message:[`👀 The number of series > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display`,``,`▶️ Use several instances of the component to show related series`]},{test:e=>e.length===1,message:[`👀 There is only 1 series in your dataset. Consider:`,``,`▶️ Using a line chart, with VueUiXy.`]},{test:e=>e.some(e=>e.values.length>31),message:[`👀 Some series contain > 31 data points, which can make the chart hard to read. Consider:`,``,`▶️ Use filters to show less data points at a time.`,``,`▶️ Use larger time scales, or aggregated values.`]}]});let I=d(()=>j.value.userOptions.useCursorPointer),Ut=d(()=>ie({defaultConfig:{userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{timeLabels:{show:!1},lines:{coatingColor:`#4A4A4A`},plots:{stroke:`#4A4A4A`,labels:{show:!1,displayedValue:`rank`}},nameLabels:{useSerieColor:!0}}}}},userConfig:j.value.skeletonConfig??{}})),{loading:Wt,FINAL_DATASET:Gt,manualLoading:Kt}=fe({...Ye(E),FINAL_CONFIG:j,prepareConfig:Yt,skeletonDataset:E.config?.skeletonDataset??[{name:`————`,values:[1,1,1,2,2,2,3,3,2,2],color:`#4A4A4A`},{name:`————`,values:[2,2,2,1,3,3,2,2,3,3],color:`#6A6A6A`},{name:`————`,values:[3,3,3,3,1,1,1,1,1,1],color:`#8A8A8A`}],skeletonConfig:ie({defaultConfig:j.value,userConfig:Ut.value})}),qt=y(!1),Jt=0;Ke(un);function Yt(){let e=_e({userConfig:E.config,defaultConfig:Ct}),t={},n=e.theme;if(n){if(!wt.value(e))Tt(e),t=e;else{let r=_e({userConfig:Ie[n]||E.config,defaultConfig:e});t={..._e({userConfig:E.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:ae[n]||a}}}else t=e;return t}let{userOptionsVisible:Xt,setUserOptionsVisibility:Zt,keepUserOptionState:Qt}=Pe({config:j.value}),{svgRef:L}=Fe({config:P.value.title});function $t(){Rt.value=!0,Zt(!0)}function en(){Zt(!1),Rt.value=!1}let R=y({showTable:j.value.table.show});w(j,()=>{R.value={showTable:j.value.table.show}},{immediate:!0}),w(()=>E.config,e=>{Wt.value||(j.value=Yt()),Xt.value=!j.value.userOptions.showOnChartHover,un(),Pt.value+=1,Ft.value+=1,R.value.showTable=j.value.table.show,j.value.responsive||(z.value.width=P.value.width,z.value.height=P.value.height),z.value.paddingRatio={top:P.value.padding.top/P.value.height,right:P.value.padding.right/P.value.width,bottom:P.value.padding.bottom/P.value.height,left:P.value.padding.left/P.value.width}}),w(()=>E.dataset,e=>{Array.isArray(e)&&e.length>0&&(Kt.value=!1)},{deep:!0});let{isPrinting:tn,isImaging:nn,generatePdf:rn,generateImage:an}=ke({elementId:`bump_${O.value}`,fileName:P.value.title.text||`vue-ui-bump`,options:j.value.userOptions.print}),on=d(()=>j.value.userOptions.show&&!P.value.title.text),z=y({width:P.value.width,height:P.value.height,paddingRatio:{top:P.value.padding.top/P.value.height,right:P.value.padding.right/P.value.width,bottom:P.value.padding.bottom/P.value.height,left:P.value.padding.left/P.value.width}}),sn=d(()=>le(j.value.customPalette)),B=Je(null),V=Je(null),cn=y(null),ln=d(()=>j.value.debug);function un(){de(E.dataset)?(te({componentName:`VueUiBump`,type:`dataset`,debug:ln.value}),Kt.value=!0):E.dataset.forEach((e,t)=>{ue({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{Dt.value=!1,te({componentName:`VueUiBump`,type:`datasetSerieAttribute`,property:e,index:t,debug:ln.value}),Kt.value=!0})}),de(E.dataset)||(Kt.value=j.value.loading),setTimeout(()=>{Nt.value=!0},10),j.value.responsive&&(B.value&&(V.value&&B.value.unobserve(V.value),B.value.disconnect()),B.value=new ResizeObserver(()=>{Nt.value=!1;let{width:e,height:t}=Me({chart:D.value,noTitle:At.value,title:P.value.title.text?kt.value:null,legend:null,slicer:null,source:jt.value});cancelAnimationFrame(Jt),Jt=requestAnimationFrame(()=>{z.value.width=e,z.value.height=t-12,qt.value=!0,clearTimeout(cn.value),cn.value=setTimeout(()=>{Nt.value=!0},10)})}),V.value=D.value.parentNode,B.value.observe(V.value))}Ge(()=>{cancelAnimationFrame(Jt),B.value&&(V.value&&B.value.unobserve(V.value),B.value.disconnect())});let dn=d(()=>Gt.value.map((e,t)=>{let n=ee(e.color)||sn.value[t]||a[t]||a[t%a.length];return{...e,absoluteIndex:t,id:l(),color:n}})),H=d(()=>Math.max(...dn.value.map(e=>e.values.length)));function fn(e){let t=e.map(()=>Array(H.value).fill(null));for(let n=0;n<H.value;n+=1){let r=e.map((e,r)=>({seriesIndex:r,value:e.values?.[n],previousPosition:n>0?t[r][n-1]:r})).filter(e=>Number.isFinite(e.value));r.sort((e,t)=>t.value===e.value?e.previousPosition-t.previousPosition:t.value-e.value);for(let e=0;e<r.length;e+=1){let i=r[e];t[i.seriesIndex][n]=e}}return t}let{metrics:pn,ready:mn,settling:hn,update:gn}=Ae({svgRef:L,canMeasure:()=>(!j.value.responsive||qt.value)&&(!N.value.timeLabels.show||Cn.value),initialMetrics:{left:0,right:0,bottom:0},measure:e=>N.value.timeLabels.autoRotate.enable&&Nn()?null:{left:e(zt.value).width,right:e(Bt.value).width,bottom:e(Vt.value).height}});function _n(){return pn.value.left}function vn(){return pn.value.right}let yn=d(()=>N.value.timeLabels.show&&K.value.length?pn.value.bottom+Math.abs(N.value.timeLabels.offsetY)+N.value.timeLabels.fontSize*.3:0),U=d(()=>{let{height:e,width:t}=z.value,{right:n,left:r}=z.value.paddingRatio,i=_n(),a=vn(),o=P.value.padding.top,s=t-t*n-a,ee=t*r+i,c=t-t*n-t*r-i-a,l=e-o-P.value.padding.bottom-yn.value,te=o+l,ne=o+l,re=Math.max(0,e);return{chartHeight:ne,chartWidth:Math.max(0,t),top:o,right:Math.max(0,s),bottom:Math.max(0,te),left:Math.max(0,ee),width:Math.max(0,c),height:Math.max(0,l),unitH:Math.max(0,l)/dn.value.length,unitW:Math.max(0,c)/H.value,svgHeight:re}}),W=d(()=>{if(!Dt.value&&!Wt.value)return[];let e=fn(dn.value);return dn.value.map((t,n)=>({...t,positions:e[n]})).map(e=>{let t=e.positions.map((t,r)=>{let i=re(M.value.labels.formatter,e.values[r],n({p:M.value.labels.prefix,v:e.values[r],s:M.value.labels.suffix,r:M.value.labels.rounding}));return{name:e.name,id:e.id,x:U.value.left+r*U.value.unitW+U.value.unitW/2,y:U.value.top+t*U.value.unitH+U.value.unitH/2,value:e.values[r],displayValue:i,rank:e.positions[r]+1,color:e.color,labelColor:M.value.labels.color===`auto`?se(e.color):ee(M.value.labels.color)??se(e.color)}}),i=t.filter(e=>r(e.value)),a=N.value.lines.smooth?s(i):c(i);return{...e,coordinates:t,path:a}})});d(()=>W.value.flatMap((e,t)=>e.coordinates.map((n,r)=>({...n,pointIndex:r,seriesIndex:t,seriesId:e.id,seriesName:e.name,pointId:`${e.id}_${r}`})).filter(e=>r(e.value))));function bn(e,t,n,r){let i=e.toSorted((e,t)=>e.y-t.y);for(let e=1;e<i.length;e+=1){let n=i[e-1],r=i[e];r.y<n.y+t&&(r.y=n.y+t)}let a=i.length-1;if(a>=0&&i[a].y>r){i[a].y=r;for(let e=a-1;e>=0;--e){let n=i[e+1],r=i[e];r.y>n.y-t&&(r.y=n.y-t)}}if(i.length&&i[0].y<n){let e=n-i[0].y;for(let t=0;t<i.length;t+=1)i[t].y+=e}return i}let xn=d(()=>{let e=[],t=[];W.value.forEach(n=>{let r=n.coordinates.filter(e=>Number.isFinite(e.rank));if(!r.length)return;e.push({...r[0]});let i=r[r.length-1];t.push({...i})});let n=N.value.nameLabels.fontSize,r=n*1.4,i=U.value.top+n,a=U.value.bottom-n,o=bn(t,r,i,a);return{left:bn(e,r,i,a),right:o}});function Sn(e){let t=M.value.labels.fontSize*.4,n=e.displayValue,r=n.length*(M.value.labels.fontSize*(n.length===1?1:.6)),i=M.value.labels.fontSize,a=r+t*2,o=i+t*2,s=e.x-a/2,ee=e.y-o/2,c=M.value.strokeWidth;return{x:s-c/2,y:ee-c/2,width:a+c,height:o+c,fill:e.color,stroke:M.value.stroke,"stroke-width":c,rx:o/2}}let G=y([]),Cn=y(!1),wn=0;Xe(()=>{let e=++wn,t=N.value.timeLabels,n=t.values,r=t.datetimeFormatter,i=H.value;!i||!Array.isArray(n)||n.length===0?(G.value=[],Cn.value=!0):(async()=>{let t=await Oe({values:n,maxDatapoints:i,formatter:r,start:0,end:i});e===wn&&(G.value=t,Cn.value=!0)})()});let K=d(()=>{let e=N.value.timeLabels,t=G.value||[],n=G.value||[],r=H.value,i=t.map(e=>e?.text??``),a=n.map(e=>e?.text??``);return ne(!!e.showOnlyFirstAndLast,!!e.showOnlyAtModulo,Math.max(1,Number(e.modulo)||1),i,a,0,null,r)}),Tn=d(()=>z.value.width),En=d(()=>z.value.height),Dn=d(()=>({start:0,end:H.value})),q=d(()=>[...W.value].map(e=>{let t=[...e.coordinates].filter(e=>r(e.value)).at(-1);return{...e,navigationRank:t?.rank??1/0}}).sort((e,t)=>e.navigationRank-t.navigationRank));function On(){A.value=null,Ht.value=!0}function kn(){jn(),Ht.value=!1}function An(e,t){let n=q.value.length;return n?e===null||e<0||e>=n?0:t===`previous`?(e-1+n)%n:(e+1)%n:null}function jn(){if(A.value!==null){let e=q.value[A.value];e&&$(e,e)}A.value=null,k.value=null}function Mn(e){if(!L.value||Y.value||document.activeElement!==L.value||!q.value.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){jn();return}if(r){if(A.value===null)return;let e=q.value[A.value];if(!e)return;qn(e,e);return}let a=A.value;a===null?a=0:t?a=An(a,`previous`):n&&(a=An(a,`next`));let o=q.value[a];o&&(A.value=a,Q(o,o))}let J=d(()=>({head:Z.value.head,body:W.value.map(e=>[e.name,...e.coordinates.map(e=>r(e.value)?`${e.displayValue} (${e.rank})`:`-`)]),caption:j.value.a11y.translations.tableCaption,notice:j.value.a11y.translations.tableAvailable})),{detectTimeLabelCollisionNow:Nn}=je({timeLabelsEls:Vt,timeLabels:G,slicer:Dn,configRef:j,rotationPath:[`style`,`chart`,`layout`,`timeLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`layout`,`timeLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:Tn,height:En,rotation:N.value.timeLabels.autoRotate.angle,resizeDebounceMs:0}),Y=y(!1);function Pn(){Y.value=!Y.value}function Fn(e){Mt.value=e,Ot.value+=1}function In(){R.value.showTable=!R.value.showTable}w(()=>R.value.showTable,e=>Se(e,j,It));function Ln(){R.value.showTable=!1,Lt.value&&Lt.value.setTableIconState(!1)}function Rn(){return W.value}function zn(e=null){let t=[[P.value.title.text],[P.value.title.subtitle.text],[``]],n=[``,...K.value.map(e=>e?.text??``)],r=W.value.map(e=>[e.name,...e.coordinates.map(e=>`${e.displayValue}`)]),a=W.value.map(e=>[e.name,...e.coordinates.map(e=>`${e.rank}`)]),o=t.concat([[j.value.table.columnNames.values]]).concat([n]).concat(r).concat([[``],[j.value.table.columnNames.ranking],[n]]).concat(a),s=i(o);e?e(s):oe({csvContent:s,title:P.value.title.text||`vue-ui-bump`})}let X=d(()=>Ce({config:j,style:P,mutableConfig:R,dialog:Le,accordion:vt,isFullscreen:Mt,parent:D,maxWidth:800,isCursorPointer:I})),Z=d(()=>({head:[``].concat(K.value.map(e=>e.text)),body:W.value.map((e,t)=>[e.name,...e.coordinates.map(e=>`${e.displayValue} (${e.rank})`)]),config:{th:{backgroundColor:j.value.table.th.backgroundColor,color:j.value.table.th.color,outline:j.value.table.th.outline},td:{backgroundColor:j.value.table.td.backgroundColor,color:j.value.table.td.color,outline:j.value.table.td.outline},breakpoint:j.value.table.responsiveBreakpoint},colNames:[j.value.table.columnNames.series]})),Bn=d(()=>P.value.backgroundColor),Vn=d(()=>P.value.title),{isCallbackImaging:Hn,isCallbackSvg:Un,generateSvg:Wn,onGenerateImage:Gn}=xe({svg:L,title:Vn,legend:null,legendItems:null,backgroundColor:Bn,getSvgCallback:()=>j.value.userOptions.callbacks.svg,generateImage:an}),Kn=ye(D,()=>P.value.title.text);function Q(e,t){k.value=t.id,j.value.events.datapointEnter&&j.value.events.datapointEnter({datapoint:e,seriesIndex:e?.pointIndex??null})}function $(e,t){k.value=null,j.value.events.datapointLeave&&j.value.events.datapointLeave({datapoint:e,seriesIndex:e?.pointIndex??null})}function qn(e,t){j.value.events.datapointClick&&j.value.events.datapointClick({datapoint:e,seriesIndex:e?.pointIndex??null})}async function Jn(){Et(`copyAlt`,{config:j.value,dataset:W.value}),j.value.userOptions.callbacks.altCopy?await Promise.resolve(j.value.userOptions.callbacks.altCopy({config:j.value,dataset:W.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}return ge({getData:Rn,getImage:Kn,generatePdf:rn,generateCsv:zn,generateImage:an,generateSvg:Wn,toggleTable:In,toggleAnnotator:Pn,toggleFullscreen:Fn,copyAlt:Jn}),w(()=>[z.value.width,z.value.height,N.value,G.value,Cn.value,zt.value,Bt.value,Vt.value,E.dataset,qt.value,j.value.style.fontFamily],gn,{flush:`post`,deep:!0}),(e,t)=>(v(),m(`div`,{id:`bump_${O.value}`,ref_key:`bumpChart`,ref:D,class:Ue({"vue-data-ui-component":!0,"vue-ui-bump":!0,"vue-data-ui-wrapper-fullscreen":Mt.value}),style:_(`background:${P.value.backgroundColor};color:${P.value.color};font-family:${j.value.style.fontFamily}; position: relative; ${j.value.responsive?`height: 100%`:``}`),onMouseenter:$t,onMouseleave:en},[h(`p`,{id:`chart-instructions-${O.value}`,class:`sr-only`},S(j.value.a11y.translations.keyboardNavigation),9,$e),J.value.body.length?(v(),f(Ne,{key:0,uid:O.value,head:J.value.head,body:J.value.body,caption:J.value.caption,notice:J.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):p(``,!0),F.value.buttons.annotator?(v(),f(C(bt),{key:1,showGroupActions:F.value.annotator?.showGroupActions??!0,svgRef:C(L),backgroundColor:P.value.backgroundColor,color:P.value.color,active:Y.value,isCursorPointer:I.value,palette:F.value.annotatorPalette,onClose:Pn},Re({_:2},[b(C(Te),t=>({name:t,fn:T(n=>[x(e.$slots,t,We(Ve(C(we)(t,n))),void 0,!0)])}))]),1032,[`showGroupActions`,`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),x(e.$slots,`userConfig`,{},void 0,!0),on.value?(v(),m(`div`,{key:2,ref_key:`noTitle`,ref:At,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),P.value.title.text?(v(),m(`div`,{key:3,ref_key:`chartTitle`,ref:kt,style:`width:100%;background:transparent;`},[(v(),f(be,{key:`title_${Pt.value}`,config:{title:{cy:`bump-title`,...P.value.title},subtitle:{cy:`bump-subtitle`,...P.value.title.subtitle}}},null,8,[`config`]))],512)):p(``,!0),F.value.show&&Dt.value&&(C(Qt)||C(Xt))?(v(),f(C(xt),{ref_key:`userOptionsRef`,ref:Lt,key:`user_option_${Ot.value}`,backgroundColor:P.value.backgroundColor,color:P.value.color,isPrinting:C(tn),isImaging:C(nn),uid:O.value,hasTooltip:!1,hasPdf:F.value.buttons.pdf,hasImg:F.value.buttons.img,hasSvg:F.value.buttons.svg,hasXls:F.value.buttons.csv,hasTable:F.value.buttons.table,hasLabel:!1,hasAltCopy:F.value.buttons.altCopy,hasFullscreen:F.value.buttons.fullscreen,isFullcreen:Mt.value,chartElement:D.value,position:F.value.position,titles:{...F.value.buttonTitles},hasAnnotator:F.value.buttons.annotator,isAnnotation:Y.value,callbacks:F.value.callbacks,printScale:F.value.print.scale,tableDialog:j.value.table.useDialog,isCursorPointer:I.value,onToggleFullscreen:Fn,onGeneratePdf:C(rn),onGenerateCsv:zn,onGenerateImage:C(Gn),onGenerateSvg:C(Wn),onToggleTable:In,onToggleAnnotator:Pn,onCopyAlt:Jn,style:_({visibility:C(Qt)?C(Xt)?`visible`:`hidden`:`visible`})},Re({_:2},[b(C(Ee)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:T(n=>[x(e.$slots,t,We(Ve(C(De)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasAltCopy.hasFullscreen.isFullcreen.chartElement.position.titles.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):p(``,!0),h(`div`,et,[(v(),m(`svg`,{ref_key:`svgRef`,ref:L,xmlns:C(ce),"aria-describedby":`chart-instructions-${O.value}`,viewBox:`0 0 ${U.value.chartWidth<=0?10:U.value.chartWidth} ${U.value.svgHeight<=0?10:U.value.svgHeight}`,class:Ue({"vue-data-ui-loading":C(Wt),"no-transition":!j.value.useCssAnimation}),style:_(`max-width:100%;overflow:visible;background:transparent;color:${P.value.color};visibility:${C(mn)?`visible`:`hidden`}`),role:`img`,"aria-live":`polite`,preserveAspectRatio:`xMidYMid`,tabindex:`0`,onFocus:On,onBlur:kn,onKeydown:Mn},[Be(C(St)),x(e.$slots,`svg-underlayer`,{svg:{drawingArea:U.value,data:W.value,isPrintingImg:C(tn)||C(nn)||C(Hn),isPrintingSvg:C(Un)}},void 0,!0),e.$slots[`chart-background`]?(v(),m(`foreignObject`,{key:0,x:U.value.left,y:U.value.top,width:U.value.width<=0?10:U.value.width,height:U.value.height<=0?10:U.value.height,style:{pointerEvents:`none`}},[x(e.$slots,`chart-background`,{},void 0,!0)],8,nt)):p(``,!0),(v(!0),m(u,null,b(W.value,e=>(v(),m(u,null,[h(`path`,{class:`transition-opacity`,d:`M${e.path}`,stroke:N.value.lines.coatingColor,"stroke-width":N.value.lines.strokeWidth+2,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,style:_({opacity:k.value==null||k.value===e.id?1:.1}),onMouseenter:t=>k.value=e.id,onMouseleave:t[0]||=e=>k.value=null},null,44,rt),h(`path`,{class:`transition-opacity`,d:`M${e.path}`,stroke:e.color,"stroke-width":N.value.lines.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,style:_({opacity:k.value==null||k.value===e.id?1:.1}),onMouseenter:t=>Q(e,e),onMouseleave:t=>$(e,e),onClick:t=>qn(e,e)},null,44,it)],64))),256)),(v(!0),m(u,null,b(W.value,t=>(v(),m(u,null,[M.value.labels.displayedValue===`rank`?(v(!0),m(u,{key:0},b(t.coordinates,(e,n)=>(v(),m(`circle`,{class:`transition-opacity`,cx:e.x,cy:e.y,r:M.value.radius,fill:t.color,stroke:M.value.stroke,"stroke-width":M.value.strokeWidth,style:_({opacity:k.value==null||k.value===t.id?1:.1}),onMouseenter:r=>Q({...e,pointIndex:n},t),onMouseleave:r=>$({...e,pointIndex:n},t),onClick:r=>Q({...e,pointIndex:n},t)},null,44,at))),256)):p(``,!0),M.value.labels.show&&M.value.labels.displayedValue===`rank`?(v(!0),m(u,{key:1},b(t.coordinates,e=>(v(),m(`text`,{class:`transition-opacity`,x:e.x,y:e.y+M.value.labels.fontSize/3,fill:e.labelColor,"font-size":M.value.labels.fontSize,"text-anchor":`middle`,style:_({userSelect:`none`,pointerEvents:`none`,opacity:k.value==null||k.value===t.id?1:.1})},S(e.rank),13,ot))),256)):p(``,!0),M.value.labels.displayedValue===`value`?(v(!0),m(u,{key:2},b(t.coordinates,n=>(v(),m(u,null,[C(r)(n.value)?(v(),m(`rect`,He({key:0,class:`transition-opacity`},{ref_for:!0},Sn(n),{style:{opacity:k.value==null||k.value===t.id?1:.1},onMouseenter:n=>Q({...e.point,pointIndex:e.i},t),onMouseleave:n=>$({...e.point,pointIndex:e.i},t),onClick:n=>Q({...e.point,pointIndex:e.i},t)}),null,16,st)):p(``,!0),C(r)(n.value)&&M.value.labels.show?(v(),m(`text`,{key:1,class:`transition-opacity`,x:n.x,y:n.y+M.value.labels.fontSize/3,fill:n.labelColor,"font-size":M.value.labels.fontSize,"text-anchor":`middle`,style:_({userSelect:`none`,pointerEvents:`none`,opacity:k.value==null||k.value===t.id?1:.1})},S(n.displayValue),13,ct)):p(``,!0)],64))),256)):p(``,!0)],64))),256)),N.value.nameLabels.leftLabels.show?(v(),m(`g`,{key:1,ref_key:`labelsLeft`,ref:zt},[(v(!0),m(u,null,b(xn.value.left.filter(e=>C(r)(e.value)),(e,t)=>(v(),m(`text`,{class:`transition-opacity`,x:U.value.left,y:e.y+N.value.nameLabels.fontSize/3,fill:N.value.nameLabels.useSerieColor?e.color:N.value.nameLabels.color,"font-size":N.value.nameLabels.fontSize,"font--weight":N.value.nameLabels.bold?`bold`:`normal`,"text-anchor":`end`,innerHTML:C(o)({content:e.name,fontSize:N.value.nameLabels.fontSize,fill:N.value.nameLabels.useSerieColor?e.color:N.value.nameLabels.color,x:U.value.left-N.value.nameLabels.offsetX,y:e.y+N.value.nameLabels.fontSize/3,translateY:!0}),style:_({opacity:k.value==null||k.value===e.id?1:.1}),onMouseenter:t=>Q(e,e),onMouseleave:t=>$(e,e),onClick:t=>qn(e,e)},null,44,lt))),256))],512)):p(``,!0),N.value.nameLabels.rightLabels.show?(v(),m(`g`,{key:2,ref_key:`labelsRight`,ref:Bt},[(v(!0),m(u,null,b(xn.value.right.filter(e=>C(r)(e.value)),(e,t)=>(v(),m(`text`,{class:`transition-opacity`,x:U.value.right,y:e.y+N.value.nameLabels.fontSize/3,fill:N.value.nameLabels.useSerieColor?e.color:N.value.nameLabels.color,"font-size":N.value.nameLabels.fontSize,"font--weight":N.value.nameLabels.bold?`bold`:`normal`,"text-anchor":`start`,innerHTML:C(o)({content:e.name,fontSize:N.value.nameLabels.fontSize,fill:N.value.nameLabels.useSerieColor?e.color:N.value.nameLabels.color,x:U.value.right+N.value.nameLabels.offsetX,y:e.y+N.value.nameLabels.fontSize/3,translateY:!0}),style:_({opacity:k.value==null||k.value===e.id?1:.1}),onMouseenter:t=>Q(e,e),onMouseleave:t=>$(e,e),onClick:t=>qn(e,e)},null,44,ut))),256))],512)):p(``,!0),N.value.timeLabels.show?(v(),m(`g`,{key:3,ref_key:`timeLabelsEls`,ref:Vt},[e.$slots[`time-label`]?(v(),m(`g`,dt,[(v(!0),m(u,null,b(K.value,(t,n)=>(v(),m(`g`,null,[x(e.$slots,`time-label`,He({ref_for:!0},{x:U.value.unitW*n+U.value.unitW/2+U.value.left,y:U.value.chartHeight+N.value.timeLabels.offsetY,fontSize:N.value.timeLabels.fontSize,fill:N.value.timeLabels.color,transform:`translate(${U.value.unitW*n+U.value.unitW/2+U.value.left}, ${U.value.chartHeight+N.value.timeLabels.offsetY}), rotate(${N.value.timeLabels.rotation})`,absoluteIndex:t.absoluteIndex,content:t.text,textAnchor:N.value.timeLabels.rotation>0?`start`:P.value.layout.timeLabels.rotation<0?`end`:`middle`,show:!0}),void 0,!0)]))),256))])):(v(),m(`g`,ft,[(v(!0),m(u,null,b(K.value,(e,t)=>(v(),m(`g`,null,[String(e.text).includes(`
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{$ as n,At as r,D as i,Ht as a,J as o,P as s,S as ee,U as c,X as l,at as te,c as ne,i as re,in as ie,nn as ae,nt as oe,r as se,t as ce,w as le,yt as ue,zt as de}from"./lib-rPeBMZrn.js";import{n as fe,t as pe}from"./BaseScanner-8NdoBs7B.js";import{n as me,t as he}from"./useHints-C-TwxM0Y.js";import{t as ge}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as _e}from"./useNestedProp-DnGoh-XS.js";import{t as ve}from"./useThemeCheck-BKNRbGeC.js";import{t as ye}from"./chartImage-DPGnEuYM.js";import{n as be}from"./Title-BliHuXfT.js";import{t as xe}from"./useChartExport-BZts4KFb.js";import{n as Se,t as Ce}from"./tableIntegration-CNoJ1CIY.js";import{n as we,t as Te}from"./annotationSlots-RvQBEO9-.js";import{n as Ee,t as De}from"./userOptionsSlots-DYuo-E5m.js";import{t as Oe}from"./useTimeLabels-Das5O74F.js";import{t as ke}from"./usePrinter-DVf3YcG5.js";import{t as Ae}from"./useSvgLabelLayout-42Kats14.js";import{t as je}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Me}from"./useResponsive-CENUxfEL.js";import{t as Ne}from"./A11yDataTable-DWNlWXzs.js";import{t as Pe}from"./useUserOptionState-CXlFnwPv.js";import{t as Fe}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ie}from"./vue_ui_bump-KJL9GYr4.js";import{t as Le}from"./BaseDraggableDialog-9d30Yx8c.js";import{Fragment as u,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Re,createTextVNode as ze,createVNode as Be,defineAsyncComponent as g,guardReactiveProps as Ve,mergeProps as He,normalizeClass as Ue,normalizeProps as We,normalizeStyle as _,onBeforeUnmount as Ge,onMounted as Ke,openBlock as v,ref as y,renderList as b,renderSlot as x,resolveDynamicComponent as qe,shallowRef as Je,toDisplayString as S,toRefs as Ye,unref as C,watch as w,watchEffect as Xe,withCtx as T}from"vue";var Ze=/* @__PURE__ */ e({default:()=>_t}),Qe=[`id`],$e=[`id`],et={style:{position:`relative`}},tt=[`xmlns`,`aria-describedby`,`viewBox`],nt=[`x`,`y`,`width`,`height`],rt=[`d`,`stroke`,`stroke-width`,`onMouseenter`],it=[`d`,`stroke`,`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],at=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],ot=[`x`,`y`,`fill`,`font-size`],st=[`onMouseenter`,`onMouseleave`,`onClick`],ct=[`x`,`y`,`fill`,`font-size`],lt=[`x`,`y`,`fill`,`font-size`,`font--weight`,`innerHTML`,`onMouseenter`,`onMouseleave`,`onClick`],ut=[`x`,`y`,`fill`,`font-size`,`font--weight`,`innerHTML`,`onMouseenter`,`onMouseleave`,`onClick`],dt={key:0},ft={key:1},pt=[`text-anchor`,`font-size`,`font-weight`,`fill`,`stroke`,`transform`],mt=[`text-anchor`,`font-size`,`fill`,`transform`,`innerHTML`],ht={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},gt={key:5,class:`vue-data-ui-watermark`},_t=/*#__PURE__*/ ge({__name:`vue-ui-bump`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`],setup(e,{expose:ge,emit:Ze}){let _t=g(()=>import(`./BaseIcon-fYK0iID8.js`).then(e=>e.n)),vt=g(()=>import(`./vue-ui-accordion-D4FHxzsL.js`).then(e=>e.n)),yt=g(()=>import(`./DataTable-5Ug6gMAX.js`)),bt=g(()=>import(`./PenAndPaper-r50tK3S4.js`).then(e=>e.t)),xt=g(()=>import(`./UserOptions-Em_JgDXM.js`).then(e=>e.n)),St=g(()=>import(`./PackageVersion-u-p5bCcj.js`).then(e=>e.t)),{vue_ui_bump:Ct}=t(),{isThemeValid:wt,warnInvalidTheme:Tt}=ve(),E=e,Et=Ze,Dt=d({get(){return!!E.dataset&&E.dataset.length},set(e){return e}}),D=y(null),O=y(l()),Ot=y(0),kt=y(null),At=y(null),jt=y(null),Mt=y(!1),Nt=y(!1),Pt=y(0),Ft=y(0),It=y(null),Lt=y(null),Rt=y(!1),k=y(null),zt=y(null),Bt=y(null),Vt=y(null),A=y(null),Ht=y(!1),j=y(Yt()),M=d(()=>j.value.style.chart.layout.plots),N=d(()=>j.value.style.chart.layout),P=d(()=>j.value.style.chart),F=d(()=>j.value.userOptions);me({config:()=>j.value,dataset:()=>E.dataset,component:`VueUiBump`,rules:[he.emptyArray,{test:e=>e.length>31,message:[`👀 The number of series > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display`,``,`▶️ Use several instances of the component to show related series`]},{test:e=>e.length===1,message:[`👀 There is only 1 series in your dataset. Consider:`,``,`▶️ Using a line chart, with VueUiXy.`]},{test:e=>e.some(e=>e.values.length>31),message:[`👀 Some series contain > 31 data points, which can make the chart hard to read. Consider:`,``,`▶️ Use filters to show less data points at a time.`,``,`▶️ Use larger time scales, or aggregated values.`]}]});let I=d(()=>j.value.userOptions.useCursorPointer),Ut=d(()=>ie({defaultConfig:{userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{timeLabels:{show:!1},lines:{coatingColor:`#4A4A4A`},plots:{stroke:`#4A4A4A`,labels:{show:!1,displayedValue:`rank`}},nameLabels:{useSerieColor:!0}}}}},userConfig:j.value.skeletonConfig??{}})),{loading:Wt,FINAL_DATASET:Gt,manualLoading:Kt}=fe({...Ye(E),FINAL_CONFIG:j,prepareConfig:Yt,skeletonDataset:E.config?.skeletonDataset??[{name:`————`,values:[1,1,1,2,2,2,3,3,2,2],color:`#4A4A4A`},{name:`————`,values:[2,2,2,1,3,3,2,2,3,3],color:`#6A6A6A`},{name:`————`,values:[3,3,3,3,1,1,1,1,1,1],color:`#8A8A8A`}],skeletonConfig:ie({defaultConfig:j.value,userConfig:Ut.value})}),qt=y(!1),Jt=0;Ke(un);function Yt(){let e=_e({userConfig:E.config,defaultConfig:Ct}),t={},n=e.theme;if(n){if(!wt.value(e))Tt(e),t=e;else{let r=_e({userConfig:Ie[n]||E.config,defaultConfig:e});t={..._e({userConfig:E.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:ae[n]||a}}}else t=e;return t}let{userOptionsVisible:Xt,setUserOptionsVisibility:Zt,keepUserOptionState:Qt}=Pe({config:j.value}),{svgRef:L}=Fe({config:P.value.title});function $t(){Rt.value=!0,Zt(!0)}function en(){Zt(!1),Rt.value=!1}let R=y({showTable:j.value.table.show});w(j,()=>{R.value={showTable:j.value.table.show}},{immediate:!0}),w(()=>E.config,e=>{Wt.value||(j.value=Yt()),Xt.value=!j.value.userOptions.showOnChartHover,un(),Pt.value+=1,Ft.value+=1,R.value.showTable=j.value.table.show,j.value.responsive||(z.value.width=P.value.width,z.value.height=P.value.height),z.value.paddingRatio={top:P.value.padding.top/P.value.height,right:P.value.padding.right/P.value.width,bottom:P.value.padding.bottom/P.value.height,left:P.value.padding.left/P.value.width}}),w(()=>E.dataset,e=>{Array.isArray(e)&&e.length>0&&(Kt.value=!1)},{deep:!0});let{isPrinting:tn,isImaging:nn,generatePdf:rn,generateImage:an}=ke({elementId:`bump_${O.value}`,fileName:P.value.title.text||`vue-ui-bump`,options:j.value.userOptions.print}),on=d(()=>j.value.userOptions.show&&!P.value.title.text),z=y({width:P.value.width,height:P.value.height,paddingRatio:{top:P.value.padding.top/P.value.height,right:P.value.padding.right/P.value.width,bottom:P.value.padding.bottom/P.value.height,left:P.value.padding.left/P.value.width}}),sn=d(()=>le(j.value.customPalette)),B=Je(null),V=Je(null),cn=y(null),ln=d(()=>j.value.debug);function un(){de(E.dataset)?(te({componentName:`VueUiBump`,type:`dataset`,debug:ln.value}),Kt.value=!0):E.dataset.forEach((e,t)=>{ue({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{Dt.value=!1,te({componentName:`VueUiBump`,type:`datasetSerieAttribute`,property:e,index:t,debug:ln.value}),Kt.value=!0})}),de(E.dataset)||(Kt.value=j.value.loading),setTimeout(()=>{Nt.value=!0},10),j.value.responsive&&(B.value&&(V.value&&B.value.unobserve(V.value),B.value.disconnect()),B.value=new ResizeObserver(()=>{Nt.value=!1;let{width:e,height:t}=Me({chart:D.value,noTitle:At.value,title:P.value.title.text?kt.value:null,legend:null,slicer:null,source:jt.value});cancelAnimationFrame(Jt),Jt=requestAnimationFrame(()=>{z.value.width=e,z.value.height=t-12,qt.value=!0,clearTimeout(cn.value),cn.value=setTimeout(()=>{Nt.value=!0},10)})}),V.value=D.value.parentNode,B.value.observe(V.value))}Ge(()=>{cancelAnimationFrame(Jt),B.value&&(V.value&&B.value.unobserve(V.value),B.value.disconnect())});let dn=d(()=>Gt.value.map((e,t)=>{let n=ee(e.color)||sn.value[t]||a[t]||a[t%a.length];return{...e,absoluteIndex:t,id:l(),color:n}})),H=d(()=>Math.max(...dn.value.map(e=>e.values.length)));function fn(e){let t=e.map(()=>Array(H.value).fill(null));for(let n=0;n<H.value;n+=1){let r=e.map((e,r)=>({seriesIndex:r,value:e.values?.[n],previousPosition:n>0?t[r][n-1]:r})).filter(e=>Number.isFinite(e.value));r.sort((e,t)=>t.value===e.value?e.previousPosition-t.previousPosition:t.value-e.value);for(let e=0;e<r.length;e+=1){let i=r[e];t[i.seriesIndex][n]=e}}return t}let{metrics:pn,ready:mn,settling:hn,update:gn}=Ae({svgRef:L,canMeasure:()=>(!j.value.responsive||qt.value)&&(!N.value.timeLabels.show||Cn.value),initialMetrics:{left:0,right:0,bottom:0},measure:e=>N.value.timeLabels.autoRotate.enable&&Nn()?null:{left:e(zt.value).width,right:e(Bt.value).width,bottom:e(Vt.value).height}});function _n(){return pn.value.left}function vn(){return pn.value.right}let yn=d(()=>N.value.timeLabels.show&&K.value.length?pn.value.bottom+Math.abs(N.value.timeLabels.offsetY)+N.value.timeLabels.fontSize*.3:0),U=d(()=>{let{height:e,width:t}=z.value,{right:n,left:r}=z.value.paddingRatio,i=_n(),a=vn(),o=P.value.padding.top,s=t-t*n-a,ee=t*r+i,c=t-t*n-t*r-i-a,l=e-o-P.value.padding.bottom-yn.value,te=o+l,ne=o+l,re=Math.max(0,e);return{chartHeight:ne,chartWidth:Math.max(0,t),top:o,right:Math.max(0,s),bottom:Math.max(0,te),left:Math.max(0,ee),width:Math.max(0,c),height:Math.max(0,l),unitH:Math.max(0,l)/dn.value.length,unitW:Math.max(0,c)/H.value,svgHeight:re}}),W=d(()=>{if(!Dt.value&&!Wt.value)return[];let e=fn(dn.value);return dn.value.map((t,n)=>({...t,positions:e[n]})).map(e=>{let t=e.positions.map((t,r)=>{let i=re(M.value.labels.formatter,e.values[r],n({p:M.value.labels.prefix,v:e.values[r],s:M.value.labels.suffix,r:M.value.labels.rounding}));return{name:e.name,id:e.id,x:U.value.left+r*U.value.unitW+U.value.unitW/2,y:U.value.top+t*U.value.unitH+U.value.unitH/2,value:e.values[r],displayValue:i,rank:e.positions[r]+1,color:e.color,labelColor:M.value.labels.color===`auto`?se(e.color):ee(M.value.labels.color)??se(e.color)}}),i=t.filter(e=>r(e.value)),a=N.value.lines.smooth?s(i):c(i);return{...e,coordinates:t,path:a}})});d(()=>W.value.flatMap((e,t)=>e.coordinates.map((n,r)=>({...n,pointIndex:r,seriesIndex:t,seriesId:e.id,seriesName:e.name,pointId:`${e.id}_${r}`})).filter(e=>r(e.value))));function bn(e,t,n,r){let i=e.toSorted((e,t)=>e.y-t.y);for(let e=1;e<i.length;e+=1){let n=i[e-1],r=i[e];r.y<n.y+t&&(r.y=n.y+t)}let a=i.length-1;if(a>=0&&i[a].y>r){i[a].y=r;for(let e=a-1;e>=0;--e){let n=i[e+1],r=i[e];r.y>n.y-t&&(r.y=n.y-t)}}if(i.length&&i[0].y<n){let e=n-i[0].y;for(let t=0;t<i.length;t+=1)i[t].y+=e}return i}let xn=d(()=>{let e=[],t=[];W.value.forEach(n=>{let r=n.coordinates.filter(e=>Number.isFinite(e.rank));if(!r.length)return;e.push({...r[0]});let i=r[r.length-1];t.push({...i})});let n=N.value.nameLabels.fontSize,r=n*1.4,i=U.value.top+n,a=U.value.bottom-n,o=bn(t,r,i,a);return{left:bn(e,r,i,a),right:o}});function Sn(e){let t=M.value.labels.fontSize*.4,n=e.displayValue,r=n.length*(M.value.labels.fontSize*(n.length===1?1:.6)),i=M.value.labels.fontSize,a=r+t*2,o=i+t*2,s=e.x-a/2,ee=e.y-o/2,c=M.value.strokeWidth;return{x:s-c/2,y:ee-c/2,width:a+c,height:o+c,fill:e.color,stroke:M.value.stroke,"stroke-width":c,rx:o/2}}let G=y([]),Cn=y(!1),wn=0;Xe(()=>{let e=++wn,t=N.value.timeLabels,n=t.values,r=t.datetimeFormatter,i=H.value;!i||!Array.isArray(n)||n.length===0?(G.value=[],Cn.value=!0):(async()=>{let t=await Oe({values:n,maxDatapoints:i,formatter:r,start:0,end:i});e===wn&&(G.value=t,Cn.value=!0)})()});let K=d(()=>{let e=N.value.timeLabels,t=G.value||[],n=G.value||[],r=H.value,i=t.map(e=>e?.text??``),a=n.map(e=>e?.text??``);return ne(!!e.showOnlyFirstAndLast,!!e.showOnlyAtModulo,Math.max(1,Number(e.modulo)||1),i,a,0,null,r)}),Tn=d(()=>z.value.width),En=d(()=>z.value.height),Dn=d(()=>({start:0,end:H.value})),q=d(()=>[...W.value].map(e=>{let t=[...e.coordinates].filter(e=>r(e.value)).at(-1);return{...e,navigationRank:t?.rank??1/0}}).sort((e,t)=>e.navigationRank-t.navigationRank));function On(){A.value=null,Ht.value=!0}function kn(){jn(),Ht.value=!1}function An(e,t){let n=q.value.length;return n?e===null||e<0||e>=n?0:t===`previous`?(e-1+n)%n:(e+1)%n:null}function jn(){if(A.value!==null){let e=q.value[A.value];e&&$(e,e)}A.value=null,k.value=null}function Mn(e){if(!L.value||Y.value||document.activeElement!==L.value||!q.value.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){jn();return}if(r){if(A.value===null)return;let e=q.value[A.value];if(!e)return;qn(e,e);return}let a=A.value;a===null?a=0:t?a=An(a,`previous`):n&&(a=An(a,`next`));let o=q.value[a];o&&(A.value=a,Q(o,o))}let J=d(()=>({head:Z.value.head,body:W.value.map(e=>[e.name,...e.coordinates.map(e=>r(e.value)?`${e.displayValue} (${e.rank})`:`-`)]),caption:j.value.a11y.translations.tableCaption,notice:j.value.a11y.translations.tableAvailable})),{detectTimeLabelCollisionNow:Nn}=je({timeLabelsEls:Vt,timeLabels:G,slicer:Dn,configRef:j,rotationPath:[`style`,`chart`,`layout`,`timeLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`layout`,`timeLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:Tn,height:En,rotation:N.value.timeLabels.autoRotate.angle,resizeDebounceMs:0}),Y=y(!1);function Pn(){Y.value=!Y.value}function Fn(e){Mt.value=e,Ot.value+=1}function In(){R.value.showTable=!R.value.showTable}w(()=>R.value.showTable,e=>Se(e,j,It));function Ln(){R.value.showTable=!1,Lt.value&&Lt.value.setTableIconState(!1)}function Rn(){return W.value}function zn(e=null){let t=[[P.value.title.text],[P.value.title.subtitle.text],[``]],n=[``,...K.value.map(e=>e?.text??``)],r=W.value.map(e=>[e.name,...e.coordinates.map(e=>`${e.displayValue}`)]),a=W.value.map(e=>[e.name,...e.coordinates.map(e=>`${e.rank}`)]),o=t.concat([[j.value.table.columnNames.values]]).concat([n]).concat(r).concat([[``],[j.value.table.columnNames.ranking],[n]]).concat(a),s=i(o);e?e(s):oe({csvContent:s,title:P.value.title.text||`vue-ui-bump`})}let X=d(()=>Ce({config:j,style:P,mutableConfig:R,dialog:Le,accordion:vt,isFullscreen:Mt,parent:D,maxWidth:800,isCursorPointer:I})),Z=d(()=>({head:[``].concat(K.value.map(e=>e.text)),body:W.value.map((e,t)=>[e.name,...e.coordinates.map(e=>`${e.displayValue} (${e.rank})`)]),config:{th:{backgroundColor:j.value.table.th.backgroundColor,color:j.value.table.th.color,outline:j.value.table.th.outline},td:{backgroundColor:j.value.table.td.backgroundColor,color:j.value.table.td.color,outline:j.value.table.td.outline},breakpoint:j.value.table.responsiveBreakpoint},colNames:[j.value.table.columnNames.series]})),Bn=d(()=>P.value.backgroundColor),Vn=d(()=>P.value.title),{isCallbackImaging:Hn,isCallbackSvg:Un,generateSvg:Wn,onGenerateImage:Gn}=xe({svg:L,title:Vn,legend:null,legendItems:null,backgroundColor:Bn,getSvgCallback:()=>j.value.userOptions.callbacks.svg,generateImage:an}),Kn=ye(D,()=>P.value.title.text);function Q(e,t){k.value=t.id,j.value.events.datapointEnter&&j.value.events.datapointEnter({datapoint:e,seriesIndex:e?.pointIndex??null})}function $(e,t){k.value=null,j.value.events.datapointLeave&&j.value.events.datapointLeave({datapoint:e,seriesIndex:e?.pointIndex??null})}function qn(e,t){j.value.events.datapointClick&&j.value.events.datapointClick({datapoint:e,seriesIndex:e?.pointIndex??null})}async function Jn(){Et(`copyAlt`,{config:j.value,dataset:W.value}),j.value.userOptions.callbacks.altCopy?await Promise.resolve(j.value.userOptions.callbacks.altCopy({config:j.value,dataset:W.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}return ge({getData:Rn,getImage:Kn,generatePdf:rn,generateCsv:zn,generateImage:an,generateSvg:Wn,toggleTable:In,toggleAnnotator:Pn,toggleFullscreen:Fn,copyAlt:Jn}),w(()=>[z.value.width,z.value.height,N.value,G.value,Cn.value,zt.value,Bt.value,Vt.value,E.dataset,qt.value,j.value.style.fontFamily],gn,{flush:`post`,deep:!0}),(e,t)=>(v(),m(`div`,{id:`bump_${O.value}`,ref_key:`bumpChart`,ref:D,class:Ue({"vue-data-ui-component":!0,"vue-ui-bump":!0,"vue-data-ui-wrapper-fullscreen":Mt.value}),style:_(`background:${P.value.backgroundColor};color:${P.value.color};font-family:${j.value.style.fontFamily}; position: relative; ${j.value.responsive?`height: 100%`:``}`),onMouseenter:$t,onMouseleave:en},[h(`p`,{id:`chart-instructions-${O.value}`,class:`sr-only`},S(j.value.a11y.translations.keyboardNavigation),9,$e),J.value.body.length?(v(),f(Ne,{key:0,uid:O.value,head:J.value.head,body:J.value.body,caption:J.value.caption,notice:J.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):p(``,!0),F.value.buttons.annotator?(v(),f(C(bt),{key:1,showGroupActions:F.value.annotator?.showGroupActions??!0,svgRef:C(L),backgroundColor:P.value.backgroundColor,color:P.value.color,active:Y.value,isCursorPointer:I.value,palette:F.value.annotatorPalette,onClose:Pn},Re({_:2},[b(C(Te),t=>({name:t,fn:T(n=>[x(e.$slots,t,We(Ve(C(we)(t,n))),void 0,!0)])}))]),1032,[`showGroupActions`,`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),x(e.$slots,`userConfig`,{},void 0,!0),on.value?(v(),m(`div`,{key:2,ref_key:`noTitle`,ref:At,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),P.value.title.text?(v(),m(`div`,{key:3,ref_key:`chartTitle`,ref:kt,style:`width:100%;background:transparent;`},[(v(),f(be,{key:`title_${Pt.value}`,config:{title:{cy:`bump-title`,...P.value.title},subtitle:{cy:`bump-subtitle`,...P.value.title.subtitle}}},null,8,[`config`]))],512)):p(``,!0),F.value.show&&Dt.value&&(C(Qt)||C(Xt))?(v(),f(C(xt),{ref_key:`userOptionsRef`,ref:Lt,key:`user_option_${Ot.value}`,backgroundColor:P.value.backgroundColor,color:P.value.color,isPrinting:C(tn),isImaging:C(nn),uid:O.value,hasTooltip:!1,hasPdf:F.value.buttons.pdf,hasImg:F.value.buttons.img,hasSvg:F.value.buttons.svg,hasXls:F.value.buttons.csv,hasTable:F.value.buttons.table,hasLabel:!1,hasAltCopy:F.value.buttons.altCopy,hasFullscreen:F.value.buttons.fullscreen,isFullcreen:Mt.value,chartElement:D.value,position:F.value.position,titles:{...F.value.buttonTitles},hasAnnotator:F.value.buttons.annotator,isAnnotation:Y.value,callbacks:F.value.callbacks,printScale:F.value.print.scale,tableDialog:j.value.table.useDialog,isCursorPointer:I.value,onToggleFullscreen:Fn,onGeneratePdf:C(rn),onGenerateCsv:zn,onGenerateImage:C(Gn),onGenerateSvg:C(Wn),onToggleTable:In,onToggleAnnotator:Pn,onCopyAlt:Jn,style:_({visibility:C(Qt)?C(Xt)?`visible`:`hidden`:`visible`})},Re({_:2},[b(C(Ee)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:T(n=>[x(e.$slots,t,We(Ve(C(De)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasAltCopy.hasFullscreen.isFullcreen.chartElement.position.titles.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):p(``,!0),h(`div`,et,[(v(),m(`svg`,{ref_key:`svgRef`,ref:L,xmlns:C(ce),"aria-describedby":`chart-instructions-${O.value}`,viewBox:`0 0 ${U.value.chartWidth<=0?10:U.value.chartWidth} ${U.value.svgHeight<=0?10:U.value.svgHeight}`,class:Ue({"vue-data-ui-loading":C(Wt),"no-transition":!j.value.useCssAnimation}),style:_(`max-width:100%;overflow:visible;background:transparent;color:${P.value.color};visibility:${C(mn)?`visible`:`hidden`}`),role:`img`,"aria-live":`polite`,preserveAspectRatio:`xMidYMid`,tabindex:`0`,onFocus:On,onBlur:kn,onKeydown:Mn},[Be(C(St)),x(e.$slots,`svg-underlayer`,{svg:{drawingArea:U.value,data:W.value,isPrintingImg:C(tn)||C(nn)||C(Hn),isPrintingSvg:C(Un)}},void 0,!0),e.$slots[`chart-background`]?(v(),m(`foreignObject`,{key:0,x:U.value.left,y:U.value.top,width:U.value.width<=0?10:U.value.width,height:U.value.height<=0?10:U.value.height,style:{pointerEvents:`none`}},[x(e.$slots,`chart-background`,{},void 0,!0)],8,nt)):p(``,!0),(v(!0),m(u,null,b(W.value,e=>(v(),m(u,null,[h(`path`,{class:`transition-opacity`,d:`M${e.path}`,stroke:N.value.lines.coatingColor,"stroke-width":N.value.lines.strokeWidth+2,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,style:_({opacity:k.value==null||k.value===e.id?1:.1}),onMouseenter:t=>k.value=e.id,onMouseleave:t[0]||=e=>k.value=null},null,44,rt),h(`path`,{class:`transition-opacity`,d:`M${e.path}`,stroke:e.color,"stroke-width":N.value.lines.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,style:_({opacity:k.value==null||k.value===e.id?1:.1}),onMouseenter:t=>Q(e,e),onMouseleave:t=>$(e,e),onClick:t=>qn(e,e)},null,44,it)],64))),256)),(v(!0),m(u,null,b(W.value,t=>(v(),m(u,null,[M.value.labels.displayedValue===`rank`?(v(!0),m(u,{key:0},b(t.coordinates,(e,n)=>(v(),m(`circle`,{class:`transition-opacity`,cx:e.x,cy:e.y,r:M.value.radius,fill:t.color,stroke:M.value.stroke,"stroke-width":M.value.strokeWidth,style:_({opacity:k.value==null||k.value===t.id?1:.1}),onMouseenter:r=>Q({...e,pointIndex:n},t),onMouseleave:r=>$({...e,pointIndex:n},t),onClick:r=>Q({...e,pointIndex:n},t)},null,44,at))),256)):p(``,!0),M.value.labels.show&&M.value.labels.displayedValue===`rank`?(v(!0),m(u,{key:1},b(t.coordinates,e=>(v(),m(`text`,{class:`transition-opacity`,x:e.x,y:e.y+M.value.labels.fontSize/3,fill:e.labelColor,"font-size":M.value.labels.fontSize,"text-anchor":`middle`,style:_({userSelect:`none`,pointerEvents:`none`,opacity:k.value==null||k.value===t.id?1:.1})},S(e.rank),13,ot))),256)):p(``,!0),M.value.labels.displayedValue===`value`?(v(!0),m(u,{key:2},b(t.coordinates,n=>(v(),m(u,null,[C(r)(n.value)?(v(),m(`rect`,He({key:0,class:`transition-opacity`},{ref_for:!0},Sn(n),{style:{opacity:k.value==null||k.value===t.id?1:.1},onMouseenter:n=>Q({...e.point,pointIndex:e.i},t),onMouseleave:n=>$({...e.point,pointIndex:e.i},t),onClick:n=>Q({...e.point,pointIndex:e.i},t)}),null,16,st)):p(``,!0),C(r)(n.value)&&M.value.labels.show?(v(),m(`text`,{key:1,class:`transition-opacity`,x:n.x,y:n.y+M.value.labels.fontSize/3,fill:n.labelColor,"font-size":M.value.labels.fontSize,"text-anchor":`middle`,style:_({userSelect:`none`,pointerEvents:`none`,opacity:k.value==null||k.value===t.id?1:.1})},S(n.displayValue),13,ct)):p(``,!0)],64))),256)):p(``,!0)],64))),256)),N.value.nameLabels.leftLabels.show?(v(),m(`g`,{key:1,ref_key:`labelsLeft`,ref:zt},[(v(!0),m(u,null,b(xn.value.left.filter(e=>C(r)(e.value)),(e,t)=>(v(),m(`text`,{class:`transition-opacity`,x:U.value.left,y:e.y+N.value.nameLabels.fontSize/3,fill:N.value.nameLabels.useSerieColor?e.color:N.value.nameLabels.color,"font-size":N.value.nameLabels.fontSize,"font--weight":N.value.nameLabels.bold?`bold`:`normal`,"text-anchor":`end`,innerHTML:C(o)({content:e.name,fontSize:N.value.nameLabels.fontSize,fill:N.value.nameLabels.useSerieColor?e.color:N.value.nameLabels.color,x:U.value.left-N.value.nameLabels.offsetX,y:e.y+N.value.nameLabels.fontSize/3,translateY:!0}),style:_({opacity:k.value==null||k.value===e.id?1:.1}),onMouseenter:t=>Q(e,e),onMouseleave:t=>$(e,e),onClick:t=>qn(e,e)},null,44,lt))),256))],512)):p(``,!0),N.value.nameLabels.rightLabels.show?(v(),m(`g`,{key:2,ref_key:`labelsRight`,ref:Bt},[(v(!0),m(u,null,b(xn.value.right.filter(e=>C(r)(e.value)),(e,t)=>(v(),m(`text`,{class:`transition-opacity`,x:U.value.right,y:e.y+N.value.nameLabels.fontSize/3,fill:N.value.nameLabels.useSerieColor?e.color:N.value.nameLabels.color,"font-size":N.value.nameLabels.fontSize,"font--weight":N.value.nameLabels.bold?`bold`:`normal`,"text-anchor":`start`,innerHTML:C(o)({content:e.name,fontSize:N.value.nameLabels.fontSize,fill:N.value.nameLabels.useSerieColor?e.color:N.value.nameLabels.color,x:U.value.right+N.value.nameLabels.offsetX,y:e.y+N.value.nameLabels.fontSize/3,translateY:!0}),style:_({opacity:k.value==null||k.value===e.id?1:.1}),onMouseenter:t=>Q(e,e),onMouseleave:t=>$(e,e),onClick:t=>qn(e,e)},null,44,ut))),256))],512)):p(``,!0),N.value.timeLabels.show?(v(),m(`g`,{key:3,ref_key:`timeLabelsEls`,ref:Vt},[e.$slots[`time-label`]?(v(),m(`g`,dt,[(v(!0),m(u,null,b(K.value,(t,n)=>(v(),m(`g`,null,[x(e.$slots,`time-label`,He({ref_for:!0},{x:U.value.unitW*n+U.value.unitW/2+U.value.left,y:U.value.chartHeight+N.value.timeLabels.offsetY,fontSize:N.value.timeLabels.fontSize,fill:N.value.timeLabels.color,transform:`translate(${U.value.unitW*n+U.value.unitW/2+U.value.left}, ${U.value.chartHeight+N.value.timeLabels.offsetY}), rotate(${N.value.timeLabels.rotation})`,absoluteIndex:t.absoluteIndex,content:t.text,textAnchor:N.value.timeLabels.rotation>0?`start`:P.value.layout.timeLabels.rotation<0?`end`:`middle`,show:!0}),void 0,!0)]))),256))])):(v(),m(`g`,ft,[(v(!0),m(u,null,b(K.value,(e,t)=>(v(),m(`g`,null,[String(e.text).includes(`
2
2
  `)?(v(),m(`text`,{key:t+`-multi`,"text-anchor":N.value.timeLabels.rotation>0?`start`:N.value.timeLabels.rotation<0?`end`:`middle`,"font-size":N.value.timeLabels.fontSize,fill:N.value.timeLabels.color,transform:`
3
3
  translate(
4
4
  ${U.value.unitW*t+U.value.unitW/2+U.value.left},