vue-data-ui 3.28.6 → 3.28.8

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 (229) hide show
  1. package/dist/BaseDraggableDialog-BK7dj9O6.js +1 -0
  2. package/dist/BaseIcon-CoY0vuL3.js +1 -0
  3. package/dist/{BaseLegendToggle-aT9fOoGO.js → BaseLegendToggle-BIzyyI1h.js} +1 -1
  4. package/dist/{BaseZoomControls-1OdFWrHW.js → BaseZoomControls-JSk9zW3D.js} +1 -1
  5. package/dist/ColorPicker-CwYfNvwH.js +1 -0
  6. package/dist/{DataTable-5Ug6gMAX.js → DataTable-Dof6yhO7.js} +1 -1
  7. package/dist/{HillActions-C8am4I5c.js → HillActions-BMH9pSmQ.js} +1 -1
  8. package/dist/{NonSvgPenAndPaper-CawVDtNj.js → NonSvgPenAndPaper-DXdAh1Sz.js} +1 -1
  9. package/dist/{PackageVersion-u-p5bCcj.js → PackageVersion-Bczw6rsP.js} +1 -1
  10. package/dist/PenAndPaper-DoNTA-SV.js +1 -0
  11. package/dist/SlicerPreview-ChKbdZSU.js +1 -0
  12. package/dist/UserOptions-DW84OKKr.js +1 -0
  13. package/dist/XyAnalysisOptions-U4UJx51x.js +1 -0
  14. package/dist/annotationSlots-OLiW25XN.js +1 -0
  15. package/dist/components/vue-ui-3d-bar.js +1 -1
  16. package/dist/components/vue-ui-accordion.js +1 -1
  17. package/dist/components/vue-ui-age-pyramid.js +1 -1
  18. package/dist/components/vue-ui-annotator.js +1 -1
  19. package/dist/components/vue-ui-bullet.js +1 -1
  20. package/dist/components/vue-ui-bump.js +1 -1
  21. package/dist/components/vue-ui-candlestick.js +1 -1
  22. package/dist/components/vue-ui-carousel-table.js +1 -1
  23. package/dist/components/vue-ui-chestnut.js +1 -1
  24. package/dist/components/vue-ui-chord.js +1 -1
  25. package/dist/components/vue-ui-circle-pack.js +1 -1
  26. package/dist/components/vue-ui-cursor.js +1 -1
  27. package/dist/components/vue-ui-dag.js +1 -1
  28. package/dist/components/vue-ui-dashboard.js +1 -1
  29. package/dist/components/vue-ui-digits.js +1 -1
  30. package/dist/components/vue-ui-donut-evolution.js +1 -1
  31. package/dist/components/vue-ui-donut.js +1 -1
  32. package/dist/components/vue-ui-dumbbell.js +1 -1
  33. package/dist/components/vue-ui-flow.js +1 -1
  34. package/dist/components/vue-ui-funnel.js +1 -1
  35. package/dist/components/vue-ui-galaxy.js +1 -1
  36. package/dist/components/vue-ui-gauge.js +1 -1
  37. package/dist/components/vue-ui-geo.js +1 -1
  38. package/dist/components/vue-ui-gizmo.js +1 -1
  39. package/dist/components/vue-ui-graph.js +1 -1
  40. package/dist/components/vue-ui-heatmap.js +1 -1
  41. package/dist/components/vue-ui-hill.js +1 -1
  42. package/dist/components/vue-ui-history-plot.js +1 -1
  43. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  44. package/dist/components/vue-ui-icon.js +1 -1
  45. package/dist/components/vue-ui-kpi.js +1 -1
  46. package/dist/components/vue-ui-label.js +1 -1
  47. package/dist/components/vue-ui-mini-loader.js +1 -1
  48. package/dist/components/vue-ui-molecule.js +1 -1
  49. package/dist/components/vue-ui-mood-radar.js +1 -1
  50. package/dist/components/vue-ui-nested-donuts.js +1 -1
  51. package/dist/components/vue-ui-onion.js +1 -1
  52. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  53. package/dist/components/vue-ui-quadrant.js +1 -1
  54. package/dist/components/vue-ui-quick-chart.js +1 -1
  55. package/dist/components/vue-ui-radar.js +1 -1
  56. package/dist/components/vue-ui-rating.js +1 -1
  57. package/dist/components/vue-ui-relation-circle.js +1 -1
  58. package/dist/components/vue-ui-ridgeline.js +1 -1
  59. package/dist/components/vue-ui-rings.js +1 -1
  60. package/dist/components/vue-ui-scatter.js +1 -1
  61. package/dist/components/vue-ui-skeleton.js +1 -1
  62. package/dist/components/vue-ui-smiley.js +1 -1
  63. package/dist/components/vue-ui-spark-trend.js +1 -1
  64. package/dist/components/vue-ui-sparkbar.js +1 -1
  65. package/dist/components/vue-ui-sparkgauge.js +1 -1
  66. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  67. package/dist/components/vue-ui-sparkline.js +1 -1
  68. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  69. package/dist/components/vue-ui-stackbar.js +1 -1
  70. package/dist/components/vue-ui-stackline.js +1 -1
  71. package/dist/components/vue-ui-strip-plot.js +1 -1
  72. package/dist/components/vue-ui-table-heatmap.js +1 -1
  73. package/dist/components/vue-ui-table-sparkline.js +1 -1
  74. package/dist/components/vue-ui-table.js +1 -1
  75. package/dist/components/vue-ui-thermometer.js +1 -1
  76. package/dist/components/vue-ui-timer.js +1 -1
  77. package/dist/components/vue-ui-tiremarks.js +1 -1
  78. package/dist/components/vue-ui-treemap.js +1 -1
  79. package/dist/components/vue-ui-vertical-bar.js +1 -1
  80. package/dist/components/vue-ui-waffle.js +1 -1
  81. package/dist/components/vue-ui-wheel.js +1 -1
  82. package/dist/components/vue-ui-word-cloud.js +1 -1
  83. package/dist/components/vue-ui-world.js +1 -1
  84. package/dist/components/vue-ui-xy-canvas.js +1 -1
  85. package/dist/components/vue-ui-xy.js +1 -1
  86. package/dist/package-CNWVs68D.js +1 -0
  87. package/dist/{render-common-CTaC-_Nw.js → render-common-DY4sNXDz.js} +1 -1
  88. package/dist/ssr/vue-ui-donut.js +1 -1
  89. package/dist/ssr/vue-ui-xy.js +1 -1
  90. package/dist/ssr.js +1 -1
  91. package/dist/style.css +1 -1
  92. package/dist/types/vue-data-ui.d.ts +96 -0
  93. package/dist/types/vue-ui-xy.d.ts +4 -0
  94. package/dist/useConfig-By3Vb5kz.js +1 -0
  95. package/dist/{useObjectBindings-BCi3Az41.js → useObjectBindings-0vvvimYP.js} +1 -1
  96. package/dist/usePanZoom-CE6Ofyy8.js +1 -0
  97. package/dist/utils.js +1 -1
  98. package/dist/vue-data-ui-BWqplouA.js +1 -0
  99. package/dist/vue-data-ui.js +1 -1
  100. package/dist/vue-ui-3d-bar-DmRrbXjK.js +19 -0
  101. package/dist/{vue-ui-accordion-D4FHxzsL.js → vue-ui-accordion-DFxSW8ET.js} +1 -1
  102. package/dist/vue-ui-age-pyramid-CJJIp5gY.js +1 -0
  103. package/dist/{vue-ui-annotator-DuAQovkf.js → vue-ui-annotator-BnR2XnsL.js} +1 -1
  104. package/dist/vue-ui-bullet-Br7H7FSM.js +34 -0
  105. package/dist/vue-ui-bump-DCDHNvWE.js +8 -0
  106. package/dist/vue-ui-candlestick-C_swW8gM.js +22 -0
  107. package/dist/{vue-ui-carousel-table-CDgmtbuI.js → vue-ui-carousel-table-BP_yVdDm.js} +1 -1
  108. package/dist/vue-ui-chestnut-CIGNqBsT.js +1 -0
  109. package/dist/vue-ui-chord-DZRFBkRJ.js +21 -0
  110. package/dist/vue-ui-circle-pack-CtdPeMsY.js +13 -0
  111. package/dist/{vue-ui-cursor-9khzj4l-.js → vue-ui-cursor-DRQc_V2R.js} +1 -1
  112. package/dist/vue-ui-dag-Cj0CcntI.js +9 -0
  113. package/dist/vue-ui-dashboard-HyzHqAtX.js +1 -0
  114. package/dist/{vue-ui-digits-DdrPl8eP.js → vue-ui-digits-CfdB0vaP.js} +1 -1
  115. package/dist/vue-ui-donut-Cv-bYyBN.js +47 -0
  116. package/dist/{vue-ui-donut-BbJFmKZh.js → vue-ui-donut-Dy4j7B9b.js} +1 -1
  117. package/dist/vue-ui-donut-evolution-DL112anx.js +2 -0
  118. package/dist/vue-ui-dumbbell-owG24VsQ.js +9 -0
  119. package/dist/vue-ui-flow-BMNIydqI.js +3 -0
  120. package/dist/vue-ui-funnel-BsVS3vuI.js +1 -0
  121. package/dist/vue-ui-galaxy-B8HgdBjc.js +1 -0
  122. package/dist/vue-ui-gauge-B1A_NFY6.js +1 -0
  123. package/dist/vue-ui-geo-_TG4jaV9.js +1 -0
  124. package/dist/{vue-ui-gizmo-kebiFGRl.js → vue-ui-gizmo-D0QjzIGt.js} +1 -1
  125. package/dist/vue-ui-graph-DScVnTzu.js +7 -0
  126. package/dist/vue-ui-heatmap-BbQseEbM.js +1 -0
  127. package/dist/vue-ui-hill-D3V84h_t.js +1 -0
  128. package/dist/vue-ui-history-plot-Bx4WYG6U.js +2 -0
  129. package/dist/vue-ui-horizontal-bar-Do0HJy4f.js +4 -0
  130. package/dist/{vue-ui-kpi-D4q8R7Uq.js → vue-ui-kpi-CF7pAl08.js} +1 -1
  131. package/dist/{vue-ui-label-0lSeoxvv.js → vue-ui-label-W0oz08pp.js} +1 -1
  132. package/dist/{vue-ui-mini-loader-C6vhrfx3.js → vue-ui-mini-loader-OLYDdN3T.js} +1 -1
  133. package/dist/vue-ui-molecule-bAMGCA2Y.js +1 -0
  134. package/dist/vue-ui-mood-radar-CFpgxjuR.js +1 -0
  135. package/dist/vue-ui-nested-donuts-CWY26iKX.js +19 -0
  136. package/dist/vue-ui-onion-DsBUqL_c.js +5 -0
  137. package/dist/vue-ui-parallel-coordinate-plot-BF3gO85b.js +9 -0
  138. package/dist/vue-ui-quadrant-BkNG2LGm.js +2 -0
  139. package/dist/vue-ui-quick-chart-CYxvgVpD.js +17 -0
  140. package/dist/vue-ui-radar-0H8CiLmc.js +1 -0
  141. package/dist/{vue-ui-rating-7RAJA7I4.js → vue-ui-rating-B9HeTCLa.js} +1 -1
  142. package/dist/vue-ui-relation-circle-B0BM4xf8.js +1 -0
  143. package/dist/vue-ui-ridgeline-D-fDuE3y.js +2 -0
  144. package/dist/vue-ui-rings-UtlBiaZZ.js +1 -0
  145. package/dist/vue-ui-scatter-CduaARRt.js +9 -0
  146. package/dist/{vue-ui-skeleton-C0oElPXz.js → vue-ui-skeleton-an0peDis.js} +1 -1
  147. package/dist/{vue-ui-smiley-BdhxsPGW.js → vue-ui-smiley-Cht1imV-.js} +1 -1
  148. package/dist/{vue-ui-spark-trend-CRQ5JfVc.js → vue-ui-spark-trend-DCP7blHB.js} +1 -1
  149. package/dist/{vue-ui-sparkbar-BTclK0-F.js → vue-ui-sparkbar-DT3sDgda.js} +1 -1
  150. package/dist/{vue-ui-sparkgauge-zNl9Xmt3.js → vue-ui-sparkgauge-AQt2L5dI.js} +1 -1
  151. package/dist/{vue-ui-sparkhistogram-ynyE3DOc.js → vue-ui-sparkhistogram-a_jc2Dv2.js} +1 -1
  152. package/dist/{vue-ui-sparkline-CtsijvdW.js → vue-ui-sparkline-D2-KcHAU.js} +1 -1
  153. package/dist/{vue-ui-sparkstackbar-RHlqUD-0.js → vue-ui-sparkstackbar-CBI4S5cu.js} +1 -1
  154. package/dist/vue-ui-stackbar-DS_31-a3.js +29 -0
  155. package/dist/vue-ui-stackline-CuxohB0U.js +39 -0
  156. package/dist/vue-ui-strip-plot-bYGhsPA5.js +2 -0
  157. package/dist/{vue-ui-table-heatmap-IYPQ7LMg.js → vue-ui-table-heatmap-D6gpmHg8.js} +1 -1
  158. package/dist/{vue-ui-table-BetuN-ZS.js → vue-ui-table-lzolsJ_n.js} +1 -1
  159. package/dist/{vue-ui-table-sparkline-Fdjb-U1P.js → vue-ui-table-sparkline-By319cB8.js} +1 -1
  160. package/dist/vue-ui-thermometer-B3Uv3aWc.js +1 -0
  161. package/dist/{vue-ui-timer-BKqG5HxS.js → vue-ui-timer-C6Pevf4N.js} +2 -2
  162. package/dist/vue-ui-tiremarks-DeNdCFVD.js +1 -0
  163. package/dist/vue-ui-treemap-Ck9_llHA.js +1 -0
  164. package/dist/vue-ui-waffle-BW2SacnV.js +1 -0
  165. package/dist/vue-ui-wheel-BXDhx5bf.js +1 -0
  166. package/dist/vue-ui-word-cloud-DKPtoruY.js +4 -0
  167. package/dist/vue-ui-world-D9vpDbN7.js +19 -0
  168. package/dist/vue-ui-xy-CMckdUft.js +27 -0
  169. package/dist/{vue-ui-xy-Y_rIBQj0.js → vue-ui-xy-Df5gIADT.js} +1 -1
  170. package/dist/vue-ui-xy-canvas-CBrKi3nN.js +9 -0
  171. package/package.json +1 -1
  172. package/dist/BaseDraggableDialog-9d30Yx8c.js +0 -1
  173. package/dist/BaseIcon-fYK0iID8.js +0 -1
  174. package/dist/ColorPicker-DEJOjcmD.js +0 -1
  175. package/dist/PenAndPaper-r50tK3S4.js +0 -1
  176. package/dist/SlicerPreview-DYuyE9u9.js +0 -1
  177. package/dist/UserOptions-Em_JgDXM.js +0 -1
  178. package/dist/annotationSlots-RvQBEO9-.js +0 -1
  179. package/dist/package-BdTnZDoM.js +0 -1
  180. package/dist/useConfig-D3ZfFSE5.js +0 -1
  181. package/dist/usePanZoom-BdjP5Suc.js +0 -1
  182. package/dist/vue-data-ui-DRkivgOZ.js +0 -1
  183. package/dist/vue-ui-3d-bar-BeM22sZn.js +0 -19
  184. package/dist/vue-ui-age-pyramid-BpkEVmpT.js +0 -1
  185. package/dist/vue-ui-bullet-Cx9Noxp_.js +0 -34
  186. package/dist/vue-ui-bump-DIjSKk8F.js +0 -8
  187. package/dist/vue-ui-candlestick-Cfd63wqQ.js +0 -22
  188. package/dist/vue-ui-chestnut-24bmc5Rq.js +0 -1
  189. package/dist/vue-ui-chord-fQZQ9hjU.js +0 -21
  190. package/dist/vue-ui-circle-pack-C1CbpBNe.js +0 -13
  191. package/dist/vue-ui-dag-B6QkUUCe.js +0 -9
  192. package/dist/vue-ui-dashboard-BBaAZBSj.js +0 -1
  193. package/dist/vue-ui-donut-H65cwWN-.js +0 -47
  194. package/dist/vue-ui-donut-evolution-DeHbG9Rx.js +0 -2
  195. package/dist/vue-ui-dumbbell-ClCVHsrR.js +0 -9
  196. package/dist/vue-ui-flow-DyrpRWOP.js +0 -3
  197. package/dist/vue-ui-funnel-bjH_hFeX.js +0 -1
  198. package/dist/vue-ui-galaxy-BTgZs4Le.js +0 -1
  199. package/dist/vue-ui-gauge-CXZklQPg.js +0 -1
  200. package/dist/vue-ui-geo-0_HimFX5.js +0 -1
  201. package/dist/vue-ui-graph-NTeJASbv.js +0 -7
  202. package/dist/vue-ui-heatmap-aiEMlbZm.js +0 -1
  203. package/dist/vue-ui-hill-ZpLv0IMP.js +0 -1
  204. package/dist/vue-ui-history-plot-4xG3oQtO.js +0 -2
  205. package/dist/vue-ui-horizontal-bar-DMyL8GM6.js +0 -4
  206. package/dist/vue-ui-molecule-4t84pqvx.js +0 -1
  207. package/dist/vue-ui-mood-radar-BGuw0U8y.js +0 -1
  208. package/dist/vue-ui-nested-donuts-BTTJ6KAx.js +0 -19
  209. package/dist/vue-ui-onion-BUbI3uaY.js +0 -5
  210. package/dist/vue-ui-parallel-coordinate-plot-Bn3Y28ZQ.js +0 -9
  211. package/dist/vue-ui-quadrant-CVKEUWqI.js +0 -2
  212. package/dist/vue-ui-quick-chart-BgH0Arb4.js +0 -17
  213. package/dist/vue-ui-radar-Bb0u6tqk.js +0 -1
  214. package/dist/vue-ui-relation-circle-Csx30ROI.js +0 -1
  215. package/dist/vue-ui-ridgeline-Ce1ZrE0B.js +0 -2
  216. package/dist/vue-ui-rings-DgILqhz8.js +0 -1
  217. package/dist/vue-ui-scatter-CX_rE0cU.js +0 -9
  218. package/dist/vue-ui-stackbar-Zhl3to0r.js +0 -29
  219. package/dist/vue-ui-stackline-8JRhuHTg.js +0 -39
  220. package/dist/vue-ui-strip-plot-DL7Ulgpz.js +0 -2
  221. package/dist/vue-ui-thermometer-6kfYImU-.js +0 -1
  222. package/dist/vue-ui-tiremarks-D_ps9th8.js +0 -1
  223. package/dist/vue-ui-treemap-BfOdhGl7.js +0 -1
  224. package/dist/vue-ui-waffle-BL0zzw6B.js +0 -1
  225. package/dist/vue-ui-wheel-v1o2eN3I.js +0 -1
  226. package/dist/vue-ui-word-cloud-HUnuPCyQ.js +0 -4
  227. package/dist/vue-ui-world-BagJihbJ.js +0 -19
  228. package/dist/vue-ui-xy-D948j7de.js +0 -24
  229. package/dist/vue-ui-xy-canvas-CjrbWdJJ.js +0 -9
@@ -1,24 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{$ as n,A as r,B as i,D as a,Dt as o,G as s,Gt as c,H as l,Ht as u,I as d,J as ee,Jt as f,K as te,L as ne,M as p,Mt as re,N as ie,Ot as ae,P as oe,R as se,Rt as ce,S as le,U as ue,V as de,W as fe,X as pe,Yt as me,_ as he,_t as ge,at as _e,b as m,c as ve,d as h,dt as g,et as ye,gt as be,i as _,in as xe,kt as Se,l as Ce,n as we,nn as Te,nt as Ee,o as De,q as Oe,qt as ke,r as Ae,rn as je,tn as Me,v as Ne,w as Pe,wt as Fe,zt as Ie}from"./lib-rPeBMZrn.js";import{n as Le,t as Re}from"./BaseScanner-8NdoBs7B.js";import{n as ze,t as Be}from"./useHints-C-TwxM0Y.js";import{t as Ve}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as He}from"./useNestedProp-DnGoh-XS.js";import{t as Ue}from"./useThemeCheck-BKNRbGeC.js";import{t as We}from"./img-D4RQwASc.js";import{n as Ge}from"./Title-BliHuXfT.js";import{t as Ke}from"./useChartExport-BZts4KFb.js";import{t as qe}from"./tableIntegration-CNoJ1CIY.js";import{n as Je,t as Ye}from"./annotationSlots-RvQBEO9-.js";import{n as Xe,t as Ze}from"./userOptionsSlots-DYuo-E5m.js";import{n as Qe,r as $e,t as et}from"./useTimeLabels-Das5O74F.js";import{t as tt}from"./usePrinter-DVf3YcG5.js";import{t as nt}from"./useTransitions-ChGGrtrv.js";import{t as rt}from"./useStableElementSize-CegFbRlF.js";import{t as it}from"./useSvgLabelLayout-42Kats14.js";import{t as at}from"./useTimeLabelCollider-BTybMUFi.js";import{t as ot}from"./vue_ui_xy-CJBM9F6W.js";import{t as st}from"./Shape-CRe8woTu.js";import{t as ct}from"./DefGrad-DKMq1REY.js";import{t as lt}from"./SlicerPreview-DYuyE9u9.js";import{t as ut}from"./vue-ui-accordion-D4FHxzsL.js";import{t as dt}from"./BaseLegendToggle-aT9fOoGO.js";import{t as ft}from"./A11yDataTable-DWNlWXzs.js";import{Fragment as v,Teleport as pt,computed as y,createBlock as mt,createCommentVNode as b,createElementBlock as x,createElementVNode as S,createSlots as ht,createTextVNode as gt,createVNode as _t,defineAsyncComponent as vt,getCurrentInstance as yt,guardReactiveProps as bt,mergeProps as xt,nextTick as St,normalizeClass as C,normalizeProps as Ct,normalizeStyle as w,onBeforeUnmount as wt,onMounted as Tt,openBlock as T,ref as E,renderList as D,renderSlot as O,resolveDynamicComponent as Et,shallowRef as k,toDisplayString as Dt,toRefs as Ot,unref as A,useSlots as kt,vModelCheckbox as At,watch as jt,watchEffect as Mt,withCtx as Nt,withDirectives as Pt}from"vue";function Ft(e){return![null,void 0,NaN,1/0,-1/0].includes(e)}function It(e,t){let n=Ut(e),r=Array(n).fill(0);for(let e=0;e<t.length&&e<n;e+=1)r[e]=t[e]??null;return r}function Lt(e,t){let n=Object.create(null);for(let r=0;r<e.length;r+=1){let i=e[r],a=String(t(i));n[a]||(n[a]=[]),n[a].push(i)}return n}function Rt(e){return e&&typeof e==`object`&&Number.isFinite(Number(e.x))&&Number.isFinite(Number(e.y))}function zt(e,t){let n=Number(e),r=Number(t);return!Number.isFinite(n)||!Number.isFinite(r)?!1:!Object.is(n,r)}function Bt(e){let t=/* @__PURE__ */ new WeakMap;return(n,...r)=>{let i=t.get(n),a=JSON.stringify(r);if(i&&i.has(a))return i.get(a);let o=e(n,...r);return i||(i=/* @__PURE__ */ new Map,t.set(n,i)),i.set(a,o),o}}function Vt(e,t){let n=Number.isFinite(e)?e:0,r=Number.isFinite(t)?t:1;return n===r?r=n+1:n>r&&([n,r]=[r,n]),{min:n,max:r}}function Ht(e,t,n=0){return Number.isFinite(e)&&Number.isFinite(t)&&Math.abs(t)>1e-9?e/t:n}function Ut(e){return Number.isFinite(e)?Math.max(0,Math.floor(e)):0}var Wt=/* @__PURE__ */ e({default:()=>j}),Gt=[`id`],Kt=[`id`],qt=[`id`],Jt={style:{position:`relative`}},Yt=[`viewBox`,`aria-label`,`aria-describedby`],Xt=[`id`],Zt=[`x`,`y`,`width`,`height`],Qt=[`x`,`y`,`width`,`height`],$t={key:1},en={class:`vue-ui-xy-grid`},tn=[`stroke`,`x1`,`x2`,`y1`,`y2`],nn=[`stroke`,`x1`,`x2`,`y1`,`y2`],rn={key:1},an=[`x1`,`x2`,`y1`,`y2`,`stroke`],on=[`x1`,`x2`,`y1`,`y2`,`stroke`],sn=[`x1`,`x2`,`y1`,`y2`,`stroke`],cn={key:3},ln=[`d`,`stroke`],un={key:4},dn=[`d`,`stroke`],fn={key:0},pn=[`id`],mn=[`stop-color`,`offset`],hn=[`x`,`y`,`height`,`width`,`fill`],gn=[`x`,`y`,`width`],_n={key:0},vn=[`x`,`y`,`height`,`width`,`fill`],yn=[`clip-path`],bn=[`x`,`y`,`height`,`width`,`rx`,`fill`,`stroke`,`stroke-width`],xn=[`x`,`y`,`height`,`width`,`rx`,`fill`,`stroke`,`stroke-width`],Sn=[`width`,`x`,`y`],Cn=[`stroke`,`x1`,`x2`,`y1`,`y2`],wn={key:2},Tn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],En={key:3,class:`vue-ui-xy-crosshair-selection`},Dn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],On=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],kn=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],An=[`x`,`y`,`width`,`height`,`stroke`,`stroke-width`,`stroke-linecap`,`stroke-linejoin`,`stroke-dasharray`],jn=[`opacity`],Mn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Nn=[`fill`,`font-size`,`transform`],Pn=[`x1`,`x2`,`y1`,`y2`,`stroke`],Fn=[`transform`,`text-anchor`,`font-size`,`fill`],In=[`x1`,`x2`,`y1`,`y2`,`stroke`],Ln=[`transform`,`font-size`,`text-anchor`,`fill`],Rn={key:6,class:`vue-ui-xy-crosshair-selection`},zn=[`transform`,`font-size`,`text-anchor`,`fill`],Bn={key:7,class:`vue-ui-xy-crosshair-selection`},Vn=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Hn=[`clip-path`],Un=[`width`,`x`,`y`],Wn={style:{width:`100%`}},Gn=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],Kn=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],qn=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],Jn=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],Yn=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],Xn={key:0},Zn={key:1},Qn=[`d`,`fill`,`fill-opacity`],$n={key:0},er=[`d`,`fill`],tr=[`d`,`fill`],nr=[`d`,`fill`],rr=[`d`,`fill`],ir=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],ar=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],or=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],sr=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],cr=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],lr={class:`vue-ui-xy-line-markers`},ur=[`width`,`x`,`y`],dr={style:{width:`100%`}},fr={key:8},pr=[`text-anchor`,`font-size`,`transform`,`fill`,`stroke`,`innerHTML`],mr=[`transform`,`font-size`,`fill`,`font-weight`],hr={key:9},gr=[`transform`,`text-anchor`,`font-size`,`fill`,`stroke`,`innerHTML`],_r={key:10},vr=[`x`,`y`],yr=[`innerHTML`],br=[`x`,`y`],xr=[`innerHTML`],Sr=[`x1`,`x2`,`y1`,`y2`,`stroke`],Cr={key:11},wr=[`transform`,`text-anchor`,`font-size`,`fill`,`stroke`,`innerHTML`],Tr={key:12},Er=[`x`,`y`],Dr=[`innerHTML`],Or=[`x`,`y`],kr=[`innerHTML`],Ar=[`x1`,`x2`,`y1`,`y2`,`stroke`],jr=[`x`,`y`,`font-size`,`fill`,`innerHTML`],Mr=[`x`,`y`,`font-size`,`fill`,`innerHTML`],Nr=[`x`,`y`,`font-size`,`fill`,`innerHTML`],Pr=[`x`,`y`,`font-size`,`fill`,`innerHTML`],Fr={key:0},Ir=[`id`],Lr=[`fill`,`stroke`],Rr=[`x1`,`x2`,`y1`,`y2`,`stroke`,`marker-end`],zr=[`x1`,`x2`,`y1`,`y2`,`stroke`,`marker-end`],Br=[`transform`,`font-size`,`fill`,`stroke`],Vr=[`x`,`y`,`width`,`height`,`fill`,`onMouseenter`],Hr=[`font-size`,`fill`,`transform`],Ur=[`x`,`y`,`font-size`,`fill`],Wr=[`opacity`],Gr=[`text-anchor`,`font-size`,`fill`,`stroke`,`transform`,`onClick`],Kr=[`text-anchor`,`font-size`,`fill`,`transform`,`innerHTML`,`onClick`],qr={key:15},Jr=[`text-anchor`,`font-size`,`fill`,`transform`,`innerHTML`],Yr={key:16},Xr=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Zr=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Qr=[`y`,`x`,`width`,`height`,`fill`],$r=[`id`,`transform`,`font-size`,`fill`,`text-anchor`],ei={key:17,style:{"pointer-events":`none`}},ti=[`x`,`y`],ni=[`innerHTML`],ri=[`cx`,`cy`,`r`,`fill`],ii=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],ai=[`data-start`,`data-end`],oi={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},si={key:5,class:`vue-data-ui-watermark`},ci={class:`vue-ui-xy-tag-arrow`,height:`20`,viewBox:`0 0 10 20`,style:{position:`absolute`,right:`100%`,top:`50%`,transform:`translateY(-50%)`}},li=[`fill`],ui=[`innerHTML`],di={class:`vue-ui-xy-tag-arrow`,height:`100%`,viewBox:`0 0 10 20`,style:{position:`absolute`,left:`100%`,top:`50%`,transform:`translateY(-50%)`}},fi=[`fill`],pi=[`innerHTML`],mi={class:`vue-ui-xy-tag-arrow`,height:`20`,viewBox:`0 0 10 20`,style:{position:`absolute`,right:`100%`,top:`50%`,transform:`translateY(-50%)`}},hi=[`fill`],gi=[`innerHTML`],_i={class:`vue-ui-xy-tag-arrow`,height:`100%`,viewBox:`0 0 10 20`,style:{position:`absolute`,left:`100%`,top:`50%`,transform:`translateY(-50%)`}},vi=[`fill`],yi=[`innerHTML`],bi=[`id`],xi=[`onClick`,`onKeydown`],Si={key:0,viewBox:`0 0 20 12`,height:`1em`,width:`1.43em`,"aria-hidden":`true`},Ci=[`stroke`,`fill`],wi={key:1,viewBox:`0 0 40 40`,height:`1em`,width:`1em`,"aria-hidden":`true`},Ti=[`fill`],Ei=[`fill`],Di={key:2,viewBox:`0 0 12 12`,height:`1em`,width:`1em`,"aria-hidden":`true`},Oi={style:{display:`flex`,"flex-direction":`row`,gap:`6px`,"align-items":`center`,"padding-left":`6px`},"data-dom-to-png-ignore":``},ki={key:0},Ai={key:1},ji=280,j=/*#__PURE__*/ Ve({__name:`vue-ui-xy`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},selectedXIndex:{type:Number,default:void 0},zoomState:{type:Object,default:null}},emits:[`selectTimeLabel`,`selectX`,`selectLegend`,`zoomStart`,`zoomEnd`,`zoomReset`,`update:zoomState`,`copyAlt`],setup(e,{expose:Ve,emit:Wt}){let j=e,Mi=vt(()=>import(`./DataTable-5Ug6gMAX.js`)),Ni=vt(()=>import(`./Tooltip-C1q0Qoh7.js`)),Pi=vt(()=>import(`./UserOptions-Em_JgDXM.js`).then(e=>e.n)),Fi=vt(()=>import(`./BaseIcon-fYK0iID8.js`).then(e=>e.n)),Ii=vt(()=>import(`./vue-ui-table-sparkline-Fdjb-U1P.js`).then(e=>e.n)),Li=vt(()=>import(`./PackageVersion-u-p5bCcj.js`).then(e=>e.t)),Ri=vt(()=>import(`./PenAndPaper-r50tK3S4.js`).then(e=>e.t)),zi=vt(()=>import(`./BaseDraggableDialog-9d30Yx8c.js`).then(e=>e.n)),Bi=Wt,Vi=kt(),Hi=yt(),{vue_ui_xy:Ui}=t(),{isThemeValid:Wi,warnInvalidTheme:Gi}=Ue(),Ki=k(null),qi=k(null),Ji=k(null),Yi=k(null),Xi=k(null),Zi=k(null),Qi=k(null),$i=k(null),ea=k(null),ta=k(null),na=k(null),ra=k(null),ia=k(null),aa=k(null),oa=E(0),M=E(null),sa=E(!0),ca=E(600),N=E(1e3),la=E(`0 0 1000 600`),ua=k({x:0,y:0}),da=k({line:`line`,bar:`bar`,plot:`plot`}),fa=E(!1),pa=E(!1),ma=E(!1),ha=E(null),ga=E([]),_a=y(()=>new Set(ga.value)),P=E(pe()),va=E(0),ya=E(0),ba=E(0),xa=E(!0),Sa=E(0),F=E(null),Ca=E(!1),wa=E(!0),Ta=E(!0),I=k(null),Ea=E({}),Da=k(null),Oa=E(!1),ka=k(null),Aa=E(null),L=E(null),ja=E(null),Ma=k({x:0,y:0}),Na=k(null),Pa=k(null),Fa=k(null),Ia=k(null),La=E(null),Ra=E(null),za=k(null),Ba=E(!1),Va=E(0),Ha=E(0),Ua=rt({elementRef:za,minimumWidth:2,minimumHeight:2,stableFramesRequired:2,once:!1,onSizeAccepted:()=>{Ka()}});function Wa(){za.value=Ki.value?.parentNode??null}function Ga(){return new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(e)})})}async function Ka(){let e=++Ha.value;Ba.value=!1,await St(),await Ga(),await Ga(),e===Ha.value&&(Va.value+=1,Ba.value=!0)}let qa=E(!1);function Ja(){qa.value||(qa.value=!0,St(()=>{qa.value=!1,Wa(),Ka()}))}let Ya=y(()=>({height:ca.value,width:N.value})),Xa=E(!1),Za=E(null),Qa=E(null),R=E({xAxis:18,yAxis:12,dataLabels:20,plotLabels:10}),$a=E({plot:3,line:3,selectedLine:3}),eo=E(1);function to(){let e=I.value;if(!e)return null;let t=e.getScreenCTM?.();if(t){let e=Math.hypot(Number(t.a),Number(t.b)),n=Math.hypot(Number(t.c),Number(t.d));if(Number.isFinite(e)&&e>0&&Number.isFinite(n)&&n>0)return(e+n)/2}let n=e.getBoundingClientRect?.(),r=e.viewBox?.baseVal;if(n&&r&&Number(n.width)>0&&Number(n.height)>0&&Number(r.width)>0&&Number(r.height)>0){let e=Math.min(Number(n.width)/Number(r.width),Number(n.height)/Number(r.height));if(Number.isFinite(e)&&e>0)return e}return null}function no(){let e=to();!Number.isFinite(e)||e<=0||(eo.value=e)}function z(e){let t=Number(e);return Number.isFinite(t)?t*eo.value:e}let ro=y(()=>Math.max($a.value.line*1.5,$a.value.selectedLine));Tt(()=>{no(),typeof ResizeObserver<`u`&&I.value&&(Pa.value=new ResizeObserver(()=>{no()}),Pa.value.observe(I.value)),Oa.value=!0,j.dataset.length&&uo.value&&j.dataset.forEach((e,t)=>{[null,void 0].includes(e.series)&&_e({componentName:`VueUiXy`,type:`datasetSerieAttribute`,property:`series (number[])`,index:t})}),Wa(),Ua.start(),Ka()}),jt([N,ca,pa],async()=>{await St(),no()},{flush:`post`}),wt(()=>{Pa.value&&=(Pa.value.disconnect(),null)});function io(){if(!Object.keys(j.config||{}).length)return Ui;let e=He({userConfig:j.config,defaultConfig:Ui});j.config&&Fe(j.config,`chart.highlightArea`)&&(Array.isArray(j.config.chart.highlightArea)?e.chart.highlightArea=j.config.chart.highlightArea:e.chart.highlightArea=[j.config.chart.highlightArea]),j.config&&Fe(j.config,`chart.annotations`)&&Array.isArray(j.config.chart.annotations)&&j.config.chart.annotations.length?e.chart.annotations=j.config.chart.annotations.map(e=>He({defaultConfig:Ui.chart.annotations[0],userConfig:e})):e.chart.annotations=[],j.config&&Fe(j.config,`chart.grid.position`)&&j.config.chart.grid.position===`start`&&j.dataset.length&&j.dataset.some(e=>e.type===`bar`)&&(e.chart.grid.position=`middle`,Fe(j.config,`debug`)&&console.warn("Vue Data UI - VueUiXy - config.chart.grid.position was overriden to `middle` because your dataset contains a bar")),j.config&&Fe(j.config,`chart.highlightArea`)&&(Array.isArray(j.config.chart.highlightArea)?e.chart.highlightArea=j.config.chart.highlightArea.map(e=>ao({defaultConfig:Ui.chart.highlightArea,userConfig:e})):e.chart.highlightArea=ao({defaultConfig:Ui.chart.highlightArea,userConfig:j.config.chart.highlightArea})),j.config&&Fe(j.config,`chart.grid.labels.xAxisLabels.showFirstAndLast`)&&(e.chart.grid.labels.xAxisLabels.showFirstAndLast=!!j.config.chart.grid.labels.xAxisLabels.showFirstAndLast);let t=e.theme;if(!t)return e;if(!Wi.value(e))return Gi(e),e;let n=He({userConfig:ot[t]||j.config,defaultConfig:e}),r=He({userConfig:j.config,defaultConfig:n});return{...r,customPalette:r.customPalette.length?r.customPalette:Te[t]||u}}function ao({defaultConfig:e,userConfig:t}){return He({defaultConfig:e,userConfig:t})}let oo=y({get(){return!!j.dataset&&j.dataset.length},set(e){return e}}),B=E(io()),V=y(()=>B.value.chart),H=y(()=>B.value.chart.grid),U=y(()=>B.value.chart.grid.labels);ze({config:()=>B.value,dataset:()=>j.dataset,component:`VueUiXy`,rules:[Be.emptyArray,{test:e=>e.some(e=>e.series.length>365),message:[`👀 One or more series have more than 365 datapoints. Consider if you really need this level of detail.`,``,`▶️ Use larger time scales, or aggregated values`,``,`▶️ Filter the time range by adding date inputs in your UI.`]},{test:e=>e.some(e=>e.series.length>1095),message:[`👀 One or more series have more than 1095 datapoints. Above this threshold, the dataset is computed through an LTTB algorithm, to preserve the shape of the data without increasing the number of datapoints.`,``,`▶️ If you need this level of detail, you can change config.downsample.threshold and set a higher value. Note that performance will be impacted.`]},{test:e=>e.length>6,message:[`👀 The number of series is greater than 6. If your chart is hard to read, you might consider other ways of charting the data:`,``,`▶️ A summary table with sparklines (custom, with VueUiSparkline), or VueUiTableSparkline.`,``,`▶️ Individual charts for individual series, or fewer series with comparable scopes.`,``,`▶️ Add filters to reduce the number of visible series on the chart, to reduce cognitive load.`]}]});let{transitionEnabled:so}=nt({config:()=>B.value.transitions,dataset:()=>j.dataset}),co=y(()=>V.value.userOptions.useCursorPointer),W=E({dataLabels:{show:!0},showTooltip:!0,showTable:!1,isStacked:!1,useIndividualScale:!1});function lo(){let e=U.value.yAxis.stacked,t=U.value.yAxis.useIndividualScale;Xa.value?(W.value.showTooltip=V.value.tooltip.show===!0,e!==Za.value&&(W.value.isStacked=e,Za.value=e),t!==Qa.value&&(W.value.useIndividualScale=t,Qa.value=t),W.value.isStacked&&(W.value.useIndividualScale=!0)):(W.value={dataLabels:{show:!0},showTooltip:V.value.tooltip.show===!0,showTable:B.value.showTable===!0,isStacked:e,useIndividualScale:t},Za.value=e,Qa.value=t,Xa.value=!0)}let uo=y(()=>B.value.debug),fo=y(()=>xe({defaultConfig:{useCssAnimation:!1,showTable:!1,chart:{annotations:[],highlightArea:[],backgroundColor:`#99999930`,grid:{stroke:`#6A6A6A`,labels:{show:!1,axis:{yLabel:``,xLabel:``},xAxisLabels:{show:!1},yAxis:{commonScaleSteps:10,useNiceScale:!0,scaleMin:0,scaleMax:134},zeroLine:{show:!0}}},padding:{top:12,bottom:24,left:24,right:24},userOptions:{show:!1},zoom:{show:!1,startIndex:null,endIndex:null}},bar:{serieName:{show:!1},labels:{show:!1},border:{useSerieColor:!1,stroke:`#999999`}},line:{dot:{useSerieColor:!1,fill:`#8A8A8A`},labels:{show:!1}}},userConfig:B.value.skeletonConfig??{}})),po=y(()=>j.config?.skeletonDataset??[{name:``,series:[0,1,2,3,5,8,13,21,34,55,89,134],type:`line`,smooth:!0,color:`#BABABA`},{name:``,series:[0,.5,1,1.5,2.5,4,6.5,10.5,17,27.5,44.5,67],type:`bar`,color:`#CACACA`}]),{loading:mo,FINAL_DATASET:ho,manualLoading:go}=Le({...Ot(j),FINAL_CONFIG:B,prepareConfig:io,callback:()=>{Promise.resolve().then(async()=>{(!V.value.zoom.keepState||!gc.value||G.value.start===0&&G.value.end===0)&&await yc(),W.value.showTable=B.value.showTable})},skeletonDataset:po.value,skeletonConfig:xe({defaultConfig:B.value,userConfig:fo.value})}),_o=Bt((e,t)=>re({data:e,threshold:t})),vo=e=>_o(e,B.value.downsample.threshold),yo=y(()=>{let e=B.value.downsample.threshold;return ho.value.map(t=>_o(t.series,e).length)}),bo=y(()=>{let e=-1/0;for(let t=0;t<yo.value.length;t+=1){let n=yo.value[t];n>e&&(e=n)}return e}),xo=y(()=>{let e=0;for(let t=0;t<yo.value.length;t+=1){let n=yo.value[t];n>e&&(e=n)}return e}),So=y(()=>bo.value),G=E({start:0,end:So.value}),Co=E({start:0,end:So.value}),wo=E(!1),To=E(!1),Eo=E(!1),Do=E(`matrix(1, 0, 0, 1, 0, 0)`),Oo=E(!1),ko=0,Ao=0,jo=0,Mo=0,No=E(null),Po=E(null),Fo=E(null),Io=E(!1),Lo=k({time:0,x:0,y:0,pointerType:null}),Ro=y(()=>V.value.zoom.dragToZoom),zo=y(()=>Ro.value.show&&oo.value&&gc.value&&!mo.value),Bo=y(()=>V.value.zoom.preview.enable&&(Co.value.start!==G.value.start||Co.value.end!==G.value.end));function Vo(e,t){Co.value[e]=t}function Ho(e,t){Ji.value&&(q.value&&Q.value?Ji.value.setRangeValues(-Number(t),-Number(e)):Ji.value.setRangeValues(e,t))}function Uo(e,t){if(!q.value||!Q.value){Vo(e,t);return}let n=Number(t);Number.isFinite(n)&&Vo(e===`start`?`end`:`start`,-n)}function Wo(e,t=G.value){if(!e||typeof e!=`object`)return null;let n=e.start!==void 0&&e.start!==null,r=e.end!==void 0&&e.end!==null;if(!n&&!r)return null;let i=Number(n?e.start:t.start),a=Number(r?e.end:t.end);return!Number.isFinite(i)||!Number.isFinite(a)?null:{start:i,end:a}}function Go(e){let t=Wo(e);t&&Bi(`update:zoomState`,t)}function Ko(e=G.value){return{start:Number(e.start),end:Number(e.end)}}function qo(e,t){let n=Number(Y.value?.left)||0,r=Math.max(0,Number(Y.value?.width)||0),i=Number(t?.start),a=Number(t?.end)-i;if(!Number.isFinite(e)||!Number.isFinite(a)||a<=0)return n;if(q.value){let t=(e-i)/a;return t=Q.value?1-t:t,n+r*t}let o=Math.max(1,a),s=e-i;if(H.value.position===`middle`){let e=r/o;return n+e/2+s*e}return o<=1?n:n+r/(o-1)*s}function Jo(){if(W.value.useIndividualScale)return null;let e=Number(K.value?.min),t=Number(K.value?.max),n=Number(Y.value?.bottom)||0,r=Math.max(0,Number(Y.value?.height)||0);return!Number.isFinite(e)||!Number.isFinite(t)||t===e||r<=0?null:{min:e,max:t,bottom:n,height:r,reversed:Fc.value}}function Yo(e,t){if(!t)return Number(Y.value?.bottom)||0;let n=t.max-t.min;if(!Number.isFinite(e)||!Number.isFinite(n)||n===0)return t.bottom;let r=(e-t.min)/n;return t.reversed&&(r=1-r),t.bottom-t.height*r}let Xo=y(()=>{if(!V.value.userOptions.annotator?.followZoom)return null;let e=Y.value,t=Ko(),n=t.end-t.start,r=q.value,i=H.value.position===`middle`,a=r||i?n:Math.max(1,n-1);if(!(a>0)||!(e.width>0)||!(e.height>0))return null;let o=e.width/a*(r&&Q.value?-1:1),s=qo(t.start,t)-t.start*o,c=Jo(),l=c?(c.reversed?1:-1)*c.height/(c.max-c.min):-e.height,u=c?Yo(0,c):e.bottom,d=Do.value.match(/matrix\(([^)]+)\)/)?.[1].split(`,`).map(Number);return{motion:d&&d.every(Number.isFinite)?{scaleX:fa.value?1:d[0],scaleY:fa.value?1:d[3],translateX:fa.value?0:d[4],translateY:fa.value?0:d[5],transition:!fa.value&&Oo.value?`transform ${ji}ms cubic-bezier(0.4, 0, 0.2, 1)`:`none`}:null,x:{origin:s,unit:o},y:{origin:u,unit:l},clip:{x:e.left,y:e.top,width:e.width,height:e.height}}});function Zo({previousRange:e,targetRange:t,previousYScale:n,targetYScale:r}){let i=Number(t.end)-Number(t.start),a=Number(t.start),o=q.value?Number(t.end):Number(t.end)-1,s=1,c=0;if(Number.isFinite(a)&&Number.isFinite(o)&&(q.value||i>1)){let n=qo(a,t),r=qo(o,t),i=qo(a,e),l=qo(o,e),u=r-n;Number.isFinite(u)&&Math.abs(u)>1e-9&&(s=(l-i)/u,c=i-s*n)}let l=1,u=0;if(n&&r){let e=r.min,t=r.max,i=Yo(e,r),a=Yo(t,r),o=Yo(e,n),s=Yo(t,n),c=a-i;Number.isFinite(c)&&Math.abs(c)>1e-9&&(l=(s-o)/c,u=o-l*i)}return[s,c,l,u].every(Number.isFinite)?`matrix(${s}, 0, 0, ${l}, ${c}, ${u})`:`matrix(1, 0, 0, 1, 0, 0)`}function Qo({resetTransform:e=!0}={}){Mo+=1,ko&&=(cancelAnimationFrame(ko),0),Ao&&=(cancelAnimationFrame(Ao),0),jo&&=(clearTimeout(jo),0),Oo.value=!1,Eo.value=!1,e&&(Do.value=`matrix(1, 0, 0, 1, 0, 0)`)}function $o(e,t){return!I.value||mo.value||!oo.value||!e||!t||typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches?!1:Number.isFinite(e.start)&&Number.isFinite(e.end)&&Number.isFinite(t.start)&&Number.isFinite(t.end)&&e.end>e.start&&t.end>t.start}function es(e,t){let n=Ko();if(!$o(e,n))return Qo(),!1;let r=Zo({previousRange:e,targetRange:n,previousYScale:t,targetYScale:Jo()});if(r===`matrix(1, 0, 0, 1, 0, 0)`)return Qo(),!1;Qo();let i=++Mo;return xc.value=!0,Eo.value=!0,Oo.value=!1,Do.value=r,ko=requestAnimationFrame(()=>{ko=0,Ao=requestAnimationFrame(()=>{Ao=0,i===Mo&&(Oo.value=!0,Do.value=`matrix(1, 0, 0, 1, 0, 0)`,jo=setTimeout(()=>{jo=0,i===Mo&&(Oo.value=!1,Eo.value=!1,xc.value=!1)},ji))})}),!0}let ts=y(()=>({transform:Do.value,transformOrigin:`0 0`,transformBox:`view-box`,transition:Oo.value?`transform ${ji}ms cubic-bezier(0.4, 0, 0.2, 1)`:`none`,willChange:Eo.value?`transform`:void 0}));function ns(e){if(!Eo.value||!e)return;let t=Do.value.match(/matrix\(\s*([^,]+),\s*([^,]+),\s*([^,]+),\s*([^,]+),\s*([^,]+),\s*([^\)]+)\s*\)/);if(!t)return;let n=Number(t[1]),r=Number(t[4]),i=Number(t[5]),a=Number(t[6]),o=Number(e.x),s=Number(e.y);if([n,r,i,a,o,s].every(Number.isFinite))return{transform:`matrix(1, 0, 0, 1, ${n*o+i-o}, ${r*s+a-s})`,transformOrigin:`0 0`,transformBox:`view-box`,transition:Oo.value?`transform ${ji}ms cubic-bezier(0.4, 0, 0.2, 1)`:`none`,willChange:`transform`}}let rs=y(()=>Eo.value?`url(#vue_ui_xy_zoom_clip_${P.value})`:void 0);function is(e,{transition:t=!1}={}){let n=Wo(e);if(!n)return null;let{start:r,end:i}=n;if(r!==Number(G.value.start)||i!==Number(G.value.end)){let e=t?Ko():null,n=t?Jo():null;Ec(),wc={},G.value={start:r,end:i},Co.value={start:r,end:i},os(),t&&es(e,n)}return{start:Number(G.value.start),end:Number(G.value.end)}}function as(e,{transition:t=!0}={}){let n=is(e,{transition:t});return n?(Bi(`update:zoomState`,n),n):null}function os(){if(q.value){let e=Bu.value.min,t=Bu.value.max,n=Number(G.value.start),r=Number(G.value.end);Number.isFinite(n)||(n=e),Number.isFinite(r)||(r=t),n=Math.max(e,Math.min(n,t)),r=Math.max(n,Math.min(r,t)),r<=n&&(n=e,r=t),G.value={start:n,end:r},Co.value.start=n,Co.value.end=r,Ho(n,r);return}let e=Math.max(1,...ho.value.map(e=>vo(e.series).length)),t=Math.max(0,Math.min(G.value.start??0,e-1)),n=Math.max(t+1,Math.min(G.value.end??e,e));(!Number.isFinite(t)||!Number.isFinite(n)||n<=t)&&(t=0,n=e),G.value={start:t,end:n},Co.value.start=t,Co.value.end=n,Ho(t,n)}let ss=y(()=>{let{left:e,top:t,width:n,height:r}=Y.value,i=G.value.start,a=G.value.end,o=a-i,s=n/o,c=q.value&&Q.value,l=c?a-Co.value.end:Co.value.start-i,u=c?a-Co.value.start:Co.value.end-i,d=Math.max(0,Math.min(o,l)),ee=Math.max(0,Math.min(o,u));return{x:e+d*s,y:t,width:(ee-d)*s,height:r,fill:V.value.zoom.preview.fill,stroke:V.value.zoom.preview.stroke,"stroke-width":V.value.zoom.preview.strokeWidth,"stroke-dasharray":V.value.zoom.preview.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:{pointerEvents:`none`,transition:`none !important`,animation:`none !important`}}});jt(()=>j.selectedXIndex,e=>{if([null,void 0].includes(j.selectedXIndex)){L.value=null;return}let t=e-G.value.start;t<0||e>=G.value.end?L.value=null:L.value=t??null},{immediate:!0});let{isPrinting:cs,isImaging:ls,generatePdf:us,generateImage:ds}=tt({elementId:`vue-ui-xy_${P.value}`,fileName:V.value.title.text||`vue-ui-xy`,options:V.value.userOptions.print}),fs=E(!1),ps=y(()=>Pe(B.value.customPalette)),ms=y(()=>{let e=U.value.yAxis.scaleMin;if(e==null)return null;let t=Number(e);return Number.isFinite(t)?t:null}),hs=y(()=>{let e=K.value.min,t=K.value.max;return Rc({value:e<=0&&t>=0?0:e>0?e:t,scaleMin:e,scaleMax:t,individualHeight:Y.value.height})}),gs=y(()=>{let e=U.value.yAxis.scaleMax;if(e==null)return null;let t=Number(e);return Number.isFinite(t)?t:null}),_s=y(()=>ms.value!==null||gs.value!==null),vs=y(()=>ku(Ds.value.filter(e=>!_a.value.has(e.id)),0,1)),ys=y(()=>{let{min:e,max:t}=vs.value;if(!_s.value){let t=e;return t>0?0:t}let n=ms.value===null?e>0?0:e:ms.value,r=gs.value===null?t:gs.value;return Vt(e<n?e:n,t>r?t:r).min}),bs=y(()=>{let{min:e,max:t}=vs.value;if(!_s.value){let e=t;return ys.value===e?e+1:e}let n=ms.value===null?e>0?0:e:ms.value,r=gs.value===null?t:gs.value;return Vt(e<n?e:n,t>r?t:r).max}),K=y(()=>U.value.yAxis.useNiceScale?he(ys.value,bs.value<0?0:bs.value,U.value.yAxis.commonScaleSteps):Ne(ys.value,bs.value<0?0:bs.value,U.value.yAxis.commonScaleSteps)),xs=y(()=>[null,void 0].includes(U.value.yAxis.scaleMin)?K.value.min>=0?0:Math.abs(K.value.min):-K.value.min),q=y(()=>ho.value.some(e=>Array.isArray(e.series)&&e.series.some(Rt)));Mt(()=>{q.value&&ho.value.some(e=>!ws(e))&&console.warn(`Vue Data UI - VueUiXy: mixed continuous and non-continuous series are not supported in the same chart.
2
-
3
- Continuous mode requires all visible 'line' and 'plot' series to use coordinate-based datasets:
4
- [{ x: number, y: number }]
5
-
6
- Series of type 'bar' and standard numeric series are ignored in continuous mode to prevent runtime errors.
7
-
8
- If you need to mix 'bar', 'line', and 'plot' series in the same chart, all series must use the standard [number, number, number...] format.`)});function Ss(e){return e&&typeof e==`object`&&e.x===null&&e.y===null}function Cs(e){return Array.isArray(e)&&e.some(e=>Rt(e)||Ss(e))}function ws(e){return!q.value||[`line`,`plot`].includes(e.type)&&Cs(e.series)}function Ts(e,t){return Ss(e)?{x:null,y:null,index:t,raw:e,isNull:!0}:!e||typeof e!=`object`?{x:null,y:null,index:t,raw:e,isNull:!0,isInvalid:!0}:{x:Number(e.x),y:ae(e.y)?Number(e.y):null,index:t,raw:e,isNull:!1,isInvalid:!1}}function Es(e){return q.value?e&&typeof e==`object`?e.y:null:e}let Ds=y(()=>!sa.value&&!q.value?ho.value:ho.value.map((e,t)=>{let n=`uniqueId_${t}`,r=ws(e),i=q.value?r?e.series:[]:vo(e.series),a=q.value?[]:ce(e.series,i);return{...e,slotAbsoluteIndex:t,sourceIndices:q.value?void 0:a.slice(G.value.start,G.value.end),series:q.value?i.map((e,t)=>Ts(e,t)).filter(e=>e.isInvalid?!1:e.x===null&&e.y===null?G.value.start<=0&&G.value.end>=0:e.x>=G.value.start&&e.x<=G.value.end):i.map(e=>ae(e)?e:null).slice(G.value.start,G.value.end),color:le(e.color?e.color:ps.value[t]?ps.value[t]:u[t]),id:n,scaleLabel:e.scaleLabel||n}})),Os=y(()=>Ds.value.map((e,t)=>({absoluteIndex:t,...e,series:q.value?e.series.map(e=>({...e,y:e.y===null?null:e.y+xs.value})):e.series.map(e=>e+xs.value),absoluteValues:q.value?e.series.map(e=>e.y):e.series,segregate:()=>Al(e),isSegregated:_a.value.has(e.id)}))),ks=y(()=>Ds.value.map(e=>({...e,series:q.value?e.series.map(e=>({...e,y:e.y===null?null:e.y+xs.value})):e.series.map(e=>e+xs.value),absoluteValues:q.value?e.series.map(e=>e.y):e.series})).filter(e=>!_a.value.has(e.id))),As=y(()=>ga.value.length===Os.value.length),J=y(()=>U.value.yAxis.position===`right`);function js(){let e=Ps.value.scaleLabelsWidth,t=ea.value?Ps.value.yAxisLabelWidth+U.value.axis.yLabelOffsetX+R.value.yAxis:0,n=e+U.value.yAxis.scaleValueOffsetX+U.value.yAxis.crosshairSize;return{left:J.value?0:n+t,right:J.value?n+t:0,scaleLabelsOffset:n,yAxisLabelWidth:t}}function Ms(e){let t=tl(e);if(!t){Qc.value=[],$c.value=null,Aa.value=null;return}let n=Number(t.point.x),r=el.value.matchingPointsByXValue.get(n)||[];Qc.value=r.map(e=>({...e,distance:0})),$c.value=zu({x:n}),Aa.value=n}function Ns(e){if(!Number.isFinite(Number(e))){Qc.value=[],$c.value=null;return}let t=zu({x:Number(e)});Ms(t),$c.value=t}let{metrics:Ps,ready:Fs,settling:Is,update:Ls}=it({svgRef:I,canMeasure:()=>(!B.value.responsive||Ba.value)&&(!U.value.xAxisLabels.show||$s.value),initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,bottom:0,leftOverhang:0},measure:e=>U.value.xAxisLabels.autoRotate.enable&&Id()?null:{scaleLabelsWidth:e(na.value).textWidth,yAxisLabelWidth:e(ea.value).rotatedWidth,xAxisLabelHeight:e($i.value).height,bottom:e(ta.value).height,leftOverhang:e(ta.value).leftOverhang}});async function Rs(){await St(),Ls()}let zs=y(()=>Ps.value.xAxisLabelHeight+Ps.value.bottom+R.value.xAxis),Bs=y(()=>ho.value.some(e=>e.useProgression));function Vs(){return U.value.yAxis.crosshairSize+U.value.yAxis.scaleValueOffsetX+5+U.value.yAxis.labelWidth+U.value.axis.yLabelOffsetX+R.value.dataLabels*.8}let Y=y(()=>{let e=0,t=0,n=0,r=0;if(U.value.show){if(W.value.useIndividualScale&&!W.value.isStacked)J.value?t=(ho.value.length-ga.value.length)*Vs():e=(ho.value.length-ga.value.length)*(U.value.yAxis.labelWidth+36);else if(W.value.useIndividualScale&&W.value.isStacked){let n=U.value.yAxis.labelWidth+36;J.value?t=n:e=n}else{let i=js();e=i.left,t=i.right,n=i.scaleLabelsOffset,r=i.yAxisLabelWidth}}let i=V.value.labels.fontSize*1.1,a=Bs.value?24:6;e=Math.max(e,Ps.value.leftOverhang-V.value.padding.left-(J.value?0:U.value.yAxis.crosshairSize));let o=N.value-e-t-a-V.value.padding?.left-V.value.padding?.right;return{top:V.value.padding?.top+i,right:e+(J.value?0:U.value.yAxis.crosshairSize)+V.value.padding?.left+o,bottom:ca.value-zs.value-V.value.padding?.bottom-U.value.axis.xLabelOffsetY,left:e+(J.value?0:U.value.yAxis.crosshairSize)+V.value.padding?.left,height:ca.value-zs.value-V.value.padding?.top-V.value.padding?.bottom-i-U.value.axis.xLabelOffsetY,width:o,scaleLabelX:e,rightScaleLabelX:t,scaleLabelsOffset:n,yAxisLabelWidth:r,individualOffsetX:36}}),Hs=y(()=>{let e=+(H.value.position===`middle`),t=Z.value+e,n=g(Y.value?.top),r=g(Y.value?.bottom);return q.value?H.value.position===`middle`?Lu.value.map((e,t,i)=>{if(t===0)return null;let a=i[t-1],o=a.x+(e.x-a.x)/2;return`M${o},${n} L${o},${r}`}).filter(Boolean).join(` `):Lu.value.map(e=>`M${e.x},${n} L${e.x},${r}`).join(` `):Array.from({length:t}).map((e,t)=>{let i=H.value.position===`middle`?Wl(t):Ul(t);return`M${i},${n} L${i},${r}`}).join(` `)}),Us=y(()=>{if(!U.value.xAxis.showCrosshairs)return``;let e=U.value.xAxis.crosshairSize,t=U.value.xAxis.crosshairsAlwaysAtZero;return(q.value?Lu.value:ac.value).map((n,r)=>{if(!n||!n.text)return null;let i=q.value?n.x:Ul(r);return`M${i},${t?Bc.value-(Bc.value===Y.value?.bottom?0:e/2):Y.value?.bottom} L${i},${t?Bc.value+e/(Bc.value===Y.value?.bottom?1:2):Y.value?.bottom+e}`}).filter(Boolean).join(` `)});function Ws(){return!!Hi?.vnode.props?.onSelectTimeLabel}function Gs(e,t,n){if(!Da.value){let e=document.createElement(`canvas`);Da.value=e.getContext(`2d`)}return Da.value.font=`${n||`normal`} ${e}px ${t||`sans-serif`}`,Da.value}function Ks(){let e=Ki.value.querySelectorAll(`.vue-ui-xy-tag`);e.length&&Array.from(e).forEach(e=>e.style.opacity=`0`)}function qs(e,t,n,r,i){n&&(Ea.value[`${e}_${t}_${r}_${i}`]=n)}let Js=E(!1);async function Ys(e=!1){await St(),Js.value=e,Ca.value&&(Ta.value=e)}function Xs(){Ys(!0)}function Zs(){Ys(!1)}function Qs(){fa.value=!fa.value}let X=k([]),$s=E(!1),ec=k([]),tc=0;Mt(()=>{let e=++tc;(async()=>{let t=bo.value,n=await et({values:U.value.xAxisLabels.values,maxDatapoints:t,formatter:U.value.xAxisLabels.datetimeFormatter,start:G.value.start,end:G.value.end});e===tc&&(X.value=n,$s.value=!0)})()});let nc=0;Mt(()=>{let e=++nc;(async()=>{let t=bo.value,n=await et({values:U.value.xAxisLabels.values,maxDatapoints:t,formatter:U.value.xAxisLabels.datetimeFormatter,start:0,end:So.value});e===nc&&(ec.value=n)})()});let rc=y(()=>{let e=Math.max(1,Math.floor(Number(U.value.xAxisLabels.modulo)||1)),t=(X.value||[]).map(e=>e?.text??``),n=(ec.value||[]).map(e=>e?.text??``),r=G.value.start??0,i=r>0||t.length<n.length;return be({configuredModulo:e,visibleTexts:t,allTexts:n,startAbs:r,isZoomed:i})});function ic(e=null){let t=U.value.xAxisLabels,n=X.value||[],r=ec.value||[],i=G.value.start??0,a=Z.value,o=n.map(e=>e?.text??``),s=r.map(e=>e?.text??``),c=ve(!!t.showOnlyFirstAndLast,!!t.showOnlyAtModulo,rc.value,o,s,i,e,a);if(!t.showFirstAndLast||t.showOnlyFirstAndLast||!c.length)return c;let l=c.length-1;return c.map((e,t)=>t!==0&&t!==l?e:{...e,text:o[t]??``})}let ac=y(()=>ic(L.value)),oc=y(()=>ic(null)),sc=y(()=>(oc.value||[]).map(e=>e?.text??``).join(`|`));wt(()=>{Ua.stop(),Na.value&&=(Na.value.disconnect(),null)});function cc(e,t){let n=ks.value.map(e=>({shape:e.shape??e.type===`bar`?`square`:`circle`,name:e.name,color:e.color,type:e.type,value:e.absoluteValues.find((e,n)=>n===t),comments:e.comments||[],prefix:e.prefix||V.value.labels.prefix,suffix:e.suffix||V.value.labels.suffix}));Bi(`selectTimeLabel`,{datapoint:n,absoluteIndex:e.absoluteIndex,label:e.text})}let Z=y(()=>{let e=Ut((G.value.end??0)-(G.value.start??0));return Math.max(1,e)});function lc(e){q.value||(F.value=e)}function uc(e){if(!q.value||!Se(e)){Aa.value=null,Qc.value=[],$c.value=null;return}let t=Number(e),n=Q.value?-t:t;Aa.value=n,Ns(n)}let dc=y(()=>q.value?Se(Aa.value)||Se($c.value):![null,void 0].includes(L.value)||![null,void 0].includes(F.value));function fc(){W.value.isStacked=!W.value.isStacked,W.value.isStacked?W.value.useIndividualScale=!0:W.value.useIndividualScale=U.value.yAxis.useIndividualScale}function pc(e){uo.value&&e.autoScaling&&(U.value.yAxis.useIndividualScale||console.warn(`VueUiXy (datapoint: ${e.name}) : autoScaling only works when config.chart.grid.labels.yAxis.useIndividualScale is set to true`),U.value.yAxis.stacked||console.warn(`VueUiXy (datapoint: ${e.name}) : autoScaling only works when config.chart.grid.labels.yAxis.stacked is set to true`))}function mc(e){let t=bo.value;return e>t?t:e<0||V.value.zoom.startIndex!==null&&e<V.value.zoom.startIndex?V.value.zoom.startIndex===null?1:V.value.zoom.startIndex+1:e}let hc=E(!1),gc=E(!1),_c=E(0),vc=E(0);function yc(e=!0){if(!hc.value){hc.value=!0;try{if(q.value){let t=Bu.value.min,n=Bu.value.max;_c.value=t,vc.value=n,G.value.start=t,G.value.end=n,Co.value.start=t,Co.value.end=n,gc.value=!0,e&&j.zoomState?is(j.zoomState):Ho(t,n);return}let{startIndex:t,endIndex:n}=V.value.zoom,r=V.value.zoom.keepState?xo.value:bo.value;if(V.value.zoom.keepState&&r<=0)return;_c.value=0,vc.value=r;let i=t??0,a=n==null?r:Math.min(mc(n+1),r);bc.value=!0,G.value.start=i,G.value.end=a,Co.value.start=i,Co.value.end=a,os(),gc.value=!0,e&&j.zoomState&&is(j.zoomState)}finally{queueMicrotask(()=>{bc.value=!1}),hc.value=!1}}}let bc=E(!1);jt([()=>j.zoomState,gc],([e,t])=>{t&&e&&is(e,{transition:!0})},{deep:!0,immediate:!0});let xc=E(!1),Sc=null,Cc=null,wc={};function Tc(e=G.value){return Number(e.end)-Number(e.start)}function Ec(){Sc&&=(cancelAnimationFrame(Sc),null),Cc&&=(cancelAnimationFrame(Cc),null)}function Dc(e){wc={...wc,...e},Sc&&cancelAnimationFrame(Sc),Sc=requestAnimationFrame(()=>{let e=Tc(),t={...G.value,...wc},n=Tc(t);xc.value=n!==e,G.value=t,Co.value={...t},wc={},Sc=null,os(),Go({start:Number(G.value.start),end:Number(G.value.end)}),Cc&&cancelAnimationFrame(Cc),Cc=requestAnimationFrame(()=>{xc.value=!1,Cc=null})})}function Oc(e){if(q.value&&Q.value){let t=Number(e);if(!Number.isFinite(t))return;jc(-t)}else Ac(e)}function kc(e){if(q.value&&Q.value){let t=Number(e);if(!Number.isFinite(t))return;Ac(-t)}else jc(e)}function Ac(e){if(hc.value||bc.value)return;let t=Number(e);Bi(`zoomStart`,{index:t,isZoom:zt(t,_c.value)}),Number.isFinite(t)&&t!==G.value.start&&Dc({start:t})}function jc(e){if(hc.value||bc.value)return;if(q.value){let t=Number(e);if(!Number.isFinite(t))return;let n=Math.max(Number(G.value.start)+1/10**U.value.xAxis.rounding,Math.min(t,Bu.value.max));if(Bi(`zoomEnd`,{index:n,isZoom:zt(n,vc.value)}),n===G.value.end)return;Dc({end:n});return}let t=mc(e);Bi(`zoomEnd`,{index:t,isZoom:zt(t,vc.value)}),t!==G.value.end&&Dc({end:t})}async function Mc(){let e=Ko(),t=Jo();xc.value=!0,yc(!1),es(e,t)||(await St(),xc.value=!1),Go({start:Number(G.value.start),end:Number(G.value.end)}),Bi(`zoomReset`)}let Nc=y(()=>K.value.max+xs.value);function Pc(e){return e/(Ft(Nc.value)?Nc.value:1)}let Fc=y(()=>U.value.yAxis.reverse);function Ic(e){return Fc.value?1-e:e}function Lc({ratio:e,yOffset:t=0,individualHeight:n}){let r=Ic(e);return Y.value?.bottom-t-n*r}function Rc({value:e,scaleMin:t,scaleMax:n,yOffset:r=0,individualHeight:i}){return Lc({ratio:(e-t)/(n-t||1),yOffset:r,individualHeight:i})}let Q=y(()=>U.value.xAxis.reverse);function zc(e){return Q.value?1-e:e}let Bc=y(()=>isNaN(Pc(xs.value))?Y.value?.bottom:Y.value?.bottom-Y.value.height*Pc(xs.value));function Vc(e){let t=K.value.min,n=K.value.max-t;return!Number.isFinite(e)||!Number.isFinite(n)||n===0?Y.value?.bottom:Y.value?.bottom-Y.value.height*((e-t)/n)}let Hc=y(()=>K.value.min<=0&&K.value.max>=0?Vc(0):K.value.min>0?Vc(K.value.min):Vc(K.value.max));function Uc(e){let t=![null,void 0].includes(U.value.yAxis.scaleMin)&&U.value.yAxis.scaleMin>0&&ys.value>=0?Y.value?.bottom:Bc.value;return e.value>=0?m(t-e.y<=0?1e-5:t-e.y):m(e.y-Bc.value<=0?1e-5:e.y-Bc.value)}function Wc(e){return e.value>=0?m(e.zeroPosition-e.y<=0?1e-5:e.zeroPosition-e.y):m(e.y-e.zeroPosition<=0?1e-5:e.zeroPosition-e.y)}let Gc=y(()=>{let e=Math.max(1,Z.value);return{bar:Ht(Math.max(1,Y.value.width),e*au.value,1),plot:Vl.value,line:Vl.value}});function Kc(){return W.value.useIndividualScale&&W.value.isStacked?Gc.value.line-Y.value.width/Z.value*.1:Gc.value.bar}function qc(e){return W.value.useIndividualScale&&W.value.isStacked?e.x+Y.value.width/Z.value*.05:e.x+Gc.value.bar/2}function Jc(e){return W.value.useIndividualScale&&W.value.isStacked?e.x+Gc.value.line/2:qc(e)+Kc()/2-uu.value/2}function Yc(e){return e.value>=0?e.y:[null,void 0,NaN,1/0,-1/0].includes(Bc.value)?Y?.bottom.value:Bc.value}function Xc(e){return e.value>=0?e.y:[null,void 0,NaN,1/0,-1/0].includes(e.zeroPosition)?0:e.zeroPosition}let Zc=E(null),Qc=E([]),$c=E(null),el=y(()=>{if(!q.value)return{sortedPoints:[],matchingPointsByXValue:/* @__PURE__ */ new Map};let e=[],t=/* @__PURE__ */ new Map,n=0;for(let r=0;r<ks.value.length;r+=1){let i=ks.value[r];if([`line`,`plot`].includes(i.type)&&Array.isArray(i.series))for(let r=0;r<i.series.length;r+=1){let a=i.series[r];if(!Se(a?.x)||!Se(a?.y))continue;let o=Number(a.x),s=zu(a),c={datapoint:i,point:a,index:r,x:s,y:a.y,distance:0,sourceOrder:n};e.push({...c,xValue:o}),t.has(o)||t.set(o,[]),t.get(o).push(c),n+=1}}return e.sort((e,t)=>e.x===t.x?e.sourceOrder-t.sourceOrder:e.x-t.x),{sortedPoints:e,matchingPointsByXValue:t}});function tl(e){let t=el.value.sortedPoints;if(!t.length)return null;let n=0,r=t.length-1;for(;n<=r;){let i=Math.floor((n+r)/2);t[i].x<e?n=i+1:r=i-1}let i=/* @__PURE__ */ new Set;n>=0&&n<t.length&&i.add(n),n-1>=0&&n-1<t.length&&i.add(n-1),n+1>=0&&n+1<t.length&&i.add(n+1);let a=null;return i.forEach(n=>{let r=t[n],i=Math.abs(r.x-e);(!a||i<a.distance||i===a.distance&&r.sourceOrder<a.sourceOrder)&&(a={...r,distance:i})}),a}let nl=y(()=>q.value?Array.from(el.value.matchingPointsByXValue.keys()).sort((e,t)=>zu({x:e})-zu({x:t})):[]);function rl(e){let t=nl.value[e];if(!Se(t)){Qc.value=[],$c.value=null,Aa.value=null,ma.value=!1;return}Ns(Number(t));let n=zu({x:Number(t)}),r=Y.value.top+Y.value.height/2,i=Me(n,r,I.value);i&&(Ma.value=i),L.value=e,ja.value=e,ma.value=!0}function il(e){let t=I.value;if(!t)return null;if(t.createSVGPoint&&t.getScreenCTM){let n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;let r=t.getScreenCTM();if(r){let e=n.matrixTransform(r.inverse());return{x:e.x,y:e.y,ok:!0}}}let n=t.getBoundingClientRect(),r=t.viewBox?.baseVal||{x:0,y:0,width:n.width,height:n.height},i=Math.min(n.width/r.width,n.height/r.height),a=r.width*i,o=r.height*i,s=(n.width-a)/2,c=(n.height-o)/2;return{x:(e.clientX-n?.left-s)/i+r.x,y:(e.clientY-n?.top-c)/i+r.y,ok:!0}}let al=y(()=>{if(!wo.value||No.value==null||Po.value==null)return null;let e=Math.min(No.value,Po.value),t=Math.abs(Po.value-No.value);return{x:e,y:Y.value.top,width:t,height:Y.value.height}}),ol=y(()=>gc.value?zt(Number(G.value.start),Number(_c.value))||zt(Number(G.value.end),Number(vc.value)):!1);function sl(e){return Math.min(Math.max(e,Y.value.left),Y.value.right)}function cl(){bl&&=(cancelAnimationFrame(bl),0),Zc.value=null,F.value=null,Aa.value=null,Qc.value=[],$c.value=null,Od(!1,null)}function ll(e){let t=e?.pointerId==null?Fo.value:e.pointerId;t!=null&&I.value?.hasPointerCapture?.(t)&&I.value.releasePointerCapture(t),wo.value=!1,No.value=null,Po.value=null,Fo.value=null}function ul(){Io.value=!0,setTimeout(()=>{Io.value=!1},0)}function dl(e){if(!zo.value||!ol.value||!e)return!1;let t=Date.now(),n=e.pointerType||`mouse`,r=Lo.value,i=n===`touch`?450:350,a=n===`touch`?28:10,o=Math.hypot(e.clientX-r.x,e.clientY-r.y);return r.time>0&&r.pointerType===n&&t-r.time<=i&&o<=a?(Lo.value={time:0,x:0,y:0,pointerType:null},ul(),ll(e),Mc(),!0):(Lo.value={time:t,x:e.clientX,y:e.clientY,pointerType:n},!1)}function fl(e){let t=Math.max(1,Y.value.width),n=zc(Math.max(0,Math.min(1,(e-Y.value.left)/t))),r=Number(Iu.value.min),i=r+n*(Number(Iu.value.max)-r||1);return Math.max(Number(G.value.start),Math.min(i,Number(G.value.end)))}function pl(e,t){if(q.value){let n=fl(e),r=fl(t),i=Math.min(n,r),a=Math.max(n,r);return!Number.isFinite(i)||!Number.isFinite(a)||a<=i?null:{start:i,end:a}}let n=ql(e),r=ql(t);if(n==null||r==null)return null;let i=Math.min(n,r),a=Math.max(n,r);return a<=i?null:{start:Number(G.value.start)+i,end:Number(G.value.start)+a+1}}function ml(e){let t=as(e,{transition:!0});return t?(Bi(`zoomStart`,{index:t.start,isZoom:zt(t.start,_c.value)}),Bi(`zoomEnd`,{index:t.end,isZoom:zt(t.end,vc.value)}),t):null}function hl(){To.value=!0,I.value?.classList?.add(`vue-ui-xy-chart-zoom-pointer-focus`)}function gl(){To.value=!1,I.value?.classList?.remove(`vue-ui-xy-chart-zoom-pointer-focus`)}function _l(e){if(!zo.value||fa.value||e.button!==void 0&&e.button!==0||Fo.value!=null&&e.pointerId!==Fo.value)return;let t=il(e);if(!t)return;let{left:n,right:r,top:i,bottom:a}=Y.value;if(t.x<n||t.x>r||t.y<i||t.y>a)return;let o=Number(G.value.end)-Number(G.value.start);!Number.isFinite(o)||o<=0||(hl(),I.value?.focus?.({preventScroll:!0}),cl(),Fo.value=e.pointerId,wo.value=!0,No.value=sl(t.x),Po.value=sl(t.x))}function vl(e){if(!zo.value||!wo.value||Fo.value!=null&&e.pointerId!==Fo.value)return;let t=il(e);t&&(Po.value=sl(t.x),No.value!=null&&Math.abs(Po.value-No.value)>=2&&!I.value?.hasPointerCapture?.(e.pointerId)&&I.value?.setPointerCapture?.(e.pointerId))}function yl(e){if(!zo.value||!wo.value||Fo.value!=null&&e.pointerId!==Fo.value)return;let t=il(e);t&&(Po.value=sl(t.x));let n=No.value,r=Po.value;if((n==null||r==null?0:Math.abs(r-n))<Math.max(4,Y.value.width*.01)){if(dl(e))return;ll(e);return}let i=pl(Math.min(n,r),Math.max(n,r));i?(ll(e),ml(i)&&(Lo.value={time:0,x:0,y:0,pointerType:null},cl(),ul())):ll(e)}let bl=0;function xl(e){ja.value=null,!(fa.value||wo.value)&&(bl&&cancelAnimationFrame(bl),bl=requestAnimationFrame(()=>{bl=0;let t=il(e);if(!t||!I.value){Sl();return}let{left:n,right:r,top:i,bottom:a}=Y.value;if(t.x<n||t.x>r||t.y<i||t.y>a){Sl();return}if(q.value){Ms(t.x),Od(!0,L.value??0);return}let o=ql(t.x);o==null?Sl():Zc.value!==o&&(Zc.value=o,Od(!0,o))}))}function Sl(){bl&&=(cancelAnimationFrame(bl),0),Zc.value=null,F.value=null,Aa.value=null,Od(!1,null),Qc.value=[],$c.value=null}function Cl(e){if(Io.value){Io.value=!1;return}let t=il(e);if(t&&I.value){let{left:e,right:n,top:r,bottom:i}=Y.value;if(t.x>=e&&t.x<=n&&t.y>=r&&t.y<=i){let e=ql(t.x);if(e!=null){wl(e);return}}}Zc.value!=null&&wl(Zc.value)}function wl(e){let t=ks.value.map(t=>({...t,name:t.name,value:[null,void 0,NaN].includes(t.absoluteValues[e])?null:t.absoluteValues[e],color:t.color,type:t.type}));Bi(`selectX`,{datapoint:t,index:e,indexLabel:U.value.xAxisLabels.values[e]}),B.value.events.datapointClick&&B.value.events.datapointClick({datapoint:t,seriesIndex:e+G.value.start})}function Tl(){return Os.value.map(e=>({values:e.absoluteValues,color:e.color,name:e.name,type:e.type}))}async function El({scale:e=2}={}){if(!Ki.value)return;let{imageUri:t,base64:n}=await We({domElement:Ki.value,base64:!0,img:!0,scale:e}),r=Ki.value.getBoundingClientRect(),i={width:r.width,height:r.height,aspectRatio:r.height?r.width/r.height:0},a=await ge(t,e)??i;return{imageUri:t,base64:n,title:V.value.title.text,...a}}function Dl(){ga.value.length?ga.value=[]:Os.value.forEach(e=>{ga.value.push(e.id)}),kl()}function Ol(e,t){(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),Al(t))}function kl(){Bi(`selectLegend`,ks.value.map(e=>({name:e.name,values:e.absoluteValues,color:e.color,type:e.type})))}function Al(e){if(xc.value=!1,Cc&&=(cancelAnimationFrame(Cc),null),_a.value.has(e.id))ga.value=ga.value.filter(t=>t!==e.id);else{if(ga.value.length+1===Ds.value.length)return;ga.value.push(e.id)}kl(),Sa.value+=1}function jl(e){return Os.value.length?Os.value.find(t=>t.name===e)||(uo.value&&console.warn(`VueUiXy - Series name not found "${e}"`),null):(uo.value&&console.warn(`VueUiXy - There are no series to show.`),null)}function Ml(e){let t=jl(e);t!==null&&_a.value.has(t.id)&&Al({id:t.id})}function Nl(e){let t=jl(e);t!==null&&(_a.value.has(t.id)||Al({id:t.id}))}let Pl=y(()=>`${V.value.title.text||`Chart visualization`}. ${V.value.title.subtitle.text||``}`),Fl=y(()=>({linePlot:Z.value>B.value.line.dot.hideAboveMaxSerieLength})),Il=y(()=>V.value.userOptions.show&&(!V.value.title.show||!V.value.title.text)),Ll=y(()=>{if(Array.isArray(V.value.highlightArea))return V.value.highlightArea.map(e=>{let t=Math.min(e.to,So.value-1);return{...e,span:e.from===t?1:t<e.from?0:t-e.from+1}});let e={...V.value.highlightArea,to:Math.min(V.value.highlightArea.to,So.value-1)};return[{...e,span:e.from===e.to?1:e.to<e.from?0:e.to-e.from+1}]}),Rl=y(()=>sa.value?ho.value.map((e,t)=>({...e,series:vo(e.series),id:`uniqueId_${t}`,color:le(e.color?e.color:ps.value[t]?ps.value[t]:u[t])})):ho.value),zl=y(()=>ks.value.map(e=>{let t=e.absoluteValues.map(e=>[void 0,null].includes(e)?null:e);return{id:e.id,name:e.name,color:e.color,values:It(Z.value,t)}})),Bl=y(()=>({responsiveBreakpoint:B.value.table.responsiveBreakpoint,roundingValues:B.value.table.rounding,showAverage:!1,showMedian:!1,showTotal:!1,fontFamily:V.value.fontFamily,prefix:V.value.labels.prefix,suffix:V.value.labels.suffix,colNames:X.value.map((e,t)=>B.value.table.useDefaultTimeFormat?e.text:ud.value(t+G.value.start,B.value.table.timeFormat)),thead:{backgroundColor:B.value.table.th.backgroundColor,color:B.value.table.th.color,outline:B.value.table.th.outline},tbody:{backgroundColor:B.value.table.td.backgroundColor,color:B.value.table.td.color,outline:B.value.table.td.outline},userOptions:{show:!1},sparkline:{animation:{show:!1},cutNullValues:B.value.line.cutNullValues}})),Vl=y(()=>{let e=Math.max(0,Y.value?.width||0);return H.value.position===`middle`?Ht(e,Math.max(1,Z.value),1):Ht(e,Math.max(1,Z.value-1),0)}),Hl=y(()=>H.value.position===`middle`?Vl.value:Z.value<=1?Math.max(0,Y.value?.width||0):Vl.value);function Ul(e){let t=Y.value?.left||0;return H.value.position===`middle`?t+Vl.value/2+Vl.value*e:t+Vl.value*e}function Wl(e){let t=Y.value?.left||0;return H.value.position===`middle`?t+Vl.value*e:Z.value<=1?t:t+Vl.value*e-Vl.value/2}function Gl(e){return Math.max(Y.value?.left||0,Wl(e))}function Kl(e){let t=Y.value?.left||0,n=Y.value?.right||0,r=Wl(e),i=r+Hl.value;return Math.max(1e-5,Math.min(n,i)-Math.max(t,r))}function ql(e){let t=Y.value?.left||0,n=Y.value?.right||0,r=Z.value;if(r<=0||e<t||e>n)return null;let i=Vl.value;if(i<=0)return 0;let a;return a=H.value.position===`middle`?Math.ceil((e-t)/i)-1:r<=1?0:Math.ceil((e-t)/i-.5),a<0?0:a>=r?r-1:a}function Jl(e){let t=Y.value?.left||0,n=Y.value?.right||0,r=Wl(e),i=r+Hl.value;return Math.max(1e-5,Math.min(n,i)-Math.max(t,r))}function Yl(e){return Math.max(1e-5,Hl.value*e)}let Xl=y(()=>De(Os.value.filter(e=>!_a.value.has(e.id)))),Zl=[`bar`,`line`,`plot`],Ql=y(()=>Xl.value.filter(e=>Zl.includes(e.type))),$l=y(()=>Ql.value.length),eu=y(()=>Ql.value.filter(e=>e.type===`bar`)),tu=y(()=>Ql.value.filter(e=>e.type===`line`)),nu=y(()=>Ql.value.filter(e=>e.type===`plot`)),ru=y(()=>Ds.value.filter(e=>e.type===`bar`&&!_a.value.has(e.id))),iu=y(()=>ru.value.length),au=y(()=>Math.max(1,iu.value)),ou=y(()=>{let e=Lt(Xl.value,e=>e.scaleLabel),t={};for(let[n,r]of Object.entries(e)){let e=1/0,i=-1/0,a=!1;for(let t=0;t<r.length;t+=1){let n=r[t].absoluteValues||[];for(let t=0;t<n.length;t+=1){let r=n[t],o=r===null?0:Number(r);if(Number.isNaN(o)){e=NaN,i=NaN,a=!0;break}a=!0,o<e&&(e=o),o>i&&(i=o)}if(Number.isNaN(e)||Number.isNaN(i))break}t[n]={min:a?e:0,max:a?i:1,groupId:Nu(`scale_group`,[n])}}return t}),su=y(()=>Xl.value.reduce((e,t)=>{let n=t.scaleLabel||``;return e[n]=(e[n]||0)+1,e},{}));function cu({datapoint:e,scaleYLabels:t,autoScaleYLabels:n,zeroPosition:r,autoScaleZeroPosition:i,individualMax:a,autoScaleMax:o,yOffset:s,individualHeight:c}){let l=e.scaleLabel||``;return{...ou.value[l]||{},name:e.name,groupName:l,groupColor:U.value.yAxis.groupColor||e.color,color:e.color,scaleYLabels:e.autoScaling?n:t,zeroPosition:e.autoScaling?i:r,individualMax:e.autoScaling?o:a,scaleLabel:l,id:e.id,yOffset:s,individualHeight:c,autoScaleYLabels:n,unique:su.value[l]===1}}let lu=y(()=>Y.value.width/Z.value/iu.value-uu.value*iu.value),uu=y(()=>Gc.value.line*B.value.bar.periodGap),du=y(()=>Math.max(1e-5,Kc()-(W.value.useIndividualScale&&W.value.isStacked?0:uu.value))),fu=y(()=>du.value*Math.min(Math.abs(B.value.bar.innerGap),.95)),pu=y(()=>{if(!V.value.zoom.minimap.show)return[];let e=Rl.value.filter(e=>!_a.value.has(e.id)),t=0;for(let n=0;n<e.length;n+=1){let r=e[n].series.length;r>t&&(t=r)}let n=[];for(let r=0;r<t;r+=1){let t=0;for(let n=0;n<e.length;n+=1)t+=e[n].series[r]||0;n.push(t)}let r=ju(n,0,1).min;return n.map(e=>e+(r<0?Math.abs(r):0))});function mu(e){if([null,void 0].includes(e))return e;let t=Number(e);return Number.isFinite(t)?-t:e}let hu=y(()=>{if(!V.value.zoom.minimap.show)return[];let e=q.value&&Q.value,t=q.value&&Fc.value;return Rl.value.map(n=>{let r=t?{scaleMin:mu(n.scaleMax),scaleMax:mu(n.scaleMin)}:{};return{...n,...r,series:e||t?n.series.map(n=>Rt(n)?{...n,x:e?-n.x:n.x,y:t?-n.y:n.y}:n):n.series,isVisible:!_a.value.has(n.id)}})}),gu=y(()=>!q.value||!Q.value?Vu.value:-Hu.value),_u=y(()=>!q.value||!Q.value?Hu.value:-Vu.value),vu=y(()=>!q.value||!Q.value?G.value.start:-Number(G.value.end)),yu=y(()=>!q.value||!Q.value?G.value.end:-Number(G.value.start)),bu=y(()=>!q.value||!Se(Aa.value)?Aa.value:Q.value?-Number(Aa.value):Number(Aa.value)),xu=y(()=>{let e=U.value.yAxis.scaleMin,t=U.value.yAxis.scaleMax;return!q.value||!Fc.value?e:mu(t)}),Su=y(()=>{let e=U.value.yAxis.scaleMin,t=U.value.yAxis.scaleMax;return!q.value||!Fc.value?t:mu(e)}),Cu=y(()=>X.value.length?q.value&&Q.value?X.value.at(-1)?.text||``:X.value[0]?.text||``:``),wu=y(()=>X.value.length?q.value&&Q.value?X.value[0]?.text||``:X.value.at(-1)?.text||``:``),Tu=y(()=>q.value?Qc.value.map(e=>({slotAbsoluteIndex:e.datapoint.slotAbsoluteIndex,shape:e.datapoint.shape||e.datapoint.type===`bar`?`square`:`circle`,name:e.datapoint.name,color:e.datapoint.color,type:e.datapoint.type,value:e.point.raw?.y??e.point.y,x:e.point.raw?.x??e.point.x,comments:e.datapoint.comments||[],prefix:e.datapoint.prefix||V.value.labels.prefix,suffix:e.datapoint.suffix||V.value.labels.suffix})):ks.value.map(e=>({slotAbsoluteIndex:e.slotAbsoluteIndex,shape:e.shape||e.type===`bar`?`square`:`circle`,name:e.name,color:e.color,type:e.type,value:e.absoluteValues.find((e,t)=>t===L.value),comments:e.comments||[],prefix:e.prefix||V.value.labels.prefix,suffix:e.suffix||V.value.labels.suffix}))),Eu=y(()=>K.value.ticks.map(e=>{let t=e>=0?Bc.value-Y.value.height*Pc(e):Bc.value+Y.value.height*Pc(Math.abs(e));return{y:Fc.value?Y.value.top+Y.value.bottom-t:t,value:e,prefix:V.value.labels.prefix,suffix:V.value.labels.suffix}})),Du=y(()=>{let e=V.value.annotations;if(!e||!Array.isArray(e)||e.every(e=>!e.show))return[];let t=e.filter(e=>e.show&&(e.yAxis.yTop!=null||e.yAxis.yBottom!=null));if(!t.length)return[];let{left:n,right:r}=Y.value,i=Bc.value,a=Y.value.height,o=K.value.min,s=K.value.max-o,c=e=>{let t=(e-0)/s;return i-t*a};return t.map((e,t)=>{let{yAxis:{yTop:i,yBottom:a,label:o}}=e,s=i!=null&&a!=null&&i!==a,l=i==null?null:c(i),u=a==null?null:c(a),d=Gs(o.fontSize);d.font=`${o.fontSize}px sans-serif`;let ee=d.measureText(o.text).width,f=o.fontSize,te=(o.position===`start`?n+o.padding?.left:r-o.padding?.right)+o.offsetX,ne=(l!=null&&u!=null?Math.min(l,u):l??u)-o.fontSize/3+o.offsetY-o.padding?.top,p;p=o.textAnchor===`middle`?te-ee/2-o.padding?.left:o.textAnchor===`end`?te-ee-o.padding?.right:te-o.padding?.left;let re=ne-f*.75-o.padding?.top;return{show:![l,u,re].includes(NaN),id:Nu(`annotation_y`,[t,i,a,o.text]),hasArea:s,areaHeight:s?Math.abs(l-u):0,yTop:l,yBottom:u,config:e.yAxis,x1:n,x2:r,_text:{x:te,y:ne},_box:{x:p,y:re,width:ee+o.padding?.left+o.padding?.right,height:f+o.padding?.top+o.padding?.bottom,fill:o.backgroundColor,stroke:o.border.stroke,rx:o.border.rx,ry:o.border.ry,strokeWidth:o.border.strokeWidth}}})});function Ou(e,t){let n=e[t-1],r=e[t+1],i=!!n&&!!r&&n.value==null&&r.value==null||!n&&!!r&&r.value==null||!!n&&!r&&n.value==null;return Ft(e[t].value)&&i&&B.value.line.cutNullValues}function ku(e,t=0,n=1){let r=1/0,i=-1/0,a=!1;for(let t=0;t<e.length;t+=1){let n=e[t];if(Array.isArray(n.series))for(let e=0;e<n.series.length;e+=1){let t=Es(n.series[e]);Number.isFinite(t)&&(a=!0,t<r&&(r=t),t>i&&(i=t))}}return a?{min:r,max:i}:{min:t,max:n}}function Au(e,t=0,n=1){let r=1/0,i=-1/0,a=!1;for(let t=0;t<e.length;t+=1){let n=e[t];if(Array.isArray(n.series))for(let e=0;e<n.series.length;e+=1){let t=n.series[e];if(!Rt(t))continue;let o=Number(t.x);Number.isFinite(o)&&(a=!0,o<r&&(r=o),o>i&&(i=o))}}return a?{min:r,max:r===i?i+1:i}:{min:t,max:n}}function ju(e,t=0,n=1){if(!Array.isArray(e)||e.length===0)return{min:t,max:n};let r=1/0,i=-1/0;for(let t=0;t<e.length;t+=1){let n=e[t],a=n===null?0:Number(n);if(Number.isNaN(a))return{min:NaN,max:NaN};a<r&&(r=a),a>i&&(i=a)}return{min:r,max:i}}function Mu(e){let t=String(e??``),n=0;for(let e=0;e<t.length;e+=1)n=(n<<5)-n+t.charCodeAt(e),n|=0;return Math.abs(n).toString(36)}function Nu(e,t){return`${e}_${Mu(t.join(`|`))}`}function Pu(){return mo.value||Eo.value||xc.value||!B.value.line.showTransition?void 0:`all ${B.value.line.transitionDurationMs}ms ease-in-out`}let Fu=y(()=>Au(Ds.value,0,1)),Iu=y(()=>{let e=U.value.xAxis.commonScaleSteps,t=U.value.xAxis.scaleMin,n=U.value.xAxis.scaleMax,r=t!==null&&Number.isFinite(Number(t))?Number(t):Fu.value.min,i=n!==null&&Number.isFinite(Number(n))?Number(n):Fu.value.max,a=U.value.xAxis.useNiceScale?he(r,i,e):Ne(r,i,e);if(H.value.position!==`start`)return a;let o=a.ticks.length>1?a.ticks[1]-a.ticks[0]:1;return{...a,max:a.max+o}}),Lu=y(()=>q.value?(Q.value?[...Iu.value.ticks].reverse():[...Iu.value.ticks]).map((e,t)=>({id:`continuous_x_label_${t}`,text:_(U.value.xAxis.formatter,e,n({v:e,s:V.value.labels.prefix,p:V.value.labels.suffix,r:U.value.xAxis.rounding}),{datapoint:e,seriesIndex:t}),value:e,x:zu({x:e}),index:t})):ac.value);function Ru(e,t){return q.value?e.x:Ul(t)}function zu({x:e}){let t=Iu.value.max-Iu.value.min||1,n=zc((e-Iu.value.min)/t);return Y.value.left+Y.value.width*n}let Bu=y(()=>Au(ho.value,0,1)),Vu=y(()=>q.value?Bu.value.min:0),Hu=y(()=>q.value?Bu.value.max:So.value);function Uu(e,t){return q.value?e.x==null||e.y==null?null:zu(e):Ul(t)}function Wu(e){return!q.value||!e?null:e.x??null}function Gu({datapoint:e,totalSeries:t,gap:n,usableHeight:r,autoScaleValueMin:i,autoScaleValueMax:a,individualExtremes:o,forceExactScale:s=!1}){let c=e.scaleSteps||U.value.yAxis.commonScaleSteps,l=1.0000001,u=s||!U.value.yAxis.useNiceScale?Ne:he,d=o.max===o.min?o.max*l:o.max,ee=a===i?a*l:a,f=u(o.min,d,c),te=u(i,ee,c),ne=f.min>=0?0:Math.abs(f.min),p=f.max+Math.abs(ne),re=te.max+0,ie=e.stackIndex,ae=t-1-ie,oe=W.value.isStacked?1-e.cumulatedStackRatio:0,se=W.value.isStacked?r*oe+n*ae:0,ce=W.value.isStacked?r*e.stackRatio:Y.value.height;return{scaleSteps:c,individualScale:f,autoScaleSteps:te,individualZero:ne,autoScaleZero:0,individualMax:p,autoScaleMax:re,yOffset:se,individualHeight:ce,zeroPosition:Y.value?.bottom-se-ce*ne/p,autoScaleZeroPosition:Y.value?.bottom-se-ce*0/re}}function Ku({datapoint:e,clampNegativeAutoScaleMaximum:t=!1}){let n=ou.value[e.scaleLabel],r=n.min,i=n.max;return{ratios:e.absoluteValues.filter(e=>![null,void 0].includes(e)).map(e=>(e-r)/(i-r)),valueMin:r,valueMax:t&&i<0?0:i}}function qu({datapoint:e,filterMinimumValues:t=!1,preserveLooseMinimumExpression:n=!1}){let r=ju(e.absoluteValues,0,1),i=ju(t?e.absoluteValues.filter(e=>![null,void 0].includes(e)):e.absoluteValues,0,1).min;return{max:e.scaleMax||r.max||1,min:n?e.scaleMin||i>0?0:i:e.scaleMin||(i>0?0:i)}}function Ju({values:e,autoScaleSteps:t}){return e.map(e=>t.min>=0?(e-Math.abs(t.min))/(t.max-Math.abs(t.min)):(e+Math.abs(t.min))/(t.max+Math.abs(t.min)))}function Yu({datapoint:e,individualScale:t,yOffset:n,individualHeight:r}){return t.ticks.map(i=>({y:Rc({value:i,scaleMin:t.min,scaleMax:t.max,yOffset:n,individualHeight:r}),value:i,prefix:e.prefix||V.value.labels.prefix,suffix:e.suffix||V.value.labels.suffix,datapoint:e}))}function Xu({datapoint:e,autoScaleSteps:t,yOffset:n,individualHeight:r}){return t.ticks.map(i=>({y:Lc({ratio:(i-t.min)/(t.max-t.min||1),yOffset:n,individualHeight:r}),value:i,prefix:e.prefix||V.value.labels.prefix,suffix:e.suffix||V.value.labels.suffix,datapoint:e}))}function Zu({datapoint:e,totalSeries:t,gap:n,usableHeight:r,forceExactScale:i=!1,clampNegativeAutoScaleMaximum:a=!1,filterMinimumValues:o=!1,preserveLooseMinimumExpression:s=!1}){pc(e);let c=Ku({datapoint:e,clampNegativeAutoScaleMaximum:a}),l=qu({datapoint:e,filterMinimumValues:o,preserveLooseMinimumExpression:s}),u=Gu({datapoint:e,totalSeries:t,gap:n,usableHeight:r,autoScaleValueMin:c.valueMin,autoScaleValueMax:c.valueMax,individualExtremes:l,forceExactScale:i});return{autoScale:c,individualExtremes:l,scaleYLabels:Yu({datapoint:e,individualScale:u.individualScale,yOffset:u.yOffset,individualHeight:u.individualHeight}),autoScaleYLabels:Xu({datapoint:e,autoScaleSteps:u.autoScaleSteps,yOffset:u.yOffset,individualHeight:u.individualHeight}),autoScaleRatiosToNiceScale:Ju({values:e.absoluteValues,autoScaleSteps:u.autoScaleSteps}),...u}}function Qu(e){return Array.isArray(e)?e.slice(G.value.start,G.value.end):[]}function $u(e,t){return Array.isArray(e)&&e[t+G.value.start]||``}let ed=y(()=>{let e=$l.value,t=U.value.yAxis.gap,n=W.value.isStacked?t*(e-1):0,r=Y.value.height-n;return eu.value.map((n,i)=>{let{individualScale:a,autoScaleSteps:o,individualZero:s,individualMax:c,autoScaleMax:l,yOffset:u,individualHeight:d,zeroPosition:ee,autoScaleZeroPosition:f,scaleYLabels:te,autoScaleYLabels:ne,autoScaleRatiosToNiceScale:p}=Zu({datapoint:n,totalSeries:e,gap:t,usableHeight:r,clampNegativeAutoScaleMaximum:!0,filterMinimumValues:!0,preserveLooseMinimumExpression:!0}),re=iu.value,ie=Qu(n.comments),ae=n.series.map((e,t)=>{let r=W.value.useIndividualScale?(n.absoluteValues[t]+s)/c:Pc(e),a=W.value.useIndividualScale&&W.value.isStacked?Y.value?.left+Y.value.width/Z.value*t:Y.value?.left+Gc.value.bar*i+Gc.value.bar*t*re-lu.value/2-i*uu.value;return{yOffset:m(u),individualHeight:m(d),x:m(a),y:Lc({ratio:r,yOffset:u,individualHeight:d}),value:n.absoluteValues[t],zeroPosition:m(ee),individualMax:m(c),comment:ie[t]||``}}),oe=n.series.map((e,t)=>{let r=W.value.useIndividualScale&&W.value.isStacked?Y.value?.left+Y.value.width/Z.value*t:Y.value?.left-Gc.value.bar/2+Gc.value.bar*i+Gc.value.bar*t*Os.value.filter(e=>e.type===`bar`).filter(e=>!_a.value.has(e.id)).length;return{yOffset:m(u),individualHeight:m(d),x:m(r),y:m(Lc({ratio:p[t]||0,yOffset:m(u),individualHeight:m(d)})),value:n.absoluteValues[t],zeroPosition:m(ee),individualMax:m(c),comment:ie[t]||``}}),se=cu({datapoint:n,scaleYLabels:te,autoScaleYLabels:ne,zeroPosition:ee,autoScaleZeroPosition:f,individualMax:c,autoScaleMax:l,yOffset:u,individualHeight:d});return{...n,yOffset:u,autoScaleYLabels:ne,individualHeight:d,scaleYLabels:n.autoScaling?ne:te,individualScale:n.autoScaling?o:a,individualMax:n.autoScaling?l:c,zeroPosition:n.autoScaling?f:ee,plots:n.autoScaling?oe:ae,scaleGroup:se,groupId:se.groupId}})});function td(e){return String(e||``).split(`;`).filter(Boolean).join(` M`)}let $=y(()=>{let e=$l.value,t=U.value.yAxis.gap,n=W.value.isStacked?t*(e-1):0,i=Y.value.height-n;return tu.value.map((n,a)=>{let{individualScale:o,autoScaleSteps:c,individualZero:u,individualMax:ee,autoScaleMax:f,yOffset:p,individualHeight:re,zeroPosition:ae,autoScaleZeroPosition:ce,scaleYLabels:pe,autoScaleYLabels:me,autoScaleRatiosToNiceScale:he}=Zu({datapoint:n,totalSeries:e,gap:t,usableHeight:i}),ge=Qu(n.comments),_e=(e,t)=>{if(q.value&&Number.isFinite(e?.index))return e.index;let r=n.sourceIndices?.[t];if(Number.isFinite(r)&&r>=0)return r;let i=Number(G.value.start);return Number.isFinite(i)?Math.trunc(i)+t:t},ve=n.series.map((e,t)=>{if(q.value&&(e.x==null||e.y==null))return{index:t,sourceIndex:_e(e,t),x:null,y:null,value:null,datasetXValue:Wu(e),comment:n.comments&&n.comments.slice(G.value.start,G.value.end)[t]||``};let r=W.value.useIndividualScale?(n.absoluteValues[t]+Math.abs(u))/ee:Pc(Es(e));return{index:t,sourceIndex:_e(e,t),x:m(Uu(e,t)),datasetXValue:Wu(e),y:m(Lc({ratio:r,yOffset:p,individualHeight:re})),value:n.absoluteValues[t],comment:ge[t]||``}}),h=n.series.map((e,t)=>q.value&&(e.x===null||e.y===null)?{index:t,sourceIndex:_e(e,t),x:null,y:null,datasetXValue:Wu(e),value:null,comment:ge[t]||``}:[void 0,null].includes(n.absoluteValues[t])?{index:t,sourceIndex:_e(e,t),x:m(Uu(e,t)),y:ae,value:n.absoluteValues[t],comment:ge[t]||``}:{index:t,sourceIndex:_e(e,t),x:m(Uu(e,t)),datasetXValue:Wu(e),y:m(Lc({ratio:he[t]||0,yOffset:p,individualHeight:re})),value:n.absoluteValues[t],comment:ge[t]||``}),g=B.value.line.cutNullValues,ye=!g&&B.value.line.nullDashes?.show===!0,be=g?ve:ve.filter(e=>e.value!==null),_=g?h:h.filter(e=>e.value!==null),xe=Array.isArray(n.dashIndices)?n.dashIndices.map(e=>Math.trunc(Number(e))).filter(Number.isFinite):[],Se=new Set(xe),Ce=n.autoScaling?_:be,we=(n.autoScaling?h:ve).reduce((e,t,n)=>(Se.has(t.sourceIndex)&&e.push(n),e),[]);function Te(e,t){let n=e?.sourceIndex,r=t?.sourceIndex;if(!Number.isFinite(n)||!Number.isFinite(r))return!1;let i=Math.min(n,r),a=Math.max(n,r);for(let e of xe)if(e>=i&&e<=a)return!0;return!1}function Ee(e){let t=/* @__PURE__ */ new Set;for(let n=1;n<e.length;n+=1)Te(e[n-1],e[n])&&t.add(n-1);return t}function De(e){let t=/* @__PURE__ */ new Set;if(!ye)return t;for(let n=1;n<e.length;n+=1){let r=e[n-1]?.sourceIndex,i=e[n]?.sourceIndex;Number.isFinite(r)&&Number.isFinite(i)&&Math.abs(i-r)>1&&t.add(n-1)}return t}let Oe=Ee(Ce),ke=De(Ce),Ae=/* @__PURE__ */ new Set([...Oe,...ke]),je=g?we.length>0:Oe.size>0,Me=ye&&ke.size>0,Ne=je||Me,Pe=g?d(ve):oe(be),Fe=g?d(h):oe(_),Ie=g?fe(ve):ue(be),Le=g?fe(h):ue(_),Re=td(de(be)),ze=td(de(_)),Be=Ne?g?s(Ce,we):te(Ce,Ae):[],Ve=Ne?g?ne(Ce,we):se(Ce,Ae):[],He=n.useStepper&&Ne?l(Ce,Ae):[],Ue=cu({datapoint:n,scaleYLabels:pe,autoScaleYLabels:me,zeroPosition:ae,autoScaleZeroPosition:ce,individualMax:ee,autoScaleMax:f,yOffset:p,individualHeight:re}),We=W.value.useIndividualScale?n.autoScaling?ce:ae:hs.value,Ge=Math.max(Math.max(n.autoScaling?ce:pe.at(-1)?pe.at(-1).y:0,Y.value?.top),We),Ke=n.autoScaling?h:ve,qe=n.absoluteValues.filter(e=>![null,void 0,NaN].includes(e)),Je=!!n.temperatureColors&&new Set(qe).size<=1;return{...n,isFlatTemperatureLine:Je,temperatureColors:n.temperatureColors?n.temperatureColors.map(e=>le(e)):null,yOffset:p,autoScaleYLabels:me,individualHeight:re,scaleYLabels:n.autoScaling?me:pe,individualScale:n.autoScaling?c:o,individualMax:n.autoScaling?f:ee,zeroPosition:n.autoScaling?ce:ae,curve:n.useStepper?n.autoScaling?ze:Re:n.autoScaling?Fe:Pe,plots:n.autoScaling?h:ve,dashedStraight:Be,dashedSmooth:Ve,dashedStepper:He,hasDashedSegments:Ne,area:n.useArea?n.useStepper?de(Ke,Ge):W.value.useIndividualScale?r(n.autoScaling?h:ve,Ge):r(ve,Ge):``,curveAreas:n.useArea?n.useStepper?de(Ke,Ge).split(`;`).filter(Boolean).map(e=>`M${e}Z`):ie(n.autoScaling?h:ve,Ge,!0):[],straight:n.useStepper?n.autoScaling?ze:Re:n.autoScaling?Le:Ie,scaleGroup:Ue,groupId:Ue.groupId}})}),nd=y(()=>{let e=$l.value,t=U.value.yAxis.gap,n=W.value.isStacked?t*(e-1):0,r=Y.value.height-n;return nu.value.map(n=>{let{individualScale:i,autoScaleSteps:a,individualZero:o,individualMax:s,autoScaleMax:c,yOffset:l,individualHeight:u,zeroPosition:d,autoScaleZeroPosition:ee,scaleYLabels:f,autoScaleYLabels:te,autoScaleRatiosToNiceScale:ne}=Zu({datapoint:n,totalSeries:e,gap:t,usableHeight:r,forceExactScale:!0,preserveLooseMinimumExpression:!0}),p=Qu(n.comments),re=n.series.map((e,t)=>{if(q.value&&(e.x==null||e.y==null))return{index:t,x:null,datasetXValue:Wu(e),y:null,value:null,comment:p[t]||``};let r=W.value.useIndividualScale?(n.absoluteValues[t]+Math.abs(o))/s:Pc(Es(e));return{index:t,x:m(Uu(e,t)),datasetXValue:Wu(e),y:m(Lc({ratio:r,yOffset:l,individualHeight:u})),value:n.absoluteValues[t],comment:p[t]||``}}),ie=n.series.map((e,t)=>q.value&&(e.x===null||e.y===null)?{index:t,x:null,datasetXValue:Wu(e),y:null,value:null,comment:p[t]||``}:{index:t,x:m(Uu(e,t)),datasetXValue:Wu(e),y:m(Lc({ratio:ne[t]||0,yOffset:l,individualHeight:u})),value:n.absoluteValues[t],comment:p[t]||``}),ae=cu({datapoint:n,scaleYLabels:f,autoScaleYLabels:te,zeroPosition:d,autoScaleZeroPosition:ee,individualMax:s,autoScaleMax:c,yOffset:l,individualHeight:u});return{...n,yOffset:l,autoScaleYLabels:te,individualHeight:u,scaleYLabels:n.autoScaling?te:f,individualScale:n.autoScaling?a:i,individualMax:n.autoScaling?c:s,zeroPosition:n.autoScaling?ee:d,plots:n.autoScaling?ie:re,scaleGroup:ae,groupId:ae.groupId}})}),rd=y(()=>[...$.value,...ed.value.map(e=>({...e,plots:e.plots.map(e=>({...e,x:m(Jc(e)),y:m(e.y)}))})),...nd.value]),id=y(()=>{let e=Object.entries(ou.value).reduce((e,[t,n])=>(e[t]={...n,scaleLabel:t},e),{});return[...$.value,...ed.value,...nd.value].forEach(t=>{t.scaleGroup&&(e[t.scaleLabel||``]={...e[t.scaleLabel||``],...t.scaleGroup})}),e}),ad=y(()=>{let e=$.value.map(e=>({name:e.name,color:e.color,scale:e.individualScale,scaleYLabels:e.scaleYLabels,zero:e.zeroPosition,max:e.individualMax,scaleLabel:e.scaleLabel||``,id:e.id,yOffset:e.yOffset||0,individualHeight:e.individualHeight||Y.value.height,autoScaleYLabels:e.autoScaleYLabels})),t=ed.value.map(e=>({name:e.name,color:e.color,scale:e.individualScale,scaleYLabels:e.scaleYLabels,zero:e.zeroPosition,max:e.individualMax,scaleLabel:e.scaleLabel||``,id:e.id,yOffset:e.yOffset||0,individualHeight:e.individualHeight||Y.value.height})),n=nd.value.map(e=>({name:e.name,color:e.color,scale:e.individualScale,scaleYLabels:e.scaleYLabels,zero:e.zeroPosition,max:e.individualMax,scaleLabel:e.scaleLabel||``,id:e.id,yOffset:e.yOffset||0,individualHeight:e.individualHeight||Y.value.height})),r=W.value.useIndividualScale&&!W.value.isStacked?Object.values(id.value):[...e,...t,...n],i=r.flatMap(e=>e).length;return r.flatMap((e,t)=>{let n=0;n=W.value.isStacked?J.value?Y.value?.right:Y.value?.left:J.value?Y.value?.right+Vs()*t:Y.value?.left/i*(t+1);let r=W.value.useIndividualScale&&!W.value.isStacked?e.unique?e.name:e.groupName:e.name;return{unique:e.unique,id:e.id,groupId:e.groupId,scaleLabel:e.scaleLabel,name:_(U.value.yAxis.serieNameFormatter,r,r,e),color:W.value.useIndividualScale&&!W.value.isStacked?e.unique?e.color:e.groupColor:e.color,scale:e.scale,yOffset:e.yOffset,individualHeight:e.individualHeight,x:n,yLabels:e.scaleYLabels||e.scale.ticks.map(t=>({y:Rc({value:t,scaleMin:e.scale.min,scaleMax:e.scale.max,yOffset:e.yOffset||0,individualHeight:e.individualHeight}),value:t}))}})}),od=y(()=>{let e=B.value.line.interLine||{},t=e.pairs||[],n=e.colors||[];if(!t.length)return[];let r=[];return t.forEach((e,t)=>{let[i,a]=Array.isArray(e)?e:[e.a,e.b];if(!i||!a)return;let o=$.value.find(e=>e.name===i),s=$.value.find(e=>e.name===a);if(!o||!s||o.type!==`line`||s.type!==`line`)return;let c=n?.[t]?.[0]??o.color,l=n?.[t]?.[1]??s.color;Ce({lineA:o.plots,lineB:s.plots,smoothA:!!o.smooth,smoothB:!!s.smooth,stepperA:!!o.useStepper,stepperB:!!s.useStepper,colorLineA:c,colorLineB:l,sampleStepPx:2,cutNullValues:!0}).forEach((e,n)=>{r.push({...e,key:`inter_${i}_${a}_${t}_${n}`})})}),r}),sd=y(()=>{let e=Qc.value[0]?.index??null,t=q.value?e:L.value;return{timeLabel:q.value?{text:String(Qc.value[0]?.point.raw?.x??Qc.value[0]?.point.x),absoluteIndex:e}:X.value[L.value],datapoint:Tu.value,seriesIndex:L.value,selectedIndex:t,absoluteIndex:q.value?e:L.value+G.value.start,series:Os.value,bars:ed.value,lines:$.value,plots:nd.value,config:B.value}}),cd=k({months:[],shortMonths:[],days:[],shortDays:[]}),ld=0;Mt(()=>{let e=++ld,t=U.value.xAxisLabels.datetimeFormatter;(async()=>{let n=await $e(t.locale).catch(()=>$e(`en`));e===ld&&(cd.value=n.data)})()});let ud=y(()=>{let e=U.value.xAxisLabels.datetimeFormatter,t=Qe({useUTC:e.useUTC,locale:cd.value,januaryAsYear:e.januaryAsYear});return(e,n)=>{let r=U.value.xAxisLabels.values?.[e];return r==null?``:t.formatDate(new Date(r),n)}}),dd=y(()=>(U.value.xAxisLabels.values||[]).map((e,t)=>({text:ud.value(t,V.value.zoom.timeFormat),absoluteIndex:t}))),fd=/* @__PURE__ */ new Map;function pd(e){return{absoluteIndex:L.value+G.value.start,seriesIndex:L.value,datapoint:Tu.value,series:Os.value,bars:ed.value,lines:$.value,plots:nd.value,config:B.value,dateLabel:e}}function md(e){return[da.value[e.type],e.shape||``,e.color,V.value.tooltip.backgroundColor,!!Vi.pattern,P.value,e.slotAbsoluteIndex].join(`|`)}function hd(e){let t=md(e);if(fd.has(t))return fd.get(t);let n=V.value.tooltip.backgroundColor,r=``,a=``;switch(da.value[e.type]){case`bar`:r=`<svg viewBox="0 0 40 40" height="14" width="14">${Vi.pattern?`<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${e.color}" />`:``}<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${Vi.pattern?`url(#pattern_${P.value}_${e.slotAbsoluteIndex})`:e.color}" /></svg>`;break;case`line`:!e.shape||![`star`,`triangle`,`square`,`diamond`,`pentagon`,`hexagon`].includes(e.shape)?a=`<circle cx="10" cy="8" r="4" stroke="${n}" stroke-width="0.5" fill="${e.color}" />`:e.shape===`triangle`?a=`<path d="${p({plot:{x:10,y:8},radius:4,sides:3,rotation:.52}).path}" fill="${e.color}" stroke="${n}" stroke-width="0.5" />`:e.shape===`square`?a=`<path d="${p({plot:{x:10,y:8},radius:4,sides:4,rotation:.8}).path}" fill="${e.color}" stroke="${n}" stroke-width="0.5" />`:e.shape===`diamond`?a=`<path d="${p({plot:{x:10,y:8},radius:4,sides:4,rotation:0}).path}" fill="${e.color}" stroke="${n}" stroke-width="0.5" />`:e.shape===`pentagon`?a=`<path d="${p({plot:{x:10,y:8},radius:4,sides:5,rotation:.95}).path}" fill="${e.color}" stroke="${n}" stroke-width="0.5" />`:e.shape===`hexagon`?a=`<path d="${p({plot:{x:10,y:8},radius:4,sides:6,rotation:0}).path}" fill="${e.color}" stroke="${n}" stroke-width="0.5" />`:e.shape===`star`&&(a=`<polygon stroke="${n}" stroke-width="0.5" fill="${e.color}" points="${i({plot:{x:10,y:8},radius:4})}" />`),r=`<svg viewBox="0 0 20 12" height="14" width="20"><rect rx="1.5" x="0" y="6.5" stroke="${n}" stroke-width="0.5" height="3" width="20" fill="${e.color}" />${a}</svg>`;break;case`plot`:if(!e.shape||![`star`,`triangle`,`square`,`diamond`,`pentagon`,`hexagon`].includes(e.shape)){r=`<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${n}" stroke-width="1" fill="${e.color}" /></svg>`;break}if(e.shape===`star`){r=`<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${n}" stroke-width="1" fill="${e.color}" points="${i({plot:{x:6,y:6},radius:5})}" /></svg>`;break}if(e.shape===`triangle`){r=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${p({plot:{x:6,y:6},radius:6,sides:3,rotation:.52}).path}" fill="${e.color}" stroke="${n}" stroke-width="1" /></svg>`;break}if(e.shape===`square`){r=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${p({plot:{x:6,y:6},radius:6,sides:4,rotation:.8}).path}" fill="${e.color}" stroke="${n}" stroke-width="1" /></svg>`;break}if(e.shape===`diamond`){r=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${p({plot:{x:6,y:6},radius:5,sides:4,rotation:0}).path}" fill="${e.color}" stroke="${n}" stroke-width="1" /></svg>`;break}if(e.shape===`pentagon`){r=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${p({plot:{x:6,y:6},radius:5,sides:5,rotation:.95}).path}" fill="${e.color}" stroke="${n}" stroke-width="1" /></svg>`;break}if(e.shape===`hexagon`){r=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${p({plot:{x:6,y:6},radius:5,sides:6,rotation:0}).path}" fill="${e.color}" stroke="${n}" stroke-width="1" /></svg>`;break}}return fd.set(t,r),r}let gd=y(()=>{let e=``,t=Tu.value.map(e=>e.value).filter(e=>ae(e)&&e!==null).reduce((e,t)=>Math.abs(e)+Math.abs(t),0),r=q.value?{text:_(U.value.xAxis.formatter,Qc.value[0]?.point.raw?.x??Qc.value[0]?.point.x,n({v:Qc.value[0]?.point.raw?.x??Qc.value[0]?.point.x,r:V.value.tooltip.roundingValue}),{datapoint:null,serriesIndex:null})}:X.value[L.value],i=V.value.tooltip.customFormat;if(o(i))try{let e=i(pd(r));if(typeof e==`string`)return e}catch(e){console.warn(`Vue Data UI - VueUiXy: custom tooltip formatter failed.`,e)}if(r&&r.text&&V.value.tooltip.showTimeLabel){let t=ud.value(L.value+G.value.start,V.value.tooltip.timeFormat);q.value||(e+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${V.value.tooltip.borderColor}; width:100%">${U.value.xAxisLabels.datetimeFormatter.enable&&!V.value.tooltip.useDefaultTimeFormat?t:r.text}</div>`)}return Tu.value.forEach(i=>{if(ae(i.value)){let a=hd(i),o=V.value.tooltip.showValue?_(i.type===`line`?B.value.line.labels.formatter:i.type===`bar`?B.value.bar.labels.formatter:B.value.plot.labels.formatter,i.value,n({p:i.prefix,v:i.value,s:i.suffix,r:V.value.tooltip.roundingValue}),{datapoint:i}):``,s=V.value.tooltip.showValue?r?.text??``:``,c=q.value?`
9
- <span>${U.value.axis.xLabel||`X`}: </span>
10
- <span>${s}</span>,
11
- <span>${U.value.axis.yLabel||`Y`}: </span>
12
- <span>${o}</span>
13
- `:o;q.value?e+=`
14
- <div style="display:flex;flex-direction:column;">
15
- <div style="display:flex; flex-direction:row; gap:3px;">
16
- <div style="width:20px">${a}</div>
17
- <div style="display:flex;flex-direction:column;">
18
- <div>${i.name}</div>
19
- <div>${c}</div>
20
- </div>
21
- </div>
22
- </div>
23
- `:e+=`<div style="display:flex;flex-direction:row; align-items:center;gap:3px;white-space:nowrap;"><div style="width:20px">${a}</div> ${i.name}: <b>${c}</b> ${V.value.tooltip.showPercentage?`(${n({v:m(Math.abs(i.value)/t*100),s:`%`,r:V.value.tooltip.roundingPercentage})})`:``}</div>`;let l=$u(i.comments,L.value);V.value.comments.showInTooltip&&l&&(e+=`<div class="vue-data-ui-tooltip-comment" style="background:${f(i.color,12.5)}; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${i.color}">${l}</div>`)}}),`<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums;color:${V.value.tooltip.color}">${e}</div>`}),_d=y(()=>{if(!q.value)return[];let e=/* @__PURE__ */ new Set,t=[];return ks.value.forEach(n=>{n.series.forEach(n=>{let r=Number(n?.x);if(!Number.isFinite(r))return;let i=String(r);e.has(i)||(e.add(i),t.push(r))})}),t.sort((e,t)=>Q.value?t-e:e-t)});function vd(e){let t=Number(e);return Number.isFinite(t)?_(U.value.xAxis.formatter,t,n({v:t,r:B.value.table.rounding}),{datapoint:t,seriesIndex:null}):`-`}function yd(e){return q.value?vd(e):B.value.table.useDefaultTimeFormat?X.value[e]?.text??`-`:ud.value(e+G.value.start,B.value.table.timeFormat)}function bd(e,t){if(q.value){let n=Number(t);return Number.isFinite(n)?e.series.find(e=>Number(e?.x)===n)?.y??null:null}return e.absoluteValues[t]}function xd(e,t){let n=bd(e,t);return Ft(n)?Number(n.toFixed(B.value.table.rounding)):``}function Sd(e,t){let r=bd(e,t);return Ft(r)?_(e.type===`line`?B.value.line.labels.formatter:e.type===`bar`?B.value.bar.labels.formatter:B.value.plot.labels.formatter,r,n({p:e.prefix||V.value.labels.prefix,v:r,s:e.suffix||V.value.labels.suffix,r:B.value.table.rounding})):``}function Cd(e){return ks.value.map(t=>bd(t,e)??0).reduce((e,t)=>e+t,0)}let wd=y(()=>{if(q.value)return _d.value.map(e=>{let t=Cd(e);return{period:yd(e),csvValues:ks.value.map(t=>xd(t,e)),formattedValues:ks.value.map(t=>Sd(t,e)),sum:t,formattedSum:t.toFixed(B.value.table.rounding)}});let e=[];for(let t=0;t<Z.value;t+=1){let n=Cd(t);e.push({period:yd(t),csvValues:ks.value.map(e=>xd(e,t)),formattedValues:ks.value.map(e=>Sd(e,t)),sum:n,formattedSum:n.toFixed(B.value.table.rounding)})}return e}),Td=y(()=>Ds.value.length===0?{head:[],body:[],config:{},columnNames:[]}:{head:ks.value.map(e=>({label:e.name,color:e.color,type:e.type})),body:wd.value.map(e=>[e.period].concat(e.csvValues))}),Ed=y(()=>{let e=B.value.table.showSum,t=[q.value?U.value.axis.xLabel||`X`:``].concat(ks.value.map(e=>e.name));e&&(t=t.concat(`__SUM__`));let n=wd.value.map(t=>[t.period].concat(t.formattedValues,e?t.formattedSum:[])),r={th:{backgroundColor:B.value.table.th.backgroundColor,color:B.value.table.th.color,outline:B.value.table.th.outline},td:{backgroundColor:B.value.table.td.backgroundColor,color:B.value.table.td.color,outline:B.value.table.td.outline},breakpoint:B.value.table.responsiveBreakpoint},i=[q.value?U.value.axis.xLabel||`X`:B.value.table.columnNames.period].concat(ks.value.map(e=>e.name),B.value.table.columnNames.total);return{head:t,body:n,config:r,colNames:i}});function Dd(e=null){let t=[[V.value.title.text],[V.value.title.subtitle.text],[``]],n=[q.value?U.value.axis.xLabel||`X`:B.value.table.columnNames.period,...Td.value.head.map(e=>e.label)],r=Td.value.body,i=t.concat([n]).concat(r),o=a(i);e?e(o):Ee({csvContent:o,title:V.value.title.text||`vue-ui-xy`})}function Od(e,t=null){if(As.value)return;ma.value=e;let n=ks.value.map(e=>({...e,name:e.name,value:[null,void 0,NaN].includes(e.absoluteValues[t])?null:e.absoluteValues[t],color:e.color,type:e.type}));e?(L.value=t,B.value.events.datapointEnter&&B.value.events.datapointEnter({datapoint:n,seriesIndex:t+G.value.start})):(L.value=null,B.value.events.datapointLeave&&B.value.events.datapointLeave({datapoint:n,seriesIndex:t+G.value.start}))}function kd(){W.value.showTable=!W.value.showTable}function Ad(){W.value.dataLabels.show=!W.value.dataLabels.show}function jd(){W.value.showTooltip=!W.value.showTooltip}function Md(e){pa.value=e,va.value+=1}function Nd(){B.value.responsiveProportionalSizing?(R.value.dataLabels=je({relator:ca.value,adjuster:400,source:U.value.fontSize,threshold:10,fallback:10}),R.value.yAxis=je({relator:N.value,adjuster:1e3,source:U.value.axis.fontSize,threshold:10,fallback:10}),R.value.xAxis=je({relator:N.value,adjuster:1e3,source:U.value.xAxisLabels.fontSize,threshold:10,fallback:10}),R.value.plotLabels=je({relator:N.value,adjuster:800,source:V.value.labels.fontSize,threshold:10,fallback:10}),$a.value.plot=je({relator:N.value,adjuster:800,source:B.value.plot.radius,threshold:1,fallback:1}),$a.value.line=je({relator:N.value,adjuster:800,source:B.value.line.radius,threshold:1,fallback:0}),$a.value.selectedLine=je({relator:N.value,adjuster:800,source:B.value.line.dot.selectedRadius,threshold:1,fallback:0})):(R.value.dataLabels=U.value.fontSize,R.value.yAxis=U.value.axis.fontSize,R.value.xAxis=U.value.xAxisLabels.fontSize,R.value.plotLabels=V.value.labels.fontSize,$a.value.plot=B.value.plot.radius,$a.value.line=B.value.line.radius,$a.value.selectedLine=B.value.line.dot.selectedRadius)}function Pd(){if(Ie(j.dataset)?(_e({componentName:`VueUiXy`,type:`dataset`,debug:uo.value}),go.value=!0):j.dataset.forEach((e,t)=>{[null,void 0].includes(e.name)&&(_e({componentName:`VueUiXy`,type:`datasetSerieAttribute`,property:`name (string)`,index:t,debug:uo.value}),go.value=!0)}),uo.value&&j.dataset.forEach(e=>{e.series.forEach((t,n)=>{ae(t)||console.warn(`VueUiXy has detected an unsafe value in your dataset:\n-----> The serie '${e.name}' contains the value '${t}' at index ${n}.\n'${t}' was converted to null to allow the chart to display.`)})}),Ie(j.dataset)||(go.value=B.value.loading),Ca.value=V.value.userOptions.showOnChartHover,wa.value=V.value.userOptions.keepStateOnChartLeave,Ta.value=!V.value.userOptions.showOnChartHover,lo(),B.value.responsive){let e=Ki.value.parentNode;ia.value&&(aa.value&&ia.value.unobserve(aa.value),ia.value.disconnect(),ia.value=null,aa.value=null);let{height:t,width:n}=e.getBoundingClientRect(),r=null,i=0;V.value.title.show&&qi.value&&(r=qi.value,i=r.getBoundingClientRect().height);let a=null,o=0;V.value.zoom.show&&So.value>6&&oo.value&&Ji.value&&Ji.value.$el&&(a=Ji.value.$el,o=a.getBoundingClientRect().height);let s=null,c=0;V.value.legend.show&&Yi.value&&(s=Yi.value,c=s.getBoundingClientRect().height);let l=0;Xi.value&&(l=Xi.value.getBoundingClientRect().height);let u=0;Zi.value&&(u=Zi.value.getBoundingClientRect().height),ca.value=t-i-c-o-l-u-12,N.value=n,la.value=`0 0 ${N.value<0?10:N.value} ${ca.value<0?10:ca.value}`,Nd();let d=new ResizeObserver(e=>{for(let t of e)i=V.value.title.show&&qi.value?qi.value.getBoundingClientRect().height:0,o=Ji.value&&Ji.value.$el?Ji.value.$el.getBoundingClientRect().height:0,c=Yi.value?Yi.value.getBoundingClientRect().height:0,l=Xi.value?Xi.value.getBoundingClientRect().height:0,u=Zi.value?Zi.value.getBoundingClientRect().height:0,requestAnimationFrame(()=>{ca.value=t.contentRect.height-i-c-o-l-u-12,N.value=t.contentBoxSize[0].inlineSize??t.contentRect.width,la.value=`0 0 ${N.value<0?10:N.value} ${ca.value<0?10:ca.value}`,Nd(),Ja()})});ia.value=d,aa.value=e,d.observe(e)}else ca.value=V.value.height,N.value=V.value.width,R.value.dataLabels=U.value.fontSize,R.value.yAxis=U.value.axis.fontSize,R.value.xAxis=U.value.xAxisLabels.fontSize,R.value.plotLabels=V.value.labels.fontSize,$a.value.plot=B.value.plot.radius,$a.value.line=B.value.line.radius,$a.value.selectedLine=B.value.line.dot.selectedRadius,la.value=`0 0 ${N.value} ${ca.value}`;Ja()}function Fd(e){ua.value={x:e.clientX,y:e.clientY}}Tt(()=>{Pd(),yc(),document.addEventListener(`mousemove`,Fd,{passive:!0}),document.addEventListener(`scroll`,Ks,{passive:!0})}),wt(()=>{document.removeEventListener(`scroll`,Ks,{passive:!0}),document.removeEventListener(`mousemove`,Fd,{passive:!0}),ia.value&&(aa.value&&ia.value.unobserve(aa.value),ia.value.disconnect(),ia.value=null,aa.value=null),Wd(),ll(),Ec(),Qo()});let{detectTimeLabelCollisionNow:Id}=at({timeLabelsEls:ta,timeLabels:X,slicer:G,configRef:B,rotationPath:[`chart`,`grid`,`labels`,`xAxisLabels`,`rotation`],autoRotatePath:[`chart`,`grid`,`labels`,`xAxisLabels`,`autoRotate`,`enable`],isAutoSize:fs,height:ca,width:N,rotation:U.value.xAxisLabels.autoRotate.angle,resizeDebounceMs:0}),Ld=E(!1),Rd=k(null),zd=E(200),Bd=y(()=>L.value??F.value??0),Vd=y(()=>{if(!q.value)return null;if(Se(Aa.value))return Number(Aa.value);let e=Qc.value[0];return Se(e?.point?.x)?Number(e.point.x):null});function Hd(){let e=Math.ceil(zd.value||200);return Math.min(Math.max(e,1),200)}function Ud(){let e=Hd(),t=(q.value&&Se(Vd.value)?zu({x:Vd.value}):Ul(Bd.value))-e/2-(200-e)/2,n=Y.value?.left-(200-e)/2,r=Y.value?.right-(200+e)/2;return m(Math.max(n,Math.min(t,r)))}function Wd(){La.value!==null&&(cancelAnimationFrame(La.value),La.value=null),Fa.value&&Ia.value&&Fa.value.unobserve(Ia.value),Fa.value&&=(Fa.value.disconnect(),null),Ra.value&&=(Ra.value(),null),Ia.value=null}function Gd(e){La.value!==null&&cancelAnimationFrame(La.value),La.value=requestAnimationFrame(()=>{zd.value=Math.min(Math.max(Math.ceil(e||0),1),200),La.value=null})}function Kd(e){Fa.value&&e&&(Ia.value&&Ia.value!==e&&(Fa.value.unobserve(Ia.value),Ia.value=null),e!==Ia.value&&(St(()=>{e.offsetParent!==null&&Gd(e.offsetWidth||e.getBoundingClientRect().width||200)}),Fa.value.observe(e),Ia.value=e))}Tt(()=>{Fa.value=new ResizeObserver(e=>{let t=e.find(e=>e.target===Ia.value)||e[0];t&&Gd(t.contentRect.width||200)}),Ra.value=Mt(e=>{let t=Rd.value;t?(Kd(t),e(()=>{Fa.value&&Ia.value&&Ia.value!==Rd.value&&(Fa.value.unobserve(Ia.value),Ia.value=null)})):Fa.value&&Ia.value&&(Fa.value.unobserve(Ia.value),Ia.value=null)})});let qd=y(()=>{if(q.value){if(!Number.isFinite(Number(Vd.value)))return``}else if([null,void 0].includes(L.value)&&[null,void 0].includes(F.value))return``;let e=(L.value==null?0:L.value)||(F.value==null?0:F.value),t=V.value.timeTag.customFormat;if(Ld.value=!1,q.value){let e=Vd.value;if(o(t))try{let n=t({absoluteIndex:e,seriesIndex:e,datapoint:Tu.value,bars:ed.value,lines:$.value,plots:nd.value,config:B.value});if(typeof n==`string`)return Ld.value=!0,n}catch{console.warn(`Custom format cannot be applied on timeTag.`),Ld.value=!1}return n({v:e,r:U.value.xAxis.rounding})}if(o(t))try{let n=t({absoluteIndex:e+G.value.start,seriesIndex:e,datapoint:Tu.value,bars:ed.value,lines:$.value,plots:nd.value,config:B.value});if(typeof n==`string`)return Ld.value=!0,n}catch{console.warn(`Custom format cannot be applied on timeTag.`),Ld.value=!1}if(!Ld.value)return[null,void 0].includes(X.value[e])?``:U.value.xAxisLabels.datetimeFormatter.enable&&!V.value.timeTag.useDefaultFormat?ud.value(e+G.value.start,V.value.timeTag.timeFormat):X.value[e].text});function Jd({serie:e,plot:t,type:r}){if(!Ft(t.value))return``;let i=n({p:e.prefix||V.value.labels.prefix,v:t.value,s:e.suffix||V.value.labels.suffix,r:B.value[r].labels.rounding}),a=t.datasetXValue,o=q.value&&Se(a)?`x: ${n({v:a,r:U.value.xAxis.rounding})}\ny: ${i}`:_(B.value[r].labels.formatter,t.value,i,{datapoint:t,serie:e});return ee({content:o,fontSize:R.value.plotLabels,fill:B.value[r].labels.color,x:0,y:0})}function Yd({plot:e}){let t=B.value.bar.labels.offsetY,n=Math.abs(Wc(e)),r=e.value<0,i={x:Jc(e)+B.value.bar.labels.offsetX,y:m(e.y)+(B.value.bar.labels.alwaysOnTop?t-(r?n:0):e.value>=0?t:-t*3)};return`translate(${i.x}, ${i.y}) rotate(${B.value.bar.labels.rotation})`}function Xd({plot:e,type:t}){let n=B.value[t].labels.offsetY,r={x:e.x+B.value[t].labels.offsetX,y:m(e.y)+(B.value[t].labels.alwaysOnTop||e.value>=0?n:-n*3)};return`translate(${r.x}, ${r.y}) rotate(${B.value[t].labels.rotation})`}function Zd({plot:e,type:t}){if(B.value[t].labels.textAnchor!=null)return B.value[t].labels.textAnchor;let n=e.value>=0;return B.value[t].labels.rotation===0?`middle`:B.value[t].labels.alwaysOnTop||n?`start`:`end`}let Qd=y(()=>q.value?Se(Aa.value)?zu({x:Number(Aa.value)}):Se($c.value)?$c.value:null:Ul(L.value??F.value??0)),$d=y(()=>V.value.highlighter.crosshairs.show&&dc.value),ef=y(()=>[...$.value,...nd.value,...ed.value].flatMap(e=>(e.plots||[]).map((e,t)=>({plot:e,index:t})).filter(({plot:t,index:n})=>rf(e,t,n)).filter(({plot:e})=>Ft(e.value)).map(({plot:t,index:n})=>({...t,index:t.index??n,serie:e,x:m(e.type===`bar`?Jc(t):t.x),y:m(t.y)})))),tf=y(()=>{if(!$d.value)return null;if(q.value){let e=Qc.value[0],t=e?.point?.raw?.x??e?.point?.x;return Se(t)?{x:Qd.value,text:_(U.value.xAxis.formatter,t,n({v:t,r:V.value.tooltip.roundingValue}))}:null}let e=L.value===null?F.value:L.value;return e==null?null:{x:Ul(e),text:X.value[e]?.text??``}});function nf(e){return U.value.yAxis.position===`right`?Y.value.right:Y.value.left}function rf(e,t,n){return q.value?Qc.value.some(n=>n.datapoint.id===e.id&&n.index===t.index):L.value!==null&&L.value===n||F.value!==null&&F.value===n}function af({serie:e,plot:t,index:n,type:r}){return!t||!Ft(t.value)||!B.value[r].labels.show||!W.value.dataLabels.show?!1:!Object.hasOwn(e,`dataLabels`)||e.dataLabels===!0||rf(e,t,n)}function of(e,t){let n=[];return e.forEach((e,r)=>{(Array.isArray(e.plots)?e.plots:[]).forEach((i,a)=>{af({serie:e,plot:i,index:a,type:t})&&n.push({key:`data_label_${t}_${e.id}_${(i.index??a)+G.value.start}`,serie:e,serieIndex:r,plot:i,plotIndex:a})})}),n}let sf=y(()=>of(ed.value,`bar`)),cf=y(()=>of(nd.value,`plot`)),lf=y(()=>of($.value,`line`));jt(()=>j.dataset,e=>{if(Array.isArray(e)&&e.length>0&&(go.value=!1),V.value.zoom.keepState){let e=So.value;if(e>0){let t=G.value.start,n=G.value.end;if(!gc.value||t===0&&n===0)yc();else{let r=Math.max(0,Math.min(t,e-1)),i=Math.max(r+1,Math.min(n,e));G.value={start:r,end:i},Co.value={start:r,end:i},_c.value=0,vc.value=e}}}else G.value={start:0,end:So.value};oa.value+=1,Sa.value+=1,Ja(),os()},{deep:!0});function uf(e){let t=ye(e);return t?.chart&&delete t.chart.tooltip,JSON.stringify(t)}let df=uf(j.config);jt(()=>j.config,(e,t)=>{let n=uf(e),r=n!==df;df=n;let i=io();r?(mo.value||(B.value=i),Pd(),ba.value+=1,ya.value+=1,lo(),V.value.zoom.keepState&&So.value>0&&(!gc.value||G.value.start===0&&G.value.end===0)&&yc(),os()):(B.value.chart.tooltip=i.chart.tooltip,W.value.showTooltip=B.value.chart.tooltip.show)},{deep:!0});let ff=E(!1),pf=E(!1);function mf(){let e=Ki.value?.parentNode;if(!e){pf.value=ff.value,ff.value=!1;return}let t=e.getBoundingClientRect();pf.value=ff.value,ff.value=t.width>0&&t.height>0}function hf(){return!ff.value||pf.value||gc.value?!1:G.value.start===0&&G.value.end===0}Tt(()=>{mf(),Na.value=new ResizeObserver(()=>{if(mf(),!ff.value)return;let e=!pf.value;Pd(),os(),hf()&&yc(),e&&Rs()}),Ki.value?.parentNode&&Na.value.observe(Ki.value.parentNode)}),jt(B,()=>{lo()},{immediate:!0});let gf=y(()=>qe({config:B,style:V,mutableConfig:W,dialog:zi,accordion:ut,isFullscreen:pa,parent:Ki,maxWidth:800,showTable:()=>B.value.showTable}));jt(()=>W.value.showTable,e=>{B.value.showTable||(e&&B.value.table.useDialog&&ka.value?ka.value.open():ka.value&&ka.value.close&&ka.value.close())});function _f(){W.value.showTable=!1,ra.value&&ra.value.setTableIconState(!1)}let vf=y(()=>Os.value.map(e=>({shape:e.type===`bar`?`square`:e.shape??`circle`,color:e.color,name:e.name}))),yf=y(()=>B.value.chart.backgroundColor),bf=y(()=>B.value.chart.legend),xf=y(()=>B.value.chart.title),{isCallbackImaging:Sf,isCallbackSvg:Cf,generateSvg:wf,onGenerateImage:Tf}=Ke({svg:I,title:xf,legend:bf,legendItems:vf,backgroundColor:yf,getSvgCallback:()=>V.value.userOptions.callbacks.svg,generateImage:ds});async function Ef(){Bi(`copyAlt`,{config:{...B.value,formattedDates:X.value},dataset:{lines:$.value,bars:ed.value,plots:nd.value}}),V.value.userOptions.callbacks.altCopy?await Promise.resolve(V.value.userOptions.callbacks.altCopy({config:{...B.value,formattedDates:X.value},dataset:{lines:$.value,bars:ed.value,plots:nd.value}})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let Df=E(!1);function Of(){G.value.end>G.value.start&&(ja.value=null),Js.value=!0,Df.value=!0}function kf(){gl(),ja.value=null,Sl(),Df.value=!1,Js.value=!1}function Af(e){if(!I.value||fa.value||document.activeElement!==I.value)return;if(gl(),e.key===`Escape`){zo.value&&(ol.value||wo.value)&&(e.preventDefault(),e.stopPropagation(),ll(),Mc());return}let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`;if(!t&&!n||!G.value.end&&G.value.end!==0)return;let r=G.value.end-G.value.start;if(r<=0)return;if(e.preventDefault(),e.stopPropagation(),q.value){let e=nl.value.length;if(!e)return;let r=ja.value;r!==null&&r>=0&&r<e?n?(r+=1,r>=e&&(r=0)):t&&(--r,r<0&&(r=e-1)):r=n?0:e-1,rl(r);return}let i=ja.value,a=Zc.value;i!==null&&i>=0&&i<r?n?(i+=1,i>=r&&(i=0)):t&&(--i,i<0&&(i=r-1)):a!==null&&a>=0&&a<r?(i=n?a+1:a-1,i>=r&&(i=0),i<0&&(i=r-1)):i=n?0:r-1,ja.value=i,jf(i),Od(!0,i)}function jf(e){let t=G.value.end-G.value.start;if(t<=0)return;let n=Y.value.width/t,r=Y.value.left+n*e+n/2,i=Y.value.top+Y.value.height/2,a=Me(r,i,I.value);a&&(Ma.value=a)}let Mf=y(()=>{if(!Ed.value)return null;let e=B.value.table.showSum,t=[B.value.table.columnNames.period].concat(ks.value.map(e=>e.name));return e&&(t=t.concat(B.value.table.columnNames.total)),{headers:t,rows:Ed.value.body}});return Ve({getData:Tl,getImage:El,generatePdf:us,generateImage:ds,generateSvg:wf,generateCsv:Dd,hideSeries:Nl,showSeries:Ml,toggleStack:fc,toggleTable:kd,toggleLabels:Ad,toggleTooltip:jd,toggleAnnotator:Qs,toggleFullscreen:Md,copyAlt:Ef,resetZoom:Mc,setZoomState:as}),jt(()=>[N.value,ca.value,R.value,U.value,V.value.padding,B.value.chart.fontFamily,sc.value,$s.value,Va.value,j.dataset,ga.value,W.value.useIndividualScale,W.value.isStacked,na.value,$i.value,ea.value,ta.value],Ls,{flush:`post`,deep:!0}),(t,r)=>(T(),x(`div`,{id:`vue-ui-xy_${P.value}`,class:C(`vue-data-ui-component vue-ui-xy ${pa.value?`vue-data-ui-wrapper-fullscreen`:``} ${B.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`chart`,ref:Ki,style:w(`background:${V.value.backgroundColor}; color:${V.value.color};width:100%;font-family:${V.value.fontFamily};${B.value.responsive?`height: 100%`:``}`),onMouseenter:Xs,onMouseleave:Zs},[S(`div`,{id:`chart-instructions-${P.value}`,class:`sr-only`},[S(`p`,null,Dt(B.value.a11y.translations.keyboardNavigation),1)],8,Kt),Mf.value?.rows?.length?(T(),mt(ft,{key:0,uid:P.value,head:Mf.value.headers,body:Mf.value.rows,notice:B.value.a11y.translations.tableAvailable,caption:B.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):b(``,!0),V.value.userOptions.buttons.annotator&&I.value?(T(),mt(A(Ri),{key:1,showGroupActions:V.value.userOptions.annotator?.showGroupActions??!0,svgRef:I.value,followZoom:V.value.userOptions.annotator?.followZoom,annotationViewport:Xo.value,backgroundColor:V.value.backgroundColor,color:V.value.color,active:fa.value,isCursorPointer:co.value,palette:V.value.userOptions.annotatorPalette,onClose:Qs},ht({_:2},[D(A(Ye),e=>({name:e,fn:Nt(n=>[O(t.$slots,e,Ct(bt(A(Je)(e,n))),void 0,!0)])}))]),1032,[`showGroupActions`,`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):b(``,!0),Il.value?(T(),x(`div`,{key:2,ref_key:`noTitle`,ref:Zi,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%; background:transparent`},null,512)):b(``,!0),V.value.title.show?(T(),x(`div`,{key:3,ref_key:`chartTitle`,ref:qi,class:`vue-ui-xy-title`,style:w(`font-family:${V.value.fontFamily}`)},[(T(),mt(Ge,{key:`title_${ba.value}`,config:{title:{cy:`xy-div-title`,...V.value.title},subtitle:{cy:`xy-div-subtitle`,...V.value.title.subtitle}}},null,8,[`config`]))],4)):b(``,!0),S(`div`,{id:`legend-top-${P.value}`},null,8,qt),V.value.userOptions.show&&(wa.value||Ta.value)?(T(),mt(A(Pi),{ref_key:`userOptionsRef`,ref:ra,key:`user_options_${va.value}`,backgroundColor:V.value.backgroundColor,color:V.value.color,isPrinting:A(cs),isImaging:A(ls),uid:P.value,hasTooltip:V.value.userOptions.buttons.tooltip&&V.value.tooltip.show,hasPdf:V.value.userOptions.buttons.pdf,hasXls:V.value.userOptions.buttons.csv,hasImg:V.value.userOptions.buttons.img,hasSvg:V.value.userOptions.buttons.svg,hasLabel:V.value.userOptions.buttons.labels,hasTable:V.value.userOptions.buttons.table,hasStack:e.dataset.length>1&&V.value.userOptions.buttons.stack,hasFullscreen:V.value.userOptions.buttons.fullscreen,hasAltCopy:V.value.userOptions.buttons.altCopy,isStacked:W.value.isStacked,isFullscreen:pa.value,chartElement:t.$refs.chart,position:V.value.userOptions.position,isTooltip:W.value.showTooltip,titles:{...V.value.userOptions.buttonTitles},hasAnnotator:V.value.userOptions.buttons.annotator,isAnnotation:fa.value,callbacks:V.value.userOptions.callbacks,tableDialog:B.value.table.useDialog,printScale:V.value.userOptions.print.scale,isCursorPointer:co.value,onToggleFullscreen:Md,onGeneratePdf:A(us),onGenerateCsv:Dd,onGenerateImage:A(Tf),onGenerateSvg:A(wf),onToggleTable:kd,onToggleLabels:Ad,onToggleStack:fc,onToggleTooltip:jd,onToggleAnnotator:Qs,onCopyAlt:Ef,style:w({visibility:wa.value?Ta.value?`visible`:`hidden`:`visible`})},ht({_:2},[D(A(Xe)(t.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:Nt(n=>[O(t.$slots,e,Ct(bt(A(Ze)(e,n))),void 0,!0)])})),t.$slots.optionStack?{name:`optionStack`,fn:Nt(({isStack:e})=>[O(t.$slots,`optionStack`,Ct(bt({isStack:e})),void 0,!0)]),key:`0`}:void 0]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasLabel.hasTable.hasStack.hasFullscreen.hasAltCopy.isStacked.isFullscreen.chartElement.position.isTooltip.titles.hasAnnotator.isAnnotation.callbacks.tableDialog.printScale.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):b(``,!0),S(`div`,Jt,[(T(),x(`svg`,{ref_key:`svgRef`,ref:I,xmlns:`http://www.w3.org/2000/svg`,class:C([{"vue-data-ui-fullscreen--on":pa.value,"vue-data-ui-fulscreen--off":!pa.value,"vue-data-ui-no-transition":!A(so)||A(Is),"vue-ui-xy-chart-zoom-pointer-focus":zo.value&&To.value},`vue-ui-xy-svg vue-data-ui-svg`]),width:`100%`,viewBox:la.value,style:w({visibility:A(Fs)?`visible`:`hidden`,background:`transparent`,color:V.value.color,fontFamily:V.value.fontFamily,cursor:zo.value?wo.value?`col-resize`:`crosshair`:void 0,touchAction:zo.value?`pan-y`:void 0,userSelect:zo.value?`none`:void 0,overflow:`visible`}),"aria-label":Pl.value,"aria-describedby":`chart-instructions-${P.value}`,"aria-live":`polite`,role:`img`,tabindex:`0`,preserveAspectRatio:`xMidYMid`,onMousemove:xl,onMouseleave:Sl,onClick:Cl,onPointerdown:_l,onPointermove:vl,onPointerup:yl,onPointercancel:ll,onFocus:Of,onBlur:kf,onKeydown:Af},[S(`g`,{ref_key:`G`,ref:Qi,class:`vue-data-ui-g`},[_t(A(Li)),O(t.$slots,`svg-underlayer`,{svg:{...Ya.value,slicer:G.value,isPrintingImg:A(cs)||A(ls)||A(Sf),isPrintingSvg:A(Cf),data:rd.value,drawingArea:Y.value}},void 0,!0),S(`defs`,null,[S(`clipPath`,{id:`vue_ui_xy_zoom_clip_${P.value}`},[S(`rect`,{x:Y.value.left,y:Y.value.top,width:Math.max(0,Y.value.width),height:Math.max(0,Y.value.height)},null,8,Zt)],8,Xt)]),t.$slots[`chart-background`]?(T(),x(`foreignObject`,{key:0,x:Math.max(0,Y.value?.left),y:Y.value?.top,width:Math.max(0,Y.value?.width),height:Math.max(0,Y.value?.height),style:{pointerEvents:`none`}},[O(t.$slots,`chart-background`,{},void 0,!0)],8,Qt)):b(``,!0),Z.value>0?(T(),x(`g`,$t,[S(`g`,en,[U.value.xAxis.showBaseline?(T(),x(`line`,{key:0,stroke:H.value.stroke,"stroke-width":`1`,x1:Y.value?.left,x2:Y.value?.right,y1:A(g)(Y.value?.bottom),y2:A(g)(Y.value?.bottom),"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,tn)):b(``,!0),W.value.useIndividualScale?H.value.showHorizontalLines?(T(!0),x(v,{key:2},D(ad.value,e=>(T(),x(`g`,{key:`individual_grid_${e.groupId||e.id}`},[e.id===M.value&&e.yLabels.length?(T(!0),x(v,{key:0},D(e.yLabels,t=>(T(),x(`line`,{key:`selected_individual_grid_line_${e.groupId||e.id}_${t.value}_${t.y}`,x1:Y.value?.left,x2:Y.value?.right,y1:A(g)(t.y),y2:A(g)(t.y),stroke:e.color,"stroke-width":.5,"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,on))),128)):e.yLabels.length?(T(!0),x(v,{key:1},D(e.yLabels,t=>(T(),x(`line`,{key:`individual_grid_line_${e.groupId||e.id}_${t.value}_${t.y}`,x1:Y.value?.left,x2:Y.value?.right,y1:A(g)(t.y),y2:A(g)(t.y),stroke:e.stroke,"stroke-width":.5,"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,sn))),128)):b(``,!0)]))),128)):b(``,!0):(T(),x(v,{key:1},[U.value.yAxis.showBaseline?(T(),x(`line`,{key:0,class:`vue-ui-xy-y-axis`,stroke:H.value.stroke,"stroke-width":`1`,x1:J.value?Y.value?.right:Y.value?.left,x2:J.value?Y.value?.right:Y.value?.left,y1:A(g)(Y.value?.top),y2:A(g)(Y.value?.bottom),"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,nn)):b(``,!0),H.value.showHorizontalLines?(T(),x(`g`,rn,[(T(!0),x(v,null,D(Eu.value,e=>(T(),x(`line`,{key:`horizontal_grid_line_${e.value}_${e.y}`,x1:Y.value?.left,x2:Y.value?.right,y1:A(g)(e.y),y2:A(g)(e.y),stroke:H.value.stroke,"stroke-width":.5,"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,an))),128))])):b(``,!0)],64)),H.value.showVerticalLines?(T(),x(`g`,cn,[S(`path`,{d:Hs.value,"stroke-width":.5,stroke:H.value.stroke,"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,ln)])):b(``,!0),U.value.xAxisLabels.show?(T(),x(`g`,un,[S(`path`,{d:Us.value,stroke:H.value.stroke,"stroke-width":1,"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,dn)])):b(``,!0)]),(T(!0),x(v,null,D(ed.value,(e,n)=>(T(),x(`defs`,{key:`def_rect_${n}`},[t.$slots[`bar-gradient`]?O(t.$slots,`bar-gradient`,xt({ref_for:!0},{series:e,positiveId:`rectGradient_pos_${n}_${P.value}`,negativeId:`rectGradient_neg_${n}_${P.value}`}),void 0,!0,0):(T(),x(v,{key:1},[_t(ct,{t:`linear`,id:`rectGradient_pos_${n}_${P.value}`,x2:`0%`,y2:`100%`,stops:[[`0%`,e.color,1],[`62%`,A(me)(e.color,.02),1],[`100%`,A(me)(e.color,.05),1]]},null,8,[`id`,`stops`]),_t(ct,{t:`linear`,id:`rectGradient_neg_${n}_${P.value}`,x2:`0%`,y2:`100%`,stops:[[`0%`,A(me)(e.color,.05),1],[`38%`,A(me)(e.color,.02),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`])],64))]))),128)),(T(!0),x(v,null,D(nd.value,(e,t)=>(T(),x(`defs`,{key:`def_plot_${t}`},[_t(ct,{t:`radial`,id:`plotGradient_${t}_${P.value}`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,stops:[[`0%`,A(me)(e.color,.05),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`])]))),128)),(T(!0),x(v,null,D($.value,(e,n)=>(T(),x(v,{key:`def_line_${e.id}`},[S(`defs`,null,[_t(ct,{t:`radial`,id:`lineGradient_${n}_${P.value}`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,stops:[[`0%`,A(me)(e.color,.05),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]),t.$slots[`area-gradient`]?O(t.$slots,`area-gradient`,xt({ref_for:!0},{series:e,id:`areaGradient_${n}_${P.value}`}),void 0,!0,0):(T(),mt(ct,{key:1,t:`linear`,id:`areaGradient_${n}_${P.value}`,x1:`0%`,x2:`100%`,y1:`0%`,y2:`0%`,stops:[[`0%`,A(f)(A(me)(e.color,.03),B.value.line.area.opacity),1],[`100%`,A(f)(e.color,B.value.line.area.opacity),1]]},null,8,[`id`,`stops`]))]),e.temperatureColors&&!e.isFlatTemperatureLine?(T(),x(`defs`,fn,[S(`linearGradient`,{id:`temperature_grad_line_${n}_${P.value}`,gradientTransform:`rotate(90)`},[(T(!0),x(v,null,D(e.temperatureColors,(t,r)=>(T(),x(`stop`,{key:`temperature_grad_stop_${n}_${r}_${P.value}`,"stop-color":t,offset:A(ke)(r,e.temperatureColors.length)},null,8,mn))),128))],8,pn)])):b(``,!0)],64))),128)),(T(!0),x(v,null,D(Ll.value,e=>(T(),x(`g`,{key:`highlight_area_${e.from}_${e.span}_${e.color}`},[e.show?(T(),x(v,{key:0},[(T(!0),x(v,null,D(e.span,(t,n)=>(T(),x(`g`,{key:`highlight_area_rect_${e.from}_${n}`},[S(`rect`,{style:w({transition:`none`,opacity:+(e.from+n>=G.value.start&&e.from+n<=G.value.end-1)}),x:Gl(e.from+n-G.value.start),y:Y.value?.top,height:Y.value.height<0?10:Y.value.height,width:Kl(e.from+n-G.value.start),fill:A(f)(e.color,e.opacity)},null,12,hn)]))),128)),(T(!0),x(v,null,D(e.span,(t,n)=>(T(),x(`g`,{key:`highlight_area_caption_${e.from}_${n}`},[e.caption.text&&n===0?(T(),x(`foreignObject`,{key:0,x:Gl(e.from+n-G.value.start)-(e.caption.width===`auto`?0:e.caption.width/2-Yl(e.span)/2),y:Y.value?.top+e.caption.offsetY,style:w({overflow:`visible`,opacity:+(e.to>=G.value.start&&e.from<G.value.end)}),height:`1`,width:e.caption.width===`auto`?Yl(e.span):e.caption.width},[S(`div`,{style:w(`padding:${e.caption.padding}px;text-align:${e.caption.textAlign};font-size:${e.caption.fontSize}px;color:${e.caption.color};font-weight:${e.caption.bold?`bold`:`normal`}`)},Dt(e.caption.text),5)],12,gn)):b(``,!0)]))),128))],64)):b(``,!0)]))),128)),Js.value&&!q.value?(T(),x(`g`,_n,[(T(!0),x(v,null,D(Z.value,(e,t)=>(T(),x(`g`,{key:`tooltip_trap_highlighter_${t}`},[S(`rect`,{x:Gl(t),y:Y.value?.top,height:Y.value.height<0?10:Y.value.height,width:Jl(t),fill:[F.value,L.value,ha.value].includes(t)?A(f)(V.value.highlighter.color,V.value.highlighter.crosshairs.show?0:V.value.highlighter.opacity):`transparent`,style:{transition:`none !important`,animation:`none !important`}},null,8,vn)]))),128))])):b(``,!0),S(`g`,{"clip-path":rs.value},[S(`g`,{class:C([`vue-ui-xy-zoom-geometry`,{"vue-ui-xy-zoom-geometry--transitioning":Eo.value}]),style:w(ts.value)},[ed.value.length?(T(!0),x(v,{key:0},D(ed.value,(e,n)=>(T(),x(`g`,{key:`serie_bar_${e.id}`,class:C(`serie_bar_${n}`),style:w(`opacity:${M.value?M.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(T(!0),x(v,null,D(e.plots,(r,i)=>(T(),x(`g`,{key:`bar_plot_${n}_${i}`},[A(Ft)(r.value)?(T(),x(`rect`,{key:0,x:qc(r)+fu.value/2,y:W.value.useIndividualScale?Xc(r):Yc(r),height:W.value.useIndividualScale?Math.abs(Wc(r)):Math.abs(Uc(r)),width:du.value-fu.value,rx:B.value.bar.borderRadius,fill:B.value.bar.useGradient?r.value>=0?`url(#rectGradient_pos_${n}_${P.value})`:`url(#rectGradient_neg_${n}_${P.value})`:e.color,stroke:B.value.bar.border.useSerieColor?e.color:B.value.bar.border.stroke,"stroke-width":B.value.bar.border.strokeWidth,style:w({transition:A(mo)||Eo.value||!B.value.bar.showTransition?void 0:`all ${B.value.bar.transitionDurationMs}ms ease-in-out`})},null,12,bn)):b(``,!0),A(Ft)(r.value)&&t.$slots.pattern?(T(),x(`rect`,{key:1,x:qc(r)-fu.value/2,y:W.value.useIndividualScale?Xc(r):Yc(r),height:W.value.useIndividualScale?Math.abs(Wc(r)):Math.abs(Uc(r)),width:du.value-fu.value,rx:B.value.bar.borderRadius,fill:`url(#pattern_${P.value}_${e.slotAbsoluteIndex})`,stroke:B.value.bar.border.useSerieColor?e.color:B.value.bar.border.stroke,"stroke-width":B.value.bar.border.strokeWidth,style:w({transition:A(mo)||Eo.value||!B.value.bar.showTransition?void 0:`all ${B.value.bar.transitionDurationMs}ms ease-in-out`})},null,12,xn)):b(``,!0),r.comment&&V.value.comments.show?(T(),x(`foreignObject`,{key:2,style:{overflow:`visible`},height:`12`,width:du.value+V.value.comments.width,x:qc(r)-V.value.comments.width/2+V.value.comments.offsetX,y:A(m)(r.y)+V.value.comments.offsetY+6},[O(t.$slots,`plot-comment`,{plot:{...r,color:e.color,seriesIndex:n,datapointIndex:i}},void 0,!0)],8,Sn)):b(``,!0)]))),128))],6))),128)):b(``,!0)],6)],8,yn),!W.value.useIndividualScale&&U.value.zeroLine.show?(T(),x(`line`,{key:1,stroke:H.value.stroke,"stroke-width":`1`,x1:Y.value?.left,x2:Y.value?.right,y1:A(g)(Hc.value),y2:A(g)(Hc.value),"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,Cn)):b(``,!0),!V.value.highlighter.crosshairs.show&&(V.value.highlighter.useLine||q.value)&&dc.value?(T(),x(`g`,wn,[S(`line`,{x1:Qd.value,x2:Qd.value,y1:A(g)(Y.value?.top),y2:A(g)(Y.value?.bottom),stroke:V.value.highlighter.color,"stroke-width":V.value.highlighter.lineWidth,"stroke-dasharray":V.value.highlighter.lineDasharray,"stroke-linecap":`round`,style:{transition:`none !important`,animation:`none !important`,"pointer-events":`none`}},null,8,Tn)])):b(``,!0),$d.value?(T(),x(`g`,En,[(T(!0),x(v,null,D(ef.value,e=>(T(),x(`g`,{key:`crosshair_${e.serie.id}_${e.index}`},[S(`line`,{x1:V.value.highlighter.crosshairs.stopOnPoint?A(g)(e.x):Y.value.left,x2:V.value.highlighter.crosshairs.stopOnPoint?A(g)(nf(e.x)):Y.value.right,y1:A(g)(e.y),y2:A(g)(e.y),stroke:V.value.highlighter.crosshairs.stroke,"stroke-width":V.value.highlighter.crosshairs.strokeWidth,"stroke-dasharray":V.value.highlighter.crosshairs.strokeDasharray,"stroke-linecap":`round`,style:{"pointer-events":`none`}},null,8,Dn),S(`line`,{x1:A(g)(e.x),x2:A(g)(e.x),y1:V.value.highlighter.crosshairs.stopOnPoint?A(g)(e.y):Y.value.top,y2:V.value.highlighter.crosshairs.stopOnPoint?A(g)(Y.value.bottom):Y.value.bottom,stroke:V.value.highlighter.crosshairs.stroke,"stroke-width":V.value.highlighter.crosshairs.strokeWidth,"stroke-dasharray":V.value.highlighter.crosshairs.strokeDasharray,"stroke-linecap":`round`,style:{"pointer-events":`none`}},null,8,On),S(`circle`,{cx:A(g)(nf(e.x)),cy:A(g)(e.y),r:V.value.highlighter.crosshairs.dot.radius,fill:V.value.highlighter.crosshairs.dot.fill,stroke:V.value.highlighter.crosshairs.dot.stroke,"stroke-width":V.value.highlighter.crosshairs.dot.strokeWidth,style:{"pointer-events":`none`}},null,8,kn)]))),128))])):b(``,!0),H.value.frame.show?(T(),x(`rect`,{key:4,style:{pointerEvents:`none`,transition:`none`,animation:`none !important`},x:Math.max(0,Y.value?.left),y:Y.value?.top,width:Math.max(0,Y.value?.width),height:Y.value.height<0?0:Y.value.height,fill:`transparent`,stroke:H.value.frame.stroke,"stroke-width":H.value.frame.strokeWidth,"stroke-linecap":H.value.frame.strokeLinecap,"stroke-linejoin":H.value.frame.strokeLinejoin,"stroke-dasharray":H.value.frame.strokeDasharray},null,8,An)):b(``,!0),U.value.show?(T(),x(`g`,{key:5,ref_key:`scaleLabels`,ref:na,opacity:$d.value?.2:1,style:{transition:`opacity 0.2s`}},[W.value.useIndividualScale?(T(),x(v,{key:0},[(T(!0),x(v,null,D(ad.value,e=>(T(),x(`g`,{key:`individual_scale_axis_${e.groupId||e.id}`},[S(`line`,{x1:W.value.isStacked?J.value?Y.value.right:Y.value.left:J.value?e.x:e.x-Y.value.individualOffsetX,x2:W.value.isStacked?J.value?Y.value.right:Y.value.left:J.value?e.x:e.x-Y.value.individualOffsetX,y1:W.value.isStacked?A(g)(Y.value?.bottom-e.yOffset-e.individualHeight):A(g)(Y.value?.top),y2:W.value.isStacked?A(g)(Y.value?.bottom-e.yOffset):A(g)(Y.value?.bottom),stroke:e.color,"stroke-width":H.value.stroke,"stroke-linecap":`round`,style:w(`opacity:${M.value?M.value===e.groupId?1:.3:1};transition:opacity 0.2s ease-in-out; animation: none !important`)},null,12,Mn)]))),128)),(T(!0),x(v,null,D(ad.value,e=>(T(),x(`g`,{key:`individual_scale_label_${e.groupId||e.id}`,style:w(`opacity:${M.value?M.value===e.groupId?1:.3:1};transition:opacity 0.2s ease-in-out`)},[S(`text`,{class:C({"vue-data-ui-transition":A(so)&&!A(Is)}),fill:e.color,"font-size":R.value.dataLabels*.8,"text-anchor":`middle`,transform:`translate(${W.value.isStacked?J.value?Y.value.right+H.value.labels.yAxis.crosshairSize+H.value.labels.yAxis.scaleValueOffsetX+5+H.value.labels.yAxis.labelWidth+Y.value.individualOffsetX+H.value.labels.axis.yLabelOffsetX:Y.value.left-H.value.labels.yAxis.crosshairSize-H.value.labels.yAxis.scaleValueOffsetX-H.value.labels.yAxis.labelWidth-H.value.labels.axis.yLabelOffsetX:J.value?e.x+H.value.labels.yAxis.crosshairSize+H.value.labels.yAxis.scaleValueOffsetX+5+H.value.labels.yAxis.labelWidth+H.value.labels.axis.yLabelOffsetX:e.x-R.value.dataLabels*.8/2}, ${W.value.isStacked?Y.value?.bottom-e.yOffset-e.individualHeight/2:Y.value?.top+Y.value.height/2}) rotate(-90)`},Dt(e.name)+` `+Dt(e.scaleLabel&&e.unique&&e.scaleLabel!==e.id?`- ${e.scaleLabel}`:``),11,Nn),(T(!0),x(v,null,D(e.yLabels,(t,n)=>(T(),x(v,{key:`individual_scale_y_crosshair_${e.groupId||e.id}_${t.value}_${n}`},[U.value.yAxis.showCrosshairs?(T(),x(`line`,{key:0,x1:W.value.isStacked?J.value?Y.value.right:Y.value.left:J.value?e.x:e.x+3-H.value.labels.yAxis.crosshairSize-Y.value.individualOffsetX,x2:W.value.isStacked?J.value?Y.value.right+V.value.grid.labels.yAxis.crosshairSize:Y.value.left-V.value.grid.labels.yAxis.crosshairSize:J.value?e.x+H.value.labels.yAxis.crosshairSize:e.x-Y.value.individualOffsetX,y1:A(g)(t.y),y2:A(g)(t.y),stroke:e.color,"stroke-width":1,"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,Pn)):b(``,!0)],64))),128)),(T(!0),x(v,null,D(e.yLabels,(t,r)=>(T(),x(`text`,{class:C({"vue-data-ui-transition":A(so)&&!A(Is)}),key:`individual_scale_y_label_${e.groupId||e.id}_${t.value}_${r}`,transform:`translate(${W.value.isStacked?J.value?Y.value.right+H.value.labels.yAxis.crosshairSize+H.value.labels.yAxis.scaleValueOffsetX+5:Y.value.left-H.value.labels.yAxis.crosshairSize-H.value.labels.yAxis.scaleValueOffsetX-5:J.value?e.x+H.value.labels.yAxis.crosshairSize+H.value.labels.yAxis.scaleValueOffsetX+5:e.x-5-Y.value.individualOffsetX}, ${A(g)(t.y)+R.value.dataLabels/3})`,"text-anchor":J.value?`start`:`end`,"font-size":R.value.dataLabels,fill:e.color},Dt(A(_)(U.value.yAxis.formatter,t.value,A(n)({p:t.prefix,v:t.value,s:t.suffix,r:H.value.labels.yAxis.rounding}),{datapoint:t.datapoint,seriesIndex:r})),11,Fn))),128))],4))),128))],64)):(T(!0),x(v,{key:1},D(Eu.value,(e,t)=>(T(),x(`g`,{key:`yLabel_${t}`},[A(Ft)(e)&&e.value>=K.value.min&&e.value<=K.value.max&&U.value.yAxis.showCrosshairs?(T(),x(`line`,{key:0,x1:J.value?Y.value?.right:Y.value?.left,x2:J.value?Y.value?.right+U.value.yAxis.crosshairSize:Y.value?.left-U.value.yAxis.crosshairSize,y1:A(g)(e.y),y2:A(g)(e.y),stroke:H.value.stroke,"stroke-width":`1`,"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,In)):b(``,!0),e.value>=K.value.min&&e.value<=K.value.max?(T(),x(`text`,{key:1,class:C({"vue-data-ui-transition":A(so)&&!A(Is)}),transform:`translate(${J.value?Y.value.right+U.value.yAxis.crosshairSize+U.value.yAxis.scaleValueOffsetX+5:Y.value.scaleLabelX-U.value.yAxis.crosshairSize}, ${A(m)(e.y+R.value.dataLabels/3)})`,"font-size":R.value.dataLabels,"text-anchor":J.value?`start`:`end`,fill:U.value.color},Dt(A(Ft)(e.value)?A(_)(H.value.labels.yAxis.formatter,e.value,A(n)({p:e.prefix,v:e.value,s:e.suffix,r:V.value.grid.labels.yAxis.rounding})):``),11,Ln)):b(``,!0)]))),128))],8,jn)):b(``,!0),$d.value?(T(),x(`g`,Rn,[(T(!0),x(v,null,D(ef.value,e=>(T(),x(`text`,{class:C({"vue-data-ui-transition":A(so)&&!A(Is)}),key:`crosshair_y_label_${e.serie.id}_${e.index}`,transform:`translate(${J.value?Y.value.right+U.value.yAxis.crosshairSize+U.value.yAxis.scaleValueOffsetX+5:Y.value.scaleLabelX-U.value.yAxis.crosshairSize}, ${A(g)(e.y)+R.value.dataLabels/3})`,"font-size":R.value.dataLabels,"text-anchor":J.value?`start`:`end`,fill:U.value.color,style:{transition:`none !important`,animation:`none !important`,"pointer-events":`none`}},Dt(A(_)(U.value.yAxis.formatter,e.value,A(n)({p:e.serie.prefix||V.value.labels.prefix,v:e.value,s:e.serie.suffix||V.value.labels.suffix,r:U.value.yAxis.rounding}),{datapoint:e.serie,seriesIndex:e.index})),11,zn))),128))])):b(``,!0),tf.value?(T(),x(`g`,Bn,[S(`circle`,{cx:Qd.value,cy:A(g)(Y.value?.bottom),r:V.value.highlighter.crosshairs.dot.radius,fill:V.value.highlighter.crosshairs.dot.fill,stroke:V.value.highlighter.crosshairs.dot.stroke,"stroke-width":V.value.highlighter.crosshairs.dot.strokeWidth,style:{transition:`none !important`,animation:`none !important`,"pointer-events":`none`}},null,8,Vn)])):b(``,!0),S(`g`,{"clip-path":rs.value},[(T(!0),x(v,null,D(nd.value,(e,n)=>(T(),x(`g`,{key:`serie_plot_${e.id}`,class:C(`serie_plot_${n}`),style:w(`opacity:${M.value?M.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(T(!0),x(v,null,D(e.plots,(r,i)=>(T(),x(`g`,{key:`circle_plot_${e.id}_${i}`,style:w(ns(r))},[r&&A(Ft)(r.value)?(T(),mt(st,{key:0,shape:[`triangle`,`square`,`diamond`,`pentagon`,`hexagon`,`star`].includes(e.shape)?e.shape:`circle`,color:B.value.plot.useGradient?`url(#plotGradient_${n}_${P.value})`:B.value.plot.dot.useSerieColor?e.color:B.value.plot.dot.fill,plot:{x:A(m)(r.x),y:A(m)(r.y)},radius:rf(e,r,i)?($a.value.plot||6)*1.5:(Ou(e.plots,i),$a.value.plot||6),stroke:B.value.plot.dot.useSerieColor?V.value.backgroundColor:e.color,strokeWidth:B.value.plot.dot.strokeWidth,transition:A(mo)||Eo.value||xc.value||!B.value.plot.showTransition?void 0:`all ${B.value.plot.transitionDurationMs}ms ease-in-out`,still:xc.value||Eo.value},null,8,[`shape`,`color`,`plot`,`radius`,`stroke`,`strokeWidth`,`transition`,`still`])):b(``,!0),r.comment&&V.value.comments.show?(T(),x(`foreignObject`,{key:1,style:{overflow:`visible`},height:`12`,width:V.value.comments.width,x:r.x-V.value.comments.width/2+V.value.comments.offsetX,y:r.y+V.value.comments.offsetY+6},[S(`div`,Wn,[O(t.$slots,`plot-comment`,{plot:{...r,color:e.color,seriesIndex:n,datapointIndex:i}},void 0,!0)])],8,Un)):b(``,!0)],4))),128))],6))),128)),S(`g`,{class:C([`vue-ui-xy-zoom-geometry`,{"vue-ui-xy-zoom-geometry--transitioning":Eo.value}]),style:w(ts.value)},[(T(!0),x(v,null,D($.value,(e,t)=>(T(),x(`g`,{key:`serie_line_${e.id}`,class:C(`serie_line_${t}`),style:w(`opacity:${M.value?M.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[e.hasDashedSegments?(T(),x(v,{key:0},[e.useStepper?(T(!0),x(v,{key:0},D(e.dashedStepper,(t,n)=>(T(),x(`path`,{"vector-effect":`non-scaling-stroke`,key:`line_coating_stepper_segment_${e.id}_${n}`,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M ${t.path}`,stroke:V.value.backgroundColor,"stroke-width":z(B.value.line.strokeWidth+1),"stroke-dasharray":e.dashed||t.dashed?z(B.value.line.strokeWidth*2):0,style:w({transition:Pu()})},null,12,Gn))),128)):e.smooth?(T(!0),x(v,{key:1},D(e.dashedSmooth,(t,n)=>(T(),x(`path`,{"vector-effect":`non-scaling-stroke`,key:`line_coating_smooth_segment_${e.id}_${n}`,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M ${t.path}`,stroke:V.value.backgroundColor,"stroke-width":z(B.value.line.strokeWidth+1),"stroke-dasharray":e.dashed||t.dashed?z(B.value.line.strokeWidth*2):0,style:w({transition:Pu()})},null,12,Kn))),128)):(T(!0),x(v,{key:2},D(e.dashedStraight,(t,n)=>(T(),x(`path`,{"vector-effect":`non-scaling-stroke`,key:`line_coating_straight_segment_${e.id}_${n}`,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M ${t.path}`,stroke:V.value.backgroundColor,"stroke-width":z(B.value.line.strokeWidth+1),"stroke-dasharray":e.dashed||t.dashed?z(B.value.line.strokeWidth*2):0,style:w({transition:Pu()})},null,12,qn))),128))],64)):e.smooth&&e.plots.length>1&&e.curve?(T(),x(`path`,{key:1,"vector-effect":`non-scaling-stroke`,d:`M${e.curve}`,stroke:V.value.backgroundColor,"stroke-width":z(B.value.line.strokeWidth+1),"stroke-dasharray":e.dashed?z(B.value.line.strokeWidth*2):0,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:w({transition:Pu()})},null,12,Jn)):e.plots.length>1&&e.straight?(T(),x(`path`,{key:2,"vector-effect":`non-scaling-stroke`,d:`M${e.straight}`,stroke:V.value.backgroundColor,"stroke-width":z(B.value.line.strokeWidth+1),"stroke-dasharray":e.dashed?z(B.value.line.strokeWidth*2):0,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:w({transition:Pu()})},null,12,Yn)):b(``,!0)],6))),128)),t.$slots.pattern?(T(),x(`defs`,Xn,[(T(!0),x(v,null,D(Ds.value,(e,n)=>O(t.$slots,`pattern`,xt({key:`serie_pattern_slot_${e.id}`},{ref_for:!0},{...e,seriesIndex:e.slotAbsoluteIndex,patternId:`pattern_${P.value}_${n}`}),void 0,!0)),128))])):b(``,!0),od.value.length&&!W.value.isStacked?(T(),x(`g`,Zn,[(T(!0),x(v,null,D(od.value,e=>(T(),x(`path`,{key:e.key,d:e.d,fill:e.color,"fill-opacity":B.value.line.interLine.fillOpacity,stroke:`none`,"pointer-events":`none`,style:w({transition:Pu()})},null,12,Qn))),128))])):b(``,!0),(T(!0),x(v,null,D($.value,(e,n)=>(T(),x(`g`,{key:`serie_line_above_${e.id}`,class:C(`serie_line_${n}`),style:w(`opacity:${M.value?M.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[e.useArea&&e.plots.length>1?(T(),x(`g`,$n,[e.smooth?(T(!0),x(v,{key:0},D(e.curveAreas,(r,i)=>(T(),x(v,{key:i},[r?(T(),x(`path`,{key:0,d:r,fill:B.value.line.area.useGradient?`url(#areaGradient_${n}_${P.value})`:A(f)(e.color,B.value.line.area.opacity),style:w({transition:Pu()})},null,12,er)):b(``,!0),t.$slots.pattern&&r?(T(),x(`path`,{key:1,d:r,fill:`url(#pattern_${P.value}_${e.slotAbsoluteIndex})`,style:w({transition:Pu()})},null,12,tr)):b(``,!0)],64))),128)):(T(!0),x(v,{key:1},D(e.area.split(`;`),(r,i)=>(T(),x(v,{key:i},[r?(T(),x(`path`,{key:0,d:`M${r}Z`,fill:B.value.line.area.useGradient?`url(#areaGradient_${n}_${P.value})`:A(f)(e.color,B.value.line.area.opacity),style:w({transition:Pu()})},null,12,nr)):b(``,!0),t.$slots.pattern&&r?(T(),x(`path`,{key:1,d:`M${r}Z`,fill:`url(#pattern_${P.value}_${e.slotAbsoluteIndex})`,style:w({transition:Pu()})},null,12,rr)):b(``,!0)],64))),128))])):b(``,!0),!e.hasDashedSegments&&e.smooth&&e.plots.length>1&&e.curve?(T(),x(`path`,{key:1,"vector-effect":`non-scaling-stroke`,d:`M${e.curve}`,stroke:e.temperatureColors&&!e.isFlatTemperatureLine?`url(#temperature_grad_line_${n}_${P.value})`:e.color,"stroke-width":z(B.value.line.strokeWidth),"stroke-dasharray":e.dashed?z(B.value.line.strokeWidth*2):0,fill:`none`,"stroke-linecap":`round`,style:w({transition:Pu()})},null,12,ir)):e.hasDashedSegments?(T(),x(v,{key:2},[e.useStepper?(T(!0),x(v,{key:0},D(e.dashedStepper,(t,r)=>(T(),x(`path`,{"vector-effect":`non-scaling-stroke`,key:`line_stepper_segment_${e.id}_${r}`,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M ${t.path}`,stroke:e.temperatureColors&&!e.isFlatTemperatureLine?`url(#temperature_grad_line_${n}_${P.value})`:e.color,"stroke-width":z(B.value.line.strokeWidth),"stroke-dasharray":e.dashed||t.dashed?z(B.value.line.strokeWidth*2):0,style:w({transition:Pu()})},null,12,ar))),128)):e.smooth?(T(!0),x(v,{key:1},D(e.dashedSmooth,(t,r)=>(T(),x(`path`,{"vector-effect":`non-scaling-stroke`,key:`line_smooth_segment_${e.id}_${r}`,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M ${t.path}`,stroke:e.temperatureColors&&!e.isFlatTemperatureLine?`url(#temperature_grad_line_${n}_${P.value})`:e.color,"stroke-width":z(B.value.line.strokeWidth),"stroke-dasharray":e.dashed||t.dashed?z(B.value.line.strokeWidth*2):0,style:w({transition:Pu()})},null,12,or))),128)):(T(!0),x(v,{key:2},D(e.dashedStraight,(t,r)=>(T(),x(`path`,{"vector-effect":`non-scaling-stroke`,key:`line_straight_segment_${e.id}_${r}`,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M ${t.path}`,stroke:e.temperatureColors&&!e.isFlatTemperatureLine?`url(#temperature_grad_line_${n}_${P.value})`:e.color,"stroke-width":z(B.value.line.strokeWidth),"stroke-dasharray":e.dashed||t.dashed?z(B.value.line.strokeWidth*2):0,style:w({transition:Pu()})},null,12,sr))),128))],64)):e.plots.length>1&&e.straight?(T(),x(`path`,{key:3,"vector-effect":`non-scaling-stroke`,d:`M${e.straight}`,stroke:e.temperatureColors&&!e.isFlatTemperatureLine?`url(#temperature_grad_line_${n}_${P.value})`:e.color,"stroke-width":z(B.value.line.strokeWidth),"stroke-dasharray":e.dashed?z(B.value.line.strokeWidth*2):0,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:w({transition:Pu()})},null,12,cr)):b(``,!0)],6))),128))],6),S(`g`,lr,[(T(!0),x(v,null,D($.value,(e,n)=>(T(),x(`g`,{key:`serie_line_markers_${e.id}`,style:w(`opacity:${M.value?M.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(T(!0),x(v,null,D(e.plots,(r,i)=>(T(),x(`g`,{key:`circle_line_${e.id}_${i}`,class:`vue-ui-xy-line-marker`,style:w(ns(r))},[!Fl.value.linePlot&&r&&A(Ft)(r.value)||Fl.value.linePlot&&r&&A(Ft)(r.value)&&(L.value!==null&&L.value===i||F.value!==null&&F.value===i)||Ou(e.plots,i)?(T(),mt(st,{key:0,shape:[`triangle`,`square`,`diamond`,`pentagon`,`hexagon`,`star`].includes(e.shape)?e.shape:`circle`,color:B.value.line.useGradient?`url(#lineGradient_${n}_${P.value})`:B.value.line.dot.useSerieColor?e.color:B.value.line.dot.fill,plot:{x:A(m)(r.x),y:A(m)(r.y)},radius:rf(e,r,i)?ro.value||0:(Ou(e.plots,i),$a.value.line||0),stroke:B.value.line.dot.useSerieColor?V.value.backgroundColor:e.color,strokeWidth:B.value.line.dot.strokeWidth,transition:A(mo)||Eo.value||xc.value||!B.value.line.showTransition?void 0:`all ${B.value.line.transitionDurationMs}ms ease-in-out`,still:xc.value||Eo.value},null,8,[`shape`,`color`,`plot`,`radius`,`stroke`,`strokeWidth`,`transition`,`still`])):b(``,!0),r.comment&&V.value.comments.show?(T(),x(`foreignObject`,{key:1,style:{overflow:`visible`},height:`12`,width:V.value.comments.width,x:r.x-V.value.comments.width/2+V.value.comments.offsetX,y:r.y+V.value.comments.offsetY+6},[S(`div`,dr,[O(t.$slots,`plot-comment`,{plot:{...r,color:e.color,seriesIndex:n,datapointIndex:i}},void 0,!0)])],8,ur)):b(``,!0)],4))),128))],4))),128))])],8,Hn),(B.value.bar.labels.show||B.value.bar.serieName.show)&&W.value.dataLabels.show?(T(),x(`g`,fr,[(T(!0),x(v,null,D(sf.value,e=>(T(),x(`text`,{key:e.key,class:C({"vue-data-ui-transition":A(so)&&!A(Is)}),"text-anchor":Zd({plot:e.plot,type:`bar`}),"font-size":R.value.plotLabels,transform:Yd({plot:e.plot}),fill:B.value.bar.labels.color,stroke:V.value.backgroundColor,"paint-order":`stroke`,style:w(`opacity:${M.value?M.value===e.serie.groupId?1:.2:1};`),innerHTML:Jd({serie:e.serie,plot:e.plot,type:`bar`})},null,14,pr))),128)),(T(!0),x(v,null,D(ed.value,(e,t)=>(T(),x(v,{key:`xLabel_bar_${e.id}`},[(T(!0),x(v,null,D(e.plots,(n,r)=>(T(),x(v,{key:`xLabel_bar_${t}_${r}`},[n&&B.value.bar.serieName.show?(T(),x(`text`,{key:0,class:C({"vue-data-ui-transition":A(so)&&!A(Is)}),transform:`translate(${W.value.useIndividualScale&&W.value.isStacked?n.x+Gc.value.line/2:n.x+Kc()*1.1}, ${n.y+(n.value>0?B.value.bar.serieName.offsetY:-B.value.bar.serieName.offsetY*3)})`,"text-anchor":`middle`,"font-size":R.value.plotLabels,fill:B.value.bar.serieName.useSerieColor?e.color:B.value.bar.serieName.color,"font-weight":B.value.bar.serieName.bold?`bold`:`normal`,style:w(`opacity:${M.value?M.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},Dt(B.value.bar.serieName.useAbbreviation?A(we)({source:e.name,length:B.value.bar.serieName.abbreviationSize}):e.name),15,mr)):b(``,!0)],64))),128))],64))),128))])):b(``,!0),B.value.plot.labels.show&&W.value.dataLabels.show?(T(),x(`g`,hr,[(T(!0),x(v,null,D(cf.value,e=>(T(),x(`text`,{key:e.key,class:C({"vue-data-ui-transition":A(so)&&!A(Is)}),transform:Xd({plot:e.plot,type:`plot`}),"text-anchor":Zd({plot:e.plot,type:`plot`}),"font-size":R.value.plotLabels,fill:B.value.plot.labels.color,stroke:V.value.backgroundColor,"paint-order":`stroke`,style:w(`opacity:${M.value?M.value===e.serie.groupId?1:.2:1}`),innerHTML:Jd({serie:e.serie,plot:e.plot,type:`plot`})},null,14,gr))),128))])):(T(),x(`g`,_r,[(T(!0),x(v,null,D(nd.value,(e,t)=>(T(),x(v,{key:`xLabel_plot_${e.id}`},[(T(!0),x(v,null,D(e.plots,(n,r)=>(T(),x(v,{key:`xLabel_plot_${t}_${r}`},[B.value.plot.tag.followValue?(T(),x(v,{key:1},[[F.value,L.value,ha.value].includes(r)&&e.useTag?(T(),x(`line`,{key:0,class:`vue-ui-xy-tag-plot`,x1:Y.value?.left,x2:Y.value?.right,y1:n.y,y2:n.y,"stroke-width":1,"stroke-linecap":`round`,"stroke-dasharray":`2`,stroke:e.color},null,8,Sr)):b(``,!0)],64)):(T(),x(v,{key:0},[n&&r===0&&e.useTag&&e.useTag===`start`?(T(),x(`foreignObject`,{key:0,x:n.x,y:n.y-20,height:24,width:`150`,style:w(`overflow: visible; opacity:${M.value?M.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[S(`div`,{style:w(`padding: 3px; background:${A(f)(e.color,80)};color:${A(Ae)(e.color)};width:fit-content;font-size:${R.value.plotLabels}px;border-radius: 2px;`),innerHTML:A(_)(B.value.plot.tag.formatter,n.value,e.name,{datapoint:n,seriesIndex:r,serieName:e.name})},null,12,yr)],12,vr)):b(``,!0),n&&r===e.plots.length-1&&e.useTag&&e.useTag===`end`?(T(),x(`foreignObject`,{key:1,x:n.x-e.name.length*(R.value.plotLabels/2),y:n.y-20,height:24,width:`150`,style:w(`overflow: visible; opacity:${M.value?M.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[S(`div`,{style:w(`padding: 3px; background:${A(f)(e.color,80)};color:${A(Ae)(e.color)};width:fit-content;font-size:${R.value.plotLabels}px;border-radius: 2px;`),innerHTML:A(_)(B.value.plot.tag.formatter,n.value,e.name,{datapoint:n,seriesIndex:r,serieName:e.name})},null,12,xr)],12,br)):b(``,!0)],64))],64))),128))],64))),128))])),B.value.line.labels.show&&W.value.dataLabels.show?(T(),x(`g`,Cr,[(T(!0),x(v,null,D(lf.value,e=>(T(),x(`text`,{key:e.key,class:C({"vue-data-ui-transition":A(so)&&!A(Is)}),transform:Xd({plot:e.plot,type:`line`}),"text-anchor":Zd({plot:e.plot,type:`line`}),"font-size":R.value.plotLabels,fill:B.value.line.labels.color,stroke:V.value.backgroundColor,"paint-order":`stroke`,style:w(`opacity:${M.value?M.value===e.serie.groupId?1:.2:1};`),innerHTML:Jd({serie:e.serie,plot:e.plot,type:`line`})},null,14,wr))),128))])):(T(),x(`g`,Tr,[(T(!0),x(v,null,D($.value,(e,t)=>(T(),x(v,{key:`xLabel_line_${e.id}`},[(T(!0),x(v,null,D(e.plots,(n,r)=>(T(),x(v,{key:`xLabel_line_${t}_${r}`},[B.value.line.tag.followValue?(T(),x(v,{key:1},[[F.value,L.value,ha.value].includes(r)&&e.useTag?(T(),x(`line`,{key:0,class:`vue-ui-xy-tag-line`,x1:Y.value?.left,x2:Y.value?.right,y1:n.y,y2:n.y,"stroke-width":1,"stroke-linecap":`round`,"stroke-dasharray":`2`,stroke:e.color},null,8,Ar)):b(``,!0)],64)):(T(),x(v,{key:0},[n&&r===0&&e.useTag&&e.useTag===`start`?(T(),x(`foreignObject`,{key:0,x:n.x,y:n.y-20,height:24,width:`150`,style:w(`overflow: visible; opacity:${M.value?M.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[S(`div`,{style:w(`padding: 3px; background:${A(f)(e.color,80)};color:${A(Ae)(e.color)};width:fit-content;font-size:${R.value.plotLabels}px;border-radius: 2px;`),innerHTML:A(_)(B.value.line.tag.formatter,n.value,e.name,{datapoint:n,seriesIndex:r,serieName:e.name})},null,12,Dr)],12,Er)):b(``,!0),n&&r===e.plots.length-1&&e.useTag&&e.useTag===`end`?(T(),x(`foreignObject`,{key:1,x:n.x,y:n.y-20,height:24,width:`150`,style:w(`overflow: visible; opacity:${M.value?M.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[S(`div`,{style:w(`padding: 3px; background:${A(f)(e.color,80)};color:${A(Ae)(e.color)};width:fit-content;font-size:${R.value.plotLabels}px;border-radius: 2px;`),innerHTML:A(_)(B.value.line.tag.formatter,n.value,e.name,{datapoint:n,seriesIndex:r,serieName:e.name})},null,12,kr)],12,Or)):b(``,!0)],64))],64))),128))],64))),128))])),(T(!0),x(v,null,D($.value,(e,t)=>(T(),x(v,{key:`xLabel_line_${e.id}`},[(T(!0),x(v,null,D(e.plots,(n,r)=>(T(),x(v,{key:`xLabel_line_${t}_${r}`},[n&&r===0&&e.showSerieName&&e.showSerieName===`start`?(T(),x(`text`,{key:0,x:n.x-R.value.plotLabels,y:n.y,"font-size":R.value.plotLabels,"text-anchor":`end`,fill:e.color,innerHTML:A(Oe)({content:e.name,fontSize:R.value.plotLabels,fill:e.color,x:n.x-R.value.plotLabels,y:n.y,maxWords:2}),style:w(`opacity:${M.value?M.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},null,12,jr)):b(``,!0),n&&r===e.plots.length-1&&e.showSerieName&&e.showSerieName===`end`?(T(),x(`text`,{key:1,x:n.x+R.value.plotLabels,y:n.y,"font-size":R.value.plotLabels,"text-anchor":`start`,fill:e.color,innerHTML:A(Oe)({content:e.name,fontSize:R.value.plotLabels,fill:e.color,x:n.x+R.value.plotLabels,y:n.y,maxWords:2}),style:w(`opacity:${M.value?M.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},null,12,Mr)):b(``,!0)],64))),128))],64))),128)),(T(!0),x(v,null,D(nd.value,(e,t)=>(T(),x(v,{key:`xLabel_plot_${e.id}`},[(T(!0),x(v,null,D(e.plots,(n,r)=>(T(),x(v,{key:`xLabel_plot_${t}_${r}`},[n&&r===0&&e.showSerieName&&e.showSerieName===`start`?(T(),x(`text`,{key:0,x:n.x-R.value.plotLabels,y:n.y,"font-size":R.value.plotLabels,"text-anchor":`end`,fill:e.color,innerHTML:A(Oe)({content:e.name,fontSize:R.value.plotLabels,fill:e.color,x:n.x-R.value.plotLabels,y:n.y,maxWords:2}),style:w(`opacity:${M.value?M.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},null,12,Nr)):b(``,!0),n&&r===e.plots.length-1&&e.showSerieName&&e.showSerieName===`end`?(T(),x(`text`,{key:1,x:n.x+R.value.plotLabels,y:n.y,"font-size":R.value.plotLabels,"text-anchor":`start`,fill:e.color,innerHTML:A(Oe)({content:e.name,fontSize:R.value.plotLabels,fill:e.color,x:n.x+R.value.plotLabels,y:n.y,maxWords:2}),style:w(`opacity:${M.value?M.value===e.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},null,12,Pr)):b(``,!0)],64))),128))],64))),128)),(T(!0),x(v,null,D([...nd.value,...$.value,...ed.value],(e,t)=>(T(),x(v,{key:`progression-${t}`},[Object.hasOwn(e,`useProgression`)&&e.useProgression===!0&&!isNaN(A(h)(e.plots).trend)?(T(),x(`g`,Fr,[S(`defs`,null,[S(`marker`,{id:`progression_arrow_${t}`,markerWidth:`9`,markerHeight:`9`,viewBox:`-1 -1 9 9`,markerUnits:`userSpaceOnUse`,refX:`7`,refY:7/2,orient:`auto`,overflow:`visible`},[S(`polygon`,{points:`0,0 7,3.5 0,7`,fill:e.color,stroke:V.value.backgroundColor,"stroke-width":`1`,"stroke-linejoin":`round`},null,8,Lr)],8,Ir)]),e.plots.length>1?(T(),x(`line`,{key:0,x1:A(h)(e.plots).x1+(e.type===`bar`?Kc():0),x2:A(h)(e.plots).x2+(e.type===`bar`?Kc():0),y1:A(g)(A(h)(e.plots).y1),y2:A(g)(A(h)(e.plots).y2),"stroke-width":1,stroke:V.value.backgroundColor,"stroke-dasharray":2,"stroke-linecap":`round`,"stroke-linejoin":`round`,"marker-end":`url(#progression_arrow_${t})`},null,8,Rr)):b(``,!0),e.plots.length>1?(T(),x(`line`,{key:1,x1:A(h)(e.plots).x1+(e.type===`bar`?Kc():0),x2:A(h)(e.plots).x2+(e.type===`bar`?Kc():0),y1:A(g)(A(h)(e.plots).y1),y2:A(g)(A(h)(e.plots).y2),"stroke-width":1,stroke:e.color,"stroke-dasharray":2,"stroke-linecap":`round`,"stroke-linejoin":`round`,"marker-end":`url(#progression_arrow_${t})`},null,8,zr)):b(``,!0),e.plots.length>1?(T(),x(`text`,{key:2,class:C({"vue-data-ui-transition":A(so)&&!A(Is)}),"text-anchor":`middle`,transform:`translate(${A(h)(e.plots).x2+(e.type===`bar`?Kc():0)}, ${A(h)(e.plots).y2-12})`,"font-size":R.value.plotLabels,fill:e.color,stroke:V.value.backgroundColor,"stroke-width":4,"stroke-linecap":`round`,"stroke-linejoin":`round`,"paint-order":`stroke fill`},Dt(A(n)({v:A(h)(e.plots).trend*100,s:`%`,r:2})),11,Br)):b(``,!0)])):b(``,!0)],64))),128)),W.value.useIndividualScale&&!W.value.isStacked?(T(),x(v,{key:13},[S(`defs`,null,[(T(!0),x(v,null,D(ad.value,(e,t)=>(T(),mt(ct,{t:`linear`,key:`individual_scale_gradient_${e.groupId||e.id||t}`,id:`individual_scale_gradient_${P.value}_${t}`,x1:J.value?`100%`:`0%`,x2:J.value?`0%`:`100%`,y1:`0%`,y2:`0%`,stops:[[`0%`,V.value.backgroundColor,0],[`100%`,e.color,.2]]},null,8,[`id`,`x1`,`x2`,`stops`]))),128))]),(T(!0),x(v,null,D(ad.value,(e,t)=>(T(),x(`rect`,{key:`individual_scale_background_${e.groupId||e.id||t}`,x:J.value?e.x:e.x-U.value.yAxis.labelWidth-Y.value.individualOffsetX,y:Y.value?.top,width:(J.value,U.value.yAxis.labelWidth+Y.value.individualOffsetX),height:Y.value.height<0?10:Y.value.height,fill:M.value===e.groupId?`url(#individual_scale_gradient_${P.value}_${t})`:`transparent`,onMouseenter:t=>M.value=e.groupId,onMouseleave:r[0]||=e=>M.value=null},null,40,Vr))),128))],64)):b(``,!0),S(`g`,null,[U.value.axis.yLabel&&!W.value.useIndividualScale?(T(),x(`text`,{key:0,ref_key:`yAxisLabel`,ref:ea,"font-size":R.value.yAxis,fill:U.value.color,transform:`translate(${J.value?Y.value.right+Y.value.scaleLabelsOffset+U.value.axis.yLabelOffsetX+R.value.yAxis:U.value.axis.fontSize+U.value.axis.yLabelOffsetX}, ${Y.value?.top+Y.value.height/2}) rotate(-90)`,"text-anchor":`middle`,style:{transition:`none`}},Dt(U.value.axis.yLabel),9,Hr)):b(``,!0),U.value.axis.xLabel?(T(),x(`text`,{key:1,ref_key:`xAxisLabel`,ref:$i,"text-anchor":`middle`,x:N.value/2,y:ca.value-3,"font-size":R.value.yAxis,fill:U.value.color},Dt(U.value.axis.xLabel),9,Ur)):b(``,!0)]),U.value.xAxisLabels.show?(T(),x(`g`,{key:14,ref_key:`timeLabelsEls`,ref:ta,opacity:$d.value?.1:1,style:{transition:`opacity 0.2s`}},[t.$slots[`time-label`]?(T(!0),x(v,{key:0},D(Lu.value,(e,n)=>O(t.$slots,`time-label`,xt({ref_for:!0},{x:Ru(e,n),y:Y.value?.bottom,fontSize:R.value.xAxis,fill:U.value.xAxisLabels.color,transform:`translate(${Ru(e,n)}, ${Y.value?.bottom+R.value.xAxis*1.3+U.value.xAxisLabels.yOffset}), rotate(${U.value.xAxisLabels.rotation})`,absoluteIndex:e.absoluteIndex,content:e.text,textAnchor:U.value.xAxisLabels.rotation>0?`start`:H.value.labels.xAxisLabels.rotation<0?`end`:`middle`,show:e&&e.text}),void 0,!0,`time_label_${e.id}`)),128)):(T(!0),x(v,{key:1},D(Lu.value,(e,t)=>(T(),x(`g`,{key:`time_label_${t}`},[e&&e.text?(T(),x(v,{key:0},[String(e.text).includes(`
24
- `)?(T(),x(`text`,{key:1,class:`vue-data-ui-time-label`,"text-anchor":U.value.xAxisLabels.rotation>0?`start`:H.value.labels.xAxisLabels.rotation<0?`end`:`middle`,"font-size":R.value.xAxis,fill:U.value.xAxisLabels.color,transform:`translate(${Ru(e,t)}, ${Y.value?.bottom+R.value.xAxis*1.5}), rotate(${U.value.xAxisLabels.rotation})`,style:w({cursor:Ws()&&co.value?`pointer`:`default`}),innerHTML:A(ee)({content:String(e.text),fontSize:R.value.xAxis,fill:V.value.grid.labels.xAxisLabels.color,stroke:V.value.backgroundColor,x:0,y:0}),onClick:n=>cc(e,t)},null,12,Kr)):(T(),x(`text`,{key:0,class:`vue-data-ui-time-label`,"text-anchor":U.value.xAxisLabels.rotation>0?`start`:H.value.labels.xAxisLabels.rotation<0?`end`:`middle`,"font-size":R.value.xAxis,fill:U.value.xAxisLabels.color,stroke:V.value.backgroundColor,"stroke-width":`3`,"stroke-linejoin":`round`,"stroke-linecap":`round`,"paint-order":`stroke fill`,transform:`translate(${Ru(e,t)}, ${Y.value?.bottom+R.value.xAxis*1.5}), rotate(${U.value.xAxisLabels.rotation})`,style:w({cursor:Ws()&&co.value?`pointer`:`default`}),onClick:n=>cc(e,t)},Dt(e.text||``),13,Gr))],64)):b(``,!0)]))),128))],8,Wr)):b(``,!0),tf.value?(T(),x(`g`,qr,[S(`text`,{class:`vue-data-ui-time-label`,"text-anchor":U.value.xAxisLabels.rotation>0?`start`:U.value.xAxisLabels.rotation<0?`end`:`middle`,"font-size":R.value.xAxis,fill:U.value.xAxisLabels.color,transform:`translate(${tf.value.x}, ${Y.value?.bottom+R.value.xAxis*1.5}), rotate(${U.value.xAxisLabels.rotation})`,"font-weight":`bold`,style:{transition:`none !important`,animation:`none !important`,"pointer-events":`none`},innerHTML:A(ee)({content:String(tf.value.text),fontSize:R.value.xAxis,fill:U.value.xAxisLabels.color,x:0,y:0})},null,8,Jr)])):b(``,!0),Du.value.length&&!W.value.isStacked?(T(),x(`g`,Yr,[(T(!0),x(v,null,D(Du.value,e=>(T(),x(`g`,{key:e.id},[e.yTop&&e.show&&isFinite(e.yTop)?(T(),x(`line`,{key:0,x1:e.x1,y1:e.yTop,x2:e.x2,y2:e.yTop,stroke:e.config.line.stroke,"stroke-width":e.config.line.strokeWidth,"stroke-dasharray":e.config.line.strokeDasharray,"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,Xr)):b(``,!0),e.yBottom&&e.show&&isFinite(e.yBottom)?(T(),x(`line`,{key:1,x1:e.x1,y1:e.yBottom,x2:e.x2,y2:e.yBottom,stroke:e.config.line.stroke,"stroke-width":e.config.line.strokeWidth,"stroke-dasharray":e.config.line.strokeDasharray,"stroke-linecap":`round`,style:{animation:`none !important`}},null,8,Zr)):b(``,!0),e.hasArea&&e.show&&isFinite(e.yTop)&&isFinite(e.yBottom)?(T(),x(`rect`,{key:2,y:Math.min(e.yTop,e.yBottom),x:e.x1,width:Y.value.width,height:A(m)(e.areaHeight,0),fill:A(f)(e.config.area.fill,e.config.area.opacity),style:{animation:`none !important`}},null,8,Qr)):b(``,!0),e.config.label.text&&e.show&&isFinite(e._box.y)?(T(),x(`rect`,xt({key:3,class:`vue-ui-xy-annotation-label-box`},{ref_for:!0},e._box,{style:{animation:`none !important`,transition:`none !important`}}),null,16)):b(``,!0),e.config.label.text&&e.show&&isFinite(e._text.y)?(T(),x(`text`,{key:4,id:e.id,class:C([`vue-ui-xy-annotation-label`,{"vue-data-ui-transition":A(so)&&!A(Is)}]),transform:`translate(${e._text.x}, ${e._text.y})`,"font-size":e.config.label.fontSize,fill:e.config.label.color,"text-anchor":e.config.label.textAnchor},Dt(e.config.label.text),11,$r)):b(``,!0)]))),128))])):b(``,!0),!$d.value&&V.value.timeTag.show&&(q.value?A(Se)(Vd.value):![null,void 0].includes(L.value)||![null,void 0].includes(F.value))?(T(),x(`g`,ei,[(T(),x(`foreignObject`,{x:Ud(),y:Y.value?.bottom,width:`200`,height:`40`,style:{overflow:`visible !important`}},[S(`div`,{ref_key:`timeTagEl`,ref:Rd,class:`vue-ui-xy-time-tag`,style:w(`width: fit-content;margin: 0 auto;text-align:center;padding:3px 12px;background:${V.value.timeTag.backgroundColor};color:${V.value.timeTag.color};font-size:${V.value.timeTag.fontSize}px`),innerHTML:qd.value},null,12,ni)],8,ti)),S(`circle`,{cx:q.value&&A(Se)(Vd.value)?zu({x:Vd.value}):Ul((L.value===null?0:L.value)||(F.value===null?0:F.value)),cy:Y.value?.bottom,r:V.value.timeTag.circleMarker.radius,fill:V.value.timeTag.circleMarker.color},null,8,ri)])):b(``,!0)])):b(``,!0),al.value?(T(),x(`rect`,{key:2,x:al.value.x,y:al.value.y,width:al.value.width,height:al.value.height,fill:Ro.value.selection.fill,"fill-opacity":Ro.value.selection.fillOpacity,stroke:Ro.value.selection.stroke,"stroke-opacity":Ro.value.selection.strokeOpacity,"stroke-width":Ro.value.selection.strokeWidth,"stroke-dasharray":Ro.value.selection.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,"pointer-events":`none`},null,8,ii)):b(``,!0),Bo.value?(T(),x(`rect`,xt({key:3},ss.value,{"data-start":G.value.start,"data-end":G.value.end}),null,16,ai)):b(``,!0),O(t.$slots,`svg`,{svg:{...Ya.value,slicer:G.value,isPrintingImg:A(cs)||A(ls)||A(Sf),isPrintingSvg:A(Cf),data:rd.value,drawingArea:Y.value}},void 0,!0)],512)],46,Yt)),t.$slots.hint?(T(),x(`div`,oi,[O(t.$slots,`hint`,Ct(bt({hint:B.value.a11y.translations.keyboardNavigation,isVisible:Df.value})),void 0,!0)])):b(``,!0)]),t.$slots.watermark?(T(),x(`div`,si,[O(t.$slots,`watermark`,Ct(bt({isPrinting:A(cs)||A(ls)||A(Sf)||A(Cf)})),void 0,!0)])):b(``,!0),(T(!0),x(v,null,D($.value,(e,t)=>(T(),x(v,{key:`tag_line_${e.id}`},[(T(!0),x(v,null,D(e.plots,(n,r)=>(T(),x(v,{key:`tag_line_${t}_${r}`},[[F.value,L.value,ha.value].includes(r)&&e.useTag&&e.useTag===`end`&&B.value.line.tag.followValue?(T(),x(`div`,{key:0,ref_for:!0,ref:e=>qs(t,r,e,`right`,`line`),class:`vue-ui-xy-tag`,"data-tag":`right`,style:w({position:`fixed`,top:A(c)({svgElement:I.value,x:Y.value?.right+B.value.line.tag.fontSize/1.5,y:n.y,element:Ea.value[`${t}_${r}_right_line`],position:`right`})?.top+`px`,left:A(c)({svgElement:I.value,x:Y.value?.right+B.value.line.tag.fontSize/1.5,y:n.y,element:Ea.value[`${t}_${r}_right_line`],position:`right`})?.left+`px`,height:`fit-content`,width:`fit-content`,background:e.color,color:A(Ae)(e.color),padding:`0 6px`,fontSize:B.value.line.tag.fontSize+`px`,opacity:1})},[(T(),x(`svg`,ci,[S(`path`,{d:`M 0,10 10,0 10,20 Z`,fill:e.color,stroke:`none`},null,8,li)])),S(`div`,{class:`vue-ui-xy-tag-content`,innerHTML:A(_)(B.value.line.tag.formatter,n.value,e.name,{datapoint:n,seriesIndex:r,serieName:e.name})},null,8,ui)],4)):b(``,!0),[F.value,L.value,ha.value].includes(r)&&e.useTag&&e.useTag===`start`&&B.value.line.tag.followValue?(T(),x(`div`,{key:1,ref_for:!0,ref:e=>qs(t,r,e,`left`,`line`),class:`vue-ui-xy-tag`,"data-tag":`left`,style:w({position:`fixed`,top:A(c)({svgElement:I.value,x:Y.value?.left-B.value.line.tag.fontSize/1.5,y:n.y,element:Ea.value[`${t}_${r}_left_line`],position:`left`})?.top+`px`,left:A(c)({svgElement:I.value,x:Y.value?.left-B.value.line.tag.fontSize/1.5,y:n.y,element:Ea.value[`${t}_${r}_left_line`],position:`left`})?.left+`px`,height:`fit-content`,width:`fit-content`,background:e.color,color:A(Ae)(e.color),padding:`0 6px`,fontSize:B.value.line.tag.fontSize+`px`,opacity:1})},[(T(),x(`svg`,di,[S(`path`,{d:`M 0,0 10,10 0,20 Z`,fill:e.color,stroke:`none`},null,8,fi)])),S(`div`,{class:`vue-ui-xy-tag-content`,innerHTML:A(_)(B.value.line.tag.formatter,n.value,e.name,{datapoint:n,seriesIndex:r,serieName:e.name})},null,8,pi)],4)):b(``,!0)],64))),128))],64))),128)),(T(!0),x(v,null,D(nd.value,(e,t)=>(T(),x(v,{key:`tag_plot_${e.id}`},[(T(!0),x(v,null,D(e.plots,(n,r)=>(T(),x(v,{key:`tag_plot_${t}_${r}`},[[F.value,L.value,ha.value].includes(r)&&e.useTag&&e.useTag===`end`&&B.value.plot.tag.followValue?(T(),x(`div`,{key:0,ref_for:!0,ref:e=>qs(t,r,e,`right`,`plot`),class:`vue-ui-xy-tag`,"data-tag":`right`,style:w({position:`fixed`,top:A(c)({svgElement:I.value,x:Y.value?.right+B.value.plot.tag.fontSize/1.5,y:n.y,element:Ea.value[`${t}_${r}_right_plot`],position:`right`})?.top+`px`,left:A(c)({svgElement:I.value,x:Y.value?.right+B.value.plot.tag.fontSize/1.5,y:n.y,element:Ea.value[`${t}_${r}_right_plot`],position:`right`})?.left+`px`,height:`fit-content`,width:`fit-content`,background:e.color,color:A(Ae)(e.color),padding:`0 6px`,fontSize:B.value.plot.tag.fontSize+`px`,opacity:1})},[(T(),x(`svg`,mi,[S(`path`,{d:`M 0,10 10,0 10,20 Z`,fill:e.color,stroke:`none`},null,8,hi)])),S(`div`,{class:`vue-ui-xy-tag-content`,innerHTML:A(_)(B.value.plot.tag.formatter,n.value,e.name,{datapoint:n,seriesIndex:r,serieName:e.name})},null,8,gi)],4)):b(``,!0),[F.value,L.value,ha.value].includes(r)&&e.useTag&&e.useTag===`start`&&B.value.plot.tag.followValue?(T(),x(`div`,{key:1,ref_for:!0,ref:e=>qs(t,r,e,`left`,`plot`),class:`vue-ui-xy-tag`,"data-tag":`left`,style:w({position:`fixed`,top:A(c)({svgElement:I.value,x:Y.value?.left-B.value.plot.tag.fontSize/1.5,y:n.y,element:Ea.value[`${t}_${r}_left_plot`],position:`left`})?.top+`px`,left:A(c)({svgElement:I.value,x:Y.value?.left-B.value.plot.tag.fontSize/1.5,y:n.y,element:Ea.value[`${t}_${r}_left_plot`],position:`left`})?.left+`px`,height:`fit-content`,width:`fit-content`,background:e.color,color:A(Ae)(e.color),padding:`0 6px`,fontSize:B.value.plot.tag.fontSize+`px`,opacity:1})},[(T(),x(`svg`,_i,[S(`path`,{d:`M 0,0 10,10 0,20 Z`,fill:e.color,stroke:`none`},null,8,vi)])),S(`div`,{class:`vue-ui-xy-tag-content`,innerHTML:A(_)(B.value.plot.tag.formatter,n.value,e.name,{datapoint:n,seriesIndex:r,serieName:e.name})},null,8,yi)],4)):b(``,!0)],64))),128))],64))),128)),V.value.zoom.show&&So.value>6&&oo.value&&gc.value?(T(),mt(lt,{key:6,ref_key:`chartSlicer`,ref:Ji,uuid:P.value,allMinimaps:hu.value,background:V.value.zoom.color,borderColor:V.value.backgroundColor,customFormat:V.value.zoom.customFormat,cutNullValues:B.value.line.cutNullValues,enableRangeHandles:V.value.zoom.enableRangeHandles,enableSelectionDrag:V.value.zoom.enableSelectionDrag,end:yu.value,focusOnDrag:V.value.zoom.focusOnDrag,focusRangeRatio:V.value.zoom.focusRangeRatio,fontSize:V.value.zoom.fontSize,useResetSlot:V.value.zoom.useResetSlot,immediate:!V.value.zoom.preview.enable,inputColor:V.value.zoom.color,isPreview:Bo.value,labelLeft:Cu.value,labelRight:wu.value,max:_u.value,min:gu.value,precision:q.value?U.value.xAxis.rounding:0,useValueRange:q.value,minimap:pu.value,minimapCompact:V.value.zoom.minimap.compact,minimapFrameColor:V.value.zoom.minimap.frameColor,minimapIndicatorColor:V.value.zoom.minimap.indicatorColor,minimapLineColor:V.value.zoom.minimap.lineColor,minimapMerged:V.value.zoom.minimap.merged,minimapSelectedColor:V.value.zoom.minimap.selectedColor,minimapSelectedColorOpacity:V.value.zoom.minimap.selectedColorOpacity,minimapSelectedIndex:q.value?bu.value:L.value??F.value,minimapSelectionRadius:V.value.zoom.minimap.selectionRadius,preciseLabels:dd.value.length?dd.value:ec.value,refreshStartPoint:q.value?gu.value:V.value.zoom.startIndex===null?0:V.value.zoom.startIndex,refreshEndPoint:q.value?_u.value:V.value.zoom.endIndex===null?Math.max(...e.dataset.map(e=>vo(e.series).length)):V.value.zoom.endIndex+1,selectColor:V.value.zoom.highlightColor,selectedSeries:Tu.value,smoothMinimap:V.value.zoom.minimap.smooth,start:vu.value,textColor:V.value.color,timeLabels:ec.value,usePreciseLabels:U.value.xAxisLabels.datetimeFormatter.enable&&!V.value.zoom.useDefaultFormat,valueEnd:yu.value,valueStart:vu.value,verticalHandles:V.value.zoom.minimap.verticalHandles,minScale:xu.value,maxScale:Su.value,maxWidth:V.value.zoom.maxWidth,minimapLeftInsetRatio:N.value>0&&V.value.zoom.autoFit?Y.value.left/N.value:null,minimapRightInsetRatio:N.value>0&&V.value.zoom.autoFit?(N.value-Y.value.right)/N.value:null,additionalMinimapHeight:V.value.zoom.minimap.additionalHeight,handleType:V.value.zoom.minimap.handleType,handleIconColor:V.value.zoom.minimap.handleIconColor,handleBorderWidth:V.value.zoom.minimap.handleBorderWidth,handleBorderColor:V.value.zoom.minimap.handleBorderColor,handleFill:V.value.zoom.minimap.handleFill,handleWidth:V.value.zoom.minimap.handleWidth,isCursorPointer:co.value,onFutureEnd:r[1]||=e=>Uo(`end`,e),onFutureStart:r[2]||=e=>Uo(`start`,e),onReset:Mc,onTrapMouse:lc,onTrapMouseValue:uc,"onUpdate:end":kc,"onUpdate:start":Oc},{"reset-action":Nt(({reset:e})=>[O(t.$slots,`reset-action`,Ct(bt({reset:e})),void 0,!0)]),_:3},8,/* @__PURE__ */ `uuid.allMinimaps.background.borderColor.customFormat.cutNullValues.enableRangeHandles.enableSelectionDrag.end.focusOnDrag.focusRangeRatio.fontSize.useResetSlot.immediate.inputColor.isPreview.labelLeft.labelRight.max.min.precision.useValueRange.minimap.minimapCompact.minimapFrameColor.minimapIndicatorColor.minimapLineColor.minimapMerged.minimapSelectedColor.minimapSelectedColorOpacity.minimapSelectedIndex.minimapSelectionRadius.preciseLabels.refreshStartPoint.refreshEndPoint.selectColor.selectedSeries.smoothMinimap.start.textColor.timeLabels.usePreciseLabels.valueEnd.valueStart.verticalHandles.minScale.maxScale.maxWidth.minimapLeftInsetRatio.minimapRightInsetRatio.additionalMinimapHeight.handleType.handleIconColor.handleBorderWidth.handleBorderColor.handleFill.handleWidth.isCursorPointer`.split(`.`))):b(``,!0),S(`div`,{id:`legend-bottom-${P.value}`},null,8,bi),Oa.value&&(V.value.legend.show||t.$slots.legend)?(T(),mt(pt,{key:7,to:V.value.legend.position===`top`?`#legend-top-${P.value}`:`#legend-bottom-${P.value}`},[S(`div`,{ref_key:`chartLegend`,ref:Yi},[O(t.$slots,`legend`,{legend:Os.value},()=>[V.value.legend.show?(T(),x(`div`,{key:0,class:`vue-ui-xy-legend`,style:w({fontSize:`var(--legend-font-size, ${V.value.legend.fontSize??14}px)`})},[V.value.legend.selectAllToggle.show&&Os.value.length>2&&!A(mo)?(T(),mt(dt,{key:0,backgroundColor:V.value.legend.selectAllToggle.backgroundColor,color:V.value.legend.selectAllToggle.color,fontSize:V.value.legend.fontSize,checked:ga.value.length>0,onToggle:Dl},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`])):b(``,!0),(T(!0),x(v,null,D(Os.value,(e,n)=>(T(),x(`div`,{key:`div_legend_item_${n}`,onClick:t=>Al(e),onKeydown:t=>Ol(t,e),role:`button`,tabindex:`0`,class:C({"vue-ui-xy-legend-item-alone":Os.value.length===1,"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":_a.value.has(e.id)}),style:w({cursor:co.value?`pointer`:`default`})},[da.value[e.type]===`line`?(T(),x(`svg`,Si,[S(`rect`,{x:`0`,y:`7.5`,rx:`1.5`,stroke:V.value.backgroundColor,"stroke-width":.5,height:`3`,width:`20`,fill:e.color},null,8,Ci),_t(st,{plot:{x:10,y:9},radius:4,color:e.color,shape:[`triangle`,`square`,`diamond`,`pentagon`,`hexagon`,`star`].includes(e.shape)?e.shape:`circle`,stroke:V.value.backgroundColor,strokeWidth:.5},null,8,[`color`,`shape`,`stroke`])])):da.value[e.type]===`bar`?(T(),x(`svg`,wi,[da.value[e.type]===`bar`&&t.$slots.pattern?(T(),x(`rect`,{key:0,x:`4`,y:`4`,rx:`1`,height:`32`,width:`32`,stroke:`none`,fill:e.color},null,8,Ti)):b(``,!0),da.value[e.type]===`bar`?(T(),x(`rect`,{key:1,x:`4`,y:`4`,rx:`1`,height:`32`,width:`32`,stroke:`none`,fill:t.$slots.pattern?`url(#pattern_${P.value}_${e.slotAbsoluteIndex})`:e.color},null,8,Ei)):b(``,!0)])):(T(),x(`svg`,Di,[_t(st,{plot:{x:6,y:6},radius:5,color:e.color,shape:[`triangle`,`square`,`diamond`,`pentagon`,`hexagon`,`star`].includes(e.shape)?e.shape:`circle`},null,8,[`color`,`shape`])])),S(`span`,{style:w(`color:${V.value.legend.color}`)},Dt(e.name),5)],46,xi))),128))],4)):b(``,!0)],!0)],512)],8,[`to`])):b(``,!0),t.$slots.source?(T(),x(`div`,{key:8,ref_key:`source`,ref:Xi,dir:`auto`},[O(t.$slots,`source`,{},void 0,!0)],512)):b(``,!0),_t(A(Ni),{teleportTo:V.value.tooltip.teleportTo,show:W.value.showTooltip&&ma.value,backgroundColor:V.value.tooltip.backgroundColor,color:V.value.tooltip.color,fontSize:V.value.tooltip.fontSize,borderRadius:V.value.tooltip.borderRadius,borderColor:V.value.tooltip.borderColor,borderWidth:V.value.tooltip.borderWidth,backgroundOpacity:V.value.tooltip.backgroundOpacity,position:V.value.tooltip.position,offsetX:V.value.tooltip.offsetX,offsetY:V.value.tooltip.offsetY,parent:t.$refs.chart,content:gd.value,isFullscreen:pa.value,isCustom:V.value.tooltip.customFormat&&typeof V.value.tooltip.customFormat==`function`,smooth:V.value.tooltip.smooth,backdropFilter:V.value.tooltip.backdropFilter,smoothForce:V.value.tooltip.smoothForce,smoothSnapThreshold:V.value.tooltip.smoothSnapThreshold,isA11yMode:ja.value!=null,a11yPosition:Ma.value},{"tooltip-before":Nt(()=>[O(t.$slots,`tooltip-before`,Ct(bt({...sd.value})),void 0,!0)]),tooltip:Nt(()=>[O(t.$slots,`tooltip`,Ct(bt({...sd.value})),void 0,!0)]),"tooltip-after":Nt(()=>[O(t.$slots,`tooltip-after`,Ct(bt({...sd.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`fontSize`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),oo.value&&V.value.userOptions.buttons.table?(T(),mt(Et(gf.value.component),xt({key:9},gf.value.props,{ref_key:`tableUnit`,ref:ka,onClose:_f}),ht({content:Nt(()=>[S(`div`,{style:w(`${A(cs)||B.value.table.useDialog?``:`max-height:400px`};${B.value.table.useDialog?`height: fit-content; `:``};overflow:auto;width:100%;${B.value.table.useDialog?``:`margin-top:48px`}`)},[S(`div`,Oi,[Pt(S(`input`,{type:`checkbox`,"onUpdate:modelValue":r[4]||=e=>xa.value=e},null,512),[[At,xa.value]]),S(`div`,{onClick:r[5]||=e=>xa.value=!xa.value,style:w({cursor:co.value?`pointer`:`default`})},[_t(A(Fi),{name:`chartLine`,size:20,stroke:V.value.color},null,8,[`stroke`])],4)]),xa.value?(T(),mt(A(Ii),{key:`sparkline_${Sa.value}`,dataset:zl.value,config:Bl.value},null,8,[`dataset`,`config`])):(T(),mt(A(Mi),{key:`table_${ya.value}`,colNames:Ed.value.colNames,head:Ed.value.head,body:Ed.value.body,config:Ed.value.config,title:B.value.table.useDialog?``:gf.value.title,withCloseButton:!B.value.table.useDialog,onClose:_f},{th:Nt(({th:e})=>[e===`__SUM__`?(T(),x(`div`,ki,[_t(A(Fi),{name:`sigma`,stroke:Ed.value.config.th.color,size:16},null,8,[`stroke`])])):(T(),x(`div`,Ai,Dt(e),1))]),td:Nt(({td:e})=>[gt(Dt(isNaN(Number(e))?e:A(n)({p:V.value.labels.prefix,v:e,s:V.value.labels.suffix,r:B.value.table.rounding})),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`]))],4)]),_:2},[B.value.table.useDialog?{name:`title`,fn:Nt(()=>[gt(Dt(gf.value.title),1)]),key:`0`}:void 0,B.value.table.useDialog?{name:`actions`,fn:Nt(()=>[S(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:r[3]||=e=>Dd(V.value.userOptions.callbacks.csv)},[_t(A(Fi),{name:`fileCsv`,stroke:gf.value.props.color},null,8,[`stroke`])])]),key:`1`}:void 0]),1040)):b(``,!0),O(t.$slots,`skeleton`,{},()=>[A(mo)?(T(),mt(Re,{key:0})):b(``,!0)],!0)],46,Gt))}},[[`__scopeId`,`data-v-dd97e7d9`]]);export{Wt as n,j as t};
@@ -1,9 +0,0 @@
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,Ft as a,Ht as o,Jt as s,Kt as ee,Mt as c,S as l,X as te,Zt as ne,_ as re,_t as ie,at as ae,i as oe,in as se,nn as ce,nt as le,o as ue,pt as de,w as fe,wt as pe,zt as me}from"./lib-rPeBMZrn.js";import{n as he,t as ge}from"./BaseScanner-8NdoBs7B.js";import{n as _e,t as ve}from"./useHints-C-TwxM0Y.js";import{t as ye}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as be}from"./useNestedProp-DnGoh-XS.js";import{t as xe}from"./useThemeCheck-BKNRbGeC.js";import{t as Se}from"./img-D4RQwASc.js";import{t as Ce}from"./BaseIcon-fYK0iID8.js";import{n as we}from"./Title-BliHuXfT.js";import{n as Te,t as Ee}from"./tableIntegration-CNoJ1CIY.js";import{n as De,t as Oe}from"./userOptionsSlots-DYuo-E5m.js";import{n as ke,r as Ae,t as je}from"./useTimeLabels-Das5O74F.js";import{t as Me}from"./usePrinter-DVf3YcG5.js";import{a as Ne,c as Pe,i as u,n as Fe,o as Ie,r as Le,s as Re,t as ze}from"./canvas-lib-22VpOI4_.js";import{t as Be}from"./useResponsive-CENUxfEL.js";import{t as Ve}from"./SlicerPreview-DYuyE9u9.js";import{t as He}from"./vue-ui-accordion-D4FHxzsL.js";import{t as Ue}from"./BaseLegendToggle-aT9fOoGO.js";import{t as We}from"./useUserOptionState-CXlFnwPv.js";import{t as Ge}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ke}from"./Legend-DM0ClX3D.js";import{t as qe}from"./vue_ui_xy_canvas-CT-FN9rU.js";import{Teleport as Je,computed as d,createBlock as Ye,createCommentVNode as f,createElementBlock as Xe,createElementVNode as p,createSlots as Ze,createTextVNode as Qe,createVNode as $e,defineAsyncComponent as et,guardReactiveProps as m,mergeProps as tt,nextTick as nt,normalizeClass as rt,normalizeProps as h,normalizeStyle as it,onBeforeUnmount as at,onMounted as ot,openBlock as g,ref as _,renderList as st,renderSlot as v,resolveDynamicComponent as ct,shallowRef as lt,toDisplayString as ut,toRefs as dt,unref as y,useSlots as ft,watch as b,watchEffect as pt,withCtx as x}from"vue";var mt=/* @__PURE__ */ e({default:()=>Ot}),ht=[`id`],gt=[`id`],_t={class:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`},vt=[`id`],yt=[`aria-label`,`aria-describedby`],bt=[`viewBox`],xt=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],St={key:1,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Ct=[`id`],wt=[`onClick`],Tt={key:4,class:`vue-data-ui-watermark`},Et={key:0},Dt={key:1},Ot=/*#__PURE__*/ ye({__name:`vue-ui-xy-canvas`,props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}},selectedXIndex:{type:Number,default:void 0},zoomState:{type:Object,default:null}},emits:[`selectLegend`,`selectX`,`zoomStart`,`zoomEnd`,`zoomReset`,`update:zoomState`,`copyAlt`],setup(e,{expose:ye,emit:mt}){let Ot=et(()=>import(`./Tooltip-C1q0Qoh7.js`)),kt=et(()=>import(`./DataTable-5Ug6gMAX.js`)),At=et(()=>import(`./UserOptions-Em_JgDXM.js`).then(e=>e.n)),jt=et(()=>import(`./NonSvgPenAndPaper-CawVDtNj.js`)),Mt=et(()=>import(`./BaseDraggableDialog-9d30Yx8c.js`).then(e=>e.n)),{vue_ui_xy_canvas:Nt}=t(),{isThemeValid:Pt,warnInvalidTheme:Ft}=xe(),S=e,It=_(te()),Lt=_(null),Rt=_(null),C=_(null),w=_(1),zt=_(1),Bt=_(!1),T=_(null),Vt=_(``),Ht=_(null),E=_([]),Ut=_(1),D=_(!0),O=_(!0),Wt=_(null),Gt=_(0),Kt=_(!1),qt=_(null),Jt=_(null),Yt=_(null),Xt=_(null),Zt=_(0),Qt=_(0),$t=_(0),k=_(null),en=_(!1),tn=_(null),nn=_(null),rn=_(!1),an=_(!1),on=_(!1),A=_(null),sn=_(!1),cn=_(!1),ln=_(!1),j=_(null),un=_({x:0,y:0}),M=d(()=>Array.isArray(yn.value)&&yn.value.length>0),N=mt,dn=ft(),P=_(Tn()),F=d(()=>P.value.userOptions),I=d(()=>P.value.style.chart.tooltip),L=d(()=>P.value.style.chart.grid.y.verticalLines),fn=d(()=>P.value.style.chart.grid.x.horizontalLines),R=d(()=>P.value.style.chart.grid.y.axisLabels),z=d(()=>P.value.style.chart.grid.x.timeLabels),B=d(()=>P.value.style.chart.grid),V=d(()=>P.value.style.chart.dataLabels),H=d(()=>P.value.style.chart);_e({config:()=>P.value,dataset:()=>S.dataset,component:`VueUiXyCanvas`,rules:[ve.emptyArray,{test:e=>e.every(e=>e.series.length<300),message:[`👀 Series have < 300 datapoints. Consider:`,``,`▶️ Using VueUiXy instead, if you need more options, or more customization possibilities.`]},{test:e=>e.some(e=>e.series.length>1e4),message:[`👀 The dataset has > 10_000 datapoints. Above this threshold, the dataset is computed through an LTTB algorithm, to preserve the shape of the data without increasing the number of datapoints.`,``,`▶️ If you need this level of detail, you can change config.downsample.threshold and set a higher value. Note that performance can be impacted. JS runtime might crash with > 100_000 datapoints.`]}]});let pn=d(()=>{let e=H.value.title.text||`XY chart`,t=X.value.end-X.value.start;return`${e}. ${Y.value.filter(e=>!E.value.includes(e.absoluteIndex)).length} series. ${t} visible data points.`}),mn=d(()=>{if(j.value===null)return``;let e=j.value+X.value.start;return`${z.value.values.slice(X.value.start,X.value.end)[j.value]?I.value.useDefaultTimeFormat?$.value.slice(X.value.start,X.value.end)[j.value]?.text:Nr.value[j.value]?.text:$.value[e]?.text??`Point ${e+1}`}. ${Y.value.filter(e=>!E.value.includes(e.absoluteIndex)).map(e=>{let t=e.series[j.value],n=t?.value??t??null;return`${e.name}: ${n}`}).join(`. `)}.`}),hn=d(()=>F.value.useCursorPointer),gn=d(()=>P.value.debug);ot(()=>{dn[`chart-background`]&&gn.value&&console.warn(`VueUiXyCanvas does not support the #chart-background slot.`)});let _n=d(()=>se({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,grid:{x:{axisColor:`#6A6A6A`,timeLabels:{show:!1},axisName:``,horizontalLines:{color:`#6A6A6A`}},y:{axisColor:`#6A6A6A`,axisLabels:{show:!1},axisName:``,verticalLines:{color:`#6A6A6A`}},zeroLine:{color:`#6A6A6A`}},legend:{backgroundColor:`#99999930`},paddingProportions:{left:.05},scale:{max:null,min:null},zoom:{endIndex:null,startIndex:null}}}},userConfig:P.value.skeletonConfig??{}})),{loading:vn,FINAL_DATASET:yn}=he({...dt(S),FINAL_CONFIG:P,prepareConfig:Tn,skeletonDataset:S.config?.skeletonDataset??[{name:``,series:[0,1,2,3,5,8,13,21,34,55,89,134],type:`line`,smooth:!0,color:`#BABABA`},{name:``,series:[0,.5,1,1.5,2.5,4,6.5,10.5,17,27.5,44.5,67],type:`bar`,color:`#AAAAAA`}],skeletonConfig:se({defaultConfig:P.value,userConfig:_n.value})}),{userOptionsVisible:bn,setUserOptionsVisibility:xn,keepUserOptionState:Sn}=We({config:P.value}),{svgRef:U}=Ge({config:H.value.title});function Cn(){xn(!0)}function wn(){xn(!1),N(`selectX`,{dataset:null,index:null,indexLabel:null}),T.value=null}function Tn(){let e=be({userConfig:S.config,defaultConfig:Nt}),t={},n=e.theme;if(n){if(!Pt.value(e))Ft(e),t=e;else{let r=be({userConfig:qe[n]||S.config,defaultConfig:e});t={...be({userConfig:S.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:ce[n]||o}}}else t=e;return S.config&&pe(S.config,`style.chart.grid.y.timeLabels`)&&(console.warn(`VueUiXyCanvas: you are using the deprecated config.style.chart.grid.y.timeLabels. It is recommended to move this configuration to config.style.chart.grid.x.timeLabels.`),t.style.chart.grid.x.timeLabels=be({defaultConfig:t.style.chart.grid.x.timeLabels,userConfig:S.config.style.chart.grid.y.timeLabels})),t}let En=ne(S.config);b(()=>S.config,(e,t)=>{let n=ne(e),r=n!==En;En=n;let i=Tn();r?(vn.value||(P.value=i),bn.value=!F.value.showOnChartHover,Di(),Zt.value+=1,Qt.value+=1,$t.value+=1,W.value.showTable=P.value.table.show,W.value.showDataLabels=V.value.show,W.value.stacked=H.value.stacked,W.value.showTooltip=I.value.show):(P.value.style.chart.tooltip=i.style.chart.tooltip,W.value.showTooltip=P.value.style.chart.tooltip.show)},{deep:!0}),b(()=>S.dataset,async e=>{Array.isArray(e)&&e.length!==0&&(await nt(),U.value&&!C.value&&(C.value=U.value.getContext(`2d`,{willReadFrequently:!0})),D.value=!0,O.value=!0,await fr(),Sr(),Zt.value+=1,Qt.value+=1,$t.value+=1)},{deep:!0});let Dn=_(H.value.aspectRatio),{isPrinting:On,isImaging:kn,generatePdf:An,generateImage:jn}=Me({elementId:`xy_canvas_${It.value}`,fileName:H.value.title.text||`vue-ui-xy-canvas`,options:F.value.print}),W=_({showTable:P.value.table.show,showDataLabels:V.value.show,stacked:H.value.stacked,showTooltip:I.value.show});function Mn(e){Kt.value=e,Gt.value+=1}let Nn=d(()=>fe(P.value.customPalette)),Pn=d(()=>E.value.length===J.value.length),G=d(()=>J.value?Math.max(...J.value.filter((e,t)=>Pn.value?!0:!E.value.includes(e.absoluteIndex)).map(e=>e.series.length)):0);function Fn(e){A.value=e,Wr()}let In=_(0),Ln=_(0);function Rn(){if(!C.value||!z.value.show)return 0;let e=$.value||[],t=X.value.start??0,n=X.value.end??0;if(!Math.max(0,n-t))return 0;let r=Math.round(w.value/40*z.value.fontSizeRatio),i=`${z.value.bold?`bold `:``}${r}px ${P.value.style.fontFamily}`;C.value.save(),C.value.font=i;let a=0;for(let r=t;r<n;r+=1){let t=e[r]?.text??`${r+1}`,n=C.value.measureText(String(t));n.width>a&&(a=n.width)}C.value.restore();let o=(z.value.rotation||0)*Math.PI/180,s=r,ee=Math.abs(Math.sin(o))*a+Math.abs(Math.cos(o))*s,c=z.value.offsetY||1,l=w.value/c;return Math.max(0,l+ee+4)}function zn(){In.value=Rn()}function Bn(){Ln.value&&cancelAnimationFrame(Ln.value),Ln.value=requestAnimationFrame(()=>{requestAnimationFrame(()=>{zn()})})}at(()=>{Ln.value&&cancelAnimationFrame(Ln.value)});let K=d(()=>{let e=w.value-w.value*(H.value.paddingProportions.left+H.value.paddingProportions.right),t=zt.value*H.value.paddingProportions.top,n=zt.value*H.value.paddingProportions.bottom,r=In.value,i=zt.value-n-r,a=zt.value-(t+n)-r;return{canvasWidth:w.value,canvasHeight:zt.value,left:w.value*H.value.paddingProportions.left,top:t,right:w.value-w.value*H.value.paddingProportions.right,bottom:i,width:e,height:a,slot:e/(X.value.end-X.value.start)}});function Vn(e,t){return e/t}function Hn({hasAutoScale:e,series:t,min:n,max:r,scale:i,yOffset:a,individualHeight:o,stackIndex:s=null}){return t.map((t,n)=>{let r=i.min<0?Math.abs(i.min):0,ee=Vn(t+r,r+i.max),c,l;e&&(c=i.min,l=Vn(t-c,i.max-c));let te=0;return te=s===null?K.value.bottom-K.value.height*(e?l:ee):K.value.bottom-a-o*(e?l:ee),{x:K.value.left+K.value.slot*n+K.value.slot/2,y:te,value:t}})}let q=d(()=>{let e=H.value.scale.min===null?Math.min(...J.value.filter((e,t)=>!E.value.includes(e.absoluteIndex)).flatMap(e=>e.series.slice(X.value.start,X.value.end))):H.value.scale.min,t=H.value.scale.max===null?Math.max(...J.value.filter((e,t)=>!E.value.includes(e.absoluteIndex)).flatMap(e=>e.series.slice(X.value.start,X.value.end))):H.value.scale.max,n=re(e<0?e:0,t===e?e+1<0?0:e+1:t<0?0:t,H.value.scale.ticks),r=n.min<0?Math.abs(n.min):0,i=K.value.bottom-K.value.height*(r/(n.max+r));return{absoluteMin:r,max:t,min:e,scale:n,yLabels:n.ticks.map(e=>({y:K.value.bottom-K.value.height*((e+r)/(n.max+r)),x:K.value.left-8,value:e})),zero:i}}),Un=d(()=>Y.value.map(e=>`
2
- <div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
3
- <svg viewBox="0 0 10 10" height="12" width="12">
4
- <circle cx="5" cy="5" r="5" fill="${e.color}"/>
5
- </svg>
6
- <span>${e.name?e.name+`: `:``}</span>
7
- <span>${oe(V.value.formatter,e.series[T.value]??`-`,n({p:e.prefix||``,v:e.series[T.value]??`-`,s:e.suffix||``,r:e.rounding||0}),{datapoint:e,seriesIndex:T.value})}</span>
8
- </div>
9
- `)),Wn=d(()=>H.value.line.cutNullValues),J=d(()=>yn.value.map((e,t)=>({...e,series:c({data:ee(e.series,[],Wn.value),threshold:P.value.downsample.threshold}),absoluteIndex:t,color:l(e.color||Nn.value[t]||o[t]||o[t%o.length])}))),Gn=d(()=>{if(!H.value.zoom.minimap.show)return[];let e=J.value.filter(e=>!E.value.includes(e.absoluteIndex)),t=Math.max(...e.map(e=>e.series.length)),n=[];for(let r=0;r<t;r+=1)n.push(e.map(e=>e.series[r]||0).reduce((e,t)=>(e||0)+(t||0),0));let r=Math.min(...n);return n.map(e=>e+(r<0?Math.abs(r):0))}),Kn=d(()=>H.value.zoom.minimap.show?J.value.map(e=>({...e,isVisible:!E.value.includes(e.absoluteIndex)})):[]);b(G,e=>{e&&fr()});let Y=d(()=>ue(J.value.filter((e,t)=>!E.value.includes(e.absoluteIndex))).map((e,t)=>({...e,series:e.series.slice(X.value.start,X.value.end)})).map((e,t)=>{let n=[null,void 0].includes(e.scaleMin)?Math.min(...e.series)||0:e.scaleMin,r=[null,void 0].includes(e.scaleMax)?Math.max(...e.series)||1:e.scaleMax;n===r&&(n=n>=0?r-1:n,r=r>=0?r:n+1);let i={ratios:e.series.filter(e=>![null,void 0].includes(e)).map(e=>(e-n)/(r-n)),valueMin:n,valueMax:r},a=e.scaleSteps||H.value.scale.ticks,o;o=e.autoScaling?re(i.valueMin,i.valueMax,a):re(i.valueMin<0?i.valueMin:0,i.valueMax<=0?0:i.valueMax,a);let s=W.value.stacked?K.value.height*(1-e.cumulatedStackRatio):0,ee=W.value.stacked?K.value.height/H.value.stackGap:0,c=W.value.stacked?K.value.height*e.stackRatio-ee:K.value.height,l=o.min<0?Math.abs(o.min):0,te;te=e.autoScaling&&W.value.stacked&&r<=0?K.value.bottom-s-c:K.value.bottom-s-c*(l/(o.max+l));let ne=o.ticks.map((e,t)=>({y:K.value.bottom-s-c*(t/(o.ticks.length-1)),x:K.value.left-8,value:e})),ie=Hn({hasAutoScale:W.value.stacked&&e.autoScaling,series:e.series,min:W.value.stacked?n:q.value.min,max:W.value.stacked?r:q.value.max,scale:W.value.stacked?o:q.value.scale,yOffset:s,individualHeight:c,stackIndex:W.value.stacked?t:null});return{...e,coordinatesLine:ie,min:n,max:r,localScale:o,localZero:te,localMin:l,localYLabels:ne,yOffset:s,individualHeight:c}})),X=_({start:0,end:G.value}),Z=_({start:0,end:G.value}),qn=_(!1),Jn=_(!1),Yn=_(null),Xn=_(!1),Zn=_(null),Qn=_(null),$n=_(null),er=_({time:0,x:0,y:0,pointerType:null}),tr=d(()=>H.value.zoom?.dragToZoom),nr=d(()=>tr.value.show&&M.value&&an.value&&G.value>1&&!vn.value),rr=_(null),ir=null,ar={};function or(){return new Promise(e=>requestAnimationFrame(()=>requestAnimationFrame(()=>e())))}function sr(e,t=X.value){if(!e||typeof e!=`object`)return null;let n=e.start!==void 0&&e.start!==null,r=e.end!==void 0&&e.end!==null;if(!n&&!r)return null;let i=Number(n?e.start:t.start),a=Number(r?e.end:t.end);return!Number.isFinite(i)||!Number.isFinite(a)?null:{start:i,end:a}}function cr(e){let t=sr(e);t&&N(`update:zoomState`,t)}function lr(){ir&&=(cancelAnimationFrame(ir),null),ar={}}function ur(e){let t=sr(e);if(!t)return null;let{start:n,end:r}=t;return(n!==Number(X.value.start)||r!==Number(X.value.end))&&(lr(),X.value={start:n,end:r},Z.value={start:n,end:r},br()),{start:Number(X.value.start),end:Number(X.value.end)}}function dr(e){let t=ur(e);return t?(N(`update:zoomState`,t),t):null}at(()=>{rr.value&&cancelAnimationFrame(rr.value),lr(),ai()});async function fr({force:e=!1,publish:t=!1}={}){let n=!e;await hr(n),await nt(),rr.value&&cancelAnimationFrame(rr.value),rr.value=requestAnimationFrame(async()=>{await or(),await hr(n),rr.value=null,t&&(cr({start:Number(X.value.start),end:Number(X.value.end)}),N(`zoomReset`))})}let pr=d(()=>H.value.zoom.preview.enable&&(Z.value.start!==X.value.start||Z.value.end!==X.value.end));function mr(e,t){Z.value[e]=t}async function hr(e=!0){if(!rn.value){rn.value=!0;try{let{startIndex:t,endIndex:n}=H.value.zoom,r=Math.max(...J.value.map(e=>e.series.length)),i=t??0,a=n==null?r:Math.min(yr(n+1,i),r);on.value=!0,X.value={start:i,end:a},Z.value={start:i,end:a},br(),an.value=!0,await nt(),Yt.value&&Yt.value.setRangeValues(X.value.start,X.value.end),e&&S.zoomState&&ur(S.zoomState)}finally{queueMicrotask(()=>{on.value=!1}),rn.value=!1}}}function gr(e){ar={...ar,...e},ir&&cancelAnimationFrame(ir),ir=requestAnimationFrame(()=>{let e={...X.value,...ar};ar={},ir=null,X.value=e,Z.value={...e},br(),cr({start:Number(X.value.start),end:Number(X.value.end)})})}function _r(e){if(rn.value||on.value)return;let t=Number(e);Number.isFinite(t)&&(N(`zoomStart`,{index:t,isZoom:t!==0}),t!==X.value.start&&gr({start:t}))}function vr(e){if(rn.value||on.value)return;let t=ar.start===void 0?X.value.start:ar.start,n=yr(Number(e),t);Number.isFinite(n)&&(N(`zoomEnd`,{index:n,isZoom:n!==G.value}),(n!==X.value.end||ar.start!==void 0)&&gr({end:n}))}function yr(e,t=X.value.start){let n=G.value,r=Number(t);return e>n?n:e<0||e<=r?Math.min(r+1,n):e}function br(){let e=Math.max(1,Math.max(...J.value.map(e=>e.series.length))),t=Math.max(0,Math.min(X.value.start??0,e-1)),n=Math.max(t+1,Math.min(X.value.end??e,e));(!Number.isFinite(t)||!Number.isFinite(n)||n<=t)&&(t=0,n=e),X.value={start:t,end:n},Z.value={start:t,end:n},Yt.value&&Yt.value.setRangeValues(t,n)}b([()=>S.zoomState,an],([e,t])=>{t&&e&&ur(e)},{deep:!0,immediate:!0});let xr=d(()=>Y.value.filter(e=>[`line`,`plot`,void 0].includes(e.type))),Q=d(()=>Y.value.filter(e=>e.type===`bar`));function Sr(){if(!U.value||!Rt.value)return;let e=Rt.value.offsetWidth,t=Rt.value.offsetHeight;U.value.width=e*Ut.value*2,U.value.height=t*Ut.value*2,w.value=e*Ut.value*2,zt.value=t*Ut.value*2,C.value?.scale(Ut.value,Ut.value),Wr()}b(M,async e=>{e?(await nt(),U.value&&!C.value&&(C.value=U.value.getContext(`2d`,{willReadFrequently:!0})),D.value=!0,O.value=!0,await fr(),Sr(),Wr()):(Wt.value=null,Bt.value=!1,T.value=null,k.value=null)});function Cr(){if(C.value&&(C.value.clearRect(0,0,1e4,1e4),C.value.fillStyle=H.value.backgroundColor,C.value.fillRect(0,0,K.value.canvasWidth,K.value.canvasHeight),M.value)){if(W.value.stacked)L.value.show&&X.value.end-X.value.start<L.value.hideUnderXLength?Y.value.forEach(e=>{for(let t=0;t<X.value.end-X.value.start+1;t+=1)u(C.value,[{x:K.value.left+K.value.slot*t,y:K.value.bottom-e.yOffset-e.individualHeight},{x:K.value.left+K.value.slot*t,y:K.value.bottom-e.yOffset}],{color:L.value.color})}):L.value.show&&X.value.end-X.value.start>=L.value.hideUnderXLength&&Y.value.forEach(e=>{for(let t=X.value.start;t<X.value.end;t+=1)t%Math.floor((X.value.end-X.value.start)/fn.value.modulo)===0&&u(C.value,[{x:K.value.left+K.value.slot*(t-X.value.start)+K.value.slot/2,y:K.value.bottom-e.yOffset-e.individualHeight},{x:K.value.left+K.value.slot*(t-X.value.start)+K.value.slot/2,y:K.value.bottom-e.yOffset}],{color:L.value.color})}),fn.value.show&&(fn.value.alternate?Y.value.forEach(e=>{e.localYLabels.forEach((t,n)=>{n<e.localYLabels.length-1&&Ie(C.value,[{x:K.value.left,y:t.y},{x:K.value.right,y:t.y},{x:K.value.right,y:e.localYLabels[n+1].y},{x:K.value.left,y:e.localYLabels[n+1].y}],{fillColor:n%2==0?`transparent`:s(H.value.grid.x.horizontalLines.color,H.value.grid.x.horizontalLines.opacity),strokeColor:`transparent`})})}):Y.value.forEach(e=>{e.localYLabels.slice(X.value.start,X.value.end).forEach(e=>{u(C.value,[{x:K.value.left,y:e.y},{x:K.value.right,y:e.y}],{color:fn.value.color})})})),B.value.zeroLine.show&&Y.value.forEach(e=>{u(C.value,[{x:K.value.left,y:e.localZero},{x:K.value.right,y:e.localZero}],{color:B.value.zeroLine.color,lineDash:B.value.zeroLine.dashed?[10,10]:[0,0]})}),R.value.show&&Y.value.forEach(e=>{u(C.value,[{x:K.value.left,y:K.value.bottom-e.yOffset},{x:K.value.left,y:K.value.bottom-e.yOffset-e.individualHeight}],{color:e.color}),u(C.value,[{x:K.value.right,y:K.value.bottom-e.yOffset},{x:K.value.right,y:K.value.bottom-e.yOffset-e.individualHeight}],{color:e.color})}),Y.value.forEach(e=>{Re(C.value,e.name,w.value/35,K.value.bottom-e.yOffset-e.individualHeight/2,{align:`center`,rotation:-90,color:e.color,font:`${Math.round(w.value/40*R.value.fontSizeRatio)}px ${P.value.style.fontFamily}`})});else{if(L.value.show&&X.value.end-X.value.start<L.value.hideUnderXLength)for(let e=0;e<X.value.end-X.value.start+1;e+=1)u(C.value,[{x:K.value.left+K.value.slot*e,y:K.value.top},{x:K.value.left+K.value.slot*e,y:K.value.bottom}],{color:L.value.color});else if(L.value.show&&X.value.end-X.value.start>=L.value.hideUnderXLength)for(let e=X.value.start;e<X.value.end;e+=1)e%Math.floor((X.value.end-X.value.start)/z.value.modulo)===0&&u(C.value,[{x:K.value.left+K.value.slot*(e-X.value.start)+K.value.slot/2,y:K.value.top},{x:K.value.left+K.value.slot*(e-X.value.start)+K.value.slot/2,y:K.value.bottom}],{color:L.value.color});fn.value.show&&(fn.value.alternate?q.value.yLabels.forEach((e,t)=>{t<q.value.yLabels.length-1&&Ie(C.value,[{x:K.value.left,y:e.y},{x:K.value.right,y:e.y},{x:K.value.right,y:q.value.yLabels[t+1].y},{x:K.value.left,y:q.value.yLabels[t+1].y}],{fillColor:t%2==0?`transparent`:s(H.value.grid.x.horizontalLines.color,H.value.grid.x.horizontalLines.opacity),strokeColor:`transparent`})}):q.value.yLabels.forEach(e=>{u(C.value,[{x:K.value.left,y:e.y},{x:K.value.right,y:e.y}],{color:fn.value.color})})),B.value.y.showAxis&&u(C.value,[{x:K.value.left,y:K.value.top},{x:K.value.left,y:K.value.bottom}],{color:B.value.y.axisColor,lineWidth:B.value.y.axisThickness}),B.value.x.showAxis&&u(C.value,[{x:K.value.left,y:K.value.bottom},{x:K.value.right,y:K.value.bottom}],{color:B.value.x.axisColor,lineWidth:B.value.x.axisThickness}),B.value.zeroLine.show&&u(C.value,[{x:K.value.left,y:q.value.zero},{x:K.value.right,y:q.value.zero}],{color:B.value.zeroLine.color,lineDash:B.value.zeroLine.dashed?[10,10]:[0,0]})}B.value.y.axisName&&Re(C.value,B.value.y.axisName,w.value-w.value/40*R.value.fontSizeRatio*1.2,K.value.bottom-K.value.height/2,{font:`${R.value.bold?`bold `:``}${Math.round(w.value/40*R.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,color:H.value.color,align:`center`,rotation:90}),B.value.x.axisName&&Re(C.value,B.value.x.axisName,w.value/2,zt.value,{font:`${R.value.bold?`bold `:``}${Math.round(w.value/40*R.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,color:H.value.color,align:`center`})}}function wr(e){for(let t=0;t<e.coordinatesLine.length;t+=1){let n=(T.value===t||A.value===t?w.value/150:H.value.line.plots.show||e.type===`plot`?w.value/200:0)*H.value.line.plots.radiusRatio;ze(C.value,{x:e.coordinatesLine[t].x,y:e.coordinatesLine[t].y},n,{color:H.value.backgroundColor,fillStyle:e.color,strokeColor:`transparent`})}}function Tr(){Y.value.forEach(e=>{e.showYMarker&&Kr(e)&&Re(C.value,oe(V.value.formatter,Kr(e).value,n({p:e.prefix||R.value.prefix||``,v:Kr(e).value,s:e.suffix||R.value.suffix||``,r:e.rounding||R.value.rounding||0}),{datapoint:Kr(e),seriesIndex:null}),K.value.left-8+R.value.offsetX,Kr(e).y,{align:`right`,font:`${R.value.bold?`bold `:``}${Math.round(w.value/40*R.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,color:e.color})})}function Er(){R.value.show&&(W.value.stacked?Y.value.forEach(e=>{e.localYLabels.forEach((t,r)=>{Re(C.value,oe(V.value.formatter,t.value,n({p:e.prefix||B.value.y.axisLabels.prefix||``,v:t.value,s:e.suffix||B.value.y.axisLabels.suffix||``,r:e.rounding||B.value.y.axisLabels.rounding||0}),{datapoint:t,seriesIndex:r}),t.x+R.value.offsetX,t.y,{align:`right`,font:`${R.value.bold?`bold `:``}${Math.round(w.value/40*R.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,color:e.color,globalAlpha:e.showYMarker&&![null,void 0].includes(T.value??A.value)?.2:1})})}):q.value.yLabels.forEach((e,t)=>{Re(C.value,oe(V.value.formatter,e.value,n({p:R.value.prefix||``,v:e.value,s:R.value.suffix||``,r:R.value.rounding||0}),{datapoint:e,seriesIndex:t}),e.x+R.value.offsetX,e.y,{align:`right`,font:`${R.value.bold?`bold `:``}${Math.round(w.value/40*R.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,color:R.value.color,globalAlpha:Y.value.some(e=>e.showYMarker)&&![null,void 0].includes(T.value??A.value)?.2:1})}))}function Dr(e){for(let t=0;t<e.coordinatesLine.length;t+=1)Re(C.value,oe(V.value.formatter,e.coordinatesLine[t].value,n({p:e.prefix||``,v:e.coordinatesLine[t].value,s:e.suffix||``,r:e.rounding||0}),{datapoint:e.coordinatesLine[t],seriesIndex:t}),e.coordinatesLine[t].x,e.coordinatesLine[t].y+V.value.offsetY,{align:`center`,font:`${V.value.bold?`bold `:``}${Math.round(w.value/40*V.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,color:V.value.useSerieColor?e.color:V.value.color,strokeColor:H.value.backgroundColor,lineWidth:.5})}let $=_([]),Or=0;pt(()=>{let e=++Or;(async()=>{let t=await je({values:z.value.values,maxDatapoints:G.value,formatter:z.value.datetimeFormatter,start:0,end:G.value});e===Or&&($.value=t)})()}),pt(()=>{z.value.show,z.value.rotation,z.value.offsetY,z.value.fontSizeRatio,z.value.bold,X.value.start,X.value.end,w.value,zt.value,($.value||[]).map(e=>e?.text??``).join(`|`),Bn()},{flush:`post`});let kr=_({months:[],shortMonths:[],days:[],shortDays:[]}),Ar=0;pt(()=>{let e=++Ar,t=z.value.datetimeFormatter;(async()=>{let n=await Ae(t.locale).catch(()=>Ae(`en`));e===Ar&&(kr.value=n.data)})()});let jr=d(()=>{let e=z.value.datetimeFormatter,t=ke({useUTC:e.useUTC,locale:kr.value,januaryAsYear:e.januaryAsYear});return(e,n)=>{let r=z.value.values?.[e];return r==null?``:t.formatDate(new Date(r),n)}}),Mr=d(()=>(z.value.values||[]).map((e,t)=>({text:jr.value(t,H.value.zoom.timeFormat),absoluteIndex:t}))),Nr=d(()=>(z.value.values||[]).map((e,t)=>({text:jr.value(t,I.value.timeFormat),absoluteIndex:t})));function Pr(){for(let e=X.value.start;e<X.value.end;e+=1)(X.value.end-X.value.start<z.value.modulo||X.value.end-X.value.start>=z.value.modulo&&(e%Math.floor((X.value.end-X.value.start)/z.value.modulo)===0||(e===T.value+X.value.start||e===A.value)&&z.value.showMarker))&&Re(C.value,$.value[e]?$.value[e].text:e+1,K.value.left+K.value.slot*(e-X.value.start)+K.value.slot/2,K.value.bottom+w.value/z.value.offsetY,{align:z.value.rotation===0?`center`:z.value.rotation>0?`left`:`right`,font:`${z.value.bold?`bold `:``}${Math.round(w.value/40*z.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,color:z.value.showMarker?s(z.value.color,T.value!==null||A.value!==null?T.value+X.value.start===e||A.value===e?100:20:100):z.value.color,rotation:z.value.rotation})}function Fr(){u(C.value,[{x:K.value.left+K.value.slot*(T.value??A.value)+K.value.slot/2,y:K.value.top},{x:K.value.left+K.value.slot*(T.value??A.value)+K.value.slot/2,y:K.value.bottom}],{color:H.value.selector.color,lineDash:H.value.selector.dashed?[8,8]:[0,0],lineWidth:2,linceCap:`round`})}function Ir(){k.value&&u(C.value,[{x:K.value.left,y:k.value},{x:K.value.right,y:k.value}],{color:H.value.selector.color,lineDash:H.value.selector.dashed?[8,8]:[0,0],lineWidth:2,linceCap:`round`})}function Lr(){Q.value.forEach((e,t)=>{for(let r=0;r<e.coordinatesLine.length;r+=1)Ie(C.value,[{x:K.value.left+K.value.slot*r+K.value.slot/10+(W.value.stacked?0:K.value.slot/Q.value.length*t-(t===0?0:K.value.slot/(5*Q.value.length)*t)),y:W.value.stacked?e.localZero:q.value.zero},{x:K.value.left+K.value.slot*r+K.value.slot/10+(W.value.stacked?0:K.value.slot/Q.value.length*t-(t===0?0:K.value.slot/(5*Q.value.length)*t))+K.value.slot*.8/(W.value.stacked?1:Q.value.length),y:W.value.stacked?e.localZero:q.value.zero},{x:K.value.left+K.value.slot*r+K.value.slot/10+(W.value.stacked?0:K.value.slot/Q.value.length*t-(t===0?0:K.value.slot/(5*Q.value.length)*t))+K.value.slot*.8/(W.value.stacked?1:Q.value.length),y:e.coordinatesLine[r].y},{x:K.value.left+K.value.slot*r+K.value.slot/10+(W.value.stacked?0:K.value.slot/Q.value.length*t-(t===0?0:K.value.slot/(5*Q.value.length)*t)),y:e.coordinatesLine[r].y}],{strokeColor:H.value.backgroundColor,gradient:{type:`linear`,start:{x:e.coordinatesLine[r].x,y:e.coordinatesLine[r].y},end:{x:e.coordinatesLine[r].x,y:W.value.stacked?e.localZero:q.value.zero},stops:[{offset:0,color:e.color},{offset:1,color:H.value.bar.gradient.show?a(e.color,.5):e.color}]}}),W.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&Re(C.value,oe(V.value.formatter,e.coordinatesLine[r].value,n({p:e.prefix||``,v:e.coordinatesLine[r].value,s:e.suffix||``,r:e.rounding||0}),{datapoint:e.coordinatesLine[r],seriesIndex:r}),K.value.left+K.value.slot*r+K.value.slot/10+(W.value.stacked?0:K.value.slot/Q.value.length*t-(t===0?0:K.value.slot/(5*Q.value.length)*t))+K.value.slot*.4/(W.value.stacked?1:Q.value.length),(e.coordinatesLine[r].value<0?W.value.stacked?e.localZero:q.value.zero:e.coordinatesLine[r].y)+V.value.offsetY,{align:`center`,font:`${Math.round(w.value/40*V.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,color:V.value.useSerieColor?e.color:V.value.color,strokeColor:H.value.backgroundColor,lineWidth:.8})})}function Rr(e,t){let n=e.coordinatesLine.map((t,n)=>e.series[n]!=null&&Number.isFinite(t?.y)?t:null),r=[],i=[],a=[];for(let e=0;e<n.length;e+=1){let o=n[e];if(o)a.push(o);else{if(a.length>=2){let e=a[0],n=a[a.length-1];r.push([{x:e.x,y:t},...a,{x:n.x,y:t}])}else a.length===1&&i.push(a[0]);a=[]}}if(a.length>=2){let e=a[0],n=a[a.length-1];r.push([{x:e.x,y:t},...a,{x:n.x,y:t}])}else a.length===1&&i.push(a[0]);return{polygons:r,singles:i}}function zr(e){let t=e.coordinatesLine.map((t,n)=>e.series[n]!=null&&Number.isFinite(t?.y)?t:null),n=[],r=[];for(let e=0;e<t.length;e+=1){let i=t[e];i?r.push(i):(r.length>=2&&n.push(r),r=[])}return r.length>=2&&n.push(r),n}function Br(e){if(Wn.value){let t=zr(e);for(let n of t)u(C.value,n,{color:e.color,lineWidth:3})}else u(C.value,e.coordinatesLine,{color:e.color,lineWidth:3})}function Vr(e){let t=!!Wn.value;if(e.useArea){let n=W.value.stacked?e.localZero:q.value.zero;if(t){let{polygons:t,singles:r}=Rr(e,n);for(let n of t)Ne(C.value,n,{fillColor:s(e.color,H.value.area.opacity),strokeColor:`transparent`});let i=w.value/200*H.value.line.plots.radiusRatio;for(let t of r)ze(C.value,{x:t.x,y:t.y},i,{color:H.value.backgroundColor,fillStyle:e.color,strokeColor:`transparent`})}else{let t={x:e.coordinatesLine[0].x,y:n},r={x:e.coordinatesLine.at(-1).x,y:n};Ne(C.value,[t,...e.coordinatesLine,r],{fillColor:s(e.color,H.value.area.opacity),strokeColor:`transparent`})}Br(e)}else Br(e)}function Hr(){Y.value.forEach((e,t)=>{u(C.value,[{x:K.value.left,y:K.value.bottom-e.yOffset},{x:K.value.right,y:K.value.bottom-e.yOffset}],{color:fn.value.color,lineWidth:1})})}function Ur(){let{left:e,top:t,width:n,height:r}=K.value,i=X.value.start,a=X.value.end-i,o=n/a,s=Z.value.start-i,ee=Z.value.end-i,c=Math.max(0,Math.min(a,s)),l=Math.max(0,Math.min(a,ee));Ie(C.value,[{x:e+c*o,y:t},{x:e+c*o+(l-c)*o,y:t},{x:e+c*o+(l-c)*o,y:t+r},{x:e+c*o,y:t+r}],{fillColor:H.value.zoom.preview.fill,strokeColor:H.value.zoom.preview.stroke,lineDash:[,,,,].fill(H.value.zoom.preview.strokeDasharray),lineWidth:H.value.zoom.preview.strokeWidth})}function Wr(){M.value&&U.value&&C.value&&(Cr(),D.value?((T.value!==null||A.value!==null)&&H.value.selector.show&&Fr(),Lr(),W.value.stacked&&B.value.x.showAxis&&Hr(),xr.value.forEach(e=>{e.type!==`line`&&e.type||Vr(e),O.value&&(wr(e),W.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&Dr(e))}),U.value&&(Wt.value=Fe(U.value))):(Wt.value&&(C.value.clearRect(0,0,1e4,1e4),C.value.drawImage(Wt.value,0,0)),(T.value!==null||A.value!==null)&&H.value.selector.show&&Fr(),(T.value!==null||A.value!==null)&&Y.value.forEach(e=>{let t=T.value??A.value,n=e.coordinatesLine[t];(e.type===`line`||!e.type||e.type===`plot`)&&n&&Number.isFinite(n.x)&&Number.isFinite(n.y)&&ze(C.value,{x:n.x,y:n.y},w.value/150*H.value.line.plots.radiusRatio,{color:H.value.backgroundColor,fillStyle:e.color,strokeColor:`transparent`})})),z.value.show&&Pr(),H.value.selector.show&&H.value.selector.showHorizontalSelector&&Ir(),Er(),Tr(),H.value.zoom.preview.enable&&(X.value.start!==Z.value.start||X.value.end!==Z.value.end)&&Ur(),D.value=!1)}let Gr=Le(()=>{O.value=!0,Sr()},G.value>200?10:1,!O.value);function Kr(e){if([null,void 0].includes(T.value??A.value)||!e.coordinatesLine[T.value??A.value])return!1;let{y:t,value:n}=e.coordinatesLine[T.value??A.value];return{y:t,value:n}}let qr=d(()=>!qn.value||Zn.value==null||Qn.value==null?null:{x:Math.min(Zn.value,Qn.value),y:K.value.top,width:Math.abs(Qn.value-Zn.value),height:K.value.height}),Jr=d(()=>an.value?Number(X.value.start)!==0||Number(X.value.end)!==Number(G.value):!1);function Yr(e){if(!U.value)return null;let t=U.value.getBoundingClientRect();return!t.width||!t.height?null:{x:(e.clientX-t.left)*(K.value.canvasWidth/t.width),y:(e.clientY-t.top)*(K.value.canvasHeight/t.height)}}function Xr(e){return Math.min(Math.max(e,K.value.left),K.value.right)}function Zr(e){return Y.value.map(t=>{let n=t.series[e];return{...t,name:t.name,value:[null,void 0,NaN].includes(n)?null:n,color:t.color,type:t.type}})}function Qr(e,t){if(t==null||t<0||t>=X.value.end-X.value.start)return;let n=P.value.events?.[e];i(n)&&n({datapoint:Zr(t),seriesIndex:t+X.value.start})}function $r(e){Yn.value!==e&&(Yn.value=e,Qr(`datapointEnter`,e))}function ei(){let e=Yn.value;e!=null&&Qr(`datapointLeave`,e),Yn.value=null}function ti(){Xn.value=!0,setTimeout(()=>{Xn.value=!1},0)}function ni(e){if(!e||!K.value?.slot)return null;let{left:t,right:n,top:r,bottom:i,slot:a}=K.value;if(e.x<t||e.x>n||e.y<r||e.y>i)return null;let o=Math.floor((e.x-t)/a),s=X.value.end-X.value.start;return o<0||o>=s?null:o}function ri(e){if(Xn.value){Xn.value=!1;return}let t=ni(Yr(e));t!==null&&Qr(`datapointClick`,t)}function ii(){ei(),vi(),A.value=null}function ai(e){let t=e?.pointerId==null?$n.value:e.pointerId;t!=null&&U.value?.hasPointerCapture?.(t)&&U.value.releasePointerCapture(t),qn.value=!1,Zn.value=null,Qn.value=null,$n.value=null}function oi(e){if(!nr.value||!Jr.value||!e)return!1;let t=Date.now(),n=e.pointerType||`mouse`,r=er.value,i=n===`touch`?450:350,a=n===`touch`?28:10,o=Math.hypot(e.clientX-r.x,e.clientY-r.y);return r.time>0&&r.pointerType===n&&t-r.time<=i&&o<=a?(er.value={time:0,x:0,y:0,pointerType:null},ti(),ai(e),fr({force:!0,publish:!0}),!0):(er.value={time:t,x:e.clientX,y:e.clientY,pointerType:n},!1)}function si(e){let t=Number(X.value.end)-Number(X.value.start);if(t<=0||!Number.isFinite(K.value.slot)||K.value.slot<=0)return null;let n=Math.floor((Xr(e)-K.value.left)/K.value.slot);return Math.max(0,Math.min(t-1,n))}function ci(e,t){let n=si(e),r=si(t);if(n==null||r==null)return null;let i=Math.min(n,r),a=Math.max(n,r);return a<=i?null:{start:Number(X.value.start)+i,end:Number(X.value.start)+a+1}}function li(e){let t=dr(e);return t?(N(`zoomStart`,{index:t.start,isZoom:t.start!==0}),N(`zoomEnd`,{index:t.end,isZoom:t.end!==G.value}),t):null}function ui(e){if(!nr.value||Ui.value||e.button!==void 0&&e.button!==0||$n.value!=null&&e.pointerId!==$n.value)return;let t=Yr(e);if(!t)return;let{left:n,right:r,top:i,bottom:a}=K.value;if(t.x<n||t.x>r||t.y<i||t.y>a||Number(X.value.end)-Number(X.value.start)<=1)return;Jn.value=!0,U.value?.focus?.({preventScroll:!0}),ii();let o=Xr(t.x);$n.value=e.pointerId,qn.value=!0,Zn.value=o,Qn.value=o}function di(e){if(!nr.value||!qn.value||$n.value!=null&&e.pointerId!==$n.value)return;let t=Yr(e);t&&(Qn.value=Xr(t.x),Zn.value!=null&&Math.abs(Qn.value-Zn.value)>=2&&!U.value?.hasPointerCapture?.(e.pointerId)&&U.value?.setPointerCapture?.(e.pointerId))}function fi(e){if(!nr.value||!qn.value||$n.value!=null&&e.pointerId!==$n.value)return;let t=Yr(e);t&&(Qn.value=Xr(t.x));let n=Zn.value,r=Qn.value;if((n==null||r==null?0:Math.abs(r-n))<Math.max(4,K.value.width*.01)){if(oi(e))return;ai(e);return}let i=ci(Math.min(n,r),Math.max(n,r));i?(ai(e),li(i)&&(er.value={time:0,x:0,y:0,pointerType:null},ii(),ti())):ai(e)}function pi(e){if(!M.value||!U.value||Pn.value||qn.value)return;let{left:t,top:n}=U.value.getBoundingClientRect(),r=e.clientX-t;if(k.value=(e.clientY-n)*2,(k.value<K.value.top||k.value>K.value.bottom)&&(k.value=null),r*2<K.value.left||r*2>K.value.right){ei(),vi();return}let a=r*2-K.value.left,o=Math.floor(a/K.value.slot);if($r(o),T.value=o,j.value=o,Bt.value=!0,cn.value=!1,!O.value)return;let s=``,ee=I.value.customFormat,c=Y.value.map(e=>({shape:e.shape||null,name:e.name,color:e.color,type:e.type||`line`,value:e.series.find((e,t)=>t===T.value)}));Ht.value={timeLabel:z.value.values.slice(X.value.start,X.value.end)[T.value]?I.value.useDefaultTimeFormat?$.value.slice(X.value.start,X.value.end)[T.value]?.text:Nr.value[T.value]?.text:``,datapoint:c,seriesIndex:T.value,series:Y.value,config:P.value},Si({seriesIndex:T.value,datapoint:c}),i(ee)&&de(()=>ee({seriesIndex:T.value,datapoint:c,series:Y.value,config:P.value}))?Vt.value=ee({seriesIndex:T.value,datapoint:c,series:Y.value,config:P.value}):(z.value.values.slice(X.value.start,X.value.end)[T.value]?s+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${I.value.borderColor}; width:100%">${I.value.useDefaultTimeFormat?$.value.slice(X.value.start,X.value.end)[T.value]?.text:Nr.value[T.value]?.text}</div>`:s+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${I.value.borderColor}; width:100%">${$.value[T.value+X.value.start]?.text??``}</div>`,s+=Un.value.join(``),Vt.value=s),O.value=!1}function mi(e){return Y.value.map(t=>({shape:t.shape||null,name:t.name,color:t.color,type:t.type||`line`,value:t.series.find((t,n)=>n===e)}))}function hi(e){let t=``,n=I.value.customFormat,r=mi(e);return Si({seriesIndex:e,datapoint:r}),i(n)&&de(()=>n({seriesIndex:e,datapoint:r,series:Y.value,config:P.value}))?n({seriesIndex:e,datapoint:r,series:Y.value,config:P.value}):(z.value.values.slice(X.value.start,X.value.end)[e]?t+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${I.value.borderColor}; width:100%">${I.value.useDefaultTimeFormat?$.value.slice(X.value.start,X.value.end)[e]?.text:Nr.value[e]?.text}</div>`:t+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${I.value.borderColor}; width:100%">${$.value[e+X.value.start]?.text??``}</div>`,t+=Un.value.join(``),t)}function gi(e){if(!U.value||!K.value?.slot)return;let t=U.value.getBoundingClientRect(),n=t.width/K.value.canvasWidth,r=t.height/K.value.canvasHeight,i=K.value.left+K.value.slot*e+K.value.slot/2,a=K.value.top+K.value.height/2;un.value={x:t.left+i*n,y:t.top+a*r}}function _i(e,{fromKeyboard:t=!1,triggerEvent:n=!0}={}){M.value&&!Pn.value&&e!=null&&(e<0||e>=X.value.end-X.value.start||(n&&$r(e),T.value=e,j.value=e,Bt.value=!0,cn.value=t,Vt.value=hi(e),t&&gi(e),O.value=!1,Wr()))}function vi(){Bt.value=!1,T.value=null,j.value=null,Vt.value=``,k.value=null,cn.value=!1,Wr()}function yi(){ln.value=!0}function bi(){Jn.value=!1,ln.value=!1,vi()}function xi(e){if(!U.value||Ui.value||document.activeElement!==U.value)return;if(Jn.value=!1,e.key===`Escape`){if(nr.value&&(Jr.value||qn.value)){e.preventDefault(),e.stopPropagation(),ai(),fr({force:!0,publish:!0});return}vi();return}let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`;if(!t&&!n)return;let r=X.value.end-X.value.start;if(r<=0)return;e.preventDefault(),e.stopPropagation();let i=j.value;i!==null&&i>=0&&i<r?n?(i+=1,i>=r&&(i=0)):(--i,i<0&&(i=r-1)):i=n?0:r-1,_i(i,{fromKeyboard:!0})}function Si({seriesIndex:e,datapoint:t}){let n=X.value.start+e;N(`selectX`,{dataset:t,index:n,indexLabel:``})}b(()=>S.selectedXIndex,e=>{if([null,void 0].includes(S.selectedXIndex)){vi();return}let t=e-X.value.start;t<0||e>=X.value.end?vi():_i(t,{fromKeyboard:!1,triggerEvent:!1})},{immediate:!0}),b(()=>T.value,e=>{Gr()}),b(()=>X.value,e=>{D.value=!0,Wr()},{deep:!0}),b(()=>Z.value,e=>{Wr()},{deep:!0}),b(()=>W.value.showDataLabels,e=>{D.value=!0,Wr()}),b(()=>k.value,e=>{e&&Wr()}),b(()=>W.value.stacked,e=>{D.value=!0,O.value=!0,Gr()});function Ci(){ei(),vi()}let wi=lt(null),Ti=lt(null),Ei=lt(null);ot(()=>{en.value=!0,Di()});function Di(){if(me(S.dataset)&&ae({componentName:`VueUiXyCanvas`,type:`dataset`,debug:gn.value}),nt(()=>{U.value&&!C.value&&(C.value=U.value.getContext(`2d`,{willReadFrequently:!0})),C.value&&M.value&&(D.value=!0,O.value=!0,Sr())}),P.value.responsive){let e=Pe(()=>{let{width:e,height:t}=Be({chart:Lt.value,title:H.value.title.text?qt.value:null,legend:H.value.legend.show?Jt.value:null,slicer:H.value.zoom.show&&G.value>6?Yt.value?.$el:null,source:Xt.value});requestAnimationFrame(()=>{Dn.value=`${e} / ${t}`})});wi.value&&(Ti.value&&wi.value.unobserve(Ti.value),wi.value.disconnect()),wi.value=new ResizeObserver(e),Ti.value=Lt.value.parentNode,wi.value.observe(Ti.value)}Ei.value&&Ei.value.disconnect(),Ei.value=new ResizeObserver(async e=>{for(let t of e)t.contentBoxSize&&Rt.value&&(D.value=!0,Gr())}),Ei.value.observe(Rt.value),fr()}at(()=>{Ei.value&&Ei.value.disconnect(),wi.value&&(Ti.value&&wi.value.unobserve(Ti.value),wi.value.disconnect())});function Oi(){E.value.length?E.value=[]:Ni.value.forEach((e,t)=>{E.value.push(t)}),D.value=!0,Gr(),N(`selectLegend`,Y.value)}function ki(e){E.value.includes(e)?E.value=E.value.filter(t=>t!==e):E.value.push(e),D.value=!0,Gr(),N(`selectLegend`,Y.value)}function Ai(e){return J.value.length?J.value.find(t=>t.name===e)||(gn.value&&console.warn(`VueUiXyCanvas - Series name not found "${e}"`),null):(gn.value&&console.warn(`VueUiXyCanvas - There are no series to show.`),null)}function ji(e){let t=Ai(e);t!==null&&E.value.includes(t.absoluteIndex)&&ki(t.absoluteIndex)}function Mi(e){let t=Ai(e);t!==null&&(E.value.includes(t.absoluteIndex)||ki(t.absoluteIndex))}let Ni=d(()=>J.value.map((e,t)=>({...e,name:e.name,color:l(e.color)||Nn.value[t]||o[t]||o[t%o.length],shape:e.shape||`circle`,prefix:e.prefix||``,suffix:e.suffix||``,rounding:e.rounding||0})).map(e=>({...e,opacity:E.value.includes(e.absoluteIndex)?.5:1,segregate:()=>ki(e.absoluteIndex),isSegregated:E.value.includes(e.absoluteIndex)}))),Pi=d(()=>({cy:`donut-div-legend`,backgroundColor:H.value.legend.backgroundColor,color:H.value.legend.color,fontSize:H.value.legend.fontSize,paddingBottom:12,fontWeight:H.value.legend.bold?`bold`:``})),Fi=d(()=>{let e=[``].concat(Y.value.map(e=>e.name),`__SUM__`),t=[];for(let e=0;e<G.value;e+=1){let n=Y.value.map(t=>t.series[e]??0).reduce((e,t)=>e+t,0);t.push([z.value.values.slice(X.value.start,X.value.end)[e]?$?.value?.slice(X.value.start,X.value.end)?.[e]?.text??e+1:e+1].concat(Y.value.map(t=>(t.series[e]??0).toFixed(P.value.table.rounding)),(n??0).toFixed(P.value.table.rounding)))}let n={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},r=[P.value.table.columnNames.period].concat(Y.value.map(e=>e.name),P.value.table.columnNames.total);return{head:e,body:t.slice(0,X.value.end-X.value.start),config:n,colNames:r}}),Ii=d(()=>{if(Y.value.length===0)return{head:[],body:[],config:{},columnNames:[]};let e=Y.value.map(e=>({label:e.name,color:e.color,type:e.type})),t=[];for(let e=X.value.start;e<X.value.end;e+=1){let n=[z.value.values[e]?$.value[e].text:e+1];Y.value.forEach(t=>{n.push(Number((t.series[e]||0).toFixed(P.value.table.rounding)))}),t.push(n)}return{head:e,body:t}});function Li(e=null){let t=[[H.value.title.text],[H.value.title.subtitle.text],[``]],n=[``,...Ii.value.head.map(e=>e.label)],i=Ii.value.body,a=t.concat([n]).concat(i),o=r(a);e?e(o):le({csvContent:o,title:H.value.title.text||`vue-ui-xy-canvas`})}function Ri(){return Y.value}function zi(){W.value.showTable=!W.value.showTable}function Bi(){W.value.showDataLabels=!W.value.showDataLabels}function Vi(){W.value.stacked=!W.value.stacked}function Hi(){W.value.showTooltip=!W.value.showTooltip}let Ui=_(!1);function Wi(){Ui.value=!Ui.value}async function Gi({scale:e=2}={}){if(!Lt.value)return;let{imageUri:t,base64:n}=await Se({domElement:Lt.value,base64:!0,img:!0,scale:e}),r=Lt.value.getBoundingClientRect(),i={width:r.width,height:r.height,aspectRatio:r.height?r.width/r.height:0},a=await ie(t,e)??i;return{imageUri:t,base64:n,title:H.value.title.text,...a}}let Ki=d(()=>Ee({config:P,style:H,mutableConfig:W,dialog:Mt,accordion:He,isFullscreen:Kt,parent:Lt,maxWidth:800,isCursorPointer:hn}));b(()=>W.value.showTable,e=>Te(e,P,tn));function qi(){W.value.showTable=!1,nn.value&&nn.value.setTableIconState(!1)}function Ji(e){e?.stage===`start`?sn.value=!0:e?.stage===`end`?sn.value=!1:jn()}async function Yi(){N(`copyAlt`,{config:P.value,dataset:Y.value}),F.value.callbacks.altCopy?await Promise.resolve(F.value.callbacks.altCopy({config:P.value,dataset:Y.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}return ye({getData:Ri,getImage:Gi,generateCsv:Li,generatePdf:An,generateImage:jn,hideSeries:Mi,showSeries:ji,toggleTable:zi,toggleLabels:Bi,toggleStack:Vi,toggleTooltip:Hi,toggleAnnotator:Wi,toggleFullscreen:Mn,copyAlt:Yi,resetZoom:()=>fr({force:!0,publish:!0}),setZoomState:dr}),(t,n)=>(g(),Xe(`div`,{style:it(`width:100%; position:relative; ${P.value.responsive?`height: 100%`:``}; background:${P.value.style.chart.backgroundColor};`),ref_key:`xy`,ref:Lt,id:`xy_canvas_${It.value}`,class:rt(`vue-data-ui-component vue-ui-xy-canvas ${Kt.value?`vue-data-ui-wrapper-fullscreen`:``}`),onMouseenter:Cn,onMouseleave:wn},[p(`div`,{id:`chart-instructions-${It.value}`,class:`sr-only`},[p(`p`,null,ut(P.value.a11y.translations.keyboardNavigation),1)],8,gt),p(`div`,_t,ut(mn.value),1),P.value.style.chart.title.text?(g(),Xe(`div`,{key:0,ref_key:`chartTitle`,ref:qt,style:it(`width:100%;background:${P.value.style.chart.backgroundColor};`)},[(g(),Ye(we,{key:`title_${Zt.value}`,config:{title:{cy:`xy-canvas-title`,...P.value.style.chart.title},subtitle:{cy:`xy-canvas-subtitle`,...P.value.style.chart.title.subtitle}}},null,8,[`config`]))],4)):f(``,!0),p(`div`,{id:`legend-top-${It.value}`},null,8,vt),F.value.show&&M.value&&(y(Sn)||y(bn))?(g(),Ye(y(At),{ref_key:`userOptionsRef`,ref:nn,key:`user_option_${Gt.value}`,backgroundColor:P.value.style.chart.backgroundColor,color:P.value.style.chart.color,isPrinting:y(On),isImaging:y(kn),uid:It.value,hasTooltip:F.value.buttons.tooltip&&I.value.show,hasPdf:F.value.buttons.pdf,hasImg:F.value.buttons.img,hasXls:F.value.buttons.csv,hasLabel:F.value.buttons.labels,hasStack:e.dataset.length>1&&F.value.buttons.stack,hasFullscreen:F.value.buttons.fullscreen,hasAltCopy:F.value.buttons.altCopy,hasTable:X.value.end-X.value.start<=730&&F.value.buttons.table,isFullscreen:Kt.value,isTooltip:W.value.showTooltip,isStacked:W.value.stacked,titles:{...F.value.buttonTitles},chartElement:Lt.value,position:F.value.position,hasAnnotator:F.value.buttons.annotator,isAnnotation:Ui.value,callbacks:F.value.callbacks,printScale:F.value.print.scale,tableDialog:P.value.table.useDialog,isCursorPointer:hn.value,onToggleFullscreen:Mn,onGeneratePdf:y(An),onGenerateCsv:Li,onGenerateImage:Ji,onToggleTable:zi,onToggleLabels:Bi,onToggleStack:Vi,onToggleTooltip:Hi,onToggleAnnotator:Wi,onCopyAlt:Yi,style:it({visibility:y(Sn)?y(bn)?`visible`:`hidden`:`visible`})},Ze({_:2},[st(y(De)(t.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionTable optionLabels optionStack optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:x(n=>[v(t.$slots,e,h(m(y(Oe)(e,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasXls.hasLabel.hasStack.hasFullscreen.hasAltCopy.hasTable.isFullscreen.isTooltip.isStacked.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.style`.split(`.`))):f(``,!0),p(`div`,{class:`vue-ui-xy-canvas`,style:it(`position: relative; aspect-ratio: ${Dn.value}`),ref_key:`container`,ref:Rt},[p(`canvas`,{ref_key:`canvas`,ref:U,class:rt({"vue-ui-xy-canvas-chart-zoom-pointer-focus":nr.value&&Jn.value}),"aria-label":pn.value,"aria-describedby":`chart-instructions-${It.value}`,role:`img`,"aria-live":`polite`,tabindex:`0`,style:it({width:`100%`,height:`100%`,cursor:nr.value?qn.value?`col-resize`:`crosshair`:void 0,touchAction:nr.value?`pan-y`:void 0,userSelect:nr.value?`none`:void 0}),onMousemove:n[0]||=e=>pi(e),onMouseleave:Ci,onClick:ri,onPointerdown:ui,onPointermove:di,onPointerup:fi,onPointercancel:ai,onFocus:yi,onBlur:bi,onKeydown:xi},null,46,yt),qr.value?(g(),Xe(`svg`,{key:0,viewBox:`0 0 ${K.value.canvasWidth} ${K.value.canvasHeight}`,preserveAspectRatio:`none`,"aria-hidden":`true`,style:{position:`absolute`,inset:`0`,width:`100%`,height:`100%`,"pointer-events":`none`,overflow:`visible`}},[p(`rect`,{x:qr.value.x,y:qr.value.y,width:qr.value.width,height:qr.value.height,fill:tr.value.selection.fill,"fill-opacity":tr.value.selection.fillOpacity,stroke:tr.value.selection.stroke,"stroke-opacity":tr.value.selection.strokeOpacity,"stroke-width":tr.value.selection.strokeWidth,"stroke-dasharray":tr.value.selection.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,xt)],8,bt)):f(``,!0),t.$slots.hint?(g(),Xe(`div`,St,[v(t.$slots,`hint`,h(m({hint:P.value.a11y.translations.keyboardNavigation,isVisible:ln.value})),void 0,!0)])):f(``,!0),v(t.$slots,`skeleton`,{},()=>[y(vn)?(g(),Ye(ge,{key:0})):f(``,!0)],!0),$e(y(Ot),{teleportTo:I.value.teleportTo,show:W.value.showTooltip&&Bt.value,backgroundColor:I.value.backgroundColor,color:I.value.color,fontSize:I.value.fontSize,borderRadius:I.value.borderRadius,borderColor:I.value.borderColor,borderWidth:I.value.borderWidth,position:I.value.position,offsetX:I.value.offsetX,offsetY:I.value.offsetY,parent:t.$refs.xy,content:Vt.value,isFullscreen:Kt.value,backgroundOpacity:I.value.backgroundOpacity,isCustom:y(i)(I.value.customFormat),smooth:I.value.smooth,backdropFilter:I.value.backdropFilter,smoothForce:I.value.smoothForce,smoothSnapThreshold:I.value.smoothSnapThreshold,isA11yMode:cn.value,a11yPosition:un.value},{"tooltip-before":x(()=>[v(t.$slots,`tooltip-before`,h(m({...Ht.value})),void 0,!0)]),tooltip:x(()=>[v(t.$slots,`tooltip`,h(m({...Ht.value})),void 0,!0)]),"tooltip-after":x(()=>[v(t.$slots,`tooltip-after`,h(m({...Ht.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`fontSize`,`borderRadius`,`borderColor`,`borderWidth`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`backgroundOpacity`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`])],4),P.value.style.chart.zoom.show&&G.value>6&&M.value&&an.value&&!y(vn)?(g(),Ye(Ve,{key:2,ref_key:`chartSlicer`,ref:Yt,"data-dom-to-png-ignore-layout":``,allMinimaps:Kn.value,background:P.value.style.chart.zoom.color,borderColor:P.value.style.chart.backgroundColor,customFormat:P.value.style.chart.zoom.customFormat,cutNullValues:Wn.value,enableRangeHandles:P.value.style.chart.zoom.enableRangeHandles,enableSelectionDrag:P.value.style.chart.zoom.enableSelectionDrag,end:X.value.end,focusOnDrag:P.value.style.chart.zoom.focusOnDrag,focusRangeRatio:P.value.style.chart.zoom.focusRangeRatio,fontSize:P.value.style.chart.zoom.fontSize,immediate:!P.value.style.chart.zoom.preview.enable,inputColor:P.value.style.chart.zoom.color,isPreview:pr.value,labelLeft:P.value.style.chart.grid.x.timeLabels.values[X.value.start]?$.value[X.value.start]?.text:``,labelRight:P.value.style.chart.grid.x.timeLabels.values[X.value.end-1]?$.value[X.value.end-1]?.text:``,max:G.value,min:0,minimap:Gn.value,minimapCompact:P.value.style.chart.zoom.minimap.compact,minimapFrameColor:P.value.style.chart.zoom.minimap.frameColor,minimapIndicatorColor:P.value.style.chart.zoom.minimap.indicatorColor,minimapLineColor:P.value.style.chart.zoom.minimap.lineColor,minimapMerged:P.value.style.chart.zoom.minimap.merged,minimapSelectedColor:P.value.style.chart.zoom.minimap.selectedColor,minimapSelectedColorOpacity:P.value.style.chart.zoom.minimap.selectedColorOpacity,minimapSelectedIndex:T.value,minimapSelectionRadius:P.value.style.chart.zoom.minimap.selectionRadius,preciseLabels:Mr.value?.length?Mr.value:$.value,refreshEndPoint:P.value.style.chart.zoom.endIndex===null?G.value:P.value.style.chart.zoom.endIndex+1,refreshStartPoint:P.value.style.chart.zoom.startIndex===null?0:P.value.style.chart.zoom.startIndex,selectColor:P.value.style.chart.zoom.highlightColor,selectedSeries:J.value,smoothMinimap:P.value.style.chart.zoom.minimap.smooth,start:X.value.start,timeLabels:$.value,usePreciseLabels:P.value.style.chart.grid.x.timeLabels.datetimeFormatter.enable&&!P.value.style.chart.zoom.useDefaultFormat,textColor:P.value.style.chart.color,useResetSlot:P.value.style.chart.zoom.useResetSlot,valueEnd:X.value.end,valueStart:X.value.start,verticalHandles:P.value.style.chart.zoom.minimap.verticalHandles,maxWidth:P.value.style.chart.zoom.maxWidth,minimapLeftInsetRatio:K.value.canvasWidth>0&&P.value.style.chart.zoom.autoFit?K.value.left/K.value.canvasWidth:null,minimapRightInsetRatio:K.value.canvasWidth>0&&P.value.style.chart.zoom.autoFit?(K.value.canvasWidth-K.value.right)/K.value.canvasWidth:null,additionalMinimapHeight:P.value.style.chart.zoom.minimap.additionalHeight,handleType:P.value.style.chart.zoom.minimap.handleType,handleIconColor:P.value.style.chart.zoom.minimap.handleIconColor,handleBorderWidth:P.value.style.chart.zoom.minimap.handleBorderWidth,handleBorderColor:P.value.style.chart.zoom.minimap.handleBorderColor,handleFill:P.value.style.chart.zoom.minimap.handleFill,handleWidth:P.value.style.chart.zoom.minimap.handleWidth,onFutureEnd:n[1]||=e=>mr(`end`,e),onFutureStart:n[2]||=e=>mr(`start`,e),onReset:n[3]||=()=>fr({force:!0,publish:!0}),onTrapMouse:Fn,"onUpdate:end":vr,"onUpdate:start":_r},{"reset-action":x(({reset:e})=>[v(t.$slots,`reset-action`,h(m({reset:e})),void 0,!0)]),_:3},8,/* @__PURE__ */ `allMinimaps.background.borderColor.customFormat.cutNullValues.enableRangeHandles.enableSelectionDrag.end.focusOnDrag.focusRangeRatio.fontSize.immediate.inputColor.isPreview.labelLeft.labelRight.max.minimap.minimapCompact.minimapFrameColor.minimapIndicatorColor.minimapLineColor.minimapMerged.minimapSelectedColor.minimapSelectedColorOpacity.minimapSelectedIndex.minimapSelectionRadius.preciseLabels.refreshEndPoint.refreshStartPoint.selectColor.selectedSeries.smoothMinimap.start.timeLabels.usePreciseLabels.textColor.useResetSlot.valueEnd.valueStart.verticalHandles.maxWidth.minimapLeftInsetRatio.minimapRightInsetRatio.additionalMinimapHeight.handleType.handleIconColor.handleBorderWidth.handleBorderColor.handleFill.handleWidth`.split(`.`))):f(``,!0),p(`div`,{id:`legend-bottom-${It.value}`},null,8,Ct),en.value&&(P.value.style.chart.legend.show||t.$slots.legend)?(g(),Ye(Je,{key:3,to:P.value.style.chart.legend.position===`top`?`#legend-top-${It.value}`:`#legend-bottom-${It.value}`},[p(`div`,{ref_key:`chartLegend`,ref:Jt},[v(t.$slots,`legend`,{legend:Ni.value},()=>[P.value.style.chart.legend.show&&M.value?(g(),Ye(Ke,{legendSet:Ni.value,config:Pi.value,key:`legend_${$t.value}`,isCursorPointer:hn.value,onClickMarker:n[4]||=({i:e})=>ki(e)},{item:x(({legend:e,index:t})=>[p(`div`,{onClick:t=>e.segregate(),style:it(`opacity:${E.value.includes(t)?.5:1}`)},ut(e.name),13,wt)]),legendToggle:x(()=>[Ni.value.length>2&&P.value.style.chart.legend.selectAllToggle.show&&!y(vn)?(g(),Ye(Ue,{key:0,backgroundColor:P.value.style.chart.legend.selectAllToggle.backgroundColor,color:P.value.style.chart.legend.selectAllToggle.color,fontSize:P.value.style.chart.legend.fontSize,checked:E.value.length>0,isCursorPointer:hn.value,onToggle:Oi},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):f(``,!0)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):f(``,!0)],!0)],512)],8,[`to`])):f(``,!0),t.$slots.watermark?(g(),Xe(`div`,Tt,[v(t.$slots,`watermark`,h(m({isPrinting:y(On)||y(kn)||sn.value})),void 0,!0)])):f(``,!0),t.$slots.source?(g(),Xe(`div`,{key:5,ref_key:`source`,ref:Xt,dir:`auto`},[v(t.$slots,`source`,{},void 0,!0)],512)):f(``,!0),M.value&&F.value.buttons.table?(g(),Ye(ct(Ki.value.component),tt({key:6},Ki.value.props,{ref_key:`tableUnit`,ref:tn,onClose:qi}),Ze({content:x(()=>[(g(),Ye(y(kt),{key:`table_${Qt.value}`,colNames:Fi.value.colNames,head:Fi.value.head,body:Fi.value.body,config:Fi.value.config,title:P.value.table.useDialog?``:Ki.value.title,withCloseButton:!P.value.table.useDialog,isCursorPointer:hn.value,onClose:qi},{th:x(({th:e})=>[e===`__SUM__`?(g(),Xe(`div`,Et,[$e(Ce,{name:`sigma`,stroke:Fi.value.config.th.color,size:16},null,8,[`stroke`])])):(g(),Xe(`div`,Dt,ut(e),1))]),td:x(({td:e})=>[Qe(ut(e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[P.value.table.useDialog?{name:`title`,fn:x(()=>[Qe(ut(Ki.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:x(()=>[p(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:n[5]||=e=>Li(F.value.callbacks.csv),style:it({cursor:hn.value?`pointer`:`default`})},[$e(Ce,{name:`fileCsv`,stroke:Ki.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):f(``,!0),F.value.buttons.annotator&&Y.value.length?(g(),Ye(y(jt),{key:7,parent:Lt.value,backgroundColor:P.value.style.chart.backgroundColor,color:P.value.style.chart.color,active:Ui.value,isCursorPointer:hn.value,onClose:Wi},{"annotator-action-close":x(()=>[v(t.$slots,`annotator-action-close`,{},void 0,!0)]),"annotator-action-color":x(({color:e})=>[v(t.$slots,`annotator-action-color`,h(m({color:e})),void 0,!0)]),"annotator-action-draw":x(({mode:e})=>[v(t.$slots,`annotator-action-draw`,h(m({mode:e})),void 0,!0)]),"annotator-action-undo":x(({disabled:e})=>[v(t.$slots,`annotator-action-undo`,h(m({disabled:e})),void 0,!0)]),"annotator-action-redo":x(({disabled:e})=>[v(t.$slots,`annotator-action-redo`,h(m({disabled:e})),void 0,!0)]),"annotator-action-delete":x(({disabled:e})=>[v(t.$slots,`annotator-action-delete`,h(m({disabled:e})),void 0,!0)]),_:3},8,[`parent`,`backgroundColor`,`color`,`active`,`isCursorPointer`])):f(``,!0)],46,ht))}},[[`__scopeId`,`data-v-ec976c9e`]]);export{mt as n,Ot as t};