vue-data-ui 3.28.12 → 3.29.1
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.
- package/dist/BaseScanner-m6QR9rwD.js +1 -0
- package/dist/{PackageVersion-PdpqwkYX.js → PackageVersion-BbZ3wNGs.js} +1 -1
- package/dist/SlicerPreview-Ks9FNVzh.js +1 -0
- package/dist/{StackChartTable-D-31a1zL.js → StackChartTable-rTC6w378.js} +1 -1
- package/dist/Tooltip-B432XpvC.js +1 -0
- package/dist/{XyAnalysisOptions-DmKfwSu6.js → XyAnalysisOptions-BpjGs_2b.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-graph.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-hill.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-label.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/package-BsppqqRX.js +1 -0
- package/dist/{render-common-C9aE_Va1.js → render-common-Bc3-uPjM.js} +1 -1
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +75 -9
- package/dist/useAnimationFrame-D8gcRfnW.js +1 -0
- package/dist/useConfig-CBXrYhMI.js +1 -0
- package/dist/useLoading-BwiplGDB.js +1 -0
- package/dist/{useObjectBindings-D789Dz63.js → useObjectBindings-DDUobNFp.js} +1 -1
- package/dist/usePanZoom-CTGk8aJt.js +1 -0
- package/dist/utils.js +1 -1
- package/dist/vue-data-ui-CMig_4IZ.js +1 -0
- package/dist/vue-data-ui.js +1 -1
- package/dist/vue-ui-3d-bar-BXDDF5Hq.js +10 -0
- package/dist/{vue-ui-accordion-DxGxf-Rm.js → vue-ui-accordion-CV2dxsXB.js} +1 -1
- package/dist/vue-ui-age-pyramid-BDoFrY4Y.js +1 -0
- package/dist/vue-ui-annotator-DBItXQjx.js +259 -0
- package/dist/vue-ui-bullet-iOGIwd8G.js +11 -0
- package/dist/vue-ui-bump-CYYE7AYx.js +8 -0
- package/dist/vue-ui-candlestick-fQbKxfp6.js +22 -0
- package/dist/vue-ui-carousel-table-DUUhomv3.js +1 -0
- package/dist/vue-ui-chestnut-D7bO1IIi.js +1 -0
- package/dist/vue-ui-chord-Cwg9Vjnn.js +9 -0
- package/dist/vue-ui-circle-pack-C18kRERE.js +13 -0
- package/dist/vue-ui-cursor-BxBeDqnb.js +1 -0
- package/dist/vue-ui-dag-BMBSp7ua.js +7 -0
- package/dist/vue-ui-dashboard-wDPL7yQw.js +1 -0
- package/dist/vue-ui-digits-CVpi-dBr.js +1 -0
- package/dist/vue-ui-donut-BJumteL7.js +23 -0
- package/dist/{vue-ui-donut-BqnLIKwZ.js → vue-ui-donut-D5LOpVST.js} +1 -1
- package/dist/vue-ui-donut-evolution-DNY_zpSw.js +2 -0
- package/dist/vue-ui-dumbbell-CT22NxlP.js +9 -0
- package/dist/vue-ui-flow-ihpQN8B4.js +3 -0
- package/dist/vue-ui-funnel-CydmxKNq.js +1 -0
- package/dist/vue-ui-galaxy-CDdpiwLH.js +1 -0
- package/dist/vue-ui-gauge-Cu6cz42H.js +1 -0
- package/dist/vue-ui-geo-DAtuaLrb.js +1 -0
- package/dist/vue-ui-gizmo-C-MEb9P1.js +1 -0
- package/dist/{vue-ui-graph-CBkbFJIA.js → vue-ui-graph-CyySb2SE.js} +2 -2
- package/dist/vue-ui-heatmap-CcWLxTbW.js +1 -0
- package/dist/{vue-ui-hill-8c-9u8eg.js → vue-ui-hill-mvdRA1RD.js} +1 -1
- package/dist/vue-ui-history-plot-AL9z3mC6.js +2 -0
- package/dist/vue-ui-horizontal-bar-D2IV9phG.js +4 -0
- package/dist/vue-ui-kpi-ZCJekvYX.js +1 -0
- package/dist/{vue-ui-label-CBrMoFDG.js → vue-ui-label-CAMjkZc2.js} +1 -1
- package/dist/{vue-ui-mini-loader-PsWZLMLF.js → vue-ui-mini-loader-B15gWQp1.js} +1 -1
- package/dist/vue-ui-molecule-H88Xsomv.js +1 -0
- package/dist/vue-ui-mood-radar-De_2I7pq.js +1 -0
- package/dist/vue-ui-nested-donuts-DGWgyIoR.js +19 -0
- package/dist/vue-ui-onion-QidVWMud.js +5 -0
- package/dist/vue-ui-parallel-coordinate-plot-DFw19TpK.js +9 -0
- package/dist/vue-ui-quadrant-CeMOzfdY.js +2 -0
- package/dist/vue-ui-quick-chart-Tyt1WdUW.js +9 -0
- package/dist/vue-ui-radar-C4U7ohC4.js +1 -0
- package/dist/{vue-ui-rating-D0QvpD3V.js → vue-ui-rating-BbHvfFsG.js} +1 -1
- package/dist/vue-ui-relation-circle-zoBhpcTB.js +1 -0
- package/dist/vue-ui-ridgeline-C9ECt2cC.js +2 -0
- package/dist/vue-ui-rings-kYvvKGXk.js +1 -0
- package/dist/vue-ui-scatter-Bs5NhtfK.js +9 -0
- package/dist/{vue-ui-skeleton-CZMyXM-1.js → vue-ui-skeleton-BSM40fOT.js} +2 -2
- package/dist/{vue-ui-smiley-C00q-teB.js → vue-ui-smiley-BvkpUjyE.js} +1 -1
- package/dist/vue-ui-spark-trend-DmJHx3aj.js +1 -0
- package/dist/vue-ui-sparkbar-6wKyKgYy.js +1 -0
- package/dist/vue-ui-sparkgauge-BnZZ2zhe.js +1 -0
- package/dist/vue-ui-sparkhistogram-C9cyazhH.js +1 -0
- package/dist/vue-ui-sparkline-a1e4A-Gl.js +1 -0
- package/dist/vue-ui-sparkstackbar-BTEpVODr.js +1 -0
- package/dist/vue-ui-stackbar-BplckX2c.js +29 -0
- package/dist/vue-ui-stackline-1KSn7Lw-.js +17 -0
- package/dist/vue-ui-strip-plot-ZCX50Scf.js +2 -0
- package/dist/vue-ui-table-BRwwKG0f.js +14 -0
- package/dist/vue-ui-table-heatmap-2csQOE2c.js +1 -0
- package/dist/{vue-ui-table-sparkline-39sKOqcp.js → vue-ui-table-sparkline-VLptltwn.js} +1 -1
- package/dist/vue-ui-thermometer-DUocWNhm.js +1 -0
- package/dist/vue-ui-timer-DfFRykEz.js +65 -0
- package/dist/vue-ui-tiremarks-BBtWpWBE.js +1 -0
- package/dist/vue-ui-treemap-Bz1FshtF.js +1 -0
- package/dist/vue-ui-waffle-C7SVznJl.js +1 -0
- package/dist/vue-ui-wheel-BaZ08ojL.js +1 -0
- package/dist/vue-ui-word-cloud-BOUVu-F2.js +4 -0
- package/dist/vue-ui-world-E2JfHzRD.js +19 -0
- package/dist/vue-ui-xy-CGuTzofF.js +27 -0
- package/dist/vue-ui-xy-CmQ5D8Rm.js +31 -0
- package/dist/{vue-ui-xy-canvas-CRSisgSA.js → vue-ui-xy-canvas-FULC8M7D.js} +2 -2
- package/dist/vue_ui_stackline-CBl7ydff.js +1 -0
- package/dist/xyScaleTicks-DMX-D9Wd.js +1 -0
- package/dist/xyScales-Cb-Z9Qso.js +1 -0
- package/package.json +3 -3
- package/dist/BaseScanner-8NdoBs7B.js +0 -1
- package/dist/SlicerPreview-0m9E7Zh_.js +0 -1
- package/dist/Tooltip-C1q0Qoh7.js +0 -1
- package/dist/package-DWjs4THo.js +0 -1
- package/dist/useConfig-_JwRfIqE.js +0 -1
- package/dist/usePanZoom-CE6Ofyy8.js +0 -1
- package/dist/vue-data-ui-Da3HK_wb.js +0 -1
- package/dist/vue-ui-3d-bar-D1XfKXhp.js +0 -19
- package/dist/vue-ui-age-pyramid-CJqqtEIh.js +0 -1
- package/dist/vue-ui-annotator-D31LD4-s.js +0 -331
- package/dist/vue-ui-bullet-CxyL5Bdm.js +0 -34
- package/dist/vue-ui-bump-BWWMzAN_.js +0 -8
- package/dist/vue-ui-candlestick-CQXdyPEt.js +0 -22
- package/dist/vue-ui-carousel-table-DwsfnL_l.js +0 -1
- package/dist/vue-ui-chestnut-DV7XKL7g.js +0 -1
- package/dist/vue-ui-chord-DRNn_E6i.js +0 -21
- package/dist/vue-ui-circle-pack-BcA9ZxZS.js +0 -13
- package/dist/vue-ui-cursor-DSgVvP1L.js +0 -1
- package/dist/vue-ui-dag-CWpyU7AJ.js +0 -9
- package/dist/vue-ui-dashboard-Dh_Zi8oG.js +0 -1
- package/dist/vue-ui-digits-Cy3Y6qro.js +0 -42
- package/dist/vue-ui-donut-DasGeYdl.js +0 -47
- package/dist/vue-ui-donut-evolution-Bw7ilDYR.js +0 -2
- package/dist/vue-ui-dumbbell-BPvvKhag.js +0 -9
- package/dist/vue-ui-flow-XI5Y3qdk.js +0 -3
- package/dist/vue-ui-funnel-DqoQogQE.js +0 -1
- package/dist/vue-ui-galaxy-NRaBIHpn.js +0 -1
- package/dist/vue-ui-gauge-DX4SBIKS.js +0 -1
- package/dist/vue-ui-geo-C3e4J_kw.js +0 -1
- package/dist/vue-ui-gizmo-C9ls2b4h.js +0 -1
- package/dist/vue-ui-heatmap-D6KP1N8f.js +0 -1
- package/dist/vue-ui-history-plot-CowxWkEd.js +0 -2
- package/dist/vue-ui-horizontal-bar-CVP5jBNJ.js +0 -4
- package/dist/vue-ui-kpi-D1MUlURM.js +0 -1
- package/dist/vue-ui-molecule-BRB54XBD.js +0 -1
- package/dist/vue-ui-mood-radar-CkHJdUyF.js +0 -1
- package/dist/vue-ui-nested-donuts-C-7VZO11.js +0 -19
- package/dist/vue-ui-onion-erpKpDKg.js +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-BDg0pRkN.js +0 -9
- package/dist/vue-ui-quadrant-CUdNxC6W.js +0 -2
- package/dist/vue-ui-quick-chart-DE5Zwioe.js +0 -16
- package/dist/vue-ui-radar-6y6er9ND.js +0 -1
- package/dist/vue-ui-relation-circle-CjnG9G7s.js +0 -1
- package/dist/vue-ui-ridgeline-B4qi2Ajl.js +0 -2
- package/dist/vue-ui-rings-EYfCkNB6.js +0 -1
- package/dist/vue-ui-scatter-Tw-5uRac.js +0 -9
- package/dist/vue-ui-spark-trend-Cmj4aWcQ.js +0 -1
- package/dist/vue-ui-sparkbar-Crq1Vui3.js +0 -1
- package/dist/vue-ui-sparkgauge-CN_9yenn.js +0 -1
- package/dist/vue-ui-sparkhistogram-CK7JmyCw.js +0 -1
- package/dist/vue-ui-sparkline-2_RlGrAT.js +0 -1
- package/dist/vue-ui-sparkstackbar-Dwdn2_9q.js +0 -1
- package/dist/vue-ui-stackbar-BVmQJn2b.js +0 -29
- package/dist/vue-ui-stackline-nvhui30B.js +0 -39
- package/dist/vue-ui-strip-plot-Dig2RljR.js +0 -2
- package/dist/vue-ui-table-_qSw3iGd.js +0 -14
- package/dist/vue-ui-table-heatmap-BwoRcqFD.js +0 -1
- package/dist/vue-ui-thermometer-CoVrrzHW.js +0 -1
- package/dist/vue-ui-timer-DoR5PqOa.js +0 -64
- package/dist/vue-ui-tiremarks-9tPPNGiq.js +0 -1
- package/dist/vue-ui-treemap-D3mZkT4P.js +0 -1
- package/dist/vue-ui-waffle-D2GfM_Se.js +0 -1
- package/dist/vue-ui-wheel-CYBaqHm6.js +0 -1
- package/dist/vue-ui-word-cloud-ClGL6iKL.js +0 -4
- package/dist/vue-ui-world-Dm7LSNB2.js +0 -19
- package/dist/vue-ui-xy-2VCMSzeE.js +0 -27
- package/dist/vue-ui-xy-DUlJcC9R.js +0 -31
- package/dist/vue_ui_stackline-B6ylXHBJ.js +0 -1
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s}from"./annotationViewport-X8fvs7pz.js";import{t as c}from"./resolveChartConfig-0IvbmIE_.js";import{Pt as l,S as u,St as d,X as f,Y as p,at as m,in as h,rt as g,t as ee,zt as te}from"./lib-rPeBMZrn.js";import{c as ne}from"./canvas-lib-22VpOI4_.js";import{t as re}from"./usePanZoom-CE6Ofyy8.js";import{n as ie,t as ae}from"./useHints-C-TwxM0Y.js";import{t as oe}from"./useConfig-_JwRfIqE.js";import{n as se,t as ce}from"./BaseScanner-8NdoBs7B.js";import{t as le}from"./usePrinter-DVf3YcG5.js";import{t as ue}from"./useChartExport-BZts4KFb.js";import{t as de}from"./useUserOptionState-CXlFnwPv.js";import{t as fe}from"./useChartAccessibility-DOMuYJfm.js";import{t as pe}from"./useResponsive-CENUxfEL.js";import{t as me}from"./img-D4RQwASc.js";import{n as he}from"./Title-BliHuXfT.js";import{t as ge}from"./vue_ui_dag-B-4OxeQQ.js";import{t as _e}from"./A11yDataTable-DWNlWXzs.js";import{t as ve}from"./BaseZoomControls-D4i_j6vc.js";import{t as ye}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as be,Teleport as xe,Transition as Se,computed as _,createBlock as v,createCommentVNode as y,createElementBlock as b,createElementVNode as x,createSlots as Ce,createTextVNode as we,createVNode as Te,defineAsyncComponent as Ee,guardReactiveProps as De,mergeProps as Oe,nextTick as ke,normalizeClass as Ae,normalizeProps as je,normalizeStyle as Me,onBeforeUnmount as Ne,onMounted as Pe,openBlock as S,ref as C,renderList as Fe,renderSlot as w,toDisplayString as Ie,toRefs as Le,unref as T,watch as Re,watchEffect as ze,withCtx as Be,withModifiers as Ve}from"vue";var He=`\0`,Ue=`\0`,We=``,E=class{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>void 0;_defaultEdgeLabelFn=()=>void 0;_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(e){e&&(this._isDirected=!Object.hasOwn(e,`directed`)||e.directed,this._isMultigraph=Object.hasOwn(e,`multigraph`)?e.multigraph:!1,this._isCompound=Object.hasOwn(e,`compound`)?e.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[Ue]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=e,typeof e!=`function`&&(this._defaultNodeLabelFn=()=>e),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){let e=this;return this.nodes().filter(t=>Object.keys(e._in[t]).length===0)}sinks(){let e=this;return this.nodes().filter(t=>Object.keys(e._out[t]).length===0)}setNodes(e,t){let n=arguments,r=this;return e.forEach(e=>{n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.hasOwn(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=Ue,this._children[e]={},this._children[Ue][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.hasOwn(this._nodes,e)}removeNode(e){let t=this;if(Object.hasOwn(this._nodes,e)){let n=e=>t.removeEdge(t._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(e=>{t.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(n),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(t===void 0)t=Ue;else{t+=``;for(let n=t;n!==void 0;n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){let t=this._parent[e];if(t!==Ue)return t}}children(e=Ue){if(this._isCompound){let t=this._children[e];if(t)return Object.keys(t)}else if(e===Ue)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){let t=this._preds[e];if(t)return Object.keys(t)}successors(e){let t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){let t=this.predecessors(e);if(t){let n=new Set(t);for(let t of this.successors(e))n.add(t);return Array.from(n.values())}}isLeaf(e){let t;return t=this.isDirected()?this.successors(e):this.neighbors(e),t.length===0}filterNodes(e){let t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());let n=this;Object.entries(this._nodes).forEach(([n,r])=>{e(n)&&t.setNode(n,r)}),Object.values(this._edgeObjs).forEach(e=>{t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});let r={};function i(e){let a=n.parent(e);return a===void 0||t.hasNode(a)?(r[e]=a,a):a in r?r[a]:i(a)}return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,i(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=e,typeof e!=`function`&&(this._defaultEdgeLabelFn=()=>e),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){let n=this,r=arguments;return e.reduce((e,i)=>(r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i)),this}setEdge(){let e,t,n,r,i=!1,a=arguments[0];typeof a==`object`&&a&&`v`in a?(e=a.v,t=a.w,n=a.name,arguments.length===2&&(r=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),e=``+e,t=``+t,n!==void 0&&(n=``+n);let o=O(this._isDirected,e,t,n);if(Object.hasOwn(this._edgeLabels,o))return i&&(this._edgeLabels[o]=r),this;if(n!==void 0&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[o]=i?r:this._defaultEdgeLabelFn(e,t,n);let s=Ke(this._isDirected,e,t,n);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[o]=s,Ge(this._preds[t],e),Ge(this._sucs[e],t),this._in[t][o]=s,this._out[e][o]=s,this._edgeCount++,this}edge(e,t,n){let r=arguments.length===1?qe(this._isDirected,arguments[0]):O(this._isDirected,e,t,n);return this._edgeLabels[r]}edgeAsObj(){let e=this.edge(...arguments);return typeof e==`object`?e:{label:e}}hasEdge(e,t,n){let r=arguments.length===1?qe(this._isDirected,arguments[0]):O(this._isDirected,e,t,n);return Object.hasOwn(this._edgeLabels,r)}removeEdge(e,t,n){let r=arguments.length===1?qe(this._isDirected,arguments[0]):O(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],D(this._preds[t],e),D(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){let n=this._in[e];if(n){let e=Object.values(n);return t?e.filter(e=>e.v===t):e}}outEdges(e,t){let n=this._out[e];if(n){let e=Object.values(n);return t?e.filter(e=>e.w===t):e}}nodeEdges(e,t){let n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}};function Ge(e,t){e[t]?e[t]++:e[t]=1}function D(e,t){--e[t]||delete e[t]}function O(e,t,n,r){let i=``+t,a=``+n;if(!e&&i>a){let e=i;i=a,a=e}return i+We+a+We+(r===void 0?He:r)}function Ke(e,t,n,r){let i=``+t,a=``+n;if(!e&&i>a){let e=i;i=a,a=e}let o={v:i,w:a};return r&&(o.name=r),o}function qe(e,t){return O(e,t.v,t.w,t.name)}var Je=class{constructor(){let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return Ye(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&Ye(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,n=t._prev;for(;n!==t;)e.push(JSON.stringify(n,Xe)),n=n._prev;return`[`+e.join(`, `)+`]`}};function Ye(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Xe(e,t){if(e!==`_next`&&e!==`_prev`)return t}var Ze=()=>1;function Qe(e,t){if(e.nodeCount()<=1)return[];let n=j(e,t||Ze);return k(n.graph,n.buckets,n.zeroIndex).flatMap(t=>e.outEdges(t.v,t.w))}function k(e,t,n){let r=[],i=t[t.length-1],a=t[0],o;for(;e.nodeCount();){for(;o=a.dequeue();)A(e,t,n,o);for(;o=i.dequeue();)A(e,t,n,o);if(e.nodeCount()){for(let i=t.length-2;i>0;--i)if(o=t[i].dequeue(),o){r=r.concat(A(e,t,n,o,!0));break}}}return r}function A(e,t,n,r,i){let a=i?[]:void 0;return e.inEdges(r.v).forEach(r=>{let o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,M(t,n,s)}),e.outEdges(r.v).forEach(r=>{let i=e.edge(r),a=e.node(r.w);a.in-=i,M(t,n,a)}),e.removeNode(r.v),a}function j(e,t){let n=new E,r=0,i=0;e.nodes().forEach(e=>{n.setNode(e,{v:e,in:0,out:0})}),e.edges().forEach(e=>{let a=n.edge(e.v,e.w)||0,o=t(e),s=a+o;n.setEdge(e.v,e.w,s),i=Math.max(i,n.node(e.v).out+=o),r=Math.max(r,n.node(e.w).in+=o)});let a=$e(i+r+3).map(()=>new Je),o=r+1;return n.nodes().forEach(e=>{M(a,o,n.node(e))}),{graph:n,buckets:a,zeroIndex:o}}function M(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function $e(e){let t=[];for(let n=0;n<e;n++)t.push(n);return t}function N(e,t,n,r){let i=r;for(;e.hasNode(i);)i=lt(r);return n.dummy=t,e.setNode(i,n),i}function et(e){let t=new E().setGraph(e.graph());return e.nodes().forEach(n=>{t.setNode(n,e.node(n))}),e.edges().forEach(n=>{let r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function P(e){let t=new E({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function F(e){let t=e.nodes().map(t=>{let n={};return e.outEdges(t).forEach(t=>{n[t.w]=(n[t.w]||0)+e.edge(t).weight}),n});return H(e.nodes(),t)}function I(e){let t=e.nodes().map(t=>{let n={};return e.inEdges(t).forEach(t=>{n[t.v]=(n[t.v]||0)+e.edge(t).weight}),n});return H(e.nodes(),t)}function L(e,t){let n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);let c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function R(e){let t=ut(at(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),i=r.rank;i!==void 0&&(t[i][r.order]=n)}),t}function tt(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MAX_VALUE:n}),n=B(Math.min,t);e.nodes().forEach(t=>{let r=e.node(t);Object.hasOwn(r,`rank`)&&(r.rank-=n)})}function nt(e){let t=e.nodes().map(t=>e.node(t).rank).filter(e=>e!==void 0),n=B(Math.min,t),r=[];e.nodes().forEach(t=>{let i=e.node(t).rank-n;r[i]||(r[i]=[]),r[i].push(t)});let i=0,a=e.graph().nodeRankFactor;Array.from(r).forEach((t,n)=>{t===void 0&&n%a!==0?--i:t!==void 0&&i&&t.forEach(t=>{e.node(t).rank+=i})})}function rt(e,t,n,r){let i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),N(e,`border`,i,t)}var it=65535;function z(e,t=it){let n=[];for(let r=0;r<e.length;r+=t){let i=e.slice(r,r+t);n.push(i)}return n}function B(e,t){if(t.length>it){let n=z(t);return e.apply(null,n.map(t=>e.apply(null,t)))}return e.apply(null,t)}function at(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MIN_VALUE:n});return B(Math.max,t)}function ot(e,t){let n={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function V(e,t){let n=Date.now();try{return t()}finally{console.log(e+` time: `+(Date.now()-n)+`ms`)}}function st(e,t){return t()}var ct=0;function lt(e){let t=++ct;return e+String(t)}function ut(e,t,n=1){t??(t=e,e=0);let r=e=>e<t;n<0&&(r=e=>t<e);let i=[];for(let t=e;r(t);t+=n)i.push(t);return i}function dt(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function ft(e,t){let n=t;if(typeof t==`string`){let e=t;n=t=>t[e]}return Object.entries(e).reduce((e,[t,r])=>(e[t]=n(r,t),e),{})}function H(e,t){return e.reduce((e,n,r)=>(e[n]=t[r],e),{})}var U={addBorderNode:rt,addDummyNode:N,applyWithChunking:B,asNonCompoundGraph:P,buildLayerMatrix:R,intersectRect:L,mapValues:ft,maxRank:at,normalizeRanks:tt,notime:st,partition:ot,pick:dt,predecessorWeights:I,range:ut,removeEmptyRanks:nt,simplify:et,successorWeights:F,time:V,uniqueId:lt,zipObject:H};function W(e){(e.graph().acyclicer===`greedy`?Qe(e,t(e)):mt(e)).forEach(t=>{let n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,lt(`rev`))});function t(e){return t=>e.edge(t).weight}}function pt(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}function mt(e){let t=[],n={},r={};function i(a){Object.hasOwn(r,a)||(r[a]=!0,n[a]=!0,e.outEdges(a).forEach(e=>{Object.hasOwn(n,e.w)?t.push(e):i(e.w)}),delete n[a])}return e.nodes().forEach(i),t}function ht(e){e.graph().dummyChains=[],e.edges().forEach(t=>G(e,t))}function G(e,t){let n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a===r+1)return;e.removeEdge(t);let l,u,d=0;for(++r;r<a;++d,++r)s.points=[],u={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},l=N(e,`edge`,u,`_d`),r===c&&(u.width=s.width,u.height=s.height,u.dummy=`edge-label`,u.labelpos=s.labelpos),e.setEdge(n,l,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(l),n=l;e.setEdge(n,i,{weight:s.weight},o)}function gt(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),r=n.edgeLabel;e.setEdge(n.edgeObj,r);let i;for(;n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}function _t(e){function t(n){let r=e.node(n);if(r&&Object.prototype.hasOwnProperty.call(r,`rank`))return r.rank;let i=e.outEdges(n)||[];if(!i.length)return r&&(r.rank=0),0;let a=i.map(n=>e.node(n.w)?t(n.w)-e.edge(n).minlen:1/0),o=B(Math.min,a);return o===1/0&&(o=0),r&&(r.rank=o),o}(e.sources()||[]).forEach(t)}function vt(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}function yt(e){bt(e);let t=new E;e.nodes().forEach(e=>{t.setNode(e,{})});let n=e.nodes();if(!n.length)return t;let r=n[0],i=/* @__PURE__ */ new Set([r]);for(;i.size<n.length;){let r=xt(e,i);if(!r){let e=n.find(e=>!i.has(e));i.add(e),t.setNode(e,{});continue}let{edgeObject:a,delta:o,attachFrom:s,attachTo:c}=r;St(e,i,s,o),t.setEdge(a.v,a.w,{}),i.add(c)}return t}function bt(e){e.nodes().forEach(t=>{let n=e.node(t)||{};Object.prototype.hasOwnProperty.call(n,`rank`)||(n.rank=0,e.setNode(t,n))})}function xt(e,t){let n=null;return e.edges().forEach(r=>{let i=t.has(r.v);if(i===t.has(r.w))return;let a=vt(e,r),o=Math.abs(a);if(!n||o<n.absoluteSlack){let e=i?r.v:r.w,t=i?r.w:r.v;n={edgeObject:r,delta:i?a:-a,attachFrom:e,attachTo:t,absoluteSlack:o}}}),n}function St(e,t,n,r){r&&e.nodes().forEach(n=>{if(!t.has(n)){let t=e.node(n);t.rank+=r}})}function K(e){let t=et(e);return _t(t),t.nodes().forEach(n=>{let r=t.node(n),i=e.node(n)||{};i.rank=r.rank,e.setNode(n,i)}),e}function Ct(e,t){}function wt(e,t){}function Tt(e,t,n){return 0}function Et(e){return null}function Dt(e,t){return null}K.initLowLimValues=Ct,K.initCutValues=wt,K.calcCutValue=Tt,K.leaveEdge=Et,K.enterEdge=Dt;var Ot=_t;function kt(e){let t=e.graph().ranker;if(t instanceof Function)return t(e);switch(e.graph().ranker){case`network-simplex`:Mt(e);break;case`tight-tree`:jt(e);break;case`longest-path`:At(e);break;case`none`:break;default:Mt(e)}}var At=Ot;function jt(e){Ot(e),yt(e)}function Mt(e){K(e)}function Nt(e){let t=Pt(e);e.graph().dummyChains.forEach(n=>{let r=e.node(n),i=r.edgeObj,a=q(e,t,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0,d=n;for(;d!==i.w;){if(r=e.node(d),u){for(;(l=o[c])!==s&&e.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&e.node(l=o[c+1]).minRank<=r.rank;)c++;l=o[c]}e.setParent(d,l),d=e.successors(d)[0]}})}function q(e,t,n,r){let i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c,l;c=n;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function Pt(e){let t={},n=0;function r(i){let a=n;e.children(i).forEach(r),t[i]={low:a,lim:n++}}return e.children().forEach(r),t}function Ft(e){let t=U.addDummyNode(e,`root`,{},`_root`),n=It(e),r=Object.values(n),i=U.applyWithChunking(Math.max,r)-1,a=2*i+1;e.graph().nestingRoot=t,e.edges().forEach(t=>{e.edge(t).minlen*=a});let o=Lt(e)+1;e.children().forEach(r=>{J(e,t,a,o,i,n,r)}),e.graph().nodeRankFactor=a}function J(e,t,n,r,i,a,o){let s=e.children(o);if(!s.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:n});return}let c=U.addBorderNode(e,`_bt`),l=U.addBorderNode(e,`_bb`),u=e.node(o);e.setParent(c,o),u.borderTop=c,e.setParent(l,o),u.borderBottom=l,s.forEach(s=>{J(e,t,n,r,i,a,s);let u=e.node(s),d=u.borderTop?u.borderTop:s,f=u.borderBottom?u.borderBottom:s,p=u.borderTop?r:2*r,m=d===f?i-a[o]+1:1;e.setEdge(c,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,l,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,c,{weight:0,minlen:i+a[o]})}function It(e){let t={};function n(r,i){let a=e.children(r);a&&a.length&&a.forEach(e=>n(e,i+1)),t[r]=i}return e.children().forEach(e=>n(e,1)),t}function Lt(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function Y(e){let t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}function Rt(e){function t(n){let r=e.children(n),i=e.node(n);if(r.length&&r.forEach(t),Object.hasOwn(i,`minRank`)){i.borderLeft=[],i.borderRight=[];for(let t=i.minRank,r=i.maxRank+1;t<r;++t)zt(e,`borderLeft`,`_bl`,n,i,t),zt(e,`borderRight`,`_br`,n,i,t)}}e.children().forEach(t)}function zt(e,t,n,r,i,a){let o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=N(e,`border`,o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}function Bt(e){let t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&Ht(e)}function Vt(e){let t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&Wt(e),(t===`lr`||t===`rl`)&&(Kt(e),Ht(e))}function Ht(e){e.nodes().forEach(t=>{Ut(e.node(t))}),e.edges().forEach(t=>{Ut(e.edge(t))})}function Ut(e){let t=e.width;e.width=e.height,e.height=t}function Wt(e){e.nodes().forEach(t=>{Gt(e.node(t))}),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(Gt),Object.hasOwn(n,`y`)&&Gt(n)})}function Gt(e){e.y=-e.y}function Kt(e){e.nodes().forEach(t=>{X(e.node(t))}),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(X),Object.hasOwn(n,`x`)&&X(n)})}function X(e){let t=e.x;e.x=e.y,e.y=t}var qt={adjust:Bt,undo:Vt};function Jt(e){let t={},n=e.nodes().filter(t=>e.children(t).length===0),r=n.map(t=>e.node(t).rank),i=ut(B(Math.max,r)+1).map(()=>[]);function a(n){if(t[n])return;t[n]=!0;let r=e.node(n);i[r.rank].push(n),e.successors(n).forEach(a)}return n.sort((t,n)=>e.node(t).rank-e.node(n).rank).forEach(a),i}function Yt(e,t){let n=0;for(let r=1;r<t.length;++r)n+=Xt(e,t[r-1],t[r]);return n}function Xt(e,t,n){let r=H(n,n.map((e,t)=>t)),i=t.flatMap(t=>e.outEdges(t).map(t=>({pos:r[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos)),a=1;for(;a<n.length;)a<<=1;let o=2*a-1;--a;let s=Array(o).fill(0),c=0;return i.forEach(e=>{let t=e.pos+a;s[t]+=e.weight;let n=0;for(;t>0;)t%2&&(n+=s[t+1]),t=t-1>>1,s[t]+=e.weight;c+=e.weight*n}),c}function Zt(e,t=[]){return t.map(t=>{let n=e.inEdges(t);if(!n.length)return{v:t};let r=n.reduce((t,n)=>{let r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}})}function Qt(e,t){let n={};return e.forEach((e,t)=>{let r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};e.barycenter!==void 0&&(r.barycenter=e.barycenter,r.weight=e.weight)}),t.edges().forEach(e=>{let t=n[e.v],r=n[e.w];t!==void 0&&r!==void 0&&(r.indegree++,t.out.push(r))}),$t(Object.values(n).filter(e=>!e.indegree))}function $t(e){let t=[];function n(e){return t=>{t.merged||(t.barycenter===void 0||e.barycenter===void 0||t.barycenter>=e.barycenter)&&en(e,t)}}function r(t){return n=>{n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){let i=e.pop();t.push(i),i.in.reverse().forEach(n(i)),i.out.forEach(r(i))}return t.filter(e=>!e.merged).map(e=>dt(e,[`vs`,`i`,`barycenter`,`weight`]))}function en(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}function tn(e,t){let n=ot(e,e=>Object.hasOwn(e,`barycenter`)),r=n.lhs,i=n.rhs.sort((e,t)=>t.i-e.i),a=[],o=0,s=0,c=0;r.sort(Z(!!t)),c=nn(a,i,c),r.forEach(e=>{c+=e.vs.length,a.push(e.vs),o+=e.barycenter*e.weight,s+=e.weight,c=nn(a,i,c)});let l={vs:a.flat(!0)};return s&&(l.barycenter=o/s,l.weight=s),l}function nn(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}function Z(e){return(t,n)=>t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}function rn(e,t,n,r){let i=e.children(t),a=e.node(t),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,c={};o&&(i=i.filter(e=>e!==o&&e!==s));let l=Zt(e,i);l.forEach(t=>{if(e.children(t.v).length){let i=rn(e,t.v,n,r);c[t.v]=i,Object.hasOwn(i,`barycenter`)&&on(t,i)}});let u=Qt(l,n);an(u,c);let d=tn(u,r);if(o&&(d.vs=[o,d.vs,s].flat(!0),e.predecessors(o).length)){let t=e.node(e.predecessors(o)[0]),n=e.node(e.predecessors(s)[0]);Object.hasOwn(d,`barycenter`)||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+t.order+n.order)/(d.weight+2),d.weight+=2}return d}function an(e,t){e.forEach(e=>{e.vs=e.vs.flatMap(e=>t[e]?t[e].vs:e)})}function on(e,t){e.barycenter===void 0?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}function sn(e,t,n,r){r||=e.nodes();let i=cn(e),a=new E({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(t=>e.node(t));return r.forEach(r=>{let o=e.node(r),s=e.parent(r);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(a.setNode(r),a.setParent(r,s||i),e[n](r).forEach(t=>{let n=t.v===r?t.w:t.v,i=a.edge(n,r),o=i?i.weight:0;a.setEdge(n,r,{weight:e.edge(t).weight+o})}),Object.hasOwn(o,`minRank`)&&a.setNode(r,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),a}function cn(e){let t;for(;e.hasNode(t=lt(`_root`)););return t}function ln(e,t,n){let r={},i;n.forEach(n=>{let a=e.parent(n),o,s;for(;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}function un(e,t={}){if(typeof t.customOrder==`function`){t.customOrder(e,un);return}let n=at(e),r=dn(e,ut(1,n+1),`inEdges`),i=dn(e,ut(n-1,-1,-1),`outEdges`),a=Jt(e);if(pn(e,a),t.disableOptimalOrderHeuristic)return;let o=1/0,s,c=t.constraints||[];for(let t=0,n=0;n<4;++t,++n){fn(t%2==0?r:i,t%4>=2,c),a=R(e);let l=Yt(e,a);l<o?(o=l,n=0,s=structuredClone(a)):l===o&&(s=structuredClone(a))}pn(e,s)}function dn(e,t,n){let r=/* @__PURE__ */ new Map;function i(e,t){r.has(e)||r.set(e,[]),r.get(e).push(t)}for(let t of e.nodes()){let n=e.node(t);if(typeof n.rank==`number`&&i(n.rank,t),typeof n.minRank==`number`&&typeof n.maxRank==`number`)for(let e=n.minRank;e<=n.maxRank;e++)e!==n.rank&&i(e,t)}return t.map(t=>sn(e,t,n,r.get(t)||[]))}function fn(e,t,n){let r=new E;e.forEach(e=>{n.forEach(e=>r.setEdge(e.left,e.right));let i=e.graph().root,a=rn(e,i,r,t);a.vs.forEach((t,n)=>{e.node(t).order=n}),ln(e,r,a.vs)})}function pn(e,t){Object.values(t).forEach(t=>{t.forEach((t,n)=>{e.node(t).order=n})})}function mn(e,t){let n={};function r(t,r){let i=0,a=0,o=t.length,s=r[r.length-1];return r.forEach((t,c)=>{let l=gn(e,t),u=l?e.node(l).order:o;(l||t===s)&&(r.slice(a,c+1).forEach(t=>{e.predecessors(t).forEach(r=>{let a=e.node(r),o=a.order;(o<i||u<o)&&!(a.dummy&&e.node(t).dummy)&&_n(n,r,t)})}),a=c+1,i=u)}),r}return t.length&&t.reduce(r),n}function hn(e,t){let n={};function r(t,r,i,a,o){let s;ut(r,i).forEach(r=>{s=t[r],e.node(s).dummy&&e.predecessors(s).forEach(t=>{let r=e.node(t);r.dummy&&(r.order<a||r.order>o)&&_n(n,t,s)})})}function i(t,n){let i=-1,a,o=0;return n.forEach((s,c)=>{if(e.node(s).dummy===`border`){let t=e.predecessors(s);t.length&&(a=e.node(t[0]).order,r(n,o,c,i,a),o=c,i=a)}r(n,o,n.length,a,t.length)}),n}return t.length&&t.reduce(i),n}function gn(e,t){if(e.node(t).dummy)return e.predecessors(t).find(t=>e.node(t).dummy)}function _n(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];r||(e[t]=r={}),r[n]=!0}function vn(e,t,n){if(t>n){let e=t;t=n,n=e}return!!e[t]&&Object.hasOwn(e[t],n)}function yn(e,t,n,r){let i={},a={},o={};return t.forEach(e=>{e.forEach((e,t)=>{i[e]=e,a[e]=e,o[e]=t})}),t.forEach(e=>{let t=-1;e.forEach(e=>{let s=r(e);if(s.length){s=s.sort((e,t)=>o[e]-o[t]);let r=(s.length-1)/2;for(let c=Math.floor(r),l=Math.ceil(r);c<=l;++c){let r=s[c];a[e]===e&&t<o[r]&&!vn(n,e,r)&&(a[r]=e,a[e]=i[e]=i[r],t=o[r])}}})}),{root:i,align:a}}function Q(e,t,n,r,i){let a={},o=bn(e,t,n,i),s=i?`borderLeft`:`borderRight`;function c(e,t){let n=o.nodes().slice(),r={},i=n.pop();for(;i;){if(r[i])e(i);else{r[i]=!0,n.push(i);for(let e of t(i))n.push(e)}i=n.pop()}}function l(e){a[e]=o.inEdges(e).reduce((e,t)=>Math.max(e,a[t.v]+o.edge(t)),0)}function u(t){let n=o.outEdges(t).reduce((e,t)=>Math.min(e,a[t.w]-o.edge(t)),1/0),r=e.node(t);n!==1/0&&r.borderType!==s&&(a[t]=Math.max(a[t],n))}return c(l,o.predecessors.bind(o)),c(u,o.successors.bind(o)),Object.keys(r).forEach(e=>{a[e]=a[n[e]]}),a}function bn(e,t,n,r){let i=new e.constructor,a=e.graph(),o=Tn(a.nodesep,a.edgesep,r);return t.forEach(t=>{let r;t.forEach(t=>{let a=n[t];if(i.setNode(a),r){let s=n[r],c=i.edge(s,a);i.setEdge(s,a,Math.max(o(e,t,r),c||0))}r=t})}),i}function xn(e,t){return Object.values(t).reduce((t,n)=>{let r=-1/0,i=1/0;Object.entries(n).forEach(([t,n])=>{let a=En(e,t)/2;r=Math.max(n+a,r),i=Math.min(n-a,i)});let a=r-i;return a<t[0]&&(t=[a,n]),t},[1/0,null])[1]}function Sn(e,t){let n=Object.values(t),r=B(Math.min,n),i=B(Math.max,n);[`u`,`d`].forEach(n=>{[`l`,`r`].forEach(a=>{let o=n+a,s=e[o];if(s===t)return;let c=Object.values(s),l=r-B(Math.min,c);a!==`l`&&(l=i-B(Math.max,c)),l&&(s=ft(s,e=>e+l),e[o]=s)})})}function Cn(e,t){return ft(e.ul,(n,r)=>{if(t)return e[t.toLowerCase()][r];let i=Object.values(e).map(e=>e[r]).sort((e,t)=>e-t);return(i[1]+i[2])/2})}function wn(e){let t=R(e),n=Object.assign(mn(e,t),hn(e,t)),r={},i;return[`u`,`d`].forEach(a=>{i=a===`u`?t:Object.values(t).reverse(),[`l`,`r`].forEach(t=>{let o=i;t===`r`&&(o=o.map(e=>Object.values(e).reverse()));let s=(a===`u`?e.predecessors:e.successors).bind(e),c=yn(e,o,n,s),l=Q(e,o,c.root,c.align,t===`r`);t===`r`&&(l=ft(l,e=>-e)),r[a+t]=l})}),Sn(r,xn(e,r)),Cn(r,e.graph().align)}function Tn(e,t,n){return(r,i,a)=>{let o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.hasOwn(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.hasOwn(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2}return l&&(c+=n?l:-l),l=0,c}}function En(e,t){return e.node(t).width}function Dn(e){let t=P(e);On(t);let n=wn(t);Object.entries(n).forEach(([t,n])=>{e.node(t).x=n})}function On(e){let t=R(e),n=e.graph().ranksep,r=0;t.forEach(t=>{let i=t.reduce((t,n)=>{let r=e.node(n).height;return t>r?t:r},0);t.forEach(t=>{e.node(t).y=r+i/2}),r+=i+n})}function kn(e,t={}){let n=t.debugTiming?V:st;return n(`layout`,()=>{let r=n(` buildLayoutGraph`,()=>zn(e));return n(` runLayout`,()=>An(r,n,t)),n(` updateInputGraph`,()=>jn(e,r)),r})}function An(e,t,n){t(` makeSpaceForEdgeLabels`,()=>Bn(e)),t(` removeSelfEdges`,()=>Xn(e)),t(` acyclic`,()=>W(e)),t(` nestingGraph.run`,()=>Ft(e)),t(` rank`,()=>kt(P(e))),t(` injectEdgeLabelProxies`,()=>Vn(e)),t(` removeEmptyRanks`,()=>nt(e)),t(` nestingGraph.cleanup`,()=>Y(e)),t(` normalizeRanks`,()=>tt(e)),t(` assignRankMinMax`,()=>Hn(e)),t(` removeEdgeLabelProxies`,()=>Un(e)),t(` normalize.run`,()=>ht(e)),t(` parentDummyChains`,()=>Nt(e)),t(` addBorderSegments`,()=>Rt(e)),t(` order`,()=>un(e,n)),t(` insertSelfEdges`,()=>Zn(e)),t(` adjustCoordinateSystem`,()=>qt.adjust(e)),t(` position`,()=>Dn(e)),t(` positionSelfEdges`,()=>Qn(e)),t(` removeBorderNodes`,()=>Yn(e)),t(` normalize.undo`,()=>gt(e)),t(` fixupEdgeLabelCoords`,()=>qn(e)),t(` undoCoordinateSystem`,()=>qt.undo(e)),t(` translateGraph`,()=>Wn(e)),t(` assignNodeIntersects`,()=>Kn(e)),t(` reversePoints`,()=>Jn(e)),t(` acyclic.undo`,()=>pt(e))}function jn(e,t){e.nodes().forEach(n=>{let r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,r.order=i.order,r.rank=i.rank,t.children(n).length&&(r.width=i.width,r.height=i.height))}),e.edges().forEach(n=>{let r=e.edge(n),i=t.edge(n);r.points=i.points,Object.hasOwn(i,`x`)&&(r.x=i.x,r.y=i.y)});let n=t.graph(),r=e.graph();r.width=n.width,r.height=n.height}var Mn=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],Nn={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},Pn=[`acyclicer`,`ranker`,`rankdir`,`align`],Fn=[`width`,`height`,`rank`],$={width:0,height:0},In=[`minlen`,`weight`,`width`,`height`,`labeloffset`],Ln={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},Rn=[`labelpos`,`arrowshape`];function zn(e){let t=er(e.graph()),n={...Nn,...$n(t,Mn),...dt(t,Pn)},r=new E({multigraph:!0,compound:!0});return r.setGraph(n),e.nodes().forEach(t=>{let n=$n(er(e.node(t)),Fn);Object.keys($).forEach(e=>{n[e]===void 0&&(n[e]=$[e])}),r.setNode(t,n),r.setParent(t,e.parent(t))}),e.edges().forEach(t=>{let n=er(e.edge(t));r.setEdge(t,{...Ln,...$n(n,In),...dt(n,Rn)})}),r}function Bn(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function Vn(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let n=e.node(t.v);N(e,`edge-proxy`,{rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t},`_ep`)}})}function Hn(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}function Un(e){e.nodes().forEach(t=>{let n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function Wn(e){let t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){let a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}e.nodes().forEach(t=>c(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);Object.hasOwn(n,`x`)&&c(n)}),t-=o,r-=s,e.nodes().forEach(n=>{let i=e.node(n);i.x-=t,i.y-=r}),e.edges().forEach(n=>{let i=e.edge(n);i.points.forEach(e=>{e.x-=t,e.y-=r}),Object.hasOwn(i,`x`)&&(i.x-=t),Object.hasOwn(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function Gn(e,t,n){if(!n||!t)return e;let r=t.x-e.x,i=t.y-e.y,a=Math.sqrt(r*r+i*i);if(!a||a<=n)return e;let o=n/a;return{x:e.x+r*o,y:e.y+i*o}}function Kn(e){e.edges().forEach(t=>{let n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;!n.points||!n.points.length?(n.points=[],a=i,o=r):(a=n.points[0],o=n.points[n.points.length-1]);let s=L(r,a),c=L(i,o),l=n.points.length?n.points[0]:a,u=n.points.length?n.points[n.points.length-1]:o,d=n.arrowshape,f=d===`normal`||d===`vee`,p=!!n.reversed,m=s,h=c;f&&(p?m=Gn(s,l,4):h=Gn(c,u,4)),n.points.unshift(m),n.points.push(h)})}function qn(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset}})}function Jn(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function Yn(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(n.borderLeft[n.borderLeft.length-1]),o=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy===`border`&&e.removeNode(t)})}function Xn(e){e.edges().forEach(t=>{if(t.v===t.w){let n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function Zn(e){R(e).forEach(t=>{let n=0;t.forEach((t,r)=>{let i=e.node(t);i.order=r+n,(i.selfEdges||[]).forEach(t=>{N(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,label:t.label},`_se`)}),delete i.selfEdges})})}function Qn(e){e.nodes().forEach(t=>{let n=e.node(t);if(n.dummy===`selfedge`){let r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function $n(e,t){return ft(dt(e,t),Number)}function er(e){let t={};return e&&Object.entries(e).forEach(([e,n])=>{let r=e;typeof r==`string`&&(r=r.toLowerCase()),t[r]=n}),t}var tr={rankDirection:`TB`,nodeSeparation:50,rankSeparation:50,edgeSeparation:10,align:void 0,nodeWidth:100,nodeHeight:40,curvedEdges:!1,padding:20,arrowShape:`normal`,arrowSize:10};function nr(e){return e.length?e.map((e,t)=>`${t===0?`M`:`L`} ${e.x} ${e.y}`).join(` `):``}function rr(e){if(!e.length)return``;if(e.length===1){let t=e[0];return`M ${t.x} ${t.y}`}if(e.length===2)return`M ${e[0].x} ${e[0].y} L ${e[1].x} ${e[1].y}`;let[t]=e,n=`M ${t.x} ${t.y}`;for(let t=1;t<e.length-1;t+=1){e[t-1];let r=e[t],i=e[t+1],a=r.x,o=r.y,s=(r.x+i.x)/2,c=(r.y+i.y)/2;n+=` Q ${a} ${o} ${s} ${c}`}let r=e[e.length-1];return n+=` L ${r.x} ${r.y}`,n}function ir(e){let{nodes:t,edges:n,configuration:r}=e,i=C(null),a=C(null),o=`dag-arrow-${f()}`;function s(e,t,n){a.value=null,i.value=null;let r={...tr,...n},s=new E({multigraph:!0,compound:!0});s.setGraph({rankdir:r.rankDirection,nodesep:r.nodeSeparation,ranksep:r.rankSeparation,edgesep:r.edgeSeparation,align:r.align}),e.forEach(e=>{s.setNode(e.id,{label:e.label,width:e.width??r.nodeWidth,height:e.height??r.nodeHeight})}),t.forEach(e=>{s.setEdge(e.from,e.to,{weight:e.weight??1,minlen:e.minLength??1,arrowShape:r.arrowShape??`normal`})}),kn(s);let c=e.map(e=>{let t=s.node(e.id);return{id:e.id,label:e.label,x:t.x,y:t.y,width:t.width,height:t.height,original:e}}),l=s.edges().map(e=>{let n=s.edge(e),i=n.points||[];if(!i.length)return null;let a=r.curvedEdges?rr(i):nr(i),c=r.arrowShape===`undirected`?null:`url(#${o})`,l=t.find(t=>t?.from===e.v&&t?.to===e.w);return{id:`${e.v}->${e.w}->${f()}`,from:e.v,to:e.w,points:i,pathData:a,markerEnd:c,original:{...l,...n}}}).filter(Boolean),u=r.padding;if(!c.length){i.value={nodes:[],edges:l,viewBox:`0 0 0 0`,arrowShape:r.arrowShape,arrowSize:r.arrowSize};return}let p=c.flatMap(e=>[e.x-e.width/2,e.x+e.width/2]),m=c.flatMap(e=>[e.y-e.height/2,e.y+e.height/2]),h=Math.min(...p)-u,g=Math.max(...p)+u,ee=Math.min(...m)-u,te=Math.max(...m)+u;i.value={nodes:c,edges:l.map(e=>({...e,midpoint:e.pathData?d(e.pathData):{x:0,y:0}})),viewBox:`${h} ${ee} ${g-h} ${te-ee}`,arrowShape:r.arrowShape,arrowSize:r.arrowSize}}return ze(()=>{try{s(T(t)||[],T(n)||[],T(r)||{})}catch(e){console.error(`[useDag] layout error:`,e),a.value=e,i.value=null}}),{layoutData:i,lastError:a,arrowMarkerIdentifier:o,recomputeLayout:()=>{s(T(t)||[],T(n)||[],T(r)||{})}}}var ar=/* @__PURE__ */ e({default:()=>zr}),or=[`id`],sr=[`id`],cr={key:1,class:`dag-chart-error`},lr={style:{position:`relative`}},ur=[`viewBox`,`xmlns`,`aria-describedby`],dr={key:0},fr=[`id`,`width`,`height`],pr=[`cx`,`cy`,`r`,`fill`],mr=[`x`,`y`,`width`,`height`,`fill`],hr={key:2},gr=[`id`,`markerWidth`,`markerHeight`,`refX`,`refY`],_r=[`d`,`fill`,`stroke`],vr=[`d`,`fill`,`stroke`],yr={class:`vue-ui-dag-edges`},br=[`data-a11y-midpoint-id`,`aria-label`,`onMouseenter`],xr={class:`vue-ui-dag-nodes`},Sr=[`onClick`,`onMouseenter`,`onMouseleave`],Cr=[`data-a11y-node-id`,`aria-label`],wr=[`x`,`y`,`width`,`height`],Tr={class:`vue-ui-dag-edges`},Er=[`d`,`stroke-width`,`marker-end`],Dr={class:`vue-ui-dag-node-labels`},Or=[`onClick`,`onMouseenter`,`onMouseleave`],kr=[`x`,`y`,`font-size`,`fill`,`font-weight`],Ar=[`x`,`y`,`font-size`,`fill`,`font-weight`,`innerHTML`],jr={key:1},Mr={key:1,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Nr={key:6,class:`vue-data-ui-watermark`},Pr=[`data-position`],Fr={key:0},Ir=[`data-position`],Lr={key:0},Rr=1.5,zr=/*#__PURE__*/ ye({__name:`vue-ui-dag`,props:{dataset:{type:Object,default(){return{nodes:[],edges:[]}}},config:{type:Object,default(){return{}}}},emits:[`onNodeClick`,`onMidpointEnter`,`onMidpointLeave`,`copyAlt`,`rotate`],setup(e,{expose:d,emit:ye}){let ze=Ee(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),He=Ee(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Ue=Ee(()=>import(`./PackageVersion-PdpqwkYX.js`).then(e=>e.t)),{vue_ui_dag:We}=oe(),E=e,Ge=ye,D=C(null),O=C(f()),Ke=C(null),qe=C(null),Je=C(null),Ye=C(0),Xe=C(0),Ze=C(!1),Qe=C(!1),k=C(null),A=C(null),j=C(null),M=C(null),$e=C(null),N=C(`pointer`),et=C(!1),P=C(bt()),F=_(()=>P.value.style.chart.nodes),I=_(()=>P.value.style.chart.edges),L=_(()=>P.value.style.chart.midpoints),R=_(()=>P.value.style.chart);ie({config:()=>P.value,dataset:()=>E.dataset,component:`VueUiDag`,rules:[ae.noHint]});let tt=_(()=>P.value.userOptions.useCursorPointer),nt=C(P.value.style.chart.width),rt=C(P.value.style.chart.height),it=C({x:0,y:0}),z=C(null),B=C(null),at=C({left:`0px`,top:`0px`}),ot=C(`top`),V=C(!1),st=C({x:0,y:0}),ct=C({x:0,y:0}),lt=C(null),ut=C(null),dt=C({left:`0px`,top:`0px`}),ft=C(`top`),H=C(!1),U=C(!1),{svgRef:W}=fe({config:R.value.title}),{userOptionsVisible:pt,setUserOptionsVisibility:mt,keepUserOptionState:ht}=de({config:P.value}),G=C(P.value.style.chart.layout.rankDirection),gt=_(()=>h({defaultConfig:{userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,nodes:{stroke:`#CCCCCC`,backgroundColor:`#DDDDDD50`},edges:{stroke:`#CCCCCC`},midpoints:{stroke:`#CCCCCC`,fill:`#CCCCCC`}}}},userConfig:P.value.skeletonConfig??{}})),{loading:_t,FINAL_DATASET:vt,manualLoading:yt}=se({...Le(E),FINAL_CONFIG:P,prepareConfig:bt,skeletonDataset:E.config?.skeletonDataset??{nodes:[{id:`A`,label:``},{id:`B`,label:``},{id:`C`,label:``}],edges:[{from:`A`,to:`B`},{from:`A`,to:`C`}]},skeletonConfig:h({defaultConfig:P.value,userConfig:gt.value})});function bt(){return c(E.config,We,ge)}let xt=_(()=>P.value.debug);Pe(async()=>{te(E.dataset)&&(m({componentName:`VueUiDag`,type:`dataset`,debug:xt.value}),Qe.value=!1,yt.value=!0),E.dataset.nodes&&E.dataset.nodes.length!==0||(m({componentName:`VueUiDag`,type:`datasetAttributeEmpty`,property:`nodes`,index:0,debug:xt.value}),Qe.value=!1,yt.value=!0),Qe.value=!0,await ke(),un()}),Re(()=>E.config,async e=>{_t.value||(P.value=bt()),pt.value=!P.value.userOptions.showOnChartHover,Ye.value+=1,G.value=R.value.layout.rankDirection,nt.value=R.value.width,rt.value=R.value.height,Lt.value=R.value.zoom.active,await ke(),un()},{deep:!0});let{isPrinting:St,isImaging:K,generatePdf:Ct,generateImage:wt}=le({elementId:`dag_${O.value}`,fileName:R.value.title.text||`vue-ui-dag`,options:P.value.userOptions.print}),Tt=_(()=>R.value.backgroundColor),Et=_(()=>R.value.title),{isCallbackImaging:Dt,isCallbackSvg:Ot,generateSvg:kt,onGenerateImage:At}=ue({svg:W,title:Et,legend:null,legendItems:null,backgroundColor:Tt,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:wt});function jt(){Ze.value=!0,mt(!0)}function Mt(){mt(!1),Ze.value=!1}function Nt({tooltipRef:e,isVisibleRef:t,anchorRef:n,styleRef:r,placementRef:i,offsetRef:a,margin:o=24}){return function(){let s=e.value;if(!s||!t.value)return;let c=s.getBoundingClientRect(),l=window.innerWidth,u=window.innerHeight,d=n.value.x,f=n.value.y,p=a?.value?.x??0,m=a?.value?.y??0,h=f-m-c.height-o,g=d-c.width/2,ee=`top`;if(h<o){let e=f+m+o;e+c.height<=u-o?(h=e,ee=`bottom`):(h=f-c.height/2,h<o&&(h=o),h+c.height>u-o&&(h=u-c.height-o),ee=`center`)}g<o&&(g=o),g+c.width>l-o&&(g=l-c.width-o);let te=g<=o,ne=g+c.width>=l-o;if((te||ne)&&ee!==`center`){let e,t,n=d-p-o;l-(d+p)-o>=n?(e=`right`,t=d+p+o):(e=`left`,t=d-p-o-c.width),t>=o&&t+c.width<=l-o&&(g=t,h=f-c.height/2,h<o&&(h=o),h+c.height>u-o&&(h=u-c.height-o),ee=e)}i.value=ee,r.value={left:`${g}px`,top:`${h}px`}}}let{layoutData:q,lastError:Pt,arrowMarkerIdentifier:Ft}=ir({nodes:_(()=>vt.value.nodes.map(e=>({...e,backgroundColor:e.backgroundColor?u(e.backgroundColor):F.value.backgroundColor,color:e.color?u(e.color):F.value.labels.color}))),edges:_(()=>vt.value.edges),configuration:_(()=>({...R.value.layout,rankDirection:G.value}))});function J(e){return q.value?q.value.nodes.find(t=>t.id===e):null}_(()=>{if(!q.value)return[];let e=I.value.stroke,t=/* @__PURE__ */ new Set;return q.value.edges.forEach(n=>{t.add({id:n.id,from:n.from,to:n.to,color:n.original?.color||e})}),Array.from(t)});let It=_(()=>{let e=nt.value,t=rt.value,n=Number(e),r=Number(t),i=Number.isFinite(n)&&n>0,a=Number.isFinite(r)&&r>0;return!i&&!a?null:{width:i?n:null,height:a?r:null}}),Lt=C(R.value.zoom.active),{viewBox:Y,resetZoom:Rt,setInitialViewBox:zt,scale:Bt,zoomByFactor:Vt}=re(W,{x:0,y:0,width:100,height:100},1,Lt,()=>{V.value=!1}),Ht=null;async function Ut(e,{smooth:t=!0,duration:n=300,zoomReset:r=!1,zoom:i=null}={}){let a=J(e);if(!a)return!1;let o=Y.value;if(!o)return!1;let s={x:Number(o.x),y:Number(o.y),width:Number(o.width),height:Number(o.height)},c=Bt.value,u=s.width,d=s.height,f=c;if(Number.isFinite(i)&&i>0||r){Rt(!1);let e=Y.value,t=Number.isFinite(i)&&i>0?i/100:1;u=Number(e.width)/t,d=Number(e.height)/t,f=t,Y.value={...s},Bt.value=c}let p=Number(a.x),m=Number(a.y);if(!Number.isFinite(s.x)||!Number.isFinite(s.y)||!Number.isFinite(s.width)||!Number.isFinite(s.height)||!Number.isFinite(u)||!Number.isFinite(d)||!Number.isFinite(p)||!Number.isFinite(m))return!1;let h={x:p-u/2,y:m-d/2,width:u,height:d};if(Ht!==null&&(cancelAnimationFrame(Ht),Ht=null),V.value=!1,!t||n<=0)return Y.value=h,Bt.value=f,!0;let ee=performance.now();function te(e){let t=Math.min((e-ee)/n,1),r=g(t);Y.value={x:l(s.x,h.x,r),y:l(s.y,h.y,r),width:l(s.width,h.width,r),height:l(s.height,h.height,r)},Bt.value=l(c,f,r),t<1?Ht=requestAnimationFrame(te):(Y.value=h,Bt.value=f,Ht=null)}return Ht=requestAnimationFrame(te),!0}function Wt(){Lt.value=!Lt.value}function Gt(){let e=q.value&&q.value.viewBox;if(!e)return;let t=String(e).split(` `).map(Number);if(t.length!==4)return;let[n,r,i,a]=t;if(!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)||!Number.isFinite(a))return;let o=i,s=a,c=n,l=r,u=It.value;u&&(u.width!==null&&(o=u.width),u.height!==null&&(s=u.height),c=n-(o-i)/2,l=r-(s-a)/2),zt({x:c,y:l,width:o,height:s},{overwriteCurrentIfNotZoomed:!0})}Re(()=>q.value&&q.value.viewBox,()=>{Gt()},{immediate:!0}),Re(()=>It.value,()=>{Gt()}),Re(()=>U.value,e=>{Lt.value=!e});let Kt=_(()=>{let e=Y.value;return e?`${e.x} ${e.y} ${e.width} ${e.height}`:`0 0 0 0`}),X=C(!1),qt=C({width:0,height:0});Re([W,X,()=>R.value.backgroundPattern.show],([e,t,n],r,i)=>{if(!e||!t||!n)return;let a=()=>{let{width:t,height:n}=e.getBoundingClientRect();(t!==qt.value.width||n!==qt.value.height)&&(qt.value={width:t,height:n})};a();let o=new ResizeObserver(a);o.observe(e),i(()=>o.disconnect())},{flush:`post`});let Jt=_(()=>{let e=Y.value;if(!e||!X.value)return e;let{width:t,height:n}=qt.value;if(!(t>0&&n>0&&e.width>0&&e.height>0))return e;let r=Math.min(t/e.width,n/e.height),i=t/r,a=n/r;return{x:e.x-(i-e.width)/2,y:e.y-(a-e.height)/2,width:i,height:a}});function Yt(e){X.value=e,Xe.value+=1}function Xt(){U.value=!U.value}function Zt(){Vt(Rr,!0)}function Qt(){Vt(1/Rr,!0)}let $t=[`TB`,`RL`,`BT`,`LR`];function en(){G.value=$t[($t.indexOf(G.value)+1)%$t.length],Rt(),Ge(`rotate`,G.value)}let tn=Nt({tooltipRef:B,isVisibleRef:H,anchorRef:it,styleRef:at,placementRef:ot,isNode:!1}),nn=Nt({tooltipRef:ut,isVisibleRef:V,anchorRef:st,styleRef:dt,placementRef:ft,offsetRef:ct}),Z=C(null);async function rn(e){Ge(`onMidpointEnter`,e);let t=W.value;if(!t||!e?.midpoint)return;let n=t.createSVGPoint();n.x=e.midpoint.x,n.y=e.midpoint.y;let r=t.getScreenCTM();if(!r)return;let i=n.matrixTransform(r);it.value={x:i.x,y:i.y},z.value=e,H.value=!0,L.value.selectedEdge.animated===!0&&(Z.value=e.id,gn()),await ke(),tn()}function an(){H.value=!1,z.value=null,Ge(`onMidpointLeave`),L.value.selectedEdge.animated===!0&&(Z.value=null,gn())}async function on(e){if(Ge(`onNodeClick`,e),!F.value.tooltip.showOnClick)return;let t=W.value;if(!t)return;let n=t.createSVGPoint();n.x=e.x,n.y=e.y;let r=t.getScreenCTM();if(!r)return;let i=n.matrixTransform(r),a=R.value.layout.nodeWidth,o=R.value.layout.nodeHeight,s=r.a,c=r.d,l=a*s,u=o*c;ct.value={x:l/2,y:u/2},st.value={x:i.x,y:i.y},lt.value=e,V.value=!0,await ke(),nn()}function sn(){V.value=!1,lt.value=null}function cn(e){if(!(V.value||H.value))return;let t=ut.value;if(t&&t.contains(e.target))return;let n=B.value;if(n&&n.contains(e.target))return;let r=W.value;if(r&&r.contains(e.target)){let t=e.target.closest(`.vue-ui-dag-node`),n=e.target.closest(`.vue-ui-dag-edge-midpoint`);if(t||n)return}sn(),an(),et.value||Hn()}function ln(e){e.key===`Escape`&&(V.value&&sn(),H.value&&an())}Pe(()=>{document.addEventListener(`mousedown`,cn),document.addEventListener(`keydown`,ln)}),Ne(()=>{document.removeEventListener(`mousedown`,cn),document.removeEventListener(`keydown`,ln),k.value&&(A.value&&k.value.unobserve(A.value),k.value.disconnect())});function un(){if(!P.value.responsive){k.value&&(A.value&&k.value.unobserve(A.value),k.value.disconnect(),k.value=null,A.value=null);return}let e=ne(()=>{if(!D.value)return;let{width:e,height:t}=pe({chart:D.value,title:R.value.title.text?Ke.value:null,legend:R.value.controls.show?Je.value?.$el:null,source:qe.value});requestAnimationFrame(()=>{nt.value=Math.max(.1,e),rt.value=Math.max(.1,t-12)})});k.value&&(A.value&&k.value.unobserve(A.value),k.value.disconnect()),k.value=new ResizeObserver(e),A.value=D.value?D.value.parentNode:null,A.value&&k.value.observe(A.value),e()}function dn(e,t={}){let{direction:n=-1,mode:r=`oneLapNearest`,dasharray:i=null}=t;if(!e||typeof e.getTotalLength!=`function`)return xt.value&&console.warn(`VueUiDag @getIdealDashoffsetDelta: invalid path element`,e),0;let a=e.getTotalLength(),o=d(i??e.getAttribute(`stroke-dasharray`)??(typeof getComputedStyle==`function`?getComputedStyle(e).strokeDasharray:``));if(!Number.isFinite(o)||o<=0)return n*a;let s=Math.max(1,Math.round(a/o)),c=Math.max(1,Math.ceil(a/o)),l=Math.max(1,Math.floor(a/o)),u;return u=r===`pattern`?o:r===`oneLapCeil`?c*o:r===`oneLapFloor`?l*o:s*o,n*u;function d(e){if(!e||e===`none`)return NaN;let t=String(e).replace(/,/g,` `).trim().split(/\s+/).map(e=>Number.parseFloat(e)).filter(e=>Number.isFinite(e));if(!t.length)return NaN;let n=t.reduce((e,t)=>e+t,0);return t.length%2==1?n*2:n}}let fn=C(/* @__PURE__ */ new Map),pn=C(/* @__PURE__ */ new Map);function mn(e){return function(t){t?fn.value.set(e,t):fn.value.delete(e)}}function hn(){pn.value.forEach(e=>{try{e.cancel()}catch{}}),pn.value.clear()}function gn(){hn();let e=q.value?.edges??[];if(!e.length)return;let t=I.value.animations,n=Number(t.referenceDistance)>0?Number(t.referenceDistance):24;e.forEach(e=>{let r=L.value.selectedEdge.animated===!0&&Z.value!=null&&e.id===Z.value,i=!!e?.original?.animated||!!e?.animated||r,a=fn.value.get(e.id);if(!a)return;if(!i){a.style.strokeDasharray=`0`,a.style.strokeDashoffset=`0`;return}let o=e?.original?.dasharray??t.dasharray;a.style.strokeDasharray=String(o),a.style.strokeDashoffset=`0`;let s=![void 0,null].includes(e?.original?.animationDirection),c=![void 0,null].includes(t.animationDirection),l=dn(a,{direction:s?Number(e.original.animationDirection):c?Number(t.animationDirection):-1,mode:`oneLapNearest`,dasharray:String(o)}),u=e?.original?.animationDurationMs??t.animationDurationMs??1e3,d=Number(u),f=Number.isFinite(d)&&d>0?n/d:n/1e3,p=Math.max(1,Math.round(Math.abs(l)/Math.max(1e-9,f))),m=a.animate([{strokeDashoffset:0},{strokeDashoffset:l}],{duration:p,iterations:1/0,easing:`linear`});pn.value.set(e.id,m)})}Re(()=>q.value&&q.value.edges,async()=>{await ke(),gn()},{deep:!0,immediate:!0}),Ne(()=>{hn()});async function _n({scale:e=2}={}){if(!D.value)return;let{width:t,height:n}=D.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await me({domElement:D.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:R.value.title.text??`vue-ui-dag`,width:t,height:n,aspectRatio:r}}let vn=_(()=>{let e=Number(R.value.layout.nodeHeight);return Number.isFinite(e)&&e>0?e/R.value.backgroundPattern.spacingRatio:12}),yn=_(()=>vn.value*(R.value.backgroundPattern.dotRadiusRatio/100)),Q=C(null),bn=null,xn=0;function Sn(e){bn&&=(clearTimeout(bn),null),Q.value!==e&&(Q.value=e,(F.value.selected.downstreamEdges.animated===!0||F.value.selected.upstreamEdges.animated===!0)&&gn())}function Cn(e){N.value=`pointer`,Z.value=null,Sn(e)}async function wn(e){N.value=`pointer`,Q.value=null,await rn(e)}function Tn(e){let t=++xn;bn&&clearTimeout(bn),bn=setTimeout(()=>{t===xn&&Q.value===e&&(Q.value=null,(F.value.selected.downstreamEdges.animated===!0||F.value.selected.upstreamEdges.animated===!0)&&gn())},20)}function En(e){let t=e.from===Q.value,n=e.to===Q.value,r=M.value===`midpoint`&&j.value===e.id,i=Z.value===e.id||z.value?.id===e.id||r,a=e.original.color??I.value.stroke;return i&&L.value.selectedEdge.stroke!=null?a=L.value.selectedEdge.stroke:t&&F.value.selected.downstreamEdges.stroke!=null?a=F.value.selected.downstreamEdges.stroke:n&&F.value.selected.upstreamEdges.stroke!=null&&(a=F.value.selected.upstreamEdges.stroke),e.animated=t&&F.value.selected.downstreamEdges.animated===!0||n&&F.value.selected.upstreamEdges.animated===!0||r&&L.value.selectedEdge.animated===!0?!0:(q.value?.edges.find(t=>t.id===e.id))?.original?.animated??!1,{d:e.pathData,fill:`none`,stroke:a,"stroke-width":I.value.strokeWidth*(i||e.from===Q.value?2:1),"stroke-linecap":`round`,"stroke-linejoin":`round`}}function Dn(e){return M.value===`node`&&j.value===e}function On(e){let t=Q.value===e.id,n=M.value===`node`&&j.value===e.id,r=t||n,i=r&&F.value.selected.backgroundColor!=null?F.value.selected.backgroundColor:e.original.backgroundColor,a=r&&F.value.selected.stroke!=null?F.value.selected.stroke:F.value.stroke,o=r&&F.value.selected.strokeWidth!=null?F.value.selected.strokeWidth:F.value.strokeWidth;return{x:e.x-e.width/2,y:e.y-e.height/2,width:e.width,height:e.height,rx:F.value.borderRadius,fill:i,stroke:a,"stroke-width":o}}function kn(e){let t=e.from===Q.value,n=e.to===Q.value,r=M.value===`midpoint`&&j.value===e.id,i=Z.value===e.id||z.value?.id===e.id||r,a=e.original.color??I.value.stroke;return i&&L.value.selectedEdge.stroke!=null?a=L.value.selectedEdge.stroke:t&&F.value.selected.downstreamEdges.stroke!=null?a=F.value.selected.downstreamEdges.stroke:n&&F.value.selected.upstreamEdges.stroke!=null&&(a=F.value.selected.upstreamEdges.stroke),{cx:e?.midpoint?.x,cy:e?.midpoint?.y,r:L.value.radius,fill:r?L.value.selectedEdge.stroke??L.value.fill:L.value.fill,stroke:a,"stroke-width":I.value.strokeWidth*(i||e.from===Q.value?2:1)}}function An(e){let t=e.from===Q.value,n=e.to===Q.value,r=M.value===`midpoint`&&j.value===e.id,i=Z.value===e.id||z.value?.id===e.id||r,a=e.color??e.original?.color??I.value.stroke;return i&&L.value.selectedEdge.stroke!=null?a=L.value.selectedEdge.stroke:t&&F.value.selected.downstreamEdges.stroke!=null?a=F.value.selected.downstreamEdges.stroke:n&&F.value.selected.upstreamEdges.stroke!=null&&(a=F.value.selected.upstreamEdges.stroke),a}function jn(e){return`${Ft}-${String(e).replace(/[^a-zA-Z0-9_-]/g,`_`)}`}function Mn(){return q.value}async function Nn(){Ge(`copyAlt`,{config:P.value,dataset:vt.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:vt.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let Pn=_(()=>(q.value?.nodes??[]).map(e=>({id:e.id,type:`node`,x:e.x,y:e.y,label:e.label??e.id,raw:e}))),Fn=_(()=>L.value.show?(q.value?.edges??[]).filter(e=>e?.midpoint).map(e=>({id:e.id,type:`midpoint`,x:e.midpoint.x,y:e.midpoint.y,label:`${J(e.from)?.label??e.from} → ${J(e.to)?.label??e.to}`,raw:e})):[]),$=_(()=>[...Pn.value,...Fn.value].sort((e,t)=>e.x===t.x?e.y-t.y:e.x-t.x)),In=_(()=>{let e=/* @__PURE__ */ new Map;return $.value.forEach((t,n)=>{e.set(`${t.type}:${t.id}`,n)}),e}),Ln=_(()=>{let e=q.value?.nodes??[],t=q.value?.edges??[];return{headers:[P.value.a11y?.translations?.node??`Node`,P.value.a11y?.translations?.parents??`Parents`,P.value.a11y?.translations?.children??`Children`],rows:e.map(e=>{let n=t.filter(t=>t.to===e.id).map(e=>J(e.from)?.label??e.from).join(`, `),r=t.filter(t=>t.from===e.id).map(e=>J(e.to)?.label??e.to).join(`, `);return[e.label??e.id,n||`—`,r||`—`]})}});function Rn(e){return`${e.type}:${e.id}`}function zn(){return j.value==null||M.value==null?null:$.value.find(e=>e.id===j.value&&e.type===M.value)??null}async function Bn(e){e&&(e.type===`node`?an():e.type===`midpoint`&&(sn(),await rn(e.raw)))}function Vn(e){e&&(j.value=e.id,M.value=e.type,$e.value=In.value.get(Rn(e))??null,e.type===`node`?(Sn(e.id),Z.value=null):e.type===`midpoint`&&(Q.value=null,Z.value=e.id,L.value.selectedEdge.animated===!0&&gn()))}function Hn(){j.value=null,M.value=null,$e.value=null,V.value||(Q.value=null),H.value||(Z.value=null,L.value.selectedEdge.animated===!0&&gn())}function Un(){et.value=!0,Hn()}function Wn(){et.value=!1,sn(),an(),Hn()}function Gn(e,t,n){let r=t.x-e.x,i=t.y-e.y;return n===`right`&&r<=0||n===`left`&&r>=0||n===`down`&&i<=0||n===`up`&&i>=0?1/0:n===`right`||n===`left`?Math.abs(r)*1e3+Math.abs(i):Math.abs(i)*1e3+Math.abs(r)}function Kn(e,t){let n=$.value.filter(t=>Rn(t)!==Rn(e));if(!n.length)return null;let r=null,i=1/0;return n.forEach(n=>{let a=Gn(e,n,t);a<i&&(i=a,r=n)}),r||(t===`right`||t===`down`?$.value[0]??null:$.value[$.value.length-1]??null)}async function qn(e){e&&(N.value=`keyboard`,e.type===`node`&&(an(),await on(e.raw)))}async function Jn(e){if(!W.value||U.value||document.activeElement!==W.value||!$.value.length)return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`ArrowUp`,i=e.key===`ArrowDown`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;if(!t&&!n&&!r&&!i&&!a&&!o)return;if(e.preventDefault(),e.stopPropagation(),o){sn(),an(),Hn();return}let s=zn();if(a){if(!s)return;s.type===`node`&&await qn(s);return}if(!s){let e=$.value[0];if(!e)return;Vn(e),await Bn(e);return}let c=null;n?c=Kn(s,`right`):t?c=Kn(s,`left`):i?c=Kn(s,`down`):r&&(c=Kn(s,`up`)),c&&(sn(),an(),Vn(c),await Bn(c))}d({getData:Mn,getImage:_n,generatePdf:Ct,generateSvg:kt,generateImage:wt,toggleAnnotator:Xt,toggleFullscreen:Yt,zoomIn:Zt,zoomOut:Qt,resetZoom:Rt,switchDirection:en,copyAlt:Nn,focusOnNode:Ut});let Yn=_(()=>s(P.value.userOptions?.annotator?.followZoom,Y.value));return(e,s)=>(S(),b(`div`,{class:Ae(`vue-data-ui-component vue-ui-dag ${X.value?`vue-data-ui-wrapper-fullscreen`:``} ${P.value.responsive?`vue-ui-dag-responsive`:``}`),id:`dag_${O.value}`,ref_key:`dagChart`,ref:D,style:Me({fontFamily:P.value.style.fontFamily,backgroundColor:R.value.backgroundColor,padding:`0.5rem`}),onMouseenter:jt,onMouseleave:Mt},[x(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[x(`p`,null,Ie(P.value.a11y.translations.keyboardNavigation),1)],8,sr),Ln.value?.rows?.length?(S(),v(_e,{key:0,uid:O.value,head:Ln.value.headers,body:Ln.value.rows,notice:P.value.a11y.translations.tableAvailable,caption:P.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):y(``,!0),T(Pt)?(S(),b(`div`,cr,Ie(String(T(Pt))),1)):y(``,!0),P.value.userOptions.buttons.annotator?(S(),v(T(ze),Oe({key:2},T(a)(P.value.userOptions.annotator),{svgRef:T(W),followZoom:P.value.userOptions?.annotator?.followZoom,annotationViewport:Yn.value,backgroundColor:R.value.backgroundColor,color:R.value.color,active:U.value,isCursorPointer:tt.value,palette:P.value.userOptions.annotatorPalette,onClose:Xt}),Ce({_:2},[Fe(T(o),t=>({name:t,fn:Be(n=>[w(e.$slots,t,je(De(T(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):y(``,!0),P.value.userOptions.show&&Qe.value&&(T(ht)||T(pt))?(S(),v(T(He),Oe({ref:`userOptionsRef`,key:`user_option_${Xe.value}`,backgroundColor:R.value.backgroundColor,color:R.value.color,isPrinting:T(St),isImaging:T(K),uid:O.value,hasTooltip:!1,hasTable:!1,hasXls:!1,hasLabel:!1,isFullscreen:X.value,chartElement:D.value},T(n)(P.value.userOptions,`pdf img svg fullscreen altCopy annotator zoom`),{isAnnotation:U.value,isZoom:Lt.value,isCursorPointer:tt.value,onToggleFullscreen:Yt,onGeneratePdf:T(Ct),onGenerateImage:T(At),onGenerateSvg:T(kt),onToggleAnnotator:Xt,onToggleZoom:Wt,onCopyAlt:Nn,style:{visibility:T(ht)?T(pt)?`visible`:`hidden`:`visible`}}),Ce({_:2},[Fe(T(t)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionZoom optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Be(n=>[w(e.$slots,t,je(De(T(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`isZoom`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):y(``,!0),R.value.title.text?(S(),b(`div`,{key:4,ref_key:`chartTitle`,ref:Ke,style:`width:100%;background:transparent;`},[(S(),v(he,{key:`title_${Ye.value}`,config:{title:{cy:`dag-title`,...R.value.title},subtitle:{cy:`dag-subtitle`,...R.value.title.subtitle}}},null,8,[`config`]))],512)):y(``,!0),R.value.controls.position===`top`&&!T(_t)&&R.value.controls.show?(S(),v(ve,{key:5,ref_key:`zoomControls`,ref:Je,config:P.value,scale:T(Bt),isFullscreen:X.value,withDirection:``,onZoomIn:Zt,onZoomOut:Qt,onResetZoom:s[0]||=()=>T(Rt)(!0),onSwitchDirection:en},null,8,[`config`,`scale`,`isFullscreen`])):y(``,!0),x(`div`,lr,[T(q)?(S(),b(`svg`,{key:0,ref_key:`svgRef`,ref:W,class:Ae({"vue-ui-dag-svg":!0,"vue-data-ui-loading":T(_t)}),viewBox:Kt.value,xmlns:T(ee),style:Me({backgroundColor:R.value.backgroundColor,height:`100%`,width:`100%`}),tabindex:`0`,"aria-describedby":`chart-instructions-${O.value}`,onFocus:Un,onBlur:Wn,onKeydown:Jn},[Te(T(Ue)),w(e.$slots,`svg-underlayer`,{svg:{drawingArea:T(Y),data:T(q),orientation:G.value,isPrintingImg:T(St)||T(K)||T(Dt),isPrintingSvg:T(Ot)}},void 0,!0),R.value.backgroundPattern.show?(S(),b(`defs`,dr,[x(`pattern`,{id:`dag_bg_pattern_${O.value}`,patternUnits:`userSpaceOnUse`,width:vn.value,height:vn.value},[w(e.$slots,`background-pattern`,je(De({x:vn.value/2,y:vn.value/2,color:R.value.backgroundPattern.dotColor})),()=>[x(`circle`,{cx:vn.value/2,cy:vn.value/2,r:yn.value,fill:R.value.backgroundPattern.dotColor},null,8,pr)],!0)],8,fr)])):y(``,!0),R.value.backgroundPattern.show?(S(),b(`rect`,{key:1,x:Jt.value?.x??0,y:Jt.value?.y??0,width:Jt.value?.width??0,height:Jt.value?.height??0,fill:`url(#dag_bg_pattern_${O.value})`,style:Me({pointerEvents:`none`,opacity:R.value.backgroundPattern.opacity})},null,12,mr)):y(``,!0),T(q).arrowShape===`undirected`?y(``,!0):(S(),b(`defs`,hr,[(S(!0),b(be,null,Fe(T(q).edges,e=>(S(),b(`marker`,{key:`marker_${e.id}`,id:jn(e.id),markerWidth:T(q).arrowSize,markerHeight:T(q).arrowSize,refX:T(q).arrowSize-3,refY:T(q).arrowSize/2,orient:`auto`,markerUnits:`strokeWidth`},[T(q).arrowShape===`normal`?(S(),b(`path`,{key:0,d:`M 0 0 L ${T(q).arrowSize} ${T(q).arrowSize/2} L 0 ${T(q).arrowSize} Z`,fill:An(e),stroke:An(e),"stroke-width":`0`,style:{transition:`stroke 0.2s ease-in-out,
|
|
2
|
-
fill 0.2s ease-in-out,
|
|
3
|
-
stroke-width 0.2s ease-in-out`}},null,8,_r)):(S(),b(`path`,{key:1,d:`M 0 0 L ${T(q).arrowSize} ${T(q).arrowSize/2} L 0 ${T(q).arrowSize} L ${T(q).arrowSize/3} ${T(q).arrowSize/2} Z`,fill:An(e),stroke:An(e),"stroke-width":`0`,style:{transition:`stroke 0.2s ease-in-out,
|
|
4
|
-
fill 0.2s ease-in-out,
|
|
5
|
-
stroke-width 0.2s ease-in-out`}},null,8,vr))],8,gr))),128))])),x(`g`,yr,[(S(!0),b(be,null,Fe(T(q).edges,e=>(S(),b(be,{key:e.id},[x(`path`,Oe({"data-cy-edge":``,ref_for:!0,ref:mn(e.id)},{ref_for:!0},En(e),{style:{"pointer-events":`none`,transition:`stroke-width 0.2s ease-in-out,
|
|
6
|
-
stroke 0.2s ease-in-out`}}),null,16),L.value.show?(S(),b(`circle`,Oe({key:0,"data-cy-midpoint":``,class:`vue-ui-dag-edge-midpoint`,"data-a11y-midpoint-id":e.id},{ref_for:!0},kn(e),{"aria-label":`${J(e.from)?.label??e.from} to ${J(e.to)?.label??e.to}`,style:{transition:`stroke-width 0.2s ease-in-out,
|
|
7
|
-
stroke 0.2s ease-in-out,
|
|
8
|
-
fill 0.2s ease-in-out`},onMouseenter:t=>wn(e),onMouseleave:an}),null,16,br)):y(``,!0)],64))),128))]),x(`g`,xr,[(S(!0),b(be,null,Fe(T(q).nodes,t=>(S(),b(`g`,{key:t.id,class:`vue-ui-dag-node`,onClick:Ve(e=>F.value.tooltip.showOnClick&&on(t),[`stop`]),onMouseenter:e=>Cn(t.id),onMouseleave:e=>Tn(t.id)},[e.$slots.node?y(``,!0):(S(),b(`rect`,Oe({key:0,"data-cy-node":``},{ref_for:!0},On(t),{"data-a11y-node-id":t.id,"aria-label":`${t.label??t.id}`,style:{cursor:F.value.tooltip.showOnClick&&tt.value?`pointer`:`default`,transition:`stroke 0.2s ease-in-out, stroke-width 0.2s ease-in-out, fill 0.2s ease-in-out`}}),null,16,Cr)),e.$slots.node?(S(),b(`foreignObject`,{key:1,x:t.x-t.width/2,y:t.y-t.height/2,width:t.width,height:t.height,style:{overflow:`visible`}},[w(e.$slots,`node`,Oe({ref_for:!0},{node:t,orientation:G.value}),void 0,!0)],8,wr)):y(``,!0)],40,Sr))),128))]),x(`g`,Tr,[(S(!0),b(be,null,Fe(T(q).edges,e=>(S(),b(`path`,{key:e.id,d:e.pathData,fill:`none`,stroke:`transparent`,"stroke-width":I.value.strokeWidth*(e.from===Q.value||e.id===z.value?.id?1.3:1),"stroke-linecap":`round`,"stroke-linejoin":`round`,"marker-end":T(q).arrowShape===`undirected`?null:`url(#${jn(e.id)})`,style:{"pointer-events":`none`,transition:`stroke-width 0.2s ease-in-out,
|
|
9
|
-
stroke 0.2s ease-in-out`}},null,8,Er))),128))]),x(`g`,Dr,[(S(!0),b(be,null,Fe(T(q).nodes,t=>(S(),b(`g`,{key:t.id,onClick:Ve(e=>F.value.tooltip.showOnClick&&on(t),[`stop`]),onMouseenter:e=>Sn(t.id),onMouseleave:e=>Tn(t.id)},[e.$slots[`free-node-label`]?y(``,!0):(S(),b(be,{key:0},[e.$slots[`node-label`]?(S(),b(`text`,{key:0,x:t.x,y:t.y+F.value.labels.fontSize/3,"text-anchor":`middle`,"font-size":F.value.labels.fontSize,fill:Q.value===t.id&&F.value.selected.labelColor!=null?F.value.selected.labelColor:t.original.color,"font-weight":F.value.labels.bold?`bold`:`normal`,style:{transition:`fill 0.2s ease-in-out`}},[w(e.$slots,`node-label`,Oe({ref_for:!0},{node:t,orientation:G.value}),()=>[we(Ie(t.label),1)],!0)],8,kr)):!e.$slots[`free-node-label`]&&!e.$slots.node?(S(),b(`text`,{key:1,"data-cy-node-label":``,x:t.x,y:t.y+F.value.labels.fontSize/3,"text-anchor":`middle`,"font-size":F.value.labels.fontSize,fill:(Q.value===t.id||Dn(t.id))&&F.value.selected.labelColor!=null?F.value.selected.labelColor:t.original.color,"font-weight":F.value.labels.bold?`bold`:`normal`,style:{transition:`fill 0.2s ease-in-out`},innerHTML:T(p)({content:t.label,fontSize:F.value.labels.fontSize,fontWeight:R.value.nodes.labels.bold?`bold`:`normal`,fill:(Q.value===t.id||Dn(t.id))&&F.value.selected.labelColor!=null?F.value.selected.labelColor:t.original.color,x:t.x,y:t.y,autoOffset:!0})},null,8,Ar)):y(``,!0)],64)),e.$slots[`free-node-label`]?(S(),b(`g`,jr,[w(e.$slots,`free-node-label`,Oe({ref_for:!0},{node:t,layoutData:T(q),orientation:G.value}),void 0,!0)])):y(``,!0)],40,Or))),128))]),w(e.$slots,`svg`,{svg:{drawingArea:T(Y),data:T(q),orientation:G.value,isPrintingImg:T(St)||T(K)||T(Dt),isPrintingSvg:T(Ot)}},void 0,!0)],46,ur)):y(``,!0),e.$slots.hint?(S(),b(`div`,Mr,[w(e.$slots,`hint`,je(De({hint:P.value.a11y.translations.keyboardNavigation,isVisible:et.value})),void 0,!0)])):y(``,!0)]),e.$slots.watermark?(S(),b(`div`,Nr,[w(e.$slots,`watermark`,je(De({isPrinting:T(St)||T(K)||T(Dt)||T(Ot)})),void 0,!0)])):y(``,!0),Te(Se,{name:`fade`},{default:Be(()=>[H.value?(S(),v(xe,{key:0,to:X.value?D.value:`body`},[x(`div`,{"data-cy-tooltip-midpoint":``,ref_key:`tooltipRef`,ref:B,class:`vue-ui-dag-tooltip`,style:Me({...at.value,maxWidth:L.value.tooltip.maxWidth,"--vue-data-ui-dag-tooltip-background":L.value.tooltip.backgroundColor,"--vue-data-ui-dag-tooltip-color":L.value.tooltip.color}),"data-position":ot.value},[w(e.$slots,`tooltip-midpoint`,je(De({edge:z.value,layoutData:T(q)})),()=>[z.value?(S(),b(`div`,Fr,Ie(J(z.value.from)?.label??z.value.from)+` → `+Ie(J(z.value.to)?.label??z.value.to),1)):y(``,!0)],!0)],12,Pr)],8,[`to`])):y(``,!0)]),_:3}),Te(Se,{name:`fade`},{default:Be(()=>[V.value?(S(),v(xe,{key:0,to:X.value?D.value:`body`},[x(`div`,{"data-cy-tooltip-node":``,ref_key:`nodeTooltipRef`,ref:ut,class:`vue-ui-dag-node-tooltip`,style:Me({maxWidth:F.value.tooltip.maxWidth,left:dt.value.left,top:dt.value.top,"--vue-data-ui-dag-node-tooltip-background":F.value.tooltip.backgroundColor,"--vue-data-ui-dag-node-tooltip-color":F.value.tooltip.color}),"data-position":ft.value},[w(e.$slots,`tooltip-node`,je(De({node:lt.value,layoutData:T(q)})),()=>[lt.value?(S(),b(`div`,Lr,Ie(lt.value.label),1)):y(``,!0)],!0)],12,Ir)],8,[`to`])):y(``,!0)]),_:3}),R.value.controls.position===`bottom`&&!T(_t)&&R.value.controls.show?(S(),v(ve,{key:7,ref_key:`zoomControls`,ref:Je,config:P.value,scale:T(Bt),isFullscreen:X.value,withDirection:``,onZoomIn:Zt,onZoomOut:Qt,onResetZoom:s[1]||=()=>T(Rt)(!0),onSwitchDirection:en},null,8,[`config`,`scale`,`isFullscreen`])):y(``,!0),e.$slots.source?(S(),b(`div`,{key:8,ref_key:`source`,ref:qe,dir:`auto`},[w(e.$slots,`source`,{},void 0,!0)],512)):y(``,!0),w(e.$slots,`skeleton`,{},()=>[T(_t)?(S(),v(ce,{key:0})):y(``,!0)],!0)],46,or))}},[[`__scopeId`,`data-v-cbb7e8be`]]);export{ar as n,zr as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as ee}from"./annotationSlots-OLiW25XN.js";import{t as o}from"./useNestedProp-DnGoh-XS.js";import{n as te,t as ne}from"./useHints-C-TwxM0Y.js";import{t as re}from"./useConfig-_JwRfIqE.js";import{X as ie}from"./lib-rPeBMZrn.js";import{t as ae}from"./usePrinter-DVf3YcG5.js";import{t as oe}from"./UserOptions-K1N7zQRx.js";import{t as se}from"./useUserOptionState-CXlFnwPv.js";import{n as ce}from"./PenAndPaper-BV5ODysA.js";import{t as s}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as c,computed as l,createBlock as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createSlots as m,defineAsyncComponent as h,guardReactiveProps as g,mergeProps as _,normalizeClass as le,normalizeProps as v,normalizeStyle as y,openBlock as b,ref as x,renderList as S,renderSlot as C,resolveDynamicComponent as ue,unref as w,useCssVars as de,watch as T,withCtx as E}from"vue";var D=/* @__PURE__ */ e({default:()=>k}),fe=[`id`],pe=[`onMousedown`,`onTouchstart`],me=[`onMousedown`,`onTouchstart`],he=[`onMousedown`,`onTouchstart`],ge=[`onMousedown`,`onTouchstart`],_e=[`onMousedown`,`onTouchstart`],O=1,k=/*#__PURE__*/ s({__name:`vue-ui-dashboard`,props:{dataset:Array,config:Object},emits:[`change`,`copyAlt`],setup(e,{expose:s,emit:D}){de(e=>({v489ea2bf:Ne.value,v3e7efc7b:Pe.value}));let k={VueDataUi:h(()=>import(`./vue-data-ui-Da3HK_wb.js`).then(e=>e.n)),VueUi3dBar:h(()=>import(`./vue-ui-3d-bar-D1XfKXhp.js`).then(e=>e.n)),VueUiAccordion:h(()=>import(`./vue-ui-accordion-DxGxf-Rm.js`).then(e=>e.n)),VueUiAgePyramid:h(()=>import(`./vue-ui-age-pyramid-CJqqtEIh.js`).then(e=>e.n)),VueUiAnnotator:h(()=>import(`./vue-ui-annotator-D31LD4-s.js`).then(e=>e.n)),VueUiCandlestick:h(()=>import(`./vue-ui-candlestick-CQXdyPEt.js`).then(e=>e.n)),VueUiChestnut:h(()=>import(`./vue-ui-chestnut-DV7XKL7g.js`).then(e=>e.n)),VueUiDigits:h(()=>import(`./vue-ui-digits-Cy3Y6qro.js`).then(e=>e.n)),VueUiDonut:h(()=>import(`./vue-ui-donut-DasGeYdl.js`).then(e=>e.n)),VueUiDonutEvolution:h(()=>import(`./vue-ui-donut-evolution-Bw7ilDYR.js`).then(e=>e.n)),VueUiDumbbell:h(()=>import(`./vue-ui-dumbbell-BPvvKhag.js`).then(e=>e.n)),VueUiFlow:h(()=>import(`./vue-ui-flow-XI5Y3qdk.js`).then(e=>e.n)),VueUiGalaxy:h(()=>import(`./vue-ui-galaxy-NRaBIHpn.js`).then(e=>e.n)),VueUiGauge:h(()=>import(`./vue-ui-gauge-DX4SBIKS.js`).then(e=>e.n)),VueUiHeatmap:h(()=>import(`./vue-ui-heatmap-D6KP1N8f.js`).then(e=>e.n)),VueUiKpi:h(()=>import(`./vue-ui-kpi-D1MUlURM.js`).then(e=>e.n)),VueUiMiniLoader:h(()=>import(`./vue-ui-mini-loader-PsWZLMLF.js`).then(e=>e.n)),VueUiMolecule:h(()=>import(`./vue-ui-molecule-BRB54XBD.js`).then(e=>e.n)),VueUiMoodRadar:h(()=>import(`./vue-ui-mood-radar-CkHJdUyF.js`).then(e=>e.n)),VueUiNestedDonuts:h(()=>import(`./vue-ui-nested-donuts-C-7VZO11.js`).then(e=>e.n)),VueUiOnion:h(()=>import(`./vue-ui-onion-erpKpDKg.js`).then(e=>e.n)),VueUiParallelCoordinatePlot:h(()=>import(`./vue-ui-parallel-coordinate-plot-BDg0pRkN.js`).then(e=>e.n)),VueUiQuadrant:h(()=>import(`./vue-ui-quadrant-CUdNxC6W.js`).then(e=>e.n)),VueUiQuickChart:h(()=>import(`./vue-ui-quick-chart-DE5Zwioe.js`).then(e=>e.n)),VueUiRadar:h(()=>import(`./vue-ui-radar-6y6er9ND.js`).then(e=>e.n)),VueUiRating:h(()=>import(`./vue-ui-rating-D0QvpD3V.js`).then(e=>e.n)),VueUiRelationCircle:h(()=>import(`./vue-ui-relation-circle-CjnG9G7s.js`).then(e=>e.n)),VueUiRings:h(()=>import(`./vue-ui-rings-EYfCkNB6.js`).then(e=>e.n)),VueUiScatter:h(()=>import(`./vue-ui-scatter-Tw-5uRac.js`).then(e=>e.n)),VueUiSkeleton:h(()=>import(`./vue-ui-skeleton-CZMyXM-1.js`).then(e=>e.n)),VueUiSmiley:h(()=>import(`./vue-ui-smiley-C00q-teB.js`).then(e=>e.n)),VueUiSparkHistogram:h(()=>import(`./vue-ui-sparkhistogram-CK7JmyCw.js`).then(e=>e.n)),VueUiSparkStackbar:h(()=>import(`./vue-ui-sparkstackbar-Dwdn2_9q.js`).then(e=>e.n)),VueUiSparkTrend:h(()=>import(`./vue-ui-spark-trend-Cmj4aWcQ.js`).then(e=>e.n)),VueUiSparkbar:h(()=>import(`./vue-ui-sparkbar-Crq1Vui3.js`).then(e=>e.n)),VueUiSparkgauge:h(()=>import(`./vue-ui-sparkgauge-CN_9yenn.js`).then(e=>e.n)),VueUiSparkline:h(()=>import(`./vue-ui-sparkline-2_RlGrAT.js`).then(e=>e.n)),VueUiStripPlot:h(()=>import(`./vue-ui-strip-plot-Dig2RljR.js`).then(e=>e.n)),VueUiTable:h(()=>import(`./vue-ui-table-_qSw3iGd.js`).then(e=>e.n)),VueUiTableHeatmap:h(()=>import(`./vue-ui-table-heatmap-BwoRcqFD.js`).then(e=>e.n)),VueUiTableSparkline:h(()=>import(`./vue-ui-table-sparkline-39sKOqcp.js`).then(e=>e.n)),VueUiThermometer:h(()=>import(`./vue-ui-thermometer-CoVrrzHW.js`).then(e=>e.n)),VueUiTimer:h(()=>import(`./vue-ui-timer-DoR5PqOa.js`).then(e=>e.n)),VueUiTiremarks:h(()=>import(`./vue-ui-tiremarks-9tPPNGiq.js`).then(e=>e.n)),VueUiTreemap:h(()=>import(`./vue-ui-treemap-D3mZkT4P.js`).then(e=>e.n)),VueUiVerticalBar:h(()=>import(`./vue-ui-horizontal-bar-CVP5jBNJ.js`).then(e=>e.n)),VueUiHorizontalBar:h(()=>import(`./vue-ui-horizontal-bar-CVP5jBNJ.js`).then(e=>e.n)),VueUiWaffle:h(()=>import(`./vue-ui-waffle-D2GfM_Se.js`).then(e=>e.n)),VueUiWheel:h(()=>import(`./vue-ui-wheel-CYBaqHm6.js`).then(e=>e.n)),VueUiWordCloud:h(()=>import(`./vue-ui-word-cloud-ClGL6iKL.js`).then(e=>e.n)),VueUiXy:h(()=>import(`./vue-ui-xy-2VCMSzeE.js`).then(e=>e.n)),VueUiXyCanvas:h(()=>import(`./vue-ui-xy-canvas-CRSisgSA.js`).then(e=>e.n)),VueUiCarouselTable:h(()=>import(`./vue-ui-carousel-table-DwsfnL_l.js`).then(e=>e.n)),VueUiGizmo:h(()=>import(`./vue-ui-gizmo-C9ls2b4h.js`).then(e=>e.n)),VueUiStackbar:h(()=>import(`./vue-ui-stackbar-BVmQJn2b.js`).then(e=>e.n)),VueUiStackline:h(()=>import(`./vue-ui-stackline-nvhui30B.js`).then(e=>e.n)),VueUiBullet:h(()=>import(`./vue-ui-bullet-CxyL5Bdm.js`).then(e=>e.n)),VueUiFunnel:h(()=>import(`./vue-ui-funnel-DqoQogQE.js`).then(e=>e.n)),VueUiHistoryPlot:h(()=>import(`./vue-ui-history-plot-CowxWkEd.js`).then(e=>e.n)),VueUiCirclePack:h(()=>import(`./vue-ui-circle-pack-BcA9ZxZS.js`).then(e=>e.n)),VueUiWorld:h(()=>import(`./vue-ui-world-Dm7LSNB2.js`).then(e=>e.n)),VueUiChord:h(()=>import(`./vue-ui-chord-DRNn_E6i.js`).then(e=>e.n)),VueUiRidgeline:h(()=>import(`./vue-ui-ridgeline-B4qi2Ajl.js`).then(e=>e.n)),VueUiDag:h(()=>import(`./vue-ui-dag-CWpyU7AJ.js`).then(e=>e.n))},{vue_ui_dashboard:ve}=re(),ye=x(null),be=x(null),A=x(null),j=e,M=l(()=>o({userConfig:j.config,defaultConfig:ve}));te({config:()=>M.value,dataset:()=>j.dataset,component:`VueUiDashboard`,rules:[ne.noHint]});let N=l(()=>M.value.userOptions.useCursorPointer),P=x(ie()),F=x(M.value.locked);function xe(){F.value=!F.value}T(()=>j.config,()=>{F.value=M.value.locked,ze.value=!M.value.userOptions.showOnChartHover});function I(){return j.dataset.map((e,t)=>({...e,index:t}))}let L=x(I());T(()=>j.dataset,()=>{L.value=I()});let R=l(()=>L.value.map(e=>({...e,resolvedComponent:typeof e.component==`string`?k[e.component]:e.component}))),z=x(null),B=x(null),V=x({x:0,y:0}),H=x({x:0,y:0}),U=x(null),W=x(!1),G=x(null),K=x(!1);function q(e){let t=e.target;(t.tagName===`INPUT`&&t.type===`range`||t.classList.contains(`range-handle`))&&(K.value=!0)}function J(e){let t=e.target;t.tagName===`INPUT`&&t.type===`range`&&(K.value=!1)}let{isPrinting:Se,isImaging:Ce,generatePdf:we,generateImage:Te}=ae({elementId:`vue-ui-dashboard_${P.value}`,fileName:M.value.userOptions.print.filename||`dashboard`,options:{...M.value.userOptions.print,aspectRatio:M.value.style.board.aspectRatio}});function Ee(e){if(!F.value&&(W.value=!0,G.value=e,B.value===null)){z.value=e,V.value={x:event.clientX,y:event.clientY};let t=L.value[e],n=100-t.width,r=100-t.height;t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left>n&&(t.left=n),t.top>r&&(t.top=r),t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left+t.width>100&&(t.left=100-t.width),t.top+t.height>100&&(t.top=100-t.height)}}function Y(e,t){W.value=!0,G.value=e,B.value={index:e,direction:t};let n=L.value[e];H.value={x:event.clientX,y:event.clientY,initialWidth:n.width,initialHeight:n.height}}function De(e,t,n){if(B.value.direction.includes(`top`)){let t=e.height-n/U.value.offsetHeight*100;t>=O&&(e.top+=n/U.value.offsetHeight*100,e.height=t)}if(B.value.direction.includes(`bottom`)){let t=e.height+n/U.value.offsetHeight*100;t>=O&&(e.height=t)}if(B.value.direction.includes(`left`)){let n=e.width-t/U.value.offsetWidth*100;n>=O&&(e.left+=t/U.value.offsetWidth*100,e.width=n)}if(B.value.direction.includes(`right`)){let n=e.width+t/U.value.offsetWidth*100;n>=O&&(e.width=n)}}function Oe(e){if(!(F.value||K.value)){if(W.value=!0,z.value!==null){let t=L.value[z.value],n=e.clientX-V.value.x,r=e.clientY-V.value.y,i=t.left+n/U.value.offsetWidth*100,a=t.top+r/U.value.offsetHeight*100;i>=0&&a>=0&&i+t.width<=100&&a+t.height<=100&&(t.left=i,t.top=a),V.value={x:e.clientX,y:e.clientY}}if(B.value!==null){let t=L.value[B.value.index];De(t,e.clientX-H.value.x,e.clientY-H.value.y),H.value={x:e.clientX,y:e.clientY}}}}let ke=D;T(L,e=>{e&&!W.value&&ke(`change`,L.value)},{deep:!0});function Ae(){z.value=null,B.value=null,W.value=!1,G.value=null,L.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}function je(e){F.value||K.value||(W.value=!0,G.value=e,B.value===null&&(z.value=e,V.value={x:event.touches[0].clientX,y:event.touches[0].clientY}))}function X(e,t,n){if(W.value=!0,G.value=e,B.value===null){B.value={index:e,direction:t};let r=L.value[e];H.value={x:n.touches[0].clientX,y:n.touches[0].clientY,initialWidth:r.width,initialHeight:r.height}}}function Z(e){if(W.value=!0,e.preventDefault(),B.value!==null){let t=L.value[B.value.index];De(t,e.touches[0].clientX-H.value.x,e.touches[0].clientY-H.value.y),H.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function Me(e){if(!(F.value||K.value)&&(W.value=!0,e.preventDefault(),z.value!==null)){let t=L.value[z.value],n=e.touches[0].clientX-V.value.x,r=e.touches[0].clientY-V.value.y,i=t.left+n/U.value.offsetWidth*100,a=t.top+r/U.value.offsetHeight*100;i>=0&&a>=0&&i+t.width<=100&&a+t.height<=100&&(t.left=i,t.top=a),V.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function Q(){W.value=!1,G.value=null,z.value=null,B.value=null,L.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}let Ne=l(()=>M.value.style.item.borderColor),Pe=l(()=>M.value.style.resizeHandles.backgroundColor),Fe=l(()=>M.value.style.board.aspectRatio),Ie=l(()=>M.value.style.board.backgroundColor),Le=l(()=>M.value.style.board.border);function Re(){return L.value}let{userOptionsVisible:ze,setUserOptionsVisibility:Be,keepUserOptionState:Ve}=se({config:M.value}),$=x(!1);function He(){$.value=!$.value}function Ue(){Be(!0)}function We(){Be(!1)}async function Ge(){ke(`copyAlt`,{config:M.value,dataset:R.value}),M.value.userOptions.callbacks.altCopy?await Promise.resolve(M.value.userOptions.callbacks.altCopy({config:M.value,dataset:R.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}return s({generatePdf:we,getItemsPositions:Re,toggleLock:xe,copyAlt:Ge}),(e,o)=>(b(),f(`div`,{id:`vue-ui-dashboard_${P.value}`,onMousedown:q,onMouseup:J,onTouchstart:q,onTouchend:J,onMouseenter:Ue,onMouseleave:We,ref_key:`dashboardRef`,ref:ye,style:{position:`relative`},class:`vue-data-ui-component`},[p(`div`,{class:`vue-ui-dashboard-container`,ref_key:`dashboardContainer`,ref:U,style:y(`outline:${Le.value}; background:${Ie.value}; aspect-ratio:${Fe.value};${$.value?`pointer-events:none`:``}`)},[p(`div`,{class:`vue-ui-dashboard-grid-container`,ref:`container`,onMousemove:Oe,onMouseup:Ae,onTouchmove:Me,onTouchend:Q,style:y(`background:${M.value.style.board.backgroundColor}`)},[o[4]||=p(`div`,{class:`vue-ui-dashboard-grid`},null,-1),(b(!0),f(c,null,S(R.value,(t,n)=>(b(),f(`div`,{key:t.id,class:le({"vue-ui-dashboard-grid-item":!0,"vue-ui-dashboard-grid-item--locked":F.value}),style:y({width:`${t.width}%`,height:`${t.height}%`,left:`${t.left}%`,top:`${t.top}%`,cursor:`move`,boxShadow:G.value===n?`0 6px 12px -3px rgba(0,0,0,0.3)`:``,zIndex:G.value===n?R.value.length+1:t.index,backgroundColor:M.value.style.item.backgroundColor}),onMousedown:e=>Ee(n),onTouchstart:e=>je(n,t)},[F.value?d(``,!0):(b(),f(c,{key:0},[p(`div`,{class:`vue-ui-dashboard-resize-handle vue-ui-dashboard-top-left`,onMousedown:e=>Y(n,`top-left`),onTouchstart:e=>X(n,`top-left`,e),onTouchmove:o[0]||=e=>Z(e),onTouchend:Q},null,40,me),p(`div`,{class:`vue-ui-dashboard-resize-handle vue-ui-dashboard-top-right`,onMousedown:e=>Y(n,`top-right`),onTouchstart:e=>X(n,`top-right`,e),onTouchmove:o[1]||=e=>Z(e),onTouchend:Q},null,40,he),p(`div`,{class:`vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-left`,onMousedown:e=>Y(n,`bottom-left`),onTouchstart:e=>X(n,`bottom-left`,e),onTouchmove:o[2]||=e=>Z(e),onTouchend:Q},null,40,ge),p(`div`,{class:`vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-right`,onMousedown:e=>Y(n,`bottom-right`),onTouchstart:e=>X(n,`bottom-right`,e),onTouchmove:o[3]||=e=>Z(e),onTouchend:Q},null,40,_e)],64)),C(e.$slots,`top`,{item:t,index:n},void 0,!0),t.resolvedComponent?(b(),u(ue(t.resolvedComponent),_({key:1,ref_for:!0},t.props),null,16)):C(e.$slots,`content`,{item:t,index:n,left:t.left,top:t.top,height:t.height,width:t.width},void 0,!0,2),C(e.$slots,`bottom`,{item:t,index:n},void 0,!0)],46,pe))),128))],36)],4),(b(),f(`svg`,{style:y({width:`100%`,height:`100%`,pointerEvents:`none`,position:`absolute`,top:0,left:0,zIndex:R.value.length+1}),ref_key:`svgRef`,ref:A},null,4)),M.value.userOptions.buttons.annotator&&U.value&&A.value?(b(),u(ce,_({key:0},w(a)(M.value.userOptions.annotator),{color:M.value.style.board.color,backgroundColor:M.value.style.board.backgroundColor,active:$.value,svgRef:A.value,isCursorPointer:N.value,onClose:He,style:{zIndex:R.value.length+1},palette:M.value.userOptions.annotatorPalette}),m({_:2},[S(w(ee),t=>({name:t,fn:E(n=>[C(e.$slots,t,v(g(w(i)(t,n))),void 0,!0)])}))]),1040,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`,`style`,`palette`])):d(``,!0),(M.value.allowPrint||M.value.userOptions.show)&&(M.value.userOptions.buttons.pdf||M.value.userOptions.buttons.img)?(b(),u(oe,_({key:1,ref_key:`userOptionsRef`,ref:be,backgroundColor:M.value.style.board.backgroundColor,color:M.value.style.board.color,isPrinting:w(Se),isImaging:w(Ce),uid:P.value},w(n)(M.value.userOptions,`pdf img altCopy annotator`),{hasTooltip:!1,hasXls:!1,hasTable:!1,hasLabel:!1,hasFullscreen:!1,chartElement:U.value,isAnnotation:$.value,isCursorPointer:N.value,onGeneratePdf:w(we),onGenerateImage:w(Te),onToggleAnnotator:He,onCopyAlt:Ge,style:{visibility:w(Ve)?w(ze)?`visible`:`hidden`:`visible`,zIndex:R.value.length+1}}),m({_:2},[S(w(t)(e.$slots,`menuIcon optionPdf optionImg optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:E(n=>[C(e.$slots,t,v(g(w(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`chartElement`,`isAnnotation`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`style`])):d(``,!0)],40,fe))}},[[`__scopeId`,`data-v-3d46da93`]]);export{D as n,k as t};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useNestedProp-DnGoh-XS.js";import{X as n,t as r}from"./lib-rPeBMZrn.js";import{n as i,t as a}from"./useHints-C-TwxM0Y.js";import{t as o}from"./useConfig-_JwRfIqE.js";import{n as s}from"./PackageVersion-PdpqwkYX.js";import{t as c}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createVNode as h,normalizeStyle as g,openBlock as _,ref as v,renderList as y,toDisplayString as b,unref as x}from"vue";var S={key:0},C=[`d`,`fill`],w=[`d`,`fill`],T=[`d`,`fill`],E=[`d`,`fill`],D=[`d`,`fill`],O=[`d`,`fill`],k=[`d`,`fill`],A={key:1},j=[`cx`,`cy`,`r`,`fill`],M={__name:`Digit`,props:{quanta:{type:String,default:null},backgroundColor:{type:String,default:`#e1e5e8`},color:{type:String,default:`#000000`},x:{type:Number,default:0},y:{type:Number,default:0},thickness:{type:Number,default:1}},setup(e){let t=e,n=v({0:`1111110`,1:`0110000`,2:`1101101`,3:`1111001`,4:`0110011`,5:`1011011`,6:`1011111`,7:`1110000`,8:`1111111`,9:`1111011`,"-":`0000001`,X:`0000000`}),r=u(()=>2*(t.thickness||1)),i=u(()=>[void 0,null].includes(t.quanta)?n.value.X:n.value[t.quanta]);return(t,n)=>(_(),p(l,null,[[void 0,null,`.`].includes(e.quanta)?f(``,!0):(_(),p(`g`,S,[m(`path`,{d:`M ${e.x} ${e.y}
|
|
2
|
-
L ${e.x+r.value} ${e.y-r.value}
|
|
3
|
-
L ${e.x+26-r.value} ${e.y-r.value}
|
|
4
|
-
L ${e.x+26} ${e.y}
|
|
5
|
-
L ${e.x+26-r.value} ${e.y+r.value}
|
|
6
|
-
L ${e.x+r.value} ${e.y+r.value} Z`,fill:i.value[0]==1?e.color:e.backgroundColor,stroke:`none`},null,8,C),m(`path`,{d:`M ${e.x+28-r.value} ${e.y+28-r.value}
|
|
7
|
-
L ${e.x+28-r.value} ${e.y+2+r.value}
|
|
8
|
-
L ${e.x+28} ${e.y+2}
|
|
9
|
-
L ${e.x+28+r.value} ${e.y+2+r.value}
|
|
10
|
-
L ${e.x+28+r.value} ${e.y+28-r.value}
|
|
11
|
-
L ${e.x+28} ${e.y+28}
|
|
12
|
-
L ${e.x+28-r.value} ${e.y+28-r.value}`,fill:i.value[1]==1?e.color:e.backgroundColor,stroke:`none`},null,8,w),m(`path`,{d:`M ${e.x+28-r.value} ${e.y+58-r.value}
|
|
13
|
-
L ${e.x+28-r.value} ${e.y+32+r.value}
|
|
14
|
-
L ${e.x+28} ${e.y+32}
|
|
15
|
-
L ${e.x+28+r.value} ${e.y+32+r.value}
|
|
16
|
-
L ${e.x+28+r.value} ${e.y+58-r.value}
|
|
17
|
-
L ${e.x+28} ${e.y+58}
|
|
18
|
-
L ${e.x+28-r.value} ${e.y+58-r.value}`,fill:i.value[2]==1?e.color:e.backgroundColor,stroke:`none`},null,8,T),m(`path`,{d:`M ${e.x+r.value} ${e.y+60-r.value}
|
|
19
|
-
L ${e.x} ${e.y+60}
|
|
20
|
-
L ${e.x+r.value} ${e.y+60+r.value}
|
|
21
|
-
L ${e.x+26-r.value} ${e.y+60+r.value}
|
|
22
|
-
L ${e.x+26} ${e.y+60}
|
|
23
|
-
L ${e.x+26-r.value} ${e.y+60-r.value}
|
|
24
|
-
L ${e.x+r.value} ${e.y+60-r.value}`,fill:i.value[3]==1?e.color:e.backgroundColor,stroke:`none`},null,8,E),m(`path`,{d:`M ${e.x-2+r.value} ${e.y+58-r.value}
|
|
25
|
-
L ${e.x-2+r.value} ${e.y+32+r.value}
|
|
26
|
-
L ${e.x-2} ${e.y+32}
|
|
27
|
-
L ${e.x-2-r.value} ${e.y+32+r.value}
|
|
28
|
-
L ${e.x-2-r.value} ${e.y+58-r.value}
|
|
29
|
-
L ${e.x-2} ${e.y+58}
|
|
30
|
-
L ${e.x-2+r.value} ${e.y+58-r.value}`,fill:i.value[4]==1?e.color:e.backgroundColor,stroke:`none`},null,8,D),m(`path`,{d:`M ${e.x-2+r.value} ${e.y+28-r.value}
|
|
31
|
-
L ${e.x-2+r.value} ${e.y+2+r.value}
|
|
32
|
-
L ${e.x-2} ${e.y+2}
|
|
33
|
-
L ${e.x-2-r.value} ${e.y+2+r.value}
|
|
34
|
-
L ${e.x-2-r.value} ${e.y+28-r.value}
|
|
35
|
-
L ${e.x-2} ${e.y+28}
|
|
36
|
-
L ${e.x-2+r.value} ${e.y+28-r.value}`,fill:i.value[5]==1?e.color:e.backgroundColor,stroke:`none`},null,8,O),m(`path`,{d:`M ${e.x+r.value} ${e.y+30-r.value}
|
|
37
|
-
L ${e.x} ${e.y+30}
|
|
38
|
-
L ${e.x+r.value} ${e.y+30+r.value}
|
|
39
|
-
L ${e.x+26-r.value} ${e.y+30+r.value}
|
|
40
|
-
L ${e.x+26} ${e.y+30}
|
|
41
|
-
L ${e.x+26-r.value} ${e.y+30-r.value}
|
|
42
|
-
L ${e.x+r.value} ${e.y+30-r.value}`,fill:i.value[6]==1?e.color:e.backgroundColor,stroke:`none`},null,8,k)])),e.quanta==`.`?(_(),p(`g`,A,[m(`circle`,{cx:e.x-8,cy:e.y+60,r:2+r.value/2,fill:e.color},null,8,j)])):f(``,!0)],64))}},N=/* @__PURE__ */ e({default:()=>I}),P=[`id`],F=[`xmlns`,`viewBox`,`aria-describedby`],I=/*#__PURE__*/ c({__name:`vue-ui-digits`,props:{dataset:{type:Number,default:0},config:{type:Object,default(){return{}}}},setup(e){let{vue_ui_digits:c}=o(),f=e,v=u(()=>t({userConfig:f.config,defaultConfig:c}));i({config:()=>v.value,dataset:()=>f.dataset,component:`VueUiDigits`,rules:[a.noHint]});let S=u(()=>{let e=(f.dataset||0).toString().split(``),t=[],n={x:10,y:10},r=0;for(let i=0;i<e.length;i+=1){let a=e[i];t.push({x:n.x+r,y:n.y,quanta:a}),r+=a==`.`?2:44}return t}),C=u(()=>Math.max(...S.value.map(e=>e.x))+36),w=n();return(t,n)=>(_(),p(l,null,[m(`div`,{class:`sr-only`,id:`digit-${x(w)}`},b(e.dataset),9,P),(_(),p(`svg`,{class:`vue-data-ui-component vue-ui-digits`,xmlns:x(r),viewBox:`0 0 ${C.value} 80`,style:g(`background:${v.value.backgroundColor};${v.value.height?`height:${v.value.height};`:``}${v.value.width?`width:${v.value.width}`:``}`),"aria-describedby":`digit-${x(w)}`},[h(s),(_(!0),p(l,null,y(S.value,e=>(_(),d(M,{x:e.x,y:e.y,quanta:e.quanta,color:v.value.digits.color,backgroundColor:v.value.digits.skeletonColor,thickness:v.value.digits.thickness},null,8,[`x`,`y`,`quanta`,`color`,`backgroundColor`,`thickness`]))),256))],12,F))],64))}},[[`__scopeId`,`data-v-63bfbc12`]]);export{N as n,I as t};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s,t as c}from"./tableIntegration-CNoJ1CIY.js";import{t as l}from"./chartImage-DPGnEuYM.js";import{$ as u,Bt as d,D as ee,Dt as te,Ht as f,It as ne,Jt as re,S as p,X as ie,Y as ae,Yt as oe,Zt as se,at as ce,b as le,dt as ue,f as m,h as de,i as h,in as fe,it as pe,j as me,nn as he,nt as ge,p as g,s as _e,t as ve,ut as ye,w as be,yt as xe,zt as Se}from"./lib-rPeBMZrn.js";import{n as Ce,t as we}from"./labelUtils-CdtU-yB_.js";import{c as Te}from"./canvas-lib-22VpOI4_.js";import{n as Ee,t as De}from"./useHints-C-TwxM0Y.js";import{t as Oe}from"./useConfig-_JwRfIqE.js";import{t as ke}from"./usePrinter-DVf3YcG5.js";import{n as Ae,t as je}from"./BaseScanner-8NdoBs7B.js";import{t as Me}from"./useResponsive-CENUxfEL.js";import{t as Ne}from"./useNestedProp-DnGoh-XS.js";import{t as Pe}from"./useThemeCheck-BKNRbGeC.js";import{t as Fe}from"./useChartExport-BZts4KFb.js";import{t as Ie}from"./useUserOptionState-CXlFnwPv.js";import{t as Le}from"./useChartAccessibility-DOMuYJfm.js";import{t as Re}from"./Shape-CRe8woTu.js";import{n as ze}from"./Title-BliHuXfT.js";import{t as Be}from"./vue_ui_donut-B2W2nyAS.js";import{t as Ve}from"./Legend-W9YVYVX-.js";import{t as He}from"./A11yDataTable-DWNlWXzs.js";import{t as Ue}from"./BaseLegendToggle-VzX69MCo.js";import{t as We}from"./DefGrad-DKMq1REY.js";import{t as Ge}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as _,Teleport as Ke,computed as v,createBlock as y,createCommentVNode as b,createElementBlock as x,createElementVNode as S,createSlots as qe,createTextVNode as Je,createVNode as Ye,defineAsyncComponent as Xe,guardReactiveProps as Ze,mergeProps as Qe,nextTick as $e,normalizeClass as et,normalizeProps as tt,normalizeStyle as C,onBeforeUnmount as nt,onMounted as rt,openBlock as w,ref as T,renderList as E,renderSlot as D,resolveDynamicComponent as it,shallowRef as at,toDisplayString as O,toRefs as ot,unref as k,useSlots as st,vShow as ct,watch as lt,withCtx as A,withDirectives as ut}from"vue";function dt(e){let{FINAL_CONFIG:t,noGhostDonut:n,svg:r,padding:i,labels_inline_fontSize:a,minSize:o,findArcMidpoint:s,calcMarkerOffsetX:c,calcMarkerOffsetY:l,animatingIndex:u,segregated:d,isSmallArc:ee}=e;return{smallArcLayoutsClassic:v(()=>{if(t.value.type!==`classic`)return{};let e={},te=n.value||[];if(!te.length)return e;let f=r.value.width/2,ne=r.value.height/2,re=i.value.top+16,p=r.value.height-i.value.bottom-16,ie=a.value,ae=ie/3,oe=ie*1.5,se=f-(o.value+6),ce=f+(o.value+6),le=!!t.value.style.chart.layout.curvedMarkers;function ue({midX:e,midY:t,bandX:n,bandY:r}){if(!le)return`M ${e} ${t} L ${e} ${r} L ${n} ${r}`;let i=n<f?-1:1,a=n-e,o=r-t,s=Math.sqrt(a*a+o*o)||1,c=e-f,l=t-ne,u=Math.sqrt(c*c+l*l)||1,d=c/u,ee=l/u,te=u+9;function re({x:e,y:t}){let n=e-f,r=t-ne,i=Math.sqrt(n*n+r*r)||1;if(i>=te)return{x:e,y:t};let a=te/i;return{x:f+n*a,y:ne+r*a}}if(s<56){let i=a/s,c=-(o/s),l=i,u=(e+n)*.5,te=(t+r)*.5,p=u+c,ie=te+l,ae=(p-f)*(p-f)+(ie-ne)*(ie-ne),oe=u-c,se=te-l;(oe-f)*(oe-f)+(se-ne)*(se-ne)>ae&&(c=-c,l=-l);let ce=.78,le=e+a*ce,ue=t+o*ce,m=Math.max(0,Math.min(1,(s-18)/44)),de=m*m*(3-2*m),h=2.5+de*4,fe=1+de*2.5;h*=.9;let pe=re({x:le+c*h+d*fe,y:ue+l*h+ee*fe});return`M ${e} ${t} Q ${pe.x} ${pe.y} ${n} ${r}`}let p=s*.34;p<20&&(p=20),p>46&&(p=46);let ie=s*.46;ie<22&&(ie=22),ie>70&&(ie=70);let ae={x:e+d*p,y:t+ee*p},oe=f+i*Math.max(Math.abs(n-f),te),se={x:n-i*Math.min(ie,Math.abs(oe-n)*.75),y:r},ce=re(ae),ue=re(se);return`M ${e} ${t} C ${ce.x} ${ce.y} ${ue.x} ${ue.y} ${n} ${r}`}function m(e){let t=String(e??``).split(/\n/g),n=Math.max(0,t.length-1)*(ie*1.2);return oe+n}function de({arc:e,index:t}){let{x:n,y:r}=s(e.path);return{arc:e,index:t,midX:n,midY:r,inlineMarkerX:c(e).x,inlineMarkerY:l(e)-3.5,labelHeight:m(e.name)}}function h(e){let{arc:t}=e,n=t.seriesIndex??0;return u.value===n||d.value.includes(n)?!1:ee(t,n)}function fe(e){let t=e.inlineMarkerY<ne,n=e.inlineMarkerX<f;return t&&n?`TL`:t&&!n?`TR`:!t&&n?`BL`:`BR`}function pe(e,t){t.startsWith(`T`)?e.sort((e,t)=>e.inlineMarkerY-t.inlineMarkerY||e.index-t.index):e.sort((e,t)=>t.inlineMarkerY-e.inlineMarkerY||e.index-t.index)}function me({side:e,markerX:t,markerY:n,labelY:r,connectorPath:i}){return{side:e,labelX:e===`left`?t-8:t+8,labelY:r+ae,textAnchor:e===`left`?`end`:`start`,markerX:t,markerY:n,connectorPath:i}}function he({candidateList:t,side:n,bandMarkerX:r,startY:i,direction:a}){let o=i;t.forEach(t=>{let{index:i,midX:s,midY:c,labelHeight:l}=t,u;a===`down`?(u=o,o+=l):(o-=l,u=o);let d=u,ee=ue({midX:s,midY:c,bandX:r,bandY:d});e[i]=me({side:n,markerX:r,markerY:d,labelY:u,connectorPath:ee})})}let ge=te.map((e,t)=>de({arc:e,index:t})).filter(h),g={TL:[],TR:[],BL:[],BR:[]};return ge.forEach(e=>{g[fe(e)].push(e)}),Object.keys(g).forEach(e=>{pe(g[e],e)}),he({candidateList:g.TL,side:`left`,bandMarkerX:se,startY:re,direction:`down`}),he({candidateList:g.TR,side:`right`,bandMarkerX:ce,startY:re,direction:`down`}),g.BL.length>1&&he({candidateList:g.BL,side:`left`,bandMarkerX:se,startY:p,direction:`up`}),g.BR.length>1&&he({candidateList:g.BR,side:`right`,bandMarkerX:ce,startY:p,direction:`up`}),e})}}var ft=/* @__PURE__ */ e({default:()=>Dn}),pt=[`id`],mt=[`id`],ht=[`id`],gt={style:{position:`relative`}},_t=[`xmlns`,`aria-describedby`,`viewBox`],vt=[`width`,`height`],yt={key:1},bt={key:2},xt=[`id`],St=[`id`],Ct=[`id`],wt=[`flood-color`],Tt=[`id`],Et=[`flood-color`],Dt=[`d`,`stroke`,`filter`],Ot=[`d`,`stroke`,`filter`],kt=[`cx`,`cy`,`r`,`fill`,`filter`],At={key:6},jt=[`stroke`,`d`],Mt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Nt={key:0},Pt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Ft={key:0},It=[`stroke`,`d`],Lt={key:0},Rt=[`d`,`stroke`,`stroke-width`,`filter`],zt={key:1},Bt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Vt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Ht={key:1},Ut=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Wt=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Gt={key:0},Kt=[`d`,`fill`,`stroke`,`stroke-width`],qt=[`cx`,`cy`,`r`,`stroke`],Jt=[`cx`,`cy`,`r`,`fill`],Yt=[`cx`,`cy`,`r`],Xt={key:0},Zt=[`d`,`stroke`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],Qt={key:1},$t=[`cx`,`cy`,`r`],en=[`x`,`y`,`fill`,`font-size`],tn=[`x`,`y`,`fill`,`font-size`],nn=[`x`,`y`,`fill`,`font-size`],rn=[`x`,`y`,`fill`,`font-size`],an=[`filter`,`opacity`],on={key:0},sn=[`x`,`y`],cn={key:1},ln=[`cx`,`cy`,`fill`,`stroke`,`filter`,`onClick`,`onMouseenter`,`onMouseleave`],un=[`text-anchor`,`x`,`y`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],dn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`],fn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],pn=[`cx`,`cy`,`fill`,`stroke`,`filter`,`onClick`,`onMouseenter`,`onMouseleave`],mn=[`text-anchor`,`x`,`y`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],hn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`],gn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],_n={key:2},vn=[`x`,`y`,`width`],yn=[`x`,`y`,`width`],bn={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},xn={key:5,class:`vue-data-ui-watermark`},Sn=[`id`],Cn=[`onClick`],wn={key:8,class:`vue-ui-donut-hollow`},Tn={key:0},En={key:1},Dn=/*#__PURE__*/ Ge({__name:`vue-ui-donut`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:Ge,emit:ft}){let Dn=Xe(()=>import(`./Tooltip-C1q0Qoh7.js`)),On=Xe(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),kn=Xe(()=>import(`./vue-ui-accordion-DxGxf-Rm.js`).then(e=>e.n)),An=Xe(()=>import(`./DataTable-KeuZB1JM.js`)),jn=Xe(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Mn=Xe(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Nn=Xe(()=>import(`./PackageVersion-PdpqwkYX.js`).then(e=>e.t)),Pn=Xe(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_donut:Fn}=Oe(),{isThemeValid:In,warnInvalidTheme:Ln}=Pe(),Rn=st(),j=e,zn=v({get(){return!!j.dataset&&j.dataset.length},set(e){return e}}),Bn=at(null),Vn=T(null),Hn=T(null),Un=T(null),Wn=at(null),Gn=at(null),Kn=at(null),qn=at(null),Jn=at(null),Yn=at(null),Xn=T(0),Zn=T(0),Qn=T(0),$n=T(!1),er=T(null),tr=T(null),nr=T(null),rr=T({x:0,y:0}),ir=T(`pointer`),ar=T(!1),or=v({get:()=>F.value.style.chart.layout.labels.percentage.fontSize,set:e=>e}),M=v({get:()=>F.value.style.chart.layout.labels.name.fontSize,set:e=>e}),sr=v({get:()=>F.value.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,set:e=>e}),cr=!1,lr=()=>{F.value.autoSize&&!cr&&(cr=!0,requestAnimationFrame(()=>{cr=!1;let e=F.value,t=Vn.value,n=B.value;if(!e.autoSize||!t||!n)return;let[r,i,a,o]=n.getAttribute(`viewBox`).split(` `).map(Number),s={x:r,y:i,width:a,height:o},c=[{selector:`.vue-data-ui-datalabel-value`,baseSize:I.value.percentage.fontSize,minSize:I.value.percentage.minFontSize,sizeRef:or},{selector:`.vue-data-ui-datalabel-name`,baseSize:I.value.name.fontSize,minSize:I.value.name.minFontSize,sizeRef:M},{selector:`.vue-data-ui-datalabel-inline`,baseSize:I.value.dataLabels.smallArcClusterFontSize,minSize:I.value.name.minFontSize,sizeRef:sr}];c.map(e=>t.querySelectorAll(e.selector).length).reduce((e,t)=>e+t,0)!==0&&c.forEach(({selector:e,baseSize:n,minSize:r,sizeRef:i})=>{t.querySelectorAll(e).forEach(e=>{i.value=_e({el:e,bounds:s,currentFontSize:n,minFontSize:r,attempts:200,padding:1})})})}))};rt(async()=>{$n.value=!0,fr(),requestAnimationFrame(lr)});let ur;rt(()=>{Bn.value&&(ur=new ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;if(e>0&&n>0){lr();break}}}),ur.observe(Bn.value.parentElement))}),nt(()=>{ur?.disconnect()}),nt(()=>{Kn.value&&(qn.value&&Kn.value.unobserve(qn.value),Kn.value.disconnect())});let dr=v(()=>F.value.debug);function fr(){if(Se(j.dataset)?(ce({componentName:`VueUiDonut`,type:`dataset`,debug:dr.value}),zn.value=!1,Sr.value=!0):(j.dataset.forEach((e,t)=>{xe({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{ce({componentName:`VueUiDonut`,type:`datasetSerieAttribute`,property:e,index:t,debug:dr.value}),zn.value=!1,Sr.value=!0})}),dr.value&&j.dataset.forEach((e,t)=>{e.name&&e.name!==``||ce({componentName:`VueUiDonut`,type:`datasetAttributeEmpty`,property:`name`,index:t})})),Se(j.dataset)||(Sr.value=F.value.loading),F.value.responsive){let e=Te(()=>{let{width:e,height:t}=Me({chart:Bn.value,title:F.value.style.chart.title.text?Wn.value:null,legend:F.value.style.chart.legend.show?Gn.value:null,source:Jn.value,noTitle:Yn.value,padding:F.value.autoSize?void 0:Pr.value});requestAnimationFrame(()=>{H.value.width=e,H.value.height=t,lr()})});Kn.value&&(qn.value&&Kn.value.unobserve(qn.value),Kn.value.disconnect()),Kn.value=new ResizeObserver(e),qn.value=Bn.value.parentNode,Kn.value.observe(qn.value)}}let N=T(ie()),pr=T(!1),mr=T(``),P=T(null),hr=T(0);function gr(){let e=Ne({userConfig:j.config,defaultConfig:Fn}),t={},n=e.theme;if(!n)t=e;else if(!In.value(e))Ln(e),t=e;else{let r=Ne({userConfig:Be[n]||j.config,defaultConfig:e});t={...Ne({userConfig:j.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:he[n]||f}}return t}let F=T(gr()),I=v(()=>F.value.style.chart.layout.labels),L=v(()=>F.value.style.chart.layout.donut),_r=v(()=>F.value.style.chart.layout),R=v(()=>F.value.style.chart);Ee({config:()=>F.value,dataset:()=>j.dataset,component:`VueUiDonut`,rules:[De.singleSeries,De.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series is > 6. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]}]});let vr=v(()=>F.value.userOptions.useCursorPointer),yr=v(()=>fe({defaultConfig:{useCssAnimation:!1,table:{show:!1},startAnimation:{show:!1},userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{labels:{dataLabels:{show:!1},hollow:{average:{show:!1},total:{show:!1}},value:{show:!1}}},legend:{backgroundColor:`transparent`,showValue:!1,showPercentage:!1},title:{color:`#1A1A1A`,subtitle:{color:`#5A5A5A`}}}}},userConfig:F.value.skeletonConfig??{}})),{loading:br,FINAL_DATASET:xr,manualLoading:Sr,skeletonDataset:Cr}=Ae({...ot(j),FINAL_CONFIG:F,prepareConfig:gr,skeletonDataset:j.config?.skeletonDataset??[{name:``,values:[3],color:`#BABABA`},{name:``,values:[2],color:`#AAAAAA`},{name:``,values:[1],color:`#CACACA`}],skeletonConfig:fe({defaultConfig:F.value,userConfig:yr.value})}),z=T(!0),wr=T(0),Tr=T(!1),Er=null;function Dr(e=1e3){return new Promise(t=>{let n=performance.now();function r(i){let a=i-n,o=Math.min(a/e,1),s=pe(o);wr.value=s,o<1?Er=requestAnimationFrame(r):(wr.value=1,Er=null,t())}Er!==null&&cancelAnimationFrame(Er),wr.value=0,Er=requestAnimationFrame(r)})}lt(()=>br.value,async e=>{if(e||Tr.value)return;let t=xr.value===Cr,n=F.value.startAnimation?.show;!t&&n?(Tr.value=!0,await Dr(F.value.startAnimation.durationMs||1e3)):wr.value=1,z.value=!1},{immediate:!0});let{userOptionsVisible:Or,setUserOptionsVisibility:kr,keepUserOptionState:Ar}=Ie({config:F.value}),{svgRef:B}=Le({config:R.value.title});function jr(){kr(!0)}function Mr(){kr(!1)}let Nr=se(j.config);lt(()=>j.config,(e,t)=>{let n=se(e),r=n!==Nr;Nr=n;let i=gr();r?(br.value||(F.value=i),Or.value=!F.value.userOptions.showOnChartHover,fr(),Xn.value+=1,Zn.value+=1,Qn.value+=1,V.value.dataLabels.show=I.value.dataLabels.show,V.value.showTable=F.value.table.show,V.value.showTooltip=R.value.tooltip.show,H.value.height=R.value.height,H.value.width=R.value.width):(F.value.style.chart.tooltip=i.style.chart.tooltip,V.value.showTooltip=F.value.style.chart.tooltip.show)},{deep:!0});let Pr=v(()=>{let{top:e,right:t,bottom:n,left:r}=R.value.padding;return{css:`padding:${e}px ${t}px ${n}px ${r}px`,top:e,right:t,bottom:n,left:r}}),{isPrinting:Fr,isImaging:Ir,generatePdf:Lr,generateImage:Rr}=ke({elementId:`donut__${N.value}`,fileName:R.value.title.text||`vue-ui-donut`,options:F.value.userOptions.print}),zr=v(()=>F.value.userOptions.show&&!R.value.title.text),Br=v(()=>be(F.value.customPalette)),V=T({dataLabels:{show:I.value.dataLabels.show},showTable:F.value.table.show,showTooltip:R.value.tooltip.show});lt(F,()=>{V.value={dataLabels:{show:I.value.dataLabels.show},showTable:F.value.table.show,showTooltip:R.value.tooltip.show}},{immediate:!0});let H=T({height:R.value.height,width:R.value.width}),Vr=v(()=>{if(F.value.pie)return K.value;let e=L.value.strokeWidth/512,t=Math.min(H.value.width,H.value.height)*e,n=t>K.value?K.value:t;return Math.max(n,12*(1+e))}),Hr=ft,U=v(()=>[...xr.value].sort((e,t)=>{if(!F.value.sorted)return 0;let n=Array.isArray(e.values)?e.values.reduce((e,t)=>e+t,0):e.value??0,r=Array.isArray(t.values)?t.values.reduce((e,t)=>e+t,0):t.value??0;return e.ghost&&!t.ghost?1:t.ghost&&!e.ghost?-1:r-n}).map((e,t)=>({name:e.name,color:p(e.color)||Br.value[t]||f[t]||f[t%f.length],value:le(e.values.reduce((e,t)=>e+t,0)),absoluteValues:e.values,comment:e.comment||``,patternIndex:t,seriesIndex:t,ghost:!1,pattern:`pattern_${N.value}_${t}`})));lt(()=>j.dataset,e=>{Array.isArray(e)&&e.length>0&&(Sr.value=!1)},{immediate:!0});let W=at(U.value);lt(()=>U.value,e=>{W.value=e,requestAnimationFrame(lr)});function Ur(){return U.value.map(e=>({name:e.name,color:e.color,value:e.value}))}let G=T([]),Wr=T(!1),Gr=T(null);function Kr(){Hr(`selectLegend`,ei.value.map(e=>({name:e.name,color:e.color,value:e.value})))}function qr({from:e,to:t,duration:n,onUpdate:r,onDone:i,easing:a=pe}){let o=performance.now();function s(c){let l=Math.min((c-o)/n,1),u=a(l);r(e+(t-e)*u,l),l<1?requestAnimationFrame(s):(r(t,1),i&&i())}requestAnimationFrame(s)}function Jr(){G.value.length?G.value=[]:ti.value.forEach((e,t)=>{G.value.push(t)}),Kr()}function Yr(e){let t=U.value.find((t,n)=>n===e),n=W.value.find((t,n)=>n===e).value;if(G.value.includes(e)){G.value=G.value.filter(t=>t!==e);let r=t.value;function i(){W.value=W.value.map((t,n)=>e===n?{...t,value:r}:t),Kr()}function a(){Wr.value=!0,Gr.value=e,qr({from:n,to:r,duration:F.value.serieToggleAnimation.durationMs,onUpdate:(t,n)=>{W.value=W.value.map((n,r)=>e===r?{...n,value:t}:n),requestAnimationFrame(lr)},onDone:()=>{i(),Wr.value=!1,Gr.value=null}})}F.value.serieToggleAnimation.show&&F.value.type===`classic`?a():(i(),requestAnimationFrame(lr))}else if(G.value.length<U.value.length-1){function t(){G.value.push(e),W.value=W.value.map((t,n)=>e===n?{...t,value:0}:t),Kr()}function r(){Wr.value=!0,Gr.value=e,qr({from:n,to:0,duration:F.value.serieToggleAnimation.durationMs,onUpdate:(t,n)=>{W.value=W.value.map((n,r)=>e===r?{...n,value:t}:n),requestAnimationFrame(lr)},onDone:()=>{t(),requestAnimationFrame(lr),Wr.value=!1,Gr.value=null}})}F.value.serieToggleAnimation.show&&F.value.type===`classic`?r():t()}}function Xr(e){return U.value.length?U.value.find(t=>t.name===e)||(dr.value&&console.warn(`VueUiDonut - Series name not found "${e}"`),null):(dr.value&&console.warn(`VueUiDonut - There are no series to show.`),null)}function Zr(e){let t=Xr(e);t!==null&&G.value.includes(t.seriesIndex)&&Yr(t.seriesIndex)}function Qr(e){let t=Xr(e);t!==null&&(G.value.includes(t.seriesIndex)||Yr(t.seriesIndex))}let $r=v(()=>xr.value.reduce((e,t)=>e+t.values.reduce((e,t)=>e+t,0),0)),ei=v(()=>{if(z.value&&!br.value){let e=wr.value,t=U.value.map(t=>({...t,value:t.value*e,color:t.color,ghost:!1})),n=$r.value*(1-e);return n>0&&t.push({name:`__ghost__`,value:n,color:`transparent`,ghost:!0}),t}return W.value.forEach(e=>{if([null,void 0].includes(e.values))return{...e,values:[]}}),W.value.map((e,t)=>({...e,seriesIndex:t})).filter((e,t)=>!G.value.includes(t))}),ti=v(()=>U.value.map(e=>{let t=e.value,n=t/$r.value;return{name:e.name,color:e.color,value:t,shape:`circle`,patternIndex:e.patternIndex,proportion:n}}).map((e,t)=>{let n=h(I.value.value.formatter,e.value,u({p:I.value.dataLabels.prefix,v:e.value,s:I.value.dataLabels.suffix,r:R.value.legend.roundingValue}),{datapoint:e,index:t}),r=h(I.value.percentage.formatter,fi(e),u({v:fi(e),s:`%`,r:R.value.legend.roundingPercentage})),i=ki({val:n,percentage:G.value.includes(t)?`${Oi(e.proportion*100)}%`:r,showVal:R.value.legend.showValue,showPercentage:R.value.legend.showPercentage,config:R.value.legend});return{...e,opacity:G.value.includes(t)?.5:1,segregate:()=>!Wr.value&&Yr(t),isSegregated:G.value.includes(t),display:`${e.name}${R.value.legend.showPercentage||R.value.legend.showValue?`: `:``}${i}`}})),ni=v(()=>({cy:`donut-div-legend`,backgroundColor:R.value.legend.backgroundColor,color:R.value.legend.color,fontSize:R.value.legend.fontSize,paddingBottom:12,fontWeight:R.value.legend.bold?`bold`:``})),K=v(()=>{let e=L.value.radiusRatio,t=Math.max(.1,Math.min(.50001,e)),n=Math.min(H.value.width*t,H.value.height*t);return Math.max(12,n)}),q=v(()=>ne({series:ei.value},H.value.width/2,H.value.height/2,K.value,K.value,1.99999,2,1,360,105.25,Vr.value)),ri=v(()=>Math.abs(ei.value.map(e=>e.value).reduce((e,t)=>e+t,0))>0),ii=v(()=>ne({series:[{value:1,color:L.value.emptyFill,name:`_`,seriesIndex:0,patternIndex:-1,ghost:!1,absoluteValues:[1]}]},H.value.width/2,H.value.height/2,K.value,K.value,1.99999,2,1,360,105.25,Vr.value)),J=v(()=>q.value.filter(e=>!e.ghost)),Y=v(()=>{let e=Math.max(...ei.value.map(e=>e.value)),t=ei.value.map(t=>t.value/e);return me({series:t,center:{x:H.value.width/2,y:H.value.height/2},maxRadius:Math.min(H.value.width,H.value.height)/3,hasGhost:z.value})});function ai(e){return e.x>H.value.width/2+6?`start`:e.x<H.value.width/2-6?`end`:`middle`}function oi(e){return e.middlePoint.y>H.value.height/2?d({initX:e.middlePoint.x,initY:e.middlePoint.y,offset:100,centerX:H.value.width/2,centerY:H.value.height/2}).y:d({initX:e.middlePoint.x,initY:e.middlePoint.y,offset:0,centerX:H.value.width/2,centerY:H.value.height/2}).y-100}function X(e){return e.proportion*100>I.value.dataLabels.hideUnderValue}function si(e,t){let n=I.value.dataLabels.hideUnderValue,r=I.value.dataLabels.smallArcClusterThreshold,i=(ui.value[t]??e.proportion??0)*100;return i>n&&i<=r}let{smallArcLayoutsClassic:Z}=dt({FINAL_CONFIG:F,noGhostDonut:J,svg:H,padding:Pr,labels_inline_fontSize:sr,minSize:K,findArcMidpoint:ye,calcMarkerOffsetX:m,calcMarkerOffsetY:g,animatingIndex:Gr,segregated:G,isSmallArc:si});function ci(e,t){let n=e.value/li(t);return isNaN(n)?0:h(I.value.percentage.formatter,n*100,u({v:n*100,s:`%`,r:I.value.percentage.rounding}),{datapoint:e})}function li(e){return[...e].map(e=>e.value).reduce((e,t)=>e+t,0)}let Q=v(()=>ei.value.map(e=>e.value).reduce((e,t)=>e+t,0)),ui=v(()=>{let e=U.value.reduce((e,t)=>e+t.value,0);return e<=0?[]:U.value.map(t=>t.value/e)}),di=v(()=>Q.value/ei.value.length);function fi(e){return Wr.value?e.proportion*100:e.value/Q.value*100}let pi=T(null),mi=T(!1);function hi({datapoint:e,seriesIndex:t}){F.value.events.datapointLeave&&F.value.events.datapointLeave({datapoint:e,seriesIndex:t}),pr.value=!1,P.value=null,nr.value=null,ir.value=`pointer`}function gi({datapoint:e,relativeIndex:t,seriesIndex:n,show:r=!1,triggerMode:i=`pointer`}){F.value.events.datapointEnter&&F.value.events.datapointEnter({datapoint:e,seriesIndex:n}),ir.value=i,nr.value=t,pi.value={datapoint:e,seriesIndex:n,config:F.value,series:U.value},pr.value=r,P.value=t;let a=``,o=R.value.tooltip.customFormat;if(mi.value=!1,te(o))try{let t=o({seriesIndex:n,datapoint:e,series:U.value,config:F.value});typeof t==`string`&&(mr.value=t,mi.value=!0)}catch{console.warn(`Custom format cannot be applied.`),mi.value=!1}mi.value||(a+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${R.value.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`,a+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${e.color}"/>${Rn.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${N.value}_${n})"/>`:``}</svg>`,a+=`<b>${ki({showVal:R.value.tooltip.showValue,showPercentage:R.value.tooltip.showPercentage,val:`<span>${h(I.value.value.formatter,e.value,u({p:I.value.dataLabels.prefix,v:e.value,s:I.value.dataLabels.suffix,r:R.value.tooltip.roundingValue}),{datapoint:e,relativeIndex:t,seriesIndex:n})}</span>`,percentage:h(I.value.percentage.formatter,e.proportion*100,u({v:e.proportion*100,s:`%`,r:R.value.tooltip.roundingPercentage}),{datapoint:e,relativeIndex:t,seriesIndex:n}),config:R.value.tooltip})}</b></div>`,R.value.comments.showInTooltip&&e.comment&&(a+=`<div class="vue-data-ui-tooltip-comment" style="background:${re(e.color,12.5)}; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${e.color}">${e.comment}</div>`),mr.value=`<div>${a}</div>`)}function _i(e,t){let n=Z.value[t];if(n)return{textAnchor:n.textAnchor,x:n.labelX,y:n.labelY};let r=m(e,!0,12);return{textAnchor:r.anchor,x:r.x,y:g(e)}}function vi(e,t,n){let{textAnchor:r,x:i}=_i(e,t),a=Ai(e),o=`
|
|
2
|
-
<tspan
|
|
3
|
-
class="vue-data-ui-datalabel-inline"
|
|
4
|
-
fill="${I.value.percentage.color}"
|
|
5
|
-
font-size="${n?sr.value:or.value}px"
|
|
6
|
-
style="font-weight:${I.value.percentage.bold?`bold`:``}"
|
|
7
|
-
>${a}</tspan>
|
|
8
|
-
`,s=String(e.name??``).split(/\n/g),c=``;return s.forEach((e,t)=>{c+=t===0?`
|
|
9
|
-
<tspan
|
|
10
|
-
class="${n?`vue-data-ui-datalabel-inline`:`vue-data-ui-datalabel-name`}"
|
|
11
|
-
fill="${I.value.name.color}"
|
|
12
|
-
font-size="${n?sr.value:M.value}px"
|
|
13
|
-
style="font-weight:${I.value.name.bold?`bold`:``}"
|
|
14
|
-
>${e}</tspan>
|
|
15
|
-
`:`
|
|
16
|
-
<tspan
|
|
17
|
-
class="${n?`vue-data-ui-datalabel-inline`:`vue-data-ui-datalabel-name`}"
|
|
18
|
-
x="${i}"
|
|
19
|
-
dy="${(n?sr.value:M.value)*1.2}"
|
|
20
|
-
fill="${I.value.name.color}"
|
|
21
|
-
font-size="${n?sr.value:M.value}px"
|
|
22
|
-
style="font-weight:${I.value.name.bold?`bold`:``}"
|
|
23
|
-
>${e}</tspan>
|
|
24
|
-
`}),r===`end`?`${I.value.name.show?c:``}${o}`:`${o}${I.value.name.show?c:``}`}function yi(e,t){let n=Y.value[t].middlePoint,r=ai(n),i=d({initX:n.x,initY:n.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}),a=i.x;i.y;let o=Ai(e),s=`
|
|
25
|
-
<tspan
|
|
26
|
-
class="vue-data-ui-datalabel-value"
|
|
27
|
-
fill="${I.value.percentage.color}"
|
|
28
|
-
font-size="${or.value}px"
|
|
29
|
-
style="font-weight:${I.value.percentage.bold?`bold`:`normal`}"
|
|
30
|
-
>${o}</tspan>
|
|
31
|
-
`,c=String(e.name??``).split(/\n/g),l=``;return c.forEach((e,t)=>{l+=t===0?`
|
|
32
|
-
<tspan
|
|
33
|
-
class="vue-data-ui-datalabel-name"
|
|
34
|
-
fill="${I.value.name.color}"
|
|
35
|
-
font-size="${M.value}px"
|
|
36
|
-
style="font-weight:${I.value.name.bold?`bold`:`normal`}"
|
|
37
|
-
>${e}</tspan>
|
|
38
|
-
`:`
|
|
39
|
-
<tspan
|
|
40
|
-
class="vue-data-ui-datalabel-name"
|
|
41
|
-
x="${a}"
|
|
42
|
-
dy="${M.value*1.2}"
|
|
43
|
-
fill="${I.value.name.color}"
|
|
44
|
-
font-size="${M.value}px"
|
|
45
|
-
style="font-weight:${I.value.name.bold?`bold`:`normal`}"
|
|
46
|
-
>${e}</tspan>
|
|
47
|
-
`}),r===`end`?`${I.value.name.show?l:``}${s}`:`${s}${I.value.name.show?l:``}`}function bi(e){return F.value.useBlurOnHover&&![null,void 0].includes(P.value)&&P.value!==e?`url(#blur_${N.value})`:``}function xi(e){if(!Wr.value||Gr.value===null||e.seriesIndex!==Gr.value)return 1;let t=(e.proportion??0)*100,n=I.value.dataLabels.hideUnderValue,r=I.value.dataLabels.smallArcClusterThreshold+2,i=n;return t>=r?1:t<=i?0:(t-i)/(r-i)}let Si=v(()=>({head:ei.value.map(e=>({name:e.name,color:e.color})),body:ei.value.map(e=>e.value)}));function Ci(e=null){$e(()=>{let t=Si.value.head.map((e,t)=>[[e.name],[Si.value.body[t]],[isNaN(Si.value.body[t]/Q.value)?`-`:Si.value.body[t]/Q.value*100]]),n=[[R.value.title.text],[R.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),r=ee(n);e?e(r):ge({csvContent:r,title:R.value.title.text||`vue-ui-donut`})})}let wi=v(()=>{let e=[`__SUM__`,u({p:I.value.dataLabels.prefix,v:Q.value,s:I.value.dataLabels.suffix,r:F.value.table.td.roundingValue}),`100%`],t=Si.value.head.map((e,t)=>[{color:e.color,name:e.name||`-`},Si.value.body[t],isNaN(Si.value.body[t]/Q.value)?`-`:(Si.value.body[t]/Q.value*100).toFixed(F.value.table.td.roundingPercentage)+`%`]),n=t.map(e=>e.map((e,t)=>t===0?e.name:e)),r={th:{backgroundColor:F.value.table.th.backgroundColor,color:F.value.table.th.color,outline:F.value.table.th.outline},td:{backgroundColor:F.value.table.td.backgroundColor,color:F.value.table.td.color,outline:F.value.table.td.outline},breakpoint:F.value.table.responsiveBreakpoint};return{colNames:[F.value.table.columnNames.series,F.value.table.columnNames.value,F.value.table.columnNames.percentage],head:e,body:t,a11yBody:n,config:r}}),Ti=T(!1);function Ei(e){Ti.value=e,hr.value+=1}let Di=v(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function Oi(e){return Ce({num:e,rounding:R.value.legend.roundingPercentage})}function ki({val:e,percentage:t,showVal:n,showPercentage:r,config:i}){return we({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function Ai(e){return ki({val:h(I.value.value.formatter,e.value,u({p:I.value.dataLabels.prefix,v:e.value,s:I.value.dataLabels.suffix,r:I.value.value.rounding}),{datapoint:e}),percentage:ci(e,J.value),showVal:I.value.value.show,showPercentage:I.value.percentage.show,config:I.value.dataLabels})}function $(e,t){F.value.events.datapointClick&&F.value.events.datapointClick({datapoint:e,seriesIndex:e.seriesIndex}),Hr(`selectDatapoint`,{datapoint:e,index:t})}function ji(){V.value.showTable=!V.value.showTable}function Mi(){V.value.dataLabels.show=!V.value.dataLabels.show}function Ni(){V.value.showTooltip=!V.value.showTooltip}let Pi=T(!1);function Fi(){Pi.value=!Pi.value}let Ii=l(Bn,()=>R.value.title.text);function Li(){if(!Vn.value)return;let{x:e,y:t,width:n,height:r}=Vn.value.getBBox();B.value&&B.value.setAttribute(`viewBox`,`${e} ${t} ${n+Math.min(0,e)} ${r+Math.min(0,t)}`)}let Ri=v(()=>c({config:F,style:R,mutableConfig:V,dialog:Pn,accordion:kn,isFullscreen:Ti,parent:Bn,maxWidth:500,isCursorPointer:vr}));lt(()=>V.value.showTable,e=>s(e,F,er));function zi(){V.value.showTable=!1,tr.value&&tr.value.setTableIconState(!1)}let Bi=v(()=>ti.value.map(e=>({...e,name:e.display}))),Vi=v(()=>R.value.backgroundColor),Hi=v(()=>R.value.legend),Ui=v(()=>R.value.title),{isCallbackImaging:Wi,isCallbackSvg:Gi,generateSvg:Ki,onGenerateImage:qi}=Fe({svg:B,title:Ui,legend:Hi,legendItems:Bi,backgroundColor:Vi,getSvgCallback:()=>F.value.userOptions.callbacks.svg,generateImage:Rr});async function Ji(){Hr(`copyAlt`,{config:F.value,dataset:W.value}),F.value.userOptions.callbacks.altCopy?await Promise.resolve(F.value.userOptions.callbacks.altCopy({config:F.value,dataset:W.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Yi(){nr.value=null,ar.value=!0}function Xi(){nr.value=null,ir.value=`pointer`,pr.value=!1,P.value=null,ar.value=!1}function Zi(e){if(!B.value||Pi.value||document.activeElement!==B.value||!J.value.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){nr.value=null,ir.value=`pointer`,pr.value=!1,P.value=null;return}if(r){if(nr.value===null)return;let e=J.value[nr.value];if(!e)return;$(e,nr.value);return}let a=nr.value,o=P.value,s=a!==null&&a>=0&&a<J.value.length,c=o!==null&&o>=0&&o<J.value.length;s?n?(a+=1,a>=J.value.length&&(a=0)):t&&(--a,a<0&&(a=J.value.length-1)):c?(a=n?o+1:o-1,a>=J.value.length&&(a=0),a<0&&(a=J.value.length-1)):a=n?0:J.value.length-1;let l=J.value[a];l&&(nr.value=a,Qi(a),gi({datapoint:l,relativeIndex:a,seriesIndex:l.seriesIndex,show:!0,triggerMode:`keyboard`}))}function Qi(e){if(!Number.isFinite(e)||!B.value)return;let t=H.value.width/2,n=H.value.height/2;if(F.value.type===`classic`){let r=J.value[e];if(!r?.arcSlice)return;let i=ye(r.arcSlice);if(!i)return;t=i.x,n=i.y}else{let r=Y.value[e]?.middlePoint;if(!r)return;t=r.x,n=r.y}let r=B.value.getBoundingClientRect();rr.value={x:r.left+t/H.value.width*r.width,y:r.top+n/H.value.height*r.height}}let $i=v(()=>({headers:wi.value?.colNames??[],rows:wi.value?.a11yBody??[]}));return Ge({autoSize:Li,getData:Ur,getImage:Ii,generatePdf:Lr,generateCsv:Ci,generateImage:Rr,generateSvg:Ki,hideSeries:Qr,showSeries:Zr,toggleTable:ji,toggleLabels:Mi,toggleTooltip:Ni,toggleAnnotator:Fi,toggleFullscreen:Ei,copyAlt:Ji}),(s,c)=>(w(),x(`div`,{ref_key:`donutChart`,ref:Bn,class:et(`vue-data-ui-component vue-ui-donut ${Ti.value?`vue-data-ui-wrapper-fullscreen`:``} ${F.value.useCssAnimation?``:`vue-ui-dna`}`),style:C(`font-family:${F.value.style.fontFamily};width:100%; ${F.value.responsive?`height:100%;`:``} text-align:center;background:${R.value.backgroundColor}`),id:`donut__${N.value}`,onMouseenter:jr,onMouseleave:Mr},[S(`div`,{id:`chart-instructions-${N.value}`,class:`sr-only`},[S(`p`,null,O(F.value.a11y.translations.keyboardNavigation),1)],8,mt),$i.value?.rows?.length?(w(),y(He,{key:0,uid:N.value,head:$i.value.headers,body:$i.value.rows,notice:F.value.a11y.translations.tableAvailable,caption:F.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):b(``,!0),F.value.userOptions.buttons.annotator&&k(B)?(w(),y(k(jn),Qe({key:1},k(a)(F.value.userOptions.annotator),{color:R.value.color,backgroundColor:R.value.backgroundColor,active:Pi.value,svgRef:k(B),isCursorPointer:vr.value,palette:F.value.userOptions.annotatorPalette,onClose:Fi}),qe({_:2},[E(k(o),e=>({name:e,fn:A(t=>[D(s.$slots,e,tt(Ze(k(i)(e,t))),void 0,!0)])}))]),1040,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`,`palette`])):b(``,!0),D(s.$slots,`userConfig`,{},void 0,!0),zr.value?(w(),x(`div`,{key:2,ref_key:`noTitle`,ref:Yn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):b(``,!0),R.value.title.text?(w(),x(`div`,{key:3,ref_key:`chartTitle`,ref:Wn,style:`width:100%;background:transparent;padding-bottom:24px`},[(w(),y(ze,{key:`title_${Xn.value}`,config:{title:{cy:`donut-div-title`,...R.value.title},subtitle:{cy:`donut-div-subtitle`,...R.value.title.subtitle}}},null,8,[`config`]))],512)):b(``,!0),S(`div`,{id:`legend-top-${N.value}`},null,8,ht),F.value.userOptions.show&&zn.value&&(k(Ar)||k(Or))?(w(),y(k(Mn),Qe({ref_key:`userOptionsRef`,ref:tr,key:`user_option_${hr.value}`,backgroundColor:R.value.backgroundColor,color:R.value.color,isPrinting:k(Fr),isImaging:k(Ir),uid:N.value,hasTooltip:R.value.tooltip.show&&F.value.userOptions.buttons.tooltip,isFullscreen:Ti.value,chartElement:Bn.value},k(n)(F.value.userOptions,`pdf csv img svg labels table fullscreen altCopy annotator`),{isTooltip:V.value.showTooltip,isAnnotation:Pi.value,tableDialog:F.value.table.useDialog,isCursorPointer:vr.value,onToggleFullscreen:Ei,onGeneratePdf:k(Lr),onGenerateCsv:Ci,onGenerateImage:k(qi),onGenerateSvg:k(Ki),onToggleTable:ji,onToggleLabels:Mi,onToggleTooltip:Ni,onToggleAnnotator:Fi,onCopyAlt:Ji,style:{visibility:k(Ar)?k(Or)?`visible`:`hidden`:`visible`}}),qe({_:2},[E(k(t)(s.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:A(t=>[D(s.$slots,e,tt(Ze(k(r)(e,t))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasTooltip`,`isFullscreen`,`chartElement`,`isTooltip`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):b(``,!0),S(`div`,gt,[(w(),x(`svg`,{ref_key:`svgRef`,ref:B,xmlns:k(ve),"aria-describedby":`chart-instructions-${N.value}`,class:et({"vue-data-ui-fullscreen--on":Ti.value,"vue-data-ui-fulscreen--off":!Ti.value,"vue-data-ui-svg":!0}),viewBox:`0 0 ${H.value.width<=0?10:H.value.width} ${H.value.height<=0?10:H.value.height}`,style:C(`max-width:100%; overflow: visible; background:transparent;color:${R.value.color};${Pr.value.css}`),tabindex:`0`,onFocus:Yi,onBlur:Xi,onKeydown:Zi},[S(`g`,{ref_key:`G`,ref:Vn,class:`vue-data-ui-g`},[Ye(k(Nn)),D(s.$slots,`svg-underlayer`,{svg:{...H.value,datapoints:q.value,isPrintingImg:k(Fr)||k(Ir)||k(Wi),isPrintingSvg:k(Gi)}},void 0,!0),s.$slots[`chart-background`]?(w(),x(`foreignObject`,{key:0,x:0,y:0,width:H.value.width<=0?10:H.value.width,height:H.value.height<=0?10:H.value.height,style:{pointerEvents:`none`}},[D(s.$slots,`chart-background`,{},void 0,!0)],8,vt)):b(``,!0),F.value.type===`classic`&&!isNaN(Vr.value/K.value)?(w(),x(`defs`,yt,[R.value.useGradient?(w(),y(We,{key:0,t:`radial`,id:`gradient_${N.value}`,stops:[[`0%`,k(re)(R.value.backgroundColor,0),0],[`${(1-Vr.value/K.value)*100}%`,k(re)(`#FFFFFF`,0),0],[`${(1-Vr.value/K.value/2)*100}%`,k(re)(`#FFFFFF`,R.value.gradientIntensity),1],[`100%`,k(re)(R.value.backgroundColor,0),0]]},null,8,[`id`,`stops`])):b(``,!0)])):b(``,!0),F.value.type===`polar`?(w(),x(`defs`,bt,[(w(!0),x(_,null,E(Y.value,(e,t)=>(w(),y(We,{t:`radial`,id:`polar_gradient_${t}_${N.value}`,key:`pg_${t}_${N.value}`,cx:(isNaN(e.middlePoint.x/H.value.width*100)?0:e.middlePoint.x/H.value.width*100)+`%`,cy:(isNaN(e.middlePoint.y/H.value.height*100)?0:e.middlePoint.y/H.value.height*100)+`%`,r:`62%`,stops:[[`0%`,k(oe)(q.value[t].color,.05),R.value.gradientIntensity/100],[`100%`,q.value[t].color,1]]},null,8,[`id`,`cx`,`cy`,`stops`]))),128))])):b(``,!0),S(`defs`,null,[S(`filter`,{id:`blur_${N.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[S(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:2,id:`blur_std_${N.value}`},null,8,St),c[5]||=S(`feColorMatrix`,{type:`saturate`,values:`0`},null,-1)],8,xt),S(`filter`,{id:`shadow_${N.value}`,"color-interpolation-filters":`sRGB`},[S(`feDropShadow`,{dx:`0`,dy:`0`,stdDeviation:`10`,"flood-opacity":`0.5`,"flood-color":L.value.shadowColor},null,8,wt)],8,Ct),S(`filter`,{id:`drop_shadow_${N.value}`,"color-interpolation-filters":`sRGB`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[S(`feDropShadow`,{dx:`0`,dy:`0`,stdDeviation:`3`,"flood-opacity":`1`,"flood-color":L.value.shadowColor},null,8,Et)],8,Tt)]),F.value.type===`classic`?(w(!0),x(_,{key:3},E(q.value.filter(e=>!e.ghost),(e,t)=>(w(),x(`g`,null,[X(e)&&V.value.dataLabels.show?(w(),x(`path`,{key:0,d:k(Z)[t]?.connectorPath||k(de)(e,{x:H.value.width/2,y:H.value.height/2},16,16,!1,!1,Vr.value,12,_r.value.curvedMarkers),stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,filter:bi(t)},null,8,Dt)):b(``,!0)]))),256)):b(``,!0),F.value.type===`polar`?(w(!0),x(_,{key:4},E(q.value.filter(e=>!e.ghost),(e,t)=>(w(),x(`g`,null,[X(e)&&V.value.dataLabels.show?(w(),x(`path`,{key:0,d:`M ${k(d)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:24,centerX:H.value.width/2,centerY:H.value.height/2}).x},${k(d)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:24,centerX:H.value.width/2,centerY:H.value.height/2}).y} ${Y.value[t].middlePoint.x},${Y.value[t].middlePoint.y}`,stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,filter:bi(t),style:C({transition:z.value||!F.value.serieToggleAnimation.show?`none`:`all ${F.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Ot)):b(``,!0)]))),256)):b(``,!0),F.value.type===`classic`&&L.value.useShadow?(w(),x(`circle`,{key:5,cx:H.value.width/2,cy:H.value.height/2,r:K.value<=0?10:K.value,fill:R.value.backgroundColor,filter:`url(#shadow_${N.value})`},null,8,kt)):b(``,!0),s.$slots.pattern?(w(),x(`g`,At,[(w(!0),x(_,null,E(e.dataset,(e,t)=>(w(),x(`defs`,{key:`pattern-${e.patternIndex}`},[D(s.$slots,`pattern`,Qe({ref_for:!0},{seriesIndex:t,patternId:`pattern_${N.value}_${t}`}),void 0,!0)]))),128))])):b(``,!0),Q.value&&F.value.type===`classic`?(w(),x(_,{key:7},[(w(!0),x(_,null,E(J.value,(e,t)=>(w(),x(`path`,{stroke:R.value.backgroundColor,d:e.arcSlice,fill:`#FFFFFF`},null,8,jt))),256)),(w(!0),x(_,null,E(J.value,(e,t)=>(w(),x(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:e.color,stroke:L.value.borderColorAuto?R.value.backgroundColor:L.value.borderColor,"stroke-width":L.value.borderWidth,filter:bi(t)},null,8,Mt))),256)),s.$slots.pattern?(w(),x(`g`,Nt,[(w(!0),x(_,null,E(J.value,(e,t)=>(w(),x(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:`url(#${e.pattern})`,stroke:L.value.borderColorAuto?R.value.backgroundColor:L.value.borderColor,"stroke-width":L.value.borderWidth,filter:bi(t)},null,8,Pt))),256))])):b(``,!0)],64)):b(``,!0),Q.value&&F.value.type===`polar`?(w(),x(_,{key:8},[q.value.length>1?(w(),x(`g`,Ft,[(w(!0),x(_,null,E(J.value,(e,t)=>(w(),x(`path`,{stroke:L.value.borderColorAuto?R.value.backgroundColor:L.value.borderColor,d:Y.value[t].path,fill:`#FFFFFF`,style:C({transition:z.value||!F.value.serieToggleAnimation.show?`none`:`all ${F.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,It))),256)),L.value.useShadow?(w(),x(`g`,Lt,[(w(!0),x(_,null,E(J.value,(e,t)=>(w(),x(`path`,{class:`vue-ui-donut-arc-path`,d:Y.value[t].path,fill:`transparent`,stroke:L.value.borderColorAuto?R.value.backgroundColor:_r.value.donut.borderColor,"stroke-width":L.value.borderWidth,filter:`url(#drop_shadow_${N.value})`,style:C({transition:z.value||!F.value.serieToggleAnimation.show?`none`:`all ${F.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Rt))),256))])):b(``,!0),s.$slots.pattern?(w(),x(`g`,zt,[(w(!0),x(_,null,E(J.value,(e,t)=>(w(),x(`path`,{class:`vue-ui-donut-arc-path`,d:Y.value[t].path,fill:`url(#${e.pattern})`,stroke:L.value.borderColorAuto?R.value.backgroundColor:_r.value.donut.borderColor,"stroke-width":L.value.borderWidth,filter:bi(t),style:C({transition:z.value||!F.value.serieToggleAnimation.show?`none`:`all ${F.value.serieToggleAnimation.durationMs}ms ease-in-out`,transformOrigin:`center`})},null,12,Bt))),256))])):b(``,!0),(w(!0),x(_,null,E(J.value,(e,t)=>(w(),x(`path`,{class:`vue-ui-donut-arc-path`,d:Y.value[t].path,fill:R.value.useGradient?`url(#polar_gradient_${t}_${N.value})`:e.color,stroke:L.value.borderColorAuto?R.value.backgroundColor:L.value.borderColor,"stroke-width":L.value.borderWidth,filter:bi(t),style:C({transition:z.value||!F.value.serieToggleAnimation.show?`none`:`all ${F.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Vt))),256))])):(w(),x(`g`,Ht,[s.$slots.pattern?(w(),x(`circle`,{key:0,cx:H.value.width/2,cy:H.value.height/2,r:K.value,fill:`url(#pattern_${N.value}_${q.value[0].patternIndex})`,stroke:R.value.backgroundColor,"stroke-width":L.value.borderWidth},null,8,Ut)):b(``,!0),S(`circle`,{cx:H.value.width/2,cy:H.value.height/2,r:K.value,fill:R.value.useGradient?`url(#polar_gradient_0_${N.value})`:q.value[0].color,stroke:R.value.backgroundColor,"stroke-width":L.value.borderWidth},null,8,Wt)]))],64)):(w(),x(_,{key:9},[F.value.type===`classic`&&!ri.value?(w(),x(`g`,Gt,[(w(!0),x(_,null,E(ii.value,(e,t)=>(w(),x(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:e.color,stroke:R.value.backgroundColor,"stroke-width":L.value.borderWidth},null,8,Kt))),256))])):b(``,!0),S(`circle`,{cx:H.value.width/2,cy:H.value.height/2,r:K.value<=0?10:K.value,fill:`transparent`,stroke:R.value.backgroundColor},null,8,qt)],64)),R.value.useGradient&&F.value.type===`classic`?(w(),x(`circle`,{key:10,cx:H.value.width/2,cy:H.value.height/2,r:K.value<=0?10:K.value,fill:`url(#gradient_${N.value})`},null,8,Jt)):b(``,!0),S(`circle`,{ref_key:`circle_hollow`,ref:Un,style:{pointerEvents:`none`},fill:`none`,cx:H.value.width/2,cy:H.value.height/2,r:Math.max(.1,Vr.value*1.7)},null,8,Yt),Q.value?(w(),x(_,{key:11},[q.value.length>1||F.value.type===`classic`?(w(),x(`g`,Xt,[(w(!0),x(_,null,E(q.value.filter(e=>!e.ghost),(e,t)=>(w(),x(`path`,{d:F.value.type===`classic`?e.arcSlice:Y.value[t].path,stroke:L.value.borderColorAuto?R.value.backgroundColor:L.value.borderColor,fill:P.value===t?L.value.selectedColor:`transparent`,onMouseenter:n=>gi({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>hi({datapoint:e,seriesIndex:e.seriesIndex}),onClick:n=>$(e,t)},null,40,Zt))),256))])):(w(),x(`g`,Qt,[S(`circle`,{cx:H.value.width/2,cy:H.value.height/2,r:K.value,fill:`transparent`,onMouseenter:c[0]||=e=>gi({datapoint:q.value[0],relativeIndex:0,seriesIndex:q.value[0].seriesIndex,show:!0}),onMouseleave:c[1]||=e=>hi({datapoint:q.value[0],seriesIndex:q.value[0].seriesIndex}),onClick:c[2]||=e=>$(q.value[0],s.i)},null,40,$t)]))],64)):b(``,!0),F.value.type===`classic`?(w(),x(`g`,{key:12,ref_key:`G_hollow`,ref:Hn,class:`vue-data-ui-donut-hollow-labels`},[I.value.hollow.total.show?(w(),x(`text`,{key:0,"text-anchor":`middle`,x:H.value.width/2,y:H.value.height/2-(I.value.hollow.average.show?I.value.hollow.total.fontSize:0)+I.value.hollow.total.offsetY,fill:I.value.hollow.total.color,"font-size":I.value.hollow.total.fontSize,style:C(`font-weight:${I.value.hollow.total.bold?`bold`:``}`)},O(I.value.hollow.total.text),13,en)):b(``,!0),I.value.hollow.total.show?(w(),x(`text`,{key:1,"text-anchor":`middle`,x:H.value.width/2,y:H.value.height/2+I.value.hollow.total.fontSize-(I.value.hollow.average.show?I.value.hollow.total.fontSize:0)+I.value.hollow.total.value.offsetY,fill:I.value.hollow.total.value.color,"font-size":I.value.hollow.total.value.fontSize,style:C(`font-weight:${I.value.hollow.total.value.bold?`bold`:``}`)},O(k(h)(I.value.hollow.total.value.formatter,Q.value,k(u)({p:I.value.hollow.total.value.prefix,v:Q.value,s:I.value.hollow.total.value.suffix}))),13,tn)):b(``,!0),I.value.hollow.average.show?(w(),x(`text`,{key:2,"text-anchor":`middle`,x:H.value.width/2,y:H.value.height/2+(I.value.hollow.total.show?I.value.hollow.average.fontSize:0)+I.value.hollow.average.offsetY,fill:I.value.hollow.average.color,"font-size":I.value.hollow.average.fontSize,style:C(`font-weight:${I.value.hollow.average.bold?`bold`:``}`)},O(I.value.hollow.average.text),13,nn)):b(``,!0),I.value.hollow.average.show?(w(),x(`text`,{key:3,"text-anchor":`middle`,x:H.value.width/2,y:H.value.height/2+(I.value.hollow.total.show?I.value.hollow.average.fontSize:0)+I.value.hollow.average.fontSize+I.value.hollow.average.value.offsetY,fill:I.value.hollow.average.value.color,"font-size":I.value.hollow.average.value.fontSize,style:C(`font-weight:${I.value.hollow.average.value.bold?`bold`:``}`)},O(Wr.value||z.value?`--`:k(h)(I.value.hollow.average.value.formatter,k(ue)(di.value),k(u)({p:I.value.hollow.average.value.prefix,v:k(ue)(di.value),s:I.value.hollow.average.value.suffix,r:I.value.hollow.average.value.rounding}))),13,rn)):b(``,!0)],512)):b(``,!0),(w(!0),x(_,null,E(J.value.filter(e=>!e.ghost),(e,t)=>(w(),x(`g`,{filter:bi(t),key:e.seriesIndex,opacity:xi(e)},[I.value.dataLabels.useLabelSlots?(w(),x(`g`,on,[(w(),x(`foreignObject`,{x:k(m)(e,!0).anchor===`end`?k(m)(e).x-120:k(m)(e,!0).anchor===`middle`?k(m)(e).x-60:k(m)(e).x,y:k(g)(e)-(Di.value?20:0),width:`120`,height:`60`,style:{overflow:`visible`}},[S(`div`,null,[D(s.$slots,`dataLabel`,Qe({ref_for:!0},{datapoint:e,isBlur:!F.value.useBlurOnHover||[null,void 0].includes(P.value)||P.value===t,isSafari:Di.value,isVisible:X(e)&&V.value.dataLabels.show,textAlign:k(m)(e,!0,16,!0).anchor,flexAlign:k(m)(e,!0,16).anchor,percentage:ci(e,J.value)}),void 0,!0)])],8,sn))])):(w(),x(`g`,cn,[F.value.type===`classic`?(w(),x(_,{key:0},[X(e)&&V.value.dataLabels.show?(w(),x(`circle`,{key:0,cx:k(Z)[t]?.markerX??k(m)(e).x,cy:k(Z)[t]?.markerY??k(g)(e)-3.5,fill:e.color,stroke:R.value.backgroundColor,"stroke-width":1,r:3,filter:!F.value.useBlurOnHover||[null,void 0].includes(P.value)||P.value===t?``:`url(#blur_${N.value})`,onClick:n=>$(e,t),onMouseenter:n=>gi({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>hi({datapoint:e,seriesIndex:e.seriesIndex})},null,40,ln)):b(``,!0),I.value.dataLabels.oneLine||k(Z)[t]?ut((w(),x(`text`,{key:1,class:`vue-data-ui-datalabel-inline`,"text-anchor":k(Z)[t]?.textAnchor||k(m)(e,!0,12).anchor,x:k(Z)[t]?.labelX??k(m)(e,!0,12).x,y:k(Z)[t]?.labelY??k(g)(e),onClick:n=>$(e,t),onMouseenter:n=>gi({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>hi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:vi(e,t,!!k(Z)[t])},null,40,un)),[[ct,X(e)&&V.value.dataLabels.show]]):(w(),x(_,{key:2},[ut(S(`text`,{class:`vue-data-ui-datalabel-value`,"text-anchor":k(Z)[t]?.textAnchor||k(m)(e,!0,12).anchor,x:k(Z)[t]?.labelX??k(m)(e,!0,12).x,y:k(Z)[t]?.labelY??k(g)(e),fill:I.value.percentage.color,"font-size":or.value+`px`,style:C(`font-weight:${I.value.percentage.bold?`bold`:``}`),onClick:n=>$(e,t),onMouseenter:n=>gi({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>hi({datapoint:e,seriesIndex:e.seriesIndex})},O(Ai(e)),45,dn),[[ct,X(e)&&V.value.dataLabels.show]]),ut(S(`text`,{class:`vue-data-ui-datalabel-name`,"text-anchor":k(Z)[t]?.textAnchor||k(m)(e).anchor,x:k(Z)[t]?.labelX??k(m)(e,!0,12).x,y:(k(Z)[t]?.labelY??k(g)(e))+M.value*1.2,fill:I.value.name.color,"font-size":M.value+`px`,style:C(`font-weight:${I.value.name.bold?`bold`:``}`),onClick:n=>$(e,t),onMouseenter:n=>gi({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>hi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:k(ae)({content:e.name,fontSize:M.value,fill:I.value.name.color,x:k(Z)[t]?.labelX??k(m)(e,!0,12).x,y:(k(Z)[t]?.labelY??k(g)(e))+M.value})},null,44,fn),[[ct,X(e,!0,12)&&V.value.dataLabels.show&&I.value.name.show]])],64))],64)):b(``,!0),F.value.type===`polar`?(w(),x(_,{key:1},[X(e)&&V.value.dataLabels.show?(w(),x(`circle`,{key:0,cx:k(d)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:24,centerX:H.value.width/2,centerY:H.value.height/2}).x,cy:k(d)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:24,centerX:H.value.width/2,centerY:H.value.height/2}).y,fill:e.color,stroke:R.value.backgroundColor,"stroke-width":1,r:3,filter:!F.value.useBlurOnHover||[null,void 0].includes(P.value)||P.value===t?``:`url(#blur_${N.value})`,onClick:n=>$(e,t),onMouseenter:n=>gi({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>hi({datapoint:e,seriesIndex:e.seriesIndex}),style:C({transition:z.value||!F.value.serieToggleAnimation.show?`none`:`all ${F.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,44,pn)):b(``,!0),I.value.dataLabels.oneLine?ut((w(),x(`text`,{key:1,class:`vue-data-ui-datalabel-inline`,"text-anchor":ai(Y.value[t].middlePoint),x:k(d)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}).x,y:k(d)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}).y,style:C({transition:z.value||!F.value.serieToggleAnimation.show?`none`:`all ${F.value.serieToggleAnimation.durationMs}ms ease-in-out`}),onClick:n=>$(e,t),onMouseenter:n=>gi({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>hi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:yi(e,t)},null,44,mn)),[[ct,X(e)&&V.value.dataLabels.show]]):(w(),x(_,{key:2},[X(e)&&V.value.dataLabels.show?(w(),x(`text`,{key:0,class:`vue-data-ui-datalabel-value`,"text-anchor":ai(Y.value[t].middlePoint),x:k(d)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}).x,y:k(d)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}).y,fill:I.value.percentage.color,"font-size":or.value,style:C({transition:z.value||!F.value.serieToggleAnimation.show?`none`:`all ${F.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:I.value.percentage.bold?`bold`:`normal`}),onClick:n=>$(e,t),onMouseenter:n=>gi({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>hi({datapoint:e,seriesIndex:e.seriesIndex})},O(Ai(e)),45,hn)):b(``,!0),X(e,!0,12)&&V.value.dataLabels.show&&I.value.name.show?(w(),x(`text`,{key:1,class:`vue-data-ui-datalabel-name`,"text-anchor":ai(Y.value[t].middlePoint),x:k(d)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}).x,y:k(d)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}).y+M.value*1.2,fill:I.value.name.color,"font-size":M.value,style:C({transition:z.value||!F.value.serieToggleAnimation.show?`none`:`all ${F.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:I.value.name.bold?`bold`:`normal`}),onClick:n=>$(e,t),onMouseenter:n=>gi({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>hi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:k(ae)({content:e.name,fontSize:M.value,fill:I.value.name.color,x:k(d)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}).x,y:k(d)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}).y+M.value*1.2})},null,44,gn)):b(``,!0)],64))],64)):b(``,!0)])),V.value.dataLabels.show&&R.value.comments.show&&e.comment?(w(),x(`g`,_n,[X(e)&&F.value.type===`classic`?(w(),x(`foreignObject`,{key:0,x:R.value.comments.offsetX+(k(m)(e,!0).anchor===`end`?k(m)(e).x-R.value.comments.width:k(m)(e,!0).anchor===`middle`?k(m)(e).x-R.value.comments.width/2:k(m)(e).x),y:k(g)(e)+24+R.value.comments.offsetY,width:R.value.comments.width,height:`200`,style:{overflow:`visible`,"pointer-events":`none`}},[S(`div`,null,[D(s.$slots,`plot-comment`,{plot:{...e,textAlign:k(m)(e,!0,16,!0).anchor,flexAlign:k(m)(e,!0,16).anchor,isFirstLoad:z.value}},void 0,!0)])],8,vn)):b(``,!0),X(e)&&F.value.type===`polar`?(w(),x(`foreignObject`,{key:1,x:R.value.comments.offsetX+(ai(Y.value[t].middlePoint)===`end`?k(d)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}).x-R.value.comments.width:ai(Y.value[t].middlePoint)===`middle`?k(d)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}).x-R.value.comments.width/2:k(d)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}).x),y:oi(Y.value[t])+R.value.comments.offsetY,width:R.value.comments.width,height:`200`,style:C({transition:z.value||!F.value.serieToggleAnimation.show?`none`:`all ${F.value.serieToggleAnimation.durationMs}ms ease-in-out`,overflow:`visible`,pointerEvents:`none`})},[S(`div`,null,[D(s.$slots,`plot-comment`,{plot:{...e,textAlign:ai(Y.value[t].middlePoint),flexAlign:ai(Y.value[t].middlePoint),isFirstLoad:z.value}},void 0,!0)])],12,yn)):b(``,!0)])):b(``,!0)],8,an))),128)),D(s.$slots,`svg`,{svg:{...H.value,datapoints:q.value,isPrintingImg:k(Fr)||k(Ir)||k(Wi),isPrintingSvg:k(Gi)}},void 0,!0)],512)],46,_t)),s.$slots.hint?(w(),x(`div`,bn,[D(s.$slots,`hint`,tt(Ze({hint:F.value.a11y.translations.keyboardNavigation,isVisible:ar.value})),void 0,!0)])):b(``,!0)]),s.$slots.watermark?(w(),x(`div`,xn,[D(s.$slots,`watermark`,tt(Ze({isPrinting:k(Fr)||k(Ir)||k(Wi)||k(Gi)})),void 0,!0)])):b(``,!0),S(`div`,{id:`legend-bottom-${N.value}`},null,8,Sn),$n.value&&(R.value.legend.show||s.$slots.legend)?(w(),y(Ke,{key:6,to:R.value.legend.position===`top`?`#legend-top-${N.value}`:`#legend-bottom-${N.value}`},[S(`div`,{ref_key:`chartLegend`,ref:Gn},[D(s.$slots,`legend`,{legend:ti.value},()=>[R.value.legend.show?(w(),y(Ve,{key:`legend_${Qn.value}`,legendSet:ti.value,config:ni.value,onClickMarker:c[3]||=({i:e})=>Yr(e),isCursorPointer:vr.value},qe({item:A(({legend:e,index:t})=>[S(`div`,{style:C(`opacity:${G.value.includes(t)?.5:1}`),onClick:t=>e.segregate()},O(e.display),13,Cn)]),legendToggle:A(()=>[ti.value.length>2&&R.value.legend.selectAllToggle.show&&!k(br)?(w(),y(Ue,{key:0,backgroundColor:R.value.legend.selectAllToggle.backgroundColor,color:R.value.legend.selectAllToggle.color,fontSize:R.value.legend.fontSize,checked:G.value.length>0,isCursorPointer:vr.value,onToggle:Jr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):b(``,!0)]),_:2},[s.$slots.pattern?{name:`legend-pattern`,fn:A(({legend:e,index:t})=>[Ye(Re,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${N.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):b(``,!0)],!0)],512)],8,[`to`])):b(``,!0),s.$slots.source?(w(),x(`div`,{key:7,ref_key:`source`,ref:Jn,dir:`auto`},[D(s.$slots,`source`,{},void 0,!0)],512)):b(``,!0),s.$slots.hollow?(w(),x(`div`,wn,[D(s.$slots,`hollow`,tt(Ze({total:Q.value,average:di.value,dataset:U.value,...H.value})),void 0,!0)])):b(``,!0),Ye(k(Dn),{teleportTo:R.value.tooltip.teleportTo,show:V.value.showTooltip&&pr.value,backgroundColor:R.value.tooltip.backgroundColor,color:R.value.tooltip.color,fontSize:R.value.tooltip.fontSize,borderRadius:R.value.tooltip.borderRadius,borderColor:R.value.tooltip.borderColor,borderWidth:R.value.tooltip.borderWidth,backgroundOpacity:R.value.tooltip.backgroundOpacity,position:R.value.tooltip.position,offsetX:R.value.tooltip.offsetX,offsetY:R.value.tooltip.offsetY,parent:Bn.value,content:mr.value,isCustom:mi.value,isFullscreen:Ti.value,smooth:R.value.tooltip.smooth,backdropFilter:R.value.tooltip.backdropFilter,smoothForce:R.value.tooltip.smoothForce,smoothSnapThreshold:R.value.tooltip.smoothSnapThrehsold,isA11yMode:ir.value===`keyboard`,a11yPosition:rr.value},{"tooltip-before":A(()=>[D(s.$slots,`tooltip-before`,tt(Ze({...pi.value})),void 0,!0)]),tooltip:A(()=>[D(s.$slots,`tooltip`,tt(Ze({...pi.value})),void 0,!0)]),"tooltip-after":A(()=>[D(s.$slots,`tooltip-after`,tt(Ze({...pi.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`fontSize`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isCustom`,`isFullscreen`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),zn.value&&F.value.userOptions.buttons.table?(w(),y(it(Ri.value.component),Qe({key:9},Ri.value.props,{ref_key:`tableUnit`,ref:er,onClose:zi}),qe({content:A(()=>[(w(),y(k(An),{key:`table_${Zn.value}`,colNames:wi.value.colNames,head:wi.value.head,body:wi.value.body,config:wi.value.config,title:F.value.table.useDialog?``:Ri.value.title,withCloseButton:!F.value.table.useDialog,isCursorPointer:vr.value,onClose:zi},{th:A(({th:e})=>[e===`__SUM__`?(w(),x(`div`,Tn,[Ye(k(On),{name:`sigma`,stroke:wi.value.config.th.color,size:16},null,8,[`stroke`])])):(w(),x(`div`,En,O(e),1))]),td:A(({td:e})=>[Je(O(e.name?e.name:isNaN(Number(e))?e.includes(`%`)?e:k(h)(I.value.percentage.formatter,e,k(u)({v:e,s:`%`,r:I.value.percentage.rounding})):k(h)(I.value.value.formatter,e,k(u)({p:I.value.dataLabels.prefix,v:e,s:I.value.dataLabels.suffix,r:I.value.value.rounding}))),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[F.value.table.useDialog?{name:`title`,fn:A(()=>[Je(O(Ri.value.title),1)]),key:`0`}:void 0,F.value.table.useDialog?{name:`actions`,fn:A(()=>[S(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:c[4]||=e=>Ci(F.value.userOptions.callbacks.csv),style:C({cursor:vr.value?`pointer`:`default`})},[Ye(k(On),{name:`fileCsv`,stroke:Ri.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):b(``,!0),D(s.$slots,`skeleton`,{},()=>[k(br)?(w(),y(je,{key:0})):b(``,!0)],!0)],46,pt))}},[[`__scopeId`,`data-v-1dd02021`]]);export{ft as n,Dn as t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{t as s}from"./annotationViewport-X8fvs7pz.js";import{n as c,t as ee}from"./tableIntegration-CNoJ1CIY.js";import{t as te}from"./chartImage-DPGnEuYM.js";import{$ as ne,$t as re,At as ie,D as ae,Ht as oe,It as se,J as ce,Jt as le,Kt as ue,S as de,X as fe,_ as pe,at as me,f as he,h as ge,i as _e,in as ve,nn as ye,nt as be,p as xe,t as Se,tt as Ce,w as we,y as Te,yt as Ee,zt as De}from"./lib-rPeBMZrn.js";import{n as Oe,t as ke}from"./useHints-C-TwxM0Y.js";import{t as Ae}from"./useConfig-_JwRfIqE.js";import{t as je}from"./useSvgLabelLayout-42Kats14.js";import{t as Me}from"./usePrinter-DVf3YcG5.js";import{n as Ne,t as Pe}from"./BaseScanner-8NdoBs7B.js";import{t as Fe}from"./useTimeLabels-Das5O74F.js";import{t as Ie}from"./useNestedProp-DnGoh-XS.js";import{t as Le}from"./useResponsive-CENUxfEL.js";import{t as Re}from"./useThemeCheck-BKNRbGeC.js";import{t as ze}from"./useChartExport-BZts4KFb.js";import{t as Be}from"./useTransitions-ChGGrtrv.js";import{t as Ve}from"./useStableElementSize-CegFbRlF.js";import{t as He}from"./useUserOptionState-CXlFnwPv.js";import{t as Ue}from"./useChartAccessibility-DOMuYJfm.js";import{t as We}from"./useTimeLabelCollider-BTybMUFi.js";import{n as Ge}from"./Title-BliHuXfT.js";import{t as Ke}from"./vue_ui_donut_evolution-BvIyBtun.js";import{t as qe}from"./Legend-W9YVYVX-.js";import{t as Je}from"./SlicerPreview-0m9E7Zh_.js";import{t as Ye}from"./A11yDataTable-DWNlWXzs.js";import{t as Xe}from"./BaseLegendToggle-VzX69MCo.js";import{t as Ze}from"./DefGrad-DKMq1REY.js";import{t as Qe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as l,Teleport as $e,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as et,createTextVNode as tt,createVNode as nt,defineAsyncComponent as h,guardReactiveProps as rt,mergeProps as it,nextTick as at,normalizeClass as g,normalizeProps as ot,normalizeStyle as st,onBeforeUnmount as ct,onMounted as lt,openBlock as _,ref as v,renderList as y,renderSlot as b,resolveDynamicComponent as ut,shallowRef as dt,toDisplayString as x,toRefs as ft,unref as S,watch as pt,watchEffect as mt,withCtx as C}from"vue";var ht=/* @__PURE__ */ e({default:()=>an}),gt=[`id`],_t=[`id`],vt=[`id`],yt={style:{position:`relative`}},bt=[`xmlns`,`aria-describedby`,`viewBox`],xt=[`x`,`y`,`width`,`height`],St={key:1},Ct=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],wt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Tt={key:0},Et=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Dt=[`font-size`,`fill`,`transform`],Ot=[`x`,`y`,`font-size`,`fill`],kt=[`d`,`stroke`,`stroke-width`],At=[`transform`,`font-size`,`text-anchor`,`fill`,`font-weight`],jt={key:0},Mt=[`text-anchor`,`font-size`,`fill`,`transform`],Nt=[`text-anchor`,`font-size`,`fill`,`transform`,`innerHTML`],Pt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],Ft={key:1},It=[`cx`,`cy`,`r`,`fill`],Lt={key:0},Rt={key:0},zt=[`d`,`stroke`],Bt=[`text-anchor`,`x`,`y`,`fill`],Vt=[`cx`,`cy`,`r`,`fill`],Ht={key:0},Ut=[`cx`,`cy`,`fill`],Wt={key:1},Gt=[`d`,`fill`,`stroke`],Kt={key:2},qt=[`d`,`fill`,`stroke`],Jt=[`x`,`y`,`font-size`,`fill`],Yt=[`x`,`y`,`width`,`height`,`fill`],Xt=[`x`,`y`,`width`,`height`,`onMouseenter`,`onMouseleave`,`onClick`],Zt=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],Qt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},$t={key:5,class:`vue-data-ui-watermark`},en=[`id`],tn=[`onClick`],nn={key:0},rn={key:1},an=/*#__PURE__*/ Qe({__name:`vue-ui-donut-evolution`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},zoomState:{type:Object,default:null}},emits:[`selectLegend`,`zoomStart`,`zoomEnd`,`zoomReset`,`update:zoomState`,`copyAlt`],setup(e,{expose:Qe,emit:ht}){let an=h(()=>import(`./vue-ui-accordion-DxGxf-Rm.js`).then(e=>e.n)),on=h(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),sn=h(()=>import(`./DataTable-KeuZB1JM.js`)),cn=h(()=>import(`./PackageVersion-PdpqwkYX.js`).then(e=>e.t)),ln=h(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),un=h(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),dn=h(()=>import(`./vue-ui-donut-DasGeYdl.js`).then(e=>e.n)),fn=h(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_donut_evolution:pn}=Ae(),{isThemeValid:mn,warnInvalidTheme:hn}=Re(),w=e,T=v(fe()),E=v([]),D=v(null),gn=v(null),_n=v(!1),vn=v(null),O=v(null),yn=v(null),bn=v(0),xn=v(0),Sn=v(0),Cn=v(0),wn=v(0),Tn=v(null),En=v(null),Dn=v(null),On=v(null),kn=v(!1),An=v(null),jn=v(null),Mn=dt(null),Nn=v(0),Pn=v(0),Fn=v(!1);function In(){Mn.value=O.value?.parentNode??null}function Ln(){return new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(e)})})}async function Rn(){let e=++Pn.value;await at(),await Ln(),await Ln(),e===Pn.value&&(Nn.value+=1)}function zn(){Fn.value||(Fn.value=!0,at(()=>{Fn.value=!1,In(),Rn()}))}let Bn=Ve({elementRef:Mn,minimumWidth:2,minimumHeight:2,stableFramesRequired:2,once:!1,onSizeAccepted:()=>{Rn()}}),Vn=v(null),Hn=v(null),Un=v(null),Wn=v(null),Gn=v(null),Kn=v(!1),k=dt(null),qn=dt(null),Jn=v(null),A=v(null),Yn=v(!1),j=ht,Xn=u(()=>!!w.dataset&&w.dataset.length),Zn=v(!1),Qn=0;lt(()=>{kn.value=!0,In(),Bn.start(),er(),Rn()});let $n=u(()=>M.value.debug);function er(){De(w.dataset)?(me({componentName:`VueUiDonutEvolution`,type:`dataset`,debug:$n.value}),or.value=!0):w.dataset.length&&w.dataset.forEach((e,t)=>{Ee({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{me({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:e,index:t,debug:$n.value}),or.value=!0})}),De(w.dataset)||(or.value=M.value.loading),setTimeout(()=>{Kn.value=!0},10),Cr(),M.value.responsive&&(k.value&&(qn.value&&k.value.unobserve(qn.value),k.value.disconnect()),k.value=new ResizeObserver(()=>{Kn.value=!1;let{width:e,height:t}=Le({chart:O.value,title:M.value.style.chart.title.text?Vn.value:null,legend:M.value.style.chart.legend.show?Hn.value:null,slicer:M.value.style.chart.zoom.show&&sr.value>1?Gn.value:null,source:Un.value});cancelAnimationFrame(Qn),Qn=requestAnimationFrame(()=>{L.value.width=e,L.value.height=t-12,Zn.value=!0,zn(),clearTimeout(Jn.value),Jn.value=setTimeout(()=>{Kn.value=!0},10)})}),qn.value=O.value.parentNode,k.value.observe(qn.value)),zn()}let M=v(jr()),N=u(()=>P.value.grid),P=u(()=>M.value.style.chart.layout),tr=u(()=>M.value.style.chart.dialog),F=u(()=>M.value.style.chart);Oe({config:()=>M.value,dataset:()=>w.dataset,component:`VueUiDonutEvolution`,rules:[ke.emptyArray,{test:e=>e.length===1,message:[`👀 There is only a single series in your dataset. Consider:`,``,`▶️ Using VueUiXy instead, for a regular line chart.`]},{test:e=>e.length>6,message:[`👀 The number of series is > 6, which makes donuts hard to read. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]},{test:e=>e.some(e=>e.values.length>24),message:[`👀 Some series have a number of data points > 24, which can make the chart and donuts hard to read. Consider:`,``,`▶️ Using larger time scales, or aggregated values.`,``,`▶️ Filtering the time range by adding date intputs in your UI.`,``,`▶️ Using VueUiXy to show longer series in a more comfortable display.`]}]});let{transitionEnabled:nr}=Be({config:()=>M.value.transitions,dataset:()=>w.dataset}),I=u(()=>M.value.userOptions.useCursorPointer),rr=u(()=>ve({defaultConfig:{useCssAnimation:!1,table:{show:!1},userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{dataLabels:{show:!1},grid:{stroke:`#6A6A6A`,axis:{yLabel:``,xLabel:``},yAxis:{scaleMin:null,scaleMax:null,autoScale:!1,dataLabels:{show:!1}},xAxis:{dataLabels:{show:!1}}},line:{stroke:`#CACACA60`}},legend:{backgroundColor:`transparent`,showValue:!1,showPercentage:!1},zoom:{show:!1,startIndex:null,endIndex:null}}}},userConfig:M.value.skeletonConfig??{}})),{loading:ir,FINAL_DATASET:ar,manualLoading:or}=Ne({...ft(w),FINAL_CONFIG:M,prepareConfig:jr,callback:()=>{Promise.resolve().then(async()=>{await Cr()})},skeletonDataset:w.config?.skeletonDataset??[{name:``,values:[1,2,3,5,8,13],color:`#AAAAAA`},{name:``,values:[1,2,3,5,8,13],color:`#BABABA`},{name:``,values:[1,2,3,5,8,13],color:`#CACACA`}],skeletonConfig:ve({defaultConfig:M.value,userConfig:rr.value})}),L=v({width:P.value.width,height:P.value.height}),sr=u(()=>Math.max(...ar.value.map(e=>e.values.length))),R=v({start:0,end:sr.value}),z=v(!1),cr=v(!1),B=v(null),V=v(null),H=v(null),lr=v(!1),ur=v({time:0,x:0,y:0,pointerType:null}),dr=u(()=>M.value.style.chart.zoom?.dragToZoom),U=u(()=>dr.value.show&&Xn.value&&pr.value&&Y.value>1&&!ir.value),fr=v(!1),pr=v(!1),mr=v(!1),hr=null,W={};function gr(e,t=R.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 _r(e){let t=gr(e);t&&j(`update:zoomState`,t)}function vr(){hr&&=(cancelAnimationFrame(hr),null),W={}}function yr(e,t=R.value.start){let n=Y.value,r=Number(t);return e>n?n:e<0||e<=r?Math.min(r+1,n):e}function br(){let e=Y.value;if(!Number.isFinite(e)||e<=0){R.value={start:0,end:0};return}let t=Math.max(0,Math.min(Number(R.value.start)||0,e-1)),n=Math.max(t+1,Math.min(Number(R.value.end)||e,e));(!Number.isFinite(t)||!Number.isFinite(n)||n<=t)&&(t=0,n=e),R.value={start:t,end:n},Wn.value&&Wn.value.setRangeValues(t,n)}function xr(e){let t=gr(e);if(!t)return null;let{start:n,end:r}=t;return(n!==Number(R.value.start)||r!==Number(R.value.end))&&(vr(),R.value={start:n,end:r},br(),zn()),{start:Number(R.value.start),end:Number(R.value.end)}}function Sr(e){let t=xr(e);return t?(_r(t),t):null}async function Cr(e=!0){if(!fr.value){fr.value=!0;try{await at(),await at();let{startIndex:t,endIndex:n}=F.value.zoom,r=Y.value;if(!Number.isFinite(r)||r<=0){R.value={start:0,end:0},pr.value=!0;return}let i=t==null?0:Number(t),a=n==null?r:yr(Number(n)+1,i);mr.value=!0,R.value={start:i,end:a},br(),pr.value=!0,e&&w.zoomState&&xr(w.zoomState)}finally{queueMicrotask(()=>{mr.value=!1}),fr.value=!1,zn()}}}async function wr({force:e=!1,publish:t=!1}={}){await Cr(!e),t&&(_r({start:Number(R.value.start),end:Number(R.value.end)}),j(`zoomReset`))}pt([()=>w.zoomState,pr],([e,t])=>{t&&e&&xr(e)},{deep:!0,immediate:!0});function Tr(e){W={...W,...e},hr&&cancelAnimationFrame(hr),hr=requestAnimationFrame(()=>{let e={...R.value,...W};W={},hr=null,R.value=e,br(),zn(),_r({start:Number(R.value.start),end:Number(R.value.end)})})}function Er(e){if(fr.value||mr.value)return;let t=Number(e);Number.isFinite(t)&&(j(`zoomStart`,{index:t,isZoom:t!==0}),t!==R.value.start&&Tr({start:t}))}function Dr(e){if(fr.value||mr.value)return;let t=W.start===void 0?R.value.start:W.start,n=yr(Number(e),t);Number.isFinite(n)&&(j(`zoomEnd`,{index:n,isZoom:n!==Y.value}),(n!==R.value.end||W.start!==void 0)&&Tr({end:n}))}let{userOptionsVisible:Or,setUserOptionsVisibility:kr,keepUserOptionState:Ar}=He({config:M.value}),{svgRef:G}=Ue({config:F.value.title});function jr(){let e=Ie({userConfig:w.config,defaultConfig:pn}),t={},n=e.theme;if(n){if(!mn.value(e))hn(e),t=e;else{let r=Ie({userConfig:Ke[n]||w.config,defaultConfig:e});t={...Ie({userConfig:w.config,defaultConfig:r}),customPalette:e.customPalette?e.customPalette:ye[n]||oe}}}else t=e;return t}pt(()=>w.config,e=>{ir.value||(M.value=jr()),Or.value=!M.value.userOptions.showOnChartHover,er(),Sn.value+=1,Cn.value+=1,wn.value+=1,Rr.value.showTable=M.value.table.show},{deep:!0}),pt(()=>w.dataset,e=>{Array.isArray(e)&&e.length>0&&(or.value=!1),wr()},{deep:!0});let{isPrinting:Mr,isImaging:Nr,generatePdf:Pr,generateImage:Fr}=Me({elementId:T.value,fileName:F.value.title.text||`vue-ui-donut-evolution`,options:M.value.userOptions.print}),Ir=u(()=>M.value.userOptions.show&&!F.value.title.text),Lr=u(()=>we(M.value.customPalette)),Rr=v({showTable:M.value.table.show});pt(M,()=>{Rr.value={showTable:M.value.table.show}},{immediate:!0});let zr=u(()=>({top:P.value.padding.top,right:P.value.padding.right,bottom:P.value.padding.bottom,left:P.value.padding.left})),K=u(()=>N.value.yAxis.position===`right`),{metrics:Br,ready:Vr,settling:Hr,update:Ur}=je({svgRef:G,canMeasure:()=>(!M.value.responsive||Zn.value)&&(!N.value.xAxis.dataLabels.show||qr.value),initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:e(Tn.value).textWidth,yAxisLabelWidth:e(On.value).rotatedWidth,xAxisLabelHeight:e(Dn.value).height,timeLabelsHeight:e(En.value).height})});function Wr(){let e=Br.value.scaleLabelsWidth,t=On.value?Br.value.yAxisLabelWidth+N.value.axis.yLabelOffsetX+N.value.axis.fontSize:0,n=e+t+5;return{left:K.value?0:n,right:K.value?n:0,scaleLabelsWidth:e,yAxisLabelWidth:t,crosshair:5}}ct(()=>{cancelAnimationFrame(Qn),Bn.stop(),clearTimeout(Jn.value),vr(),bi(),oi(),k.value&&(qn.value&&k.value.unobserve(qn.value),k.value.disconnect(),k.value=null,qn.value=null)});let Gr=u(()=>Br.value.xAxisLabelHeight+Br.value.timeLabelsHeight+N.value.axis.fontSize+N.value.xAxis.dataLabels.offsetY),q=u(()=>{let e=Wr(),t=P.value.dataLabels.fontSize*3,n=L.value.width,r=L.value.height,i=zr.value.left+e.left,a=n-zr.value.right-e.right,o=n-i-zr.value.right-e.right,s=r-zr.value.top-zr.value.bottom-t-Gr.value,c=zr.value.top+t;return{top:c,left:i,right:a,bottom:r-zr.value.bottom-Gr.value,absoluteHeight:r,absoluteWidth:n,centerX:i+Math.max(10,o)/2,centerY:c+Math.max(10,s)/2,width:Math.max(10,o),height:Math.max(10,s),scaleLabelsWidth:e.scaleLabelsWidth,yAxisLabelWidth:e.yAxisLabelWidth,crosshair:e.crosshair}}),J=u(()=>($n.value&&ar.value.forEach((e,t)=>{[null,void 0].includes(e.name)&&me({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:`name`,index:t}),[null,void 0].includes(e.values)&&me({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:`values`,index:t})}),ar.value.map((e,t)=>({...e,values:ue(e.values),color:de(e.color)||Lr.value[t]||oe[t]||oe[t%oe.length],length:(e.values||[]).length,uid:fe()})))),Kr=u(()=>J.value.filter(e=>!E.value.includes(e.uid)).map(e=>({...e,values:e.values.filter((e,t)=>t>=R.value.start&&t<=R.value.end)}))),Y=u(()=>Math.max(...J.value.map(e=>e.length))),X=v([]),qr=v(!1),Jr=0;mt(()=>{let e=++Jr;(async()=>{let t=await Fe({values:N.value.xAxis.dataLabels.values,maxDatapoints:Y.value,formatter:N.value.xAxis.dataLabels.datetimeFormatter,start:R.value.start,end:R.value.end});e===Jr&&(X.value=t,qr.value=!0)})()});let Z=u(()=>q.value.width/(R.value.end-R.value.start)),Yr=u(()=>{let e=[];for(let t=0;t<R.value.end-R.value.start;t+=1){let n=Kr.value.map(e=>e.values[t]??null),r=n.filter(e=>[void 0,null].includes(e)).length===n.length,i=n.reduce((e,t)=>e+t,0),a=n.map(e=>e/i),o=q.value.left+Z.value*t+Z.value/2;e.push({index:t,percentages:a,subtotal:r||i<0?null:i,values:n,x:o})}return e}),Xr=u(()=>{let e=Math.max(...Yr.value.map(e=>e.subtotal).filter(e=>ie(e)))??1,t=Math.min(...Yr.value.map(e=>e.subtotal).filter(e=>ie(e)))??0,n=Math.max(N.value.yAxis.scaleMax??0,e),r;return r=N.value.yAxis.scaleMin==null?0:Math.min(t,N.value.yAxis.scaleMin),N.value.yAxis.autoScale&&(r=t,n=e),r===n&&(r=n/2,n*=1.5),{max:n,min:r}}),Q=u(()=>{let e=Yr.value.length===1?Xr.value.max*2:Xr.value.max;return pe(Xr.value.min,e,N.value.yAxis.dataLabels.steps)});pt(()=>Q.value.ticks.join(`|`),()=>{zn()},{flush:`post`});function Zr(e){return(e-Q.value.min)/(Q.value.max-Q.value.min)}let Qr=u(()=>Q.value.ticks.map(e=>({y:q.value.bottom-q.value.height*Zr(e),value:e}))),$=u(()=>{let e=Yr.value,t=Math.max(...e.map(e=>e.subtotal));return e.length===1&&t*2,e.map((t,n)=>{let r=Math.min(q.value.width/24,Z.value/2*.7),i=r>q.value.width/16?q.value.width/16:r,a=D.value===t.index?q.value.width/16:i,o=e.length>4?r*2:r*2>Z.value/2*.7?Z.value/2*.7:r*2,s=q.value.bottom-q.value.height*Zr(t.subtotal),c=Kr.value.map(e=>({color:e.color,name:e.name,value:e.values[n]??0})).toSorted((e,t)=>t.value-e.value);return{...t,y:s,radius:i,activeRadius:a,hoverRadius:o,donut:se({series:c},t.x,s,i,i,1.99999,2,1,360,105.25,i/2),donutHover:se({series:c},t.x,s,o,o,1.99999,2,1,360,105.25,o/2),donutFocus:se({series:c},q.value.centerX,q.value.centerY,q.value.height/3.6,q.value.height/3.6,1.99999,2,1,360,105.25,q.value.height/6)}})});function $r(e,t,n){return _e(P.value.dataLabels.formatter,e,ne({p:P.value.dataLabels.prefix,v:e,s:P.value.dataLabels.suffix,r:P.value.dataLabels.rounding}),{datapoint:t,index:n})}function ei(e,t){return isNaN(e.value/re(t,`value`))?0:(e.value/re(t,`value`)*100).toFixed(0)+`%`}function ti(e){let t=G.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}}}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);if(!Number.isFinite(i)||i<=0)return null;let 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}}let ni=u(()=>!z.value||B.value==null||V.value==null?null:{x:Math.min(B.value,V.value),y:q.value.top,width:Math.abs(V.value-B.value),height:q.value.height}),ri=u(()=>pr.value?Number(R.value.start)!==0||Number(R.value.end)!==Number(Y.value):!1);function ii(e){return Math.min(Math.max(e,q.value.left),q.value.right)}function ai(){D.value=null,gn.value=null,A.value=null}function oi(e){let t=e?.pointerId==null?H.value:e.pointerId;t!=null&&G.value?.hasPointerCapture?.(t)&&G.value.releasePointerCapture(t),z.value=!1,B.value=null,V.value=null,H.value=null}function si(){lr.value=!0,setTimeout(()=>{lr.value=!1},0)}function ci(e){lr.value&&(lr.value=!1,e.preventDefault(),e.stopPropagation())}function li(e){if(!U.value||!ri.value||!e)return!1;let t=Date.now(),n=e.pointerType||`mouse`,r=ur.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?(ur.value={time:0,x:0,y:0,pointerType:null},si(),bi(),oi(e),Ui(),wr({force:!0,publish:!0}),!0):(ur.value={time:t,x:e.clientX,y:e.clientY,pointerType:n},!1)}function ui(e){let t=Number(R.value.end)-Number(R.value.start);if(t<=0||!Number.isFinite(Z.value)||Z.value<=0)return null;let n=Math.floor((ii(e)-q.value.left)/Z.value);return Math.max(0,Math.min(t-1,n))}function di(e,t){let n=ui(e),r=ui(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(R.value.start)+i,end:Number(R.value.start)+a+1}}function fi(e){let t=Sr(e);return t?(j(`zoomStart`,{index:t.start,isZoom:t.start!==0}),j(`zoomEnd`,{index:t.end,isZoom:t.end!==Y.value}),t):null}function pi(e){if(!U.value||Li.value||e.button!==void 0&&e.button!==0||H.value!=null&&e.pointerId!==H.value)return;let t=ti(e);if(!t||t.x<q.value.left||t.x>q.value.right||t.y<q.value.top||t.y>q.value.bottom||Number(R.value.end)-Number(R.value.start)<=1)return;cr.value=!0,G.value?.focus?.({preventScroll:!0}),bi(),ai();let n=ii(t.x);H.value=e.pointerId,z.value=!0,B.value=n,V.value=n}function mi(e){if(!U.value||!z.value||H.value!=null&&e.pointerId!==H.value)return;let t=ti(e);t&&(V.value=ii(t.x),ai(),B.value!=null&&Math.abs(V.value-B.value)>=2&&!G.value?.hasPointerCapture?.(e.pointerId)&&G.value?.setPointerCapture?.(e.pointerId))}function hi(e){if(!U.value||!z.value||H.value!=null&&e.pointerId!==H.value)return;let t=ti(e);t&&(V.value=ii(t.x));let n=B.value,r=V.value;if((n==null||r==null?0:Math.abs(r-n))<Math.max(4,q.value.width*.01)){if(li(e))return;oi(e);return}let i=di(Math.min(n,r),Math.max(n,r));i?(oi(e),fi(i)&&(ur.value={time:0,x:0,y:0,pointerType:null},ai(),si())):oi(e)}function gi(e){z.value||(D.value=null,gn.value=null,A.value=null,M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:e,seriesIndex:e.seriesIndex+R.value.start}))}function _i(e){z.value||(M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:e,seriesIndex:e.index+R.value.start}),D.value=e.index,gn.value=e,A.value=e.index)}let vi=v(null),yi=null;function bi(){yi&&=(clearTimeout(yi),null)}function xi(e,t){M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:e,seriesIndex:e.index+R.value.start}),e.subtotal&&tr.value.show&&(gn.value=null,D.value=null,_n.value=!0,vn.value=e,Wi(e),[null,void 0].includes(t)||(vi.value=t))}function Si(e,t){if(bi(),!U.value||!ri.value){xi(e,t);return}let n=ur.value.pointerType===`touch`?480:380;yi=setTimeout(()=>{yi=null,xi(e,t)},n)}let Ci=u(()=>J.value.map((e,t)=>({name:e.name,value:e.values.slice(R.value.start,R.value.end).reduce((e,t)=>e+t,0),shape:`circle`,uid:e.uid,color:e.color})).sort((e,t)=>t.value-e.value).map((e,t)=>({...e,opacity:E.value.includes(e.uid)?.5:1,segregate:()=>Di(e.uid),isSegregated:E.value.includes(e.uid),display:`${e.name}${F.value.legend.showPercentage||F.value.legend.showValue?`: `:``}${F.value.legend.showValue?_e(P.value.dataLabels.formatter,e.value,ne({p:P.value.dataLabels.prefix,v:e.value,s:P.value.dataLabels.suffix,r:F.value.legend.roundingValue}),{datapoint:e,seriesIndex:t}):``}${F.value.legend.showPercentage?E.value.includes(e.uid)?`${F.value.legend.showValue?` (`:``}- %${F.value.legend.showValue?`)`:``}`:`${F.value.legend.showValue?` (`:``}${isNaN(e.value/wi.value)?`-`:ne({v:e.value/wi.value*100,s:`%`,r:F.value.legend.roundingPercentage})}${F.value.legend.showValue?`)`:``}`:``}`}))),wi=u(()=>$.value.map(e=>e.subtotal).reduce((e,t)=>e+t,0)),Ti=u(()=>({cy:`donut-div-legend`,backgroundColor:F.value.legend.backgroundColor,color:F.value.legend.color,fontSize:F.value.legend.fontSize,paddingBottom:12,fontWeight:F.value.legend.bold?`bold`:``}));function Ei(){E.value.length?E.value=[]:Ci.value.forEach(e=>{E.value.push(e.uid)}),j(`selectLegend`,Kr.value)}function Di(e){if(E.value.includes(e))E.value=E.value.filter(t=>t!==e),j(`selectLegend`,Kr.value);else{if(E.value.length===J.value.length-1)return;E.value.push(e),j(`selectLegend`,Kr.value)}vn.value&&xi($.value.find((e,t)=>t===vi.value))}function Oi(e){return J.value.length?J.value.find(t=>t.name===e)||($n.value&&console.warn(`VueUiDonutEvolution - Series name not found "${e}"`),null):($n.value&&console.warn(`VueUiDonutEvolution - There are no series to show.`),null)}function ki(e){let t=Oi(e);t!==null&&E.value.includes(t.uid)&&Di(t.uid)}function Ai(e){let t=Oi(e);t!==null&&(E.value.includes(t.uid)||Di(t.uid))}let ji=u(()=>{let e=[``].concat(J.value.filter(e=>!E.value.includes(e.uid)).map(e=>({name:e.name,color:e.color})),[`Σ`]),t=[];for(let e=0;e<Y.value;e+=1){let n=J.value.filter(e=>!E.value.includes(e.uid)).map(t=>t.values[e]??0).reduce((e,t)=>e+t,0);t.push([X.value[e]?X.value[e].text:`-`].concat(J.value.filter(e=>!E.value.includes(e.uid)).map(t=>({value:t.values[e]??0,percentage:t.values[e]?t.values[e]/n*100:0})),[`${P.value.dataLabels.prefix}${Number(n.toFixed(M.value.table.td.roundingValue))}${P.value.dataLabels.suffix}`]))}return{head:e,body:t,bodyA11y:t.map(e=>e.map((t,n)=>n===0||n===e.length-1?t:`${$r(t.value??0,null,n)} (${t.percentage.toFixed(1)}%)`)),config:{th:{backgroundColor:M.value.table.th.backgroundColor,color:M.value.table.th.color,outline:M.value.table.th.outline},td:{backgroundColor:M.value.table.td.backgroundColor,color:M.value.table.td.color,outline:M.value.table.td.outline},breakpoint:M.value.table.responsiveBreakpoint},colNames:[M.value.table.columnNames.period].concat(J.value.filter(e=>!E.value.includes(e.uid)).map(e=>e.name),M.value.table.columnNames.total)}});function Mi(){return J.value}function Ni(e=null){at(()=>{let t=[[F.value.title.text],[F.value.title.subtitle.text],[``]],n=[...ji.value.head.map(e=>e.name??e)],r=[...ji.value.body.map(e=>e.map(e=>e.value??e))],i=t.concat([n]).concat(r),a=ae(i);e?e(a):be({csvContent:a,title:F.value.title.text||`vue-ui-donut-evolution`})})}let Pi=v(!1);function Fi(e){Pi.value=e,bn.value+=1}function Ii(){Rr.value.showTable=!Rr.value.showTable}let Li=v(!1);function Ri(){Li.value=!Li.value}function zi(e){return e.proportion*100>F.value.donuts.hover.hideLabelsUnderValue}let Bi=v([]),Vi=v({}),Hi=v(null);function Ui(){Hi.value?.close?.(),vn.value=null,vi.value=null,_n.value=!1,gn.value=null,D.value=null,A.value=null}function Wi(e){Bi.value=e.donut.map(e=>({name:e.name,values:[e.value],color:e.color})),Vi.value=Ce({...tr.value.donutChart,responsive:!0,theme:M.value.theme}),Hi.value&&Hi.value.open()}let Gi=te(O,()=>F.value.title.text),Ki=u(()=>L.value.width),qi=u(()=>L.value.height);We({timeLabelsEls:En,timeLabels:X,slicer:R,configRef:M,rotationPath:[`style`,`chart`,`layout`,`grid`,`xAxis`,`dataLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`layout`,`grid`,`xAxis`,`dataLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:Ki,height:qi,rotation:N.value.xAxis.dataLabels.autoRotate.angle});let Ji=u(()=>ee({config:M,style:F,mutableConfig:Rr,dialog:fn,accordion:an,isFullscreen:Pi,parent:O,maxWidth:800,isCursorPointer:I}));pt(()=>Rr.value.showTable,e=>c(e,M,An));function Yi(){Rr.value.showTable=!1,jn.value&&jn.value.setTableIconState(!1)}let Xi=u(()=>Ci.value.map(e=>({...e,name:e.display}))),Zi=u(()=>F.value.backgroundColor),Qi=u(()=>F.value.legend),$i=u(()=>F.value.title),{isCallbackImaging:ea,isCallbackSvg:ta,generateSvg:na,onGenerateImage:ra}=ze({svg:G,title:$i,legend:Qi,legendItems:Xi,backgroundColor:Zi,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:Fr});async function ia(){j(`copyAlt`,{config:M.value,dataset:$.value}),M.value.userOptions.callbacks.altCopy?await Promise.resolve(M.value.userOptions.callbacks.altCopy({config:M.value,dataset:$.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function aa(){A.value=null,Yn.value=!0}function oa(){cr.value=!1,A.value=null,D.value=null,gn.value=null,Yn.value=!1}function sa(e){if(!G.value||Li.value||document.activeElement!==G.value||(cr.value=!1,!$.value.length))return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){if(U.value&&(ri.value||z.value)){bi(),oi(),Ui(),wr({force:!0,publish:!0});return}A.value=null,D.value=null,gn.value=null;return}if(r){if(A.value===null)return;let e=$.value[A.value];if(!e)return;xi(e,A.value);return}let a=A.value,o=D.value,s=a!==null&&a>=0&&a<$.value.length,c=o!==null&&o>=0&&o<$.value.length;s?n?(a+=1,a>=$.value.length&&(a=0)):t&&(--a,a<0&&(a=$.value.length-1)):c?(a=n?o+1:o-1,a>=$.value.length&&(a=0),a<0&&(a=$.value.length-1)):a=n?0:$.value.length-1;let ee=$.value[a];ee&&_i(ee)}let ca=u(()=>({headers:ji.value?.colNames??[],rows:ji.value?.bodyA11y??[]}));Qe({getData:Mi,getImage:Gi,generatePdf:Pr,generateCsv:Ni,generateImage:Fr,generateSvg:na,hideSeries:Ai,showSeries:ki,toggleTable:Ii,toggleAnnotator:Ri,toggleFullscreen:Fi,copyAlt:ia,resetZoom:()=>wr({force:!0,publish:!0}),setZoomState:Sr}),pt(()=>[L.value.width,L.value.height,Nn.value,X.value,qr.value,R.value.start,R.value.end,N.value,P.value,M.value.style.fontFamily,w.dataset,Zn.value,Tn.value,En.value,Dn.value,On.value],Ur,{flush:`post`,deep:!0});let la=u(()=>s({enabled:M.value.userOptions?.annotator?.followZoom,area:q.value,range:R.value,ticks:Qr.value}));return(e,s)=>(_(),p(`div`,{ref_key:`donutEvolutionChart`,ref:O,class:g(`vue-data-ui-component vue-ui-donut-evolution ${Pi.value?`vue-data-ui-wrapper-fullscreen`:``} ${M.value.useCssAnimation?``:`vue-ui-dna`}`),style:st(`font-family:${M.value.style.fontFamily};width:100%; text-align:center;background:${F.value.backgroundColor}`),id:T.value,onMouseenter:s[4]||=()=>S(kr)(!0),onMouseleave:s[5]||=()=>S(kr)(!1)},[m(`div`,{id:`chart-instructions-${T.value}`,class:`sr-only`},[m(`p`,null,x(M.value.a11y.translations.keyboardNavigation),1)],8,_t),ca.value?.rows?.length?(_(),d(Ye,{key:0,uid:T.value,head:ca.value.headers,body:ca.value.rows,notice:M.value.a11y.translations.tableAvailable,caption:M.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),M.value.userOptions.buttons.annotator?(_(),d(S(ln),it({key:1},S(a)(M.value.userOptions.annotator),{svgRef:S(G),followZoom:M.value.userOptions?.annotator?.followZoom,annotationViewport:la.value,backgroundColor:F.value.backgroundColor,color:F.value.color,active:Li.value,isCursorPointer:I.value,palette:M.value.userOptions.annotatorPalette,onClose:Ri}),et({_:2},[y(S(o),t=>({name:t,fn:C(n=>[b(e.$slots,t,ot(rt(S(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),Ir.value?(_(),p(`div`,{key:2,ref_key:`noTitle`,ref:yn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),F.value.title.text?(_(),p(`div`,{key:3,ref_key:`chartTitle`,ref:Vn,style:`width:100%;background:transparent;padding-bottom:24px`,onMouseleave:gi},[(_(),d(Ge,{key:`title_${Sn.value}`,config:{title:{cy:`donut-evolution-div-title`,...F.value.title},subtitle:{cy:`donut-evolution-div-subtitle`,...F.value.title.subtitle}}},null,8,[`config`]))],544)):f(``,!0),m(`div`,{id:`legend-top-${T.value}`},null,8,vt),M.value.userOptions.show&&Xn.value&&(S(Ar)||S(Or))?(_(),d(S(un),it({ref_key:`userOptionsRef`,ref:jn,key:`user_options_${bn.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isPrinting:S(Mr),isImaging:S(Nr),uid:T.value,isFullscreen:Pi.value,chartElement:O.value},S(n)(M.value.userOptions,`pdf csv img svg table fullscreen altCopy annotator`),{isAnnotation:Li.value,tableDialog:M.value.table.useDialog,isCursorPointer:I.value,onToggleFullscreen:Fi,onGeneratePdf:S(Pr),onGenerateCsv:Ni,onGenerateImage:S(ra),onGenerateSvg:S(na),onToggleTable:Ii,onToggleAnnotator:Ri,onCopyAlt:ia,style:{visibility:S(Ar)?S(Or)?`visible`:`hidden`:`visible`}}),et({_:2},[y(S(t)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:C(n=>[b(e.$slots,t,ot(rt(S(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):f(``,!0),m(`div`,yt,[(_(),p(`svg`,{ref_key:`svgRef`,ref:G,xmlns:S(Se),"aria-describedby":`chart-instructions-${T.value}`,class:g({"vue-data-ui-fullscreen--on":Pi.value,"vue-data-ui-fulscreen--off":!Pi.value,"vue-data-ui-no-transition":!S(nr)||S(Hr),"vue-ui-donut-evolution-chart-zoom-pointer-focus":U.value&&cr.value}),viewBox:`0 0 ${q.value.absoluteWidth} ${q.value.absoluteHeight}`,style:st({maxWidth:`100%`,visibility:S(Vr)?`visible`:`hidden`,overflow:`visible`,background:`transparent`,color:F.value.color,cursor:U.value?z.value?`col-resize`:`crosshair`:void 0,touchAction:U.value?`pan-y`:void 0,userSelect:U.value?`none`:void 0}),tabindex:`0`,onFocus:aa,onBlur:oa,onKeydown:sa,onPointerdown:pi,onPointermove:mi,onPointerup:hi,onPointercancel:oi,onClickCapture:ci},[nt(S(cn)),b(e.$slots,`svg-underlayer`,{svg:{...q.value,isPrintingImg:S(Mr)||S(Nr)||S(ea),isPrintingSvg:S(ta)}},void 0,!0),e.$slots[`chart-background`]?(_(),p(`foreignObject`,{key:0,x:q.value.left,y:q.value.top,width:q.value.width,height:q.value.height,style:{pointerEvents:`none`}},[b(e.$slots,`chart-background`,{},void 0,!0)],8,xt)):f(``,!0),m(`defs`,null,[nt(Ze,{t:`linear`,id:`hover_${T.value}`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`,stops:[[`0%`,S(le)(F.value.backgroundColor,P.value.highlighter.opacity),1],[`100%`,S(le)(P.value.highlighter.color,P.value.highlighter.opacity),1]]},null,8,[`id`,`stops`]),nt(Ze,{t:`radial`,id:`focus_${T.value}`,stops:[[`0%`,S(le)(S(de)(F.value.backgroundColor),0),1],[`77%`,S(le)(`#FFFFFF`,30),1],[`100%`,S(le)(S(de)(F.value.backgroundColor),0),1]]},null,8,[`id`,`stops`])]),N.value.show?(_(),p(`g`,St,[m(`line`,{x1:K.value?q.value.right:q.value.left,x2:K.value?q.value.right:q.value.left,y1:q.value.top,y2:q.value.top+q.value.height,stroke:N.value.stroke,"stroke-width":N.value.strokeWidth,"stroke-linecap":`round`},null,8,Ct),m(`line`,{x1:q.value.left,x2:q.value.right,y1:q.value.bottom,y2:q.value.bottom,stroke:N.value.stroke,"stroke-width":N.value.strokeWidth,"stroke-linecap":`round`},null,8,wt),N.value.showVerticalLines?(_(),p(`g`,Tt,[(_(!0),p(l,null,y(R.value.end-R.value.start,(e,t)=>(_(),p(`line`,{x1:q.value.left+(t+1)*Z.value,x2:q.value.left+(t+1)*Z.value,y1:q.value.top,y2:q.value.bottom,stroke:N.value.stroke,"stroke-width":N.value.strokeWidth,"stroke-linecap":`round`},null,8,Et))),256))])):f(``,!0)])):f(``,!0),m(`g`,null,[N.value.axis.yLabel?(_(),p(`text`,{key:0,ref_key:`yAxisLabel`,ref:On,"font-size":N.value.axis.fontSize,fill:N.value.axis.color,transform:`translate(${K.value?q.value.absoluteWidth-N.value.axis.fontSize/2-N.value.axis.yLabelOffsetX:N.value.axis.fontSize}, ${q.value.top+q.value.height/2}) rotate(-90)`,"text-anchor":`middle`,style:{transition:`none`}},x(N.value.axis.yLabel),9,Dt)):f(``,!0),N.value.axis.xLabel?(_(),p(`text`,{key:1,ref_key:`xAxisLabel`,ref:Dn,"text-anchor":`middle`,x:q.value.absoluteWidth/2,y:q.value.absoluteHeight-3,"font-size":N.value.axis.fontSize,fill:N.value.axis.color},x(N.value.axis.xLabel),9,Ot)):f(``,!0)]),N.value.yAxis.dataLabels.show?(_(),p(`g`,{key:2,ref_key:`scaleLabels`,ref:Tn,class:g({"donut-opacity":!0,"donut-behind":D.value!==null})},[(_(!0),p(l,null,y(Qr.value,(e,t)=>(_(),p(`g`,{key:`sl_${t}`},[e.value>=Q.value.min&&e.value<=Q.value.max?(_(),p(`path`,{key:0,class:g({"vue-data-ui-transition":S(nr)&&!S(Hr)}),d:`M${K.value?q.value.right:q.value.left},${e.y} ${K.value?q.value.right+5:q.value.left-5},${e.y}`,stroke:N.value.stroke,"stroke-width":N.value.strokeWidth,"stroke-linecap":`round`},null,10,kt)):f(``,!0),e.value>=Q.value.min&&e.value<=Q.value.max?(_(),p(`text`,{key:1,class:g({"vue-data-ui-transition":S(nr)&&!S(Hr)}),transform:`translate(${K.value?q.value.right-N.value.yAxis.dataLabels.offsetX+7:q.value.left+N.value.yAxis.dataLabels.offsetX-7}, ${e.y+N.value.yAxis.dataLabels.fontSize/3})`,"font-size":N.value.yAxis.dataLabels.fontSize,"text-anchor":K.value?`start`:`end`,fill:N.value.yAxis.dataLabels.color,"font-weight":N.value.yAxis.dataLabels.bold?`bold`:`normal`},x(S(Te)(e.value)?S(_e)(P.value.dataLabels.formatter,e.value,S(ne)({p:P.value.dataLabels.prefix,v:e.value,s:P.value.dataLabels.suffix,r:P.value.grid.yAxis.dataLabels.roundingValue}),{datapoint:e,seriesIndex:t}):``),11,At)):f(``,!0)]))),128))],2)):f(``,!0),N.value.xAxis.dataLabels.show?(_(),p(`g`,{key:3,ref_key:`timeLabelsEls`,ref:En,class:g({"donut-opacity":!0})},[(_(!0),p(l,null,y(R.value.end-R.value.start,(e,t)=>(_(),p(`g`,null,[(N.value.xAxis.dataLabels.showOnlyFirstAndLast&&(t===0||t===Y.value-1)||!N.value.xAxis.dataLabels.showOnlyFirstAndLast)&&X.value[t]&&X.value[t].text?(_(),p(`g`,jt,[String(X.value[t].text).includes(`
|
|
2
|
-
`)?(_(),p(`text`,{key:1,class:`vue-data-ui-time-label`,"text-anchor":N.value.xAxis.dataLabels.rotation>0?`start`:N.value.xAxis.dataLabels.rotation<0?`end`:`middle`,"font-size":N.value.xAxis.dataLabels.fontSize,fill:N.value.xAxis.dataLabels.color,transform:`translate(${q.value.left+Z.value*t+Z.value/2}, ${q.value.bottom+N.value.xAxis.dataLabels.fontSize+N.value.xAxis.dataLabels.offsetY}), rotate(${N.value.xAxis.dataLabels.rotation})`,innerHTML:S(ce)({content:String(X.value[t].text),fontSize:N.value.xAxis.dataLabels.fontSize,fill:P.value.grid.xAxis.dataLabels.color,x:0,y:0})},null,8,Nt)):(_(),p(`text`,{key:0,class:`vue-data-ui-time-label`,"text-anchor":N.value.xAxis.dataLabels.rotation>0?`start`:N.value.xAxis.dataLabels.rotation<0?`end`:`middle`,"font-size":N.value.xAxis.dataLabels.fontSize,fill:N.value.xAxis.dataLabels.color,transform:`translate(${q.value.left+Z.value*t+Z.value/2}, ${q.value.bottom+N.value.xAxis.dataLabels.fontSize+N.value.xAxis.dataLabels.offsetY}), rotate(${N.value.xAxis.dataLabels.rotation})`},x(X.value[t].text||``),9,Mt))])):f(``,!0)]))),256))],512)):f(``,!0),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`g`,null,[P.value.line.show&&t<$.value.length-1&&![e.subtotal,$.value[t+1].subtotal].includes(null)?(_(),p(`line`,{key:0,class:g({"donut-opacity":!0,"donut-behind":D.value!==null}),x1:e.x,y1:e.y,x2:$.value[t+1].x,y2:$.value[t+1].y,stroke:P.value.line.stroke,"stroke-width":P.value.line.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,10,Pt)):f(``,!0),e.subtotal===null?f(``,!0):(_(),p(`g`,Ft,[e.subtotal?(_(),p(`circle`,{key:0,cx:e.x,cy:e.y,r:e.activeRadius,fill:F.value.backgroundColor},null,8,It)):f(``,!0)]))]))),256)),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`g`,{class:g({"donut-opacity":!0,"donut-behind":t!==D.value&&D.value!==null})},[e.subtotal?(_(),p(`g`,Lt,[D.value!==null&&D.value===t?(_(),p(`g`,Rt,[(_(!0),p(l,null,y(e.donutHover,t=>(_(),p(`g`,null,[zi(t)?(_(),p(`path`,{key:0,d:S(ge)(t,{x:t.center.endX,y:t.center.endY},12,12,{x:e.x,y:e.y},!1,20),stroke:t.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,zt)):f(``,!0)]))),256)),(_(!0),p(l,null,y(e.donutHover,(t,n)=>(_(),p(`g`,null,[zi(t)?(_(),p(`text`,{key:0,"data-cy-hover-label":``,"text-anchor":S(he)(t,!0,0).anchor,x:S(he)(t,!0,9).x,y:S(xe)(t,14,10),fill:N.value.yAxis.dataLabels.color,"font-size":8,"font-weight":`bold`},x(t.name)+`: `+x(ei(t,e.donut))+` (`+x(t.value===null?`-`:$r(t.value,t,n))+`) `,9,Bt)):f(``,!0)]))),256)),m(`g`,null,[m(`circle`,{cx:e.x,cy:e.y,r:e.hoverRadius,fill:F.value.backgroundColor},null,8,Vt)])])):f(``,!0)])):f(``,!0)],2))),256)),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`g`,{class:g({"donut-opacity":!0,"donut-behind":t!==D.value&&D.value!==null})},[e.subtotal===null?f(``,!0):(_(),p(`g`,Ht,[e.subtotal===0?(_(),p(`circle`,{key:0,cx:e.x,cy:e.y,r:3,fill:F.value.color},null,8,Ut)):D.value!==null&&D.value===t?(_(),p(`g`,Wt,[(_(!0),p(l,null,y(e.donutHover,(e,t)=>(_(),p(`path`,{d:e.arcSlice,fill:`${e.color}`,"stroke-width":1,stroke:F.value.backgroundColor},null,8,Gt))),256))])):(_(),p(`g`,Kt,[(_(!0),p(l,null,y(e.donut,(e,t)=>(_(),p(`path`,{d:e.arcSlice,fill:`${e.color}`,"stroke-width":.5,stroke:F.value.backgroundColor},null,8,qt))),256))]))]))],2))),256)),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`g`,{class:g({"donut-opacity":!0,"donut-behind":t!==D.value&&D.value!==null||_n.value&&t!==vn.value.index})},[e.subtotal!==null&&P.value.dataLabels.show?(_(),p(`text`,{key:0,"text-anchor":`middle`,x:e.x,y:D.value===e.index&&e.subtotal?e.y+P.value.dataLabels.fontSize/3:e.y-e.radius-P.value.dataLabels.fontSize+P.value.dataLabels.offsetY,"font-size":P.value.dataLabels.fontSize,"font-weight":`bold`,fill:P.value.dataLabels.color},x($r(e.subtotal,e,t)),9,Jt)):f(``,!0)],2))),256)),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`rect`,{x:q.value.left+t*Z.value,y:q.value.top,width:Z.value,height:q.value.height,fill:[D.value,vi.value].includes(e.index)?`url(#hover_${T.value})`:`transparent`,class:g({"donut-hover":I.value&&e.subtotal&&[D.value,vi.value].includes(e.index)}),style:{pointerEvents:`none`}},null,10,Yt))),256)),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`rect`,{"data-cy-trap":``,x:q.value.left+t*Z.value,y:q.value.top,width:Z.value,height:q.value.height,fill:`transparent`,onMouseenter:t=>_i(e),onMouseleave:t=>gi(e),onClick:n=>Si(e,t),style:st({cursor:U.value?z.value?`col-resize`:`crosshair`:void 0}),class:g({"donut-hover":I.value&&D.value===e.index&&e.subtotal})},null,46,Xt))),256)),ni.value?(_(),p(`rect`,{key:4,x:ni.value.x,y:ni.value.y,width:ni.value.width,height:ni.value.height,fill:dr.value.selection.fill,"fill-opacity":dr.value.selection.fillOpacity,stroke:dr.value.selection.stroke,"stroke-opacity":dr.value.selection.strokeOpacity,"stroke-width":dr.value.selection.strokeWidth,"stroke-dasharray":dr.value.selection.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,"pointer-events":`none`},null,8,Zt)):f(``,!0),b(e.$slots,`svg`,{svg:{...q.value,isPrintingImg:S(Mr)||S(Nr)||S(ea),isPrintingSvg:S(ta)}},void 0,!0)],46,bt)),e.$slots.hint?(_(),p(`div`,Qt,[b(e.$slots,`hint`,ot(rt({hint:M.value.a11y.translations.keyboardNavigation,isVisible:Yn.value})),void 0,!0)])):f(``,!0)]),e.$slots.watermark?(_(),p(`div`,$t,[b(e.$slots,`watermark`,ot(rt({isPrinting:S(Mr)||S(Nr)||S(ea)||S(ta)})),void 0,!0)])):f(``,!0),m(`div`,{ref_key:`chartSlicer`,ref:Gn,style:st(`width:100%;background:${F.value.backgroundColor}`),"data-dom-to-png-ignore":``},[Y.value>1&&F.value.zoom.show?(_(),d(Je,{ref_key:`slicerComponent`,ref:Wn,key:`slicer_${xn.value}`,background:F.value.zoom.color,borderColor:F.value.backgroundColor,fontSize:F.value.zoom.fontSize,useResetSlot:F.value.zoom.useResetSlot,timeLabels:X.value,textColor:F.value.color,inputColor:F.value.zoom.color,selectColor:F.value.zoom.highlightColor,max:Y.value,min:0,valueStart:R.value.start,valueEnd:R.value.end,refreshStartPoint:F.value.zoom.startIndex===null?0:F.value.zoom.startIndex,refreshEndPoint:F.value.zoom.endIndex===null?Y.value:F.value.zoom.endIndex+1,enableRangeHandles:F.value.zoom.enableRangeHandles,enableSelectionDrag:F.value.zoom.enableSelectionDrag,focusOnDrag:F.value.zoom.focusOnDrag,focusRangeRatio:F.value.zoom.focusRangeRatio,isCursorPointer:I.value,maxWidth:F.value.zoom.maxWidth,minimapLeftInsetRatio:q.value.absoluteWidth>0&&F.value.zoom.autoFit?q.value.left/q.value.absoluteWidth:null,minimapRightInsetRatio:q.value.absoluteWidth>0&&F.value.zoom.autoFit?(q.value.absoluteWidth-q.value.right)/q.value.absoluteWidth:null,"onUpdate:start":Er,"onUpdate:end":Dr,onReset:s[0]||=()=>wr({force:!0,publish:!0})},{"reset-action":C(({reset:t})=>[b(e.$slots,`reset-action`,ot(rt({reset:t})),void 0,!0)]),_:3},8,[`background`,`borderColor`,`fontSize`,`useResetSlot`,`timeLabels`,`textColor`,`inputColor`,`selectColor`,`max`,`valueStart`,`valueEnd`,`refreshStartPoint`,`refreshEndPoint`,`enableRangeHandles`,`enableSelectionDrag`,`focusOnDrag`,`focusRangeRatio`,`isCursorPointer`,`maxWidth`,`minimapLeftInsetRatio`,`minimapRightInsetRatio`])):f(``,!0)],4),m(`div`,{id:`legend-bottom-${T.value}`},null,8,en),kn.value&&(F.value.legend.show||e.$slots.legend)?(_(),d($e,{key:6,to:F.value.legend.position===`top`?`#legend-top-${T.value}`:`#legend-bottom-${T.value}`},[m(`div`,{ref_key:`chartLegend`,ref:Hn},[b(e.$slots,`legend`,{legend:Ci.value},()=>[F.value.legend.show?(_(),d(qe,{key:`legend_${wn.value}`,legendSet:Ci.value,config:Ti.value,onClickMarker:s[1]||=({legend:e})=>Di(e.uid)},{item:C(({legend:e,index:t})=>[m(`div`,{onClick:t=>Di(e.uid),style:st(`opacity:${E.value.includes(e.uid)?.5:1}`)},x(e.display),13,tn)]),legendToggle:C(()=>[Ci.value.length>2&&F.value.legend.selectAllToggle.show&&!S(ir)?(_(),d(Xe,{key:0,backgroundColor:F.value.legend.selectAllToggle.backgroundColor,color:F.value.legend.selectAllToggle.color,fontSize:F.value.legend.fontSize,checked:E.value.length>0,onToggle:Ei},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`])):f(``,!0)]),_:1},8,[`legendSet`,`config`])):f(``,!0)],!0)],512)],8,[`to`])):f(``,!0),e.$slots.source?(_(),p(`div`,{key:7,ref_key:`source`,ref:Un,dir:`auto`},[b(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),Xn.value&&M.value.userOptions.buttons.table?(_(),d(ut(Ji.value.component),it({key:8},Ji.value.props,{ref_key:`tableUnit`,ref:An,onClose:Yi}),et({content:C(()=>[(_(),d(S(sn),{key:`table_${Cn.value}`,colNames:ji.value.colNames,head:ji.value.head,body:ji.value.body,config:ji.value.config,title:M.value.table.useDialog?``:Ji.value.title,withCloseButton:!M.value.table.useDialog,isCursorPointer:I.value,onClose:Yi},{th:C(({th:e})=>[tt(x(e.name??e),1)]),td:C(({td:e})=>[e.value===null?(_(),p(`span`,nn,`-`)):(_(),p(`b`,rn,x(isNaN(e.value)?``:P.value.dataLabels.prefix)+x(!isNaN(e.value)&&e.value!==null?Number(e.value.toFixed(M.value.table.td.roundingValue)).toLocaleString():e)+x(isNaN(e.value)?``:P.value.dataLabels.suffix),1)),m(`span`,null,x(e.percentage&&!isNaN(e.percentage)?`(${Number(e.percentage.toFixed(M.value.table.td.roundingPercentage)).toLocaleString()}%)`:``),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[M.value.table.useDialog?{name:`title`,fn:C(()=>[tt(x(Ji.value.title),1)]),key:`0`}:void 0,M.value.table.useDialog?{name:`actions`,fn:C(()=>[m(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:s[2]||=e=>Ni(M.value.userOptions.callbacks.csv),style:st({cursor:I.value?`cursor`:`default`})},[nt(S(on),{name:`fileCsv`,stroke:Ji.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):f(``,!0),tr.value.show?(_(),d(S(fn),{key:9,ref_key:`dialog`,ref:Hi,onClose:s[3]||=e=>{vn.value=null,_n.value=!1,gn.value=null,D.value=null,vi.value=null},backgroundColor:tr.value.backgroundColor,color:tr.value.color,headerBg:tr.value.header.backgroundColor,headerColor:tr.value.header.color,isFullscreen:Pi.value,fullscreenParent:O.value},{title:C(()=>[tt(x(X.value[Number(vn.value.index)]?X.value[Number(vn.value.index)].text:``),1)]),content:C(()=>[vn.value?(_(),d(S(dn),{key:0,config:Vi.value,dataset:Bi.value},null,8,[`config`,`dataset`])):f(``,!0)]),_:1},8,[`backgroundColor`,`color`,`headerBg`,`headerColor`,`isFullscreen`,`fullscreenParent`])):f(``,!0),S(ir)?(_(),d(Pe,{key:10})):f(``,!0)],46,gt))}},[[`__scopeId`,`data-v-6c414930`]]);export{ht as n,an as t};
|