vue-data-ui 3.28.8 → 3.28.9
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/{PackageVersion-Bczw6rsP.js → PackageVersion-D6_O7PmZ.js} +1 -1
- package/dist/UserOptions-B9EyfU9n.js +1 -0
- package/dist/{XyAnalysisOptions-U4UJx51x.js → XyAnalysisOptions-djGOJdKc.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-age-pyramid.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-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-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-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-BEq7yyhf.js +1 -0
- package/dist/{render-common-DY4sNXDz.js → render-common-BbY81Ao2.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/vue-data-ui-BwiGr37w.js +1 -0
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-DmRrbXjK.js → vue-ui-3d-bar-C2igj6OX.js} +1 -1
- package/dist/{vue-ui-age-pyramid-CJJIp5gY.js → vue-ui-age-pyramid-DOG_ZOgO.js} +1 -1
- package/dist/{vue-ui-bullet-Br7H7FSM.js → vue-ui-bullet-HUKP90GR.js} +1 -1
- package/dist/{vue-ui-bump-DCDHNvWE.js → vue-ui-bump-BuHuxEzm.js} +1 -1
- package/dist/{vue-ui-candlestick-C_swW8gM.js → vue-ui-candlestick-CZkyowA5.js} +1 -1
- package/dist/{vue-ui-carousel-table-BP_yVdDm.js → vue-ui-carousel-table-B73USTMi.js} +1 -1
- package/dist/{vue-ui-chestnut-CIGNqBsT.js → vue-ui-chestnut-VdMHjsWk.js} +1 -1
- package/dist/{vue-ui-chord-DZRFBkRJ.js → vue-ui-chord-DfWjMAuo.js} +1 -1
- package/dist/{vue-ui-circle-pack-CtdPeMsY.js → vue-ui-circle-pack-ByV3SOkF.js} +1 -1
- package/dist/{vue-ui-cursor-DRQc_V2R.js → vue-ui-cursor-D3E3f7Lc.js} +1 -1
- package/dist/{vue-ui-dag-Cj0CcntI.js → vue-ui-dag-DlllVyCV.js} +1 -1
- package/dist/{vue-ui-dashboard-HyzHqAtX.js → vue-ui-dashboard-C9aGsEAi.js} +1 -1
- package/dist/{vue-ui-digits-CfdB0vaP.js → vue-ui-digits-p2met3a2.js} +1 -1
- package/dist/{vue-ui-donut-Cv-bYyBN.js → vue-ui-donut-BlQXnf7O.js} +1 -1
- package/dist/{vue-ui-donut-Dy4j7B9b.js → vue-ui-donut-CZbBq7bs.js} +1 -1
- package/dist/{vue-ui-donut-evolution-DL112anx.js → vue-ui-donut-evolution-Csq1sqhK.js} +1 -1
- package/dist/{vue-ui-dumbbell-owG24VsQ.js → vue-ui-dumbbell-ChLfyyGq.js} +1 -1
- package/dist/{vue-ui-flow-BMNIydqI.js → vue-ui-flow-DfEHi_Cq.js} +1 -1
- package/dist/{vue-ui-funnel-BsVS3vuI.js → vue-ui-funnel-QCG-rmsx.js} +1 -1
- package/dist/{vue-ui-galaxy-B8HgdBjc.js → vue-ui-galaxy-DFTeXUse.js} +1 -1
- package/dist/{vue-ui-gauge-B1A_NFY6.js → vue-ui-gauge-XTx--A-H.js} +1 -1
- package/dist/{vue-ui-geo-_TG4jaV9.js → vue-ui-geo-BXB5xFcV.js} +1 -1
- package/dist/{vue-ui-gizmo-D0QjzIGt.js → vue-ui-gizmo-COJHVo7O.js} +1 -1
- package/dist/{vue-ui-graph-DScVnTzu.js → vue-ui-graph-BqnyGn9p.js} +1 -1
- package/dist/{vue-ui-heatmap-BbQseEbM.js → vue-ui-heatmap-CPq3bcnS.js} +1 -1
- package/dist/{vue-ui-hill-D3V84h_t.js → vue-ui-hill-DKm3PjHT.js} +1 -1
- package/dist/{vue-ui-history-plot-Bx4WYG6U.js → vue-ui-history-plot-B5OPsHZ1.js} +1 -1
- package/dist/{vue-ui-horizontal-bar-Do0HJy4f.js → vue-ui-horizontal-bar-C8SymyhN.js} +1 -1
- package/dist/{vue-ui-kpi-CF7pAl08.js → vue-ui-kpi-D1Ps7D_O.js} +1 -1
- package/dist/{vue-ui-molecule-bAMGCA2Y.js → vue-ui-molecule-f-GNAQ0p.js} +1 -1
- package/dist/{vue-ui-mood-radar-CFpgxjuR.js → vue-ui-mood-radar-kp-jOb4S.js} +1 -1
- package/dist/{vue-ui-nested-donuts-CWY26iKX.js → vue-ui-nested-donuts-DCCSKIGa.js} +1 -1
- package/dist/{vue-ui-onion-DsBUqL_c.js → vue-ui-onion-KqzGj1z_.js} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-BF3gO85b.js → vue-ui-parallel-coordinate-plot-dn_41Wv5.js} +1 -1
- package/dist/{vue-ui-quadrant-BkNG2LGm.js → vue-ui-quadrant-CP8n4v5B.js} +1 -1
- package/dist/{vue-ui-quick-chart-CYxvgVpD.js → vue-ui-quick-chart-D8PbGpSw.js} +1 -1
- package/dist/{vue-ui-radar-0H8CiLmc.js → vue-ui-radar-ybR3N44-.js} +1 -1
- package/dist/{vue-ui-relation-circle-B0BM4xf8.js → vue-ui-relation-circle-B0PwfFpT.js} +1 -1
- package/dist/{vue-ui-ridgeline-D-fDuE3y.js → vue-ui-ridgeline-BnslUzA-.js} +1 -1
- package/dist/{vue-ui-rings-UtlBiaZZ.js → vue-ui-rings-B-cOW0Dw.js} +1 -1
- package/dist/{vue-ui-scatter-CduaARRt.js → vue-ui-scatter-BX5cTC01.js} +1 -1
- package/dist/{vue-ui-skeleton-an0peDis.js → vue-ui-skeleton-98OnGJ2N.js} +1 -1
- package/dist/{vue-ui-spark-trend-DCP7blHB.js → vue-ui-spark-trend-C4uYyXEy.js} +1 -1
- package/dist/{vue-ui-sparkbar-DT3sDgda.js → vue-ui-sparkbar-BcZyqPB9.js} +1 -1
- package/dist/{vue-ui-sparkgauge-AQt2L5dI.js → vue-ui-sparkgauge-dBZzMqn5.js} +1 -1
- package/dist/{vue-ui-sparkhistogram-a_jc2Dv2.js → vue-ui-sparkhistogram-DcbAY6vr.js} +1 -1
- package/dist/{vue-ui-sparkline-D2-KcHAU.js → vue-ui-sparkline-BizzsAR5.js} +1 -1
- package/dist/{vue-ui-sparkstackbar-CBI4S5cu.js → vue-ui-sparkstackbar-xlg048YB.js} +1 -1
- package/dist/{vue-ui-stackbar-DS_31-a3.js → vue-ui-stackbar-2AX-m3Pb.js} +1 -1
- package/dist/{vue-ui-stackline-CuxohB0U.js → vue-ui-stackline-GKaZJh8y.js} +1 -1
- package/dist/{vue-ui-strip-plot-bYGhsPA5.js → vue-ui-strip-plot-BhxIrd67.js} +1 -1
- package/dist/{vue-ui-table-lzolsJ_n.js → vue-ui-table-D9FJBxrk.js} +1 -1
- package/dist/{vue-ui-table-heatmap-D6gpmHg8.js → vue-ui-table-heatmap-SGJGI5Wq.js} +1 -1
- package/dist/{vue-ui-table-sparkline-By319cB8.js → vue-ui-table-sparkline-B6ynMUGE.js} +1 -1
- package/dist/{vue-ui-thermometer-B3Uv3aWc.js → vue-ui-thermometer-SE_c51TO.js} +1 -1
- package/dist/{vue-ui-timer-C6Pevf4N.js → vue-ui-timer-B1JNZk6j.js} +1 -1
- package/dist/{vue-ui-tiremarks-DeNdCFVD.js → vue-ui-tiremarks-Cr8EG4T5.js} +1 -1
- package/dist/{vue-ui-treemap-Ck9_llHA.js → vue-ui-treemap-DKJVe7v7.js} +1 -1
- package/dist/{vue-ui-waffle-BW2SacnV.js → vue-ui-waffle-DSq3l2sE.js} +1 -1
- package/dist/{vue-ui-wheel-BXDhx5bf.js → vue-ui-wheel-CcYOzS05.js} +1 -1
- package/dist/{vue-ui-word-cloud-DKPtoruY.js → vue-ui-word-cloud-gogYiwIU.js} +1 -1
- package/dist/{vue-ui-world-D9vpDbN7.js → vue-ui-world-C2zGhq_U.js} +1 -1
- package/dist/{vue-ui-xy-Df5gIADT.js → vue-ui-xy-B2lrTGG4.js} +1 -1
- package/dist/{vue-ui-xy-CMckdUft.js → vue-ui-xy-CpS-ASnd.js} +3 -3
- package/dist/{vue-ui-xy-canvas-CBrKi3nN.js → vue-ui-xy-canvas-CXBsRU35.js} +1 -1
- package/package.json +1 -1
- package/dist/UserOptions-DW84OKKr.js +0 -1
- package/dist/package-CNWVs68D.js +0 -1
- package/dist/vue-data-ui-BWqplouA.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-By3Vb5kz.js";import{D as n,Jt as r,X as i,at as a,nt as ee,zt as o}from"./lib-rPeBMZrn.js";import{n as te,t as ne}from"./useHints-C-TwxM0Y.js";import{t as re}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as ie}from"./useNestedProp-DnGoh-XS.js";import{n as ae,t as oe}from"./userOptionsSlots-DYuo-E5m.js";import{t as se}from"./usePrinter-DVf3YcG5.js";import{t as ce}from"./useUserOptionState-CXlFnwPv.js";import{t as le}from"./usePrefersMotion-XLHwega2.js";import{Fragment as s,computed as c,createBlock as ue,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as de,createTextVNode as f,defineAsyncComponent as fe,guardReactiveProps as pe,mergeProps as me,nextTick as he,normalizeClass as ge,normalizeProps as _e,normalizeStyle as p,onBeforeUnmount as m,onMounted as h,openBlock as g,ref as _,renderList as v,renderSlot as y,shallowRef as ve,toDisplayString as b,unref as x,useSlots as ye,watch as S,withCtx as be}from"vue";var C=/* @__PURE__ */ e({default:()=>w}),xe=[`id`],Se=[`aria-labelledby`],Ce=[`id`],we=[`height`],Te=[`id`],Ee=[`data-cell`,`aria-label`,`height`],De={key:2,ref:`source`,dir:`auto`},w=/*#__PURE__*/ re({__name:`vue-ui-carousel-table`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:re,emit:C}){let w=fe(()=>import(`./vue-ui-skeleton-an0peDis.js`).then(e=>e.n)),Oe=fe(()=>import(`./UserOptions-DW84OKKr.js`).then(e=>e.n)),{vue_ui_carousel_table:ke}=t(),Ae=le(),T=e,je=C,E=_(i()),Me=_(!1),D=_(!!T.dataset),Ne=ye();h(()=>{Pe()});let O=c({get:()=>N(),set:e=>e}),k=c(()=>O.value.debug);h(()=>{Ne[`chart-background`]&&k.value&&console.warn(`VueUiCarouselTable does not support the #chart-background slot.`)});function Pe(){o(T.dataset)?a({componentName:`VueUiCarouselTable`,type:`dataset`,debug:k.value}):((!T.dataset.head||o(T.dataset.head))&&(a({componentName:`VueUiCarouselTable`,type:`datasetAttribute`,property:`head`,debug:k.value}),D.value=!1),(!T.dataset.body||o(T.dataset.body))&&(a({componentName:`VueUiCarouselTable`,type:`datasetAttribute`,property:`body`,debug:k.value}),D.value=!1)),Ae.value&&(O.value.userOptions.buttons.animation=!1)}te({config:()=>O.value,dataset:()=>T.dataset,component:`VueUiCarouselTable`,rules:[ne.noHint]});let Fe=c(()=>O.value.userOptions.useCursorPointer),{userOptionsVisible:A,setUserOptionsVisibility:j,keepUserOptionState:M}=ce({config:O.value});function N(){return ie({userConfig:T.config,defaultConfig:ke})}S(()=>T.config,e=>{O.value=N(),A.value=!O.value.userOptions.showOnChartHover,Pe()},{deep:!0}),S(()=>T.dataset,e=>{G()},{deep:!0});let{isPrinting:P,isImaging:Ie,generatePdf:Le,generateImage:Re}=se({elementId:`carousel-table_${E.value}`,fileName:O.value.caption.text||`vue-ui-carousel-table`,options:O.value.userOptions.print}),F=_({showAnimation:O.value.animation.use}),I=_(null),ze=_(null),L=_(null),R=_(null),z=_(0),B=_(0),V=_(!1),H=_(null),U=_(null),W=_(0);function G(){H.value&&(U.value={elements:H.value.getElementsByTagName(`tr`),heights:Array.from(H.value.getElementsByTagName(`tr`)).map(e=>e.getBoundingClientRect().height)})}h(G);let Be=c(()=>!U.value||!U.value.heights.length?0:Math.max(...U.value.heights)+z.value+B.value),Ve=c(()=>T.dataset.body?O.value.tbody.tr.visible<=T.dataset.body.length?O.value.tbody.tr.visible:T.dataset.body.length:0),He=c(()=>(O.value.tbody.tr.height+O.value.tbody.tr.td.padding.top+O.value.tbody.tr.td.padding.bottom+O.value.tbody.tr.border.size*2)*Ve.value+z.value+B.value),K=_(0),q=_(null),J=_(0),Y=_(!1),Ue=_(0);h(()=>{L.value&&(z.value=L.value.getBoundingClientRect().height),R.value&&(B.value=R.value.getBoundingClientRect().height),F.value.showAnimation&&U.value&&Ge()}),h(()=>{if(I.value){let e=I.value.querySelector(`thead`),t=Array.from(H.value.querySelectorAll(`tr`));function n(){let n=e.getBoundingClientRect().bottom;t.forEach(e=>{e.getBoundingClientRect().top<n?e.style.visibility=`hidden`:e.style.visibility=`visible`})}I.value.addEventListener(`scroll`,n),n(),m(()=>{I.value.removeEventListener(`scroll`,n)})}});function We(e){Me.value=e,Ue.value+=1}function Ge(){Ae.value||!q.value&&!Y.value&&(O.value.animation.type===`scroll`?q.value=requestAnimationFrame(qe):q.value=requestAnimationFrame(Je))}function Ke(){if(!I.value)return!1;let{scrollTop:e,scrollHeight:t,clientHeight:n}=I.value;return e+n>=t}function qe(e){Y.value||(J.value||=e,e-J.value>=O.value.animation.speedMs&&(K.value+=U.value.heights[W.value],(Ke()||W.value>=U.value.heights.length)&&(K.value=0,W.value=-1),W.value+=1,I.value&&I.value.scrollTo({top:K.value,behavior:`smooth`}),J.value=e),q.value=requestAnimationFrame(qe))}function Je(e){if(Y.value)return;J.value||=e;let t=e-J.value,n=O.value.animation.speedMs/4/1e3;t>=n&&(K.value+=n,K.value>=I.value.scrollHeight-I.value.clientHeight&&(K.value=0),I.value&&I.value.scrollTo({top:K.value,behavior:`auto`}),J.value=e),q.value=requestAnimationFrame(Je)}function X(){Y.value=!0,cancelAnimationFrame(q.value),q.value=null}m(X);function Z(){Y.value&&F.value.showAnimation&&(Y.value=!1,J.value=0,Ge())}function Ye(){O.value.animation.pauseOnHover&&X()}let Q=_(null);function Xe(){X(),clearTimeout(Q.value)}function Ze(){clearTimeout(Q.value),Q.value=setTimeout(Z,1e3)}S(()=>O.value.animation.use,e=>{e?(F.value.showAnimation=!0,Z()):(F.value.showAnimation=!1,X())}),S(()=>O.value.animation.type,e=>{X(),K.value=0,W.value=0,I.value.scrollTo({top:0,behavior:`auto`}),Z()});let Qe=c(()=>O.value.responsiveBreakpoint),$=ve(null);h(()=>{$.value=new ResizeObserver(e=>{e.forEach(e=>{V.value=e.contentRect.width<Qe.value}),z.value=L.value?L.value.getBoundingClientRect().height:0,B.value=R.value?R.value.getBoundingClientRect().height:0,W.value=0,he(()=>{X(),J.value=0,K.value=0,G(),Z()})}),I.value&&$.value.observe(I.value)}),m(()=>{$.value&&$.value.disconnect()});function $e(){Le()}function et(){F.value.showAnimation=!F.value.showAnimation,F.value.showAnimation?Z():X()}function tt(e=null){he(()=>{let t=T.dataset.head.map((e,t)=>[[T.dataset.body[t]]]),r=[[O.value.caption.text],[T.dataset.head.map(e=>[e])]].concat(t),i=n(r);e?e(i):ee({csvContent:i,title:O.value.caption.text||`vue-ui-carousel-table`})})}async function nt(){je(`copyAlt`,{config:O.value,dataset:T.dataset}),O.value.userOptions.callbacks.altCopy?await Promise.resolve(O.value.userOptions.callbacks.altCopy({config:O.value,dataset:T.dataset})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}return re({pauseAnimation:X,resumeAnimation:Z,toggleAnimation:et,generateCsv:tt,generatePdf:$e,generateImage:Re,copyAlt:nt}),(t,n)=>(g(),u(`div`,{class:`vue-data-ui-component vue-ui-carousel-table`,style:{position:`relative`,overflow:`visible`},ref_key:`chartContainer`,ref:ze,onMouseenter:n[5]||=()=>x(j)(!0),onMouseleave:n[6]||=()=>x(j)(!1)},[d(`div`,{ref_key:`tableContainer`,ref:I,id:`carousel-table_${E.value}`,style:p({height:x(P)||x(Ie)?`auto`:`${Math.max(He.value,Be.value)}px`,containerType:`inline-size`,position:`relative`,overflow:`auto`,fontFamily:O.value.fontFamily}),class:ge({"vue-ui-responsive":V.value,"is-playing":O.value.scrollbar.hide||!Y.value&&O.value.scrollbar.showOnlyOnHover}),onMouseover:n[0]||=e=>Ye(),onMouseleave:n[1]||=e=>Z(),onTouchstart:n[2]||=e=>Xe(),onTouchend:n[3]||=e=>Ze(),onTouchcancel:n[4]||=e=>Ze()},[D.value?(g(),u(`table`,{key:0,class:`vue-data-ui-carousel-table`,"aria-labelledby":`carousel-caption-${E.value}`,style:p({...O.value.style,border:`${O.value.border.size}px solid ${O.value.border.color}`,width:`100%`,borderCollapse:`collapse`,backgroundColor:O.value.tbody.backgroundColor})},[d(`caption`,{ref_key:`caption`,ref:L,class:`vue-data-ui-carousel-table-caption`,id:`carousel-caption-${E.value}`,style:p({...O.value.caption.style,fontFamily:`inherit`,position:`sticky`,top:0,zIndex:2,paddingTop:O.value.caption.padding.top+`px`,paddingRight:O.value.caption.padding.right+`px`,paddingBottom:O.value.caption.padding.bottom+`px`,paddingLeft:O.value.caption.padding.left+`px`,boxShadow:V.value?O.value.thead.tr.style.boxShadow:`none`,minHeight:`36px`,display:t.$slots.caption||O.value.caption.text||O.value.userOptions.show?``:`none`})},[f(b(O.value.caption.text&&!t.$slots.caption?O.value.caption.text:``)+` `,1),y(t.$slots,`caption`,{},void 0,!0)],12,Ce),d(`thead`,{role:`rowgroup`,style:p({...O.value.thead.style,position:`sticky`,top:`${t.$slots.caption||O.value.caption.text||O.value.userOptions.show?z.value:0}px`,zIndex:1})},[d(`tr`,{ref_key:`tableRow`,ref:R,role:`row`,style:p({...O.value.thead.tr.style,border:O.value.thead.tr.border.size?`${O.value.thead.tr.border.size}px solid ${O.value.thead.tr.border.color}`:`none`,boxShadow:V.value?`none`:O.value.thead.tr.style.boxShadow}),height:`${O.value.thead.tr.height}px`},[(g(!0),u(s,null,v(e.dataset.head,(e,n)=>(g(),u(`th`,{role:`cell`,key:`th_${n}`,id:`col-${n}`,scope:`col`,style:p({...O.value.thead.tr.th.style,border:O.value.thead.tr.th.border.size?`${O.value.thead.tr.th.border.size}px solid ${O.value.thead.tr.th.border.color}`:`none`,paddingTop:O.value.thead.tr.th.padding.top+`px`,paddingRight:O.value.thead.tr.th.padding.right+`px`,paddingBottom:O.value.thead.tr.th.padding.bottom+`px`,paddingLeft:O.value.thead.tr.th.padding.left+`px`})},[f(b(t.$slots.th?``:e)+` `,1),y(t.$slots,`th`,me({ref_for:!0},{th:e,colIndex:n}),void 0,!0)],12,Te))),128))],12,we)],4),e.dataset.body&&e.dataset.head?(g(),u(`tbody`,{key:0,ref_key:`tbody`,ref:H,"aria-live":`polite`,style:{clipPath:`inset(0,0,0,0)`}},[(g(!0),u(s,null,v(e.dataset.body,(n,i)=>(g(),u(`tr`,{style:p({...O.value.tbody.tr.style,border:`${O.value.tbody.tr.border.size}px solid ${O.value.tbody.tr.border.color}`,verticalAlign:`middle`})},[(g(!0),u(s,null,v(n,(n,a)=>(g(),u(`td`,{role:`cell`,"data-cell":e.dataset.head[a]||``,"aria-label":`${e.dataset.head[a]}: ${n}`,style:p({...O.value.tbody.tr.td.style,border:`${O.value.tbody.tr.td.border.size}px solid ${O.value.tbody.tr.td.border.color}`,backgroundColor:x(r)(O.value.tbody.tr.td.style.backgroundColor,i%2==0&&O.value.tbody.tr.td.alternateColor?O.value.tbody.tr.td.alternateOpacity*100:100),paddingTop:O.value.tbody.tr.td.padding.top+`px`,paddingRight:O.value.tbody.tr.td.padding.right+`px`,paddingBottom:O.value.tbody.tr.td.padding.bottom+`px`,paddingLeft:O.value.tbody.tr.td.padding.left+`px`,verticalAlign:`middle`}),height:`${O.value.tbody.tr.height}px`},[f(b(t.$slots.td?``:n)+` `,1),y(t.$slots,`td`,me({ref_for:!0},{td:n,rowIndex:i,colIndex:a}),void 0,!0)],12,Ee))),256))],4))),256))],512)):l(``,!0)],12,Se)):l(``,!0)],46,xe),D.value?l(``,!0):(g(),ue(x(w),{key:0,config:{type:`table`}})),O.value.userOptions.show&&D.value&&(x(M)||x(A))?(g(),ue(x(Oe),{ref:`details`,key:`user_option_${Ue.value}`,backgroundColor:O.value.style.backgroundColor,color:O.value.style.color,isPrinting:x(P),isImaging:x(Ie),uid:E.value,hasTooltip:!1,hasPdf:O.value.userOptions.buttons.pdf,hasImg:O.value.userOptions.buttons.img,hasXls:O.value.userOptions.buttons.csv,hasTable:!1,hasLabel:!1,hasAnimation:O.value.userOptions.buttons.animation,isAnimation:!F.value.showAnimation,hasFullscreen:O.value.userOptions.buttons.fullscreen,hasAltCopy:O.value.userOptions.buttons.altCopy,isFullscreen:Me.value,chartElement:ze.value,position:O.value.userOptions.position,titles:{...O.value.userOptions.buttonTitles},zIndex:3,offsetX:12,callbacks:O.value.userOptions.callbacks,printScale:O.value.userOptions.print.scale,isCursorPointer:Fe.value,onGeneratePdf:$e,onGenerateCsv:tt,onGenerateImage:x(Re),onToggleAnimation:et,onToggleFullscreen:We,onCopyAlt:nt,style:p({visibility:x(M)?x(A)?`visible`:`hidden`:`visible`})},de({_:2},[v(x(ae)(t.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionAnimation optionFullscreen optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:be(n=>[y(t.$slots,e,_e(pe(x(oe)(e,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasImg`,`hasXls`,`hasAnimation`,`isAnimation`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`chartElement`,`position`,`titles`,`callbacks`,`printScale`,`isCursorPointer`,`onGenerateImage`,`style`])):l(``,!0),t.$slots.source?(g(),u(`div`,De,[y(t.$slots,`source`,{},void 0,!0)],512)):l(``,!0)],544))}},[[`__scopeId`,`data-v-f8c6267a`]]);export{C as n,w as t};
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-By3Vb5kz.js";import{D as n,Jt as r,X as i,at as a,nt as ee,zt as o}from"./lib-rPeBMZrn.js";import{n as te,t as ne}from"./useHints-C-TwxM0Y.js";import{t as re}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as ie}from"./useNestedProp-DnGoh-XS.js";import{n as ae,t as oe}from"./userOptionsSlots-DYuo-E5m.js";import{t as se}from"./usePrinter-DVf3YcG5.js";import{t as ce}from"./useUserOptionState-CXlFnwPv.js";import{t as le}from"./usePrefersMotion-XLHwega2.js";import{Fragment as s,computed as c,createBlock as ue,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as de,createTextVNode as f,defineAsyncComponent as fe,guardReactiveProps as pe,mergeProps as me,nextTick as he,normalizeClass as ge,normalizeProps as _e,normalizeStyle as p,onBeforeUnmount as m,onMounted as h,openBlock as g,ref as _,renderList as v,renderSlot as y,shallowRef as ve,toDisplayString as b,unref as x,useSlots as ye,watch as S,withCtx as be}from"vue";var C=/* @__PURE__ */ e({default:()=>w}),xe=[`id`],Se=[`aria-labelledby`],Ce=[`id`],we=[`height`],Te=[`id`],Ee=[`data-cell`,`aria-label`,`height`],De={key:2,ref:`source`,dir:`auto`},w=/*#__PURE__*/ re({__name:`vue-ui-carousel-table`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:re,emit:C}){let w=fe(()=>import(`./vue-ui-skeleton-98OnGJ2N.js`).then(e=>e.n)),Oe=fe(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),{vue_ui_carousel_table:ke}=t(),Ae=le(),T=e,je=C,E=_(i()),Me=_(!1),D=_(!!T.dataset),Ne=ye();h(()=>{Pe()});let O=c({get:()=>N(),set:e=>e}),k=c(()=>O.value.debug);h(()=>{Ne[`chart-background`]&&k.value&&console.warn(`VueUiCarouselTable does not support the #chart-background slot.`)});function Pe(){o(T.dataset)?a({componentName:`VueUiCarouselTable`,type:`dataset`,debug:k.value}):((!T.dataset.head||o(T.dataset.head))&&(a({componentName:`VueUiCarouselTable`,type:`datasetAttribute`,property:`head`,debug:k.value}),D.value=!1),(!T.dataset.body||o(T.dataset.body))&&(a({componentName:`VueUiCarouselTable`,type:`datasetAttribute`,property:`body`,debug:k.value}),D.value=!1)),Ae.value&&(O.value.userOptions.buttons.animation=!1)}te({config:()=>O.value,dataset:()=>T.dataset,component:`VueUiCarouselTable`,rules:[ne.noHint]});let Fe=c(()=>O.value.userOptions.useCursorPointer),{userOptionsVisible:A,setUserOptionsVisibility:j,keepUserOptionState:M}=ce({config:O.value});function N(){return ie({userConfig:T.config,defaultConfig:ke})}S(()=>T.config,e=>{O.value=N(),A.value=!O.value.userOptions.showOnChartHover,Pe()},{deep:!0}),S(()=>T.dataset,e=>{G()},{deep:!0});let{isPrinting:P,isImaging:Ie,generatePdf:Le,generateImage:Re}=se({elementId:`carousel-table_${E.value}`,fileName:O.value.caption.text||`vue-ui-carousel-table`,options:O.value.userOptions.print}),F=_({showAnimation:O.value.animation.use}),I=_(null),ze=_(null),L=_(null),R=_(null),z=_(0),B=_(0),V=_(!1),H=_(null),U=_(null),W=_(0);function G(){H.value&&(U.value={elements:H.value.getElementsByTagName(`tr`),heights:Array.from(H.value.getElementsByTagName(`tr`)).map(e=>e.getBoundingClientRect().height)})}h(G);let Be=c(()=>!U.value||!U.value.heights.length?0:Math.max(...U.value.heights)+z.value+B.value),Ve=c(()=>T.dataset.body?O.value.tbody.tr.visible<=T.dataset.body.length?O.value.tbody.tr.visible:T.dataset.body.length:0),He=c(()=>(O.value.tbody.tr.height+O.value.tbody.tr.td.padding.top+O.value.tbody.tr.td.padding.bottom+O.value.tbody.tr.border.size*2)*Ve.value+z.value+B.value),K=_(0),q=_(null),J=_(0),Y=_(!1),Ue=_(0);h(()=>{L.value&&(z.value=L.value.getBoundingClientRect().height),R.value&&(B.value=R.value.getBoundingClientRect().height),F.value.showAnimation&&U.value&&Ge()}),h(()=>{if(I.value){let e=I.value.querySelector(`thead`),t=Array.from(H.value.querySelectorAll(`tr`));function n(){let n=e.getBoundingClientRect().bottom;t.forEach(e=>{e.getBoundingClientRect().top<n?e.style.visibility=`hidden`:e.style.visibility=`visible`})}I.value.addEventListener(`scroll`,n),n(),m(()=>{I.value.removeEventListener(`scroll`,n)})}});function We(e){Me.value=e,Ue.value+=1}function Ge(){Ae.value||!q.value&&!Y.value&&(O.value.animation.type===`scroll`?q.value=requestAnimationFrame(qe):q.value=requestAnimationFrame(Je))}function Ke(){if(!I.value)return!1;let{scrollTop:e,scrollHeight:t,clientHeight:n}=I.value;return e+n>=t}function qe(e){Y.value||(J.value||=e,e-J.value>=O.value.animation.speedMs&&(K.value+=U.value.heights[W.value],(Ke()||W.value>=U.value.heights.length)&&(K.value=0,W.value=-1),W.value+=1,I.value&&I.value.scrollTo({top:K.value,behavior:`smooth`}),J.value=e),q.value=requestAnimationFrame(qe))}function Je(e){if(Y.value)return;J.value||=e;let t=e-J.value,n=O.value.animation.speedMs/4/1e3;t>=n&&(K.value+=n,K.value>=I.value.scrollHeight-I.value.clientHeight&&(K.value=0),I.value&&I.value.scrollTo({top:K.value,behavior:`auto`}),J.value=e),q.value=requestAnimationFrame(Je)}function X(){Y.value=!0,cancelAnimationFrame(q.value),q.value=null}m(X);function Z(){Y.value&&F.value.showAnimation&&(Y.value=!1,J.value=0,Ge())}function Ye(){O.value.animation.pauseOnHover&&X()}let Q=_(null);function Xe(){X(),clearTimeout(Q.value)}function Ze(){clearTimeout(Q.value),Q.value=setTimeout(Z,1e3)}S(()=>O.value.animation.use,e=>{e?(F.value.showAnimation=!0,Z()):(F.value.showAnimation=!1,X())}),S(()=>O.value.animation.type,e=>{X(),K.value=0,W.value=0,I.value.scrollTo({top:0,behavior:`auto`}),Z()});let Qe=c(()=>O.value.responsiveBreakpoint),$=ve(null);h(()=>{$.value=new ResizeObserver(e=>{e.forEach(e=>{V.value=e.contentRect.width<Qe.value}),z.value=L.value?L.value.getBoundingClientRect().height:0,B.value=R.value?R.value.getBoundingClientRect().height:0,W.value=0,he(()=>{X(),J.value=0,K.value=0,G(),Z()})}),I.value&&$.value.observe(I.value)}),m(()=>{$.value&&$.value.disconnect()});function $e(){Le()}function et(){F.value.showAnimation=!F.value.showAnimation,F.value.showAnimation?Z():X()}function tt(e=null){he(()=>{let t=T.dataset.head.map((e,t)=>[[T.dataset.body[t]]]),r=[[O.value.caption.text],[T.dataset.head.map(e=>[e])]].concat(t),i=n(r);e?e(i):ee({csvContent:i,title:O.value.caption.text||`vue-ui-carousel-table`})})}async function nt(){je(`copyAlt`,{config:O.value,dataset:T.dataset}),O.value.userOptions.callbacks.altCopy?await Promise.resolve(O.value.userOptions.callbacks.altCopy({config:O.value,dataset:T.dataset})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}return re({pauseAnimation:X,resumeAnimation:Z,toggleAnimation:et,generateCsv:tt,generatePdf:$e,generateImage:Re,copyAlt:nt}),(t,n)=>(g(),u(`div`,{class:`vue-data-ui-component vue-ui-carousel-table`,style:{position:`relative`,overflow:`visible`},ref_key:`chartContainer`,ref:ze,onMouseenter:n[5]||=()=>x(j)(!0),onMouseleave:n[6]||=()=>x(j)(!1)},[d(`div`,{ref_key:`tableContainer`,ref:I,id:`carousel-table_${E.value}`,style:p({height:x(P)||x(Ie)?`auto`:`${Math.max(He.value,Be.value)}px`,containerType:`inline-size`,position:`relative`,overflow:`auto`,fontFamily:O.value.fontFamily}),class:ge({"vue-ui-responsive":V.value,"is-playing":O.value.scrollbar.hide||!Y.value&&O.value.scrollbar.showOnlyOnHover}),onMouseover:n[0]||=e=>Ye(),onMouseleave:n[1]||=e=>Z(),onTouchstart:n[2]||=e=>Xe(),onTouchend:n[3]||=e=>Ze(),onTouchcancel:n[4]||=e=>Ze()},[D.value?(g(),u(`table`,{key:0,class:`vue-data-ui-carousel-table`,"aria-labelledby":`carousel-caption-${E.value}`,style:p({...O.value.style,border:`${O.value.border.size}px solid ${O.value.border.color}`,width:`100%`,borderCollapse:`collapse`,backgroundColor:O.value.tbody.backgroundColor})},[d(`caption`,{ref_key:`caption`,ref:L,class:`vue-data-ui-carousel-table-caption`,id:`carousel-caption-${E.value}`,style:p({...O.value.caption.style,fontFamily:`inherit`,position:`sticky`,top:0,zIndex:2,paddingTop:O.value.caption.padding.top+`px`,paddingRight:O.value.caption.padding.right+`px`,paddingBottom:O.value.caption.padding.bottom+`px`,paddingLeft:O.value.caption.padding.left+`px`,boxShadow:V.value?O.value.thead.tr.style.boxShadow:`none`,minHeight:`36px`,display:t.$slots.caption||O.value.caption.text||O.value.userOptions.show?``:`none`})},[f(b(O.value.caption.text&&!t.$slots.caption?O.value.caption.text:``)+` `,1),y(t.$slots,`caption`,{},void 0,!0)],12,Ce),d(`thead`,{role:`rowgroup`,style:p({...O.value.thead.style,position:`sticky`,top:`${t.$slots.caption||O.value.caption.text||O.value.userOptions.show?z.value:0}px`,zIndex:1})},[d(`tr`,{ref_key:`tableRow`,ref:R,role:`row`,style:p({...O.value.thead.tr.style,border:O.value.thead.tr.border.size?`${O.value.thead.tr.border.size}px solid ${O.value.thead.tr.border.color}`:`none`,boxShadow:V.value?`none`:O.value.thead.tr.style.boxShadow}),height:`${O.value.thead.tr.height}px`},[(g(!0),u(s,null,v(e.dataset.head,(e,n)=>(g(),u(`th`,{role:`cell`,key:`th_${n}`,id:`col-${n}`,scope:`col`,style:p({...O.value.thead.tr.th.style,border:O.value.thead.tr.th.border.size?`${O.value.thead.tr.th.border.size}px solid ${O.value.thead.tr.th.border.color}`:`none`,paddingTop:O.value.thead.tr.th.padding.top+`px`,paddingRight:O.value.thead.tr.th.padding.right+`px`,paddingBottom:O.value.thead.tr.th.padding.bottom+`px`,paddingLeft:O.value.thead.tr.th.padding.left+`px`})},[f(b(t.$slots.th?``:e)+` `,1),y(t.$slots,`th`,me({ref_for:!0},{th:e,colIndex:n}),void 0,!0)],12,Te))),128))],12,we)],4),e.dataset.body&&e.dataset.head?(g(),u(`tbody`,{key:0,ref_key:`tbody`,ref:H,"aria-live":`polite`,style:{clipPath:`inset(0,0,0,0)`}},[(g(!0),u(s,null,v(e.dataset.body,(n,i)=>(g(),u(`tr`,{style:p({...O.value.tbody.tr.style,border:`${O.value.tbody.tr.border.size}px solid ${O.value.tbody.tr.border.color}`,verticalAlign:`middle`})},[(g(!0),u(s,null,v(n,(n,a)=>(g(),u(`td`,{role:`cell`,"data-cell":e.dataset.head[a]||``,"aria-label":`${e.dataset.head[a]}: ${n}`,style:p({...O.value.tbody.tr.td.style,border:`${O.value.tbody.tr.td.border.size}px solid ${O.value.tbody.tr.td.border.color}`,backgroundColor:x(r)(O.value.tbody.tr.td.style.backgroundColor,i%2==0&&O.value.tbody.tr.td.alternateColor?O.value.tbody.tr.td.alternateOpacity*100:100),paddingTop:O.value.tbody.tr.td.padding.top+`px`,paddingRight:O.value.tbody.tr.td.padding.right+`px`,paddingBottom:O.value.tbody.tr.td.padding.bottom+`px`,paddingLeft:O.value.tbody.tr.td.padding.left+`px`,verticalAlign:`middle`}),height:`${O.value.tbody.tr.height}px`},[f(b(t.$slots.td?``:n)+` `,1),y(t.$slots,`td`,me({ref_for:!0},{td:n,rowIndex:i,colIndex:a}),void 0,!0)],12,Ee))),256))],4))),256))],512)):l(``,!0)],12,Se)):l(``,!0)],46,xe),D.value?l(``,!0):(g(),ue(x(w),{key:0,config:{type:`table`}})),O.value.userOptions.show&&D.value&&(x(M)||x(A))?(g(),ue(x(Oe),{ref:`details`,key:`user_option_${Ue.value}`,backgroundColor:O.value.style.backgroundColor,color:O.value.style.color,isPrinting:x(P),isImaging:x(Ie),uid:E.value,hasTooltip:!1,hasPdf:O.value.userOptions.buttons.pdf,hasImg:O.value.userOptions.buttons.img,hasXls:O.value.userOptions.buttons.csv,hasTable:!1,hasLabel:!1,hasAnimation:O.value.userOptions.buttons.animation,isAnimation:!F.value.showAnimation,hasFullscreen:O.value.userOptions.buttons.fullscreen,hasAltCopy:O.value.userOptions.buttons.altCopy,isFullscreen:Me.value,chartElement:ze.value,position:O.value.userOptions.position,titles:{...O.value.userOptions.buttonTitles},zIndex:3,offsetX:12,callbacks:O.value.userOptions.callbacks,printScale:O.value.userOptions.print.scale,isCursorPointer:Fe.value,onGeneratePdf:$e,onGenerateCsv:tt,onGenerateImage:x(Re),onToggleAnimation:et,onToggleFullscreen:We,onCopyAlt:nt,style:p({visibility:x(M)?x(A)?`visible`:`hidden`:`visible`})},de({_:2},[v(x(ae)(t.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionAnimation optionFullscreen optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:be(n=>[y(t.$slots,e,_e(pe(x(oe)(e,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasImg`,`hasXls`,`hasAnimation`,`isAnimation`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`chartElement`,`position`,`titles`,`callbacks`,`printScale`,`isCursorPointer`,`onGenerateImage`,`style`])):l(``,!0),t.$slots.source?(g(),u(`div`,De,[y(t.$slots,`source`,{},void 0,!0)],512)):l(``,!0)],544))}},[[`__scopeId`,`data-v-f8c6267a`]]);export{C as n,w as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,D as o,Ht as s,It as ee,Jt as c,S as te,X as ne,Yt as re,at as ie,f as l,h as ae,i as u,in as oe,nt as se,p as ce,r as le,t as ue,w as de,yt as fe,zt as pe}from"./lib-rPeBMZrn.js";import{n as me,t as he}from"./BaseScanner-8NdoBs7B.js";import{n as ge,t as _e}from"./useHints-C-TwxM0Y.js";import{t as ve}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as ye}from"./resolveChartConfig-CIhClE5R.js";import{t as be}from"./img-D4RQwASc.js";import{t as xe}from"./useChartExport-BZts4KFb.js";import{t as Se}from"./tableIntegration-CNoJ1CIY.js";import{n as Ce,t as we}from"./userOptionsSlots-DYuo-E5m.js";import{t as Te}from"./usePrinter-DVf3YcG5.js";import{t as Ee}from"./DefGrad-DKMq1REY.js";import{t as De}from"./A11yDataTable-DWNlWXzs.js";import{t as Oe}from"./useUserOptionState-CXlFnwPv.js";import{t as ke}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ae}from"./useTableResponsive-uSz_qZOB.js";import{t as je}from"./vue_ui_chestnut-BxxivKN7.js";import{Fragment as d,computed as f,createBlock as Me,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Ne,createTextVNode as Pe,createVNode as Fe,defineAsyncComponent as Ie,guardReactiveProps as Le,mergeProps as Re,nextTick as ze,normalizeClass as g,normalizeProps as Be,normalizeStyle as _,onMounted as Ve,openBlock as v,ref as y,renderList as b,renderSlot as x,resolveDynamicComponent as He,toDisplayString as S,toRefs as Ue,unref as C,useCssVars as We,watch as Ge,withCtx as Ke,withKeys as qe}from"vue";var Je=/* @__PURE__ */ e({default:()=>Bn}),Ye=[`id`],Xe=[`id`],Ze={"aria-live":`polite`,class:`sr-only`},Qe={key:2,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},$e={style:{position:`relative`}},et=[`xmlns`,`aria-describedby`,`viewBox`],tt=[`width`,`height`],nt={key:1},rt=[`fill`,`font-weight`,`font-size`,`x`,`y`],it=[`fill`,`font-weight`,`font-size`,`x`,`y`],at={key:2},ot=[`x`,`y`,`font-size`,`font-weight`,`fill`],st=[`x`,`y`,`font-size`,`font-weight`,`fill`],ct=[`d`,`stroke`,`fill`],lt=[`cx`,`cy`,`r`,`fill`],ut=[`aria-label`,`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`,`onClick`],dt={key:3},ft=[`x`,`y`,`font-size`,`fill`,`onClick`],pt={key:0},mt=[`x`,`y`,`fill`,`font-size`,`font-weight`],ht=[`x`,`y`,`height`,`width`,`fill`,`rx`,`onClick`],gt=[`aria-label`,`x`,`y`,`height`,`width`,`fill`,`rx`,`stroke`,`stroke-width`,`onClick`],_t={key:4},vt=[`x`,`y`,`fill`,`font-size`,`onClick`],yt=[`d`,`stroke`],bt=[`aria-label`,`fill`,`cx`,`cy`,`r`,`onClick`],xt={key:5},St=[`x`,`y`,`font-size`,`font-weight`,`fill`],Ct=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],wt=[`y`,`height`,`width`],Tt={style:{width:`100%`,height:`100%`,display:`flex`,"align-items":`center`,"justify-content":`center`,"flex-direction":`column`}},Et={style:{display:`flex`,"align-items":`center`,"justify-content":`center`,gap:`12px`,"flex-wrap":`wrap`,"flex-direction":`row`}},Dt={viewBox:`0 0 20 20`,height:`16`,width:`16`},Ot=[`fill`],kt={key:7},At=[`y`,`height`,`width`],jt={style:{width:`100%`,height:`100%`,display:`flex`,"align-items":`center`,"justify-content":`center`,"flex-direction":`column`}},Mt={style:{display:`flex`,"align-items":`center`,"justify-content":`center`,gap:`12px`,"flex-wrap":`wrap`,"flex-direction":`row`}},Nt={viewBox:`0 0 20 20`,height:`16`,width:`16`},Pt=[`fill`],Ft=[`cx`,`cy`,`fill`],It=[`d`,`stroke`],Lt=[`cx`,`cy`,`fill`],Rt=[`d`,`stroke`],zt=[`cx`,`cy`,`fill`],Bt=[`cx`,`cy`,`fill`],Vt=[`x`,`y`,`fill`,`font-size`,`font-weight`],Ht=[`x`,`y`,`fill`,`font-size`,`font-weight`],Ut=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Wt=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Gt=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Kt=[`x`,`text-anchor`,`y`,`fill`,`font-size`],qt=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Jt=[`x`,`y`,`font-size`,`fill`],Yt=[`x`,`y`,`font-size`,`fill`],Xt=[`x`,`y`,`font-size`,`fill`],Zt={key:4,class:`vue-data-ui-watermark`},Qt={key:5,ref:`source`,dir:`auto`},$t={class:`vue-ui-data-table`},en={key:0},tn=[`data-cell`],nn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},rn={key:0},an={key:1},on=[`data-cell`],sn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},cn={key:0},ln={key:1},un=[`data-cell`],dn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},fn={key:0},pn={key:1},mn=[`data-cell`],hn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},gn={key:0},_n={key:1},vn=[`data-cell`],yn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},bn={key:0},xn={key:1},Sn=[`data-cell`],Cn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},wn={key:0},Tn={key:1},En=[`data-cell`],Dn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},On={key:0},kn={key:1},An=[`data-cell`],jn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Mn=[`data-cell`],Nn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Pn=[`data-cell`],Fn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},In=[`data-cell`],Ln={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Rn=[`data-cell`],zn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Bn=/*#__PURE__*/ ve({__name:`vue-ui-chestnut`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectRoot`,`selectBranch`,`selectNut`,`copyAlt`],setup(e,{expose:ve,emit:Je}){We(e=>({v5624e750:e.tdo}));let Bn=Ie(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Vn=Ie(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Hn=Ie(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Un=Ie(()=>import(`./UserOptions-DW84OKKr.js`).then(e=>e.n)),Wn=Ie(()=>import(`./PackageVersion-Bczw6rsP.js`).then(e=>e.t)),Gn=Ie(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_chestnut:Kn}=i(),w=e,qn=f(()=>!!w.dataset&&w.dataset.length),T=y(ne()),Jn=y(null),Yn=y(0),Xn=y(null),Zn=y(null),Qn=y(!1),E=y(!1),D=y(``),O=y({level:`root`,rootIndex:0,branchIndex:0,nutIndex:0,locked:!1}),k=y(or()),A=f(()=>k.value.style.chart.layout.roots),j=f(()=>k.value.style.chart.layout.branches),M=f(()=>k.value.style.chart.layout.nuts),N=f(()=>k.value.style.chart.layout),P=f(()=>k.value.style.chart);ge({config:()=>k.value,dataset:()=>w.dataset,component:`VueUiChestnut`,rules:[_e.emptyArray,{test:e=>e.some(e=>e?.branches&&e.branches.length>10),message:[`👀 Some root has > 10 branches, which can make the chart heavy. Consider:`,``,`▶️ Grouping some branches in broader categories.`]},{test:e=>e.some(e=>e?.branches&&e.branches.some(e=>e?.breakdown&&e?.breakdown.length>6)),message:[`👀 Some donuts have > 6 series. Consider:`,``,`▶️ Grouping small values into an "Other" category.`]}]});let F=f(()=>k.value.userOptions.useCursorPointer),$n=f(()=>oe({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{grandTotal:{show:!1},roots:{stroke:`#6A6A6A`,labels:{show:!1}},verticalSeparator:{stroke:`transparent`},branches:{stroke:`#6A6A6A`,underlayerColor:`#6A6A6A90`,labels:{show:!1,dataLabels:{show:!1}}}}}}},userConfig:k.value.skeletonConfig??{}})),{loading:er,FINAL_DATASET:tr}=me({...Ue(w),FINAL_CONFIG:k,prepareConfig:or,skeletonDataset:w.config?.skeletonDataset??[{name:`_`,color:`#969696`,branches:[{name:`_`,value:32,breakdown:[{name:`_`,value:16,color:`#CACACA`},{name:`_`,value:16,color:`#6A6A6A`}]},{name:`_`,value:16,breakdown:[{name:`_`,value:8,color:`#CACACA`},{name:`_`,value:8,color:`#6A6A6A`}]},{name:`_`,value:8,breakdown:[{name:`_`,value:4,color:`#CACACA`},{name:`_`,value:4,color:`#6A6A6A`}]},{name:`_`,value:4,breakdown:[{name:`_`,value:2,color:`#CACACA`},{name:`_`,value:2,color:`#6A6A6A`}]}]},{name:`_`,color:`#C4C4C4`,branches:[{name:`_`,value:24,breakdown:[{name:`_`,value:12,color:`#CACACA`},{name:`_`,value:12,color:`#6A6A6A`}]},{name:`_`,value:12,breakdown:[{name:`_`,value:6,color:`#CACACA`},{name:`_`,value:6,color:`#6A6A6A`}]},{name:`_`,value:6,breakdown:[{name:`_`,value:3,color:`#CACACA`},{name:`_`,value:3,color:`#6A6A6A`}]},{name:`_`,value:2,breakdown:[{name:`_`,value:1,color:`#CACACA`},{name:`_`,value:1,color:`#6A6A6A`}]}]}],skeletonConfig:oe({defaultConfig:k.value,userConfig:$n.value})}),{userOptionsVisible:nr,setUserOptionsVisibility:rr,keepUserOptionState:ir}=Oe({config:k.value}),{svgRef:ar}=ke({config:N.value.title});function or(){return ye(w.config,Kn,je)}Ge(()=>w.config,e=>{k.value=or(),nr.value=!k.value.userOptions.showOnChartHover,pr.value.showTable=k.value.table.show,Pr()},{deep:!0});let{isPrinting:sr,isImaging:cr,generatePdf:lr,generateImage:ur}=Te({elementId:`vue-ui-chestnut_${T.value}`,fileName:N.value.title.text||`vue-ui-chestnut`,options:k.value.userOptions.print}),dr=f(()=>k.value.userOptions.show),fr=f(()=>de(k.value.customPalette)),pr=y({showTable:k.value.table.show});Ge(k,()=>{pr.value={showTable:k.value.table.show}},{immediate:!0});let mr=y(null),hr=f(()=>k.value.table.responsiveBreakpoint),I=y({gap:6,padding:{top:102,left:12,right:12,bottom:96},width:1024,height:0,branchSize:32,branchStart:128}),L=f(()=>({left:I.value.padding.left,top:I.value.padding.top,right:I.value.width-I.value.padding.right,bottom:I.value.height-I.value.padding.bottom,width:I.value.width-(I.value.padding.left+I.value.padding.right),height:I.value.height-(I.value.padding.top+I.value.padding.bottom),seedX:I.value.padding.left+64})),R=f(()=>tr.value.flatMap(e=>(e.branches||[]).map(e=>e.value||0)).reduce((e,t)=>e+t,0)),gr=f(()=>k.value.debug),z=f(()=>(gr.value&&tr.value.forEach((e,t)=>{fe({datasetObject:e,requiredAttributes:[`name`,`branches`]}).forEach(e=>{ie({componentName:`VueUiChestnut`,type:`datasetSerieAttribute`,property:e,index:t})}),e.branches&&e.branches.forEach((e,n)=>{fe({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{ie({componentName:`VueUiChestnut`,type:`datasetSerieAttribute`,property:e,index:`${t} - ${n}`})}),e.breakdown&&e.breakdown.forEach((e,r)=>{fe({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{ie({componentName:`VueUiChestnut`,type:`datasetSerieAttribute`,property:e,index:`${t} - ${n} - ${r}`})})})})}),tr.value.map((e,t)=>{let n=(e.branches||[]).map(e=>e.value||0).reduce((e,t)=>e+t,0);return{...e,color:te(e.color)||fr.value[t]||s[t]||s[t%s.length],id:e.id||`root_${t}_${T.value}`,type:`root`,total:n,rootIndex:t,branches:(e.branches||[]).map((r,i)=>({...r,rootName:e.name,rootIndex:t,color:te(e.color)||fr.value[t]||s[t]||s[t%s.length],value:r.value>=0?r.value:0,id:r.id||`branch_${t}_${i}_${T.value}`,proportionToRoot:r.value/n,type:`branch`,breakdown:(r.breakdown||[]).map((a,o)=>({table:{rootName:e.name,rootValue:n,rootToTotal:n/R.value,branchName:r.name,branchValue:r.value,branchToTotal:r.value/R.value,branchToRoot:r.value/n,nutName:a.name,nutValue:a.value,nutToTotal:a.value/R.value,nutToRoot:a.value/n,nutToBranch:a.value/r.value},...a,type:`nut`,branchName:r.name,rootName:e.name,branchTotal:r.value>=0?r.value:0,proportionToBranch:a.value/r.value,proportionToRoot:a.value/n,proportionToTree:a.value/R.value,rootIndex:t,id:a.id||`nut_${t}_${i}_${o}_${T.value}`,color:te(a.color)||fr.value[o]||s[o]||s[o%s.length],value:a.value>=0?a.value:0}))}))}})));function _r(){return z.value}let vr=Je,yr=f(()=>z.value.flatMap(e=>e.branches).length),br=f(()=>Math.max(...z.value.map(e=>e.branches.map(e=>e.value).reduce((e,t)=>e+t,0)))),xr=f(()=>Math.max(...z.value.flatMap(e=>e.branches.map(e=>e.value)))),Sr=f(()=>256+I.value.padding.left),B=f(()=>z.value.sort((e,t)=>t.total-e.total).map((e,t)=>{let n=L.value.height/z.value.length/2,r=e.total/br.value*(n>64?64:n);return{...e,x:L.value.seedX,y:L.value.top+L.value.height/z.value.length*(t+1)-(L.value.height/z.value.length/2+I.value.gap/2),r:r<I.value.branchSize/2?I.value.branchSize/2:r}})),Cr=f(()=>j.value.widthRatio<=0?.1:j.value.widthRatio>1.8?1.8:j.value.widthRatio),wr=f(()=>B.value.flatMap(e=>e.branches)),V=f(()=>wr.value.sort((e,t)=>t.value-e.value).map((e,t)=>({...e,y1:t*I.value.branchSize+L.value.top+t*I.value.gap,y2:t*I.value.branchSize+I.value.branchSize,x1:Sr.value,x2:384*e.value/xr.value*Cr.value+Sr.value}))),Tr=f(()=>B.value),Er=f(()=>Tr.value.map(e=>V.value.filter(t=>t.rootIndex===e.rootIndex).sort((e,t)=>e.y1-t.y1))),Dr=f(()=>Tr.value.map((e,t)=>Er.value[t].map(e=>(e.breakdown||[]).map((t,n)=>({...t,nutIndex:n,rootIndex:e.rootIndex,branchId:e.id,branchName:e.name,branchValue:e.value,rootName:e.rootName})))));function Or(e){let t=B.value.find(t=>t.rootIndex===e.rootIndex);return{x:t.x,y:t.y,r:t.r}}let H=y(null),U=y(null),W=y(null),G=y(null);function K(){H.value=null,W.value=null,G.value=null}function q(e){if(H.value)return e.type===`root`?e.rootIndex===H.value.rootIndex:e.type===`branch`?e.id===H.value.id:e.type===`nut`&&e.branchName===H.value.name&&e.rootIndex===H.value.rootIndex;if(W.value)return e.type===`root`?e.rootIndex===W.value.rootIndex:e.type===`branch`?e.id===W.value.id:e.type===`nut`&&e.branchName===W.value.name&&e.rootIndex===W.value.rootIndex;if(G.value)return e.type===`root`?e.id===G.value.id:e.type===`branch`||e.type===`nut`?e.rootIndex===G.value.rootIndex:!1;if(li.value&&E.value){if(O.value.level===`root`)return e.type===`root`?Z.value&&e.id===Z.value.id:e.type===`branch`||e.type===`nut`?Z.value&&e.rootIndex===Z.value.rootIndex:!1;if(O.value.level===`branch`)return e.type===`root`?Z.value&&e.rootIndex===Z.value.rootIndex:e.type===`branch`?si.value&&e.id===si.value.id:(e.type,!1);if(O.value.level===`nut`)return e.type===`root`?Z.value&&e.rootIndex===Z.value.rootIndex:e.type===`branch`?ci.value&&e.id===ci.value.id:e.type===`nut`&&ci.value&&e.branchName===ci.value.name&&e.rootIndex===ci.value.rootIndex}return!0}function kr(e){K();let t=Tr.value.findIndex(t=>t.rootIndex===e.rootIndex),n=(Er.value[t]||[]).findIndex(t=>t.id===e.id);t!==-1&&(O.value.rootIndex=t),n!==-1&&(O.value.branchIndex=n),O.value.level=`nut`,O.value.nutIndex=0,ze(()=>{H.value=e,W.value=e,U.value=ee({series:e.breakdown,base:1},e.x2+24+M.value.offsetX,e.y1+I.value.branchSize/2,80,80),vr(`selectNut`,e.breakdown),Q()})}function J(){H.value=null,U.value=null,vr(`selectNut`,null)}function Ar(e){let t=Tr.value.findIndex(t=>t.rootIndex===e.rootIndex),n=(Er.value[t]||[]).findIndex(t=>t.id===e.id);t!==-1&&(O.value.rootIndex=t),n!==-1&&(O.value.branchIndex=n),O.value.level=`branch`,O.value.nutIndex=0,W.value&&W.value.id===e.id?(W.value=null,K(),vr(`selectBranch`,null),Q()):(K(),W.value=e,vr(`selectBranch`,e),Q())}function jr(e){let t=Tr.value.findIndex(t=>t.id===e.id);t!==-1&&(O.value.rootIndex=t),O.value.level=`root`,O.value.branchIndex=0,O.value.nutIndex=0,G.value&&G.value.id===e.id?(K(),vr(`selectRoot`,null),Q()):(K(),G.value=e,vr(`selectRoot`,e),Q())}function Mr(){return L.value.bottom-(H.value.y1+180)<0?0:L.value.bottom}function Nr(e){return e.proportion*100>M.value.selected.labels.dataLabels.hideUnderValue}Ve(()=>{Pr()});function Pr(){pe(w.dataset)&&ie({componentName:`VueUiChestnut`,type:`dataset`,debug:gr.value});let e=yr.value*(I.value.branchSize+I.value.gap)+I.value.padding.top+I.value.padding.bottom;I.value.height=e}let Y=f(()=>({head:[k.value.table.th.translations.rootName,k.value.table.th.translations.rootValue,k.value.table.th.translations.rootToTotal,k.value.table.th.translations.branchName,k.value.table.th.translations.branchValue,k.value.table.th.translations.branchToRoot,k.value.table.th.translations.branchToTotal,k.value.table.th.translations.nutName,k.value.table.th.translations.nutValue,k.value.table.th.translations.nutToBranch,k.value.table.th.translations.nutToRoot,k.value.table.th.translations.nutToTotal],body:z.value.flatMap((e,t)=>e.branches.flatMap((e,t)=>e.breakdown.flatMap((e,t)=>e.table)))}));function Fr(e=null){ze(()=>{let t=[[N.value.title.text],[N.value.title.subtitle.text],[``],[`Grand total`,R.value],[``]],n=Y.value.head,r=Y.value.body.map((e,t)=>[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?``:e.rootName,Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?``:e.rootValue,Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?``:e.rootToTotal,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchName,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchValue,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchToRoot,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchToTotal,e.nutName,e.nutValue,e.nutToBranch,e.nutToRoot,e.nutToTotal]),i=t.concat([n]).concat(r),a=o(i);e?e(a):se({csvContent:a,title:N.value.title.text||`vue-ui-chestnut`})})}let Ir=y(!1);function Lr(e){Ir.value=e,Yn.value+=1}function Rr(){pr.value.showTable=!pr.value.showTable}let zr=y(!1);function Br(){zr.value=!zr.value}async function Vr({scale:e=2}={}){if(!Jn.value)return;let{width:t,height:n}=Jn.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await be({domElement:Jn.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:N.value.title.text,width:t,height:n,aspectRatio:r}}function Hr(e){let t=Or(e),n=e.x1,r=e.y1,i=I.value.branchSize,a=t.x+t.r/2,o=t.y;return[`M ${n},${r}`,`C ${n-20},${r} ${n-20},${r} ${a},${o}`,`C ${a},${o} ${n-20},${r+i} ${n},${r+i}`,`Z`].join(` `)}let Ur=f(()=>Se({config:k,style:P,mutableConfig:pr,dialog:Gn,accordion:Vn,isFullscreen:Ir,parent:Jn,maxWidth:800,titleStyle:N,isCursorPointer:F}));Ge(()=>pr.value.showTable,async e=>{k.value.table.show||(e&&k.value.table.useDialog&&Xn.value?(await ze(),Xn.value.open()):`close`in Xn.value&&Xn.value.close())});let{isResponsive:Wr}=Ae(mr,hr);function Gr(){pr.value.showTable=!1,Zn.value&&Zn.value.setTableIconState(!1)}let Kr=f(()=>z.value.map((e,t)=>({...e,display:`${e.name}: ${u(A.value.labels.formatter,e.total,a({p:N.value.legend.prefix,v:e.total,s:N.value.legend.suffix,r:N.value.legend.roundingValue}),{datapoint:e})} (${a({v:e.total/R.value*100,s:`%`,r:N.value.legend.roundingPercentage})})`}))),qr=f(()=>Kr.value.map(e=>({color:e.color,name:e.display,shape:`circle`}))),Jr=f(()=>P.value.backgroundColor),Yr=f(()=>({...N.value.legend,textAlign:`center`,show:!0,position:`bottom`})),Xr=f(()=>N.value.title),{isCallbackImaging:Zr,isCallbackSvg:Qr,generateSvg:$r,onGenerateImage:ei}=xe({svg:ar,title:Xr,legend:Yr,legendItems:qr,backgroundColor:Jr,titleEmbedded:!0,getSvgCallback:()=>k.value.userOptions.callbacks.svg,generateImage:ur});async function ti(){vr(`copyAlt`,{config:k.value,dataset:z.value}),k.value.userOptions.callbacks.altCopy?await Promise.resolve(k.value.userOptions.callbacks.altCopy({config:k.value,dataset:z.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function ni(e){if(!e)return``;let t=a({p:N.value.legend.prefix,v:e.total,s:N.value.legend.suffix,r:N.value.legend.roundingValue}),n=a({v:e.total/R.value*100,s:`%`,r:N.value.legend.roundingPercentage});return`Root ${e.name}. Value ${t}. ${n} of total.`}function ri(e){if(!e)return``;let t=a({p:j.value.labels.dataLabels.prefix,v:e.value,s:j.value.labels.dataLabels.suffix,r:j.value.labels.dataLabels.roundingValue}),n=a({v:e.proportionToRoot*100,s:`%`,r:N.value.legend.roundingPercentage});return`Branch ${e.name}. Root ${e.rootName}. Value ${t}. ${n} of root ${e.rootName}.`}function ii(e){if(!e)return``;let t=a({p:N.value.legend.prefix,v:e.value,s:N.value.legend.suffix,r:M.value.selected.labels.roundingValue}),n=a({v:e.proportionToBranch*100,s:`%`,r:M.value.selected.labels.roundingPercentage});return`Nut ${e.name}. Branch ${e.branchName}. Root ${e.rootName}. Value ${t}. ${n} of branch ${e.branchName}.`}let ai=f(()=>Tr.value[O.value.rootIndex]||null),X=f(()=>(Er.value[O.value.rootIndex]||[])[O.value.branchIndex]||null),oi=f(()=>((Dr.value[O.value.rootIndex]||[])[O.value.branchIndex]||[])[O.value.nutIndex]||null),Z=f(()=>ai.value),si=f(()=>X.value),ci=f(()=>O.value.level===`nut`?X.value:null),li=f(()=>Qn.value);function Q(){O.value.level===`root`?D.value=ni(ai.value):O.value.level===`branch`?D.value=ri(X.value):O.value.level===`nut`&&(D.value=ii(oi.value))}function $(){O.value={level:`root`,rootIndex:0,branchIndex:0,nutIndex:0,locked:!1},D.value=``}function ui(){let e=Er.value[O.value.rootIndex]||[];e.length?(O.value.branchIndex>=e.length&&(O.value.branchIndex=0),O.value.branchIndex<0&&(O.value.branchIndex=e.length-1)):O.value.branchIndex=0}function di(){let e=(Dr.value[O.value.rootIndex]||[])[O.value.branchIndex]||[];e.length?(O.value.nutIndex>=e.length&&(O.value.nutIndex=0),O.value.nutIndex<0&&(O.value.nutIndex=e.length-1)):O.value.nutIndex=0}function fi(e){if(O.value.level===`root`){let t=Tr.value.length;if(!t)return;O.value.rootIndex+=e,O.value.rootIndex>=t&&(O.value.rootIndex=0),O.value.rootIndex<0&&(O.value.rootIndex=t-1),O.value.branchIndex=0,O.value.nutIndex=0,Q()}else O.value.level===`branch`?(O.value.branchIndex+=e,ui(),O.value.nutIndex=0,Q()):O.value.level===`nut`&&(O.value.nutIndex+=e,di(),Q())}function pi(e){if(e>0){if(O.value.level===`root`){if(!(Er.value[O.value.rootIndex]||[]).length)return;O.value.level=`branch`,O.value.branchIndex=0,O.value.nutIndex=0,Q();return}if(O.value.level===`branch`){if(!((Dr.value[O.value.rootIndex]||[])[O.value.branchIndex]||[]).length)return;O.value.level=`nut`,O.value.nutIndex=0,X.value?kr(X.value):Q();return}}else O.value.level===`nut`?(J(),W.value=null,O.value.level=`branch`,O.value.nutIndex=0,Q()):O.value.level===`branch`&&(W.value=null,G.value=null,O.value.level=`root`,O.value.nutIndex=0,Q())}function mi(){O.value.level===`root`&&ai.value?(jr(ai.value),D.value=`${ni(ai.value)} selected.`):O.value.level===`branch`&&X.value?(Ar(X.value),D.value=`${ri(X.value)} selected.`):O.value.level===`nut`&&X.value&&oi.value&&(kr(X.value),D.value=`${ii(oi.value)} details opened.`)}function hi(){Qn.value=!0,E.value=!1}function gi(){Qn.value=!1,E.value=!1,D.value=``,G.value||W.value||H.value||$()}function _i(e){let t=e.key===`ArrowUp`,n=e.key===`ArrowDown`,r=e.key===`ArrowLeft`,i=e.key===`ArrowRight`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;(t||n||r||i||a||o)&&(e.preventDefault(),e.stopPropagation(),Qn.value||=!0,o?(K(),$(),E.value=!1):((t||n||r||i)&&(E.value=!0),t?fi(-1):n?fi(1):r?pi(-1):i?pi(1):a&&mi()))}let vi=f(()=>({headers:Y.value.head,rows:Y.value.body.map(e=>[e.rootName,e.rootValue,a({v:e.rootToTotal*100,s:`%`,r:k.value.table.td.roundingPercentage}),e.branchName,e.branchValue,a({v:e.branchToRoot*100,s:`%`,r:k.value.table.td.roundingPercentage}),a({v:e.branchToTotal*100,s:`%`,r:k.value.table.td.roundingPercentage}),e.nutName,e.nutValue,a({v:e.nutToBranch*100,s:`%`,r:k.value.table.td.roundingPercentage}),a({v:e.nutToRoot*100,s:`%`,r:k.value.table.td.roundingPercentage}),a({v:e.nutToTotal*100,s:`%`,r:k.value.table.td.roundingPercentage})])}));return ve({getData:_r,getImage:Vr,generatePdf:lr,generateCsv:Fr,generateImage:ur,generateSvg:$r,toggleTable:Rr,toggleAnnotator:Br,toggleFullscreen:Lr,copyAlt:ti}),(e,i)=>(v(),m(`div`,{class:g(`vue-data-ui-component vue-ui-chestnut ${Ir.value?`vue-data-ui-wrapper-fullscreen`:``}`),ref_key:`chestnutChart`,ref:Jn,id:`vue-ui-chestnut_${T.value}`,style:_(`font-family:${k.value.style.fontFamily};width:100%; text-align:center;background:${P.value.backgroundColor}`),onMouseenter:i[12]||=()=>C(rr)(!0),onMouseleave:i[13]||=()=>C(rr)(!1)},[h(`div`,{id:`chart-instructions-${T.value}`,class:`sr-only`},[h(`p`,null,S(k.value.a11y.translations.keyboardNavigation),1)],8,Xe),h(`div`,Ze,S(D.value),1),vi.value?.rows?.length?(v(),Me(De,{key:0,uid:T.value,head:vi.value.headers,body:vi.value.rows,notice:k.value.a11y.translations.tableAvailable,caption:k.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):p(``,!0),k.value.userOptions.buttons.annotator?(v(),Me(C(Hn),Re({key:1},C(n)(k.value.userOptions.annotator),{svgRef:C(ar),backgroundColor:P.value.backgroundColor,color:P.value.color,active:zr.value,isCursorPointer:F.value,palette:k.value.userOptions.annotatorPalette,onClose:Br}),Ne({_:2},[b(C(r),n=>({name:n,fn:Ke(r=>[x(e.$slots,n,Be(Le(C(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),dr.value?(v(),m(`div`,Qe,null,512)):p(``,!0),k.value.userOptions.show&&qn.value&&(C(ir)||C(nr))?(v(),Me(C(Un),{ref_key:`userOptionsRef`,ref:Zn,key:`user_options_${Yn.value}`,backgroundColor:P.value.backgroundColor,color:P.value.color,isImaging:C(cr),isPrinting:C(sr),uid:T.value,hasPdf:k.value.userOptions.buttons.pdf,hasImg:k.value.userOptions.buttons.img,hasSvg:k.value.userOptions.buttons.svg,hasXls:k.value.userOptions.buttons.csv,hasTable:k.value.userOptions.buttons.table,hasFullscreen:k.value.userOptions.buttons.fullscreen,hasAltCopy:k.value.userOptions.buttons.altCopy,isFullscreen:Ir.value,titles:{...k.value.userOptions.buttonTitles},chartElement:Jn.value,position:k.value.userOptions.position,hasAnnotator:k.value.userOptions.buttons.annotator,isAnnotation:zr.value,callbacks:k.value.userOptions.callbacks,printScale:k.value.userOptions.print.scale,tableDialog:k.value.table.useDialog,isCursorPointer:F.value,onToggleFullscreen:Lr,onGeneratePdf:C(lr),onGenerateCsv:Fr,onGenerateImage:C(ei),onGenerateSvg:C($r),onToggleTable:Rr,onToggleAnnotator:Br,onCopyAlt:ti,style:_({visibility:C(ir)?C(nr)?`visible`:`hidden`:`visible`})},Ne({_:2},[b(C(Ce)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Ke(n=>[x(e.$slots,t,Be(Le(C(we)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):p(``,!0),h(`div`,$e,[I.value.height>0?(v(),m(`svg`,{key:0,ref_key:`svgRef`,ref:ar,xmlns:C(ue),"aria-describedby":`chart-instructions-${T.value}`,class:g({"vue-data-ui-fullscreen--on":Ir.value,"vue-data-ui-fulscreen--off":!Ir.value}),viewBox:`0 0 ${I.value.width<=0?10:I.value.width} ${I.value.height<=0?10:I.value.height}`,style:_(`overflow:visible;background:transparent;color:${P.value.color}`),tabindex:`0`,onFocus:hi,onBlur:gi,onKeydown:_i},[Fe(C(Wn)),x(e.$slots,`svg-underlayer`,{svg:{...I.value,isPrintingImg:C(sr)||C(cr)||C(Zr),isPrintingSvg:C(Qr)}},void 0,!0),e.$slots[`chart-background`]?(v(),m(`foreignObject`,{key:0,x:0,y:0,width:I.value.width<=0?10:I.value.width,height:I.value.height<=0?10:I.value.height,style:{pointerEvents:`none`}},[x(e.$slots,`chart-background`,{},void 0,!0)],8,tt)):p(``,!0),H.value?p(``,!0):(v(),m(`g`,nt,[N.value.title.text?(v(),m(`text`,{key:0,"text-anchor":`middle`,fill:N.value.title.color,"font-weight":N.value.title.bold?`bold`:`normal`,"font-size":N.value.title.fontSize,x:I.value.width/2,y:12+N.value.title.fontSize+N.value.title.offsetY,onClick:i[0]||=()=>{K(),$(),E.value=!1}},S(N.value.title.text),9,rt)):p(``,!0),N.value.title.subtitle.text?(v(),m(`text`,{key:1,"text-anchor":`middle`,fill:N.value.title.subtitle.color,"font-weight":N.value.title.subtitle.bold?`bold`:`normal`,"font-size":N.value.title.subtitle.fontSize,x:I.value.width/2,y:48+N.value.title.subtitle.fontSize+N.value.title.subtitle.offsetY,onClick:i[1]||=()=>{K(),$(),E.value=!1}},S(N.value.title.subtitle.text),9,it)):p(``,!0)])),h(`defs`,null,[(v(!0),m(d,null,b(z.value,(e,t)=>(v(),Me(Ee,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`root_gradient_${T.value}_${e.rootIndex}`,key:`root_gradient_${T.value}_${e.rootIndex}`,stops:[[`0%`,C(c)(C(re)(e.color,.05),100-A.value.gradientIntensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128)),(v(!0),m(d,null,b(z.value,e=>(v(),Me(Ee,{t:`linear`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,id:`branch_gradient_${T.value}_${e.rootIndex}`,key:`branch_gradient_${T.value}_${e.rootIndex}`,stops:[[`0%`,e.color,1],[`100%`,C(c)(C(re)(e.color,.02),100-j.value.gradientIntensity),1]]},null,8,[`id`,`stops`]))),128)),Fe(Ee,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`nutpick_${T.value}`,stops:[[`0%`,C(c)(`#FFFFFF`,0),0],[`80%`,C(c)(`#FFFFFF`,M.value.selected.gradientIntensity),1],[`100%`,C(c)(`#FFFFFF`,0),0]]},null,8,[`id`,`stops`]),Fe(Ee,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`nut_${T.value}`,stops:[[`0%`,C(c)(`#FFFFFF`,0),0],[`80%`,C(c)(`#FFFFFF`,M.value.gradientIntensity),1],[`100%`,C(c)(`#FFFFFF`,0),0]]},null,8,[`id`,`stops`]),Fe(Ee,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`nut_underlayer_${T.value}`,stops:[[`0%`,C(c)(P.value.backgroundColor,100),1],[`80%`,C(c)(P.value.backgroundColor,60),1],[`100%`,C(c)(P.value.backgroundColor,0),1]]},null,8,[`id`,`stops`])]),N.value.grandTotal.show?(v(),m(`g`,at,[h(`text`,{x:L.value.seedX,y:32+N.value.grandTotal.offsetY,"font-size":N.value.grandTotal.fontSize,"font-weight":N.value.grandTotal.bold?`bold`:`normal`,fill:N.value.grandTotal.color,"text-anchor":`middle`,onClick:i[2]||=()=>{K(),$(),E.value=!1}},S(N.value.grandTotal.text),9,ot),h(`text`,{x:L.value.seedX,y:38+N.value.grandTotal.fontSize+N.value.grandTotal.offsetY,"font-size":N.value.grandTotal.fontSize,"font-weight":N.value.grandTotal.bold?`bold`:`normal`,fill:N.value.grandTotal.color,"text-anchor":`middle`,onClick:i[3]||=()=>{K(),$(),E.value=!1}},S(C(u)(N.value.grandTotal.formatter,R.value,C(a)({p:N.value.grandTotal.prefix,v:R.value,s:N.value.grandTotal.suffix,r:N.value.grandTotal.roundingValue}))),9,st)])):p(``,!0),(v(!0),m(d,null,b(V.value,e=>(v(),m(`g`,null,[h(`defs`,null,[Fe(Ee,{t:`linear`,id:`link_grad_${e.id}`,stops:[[`0%`,e.color,1],[`100%`,C(c)(e.color,N.value.links.opacity),1]]},null,8,[`id`,`stops`])]),h(`path`,{d:Hr(e),stroke:C(c)(e.color,N.value.links.opacity),fill:`url(#link_grad_${e.id})`,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:_(`opacity:${+!!q(e)}`),onClick:i[4]||=()=>{K(),$(),E.value=!1}},null,12,ct)]))),256)),(v(!0),m(d,null,b(B.value,e=>(v(),m(`circle`,{cx:e.x,cy:e.y,r:e.r,fill:A.value.underlayerColor,stroke:`none`,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`)},null,12,lt))),256)),(v(!0),m(d,null,b(B.value,(e,t)=>(v(),m(`circle`,{"aria-label":ni(e),cx:e.x,cy:e.y,r:e.r,fill:A.value.useGradient?`url(#root_gradient_${T.value}_${e.rootIndex})`:e.color,stroke:A.value.stroke,"stroke-width":A.value.strokeWidth,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>jr(e)},null,12,ut))),256)),A.value.labels.show?(v(),m(`g`,dt,[(v(!0),m(d,null,b(B.value,(e,t)=>(v(),m(`text`,{x:e.x,y:e.y+A.value.labels.fontSize/2.6,"text-anchor":`middle`,"font-size":A.value.labels.fontSize,fill:A.value.labels.adaptColorToBackground?C(le)(e.color):A.value.labels.color,"font-weight":`bold`,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>jr(e)},S(C(u)(A.value.labels.formatter,e.total,C(a)({p:A.value.labels.prefix,v:e.total,s:A.value.labels.suffix,r:A.value.labels.roundingValue}),{datapoint:e})),13,ft))),256)),(v(!0),m(d,null,b(B.value,e=>(v(),m(`g`,null,[H.value&&e.rootIndex===H.value.rootIndex||W.value&&e.rootIndex===W.value.rootIndex||G.value&&e.rootIndex===G.value.rootIndex?(v(),m(`g`,pt,[h(`text`,{x:e.x,y:e.y+e.r+24,"text-anchor":`middle`,fill:A.value.labels.name.color,"font-size":A.value.labels.name.fontSize,"font-weight":A.value.labels.name.bold?`bold`:`normal`,onClick:i[5]||=()=>{K(),$(),E.value=!1}},S(e.name),9,mt)])):p(``,!0)]))),256))])):p(``,!0),(v(!0),m(d,null,b(V.value,e=>(v(),m(`rect`,{x:e.x1,y:e.y1,height:I.value.branchSize,width:e.x2-e.x1,fill:j.value.underlayerColor,rx:j.value.borderRadius,stroke:`none`,style:_(`opacity:${q(e)?1:.05}`),onClick:t=>Ar(e)},null,12,ht))),256)),(v(!0),m(d,null,b(V.value,(e,t)=>(v(),m(`rect`,{"aria-label":ri(e),x:e.x1,y:e.y1,height:I.value.branchSize,width:e.x2-e.x1,fill:j.value.useGradient?`url(#branch_gradient_${T.value}_${e.rootIndex})`:e.color,rx:j.value.borderRadius,stroke:j.value.stroke,"stroke-width":j.value.strokeWidth,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>Ar(e)},null,12,gt))),256)),j.value.labels.dataLabels.show?(v(),m(`g`,_t,[(v(!0),m(d,null,b(V.value,e=>(v(),m(`g`,null,[e.proportionToRoot*100>j.value.labels.dataLabels.hideUnderValue?(v(),m(`text`,{key:0,x:e.x1+6,y:e.y1+I.value.branchSize/1.5,"text-anchor":`start`,fill:C(le)(e.color),"font-size":j.value.labels.dataLabels.fontSize,"font-weight":`bold`,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>Ar(e)},S(C(u)(j.value.labels.dataLabels.formatter,e.value,C(a)({p:N.value.branches.labels.dataLabels.prefix,v:e.value,s:N.value.branches.labels.dataLabels.suffix,r:N.value.branches.labels.dataLabels.roundingValue}),{datapoint:e})),13,vt)):p(``,!0)]))),256))])):p(``,!0),(v(!0),m(d,null,b(V.value,(e,t)=>(v(),m(`g`,null,[(v(!0),m(d,null,b(C(ee)({series:e.breakdown,base:1},e.x2+24+M.value.offsetX,e.y1+I.value.branchSize/2,I.value.branchSize/3,I.value.branchSize/3),(t,n)=>(v(),m(`path`,{d:t.path,stroke:t.color,"stroke-width":10,fill:`none`,style:_(`opacity:${q(e)?1:.1}`)},null,12,yt))),256)),h(`circle`,{"aria-label":`Open details for branch ${e.name} in root ${e.rootName}`,fill:M.value.useGradient?`url(#nut_${T.value})`:`transparent`,cx:e.x2+24+M.value.offsetX,cy:e.y1+I.value.branchSize/2,r:I.value.branchSize/2+2,onClick:t=>kr(e),style:_(`cursor:${F.value?`pointer`:`default`};opacity:${q(e)?1:.1}`)},null,12,bt)]))),256)),j.value.labels.show&&!W.value?(v(),m(`g`,xt,[(v(!0),m(d,null,b(V.value,e=>(v(),m(`text`,{x:e.x2+I.value.branchSize+24+M.value.offsetX,y:e.y1+I.value.branchSize/2+5,"font-size":j.value.labels.fontSize,"font-weight":j.value.labels.bold?`bold`:`normal`,fill:j.value.labels.color,"text-anchor":`start`,style:_(`opacity:${q(e)?1:.1}`)},S(e.name),13,St))),256))])):p(``,!0),h(`line`,{x1:256+I.value.padding.left,x2:256+I.value.padding.left,y1:L.value.top,y2:L.value.bottom,stroke:N.value.verticalSeparator.stroke,"stroke-width":N.value.verticalSeparator.strokeWidth},null,8,Ct),!H.value&&!W.value?(v(),m(`foreignObject`,{key:6,x:0,y:L.value.bottom,height:I.value.height-L.value.bottom,width:I.value.width,style:{overflow:`visible`},"data-no-svg-export":``,onClick:i[6]||=()=>{K(),$(),E.value=!1}},[h(`div`,Tt,[h(`div`,Et,[(v(!0),m(d,null,b(B.value,e=>(v(),m(`div`,{style:_(`display:flex;align-items:center;gap:3px;flex-direction:row;font-size:${N.value.legend.fontSize}px;`)},[(v(),m(`svg`,Dt,[h(`circle`,{cx:`10`,cy:`10`,r:`10`,fill:e.color,stroke:`none`},null,8,Ot)])),C(er)?p(``,!0):(v(),m(d,{key:0},[h(`span`,null,S(e.name)+`:`,1),h(`b`,null,S(C(u)(N.value.roots.labels.formatter,e.total,C(a)({p:P.value.layout.legend.prefix,v:e.total,s:P.value.layout.legend.suffix,r:P.value.layout.legend.roundingValue}),{datapoint:e})),1),Pe(` (`+S(C(a)({v:e.total/R.value*100,s:`%`,r:N.value.legend.roundingPercentage}))+`) `,1)],64))],4))),256))])])],8,wt)):p(``,!0),H.value&&U.value?(v(),m(`g`,kt,[(v(),m(`foreignObject`,{x:0,y:Mr(),height:I.value.height-L.value.bottom,width:I.value.width,style:{overflow:`visible`},onClick:i[7]||=()=>{K(),$(),E.value=!1}},[h(`div`,jt,[h(`b`,null,S(H.value.name),1),h(`div`,Mt,[(v(!0),m(d,null,b(H.value.breakdown,(e,t)=>(v(),m(`div`,{style:_(`display:flex;align-items:center;gap:6px;flex-direction:row;font-size:${N.value.legend.fontSize}px;`)},[(v(),m(`svg`,Nt,[h(`circle`,{cx:`10`,cy:`10`,r:`10`,fill:e.color,stroke:`none`},null,8,Pt)])),h(`span`,null,[Pe(S(e.name)+`: `,1),h(`b`,null,S(N.value.legend.prefix)+` `+S(e.value.toFixed(P.value.layout.nuts.selected.labels.roundingValue))+` `+S(N.value.legend.suffix),1),Pe(` (`+S((e.proportionToBranch*100).toFixed(N.value.nuts.selected.labels.roundingPercentage))+`%)`,1)])],4))),256))])])],8,At)),h(`circle`,{cx:H.value.x2+24+M.value.offsetX,cy:H.value.y1+I.value.branchSize/2,r:256,fill:`url(#nut_underlayer_${T.value})`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Ft),(v(!0),m(d,null,b(U.value,e=>(v(),m(`g`,null,[Nr(e)?(v(),m(`path`,{key:0,d:C(ae)(e,{x:H.value.x2+24+M.value.offsetX,y:H.value.y1+I.value.branchSize/2},16,16,!1,!1,64),stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,It)):p(``,!0)]))),256)),h(`circle`,{cx:H.value.x2+24+M.value.offsetX,cy:H.value.y1+I.value.branchSize/2,r:118,fill:P.value.backgroundColor,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Lt),(v(!0),m(d,null,b(U.value,e=>(v(),m(`path`,{d:e.path,stroke:e.color,"stroke-width":64,fill:`none`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Rt))),256)),h(`circle`,{cx:H.value.x2+24+M.value.offsetX,cy:H.value.y1+I.value.branchSize/2,r:110,fill:`url(#nutpick_${T.value})`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,zt),h(`circle`,{cx:H.value.x2+24+M.value.offsetX,cy:H.value.y1+I.value.branchSize/2,r:64,fill:P.value.backgroundColor,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Bt),h(`text`,{x:H.value.x2+24+M.value.offsetX,y:H.value.y1+8,fill:M.value.selected.labels.core.total.color,"font-size":M.value.selected.labels.core.total.fontSize,"font-weight":M.value.selected.labels.core.total.bold?`bold`:`normal`,"text-anchor":`middle`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(k.value.translations.total),11,Vt),h(`text`,{x:H.value.x2+24+M.value.offsetX,y:H.value.y1+36,fill:M.value.selected.labels.core.value.color,"font-size":M.value.selected.labels.core.value.fontSize,"font-weight":M.value.selected.labels.core.value.bold?`bold`:`normal`,"text-anchor":`middle`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(C(u)(M.value.selected.labels.dataLabels.formatter,H.value.value,C(a)({p:M.value.selected.labels.core.value.prefix,v:H.value.value,s:M.value.selected.labels.core.value.suffix,r:M.value.selected.roundingValue}),{datapoint:H.value})),11,Ht),(v(!0),m(d,null,b(U.value,(e,t)=>(v(),m(`g`,null,[Nr(e)?(v(),m(`text`,{key:0,x:C(l)(e).x,"text-anchor":C(l)(e).anchor,y:C(ce)(e)-M.value.selected.labels.dataLabels.fontSize/6,fill:e.color,"font-size":M.value.selected.labels.dataLabels.fontSize/2,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},` ⬤ `,14,Ut)):p(``,!0),Nr(e)?(v(),m(`text`,{key:1,x:C(l)(e,!0).x,"text-anchor":C(l)(e,!0).anchor,y:C(ce)(e),fill:M.value.selected.labels.dataLabels.color,"font-size":M.value.selected.labels.dataLabels.fontSize,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(H.value.breakdown[t].name),15,Wt)):p(``,!0)]))),256)),(v(!0),m(d,null,b(U.value,(e,t)=>(v(),m(`g`,null,[Nr(e)?(v(),m(`text`,{key:0,x:C(l)(e,!0).x,"text-anchor":C(l)(e).anchor,y:C(ce)(e)+M.value.selected.labels.dataLabels.fontSize,fill:M.value.selected.labels.dataLabels.color,"font-size":M.value.selected.labels.dataLabels.fontSize,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(C(a)({v:H.value.breakdown[t].value/H.value.value*100,s:`%`,r:M.value.selected.labels.roundingPercentage}))+` `+S(k.value.translations.of)+` `+S(H.value.breakdown[t].branchName)+` `+S(C(u)(M.value.selected.labels.dataLabels.formatter,H.value.breakdown[t].value,C(a)({p:M.value.selected.labels.dataLabels.prefix,v:H.value.breakdown[t].value,s:M.value.selected.labels.dataLabels.suffix,r:M.value.selected.roundingValue}),{datapoint:U.value,seriesIndex:t})),15,Gt)):p(``,!0),Nr(e)?(v(),m(`text`,{key:1,x:C(l)(e,!0).x,"text-anchor":C(l)(e).anchor,y:C(ce)(e)+M.value.selected.labels.dataLabels.fontSize*2,fill:M.value.selected.labels.dataLabels.color,"font-size":M.value.selected.labels.dataLabels.fontSize,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(C(a)({v:H.value.breakdown[t].proportionToRoot*100,s:`%`,r:M.value.selected.labels.roundingPercentage}))+` `+S(k.value.translations.of)+` `+S(H.value.breakdown[t].rootName),15,Kt)):p(``,!0),Nr(e)?(v(),m(`text`,{key:2,x:C(l)(e,!0).x,"text-anchor":C(l)(e).anchor,y:C(ce)(e)+M.value.selected.labels.dataLabels.fontSize*3,fill:M.value.selected.labels.dataLabels.color,"font-size":M.value.selected.labels.dataLabels.fontSize,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(C(a)({v:H.value.breakdown[t].proportionToTree*100,s:`%`,r:M.value.selected.labels.roundingPercentage}))+` `+S(k.value.translations.proportionToTree),15,qt)):p(``,!0)]))),256))])):p(``,!0),(v(!0),m(d,null,b(V.value,e=>(v(),m(`g`,null,[W.value&&W.value.id===e.id&&!H.value?(v(),m(`text`,{key:0,x:e.x1+6,y:e.y1+I.value.branchSize+24,"font-weight":`bold`,"text-anchor":`start`,"font-size":j.value.labels.dataLabels.fontSize,fill:j.value.labels.color,onClick:i[8]||=()=>{K(),$(),E.value=!1}},S(e.name)+`: `+S(C(u)(j.value.labels.dataLabels.formatter,e.value,C(a)({p:j.value.labels.dataLabels.prefix,v:e.value,s:j.value.labels.dataLabels.suffix,r:j.value.labels.dataLabels.roundingValue}),{datapoint:e})),9,Jt)):p(``,!0),W.value&&W.value.id===e.id&&!H.value?(v(),m(`text`,{key:1,x:e.x1+6,y:e.y1+I.value.branchSize+48,"text-anchor":`start`,"font-size":j.value.labels.dataLabels.fontSize,fill:j.value.labels.color,onClick:i[9]||=()=>{K(),$(),E.value=!1}},S(C(a)({v:e.proportionToRoot*100,s:`%`,r:j.value.labels.dataLabels.roundingPercentage}))+` `+S(k.value.translations.of)+` `+S(e.rootName),9,Yt)):p(``,!0),W.value&&W.value.id===e.id&&!H.value?(v(),m(`text`,{key:2,x:e.x1+6,y:e.y1+I.value.branchSize+72,"text-anchor":`start`,"font-size":j.value.labels.dataLabels.fontSize,fill:j.value.labels.color,onClick:i[10]||=()=>{K(),$(),E.value=!1}},S(C(a)({v:e.value/R.value*100,s:`%`,r:j.value.labels.dataLabels.roundingPercentage}))+` `+S(k.value.translations.proportionToTree),9,Xt)):p(``,!0)]))),256)),x(e.$slots,`svg`,{svg:{...I.value,isPrintingImg:C(sr)||C(cr)||C(Zr),isPrintingSvg:C(Qr)}},void 0,!0)],46,et)):p(``,!0)]),e.$slots.watermark?(v(),m(`div`,Zt,[x(e.$slots,`watermark`,Be(Le({isPrinting:C(sr)||C(cr)||C(Zr)||C(Qr)})),void 0,!0)])):p(``,!0),x(e.$slots,`legend`,{legend:z.value},void 0,!0),e.$slots.source?(v(),m(`div`,Qt,[x(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),qn.value&&k.value.userOptions.buttons.table?(v(),Me(He(Ur.value.component),Re({key:6},Ur.value.props,{ref_key:`tableUnit`,ref:Xn,onClose:Gr}),Ne({content:Ke(()=>[h(`div`,{ref_key:`tableContainer`,ref:mr,class:`vue-ui-chestnut-table`,style:_(`${k.value.table.useDialog?``:`max-height: 300px;margin-top:24px`}`)},[h(`div`,{style:_(`${k.value.table.useDialog?``:`padding-top:36px;`}position: relative`)},[k.value.table.useDialog?p(``,!0):(v(),m(`div`,{key:0,role:`button`,tabindex:`0`,style:_(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:${F.value?`pointer`:`default`}; background:${k.value.table.th.backgroundColor};`),onClick:Gr,onKeypress:qe(Gr,[`enter`])},[Fe(C(Bn),{name:`close`,stroke:k.value.table.th.color,"stroke-width":2},null,8,[`stroke`])],36)),h(`div`,{style:{width:`100%`},class:g({"vue-ui-responsive":C(Wr)})},[h(`table`,$t,[k.value.table.useDialog?p(``,!0):(v(),m(`caption`,{key:0,style:_({backgroundColor:k.value.table.th.backgroundColor,color:k.value.table.th.color,outline:k.value.table.th.outline}),class:`vue-ui-data-table__caption`},[Pe(S(N.value.title.text)+` `,1),N.value.title.subtitle.text?(v(),m(`span`,en,S(N.value.title.subtitle.text),1)):p(``,!0)],4)),h(`thead`,null,[h(`tr`,{role:`row`,style:_(`background:${k.value.table.th.backgroundColor};color:${k.value.table.th.color}`)},[(v(!0),m(d,null,b(Y.value.head,e=>(v(),m(`th`,{style:_(`outline:${k.value.table.th.outline}`)},S(e),5))),256))],4)]),h(`tbody`,null,[(v(!0),m(d,null,b(Y.value.body,(e,t)=>(v(),m(`tr`,{class:g({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":t%2==0,"vue-ui-data-table__tbody__row-odd":t%2!=0}),style:_(`background:${k.value.table.td.backgroundColor};color:${k.value.table.td.color}`)},[h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[0]},[h(`div`,nn,[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?(v(),m(`span`,rn)):(v(),m(`span`,an,S(e.rootName),1))])],12,tn),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[1]},[h(`div`,sn,[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?(v(),m(`span`,cn)):(v(),m(`span`,ln,S(e.rootValue.toFixed(k.value.table.td.roundingValue)),1))])],12,on),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[2]},[h(`div`,dn,[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?(v(),m(`span`,fn)):(v(),m(`span`,pn,S((e.rootToTotal*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1))])],12,un),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[3]},[h(`div`,hn,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(v(),m(`span`,gn)):(v(),m(`span`,_n,S(e.branchName),1))])],12,mn),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[4]},[h(`div`,yn,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(v(),m(`span`,bn)):(v(),m(`span`,xn,S(e.branchValue.toFixed(k.value.table.td.roundingValue)),1))])],12,vn),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[5]},[h(`div`,Cn,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(v(),m(`span`,wn)):(v(),m(`span`,Tn,S((e.branchToRoot*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1))])],12,Sn),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[6]},[h(`div`,Dn,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(v(),m(`span`,On)):(v(),m(`span`,kn,S((e.branchToTotal*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1))])],12,En),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[7]},[h(`div`,jn,S(e.nutName),1)],12,An),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[8]},[h(`div`,Nn,S(e.nutValue.toFixed(k.value.table.td.roundingValue)),1)],12,Mn),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[9]},[h(`div`,Fn,S((e.nutToBranch*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1)],12,Pn),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[10]},[h(`div`,Ln,S((e.nutToRoot*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1)],12,In),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[11]},[h(`div`,zn,S((e.nutToTotal*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1)],12,Rn)],6))),256))])])],2)],4)],4)]),_:2},[k.value.table.useDialog?{name:`title`,fn:Ke(()=>[Pe(S(Ur.value.title),1)]),key:`0`}:void 0,k.value.table.useDialog?{name:`actions`,fn:Ke(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[11]||=e=>Fr(k.value.userOptions.callbacks.csv)},[Fe(C(Bn),{name:`fileCsv`,stroke:Ur.value.props.color},null,8,[`stroke`])])]),key:`1`}:void 0]),1040)):p(``,!0),x(e.$slots,`skeleton`,{},()=>[C(er)?(v(),Me(he,{key:0})):p(``,!0)],!0)],46,Ye))}},[[`__scopeId`,`data-v-bbde84b6`]]);export{Je as n,Bn as t};
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,D as o,Ht as s,It as ee,Jt as c,S as te,X as ne,Yt as re,at as ie,f as l,h as ae,i as u,in as oe,nt as se,p as ce,r as le,t as ue,w as de,yt as fe,zt as pe}from"./lib-rPeBMZrn.js";import{n as me,t as he}from"./BaseScanner-8NdoBs7B.js";import{n as ge,t as _e}from"./useHints-C-TwxM0Y.js";import{t as ve}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as ye}from"./resolveChartConfig-CIhClE5R.js";import{t as be}from"./img-D4RQwASc.js";import{t as xe}from"./useChartExport-BZts4KFb.js";import{t as Se}from"./tableIntegration-CNoJ1CIY.js";import{n as Ce,t as we}from"./userOptionsSlots-DYuo-E5m.js";import{t as Te}from"./usePrinter-DVf3YcG5.js";import{t as Ee}from"./DefGrad-DKMq1REY.js";import{t as De}from"./A11yDataTable-DWNlWXzs.js";import{t as Oe}from"./useUserOptionState-CXlFnwPv.js";import{t as ke}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ae}from"./useTableResponsive-uSz_qZOB.js";import{t as je}from"./vue_ui_chestnut-BxxivKN7.js";import{Fragment as d,computed as f,createBlock as Me,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Ne,createTextVNode as Pe,createVNode as Fe,defineAsyncComponent as Ie,guardReactiveProps as Le,mergeProps as Re,nextTick as ze,normalizeClass as g,normalizeProps as Be,normalizeStyle as _,onMounted as Ve,openBlock as v,ref as y,renderList as b,renderSlot as x,resolveDynamicComponent as He,toDisplayString as S,toRefs as Ue,unref as C,useCssVars as We,watch as Ge,withCtx as Ke,withKeys as qe}from"vue";var Je=/* @__PURE__ */ e({default:()=>Bn}),Ye=[`id`],Xe=[`id`],Ze={"aria-live":`polite`,class:`sr-only`},Qe={key:2,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},$e={style:{position:`relative`}},et=[`xmlns`,`aria-describedby`,`viewBox`],tt=[`width`,`height`],nt={key:1},rt=[`fill`,`font-weight`,`font-size`,`x`,`y`],it=[`fill`,`font-weight`,`font-size`,`x`,`y`],at={key:2},ot=[`x`,`y`,`font-size`,`font-weight`,`fill`],st=[`x`,`y`,`font-size`,`font-weight`,`fill`],ct=[`d`,`stroke`,`fill`],lt=[`cx`,`cy`,`r`,`fill`],ut=[`aria-label`,`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`,`onClick`],dt={key:3},ft=[`x`,`y`,`font-size`,`fill`,`onClick`],pt={key:0},mt=[`x`,`y`,`fill`,`font-size`,`font-weight`],ht=[`x`,`y`,`height`,`width`,`fill`,`rx`,`onClick`],gt=[`aria-label`,`x`,`y`,`height`,`width`,`fill`,`rx`,`stroke`,`stroke-width`,`onClick`],_t={key:4},vt=[`x`,`y`,`fill`,`font-size`,`onClick`],yt=[`d`,`stroke`],bt=[`aria-label`,`fill`,`cx`,`cy`,`r`,`onClick`],xt={key:5},St=[`x`,`y`,`font-size`,`font-weight`,`fill`],Ct=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],wt=[`y`,`height`,`width`],Tt={style:{width:`100%`,height:`100%`,display:`flex`,"align-items":`center`,"justify-content":`center`,"flex-direction":`column`}},Et={style:{display:`flex`,"align-items":`center`,"justify-content":`center`,gap:`12px`,"flex-wrap":`wrap`,"flex-direction":`row`}},Dt={viewBox:`0 0 20 20`,height:`16`,width:`16`},Ot=[`fill`],kt={key:7},At=[`y`,`height`,`width`],jt={style:{width:`100%`,height:`100%`,display:`flex`,"align-items":`center`,"justify-content":`center`,"flex-direction":`column`}},Mt={style:{display:`flex`,"align-items":`center`,"justify-content":`center`,gap:`12px`,"flex-wrap":`wrap`,"flex-direction":`row`}},Nt={viewBox:`0 0 20 20`,height:`16`,width:`16`},Pt=[`fill`],Ft=[`cx`,`cy`,`fill`],It=[`d`,`stroke`],Lt=[`cx`,`cy`,`fill`],Rt=[`d`,`stroke`],zt=[`cx`,`cy`,`fill`],Bt=[`cx`,`cy`,`fill`],Vt=[`x`,`y`,`fill`,`font-size`,`font-weight`],Ht=[`x`,`y`,`fill`,`font-size`,`font-weight`],Ut=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Wt=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Gt=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Kt=[`x`,`text-anchor`,`y`,`fill`,`font-size`],qt=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Jt=[`x`,`y`,`font-size`,`fill`],Yt=[`x`,`y`,`font-size`,`fill`],Xt=[`x`,`y`,`font-size`,`fill`],Zt={key:4,class:`vue-data-ui-watermark`},Qt={key:5,ref:`source`,dir:`auto`},$t={class:`vue-ui-data-table`},en={key:0},tn=[`data-cell`],nn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},rn={key:0},an={key:1},on=[`data-cell`],sn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},cn={key:0},ln={key:1},un=[`data-cell`],dn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},fn={key:0},pn={key:1},mn=[`data-cell`],hn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},gn={key:0},_n={key:1},vn=[`data-cell`],yn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},bn={key:0},xn={key:1},Sn=[`data-cell`],Cn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},wn={key:0},Tn={key:1},En=[`data-cell`],Dn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},On={key:0},kn={key:1},An=[`data-cell`],jn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Mn=[`data-cell`],Nn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Pn=[`data-cell`],Fn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},In=[`data-cell`],Ln={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Rn=[`data-cell`],zn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Bn=/*#__PURE__*/ ve({__name:`vue-ui-chestnut`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectRoot`,`selectBranch`,`selectNut`,`copyAlt`],setup(e,{expose:ve,emit:Je}){We(e=>({v5624e750:e.tdo}));let Bn=Ie(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Vn=Ie(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Hn=Ie(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Un=Ie(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Wn=Ie(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),Gn=Ie(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_chestnut:Kn}=i(),w=e,qn=f(()=>!!w.dataset&&w.dataset.length),T=y(ne()),Jn=y(null),Yn=y(0),Xn=y(null),Zn=y(null),Qn=y(!1),E=y(!1),D=y(``),O=y({level:`root`,rootIndex:0,branchIndex:0,nutIndex:0,locked:!1}),k=y(or()),A=f(()=>k.value.style.chart.layout.roots),j=f(()=>k.value.style.chart.layout.branches),M=f(()=>k.value.style.chart.layout.nuts),N=f(()=>k.value.style.chart.layout),P=f(()=>k.value.style.chart);ge({config:()=>k.value,dataset:()=>w.dataset,component:`VueUiChestnut`,rules:[_e.emptyArray,{test:e=>e.some(e=>e?.branches&&e.branches.length>10),message:[`👀 Some root has > 10 branches, which can make the chart heavy. Consider:`,``,`▶️ Grouping some branches in broader categories.`]},{test:e=>e.some(e=>e?.branches&&e.branches.some(e=>e?.breakdown&&e?.breakdown.length>6)),message:[`👀 Some donuts have > 6 series. Consider:`,``,`▶️ Grouping small values into an "Other" category.`]}]});let F=f(()=>k.value.userOptions.useCursorPointer),$n=f(()=>oe({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{grandTotal:{show:!1},roots:{stroke:`#6A6A6A`,labels:{show:!1}},verticalSeparator:{stroke:`transparent`},branches:{stroke:`#6A6A6A`,underlayerColor:`#6A6A6A90`,labels:{show:!1,dataLabels:{show:!1}}}}}}},userConfig:k.value.skeletonConfig??{}})),{loading:er,FINAL_DATASET:tr}=me({...Ue(w),FINAL_CONFIG:k,prepareConfig:or,skeletonDataset:w.config?.skeletonDataset??[{name:`_`,color:`#969696`,branches:[{name:`_`,value:32,breakdown:[{name:`_`,value:16,color:`#CACACA`},{name:`_`,value:16,color:`#6A6A6A`}]},{name:`_`,value:16,breakdown:[{name:`_`,value:8,color:`#CACACA`},{name:`_`,value:8,color:`#6A6A6A`}]},{name:`_`,value:8,breakdown:[{name:`_`,value:4,color:`#CACACA`},{name:`_`,value:4,color:`#6A6A6A`}]},{name:`_`,value:4,breakdown:[{name:`_`,value:2,color:`#CACACA`},{name:`_`,value:2,color:`#6A6A6A`}]}]},{name:`_`,color:`#C4C4C4`,branches:[{name:`_`,value:24,breakdown:[{name:`_`,value:12,color:`#CACACA`},{name:`_`,value:12,color:`#6A6A6A`}]},{name:`_`,value:12,breakdown:[{name:`_`,value:6,color:`#CACACA`},{name:`_`,value:6,color:`#6A6A6A`}]},{name:`_`,value:6,breakdown:[{name:`_`,value:3,color:`#CACACA`},{name:`_`,value:3,color:`#6A6A6A`}]},{name:`_`,value:2,breakdown:[{name:`_`,value:1,color:`#CACACA`},{name:`_`,value:1,color:`#6A6A6A`}]}]}],skeletonConfig:oe({defaultConfig:k.value,userConfig:$n.value})}),{userOptionsVisible:nr,setUserOptionsVisibility:rr,keepUserOptionState:ir}=Oe({config:k.value}),{svgRef:ar}=ke({config:N.value.title});function or(){return ye(w.config,Kn,je)}Ge(()=>w.config,e=>{k.value=or(),nr.value=!k.value.userOptions.showOnChartHover,pr.value.showTable=k.value.table.show,Pr()},{deep:!0});let{isPrinting:sr,isImaging:cr,generatePdf:lr,generateImage:ur}=Te({elementId:`vue-ui-chestnut_${T.value}`,fileName:N.value.title.text||`vue-ui-chestnut`,options:k.value.userOptions.print}),dr=f(()=>k.value.userOptions.show),fr=f(()=>de(k.value.customPalette)),pr=y({showTable:k.value.table.show});Ge(k,()=>{pr.value={showTable:k.value.table.show}},{immediate:!0});let mr=y(null),hr=f(()=>k.value.table.responsiveBreakpoint),I=y({gap:6,padding:{top:102,left:12,right:12,bottom:96},width:1024,height:0,branchSize:32,branchStart:128}),L=f(()=>({left:I.value.padding.left,top:I.value.padding.top,right:I.value.width-I.value.padding.right,bottom:I.value.height-I.value.padding.bottom,width:I.value.width-(I.value.padding.left+I.value.padding.right),height:I.value.height-(I.value.padding.top+I.value.padding.bottom),seedX:I.value.padding.left+64})),R=f(()=>tr.value.flatMap(e=>(e.branches||[]).map(e=>e.value||0)).reduce((e,t)=>e+t,0)),gr=f(()=>k.value.debug),z=f(()=>(gr.value&&tr.value.forEach((e,t)=>{fe({datasetObject:e,requiredAttributes:[`name`,`branches`]}).forEach(e=>{ie({componentName:`VueUiChestnut`,type:`datasetSerieAttribute`,property:e,index:t})}),e.branches&&e.branches.forEach((e,n)=>{fe({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{ie({componentName:`VueUiChestnut`,type:`datasetSerieAttribute`,property:e,index:`${t} - ${n}`})}),e.breakdown&&e.breakdown.forEach((e,r)=>{fe({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{ie({componentName:`VueUiChestnut`,type:`datasetSerieAttribute`,property:e,index:`${t} - ${n} - ${r}`})})})})}),tr.value.map((e,t)=>{let n=(e.branches||[]).map(e=>e.value||0).reduce((e,t)=>e+t,0);return{...e,color:te(e.color)||fr.value[t]||s[t]||s[t%s.length],id:e.id||`root_${t}_${T.value}`,type:`root`,total:n,rootIndex:t,branches:(e.branches||[]).map((r,i)=>({...r,rootName:e.name,rootIndex:t,color:te(e.color)||fr.value[t]||s[t]||s[t%s.length],value:r.value>=0?r.value:0,id:r.id||`branch_${t}_${i}_${T.value}`,proportionToRoot:r.value/n,type:`branch`,breakdown:(r.breakdown||[]).map((a,o)=>({table:{rootName:e.name,rootValue:n,rootToTotal:n/R.value,branchName:r.name,branchValue:r.value,branchToTotal:r.value/R.value,branchToRoot:r.value/n,nutName:a.name,nutValue:a.value,nutToTotal:a.value/R.value,nutToRoot:a.value/n,nutToBranch:a.value/r.value},...a,type:`nut`,branchName:r.name,rootName:e.name,branchTotal:r.value>=0?r.value:0,proportionToBranch:a.value/r.value,proportionToRoot:a.value/n,proportionToTree:a.value/R.value,rootIndex:t,id:a.id||`nut_${t}_${i}_${o}_${T.value}`,color:te(a.color)||fr.value[o]||s[o]||s[o%s.length],value:a.value>=0?a.value:0}))}))}})));function _r(){return z.value}let vr=Je,yr=f(()=>z.value.flatMap(e=>e.branches).length),br=f(()=>Math.max(...z.value.map(e=>e.branches.map(e=>e.value).reduce((e,t)=>e+t,0)))),xr=f(()=>Math.max(...z.value.flatMap(e=>e.branches.map(e=>e.value)))),Sr=f(()=>256+I.value.padding.left),B=f(()=>z.value.sort((e,t)=>t.total-e.total).map((e,t)=>{let n=L.value.height/z.value.length/2,r=e.total/br.value*(n>64?64:n);return{...e,x:L.value.seedX,y:L.value.top+L.value.height/z.value.length*(t+1)-(L.value.height/z.value.length/2+I.value.gap/2),r:r<I.value.branchSize/2?I.value.branchSize/2:r}})),Cr=f(()=>j.value.widthRatio<=0?.1:j.value.widthRatio>1.8?1.8:j.value.widthRatio),wr=f(()=>B.value.flatMap(e=>e.branches)),V=f(()=>wr.value.sort((e,t)=>t.value-e.value).map((e,t)=>({...e,y1:t*I.value.branchSize+L.value.top+t*I.value.gap,y2:t*I.value.branchSize+I.value.branchSize,x1:Sr.value,x2:384*e.value/xr.value*Cr.value+Sr.value}))),Tr=f(()=>B.value),Er=f(()=>Tr.value.map(e=>V.value.filter(t=>t.rootIndex===e.rootIndex).sort((e,t)=>e.y1-t.y1))),Dr=f(()=>Tr.value.map((e,t)=>Er.value[t].map(e=>(e.breakdown||[]).map((t,n)=>({...t,nutIndex:n,rootIndex:e.rootIndex,branchId:e.id,branchName:e.name,branchValue:e.value,rootName:e.rootName})))));function Or(e){let t=B.value.find(t=>t.rootIndex===e.rootIndex);return{x:t.x,y:t.y,r:t.r}}let H=y(null),U=y(null),W=y(null),G=y(null);function K(){H.value=null,W.value=null,G.value=null}function q(e){if(H.value)return e.type===`root`?e.rootIndex===H.value.rootIndex:e.type===`branch`?e.id===H.value.id:e.type===`nut`&&e.branchName===H.value.name&&e.rootIndex===H.value.rootIndex;if(W.value)return e.type===`root`?e.rootIndex===W.value.rootIndex:e.type===`branch`?e.id===W.value.id:e.type===`nut`&&e.branchName===W.value.name&&e.rootIndex===W.value.rootIndex;if(G.value)return e.type===`root`?e.id===G.value.id:e.type===`branch`||e.type===`nut`?e.rootIndex===G.value.rootIndex:!1;if(li.value&&E.value){if(O.value.level===`root`)return e.type===`root`?Z.value&&e.id===Z.value.id:e.type===`branch`||e.type===`nut`?Z.value&&e.rootIndex===Z.value.rootIndex:!1;if(O.value.level===`branch`)return e.type===`root`?Z.value&&e.rootIndex===Z.value.rootIndex:e.type===`branch`?si.value&&e.id===si.value.id:(e.type,!1);if(O.value.level===`nut`)return e.type===`root`?Z.value&&e.rootIndex===Z.value.rootIndex:e.type===`branch`?ci.value&&e.id===ci.value.id:e.type===`nut`&&ci.value&&e.branchName===ci.value.name&&e.rootIndex===ci.value.rootIndex}return!0}function kr(e){K();let t=Tr.value.findIndex(t=>t.rootIndex===e.rootIndex),n=(Er.value[t]||[]).findIndex(t=>t.id===e.id);t!==-1&&(O.value.rootIndex=t),n!==-1&&(O.value.branchIndex=n),O.value.level=`nut`,O.value.nutIndex=0,ze(()=>{H.value=e,W.value=e,U.value=ee({series:e.breakdown,base:1},e.x2+24+M.value.offsetX,e.y1+I.value.branchSize/2,80,80),vr(`selectNut`,e.breakdown),Q()})}function J(){H.value=null,U.value=null,vr(`selectNut`,null)}function Ar(e){let t=Tr.value.findIndex(t=>t.rootIndex===e.rootIndex),n=(Er.value[t]||[]).findIndex(t=>t.id===e.id);t!==-1&&(O.value.rootIndex=t),n!==-1&&(O.value.branchIndex=n),O.value.level=`branch`,O.value.nutIndex=0,W.value&&W.value.id===e.id?(W.value=null,K(),vr(`selectBranch`,null),Q()):(K(),W.value=e,vr(`selectBranch`,e),Q())}function jr(e){let t=Tr.value.findIndex(t=>t.id===e.id);t!==-1&&(O.value.rootIndex=t),O.value.level=`root`,O.value.branchIndex=0,O.value.nutIndex=0,G.value&&G.value.id===e.id?(K(),vr(`selectRoot`,null),Q()):(K(),G.value=e,vr(`selectRoot`,e),Q())}function Mr(){return L.value.bottom-(H.value.y1+180)<0?0:L.value.bottom}function Nr(e){return e.proportion*100>M.value.selected.labels.dataLabels.hideUnderValue}Ve(()=>{Pr()});function Pr(){pe(w.dataset)&&ie({componentName:`VueUiChestnut`,type:`dataset`,debug:gr.value});let e=yr.value*(I.value.branchSize+I.value.gap)+I.value.padding.top+I.value.padding.bottom;I.value.height=e}let Y=f(()=>({head:[k.value.table.th.translations.rootName,k.value.table.th.translations.rootValue,k.value.table.th.translations.rootToTotal,k.value.table.th.translations.branchName,k.value.table.th.translations.branchValue,k.value.table.th.translations.branchToRoot,k.value.table.th.translations.branchToTotal,k.value.table.th.translations.nutName,k.value.table.th.translations.nutValue,k.value.table.th.translations.nutToBranch,k.value.table.th.translations.nutToRoot,k.value.table.th.translations.nutToTotal],body:z.value.flatMap((e,t)=>e.branches.flatMap((e,t)=>e.breakdown.flatMap((e,t)=>e.table)))}));function Fr(e=null){ze(()=>{let t=[[N.value.title.text],[N.value.title.subtitle.text],[``],[`Grand total`,R.value],[``]],n=Y.value.head,r=Y.value.body.map((e,t)=>[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?``:e.rootName,Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?``:e.rootValue,Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?``:e.rootToTotal,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchName,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchValue,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchToRoot,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchToTotal,e.nutName,e.nutValue,e.nutToBranch,e.nutToRoot,e.nutToTotal]),i=t.concat([n]).concat(r),a=o(i);e?e(a):se({csvContent:a,title:N.value.title.text||`vue-ui-chestnut`})})}let Ir=y(!1);function Lr(e){Ir.value=e,Yn.value+=1}function Rr(){pr.value.showTable=!pr.value.showTable}let zr=y(!1);function Br(){zr.value=!zr.value}async function Vr({scale:e=2}={}){if(!Jn.value)return;let{width:t,height:n}=Jn.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await be({domElement:Jn.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:N.value.title.text,width:t,height:n,aspectRatio:r}}function Hr(e){let t=Or(e),n=e.x1,r=e.y1,i=I.value.branchSize,a=t.x+t.r/2,o=t.y;return[`M ${n},${r}`,`C ${n-20},${r} ${n-20},${r} ${a},${o}`,`C ${a},${o} ${n-20},${r+i} ${n},${r+i}`,`Z`].join(` `)}let Ur=f(()=>Se({config:k,style:P,mutableConfig:pr,dialog:Gn,accordion:Vn,isFullscreen:Ir,parent:Jn,maxWidth:800,titleStyle:N,isCursorPointer:F}));Ge(()=>pr.value.showTable,async e=>{k.value.table.show||(e&&k.value.table.useDialog&&Xn.value?(await ze(),Xn.value.open()):`close`in Xn.value&&Xn.value.close())});let{isResponsive:Wr}=Ae(mr,hr);function Gr(){pr.value.showTable=!1,Zn.value&&Zn.value.setTableIconState(!1)}let Kr=f(()=>z.value.map((e,t)=>({...e,display:`${e.name}: ${u(A.value.labels.formatter,e.total,a({p:N.value.legend.prefix,v:e.total,s:N.value.legend.suffix,r:N.value.legend.roundingValue}),{datapoint:e})} (${a({v:e.total/R.value*100,s:`%`,r:N.value.legend.roundingPercentage})})`}))),qr=f(()=>Kr.value.map(e=>({color:e.color,name:e.display,shape:`circle`}))),Jr=f(()=>P.value.backgroundColor),Yr=f(()=>({...N.value.legend,textAlign:`center`,show:!0,position:`bottom`})),Xr=f(()=>N.value.title),{isCallbackImaging:Zr,isCallbackSvg:Qr,generateSvg:$r,onGenerateImage:ei}=xe({svg:ar,title:Xr,legend:Yr,legendItems:qr,backgroundColor:Jr,titleEmbedded:!0,getSvgCallback:()=>k.value.userOptions.callbacks.svg,generateImage:ur});async function ti(){vr(`copyAlt`,{config:k.value,dataset:z.value}),k.value.userOptions.callbacks.altCopy?await Promise.resolve(k.value.userOptions.callbacks.altCopy({config:k.value,dataset:z.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function ni(e){if(!e)return``;let t=a({p:N.value.legend.prefix,v:e.total,s:N.value.legend.suffix,r:N.value.legend.roundingValue}),n=a({v:e.total/R.value*100,s:`%`,r:N.value.legend.roundingPercentage});return`Root ${e.name}. Value ${t}. ${n} of total.`}function ri(e){if(!e)return``;let t=a({p:j.value.labels.dataLabels.prefix,v:e.value,s:j.value.labels.dataLabels.suffix,r:j.value.labels.dataLabels.roundingValue}),n=a({v:e.proportionToRoot*100,s:`%`,r:N.value.legend.roundingPercentage});return`Branch ${e.name}. Root ${e.rootName}. Value ${t}. ${n} of root ${e.rootName}.`}function ii(e){if(!e)return``;let t=a({p:N.value.legend.prefix,v:e.value,s:N.value.legend.suffix,r:M.value.selected.labels.roundingValue}),n=a({v:e.proportionToBranch*100,s:`%`,r:M.value.selected.labels.roundingPercentage});return`Nut ${e.name}. Branch ${e.branchName}. Root ${e.rootName}. Value ${t}. ${n} of branch ${e.branchName}.`}let ai=f(()=>Tr.value[O.value.rootIndex]||null),X=f(()=>(Er.value[O.value.rootIndex]||[])[O.value.branchIndex]||null),oi=f(()=>((Dr.value[O.value.rootIndex]||[])[O.value.branchIndex]||[])[O.value.nutIndex]||null),Z=f(()=>ai.value),si=f(()=>X.value),ci=f(()=>O.value.level===`nut`?X.value:null),li=f(()=>Qn.value);function Q(){O.value.level===`root`?D.value=ni(ai.value):O.value.level===`branch`?D.value=ri(X.value):O.value.level===`nut`&&(D.value=ii(oi.value))}function $(){O.value={level:`root`,rootIndex:0,branchIndex:0,nutIndex:0,locked:!1},D.value=``}function ui(){let e=Er.value[O.value.rootIndex]||[];e.length?(O.value.branchIndex>=e.length&&(O.value.branchIndex=0),O.value.branchIndex<0&&(O.value.branchIndex=e.length-1)):O.value.branchIndex=0}function di(){let e=(Dr.value[O.value.rootIndex]||[])[O.value.branchIndex]||[];e.length?(O.value.nutIndex>=e.length&&(O.value.nutIndex=0),O.value.nutIndex<0&&(O.value.nutIndex=e.length-1)):O.value.nutIndex=0}function fi(e){if(O.value.level===`root`){let t=Tr.value.length;if(!t)return;O.value.rootIndex+=e,O.value.rootIndex>=t&&(O.value.rootIndex=0),O.value.rootIndex<0&&(O.value.rootIndex=t-1),O.value.branchIndex=0,O.value.nutIndex=0,Q()}else O.value.level===`branch`?(O.value.branchIndex+=e,ui(),O.value.nutIndex=0,Q()):O.value.level===`nut`&&(O.value.nutIndex+=e,di(),Q())}function pi(e){if(e>0){if(O.value.level===`root`){if(!(Er.value[O.value.rootIndex]||[]).length)return;O.value.level=`branch`,O.value.branchIndex=0,O.value.nutIndex=0,Q();return}if(O.value.level===`branch`){if(!((Dr.value[O.value.rootIndex]||[])[O.value.branchIndex]||[]).length)return;O.value.level=`nut`,O.value.nutIndex=0,X.value?kr(X.value):Q();return}}else O.value.level===`nut`?(J(),W.value=null,O.value.level=`branch`,O.value.nutIndex=0,Q()):O.value.level===`branch`&&(W.value=null,G.value=null,O.value.level=`root`,O.value.nutIndex=0,Q())}function mi(){O.value.level===`root`&&ai.value?(jr(ai.value),D.value=`${ni(ai.value)} selected.`):O.value.level===`branch`&&X.value?(Ar(X.value),D.value=`${ri(X.value)} selected.`):O.value.level===`nut`&&X.value&&oi.value&&(kr(X.value),D.value=`${ii(oi.value)} details opened.`)}function hi(){Qn.value=!0,E.value=!1}function gi(){Qn.value=!1,E.value=!1,D.value=``,G.value||W.value||H.value||$()}function _i(e){let t=e.key===`ArrowUp`,n=e.key===`ArrowDown`,r=e.key===`ArrowLeft`,i=e.key===`ArrowRight`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;(t||n||r||i||a||o)&&(e.preventDefault(),e.stopPropagation(),Qn.value||=!0,o?(K(),$(),E.value=!1):((t||n||r||i)&&(E.value=!0),t?fi(-1):n?fi(1):r?pi(-1):i?pi(1):a&&mi()))}let vi=f(()=>({headers:Y.value.head,rows:Y.value.body.map(e=>[e.rootName,e.rootValue,a({v:e.rootToTotal*100,s:`%`,r:k.value.table.td.roundingPercentage}),e.branchName,e.branchValue,a({v:e.branchToRoot*100,s:`%`,r:k.value.table.td.roundingPercentage}),a({v:e.branchToTotal*100,s:`%`,r:k.value.table.td.roundingPercentage}),e.nutName,e.nutValue,a({v:e.nutToBranch*100,s:`%`,r:k.value.table.td.roundingPercentage}),a({v:e.nutToRoot*100,s:`%`,r:k.value.table.td.roundingPercentage}),a({v:e.nutToTotal*100,s:`%`,r:k.value.table.td.roundingPercentage})])}));return ve({getData:_r,getImage:Vr,generatePdf:lr,generateCsv:Fr,generateImage:ur,generateSvg:$r,toggleTable:Rr,toggleAnnotator:Br,toggleFullscreen:Lr,copyAlt:ti}),(e,i)=>(v(),m(`div`,{class:g(`vue-data-ui-component vue-ui-chestnut ${Ir.value?`vue-data-ui-wrapper-fullscreen`:``}`),ref_key:`chestnutChart`,ref:Jn,id:`vue-ui-chestnut_${T.value}`,style:_(`font-family:${k.value.style.fontFamily};width:100%; text-align:center;background:${P.value.backgroundColor}`),onMouseenter:i[12]||=()=>C(rr)(!0),onMouseleave:i[13]||=()=>C(rr)(!1)},[h(`div`,{id:`chart-instructions-${T.value}`,class:`sr-only`},[h(`p`,null,S(k.value.a11y.translations.keyboardNavigation),1)],8,Xe),h(`div`,Ze,S(D.value),1),vi.value?.rows?.length?(v(),Me(De,{key:0,uid:T.value,head:vi.value.headers,body:vi.value.rows,notice:k.value.a11y.translations.tableAvailable,caption:k.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):p(``,!0),k.value.userOptions.buttons.annotator?(v(),Me(C(Hn),Re({key:1},C(n)(k.value.userOptions.annotator),{svgRef:C(ar),backgroundColor:P.value.backgroundColor,color:P.value.color,active:zr.value,isCursorPointer:F.value,palette:k.value.userOptions.annotatorPalette,onClose:Br}),Ne({_:2},[b(C(r),n=>({name:n,fn:Ke(r=>[x(e.$slots,n,Be(Le(C(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),dr.value?(v(),m(`div`,Qe,null,512)):p(``,!0),k.value.userOptions.show&&qn.value&&(C(ir)||C(nr))?(v(),Me(C(Un),{ref_key:`userOptionsRef`,ref:Zn,key:`user_options_${Yn.value}`,backgroundColor:P.value.backgroundColor,color:P.value.color,isImaging:C(cr),isPrinting:C(sr),uid:T.value,hasPdf:k.value.userOptions.buttons.pdf,hasImg:k.value.userOptions.buttons.img,hasSvg:k.value.userOptions.buttons.svg,hasXls:k.value.userOptions.buttons.csv,hasTable:k.value.userOptions.buttons.table,hasFullscreen:k.value.userOptions.buttons.fullscreen,hasAltCopy:k.value.userOptions.buttons.altCopy,isFullscreen:Ir.value,titles:{...k.value.userOptions.buttonTitles},chartElement:Jn.value,position:k.value.userOptions.position,hasAnnotator:k.value.userOptions.buttons.annotator,isAnnotation:zr.value,callbacks:k.value.userOptions.callbacks,printScale:k.value.userOptions.print.scale,tableDialog:k.value.table.useDialog,isCursorPointer:F.value,onToggleFullscreen:Lr,onGeneratePdf:C(lr),onGenerateCsv:Fr,onGenerateImage:C(ei),onGenerateSvg:C($r),onToggleTable:Rr,onToggleAnnotator:Br,onCopyAlt:ti,style:_({visibility:C(ir)?C(nr)?`visible`:`hidden`:`visible`})},Ne({_:2},[b(C(Ce)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Ke(n=>[x(e.$slots,t,Be(Le(C(we)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):p(``,!0),h(`div`,$e,[I.value.height>0?(v(),m(`svg`,{key:0,ref_key:`svgRef`,ref:ar,xmlns:C(ue),"aria-describedby":`chart-instructions-${T.value}`,class:g({"vue-data-ui-fullscreen--on":Ir.value,"vue-data-ui-fulscreen--off":!Ir.value}),viewBox:`0 0 ${I.value.width<=0?10:I.value.width} ${I.value.height<=0?10:I.value.height}`,style:_(`overflow:visible;background:transparent;color:${P.value.color}`),tabindex:`0`,onFocus:hi,onBlur:gi,onKeydown:_i},[Fe(C(Wn)),x(e.$slots,`svg-underlayer`,{svg:{...I.value,isPrintingImg:C(sr)||C(cr)||C(Zr),isPrintingSvg:C(Qr)}},void 0,!0),e.$slots[`chart-background`]?(v(),m(`foreignObject`,{key:0,x:0,y:0,width:I.value.width<=0?10:I.value.width,height:I.value.height<=0?10:I.value.height,style:{pointerEvents:`none`}},[x(e.$slots,`chart-background`,{},void 0,!0)],8,tt)):p(``,!0),H.value?p(``,!0):(v(),m(`g`,nt,[N.value.title.text?(v(),m(`text`,{key:0,"text-anchor":`middle`,fill:N.value.title.color,"font-weight":N.value.title.bold?`bold`:`normal`,"font-size":N.value.title.fontSize,x:I.value.width/2,y:12+N.value.title.fontSize+N.value.title.offsetY,onClick:i[0]||=()=>{K(),$(),E.value=!1}},S(N.value.title.text),9,rt)):p(``,!0),N.value.title.subtitle.text?(v(),m(`text`,{key:1,"text-anchor":`middle`,fill:N.value.title.subtitle.color,"font-weight":N.value.title.subtitle.bold?`bold`:`normal`,"font-size":N.value.title.subtitle.fontSize,x:I.value.width/2,y:48+N.value.title.subtitle.fontSize+N.value.title.subtitle.offsetY,onClick:i[1]||=()=>{K(),$(),E.value=!1}},S(N.value.title.subtitle.text),9,it)):p(``,!0)])),h(`defs`,null,[(v(!0),m(d,null,b(z.value,(e,t)=>(v(),Me(Ee,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`root_gradient_${T.value}_${e.rootIndex}`,key:`root_gradient_${T.value}_${e.rootIndex}`,stops:[[`0%`,C(c)(C(re)(e.color,.05),100-A.value.gradientIntensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128)),(v(!0),m(d,null,b(z.value,e=>(v(),Me(Ee,{t:`linear`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,id:`branch_gradient_${T.value}_${e.rootIndex}`,key:`branch_gradient_${T.value}_${e.rootIndex}`,stops:[[`0%`,e.color,1],[`100%`,C(c)(C(re)(e.color,.02),100-j.value.gradientIntensity),1]]},null,8,[`id`,`stops`]))),128)),Fe(Ee,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`nutpick_${T.value}`,stops:[[`0%`,C(c)(`#FFFFFF`,0),0],[`80%`,C(c)(`#FFFFFF`,M.value.selected.gradientIntensity),1],[`100%`,C(c)(`#FFFFFF`,0),0]]},null,8,[`id`,`stops`]),Fe(Ee,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`nut_${T.value}`,stops:[[`0%`,C(c)(`#FFFFFF`,0),0],[`80%`,C(c)(`#FFFFFF`,M.value.gradientIntensity),1],[`100%`,C(c)(`#FFFFFF`,0),0]]},null,8,[`id`,`stops`]),Fe(Ee,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`nut_underlayer_${T.value}`,stops:[[`0%`,C(c)(P.value.backgroundColor,100),1],[`80%`,C(c)(P.value.backgroundColor,60),1],[`100%`,C(c)(P.value.backgroundColor,0),1]]},null,8,[`id`,`stops`])]),N.value.grandTotal.show?(v(),m(`g`,at,[h(`text`,{x:L.value.seedX,y:32+N.value.grandTotal.offsetY,"font-size":N.value.grandTotal.fontSize,"font-weight":N.value.grandTotal.bold?`bold`:`normal`,fill:N.value.grandTotal.color,"text-anchor":`middle`,onClick:i[2]||=()=>{K(),$(),E.value=!1}},S(N.value.grandTotal.text),9,ot),h(`text`,{x:L.value.seedX,y:38+N.value.grandTotal.fontSize+N.value.grandTotal.offsetY,"font-size":N.value.grandTotal.fontSize,"font-weight":N.value.grandTotal.bold?`bold`:`normal`,fill:N.value.grandTotal.color,"text-anchor":`middle`,onClick:i[3]||=()=>{K(),$(),E.value=!1}},S(C(u)(N.value.grandTotal.formatter,R.value,C(a)({p:N.value.grandTotal.prefix,v:R.value,s:N.value.grandTotal.suffix,r:N.value.grandTotal.roundingValue}))),9,st)])):p(``,!0),(v(!0),m(d,null,b(V.value,e=>(v(),m(`g`,null,[h(`defs`,null,[Fe(Ee,{t:`linear`,id:`link_grad_${e.id}`,stops:[[`0%`,e.color,1],[`100%`,C(c)(e.color,N.value.links.opacity),1]]},null,8,[`id`,`stops`])]),h(`path`,{d:Hr(e),stroke:C(c)(e.color,N.value.links.opacity),fill:`url(#link_grad_${e.id})`,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:_(`opacity:${+!!q(e)}`),onClick:i[4]||=()=>{K(),$(),E.value=!1}},null,12,ct)]))),256)),(v(!0),m(d,null,b(B.value,e=>(v(),m(`circle`,{cx:e.x,cy:e.y,r:e.r,fill:A.value.underlayerColor,stroke:`none`,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`)},null,12,lt))),256)),(v(!0),m(d,null,b(B.value,(e,t)=>(v(),m(`circle`,{"aria-label":ni(e),cx:e.x,cy:e.y,r:e.r,fill:A.value.useGradient?`url(#root_gradient_${T.value}_${e.rootIndex})`:e.color,stroke:A.value.stroke,"stroke-width":A.value.strokeWidth,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>jr(e)},null,12,ut))),256)),A.value.labels.show?(v(),m(`g`,dt,[(v(!0),m(d,null,b(B.value,(e,t)=>(v(),m(`text`,{x:e.x,y:e.y+A.value.labels.fontSize/2.6,"text-anchor":`middle`,"font-size":A.value.labels.fontSize,fill:A.value.labels.adaptColorToBackground?C(le)(e.color):A.value.labels.color,"font-weight":`bold`,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>jr(e)},S(C(u)(A.value.labels.formatter,e.total,C(a)({p:A.value.labels.prefix,v:e.total,s:A.value.labels.suffix,r:A.value.labels.roundingValue}),{datapoint:e})),13,ft))),256)),(v(!0),m(d,null,b(B.value,e=>(v(),m(`g`,null,[H.value&&e.rootIndex===H.value.rootIndex||W.value&&e.rootIndex===W.value.rootIndex||G.value&&e.rootIndex===G.value.rootIndex?(v(),m(`g`,pt,[h(`text`,{x:e.x,y:e.y+e.r+24,"text-anchor":`middle`,fill:A.value.labels.name.color,"font-size":A.value.labels.name.fontSize,"font-weight":A.value.labels.name.bold?`bold`:`normal`,onClick:i[5]||=()=>{K(),$(),E.value=!1}},S(e.name),9,mt)])):p(``,!0)]))),256))])):p(``,!0),(v(!0),m(d,null,b(V.value,e=>(v(),m(`rect`,{x:e.x1,y:e.y1,height:I.value.branchSize,width:e.x2-e.x1,fill:j.value.underlayerColor,rx:j.value.borderRadius,stroke:`none`,style:_(`opacity:${q(e)?1:.05}`),onClick:t=>Ar(e)},null,12,ht))),256)),(v(!0),m(d,null,b(V.value,(e,t)=>(v(),m(`rect`,{"aria-label":ri(e),x:e.x1,y:e.y1,height:I.value.branchSize,width:e.x2-e.x1,fill:j.value.useGradient?`url(#branch_gradient_${T.value}_${e.rootIndex})`:e.color,rx:j.value.borderRadius,stroke:j.value.stroke,"stroke-width":j.value.strokeWidth,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>Ar(e)},null,12,gt))),256)),j.value.labels.dataLabels.show?(v(),m(`g`,_t,[(v(!0),m(d,null,b(V.value,e=>(v(),m(`g`,null,[e.proportionToRoot*100>j.value.labels.dataLabels.hideUnderValue?(v(),m(`text`,{key:0,x:e.x1+6,y:e.y1+I.value.branchSize/1.5,"text-anchor":`start`,fill:C(le)(e.color),"font-size":j.value.labels.dataLabels.fontSize,"font-weight":`bold`,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>Ar(e)},S(C(u)(j.value.labels.dataLabels.formatter,e.value,C(a)({p:N.value.branches.labels.dataLabels.prefix,v:e.value,s:N.value.branches.labels.dataLabels.suffix,r:N.value.branches.labels.dataLabels.roundingValue}),{datapoint:e})),13,vt)):p(``,!0)]))),256))])):p(``,!0),(v(!0),m(d,null,b(V.value,(e,t)=>(v(),m(`g`,null,[(v(!0),m(d,null,b(C(ee)({series:e.breakdown,base:1},e.x2+24+M.value.offsetX,e.y1+I.value.branchSize/2,I.value.branchSize/3,I.value.branchSize/3),(t,n)=>(v(),m(`path`,{d:t.path,stroke:t.color,"stroke-width":10,fill:`none`,style:_(`opacity:${q(e)?1:.1}`)},null,12,yt))),256)),h(`circle`,{"aria-label":`Open details for branch ${e.name} in root ${e.rootName}`,fill:M.value.useGradient?`url(#nut_${T.value})`:`transparent`,cx:e.x2+24+M.value.offsetX,cy:e.y1+I.value.branchSize/2,r:I.value.branchSize/2+2,onClick:t=>kr(e),style:_(`cursor:${F.value?`pointer`:`default`};opacity:${q(e)?1:.1}`)},null,12,bt)]))),256)),j.value.labels.show&&!W.value?(v(),m(`g`,xt,[(v(!0),m(d,null,b(V.value,e=>(v(),m(`text`,{x:e.x2+I.value.branchSize+24+M.value.offsetX,y:e.y1+I.value.branchSize/2+5,"font-size":j.value.labels.fontSize,"font-weight":j.value.labels.bold?`bold`:`normal`,fill:j.value.labels.color,"text-anchor":`start`,style:_(`opacity:${q(e)?1:.1}`)},S(e.name),13,St))),256))])):p(``,!0),h(`line`,{x1:256+I.value.padding.left,x2:256+I.value.padding.left,y1:L.value.top,y2:L.value.bottom,stroke:N.value.verticalSeparator.stroke,"stroke-width":N.value.verticalSeparator.strokeWidth},null,8,Ct),!H.value&&!W.value?(v(),m(`foreignObject`,{key:6,x:0,y:L.value.bottom,height:I.value.height-L.value.bottom,width:I.value.width,style:{overflow:`visible`},"data-no-svg-export":``,onClick:i[6]||=()=>{K(),$(),E.value=!1}},[h(`div`,Tt,[h(`div`,Et,[(v(!0),m(d,null,b(B.value,e=>(v(),m(`div`,{style:_(`display:flex;align-items:center;gap:3px;flex-direction:row;font-size:${N.value.legend.fontSize}px;`)},[(v(),m(`svg`,Dt,[h(`circle`,{cx:`10`,cy:`10`,r:`10`,fill:e.color,stroke:`none`},null,8,Ot)])),C(er)?p(``,!0):(v(),m(d,{key:0},[h(`span`,null,S(e.name)+`:`,1),h(`b`,null,S(C(u)(N.value.roots.labels.formatter,e.total,C(a)({p:P.value.layout.legend.prefix,v:e.total,s:P.value.layout.legend.suffix,r:P.value.layout.legend.roundingValue}),{datapoint:e})),1),Pe(` (`+S(C(a)({v:e.total/R.value*100,s:`%`,r:N.value.legend.roundingPercentage}))+`) `,1)],64))],4))),256))])])],8,wt)):p(``,!0),H.value&&U.value?(v(),m(`g`,kt,[(v(),m(`foreignObject`,{x:0,y:Mr(),height:I.value.height-L.value.bottom,width:I.value.width,style:{overflow:`visible`},onClick:i[7]||=()=>{K(),$(),E.value=!1}},[h(`div`,jt,[h(`b`,null,S(H.value.name),1),h(`div`,Mt,[(v(!0),m(d,null,b(H.value.breakdown,(e,t)=>(v(),m(`div`,{style:_(`display:flex;align-items:center;gap:6px;flex-direction:row;font-size:${N.value.legend.fontSize}px;`)},[(v(),m(`svg`,Nt,[h(`circle`,{cx:`10`,cy:`10`,r:`10`,fill:e.color,stroke:`none`},null,8,Pt)])),h(`span`,null,[Pe(S(e.name)+`: `,1),h(`b`,null,S(N.value.legend.prefix)+` `+S(e.value.toFixed(P.value.layout.nuts.selected.labels.roundingValue))+` `+S(N.value.legend.suffix),1),Pe(` (`+S((e.proportionToBranch*100).toFixed(N.value.nuts.selected.labels.roundingPercentage))+`%)`,1)])],4))),256))])])],8,At)),h(`circle`,{cx:H.value.x2+24+M.value.offsetX,cy:H.value.y1+I.value.branchSize/2,r:256,fill:`url(#nut_underlayer_${T.value})`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Ft),(v(!0),m(d,null,b(U.value,e=>(v(),m(`g`,null,[Nr(e)?(v(),m(`path`,{key:0,d:C(ae)(e,{x:H.value.x2+24+M.value.offsetX,y:H.value.y1+I.value.branchSize/2},16,16,!1,!1,64),stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,It)):p(``,!0)]))),256)),h(`circle`,{cx:H.value.x2+24+M.value.offsetX,cy:H.value.y1+I.value.branchSize/2,r:118,fill:P.value.backgroundColor,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Lt),(v(!0),m(d,null,b(U.value,e=>(v(),m(`path`,{d:e.path,stroke:e.color,"stroke-width":64,fill:`none`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Rt))),256)),h(`circle`,{cx:H.value.x2+24+M.value.offsetX,cy:H.value.y1+I.value.branchSize/2,r:110,fill:`url(#nutpick_${T.value})`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,zt),h(`circle`,{cx:H.value.x2+24+M.value.offsetX,cy:H.value.y1+I.value.branchSize/2,r:64,fill:P.value.backgroundColor,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Bt),h(`text`,{x:H.value.x2+24+M.value.offsetX,y:H.value.y1+8,fill:M.value.selected.labels.core.total.color,"font-size":M.value.selected.labels.core.total.fontSize,"font-weight":M.value.selected.labels.core.total.bold?`bold`:`normal`,"text-anchor":`middle`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(k.value.translations.total),11,Vt),h(`text`,{x:H.value.x2+24+M.value.offsetX,y:H.value.y1+36,fill:M.value.selected.labels.core.value.color,"font-size":M.value.selected.labels.core.value.fontSize,"font-weight":M.value.selected.labels.core.value.bold?`bold`:`normal`,"text-anchor":`middle`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(C(u)(M.value.selected.labels.dataLabels.formatter,H.value.value,C(a)({p:M.value.selected.labels.core.value.prefix,v:H.value.value,s:M.value.selected.labels.core.value.suffix,r:M.value.selected.roundingValue}),{datapoint:H.value})),11,Ht),(v(!0),m(d,null,b(U.value,(e,t)=>(v(),m(`g`,null,[Nr(e)?(v(),m(`text`,{key:0,x:C(l)(e).x,"text-anchor":C(l)(e).anchor,y:C(ce)(e)-M.value.selected.labels.dataLabels.fontSize/6,fill:e.color,"font-size":M.value.selected.labels.dataLabels.fontSize/2,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},` ⬤ `,14,Ut)):p(``,!0),Nr(e)?(v(),m(`text`,{key:1,x:C(l)(e,!0).x,"text-anchor":C(l)(e,!0).anchor,y:C(ce)(e),fill:M.value.selected.labels.dataLabels.color,"font-size":M.value.selected.labels.dataLabels.fontSize,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(H.value.breakdown[t].name),15,Wt)):p(``,!0)]))),256)),(v(!0),m(d,null,b(U.value,(e,t)=>(v(),m(`g`,null,[Nr(e)?(v(),m(`text`,{key:0,x:C(l)(e,!0).x,"text-anchor":C(l)(e).anchor,y:C(ce)(e)+M.value.selected.labels.dataLabels.fontSize,fill:M.value.selected.labels.dataLabels.color,"font-size":M.value.selected.labels.dataLabels.fontSize,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(C(a)({v:H.value.breakdown[t].value/H.value.value*100,s:`%`,r:M.value.selected.labels.roundingPercentage}))+` `+S(k.value.translations.of)+` `+S(H.value.breakdown[t].branchName)+` `+S(C(u)(M.value.selected.labels.dataLabels.formatter,H.value.breakdown[t].value,C(a)({p:M.value.selected.labels.dataLabels.prefix,v:H.value.breakdown[t].value,s:M.value.selected.labels.dataLabels.suffix,r:M.value.selected.roundingValue}),{datapoint:U.value,seriesIndex:t})),15,Gt)):p(``,!0),Nr(e)?(v(),m(`text`,{key:1,x:C(l)(e,!0).x,"text-anchor":C(l)(e).anchor,y:C(ce)(e)+M.value.selected.labels.dataLabels.fontSize*2,fill:M.value.selected.labels.dataLabels.color,"font-size":M.value.selected.labels.dataLabels.fontSize,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(C(a)({v:H.value.breakdown[t].proportionToRoot*100,s:`%`,r:M.value.selected.labels.roundingPercentage}))+` `+S(k.value.translations.of)+` `+S(H.value.breakdown[t].rootName),15,Kt)):p(``,!0),Nr(e)?(v(),m(`text`,{key:2,x:C(l)(e,!0).x,"text-anchor":C(l)(e).anchor,y:C(ce)(e)+M.value.selected.labels.dataLabels.fontSize*3,fill:M.value.selected.labels.dataLabels.color,"font-size":M.value.selected.labels.dataLabels.fontSize,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(C(a)({v:H.value.breakdown[t].proportionToTree*100,s:`%`,r:M.value.selected.labels.roundingPercentage}))+` `+S(k.value.translations.proportionToTree),15,qt)):p(``,!0)]))),256))])):p(``,!0),(v(!0),m(d,null,b(V.value,e=>(v(),m(`g`,null,[W.value&&W.value.id===e.id&&!H.value?(v(),m(`text`,{key:0,x:e.x1+6,y:e.y1+I.value.branchSize+24,"font-weight":`bold`,"text-anchor":`start`,"font-size":j.value.labels.dataLabels.fontSize,fill:j.value.labels.color,onClick:i[8]||=()=>{K(),$(),E.value=!1}},S(e.name)+`: `+S(C(u)(j.value.labels.dataLabels.formatter,e.value,C(a)({p:j.value.labels.dataLabels.prefix,v:e.value,s:j.value.labels.dataLabels.suffix,r:j.value.labels.dataLabels.roundingValue}),{datapoint:e})),9,Jt)):p(``,!0),W.value&&W.value.id===e.id&&!H.value?(v(),m(`text`,{key:1,x:e.x1+6,y:e.y1+I.value.branchSize+48,"text-anchor":`start`,"font-size":j.value.labels.dataLabels.fontSize,fill:j.value.labels.color,onClick:i[9]||=()=>{K(),$(),E.value=!1}},S(C(a)({v:e.proportionToRoot*100,s:`%`,r:j.value.labels.dataLabels.roundingPercentage}))+` `+S(k.value.translations.of)+` `+S(e.rootName),9,Yt)):p(``,!0),W.value&&W.value.id===e.id&&!H.value?(v(),m(`text`,{key:2,x:e.x1+6,y:e.y1+I.value.branchSize+72,"text-anchor":`start`,"font-size":j.value.labels.dataLabels.fontSize,fill:j.value.labels.color,onClick:i[10]||=()=>{K(),$(),E.value=!1}},S(C(a)({v:e.value/R.value*100,s:`%`,r:j.value.labels.dataLabels.roundingPercentage}))+` `+S(k.value.translations.proportionToTree),9,Xt)):p(``,!0)]))),256)),x(e.$slots,`svg`,{svg:{...I.value,isPrintingImg:C(sr)||C(cr)||C(Zr),isPrintingSvg:C(Qr)}},void 0,!0)],46,et)):p(``,!0)]),e.$slots.watermark?(v(),m(`div`,Zt,[x(e.$slots,`watermark`,Be(Le({isPrinting:C(sr)||C(cr)||C(Zr)||C(Qr)})),void 0,!0)])):p(``,!0),x(e.$slots,`legend`,{legend:z.value},void 0,!0),e.$slots.source?(v(),m(`div`,Qt,[x(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),qn.value&&k.value.userOptions.buttons.table?(v(),Me(He(Ur.value.component),Re({key:6},Ur.value.props,{ref_key:`tableUnit`,ref:Xn,onClose:Gr}),Ne({content:Ke(()=>[h(`div`,{ref_key:`tableContainer`,ref:mr,class:`vue-ui-chestnut-table`,style:_(`${k.value.table.useDialog?``:`max-height: 300px;margin-top:24px`}`)},[h(`div`,{style:_(`${k.value.table.useDialog?``:`padding-top:36px;`}position: relative`)},[k.value.table.useDialog?p(``,!0):(v(),m(`div`,{key:0,role:`button`,tabindex:`0`,style:_(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:${F.value?`pointer`:`default`}; background:${k.value.table.th.backgroundColor};`),onClick:Gr,onKeypress:qe(Gr,[`enter`])},[Fe(C(Bn),{name:`close`,stroke:k.value.table.th.color,"stroke-width":2},null,8,[`stroke`])],36)),h(`div`,{style:{width:`100%`},class:g({"vue-ui-responsive":C(Wr)})},[h(`table`,$t,[k.value.table.useDialog?p(``,!0):(v(),m(`caption`,{key:0,style:_({backgroundColor:k.value.table.th.backgroundColor,color:k.value.table.th.color,outline:k.value.table.th.outline}),class:`vue-ui-data-table__caption`},[Pe(S(N.value.title.text)+` `,1),N.value.title.subtitle.text?(v(),m(`span`,en,S(N.value.title.subtitle.text),1)):p(``,!0)],4)),h(`thead`,null,[h(`tr`,{role:`row`,style:_(`background:${k.value.table.th.backgroundColor};color:${k.value.table.th.color}`)},[(v(!0),m(d,null,b(Y.value.head,e=>(v(),m(`th`,{style:_(`outline:${k.value.table.th.outline}`)},S(e),5))),256))],4)]),h(`tbody`,null,[(v(!0),m(d,null,b(Y.value.body,(e,t)=>(v(),m(`tr`,{class:g({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":t%2==0,"vue-ui-data-table__tbody__row-odd":t%2!=0}),style:_(`background:${k.value.table.td.backgroundColor};color:${k.value.table.td.color}`)},[h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[0]},[h(`div`,nn,[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?(v(),m(`span`,rn)):(v(),m(`span`,an,S(e.rootName),1))])],12,tn),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[1]},[h(`div`,sn,[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?(v(),m(`span`,cn)):(v(),m(`span`,ln,S(e.rootValue.toFixed(k.value.table.td.roundingValue)),1))])],12,on),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[2]},[h(`div`,dn,[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?(v(),m(`span`,fn)):(v(),m(`span`,pn,S((e.rootToTotal*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1))])],12,un),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[3]},[h(`div`,hn,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(v(),m(`span`,gn)):(v(),m(`span`,_n,S(e.branchName),1))])],12,mn),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[4]},[h(`div`,yn,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(v(),m(`span`,bn)):(v(),m(`span`,xn,S(e.branchValue.toFixed(k.value.table.td.roundingValue)),1))])],12,vn),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[5]},[h(`div`,Cn,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(v(),m(`span`,wn)):(v(),m(`span`,Tn,S((e.branchToRoot*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1))])],12,Sn),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[6]},[h(`div`,Dn,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(v(),m(`span`,On)):(v(),m(`span`,kn,S((e.branchToTotal*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1))])],12,En),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[7]},[h(`div`,jn,S(e.nutName),1)],12,An),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[8]},[h(`div`,Nn,S(e.nutValue.toFixed(k.value.table.td.roundingValue)),1)],12,Mn),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[9]},[h(`div`,Fn,S((e.nutToBranch*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1)],12,Pn),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[10]},[h(`div`,Ln,S((e.nutToRoot*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1)],12,In),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[11]},[h(`div`,zn,S((e.nutToTotal*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1)],12,Rn)],6))),256))])])],2)],4)],4)]),_:2},[k.value.table.useDialog?{name:`title`,fn:Ke(()=>[Pe(S(Ur.value.title),1)]),key:`0`}:void 0,k.value.table.useDialog?{name:`actions`,fn:Ke(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[11]||=e=>Fr(k.value.userOptions.callbacks.csv)},[Fe(C(Bn),{name:`fileCsv`,stroke:Ur.value.props.color},null,8,[`stroke`])])]),key:`1`}:void 0]),1040)):p(``,!0),x(e.$slots,`skeleton`,{},()=>[C(er)?(v(),Me(he,{key:0})):p(``,!0)],!0)],46,Ye))}},[[`__scopeId`,`data-v-bbde84b6`]]);export{Je as n,Bn as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,D as o,Ht as s,S as c,X as ee,Y as l,at as te,i as ne,in as re,nt as ie,r as ae,sn as oe,t as se,w as ce,yt as le,zt as ue}from"./lib-rPeBMZrn.js";import{n as de,t as fe}from"./BaseScanner-8NdoBs7B.js";import{n as pe}from"./useHints-C-TwxM0Y.js";import{t as me}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as he}from"./resolveChartConfig-CIhClE5R.js";import{t as ge}from"./chartImage-DPGnEuYM.js";import{n as _e}from"./Title-BliHuXfT.js";import{t as ve}from"./useChartExport-BZts4KFb.js";import{n as ye,t as be}from"./tableIntegration-CNoJ1CIY.js";import{n as xe,t as Se}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ce}from"./usePrinter-DVf3YcG5.js";import{t as we}from"./Shape-CRe8woTu.js";import{c as Te}from"./canvas-lib-22VpOI4_.js";import{t as Ee}from"./useResponsive-CENUxfEL.js";import{t as De}from"./A11yDataTable-DWNlWXzs.js";import{t as Oe}from"./useUserOptionState-CXlFnwPv.js";import{t as ke}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ae}from"./Legend-DM0ClX3D.js";import{t as je}from"./vue_ui_chord-Fq6VBRT1.js";import{Fragment as u,Teleport as Me,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Ne,createTextVNode as Pe,createVNode as Fe,defineAsyncComponent as g,guardReactiveProps as Ie,mergeProps as Le,nextTick as Re,normalizeClass as _,normalizeProps as ze,normalizeStyle as v,onBeforeUnmount as Be,onMounted as Ve,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as He,shallowRef as Ue,toDisplayString as C,toRefs as We,unref as w,useCssVars as Ge,watch as Ke,withCtx as T,withModifiers as qe}from"vue";var Je=/* @__PURE__ */ e({default:()=>Et}),Ye=[`id`],Xe=[`id`],Ze=[`id`],Qe=[`xmlns`,`viewBox`,`aria-describedby`],$e=[`width`,`height`],et={key:1},tt=[`id`,`d`],nt={key:2},rt=[`transform`],it=[`d`,`fill`,`stroke`,`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],at=[`d`,`fill`,`stroke`,`stroke-width`],ot=[`d`,`fill`],st=[`d`,`fill`,`stroke`,`stroke-width`,`onMouseenter`,`onClick`,`onMouseleave`],ct=[`d`,`fill`,`stroke`,`stroke-width`],lt=[`d`,`fill`,`stroke`,`stroke-width`],ut=[`d`,`fill`,`stroke`,`stroke-width`],dt={key:0},ft=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],pt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],mt=[`cx`,`cy`,`r`,`stroke`,`stroke-width`,`fill`],ht=[`transform`,`fill`,`text-anchor`,`font-size`,`font-weight`],gt={key:1},_t=[`font-size`,`font-weight`,`fill`],vt=[`href`],yt=[`transform`,`text-anchor`,`font-size`,`font-weight`,`fill`,`innerHTML`],bt={key:5,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},xt={key:6,class:`vue-data-ui-watermark`},St=[`id`],Ct=[`onClick`],wt={key:9,"data-dom-to-png-ignore":``,class:`reset-wrapper`},Tt={style:{"text-align":`right`,width:`100%`}},Et=/*#__PURE__*/ me({__name:`vue-ui-chord`,props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},emits:[`selectLegend`,`selectGroup`,`selectRibbon`,`copyAlt`],setup(e,{expose:me,emit:Je}){Ge(e=>({v937160c2:e.slicerColor}));let Et=g(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Dt=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Ot=g(()=>import(`./DataTable-Dof6yhO7.js`)),kt=g(()=>import(`./PackageVersion-
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,D as o,Ht as s,S as c,X as ee,Y as l,at as te,i as ne,in as re,nt as ie,r as ae,sn as oe,t as se,w as ce,yt as le,zt as ue}from"./lib-rPeBMZrn.js";import{n as de,t as fe}from"./BaseScanner-8NdoBs7B.js";import{n as pe}from"./useHints-C-TwxM0Y.js";import{t as me}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as he}from"./resolveChartConfig-CIhClE5R.js";import{t as ge}from"./chartImage-DPGnEuYM.js";import{n as _e}from"./Title-BliHuXfT.js";import{t as ve}from"./useChartExport-BZts4KFb.js";import{n as ye,t as be}from"./tableIntegration-CNoJ1CIY.js";import{n as xe,t as Se}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ce}from"./usePrinter-DVf3YcG5.js";import{t as we}from"./Shape-CRe8woTu.js";import{c as Te}from"./canvas-lib-22VpOI4_.js";import{t as Ee}from"./useResponsive-CENUxfEL.js";import{t as De}from"./A11yDataTable-DWNlWXzs.js";import{t as Oe}from"./useUserOptionState-CXlFnwPv.js";import{t as ke}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ae}from"./Legend-DM0ClX3D.js";import{t as je}from"./vue_ui_chord-Fq6VBRT1.js";import{Fragment as u,Teleport as Me,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Ne,createTextVNode as Pe,createVNode as Fe,defineAsyncComponent as g,guardReactiveProps as Ie,mergeProps as Le,nextTick as Re,normalizeClass as _,normalizeProps as ze,normalizeStyle as v,onBeforeUnmount as Be,onMounted as Ve,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as He,shallowRef as Ue,toDisplayString as C,toRefs as We,unref as w,useCssVars as Ge,watch as Ke,withCtx as T,withModifiers as qe}from"vue";var Je=/* @__PURE__ */ e({default:()=>Et}),Ye=[`id`],Xe=[`id`],Ze=[`id`],Qe=[`xmlns`,`viewBox`,`aria-describedby`],$e=[`width`,`height`],et={key:1},tt=[`id`,`d`],nt={key:2},rt=[`transform`],it=[`d`,`fill`,`stroke`,`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],at=[`d`,`fill`,`stroke`,`stroke-width`],ot=[`d`,`fill`],st=[`d`,`fill`,`stroke`,`stroke-width`,`onMouseenter`,`onClick`,`onMouseleave`],ct=[`d`,`fill`,`stroke`,`stroke-width`],lt=[`d`,`fill`,`stroke`,`stroke-width`],ut=[`d`,`fill`,`stroke`,`stroke-width`],dt={key:0},ft=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],pt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],mt=[`cx`,`cy`,`r`,`stroke`,`stroke-width`,`fill`],ht=[`transform`,`fill`,`text-anchor`,`font-size`,`font-weight`],gt={key:1},_t=[`font-size`,`font-weight`,`fill`],vt=[`href`],yt=[`transform`,`text-anchor`,`font-size`,`font-weight`,`fill`,`innerHTML`],bt={key:5,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},xt={key:6,class:`vue-data-ui-watermark`},St=[`id`],Ct=[`onClick`],wt={key:9,"data-dom-to-png-ignore":``,class:`reset-wrapper`},Tt={style:{"text-align":`right`,width:`100%`}},Et=/*#__PURE__*/ me({__name:`vue-ui-chord`,props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},emits:[`selectLegend`,`selectGroup`,`selectRibbon`,`copyAlt`],setup(e,{expose:me,emit:Je}){Ge(e=>({v937160c2:e.slicerColor}));let Et=g(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Dt=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Ot=g(()=>import(`./DataTable-Dof6yhO7.js`)),kt=g(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),At=g(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),jt=g(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Mt=g(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_chord:Nt}=i(),E=e,Pt=Je,D=b(!!E.dataset&&Object.hasOwn(E.dataset,`matrix`)),O=b(ee()),k=b(null),A=b(null),j=b(null),Ft=b(0),M=b(null),It=b(null),Lt=b(null),Rt=b(null),zt=b(null),Bt=b(0),Vt=b(0),Ht=b(0),Ut=b(!1),N=Ue(null),P=Ue(null),Wt=b(!1),Gt=b(null),Kt=b(null),F=b(`group`),I=b(null),qt=b(!1),L=b(an()),R=d(()=>L.value.style.chart.arcs),z=d(()=>L.value.style.chart.ribbons),B=d(()=>L.value.style.chart);pe({config:()=>L.value,dataset:()=>E.dataset,component:`VueUiChord`,rules:[{test:e=>e.matrix&&e.matrix.length>12,message:[`👀 The number of groups > 12, the chart might become hard to read. Consider:`,``,`▶️ Using broader groups to reduce their number.`]}]});let V=d(()=>L.value.userOptions.useCursorPointer),Jt=d(()=>re({defaultConfig:{useCssAnimation:!1,userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,legend:{backgroundColor:`transparent`},arcs:{stroke:`#6A6A6A`,labels:{show:!1}},ribbons:{stroke:`#6A6A6A`,underlayerOpacity:0,labels:{show:!1}}}}},userConfig:L.value.skeletonConfig??{}})),{loading:Yt,FINAL_DATASET:H,manualLoading:Xt}=de({...We(E),FINAL_CONFIG:L,prepareConfig:an,callback:()=>{Promise.resolve().then(async()=>{await Re(),W.value.showTable=L.value.table.show})},skeletonDataset:E.config?.skeletonDataset??{matrix:[[12e3,6e3,9e3,3e3],[2e3,1e4,2e3,6001],[8e3,1600,8e3,8001],[1e3,1e3,1e3,7001]],labels:[],colors:[`#DBDBDB`,`#C4C4C4`,`#ADADAD`,`#969696`]},skeletonConfig:re({defaultConfig:L.value,userConfig:Jt.value})}),{userOptionsVisible:Zt,setUserOptionsVisibility:Qt,keepUserOptionState:$t}=Oe({config:L.value}),{svgRef:U}=ke({config:B.value.title}),{isPrinting:en,isImaging:tn,generatePdf:nn,generateImage:rn}=Ce({elementId:`chord_${O.value}`,fileName:B.value.title.text||`vue-ui-chord`,options:L.value.userOptions.print}),W=b({showTable:L.value.table.show});function an(){return he(E.config,Nt,je)}Ke(()=>E.config,e=>{Yt.value||(L.value=an()),Zt.value=!L.value.userOptions.showOnChartHover,sn(),Bt.value+=1,Vt.value+=1,Ht.value+=1,X.value=L.value.initialRotation,W.value.showTable=L.value.table.show},{deep:!0});let G=d(()=>L.value.debug);Ke(()=>E.dataset,()=>{on(),sn(),Bt.value+=1,Vt.value+=1,Ht.value+=1});function on(){if(ue(E.dataset)){te({componentName:`VueUiChord`,type:`dataset`,debug:G.value}),D.value=!1,Xt.value=!0;return}let e=le({datasetObject:E.dataset,requiredAttributes:[`matrix`]});if(e.length){G.value&&e.forEach(e=>{te({componentName:`VueUiChord`,type:`datasetAttribute`,property:e})}),D.value=!1,Xt.value=!0;return}let t=E.dataset.matrix;if(!Array.isArray(t)||t.length<2){G.value&&console.warn(`VueUiChord: dataset.matrix requires a minimum of 2 datapoints, for example:
|
|
2
2
|
|
|
3
3
|
matrix:[
|
|
4
4
|
[1, 1],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,D as o,Dt as s,Ft as c,Ht as l,Q as u,S as d,X as f,Zt as p,at as m,i as ee,in as h,nn as g,nt as te,q as ne,r as re,t as ie,tn as ae,w as oe,zt as se}from"./lib-rPeBMZrn.js";import{n as ce,t as le}from"./BaseScanner-8NdoBs7B.js";import{n as ue,t as de}from"./useHints-C-TwxM0Y.js";import{t as fe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as pe}from"./resolveChartConfig-CIhClE5R.js";import{t as me}from"./chartImage-DPGnEuYM.js";import{n as he}from"./Title-BliHuXfT.js";import{t as ge}from"./useChartExport-BZts4KFb.js";import{t as _e}from"./tableIntegration-CNoJ1CIY.js";import{n as ve,t as ye}from"./userOptionsSlots-DYuo-E5m.js";import{t as be}from"./usePrinter-DVf3YcG5.js";import{t as xe}from"./useTransitions-ChGGrtrv.js";import{c as Se}from"./canvas-lib-22VpOI4_.js";import{t as Ce}from"./useResponsive-CENUxfEL.js";import{t as we}from"./DefGrad-DKMq1REY.js";import{t as Te}from"./A11yDataTable-DWNlWXzs.js";import{t as Ee}from"./useUserOptionState-CXlFnwPv.js";import{t as De}from"./useChartAccessibility-DOMuYJfm.js";import{n as Oe}from"./annotationViewport-X8fvs7pz.js";import{t as ke}from"./usePanZoom-CE6Ofyy8.js";import{t as Ae}from"./vue_ui_circle_pack-CfXkXi7v.js";import{Fragment as _,computed as v,createBlock as y,createCommentVNode as b,createElementBlock as x,createElementVNode as S,createSlots as je,createTextVNode as Me,createVNode as Ne,defineAsyncComponent as C,guardReactiveProps as w,mergeProps as Pe,nextTick as Fe,normalizeClass as T,normalizeProps as E,normalizeStyle as Ie,onBeforeUnmount as Le,onMounted as Re,openBlock as D,ref as O,renderList as k,renderSlot as A,resolveDynamicComponent as ze,toDisplayString as j,toRefs as Be,unref as M,useCssVars as Ve,watch as He,withCtx as N}from"vue";function Ue(e,t=0){let n=e.reduce((e,{x:n,r})=>Math.min(e,n-r-t),1/0),r=e.reduce((e,{x:n,r})=>Math.max(e,n+r+t),-1/0),i=e.reduce((e,{y:n,r})=>Math.min(e,n-r-t),1/0),a=e.reduce((e,{y:n,r})=>Math.max(e,n+r+t),-1/0);return[n,i,r-n,a-i]}function We(e,t,n){let r=e._,i=e.next._,a=r.r+i.r,o=(r.x*i.r+i.x*r.r)/a,s=(r.y*i.r+i.y*r.r)/a;return Math.max(Math.abs(o*n),Math.abs(s*t))}function Ge(e,t,n){let r=We,i=e.length;if(!i)return e;e.sort((e,t)=>t.r-e.r);let a,o,s;if(a=e[0],a.x=0,a.y=0,!(i>1))return e;if(o=e[1],a.x=-o.r,o.x=a.r,o.y=0,!(i>2))return Je(e,n,t),e;Ke(o,a,s=e[2]),a=new tt(a),o=new tt(o),s=new tt(s),a.next=s.previous=o,o.next=a.previous=s,s.next=o.previous=a;packLoop:for(let c=3;c<i;++c){Ke(a._,o._,s=e[c]),s=new tt(s);let i=o.next,l=a.previous,u=o._.r,d=a._.r;do if(u<=d){if(qe(i._,s._)){o=i,a.next=o,o.previous=a,--c;continue packLoop}u+=i._.r,i=i.next}else{if(qe(l._,s._)){a=l,a.next=o,o.previous=a,--c;continue packLoop}d+=l._.r,l=l.previous}while(i!==l.next);s.previous=a,s.next=o,a.next=o.previous=o=s;let f=a,p=r(a,n,t),m=a.next;for(;m!==o;){let e=r(m,n,t);e<p&&(f=m,p=e),m=m.next}a=f,o=a.next}return Je(e,n,t),Ze(e,n,t),e}function Ke(e,t,n){let r=e.x-t.x,i=e.y-t.y,a=r*r+i*i;if(a){let o=(t.r+n.r)**2,s=(e.r+n.r)**2;if(o>s){let t=(a+s-o)/(2*a),c=Math.sqrt(Math.max(0,s/a-t*t));n.x=e.x-t*r-c*i,n.y=e.y-t*i+c*r}else{let e=(a+o-s)/(2*a),c=Math.sqrt(Math.max(0,o/a-e*e));n.x=t.x+e*r-c*i,n.y=t.y+e*i+c*r}}else n.x=t.x+n.r,n.y=t.y}function qe(e,t){let n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Je(e,t,n){if(e.length<4)return;let r=e[0].r,i=e.findIndex(e=>e.r<r*.6),a=i===-1?Math.min(e.length,12):i,o=e.slice(0,Math.max(3,a));for(let t=0;t<80;t+=1){let t=!1;for(let n=0;n<o.length;n+=1){let r=o[n],i=.06*(1-n/Math.max(1,o.length)),a=r.x*(1-i),s=r.y*(1-i);Ye(r,a,s,e,n)&&(r.x=a,r.y=s,t=!0)}if(Xe(o),!t)break}let s=o.reduce((e,t)=>e+t.x,0)/o.length,c=o.reduce((e,t)=>e+t.y,0)/o.length;for(let t of e)t.x-=s,t.y-=c}function Ye(e,t,n,r){let i=e.x,a=e.y;e.x=t,e.y=n;for(let t of r)if(t!==e&&qe(e,t))return e.x=i,e.y=a,!1;return e.x=i,e.y=a,!0}function Xe(e){for(let t=0;t<6;t+=1){let t=!1;for(let n=0;n<e.length-1;n+=1)for(let r=n+1;r<e.length;r+=1){let i=e[n],a=e[r],o=a.x-i.x,s=a.y-i.y,c=Math.sqrt(o*o+s*s)||1e-6,l=i.r+a.r;if(c<l){let e=(l-c)/2,n=o/c,r=s/c;i.x-=n*e,i.y-=r*e,a.x+=n*e,a.y+=r*e,t=!0}}if(!t)break}}function Ze(e,t,n){if(e.length<6)return;let r=e[0].r,i=e.findIndex(e=>e.r<=r*.45);if(i!==-1)for(let r=i;r<e.length;r+=1){let i=e[r],a=Qe(i,e.slice(0,r),t,n);a&&(i.x=a.x,i.y=a.y)}}function Qe(e,t,n,r){if(t.length<2)return null;let i=null,a=1/0;for(let o=0;o<t.length-1;o+=1)for(let s=o+1;s<t.length;s+=1){let c=t[o],l=t[s],u=$e(c,l,e.r);for(let o of u){if(!o)continue;let s={...e,x:o.x,y:o.y};if(!P(s,t))continue;let c=et(s,t,n,r);c<a&&(a=c,i=o)}}return i}function $e(e,t,n){let r=e.r+n,i=t.r+n,a=t.x-e.x,o=t.y-e.y,s=a*a+o*o,c=Math.sqrt(s);if(!c||c>r+i||c<Math.abs(r-i))return[];let l=(r*r-i*i+s)/(2*c),u=r*r-l*l;if(u<0)return[];let d=Math.sqrt(u),f=a/c,p=o/c,m=e.x+l*f,ee=e.y+l*p,h=-p*d,g=f*d;return[{x:m+h,y:ee+g},{x:m-h,y:ee-g}]}function P(e,t){for(let n of t)if(qe(n,e))return!1;return!0}function et(e,t,n,r){let i=e.x/Math.max(1,n),a=e.y/Math.max(1,r),o=i*i+a*a,s=[];for(let n of t){let t=e.x-n.x,r=e.y-n.y,i=Math.sqrt(t*t+r*r)-(e.r+n.r);s.push(i)}s.sort((e,t)=>e-t);let c=s[0]??0,l=s[1]??c,u=s[2]??l;return c*8+l*4+u*2+o*e.r*12}var tt=class{constructor(e){this._=e,this.next=null,this.previous=null}},nt=/* @__PURE__ */ e({default:()=>F}),rt=[`id`],it=[`id`],at=[`xmlns`,`aria-describedby`,`viewBox`],ot=[`x`,`y`,`width`,`height`],st={key:0},ct=[`x`,`y`,`width`,`height`,`stroke`,`stroke-width`,`fill`,`rx`,`onMouseenter`,`onMouseout`,`onClick`],lt=[`x`,`y`,`width`,`height`,`stroke`,`stroke-width`,`fill`,`rx`],ut=[`x`,`y`,`width`,`height`,`fill`,`rx`],dt=[`transform`,`font-size`,`fill`,`font-weight`],ft=[`transform`,`font-size`,`fill`,`font-weight`],pt={key:1,style:{pointerEvents:`none`}},mt=[`stroke`,`stroke-width`,`stroke-dasharray`,`opacity`,`d`],ht=[`x`,`y`,`width`,`height`,`rx`,`ry`,`fill`,`stroke`,`stroke-width`,`filter`],gt=[`fill`,`x`,`y`,`rx`,`width`,`height`],_t=[`transform`,`font-size`,`fill`,`font-family`],vt=[`dy`],yt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},bt={key:5,class:`vue-data-ui-watermark`},xt={key:6,"data-dom-to-png-ignore":``,class:`reset-wrapper`},St={style:{display:`flex`,"align-items":`center`}},F=/*#__PURE__*/ fe({__name:`vue-ui-circle-pack`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectDatapoint`,`copyAlt`],setup(e,{expose:fe,emit:We}){Ve(e=>({c1b7fbec:hr.value}));let Ke=C(()=>import(`./Tooltip-C1q0Qoh7.js`)),qe=C(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Je=C(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Ye=C(()=>import(`./DataTable-Dof6yhO7.js`)),Xe=C(()=>import(`./UserOptions-DW84OKKr.js`).then(e=>e.n)),Ze=C(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Qe=C(()=>import(`./PackageVersion-Bczw6rsP.js`).then(e=>e.t)),$e=C(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),P=e,et=We,{vue_ui_circle_pack:tt}=i(),nt=v(()=>!!P.dataset&&P.dataset.length),F=O(f()),I=O(null),Ct=O(null),wt=O(null),Tt=O(0),Et=O(0),Dt=O(0),Ot=O(null),kt=O(null),At=O(null),jt=O(!1),Mt=O(``),L=O(null),R=O(null),Nt=O({x:0,y:0}),Pt=O(`pointer`),Ft=O(!1),z=O(Ht()),B=v(()=>z.value.style.chart.circles.labels),V=v(()=>z.value.style.chart.circles),H=v(()=>z.value.style.chart);ue({config:()=>z.value,dataset:()=>P.dataset,component:`VueUiCirclePack`,rules:[de.emptyArray,{test:e=>e.length===1&&(!e[0].children||e[0]?.children.length===0),message:[`👀 The dataset only has a single series. Consider:`,``,`▶️ Using a value display instead of a chart component, or using VueUiKpi.`]},{test:e=>e.length===1&&e[0]?.children&&e[0]?.children.length<6,message:[`👀 The number of datapoints is probably too low for this type of chart. Consider:`,``,`▶️ Using VueUiDonut or VueUiWaffle instead.`]}]});let{transitionEnabled:U}=xe({config:()=>z.value.transitions,dataset:()=>P.dataset}),W=v(()=>z.value.userOptions.useCursorPointer),It=v(()=>h({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,circles:{stroke:`#6A6A6A`,labels:{name:{show:!1},value:{show:!1}}}}}},userConfig:z.value.skeletonConfig??{}})),{loading:Lt,FINAL_DATASET:Rt}=ce({...Be(P),FINAL_CONFIG:z,prepareConfig:Ht,skeletonDataset:P.config?.skeletonDataset??[{name:`_`,value:13,color:`#F2F2F2`},{name:`_`,value:8,color:`#DBDBDB`},{name:`_`,value:5,color:`#ADADAD`},{name:`_`,value:3,color:`#969696`},{name:`_`,value:2,color:`#808080`},{name:`_`,value:1,color:`#696969`}],skeletonConfig:h({defaultConfig:z.value,userConfig:It.value})}),{svgRef:G}=De({config:H.value.title}),{userOptionsVisible:zt,setUserOptionsVisibility:Bt,keepUserOptionState:Vt}=Ee({config:z.value});function Ht(){return pe(P.config,tt,Ae)}let Ut=p(P.config);He(()=>P.config,(e,t)=>{let n=p(e),r=n!==Ut;Ut=n;let i=Ht();r?(z.value=i,zt.value=!z.value.userOptions.showOnChartHover,pn(),Tt.value+=1,Et.value+=1,K.value.showTable=z.value.table.show,K.value.showTooltip=H.value.tooltip.show,K.value.showZoom=H.value.zoom?.show??!1):(z.value.style.chart.tooltip=i.style.chart.tooltip,K.value.showTooltip=z.value.style.chart.tooltip.show)},{deep:!0});let{isPrinting:Wt,isImaging:Gt,generatePdf:Kt,generateImage:qt}=be({elementId:`vue-ui-circle-pack_${F.value}`,fileName:H.value.title.text||`vue-ui-circle-pack`,options:z.value.userOptions.print}),Jt=v(()=>z.value.userOptions.show&&!H.value.title.text),K=O({showTable:z.value.table.show,showTooltip:H.value.tooltip.show,showZoom:H.value.zoom?.show??!1});He(z,()=>{K.value={showTable:z.value.table.show,showTooltip:H.value.tooltip.show,showZoom:H.value.zoom?.show??!1}},{immediate:!0});let q=O({h:10,w:10}),Yt=O([0,0,100,100]),Xt=O({x:0,y:0,width:100,height:100}),Zt=v(()=>z.value.debug),Qt=v(()=>{let e=z.value.style?.chart||{};return e.dimensions&&typeof e.dimensions.width==`number`?e.dimensions.width:typeof e.width==`number`?e.width:300}),$t=v(()=>{let e=z.value.style?.chart||{};return e.dimensions&&typeof e.dimensions.height==`number`?e.dimensions.height:typeof e.height==`number`?e.height:300}),J=O([]),Y=O([]),X=O(null),Z=O(null);function en(e,t){q.value={w:e,h:t};let n=hn.value.map(tn);if(!n.length){let n={x:0,y:0,width:e,height:t};J.value=[],Y.value=[],Yt.value=[n.x,n.y,n.width,n.height],Xt.value={...n},jn(n);return}let r=Ge(n,t,e),[i,a,o,s]=Ue(r,1),c=Math.min(o?e/o:1,s?t/s:1),l=(e-o*c)/2,u=(t-s*c)/2,d=r.map(e=>({...e,x:(e.x-i)*c+l,y:(e.y-a)*c+u,r:e.r*c}));J.value=cn(d),Y.value=J.value;let f=Hn({x:0,y:0,width:e,height:t});Yt.value=[f.x,f.y,f.width,f.height],Xt.value={...f},jn(f)}function tn(e){return{...e,children:Array.isArray(e.children)?e.children.map(tn):[]}}function nn(e){let t=Number(e?.value);return Number.isFinite(t)&&t>0?t:Array.isArray(e?.children)?e.children.reduce((e,t)=>e+nn(t),0):0}function rn(e,t){let n=g[z.value.theme||`default`]||l,r=mn.value.length?mn.value:n.length?n:l;return d(e.color)||r[t%r.length]||l[t%l.length]}function an(e){return!Array.isArray(e.children)||!e.children.length?1:e.children.reduce((e,t)=>e+an(t),0)}function on(e,t=null,n=0,r=[]){return Array.isArray(e)?e.map((e,i)=>{let a=nn(e);if(!Number.isFinite(a)||a<=0)return null;let o=f(),s=[...r,i],c=s.reduce((e,t,n)=>e+t+n,0),l=e.color||t?.color?d(e.color||t?.color):rn(e,c),u=on(e.children,{id:o,name:e.name,color:l,rootId:t?.rootId??o},n+1,s);return{...e,value:a,r:a,id:o,color:l,depth:n,parentId:t?.id??null,parentName:t?.name??null,rootId:t?.rootId??o,hasChildren:u.length>0,childCount:u.length,leafCount:u.length?an({children:u}):1,hierarchyPath:s,children:u}}).filter(Boolean):[]}function sn(e){if(!Array.isArray(e.children)||!e.children.length)return[];let t=e.r*2;if(!t)return[];let n=Ge(e.children.map(tn),t,t),[r,i,a,o]=Ue(n,1),s=Math.min(a?t/a:1,o?t/o:1)*.9,c=a*s,l=o*s,u=e.x-c/2,d=e.y-l/2;return n.map(e=>({...e,x:(e.x-r)*s+u,y:(e.y-i)*s+d,r:e.r*s}))}function cn(e){let t=[];return e.forEach(e=>{let n=sn(e);t.push({...e,children:n}),t.push(...cn(n))}),t}function ln(e,t){return!e||!t||!Array.isArray(e.hierarchyPath)||!Array.isArray(t.hierarchyPath)||e.hierarchyPath.length<=t.hierarchyPath.length?!1:t.hierarchyPath.every((t,n)=>e.hierarchyPath[n]===t)}function un(e){return e.hasChildren?B.value.parents.show:B.value.children.show}function dn(){if(!z.value.responsive||!I.value)return;let e=Se(()=>{let{width:e,height:t}=Ce({chart:I.value,title:H.value.title.text?Ct.value:null,legend:null,source:Ot.value,noTitle:wt.value});requestAnimationFrame(()=>{e&&t&&(G.value&&(G.value.setAttribute(`width`,e),G.value.setAttribute(`height`,t)),en(e,t))})});X.value&&(Z.value&&X.value.unobserve(Z.value),X.value.disconnect()),X.value=new ResizeObserver(e),Z.value=I.value.parentNode||I.value,Z.value&&X.value.observe(Z.value),e()}function fn(){X.value&&(Z.value&&X.value.unobserve(Z.value),X.value.disconnect(),X.value=null,Z.value=null)}async function pn(){se(P.dataset)&&m({componentName:`VueUiCirclePack`,type:`dataset`,debug:Zt.value});let e=Qt.value,t=$t.value;en(e,t),z.value.responsive?dn():fn()}Re(pn),Le(()=>{fn()}),He(()=>Rt.value,async e=>{await pn()},{deep:!0});let mn=v(()=>oe(z.value.customPalette)),hn=v(()=>on(Rt.value)),gn=v(()=>J.value.length?Math.max(...J.value.map(e=>e.r)):0);function _n(e,t){return gn.value?t/gn.value*e:0}function vn(e,t){z.value.events.datapointLeave&&z.value.events.datapointLeave({datapoint:e,seriesIndex:t}),(Pt.value!==`keyboard`||L.value?.id!==e?.id)&&(jt.value=!1,L.value=null,R.value=null,Pt.value=`pointer`)}function yn(e,t){et(`selectDatapoint`,e),z.value.events.datapointClick&&z.value.events.datapointClick({datapoint:e,seriesIndex:t})}let bn=O(null),xn=O(!1);function Sn(e,t,n=`pointer`){L.value=e,R.value=t,Pt.value=n,z.value.events.datapointEnter&&z.value.events.datapointEnter({datapoint:e,seriesIndex:t}),bn.value={datapoint:e,seriesIndex:t,config:z.value,series:Y.value},jt.value=!0;let r=H.value.tooltip.customFormat;if(xn.value=!1,s(r))try{let n=r({seriesIndex:t,datapoint:e,series:Y.value,config:z.value});typeof n==`string`&&(Mt.value=n,xn.value=!0)}catch{console.warn(`Custom format cannot be applied.`),xn.value=!1}if(!xn.value){let t=``;t+=`
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,D as o,Dt as s,Ft as c,Ht as l,Q as u,S as d,X as f,Zt as p,at as m,i as ee,in as h,nn as g,nt as te,q as ne,r as re,t as ie,tn as ae,w as oe,zt as se}from"./lib-rPeBMZrn.js";import{n as ce,t as le}from"./BaseScanner-8NdoBs7B.js";import{n as ue,t as de}from"./useHints-C-TwxM0Y.js";import{t as fe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as pe}from"./resolveChartConfig-CIhClE5R.js";import{t as me}from"./chartImage-DPGnEuYM.js";import{n as he}from"./Title-BliHuXfT.js";import{t as ge}from"./useChartExport-BZts4KFb.js";import{t as _e}from"./tableIntegration-CNoJ1CIY.js";import{n as ve,t as ye}from"./userOptionsSlots-DYuo-E5m.js";import{t as be}from"./usePrinter-DVf3YcG5.js";import{t as xe}from"./useTransitions-ChGGrtrv.js";import{c as Se}from"./canvas-lib-22VpOI4_.js";import{t as Ce}from"./useResponsive-CENUxfEL.js";import{t as we}from"./DefGrad-DKMq1REY.js";import{t as Te}from"./A11yDataTable-DWNlWXzs.js";import{t as Ee}from"./useUserOptionState-CXlFnwPv.js";import{t as De}from"./useChartAccessibility-DOMuYJfm.js";import{n as Oe}from"./annotationViewport-X8fvs7pz.js";import{t as ke}from"./usePanZoom-CE6Ofyy8.js";import{t as Ae}from"./vue_ui_circle_pack-CfXkXi7v.js";import{Fragment as _,computed as v,createBlock as y,createCommentVNode as b,createElementBlock as x,createElementVNode as S,createSlots as je,createTextVNode as Me,createVNode as Ne,defineAsyncComponent as C,guardReactiveProps as w,mergeProps as Pe,nextTick as Fe,normalizeClass as T,normalizeProps as E,normalizeStyle as Ie,onBeforeUnmount as Le,onMounted as Re,openBlock as D,ref as O,renderList as k,renderSlot as A,resolveDynamicComponent as ze,toDisplayString as j,toRefs as Be,unref as M,useCssVars as Ve,watch as He,withCtx as N}from"vue";function Ue(e,t=0){let n=e.reduce((e,{x:n,r})=>Math.min(e,n-r-t),1/0),r=e.reduce((e,{x:n,r})=>Math.max(e,n+r+t),-1/0),i=e.reduce((e,{y:n,r})=>Math.min(e,n-r-t),1/0),a=e.reduce((e,{y:n,r})=>Math.max(e,n+r+t),-1/0);return[n,i,r-n,a-i]}function We(e,t,n){let r=e._,i=e.next._,a=r.r+i.r,o=(r.x*i.r+i.x*r.r)/a,s=(r.y*i.r+i.y*r.r)/a;return Math.max(Math.abs(o*n),Math.abs(s*t))}function Ge(e,t,n){let r=We,i=e.length;if(!i)return e;e.sort((e,t)=>t.r-e.r);let a,o,s;if(a=e[0],a.x=0,a.y=0,!(i>1))return e;if(o=e[1],a.x=-o.r,o.x=a.r,o.y=0,!(i>2))return Je(e,n,t),e;Ke(o,a,s=e[2]),a=new tt(a),o=new tt(o),s=new tt(s),a.next=s.previous=o,o.next=a.previous=s,s.next=o.previous=a;packLoop:for(let c=3;c<i;++c){Ke(a._,o._,s=e[c]),s=new tt(s);let i=o.next,l=a.previous,u=o._.r,d=a._.r;do if(u<=d){if(qe(i._,s._)){o=i,a.next=o,o.previous=a,--c;continue packLoop}u+=i._.r,i=i.next}else{if(qe(l._,s._)){a=l,a.next=o,o.previous=a,--c;continue packLoop}d+=l._.r,l=l.previous}while(i!==l.next);s.previous=a,s.next=o,a.next=o.previous=o=s;let f=a,p=r(a,n,t),m=a.next;for(;m!==o;){let e=r(m,n,t);e<p&&(f=m,p=e),m=m.next}a=f,o=a.next}return Je(e,n,t),Ze(e,n,t),e}function Ke(e,t,n){let r=e.x-t.x,i=e.y-t.y,a=r*r+i*i;if(a){let o=(t.r+n.r)**2,s=(e.r+n.r)**2;if(o>s){let t=(a+s-o)/(2*a),c=Math.sqrt(Math.max(0,s/a-t*t));n.x=e.x-t*r-c*i,n.y=e.y-t*i+c*r}else{let e=(a+o-s)/(2*a),c=Math.sqrt(Math.max(0,o/a-e*e));n.x=t.x+e*r-c*i,n.y=t.y+e*i+c*r}}else n.x=t.x+n.r,n.y=t.y}function qe(e,t){let n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Je(e,t,n){if(e.length<4)return;let r=e[0].r,i=e.findIndex(e=>e.r<r*.6),a=i===-1?Math.min(e.length,12):i,o=e.slice(0,Math.max(3,a));for(let t=0;t<80;t+=1){let t=!1;for(let n=0;n<o.length;n+=1){let r=o[n],i=.06*(1-n/Math.max(1,o.length)),a=r.x*(1-i),s=r.y*(1-i);Ye(r,a,s,e,n)&&(r.x=a,r.y=s,t=!0)}if(Xe(o),!t)break}let s=o.reduce((e,t)=>e+t.x,0)/o.length,c=o.reduce((e,t)=>e+t.y,0)/o.length;for(let t of e)t.x-=s,t.y-=c}function Ye(e,t,n,r){let i=e.x,a=e.y;e.x=t,e.y=n;for(let t of r)if(t!==e&&qe(e,t))return e.x=i,e.y=a,!1;return e.x=i,e.y=a,!0}function Xe(e){for(let t=0;t<6;t+=1){let t=!1;for(let n=0;n<e.length-1;n+=1)for(let r=n+1;r<e.length;r+=1){let i=e[n],a=e[r],o=a.x-i.x,s=a.y-i.y,c=Math.sqrt(o*o+s*s)||1e-6,l=i.r+a.r;if(c<l){let e=(l-c)/2,n=o/c,r=s/c;i.x-=n*e,i.y-=r*e,a.x+=n*e,a.y+=r*e,t=!0}}if(!t)break}}function Ze(e,t,n){if(e.length<6)return;let r=e[0].r,i=e.findIndex(e=>e.r<=r*.45);if(i!==-1)for(let r=i;r<e.length;r+=1){let i=e[r],a=Qe(i,e.slice(0,r),t,n);a&&(i.x=a.x,i.y=a.y)}}function Qe(e,t,n,r){if(t.length<2)return null;let i=null,a=1/0;for(let o=0;o<t.length-1;o+=1)for(let s=o+1;s<t.length;s+=1){let c=t[o],l=t[s],u=$e(c,l,e.r);for(let o of u){if(!o)continue;let s={...e,x:o.x,y:o.y};if(!P(s,t))continue;let c=et(s,t,n,r);c<a&&(a=c,i=o)}}return i}function $e(e,t,n){let r=e.r+n,i=t.r+n,a=t.x-e.x,o=t.y-e.y,s=a*a+o*o,c=Math.sqrt(s);if(!c||c>r+i||c<Math.abs(r-i))return[];let l=(r*r-i*i+s)/(2*c),u=r*r-l*l;if(u<0)return[];let d=Math.sqrt(u),f=a/c,p=o/c,m=e.x+l*f,ee=e.y+l*p,h=-p*d,g=f*d;return[{x:m+h,y:ee+g},{x:m-h,y:ee-g}]}function P(e,t){for(let n of t)if(qe(n,e))return!1;return!0}function et(e,t,n,r){let i=e.x/Math.max(1,n),a=e.y/Math.max(1,r),o=i*i+a*a,s=[];for(let n of t){let t=e.x-n.x,r=e.y-n.y,i=Math.sqrt(t*t+r*r)-(e.r+n.r);s.push(i)}s.sort((e,t)=>e-t);let c=s[0]??0,l=s[1]??c,u=s[2]??l;return c*8+l*4+u*2+o*e.r*12}var tt=class{constructor(e){this._=e,this.next=null,this.previous=null}},nt=/* @__PURE__ */ e({default:()=>F}),rt=[`id`],it=[`id`],at=[`xmlns`,`aria-describedby`,`viewBox`],ot=[`x`,`y`,`width`,`height`],st={key:0},ct=[`x`,`y`,`width`,`height`,`stroke`,`stroke-width`,`fill`,`rx`,`onMouseenter`,`onMouseout`,`onClick`],lt=[`x`,`y`,`width`,`height`,`stroke`,`stroke-width`,`fill`,`rx`],ut=[`x`,`y`,`width`,`height`,`fill`,`rx`],dt=[`transform`,`font-size`,`fill`,`font-weight`],ft=[`transform`,`font-size`,`fill`,`font-weight`],pt={key:1,style:{pointerEvents:`none`}},mt=[`stroke`,`stroke-width`,`stroke-dasharray`,`opacity`,`d`],ht=[`x`,`y`,`width`,`height`,`rx`,`ry`,`fill`,`stroke`,`stroke-width`,`filter`],gt=[`fill`,`x`,`y`,`rx`,`width`,`height`],_t=[`transform`,`font-size`,`fill`,`font-family`],vt=[`dy`],yt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},bt={key:5,class:`vue-data-ui-watermark`},xt={key:6,"data-dom-to-png-ignore":``,class:`reset-wrapper`},St={style:{display:`flex`,"align-items":`center`}},F=/*#__PURE__*/ fe({__name:`vue-ui-circle-pack`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectDatapoint`,`copyAlt`],setup(e,{expose:fe,emit:We}){Ve(e=>({c1b7fbec:hr.value}));let Ke=C(()=>import(`./Tooltip-C1q0Qoh7.js`)),qe=C(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Je=C(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Ye=C(()=>import(`./DataTable-Dof6yhO7.js`)),Xe=C(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Ze=C(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Qe=C(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),$e=C(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),P=e,et=We,{vue_ui_circle_pack:tt}=i(),nt=v(()=>!!P.dataset&&P.dataset.length),F=O(f()),I=O(null),Ct=O(null),wt=O(null),Tt=O(0),Et=O(0),Dt=O(0),Ot=O(null),kt=O(null),At=O(null),jt=O(!1),Mt=O(``),L=O(null),R=O(null),Nt=O({x:0,y:0}),Pt=O(`pointer`),Ft=O(!1),z=O(Ht()),B=v(()=>z.value.style.chart.circles.labels),V=v(()=>z.value.style.chart.circles),H=v(()=>z.value.style.chart);ue({config:()=>z.value,dataset:()=>P.dataset,component:`VueUiCirclePack`,rules:[de.emptyArray,{test:e=>e.length===1&&(!e[0].children||e[0]?.children.length===0),message:[`👀 The dataset only has a single series. Consider:`,``,`▶️ Using a value display instead of a chart component, or using VueUiKpi.`]},{test:e=>e.length===1&&e[0]?.children&&e[0]?.children.length<6,message:[`👀 The number of datapoints is probably too low for this type of chart. Consider:`,``,`▶️ Using VueUiDonut or VueUiWaffle instead.`]}]});let{transitionEnabled:U}=xe({config:()=>z.value.transitions,dataset:()=>P.dataset}),W=v(()=>z.value.userOptions.useCursorPointer),It=v(()=>h({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,circles:{stroke:`#6A6A6A`,labels:{name:{show:!1},value:{show:!1}}}}}},userConfig:z.value.skeletonConfig??{}})),{loading:Lt,FINAL_DATASET:Rt}=ce({...Be(P),FINAL_CONFIG:z,prepareConfig:Ht,skeletonDataset:P.config?.skeletonDataset??[{name:`_`,value:13,color:`#F2F2F2`},{name:`_`,value:8,color:`#DBDBDB`},{name:`_`,value:5,color:`#ADADAD`},{name:`_`,value:3,color:`#969696`},{name:`_`,value:2,color:`#808080`},{name:`_`,value:1,color:`#696969`}],skeletonConfig:h({defaultConfig:z.value,userConfig:It.value})}),{svgRef:G}=De({config:H.value.title}),{userOptionsVisible:zt,setUserOptionsVisibility:Bt,keepUserOptionState:Vt}=Ee({config:z.value});function Ht(){return pe(P.config,tt,Ae)}let Ut=p(P.config);He(()=>P.config,(e,t)=>{let n=p(e),r=n!==Ut;Ut=n;let i=Ht();r?(z.value=i,zt.value=!z.value.userOptions.showOnChartHover,pn(),Tt.value+=1,Et.value+=1,K.value.showTable=z.value.table.show,K.value.showTooltip=H.value.tooltip.show,K.value.showZoom=H.value.zoom?.show??!1):(z.value.style.chart.tooltip=i.style.chart.tooltip,K.value.showTooltip=z.value.style.chart.tooltip.show)},{deep:!0});let{isPrinting:Wt,isImaging:Gt,generatePdf:Kt,generateImage:qt}=be({elementId:`vue-ui-circle-pack_${F.value}`,fileName:H.value.title.text||`vue-ui-circle-pack`,options:z.value.userOptions.print}),Jt=v(()=>z.value.userOptions.show&&!H.value.title.text),K=O({showTable:z.value.table.show,showTooltip:H.value.tooltip.show,showZoom:H.value.zoom?.show??!1});He(z,()=>{K.value={showTable:z.value.table.show,showTooltip:H.value.tooltip.show,showZoom:H.value.zoom?.show??!1}},{immediate:!0});let q=O({h:10,w:10}),Yt=O([0,0,100,100]),Xt=O({x:0,y:0,width:100,height:100}),Zt=v(()=>z.value.debug),Qt=v(()=>{let e=z.value.style?.chart||{};return e.dimensions&&typeof e.dimensions.width==`number`?e.dimensions.width:typeof e.width==`number`?e.width:300}),$t=v(()=>{let e=z.value.style?.chart||{};return e.dimensions&&typeof e.dimensions.height==`number`?e.dimensions.height:typeof e.height==`number`?e.height:300}),J=O([]),Y=O([]),X=O(null),Z=O(null);function en(e,t){q.value={w:e,h:t};let n=hn.value.map(tn);if(!n.length){let n={x:0,y:0,width:e,height:t};J.value=[],Y.value=[],Yt.value=[n.x,n.y,n.width,n.height],Xt.value={...n},jn(n);return}let r=Ge(n,t,e),[i,a,o,s]=Ue(r,1),c=Math.min(o?e/o:1,s?t/s:1),l=(e-o*c)/2,u=(t-s*c)/2,d=r.map(e=>({...e,x:(e.x-i)*c+l,y:(e.y-a)*c+u,r:e.r*c}));J.value=cn(d),Y.value=J.value;let f=Hn({x:0,y:0,width:e,height:t});Yt.value=[f.x,f.y,f.width,f.height],Xt.value={...f},jn(f)}function tn(e){return{...e,children:Array.isArray(e.children)?e.children.map(tn):[]}}function nn(e){let t=Number(e?.value);return Number.isFinite(t)&&t>0?t:Array.isArray(e?.children)?e.children.reduce((e,t)=>e+nn(t),0):0}function rn(e,t){let n=g[z.value.theme||`default`]||l,r=mn.value.length?mn.value:n.length?n:l;return d(e.color)||r[t%r.length]||l[t%l.length]}function an(e){return!Array.isArray(e.children)||!e.children.length?1:e.children.reduce((e,t)=>e+an(t),0)}function on(e,t=null,n=0,r=[]){return Array.isArray(e)?e.map((e,i)=>{let a=nn(e);if(!Number.isFinite(a)||a<=0)return null;let o=f(),s=[...r,i],c=s.reduce((e,t,n)=>e+t+n,0),l=e.color||t?.color?d(e.color||t?.color):rn(e,c),u=on(e.children,{id:o,name:e.name,color:l,rootId:t?.rootId??o},n+1,s);return{...e,value:a,r:a,id:o,color:l,depth:n,parentId:t?.id??null,parentName:t?.name??null,rootId:t?.rootId??o,hasChildren:u.length>0,childCount:u.length,leafCount:u.length?an({children:u}):1,hierarchyPath:s,children:u}}).filter(Boolean):[]}function sn(e){if(!Array.isArray(e.children)||!e.children.length)return[];let t=e.r*2;if(!t)return[];let n=Ge(e.children.map(tn),t,t),[r,i,a,o]=Ue(n,1),s=Math.min(a?t/a:1,o?t/o:1)*.9,c=a*s,l=o*s,u=e.x-c/2,d=e.y-l/2;return n.map(e=>({...e,x:(e.x-r)*s+u,y:(e.y-i)*s+d,r:e.r*s}))}function cn(e){let t=[];return e.forEach(e=>{let n=sn(e);t.push({...e,children:n}),t.push(...cn(n))}),t}function ln(e,t){return!e||!t||!Array.isArray(e.hierarchyPath)||!Array.isArray(t.hierarchyPath)||e.hierarchyPath.length<=t.hierarchyPath.length?!1:t.hierarchyPath.every((t,n)=>e.hierarchyPath[n]===t)}function un(e){return e.hasChildren?B.value.parents.show:B.value.children.show}function dn(){if(!z.value.responsive||!I.value)return;let e=Se(()=>{let{width:e,height:t}=Ce({chart:I.value,title:H.value.title.text?Ct.value:null,legend:null,source:Ot.value,noTitle:wt.value});requestAnimationFrame(()=>{e&&t&&(G.value&&(G.value.setAttribute(`width`,e),G.value.setAttribute(`height`,t)),en(e,t))})});X.value&&(Z.value&&X.value.unobserve(Z.value),X.value.disconnect()),X.value=new ResizeObserver(e),Z.value=I.value.parentNode||I.value,Z.value&&X.value.observe(Z.value),e()}function fn(){X.value&&(Z.value&&X.value.unobserve(Z.value),X.value.disconnect(),X.value=null,Z.value=null)}async function pn(){se(P.dataset)&&m({componentName:`VueUiCirclePack`,type:`dataset`,debug:Zt.value});let e=Qt.value,t=$t.value;en(e,t),z.value.responsive?dn():fn()}Re(pn),Le(()=>{fn()}),He(()=>Rt.value,async e=>{await pn()},{deep:!0});let mn=v(()=>oe(z.value.customPalette)),hn=v(()=>on(Rt.value)),gn=v(()=>J.value.length?Math.max(...J.value.map(e=>e.r)):0);function _n(e,t){return gn.value?t/gn.value*e:0}function vn(e,t){z.value.events.datapointLeave&&z.value.events.datapointLeave({datapoint:e,seriesIndex:t}),(Pt.value!==`keyboard`||L.value?.id!==e?.id)&&(jt.value=!1,L.value=null,R.value=null,Pt.value=`pointer`)}function yn(e,t){et(`selectDatapoint`,e),z.value.events.datapointClick&&z.value.events.datapointClick({datapoint:e,seriesIndex:t})}let bn=O(null),xn=O(!1);function Sn(e,t,n=`pointer`){L.value=e,R.value=t,Pt.value=n,z.value.events.datapointEnter&&z.value.events.datapointEnter({datapoint:e,seriesIndex:t}),bn.value={datapoint:e,seriesIndex:t,config:z.value,series:Y.value},jt.value=!0;let r=H.value.tooltip.customFormat;if(xn.value=!1,s(r))try{let n=r({seriesIndex:t,datapoint:e,series:Y.value,config:z.value});typeof n==`string`&&(Mt.value=n,xn.value=!0)}catch{console.warn(`Custom format cannot be applied.`),xn.value=!1}if(!xn.value){let t=``;t+=`
|
|
2
2
|
<div style="display:flex;align-items:center;gap:4px;">
|
|
3
3
|
<svg viewBox="0 0 10 10" height="${H.value.tooltip.fontSize}" width="${H.value.tooltip.fontSize}">
|
|
4
4
|
<circle
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-By3Vb5kz.js";import{Jt as ee,X as n,t as te}from"./lib-rPeBMZrn.js";import{t as r}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as i}from"./useNestedProp-DnGoh-XS.js";import{n as a}from"./PackageVersion-
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-By3Vb5kz.js";import{Jt as ee,X as n,t as te}from"./lib-rPeBMZrn.js";import{t as r}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as i}from"./useNestedProp-DnGoh-XS.js";import{n as a}from"./PackageVersion-D6_O7PmZ.js";import{Teleport as o,computed as s,createBlock as ne,createCommentVNode as c,createElementBlock as l,createElementVNode as u,createVNode as d,nextTick as f,normalizeClass as p,normalizeStyle as m,onBeforeUnmount as h,onMounted as g,openBlock as _,ref as v,toDisplayString as y,unref as b}from"vue";var x=/* @__PURE__ */ e({default:()=>R}),re=[`xmlns`,`height`,`width`],ie={id:`follower`,fy:`30%`,fx:`30%`},ae=[`stop-color`,`stop-opacity`],oe=[`r`,`fill`,`stroke`,`stroke-width`,`stroke-dasharray`],se=[`r`],S={key:2,class:`wave`},C=[`id`],w=[`id`],T=[`filter`,`stroke`],E={key:3,class:`crosshair`},D=[`x1`,`stroke`,`stroke-width`,`stroke-dasharray`],O=[`x1`,`stroke`,`stroke-width`,`stroke-dasharray`],k=[`y1`,`stroke`,`stroke-width`,`stroke-dasharray`],A=[`y1`,`stroke`,`stroke-width`,`stroke-dasharray`],j=[`cy`,`r`,`fill`],M=[`cy`,`r`,`fill`],N=[`cx`,`r`,`fill`],P=[`cx`,`r`,`fill`],F={key:5,class:`coordinates`},I=[`x`,`y`,`font-size`,`fill`],L=[`transform`],ce=[`font-size`,`fill`],R=/*#__PURE__*/ r({__name:`vue-ui-cursor`,props:{config:{type:Object,default:{}}},setup(e){let{vue_ui_cursor:r}=t(),x=e,R=v(n()),z=s(()=>i({userConfig:x.config,defaultConfig:r})),B=v({x:-100,y:-100}),V=s(()=>Math.round(z.value.centerCircleRadius)),H=s(()=>Math.round(z.value.coordinatesOffset));function U({clientX:e,clientY:t,...ee}){B.value.x=e-V.value,B.value.y=t-V.value}function W(e){B.value.x=e.targetTouches[0].clientX-V.value,B.value.y=e.targetTouches[0].clientY-V.value}let G=v(!0);function K(e){G.value=e}let q=v(!1),J=v(null);function Y(){q.value=!1,J.value&&clearTimeout(J.value),f(()=>{q.value=!0,J.value=setTimeout(()=>{q.value=!1},1e3)})}let X=v(null),Z=v(null);function Q(){return z.value.parentId?document.getElementById(z.value.parentId):document.getElementsByTagName(`div`)[0]||null}function $(e){e&&(e.addEventListener(`mousemove`,U),e.addEventListener(`touchmove`,W),e.addEventListener(`mouseleave`,()=>K(!1)),e.addEventListener(`mouseenter`,()=>K(!0)),e.addEventListener(`click`,Y))}function le(e){e&&(e.removeEventListener(`mousemove`,U),e.removeEventListener(`touchmove`,W),e.removeEventListener(`mouseleave`,()=>K(!1)),e.removeEventListener(`mouseenter`,()=>K(!0)),e.removeEventListener(`click`,Y))}return g(()=>{let e=Q();if(e){X.value=e,$(e);return}if(!z.value.parentId)return;let t=new MutationObserver(()=>{let e=Q();e&&(X.value=e,$(e),t.disconnect(),Z.value=null)});t.observe(document.body,{childList:!0,subtree:!0}),Z.value=t}),h(()=>{Z.value&&=(Z.value.disconnect(),null),X.value&&=(le(X.value),null)}),(e,t)=>(_(),ne(o,{to:`body`},[G.value?(_(),l(`svg`,{key:0,"data-dom-to-png-ignore":``,xmlns:b(te),style:m(`z-index: 2147483647; overflow: visible; pointer-events: none;background: transparent; position:fixed; top:${B.value.y}px; left:${B.value.x}px;`),viewBox:`0 0 100 100`,height:V.value*2,width:V.value*2},[d(a),u(`defs`,null,[u(`radialGradient`,ie,[u(`stop`,{offset:`10%`,"stop-color":z.value.bubbleEffectColor,"stop-opacity":z.value.bubbleEffectOpacity},null,8,ae),t[0]||=u(`stop`,{offset:`95%`,"stop-color":`transparent`},null,-1)])]),z.value.showCenterCircle?(_(),l(`circle`,{key:0,cx:50,cy:50,r:V.value,fill:b(ee)(z.value.centerCircleColor,z.value.centerCircleOpacity*100),stroke:z.value.centerCircleStroke,"stroke-width":z.value.centerCircleStrokeWidth,"stroke-dasharray":z.value.centerCircleDasharray},null,8,oe)):c(``,!0),z.value.bubbleEffect?(_(),l(`circle`,{key:1,cx:50,cy:50,r:V.value,fill:`url(#follower)`,stroke:`none`},null,8,se)):c(``,!0),z.value.useWaveOnClick?(_(),l(`g`,S,[u(`defs`,null,[u(`filter`,{id:`blur_${R.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[u(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:4,id:`blur_std_${R.value}`},null,8,w),t[1]||=u(`feColorMatrix`,{type:`saturate`,values:`0`},null,-1)],8,C)]),q.value?(_(),l(`circle`,{key:0,class:p({"circle-wave":q.value}),cx:50,cy:50,r:50,filter:`url(#blur_${R.value})`,stroke:z.value.centerCircleStroke,fill:`none`,"stroke-width":`3`},null,10,T)):c(``,!0)])):c(``,!0),z.value.showCrosshair?(_(),l(`g`,E,[u(`line`,{x1:-V.value+50,x2:-5e3,y1:50,y2:50,stroke:z.value.crosshairStroke,"stroke-width":z.value.crosshairStrokeWidth,"stroke-dasharray":z.value.crosshairDasharray,"stroke-linecap":`round`},null,8,D),u(`line`,{x1:50+V.value,x2:5e3,y1:50,y2:50,stroke:z.value.crosshairStroke,"stroke-width":z.value.crosshairStrokeWidth,"stroke-dasharray":z.value.crosshairDasharray,"stroke-linecap":`round`},null,8,O),u(`line`,{x1:50,x2:50,y1:-V.value+50,y2:-5e3,stroke:z.value.crosshairStroke,"stroke-width":z.value.crosshairStrokeWidth,"stroke-dasharray":z.value.crosshairDasharray,"stroke-linecap":`round`},null,8,k),u(`line`,{x1:50,x2:50,y1:V.value+50,y2:5e3,stroke:z.value.crosshairStroke,"stroke-width":z.value.crosshairStrokeWidth,"stroke-dasharray":z.value.crosshairDasharray,"stroke-linecap":`round`},null,8,A)])):c(``,!0),z.value.showIntersectCircles?(_(),l(`g`,{key:4,class:p({"rotating-circles":z.value.isLoading})},[u(`circle`,{cx:50,cy:V.value+50,r:z.value.intersectCirclesRadius,fill:z.value.intersectCirclesFill},null,8,j),u(`circle`,{cx:50,cy:-V.value+50,r:z.value.intersectCirclesRadius,fill:z.value.intersectCirclesFill},null,8,M),u(`circle`,{cx:-V.value+50,cy:50,r:z.value.intersectCirclesRadius,fill:z.value.intersectCirclesFill},null,8,N),u(`circle`,{cx:V.value+50,cy:50,r:z.value.intersectCirclesRadius,fill:z.value.intersectCirclesFill},null,8,P)],2)):c(``,!0),z.value.showCoordinates?(_(),l(`g`,F,[u(`text`,{"text-anchor":`end`,x:-V.value+50-z.value.coordinatesFontSize/2+H.value,y:50-z.value.coordinatesFontSize/2+H.value,"font-size":z.value.coordinatesFontSize,fill:z.value.coordinatesColor,style:{"font-variant-numeric":`tabular-nums`},"font-family":`Arial`},y(B.value.x.toFixed(0)),9,I),u(`g`,{transform:`translate(${50-z.value.coordinatesFontSize/2+H.value}, ${-V.value+50-z.value.coordinatesFontSize/2+H.value})`},[u(`text`,{"text-anchor":`start`,"font-size":z.value.coordinatesFontSize,fill:z.value.coordinatesColor,style:{"font-variant-numeric":`tabular-nums`},transform:`rotate(-90)`,"font-family":`Arial`},y(B.value.y.toFixed(0)),9,ce)],8,L)])):c(``,!0)],12,re)):c(``,!0)]))}},[[`__scopeId`,`data-v-4b1f566e`]]);export{x as n,R as t};
|