dsp-semactic 0.6.59 → 0.6.60
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/index.cjs.js +1 -1
- package/dist/index.es.js +100 -95
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
|
|
96
96
|
`,t+="Category",F.series.forEach(g=>{const b=g.name.replace(/"/g,'""');t+=',"'+b+'"'}),t+=`
|
|
97
97
|
`;const a=Math.max(...F.series.map(g=>g.data?.length||0));for(let g=0;g<a;g++){let P='"'+(F.categories[g]||M("chart.fallback.item",{number:g+1})).toString().replace(/"/g,'""')+'"';F.series.forEach(N=>{const T=N.data&&N.data[g]!==void 0?N.data[g]:"";P+=","+T}),t+=P+`
|
|
98
|
-
`}const l=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(l),p=document.createElement("a");p.href=i,p.download=q("csv"),document.body.appendChild(p),p.click(),document.body.removeChild(p),URL.revokeObjectURL(i),Wl()}catch(t){console.error("Error downloading CSV:",t)}},En=t=>{if(typeof t.action=="function"){const a={series:F.series,categories:F.categories,markers:Yt.value},l={chartX:vt.value.chartX,chartY:vt.value.chartY,dataX:vt.value.mouseDataX,dataY:vt.value.mouseDataY,categoryIndex:clampedCategoryIndex||vt.value.categoryIndex};t.action(a,l)}Wl()},ro=()=>{At(),Ae.value.show=!0,Ae.value.categoryIndex=vt.value.categoryIndex,Ae.value.fromButton=!1,Wl()},xo=()=>{At(),Ae.value.show=!0,Ae.value.categoryIndex=0,Ae.value.fromButton=!0},Eo=t=>{if(vt.value.show){const a=document.querySelector(".dss-context-menu");a&&!a.contains(t.target)&&(vt.value.show=!1)}},io=t=>{vt.value.show&&!t.target.closest(".context-menu")&&(vt.value.show=!1)},So=t=>{if(!Sl.value||!et.value)return;t.preventDefault(),t.stopPropagation(),oe.value.isZooming=!0,st.value.show=!1,oe.value.zoomTimeout&&clearTimeout(oe.value.zoomTimeout);const l=t.currentTarget.getBoundingClientRect(),i=t.clientX-l.left,p=t.clientY-l.top;if(i<z.value.left-50||i>z.value.right+50||p<z.value.top-50||p>z.value.bottom+100){oe.value.isZooming=!1;return}const g=t.deltaY>0?.9:1.1,b=Math.max(oe.value.minScale,Math.min(oe.value.maxScale,oe.value.scale*g));if(b!==oe.value.scale){const{minX:w,maxX:P}=Ut.value,N=P-w||1,T=N/oe.value.scale,B=w-oe.value.offsetX/z.value.width*N,te=(i-z.value.left)/z.value.width,Se=B+te*T;oe.value.scale=b;const Xe=N/oe.value.scale,me=Se-te*Xe;oe.value.offsetX=-(me-w)/N*z.value.width,oe.value.scale<=1.01&&(oe.value.scale=1,oe.value.offsetX=0)}oe.value.zoomTimeout=setTimeout(()=>{oe.value.isZooming=!1,oe.value.zoomTimeout=null},300)},co=t=>{if(!Sl.value||!et.value||oe.value.scale<=1)return;st.value.show=!1;const l=t.currentTarget.getBoundingClientRect();t.clientX-l.left,t.clientY-l.top,oe.value.isDragging=!0,oe.value.lastMouseX=t.clientX,oe.value.lastMouseY=t.clientY,t.preventDefault()},Vo=()=>{oe.value.isDragging=!1},uo=()=>{!Sl.value||!et.value||(oe.value.scale=1,oe.value.offsetX=0,oe.value.isDragging=!1,oe.value.zoomTimeout&&(clearTimeout(oe.value.zoomTimeout),oe.value.zoomTimeout=null),oe.value.isZooming=!1)},Zo=()=>!Sl.value||!hn.value||!et.value?"default":oe.value.isDragging?"grabbing":oe.value.scale>1?"grab":"dss-crosshair",jn=t=>{if(t.length<2)return"";if(t.length===2)return`M ${t[0].x} ${t[0].y} L ${t[1].x} ${t[1].y}`;let a=`M ${t[0].x} ${t[0].y}`;for(let l=0;l<t.length-1;l++){const i=t[Math.max(l-1,0)],p=t[l],g=t[l+1],b=t[Math.min(l+2,t.length-1)],w=p.x+(g.x-i.x)/6*Ge.value,P=p.y+(g.y-i.y)/6*Ge.value,N=g.x-(b.x-p.x)/6*Ge.value,T=g.y-(b.y-p.y)/6*Ge.value;a+=` C ${w} ${P} ${N} ${T} ${g.x} ${g.y}`}return a},$l=e.computed(()=>{const a=W.value?.chart?.padding,l=typeof a=="number"?a:null,i=a&&typeof a=="object"?a:null,p=50;let g=p+(Ht.value?30:0)+60;if(Ll.value){const B={left:p+40,top:p+40,right:p+40,bottom:p+40};return l!=null?{left:l,top:l,right:l,bottom:l}:i?{left:i.left??B.left,top:i.top??B.top,right:i.right??B.right,bottom:i.bottom??B.bottom}:B}if(Cl.value){const B=!K.value,te=O.value,Se=te?ce.value+$e.value+Math.max(24,_.value+16):0,Xe=B?12:p;let me=0;ut.value&&(me+=B?8:15),Ct.value&&(me+=B?6:10);const ke=tt();let Ne=Xe+(B?4:16)+(te?Se:0),he=Xe+(te?Se:0);K.value&&ye.value==="left"?Ne+=ke.legendWidth||150:K.value&&ye.value==="right"&&(he+=ke.legendWidth||150);const Pe=be.value==="semi-radial"?te?Se:8:te?Se:B?8:p+80,Te=te?14:0,Le=Xe+me+Te,Re={left:Ne,top:Le,right:he,bottom:Pe};return l!=null?{left:l,top:l,right:l,bottom:l}:i?{left:i.left??Re.left,top:i.top??Re.top,right:i.right??Re.right,bottom:i.bottom??Re.bottom}:Re}let b=0;ut.value&&(b+=15),Ct.value&&(b+=10);const w=tt();let P=p+16,N=p;K.value&&ye.value==="left"?P+=w.legendWidth||150:K.value&&ye.value==="right"&&(N+=w.legendWidth||150),Rl.value&&(N+=44);const T={left:P,top:p+b,right:N,bottom:g};return l!=null?{left:l,top:l,right:l,bottom:l}:i?{left:i.left??T.left,top:i.top??T.top,right:i.right??T.right,bottom:i.bottom??T.bottom}:T}),z=e.computed(()=>({left:$l.value.left,top:$l.value.top,right:xe.value-$l.value.right,bottom:ee.value-$l.value.bottom,width:xe.value-($l.value.left+$l.value.right),height:ee.value-($l.value.top+$l.value.bottom)})),Sl=e.computed(()=>["line","area","bar"].includes(be.value)||Je.value),Ul=e.computed(()=>Je.value),On=e.computed(()=>be.value==="mini-radial"),Cl=e.computed(()=>["radial","semi-radial","mini-radial"].includes(be.value)),Ll=e.computed(()=>be.value==="spider"),jt=e.computed(()=>be.value==="bubble"),Jt=e.computed(()=>W.value?.chart?.orientation==="horizontal"&&(be.value==="bar"||Ul.value)),Cn=t=>{const{minY:a,maxY:l}=Ut.value,i=l-a||1;return z.value.left+(t-a)/i*z.value.width},Sn=t=>{const{maxX:a}=Ut.value,l=a+1,p=z.value.height/l;return z.value.top+(t+.5)*p},Ft=e.computed(()=>Cl.value?$l.value.left+(xe.value-$l.value.left-$l.value.right)/2:xe.value/2),wt=e.computed(()=>Ll.value?ee.value/2-40:Cl.value?$l.value.top+(ee.value-$l.value.top-$l.value.bottom)/2:ee.value/2),it=e.computed(()=>{if(Ll.value){const t=z.value.width-80,a=z.value.height-80;return Math.min(t,a)/2}return Math.min(z.value.width,z.value.height)/2}),Zt=e.computed(()=>{const t=W.value,a=t?.plotOptions?.radialBar?.innerRadiusRatio??t?.radialBar?.innerRadiusRatio,l=typeof a=="number"&&a>=0&&a<=1?a:.45;return it.value*l}),qn=e.computed(()=>{const t=W.value,a=typeof F.innerSize=="number"?F.innerSize:t?.innerSize;return typeof a!="number"||a<=-100||!(Cl.value||Ll.value)?1:1+a/100}),tl=e.computed(()=>{const t=qn.value;if(t===1||t<=0)return;const a=Ft.value,l=wt.value;return`translate(${a}, ${l}) scale(${t}) translate(${-a}, ${-l})`}),An=e.ref(0),Kn=e.computed(()=>`semi-radial-fill-clip-${F.chartId}`),Pl=e.computed(()=>be.value==="semi-radial"),dn=e.computed(()=>Pl.value&&St.value&&!_n.value),mn=e.computed(()=>Pl.value&&St.value&&!_n.value&&ll.value==="fill"),Vn=e.computed(()=>{const t=dn.value?An.value:1,a=Ft.value,l=wt.value,i=Zt.value,p=it.value,g=Math.PI,b=Math.PI+t*Math.PI;if(t<=0)return`M ${a} ${l} L ${a} ${l} Z`;const w=a+p*Math.cos(g),P=l+p*Math.sin(g),N=a+p*Math.cos(b),T=l+p*Math.sin(b),B=a+i*Math.cos(b),te=l+i*Math.sin(b),Se=a+i*Math.cos(g),Xe=l+i*Math.sin(g),me=t>.5?1:0;return`M ${a} ${l} L ${w} ${P} A ${p} ${p} 0 ${me} 1 ${N} ${T} L ${B} ${te} A ${i} ${i} 0 ${me} 1 ${Se} ${Xe} Z`}),Nn=e.computed(()=>{if(!(!Pl.value||!dn.value)&&!mn.value)return`url(#${Kn.value})`}),Uo=t=>{if(!(!mn.value||t!==0))return`url(#${Kn.value})`},Bn=e.ref(0),Tn=e.computed(()=>`radial-reveal-clip-${F.chartId}`),en=e.computed(()=>be.value==="radial"),Wn=e.computed(()=>{const t=en.value?Bn.value:1,a=Ft.value,l=wt.value,i=Math.max(it.value*1.5,xe.value,ee.value);if(t<=0)return`M ${a} ${l} L ${a} ${l} Z`;if(t>=1){const B=a-i,te=a+i;return`M ${B} ${l} A ${i} ${i} 0 0 1 ${te} ${l} A ${i} ${i} 0 0 1 ${B} ${l} Z`}const p=-Math.PI/2,g=p+t*Math.PI*2,b=a+i*Math.cos(p),w=l+i*Math.sin(p),P=a+i*Math.cos(g),N=l+i*Math.sin(g),T=t>=.5?1:0;return`M ${a} ${l} L ${b} ${w} A ${i} ${i} 0 ${T} 1 ${P} ${N} Z`}),No=e.computed(()=>{if(Nn.value)return Nn.value;if(en.value)return`url(#${Tn.value})`});let Zn=null;const Xo=()=>{if(!dn.value)return;An.value=0;const t=S.value,a=performance.now(),l=i=>{const p=i-a,g=Math.min(1,p/t);An.value=Qo(V.value,g),g<1&&(Zn=requestAnimationFrame(l))};Zn=requestAnimationFrame(l)},Un=e.computed(()=>W.value?.bubbles?.minSize||8),mo=e.computed(()=>W.value?.bubbles?.maxSize||50),Gn=e.computed(()=>W.value?.bubbles?.opacity||.7),Bo=(t,a)=>{const l=[15,20,25,18,22],i=l[t%l.length]||20,p=1+Math.sin(a*.5)*.2;return Math.max(5,i*p)},Mo=t=>{const a=document.querySelector(`.dss-bubble-image-${t}`);a&&(a.style.opacity="1")},po=t=>{const a=document.querySelector(`.dss-bubble-image-${t}`);a&&(a.style.display="none")},tn=e.computed(()=>F.series),ln=e.computed(()=>F.series.filter((t,a)=>!at.value.has(a))),Qn=t=>{if(!t)return"primary";const a=t.yAxis??t.axis??t.yAxisId;return a==="secondary"||a==="right"||a===1?"secondary":"primary"},fo=t=>t?typeof t.strokeDasharray=="string"?t.strokeDasharray:Array.isArray(t.strokeDasharray)?t.strokeDasharray.join(","):t.dotted===!0?"4,4":null:null,_o=e.computed(()=>ln.value.filter(t=>Qn(t)==="primary")),Dn=e.computed(()=>ln.value.filter(t=>Qn(t)==="secondary")),Rl=e.computed(()=>!Jt.value&&!!se.value&&Dn.value.length>0),Vl="auto",vo=(t,a,l,i=0,p=100)=>{let g=1/0,b=-1/0;if(t.forEach(N=>{N?.data?.length&&N.data.forEach(T=>{typeof T=="number"&&Number.isFinite(T)&&(g=Math.min(g,T),b=Math.max(b,T))})}),g===1/0)return{minY:i,maxY:p};let w;if(a===Vl){const N=b-g,T=N>0?N*.1:1;w=Math.max(0,g-T)}else if(typeof a=="number")w=a;else{const N=b-g,T=N>0?N*.1:1;w=Math.max(0,g-T)}let P;if(l===Vl){const N=b-g,T=N>0?N*.1:2;P=b+T}else if(typeof l=="number")P=l;else{const N=b-g,T=N>0?N*.1:2;P=b+T}return{minY:w,maxY:P}},Ut=e.computed(()=>{if(jt.value)return Yo();if(!ln.value.length)return{minX:0,maxX:1,minY:0,maxY:1};let t=0;ln.value.forEach(l=>{l.data&&l.data.length&&(t=Math.max(t,l.data.length-1))}),F.categories.length>0&&(t=Math.max(t,F.categories.length-1));const a=vo(_o.value.length?_o.value:ln.value,He.value,_e.value);return{minX:0,maxX:t,minY:a.minY,maxY:a.maxY}}),$o=e.computed(()=>Rl.value?vo(Dn.value,Xt.value,bt.value,Ut.value.minY,Ut.value.maxY):{minY:Ut.value.minY,maxY:Ut.value.maxY}),Yo=()=>{if(!ln.value.length)return{minX:0,maxX:8,minY:0,maxY:50,minSize:10,maxSize:30};let t=1/0,a=-1/0,l=1/0,i=-1/0,p=1/0,g=-1/0,b=!1;if(ln.value.forEach((Se,Xe)=>{Se?.data?.length&&Se.data.forEach((me,ke)=>{let Ne,he,je;if(typeof me=="object"&&me!==null&&!Array.isArray(me))Ne=typeof me.x=="number"?me.x:ke,he=typeof me.y=="number"?me.y:0,je=typeof me.size=="number"?me.size:20;else if(Array.isArray(me)&&me.length>=3)Ne=typeof me[0]=="number"?me[0]:ke,he=typeof me[1]=="number"?me[1]:0,je=typeof me[2]=="number"?me[2]:20;else if(typeof me=="number")Ne=ke,he=me,je=Bo(Xe,ke);else return;isFinite(Ne)&&isFinite(he)&&isFinite(je)&&(t=Math.min(t,Ne),a=Math.max(a,Ne),l=Math.min(l,he),i=Math.max(i,he),p=Math.min(p,je),g=Math.max(g,je),b=!0)})}),!b)return{minX:0,maxX:8,minY:0,maxY:50,minSize:10,maxSize:30};t===a&&(t=Math.min(t,0),a=Math.max(a,F.categories?.length-1||8)),l===i&&(l=Math.max(0,l-10),i=l+20);const w=a-t,P=i-l;let N,T,B,te;return Gt.value!==null?N=Gt.value:N=t-w*.1,Lt.value!==null?T=Lt.value:T=a+w*.1,He.value!==null&&typeof He.value=="number"?B=He.value:B=Math.max(0,l-P*.1),_e.value!==null&&typeof _e.value=="number"?te=_e.value:te=i+P*.1,{minX:N,maxX:T,minY:B,maxY:te,minSize:p,maxSize:g}},Kt=t=>{if(jt.value){const{minX:w,maxX:P}=Ut.value,N=P-w||1;return z.value.left+(t-w)/N*z.value.width}const{minX:a,maxX:l}=Ut.value,i=l-a;if(l===0||i===0)return z.value.left+z.value.width/2;const p=i/oe.value.scale,g=a-oe.value.offsetX/z.value.width*i,b=(t-g)/p;return z.value.left+b*z.value.width},wl=t=>{const{minY:a,maxY:l}=Ut.value,i=l-a||1;return z.value.bottom-(t-a)/i*z.value.height},Lo=t=>{const{minY:a,maxY:l}=$o.value,i=l-a||1;return z.value.bottom-(t-a)/i*z.value.height},xl=(t,a)=>Rl.value&&Qn(t)==="secondary"?Lo(a):wl(a),go=t=>{if(!jt.value)return ft.value||4;const{maxSize:a}=Ut.value,l=Math.max(1,a),i=Math.min(1,Math.max(0,t/l));return Un.value+i*(mo.value-Un.value)},Hn=(t,a=12,l="Arial, sans-serif")=>{if(typeof t!="string"||!t)return 0;if(typeof document>"u")return t.length*(a*.62);Hn.canvas||(Hn.canvas=document.createElement("canvas"));const i=Hn.canvas.getContext("2d");return i?(i.font=`${a}px ${l}`,i.measureText(t).width):t.length*(a*.62)},ho=(t,a,l=12)=>{if(typeof t!="string"||typeof a!="number"||a<=0||Hn(t,l)<=a)return t;const i="..";if(Hn(i,l)>=a)return i;let g=t.length;for(;g>0;){const b=`${t.slice(0,g)}${i}`;if(Hn(b,l)<=a)return b;g-=1}return i},Ao=e.computed(()=>s.value.map(t=>({y:t.y}))),o=e.computed(()=>{if(jt.value)return n();if(be.value==="bar"){if(Jt.value){const Le=[],{minY:Re,maxY:$t}=Ut.value,zt=5,jl=$t-Re||1;for(let gl=0;gl<=zt;gl++){const Kl=Re+jl*(gl/zt),Io=Cn(Kl);Le.push({x:Io,y:z.value.bottom+20,text:Wt(Math.round(Kl))})}return Le}const ke=[],{maxX:Ne}=Ut.value,he=Ne+1,je=5,Te=(z.value.width-je*2)/he;for(let Le=0;Le<=Ne;Le++){const Re=z.value.left+je+(Le+.5)*Te;ke.push({x:Re,y:z.value.bottom+20,text:ho(F.categories[Le]||M("chart.fallback.item",{number:Le+1}),Math.max(Te-8,24))})}return ke}const t=[],{minX:a,maxX:l}=Ut.value,i=Gt.value!==null?Gt.value:a,p=Lt.value!==null?Lt.value:l,g=p-i||1,b=g/oe.value.scale,w=i-oe.value.offsetX/z.value.width*g,P=w+b,N=Math.max(0,Math.floor(w-2)),T=Math.min(p,Math.ceil(P+2)),B=T-N,te=z.value.width,Xe=Math.floor(te/60);let me=1;B>Xe&&(me=Math.ceil(B/Xe));for(let ke=N;ke<=T;ke+=me)if(ke>=0&&ke<=p){const Ne=Kt(ke);Ne>=z.value.left-100&&Ne<=z.value.right+100&&t.push({x:Ne,y:z.value.bottom+20,text:F.categories[ke]||`Item ${ke+1}`})}return t}),n=()=>{const t=[],{minX:a,maxX:l}=Ut.value,i=l-a||1,p=Math.min(8,Math.max(4,Math.floor(z.value.width/80)));for(let g=0;g<=p;g++){const b=a+i*g/p,w=Kt(b);if(w>=z.value.left-10&&w<=z.value.right+10){const P=Math.round(b),N=F.categories?.[P];t.push({x:w,y:z.value.bottom+20,text:N||(Number.isInteger(b)?b.toString():b.toFixed(1))})}}return t},s=e.computed(()=>{if(Jt.value){const p=[],{maxX:g}=Ut.value;for(let b=0;b<=g;b++)p.push({x:z.value.left-10,y:Sn(b),text:ho(F.categories[b]||`Item ${b+1}`,Math.max(z.value.left-28,40))});return p}const t=[],{minY:a,maxY:l}=Ut.value,i=5;for(let p=0;p<=i;p++){const g=a+(l-a)*(p/i),b=Math.round(g);t.push({x:z.value.left-10,y:wl(g),text:Wt(b)})}return t}),r=e.computed(()=>{if(!Rl.value||Jt.value)return[];const t=[],{minY:a,maxY:l}=$o.value,i=5;for(let p=0;p<=i;p++){const g=a+(l-a)*(p/i),b=Math.round(g);t.push({x:z.value.right+10,y:Lo(g),text:Wt(b)})}return t}),c=t=>{const a=rl.value;if(!a||a.length===0){const l=["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"];return l[t%l.length]}return a[t%a.length]},d=t=>{if(!t||typeof t!="string")return"#3a3a3a";const a=t.trim();let l=0,i=0,p=0;const g=a.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(g)l=Number(g[1])/255,i=Number(g[2])/255,p=Number(g[3])/255;else{const w=a.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/i);if(w)l=Number(w[1])/255,i=Number(w[2])/255,p=Number(w[3])/255;else{const P=a.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);if(P){let N=P[1];N.length===3&&(N=N[0]+N[0]+N[1]+N[1]+N[2]+N[2]),l=parseInt(N.slice(0,2),16)/255,i=parseInt(N.slice(2,4),16)/255,p=parseInt(N.slice(4,6),16)/255}else if(typeof document<"u"){const N=document.createElement("span");N.style.color=a,N.style.display="none",document.body.appendChild(N);const T=getComputedStyle(N).color;document.body.removeChild(N);const B=T.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(B)l=Number(B[1])/255,i=Number(B[2])/255,p=Number(B[3])/255;else return"#3a3a3a"}else return"#3a3a3a"}}return .2126*l+.7152*i+.0722*p>.5?"#3a3a3a":"#fafafa"},u=t=>{if(!t||typeof t!="string")return t;const a=t.trim(),l=a.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(l){const g=Math.max(0,Math.floor(Number(l[1])*.65)),b=Math.max(0,Math.floor(Number(l[2])*.65)),w=Math.max(0,Math.floor(Number(l[3])*.65));return`rgb(${g}, ${b}, ${w})`}const i=a.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/i);if(i){const g=Math.max(0,Math.floor(Number(i[1])*.65)),b=Math.max(0,Math.floor(Number(i[2])*.65)),w=Math.max(0,Math.floor(Number(i[3])*.65));return`rgba(${g}, ${b}, ${w}, ${i[4]})`}const p=a.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);if(p){let g=p[1];g.length===3&&(g=g[0]+g[0]+g[1]+g[1]+g[2]+g[2]);const b=Math.max(0,Math.min(255,Math.floor(parseInt(g.slice(0,2),16)*.65))),w=Math.max(0,Math.min(255,Math.floor(parseInt(g.slice(2,4),16)*.65))),P=Math.max(0,Math.min(255,Math.floor(parseInt(g.slice(4,6),16)*.65)));return`#${[b,w,P].map(N=>N.toString(16).padStart(2,"0")).join("")}`}return a},m=(t,a)=>{const i=W.value?.stroke?.color;return i==null?u(a):typeof i=="string"?i:Array.isArray(i)&&i.length?i[t%i.length]??u(a):u(a)},v=t=>{let a=0;for(let l=1;l<t.length;l++){const i=t[l].x-t[l-1].x,p=t[l].y-t[l-1].y;a+=Math.sqrt(i*i+p*p)}return a},k=e.computed(()=>be.value==="line"||Ul.value?(Ul.value?F.series.filter(a=>(a.type||be.value)==="line"):tn.value).map((a,l)=>{const i=F.series.findIndex(B=>B===a),p=[];let g=[];a.data.forEach((B,te)=>{B==null?g.length>0&&(p.push([...g]),g=[]):g.push({x:Jt.value?Cn(B):Kt(te),y:Jt.value?Sn(te):xl(a,B),index:te})}),g.length>0&&p.push(g);let b="";p.forEach(B=>{if(B.length>0){let te="";fe.value?te=jn(B):te=`M ${B[0].x} ${B[0].y}`+B.slice(1).map(Se=>` L ${Se.x} ${Se.y}`).join(""),b+=(b?" ":"")+te}});const w=p.reduce((B,te)=>B+v(te),0),P=at.value.has(i),N=de.value===i,T=de.value!==null&&de.value!==i;return{path:b,color:c(i),strokeDasharray:fo(a),pathLength:w,seriesIndex:i,animationDelay:l*Y.value,isHighlighted:N,isDimmed:T,isHidden:P}}):[]),L=e.computed(()=>{if(!(be.value==="line"||Ul.value))return[];const t=Ul.value?F.series.filter(l=>(l.type||be.value)==="line"):tn.value,a=[];return t.forEach((l,i)=>{const p=F.series.findIndex(g=>g===l);for(let g=0;g<l.data.length-1;g++){const b=l.data[g];if(b!=null){let w=-1,P=0;for(let N=g+1;N<l.data.length;N++){const T=l.data[N];if(T==null)P++;else{w=N;break}}if(P>0&&w!==-1){const N=l.data[w],T=Jt.value?Cn(b):Kt(g),B=Jt.value?Sn(g):xl(l,b),te=Jt.value?Cn(N):Kt(w),Se=Jt.value?Sn(w):xl(l,N),Xe=at.value.has(p),me=de.value===p,ke=de.value!==null&&de.value!==p;a.push({path:`M ${T} ${B} L ${te} ${Se}`,color:c(p),seriesIndex:p,animationDelay:i*Y.value,isHighlighted:me,isDimmed:ke,isHidden:Xe,gapSize:P}),g=w-1}}}}),a}),R=e.computed(()=>be.value==="line"||Ul.value?!St.value||_n.value||It.value.hasAnimated?[]:(Ul.value?F.series.filter(a=>(a.type||be.value)==="line"):tn.value).map((a,l)=>{const i=F.series.findIndex(P=>P===a);let p="",g=null;a.data.forEach((P,N)=>{if(P!=null){const T={x:Jt.value?Cn(P):Kt(N),y:Jt.value?Sn(N):xl(a,P)};g===null?p+=`M ${T.x} ${T.y}`:p+=` L ${T.x} ${T.y}`,g=T}else if(g!==null){const T=a.data.findIndex((B,te)=>te>N&&B!==null&&B!==void 0);if(T!==-1){const B={x:Jt.value?Cn(a.data[T]):Kt(T),y:Jt.value?Sn(T):xl(a,a.data[T])};p+=` L ${B.x} ${B.y}`,g=B}}});const b=a.data.map((P,N)=>P==null?null:{x:Jt.value?Cn(P):Kt(N),y:Jt.value?Sn(N):xl(a,P)}).filter(P=>P!==null),w=v(b);return{path:p,pathLength:w,color:c(i),strokeDasharray:fo(a),animationDelay:l*Y.value,seriesIndex:i}}):[]),E=e.computed(()=>{if(be.value!=="line")return[];const t=[];return tn.value.forEach((a,l)=>{const i=de.value===l,p=de.value!==null&&de.value!==l,g=at.value.has(l);a.data.forEach((b,w)=>{b!=null&&t.push({x:Kt(w),y:xl(a,b),color:c(l),value:b,label:F.categories[w]||w.toString(),seriesName:a.name,categoryIndex:w,dataIndex:w,animationDelay:(l*a.data.length+w)*(Y.value/8),isHighlighted:i,isDimmed:p,isHidden:g})})}),t}),ae=e.computed(()=>{if(!Ul.value)return[];const t=[];return F.series.filter(l=>(l.type||be.value)==="line").forEach((l,i)=>{const p=F.series.findIndex(P=>P===l),g=de.value===p,b=de.value!==null&&de.value!==p,w=at.value.has(p);l.data.forEach((P,N)=>{P!=null&&t.push({x:Kt(N),y:xl(l,P),color:c(p),value:P,label:F.categories[N]||N.toString(),seriesName:l.name,categoryIndex:N,dataIndex:N,animationDelay:(i*l.data.length+N)*(Y.value/8),isHighlighted:g,isDimmed:b,isHidden:w})})}),t}),j=e.computed(()=>{if(!jt.value)return[];const t=[];return tn.value.forEach((a,l)=>{if(!a?.data?.length)return;const i=de.value,p=i!==null&&i===l,g=i!==null&&i!==l,b=at.value.has(l);a.data.forEach((w,P)=>{let N,T,B,te,Se;if(typeof w=="object"&&w!==null&&!Array.isArray(w))N=typeof w.x=="number"?w.x:P,T=typeof w.y=="number"?w.y:0,B=typeof w.size=="number"?w.size:20,te=w.label||F.categories?.[P]||`Point ${P+1}`,Se=w.image||w.imageUrl;else if(Array.isArray(w)&&w.length>=3)N=typeof w[0]=="number"?w[0]:P,T=typeof w[1]=="number"?w[1]:0,B=typeof w[2]=="number"?w[2]:20,te=w[3]||F.categories?.[P]||`Point ${P+1}`,Se=w[4];else if(typeof w=="number")N=P,T=w,B=Bo(l,P),te=F.categories?.[P]||`Point ${P+1}`;else return;!isFinite(N)||!isFinite(T)||!isFinite(B)||t.push({x:Kt(N),y:wl(T),radius:go(B),originalX:N,originalY:T,originalSize:B,color:c(l),seriesName:a.name||`Series ${l+1}`,label:te,imageUrl:Se,seriesIndex:l,dataIndex:P,categoryIndex:Math.round(N),isHighlighted:p,isDimmed:g,isHidden:b,opacity:Gn.value})})}),t}),Ie=e.computed(()=>be.value!=="area"?[]:tn.value.map((t,a)=>{const l=[];let i=[];if(t.data.forEach((B,te)=>{B==null?i.length>0&&(l.push([...i]),i=[]):i.push({x:Kt(te),y:xl(t,B),index:te})}),i.length>0&&l.push(i),l.length===0)return{linePath:"",areaPath:"",color:c(a),isHidden:at.value.has(a)};const p=z.value.bottom+1;let g="",b="";l.forEach((B,te)=>{if(B.length===0)return;let Se=`M ${B[0].x} ${B[0].y}`;fe.value&&B.length>1?Se=jn(B):B.slice(1).forEach(me=>{Se+=` L ${me.x} ${me.y}`}),g+=(g?" ":"")+Se;let Xe=`M ${B[0].x} ${p}`;if(Xe+=` L ${B[0].x} ${B[0].y}`,fe.value&&B.length>1){const me=jn(B),ke=me.substring(me.indexOf("C")||me.indexOf("Q")||me.indexOf("L"));ke?Xe+=" "+ke:B.slice(1).forEach(Ne=>{Xe+=` L ${Ne.x} ${Ne.y}`})}else B.slice(1).forEach(me=>{Xe+=` L ${me.x} ${me.y}`});Xe+=` L ${B[B.length-1].x} ${p} Z`,b+=(b?" ":"")+Xe});const w=de.value===a,P=de.value!==null&&de.value!==a,N=at.value.has(a),T=l.reduce((B,te)=>B+v(te),0);return{linePath:g,areaPath:b,color:c(a),pathLength:T,isHighlighted:w,isDimmed:P,isHidden:N}})),Ve=e.computed(()=>{if(!(["bar"].includes(be.value)||Ul.value))return[];const t=[],{maxX:a}=Ut.value,l=Ul.value?F.series.filter(p=>(p.type||be.value)==="bar"):tn.value,i=l.length;if(Jt.value){const p=a+1,b=z.value.height/p,w=b*(2/3),P=Math.min(4,w/i*.15),N=w-(i-1)*P,T=Math.max(4,N/i);l.forEach((B,te)=>{const Se=F.series.findIndex(Ne=>Ne===B),Xe=de.value===Se,me=de.value!==null&&de.value!==Se,ke=at.value.has(Se);B.data.forEach((Ne,he)=>{if(Ne==null||typeof Ne!="number"||!isFinite(Ne))return;const Te=z.value.top+(he+.5)*b-w/2+te*(T+P),Le=z.value.left,Re=Math.abs(Cn(Ne)-z.value.left);let $t="";if(fe.value&&Re>0){const zt=Math.min(Nt.value,T/2,Re/2);$t=[`M ${Le} ${Te}`,`L ${Le+Re-zt} ${Te}`,`Q ${Le+Re} ${Te} ${Le+Re} ${Te+zt}`,`L ${Le+Re} ${Te+T-zt}`,`Q ${Le+Re} ${Te+T} ${Le+Re-zt} ${Te+T}`,`L ${Le} ${Te+T}`,"Z"].join(" ")}t.push({x:Le,y:Te,width:Re,height:T,color:c(i===1?he:Se),value:Ne,label:F.categories[he]||he.toString(),seriesName:B.name,animationDelay:(te*l.length+he)*(Y.value/4),isHighlighted:Xe,isDimmed:me,isHidden:ke,barPath:$t,isSmooth:fe.value&&Re>0})})})}else{const p=a+1,b=z.value.width/p,w=b*.8,P=w/i,N=P*.05,T=P-N;l.forEach((B,te)=>{const Se=F.series.findIndex(Ne=>Ne===B),Xe=de.value===Se,me=de.value!==null&&de.value!==Se,ke=at.value.has(Se);B.data.forEach((Ne,he)=>{if(Ne==null||typeof Ne!="number"||!isFinite(Ne))return;const Te=z.value.left+(he+.5)*b-w/2+te*P+N/2,Le=wl(Math.max(0,Ne)),Re=Math.abs(wl(0)-wl(Ne));let $t="";if(fe.value&&Re>0){const zt=Math.min(Nt.value,T/2,Re/2);$t=[`M ${Te} ${Le+Re}`,`L ${Te} ${Le+zt}`,`Q ${Te} ${Le} ${Te+zt} ${Le}`,`L ${Te+T-zt} ${Le}`,`Q ${Te+T} ${Le} ${Te+T} ${Le+zt}`,`L ${Te+T} ${Le+Re}`,"Z"].join(" ")}t.push({x:Te,y:Le,width:T,height:Re,color:c(i===1?he:Se),value:Ne,label:F.categories[he]||he.toString(),seriesName:B.name,animationDelay:(te*l.length+he)*(Y.value/4),isHighlighted:Xe,isDimmed:me,isHidden:ke,barPath:$t,isSmooth:fe.value&&Re>0})})})}return t}),nt=e.computed(()=>{if(!Cl.value)return[];const t=tn.value.map((b,w)=>({series:b,originalIndex:w})).filter(({originalIndex:b})=>!at.value.has(b));if(t.length===0)return[];let a=be.value==="semi-radial"?Math.PI:-Math.PI/2;const l=be.value==="semi-radial"?Math.PI:Math.PI*2,i=[],p=(b,w,P,N,T,B)=>{const te=b+(w-b)/2,Se=w-b,Xe=Ft.value+Math.cos(b)*Zt.value,me=wt.value+Math.sin(b)*Zt.value,ke=Ft.value+Math.cos(w)*Zt.value,Ne=wt.value+Math.sin(w)*Zt.value,he=Ft.value+Math.cos(w)*it.value,je=wt.value+Math.sin(w)*it.value,Pe=Ft.value+Math.cos(b)*it.value,Te=wt.value+Math.sin(b)*it.value,Le=Se>Math.PI?1:0,Re=[`M ${Xe} ${me}`,`A ${Zt.value} ${Zt.value} 0 ${Le} 1 ${ke} ${Ne}`,`L ${he} ${je}`,`A ${it.value} ${it.value} 0 ${Le} 0 ${Pe} ${Te}`,"Z"].join(" "),$t=B||c(P);return{path:Re,color:$t,strokeWidth:xt.value,strokeColor:m(i.length,$t),value:T,seriesName:N,opacity:.8,isHighlighted:de.value===P,isDimmed:de.value!==null&&de.value!==P,isHidden:!1,startAngle:b,endAngle:w,midAngle:te}};if(On.value){const{series:b,originalIndex:w}=t[0],P=Number(b?.data?.[0]??0),N=Number.isFinite(P)?Math.min(Math.max(P,0),100):0,T=W.value,B=Math.min(Math.max(Number(T?.miniRadial?.minVisiblePercent??1),0),100),Se=(N<=0?B:N)/100*l,Xe=Number(T?.miniRadial?.thresholds?.low??33),me=Number(T?.miniRadial?.thresholds?.medium??66),ke=T?.miniRadial?.colors?.low||"#E53E3E",Ne=T?.miniRadial?.colors?.medium||"#ED8936",he=T?.miniRadial?.colors?.high||"#38A169",je=N<=Xe?ke:N<=me?Ne:he,Pe=T?.miniRadial?.trackColor||"#E5E7EB",Te=b?.name||"Score";return i.push(p(a,a+l-.001,w+1,"Track",100,Pe)),i.push(p(a,a+Se,w,Te,N,je)),i}if(t.length===1){const{series:b,originalIndex:w}=t[0],P=b.data[0]||0,N=a,T=a+l-.001,B=N+l/2,te=Ft.value+Math.cos(N)*Zt.value,Se=wt.value+Math.sin(N)*Zt.value,Xe=Ft.value+Math.cos(T)*Zt.value,me=wt.value+Math.sin(T)*Zt.value,ke=Ft.value+Math.cos(T)*it.value,Ne=wt.value+Math.sin(T)*it.value,he=Ft.value+Math.cos(N)*it.value,je=wt.value+Math.sin(N)*it.value,Pe=1,Te=[`M ${te} ${Se}`,`A ${Zt.value} ${Zt.value} 0 ${Pe} 1 ${Xe} ${me}`,`L ${ke} ${Ne}`,`A ${it.value} ${it.value} 0 ${Pe} 0 ${he} ${je}`,"Z"].join(" "),Le=c(w);return i.push({path:Te,color:Le,strokeWidth:xt.value,strokeColor:m(0,Le),value:P,seriesName:b.name,opacity:.8,isHighlighted:de.value===w,isDimmed:!1,isHidden:!1,startAngle:N,endAngle:T,midAngle:B}),i}if(mn.value&&t.length===2){const b=t[0],w=t[1],P=Math.min(100,Math.max(0,b.series.data[0]||0)),N=P/100*l;return i.push(p(a,a+N,b.originalIndex,b.series.name,P)),i.push(p(a,a+l,w.originalIndex,w.series.name,100)),i}const g=t.reduce((b,{series:w})=>b+(w.data[0]||0),0);return g===0?[]:(t.forEach(({series:b,originalIndex:w})=>{const P=b.data[0]||0,N=P/g*l,T=a,B=a+N,te=T+N/2,Se=Ft.value+Math.cos(T)*Zt.value,Xe=wt.value+Math.sin(T)*Zt.value,me=Ft.value+Math.cos(B)*Zt.value,ke=wt.value+Math.sin(B)*Zt.value,Ne=Ft.value+Math.cos(B)*it.value,he=wt.value+Math.sin(B)*it.value,je=Ft.value+Math.cos(T)*it.value,Pe=wt.value+Math.sin(T)*it.value,Te=N>Math.PI?1:0,Le=[`M ${Se} ${Xe}`,`A ${Zt.value} ${Zt.value} 0 ${Te} 1 ${me} ${ke}`,`L ${Ne} ${he}`,`A ${it.value} ${it.value} 0 ${Te} 0 ${je} ${Pe}`,"Z"].join(" "),Re=c(w);i.push({path:Le,color:Re,strokeWidth:xt.value,strokeColor:m(i.length,Re),value:P,seriesName:b.name,opacity:.8,isHighlighted:de.value===w,isDimmed:de.value!==null&&de.value!==w,isHidden:!1,startAngle:T,endAngle:B,midAngle:te}),a=B}),i)}),bl=e.computed(()=>{const t=nt.value;return mn.value&&t.length>=2?[{segment:t[1],originalIndex:1},{segment:t[0],originalIndex:0}]:t.map((a,l)=>({segment:a,originalIndex:l}))}),fl=e.computed(()=>{if(!O.value||!Cl.value)return[];const t=_.value,a=ce.value,l=$e.value,i=dt.value,p=15,g=t*1.3,b=.55,w=(B,te)=>{const Se=Ft.value+Math.cos(B.midAngle)*it.value,Xe=wt.value+Math.sin(B.midAngle)*it.value,me=Ft.value+Math.cos(B.midAngle)*(it.value+a),ke=wt.value+Math.sin(B.midAngle)*(it.value+a),he=me+l*(te?1:-1),je=te?me+p:me-p,Pe=ke-i,Te=`${B.seriesName}: ${Wt(B.value)}`,Le=Te.length*t*b;return{pointerStartX:Se,pointerStartY:Xe,pointerEndX:me,pointerEndY:ke,horizontalEndX:he,horizontalEndY:ke,textX:je,textY:Pe,text:Te,textWidth:Le,textAnchor:te?"start":"end",isRightSide:te,pointerLineLength:Math.hypot(me-Se,ke-Xe),horizontalLineLength:Math.hypot(he-me,0)}},P=(B,te)=>{const Se=Math.abs(B.textY-te.textY)<g,Xe=B.isRightSide?B.textX:B.textX-B.textWidth,me=B.isRightSide?B.textX+B.textWidth:B.textX,ke=te.isRightSide?te.textX:te.textX-te.textWidth,Ne=te.isRightSide?te.textX+te.textWidth:te.textX,he=Xe<Ne&&ke<me;return Se&&he},N=nt.value.filter(B=>!B.isHidden),T=[];for(let B=0;B<N.length;B++){const te=N[B];let Se=Math.cos(te.midAngle)>=0;if(B>0){const me=T[B-1],ke=w(te,Se);P(me,ke)&&(Se=!Se)}const Xe=w(te,Se);T.push({...Xe,color:te.color,isHighlighted:te.isHighlighted,isDimmed:te.isDimmed})}return T}),sl=t=>{if(!t||t.isHidden)return 0;const a=t.opacity||Gn.value||.7;return de.value===null||de.value===void 0?a:de.value!==null?t.seriesIndex===de.value?Math.min(1,a+.1):Math.max(.5,a*.8):a},vl=t=>{if(!t||t.isHidden)return 0;const a=t.radius>20?.9:.8;return de.value!==null?t.seriesIndex===de.value?Math.min(1,a+.1):a*.7:a},cl=(t,a)=>{if(t)try{if(de.value===t.seriesIndex?de.value=null:de.value=t.seriesIndex,typeof window<"u"&&window.dispatchEvent){const l=new CustomEvent("dss-bubble-click",{detail:{bubble:t,originalEvent:a,chartId:F.chartId}});window.dispatchEvent(l)}}catch(l){console.error("Error in onBubbleClick:",l)}},ul=(t,a)=>{const l=[`dss-bubble-fallback-${a}`];return t.isHighlighted&&l.push("dss-bubble-highlighted"),t.isDimmed&&l.push("dss-bubble-dimmed"),t.isHidden&&l.push("dss-bubble-hidden"),l.push(`dss-bubble-series-${t.seriesIndex}`),l.join(" ")},Xl=(t,a)=>{if(!t||(a.stopPropagation(),Ro.value=!0,de.value=t.seriesIndex,st.value.show=!1,!Ue.value))return;const l=a.target.closest(".dss-custom-chart-container");if(!l)return;const i=l.getBoundingClientRect();let p=a.clientX-i.left+10,g=a.clientY-i.top-10;const b=200,w=120;p+b>xe.value&&(p=a.clientX-i.left-b-10),g+w>i.height&&(g=a.clientY-i.top-w-10),p<0&&(p=10),g<0&&(g=10);const P=Qt.value,N=ol.value,T=P.map(B=>{const te=N[B]||B,Se=pn(B,t);return Se?{seriesName:t.seriesName,label:t.label,value:`${te}: ${Se}`,color:t.color}:null}).filter(Boolean);kt.value={show:!0,x:p,y:g,title:t.label||t.seriesName||"",value:"",bubbleData:T,categoryIndex:void 0,spiderAreas:[]}},pn=(t,a)=>{let l;switch(t){case"x":l=a.originalX;break;case"y":l=a.originalY;break;case"size":l=a.originalSize;break;case"label":l=a.label;break;case"seriesName":l=a.seriesName;break;default:l=a[t]||""}const i=rn.value[t];if(typeof i=="function")return i(l,a);if(typeof l=="number"){const p=l.toFixed(1);return on.value?p+on.value:p}return l?.toString()||""},bn=()=>{if(!jt.value||!st.value.data||st.value.data.length===0)return"Bubbles";const t=[],a=new Set;return st.value.data.forEach(l=>{if(l.seriesName&&l.label){const i=`${l.seriesName} - ${l.label}`;a.has(i)||(t.push(i),a.add(i))}else l.seriesName&&(a.has(l.seriesName)||(t.push(l.seriesName),a.add(l.seriesName)))}),t.length>0?t.join(" | "):"Bubbles"},yo=(t,a)=>{t&&(Ro.value=!1,de.value=null,kt.value.show=!1,kt.value.bubbleData=[])},To=(t,a)=>{const l=a.target.closest(".dss-custom-chart-container");if(!l)return;const i=l.getBoundingClientRect(),p=zn(t.categoryIndex),g=t.description||t.comment||"";let b=a.clientX-i.left+15,w=a.clientY-i.top-10;const P=200,N=g?80:50;b+P>xe.value&&(b=a.clientX-i.left-P-15),w+N>ee.value&&(w=a.clientY-i.top-N-10),b<0&&(b=10),w<0&&(w=10),ml.value={show:!0,x:b,y:w,categoryValue:p,description:g}},jo=()=>{ml.value.show=!1},Mn=e.computed(()=>F.categories.length||Math.max(...ln.value.map(t=>t.data.length))),la=e.computed(()=>{let t=0;return ln.value.forEach(a=>{a.data.forEach(l=>{typeof l=="number"&&(t=Math.max(t,l))})}),t||100}),ko=e.computed(()=>{const t=[],a=Mn.value;for(let l=0;l<a;l++){const i=l*2*Math.PI/a-Math.PI/2,p=Ft.value+Math.cos(i)*it.value,g=wt.value+Math.sin(i)*it.value;t.push({x:p,y:g,angle:i,index:l})}return t}),Jn=e.computed(()=>{const t=[],a=Mn.value;return ko.value.forEach((l,i)=>{const p=it.value+15,g=i*2*Math.PI/a-Math.PI/2,b=Ft.value+Math.cos(g)*p,w=wt.value+Math.sin(g)*p+5;let P="middle",N="middle";Math.abs(Math.cos(g))>.5&&(P=Math.cos(g)>0?"start":"end"),Math.abs(Math.sin(g))>.5&&(N=Math.sin(g)>0?"hanging":"auto"),t.push({x:b,y:w,text:F.categories[i]||`Axis ${i+1}`,anchor:P,baseline:N})}),t}),Do=e.ref(new Set),fn=(t,a,l)=>{const i=`current-${l}`,p=Do.value.has(i);return!p&&de.value===null?a.fillOpacity||gt.value:a.isHighlighted||p?(a.fillOpacity||gt.value)+.15:a.isDimmed?(a.fillOpacity||gt.value)*.3:a.fillOpacity||gt.value},nn=e.computed(()=>{if(!Ll.value)return[];const t=[],a=Mn.value;return tn.value.forEach((l,i)=>{const p=[],g=[],b=[],w=de.value===i,P=de.value!==null&&de.value!==i,N=at.value.has(i);for(let T=0;T<a;T++){const B=l.data[T]||0,Se=B/la.value*it.value,Xe=T*2*Math.PI/a-Math.PI/2,me=Ft.value+Math.cos(Xe)*Se,ke=wt.value+Math.sin(Xe)*Se;p.push(`${me},${ke}`),g.push({x:me,y:ke}),b.push({x:me,y:ke,value:B,label:F.categories[T]||`Axis ${T+1}`,seriesName:l.name})}t.push({points:p.join(" "),polygonPoints:g,dataPoints:b,color:c(i),fillOpacity:gt.value,seriesName:l.name,value:`${l.name}: ${l.data.join(", ")}`,isHighlighted:w,isDimmed:P,isHidden:N,seriesIndex:i})}),t}),Yl=(t,a)=>{if(!a||a.length<3)return!1;let l=!1;for(let i=0,p=a.length-1;i<a.length;p=i++){const g=a[i].x,b=a[i].y,w=a[p].x,P=a[p].y;b>t.y!=P>t.y&&t.x<(w-g)*(t.y-b)/(P-b)+g&&(l=!l)}return l},na=t=>{if(!Ll.value)return;const a=t.currentTarget.closest(".dss-custom-chart-container");if(!a)return;const l=a.getBoundingClientRect(),i=$.value?.getBoundingClientRect();if(!i)return;const p=t.clientX-i.left,g=t.clientY-i.top,b=nn.value.filter(w=>w.isHidden?!1:Yl({x:p,y:g},w.polygonPoints));if(b.length>0){b.length,de.value=b[0].seriesIndex;const w=t.clientX-l.left+10,P=t.clientY-l.top-10,N=b.length>1?460:260,T=70+Mn.value*20;let B=w,te=P;B+N>xe.value&&(B=t.clientX-l.left-N-10),te+T>ee.value&&(te=t.clientY-l.top-T-10),B<0&&(B=10),te<0&&(te=10);const Se=b.map(Xe=>({seriesName:Xe.seriesName,color:Xe.color,points:Xe.dataPoints.map(me=>({label:me.label,value:Wt(me.value)}))}));kt.value={show:!0,x:B,y:te,title:"",value:"",bubbleData:[],spiderAreas:Se}}else wn()},Ho=e.computed(()=>{const t=W.value;return t.logos.map((a,l)=>{const i=F.series[a.seriesIndex];if(!i||!i.data||i.data.length===0||at.value.has(a.seriesIndex))return null;let p,g;if(Sl.value){let w=-1,P=null;for(let T=i.data.length-1;T>=0;T--)if(i.data[T]!==null&&i.data[T]!==void 0){w=T,P=i.data[T];break}if(w===-1||P===null)return null;const N=i.data.map((T,B)=>T==null?null:{x:Kt(B),y:xl(i,T),index:B}).filter(T=>T!==null);if(t.animations.enabled&&!_n.value&&t.animations.type==="draw"&&t.chart.type==="line"&&(It.value.isAnimating||!It.value.hasAnimated))if(It.value.isAnimating){const T=It.value.currentFrame/It.value.totalFrames,B=Qo(t.animations.easing,Math.min(T,1)),te=xa(N,B);p=te.x+(a.offsetX||0),g=te.y+(a.offsetY||0)}else p=N[0].x+(a.offsetX||0),g=N[0].y+(a.offsetY||0);else p=Kt(w)+(a.offsetX||0),g=wl(P)+(a.offsetY||0)}else if(Cl.value||Ll.value){const w=Math.PI*2/t.logos.length*l;p=Ft.value+Math.cos(w)*(it.value+30)+(a.offsetX||0),g=wt.value+Math.sin(w)*(it.value+30)+(a.offsetY||0)}return{...a,x:p,y:g,seriesIndex:a.seriesIndex}}).filter(Boolean)}),va=t=>{const a=document.querySelector(`.dss-logo-fallback-${t}`),l=document.querySelector(`.dss-logo-image-${t}`);a&&(a.style.opacity="0"),l&&(l.style.opacity="1")},ga=t=>{console.warn(`Logo ${t} failed to load, keeping fallback circle`);const a=document.querySelector(`.dss-logo-image-${t}`);a&&(a.style.display="none")},Ko=t=>{at.value.has(t)?at.value.delete(t):at.value.add(t)},ha=e.computed(()=>{if(!kt.value.show&&!(Ke.value&&st.value.show&&!oe.value.isZooming))return{display:"none"};let t,a;if(Ke.value&&st.value.show&&!oe.value.isZooming){t=st.value.x+15,a=z.value.top;const l=jt.value?200:150;t+l>xe.value&&(t=st.value.x-l-15),t<0&&(t=10),a<10&&(a=10)}else t=kt.value.x,a=kt.value.y;return{left:t+"px",top:a+"px"}}),Rn=(t,a)=>{if(!Ue.value||Co.value)return;const i=a.target.closest(".dss-custom-chart-container").getBoundingClientRect();let p=a.clientX-i.left+10,g=a.clientY-i.top-10;const b=200,w=120,P=xe.value,N=ee.value;p+b>P&&(p=a.clientX-i.left-b-10),g+w>N&&(g=a.clientY-i.top-w-10),p<0&&(p=10),g<0&&(g=10);let T;typeof t.categoryIndex=="number"?T=t.categoryIndex:typeof t.dataIndex=="number"?T=t.dataIndex:t.label&&F.categories.includes(t.label)&&(T=F.categories.indexOf(t.label));const B=(Jt.value||be.value==="bar")&&t.label?t.label:t.seriesName||t.label||"";kt.value={show:!0,x:p,y:g,title:B,value:Wt(t.value)||"",categoryIndex:T,spiderAreas:[]}},Go=e.ref(!1),Ro=e.ref(!1),wn=()=>{kt.value.show=!1,kt.value.spiderAreas=[],kt.value.bubbleData=[],st.value.show=!1,Go.value||(de.value=null)},Co=e.ref(!1),bo=(t,a)=>{Co.value=!0,kt.value.show=!1,st.value.show=!1;const i=a.target.closest(".dss-custom-chart-container").getBoundingClientRect();let p=a.clientX-i.left+15,g=a.clientY-i.top-10;const b=250;p+b>xe.value&&(p=a.clientX-i.left-b-15),p<0&&(p=10),g<0&&(g=10),kl.value={show:!0,x:p,y:g,content:t.texts,count:t.totalCount}},wo=()=>{Co.value=!1,kl.value.show=!1},It=e.ref({isAnimating:!1,currentFrame:0,totalFrames:0,animationId:null,hasAnimated:!1}),Qo=(t,a)=>{switch(t){case"linear":return a;case"ease":return a<.5?2*a*a:-1+(4-2*a)*a;case"ease-in":return a*a;case"ease-out":return a*(2-a);case"ease-in-out":return a<.5?2*a*a:-1+(4-2*a)*a;default:return a}},_n=e.computed(()=>ze.value?window.matchMedia("(prefers-reduced-motion: reduce)").matches:!1),oa=()=>{if(!St.value||_n.value){It.value.hasAnimated=!0,en.value&&(Bn.value=1);return}en.value&&(Bn.value=0),It.value.isAnimating=!0,It.value.currentFrame=0,It.value.totalFrames=Math.ceil(S.value/16.67);const t=()=>{const a=It.value.currentFrame/It.value.totalFrames,l=Qo(V.value,Math.min(a,1));ya(l),en.value&&(Bn.value=l),a<1?(It.value.currentFrame++,It.value.animationId=requestAnimationFrame(t)):ka()};It.value.animationId=requestAnimationFrame(t)},ya=t=>{const a=I.value;a&&a.style.setProperty("--dss-animation-progress",t)},ka=()=>{It.value.isAnimating=!1,It.value.hasAnimated=!0,en.value&&(Bn.value=1),It.value.animationId&&(cancelAnimationFrame(It.value.animationId),It.value.animationId=null)},Jo=e.computed(()=>!Cl.value||It.value.hasAnimated?!0:en.value?Bn.value>=1:Pl.value?An.value>=1:!0),aa=e.computed(()=>O.value&&Jo.value),Fo=e.ref(!1);e.watch(aa,t=>{t?(Fo.value=!1,e.nextTick(()=>{requestAnimationFrame(()=>{Fo.value=!0})})):Fo.value=!1},{immediate:!0});const Ca=e.computed(()=>{if(!St.value||_n.value||It.value.hasAnimated)return{};const t={};return t["--dss-animation-duration"]=`${S.value}ms`,t["--dss-animation-easing"]=ba(V.value),t["--dss-stagger-delay"]=`${Y.value}ms`,t}),ba=t=>({linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out"})[t]||"ease-out",wa=()=>{if(!St.value||_n.value)return"";const t=["dss-chart-animated"];return It.value.hasAnimated||t.push(`dss-animate-${ll.value}`),It.value.hasAnimated||(Cl.value&&be.value!=="semi-radial"?t.push("dss-animate-fill"):Cl.value||t.push(`dss-animate-${ll.value}`)),It.value.isAnimating&&t.push("dss-is-animating"),t.join(" ")};e.watch(()=>F.series,(t,a)=>{le.value&&a&&It.value.hasAnimated&&(It.value.hasAnimated=!1,e.nextTick(()=>{setTimeout(()=>oa(),C.value)}))},{deep:!0}),e.watch(()=>oe.value.isZooming,(t,a)=>{a&&!t&&setTimeout(()=>{Pn()},50)}),e.watch(()=>[oe.value.scale,oe.value.offsetX],()=>{!oe.value.isZooming&&!oe.value.isDragging&&Pn()},{flush:"post"}),e.watch([Ot,We],([t,a])=>{oe.value.minScale=t,oe.value.maxScale=a,(oe.value.scale<t||oe.value.scale>a)&&uo()},{immediate:!0}),e.watch(()=>F.locale,t=>{t&&t!==A.value&&(A.value=t)},{immediate:!0}),e.watch(()=>vt.value.show,t=>{t?e.nextTick(()=>{document.addEventListener("click",io)}):document.removeEventListener("click",io)}),e.onMounted(()=>{de.value=null,en.value&&(!St.value||_n.value)&&(Bn.value=1),x(),I.value&&typeof ResizeObserver<"u"&&(f=new ResizeObserver(t=>{const a=t[0];!a||!a.contentRect||(we&&cancelAnimationFrame(we),we=requestAnimationFrame(()=>{we=null;const{width:l,height:i}=a.contentRect;ct.value=Math.round(l),Q.value=Math.round(i),ve.value&&(Me.value=ve.value.offsetHeight||Ce)}))}),f.observe(I.value)),St.value&&!_n.value?be.value==="semi-radial"?setTimeout(()=>Xo(),C.value):setTimeout(()=>oa(),C.value):(It.value.hasAnimated=!0,be.value==="semi-radial"&&(An.value=1)),document.addEventListener("mousemove",sa),document.addEventListener("mouseup",ra),document.addEventListener("click",Eo)}),e.onUnmounted(()=>{we&&cancelAnimationFrame(we),f&&I.value&&(f.unobserve(I.value),f.disconnect(),f=null),It.value.animationId&&cancelAnimationFrame(It.value.animationId),Zn&&(cancelAnimationFrame(Zn),Zn=null),oe.value.zoomTimeout&&clearTimeout(oe.value.zoomTimeout),document.removeEventListener("mousemove",sa),document.removeEventListener("mouseup",ra),document.removeEventListener("click",Eo),document.removeEventListener("click",io)});const sa=t=>{if(oe.value.isDragging&&oe.value.scale>1&&Sl.value){st.value.show=!1;const a=t.clientX-oe.value.lastMouseX,{minX:l,maxX:i}=Ut.value,p=i-l||1,b=a*.8;oe.value.offsetX+=b;const w=p/oe.value.scale,P=p-w,N=0,T=-P/p*z.value.width,B=N;oe.value.offsetX=Math.max(T,Math.min(B,oe.value.offsetX)),oe.value.lastMouseX=t.clientX,oe.value.lastMouseY=t.clientY}},ra=()=>{oe.value.isDragging&&(oe.value.isDragging=!1,setTimeout(()=>{!oe.value.isDragging&&oe.value.isZooming},100))},xa=(t,a)=>{const l=t.filter(w=>w!=null);if(!l||l.length===0)return{x:0,y:0};if(l.length===1||a<=0)return l[0];if(a>=1)return l[l.length-1];let i=0;const p=[];for(let w=1;w<l.length;w++){const P=l[w].x-l[w-1].x,N=l[w].y-l[w-1].y,T=Math.sqrt(P*P+N*N);p.push(T),i+=T}const g=i*a;let b=0;for(let w=0;w<p.length;w++){const P=b+p[w];if(g<=P){const N=(g-b)/p[w],T=l[w],B=l[w+1];return{x:T.x+(B.x-T.x)*N,y:T.y+(B.y-T.y)*N}}b=P}return l[l.length-1]};return(t,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["dss-custom-chart-container",[wa(),{"dss-chart-fill-width":Ze.value,"dss-chart-fill-height":qe.value,"dss-chart-compact":Cl.value&&!K.value}]]),style:e.normalizeStyle({width:Ze.value?"100%":xe.value+"px",height:lt.value,...Ze.value||qe.value?{overflow:Cl.value?"visible":"hidden",maxWidth:"100%",maxHeight:"100%"}:{},...Ca.value,cursor:Zo()}),"data-chart-type":be.value,ref_key:"containerEl",ref:I,onWheel:So,onMousedown:co,onMousemove:zl,onMouseup:Vo,onMouseleave:In,onDblclick:uo,onContextmenu:e.withModifiers(Ln,["prevent"]),onClick:e.withModifiers(Wl,["left"]),onWheelCapture:So},[e.createElementVNode("div",{class:"dss-chart-header",ref_key:"headerEl",ref:ve},[e.createElementVNode("div",bs,[ut.value?(e.openBlock(),e.createElementBlock("div",ws,e.toDisplayString(ut.value),1)):e.createCommentVNode("",!0),Ct.value?(e.openBlock(),e.createElementBlock("div",xs,e.toDisplayString(Ct.value),1)):e.createCommentVNode("",!0)]),K.value&&ye.value==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dss-chart-legend",{"dss-legend-horizontal":Be.value==="horizontal","dss-legend-vertical":Be.value==="vertical","dss-legend-top":ye.value==="top","dss-legend-bottom":ye.value==="bottom"}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.series,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-${i}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":at.value.has(i),"dss-legend-hovered":de.value===i,"dss-legend-dimmed":de.value!==null&&de.value!==i}]),onClick:p=>Ko(i),onMouseenter:p=>Il(i),onMouseleave:il,style:e.normalizeStyle({animationDelay:`${i*100}ms`})},[e.createElementVNode("div",{class:"dss-legend-color",style:e.normalizeStyle({backgroundColor:c(i)})},null,4),e.createElementVNode("span",Ss,e.toDisplayString(l.name),1)],46,Es))),128))],2)):e.createCommentVNode("",!0),K.value&&(ye.value==="left"||ye.value==="right")?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-chart-legend-side",{"dss-legend-left":ye.value==="left","dss-legend-right":ye.value==="right"}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.series,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-${i}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":at.value.has(i),"dss-legend-hovered":de.value===i,"dss-legend-dimmed":de.value!==null&&de.value!==i}]),onClick:p=>Ko(i),onMouseenter:p=>Il(i),onMouseleave:il,style:e.normalizeStyle({animationDelay:`${i*100}ms`})},[e.createElementVNode("div",{class:"dss-legend-color",style:e.normalizeStyle({backgroundColor:c(i)})},null,4),e.createElementVNode("span",Ns,e.toDisplayString(l.name),1)],46,Vs))),128))],2)):e.createCommentVNode("",!0)],512),H.showAddMarkerButton&&ht.value&&yt.value.addMarker&&(Sl.value||jt.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-add-marker-button",onClick:xo,title:e.unref(M)("chart.contextMenu.addMarker")},[e.createElementVNode("img",{src:_t.value,class:"dss-add-marker-button-icon",alt:"Marker Icon",style:{width:"100%",height:"100%","object-fit":"contain","border-radius":"50%","pointer-events":"none"}},null,8,Ms),a[4]||(a[4]=e.createElementVNode("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M10 4V16M4 10H16",stroke:"hsl(60, 2%, 47%)","stroke-width":"2","stroke-linecap":"round"})],-1))],8,Bs)):e.createCommentVNode("",!0),e.createElementVNode("div",_s,[jt.value&&Et.value?(e.openBlock(),e.createElementBlock("div",$s,"Bubble size: "+e.toDisplayString(Et.value),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{width:xe.value,height:ee.value,class:"dss-chart-svg","data-smooth":fe.value,"data-animated":St.value,ref_key:"svgEl",ref:$},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",{id:U.value},[e.createElementVNode("rect",{x:0,y:z.value.top,width:xe.value,height:z.value.height*4},null,8,Ts)],8,As),Pl.value?(e.openBlock(),e.createElementBlock("clipPath",{key:0,id:Kn.value},[e.createElementVNode("path",{d:Vn.value},null,8,Hs)],8,Ds)):e.createCommentVNode("",!0),en.value?(e.openBlock(),e.createElementBlock("clipPath",{key:1,id:Tn.value},[e.createElementVNode("path",{d:Wn.value},null,8,Fs)],8,Rs)):e.createCommentVNode("",!0)]),Sl.value||jt.value?(e.openBlock(),e.createElementBlock("g",Is,[qt.value?(e.openBlock(),e.createElementBlock("g",{key:0,class:"dss-grid-lines","clip-path":pe.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ao.value,(l,i)=>(e.openBlock(),e.createElementBlock("line",{key:`h-grid-${i}`,x1:z.value.left,x2:z.value.right,y1:l.y,y2:l.y,stroke:"#e0e0e0","stroke-width":"1","stroke-dasharray":"4,2",style:e.normalizeStyle({animationDelay:`${i*50}ms`})},null,12,Ps))),128))],8,zs)):e.createCommentVNode("",!0),e.createElementVNode("g",Os,[e.createElementVNode("line",{x1:z.value.left,x2:z.value.right,y1:z.value.bottom,y2:z.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,qs),e.createElementVNode("line",{x1:z.value.left,x2:z.value.left,y1:z.value.top,y2:z.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,Ws),Rl.value?(e.openBlock(),e.createElementBlock("line",{key:0,x1:z.value.right,x2:z.value.right,y1:z.value.top,y2:z.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,Zs)):e.createCommentVNode("",!0)]),e.createElementVNode("g",Us,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(l,i)=>(e.openBlock(),e.createElementBlock("text",{key:`x-${i}`,x:l.x,y:l.y,"text-anchor":"middle","font-size":"12",fill:"#666",style:e.normalizeStyle({animationDelay:`${i*100}ms`})},e.toDisplayString(l.text),13,Xs))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(l,i)=>(e.openBlock(),e.createElementBlock("text",{key:`y-${i}`,x:l.x,y:l.y,"text-anchor":"end","font-size":"12",fill:"#666","dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${i*80}ms`})},e.toDisplayString(l.text),13,Ys))),128)),Rl.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.value,(l,i)=>(e.openBlock(),e.createElementBlock("text",{key:`y-secondary-${i}`,x:l.x,y:l.y,"text-anchor":"start","font-size":"12",fill:"#666","dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${i*80}ms`})},e.toDisplayString(l.text),13,js))),128)):e.createCommentVNode("",!0),Ht.value?(e.openBlock(),e.createElementBlock("text",{key:1,x:z.value.left+z.value.width/2,y:z.value.bottom+45,"text-anchor":"middle","font-size":"14","font-weight":"bold",fill:"#333"},e.toDisplayString(Ht.value),9,Ks)):e.createCommentVNode("",!0),Pt.value?(e.openBlock(),e.createElementBlock("text",{key:2,x:15,y:z.value.top+12+z.value.height/2,"text-anchor":"middle","font-size":"14","font-weight":"bold",fill:"#333",transform:`rotate(-90, 15, ${z.value.top+z.value.height/2})`},e.toDisplayString(Pt.value),9,Gs)):e.createCommentVNode("",!0),Rl.value&&ge.value?(e.openBlock(),e.createElementBlock("text",{key:3,x:xe.value-15,y:z.value.top+12+z.value.height/2,"text-anchor":"middle","font-size":"14","font-weight":"bold",fill:"#333",transform:`rotate(90, ${xe.value-15}, ${z.value.top+z.value.height/2})`},e.toDisplayString(ge.value),9,Qs)):e.createCommentVNode("",!0)]),Jl.value.length>0?(e.openBlock(),e.createElementBlock("g",Js,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Jl.value,l=>(e.openBlock(),e.createElementBlock("g",{key:`flag-group-${l.categoryIndex}`},[e.createElementVNode("g",{"clip-path":pe.value},[l.hasManual?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x,x2:l.x,y1:z.value.bottom,y2:z.value.top,stroke:"#698dbe","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:i=>bo(l,i),onMouseleave:wo},null,40,tr)):e.createCommentVNode("",!0),l.hasAuto&&!l.hasManual?(e.openBlock(),e.createElementBlock("line",{key:1,x1:l.x,x2:l.x,y1:z.value.bottom,y2:z.value.top,stroke:"#a1d499","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:i=>bo(l,i),onMouseleave:wo},null,40,lr)):e.createCommentVNode("",!0),l.hasAuto&&l.hasManual?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.x,x2:l.x,y1:z.value.bottom,y2:z.value.top,stroke:"#698dbe","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:i=>bo(l,i),onMouseleave:wo},null,40,nr)):e.createCommentVNode("",!0)],8,er),l.hasManual&&l.hasAuto?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x+8,cy:Math.max(15,z.value.top-10),r:"14",fill:"#a1d499",stroke:"#fafafa","stroke-width":"2",class:"flag-count-circle",onMouseover:i=>bo(l,i),onMouseleave:wo},null,40,or)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:l.x,cy:Math.max(15,z.value.top-10),r:"14",fill:l.hasManual&&l.hasAuto||l.hasManual?"#698dbe":"#a1d499",stroke:"#fafafa","stroke-width":"2",class:"dss-flag-count-indicator",onMouseover:i=>bo(l,i),onMouseleave:wo},null,40,ar),e.createElementVNode("text",{x:l.x,y:Math.max(15,z.value.top-5),"text-anchor":"middle","font-size":"12","font-weight":"bold",fill:"#fafafa",class:"dss-flag-count-text","pointer-events":"none"},e.toDisplayString(l.totalCount),9,sr)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",{class:"dss-chart-data","clip-path":pe.value},[Ul.value?(e.openBlock(),e.createElementBlock("g",ir,[e.createElementVNode("g",{class:e.normalizeClass(["dss-bar-chart",{"dss-horizontal-bars":Jt.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ve.value,(l,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`mixed-bar-${i}`},[l.isSmooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:l.barPath,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":l.isHighlighted,"dss-bar-dimmed":l.isDimmed,"dss-bar-hidden":l.isHidden}),style:e.normalizeStyle({fill:l.color,fillOpacity:l.isDimmed?.4:1,animationDelay:`${l.animationDelay}ms`}),onMouseover:p=>Rn(l,p),onMouseleave:wn},null,46,cr)):(e.openBlock(),e.createElementBlock("rect",{key:1,x:l.x,y:l.y,width:l.width,height:l.height,fill:l.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":l.isHighlighted,"dss-bar-dimmed":l.isDimmed,"dss-bar-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`}),onMouseover:p=>Rn(l,p),onMouseleave:wn},null,46,ur))],64))),128))],2),e.createElementVNode("g",dr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`mixed-line-${i}`,d:l.path,stroke:l.color,"stroke-width":l.isHighlighted?Fe.value+2:Fe.value,"stroke-dasharray":l.strokeDasharray,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":l.isHighlighted,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({"--dss-path-length":l.pathLength,animationDelay:`${l.animationDelay}ms`})},null,14,mr))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`mixed-gap-connector-${i}`,d:l.path,stroke:l.color,"stroke-width":l.isHighlighted?Fe.value+2:Fe.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":"15, 10, 5, 10",opacity:l.isHighlighted?0:.5,class:e.normalizeClass({"dss-gap-connector":!0,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`,transition:"opacity 0.2s ease"})},null,14,pr))),128)),ft.value>0||J.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(ae.value,(l,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`mixed-point-${i}`,cx:l.x,cy:l.y,r:X(l.isHighlighted?Z(l,ft.value)+2:Z(l,ft.value)),fill:l.color,stroke:"none",class:e.normalizeClass({"dss-point-highlighted":l.isHighlighted,"dss-point-dimmed":l.isDimmed,"dss-point-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`}),onMouseover:p=>Rn(l,p),onMouseleave:wn},null,46,fr))),128)):e.createCommentVNode("",!0)])])):be.value==="line"?(e.openBlock(),e.createElementBlock("g",vr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`anim-${i}`,d:l.path,stroke:l.color,"stroke-width":Fe.value,"stroke-dasharray":l.strokeDasharray,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass(["dss-line-animation-overlay",{"dss-animation-complete":It.value.hasAnimated}]),style:e.normalizeStyle({"--dss-path-length":l.pathLength,animationDelay:`${l.animationDelay}ms`})},null,14,gr))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`line-${i}`,d:l.path,stroke:l.color,"stroke-width":l.isHighlighted?Fe.value+2:Fe.value,"stroke-dasharray":l.strokeDasharray,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":l.isHighlighted,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({"--dss-path-length":l.pathLength,animationDelay:`${l.animationDelay}ms`})},null,14,hr))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`gap-connector-${i}`,d:l.path,stroke:l.color,"stroke-width":l.isHighlighted?Fe.value+2:Fe.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":"15, 10, 5, 10",opacity:l.isHighlighted?0:.5,class:e.normalizeClass({"dss-gap-connector":!0,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`,transition:"opacity 0.2s ease"})},null,14,yr))),128)),ft.value>0||J.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(E.value,(l,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`point-${i}`,cx:l.x,cy:l.y,r:X(l.isHighlighted?Z(l,ft.value)+2:Z(l,ft.value)),fill:l.color,stroke:"none",class:e.normalizeClass({"dss-point-highlighted":l.isHighlighted,"dss-point-dimmed":l.isDimmed,"dss-point-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`}),onMouseover:p=>Rn(l,p),onMouseleave:wn},null,46,kr))),128)):e.createCommentVNode("",!0)])):be.value==="area"?(e.openBlock(),e.createElementBlock("g",Cr,[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ie.value,(l,i)=>(e.openBlock(),e.createElementBlock("mask",{key:`mask-${i}`,id:`area-mask-${i}-${H.chartId}`},[e.createElementVNode("rect",{x:z.value.left-10,y:z.value.top-10,width:z.value.width+20,height:z.value.height+20,fill:"#fafafa",class:"dss-area-mask-rect",style:e.normalizeStyle({"--dss-mask-width":`${z.value.width+20}px`})},null,12,wr)],8,br))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ie.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`area-fill-${i}`,d:l.areaPath,fill:l.color,"fill-opacity":l.isHighlighted?re.value+.2:re.value,mask:`url(#area-mask-${i}-${H.chartId})`,class:e.normalizeClass({"dss-area-fill-smooth":!0,"dss-series-highlighted":l.isHighlighted,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden})},null,10,xr))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ie.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`area-line-${i}`,d:l.linePath,stroke:l.color,"stroke-width":l.isHighlighted?Fe.value+1:Fe.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-area-line-animated":!0,"dss-series-highlighted":l.isHighlighted,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({"--dss-path-length":l.pathLength,animationDelay:`${i*Y.value}ms`})},null,14,Er))),128))])):be.value==="bar"?(e.openBlock(),e.createElementBlock("g",{key:3,class:e.normalizeClass({"dss-horizontal-bars":Jt.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ve.value,(l,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bar-${i}`},[l.isSmooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:l.barPath,fill:l.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":l.isHighlighted,"dss-bar-dimmed":l.isDimmed,"dss-bar-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`}),onMouseover:p=>Rn(l,p),onMouseleave:wn},null,46,Sr)):(e.openBlock(),e.createElementBlock("rect",{key:1,x:l.x,y:l.y,width:l.width,height:l.height,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":l.isHighlighted,"dss-bar-dimmed":l.isDimmed,"dss-bar-hidden":l.isHidden}),style:e.normalizeStyle({fill:l.color,fillOpacity:l.isDimmed?.4:1,animationDelay:`${l.animationDelay}ms`}),onMouseover:p=>Rn(l,p),onMouseleave:wn},null,46,Vr))],64))),128))],2)):e.createCommentVNode("",!0)],8,rr),Ke.value&&st.value.show&&!oe.value.isZooming?(e.openBlock(),e.createElementBlock("g",{key:2,class:"dss-crosshair","clip-path":pe.value},[e.createElementVNode("line",{x1:st.value.x,x2:st.value.x,y1:z.value.top,y2:z.value.bottom,stroke:Tt.value,"stroke-width":"1","stroke-dasharray":"4,4",opacity:"0.8"},null,8,Br),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(st.value.data,(l,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`dss-crosshair-point-${i}`,cx:st.value.x,cy:l.y,r:X(ft.value+2),fill:l.color,stroke:"none",opacity:"0.9"},null,8,Mr))),128))],8,Nr)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),jt.value?(e.openBlock(),e.createElementBlock("g",_r,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,(l,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bubble-${i}`},[l?(e.openBlock(),e.createElementBlock("g",$r,[e.createElementVNode("circle",{cx:l.x,cy:l.y,r:X(l.radius),fill:l.color,"fill-opacity":sl(l),stroke:l.color,"stroke-width":"1","stroke-opacity":"0.8",class:e.normalizeClass(ul(l,i)),style:{cursor:"pointer",transition:"all 0.3s ease"},onMouseenter:p=>Xl(l,p),onMouseleave:p=>yo(l),onClick:p=>cl(l,p)},null,42,Lr),l.imageUrl?(e.openBlock(),e.createElementBlock("image",{key:0,x:l.x-l.radius*.65,y:l.y-l.radius*.65,width:l.radius*1.3,height:l.radius*1.3,"xlink:href":l.imageUrl,class:e.normalizeClass(`dss-bubble-image-${i} ${l.isHighlighted?"dss-bubble-highlighted":""} ${l.isDimmed?"dss-bubble-dimmed":""} ${l.isHidden?"dss-bubble-hidden":""}`),"clip-path":`circle(${l.radius*.65}px at ${l.radius*.65}px ${l.radius*.65}px)`,style:e.normalizeStyle({cursor:"pointer",transition:"all 0.3s ease",opacity:vl(l)}),onLoad:p=>Mo(i),onError:p=>po(i),onMouseenter:p=>Xl(l,p),onMouseleave:p=>yo(l),onClick:p=>cl(l,p)},null,46,Ar)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0),Cl.value?(e.openBlock(),e.createElementBlock("g",{key:2,class:"radial-chart",transform:tl.value},[be.value==="radial"?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:Ft.value,cy:wt.value,r:it.value,fill:"none",stroke:"#e0e0e0","stroke-width":"1"},null,8,Dr)):e.createCommentVNode("",!0),e.createElementVNode("g",{class:"dss-radial-data","data-chart-type":be.value,"clip-path":No.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(bl.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`radial-${l.originalIndex}-${i}`,d:l.segment.path,fill:l.segment.color,"fill-opacity":l.segment.isHighlighted?(l.segment.opacity||.8)+.2:l.segment.opacity||.8,stroke:l.segment.strokeWidth?l.segment.strokeColor||l.segment.color:"none","stroke-width":l.segment.strokeWidth||0,"clip-path":Uo(l.originalIndex),class:e.normalizeClass({"dss-series-highlighted":l.segment.isHighlighted,"dss-series-dimmed":l.segment.isDimmed,"dss-series-hidden":l.segment.isHidden}),onMouseover:p=>Rn(l.segment,p),onMouseleave:wn},null,42,Rr))),128))],8,Hr),Qe.value&&Jo.value?(e.openBlock(),e.createElementBlock("g",Fr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($n.value,(l,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("text",{key:`radial-segment-label-${i}`,x:l.x,y:l.y,"text-anchor":"middle","dominant-baseline":"middle",class:"dss-radial-segment-data-label",style:e.normalizeStyle({fill:l.contrastColor})},e.toDisplayString(l.value),13,Ir)),[[e.vShow,l.show]])),128))])):e.createCommentVNode("",!0),Dt.value&&(Jo.value||Pl.value||On.value)?(e.openBlock(),e.createElementBlock("text",{key:2,x:Nl.value.x,y:Nl.value.y,"text-anchor":"middle","dominant-baseline":"middle","font-size":Dl.value,fill:Ol.value,class:"dss-radial-data-center"},e.toDisplayString(nl.value),9,zr)):e.createCommentVNode("",!0),aa.value?(e.openBlock(),e.createElementBlock("g",{key:3,class:e.normalizeClass(["dss-radial-labels dss-radial-labels-initial",{"dss-radial-labels-animated":Fo.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(fl.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",{key:`radial-label-${i}`,class:e.normalizeClass(["dss-radial-label-group",{"dss-label-highlighted":l.isHighlighted,"dss-label-dimmed":l.isDimmed}]),style:e.normalizeStyle({"--label-delay":`${i*.08}s`})},[e.createElementVNode("line",{class:"dss-radial-label-line dss-radial-label-line-pointer",x1:l.pointerStartX,y1:l.pointerStartY,x2:l.pointerEndX,y2:l.pointerEndY,stroke:l.color,"stroke-width":"1.5",opacity:"0.8",style:e.normalizeStyle({"--line-length":l.pointerLineLength})},null,12,Pr),e.createElementVNode("line",{class:"dss-radial-label-line dss-radial-label-line-horizontal",x1:l.pointerEndX,y1:l.pointerEndY,x2:l.horizontalEndX,y2:l.horizontalEndY,stroke:l.color,"stroke-width":"1.5",opacity:"0.8",style:e.normalizeStyle({"--line-length":l.horizontalLineLength})},null,12,Or),e.createElementVNode("text",{class:"dss-radial-label-text",x:l.textX,y:l.textY,"text-anchor":l.textAnchor,"font-size":_.value,"dominant-baseline":"middle"},e.toDisplayString(l.text),9,qr)],6))),128))],2)):e.createCommentVNode("",!0)],8,Tr)):e.createCommentVNode("",!0),Ll.value?(e.openBlock(),e.createElementBlock("g",{key:3,class:"dss-spider-chart",transform:tl.value},[qt.value?(e.openBlock(),e.createElementBlock("g",Zr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Oe.value,(l,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-grid-circle-${i}`,cx:Ft.value,cy:wt.value,r:X(l),fill:"none",stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${i*150}ms`})},null,12,Ur))),128)),e.createElementVNode("g",Xr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Oe.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-grid-label-group-${i}`},[e.createElementVNode("rect",{x:Ft.value-16,y:wt.value-l-7,width:"32",height:"16",fill:"transparent",stroke:"none"},null,8,Yr),e.createElementVNode("text",{x:Ft.value,y:wt.value-l+2,"text-anchor":"middle","dominant-baseline":"central",class:"dss-spider-grid-label",style:{fontSize:"10px",fill:"#999",fontWeight:"600"}},e.toDisplayString(Bt(i)),9,jr)]))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ko.value,(l,i)=>(e.openBlock(),e.createElementBlock("line",{key:`spider-axis-${i}`,x1:Ft.value,x2:l.x,y1:wt.value,y2:l.y,stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${i*100}ms`})},null,12,Kr))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",Gr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Jn.value,(l,i)=>(e.openBlock(),e.createElementBlock("text",{key:`spider-label-${i}`,x:l.x+Math.cos(i*2*Math.PI/Mn.value-Math.PI/2)*16,y:l.y+Math.sin(i*2*Math.PI/Mn.value-Math.PI/2)*16,"text-anchor":l.anchor,"dominant-baseline":l.baseline,"font-size":"14px",fill:"#666","font-weight":"500",style:e.normalizeStyle({animationDelay:`${i*120}ms`})},e.toDisplayString(l.text.charAt(0).toUpperCase()+l.text.slice(1)),13,Qr))),128))]),e.createElementVNode("g",{class:"dss-spider-data",onMousemove:na,onMouseleave:wn},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(nn.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-${i}`},[e.createElementVNode("polygon",{points:l.points,fill:l.color,"fill-opacity":fn("current",l,i),stroke:l.color,"stroke-width":l.isHighlighted?Fe.value+1:Fe.value,"stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":l.isHighlighted,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${i*Y.value}ms`,transition:"all 0.2s ease"})},null,14,Jr),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.dataPoints,(p,g)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-point-${i}-${g}`,cx:p.x,cy:p.y,r:X(l.isHighlighted?ft.value+1:ft.value>0?ft.value:0),fill:l.color,stroke:"none",class:e.normalizeClass({"dss-point-highlighted":l.isHighlighted,"dss-point-dimmed":l.isDimmed,"dss-point-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${i*Y.value+g*50}ms`,transition:"all 0.2s ease"}),onMouseover:b=>Rn(p,b),onMouseleave:wn},null,46,ei))),128))]))),128))],32)],8,Wr)):e.createCommentVNode("",!0),e.createElementVNode("g",ti,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ho.value,(l,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`logo-fallback-${i}`,cx:l.x,cy:l.y,r:X(l.width/2),fill:c(l.seriesIndex),stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass(`logo-fallback-${i}`),style:e.normalizeStyle({animationDelay:`${i*200}ms`})},null,14,li))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ho.value,(l,i)=>(e.openBlock(),e.createElementBlock("image",{key:`logo-${i}`,x:l.x-l.width/2,y:l.y-l.height/2,width:l.width,height:l.height,"xlink:href":l.url,onLoad:p=>va(i),onError:p=>ga(i),preserveAspectRatio:"xMidYMid slice",class:e.normalizeClass(`dss-logo-image-${i}`),"clip-path":`circle(${l.width/2}px at ${l.width/2}px ${l.height/2}px)`,style:e.normalizeStyle({animationDelay:`${i*200}ms`})},null,46,ni))),128))])],8,Ls))]),an.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-chart-watermark",style:e.normalizeStyle({position:"absolute",top:"0px",left:"0px",width:xe.value+"px",height:ee.value+"px",backgroundImage:`url('${D.value}')`,backgroundRepeat:"no-repeat",...Fl.value,opacity:Tl.value,pointerEvents:"none",zIndex:10})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(gn.value,(l,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:"marker-"+l.id,class:"dss-chart-marker",style:e.normalizeStyle({position:"absolute",left:l.x+"px",top:l.y+"px",width:Al.value+"px",height:Al.value+"px",backgroundColor:"#fafafa",borderRadius:"50%",border:"2px solid #ddd",cursor:"pointer",zIndex:500}),onClick:e.withModifiers(p=>y(l),["stop"]),onMouseenter:p=>To(l,p),onMouseleave:jo},[e.createElementVNode("img",{src:cn(l),class:"dss-marker-icon",alt:"Marker Icon",style:{width:"100%",height:"100%","object-fit":"contain","border-radius":"50%","pointer-events":"none"}},null,8,ai)],44,oi)),[[e.vShow,dl.value]])),128)),ml.value.show?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-marker-tooltip",style:e.normalizeStyle({left:ml.value.x+"px",top:ml.value.y+"px"})},[e.createElementVNode("div",si,e.toDisplayString(ml.value.categoryValue),1),ml.value.description?(e.openBlock(),e.createElementBlock("div",ri,e.toDisplayString(ml.value.description),1)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),Ue.value&&(kt.value.show||Ke.value&&st.value.show&&!oe.value.isZooming)?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["dss-chart-tooltip",{"dss-crosshair-tooltip":Ke.value&&st.value.show&&!oe.value.isZooming,"dss-spider-tooltip":Ll.value&&kt.value.spiderAreas&&kt.value.spiderAreas.length>0}]),style:e.normalizeStyle(ha.value)},[!Ke.value||!st.value.show||oe.value.isZooming?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[Ll.value&&kt.value.spiderAreas&&kt.value.spiderAreas.length>0?(e.openBlock(),e.createElementBlock("div",ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(kt.value.spiderAreas,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`spider-tooltip-area-${i}`,class:"dss-spider-tooltip-area"},[e.createElementVNode("div",ci,[e.createElementVNode("span",{class:"dss-spider-tooltip-area-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createTextVNode(" "+e.toDisplayString(l.seriesName),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.points,(p,g)=>(e.openBlock(),e.createElementBlock("div",{key:`spider-tooltip-point-${i}-${g}`,class:"dss-tooltip-series"},[e.createElementVNode("span",ui,e.toDisplayString(p.label),1),e.createElementVNode("span",di,e.toDisplayString(p.value),1)]))),128))]))),128))])):jt.value&&kt.value.bubbleData&&kt.value.bubbleData.length>0?(e.openBlock(),e.createElementBlock("div",mi,[kt.value.title?(e.openBlock(),e.createElementBlock("div",pi,e.toDisplayString(kt.value.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",fi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(kt.value.bubbleData,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`bubble-tooltip-${i}`,class:"dss-bubble-tooltip-item"},e.toDisplayString(l.value),1))),128))])])):(e.openBlock(),e.createElementBlock("div",vi,[e.createElementVNode("div",gi,e.toDisplayString(kt.value.title),1),e.createElementVNode("div",hi,e.toDisplayString(kt.value.value),1)])),kt.value.categoryIndex!==void 0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[yl(kt.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",yi,[a[5]||(a[5]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",ki,e.toDisplayString(e.unref(M)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(yl(kt.value.categoryIndex).flagGroups,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-flag-group-${i}`},[e.createElementVNode("div",Ci,[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createElementVNode("span",null,e.toDisplayString(l.type),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.flags,(p,g)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-flag-${i}-${g}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",bi,[e.createElementVNode("div",wi,e.toDisplayString(p.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),yl(kt.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",xi,[a[6]||(a[6]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Ei,e.toDisplayString(e.unref(M)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(yl(kt.value.categoryIndex).markers,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-marker-${i}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createElementVNode("div",Si,[e.createElementVNode("div",Vi,e.toDisplayString(l.title),1),l.description?(e.openBlock(),e.createElementBlock("div",Ni,e.toDisplayString(l.description),1)):e.createCommentVNode("",!0)])]))),128))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Bi,[e.createElementVNode("div",Mi,e.toDisplayString(jt.value?bn():H.categories[st.value.categoryIndex]||`Category ${st.value.categoryIndex+1}`),1),jt.value?(e.openBlock(),e.createElementBlock("div",_i,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(st.value.data,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${i}`,class:"dss-bubble-tooltip-item"},e.toDisplayString(l.value),1))),128))])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(st.value.data,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${i}`,class:"dss-tooltip-series"},[e.createElementVNode("div",{class:"dss-tooltip-series-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createElementVNode("span",$i,e.toDisplayString(l.seriesName)+":",1),e.createElementVNode("span",Li,e.toDisplayString(Wt(l.value)),1)]))),128))]),yl(st.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",Ai,[a[7]||(a[7]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Ti,e.toDisplayString(e.unref(M)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(yl(st.value.categoryIndex).flagGroups,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-flag-group-${i}`},[e.createElementVNode("div",Di,[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createElementVNode("span",null,e.toDisplayString(l.type),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.flags,(p,g)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-flag-${i}-${g}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",Hi,[e.createElementVNode("div",Ri,e.toDisplayString(p.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),yl(st.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",Fi,[a[8]||(a[8]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Ii,e.toDisplayString(e.unref(M)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(yl(st.value.categoryIndex).markers,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-dss-marker-${i}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createElementVNode("div",zi,[e.createElementVNode("div",Pi,e.toDisplayString(l.title),1),l.description?(e.openBlock(),e.createElementBlock("div",Oi,e.toDisplayString(l.description),1)):e.createCommentVNode("",!0)])]))),128))])):e.createCommentVNode("",!0)],64))],6)):e.createCommentVNode("",!0),Sl.value&&et.value&&oe.value.scale>1?(e.openBlock(),e.createElementBlock("div",{key:4,class:"dss-zoom-indicator",onClick:uo},[a[9]||(a[9]=e.createElementVNode("span",{style:{display:"inline-block",transform:"scaleX(-1)","font-size":"14px"}},"⌕",-1)),e.createTextVNode(" "+e.toDisplayString(Math.round(oe.value.scale*100))+"% "+e.toDisplayString(e.unref(M)("chart.zoom.doubleClickToReset")),1)])):e.createCommentVNode("",!0)],46,Cs),K.value&&ye.value==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dss-chart-legend",{"dss-legend-horizontal":Be.value==="horizontal","dss-legend-vertical":Be.value==="vertical","dss-legend-bottom":!0}]),style:{display:"flex","flex-wrap":"wrap","justify-content":"center",padding:"6px 8px 0"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.series,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-bottom-${i}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":at.value.has(i),"dss-legend-hovered":de.value===i,"dss-legend-dimmed":de.value!==null&&de.value!==i}]),onClick:p=>Ko(i),onMouseenter:p=>Il(i),onMouseleave:il,style:e.normalizeStyle({animationDelay:`${i*100}ms`})},[e.createElementVNode("div",{class:"dss-legend-color",style:e.normalizeStyle({backgroundColor:c(i)})},null,4),e.createElementVNode("span",Wi,e.toDisplayString(l.name),1)],46,qi))),128))],2)):e.createCommentVNode("",!0),vt.value.show?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-chart-context-menu",style:e.normalizeStyle({left:vt.value.x+"px",top:vt.value.y+"px"}),onClick:a[0]||(a[0]=e.withModifiers(()=>{},["stop"]))},[yt.value.addMarker?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-context-menu-item",onClick:ro},e.toDisplayString(e.unref(M)("chart.contextMenu.addMarker")),1)):e.createCommentVNode("",!0),yt.value.addMarker&&(yt.value.downloadSvg||yt.value.downloadPng||yt.value.downloadCsv||Mt.value.length>0)?(e.openBlock(),e.createElementBlock("div",Zi)):e.createCommentVNode("",!0),yt.value.downloadSvg?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-context-menu-item",onClick:_l},e.toDisplayString(e.unref(M)("chart.contextMenu.downloadSvg")),1)):e.createCommentVNode("",!0),yt.value.downloadPng?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-context-menu-item",onClick:Hl},e.toDisplayString(e.unref(M)("chart.contextMenu.downloadPng")),1)):e.createCommentVNode("",!0),yt.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",{key:4,class:"dss-context-menu-item",onClick:ql},e.toDisplayString(e.unref(M)("chart.contextMenu.downloadCsv")),1)):e.createCommentVNode("",!0),Mt.value.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[yt.value.downloadSvg||yt.value.downloadPng||yt.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",Ui)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Mt.value,(l,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"custom-"+i},[l.separator?(e.openBlock(),e.createElementBlock("div",Xi)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(Xn(l)),style:e.normalizeStyle(Yn(l)),onClick:p=>En(l)},[l.template?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:pl(l),class:"dss-custom-menu-content"},null,8,ji)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[l.icon?(e.openBlock(),e.createElementBlock("span",Ki,e.toDisplayString(l.icon),1)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(l.label),1)],64))],14,Yi)],64))),128))],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),Ae.value.show?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-marker-modal-overlay",onClick:At},[e.createElementVNode("div",{class:"dss-marker-modal",onClick:a[3]||(a[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Gi,[e.createElementVNode("h3",null,e.toDisplayString(el.value?e.unref(M)("chart.modalMarker.viewMarker"):Bl.value?e.unref(M)("chart.modalMarker.editMarker"):e.unref(M)("chart.contextMenu.addMarker")),1),e.createElementVNode("button",{class:"dss-modal-close-btn",onClick:At},"×")]),e.createElementVNode("div",Qi,[e.createElementVNode("div",Ji,[e.createVNode(ta,{id:"dss-marker-date",mode:"single",modelValue:Ae.value.date,"onUpdate:modelValue":a[1]||(a[1]=l=>Ae.value.date=l),"min-date":so.value,"max-date":al.value,disabled:el.value},null,8,["modelValue","min-date","max-date","disabled"])]),e.createElementVNode("div",ec,[e.createElementVNode("label",tc,e.toDisplayString(e.unref(M)("chart.modalMarker.description")),1),el.value?(e.openBlock(),e.createElementBlock("div",lc,e.toDisplayString(Ae.value.description),1)):e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{key:1,id:"dss-marker-description","onUpdate:modelValue":a[2]||(a[2]=l=>Ae.value.description=l),placeholder:e.unref(M)("chart.modalMarker.placeholderDescription"),class:"dss-form-textarea",rows:"5"},null,8,nc)),[[e.vModelText,Ae.value.description]])])]),e.createElementVNode("div",oc,[e.createElementVNode("div",ac,[Bl.value&&!el.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-btn dss-btn-danger",onClick:Zl},e.toDisplayString(e.unref(M)("chart.modalMarker.deleteMarker")),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",sc,[e.createElementVNode("button",{class:"dss-btn dss-btn-secondary",onClick:At},e.toDisplayString(el.value?e.unref(M)("chart.modalMarker.close"):e.unref(M)("chart.modalMarker.cancel")),1),el.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-btn dss-btn-primary",onClick:kn,disabled:!(Ae.value.description&&Ae.value.description.length)},e.toDisplayString(Bl.value?e.unref(M)("chart.modalMarker.save"):e.unref(M)("chart.contextMenu.addMarker")),9,rc))])])])])):e.createCommentVNode("",!0)],64))}}),uc={class:"dss-modal-title"},dc={class:"dss-modal-actions"},ea={__name:"DSSModal",props:{showModal:{type:Boolean,required:!0},backDrop:{type:Boolean,default:!0},width:{type:String,default:"800px"},height:{type:String,default:"auto"},showCloseBtn:{type:Boolean,default:!0},headerType:{type:String,default:"space-between"},titleSize:{type:String,default:"24px"}},emits:["close-modal"],setup(H,{emit:ne}){const M=H,A=ne,ue=e.ref(null),I=e.ref(null),$=e.computed(()=>{const U={"max-width":M.width};return M.height!=="auto"&&(U.height=M.height,U["min-height"]="0"),U}),ve=e.computed(()=>({}));function ct(){A("close-modal")}function Q(){M.backDrop&&!ue.value&&A("close-modal")}function f(U){U.target.tagName==="INPUT"&&(ue.value=U.target.tagName)}function we(){setTimeout(()=>{ue.value=null},300)}function Ce(){const U=document.body,pe=document.documentElement;I.value={bodyOverflow:U.style.overflow,bodyPosition:U.style.position,bodyTop:U.style.top,bodyWidth:U.style.width,htmlOverflow:pe.style.overflow,scrollY:window.scrollY},U.style.overflow="hidden",U.style.position="fixed",U.style.top=`-${I.value.scrollY}px`,U.style.width="100%",U.style.left="0",pe.style.overflow="hidden"}function G(){if(!I.value)return;const U=document.body,pe=document.documentElement,{bodyOverflow:F,bodyPosition:Ee,bodyTop:De,bodyWidth:tt,htmlOverflow:pt,scrollY:W}=I.value;U.style.overflow=F||"",U.style.position=Ee||"",U.style.top=De||"",U.style.width=tt||"",U.style.left="",pe.style.overflow=pt||"",window.scrollTo(0,W||0)}return e.watch(()=>M.showModal,U=>{if(U)Ce(),document.body.classList.add("dss-modal-open"),setTimeout(()=>{const pe=document.getElementById("dss-modal-backdrop");pe&&(pe.addEventListener("focusin",f),pe.addEventListener("focusout",we))},100);else{G(),document.body.classList.remove("dss-modal-open");const pe=document.getElementById("dss-modal-backdrop");pe&&(pe.removeEventListener("focusin",f),pe.removeEventListener("focusout",we))}},{immediate:!0}),e.onUnmounted(()=>{M.showModal&&G()}),(U,pe)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[H.showModal?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-modal-backdrop",onClick:Q},[e.withDirectives(e.createElementVNode("div",{id:"dss-modal-backdrop",class:"dss-modal",style:e.normalizeStyle($.value)},[e.createElementVNode("div",{class:"dss-modal-content",onClick:pe[0]||(pe[0]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"dss-modal-header",style:e.normalizeStyle({"justify-content":H.headerType,"font-size":H.titleSize})},[e.createElementVNode("h1",uc,[e.renderSlot(U.$slots,"title",{},()=>[pe[1]||(pe[1]=e.createTextVNode("Default Title",-1))])]),e.renderSlot(U.$slots,"title-data"),H.showCloseBtn?(e.openBlock(),e.createElementBlock("span",{key:0,class:"dss-modal-close",onClick:ct,title:"Close"},"×")):e.createCommentVNode("",!0)],4),e.createElementVNode("div",{class:"dss-modal-body",style:e.normalizeStyle(ve.value)},[e.renderSlot(U.$slots,"content",{},()=>[pe[2]||(pe[2]=e.createTextVNode("Default Content",-1))])],4),e.createElementVNode("div",dc,[e.renderSlot(U.$slots,"actions")])])],4),[[e.vShow,H.showModal]])])):e.createCommentVNode("",!0)]))}},mc={key:0,class:"dss-table-toolbar"},pc={class:"dss-table-toolbar-left"},fc=["aria-expanded"],vc={class:"dss-pagination-select-dropdown",role:"listbox"},gc={class:"dss-table-column-visibility-label"},hc={class:"dss-table-checkbox-wrapper"},yc=["checked","onChange"],kc={key:0,class:"dss-table-checkbox__check","aria-hidden":"true"},Cc={class:"dss-table-column-visibility-text"},bc={class:"dss-table-toolbar-right"},wc=["placeholder","aria-label"],xc=["aria-label"],Ec=["aria-label","aria-expanded"],Sc={key:1,class:"dss-table-toolbar-extra"},Vc={class:"dss-table-thead"},Nc={key:0,class:"dss-table-th dss-table-selection-column"},Bc={key:0,class:"dss-table-checkbox-wrapper"},Mc=["checked","indeterminate"],_c={key:0,class:"dss-table-checkbox__indeterminate"},$c={key:1,class:"dss-table-checkbox__check","aria-hidden":"true"},Lc=["aria-label"],Ac=["onClick"],Tc={class:"dss-table-th-content"},Dc={class:"dss-table-th-text"},Hc={key:0},Rc={key:1},Fc={key:2},Ic=["data-filter-column-key","aria-expanded","aria-label","onClick"],zc={class:"dss-table-tbody"},Pc=["onClick"],Oc={class:"dss-table-checkbox-wrapper"},qc=["type","name","checked","disabled","onChange"],Wc={key:0,class:"dss-table-checkbox__check","aria-hidden":"true"},Zc={key:1,class:"dss-table-checkbox__dot"},Uc=["onClick"],Xc=["aria-expanded","aria-label"],Yc={key:1,class:"dss-table-expansion-placeholder","aria-hidden":"true"},jc={key:0,class:"dss-table-expansion-row"},Kc=["colspan"],Gc=["colspan"],Qc={key:1,class:"dss-table-pagination"},Jc={class:"dss-table-pagination-left"},eu={key:0},tu={key:1,class:"dss-table-pagination-placeholder","aria-hidden":"true"},lu={class:"dss-table-pagination-center"},nu={key:0,class:"dss-pagination-controls"},ou=["disabled","title"],au=["disabled","title"],su=["aria-label","onKeydown"],ru={class:"dss-pagination-of"},iu=["disabled","title"],cu=["disabled","title"],uu={class:"dss-table-pagination-right"},du={class:"dss-pagination-rows-label"},mu=["aria-expanded"],pu=["aria-selected","onClick"],fu={key:0,class:"dss-table-filter-row"},vu=["value","placeholder"],gu=["min","max","value"],hu=["min","max","value"],yu={class:"dss-table-filter-double-range-values"},ku={key:2,class:"dss-table-filter-daterange"},Cu={class:"dss-table-filter-daterange-row"},bu={class:"dss-table-filter-daterange-label"},wu=["value"],xu={class:"dss-table-filter-daterange-row"},Eu={class:"dss-table-filter-daterange-label"},Su=["value"],Vu=["value","placeholder"],Nu={class:"dss-table-filter-list"},Bu=["checked","onChange"],Mu={class:"dss-table-filter-actions"},_u={name:"DSSTable"},$u=Object.assign(_u,{props:{data:{type:Array,required:!0,default:()=>[]},columns:{type:Array,required:!0,default:()=>[]},tableId:{type:String,default:()=>"table-"+Math.random().toString(36).substring(2,9)},locale:{type:String,default:null},options:{type:Object,default:()=>({}),validator:H=>typeof H=="object"&&H!==null},columnVisibility:{type:Array,default:null}},emits:["row-click","row-select","row-unselect","select-all","unselect-all","row-expand","row-collapse","sort","page","download-pdf","download-excel","search","update:columnVisibility"],setup(H,{emit:ne}){const{t:M,locale:A}=lo.useI18n(),ue=H,I=ne,$={table:{width:"auto",height:null,rowHeight:"auto",truncated:!1,expandable:!1,expandableRowData:null,expandableRowCondition:null,striped:!1,bordered:!1,hoverable:!0,size:"default",align:"left"},title:{text:""},subtitle:{text:""},selection:{enabled:!1,mode:"single",rowCondition:null},sorting:{enabled:!0,mode:"single"},pagination:{enabled:!1,rows:10,rowsPerPageOptions:[5,10,25,50,100],showCounter:!0,showControlsGroup:!0,showControls:!0,showRowsPerPage:!0},toolbar:{downloads:{pdf:!0,excel:!0},columnVisibility:!0,search:!0},scrollable:!1,emptyMessage:null};function ve(y,h){const x=Object.assign({},y);return ct(y)&&ct(h)&&Object.keys(h).forEach(q=>{ct(h[q])?q in y?x[q]=ve(y[q],h[q]):Object.assign(x,{[q]:h[q]}):Object.assign(x,{[q]:h[q]})}),x}function ct(y){return y&&typeof y=="object"&&!Array.isArray(y)}const Q=e.computed(()=>ve($,ue.options)),f=e.computed(()=>{const y=Q.value.table.width;return y==="auto"?null:typeof y=="number"?y:null}),we=e.computed(()=>Q.value.table.height),Ce=e.computed(()=>Q.value.table.rowHeight??"auto"),G=e.computed(()=>({height:Ce.value})),U=e.computed(()=>Q.value.table.expandable===!0),pe=e.computed(()=>Q.value.table.expandableRowData??null),F=e.computed(()=>Q.value.table.expandableRowCondition??null),Ee=e.computed(()=>Q.value.table.truncated===!0),De=e.computed(()=>Q.value.table.striped),tt=e.computed(()=>Q.value.table.bordered),pt=e.computed(()=>Q.value.table.hoverable),W=e.computed(()=>Q.value.table.size),Ze=e.computed(()=>Q.value.table.align||"left");e.computed(()=>Q.value.title.text),e.computed(()=>Q.value.subtitle.text);const qe=e.computed(()=>Q.value.selection.enabled),xe=e.computed(()=>Q.value.selection.mode),Me=e.computed(()=>Q.value.selection.rowCondition??null),Ye=e.computed(()=>Q.value.sorting.enabled),ee=e.computed(()=>Q.value.sorting.mode),lt=e.computed(()=>Q.value.pagination.enabled),be=e.computed(()=>Q.value.pagination.rows),Je=e.computed(()=>Q.value.pagination.rowsPerPageOptions),ut=e.computed(()=>Q.value.pagination.showCounter!==!1),Ct=e.computed(()=>Q.value.pagination.showControlsGroup),Et=e.computed(()=>Ct.value===!1?!1:Q.value.pagination.showControls!==!1),Ht=e.computed(()=>Ct.value===!1?!1:Q.value.pagination.showRowsPerPage!==!1),Pt=e.computed(()=>lt.value&&(ut.value||Et.value||Ht.value)),se=e.computed(()=>Q.value.scrollable),ge=e.computed(()=>Q.value.emptyMessage||M("table.emptyMessage")),He=e.computed(()=>Q.value.toolbar?.downloads?.pdf!==!1),_e=e.computed(()=>Q.value.toolbar?.downloads?.excel!==!1),Xt=e.computed(()=>Q.value.toolbar?.search!==!1),bt=e.computed(()=>He.value||_e.value||Xt.value||Gt.value),Gt=e.computed(()=>Q.value.toolbar?.columnVisibility!==!1),Lt=e.ref(""),qt=e.ref(!1),K=e.ref(null);let ye=null;function Be(){qt.value?(ye&&(clearTimeout(ye),ye=null),qt.value=!1,Lt.value="",I("search",""),K.value?.blur()):(qt.value=!0,ye=setTimeout(()=>{ye=null,K.value?.focus()},80))}function Ue(){Lt.value||(qt.value=!1)}function Ke(){Lt.value="",I("search",""),K.value?.focus()}const Tt=e.computed(()=>({"dss-table-striped":De.value,"dss-table-bordered":tt.value,"dss-table-hoverable":pt.value,[`dss-table-${W.value}`]:W.value!=="default","dss-table-truncated":Ee.value})),et=(y,h)=>y?.field??y?.key??h,Ot=e.ref(new Set);function We(){const y=new Set;return ue.columns.forEach((h,x)=>{h?.hidden!==!0&&y.add(et(h,x))}),y}function Fe(){const y=new Set;return ue.columns.forEach((h,x)=>{y.add(et(h,x))}),y}function xt(y){if(!Array.isArray(y))return null;const h=Fe(),x=[];return y.forEach(q=>{h.has(q)&&x.push(q)}),x}function ft(){Ot.value=We()}const J=e.computed(()=>{const y=xt(ue.columnVisibility);return y===null?null:new Set(y)}),Z=e.computed(()=>J.value??Ot.value),X=e.computed(()=>ue.columns.filter((y,h)=>Z.value.has(et(y,h)))),re=y=>{const h=ue.columns.findIndex(x=>x===y);return et(y,h>=0?h:0)},fe=(y,h)=>Z.value.has(et(y,h));function Ge(y){I("update:columnVisibility",Array.from(y))}function Nt(y,h){const x=et(y,h),q=new Set(Z.value);q.has(x)?q.delete(x):q.add(x),J.value===null&&(Ot.value=q),Ge(q)}const rl=e.ref(null),St=e.ref(!1);function ll(y){rl.value&&!rl.value.contains(y.target)&&(St.value=!1)}const S=e.computed(()=>X.value.length+(qe.value?1:0)+(U.value?1:0)),C=(y,h)=>y?.id??y?.key??h,V=e.ref(new Set),Y=e.ref(null),le=(y,h)=>V.value.has(C(y,h)),ze=(y,h)=>{if(!U.value)return!1;if(typeof F.value=="function")return!!F.value(y,h);if(typeof pe.value=="string"&&pe.value.trim()){const x=At(y,pe.value.trim());return Array.isArray(x)?x.length>0:x&&typeof x=="object"?Object.keys(x).length>0:x!=null&&x!==""}return!0},gt=(y,h,x)=>{if(x&&x.stopPropagation(),!ze(y,h))return;const q=C(y,h),ie=new Set(V.value);ie.has(q)?(ie.delete(q),I("row-collapse",{data:y,index:h})):(ie.add(q),I("row-expand",{data:y,index:h})),V.value=ie},rt=(y,h)=>{if(!Ee.value)return;const x=C(y,h);Y.value!==x&&(Y.value=x)},Oe=e.ref(null),Bt=e.ref(0),Vt=e.ref([]),ht=y=>{if(ee.value==="single")return Oe.value===y.field?Bt.value:0;{const h=Vt.value.find(x=>x.field===y.field);return h?h.order:0}},yt=y=>{const h=ht(y);return{"dss-sort-active":h!==0,"dss-sort-asc":h===1,"dss-sort-desc":h===-1}},Mt=e.ref({}),_t=e.ref(null),hl=e.ref(null),Al=220,on=e.ref(null),Wt=e.computed(()=>X.value.find(y=>re(y)===_t.value)??null),dl=e.computed(()=>{if(!Wt.value||Wt.value.filter!=="range")return null;const y=Wt.value,h=_t.value,{min:x,max:q}=ce(y),ie=y.filterMin??x,mt=y.filterMax??q,Rt=Tl(h),_l=Rt.min??ie,Hl=Rt.max??mt,ql=mt-ie,En=ql===0?0:(_l-ie)/ql*100,ro=ql===0?100:(Hl-ie)/ql*100;return{rangeMin:ie,rangeMax:mt,currentMin:_l,currentMax:Hl,minPct:En,maxPct:ro}}),vn=e.ref(null),gn=e.ref("max");function an(y){const h=vn.value,x=dl.value;if(!h||!x)return;const q=h.getBoundingClientRect(),mt=(y.clientX-q.left)/q.width*100,Rt=(x.minPct+x.maxPct)/2;gn.value=mt<Rt?"min":"max"}function Tl(y){return Mt.value[y]??{}}function El(y,h){Mt.value={...Mt.value,[y]:h}}function xn(y){const h=Mt.value[y];return h?h.type==="string"?!!h.value?.trim():h.type==="range"?h.min!=null||h.max!=null:h.type==="dateRange"?!!(h.from||h.to):h.type==="list"?h.selected?.length>0:!1:!1}function sn(y){const h={...Mt.value};delete h[y],Mt.value=h,_t.value=null,hl.value=null}function Fl(){if(!_t.value){hl.value=null;return}const y=on.value;if(!y)return;const h=y.querySelector(`.dss-table-filter-trigger[data-filter-column-key="${_t.value}"]`);if(!h)return;const x=h.getBoundingClientRect();hl.value={top:x.bottom+6,left:Math.max(8,x.right-Al)}}const Gl=e.computed(()=>{const y=String(Lt.value??"").trim().toLowerCase();return y?ue.data.filter(h=>X.value.some(x=>Ql(kn(h,x)).some(ie=>String(ie).toLowerCase().includes(y)))):ue.data}),yl=e.computed(()=>{let y=[...Gl.value];const h=(Lt.value??"").trim().toLowerCase();return h&&(y=y.filter(x=>ue.columns.some(q=>{if(!q||!q.field)return!1;const ie=kn(x,q);return String(ie??"").toLowerCase().includes(h)}))),X.value.forEach(x=>{const q=re(x),ie=Mt.value[q];if(!ie)return;const mt=x.field;if(mt){if(ie.type==="string"&&ie.value?.trim()){const Rt=ie.value.trim().toLowerCase();y=y.filter(_l=>{const Hl=kn(_l,x);return String(Hl??"").toLowerCase().includes(Rt)})}else if(ie.type==="range")y=y.filter(Rt=>{const _l=At(Rt,mt),Hl=Number(_l);return!(Number.isNaN(Hl)||ie.min!=null&&Hl<ie.min||ie.max!=null&&Hl>ie.max)});else if(ie.type==="dateRange"){const Rt=ie.from?new Date(ie.from).getTime():null,_l=ie.to?new Date(ie.to).getTime():null;y=y.filter(Hl=>{const ql=At(Hl,mt),En=ql?new Date(ql).getTime():NaN;return!(Number.isNaN(En)||Rt!=null&&En<Rt||_l!=null&&En>_l)})}else if(ie.type==="list"&&ie.selected?.length){const Rt=new Set(ie.selected);y=y.filter(_l=>Ql(kn(_l,x)).some(ql=>Rt.has(ql)))}}}),y});function Ql(y){if(y==null)return[""];if(Array.isArray(y))return y.flatMap(Ql);if(typeof y=="object"){const h=y?.label??y?.name??y?.value??y?.title;return[h!=null?String(h):String(y)]}return[String(y)]}function D(y){const h=new Set;return ue.data.forEach(x=>{Ql(kn(x,y)).forEach(ie=>h.add(ie))}),Array.from(h).sort((x,q)=>String(x).localeCompare(String(q)))}function O(y,h){if(_t.value===y){_t.value=null,hl.value=null;return}if(_t.value=y,h?.currentTarget){const x=h.currentTarget.getBoundingClientRect();hl.value={top:x.bottom+6,left:Math.max(8,x.right-Al)}}else Fl()}function _(y,h){El(y,{type:"string",value:h})}function ce(y){const h=y.field;if(!h)return{min:0,max:100};let x=1/0,q=-1/0;return ue.data.forEach(ie=>{const mt=At(ie,h),Rt=Number(mt);Number.isNaN(Rt)||(x=Math.min(x,Rt),q=Math.max(q,Rt))}),{min:x===1/0?0:x,max:q===-1/0?100:q}}function $e(y,h,x){const q={...Tl(y),type:"range"},ie=x===""?null:Number(x),mt=ie===null||Number.isNaN(ie)?null:ie;q[h]=mt,mt!=null&&(h==="min"&&q.max!=null&&mt>q.max&&(q.max=mt),h==="max"&&q.min!=null&&mt<q.min&&(q.min=mt)),El(y,q)}function dt(y,h,x){const q={...Tl(y),type:"dateRange"};q[h]=x||"",El(y,q)}const Qe=e.reactive({});function ot(y,h){Qe[y]=h}function Dt(y){const h=re(y),x=(Qe[h]??"").trim().toLowerCase(),q=D(y);return x?q.filter(ie=>String(ie).toLowerCase().includes(x)):q}function nl(y,h){return(Tl(y).selected??[]).includes(h!=null?String(h):"")}function Dl(y,h){const q=[...Tl(y).selected??[]],ie=h!=null?String(h):"",mt=q.indexOf(ie);mt>=0?q.splice(mt,1):q.push(ie),El(y,{type:"list",selected:q})}function Nl(y){_t.value&&!y.target.closest(".dss-table-filter-wrap")&&!y.target.closest(".dss-table-filter-dropdown")&&(_t.value=null,hl.value=null)}function Ol(){Fl(),ol.value&&st()}const $n=y=>{if(!(y.sortable===!1||!Ye.value))if(ee.value==="single")Oe.value===y.field?Bt.value=Bt.value===1?-1:Bt.value===-1?0:1:(Oe.value=y.field,Bt.value=1),Bt.value===0&&(Oe.value=null),I("sort",{field:Oe.value,order:Bt.value});else{const h=Vt.value.findIndex(x=>x.field===y.field);h>=0?Vt.value[h].order===1?Vt.value[h].order=-1:Vt.value.splice(h,1):Vt.value.push({field:y.field,order:1}),I("sort",{multiSortMeta:Vt.value})}},Jl=e.computed(()=>{if(!Ye.value)return yl.value;let y=[...yl.value];return ee.value==="single"&&Oe.value&&Bt.value!==0?y.sort((h,x)=>{const q=At(h,Oe.value),ie=At(x,Oe.value);return q===ie?0:q==null?1:ie==null?-1:(q<ie?-1:q>ie?1:0)*Bt.value}):ee.value==="multiple"&&Vt.value.length>0&&y.sort((h,x)=>{for(const q of Vt.value){const ie=At(h,q.field),mt=At(x,q.field);if(ie===mt)continue;if(ie==null)return 1;if(mt==null)return-1;const Rt=ie<mt?-1:ie>mt?1:0;if(Rt!==0)return Rt*q.order}return 0}),y}),kl=e.ref(0),Qt=e.ref(be.value),ol=e.ref(!1),rn=e.ref(null),at=e.ref(null),de=e.ref("bottom"),hn=e.ref(null),kt=y=>{Qt.value=y,ol.value=!1,kl.value=0,I("page",{page:0,rows:Qt.value})};function ml(y){rn.value&&!rn.value.contains(y.target)&&(ol.value=!1)}function st(){const y=rn.value,h=at.value;if(!y||!h)return;const x=y.querySelector(".dss-pagination-select-dropdown");if(!x)return;const q=h.getBoundingClientRect(),ie=x.offsetHeight||0,Rt=(window.innerHeight||document.documentElement.clientHeight)-q.bottom,_l=q.top;de.value=Rt<ie+8&&_l>Rt?"top":"bottom",hn.value={width:`${Math.ceil(q.width)}px`,left:`${Math.max(0,Math.round(h.offsetLeft))}px`}}const vt=e.computed(()=>Jl.value.length),oe=e.computed(()=>Math.ceil(vt.value/Qt.value)),Yt=e.computed(()=>Math.max(oe.value,1)),Ae=e.computed(()=>vt.value===0?0:al.value+1),so=e.computed(()=>Bl.value),al=e.computed(()=>lt.value?kl.value*Qt.value:0),Bl=e.computed(()=>lt.value?Math.min((kl.value+1)*Qt.value,vt.value):vt.value),el=e.computed(()=>{if(!lt.value)return Jl.value;const y=al.value,h=Bl.value;return Jl.value.slice(y,h)}),Il=e.ref(new Set),il=e.computed(()=>Jl.value.filter((y,h)=>Il.value.has(C(y,h)))),zl=(y,h)=>{const x=Me.value;return typeof x!="function"?!0:!!x(y,h)},In=e.computed(()=>Jl.value.map((y,h)=>({row:y,index:h})).filter(({row:y,index:h})=>zl(y,h))),Ln=e.computed(()=>{const y=In.value;return y.length===0?!1:y.every(({row:h,index:x})=>Il.value.has(C(h,x)))}),Wl=e.computed(()=>{const y=In.value;if(y.length===0)return!1;const h=y.filter(({row:x,index:q})=>Il.value.has(C(x,q))).length;return h>0&&h<y.length}),pl=(y,h)=>Il.value.has(C(y,h)),Xn=()=>{if(Ln.value)Il.value=new Set,I("unselect-all");else{const y=new Set;In.value.forEach(({row:h,index:x})=>y.add(C(h,x))),Il.value=y,I("select-all",il.value)}},Yn=(y,h)=>{if(!zl(y,h))return;const x=C(y,h),q=new Set(Il.value),ie=q.has(x);xe.value==="single"?ie?(q.delete(x),I("row-unselect",y)):(q.clear(),q.add(x),I("row-select",y)):ie?(q.delete(x),I("row-unselect",y)):(q.add(x),I("row-select",y)),Il.value=q},cn=e.ref("1"),zn=()=>{const y=Number.parseInt(String(cn.value),10);if(!Number.isFinite(y)){cn.value=String(kl.value+1);return}const h=Math.min(Yt.value,Math.max(1,y));h!==kl.value+1?yn(h-1):cn.value=String(h)},yn=y=>{y<0||y>=oe.value||(kl.value=y,I("page",{page:y,rows:Qt.value}))},Ml=(y,h,x)=>{I("row-click",{data:y,index:h,originalEvent:x}),rt(y,al.value+h)},Pn=(y,h)=>{const x=al.value+h;return{"dss-table-row-selected":pl(y,x),"dss-table-row-even":h%2===0,"dss-table-row-odd":h%2!==0,"dss-table-row-truncated-clickable":Ee.value,"dss-table-row-truncated-expanded":Y.value===C(y,x)}},kn=(y,h)=>h.field?At(y,h.field):"",At=(y,h)=>h.split(".").reduce((x,q)=>x&&x[q],y),Zl=y=>{const h=y.align??Ze.value;return{"dss-table-sortable":y.sortable!==!1&&Ye.value,"dss-table-align-left":h==="left","dss-table-align-center":h==="center","dss-table-align-right":h==="right",[y.className]:y.className}},un=y=>{const h={};return y.width&&(h.width=typeof y.width=="number"?`${y.width}px`:y.width),y.minWidth&&(h.minWidth=typeof y.minWidth=="number"?`${y.minWidth}px`:y.minWidth),y.maxWidth&&(h.maxWidth=typeof y.maxWidth=="number"?`${y.maxWidth}px`:y.maxWidth),h};return e.watch(()=>ue.locale,y=>{y&&y!==A.value&&(A.value=y)},{immediate:!0}),e.watch(be,y=>{Qt.value=y,kl.value=0}),e.watch(ol,async y=>{y&&(await e.nextTick(),st())}),e.watch(kl,y=>{cn.value=String(y+1)},{immediate:!0}),e.watch(Lt,y=>{I("search",y??"")}),e.watch(()=>ue.columns,()=>{if(J.value===null){ft();return}const y=xt(ue.columnVisibility)??[];y.length!==ue.columnVisibility.length&&I("update:columnVisibility",y)},{immediate:!0,deep:!0}),e.onMounted(()=>{document.addEventListener("click",ml),document.addEventListener("click",ll),document.addEventListener("click",Nl),window.addEventListener("resize",Ol),window.addEventListener("scroll",Ol,!0)}),e.onUnmounted(()=>{document.removeEventListener("click",ml),document.removeEventListener("click",ll),document.removeEventListener("click",Nl),window.removeEventListener("resize",Ol),window.removeEventListener("scroll",Ol,!0)}),(y,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"dss-table-container",ref_key:"tableContainerRef",ref:on,style:e.normalizeStyle({width:f.value+"px",height:we.value?we.value+"px":"auto"})},[bt.value?(e.openBlock(),e.createElementBlock("div",mc,[e.createElementVNode("div",pc,[He.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-table-toolbar-btn",onClick:h[0]||(h[0]=x=>I("download-pdf"))},[h[22]||(h[22]=e.createStaticVNode('<span class="dss-table-toolbar-btn-icon" aria-hidden="true"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_download)"><path d="M16.59 9H15V4C15 3.45 14.55 3 14 3H10C9.45 3 9 3.45 9 4V9H7.41C6.52 9 6.07 10.08 6.7 10.71L11.29 15.3C11.68 15.69 12.31 15.69 12.7 15.3L17.29 10.71C17.92 10.08 17.48 9 16.59 9ZM5 19C5 19.55 5.45 20 6 20H18C18.55 20 19 19.55 19 19C19 18.45 18.55 18 18 18H6C5.45 18 5 18.45 5 19Z" fill="currentColor"></path></g><defs><clipPath id="clip0_download"><rect width="24" height="24" fill="white"></rect></clipPath></defs></svg></span>',1)),e.createTextVNode(" "+e.toDisplayString(e.unref(M)("table.downloadPdf")),1)])):e.createCommentVNode("",!0),_e.value?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"dss-table-toolbar-btn",onClick:h[1]||(h[1]=x=>I("download-excel"))},[h[23]||(h[23]=e.createStaticVNode('<span class="dss-table-toolbar-btn-icon" aria-hidden="true"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_download_excel)"><path d="M16.59 9H15V4C15 3.45 14.55 3 14 3H10C9.45 3 9 3.45 9 4V9H7.41C6.52 9 6.07 10.08 6.7 10.71L11.29 15.3C11.68 15.69 12.31 15.69 12.7 15.3L17.29 10.71C17.92 10.08 17.48 9 16.59 9ZM5 19C5 19.55 5.45 20 6 20H18C18.55 20 19 19.55 19 19C19 18.45 18.55 18 18 18H6C5.45 18 5 18.45 5 19Z" fill="currentColor"></path></g><defs><clipPath id="clip0_download_excel"><rect width="24" height="24" fill="white"></rect></clipPath></defs></svg></span>',1)),e.createTextVNode(" "+e.toDisplayString(e.unref(M)("table.downloadExcel")),1)])):e.createCommentVNode("",!0),Gt.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-table-toolbar-column-visibility",ref_key:"columnVisibilityDropdownRef",ref:rl},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-pagination-select-trigger",{"dss-pagination-select-open":St.value}]),onClick:h[2]||(h[2]=x=>St.value=!St.value),"aria-expanded":St.value,"aria-haspopup":"listbox"},[e.createTextVNode(e.toDisplayString(e.unref(M)("table.columnVisibility"))+" ",1),h[24]||(h[24]=e.createElementVNode("span",{class:"dss-pagination-select-chevron","aria-hidden":"true"},"▼",-1))],10,fc),e.createVNode(e.Transition,{name:"dss-dropdown"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("ul",vc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.columns,(x,q)=>(e.openBlock(),e.createElementBlock("li",{key:et(x,q),role:"option",class:"dss-table-column-visibility-option",onClick:h[3]||(h[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("label",gc,[e.createElementVNode("span",hc,[e.createElementVNode("input",{type:"checkbox",checked:fe(x,q),onChange:ie=>Nt(x,q),class:"dss-table-checkbox dss-table-checkbox--checkbox"},null,40,yc),fe(x,q)?(e.openBlock(),e.createElementBlock("span",kc,[...h[25]||(h[25]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",preserveAspectRatio:"xMidYMid meet",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4.82415 9.75587C4.46867 10.0814 3.89442 10.0814 3.53893 9.75587L0.266616 6.75952C-0.088872 6.43401 -0.088872 5.90819 0.266616 5.58268C0.622104 5.25717 1.19635 5.25717 1.55184 5.58268L4.17698 7.98644L10.4482 2.24413C10.8036 1.91862 11.3779 1.91862 11.7334 2.24413C12.0889 2.56964 12.0889 3.09546 11.7334 3.42097L4.82415 9.75587Z","stroke-width":"1.2",stroke:"currentColor",fill:"currentColor"})],-1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("span",Cc,e.toDisplayString(x.header),1)])]))),128))],512),[[e.vShow,St.value]])]),_:1})],512)):e.createCommentVNode("",!0)]),e.createElementVNode("div",bc,[Xt.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dss-table-toolbar-search",{"dss-table-toolbar-search--expanded":qt.value||Lt.value}])},[e.withDirectives(e.createElementVNode("input",{ref_key:"searchInputRef",ref:K,"onUpdate:modelValue":h[4]||(h[4]=x=>Lt.value=x),type:"text",class:"dss-table-toolbar-search-input",placeholder:e.unref(M)("table.searchPlaceholder"),"aria-label":e.unref(M)("table.searchTableAriaLabel"),onFocus:h[5]||(h[5]=x=>qt.value=!0),onBlur:Ue},null,40,wc),[[e.vModelText,Lt.value]]),Lt.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-table-toolbar-search-clear","aria-label":e.unref(M)("table.clearSearchAriaLabel"),onClick:Ke},[...h[26]||(h[26]=[e.createElementVNode("span",{"aria-hidden":"true"},"×",-1)])],8,xc)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"dss-table-toolbar-search-trigger","aria-label":e.unref(M)("table.searchAriaLabel"),"aria-expanded":qt.value||!!Lt.value,onMousedown:e.withModifiers(Be,["prevent"])},[...h[27]||(h[27]=[e.createElementVNode("span",{class:"dss-table-toolbar-search-icon","aria-hidden":"true"},[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4.81738 0C7.47741 0.000327759 9.63379 2.09488 9.63379 4.67773C9.63366 5.68756 9.30172 6.62133 8.74121 7.38574L11.2324 9.80469C11.653 10.213 11.6528 10.8885 11.2324 11.2969C10.829 11.6886 10.1866 11.6886 9.7832 11.2969L7.16895 8.75781C6.47333 9.13671 5.67174 9.35439 4.81738 9.35449C2.15724 9.35449 -0.000652839 7.26049 -0.000976562 4.67773C-0.000976562 2.09468 2.15704 0 4.81738 0ZM4.81738 1.41895C2.96425 1.41895 1.46213 2.87754 1.46191 4.67676C1.46202 6.47611 2.96418 7.93555 4.81738 7.93555C6.67025 7.93519 8.17275 6.47589 8.17285 4.67676C8.17263 2.87776 6.67018 1.4193 4.81738 1.41895Z",fill:"currentColor"})])],-1)])],40,Ec)],2)):e.createCommentVNode("",!0),y.$slots["toolbar-extra"]?(e.openBlock(),e.createElementBlock("div",Sc,[e.renderSlot(y.$slots,"toolbar-extra")])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["dss-table-wrapper",{"dss-table-scrollable":se.value}])},[e.createElementVNode("table",{class:e.normalizeClass(["dss-table",Tt.value])},[e.createElementVNode("thead",Vc,[e.createElementVNode("tr",null,[qe.value?(e.openBlock(),e.createElementBlock("th",Nc,[xe.value==="multiple"?(e.openBlock(),e.createElementBlock("span",Bc,[e.createElementVNode("input",{type:"checkbox",checked:Ln.value,indeterminate:Wl.value,onChange:Xn,class:"dss-table-checkbox dss-table-checkbox--checkbox"},null,40,Mc),Wl.value?(e.openBlock(),e.createElementBlock("span",_c)):Ln.value?(e.openBlock(),e.createElementBlock("span",$c,[...h[28]||(h[28]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",preserveAspectRatio:"xMidYMid meet",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4.82415 9.75587C4.46867 10.0814 3.89442 10.0814 3.53893 9.75587L0.266616 6.75952C-0.088872 6.43401 -0.088872 5.90819 0.266616 5.58268C0.622104 5.25717 1.19635 5.25717 1.55184 5.58268L4.17698 7.98644L10.4482 2.24413C10.8036 1.91862 11.3779 1.91862 11.7334 2.24413C12.0889 2.56964 12.0889 3.09546 11.7334 3.42097L4.82415 9.75587Z","stroke-width":"1.2",stroke:"currentColor",fill:"currentColor"})],-1)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),U.value?(e.openBlock(),e.createElementBlock("th",{key:1,class:"dss-table-th dss-table-expansion-column","aria-label":e.unref(M)("table.expandRowAriaLabel")},null,8,Lc)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(X.value,(x,q)=>(e.openBlock(),e.createElementBlock("th",{key:re(x),class:e.normalizeClass(["dss-table-th",Zl(x)]),style:e.normalizeStyle(un(x)),onClick:ie=>$n(x)},[e.createElementVNode("div",Tc,[e.createElementVNode("span",Dc,e.toDisplayString(x.header),1),x.sortable!==!1&&Ye.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["dss-table-sort-icon",yt(x)])},[ht(x)===0?(e.openBlock(),e.createElementBlock("span",Hc,[...h[29]||(h[29]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M5.413 9.06387C5.45434 9.16352 5.4652 9.27319 5.4442 9.37901C5.42321 9.48484 5.3713 9.58206 5.29505 9.65837L3.11339 11.84C3.06273 11.8907 3.00258 11.931 2.93637 11.9584C2.87016 11.9859 2.79918 12 2.72751 12C2.65583 12 2.58486 11.9859 2.51865 11.9584C2.45243 11.931 2.39228 11.8907 2.34163 11.84L0.159964 9.65837C0.0835992 9.58209 0.0315843 9.48487 0.0105038 9.37902C-0.0105768 9.27316 0.000224981 9.16343 0.0415416 9.06371C0.0828581 8.964 0.152832 8.87879 0.242604 8.81886C0.332376 8.75894 0.43791 8.72699 0.545845 8.72708H2.18209V0.545845C2.18209 0.401191 2.23955 0.262463 2.34184 0.160178C2.44413 0.0578925 2.58285 0.000429123 2.72751 0.000429123C2.87216 0.000429123 3.01089 0.0578925 3.11317 0.160178C3.21546 0.262463 3.27292 0.401191 3.27292 0.545845V8.72708H4.90917C5.01704 8.7271 5.12248 8.75911 5.21216 8.81906C5.30185 8.87901 5.37174 8.9642 5.413 9.06387ZM11.84 2.34162L9.65837 0.159963C9.60772 0.109252 9.54757 0.0690231 9.48135 0.0415755C9.41514 0.0141278 9.34417 0 9.27249 0C9.20082 0 9.12984 0.0141278 9.06363 0.0415755C8.99742 0.0690231 8.93727 0.109252 8.88661 0.159963L6.70495 2.34162C6.62858 2.4179 6.57657 2.51513 6.55549 2.62098C6.53441 2.72684 6.54521 2.83657 6.58653 2.93629C6.62784 3.036 6.69782 3.12121 6.78759 3.18114C6.87736 3.24107 6.9829 3.27301 7.09083 3.27292H8.72708V11.4542C8.72708 11.5988 8.78454 11.7375 8.88683 11.8398C8.98911 11.9421 9.12784 11.9996 9.27249 11.9996C9.41715 11.9996 9.55587 11.9421 9.65816 11.8398C9.76045 11.7375 9.81791 11.5988 9.81791 11.4542V3.27292H11.4542C11.5621 3.27301 11.6676 3.24107 11.7574 3.18114C11.8472 3.12121 11.9171 3.036 11.9585 2.93629C11.9998 2.83657 12.0106 2.72684 11.9895 2.62098C11.9684 2.51513 11.9164 2.4179 11.84 2.34162Z",fill:"#3a3a3a"})],-1)])])):ht(x)===1?(e.openBlock(),e.createElementBlock("span",Rc,[...h[30]||(h[30]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M6 12C6.36819 12 6.66667 11.7015 6.66667 11.3333L6.66667 2.55333L8.58967 4.47098C8.84953 4.73012 9.27017 4.72983 9.52967 4.47033C9.78943 4.21057 9.78943 3.78943 9.52967 3.52967L6.70711 0.707106C6.31658 0.316582 5.68342 0.316582 5.29289 0.707107L2.47033 3.52967C2.21057 3.78943 2.21057 4.21057 2.47033 4.47033C2.72983 4.72983 3.15047 4.73012 3.41033 4.47098L5.33333 2.55333L5.33333 11.3333C5.33333 11.7015 5.63181 12 6 12Z",fill:"#7fa2cc"})],-1)])])):ht(x)===-1?(e.openBlock(),e.createElementBlock("span",Fc,[...h[31]||(h[31]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M6 -1.74846e-07C5.63181 -1.58751e-07 5.33333 0.298476 5.33333 0.666666L5.33333 9.44667L3.41033 7.52902C3.15047 7.26988 2.72983 7.27017 2.47033 7.52967C2.21057 7.78943 2.21057 8.21057 2.47033 8.47033L5.29289 11.2929C5.68342 11.6834 6.31658 11.6834 6.70711 11.2929L9.52967 8.47033C9.78943 8.21057 9.78943 7.78943 9.52967 7.52967C9.27017 7.27017 8.84953 7.26988 8.58967 7.52902L6.66667 9.44667L6.66667 0.666667C6.66667 0.298477 6.36819 -1.9094e-07 6 -1.74846e-07Z",fill:"#7fa2cc"})],-1)])])):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),x.filter?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-table-filter-wrap",{"dss-table-filter-wrap--open":_t.value===re(x)}]),onClick:h[6]||(h[6]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-table-filter-trigger",{"dss-table-filter-trigger--active":xn(re(x))}]),"data-filter-column-key":re(x),"aria-expanded":_t.value===re(x),"aria-label":e.unref(M)("table.filterColumnAriaLabel"),onClick:ie=>O(re(x),ie)},[...h[32]||(h[32]=[e.createElementVNode("span",{class:"dss-table-filter-icon","aria-hidden":"true"},[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M11.7583 1.54409L11.7537 1.54928L7.84558 5.72226V8.92411C7.84581 9.07639 7.80836 9.22636 7.73658 9.36067C7.6648 9.49497 7.56091 9.60943 7.43417 9.69385L5.58772 10.9252C5.44858 11.0179 5.28688 11.071 5.11988 11.079C4.95288 11.087 4.78685 11.0494 4.63952 10.9704C4.49219 10.8914 4.36908 10.7738 4.28334 10.6303C4.1976 10.4868 4.15244 10.3226 4.15269 10.1555V5.72226L0.244567 1.54928L0.239951 1.54409C0.119785 1.41185 0.0405781 1.24758 0.0119374 1.0712C-0.0167033 0.894829 0.00645342 0.713935 0.0785984 0.550463C0.150743 0.386991 0.268776 0.247968 0.418378 0.150258C0.56798 0.0525488 0.742722 0.000352071 0.921405 0H11.0769C11.2557 1.73676e-05 11.4307 0.051972 11.5805 0.149551C11.7304 0.247131 11.8487 0.386134 11.9211 0.549673C11.9934 0.713211 12.0167 0.894244 11.9881 1.07078C11.9596 1.24731 11.8803 1.41174 11.7601 1.54409H11.7583Z",fill:"currentColor"})])],-1)])],10,Ic)],2)):e.createCommentVNode("",!0)])],14,Ac))),128))])]),e.createElementVNode("tbody",zc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(el.value,(x,q)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:C(x,al.value+q)},[e.createElementVNode("tr",{class:e.normalizeClass(["dss-table-tr",Pn(x,q)]),style:e.normalizeStyle(G.value),onClick:ie=>Ml(x,q,ie)},[qe.value?(e.openBlock(),e.createElementBlock("td",{key:0,class:"dss-table-td dss-table-selection-cell",onClick:h[7]||(h[7]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("span",Oc,[e.createElementVNode("input",{type:xe.value==="multiple"?"checkbox":"radio",name:`dss-table-select-${H.tableId}`,checked:pl(x,al.value+q),disabled:!zl(x,al.value+q),onChange:ie=>Yn(x,al.value+q),class:e.normalizeClass(["dss-table-checkbox",xe.value==="multiple"?"dss-table-checkbox--checkbox":"dss-table-checkbox--radio",{"dss-table-checkbox--disabled":!zl(x,al.value+q)}])},null,42,qc),xe.value==="multiple"&&pl(x,al.value+q)?(e.openBlock(),e.createElementBlock("span",Wc,[...h[33]||(h[33]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",preserveAspectRatio:"xMidYMid meet",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4.82415 9.75587C4.46867 10.0814 3.89442 10.0814 3.53893 9.75587L0.266616 6.75952C-0.088872 6.43401 -0.088872 5.90819 0.266616 5.58268C0.622104 5.25717 1.19635 5.25717 1.55184 5.58268L4.17698 7.98644L10.4482 2.24413C10.8036 1.91862 11.3779 1.91862 11.7334 2.24413C12.0889 2.56964 12.0889 3.09546 11.7334 3.42097L4.82415 9.75587Z","stroke-width":"1.2",stroke:"currentColor",fill:"currentColor"})],-1)])])):xe.value==="single"&&pl(x,al.value+q)?(e.openBlock(),e.createElementBlock("span",Zc)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),U.value?(e.openBlock(),e.createElementBlock("td",{key:1,class:"dss-table-td dss-table-expansion-cell",onClick:e.withModifiers(ie=>gt(x,al.value+q,ie),["stop"])},[ze(x,al.value+q)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-table-expansion-trigger","aria-expanded":le(x,al.value+q),"aria-label":le(x,al.value+q)?e.unref(M)("table.collapseRowAriaLabel"):e.unref(M)("table.expandRowAriaLabel")},[e.createElementVNode("span",{class:e.normalizeClass(["dss-table-expansion-icon",{"dss-table-expansion-icon--expanded":le(x,al.value+q)}]),"aria-hidden":"true"},[...h[34]||(h[34]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M10.1611 2.81093L5.99463 6.93546L1.82819 2.81093C1.4094 2.39636 0.732886 2.39636 0.314094 2.81093C-0.104698 3.22551 -0.104698 3.89522 0.314094 4.30979L5.24295 9.18907C5.66175 9.60364 6.33826 9.60364 6.75705 9.18907L11.6859 4.30979C12.1047 3.89522 12.1047 3.22551 11.6859 2.81093C11.2671 2.40699 10.5799 2.39636 10.1611 2.81093Z",fill:"#3a3a3a"})],-1)])],2)],8,Xc)):(e.openBlock(),e.createElementBlock("span",Yc))],8,Uc)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(X.value,(ie,mt)=>(e.openBlock(),e.createElementBlock("td",{key:re(ie),class:e.normalizeClass(["dss-table-td",Zl(ie)]),style:e.normalizeStyle(un(ie))},[e.renderSlot(y.$slots,`cell-${ie.field}`,{data:x,column:ie,rowIndex:q,isExpanded:Y.value===C(x,al.value+q)},()=>[e.createTextVNode(e.toDisplayString(kn(x,ie)),1)])],6))),128))],14,Pc),U.value&&ze(x,al.value+q)&&le(x,al.value+q)?(e.openBlock(),e.createElementBlock("tr",jc,[e.createElementVNode("td",{colspan:S.value,class:"dss-table-expansion-content-cell"},[e.renderSlot(y.$slots,"expansion",{data:x,rowIndex:q})],8,Kc)])):e.createCommentVNode("",!0)],64))),128)),el.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("tr",{key:0,class:"dss-table-empty",style:e.normalizeStyle(G.value)},[e.createElementVNode("td",{colspan:S.value,class:"dss-table-empty-cell"},[e.renderSlot(y.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(ge.value),1)])],8,Gc)],4))])],2)],2),Pt.value?(e.openBlock(),e.createElementBlock("div",Qc,[e.createElementVNode("div",Jc,[ut.value?(e.openBlock(),e.createElementBlock("span",eu,e.toDisplayString(e.unref(M)("table.showingRange",{start:Ae.value,end:so.value,total:vt.value})),1)):(e.openBlock(),e.createElementBlock("span",tu," "))]),e.createElementVNode("div",lu,[Et.value?(e.openBlock(),e.createElementBlock("div",nu,[e.createElementVNode("button",{class:"dss-pagination-btn",disabled:kl.value===0,onClick:h[8]||(h[8]=x=>yn(0)),title:e.unref(M)("table.firstPage")},[...h[35]||(h[35]=[e.createElementVNode("span",{class:"dss-pagination-double-arrow"},[e.createElementVNode("span",null,"‹"),e.createElementVNode("span",null,"‹")],-1)])],8,ou),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:kl.value===0,onClick:h[9]||(h[9]=x=>yn(kl.value-1)),title:e.unref(M)("table.previousPage")}," ‹ ",8,au),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":h[10]||(h[10]=x=>cn.value=x),type:"text",class:"dss-pagination-page-input","aria-label":e.unref(M)("table.currentPageAriaLabel"),onBlur:zn,onKeydown:e.withKeys(e.withModifiers(zn,["prevent"]),["enter"])},null,40,su),[[e.vModelText,cn.value]]),e.createElementVNode("span",ru,e.toDisplayString(e.unref(M)("table.ofPages",{total:Yt.value})),1),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:kl.value>=oe.value-1,onClick:h[11]||(h[11]=x=>yn(kl.value+1)),title:e.unref(M)("table.nextPage")}," › ",8,iu),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:kl.value>=oe.value-1,onClick:h[12]||(h[12]=x=>yn(oe.value-1)),title:e.unref(M)("table.lastPage")},[...h[36]||(h[36]=[e.createElementVNode("span",{class:"dss-pagination-double-arrow"},[e.createElementVNode("span",null,"›"),e.createElementVNode("span",null,"›")],-1)])],8,cu)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",uu,[Ht.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-pagination-rows-per-page",ref_key:"rowsPerPageDropdownRef",ref:rn},[e.createElementVNode("span",du,e.toDisplayString(e.unref(M)("table.rowsPerPage"))+":",1),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-pagination-select-trigger",{"dss-pagination-select-open":ol.value}]),onClick:h[13]||(h[13]=x=>ol.value=!ol.value),"aria-expanded":ol.value,"aria-haspopup":"listbox",ref_key:"rowsPerPageTriggerRef",ref:at},[e.createTextVNode(e.toDisplayString(Qt.value)+" ",1),h[37]||(h[37]=e.createElementVNode("span",{class:"dss-pagination-select-chevron","aria-hidden":"true"},"▼",-1))],10,mu),e.createVNode(e.Transition,{name:"dss-dropdown"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("ul",{class:e.normalizeClass(["dss-pagination-select-dropdown",{"dss-pagination-select-dropdown--top":de.value==="top"}]),style:e.normalizeStyle(hn.value),role:"listbox"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Je.value,x=>(e.openBlock(),e.createElementBlock("li",{key:x,role:"option","aria-selected":x===Qt.value,class:e.normalizeClass(["dss-pagination-select-option",{"dss-pagination-select-option--selected":x===Qt.value}]),onClick:q=>kt(x)},e.toDisplayString(x),11,pu))),128))],6),[[e.vShow,ol.value]])]),_:1})],512)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)],4),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"dss-dropdown"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:"dss-table-filter-dropdown dss-table-filter-dropdown--teleport",style:e.normalizeStyle(hl.value?{top:hl.value.top+"px",left:hl.value.left+"px",width:Al+"px"}:void 0),onClick:h[21]||(h[21]=e.withModifiers(()=>{},["stop"]))},[Wt.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[Wt.value.filter==="string"?(e.openBlock(),e.createElementBlock("div",fu,[e.createElementVNode("input",{type:"text",value:Tl(_t.value).value??"",onInput:h[14]||(h[14]=x=>_(_t.value,x.target.value)),class:"dss-table-filter-input",placeholder:e.unref(M)("table.search")},null,40,vu)])):Wt.value.filter==="range"&&dl.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-table-filter-double-range",style:e.normalizeStyle({"--range-min-pct":dl.value.minPct+"%","--range-max-pct":dl.value.maxPct+"%"})},[e.createElementVNode("div",{ref_key:"doubleRangeTrackRef",ref:vn,class:"dss-table-filter-double-range-track",onMousemove:an,onMouseenter:an},[e.createElementVNode("input",{type:"range",min:dl.value.rangeMin,max:dl.value.rangeMax,value:dl.value.currentMin,onInput:h[15]||(h[15]=x=>$e(_t.value,"min",x.target.value)),class:"dss-table-filter-double-range-input dss-table-filter-double-range-input--min",style:e.normalizeStyle({zIndex:gn.value==="min"?2:1})},null,44,gu),e.createElementVNode("input",{type:"range",min:dl.value.rangeMin,max:dl.value.rangeMax,value:dl.value.currentMax,onInput:h[16]||(h[16]=x=>$e(_t.value,"max",x.target.value)),class:"dss-table-filter-double-range-input dss-table-filter-double-range-input--max",style:e.normalizeStyle({zIndex:gn.value==="max"?2:1})},null,44,hu)],544),e.createElementVNode("div",yu,e.toDisplayString(dl.value.currentMin)+" – "+e.toDisplayString(dl.value.currentMax),1)],4)):Wt.value.filter==="dateRange"?(e.openBlock(),e.createElementBlock("div",ku,[e.createElementVNode("div",Cu,[e.createElementVNode("label",bu,e.toDisplayString(e.unref(M)("table.filterFrom")),1),e.createElementVNode("input",{type:"date",value:Tl(_t.value).from??"",onInput:h[17]||(h[17]=x=>dt(_t.value,"from",x.target.value)),class:"dss-table-filter-input dss-table-filter-daterange-input"},null,40,wu)]),e.createElementVNode("div",xu,[e.createElementVNode("label",Eu,e.toDisplayString(e.unref(M)("table.filterTo")),1),e.createElementVNode("input",{type:"date",value:Tl(_t.value).to??"",onInput:h[18]||(h[18]=x=>dt(_t.value,"to",x.target.value)),class:"dss-table-filter-input dss-table-filter-daterange-input"},null,40,Su)])])):Wt.value.filter==="list"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("input",{type:"text",value:Qe[_t.value]??"",onInput:h[19]||(h[19]=x=>ot(_t.value,x.target.value)),class:"dss-table-filter-input dss-table-filter-list-search",placeholder:e.unref(M)("table.search")},null,40,Vu),e.createElementVNode("div",Nu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Dt(Wt.value),x=>(e.openBlock(),e.createElementBlock("label",{key:x,class:"dss-table-filter-list-item"},[e.createElementVNode("input",{type:"checkbox",checked:nl(_t.value,x),onChange:q=>Dl(_t.value,x)},null,40,Bu),e.createElementVNode("span",null,e.toDisplayString(x),1)]))),128))])],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Mu,[e.createElementVNode("button",{type:"button",class:"dss-table-filter-clear",onClick:h[20]||(h[20]=x=>sn(_t.value))},e.toDisplayString(e.unref(M)("table.clearFilter")),1)])],64)):e.createCommentVNode("",!0)],4),[[e.vShow,_t.value&&Wt.value&&hl.value]])]),_:1})]))],64))}}),Lu="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M6.008%2014V12.68H8.288V6.572L5.996%208.276V6.692L8.012%205.24H9.788V12.68H11.624V14H6.008Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",Au="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M5.948%2014V12.548L8.684%209.8C9.068%209.408%209.352%209.056%209.536%208.744C9.72%208.424%209.812%208.096%209.812%207.76C9.812%207.352%209.7%207.036%209.476%206.812C9.252%206.58%208.948%206.464%208.564%206.464C8.14%206.464%207.808%206.588%207.568%206.836C7.328%207.076%207.208%207.412%207.208%207.844H5.708C5.716%207.284%205.836%206.804%206.068%206.404C6.308%205.996%206.644%205.68%207.076%205.456C7.508%205.232%208.012%205.12%208.588%205.12C9.14%205.12%209.62%205.224%2010.028%205.432C10.436%205.64%2010.752%205.932%2010.976%206.308C11.2%206.684%2011.312%207.132%2011.312%207.652C11.312%208.188%2011.172%208.712%2010.892%209.224C10.62%209.728%2010.18%2010.272%209.572%2010.856L7.748%2012.644H11.42V14H5.948Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",Tu="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M8.516%2014.12C7.948%2014.12%207.452%2014.016%207.028%2013.808C6.612%2013.6%206.288%2013.308%206.056%2012.932C5.824%2012.556%205.708%2012.112%205.708%2011.6H7.22C7.22%2011.992%207.332%2012.3%207.556%2012.524C7.788%2012.74%208.112%2012.848%208.528%2012.848C8.944%2012.848%209.264%2012.736%209.488%2012.512C9.712%2012.288%209.824%2011.984%209.824%2011.6V10.916C9.824%2010.524%209.712%2010.22%209.488%2010.004C9.264%209.78%208.944%209.668%208.528%209.668H7.544V8.312L9.476%206.524H6.104V5.24H11V6.596L8.528%208.864V8.384C9.392%208.384%2010.076%208.612%2010.58%209.068C11.084%209.524%2011.336%2010.14%2011.336%2010.916V11.6C11.336%2012.112%2011.22%2012.556%2010.988%2012.932C10.756%2013.308%2010.428%2013.6%2010.004%2013.808C9.58%2014.016%209.084%2014.12%208.516%2014.12Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",Du="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M9.68%2014V12.26H5.78V10.088L9.152%205.24H10.832L7.22%2010.484V10.94H9.68V8.96H11.18V14H9.68Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",Hu="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M8.588%2014.12C7.78%2014.12%207.132%2013.92%206.644%2013.52C6.156%2013.112%205.888%2012.56%205.84%2011.864H7.34C7.372%2012.168%207.492%2012.404%207.7%2012.572C7.916%2012.732%208.212%2012.812%208.588%2012.812C9.004%2012.812%209.32%2012.704%209.536%2012.488C9.752%2012.264%209.86%2011.956%209.86%2011.564V10.712C9.86%2010.312%209.752%2010.008%209.536%209.8C9.32%209.584%209.004%209.476%208.588%209.476C8.332%209.476%208.112%209.528%207.928%209.632C7.744%209.736%207.604%209.88%207.508%2010.064H6.044L6.104%205.24H11.036V6.596H7.52L7.496%209.14H7.844L7.484%209.44C7.484%209.072%207.628%208.784%207.916%208.576C8.212%208.36%208.608%208.252%209.104%208.252C9.816%208.244%2010.368%208.46%2010.76%208.9C11.16%209.332%2011.36%209.936%2011.36%2010.712V11.564C11.36%2012.356%2011.112%2012.98%2010.616%2013.436C10.128%2013.892%209.452%2014.12%208.588%2014.12Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",Ru="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M8.6%2014.12C8.016%2014.12%207.5%2014%207.052%2013.76C6.612%2013.512%206.268%2013.168%206.02%2012.728C5.78%2012.28%205.66%2011.764%205.66%2011.18C5.66%2010.764%205.728%2010.328%205.864%209.872C6.008%209.416%206.204%208.988%206.452%208.588L8.516%205.24H10.184L7.592%209.32L7.664%209.368C7.824%209.12%208.04%208.932%208.312%208.804C8.584%208.676%208.888%208.612%209.224%208.612C9.696%208.612%2010.104%208.724%2010.448%208.948C10.792%209.172%2011.06%209.484%2011.252%209.884C11.444%2010.284%2011.54%2010.752%2011.54%2011.288C11.54%2011.856%2011.416%2012.352%2011.168%2012.776C10.928%2013.2%2010.588%2013.532%2010.148%2013.772C9.716%2014.004%209.2%2014.12%208.6%2014.12ZM8.6%2012.848C9.04%2012.848%209.396%2012.708%209.668%2012.428C9.94%2012.14%2010.076%2011.768%2010.076%2011.312C10.076%2010.84%209.94%2010.464%209.668%2010.184C9.396%209.896%209.04%209.752%208.6%209.752C8.16%209.752%207.804%209.896%207.532%2010.184C7.26%2010.464%207.124%2010.84%207.124%2011.312C7.124%2011.768%207.26%2012.14%207.532%2012.428C7.804%2012.708%208.16%2012.848%208.6%2012.848Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",Fu={class:"dss-toolbar-left"},Iu=["title"],zu=["title"],Pu={class:"dss-toolbar-dropdown-wrapper"},Ou=["title"],qu=["src"],Wu=["src"],Zu=["src"],Uu=["src"],Xu=["src"],Yu=["src"],ju={key:6,width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"paragraph-icon"},Ku=["src"],Gu=["src"],Qu=["src"],Ju=["src"],ed=["src"],td=["src"],ld=["title"],nd=["title"],od=["title"],ad=["title"],sd=["title"],rd=["title"],id=["title"],cd=["title"],ud=["title"],dd={key:2,class:"dss-toolbar-separator"},md=["title"],pd={key:4,class:"dss-toolbar-separator"},fd={key:5,class:"dss-toolbar-dropdown-wrapper"},vd=["title"],gd={class:"dss-toolbar-dropdown-ai"},hd={class:"dss-toolbar-right"},yd={key:0,class:"dss-toolbar-custom-group"},kd={key:1,class:"dss-toolbar-separator"},Cd={class:"dss-link-modal-content"},bd={class:"dss-link-modal-field"},wd={class:"dss-link-modal-label"},xd=["placeholder"],Ed={class:"dss-link-modal-field"},Sd={class:"dss-link-modal-label"},Vd=["placeholder"],Nd={class:"dss-image-modal-tabs"},Bd={key:0,class:"dss-image-tab-content"},Md={class:"dss-link-modal-content"},_d={class:"dss-link-modal-field"},$d={key:0,class:"dss-link-modal-label"},Ld=["src"],Ad={class:"dss-link-modal-field"},Td={class:"dss-link-modal-label"},Dd=["placeholder"],Hd={class:"dss-link-modal-field"},Rd={class:"dss-link-modal-label"},Fd=["placeholder"],Id={class:"dss-link-modal-field"},zd={class:"dss-link-modal-label"},Pd=["placeholder"],Od={key:1,class:"dss-image-tab-content"},qd={class:"dss-link-modal-content"},Wd={class:"dss-link-modal-field"},Zd={class:"dss-link-modal-label"},Ud=["placeholder"],Xd={class:"dss-link-modal-field"},Yd={class:"dss-link-modal-label"},jd=["placeholder"],Kd={class:"dss-link-modal-field"},Gd={class:"dss-link-modal-label"},Qd=["placeholder"],Jd={class:"dss-link-modal-field"},e1={class:"dss-link-modal-label"},t1=["placeholder"],l1={class:"dss-text-editor-title-input-container"},n1={key:0,class:"dss-text-editor-title-preview"},o1={key:0},a1={key:1,class:"dss-text-editor-preview-placeholder"},s1=["value","placeholder","disabled"],r1={key:2,class:"dss-text-editor-title-slot dss-text-editor-slot-last"},i1={class:"dss-text-editor-description-input-container"},c1={key:0,class:"dss-text-editor-description-preview"},u1={key:0},d1={key:1,class:"dss-text-editor-preview-placeholder"},m1=["value","placeholder","disabled"],p1={key:3,class:"dss-text-editor-description-slot dss-text-editor-slot-last"},f1=["data-comment-id","onMouseenter"],v1=["onClick"],g1=["src","alt"],h1={key:1},y1=["onClick"],k1=["src","alt"],C1={key:1},b1=["data-has-second-user","onClick"],w1={class:"editor-comment-marker-count"},x1={key:4,class:"dss-text-editor-textarea-wrapper"},E1=["value","placeholder","rows","disabled"],S1={class:"dss-text-editor-footer"},V1={class:"dss-text-editor-footer-content"},N1={class:"dss-text-editor-footer-stat"},B1={class:"dss-text-editor-footer-stat"},M1={key:5,class:"dss-text-editor-content-wrapper"},_1={key:0,class:"dss-comment-overlay-body"},$1={class:"dss-comment-selection-wrapper"},L1=["innerHTML"],A1={class:"dss-comment-messages-wrapper"},T1={key:0,class:"dss-comment-avatar-wrapper"},D1={class:"dss-comment-avatar"},H1=["src","alt"],R1={key:1},F1={class:"dss-comment-header"},I1={class:"dss-comment-header-text"},z1={class:"dss-comment-author"},P1={key:0,class:"dss-comment-date"},O1=["onClick","title"],q1={class:"dss-comment-overlay-inner"},W1=["placeholder","onKeydown"],Z1={class:"dss-text-editor-footer"},U1={class:"dss-text-editor-footer-content"},X1={class:"dss-text-editor-footer-stat"},Y1={class:"dss-text-editor-footer-stat"},j1=["title"],K1=["title"],G1={xmlns:"http://www.w3.org/2000/svg",version:"1.1","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"512",height:"512",x:"0",y:"0",viewBox:"0 0 32 32",style:{"enable-background":"new 0 0 512 512"},"xml:space":"preserve",class:""},Q1={class:"dss-image-popup-content"},J1={key:0,class:"dss-image-popup-no-alt-icon"},em=["title"],tm=["title"],lm={xmlns:"http://www.w3.org/2000/svg",version:"1.1","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"512",height:"512",x:"0",y:"0",viewBox:"0 0 32 32",style:{"enable-background":"new 0 0 512 512"},"xml:space":"preserve",class:""},nm={class:"dss-toolbar-left"},om=["title"],am=["title"],sm={class:"dss-toolbar-dropdown-wrapper"},rm=["title"],im=["src"],cm=["src"],um=["src"],dm=["src"],mm=["src"],pm=["src"],fm={key:6,width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"paragraph-icon"},vm=["title"],gm=["title"],hm=["title"],ym=["title"],km=["title"],Cm=["title"],bm=["title"],wm=["title"],xm=["title"],Em=["title"],Sm={key:2,class:"dss-toolbar-separator"},Vm={key:3,class:"dss-toolbar-dropdown-wrapper"},Nm=["title"],Bm={class:"dss-toolbar-dropdown-ai"},Mm={key:0,class:"dss-toolbar-right"},_m={key:0,class:"dss-toolbar-separator"},$m={key:0,class:"dss-toolbar-custom-group"},Lm={key:1,class:"dss-toolbar-separator"},Am={name:"DSSTextEditor"},Tm=Object.assign(Am,{props:{modelValue:{type:String,default:""},title:{type:String,default:""},description:{type:String,default:""},titlePlaceholder:{type:String,default:null},descriptionPlaceholder:{type:String,default:null},placeholder:{type:String,default:null},rows:{type:Number,default:10},fullHeight:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},richText:{type:Boolean,default:!1},border:{type:Boolean,default:!0},rounded:{type:Boolean,default:!1},fixedHeight:{type:Boolean,default:!1},options:{type:Object,default:()=>({}),validator:H=>typeof H=="object"&&H!==null},floatingToolbar:{type:Boolean,default:!1},askAi:{type:Boolean,default:!1},commentUser:{type:Object,default:null},customToolbarSlots:{type:Array,default:()=>["custom-tool-1","custom-tool-2","custom-tool-3"]},customToolbarFloatingMap:{type:Object,default:()=>({}),validator:H=>typeof H=="object"&&H!==null},locale:{type:String,default:null},comments:{type:Array,default:()=>[]}},emits:["update:modelValue","update:title","update:description","update:comments","change","blur","title-change","description-change","comment-submitted","comment-marker-clicked","comment-deleted"],setup(H,{expose:ne,emit:M}){const{t:A,locale:ue}=lo.useI18n(),I={h1:Lu,h2:Au,h3:Tu,h4:Du,h5:Hu,h6:Ru},$=H,ve=M,ct=e.useSlots(),Q=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
98
|
+
`}const l=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(l),p=document.createElement("a");p.href=i,p.download=q("csv"),document.body.appendChild(p),p.click(),document.body.removeChild(p),URL.revokeObjectURL(i),Wl()}catch(t){console.error("Error downloading CSV:",t)}},En=t=>{if(typeof t.action=="function"){const a={series:F.series,categories:F.categories,markers:Yt.value},l={chartX:vt.value.chartX,chartY:vt.value.chartY,dataX:vt.value.mouseDataX,dataY:vt.value.mouseDataY,categoryIndex:clampedCategoryIndex||vt.value.categoryIndex};t.action(a,l)}Wl()},ro=()=>{At(),Ae.value.show=!0,Ae.value.categoryIndex=vt.value.categoryIndex,Ae.value.fromButton=!1,Wl()},xo=()=>{At(),Ae.value.show=!0,Ae.value.categoryIndex=0,Ae.value.fromButton=!0},Eo=t=>{if(vt.value.show){const a=document.querySelector(".dss-context-menu");a&&!a.contains(t.target)&&(vt.value.show=!1)}},io=t=>{vt.value.show&&!t.target.closest(".context-menu")&&(vt.value.show=!1)},So=t=>{if(!Sl.value||!et.value)return;t.preventDefault(),t.stopPropagation(),oe.value.isZooming=!0,st.value.show=!1,oe.value.zoomTimeout&&clearTimeout(oe.value.zoomTimeout);const l=t.currentTarget.getBoundingClientRect(),i=t.clientX-l.left,p=t.clientY-l.top;if(i<z.value.left-50||i>z.value.right+50||p<z.value.top-50||p>z.value.bottom+100){oe.value.isZooming=!1;return}const g=t.deltaY>0?.9:1.1,b=Math.max(oe.value.minScale,Math.min(oe.value.maxScale,oe.value.scale*g));if(b!==oe.value.scale){const{minX:w,maxX:P}=Ut.value,N=P-w||1,T=N/oe.value.scale,B=w-oe.value.offsetX/z.value.width*N,te=(i-z.value.left)/z.value.width,Se=B+te*T;oe.value.scale=b;const Xe=N/oe.value.scale,me=Se-te*Xe;oe.value.offsetX=-(me-w)/N*z.value.width,oe.value.scale<=1.01&&(oe.value.scale=1,oe.value.offsetX=0)}oe.value.zoomTimeout=setTimeout(()=>{oe.value.isZooming=!1,oe.value.zoomTimeout=null},300)},co=t=>{if(!Sl.value||!et.value||oe.value.scale<=1)return;st.value.show=!1;const l=t.currentTarget.getBoundingClientRect();t.clientX-l.left,t.clientY-l.top,oe.value.isDragging=!0,oe.value.lastMouseX=t.clientX,oe.value.lastMouseY=t.clientY,t.preventDefault()},Vo=()=>{oe.value.isDragging=!1},uo=()=>{!Sl.value||!et.value||(oe.value.scale=1,oe.value.offsetX=0,oe.value.isDragging=!1,oe.value.zoomTimeout&&(clearTimeout(oe.value.zoomTimeout),oe.value.zoomTimeout=null),oe.value.isZooming=!1)},Zo=()=>!Sl.value||!hn.value||!et.value?"default":oe.value.isDragging?"grabbing":oe.value.scale>1?"grab":"dss-crosshair",jn=t=>{if(t.length<2)return"";if(t.length===2)return`M ${t[0].x} ${t[0].y} L ${t[1].x} ${t[1].y}`;let a=`M ${t[0].x} ${t[0].y}`;for(let l=0;l<t.length-1;l++){const i=t[Math.max(l-1,0)],p=t[l],g=t[l+1],b=t[Math.min(l+2,t.length-1)],w=p.x+(g.x-i.x)/6*Ge.value,P=p.y+(g.y-i.y)/6*Ge.value,N=g.x-(b.x-p.x)/6*Ge.value,T=g.y-(b.y-p.y)/6*Ge.value;a+=` C ${w} ${P} ${N} ${T} ${g.x} ${g.y}`}return a},$l=e.computed(()=>{const a=W.value?.chart?.padding,l=typeof a=="number"?a:null,i=a&&typeof a=="object"?a:null,p=50;let g=p+(Ht.value?30:0)+60;if(Ll.value){const B={left:p+40,top:p+40,right:p+40,bottom:p+40};return l!=null?{left:l,top:l,right:l,bottom:l}:i?{left:i.left??B.left,top:i.top??B.top,right:i.right??B.right,bottom:i.bottom??B.bottom}:B}if(Cl.value){const B=!K.value,te=O.value,Se=te?ce.value+$e.value+Math.max(24,_.value+16):0,Xe=B?12:p;let me=0;ut.value&&(me+=B?8:15),Ct.value&&(me+=B?6:10);const ke=tt();let Ne=Xe+(B?4:16)+(te?Se:0),he=Xe+(te?Se:0);K.value&&ye.value==="left"?Ne+=ke.legendWidth||150:K.value&&ye.value==="right"&&(he+=ke.legendWidth||150);const Pe=be.value==="semi-radial"?te?Se:8:te?Se:B?8:p+80,Te=te?14:0,Le=Xe+me+Te,Re={left:Ne,top:Le,right:he,bottom:Pe};return l!=null?{left:l,top:l,right:l,bottom:l}:i?{left:i.left??Re.left,top:i.top??Re.top,right:i.right??Re.right,bottom:i.bottom??Re.bottom}:Re}let b=0;ut.value&&(b+=15),Ct.value&&(b+=10);const w=tt();let P=p+16,N=p;K.value&&ye.value==="left"?P+=w.legendWidth||150:K.value&&ye.value==="right"&&(N+=w.legendWidth||150),Rl.value&&(N+=44);const T={left:P,top:p+b,right:N,bottom:g};return l!=null?{left:l,top:l,right:l,bottom:l}:i?{left:i.left??T.left,top:i.top??T.top,right:i.right??T.right,bottom:i.bottom??T.bottom}:T}),z=e.computed(()=>({left:$l.value.left,top:$l.value.top,right:xe.value-$l.value.right,bottom:ee.value-$l.value.bottom,width:xe.value-($l.value.left+$l.value.right),height:ee.value-($l.value.top+$l.value.bottom)})),Sl=e.computed(()=>["line","area","bar"].includes(be.value)||Je.value),Ul=e.computed(()=>Je.value),On=e.computed(()=>be.value==="mini-radial"),Cl=e.computed(()=>["radial","semi-radial","mini-radial"].includes(be.value)),Ll=e.computed(()=>be.value==="spider"),jt=e.computed(()=>be.value==="bubble"),Jt=e.computed(()=>W.value?.chart?.orientation==="horizontal"&&(be.value==="bar"||Ul.value)),Cn=t=>{const{minY:a,maxY:l}=Ut.value,i=l-a||1;return z.value.left+(t-a)/i*z.value.width},Sn=t=>{const{maxX:a}=Ut.value,l=a+1,p=z.value.height/l;return z.value.top+(t+.5)*p},Ft=e.computed(()=>Cl.value?$l.value.left+(xe.value-$l.value.left-$l.value.right)/2:xe.value/2),wt=e.computed(()=>Ll.value?ee.value/2-40:Cl.value?$l.value.top+(ee.value-$l.value.top-$l.value.bottom)/2:ee.value/2),it=e.computed(()=>{if(Ll.value){const t=z.value.width-80,a=z.value.height-80;return Math.min(t,a)/2}return Math.min(z.value.width,z.value.height)/2}),Zt=e.computed(()=>{const t=W.value,a=t?.plotOptions?.radialBar?.innerRadiusRatio??t?.radialBar?.innerRadiusRatio,l=typeof a=="number"&&a>=0&&a<=1?a:.45;return it.value*l}),qn=e.computed(()=>{const t=W.value,a=typeof F.innerSize=="number"?F.innerSize:t?.innerSize;return typeof a!="number"||a<=-100||!(Cl.value||Ll.value)?1:1+a/100}),tl=e.computed(()=>{const t=qn.value;if(t===1||t<=0)return;const a=Ft.value,l=wt.value;return`translate(${a}, ${l}) scale(${t}) translate(${-a}, ${-l})`}),An=e.ref(0),Kn=e.computed(()=>`semi-radial-fill-clip-${F.chartId}`),Pl=e.computed(()=>be.value==="semi-radial"),dn=e.computed(()=>Pl.value&&St.value&&!_n.value),mn=e.computed(()=>Pl.value&&St.value&&!_n.value&&ll.value==="fill"),Vn=e.computed(()=>{const t=dn.value?An.value:1,a=Ft.value,l=wt.value,i=Zt.value,p=it.value,g=Math.PI,b=Math.PI+t*Math.PI;if(t<=0)return`M ${a} ${l} L ${a} ${l} Z`;const w=a+p*Math.cos(g),P=l+p*Math.sin(g),N=a+p*Math.cos(b),T=l+p*Math.sin(b),B=a+i*Math.cos(b),te=l+i*Math.sin(b),Se=a+i*Math.cos(g),Xe=l+i*Math.sin(g),me=t>.5?1:0;return`M ${a} ${l} L ${w} ${P} A ${p} ${p} 0 ${me} 1 ${N} ${T} L ${B} ${te} A ${i} ${i} 0 ${me} 1 ${Se} ${Xe} Z`}),Nn=e.computed(()=>{if(!(!Pl.value||!dn.value)&&!mn.value)return`url(#${Kn.value})`}),Uo=t=>{if(!(!mn.value||t!==0))return`url(#${Kn.value})`},Bn=e.ref(0),Tn=e.computed(()=>`radial-reveal-clip-${F.chartId}`),en=e.computed(()=>be.value==="radial"),Wn=e.computed(()=>{const t=en.value?Bn.value:1,a=Ft.value,l=wt.value,i=Math.max(it.value*1.5,xe.value,ee.value);if(t<=0)return`M ${a} ${l} L ${a} ${l} Z`;if(t>=1){const B=a-i,te=a+i;return`M ${B} ${l} A ${i} ${i} 0 0 1 ${te} ${l} A ${i} ${i} 0 0 1 ${B} ${l} Z`}const p=-Math.PI/2,g=p+t*Math.PI*2,b=a+i*Math.cos(p),w=l+i*Math.sin(p),P=a+i*Math.cos(g),N=l+i*Math.sin(g),T=t>=.5?1:0;return`M ${a} ${l} L ${b} ${w} A ${i} ${i} 0 ${T} 1 ${P} ${N} Z`}),No=e.computed(()=>{if(Nn.value)return Nn.value;if(en.value)return`url(#${Tn.value})`});let Zn=null;const Xo=()=>{if(!dn.value)return;An.value=0;const t=S.value,a=performance.now(),l=i=>{const p=i-a,g=Math.min(1,p/t);An.value=Qo(V.value,g),g<1&&(Zn=requestAnimationFrame(l))};Zn=requestAnimationFrame(l)},Un=e.computed(()=>W.value?.bubbles?.minSize||8),mo=e.computed(()=>W.value?.bubbles?.maxSize||50),Gn=e.computed(()=>W.value?.bubbles?.opacity||.7),Bo=(t,a)=>{const l=[15,20,25,18,22],i=l[t%l.length]||20,p=1+Math.sin(a*.5)*.2;return Math.max(5,i*p)},Mo=t=>{const a=document.querySelector(`.dss-bubble-image-${t}`);a&&(a.style.opacity="1")},po=t=>{const a=document.querySelector(`.dss-bubble-image-${t}`);a&&(a.style.display="none")},tn=e.computed(()=>F.series),ln=e.computed(()=>F.series.filter((t,a)=>!at.value.has(a))),Qn=t=>{if(!t)return"primary";const a=t.yAxis??t.axis??t.yAxisId;return a==="secondary"||a==="right"||a===1?"secondary":"primary"},fo=t=>t?typeof t.strokeDasharray=="string"?t.strokeDasharray:Array.isArray(t.strokeDasharray)?t.strokeDasharray.join(","):t.dotted===!0?"4,4":null:null,_o=e.computed(()=>ln.value.filter(t=>Qn(t)==="primary")),Dn=e.computed(()=>ln.value.filter(t=>Qn(t)==="secondary")),Rl=e.computed(()=>!Jt.value&&!!se.value&&Dn.value.length>0),Vl="auto",vo=(t,a,l,i=0,p=100)=>{let g=1/0,b=-1/0;if(t.forEach(N=>{N?.data?.length&&N.data.forEach(T=>{typeof T=="number"&&Number.isFinite(T)&&(g=Math.min(g,T),b=Math.max(b,T))})}),g===1/0)return{minY:i,maxY:p};let w;if(a===Vl){const N=b-g,T=N>0?N*.1:1;w=Math.max(0,g-T)}else if(typeof a=="number")w=a;else{const N=b-g,T=N>0?N*.1:1;w=Math.max(0,g-T)}let P;if(l===Vl){const N=b-g,T=N>0?N*.1:2;P=b+T}else if(typeof l=="number")P=l;else{const N=b-g,T=N>0?N*.1:2;P=b+T}return{minY:w,maxY:P}},Ut=e.computed(()=>{if(jt.value)return Yo();if(!ln.value.length)return{minX:0,maxX:1,minY:0,maxY:1};let t=0;ln.value.forEach(l=>{l.data&&l.data.length&&(t=Math.max(t,l.data.length-1))}),F.categories.length>0&&(t=Math.max(t,F.categories.length-1));const a=vo(_o.value.length?_o.value:ln.value,He.value,_e.value);return{minX:0,maxX:t,minY:a.minY,maxY:a.maxY}}),$o=e.computed(()=>Rl.value?vo(Dn.value,Xt.value,bt.value,Ut.value.minY,Ut.value.maxY):{minY:Ut.value.minY,maxY:Ut.value.maxY}),Yo=()=>{if(!ln.value.length)return{minX:0,maxX:8,minY:0,maxY:50,minSize:10,maxSize:30};let t=1/0,a=-1/0,l=1/0,i=-1/0,p=1/0,g=-1/0,b=!1;if(ln.value.forEach((Se,Xe)=>{Se?.data?.length&&Se.data.forEach((me,ke)=>{let Ne,he,je;if(typeof me=="object"&&me!==null&&!Array.isArray(me))Ne=typeof me.x=="number"?me.x:ke,he=typeof me.y=="number"?me.y:0,je=typeof me.size=="number"?me.size:20;else if(Array.isArray(me)&&me.length>=3)Ne=typeof me[0]=="number"?me[0]:ke,he=typeof me[1]=="number"?me[1]:0,je=typeof me[2]=="number"?me[2]:20;else if(typeof me=="number")Ne=ke,he=me,je=Bo(Xe,ke);else return;isFinite(Ne)&&isFinite(he)&&isFinite(je)&&(t=Math.min(t,Ne),a=Math.max(a,Ne),l=Math.min(l,he),i=Math.max(i,he),p=Math.min(p,je),g=Math.max(g,je),b=!0)})}),!b)return{minX:0,maxX:8,minY:0,maxY:50,minSize:10,maxSize:30};t===a&&(t=Math.min(t,0),a=Math.max(a,F.categories?.length-1||8)),l===i&&(l=Math.max(0,l-10),i=l+20);const w=a-t,P=i-l;let N,T,B,te;return Gt.value!==null?N=Gt.value:N=t-w*.1,Lt.value!==null?T=Lt.value:T=a+w*.1,He.value!==null&&typeof He.value=="number"?B=He.value:B=Math.max(0,l-P*.1),_e.value!==null&&typeof _e.value=="number"?te=_e.value:te=i+P*.1,{minX:N,maxX:T,minY:B,maxY:te,minSize:p,maxSize:g}},Kt=t=>{if(jt.value){const{minX:w,maxX:P}=Ut.value,N=P-w||1;return z.value.left+(t-w)/N*z.value.width}const{minX:a,maxX:l}=Ut.value,i=l-a;if(l===0||i===0)return z.value.left+z.value.width/2;const p=i/oe.value.scale,g=a-oe.value.offsetX/z.value.width*i,b=(t-g)/p;return z.value.left+b*z.value.width},wl=t=>{const{minY:a,maxY:l}=Ut.value,i=l-a||1;return z.value.bottom-(t-a)/i*z.value.height},Lo=t=>{const{minY:a,maxY:l}=$o.value,i=l-a||1;return z.value.bottom-(t-a)/i*z.value.height},xl=(t,a)=>Rl.value&&Qn(t)==="secondary"?Lo(a):wl(a),go=t=>{if(!jt.value)return ft.value||4;const{maxSize:a}=Ut.value,l=Math.max(1,a),i=Math.min(1,Math.max(0,t/l));return Un.value+i*(mo.value-Un.value)},Hn=(t,a=12,l="Arial, sans-serif")=>{if(typeof t!="string"||!t)return 0;if(typeof document>"u")return t.length*(a*.62);Hn.canvas||(Hn.canvas=document.createElement("canvas"));const i=Hn.canvas.getContext("2d");return i?(i.font=`${a}px ${l}`,i.measureText(t).width):t.length*(a*.62)},ho=(t,a,l=12)=>{if(typeof t!="string"||typeof a!="number"||a<=0||Hn(t,l)<=a)return t;const i="..";if(Hn(i,l)>=a)return i;let g=t.length;for(;g>0;){const b=`${t.slice(0,g)}${i}`;if(Hn(b,l)<=a)return b;g-=1}return i},Ao=e.computed(()=>s.value.map(t=>({y:t.y}))),o=e.computed(()=>{if(jt.value)return n();if(be.value==="bar"){if(Jt.value){const Le=[],{minY:Re,maxY:$t}=Ut.value,zt=5,jl=$t-Re||1;for(let gl=0;gl<=zt;gl++){const Kl=Re+jl*(gl/zt),Io=Cn(Kl);Le.push({x:Io,y:z.value.bottom+20,text:Wt(Math.round(Kl))})}return Le}const ke=[],{maxX:Ne}=Ut.value,he=Ne+1,je=5,Te=(z.value.width-je*2)/he;for(let Le=0;Le<=Ne;Le++){const Re=z.value.left+je+(Le+.5)*Te;ke.push({x:Re,y:z.value.bottom+20,text:ho(F.categories[Le]||M("chart.fallback.item",{number:Le+1}),Math.max(Te-8,24))})}return ke}const t=[],{minX:a,maxX:l}=Ut.value,i=Gt.value!==null?Gt.value:a,p=Lt.value!==null?Lt.value:l,g=p-i||1,b=g/oe.value.scale,w=i-oe.value.offsetX/z.value.width*g,P=w+b,N=Math.max(0,Math.floor(w-2)),T=Math.min(p,Math.ceil(P+2)),B=T-N,te=z.value.width,Xe=Math.floor(te/60);let me=1;B>Xe&&(me=Math.ceil(B/Xe));for(let ke=N;ke<=T;ke+=me)if(ke>=0&&ke<=p){const Ne=Kt(ke);Ne>=z.value.left-100&&Ne<=z.value.right+100&&t.push({x:Ne,y:z.value.bottom+20,text:F.categories[ke]||`Item ${ke+1}`})}return t}),n=()=>{const t=[],{minX:a,maxX:l}=Ut.value,i=l-a||1,p=Math.min(8,Math.max(4,Math.floor(z.value.width/80)));for(let g=0;g<=p;g++){const b=a+i*g/p,w=Kt(b);if(w>=z.value.left-10&&w<=z.value.right+10){const P=Math.round(b),N=F.categories?.[P];t.push({x:w,y:z.value.bottom+20,text:N||(Number.isInteger(b)?b.toString():b.toFixed(1))})}}return t},s=e.computed(()=>{if(Jt.value){const p=[],{maxX:g}=Ut.value;for(let b=0;b<=g;b++)p.push({x:z.value.left-10,y:Sn(b),text:ho(F.categories[b]||`Item ${b+1}`,Math.max(z.value.left-28,40))});return p}const t=[],{minY:a,maxY:l}=Ut.value,i=5;for(let p=0;p<=i;p++){const g=a+(l-a)*(p/i),b=Math.round(g);t.push({x:z.value.left-10,y:wl(g),text:Wt(b)})}return t}),r=e.computed(()=>{if(!Rl.value||Jt.value)return[];const t=[],{minY:a,maxY:l}=$o.value,i=5;for(let p=0;p<=i;p++){const g=a+(l-a)*(p/i),b=Math.round(g);t.push({x:z.value.right+10,y:Lo(g),text:Wt(b)})}return t}),c=t=>{const a=rl.value;if(!a||a.length===0){const l=["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"];return l[t%l.length]}return a[t%a.length]},d=t=>{if(!t||typeof t!="string")return"#3a3a3a";const a=t.trim();let l=0,i=0,p=0;const g=a.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(g)l=Number(g[1])/255,i=Number(g[2])/255,p=Number(g[3])/255;else{const w=a.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/i);if(w)l=Number(w[1])/255,i=Number(w[2])/255,p=Number(w[3])/255;else{const P=a.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);if(P){let N=P[1];N.length===3&&(N=N[0]+N[0]+N[1]+N[1]+N[2]+N[2]),l=parseInt(N.slice(0,2),16)/255,i=parseInt(N.slice(2,4),16)/255,p=parseInt(N.slice(4,6),16)/255}else if(typeof document<"u"){const N=document.createElement("span");N.style.color=a,N.style.display="none",document.body.appendChild(N);const T=getComputedStyle(N).color;document.body.removeChild(N);const B=T.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(B)l=Number(B[1])/255,i=Number(B[2])/255,p=Number(B[3])/255;else return"#3a3a3a"}else return"#3a3a3a"}}return .2126*l+.7152*i+.0722*p>.5?"#3a3a3a":"#fafafa"},u=t=>{if(!t||typeof t!="string")return t;const a=t.trim(),l=a.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(l){const g=Math.max(0,Math.floor(Number(l[1])*.65)),b=Math.max(0,Math.floor(Number(l[2])*.65)),w=Math.max(0,Math.floor(Number(l[3])*.65));return`rgb(${g}, ${b}, ${w})`}const i=a.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/i);if(i){const g=Math.max(0,Math.floor(Number(i[1])*.65)),b=Math.max(0,Math.floor(Number(i[2])*.65)),w=Math.max(0,Math.floor(Number(i[3])*.65));return`rgba(${g}, ${b}, ${w}, ${i[4]})`}const p=a.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);if(p){let g=p[1];g.length===3&&(g=g[0]+g[0]+g[1]+g[1]+g[2]+g[2]);const b=Math.max(0,Math.min(255,Math.floor(parseInt(g.slice(0,2),16)*.65))),w=Math.max(0,Math.min(255,Math.floor(parseInt(g.slice(2,4),16)*.65))),P=Math.max(0,Math.min(255,Math.floor(parseInt(g.slice(4,6),16)*.65)));return`#${[b,w,P].map(N=>N.toString(16).padStart(2,"0")).join("")}`}return a},m=(t,a)=>{const i=W.value?.stroke?.color;return i==null?u(a):typeof i=="string"?i:Array.isArray(i)&&i.length?i[t%i.length]??u(a):u(a)},v=t=>{let a=0;for(let l=1;l<t.length;l++){const i=t[l].x-t[l-1].x,p=t[l].y-t[l-1].y;a+=Math.sqrt(i*i+p*p)}return a},k=e.computed(()=>be.value==="line"||Ul.value?(Ul.value?F.series.filter(a=>(a.type||be.value)==="line"):tn.value).map((a,l)=>{const i=F.series.findIndex(B=>B===a),p=[];let g=[];a.data.forEach((B,te)=>{B==null?g.length>0&&(p.push([...g]),g=[]):g.push({x:Jt.value?Cn(B):Kt(te),y:Jt.value?Sn(te):xl(a,B),index:te})}),g.length>0&&p.push(g);let b="";p.forEach(B=>{if(B.length>0){let te="";fe.value?te=jn(B):te=`M ${B[0].x} ${B[0].y}`+B.slice(1).map(Se=>` L ${Se.x} ${Se.y}`).join(""),b+=(b?" ":"")+te}});const w=p.reduce((B,te)=>B+v(te),0),P=at.value.has(i),N=de.value===i,T=de.value!==null&&de.value!==i;return{path:b,color:c(i),strokeDasharray:fo(a),pathLength:w,seriesIndex:i,animationDelay:l*Y.value,isHighlighted:N,isDimmed:T,isHidden:P}}):[]),L=e.computed(()=>{if(!(be.value==="line"||Ul.value))return[];const t=Ul.value?F.series.filter(l=>(l.type||be.value)==="line"):tn.value,a=[];return t.forEach((l,i)=>{const p=F.series.findIndex(g=>g===l);for(let g=0;g<l.data.length-1;g++){const b=l.data[g];if(b!=null){let w=-1,P=0;for(let N=g+1;N<l.data.length;N++){const T=l.data[N];if(T==null)P++;else{w=N;break}}if(P>0&&w!==-1){const N=l.data[w],T=Jt.value?Cn(b):Kt(g),B=Jt.value?Sn(g):xl(l,b),te=Jt.value?Cn(N):Kt(w),Se=Jt.value?Sn(w):xl(l,N),Xe=at.value.has(p),me=de.value===p,ke=de.value!==null&&de.value!==p;a.push({path:`M ${T} ${B} L ${te} ${Se}`,color:c(p),seriesIndex:p,animationDelay:i*Y.value,isHighlighted:me,isDimmed:ke,isHidden:Xe,gapSize:P}),g=w-1}}}}),a}),R=e.computed(()=>be.value==="line"||Ul.value?!St.value||_n.value||It.value.hasAnimated?[]:(Ul.value?F.series.filter(a=>(a.type||be.value)==="line"):tn.value).map((a,l)=>{const i=F.series.findIndex(P=>P===a);let p="",g=null;a.data.forEach((P,N)=>{if(P!=null){const T={x:Jt.value?Cn(P):Kt(N),y:Jt.value?Sn(N):xl(a,P)};g===null?p+=`M ${T.x} ${T.y}`:p+=` L ${T.x} ${T.y}`,g=T}else if(g!==null){const T=a.data.findIndex((B,te)=>te>N&&B!==null&&B!==void 0);if(T!==-1){const B={x:Jt.value?Cn(a.data[T]):Kt(T),y:Jt.value?Sn(T):xl(a,a.data[T])};p+=` L ${B.x} ${B.y}`,g=B}}});const b=a.data.map((P,N)=>P==null?null:{x:Jt.value?Cn(P):Kt(N),y:Jt.value?Sn(N):xl(a,P)}).filter(P=>P!==null),w=v(b);return{path:p,pathLength:w,color:c(i),strokeDasharray:fo(a),animationDelay:l*Y.value,seriesIndex:i}}):[]),E=e.computed(()=>{if(be.value!=="line")return[];const t=[];return tn.value.forEach((a,l)=>{const i=de.value===l,p=de.value!==null&&de.value!==l,g=at.value.has(l);a.data.forEach((b,w)=>{b!=null&&t.push({x:Kt(w),y:xl(a,b),color:c(l),value:b,label:F.categories[w]||w.toString(),seriesName:a.name,categoryIndex:w,dataIndex:w,animationDelay:(l*a.data.length+w)*(Y.value/8),isHighlighted:i,isDimmed:p,isHidden:g})})}),t}),ae=e.computed(()=>{if(!Ul.value)return[];const t=[];return F.series.filter(l=>(l.type||be.value)==="line").forEach((l,i)=>{const p=F.series.findIndex(P=>P===l),g=de.value===p,b=de.value!==null&&de.value!==p,w=at.value.has(p);l.data.forEach((P,N)=>{P!=null&&t.push({x:Kt(N),y:xl(l,P),color:c(p),value:P,label:F.categories[N]||N.toString(),seriesName:l.name,categoryIndex:N,dataIndex:N,animationDelay:(i*l.data.length+N)*(Y.value/8),isHighlighted:g,isDimmed:b,isHidden:w})})}),t}),j=e.computed(()=>{if(!jt.value)return[];const t=[];return tn.value.forEach((a,l)=>{if(!a?.data?.length)return;const i=de.value,p=i!==null&&i===l,g=i!==null&&i!==l,b=at.value.has(l);a.data.forEach((w,P)=>{let N,T,B,te,Se;if(typeof w=="object"&&w!==null&&!Array.isArray(w))N=typeof w.x=="number"?w.x:P,T=typeof w.y=="number"?w.y:0,B=typeof w.size=="number"?w.size:20,te=w.label||F.categories?.[P]||`Point ${P+1}`,Se=w.image||w.imageUrl;else if(Array.isArray(w)&&w.length>=3)N=typeof w[0]=="number"?w[0]:P,T=typeof w[1]=="number"?w[1]:0,B=typeof w[2]=="number"?w[2]:20,te=w[3]||F.categories?.[P]||`Point ${P+1}`,Se=w[4];else if(typeof w=="number")N=P,T=w,B=Bo(l,P),te=F.categories?.[P]||`Point ${P+1}`;else return;!isFinite(N)||!isFinite(T)||!isFinite(B)||t.push({x:Kt(N),y:wl(T),radius:go(B),originalX:N,originalY:T,originalSize:B,color:c(l),seriesName:a.name||`Series ${l+1}`,label:te,imageUrl:Se,seriesIndex:l,dataIndex:P,categoryIndex:Math.round(N),isHighlighted:p,isDimmed:g,isHidden:b,opacity:Gn.value})})}),t}),Ie=e.computed(()=>be.value!=="area"?[]:tn.value.map((t,a)=>{const l=[];let i=[];if(t.data.forEach((B,te)=>{B==null?i.length>0&&(l.push([...i]),i=[]):i.push({x:Kt(te),y:xl(t,B),index:te})}),i.length>0&&l.push(i),l.length===0)return{linePath:"",areaPath:"",color:c(a),isHidden:at.value.has(a)};const p=z.value.bottom+1;let g="",b="";l.forEach((B,te)=>{if(B.length===0)return;let Se=`M ${B[0].x} ${B[0].y}`;fe.value&&B.length>1?Se=jn(B):B.slice(1).forEach(me=>{Se+=` L ${me.x} ${me.y}`}),g+=(g?" ":"")+Se;let Xe=`M ${B[0].x} ${p}`;if(Xe+=` L ${B[0].x} ${B[0].y}`,fe.value&&B.length>1){const me=jn(B),ke=me.substring(me.indexOf("C")||me.indexOf("Q")||me.indexOf("L"));ke?Xe+=" "+ke:B.slice(1).forEach(Ne=>{Xe+=` L ${Ne.x} ${Ne.y}`})}else B.slice(1).forEach(me=>{Xe+=` L ${me.x} ${me.y}`});Xe+=` L ${B[B.length-1].x} ${p} Z`,b+=(b?" ":"")+Xe});const w=de.value===a,P=de.value!==null&&de.value!==a,N=at.value.has(a),T=l.reduce((B,te)=>B+v(te),0);return{linePath:g,areaPath:b,color:c(a),pathLength:T,isHighlighted:w,isDimmed:P,isHidden:N}})),Ve=e.computed(()=>{if(!(["bar"].includes(be.value)||Ul.value))return[];const t=[],{maxX:a}=Ut.value,l=Ul.value?F.series.filter(p=>(p.type||be.value)==="bar"):tn.value,i=l.length;if(Jt.value){const p=a+1,b=z.value.height/p,w=b*(2/3),P=Math.min(4,w/i*.15),N=w-(i-1)*P,T=Math.max(4,N/i);l.forEach((B,te)=>{const Se=F.series.findIndex(Ne=>Ne===B),Xe=de.value===Se,me=de.value!==null&&de.value!==Se,ke=at.value.has(Se);B.data.forEach((Ne,he)=>{if(Ne==null||typeof Ne!="number"||!isFinite(Ne))return;const Te=z.value.top+(he+.5)*b-w/2+te*(T+P),Le=z.value.left,Re=Math.abs(Cn(Ne)-z.value.left);let $t="";if(fe.value&&Re>0){const zt=Math.min(Nt.value,T/2,Re/2);$t=[`M ${Le} ${Te}`,`L ${Le+Re-zt} ${Te}`,`Q ${Le+Re} ${Te} ${Le+Re} ${Te+zt}`,`L ${Le+Re} ${Te+T-zt}`,`Q ${Le+Re} ${Te+T} ${Le+Re-zt} ${Te+T}`,`L ${Le} ${Te+T}`,"Z"].join(" ")}t.push({x:Le,y:Te,width:Re,height:T,color:c(i===1?he:Se),value:Ne,label:F.categories[he]||he.toString(),seriesName:B.name,animationDelay:(te*l.length+he)*(Y.value/4),isHighlighted:Xe,isDimmed:me,isHidden:ke,barPath:$t,isSmooth:fe.value&&Re>0})})})}else{const p=a+1,b=z.value.width/p,w=b*.8,P=w/i,N=P*.05,T=P-N;l.forEach((B,te)=>{const Se=F.series.findIndex(Ne=>Ne===B),Xe=de.value===Se,me=de.value!==null&&de.value!==Se,ke=at.value.has(Se);B.data.forEach((Ne,he)=>{if(Ne==null||typeof Ne!="number"||!isFinite(Ne))return;const Te=z.value.left+(he+.5)*b-w/2+te*P+N/2,Le=wl(Math.max(0,Ne)),Re=Math.abs(wl(0)-wl(Ne));let $t="";if(fe.value&&Re>0){const zt=Math.min(Nt.value,T/2,Re/2);$t=[`M ${Te} ${Le+Re}`,`L ${Te} ${Le+zt}`,`Q ${Te} ${Le} ${Te+zt} ${Le}`,`L ${Te+T-zt} ${Le}`,`Q ${Te+T} ${Le} ${Te+T} ${Le+zt}`,`L ${Te+T} ${Le+Re}`,"Z"].join(" ")}t.push({x:Te,y:Le,width:T,height:Re,color:c(i===1?he:Se),value:Ne,label:F.categories[he]||he.toString(),seriesName:B.name,animationDelay:(te*l.length+he)*(Y.value/4),isHighlighted:Xe,isDimmed:me,isHidden:ke,barPath:$t,isSmooth:fe.value&&Re>0})})})}return t}),nt=e.computed(()=>{if(!Cl.value)return[];const t=tn.value.map((b,w)=>({series:b,originalIndex:w})).filter(({originalIndex:b})=>!at.value.has(b));if(t.length===0)return[];let a=be.value==="semi-radial"?Math.PI:-Math.PI/2;const l=be.value==="semi-radial"?Math.PI:Math.PI*2,i=[],p=(b,w,P,N,T,B)=>{const te=b+(w-b)/2,Se=w-b,Xe=Ft.value+Math.cos(b)*Zt.value,me=wt.value+Math.sin(b)*Zt.value,ke=Ft.value+Math.cos(w)*Zt.value,Ne=wt.value+Math.sin(w)*Zt.value,he=Ft.value+Math.cos(w)*it.value,je=wt.value+Math.sin(w)*it.value,Pe=Ft.value+Math.cos(b)*it.value,Te=wt.value+Math.sin(b)*it.value,Le=Se>Math.PI?1:0,Re=[`M ${Xe} ${me}`,`A ${Zt.value} ${Zt.value} 0 ${Le} 1 ${ke} ${Ne}`,`L ${he} ${je}`,`A ${it.value} ${it.value} 0 ${Le} 0 ${Pe} ${Te}`,"Z"].join(" "),$t=B||c(P);return{path:Re,color:$t,strokeWidth:xt.value,strokeColor:m(i.length,$t),value:T,seriesName:N,opacity:.8,isHighlighted:de.value===P,isDimmed:de.value!==null&&de.value!==P,isHidden:!1,startAngle:b,endAngle:w,midAngle:te}};if(On.value){const{series:b,originalIndex:w}=t[0],P=Number(b?.data?.[0]??0),N=Number.isFinite(P)?Math.min(Math.max(P,0),100):0,T=W.value,B=Math.min(Math.max(Number(T?.miniRadial?.minVisiblePercent??1),0),100),Se=(N<=0?B:N)/100*l,Xe=Number(T?.miniRadial?.thresholds?.low??33),me=Number(T?.miniRadial?.thresholds?.medium??66),ke=T?.miniRadial?.colors?.low||"#E53E3E",Ne=T?.miniRadial?.colors?.medium||"#ED8936",he=T?.miniRadial?.colors?.high||"#38A169",je=N<=Xe?ke:N<=me?Ne:he,Pe=T?.miniRadial?.trackColor||"#E5E7EB",Te=b?.name||"Score";return i.push(p(a,a+l-.001,w+1,"Track",100,Pe)),i.push(p(a,a+Se,w,Te,N,je)),i}if(t.length===1){const{series:b,originalIndex:w}=t[0],P=b.data[0]||0,N=a,T=a+l-.001,B=N+l/2,te=Ft.value+Math.cos(N)*Zt.value,Se=wt.value+Math.sin(N)*Zt.value,Xe=Ft.value+Math.cos(T)*Zt.value,me=wt.value+Math.sin(T)*Zt.value,ke=Ft.value+Math.cos(T)*it.value,Ne=wt.value+Math.sin(T)*it.value,he=Ft.value+Math.cos(N)*it.value,je=wt.value+Math.sin(N)*it.value,Pe=1,Te=[`M ${te} ${Se}`,`A ${Zt.value} ${Zt.value} 0 ${Pe} 1 ${Xe} ${me}`,`L ${ke} ${Ne}`,`A ${it.value} ${it.value} 0 ${Pe} 0 ${he} ${je}`,"Z"].join(" "),Le=c(w);return i.push({path:Te,color:Le,strokeWidth:xt.value,strokeColor:m(0,Le),value:P,seriesName:b.name,opacity:.8,isHighlighted:de.value===w,isDimmed:!1,isHidden:!1,startAngle:N,endAngle:T,midAngle:B}),i}if(mn.value&&t.length===2){const b=t[0],w=t[1],P=Math.min(100,Math.max(0,b.series.data[0]||0)),N=P/100*l;return i.push(p(a,a+N,b.originalIndex,b.series.name,P)),i.push(p(a,a+l,w.originalIndex,w.series.name,100)),i}const g=t.reduce((b,{series:w})=>b+(w.data[0]||0),0);return g===0?[]:(t.forEach(({series:b,originalIndex:w})=>{const P=b.data[0]||0,N=P/g*l,T=a,B=a+N,te=T+N/2,Se=Ft.value+Math.cos(T)*Zt.value,Xe=wt.value+Math.sin(T)*Zt.value,me=Ft.value+Math.cos(B)*Zt.value,ke=wt.value+Math.sin(B)*Zt.value,Ne=Ft.value+Math.cos(B)*it.value,he=wt.value+Math.sin(B)*it.value,je=Ft.value+Math.cos(T)*it.value,Pe=wt.value+Math.sin(T)*it.value,Te=N>Math.PI?1:0,Le=[`M ${Se} ${Xe}`,`A ${Zt.value} ${Zt.value} 0 ${Te} 1 ${me} ${ke}`,`L ${Ne} ${he}`,`A ${it.value} ${it.value} 0 ${Te} 0 ${je} ${Pe}`,"Z"].join(" "),Re=c(w);i.push({path:Le,color:Re,strokeWidth:xt.value,strokeColor:m(i.length,Re),value:P,seriesName:b.name,opacity:.8,isHighlighted:de.value===w,isDimmed:de.value!==null&&de.value!==w,isHidden:!1,startAngle:T,endAngle:B,midAngle:te}),a=B}),i)}),bl=e.computed(()=>{const t=nt.value;return mn.value&&t.length>=2?[{segment:t[1],originalIndex:1},{segment:t[0],originalIndex:0}]:t.map((a,l)=>({segment:a,originalIndex:l}))}),fl=e.computed(()=>{if(!O.value||!Cl.value)return[];const t=_.value,a=ce.value,l=$e.value,i=dt.value,p=15,g=t*1.3,b=.55,w=(B,te)=>{const Se=Ft.value+Math.cos(B.midAngle)*it.value,Xe=wt.value+Math.sin(B.midAngle)*it.value,me=Ft.value+Math.cos(B.midAngle)*(it.value+a),ke=wt.value+Math.sin(B.midAngle)*(it.value+a),he=me+l*(te?1:-1),je=te?me+p:me-p,Pe=ke-i,Te=`${B.seriesName}: ${Wt(B.value)}`,Le=Te.length*t*b;return{pointerStartX:Se,pointerStartY:Xe,pointerEndX:me,pointerEndY:ke,horizontalEndX:he,horizontalEndY:ke,textX:je,textY:Pe,text:Te,textWidth:Le,textAnchor:te?"start":"end",isRightSide:te,pointerLineLength:Math.hypot(me-Se,ke-Xe),horizontalLineLength:Math.hypot(he-me,0)}},P=(B,te)=>{const Se=Math.abs(B.textY-te.textY)<g,Xe=B.isRightSide?B.textX:B.textX-B.textWidth,me=B.isRightSide?B.textX+B.textWidth:B.textX,ke=te.isRightSide?te.textX:te.textX-te.textWidth,Ne=te.isRightSide?te.textX+te.textWidth:te.textX,he=Xe<Ne&&ke<me;return Se&&he},N=nt.value.filter(B=>!B.isHidden),T=[];for(let B=0;B<N.length;B++){const te=N[B];let Se=Math.cos(te.midAngle)>=0;if(B>0){const me=T[B-1],ke=w(te,Se);P(me,ke)&&(Se=!Se)}const Xe=w(te,Se);T.push({...Xe,color:te.color,isHighlighted:te.isHighlighted,isDimmed:te.isDimmed})}return T}),sl=t=>{if(!t||t.isHidden)return 0;const a=t.opacity||Gn.value||.7;return de.value===null||de.value===void 0?a:de.value!==null?t.seriesIndex===de.value?Math.min(1,a+.1):Math.max(.5,a*.8):a},vl=t=>{if(!t||t.isHidden)return 0;const a=t.radius>20?.9:.8;return de.value!==null?t.seriesIndex===de.value?Math.min(1,a+.1):a*.7:a},cl=(t,a)=>{if(t)try{if(de.value===t.seriesIndex?de.value=null:de.value=t.seriesIndex,typeof window<"u"&&window.dispatchEvent){const l=new CustomEvent("dss-bubble-click",{detail:{bubble:t,originalEvent:a,chartId:F.chartId}});window.dispatchEvent(l)}}catch(l){console.error("Error in onBubbleClick:",l)}},ul=(t,a)=>{const l=[`dss-bubble-fallback-${a}`];return t.isHighlighted&&l.push("dss-bubble-highlighted"),t.isDimmed&&l.push("dss-bubble-dimmed"),t.isHidden&&l.push("dss-bubble-hidden"),l.push(`dss-bubble-series-${t.seriesIndex}`),l.join(" ")},Xl=(t,a)=>{if(!t||(a.stopPropagation(),Ro.value=!0,de.value=t.seriesIndex,st.value.show=!1,!Ue.value))return;const l=a.target.closest(".dss-custom-chart-container");if(!l)return;const i=l.getBoundingClientRect();let p=a.clientX-i.left+10,g=a.clientY-i.top-10;const b=200,w=120;p+b>xe.value&&(p=a.clientX-i.left-b-10),g+w>i.height&&(g=a.clientY-i.top-w-10),p<0&&(p=10),g<0&&(g=10);const P=Qt.value,N=ol.value,T=P.map(B=>{const te=N[B]||B,Se=pn(B,t);return Se?{seriesName:t.seriesName,label:t.label,value:`${te}: ${Se}`,color:t.color}:null}).filter(Boolean);kt.value={show:!0,x:p,y:g,title:t.label||t.seriesName||"",value:"",bubbleData:T,categoryIndex:void 0,spiderAreas:[]}},pn=(t,a)=>{let l;switch(t){case"x":l=a.originalX;break;case"y":l=a.originalY;break;case"size":l=a.originalSize;break;case"label":l=a.label;break;case"seriesName":l=a.seriesName;break;default:l=a[t]||""}const i=rn.value[t];if(typeof i=="function")return i(l,a);if(typeof l=="number"){const p=l.toFixed(1);return on.value?p+on.value:p}return l?.toString()||""},bn=()=>{if(!jt.value||!st.value.data||st.value.data.length===0)return"Bubbles";const t=[],a=new Set;return st.value.data.forEach(l=>{if(l.seriesName&&l.label){const i=`${l.seriesName} - ${l.label}`;a.has(i)||(t.push(i),a.add(i))}else l.seriesName&&(a.has(l.seriesName)||(t.push(l.seriesName),a.add(l.seriesName)))}),t.length>0?t.join(" | "):"Bubbles"},yo=(t,a)=>{t&&(Ro.value=!1,de.value=null,kt.value.show=!1,kt.value.bubbleData=[])},To=(t,a)=>{const l=a.target.closest(".dss-custom-chart-container");if(!l)return;const i=l.getBoundingClientRect(),p=zn(t.categoryIndex),g=t.description||t.comment||"";let b=a.clientX-i.left+15,w=a.clientY-i.top-10;const P=200,N=g?80:50;b+P>xe.value&&(b=a.clientX-i.left-P-15),w+N>ee.value&&(w=a.clientY-i.top-N-10),b<0&&(b=10),w<0&&(w=10),ml.value={show:!0,x:b,y:w,categoryValue:p,description:g}},jo=()=>{ml.value.show=!1},Mn=e.computed(()=>F.categories.length||Math.max(...ln.value.map(t=>t.data.length))),la=e.computed(()=>{let t=0;return ln.value.forEach(a=>{a.data.forEach(l=>{typeof l=="number"&&(t=Math.max(t,l))})}),t||100}),ko=e.computed(()=>{const t=[],a=Mn.value;for(let l=0;l<a;l++){const i=l*2*Math.PI/a-Math.PI/2,p=Ft.value+Math.cos(i)*it.value,g=wt.value+Math.sin(i)*it.value;t.push({x:p,y:g,angle:i,index:l})}return t}),Jn=e.computed(()=>{const t=[],a=Mn.value;return ko.value.forEach((l,i)=>{const p=it.value+15,g=i*2*Math.PI/a-Math.PI/2,b=Ft.value+Math.cos(g)*p,w=wt.value+Math.sin(g)*p+5;let P="middle",N="middle";Math.abs(Math.cos(g))>.5&&(P=Math.cos(g)>0?"start":"end"),Math.abs(Math.sin(g))>.5&&(N=Math.sin(g)>0?"hanging":"auto"),t.push({x:b,y:w,text:F.categories[i]||`Axis ${i+1}`,anchor:P,baseline:N})}),t}),Do=e.ref(new Set),fn=(t,a,l)=>{const i=`current-${l}`,p=Do.value.has(i);return!p&&de.value===null?a.fillOpacity||gt.value:a.isHighlighted||p?(a.fillOpacity||gt.value)+.15:a.isDimmed?(a.fillOpacity||gt.value)*.3:a.fillOpacity||gt.value},nn=e.computed(()=>{if(!Ll.value)return[];const t=[],a=Mn.value;return tn.value.forEach((l,i)=>{const p=[],g=[],b=[],w=de.value===i,P=de.value!==null&&de.value!==i,N=at.value.has(i);for(let T=0;T<a;T++){const B=l.data[T]||0,Se=B/la.value*it.value,Xe=T*2*Math.PI/a-Math.PI/2,me=Ft.value+Math.cos(Xe)*Se,ke=wt.value+Math.sin(Xe)*Se;p.push(`${me},${ke}`),g.push({x:me,y:ke}),b.push({x:me,y:ke,value:B,label:F.categories[T]||`Axis ${T+1}`,seriesName:l.name})}t.push({points:p.join(" "),polygonPoints:g,dataPoints:b,color:c(i),fillOpacity:gt.value,seriesName:l.name,value:`${l.name}: ${l.data.join(", ")}`,isHighlighted:w,isDimmed:P,isHidden:N,seriesIndex:i})}),t}),Yl=(t,a)=>{if(!a||a.length<3)return!1;let l=!1;for(let i=0,p=a.length-1;i<a.length;p=i++){const g=a[i].x,b=a[i].y,w=a[p].x,P=a[p].y;b>t.y!=P>t.y&&t.x<(w-g)*(t.y-b)/(P-b)+g&&(l=!l)}return l},na=t=>{if(!Ll.value)return;const a=t.currentTarget.closest(".dss-custom-chart-container");if(!a)return;const l=a.getBoundingClientRect(),i=$.value?.getBoundingClientRect();if(!i)return;const p=t.clientX-i.left,g=t.clientY-i.top,b=nn.value.filter(w=>w.isHidden?!1:Yl({x:p,y:g},w.polygonPoints));if(b.length>0){b.length,de.value=b[0].seriesIndex;const w=t.clientX-l.left+10,P=t.clientY-l.top-10,N=b.length>1?460:260,T=70+Mn.value*20;let B=w,te=P;B+N>xe.value&&(B=t.clientX-l.left-N-10),te+T>ee.value&&(te=t.clientY-l.top-T-10),B<0&&(B=10),te<0&&(te=10);const Se=b.map(Xe=>({seriesName:Xe.seriesName,color:Xe.color,points:Xe.dataPoints.map(me=>({label:me.label,value:Wt(me.value)}))}));kt.value={show:!0,x:B,y:te,title:"",value:"",bubbleData:[],spiderAreas:Se}}else wn()},Ho=e.computed(()=>{const t=W.value;return t.logos.map((a,l)=>{const i=F.series[a.seriesIndex];if(!i||!i.data||i.data.length===0||at.value.has(a.seriesIndex))return null;let p,g;if(Sl.value){let w=-1,P=null;for(let T=i.data.length-1;T>=0;T--)if(i.data[T]!==null&&i.data[T]!==void 0){w=T,P=i.data[T];break}if(w===-1||P===null)return null;const N=i.data.map((T,B)=>T==null?null:{x:Kt(B),y:xl(i,T),index:B}).filter(T=>T!==null);if(t.animations.enabled&&!_n.value&&t.animations.type==="draw"&&t.chart.type==="line"&&(It.value.isAnimating||!It.value.hasAnimated))if(It.value.isAnimating){const T=It.value.currentFrame/It.value.totalFrames,B=Qo(t.animations.easing,Math.min(T,1)),te=xa(N,B);p=te.x+(a.offsetX||0),g=te.y+(a.offsetY||0)}else p=N[0].x+(a.offsetX||0),g=N[0].y+(a.offsetY||0);else p=Kt(w)+(a.offsetX||0),g=wl(P)+(a.offsetY||0)}else if(Cl.value||Ll.value){const w=Math.PI*2/t.logos.length*l;p=Ft.value+Math.cos(w)*(it.value+30)+(a.offsetX||0),g=wt.value+Math.sin(w)*(it.value+30)+(a.offsetY||0)}return{...a,x:p,y:g,seriesIndex:a.seriesIndex}}).filter(Boolean)}),va=t=>{const a=document.querySelector(`.dss-logo-fallback-${t}`),l=document.querySelector(`.dss-logo-image-${t}`);a&&(a.style.opacity="0"),l&&(l.style.opacity="1")},ga=t=>{console.warn(`Logo ${t} failed to load, keeping fallback circle`);const a=document.querySelector(`.dss-logo-image-${t}`);a&&(a.style.display="none")},Ko=t=>{at.value.has(t)?at.value.delete(t):at.value.add(t)},ha=e.computed(()=>{if(!kt.value.show&&!(Ke.value&&st.value.show&&!oe.value.isZooming))return{display:"none"};let t,a;if(Ke.value&&st.value.show&&!oe.value.isZooming){t=st.value.x+15,a=z.value.top;const l=jt.value?200:150;t+l>xe.value&&(t=st.value.x-l-15),t<0&&(t=10),a<10&&(a=10)}else t=kt.value.x,a=kt.value.y;return{left:t+"px",top:a+"px"}}),Rn=(t,a)=>{if(!Ue.value||Co.value)return;const i=a.target.closest(".dss-custom-chart-container").getBoundingClientRect();let p=a.clientX-i.left+10,g=a.clientY-i.top-10;const b=200,w=120,P=xe.value,N=ee.value;p+b>P&&(p=a.clientX-i.left-b-10),g+w>N&&(g=a.clientY-i.top-w-10),p<0&&(p=10),g<0&&(g=10);let T;typeof t.categoryIndex=="number"?T=t.categoryIndex:typeof t.dataIndex=="number"?T=t.dataIndex:t.label&&F.categories.includes(t.label)&&(T=F.categories.indexOf(t.label));const B=(Jt.value||be.value==="bar")&&t.label?t.label:t.seriesName||t.label||"";kt.value={show:!0,x:p,y:g,title:B,value:Wt(t.value)||"",categoryIndex:T,spiderAreas:[]}},Go=e.ref(!1),Ro=e.ref(!1),wn=()=>{kt.value.show=!1,kt.value.spiderAreas=[],kt.value.bubbleData=[],st.value.show=!1,Go.value||(de.value=null)},Co=e.ref(!1),bo=(t,a)=>{Co.value=!0,kt.value.show=!1,st.value.show=!1;const i=a.target.closest(".dss-custom-chart-container").getBoundingClientRect();let p=a.clientX-i.left+15,g=a.clientY-i.top-10;const b=250;p+b>xe.value&&(p=a.clientX-i.left-b-15),p<0&&(p=10),g<0&&(g=10),kl.value={show:!0,x:p,y:g,content:t.texts,count:t.totalCount}},wo=()=>{Co.value=!1,kl.value.show=!1},It=e.ref({isAnimating:!1,currentFrame:0,totalFrames:0,animationId:null,hasAnimated:!1}),Qo=(t,a)=>{switch(t){case"linear":return a;case"ease":return a<.5?2*a*a:-1+(4-2*a)*a;case"ease-in":return a*a;case"ease-out":return a*(2-a);case"ease-in-out":return a<.5?2*a*a:-1+(4-2*a)*a;default:return a}},_n=e.computed(()=>ze.value?window.matchMedia("(prefers-reduced-motion: reduce)").matches:!1),oa=()=>{if(!St.value||_n.value){It.value.hasAnimated=!0,en.value&&(Bn.value=1);return}en.value&&(Bn.value=0),It.value.isAnimating=!0,It.value.currentFrame=0,It.value.totalFrames=Math.ceil(S.value/16.67);const t=()=>{const a=It.value.currentFrame/It.value.totalFrames,l=Qo(V.value,Math.min(a,1));ya(l),en.value&&(Bn.value=l),a<1?(It.value.currentFrame++,It.value.animationId=requestAnimationFrame(t)):ka()};It.value.animationId=requestAnimationFrame(t)},ya=t=>{const a=I.value;a&&a.style.setProperty("--dss-animation-progress",t)},ka=()=>{It.value.isAnimating=!1,It.value.hasAnimated=!0,en.value&&(Bn.value=1),It.value.animationId&&(cancelAnimationFrame(It.value.animationId),It.value.animationId=null)},Jo=e.computed(()=>!Cl.value||It.value.hasAnimated?!0:en.value?Bn.value>=1:Pl.value?An.value>=1:!0),aa=e.computed(()=>O.value&&Jo.value),Fo=e.ref(!1);e.watch(aa,t=>{t?(Fo.value=!1,e.nextTick(()=>{requestAnimationFrame(()=>{Fo.value=!0})})):Fo.value=!1},{immediate:!0});const Ca=e.computed(()=>{if(!St.value||_n.value||It.value.hasAnimated)return{};const t={};return t["--dss-animation-duration"]=`${S.value}ms`,t["--dss-animation-easing"]=ba(V.value),t["--dss-stagger-delay"]=`${Y.value}ms`,t}),ba=t=>({linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out"})[t]||"ease-out",wa=()=>{if(!St.value||_n.value)return"";const t=["dss-chart-animated"];return It.value.hasAnimated||t.push(`dss-animate-${ll.value}`),It.value.hasAnimated||(Cl.value&&be.value!=="semi-radial"?t.push("dss-animate-fill"):Cl.value||t.push(`dss-animate-${ll.value}`)),It.value.isAnimating&&t.push("dss-is-animating"),t.join(" ")};e.watch(()=>F.series,(t,a)=>{le.value&&a&&It.value.hasAnimated&&(It.value.hasAnimated=!1,e.nextTick(()=>{setTimeout(()=>oa(),C.value)}))},{deep:!0}),e.watch(()=>oe.value.isZooming,(t,a)=>{a&&!t&&setTimeout(()=>{Pn()},50)}),e.watch(()=>[oe.value.scale,oe.value.offsetX],()=>{!oe.value.isZooming&&!oe.value.isDragging&&Pn()},{flush:"post"}),e.watch([Ot,We],([t,a])=>{oe.value.minScale=t,oe.value.maxScale=a,(oe.value.scale<t||oe.value.scale>a)&&uo()},{immediate:!0}),e.watch(()=>F.locale,t=>{t&&t!==A.value&&(A.value=t)},{immediate:!0}),e.watch(()=>vt.value.show,t=>{t?e.nextTick(()=>{document.addEventListener("click",io)}):document.removeEventListener("click",io)}),e.onMounted(()=>{de.value=null,en.value&&(!St.value||_n.value)&&(Bn.value=1),x(),I.value&&typeof ResizeObserver<"u"&&(f=new ResizeObserver(t=>{const a=t[0];!a||!a.contentRect||(we&&cancelAnimationFrame(we),we=requestAnimationFrame(()=>{we=null;const{width:l,height:i}=a.contentRect;ct.value=Math.round(l),Q.value=Math.round(i),ve.value&&(Me.value=ve.value.offsetHeight||Ce)}))}),f.observe(I.value)),St.value&&!_n.value?be.value==="semi-radial"?setTimeout(()=>Xo(),C.value):setTimeout(()=>oa(),C.value):(It.value.hasAnimated=!0,be.value==="semi-radial"&&(An.value=1)),document.addEventListener("mousemove",sa),document.addEventListener("mouseup",ra),document.addEventListener("click",Eo)}),e.onUnmounted(()=>{we&&cancelAnimationFrame(we),f&&I.value&&(f.unobserve(I.value),f.disconnect(),f=null),It.value.animationId&&cancelAnimationFrame(It.value.animationId),Zn&&(cancelAnimationFrame(Zn),Zn=null),oe.value.zoomTimeout&&clearTimeout(oe.value.zoomTimeout),document.removeEventListener("mousemove",sa),document.removeEventListener("mouseup",ra),document.removeEventListener("click",Eo),document.removeEventListener("click",io)});const sa=t=>{if(oe.value.isDragging&&oe.value.scale>1&&Sl.value){st.value.show=!1;const a=t.clientX-oe.value.lastMouseX,{minX:l,maxX:i}=Ut.value,p=i-l||1,b=a*.8;oe.value.offsetX+=b;const w=p/oe.value.scale,P=p-w,N=0,T=-P/p*z.value.width,B=N;oe.value.offsetX=Math.max(T,Math.min(B,oe.value.offsetX)),oe.value.lastMouseX=t.clientX,oe.value.lastMouseY=t.clientY}},ra=()=>{oe.value.isDragging&&(oe.value.isDragging=!1,setTimeout(()=>{!oe.value.isDragging&&oe.value.isZooming},100))},xa=(t,a)=>{const l=t.filter(w=>w!=null);if(!l||l.length===0)return{x:0,y:0};if(l.length===1||a<=0)return l[0];if(a>=1)return l[l.length-1];let i=0;const p=[];for(let w=1;w<l.length;w++){const P=l[w].x-l[w-1].x,N=l[w].y-l[w-1].y,T=Math.sqrt(P*P+N*N);p.push(T),i+=T}const g=i*a;let b=0;for(let w=0;w<p.length;w++){const P=b+p[w];if(g<=P){const N=(g-b)/p[w],T=l[w],B=l[w+1];return{x:T.x+(B.x-T.x)*N,y:T.y+(B.y-T.y)*N}}b=P}return l[l.length-1]};return(t,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["dss-custom-chart-container",[wa(),{"dss-chart-fill-width":Ze.value,"dss-chart-fill-height":qe.value,"dss-chart-compact":Cl.value&&!K.value}]]),style:e.normalizeStyle({width:Ze.value?"100%":xe.value+"px",height:lt.value,...Ze.value||qe.value?{overflow:Cl.value?"visible":"hidden",maxWidth:"100%",maxHeight:"100%"}:{},...Ca.value,cursor:Zo()}),"data-chart-type":be.value,ref_key:"containerEl",ref:I,onWheel:So,onMousedown:co,onMousemove:zl,onMouseup:Vo,onMouseleave:In,onDblclick:uo,onContextmenu:e.withModifiers(Ln,["prevent"]),onClick:e.withModifiers(Wl,["left"]),onWheelCapture:So},[e.createElementVNode("div",{class:"dss-chart-header",ref_key:"headerEl",ref:ve},[e.createElementVNode("div",bs,[ut.value?(e.openBlock(),e.createElementBlock("div",ws,e.toDisplayString(ut.value),1)):e.createCommentVNode("",!0),Ct.value?(e.openBlock(),e.createElementBlock("div",xs,e.toDisplayString(Ct.value),1)):e.createCommentVNode("",!0)]),K.value&&ye.value==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dss-chart-legend",{"dss-legend-horizontal":Be.value==="horizontal","dss-legend-vertical":Be.value==="vertical","dss-legend-top":ye.value==="top","dss-legend-bottom":ye.value==="bottom"}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.series,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-${i}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":at.value.has(i),"dss-legend-hovered":de.value===i,"dss-legend-dimmed":de.value!==null&&de.value!==i}]),onClick:p=>Ko(i),onMouseenter:p=>Il(i),onMouseleave:il,style:e.normalizeStyle({animationDelay:`${i*100}ms`})},[e.createElementVNode("div",{class:"dss-legend-color",style:e.normalizeStyle({backgroundColor:c(i)})},null,4),e.createElementVNode("span",Ss,e.toDisplayString(l.name),1)],46,Es))),128))],2)):e.createCommentVNode("",!0),K.value&&(ye.value==="left"||ye.value==="right")?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-chart-legend-side",{"dss-legend-left":ye.value==="left","dss-legend-right":ye.value==="right"}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.series,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-${i}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":at.value.has(i),"dss-legend-hovered":de.value===i,"dss-legend-dimmed":de.value!==null&&de.value!==i}]),onClick:p=>Ko(i),onMouseenter:p=>Il(i),onMouseleave:il,style:e.normalizeStyle({animationDelay:`${i*100}ms`})},[e.createElementVNode("div",{class:"dss-legend-color",style:e.normalizeStyle({backgroundColor:c(i)})},null,4),e.createElementVNode("span",Ns,e.toDisplayString(l.name),1)],46,Vs))),128))],2)):e.createCommentVNode("",!0)],512),H.showAddMarkerButton&&ht.value&&yt.value.addMarker&&(Sl.value||jt.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-add-marker-button",onClick:xo,title:e.unref(M)("chart.contextMenu.addMarker")},[e.createElementVNode("img",{src:_t.value,class:"dss-add-marker-button-icon",alt:"Marker Icon",style:{width:"100%",height:"100%","object-fit":"contain","border-radius":"50%","pointer-events":"none"}},null,8,Ms),a[4]||(a[4]=e.createElementVNode("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M10 4V16M4 10H16",stroke:"hsl(60, 2%, 47%)","stroke-width":"2","stroke-linecap":"round"})],-1))],8,Bs)):e.createCommentVNode("",!0),e.createElementVNode("div",_s,[jt.value&&Et.value?(e.openBlock(),e.createElementBlock("div",$s,"Bubble size: "+e.toDisplayString(Et.value),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{width:xe.value,height:ee.value,class:"dss-chart-svg","data-smooth":fe.value,"data-animated":St.value,ref_key:"svgEl",ref:$},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",{id:U.value},[e.createElementVNode("rect",{x:0,y:z.value.top,width:xe.value,height:z.value.height*4},null,8,Ts)],8,As),Pl.value?(e.openBlock(),e.createElementBlock("clipPath",{key:0,id:Kn.value},[e.createElementVNode("path",{d:Vn.value},null,8,Hs)],8,Ds)):e.createCommentVNode("",!0),en.value?(e.openBlock(),e.createElementBlock("clipPath",{key:1,id:Tn.value},[e.createElementVNode("path",{d:Wn.value},null,8,Fs)],8,Rs)):e.createCommentVNode("",!0)]),Sl.value||jt.value?(e.openBlock(),e.createElementBlock("g",Is,[qt.value?(e.openBlock(),e.createElementBlock("g",{key:0,class:"dss-grid-lines","clip-path":pe.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ao.value,(l,i)=>(e.openBlock(),e.createElementBlock("line",{key:`h-grid-${i}`,x1:z.value.left,x2:z.value.right,y1:l.y,y2:l.y,stroke:"#e0e0e0","stroke-width":"1","stroke-dasharray":"4,2",style:e.normalizeStyle({animationDelay:`${i*50}ms`})},null,12,Ps))),128))],8,zs)):e.createCommentVNode("",!0),e.createElementVNode("g",Os,[e.createElementVNode("line",{x1:z.value.left,x2:z.value.right,y1:z.value.bottom,y2:z.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,qs),e.createElementVNode("line",{x1:z.value.left,x2:z.value.left,y1:z.value.top,y2:z.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,Ws),Rl.value?(e.openBlock(),e.createElementBlock("line",{key:0,x1:z.value.right,x2:z.value.right,y1:z.value.top,y2:z.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,Zs)):e.createCommentVNode("",!0)]),e.createElementVNode("g",Us,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(l,i)=>(e.openBlock(),e.createElementBlock("text",{key:`x-${i}`,x:l.x,y:l.y,"text-anchor":"middle","font-size":"12",fill:"#666",style:e.normalizeStyle({animationDelay:`${i*100}ms`})},e.toDisplayString(l.text),13,Xs))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(l,i)=>(e.openBlock(),e.createElementBlock("text",{key:`y-${i}`,x:l.x,y:l.y,"text-anchor":"end","font-size":"12",fill:"#666","dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${i*80}ms`})},e.toDisplayString(l.text),13,Ys))),128)),Rl.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.value,(l,i)=>(e.openBlock(),e.createElementBlock("text",{key:`y-secondary-${i}`,x:l.x,y:l.y,"text-anchor":"start","font-size":"12",fill:"#666","dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${i*80}ms`})},e.toDisplayString(l.text),13,js))),128)):e.createCommentVNode("",!0),Ht.value?(e.openBlock(),e.createElementBlock("text",{key:1,x:z.value.left+z.value.width/2,y:z.value.bottom+45,"text-anchor":"middle","font-size":"14","font-weight":"bold",fill:"#333"},e.toDisplayString(Ht.value),9,Ks)):e.createCommentVNode("",!0),Pt.value?(e.openBlock(),e.createElementBlock("text",{key:2,x:15,y:z.value.top+12+z.value.height/2,"text-anchor":"middle","font-size":"14","font-weight":"bold",fill:"#333",transform:`rotate(-90, 15, ${z.value.top+z.value.height/2})`},e.toDisplayString(Pt.value),9,Gs)):e.createCommentVNode("",!0),Rl.value&&ge.value?(e.openBlock(),e.createElementBlock("text",{key:3,x:xe.value-15,y:z.value.top+12+z.value.height/2,"text-anchor":"middle","font-size":"14","font-weight":"bold",fill:"#333",transform:`rotate(90, ${xe.value-15}, ${z.value.top+z.value.height/2})`},e.toDisplayString(ge.value),9,Qs)):e.createCommentVNode("",!0)]),Jl.value.length>0?(e.openBlock(),e.createElementBlock("g",Js,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Jl.value,l=>(e.openBlock(),e.createElementBlock("g",{key:`flag-group-${l.categoryIndex}`},[e.createElementVNode("g",{"clip-path":pe.value},[l.hasManual?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x,x2:l.x,y1:z.value.bottom,y2:z.value.top,stroke:"#698dbe","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:i=>bo(l,i),onMouseleave:wo},null,40,tr)):e.createCommentVNode("",!0),l.hasAuto&&!l.hasManual?(e.openBlock(),e.createElementBlock("line",{key:1,x1:l.x,x2:l.x,y1:z.value.bottom,y2:z.value.top,stroke:"#a1d499","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:i=>bo(l,i),onMouseleave:wo},null,40,lr)):e.createCommentVNode("",!0),l.hasAuto&&l.hasManual?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.x,x2:l.x,y1:z.value.bottom,y2:z.value.top,stroke:"#698dbe","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:i=>bo(l,i),onMouseleave:wo},null,40,nr)):e.createCommentVNode("",!0)],8,er),l.hasManual&&l.hasAuto?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x+8,cy:Math.max(15,z.value.top-10),r:"14",fill:"#a1d499",stroke:"#fafafa","stroke-width":"2",class:"flag-count-circle",onMouseover:i=>bo(l,i),onMouseleave:wo},null,40,or)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:l.x,cy:Math.max(15,z.value.top-10),r:"14",fill:l.hasManual&&l.hasAuto||l.hasManual?"#698dbe":"#a1d499",stroke:"#fafafa","stroke-width":"2",class:"dss-flag-count-indicator",onMouseover:i=>bo(l,i),onMouseleave:wo},null,40,ar),e.createElementVNode("text",{x:l.x,y:Math.max(15,z.value.top-5),"text-anchor":"middle","font-size":"12","font-weight":"bold",fill:"#fafafa",class:"dss-flag-count-text","pointer-events":"none"},e.toDisplayString(l.totalCount),9,sr)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",{class:"dss-chart-data","clip-path":pe.value},[Ul.value?(e.openBlock(),e.createElementBlock("g",ir,[e.createElementVNode("g",{class:e.normalizeClass(["dss-bar-chart",{"dss-horizontal-bars":Jt.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ve.value,(l,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`mixed-bar-${i}`},[l.isSmooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:l.barPath,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":l.isHighlighted,"dss-bar-dimmed":l.isDimmed,"dss-bar-hidden":l.isHidden}),style:e.normalizeStyle({fill:l.color,fillOpacity:l.isDimmed?.4:1,animationDelay:`${l.animationDelay}ms`}),onMouseover:p=>Rn(l,p),onMouseleave:wn},null,46,cr)):(e.openBlock(),e.createElementBlock("rect",{key:1,x:l.x,y:l.y,width:l.width,height:l.height,fill:l.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":l.isHighlighted,"dss-bar-dimmed":l.isDimmed,"dss-bar-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`}),onMouseover:p=>Rn(l,p),onMouseleave:wn},null,46,ur))],64))),128))],2),e.createElementVNode("g",dr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`mixed-line-${i}`,d:l.path,stroke:l.color,"stroke-width":l.isHighlighted?Fe.value+2:Fe.value,"stroke-dasharray":l.strokeDasharray,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":l.isHighlighted,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({"--dss-path-length":l.pathLength,animationDelay:`${l.animationDelay}ms`})},null,14,mr))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`mixed-gap-connector-${i}`,d:l.path,stroke:l.color,"stroke-width":l.isHighlighted?Fe.value+2:Fe.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":"15, 10, 5, 10",opacity:l.isHighlighted?0:.5,class:e.normalizeClass({"dss-gap-connector":!0,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`,transition:"opacity 0.2s ease"})},null,14,pr))),128)),ft.value>0||J.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(ae.value,(l,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`mixed-point-${i}`,cx:l.x,cy:l.y,r:X(l.isHighlighted?Z(l,ft.value)+2:Z(l,ft.value)),fill:l.color,stroke:"none",class:e.normalizeClass({"dss-point-highlighted":l.isHighlighted,"dss-point-dimmed":l.isDimmed,"dss-point-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`}),onMouseover:p=>Rn(l,p),onMouseleave:wn},null,46,fr))),128)):e.createCommentVNode("",!0)])])):be.value==="line"?(e.openBlock(),e.createElementBlock("g",vr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`anim-${i}`,d:l.path,stroke:l.color,"stroke-width":Fe.value,"stroke-dasharray":l.strokeDasharray,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass(["dss-line-animation-overlay",{"dss-animation-complete":It.value.hasAnimated}]),style:e.normalizeStyle({"--dss-path-length":l.pathLength,animationDelay:`${l.animationDelay}ms`})},null,14,gr))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`line-${i}`,d:l.path,stroke:l.color,"stroke-width":l.isHighlighted?Fe.value+2:Fe.value,"stroke-dasharray":l.strokeDasharray,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":l.isHighlighted,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({"--dss-path-length":l.pathLength,animationDelay:`${l.animationDelay}ms`})},null,14,hr))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`gap-connector-${i}`,d:l.path,stroke:l.color,"stroke-width":l.isHighlighted?Fe.value+2:Fe.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":"15, 10, 5, 10",opacity:l.isHighlighted?0:.5,class:e.normalizeClass({"dss-gap-connector":!0,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`,transition:"opacity 0.2s ease"})},null,14,yr))),128)),ft.value>0||J.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(E.value,(l,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`point-${i}`,cx:l.x,cy:l.y,r:X(l.isHighlighted?Z(l,ft.value)+2:Z(l,ft.value)),fill:l.color,stroke:"none",class:e.normalizeClass({"dss-point-highlighted":l.isHighlighted,"dss-point-dimmed":l.isDimmed,"dss-point-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`}),onMouseover:p=>Rn(l,p),onMouseleave:wn},null,46,kr))),128)):e.createCommentVNode("",!0)])):be.value==="area"?(e.openBlock(),e.createElementBlock("g",Cr,[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ie.value,(l,i)=>(e.openBlock(),e.createElementBlock("mask",{key:`mask-${i}`,id:`area-mask-${i}-${H.chartId}`},[e.createElementVNode("rect",{x:z.value.left-10,y:z.value.top-10,width:z.value.width+20,height:z.value.height+20,fill:"#fafafa",class:"dss-area-mask-rect",style:e.normalizeStyle({"--dss-mask-width":`${z.value.width+20}px`})},null,12,wr)],8,br))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ie.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`area-fill-${i}`,d:l.areaPath,fill:l.color,"fill-opacity":l.isHighlighted?re.value+.2:re.value,mask:`url(#area-mask-${i}-${H.chartId})`,class:e.normalizeClass({"dss-area-fill-smooth":!0,"dss-series-highlighted":l.isHighlighted,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden})},null,10,xr))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ie.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`area-line-${i}`,d:l.linePath,stroke:l.color,"stroke-width":l.isHighlighted?Fe.value+1:Fe.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-area-line-animated":!0,"dss-series-highlighted":l.isHighlighted,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({"--dss-path-length":l.pathLength,animationDelay:`${i*Y.value}ms`})},null,14,Er))),128))])):be.value==="bar"?(e.openBlock(),e.createElementBlock("g",{key:3,class:e.normalizeClass({"dss-horizontal-bars":Jt.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ve.value,(l,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bar-${i}`},[l.isSmooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:l.barPath,fill:l.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":l.isHighlighted,"dss-bar-dimmed":l.isDimmed,"dss-bar-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${l.animationDelay}ms`}),onMouseover:p=>Rn(l,p),onMouseleave:wn},null,46,Sr)):(e.openBlock(),e.createElementBlock("rect",{key:1,x:l.x,y:l.y,width:l.width,height:l.height,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":l.isHighlighted,"dss-bar-dimmed":l.isDimmed,"dss-bar-hidden":l.isHidden}),style:e.normalizeStyle({fill:l.color,fillOpacity:l.isDimmed?.4:1,animationDelay:`${l.animationDelay}ms`}),onMouseover:p=>Rn(l,p),onMouseleave:wn},null,46,Vr))],64))),128))],2)):e.createCommentVNode("",!0)],8,rr),Ke.value&&st.value.show&&!oe.value.isZooming?(e.openBlock(),e.createElementBlock("g",{key:2,class:"dss-crosshair","clip-path":pe.value},[e.createElementVNode("line",{x1:st.value.x,x2:st.value.x,y1:z.value.top,y2:z.value.bottom,stroke:Tt.value,"stroke-width":"1","stroke-dasharray":"4,4",opacity:"0.8"},null,8,Br),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(st.value.data,(l,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`dss-crosshair-point-${i}`,cx:st.value.x,cy:l.y,r:X(ft.value+2),fill:l.color,stroke:"none",opacity:"0.9"},null,8,Mr))),128))],8,Nr)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),jt.value?(e.openBlock(),e.createElementBlock("g",_r,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,(l,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bubble-${i}`},[l?(e.openBlock(),e.createElementBlock("g",$r,[e.createElementVNode("circle",{cx:l.x,cy:l.y,r:X(l.radius),fill:l.color,"fill-opacity":sl(l),stroke:l.color,"stroke-width":"1","stroke-opacity":"0.8",class:e.normalizeClass(ul(l,i)),style:{cursor:"pointer",transition:"all 0.3s ease"},onMouseenter:p=>Xl(l,p),onMouseleave:p=>yo(l),onClick:p=>cl(l,p)},null,42,Lr),l.imageUrl?(e.openBlock(),e.createElementBlock("image",{key:0,x:l.x-l.radius*.65,y:l.y-l.radius*.65,width:l.radius*1.3,height:l.radius*1.3,"xlink:href":l.imageUrl,class:e.normalizeClass(`dss-bubble-image-${i} ${l.isHighlighted?"dss-bubble-highlighted":""} ${l.isDimmed?"dss-bubble-dimmed":""} ${l.isHidden?"dss-bubble-hidden":""}`),"clip-path":`circle(${l.radius*.65}px at ${l.radius*.65}px ${l.radius*.65}px)`,style:e.normalizeStyle({cursor:"pointer",transition:"all 0.3s ease",opacity:vl(l)}),onLoad:p=>Mo(i),onError:p=>po(i),onMouseenter:p=>Xl(l,p),onMouseleave:p=>yo(l),onClick:p=>cl(l,p)},null,46,Ar)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0),Cl.value?(e.openBlock(),e.createElementBlock("g",{key:2,class:"radial-chart",transform:tl.value},[be.value==="radial"?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:Ft.value,cy:wt.value,r:it.value,fill:"none",stroke:"#e0e0e0","stroke-width":"1"},null,8,Dr)):e.createCommentVNode("",!0),e.createElementVNode("g",{class:"dss-radial-data","data-chart-type":be.value,"clip-path":No.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(bl.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`radial-${l.originalIndex}-${i}`,d:l.segment.path,fill:l.segment.color,"fill-opacity":l.segment.isHighlighted?(l.segment.opacity||.8)+.2:l.segment.opacity||.8,stroke:l.segment.strokeWidth?l.segment.strokeColor||l.segment.color:"none","stroke-width":l.segment.strokeWidth||0,"clip-path":Uo(l.originalIndex),class:e.normalizeClass({"dss-series-highlighted":l.segment.isHighlighted,"dss-series-dimmed":l.segment.isDimmed,"dss-series-hidden":l.segment.isHidden}),onMouseover:p=>Rn(l.segment,p),onMouseleave:wn},null,42,Rr))),128))],8,Hr),Qe.value&&Jo.value?(e.openBlock(),e.createElementBlock("g",Fr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($n.value,(l,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("text",{key:`radial-segment-label-${i}`,x:l.x,y:l.y,"text-anchor":"middle","dominant-baseline":"middle",class:"dss-radial-segment-data-label",style:e.normalizeStyle({fill:l.contrastColor})},e.toDisplayString(l.value),13,Ir)),[[e.vShow,l.show]])),128))])):e.createCommentVNode("",!0),Dt.value&&(Jo.value||Pl.value||On.value)?(e.openBlock(),e.createElementBlock("text",{key:2,x:Nl.value.x,y:Nl.value.y,"text-anchor":"middle","dominant-baseline":"middle","font-size":Dl.value,fill:Ol.value,class:"dss-radial-data-center"},e.toDisplayString(nl.value),9,zr)):e.createCommentVNode("",!0),aa.value?(e.openBlock(),e.createElementBlock("g",{key:3,class:e.normalizeClass(["dss-radial-labels dss-radial-labels-initial",{"dss-radial-labels-animated":Fo.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(fl.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",{key:`radial-label-${i}`,class:e.normalizeClass(["dss-radial-label-group",{"dss-label-highlighted":l.isHighlighted,"dss-label-dimmed":l.isDimmed}]),style:e.normalizeStyle({"--label-delay":`${i*.08}s`})},[e.createElementVNode("line",{class:"dss-radial-label-line dss-radial-label-line-pointer",x1:l.pointerStartX,y1:l.pointerStartY,x2:l.pointerEndX,y2:l.pointerEndY,stroke:l.color,"stroke-width":"1.5",opacity:"0.8",style:e.normalizeStyle({"--line-length":l.pointerLineLength})},null,12,Pr),e.createElementVNode("line",{class:"dss-radial-label-line dss-radial-label-line-horizontal",x1:l.pointerEndX,y1:l.pointerEndY,x2:l.horizontalEndX,y2:l.horizontalEndY,stroke:l.color,"stroke-width":"1.5",opacity:"0.8",style:e.normalizeStyle({"--line-length":l.horizontalLineLength})},null,12,Or),e.createElementVNode("text",{class:"dss-radial-label-text",x:l.textX,y:l.textY,"text-anchor":l.textAnchor,"font-size":_.value,"dominant-baseline":"middle"},e.toDisplayString(l.text),9,qr)],6))),128))],2)):e.createCommentVNode("",!0)],8,Tr)):e.createCommentVNode("",!0),Ll.value?(e.openBlock(),e.createElementBlock("g",{key:3,class:"dss-spider-chart",transform:tl.value},[qt.value?(e.openBlock(),e.createElementBlock("g",Zr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Oe.value,(l,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-grid-circle-${i}`,cx:Ft.value,cy:wt.value,r:X(l),fill:"none",stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${i*150}ms`})},null,12,Ur))),128)),e.createElementVNode("g",Xr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Oe.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-grid-label-group-${i}`},[e.createElementVNode("rect",{x:Ft.value-16,y:wt.value-l-7,width:"32",height:"16",fill:"transparent",stroke:"none"},null,8,Yr),e.createElementVNode("text",{x:Ft.value,y:wt.value-l+2,"text-anchor":"middle","dominant-baseline":"central",class:"dss-spider-grid-label",style:{fontSize:"10px",fill:"#999",fontWeight:"600"}},e.toDisplayString(Bt(i)),9,jr)]))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ko.value,(l,i)=>(e.openBlock(),e.createElementBlock("line",{key:`spider-axis-${i}`,x1:Ft.value,x2:l.x,y1:wt.value,y2:l.y,stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${i*100}ms`})},null,12,Kr))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",Gr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Jn.value,(l,i)=>(e.openBlock(),e.createElementBlock("text",{key:`spider-label-${i}`,x:l.x+Math.cos(i*2*Math.PI/Mn.value-Math.PI/2)*16,y:l.y+Math.sin(i*2*Math.PI/Mn.value-Math.PI/2)*16,"text-anchor":l.anchor,"dominant-baseline":l.baseline,"font-size":"14px",fill:"#666","font-weight":"500",style:e.normalizeStyle({animationDelay:`${i*120}ms`})},e.toDisplayString(l.text.charAt(0).toUpperCase()+l.text.slice(1)),13,Qr))),128))]),e.createElementVNode("g",{class:"dss-spider-data",onMousemove:na,onMouseleave:wn},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(nn.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-${i}`},[e.createElementVNode("polygon",{points:l.points,fill:l.color,"fill-opacity":fn("current",l,i),stroke:l.color,"stroke-width":l.isHighlighted?Fe.value+1:Fe.value,"stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":l.isHighlighted,"dss-series-dimmed":l.isDimmed,"dss-series-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${i*Y.value}ms`,transition:"all 0.2s ease"})},null,14,Jr),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.dataPoints,(p,g)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-point-${i}-${g}`,cx:p.x,cy:p.y,r:X(l.isHighlighted?ft.value+1:ft.value>0?ft.value:0),fill:l.color,stroke:"none",class:e.normalizeClass({"dss-point-highlighted":l.isHighlighted,"dss-point-dimmed":l.isDimmed,"dss-point-hidden":l.isHidden}),style:e.normalizeStyle({animationDelay:`${i*Y.value+g*50}ms`,transition:"all 0.2s ease"}),onMouseover:b=>Rn(p,b),onMouseleave:wn},null,46,ei))),128))]))),128))],32)],8,Wr)):e.createCommentVNode("",!0),e.createElementVNode("g",ti,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ho.value,(l,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`logo-fallback-${i}`,cx:l.x,cy:l.y,r:X(l.width/2),fill:c(l.seriesIndex),stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass(`logo-fallback-${i}`),style:e.normalizeStyle({animationDelay:`${i*200}ms`})},null,14,li))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ho.value,(l,i)=>(e.openBlock(),e.createElementBlock("image",{key:`logo-${i}`,x:l.x-l.width/2,y:l.y-l.height/2,width:l.width,height:l.height,"xlink:href":l.url,onLoad:p=>va(i),onError:p=>ga(i),preserveAspectRatio:"xMidYMid slice",class:e.normalizeClass(`dss-logo-image-${i}`),"clip-path":`circle(${l.width/2}px at ${l.width/2}px ${l.height/2}px)`,style:e.normalizeStyle({animationDelay:`${i*200}ms`})},null,46,ni))),128))])],8,Ls))]),an.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-chart-watermark",style:e.normalizeStyle({position:"absolute",top:"0px",left:"0px",width:xe.value+"px",height:ee.value+"px",backgroundImage:`url('${D.value}')`,backgroundRepeat:"no-repeat",...Fl.value,opacity:Tl.value,pointerEvents:"none",zIndex:10})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(gn.value,(l,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:"marker-"+l.id,class:"dss-chart-marker",style:e.normalizeStyle({position:"absolute",left:l.x+"px",top:l.y+"px",width:Al.value+"px",height:Al.value+"px",backgroundColor:"#fafafa",borderRadius:"50%",border:"2px solid #ddd",cursor:"pointer",zIndex:500}),onClick:e.withModifiers(p=>y(l),["stop"]),onMouseenter:p=>To(l,p),onMouseleave:jo},[e.createElementVNode("img",{src:cn(l),class:"dss-marker-icon",alt:"Marker Icon",style:{width:"100%",height:"100%","object-fit":"contain","border-radius":"50%","pointer-events":"none"}},null,8,ai)],44,oi)),[[e.vShow,dl.value]])),128)),ml.value.show?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-marker-tooltip",style:e.normalizeStyle({left:ml.value.x+"px",top:ml.value.y+"px"})},[e.createElementVNode("div",si,e.toDisplayString(ml.value.categoryValue),1),ml.value.description?(e.openBlock(),e.createElementBlock("div",ri,e.toDisplayString(ml.value.description),1)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),Ue.value&&(kt.value.show||Ke.value&&st.value.show&&!oe.value.isZooming)?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["dss-chart-tooltip",{"dss-crosshair-tooltip":Ke.value&&st.value.show&&!oe.value.isZooming,"dss-spider-tooltip":Ll.value&&kt.value.spiderAreas&&kt.value.spiderAreas.length>0}]),style:e.normalizeStyle(ha.value)},[!Ke.value||!st.value.show||oe.value.isZooming?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[Ll.value&&kt.value.spiderAreas&&kt.value.spiderAreas.length>0?(e.openBlock(),e.createElementBlock("div",ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(kt.value.spiderAreas,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`spider-tooltip-area-${i}`,class:"dss-spider-tooltip-area"},[e.createElementVNode("div",ci,[e.createElementVNode("span",{class:"dss-spider-tooltip-area-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createTextVNode(" "+e.toDisplayString(l.seriesName),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.points,(p,g)=>(e.openBlock(),e.createElementBlock("div",{key:`spider-tooltip-point-${i}-${g}`,class:"dss-tooltip-series"},[e.createElementVNode("span",ui,e.toDisplayString(p.label),1),e.createElementVNode("span",di,e.toDisplayString(p.value),1)]))),128))]))),128))])):jt.value&&kt.value.bubbleData&&kt.value.bubbleData.length>0?(e.openBlock(),e.createElementBlock("div",mi,[kt.value.title?(e.openBlock(),e.createElementBlock("div",pi,e.toDisplayString(kt.value.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",fi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(kt.value.bubbleData,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`bubble-tooltip-${i}`,class:"dss-bubble-tooltip-item"},e.toDisplayString(l.value),1))),128))])])):(e.openBlock(),e.createElementBlock("div",vi,[e.createElementVNode("div",gi,e.toDisplayString(kt.value.title),1),e.createElementVNode("div",hi,e.toDisplayString(kt.value.value),1)])),kt.value.categoryIndex!==void 0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[yl(kt.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",yi,[a[5]||(a[5]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",ki,e.toDisplayString(e.unref(M)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(yl(kt.value.categoryIndex).flagGroups,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-flag-group-${i}`},[e.createElementVNode("div",Ci,[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createElementVNode("span",null,e.toDisplayString(l.type),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.flags,(p,g)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-flag-${i}-${g}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",bi,[e.createElementVNode("div",wi,e.toDisplayString(p.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),yl(kt.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",xi,[a[6]||(a[6]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Ei,e.toDisplayString(e.unref(M)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(yl(kt.value.categoryIndex).markers,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-marker-${i}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createElementVNode("div",Si,[e.createElementVNode("div",Vi,e.toDisplayString(l.title),1),l.description?(e.openBlock(),e.createElementBlock("div",Ni,e.toDisplayString(l.description),1)):e.createCommentVNode("",!0)])]))),128))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Bi,[e.createElementVNode("div",Mi,e.toDisplayString(jt.value?bn():H.categories[st.value.categoryIndex]||`Category ${st.value.categoryIndex+1}`),1),jt.value?(e.openBlock(),e.createElementBlock("div",_i,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(st.value.data,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${i}`,class:"dss-bubble-tooltip-item"},e.toDisplayString(l.value),1))),128))])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(st.value.data,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${i}`,class:"dss-tooltip-series"},[e.createElementVNode("div",{class:"dss-tooltip-series-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createElementVNode("span",$i,e.toDisplayString(l.seriesName)+":",1),e.createElementVNode("span",Li,e.toDisplayString(Wt(l.value)),1)]))),128))]),yl(st.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",Ai,[a[7]||(a[7]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Ti,e.toDisplayString(e.unref(M)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(yl(st.value.categoryIndex).flagGroups,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-flag-group-${i}`},[e.createElementVNode("div",Di,[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createElementVNode("span",null,e.toDisplayString(l.type),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.flags,(p,g)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-flag-${i}-${g}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",Hi,[e.createElementVNode("div",Ri,e.toDisplayString(p.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),yl(st.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",Fi,[a[8]||(a[8]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Ii,e.toDisplayString(e.unref(M)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(yl(st.value.categoryIndex).markers,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-dss-marker-${i}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:l.color})},null,4),e.createElementVNode("div",zi,[e.createElementVNode("div",Pi,e.toDisplayString(l.title),1),l.description?(e.openBlock(),e.createElementBlock("div",Oi,e.toDisplayString(l.description),1)):e.createCommentVNode("",!0)])]))),128))])):e.createCommentVNode("",!0)],64))],6)):e.createCommentVNode("",!0),Sl.value&&et.value&&oe.value.scale>1?(e.openBlock(),e.createElementBlock("div",{key:4,class:"dss-zoom-indicator",onClick:uo},[a[9]||(a[9]=e.createElementVNode("span",{style:{display:"inline-block",transform:"scaleX(-1)","font-size":"14px"}},"⌕",-1)),e.createTextVNode(" "+e.toDisplayString(Math.round(oe.value.scale*100))+"% "+e.toDisplayString(e.unref(M)("chart.zoom.doubleClickToReset")),1)])):e.createCommentVNode("",!0)],46,Cs),K.value&&ye.value==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dss-chart-legend",{"dss-legend-horizontal":Be.value==="horizontal","dss-legend-vertical":Be.value==="vertical","dss-legend-bottom":!0}]),style:{display:"flex","flex-wrap":"wrap","justify-content":"center",padding:"6px 8px 0"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.series,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-bottom-${i}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":at.value.has(i),"dss-legend-hovered":de.value===i,"dss-legend-dimmed":de.value!==null&&de.value!==i}]),onClick:p=>Ko(i),onMouseenter:p=>Il(i),onMouseleave:il,style:e.normalizeStyle({animationDelay:`${i*100}ms`})},[e.createElementVNode("div",{class:"dss-legend-color",style:e.normalizeStyle({backgroundColor:c(i)})},null,4),e.createElementVNode("span",Wi,e.toDisplayString(l.name),1)],46,qi))),128))],2)):e.createCommentVNode("",!0),vt.value.show?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-chart-context-menu",style:e.normalizeStyle({left:vt.value.x+"px",top:vt.value.y+"px"}),onClick:a[0]||(a[0]=e.withModifiers(()=>{},["stop"]))},[yt.value.addMarker?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-context-menu-item",onClick:ro},e.toDisplayString(e.unref(M)("chart.contextMenu.addMarker")),1)):e.createCommentVNode("",!0),yt.value.addMarker&&(yt.value.downloadSvg||yt.value.downloadPng||yt.value.downloadCsv||Mt.value.length>0)?(e.openBlock(),e.createElementBlock("div",Zi)):e.createCommentVNode("",!0),yt.value.downloadSvg?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-context-menu-item",onClick:_l},e.toDisplayString(e.unref(M)("chart.contextMenu.downloadSvg")),1)):e.createCommentVNode("",!0),yt.value.downloadPng?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-context-menu-item",onClick:Hl},e.toDisplayString(e.unref(M)("chart.contextMenu.downloadPng")),1)):e.createCommentVNode("",!0),yt.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",{key:4,class:"dss-context-menu-item",onClick:ql},e.toDisplayString(e.unref(M)("chart.contextMenu.downloadCsv")),1)):e.createCommentVNode("",!0),Mt.value.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[yt.value.downloadSvg||yt.value.downloadPng||yt.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",Ui)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Mt.value,(l,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"custom-"+i},[l.separator?(e.openBlock(),e.createElementBlock("div",Xi)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(Xn(l)),style:e.normalizeStyle(Yn(l)),onClick:p=>En(l)},[l.template?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:pl(l),class:"dss-custom-menu-content"},null,8,ji)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[l.icon?(e.openBlock(),e.createElementBlock("span",Ki,e.toDisplayString(l.icon),1)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(l.label),1)],64))],14,Yi)],64))),128))],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),Ae.value.show?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-marker-modal-overlay",onClick:At},[e.createElementVNode("div",{class:"dss-marker-modal",onClick:a[3]||(a[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Gi,[e.createElementVNode("h3",null,e.toDisplayString(el.value?e.unref(M)("chart.modalMarker.viewMarker"):Bl.value?e.unref(M)("chart.modalMarker.editMarker"):e.unref(M)("chart.contextMenu.addMarker")),1),e.createElementVNode("button",{class:"dss-modal-close-btn",onClick:At},"×")]),e.createElementVNode("div",Qi,[e.createElementVNode("div",Ji,[e.createVNode(ta,{id:"dss-marker-date",mode:"single",modelValue:Ae.value.date,"onUpdate:modelValue":a[1]||(a[1]=l=>Ae.value.date=l),"min-date":so.value,"max-date":al.value,disabled:el.value},null,8,["modelValue","min-date","max-date","disabled"])]),e.createElementVNode("div",ec,[e.createElementVNode("label",tc,e.toDisplayString(e.unref(M)("chart.modalMarker.description")),1),el.value?(e.openBlock(),e.createElementBlock("div",lc,e.toDisplayString(Ae.value.description),1)):e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{key:1,id:"dss-marker-description","onUpdate:modelValue":a[2]||(a[2]=l=>Ae.value.description=l),placeholder:e.unref(M)("chart.modalMarker.placeholderDescription"),class:"dss-form-textarea",rows:"5"},null,8,nc)),[[e.vModelText,Ae.value.description]])])]),e.createElementVNode("div",oc,[e.createElementVNode("div",ac,[Bl.value&&!el.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-btn dss-btn-danger",onClick:Zl},e.toDisplayString(e.unref(M)("chart.modalMarker.deleteMarker")),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",sc,[e.createElementVNode("button",{class:"dss-btn dss-btn-secondary",onClick:At},e.toDisplayString(el.value?e.unref(M)("chart.modalMarker.close"):e.unref(M)("chart.modalMarker.cancel")),1),el.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-btn dss-btn-primary",onClick:kn,disabled:!(Ae.value.description&&Ae.value.description.length)},e.toDisplayString(Bl.value?e.unref(M)("chart.modalMarker.save"):e.unref(M)("chart.contextMenu.addMarker")),9,rc))])])])])):e.createCommentVNode("",!0)],64))}}),uc={class:"dss-modal-title"},dc={class:"dss-modal-actions"},ea={__name:"DSSModal",props:{showModal:{type:Boolean,required:!0},backDrop:{type:Boolean,default:!0},width:{type:String,default:"800px"},height:{type:String,default:"auto"},showCloseBtn:{type:Boolean,default:!0},headerType:{type:String,default:"space-between"},titleSize:{type:String,default:"24px"}},emits:["close-modal"],setup(H,{emit:ne}){const M=H,A=ne,ue=e.ref(null),I=e.ref(null),$=e.computed(()=>{const U={"max-width":M.width};return M.height!=="auto"&&(U.height=M.height,U["min-height"]="0"),U}),ve=e.computed(()=>({}));function ct(){A("close-modal")}function Q(){M.backDrop&&!ue.value&&A("close-modal")}function f(U){U.target.tagName==="INPUT"&&(ue.value=U.target.tagName)}function we(){setTimeout(()=>{ue.value=null},300)}function Ce(){const U=document.body,pe=document.documentElement;I.value={bodyOverflow:U.style.overflow,bodyPosition:U.style.position,bodyTop:U.style.top,bodyWidth:U.style.width,htmlOverflow:pe.style.overflow,scrollY:window.scrollY},U.style.overflow="hidden",U.style.position="fixed",U.style.top=`-${I.value.scrollY}px`,U.style.width="100%",U.style.left="0",pe.style.overflow="hidden"}function G(){if(!I.value)return;const U=document.body,pe=document.documentElement,{bodyOverflow:F,bodyPosition:Ee,bodyTop:De,bodyWidth:tt,htmlOverflow:pt,scrollY:W}=I.value;U.style.overflow=F||"",U.style.position=Ee||"",U.style.top=De||"",U.style.width=tt||"",U.style.left="",pe.style.overflow=pt||"",window.scrollTo(0,W||0)}return e.watch(()=>M.showModal,U=>{if(U)Ce(),document.body.classList.add("dss-modal-open"),setTimeout(()=>{const pe=document.getElementById("dss-modal-backdrop");pe&&(pe.addEventListener("focusin",f),pe.addEventListener("focusout",we))},100);else{G(),document.body.classList.remove("dss-modal-open");const pe=document.getElementById("dss-modal-backdrop");pe&&(pe.removeEventListener("focusin",f),pe.removeEventListener("focusout",we))}},{immediate:!0}),e.onUnmounted(()=>{M.showModal&&G()}),(U,pe)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[H.showModal?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-modal-backdrop",onClick:Q},[e.withDirectives(e.createElementVNode("div",{id:"dss-modal-backdrop",class:"dss-modal",style:e.normalizeStyle($.value)},[e.createElementVNode("div",{class:"dss-modal-content",onClick:pe[0]||(pe[0]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"dss-modal-header",style:e.normalizeStyle({"justify-content":H.headerType,"font-size":H.titleSize})},[e.createElementVNode("h1",uc,[e.renderSlot(U.$slots,"title",{},()=>[pe[1]||(pe[1]=e.createTextVNode("Default Title",-1))])]),e.renderSlot(U.$slots,"title-data"),H.showCloseBtn?(e.openBlock(),e.createElementBlock("span",{key:0,class:"dss-modal-close",onClick:ct,title:"Close"},"×")):e.createCommentVNode("",!0)],4),e.createElementVNode("div",{class:"dss-modal-body",style:e.normalizeStyle(ve.value)},[e.renderSlot(U.$slots,"content",{},()=>[pe[2]||(pe[2]=e.createTextVNode("Default Content",-1))])],4),e.createElementVNode("div",dc,[e.renderSlot(U.$slots,"actions")])])],4),[[e.vShow,H.showModal]])])):e.createCommentVNode("",!0)]))}},mc={key:0,class:"dss-table-toolbar"},pc={class:"dss-table-toolbar-left"},fc=["aria-expanded"],vc={class:"dss-pagination-select-dropdown",role:"listbox"},gc={class:"dss-table-column-visibility-label"},hc={class:"dss-table-checkbox-wrapper"},yc=["checked","onChange"],kc={key:0,class:"dss-table-checkbox__check","aria-hidden":"true"},Cc={class:"dss-table-column-visibility-text"},bc={class:"dss-table-toolbar-right"},wc=["placeholder","aria-label"],xc=["aria-label"],Ec=["aria-label","aria-expanded"],Sc={key:1,class:"dss-table-toolbar-extra"},Vc={class:"dss-table-thead"},Nc={key:0,class:"dss-table-th dss-table-selection-column"},Bc={key:0,class:"dss-table-checkbox-wrapper"},Mc=["checked","indeterminate"],_c={key:0,class:"dss-table-checkbox__indeterminate"},$c={key:1,class:"dss-table-checkbox__check","aria-hidden":"true"},Lc=["aria-label"],Ac=["onClick"],Tc={class:"dss-table-th-content"},Dc={class:"dss-table-th-text"},Hc={key:0},Rc={key:1},Fc={key:2},Ic=["data-filter-column-key","aria-expanded","aria-label","onClick"],zc={class:"dss-table-tbody"},Pc=["onClick"],Oc={class:"dss-table-checkbox-wrapper"},qc=["type","name","checked","disabled","onChange"],Wc={key:0,class:"dss-table-checkbox__check","aria-hidden":"true"},Zc={key:1,class:"dss-table-checkbox__dot"},Uc=["onClick"],Xc=["aria-expanded","aria-label"],Yc={key:1,class:"dss-table-expansion-placeholder","aria-hidden":"true"},jc={key:0,class:"dss-table-expansion-row"},Kc=["colspan"],Gc=["colspan"],Qc={key:1,class:"dss-table-pagination"},Jc={class:"dss-table-pagination-left"},eu={key:0},tu={key:1,class:"dss-table-pagination-placeholder","aria-hidden":"true"},lu={class:"dss-table-pagination-center"},nu={key:0,class:"dss-pagination-controls"},ou=["disabled","title"],au=["disabled","title"],su=["aria-label","onKeydown"],ru={class:"dss-pagination-of"},iu=["disabled","title"],cu=["disabled","title"],uu={class:"dss-table-pagination-right"},du={class:"dss-pagination-rows-label"},mu=["aria-expanded"],pu=["aria-selected","onClick"],fu={key:0,class:"dss-table-filter-row"},vu=["value","placeholder"],gu=["min","max","value"],hu=["min","max","value"],yu={class:"dss-table-filter-double-range-values"},ku={key:2,class:"dss-table-filter-daterange"},Cu={class:"dss-table-filter-daterange-row"},bu={class:"dss-table-filter-daterange-label"},wu=["value"],xu={class:"dss-table-filter-daterange-row"},Eu={class:"dss-table-filter-daterange-label"},Su=["value"],Vu=["value","placeholder"],Nu={class:"dss-table-filter-list"},Bu=["checked","onChange"],Mu={class:"dss-table-filter-actions"},_u={name:"DSSTable"},$u=Object.assign(_u,{props:{data:{type:Array,required:!0,default:()=>[]},columns:{type:Array,required:!0,default:()=>[]},tableId:{type:String,default:()=>"table-"+Math.random().toString(36).substring(2,9)},locale:{type:String,default:null},options:{type:Object,default:()=>({}),validator:H=>typeof H=="object"&&H!==null},columnVisibility:{type:Array,default:null}},emits:["row-click","row-select","row-unselect","select-all","unselect-all","row-expand","row-collapse","sort","page","download-pdf","download-excel","search","update:columnVisibility"],setup(H,{emit:ne}){const{t:M,locale:A}=lo.useI18n(),ue=H,I=ne,$={table:{width:"auto",height:null,rowHeight:"auto",truncated:!1,expandable:!1,expandableRowData:null,expandableRowCondition:null,striped:!1,bordered:!1,hoverable:!0,size:"default",align:"left"},title:{text:""},subtitle:{text:""},selection:{enabled:!1,mode:"single",rowCondition:null},sorting:{enabled:!0,mode:"single"},pagination:{enabled:!1,rows:10,rowsPerPageOptions:[5,10,25,50,100],showCounter:!0,showControlsGroup:!0,showControls:!0,showRowsPerPage:!0},toolbar:{downloads:{pdf:!0,excel:!0},columnVisibility:!0,search:!0},scrollable:!1,emptyMessage:null};function ve(y,h){const x=Object.assign({},y);return ct(y)&&ct(h)&&Object.keys(h).forEach(q=>{ct(h[q])?q in y?x[q]=ve(y[q],h[q]):Object.assign(x,{[q]:h[q]}):Object.assign(x,{[q]:h[q]})}),x}function ct(y){return y&&typeof y=="object"&&!Array.isArray(y)}const Q=e.computed(()=>ve($,ue.options)),f=e.computed(()=>{const y=Q.value.table.width;return y==="auto"?null:typeof y=="number"?y:null}),we=e.computed(()=>Q.value.table.height),Ce=e.computed(()=>Q.value.table.rowHeight??"auto"),G=e.computed(()=>({height:Ce.value})),U=e.computed(()=>Q.value.table.expandable===!0),pe=e.computed(()=>Q.value.table.expandableRowData??null),F=e.computed(()=>Q.value.table.expandableRowCondition??null),Ee=e.computed(()=>Q.value.table.truncated===!0),De=e.computed(()=>Q.value.table.striped),tt=e.computed(()=>Q.value.table.bordered),pt=e.computed(()=>Q.value.table.hoverable),W=e.computed(()=>Q.value.table.size),Ze=e.computed(()=>Q.value.table.align||"left");e.computed(()=>Q.value.title.text),e.computed(()=>Q.value.subtitle.text);const qe=e.computed(()=>Q.value.selection.enabled),xe=e.computed(()=>Q.value.selection.mode),Me=e.computed(()=>Q.value.selection.rowCondition??null),Ye=e.computed(()=>Q.value.sorting.enabled),ee=e.computed(()=>Q.value.sorting.mode),lt=e.computed(()=>Q.value.pagination.enabled),be=e.computed(()=>Q.value.pagination.rows),Je=e.computed(()=>Q.value.pagination.rowsPerPageOptions),ut=e.computed(()=>Q.value.pagination.showCounter!==!1),Ct=e.computed(()=>Q.value.pagination.showControlsGroup),Et=e.computed(()=>Ct.value===!1?!1:Q.value.pagination.showControls!==!1),Ht=e.computed(()=>Ct.value===!1?!1:Q.value.pagination.showRowsPerPage!==!1),Pt=e.computed(()=>lt.value&&(ut.value||Et.value||Ht.value)),se=e.computed(()=>Q.value.scrollable),ge=e.computed(()=>Q.value.emptyMessage||M("table.emptyMessage")),He=e.computed(()=>Q.value.toolbar?.downloads?.pdf!==!1),_e=e.computed(()=>Q.value.toolbar?.downloads?.excel!==!1),Xt=e.computed(()=>Q.value.toolbar?.search!==!1),bt=e.computed(()=>He.value||_e.value||Xt.value||Gt.value),Gt=e.computed(()=>Q.value.toolbar?.columnVisibility!==!1),Lt=e.ref(""),qt=e.ref(!1),K=e.ref(null);let ye=null;function Be(){qt.value?(ye&&(clearTimeout(ye),ye=null),qt.value=!1,Lt.value="",I("search",""),K.value?.blur()):(qt.value=!0,ye=setTimeout(()=>{ye=null,K.value?.focus()},80))}function Ue(){Lt.value||(qt.value=!1)}function Ke(){Lt.value="",I("search",""),K.value?.focus()}const Tt=e.computed(()=>({"dss-table-striped":De.value,"dss-table-bordered":tt.value,"dss-table-hoverable":pt.value,[`dss-table-${W.value}`]:W.value!=="default","dss-table-truncated":Ee.value})),et=(y,h)=>y?.field??y?.key??h,Ot=e.ref(new Set);function We(){const y=new Set;return ue.columns.forEach((h,x)=>{h?.hidden!==!0&&y.add(et(h,x))}),y}function Fe(){const y=new Set;return ue.columns.forEach((h,x)=>{y.add(et(h,x))}),y}function xt(y){if(!Array.isArray(y))return null;const h=Fe(),x=[];return y.forEach(q=>{h.has(q)&&x.push(q)}),x}function ft(){Ot.value=We()}const J=e.computed(()=>{const y=xt(ue.columnVisibility);return y===null?null:new Set(y)}),Z=e.computed(()=>J.value??Ot.value),X=e.computed(()=>ue.columns.filter((y,h)=>Z.value.has(et(y,h)))),re=y=>{const h=ue.columns.findIndex(x=>x===y);return et(y,h>=0?h:0)},fe=(y,h)=>Z.value.has(et(y,h));function Ge(y){I("update:columnVisibility",Array.from(y))}function Nt(y,h){const x=et(y,h),q=new Set(Z.value);q.has(x)?q.delete(x):q.add(x),J.value===null&&(Ot.value=q),Ge(q)}const rl=e.ref(null),St=e.ref(!1);function ll(y){rl.value&&!rl.value.contains(y.target)&&(St.value=!1)}const S=e.computed(()=>X.value.length+(qe.value?1:0)+(U.value?1:0)),C=(y,h)=>y?.id??y?.key??h,V=e.ref(new Set),Y=e.ref(null),le=(y,h)=>V.value.has(C(y,h)),ze=(y,h)=>{if(!U.value)return!1;if(typeof F.value=="function")return!!F.value(y,h);if(typeof pe.value=="string"&&pe.value.trim()){const x=At(y,pe.value.trim());return Array.isArray(x)?x.length>0:x&&typeof x=="object"?Object.keys(x).length>0:x!=null&&x!==""}return!0},gt=(y,h,x)=>{if(x&&x.stopPropagation(),!ze(y,h))return;const q=C(y,h),ie=new Set(V.value);ie.has(q)?(ie.delete(q),I("row-collapse",{data:y,index:h})):(ie.add(q),I("row-expand",{data:y,index:h})),V.value=ie},rt=(y,h)=>{if(!Ee.value)return;const x=C(y,h);Y.value!==x&&(Y.value=x)},Oe=e.ref(null),Bt=e.ref(0),Vt=e.ref([]),ht=y=>{if(ee.value==="single")return Oe.value===y.field?Bt.value:0;{const h=Vt.value.find(x=>x.field===y.field);return h?h.order:0}},yt=y=>{const h=ht(y);return{"dss-sort-active":h!==0,"dss-sort-asc":h===1,"dss-sort-desc":h===-1}},Mt=e.ref({}),_t=e.ref(null),hl=e.ref(null),Al=220,on=e.ref(null),Wt=e.computed(()=>X.value.find(y=>re(y)===_t.value)??null),dl=e.computed(()=>{if(!Wt.value||Wt.value.filter!=="range")return null;const y=Wt.value,h=_t.value,{min:x,max:q}=ce(y),ie=y.filterMin??x,mt=y.filterMax??q,Rt=Tl(h),_l=Rt.min??ie,Hl=Rt.max??mt,ql=mt-ie,En=ql===0?0:(_l-ie)/ql*100,ro=ql===0?100:(Hl-ie)/ql*100;return{rangeMin:ie,rangeMax:mt,currentMin:_l,currentMax:Hl,minPct:En,maxPct:ro}}),vn=e.ref(null),gn=e.ref("max");function an(y){const h=vn.value,x=dl.value;if(!h||!x)return;const q=h.getBoundingClientRect(),mt=(y.clientX-q.left)/q.width*100,Rt=(x.minPct+x.maxPct)/2;gn.value=mt<Rt?"min":"max"}function Tl(y){return Mt.value[y]??{}}function El(y,h){Mt.value={...Mt.value,[y]:h}}function xn(y){const h=Mt.value[y];return h?h.type==="string"?!!h.value?.trim():h.type==="range"?h.min!=null||h.max!=null:h.type==="dateRange"?!!(h.from||h.to):h.type==="list"?h.selected?.length>0:!1:!1}function sn(y){const h={...Mt.value};delete h[y],Mt.value=h,_t.value=null,hl.value=null}function Fl(){if(!_t.value){hl.value=null;return}const y=on.value;if(!y)return;const h=y.querySelector(`.dss-table-filter-trigger[data-filter-column-key="${_t.value}"]`);if(!h)return;const x=h.getBoundingClientRect();hl.value={top:x.bottom+6,left:Math.max(8,x.right-Al)}}const Gl=e.computed(()=>{const y=String(Lt.value??"").trim().toLowerCase();return y?ue.data.filter(h=>X.value.some(x=>Ql(kn(h,x)).some(ie=>String(ie).toLowerCase().includes(y)))):ue.data}),yl=e.computed(()=>{let y=[...Gl.value];const h=(Lt.value??"").trim().toLowerCase();return h&&(y=y.filter(x=>ue.columns.some(q=>{if(!q||!q.field)return!1;const ie=kn(x,q);return String(ie??"").toLowerCase().includes(h)}))),X.value.forEach(x=>{const q=re(x),ie=Mt.value[q];if(!ie)return;const mt=x.field;if(mt){if(ie.type==="string"&&ie.value?.trim()){const Rt=ie.value.trim().toLowerCase();y=y.filter(_l=>{const Hl=kn(_l,x);return String(Hl??"").toLowerCase().includes(Rt)})}else if(ie.type==="range")y=y.filter(Rt=>{const _l=At(Rt,mt),Hl=Number(_l);return!(Number.isNaN(Hl)||ie.min!=null&&Hl<ie.min||ie.max!=null&&Hl>ie.max)});else if(ie.type==="dateRange"){const Rt=ie.from?new Date(ie.from).getTime():null,_l=ie.to?new Date(ie.to).getTime():null;y=y.filter(Hl=>{const ql=At(Hl,mt),En=ql?new Date(ql).getTime():NaN;return!(Number.isNaN(En)||Rt!=null&&En<Rt||_l!=null&&En>_l)})}else if(ie.type==="list"&&ie.selected?.length){const Rt=new Set(ie.selected);y=y.filter(_l=>Ql(kn(_l,x)).some(ql=>Rt.has(ql)))}}}),y});function Ql(y){if(y==null)return[""];if(Array.isArray(y))return y.flatMap(Ql);if(typeof y=="object"){const h=y?.label??y?.name??y?.value??y?.title;return[h!=null?String(h):String(y)]}return[String(y)]}function D(y){const h=new Set;return ue.data.forEach(x=>{Ql(kn(x,y)).forEach(ie=>h.add(ie))}),Array.from(h).sort((x,q)=>String(x).localeCompare(String(q)))}function O(y,h){if(_t.value===y){_t.value=null,hl.value=null;return}if(_t.value=y,h?.currentTarget){const x=h.currentTarget.getBoundingClientRect();hl.value={top:x.bottom+6,left:Math.max(8,x.right-Al)}}else Fl()}function _(y,h){El(y,{type:"string",value:h})}function ce(y){const h=y.field;if(!h)return{min:0,max:100};let x=1/0,q=-1/0;return ue.data.forEach(ie=>{const mt=At(ie,h),Rt=Number(mt);Number.isNaN(Rt)||(x=Math.min(x,Rt),q=Math.max(q,Rt))}),{min:x===1/0?0:x,max:q===-1/0?100:q}}function $e(y,h,x){const q={...Tl(y),type:"range"},ie=x===""?null:Number(x),mt=ie===null||Number.isNaN(ie)?null:ie;q[h]=mt,mt!=null&&(h==="min"&&q.max!=null&&mt>q.max&&(q.max=mt),h==="max"&&q.min!=null&&mt<q.min&&(q.min=mt)),El(y,q)}function dt(y,h,x){const q={...Tl(y),type:"dateRange"};q[h]=x||"",El(y,q)}const Qe=e.reactive({});function ot(y,h){Qe[y]=h}function Dt(y){const h=re(y),x=(Qe[h]??"").trim().toLowerCase(),q=D(y);return x?q.filter(ie=>String(ie).toLowerCase().includes(x)):q}function nl(y,h){return(Tl(y).selected??[]).includes(h!=null?String(h):"")}function Dl(y,h){const q=[...Tl(y).selected??[]],ie=h!=null?String(h):"",mt=q.indexOf(ie);mt>=0?q.splice(mt,1):q.push(ie),El(y,{type:"list",selected:q})}function Nl(y){_t.value&&!y.target.closest(".dss-table-filter-wrap")&&!y.target.closest(".dss-table-filter-dropdown")&&(_t.value=null,hl.value=null)}function Ol(){Fl(),ol.value&&st()}const $n=y=>{if(!(y.sortable===!1||!Ye.value))if(ee.value==="single")Oe.value===y.field?Bt.value=Bt.value===1?-1:Bt.value===-1?0:1:(Oe.value=y.field,Bt.value=1),Bt.value===0&&(Oe.value=null),I("sort",{field:Oe.value,order:Bt.value});else{const h=Vt.value.findIndex(x=>x.field===y.field);h>=0?Vt.value[h].order===1?Vt.value[h].order=-1:Vt.value.splice(h,1):Vt.value.push({field:y.field,order:1}),I("sort",{multiSortMeta:Vt.value})}},Jl=e.computed(()=>{if(!Ye.value)return yl.value;let y=[...yl.value];return ee.value==="single"&&Oe.value&&Bt.value!==0?y.sort((h,x)=>{const q=At(h,Oe.value),ie=At(x,Oe.value);return q===ie?0:q==null?1:ie==null?-1:(q<ie?-1:q>ie?1:0)*Bt.value}):ee.value==="multiple"&&Vt.value.length>0&&y.sort((h,x)=>{for(const q of Vt.value){const ie=At(h,q.field),mt=At(x,q.field);if(ie===mt)continue;if(ie==null)return 1;if(mt==null)return-1;const Rt=ie<mt?-1:ie>mt?1:0;if(Rt!==0)return Rt*q.order}return 0}),y}),kl=e.ref(0),Qt=e.ref(be.value),ol=e.ref(!1),rn=e.ref(null),at=e.ref(null),de=e.ref("bottom"),hn=e.ref(null),kt=y=>{Qt.value=y,ol.value=!1,kl.value=0,I("page",{page:0,rows:Qt.value})};function ml(y){rn.value&&!rn.value.contains(y.target)&&(ol.value=!1)}function st(){const y=rn.value,h=at.value;if(!y||!h)return;const x=y.querySelector(".dss-pagination-select-dropdown");if(!x)return;const q=h.getBoundingClientRect(),ie=x.offsetHeight||0,Rt=(window.innerHeight||document.documentElement.clientHeight)-q.bottom,_l=q.top;de.value=Rt<ie+8&&_l>Rt?"top":"bottom",hn.value={width:`${Math.ceil(q.width)}px`,left:`${Math.max(0,Math.round(h.offsetLeft))}px`}}const vt=e.computed(()=>Jl.value.length),oe=e.computed(()=>Math.ceil(vt.value/Qt.value)),Yt=e.computed(()=>Math.max(oe.value,1)),Ae=e.computed(()=>vt.value===0?0:al.value+1),so=e.computed(()=>Bl.value),al=e.computed(()=>lt.value?kl.value*Qt.value:0),Bl=e.computed(()=>lt.value?Math.min((kl.value+1)*Qt.value,vt.value):vt.value),el=e.computed(()=>{if(!lt.value)return Jl.value;const y=al.value,h=Bl.value;return Jl.value.slice(y,h)}),Il=e.ref(new Set),il=e.computed(()=>Jl.value.filter((y,h)=>Il.value.has(C(y,h)))),zl=(y,h)=>{const x=Me.value;return typeof x!="function"?!0:!!x(y,h)},In=e.computed(()=>Jl.value.map((y,h)=>({row:y,index:h})).filter(({row:y,index:h})=>zl(y,h))),Ln=e.computed(()=>{const y=In.value;return y.length===0?!1:y.every(({row:h,index:x})=>Il.value.has(C(h,x)))}),Wl=e.computed(()=>{const y=In.value;if(y.length===0)return!1;const h=y.filter(({row:x,index:q})=>Il.value.has(C(x,q))).length;return h>0&&h<y.length}),pl=(y,h)=>Il.value.has(C(y,h)),Xn=()=>{if(Ln.value)Il.value=new Set,I("unselect-all");else{const y=new Set;In.value.forEach(({row:h,index:x})=>y.add(C(h,x))),Il.value=y,I("select-all",il.value)}},Yn=(y,h)=>{if(!zl(y,h))return;const x=C(y,h),q=new Set(Il.value),ie=q.has(x);xe.value==="single"?ie?(q.delete(x),I("row-unselect",y)):(q.clear(),q.add(x),I("row-select",y)):ie?(q.delete(x),I("row-unselect",y)):(q.add(x),I("row-select",y)),Il.value=q},cn=e.ref("1"),zn=()=>{const y=Number.parseInt(String(cn.value),10);if(!Number.isFinite(y)){cn.value=String(kl.value+1);return}const h=Math.min(Yt.value,Math.max(1,y));h!==kl.value+1?yn(h-1):cn.value=String(h)},yn=y=>{y<0||y>=oe.value||(kl.value=y,I("page",{page:y,rows:Qt.value}))},Ml=(y,h,x)=>{I("row-click",{data:y,index:h,originalEvent:x}),rt(y,al.value+h)},Pn=(y,h)=>{const x=al.value+h;return{"dss-table-row-selected":pl(y,x),"dss-table-row-even":h%2===0,"dss-table-row-odd":h%2!==0,"dss-table-row-truncated-clickable":Ee.value,"dss-table-row-truncated-expanded":Y.value===C(y,x)}},kn=(y,h)=>h.field?At(y,h.field):"",At=(y,h)=>h.split(".").reduce((x,q)=>x&&x[q],y),Zl=y=>{const h=y.align??Ze.value;return{"dss-table-sortable":y.sortable!==!1&&Ye.value,"dss-table-align-left":h==="left","dss-table-align-center":h==="center","dss-table-align-right":h==="right",[y.className]:y.className}},un=y=>{const h={};return y.width&&(h.width=typeof y.width=="number"?`${y.width}px`:y.width),y.minWidth&&(h.minWidth=typeof y.minWidth=="number"?`${y.minWidth}px`:y.minWidth),y.maxWidth&&(h.maxWidth=typeof y.maxWidth=="number"?`${y.maxWidth}px`:y.maxWidth),h};return e.watch(()=>ue.locale,y=>{y&&y!==A.value&&(A.value=y)},{immediate:!0}),e.watch(be,y=>{Qt.value=y,kl.value=0}),e.watch(ol,async y=>{y&&(await e.nextTick(),st())}),e.watch(kl,y=>{cn.value=String(y+1)},{immediate:!0}),e.watch(Lt,y=>{I("search",y??"")}),e.watch(()=>ue.columns,()=>{if(J.value===null){ft();return}const y=xt(ue.columnVisibility)??[];y.length!==ue.columnVisibility.length&&I("update:columnVisibility",y)},{immediate:!0,deep:!0}),e.onMounted(()=>{document.addEventListener("click",ml),document.addEventListener("click",ll),document.addEventListener("click",Nl),window.addEventListener("resize",Ol),window.addEventListener("scroll",Ol,!0)}),e.onUnmounted(()=>{document.removeEventListener("click",ml),document.removeEventListener("click",ll),document.removeEventListener("click",Nl),window.removeEventListener("resize",Ol),window.removeEventListener("scroll",Ol,!0)}),(y,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"dss-table-container",ref_key:"tableContainerRef",ref:on,style:e.normalizeStyle({width:f.value+"px",height:we.value?we.value+"px":"auto"})},[bt.value?(e.openBlock(),e.createElementBlock("div",mc,[e.createElementVNode("div",pc,[He.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-table-toolbar-btn",onClick:h[0]||(h[0]=x=>I("download-pdf"))},[h[22]||(h[22]=e.createStaticVNode('<span class="dss-table-toolbar-btn-icon" aria-hidden="true"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_download)"><path d="M16.59 9H15V4C15 3.45 14.55 3 14 3H10C9.45 3 9 3.45 9 4V9H7.41C6.52 9 6.07 10.08 6.7 10.71L11.29 15.3C11.68 15.69 12.31 15.69 12.7 15.3L17.29 10.71C17.92 10.08 17.48 9 16.59 9ZM5 19C5 19.55 5.45 20 6 20H18C18.55 20 19 19.55 19 19C19 18.45 18.55 18 18 18H6C5.45 18 5 18.45 5 19Z" fill="currentColor"></path></g><defs><clipPath id="clip0_download"><rect width="24" height="24" fill="white"></rect></clipPath></defs></svg></span>',1)),e.createTextVNode(" "+e.toDisplayString(e.unref(M)("table.downloadPdf")),1)])):e.createCommentVNode("",!0),_e.value?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"dss-table-toolbar-btn",onClick:h[1]||(h[1]=x=>I("download-excel"))},[h[23]||(h[23]=e.createStaticVNode('<span class="dss-table-toolbar-btn-icon" aria-hidden="true"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_download_excel)"><path d="M16.59 9H15V4C15 3.45 14.55 3 14 3H10C9.45 3 9 3.45 9 4V9H7.41C6.52 9 6.07 10.08 6.7 10.71L11.29 15.3C11.68 15.69 12.31 15.69 12.7 15.3L17.29 10.71C17.92 10.08 17.48 9 16.59 9ZM5 19C5 19.55 5.45 20 6 20H18C18.55 20 19 19.55 19 19C19 18.45 18.55 18 18 18H6C5.45 18 5 18.45 5 19Z" fill="currentColor"></path></g><defs><clipPath id="clip0_download_excel"><rect width="24" height="24" fill="white"></rect></clipPath></defs></svg></span>',1)),e.createTextVNode(" "+e.toDisplayString(e.unref(M)("table.downloadExcel")),1)])):e.createCommentVNode("",!0),Gt.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-table-toolbar-column-visibility",ref_key:"columnVisibilityDropdownRef",ref:rl},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-pagination-select-trigger",{"dss-pagination-select-open":St.value}]),onClick:h[2]||(h[2]=x=>St.value=!St.value),"aria-expanded":St.value,"aria-haspopup":"listbox"},[e.createTextVNode(e.toDisplayString(e.unref(M)("table.columnVisibility"))+" ",1),h[24]||(h[24]=e.createElementVNode("span",{class:"dss-pagination-select-chevron","aria-hidden":"true"},"▼",-1))],10,fc),e.createVNode(e.Transition,{name:"dss-dropdown"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("ul",vc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.columns,(x,q)=>(e.openBlock(),e.createElementBlock("li",{key:et(x,q),role:"option",class:"dss-table-column-visibility-option",onClick:h[3]||(h[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("label",gc,[e.createElementVNode("span",hc,[e.createElementVNode("input",{type:"checkbox",checked:fe(x,q),onChange:ie=>Nt(x,q),class:"dss-table-checkbox dss-table-checkbox--checkbox"},null,40,yc),fe(x,q)?(e.openBlock(),e.createElementBlock("span",kc,[...h[25]||(h[25]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",preserveAspectRatio:"xMidYMid meet",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4.82415 9.75587C4.46867 10.0814 3.89442 10.0814 3.53893 9.75587L0.266616 6.75952C-0.088872 6.43401 -0.088872 5.90819 0.266616 5.58268C0.622104 5.25717 1.19635 5.25717 1.55184 5.58268L4.17698 7.98644L10.4482 2.24413C10.8036 1.91862 11.3779 1.91862 11.7334 2.24413C12.0889 2.56964 12.0889 3.09546 11.7334 3.42097L4.82415 9.75587Z","stroke-width":"1.2",stroke:"currentColor",fill:"currentColor"})],-1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("span",Cc,e.toDisplayString(x.header),1)])]))),128))],512),[[e.vShow,St.value]])]),_:1})],512)):e.createCommentVNode("",!0),e.renderSlot(y.$slots,"header")]),e.createElementVNode("div",bc,[Xt.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dss-table-toolbar-search",{"dss-table-toolbar-search--expanded":qt.value||Lt.value}])},[e.withDirectives(e.createElementVNode("input",{ref_key:"searchInputRef",ref:K,"onUpdate:modelValue":h[4]||(h[4]=x=>Lt.value=x),type:"text",class:"dss-table-toolbar-search-input",placeholder:e.unref(M)("table.searchPlaceholder"),"aria-label":e.unref(M)("table.searchTableAriaLabel"),onFocus:h[5]||(h[5]=x=>qt.value=!0),onBlur:Ue},null,40,wc),[[e.vModelText,Lt.value]]),Lt.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-table-toolbar-search-clear","aria-label":e.unref(M)("table.clearSearchAriaLabel"),onClick:Ke},[...h[26]||(h[26]=[e.createElementVNode("span",{"aria-hidden":"true"},"×",-1)])],8,xc)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"dss-table-toolbar-search-trigger","aria-label":e.unref(M)("table.searchAriaLabel"),"aria-expanded":qt.value||!!Lt.value,onMousedown:e.withModifiers(Be,["prevent"])},[...h[27]||(h[27]=[e.createElementVNode("span",{class:"dss-table-toolbar-search-icon","aria-hidden":"true"},[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4.81738 0C7.47741 0.000327759 9.63379 2.09488 9.63379 4.67773C9.63366 5.68756 9.30172 6.62133 8.74121 7.38574L11.2324 9.80469C11.653 10.213 11.6528 10.8885 11.2324 11.2969C10.829 11.6886 10.1866 11.6886 9.7832 11.2969L7.16895 8.75781C6.47333 9.13671 5.67174 9.35439 4.81738 9.35449C2.15724 9.35449 -0.000652839 7.26049 -0.000976562 4.67773C-0.000976562 2.09468 2.15704 0 4.81738 0ZM4.81738 1.41895C2.96425 1.41895 1.46213 2.87754 1.46191 4.67676C1.46202 6.47611 2.96418 7.93555 4.81738 7.93555C6.67025 7.93519 8.17275 6.47589 8.17285 4.67676C8.17263 2.87776 6.67018 1.4193 4.81738 1.41895Z",fill:"currentColor"})])],-1)])],40,Ec)],2)):e.createCommentVNode("",!0),y.$slots["toolbar-extra"]?(e.openBlock(),e.createElementBlock("div",Sc,[e.renderSlot(y.$slots,"toolbar-extra")])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["dss-table-wrapper",{"dss-table-scrollable":se.value}])},[e.createElementVNode("table",{class:e.normalizeClass(["dss-table",Tt.value])},[e.createElementVNode("thead",Vc,[e.createElementVNode("tr",null,[qe.value?(e.openBlock(),e.createElementBlock("th",Nc,[xe.value==="multiple"?(e.openBlock(),e.createElementBlock("span",Bc,[e.createElementVNode("input",{type:"checkbox",checked:Ln.value,indeterminate:Wl.value,onChange:Xn,class:"dss-table-checkbox dss-table-checkbox--checkbox"},null,40,Mc),Wl.value?(e.openBlock(),e.createElementBlock("span",_c)):Ln.value?(e.openBlock(),e.createElementBlock("span",$c,[...h[28]||(h[28]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",preserveAspectRatio:"xMidYMid meet",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4.82415 9.75587C4.46867 10.0814 3.89442 10.0814 3.53893 9.75587L0.266616 6.75952C-0.088872 6.43401 -0.088872 5.90819 0.266616 5.58268C0.622104 5.25717 1.19635 5.25717 1.55184 5.58268L4.17698 7.98644L10.4482 2.24413C10.8036 1.91862 11.3779 1.91862 11.7334 2.24413C12.0889 2.56964 12.0889 3.09546 11.7334 3.42097L4.82415 9.75587Z","stroke-width":"1.2",stroke:"currentColor",fill:"currentColor"})],-1)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),U.value?(e.openBlock(),e.createElementBlock("th",{key:1,class:"dss-table-th dss-table-expansion-column","aria-label":e.unref(M)("table.expandRowAriaLabel")},null,8,Lc)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(X.value,(x,q)=>(e.openBlock(),e.createElementBlock("th",{key:re(x),class:e.normalizeClass(["dss-table-th",Zl(x)]),style:e.normalizeStyle(un(x)),onClick:ie=>$n(x)},[e.createElementVNode("div",Tc,[e.createElementVNode("span",Dc,e.toDisplayString(x.header),1),x.sortable!==!1&&Ye.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["dss-table-sort-icon",yt(x)])},[ht(x)===0?(e.openBlock(),e.createElementBlock("span",Hc,[...h[29]||(h[29]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M5.413 9.06387C5.45434 9.16352 5.4652 9.27319 5.4442 9.37901C5.42321 9.48484 5.3713 9.58206 5.29505 9.65837L3.11339 11.84C3.06273 11.8907 3.00258 11.931 2.93637 11.9584C2.87016 11.9859 2.79918 12 2.72751 12C2.65583 12 2.58486 11.9859 2.51865 11.9584C2.45243 11.931 2.39228 11.8907 2.34163 11.84L0.159964 9.65837C0.0835992 9.58209 0.0315843 9.48487 0.0105038 9.37902C-0.0105768 9.27316 0.000224981 9.16343 0.0415416 9.06371C0.0828581 8.964 0.152832 8.87879 0.242604 8.81886C0.332376 8.75894 0.43791 8.72699 0.545845 8.72708H2.18209V0.545845C2.18209 0.401191 2.23955 0.262463 2.34184 0.160178C2.44413 0.0578925 2.58285 0.000429123 2.72751 0.000429123C2.87216 0.000429123 3.01089 0.0578925 3.11317 0.160178C3.21546 0.262463 3.27292 0.401191 3.27292 0.545845V8.72708H4.90917C5.01704 8.7271 5.12248 8.75911 5.21216 8.81906C5.30185 8.87901 5.37174 8.9642 5.413 9.06387ZM11.84 2.34162L9.65837 0.159963C9.60772 0.109252 9.54757 0.0690231 9.48135 0.0415755C9.41514 0.0141278 9.34417 0 9.27249 0C9.20082 0 9.12984 0.0141278 9.06363 0.0415755C8.99742 0.0690231 8.93727 0.109252 8.88661 0.159963L6.70495 2.34162C6.62858 2.4179 6.57657 2.51513 6.55549 2.62098C6.53441 2.72684 6.54521 2.83657 6.58653 2.93629C6.62784 3.036 6.69782 3.12121 6.78759 3.18114C6.87736 3.24107 6.9829 3.27301 7.09083 3.27292H8.72708V11.4542C8.72708 11.5988 8.78454 11.7375 8.88683 11.8398C8.98911 11.9421 9.12784 11.9996 9.27249 11.9996C9.41715 11.9996 9.55587 11.9421 9.65816 11.8398C9.76045 11.7375 9.81791 11.5988 9.81791 11.4542V3.27292H11.4542C11.5621 3.27301 11.6676 3.24107 11.7574 3.18114C11.8472 3.12121 11.9171 3.036 11.9585 2.93629C11.9998 2.83657 12.0106 2.72684 11.9895 2.62098C11.9684 2.51513 11.9164 2.4179 11.84 2.34162Z",fill:"#3a3a3a"})],-1)])])):ht(x)===1?(e.openBlock(),e.createElementBlock("span",Rc,[...h[30]||(h[30]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M6 12C6.36819 12 6.66667 11.7015 6.66667 11.3333L6.66667 2.55333L8.58967 4.47098C8.84953 4.73012 9.27017 4.72983 9.52967 4.47033C9.78943 4.21057 9.78943 3.78943 9.52967 3.52967L6.70711 0.707106C6.31658 0.316582 5.68342 0.316582 5.29289 0.707107L2.47033 3.52967C2.21057 3.78943 2.21057 4.21057 2.47033 4.47033C2.72983 4.72983 3.15047 4.73012 3.41033 4.47098L5.33333 2.55333L5.33333 11.3333C5.33333 11.7015 5.63181 12 6 12Z",fill:"#7fa2cc"})],-1)])])):ht(x)===-1?(e.openBlock(),e.createElementBlock("span",Fc,[...h[31]||(h[31]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M6 -1.74846e-07C5.63181 -1.58751e-07 5.33333 0.298476 5.33333 0.666666L5.33333 9.44667L3.41033 7.52902C3.15047 7.26988 2.72983 7.27017 2.47033 7.52967C2.21057 7.78943 2.21057 8.21057 2.47033 8.47033L5.29289 11.2929C5.68342 11.6834 6.31658 11.6834 6.70711 11.2929L9.52967 8.47033C9.78943 8.21057 9.78943 7.78943 9.52967 7.52967C9.27017 7.27017 8.84953 7.26988 8.58967 7.52902L6.66667 9.44667L6.66667 0.666667C6.66667 0.298477 6.36819 -1.9094e-07 6 -1.74846e-07Z",fill:"#7fa2cc"})],-1)])])):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),x.filter?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-table-filter-wrap",{"dss-table-filter-wrap--open":_t.value===re(x)}]),onClick:h[6]||(h[6]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-table-filter-trigger",{"dss-table-filter-trigger--active":xn(re(x))}]),"data-filter-column-key":re(x),"aria-expanded":_t.value===re(x),"aria-label":e.unref(M)("table.filterColumnAriaLabel"),onClick:ie=>O(re(x),ie)},[...h[32]||(h[32]=[e.createElementVNode("span",{class:"dss-table-filter-icon","aria-hidden":"true"},[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M11.7583 1.54409L11.7537 1.54928L7.84558 5.72226V8.92411C7.84581 9.07639 7.80836 9.22636 7.73658 9.36067C7.6648 9.49497 7.56091 9.60943 7.43417 9.69385L5.58772 10.9252C5.44858 11.0179 5.28688 11.071 5.11988 11.079C4.95288 11.087 4.78685 11.0494 4.63952 10.9704C4.49219 10.8914 4.36908 10.7738 4.28334 10.6303C4.1976 10.4868 4.15244 10.3226 4.15269 10.1555V5.72226L0.244567 1.54928L0.239951 1.54409C0.119785 1.41185 0.0405781 1.24758 0.0119374 1.0712C-0.0167033 0.894829 0.00645342 0.713935 0.0785984 0.550463C0.150743 0.386991 0.268776 0.247968 0.418378 0.150258C0.56798 0.0525488 0.742722 0.000352071 0.921405 0H11.0769C11.2557 1.73676e-05 11.4307 0.051972 11.5805 0.149551C11.7304 0.247131 11.8487 0.386134 11.9211 0.549673C11.9934 0.713211 12.0167 0.894244 11.9881 1.07078C11.9596 1.24731 11.8803 1.41174 11.7601 1.54409H11.7583Z",fill:"currentColor"})])],-1)])],10,Ic)],2)):e.createCommentVNode("",!0)])],14,Ac))),128))])]),e.createElementVNode("tbody",zc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(el.value,(x,q)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:C(x,al.value+q)},[e.createElementVNode("tr",{class:e.normalizeClass(["dss-table-tr",Pn(x,q)]),style:e.normalizeStyle(G.value),onClick:ie=>Ml(x,q,ie)},[qe.value?(e.openBlock(),e.createElementBlock("td",{key:0,class:"dss-table-td dss-table-selection-cell",onClick:h[7]||(h[7]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("span",Oc,[e.createElementVNode("input",{type:xe.value==="multiple"?"checkbox":"radio",name:`dss-table-select-${H.tableId}`,checked:pl(x,al.value+q),disabled:!zl(x,al.value+q),onChange:ie=>Yn(x,al.value+q),class:e.normalizeClass(["dss-table-checkbox",xe.value==="multiple"?"dss-table-checkbox--checkbox":"dss-table-checkbox--radio",{"dss-table-checkbox--disabled":!zl(x,al.value+q)}])},null,42,qc),xe.value==="multiple"&&pl(x,al.value+q)?(e.openBlock(),e.createElementBlock("span",Wc,[...h[33]||(h[33]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",preserveAspectRatio:"xMidYMid meet",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4.82415 9.75587C4.46867 10.0814 3.89442 10.0814 3.53893 9.75587L0.266616 6.75952C-0.088872 6.43401 -0.088872 5.90819 0.266616 5.58268C0.622104 5.25717 1.19635 5.25717 1.55184 5.58268L4.17698 7.98644L10.4482 2.24413C10.8036 1.91862 11.3779 1.91862 11.7334 2.24413C12.0889 2.56964 12.0889 3.09546 11.7334 3.42097L4.82415 9.75587Z","stroke-width":"1.2",stroke:"currentColor",fill:"currentColor"})],-1)])])):xe.value==="single"&&pl(x,al.value+q)?(e.openBlock(),e.createElementBlock("span",Zc)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),U.value?(e.openBlock(),e.createElementBlock("td",{key:1,class:"dss-table-td dss-table-expansion-cell",onClick:e.withModifiers(ie=>gt(x,al.value+q,ie),["stop"])},[ze(x,al.value+q)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-table-expansion-trigger","aria-expanded":le(x,al.value+q),"aria-label":le(x,al.value+q)?e.unref(M)("table.collapseRowAriaLabel"):e.unref(M)("table.expandRowAriaLabel")},[e.createElementVNode("span",{class:e.normalizeClass(["dss-table-expansion-icon",{"dss-table-expansion-icon--expanded":le(x,al.value+q)}]),"aria-hidden":"true"},[...h[34]||(h[34]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M10.1611 2.81093L5.99463 6.93546L1.82819 2.81093C1.4094 2.39636 0.732886 2.39636 0.314094 2.81093C-0.104698 3.22551 -0.104698 3.89522 0.314094 4.30979L5.24295 9.18907C5.66175 9.60364 6.33826 9.60364 6.75705 9.18907L11.6859 4.30979C12.1047 3.89522 12.1047 3.22551 11.6859 2.81093C11.2671 2.40699 10.5799 2.39636 10.1611 2.81093Z",fill:"#3a3a3a"})],-1)])],2)],8,Xc)):(e.openBlock(),e.createElementBlock("span",Yc))],8,Uc)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(X.value,(ie,mt)=>(e.openBlock(),e.createElementBlock("td",{key:re(ie),class:e.normalizeClass(["dss-table-td",Zl(ie)]),style:e.normalizeStyle(un(ie))},[e.renderSlot(y.$slots,`cell-${ie.field}`,{data:x,column:ie,rowIndex:q,isExpanded:Y.value===C(x,al.value+q)},()=>[e.createTextVNode(e.toDisplayString(kn(x,ie)),1)])],6))),128))],14,Pc),U.value&&ze(x,al.value+q)&&le(x,al.value+q)?(e.openBlock(),e.createElementBlock("tr",jc,[e.createElementVNode("td",{colspan:S.value,class:"dss-table-expansion-content-cell"},[e.renderSlot(y.$slots,"expansion",{data:x,rowIndex:q})],8,Kc)])):e.createCommentVNode("",!0)],64))),128)),el.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("tr",{key:0,class:"dss-table-empty",style:e.normalizeStyle(G.value)},[e.createElementVNode("td",{colspan:S.value,class:"dss-table-empty-cell"},[e.renderSlot(y.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(ge.value),1)])],8,Gc)],4))])],2)],2),Pt.value?(e.openBlock(),e.createElementBlock("div",Qc,[e.createElementVNode("div",Jc,[ut.value?(e.openBlock(),e.createElementBlock("span",eu,e.toDisplayString(e.unref(M)("table.showingRange",{start:Ae.value,end:so.value,total:vt.value})),1)):(e.openBlock(),e.createElementBlock("span",tu," "))]),e.createElementVNode("div",lu,[Et.value?(e.openBlock(),e.createElementBlock("div",nu,[e.createElementVNode("button",{class:"dss-pagination-btn",disabled:kl.value===0,onClick:h[8]||(h[8]=x=>yn(0)),title:e.unref(M)("table.firstPage")},[...h[35]||(h[35]=[e.createElementVNode("span",{class:"dss-pagination-double-arrow"},[e.createElementVNode("span",null,"‹"),e.createElementVNode("span",null,"‹")],-1)])],8,ou),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:kl.value===0,onClick:h[9]||(h[9]=x=>yn(kl.value-1)),title:e.unref(M)("table.previousPage")}," ‹ ",8,au),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":h[10]||(h[10]=x=>cn.value=x),type:"text",class:"dss-pagination-page-input","aria-label":e.unref(M)("table.currentPageAriaLabel"),onBlur:zn,onKeydown:e.withKeys(e.withModifiers(zn,["prevent"]),["enter"])},null,40,su),[[e.vModelText,cn.value]]),e.createElementVNode("span",ru,e.toDisplayString(e.unref(M)("table.ofPages",{total:Yt.value})),1),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:kl.value>=oe.value-1,onClick:h[11]||(h[11]=x=>yn(kl.value+1)),title:e.unref(M)("table.nextPage")}," › ",8,iu),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:kl.value>=oe.value-1,onClick:h[12]||(h[12]=x=>yn(oe.value-1)),title:e.unref(M)("table.lastPage")},[...h[36]||(h[36]=[e.createElementVNode("span",{class:"dss-pagination-double-arrow"},[e.createElementVNode("span",null,"›"),e.createElementVNode("span",null,"›")],-1)])],8,cu)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",uu,[Ht.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-pagination-rows-per-page",ref_key:"rowsPerPageDropdownRef",ref:rn},[e.createElementVNode("span",du,e.toDisplayString(e.unref(M)("table.rowsPerPage"))+":",1),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-pagination-select-trigger",{"dss-pagination-select-open":ol.value}]),onClick:h[13]||(h[13]=x=>ol.value=!ol.value),"aria-expanded":ol.value,"aria-haspopup":"listbox",ref_key:"rowsPerPageTriggerRef",ref:at},[e.createTextVNode(e.toDisplayString(Qt.value)+" ",1),h[37]||(h[37]=e.createElementVNode("span",{class:"dss-pagination-select-chevron","aria-hidden":"true"},"▼",-1))],10,mu),e.createVNode(e.Transition,{name:"dss-dropdown"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("ul",{class:e.normalizeClass(["dss-pagination-select-dropdown",{"dss-pagination-select-dropdown--top":de.value==="top"}]),style:e.normalizeStyle(hn.value),role:"listbox"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Je.value,x=>(e.openBlock(),e.createElementBlock("li",{key:x,role:"option","aria-selected":x===Qt.value,class:e.normalizeClass(["dss-pagination-select-option",{"dss-pagination-select-option--selected":x===Qt.value}]),onClick:q=>kt(x)},e.toDisplayString(x),11,pu))),128))],6),[[e.vShow,ol.value]])]),_:1})],512)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)],4),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"dss-dropdown"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:"dss-table-filter-dropdown dss-table-filter-dropdown--teleport",style:e.normalizeStyle(hl.value?{top:hl.value.top+"px",left:hl.value.left+"px",width:Al+"px"}:void 0),onClick:h[21]||(h[21]=e.withModifiers(()=>{},["stop"]))},[Wt.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[Wt.value.filter==="string"?(e.openBlock(),e.createElementBlock("div",fu,[e.createElementVNode("input",{type:"text",value:Tl(_t.value).value??"",onInput:h[14]||(h[14]=x=>_(_t.value,x.target.value)),class:"dss-table-filter-input",placeholder:e.unref(M)("table.search")},null,40,vu)])):Wt.value.filter==="range"&&dl.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-table-filter-double-range",style:e.normalizeStyle({"--range-min-pct":dl.value.minPct+"%","--range-max-pct":dl.value.maxPct+"%"})},[e.createElementVNode("div",{ref_key:"doubleRangeTrackRef",ref:vn,class:"dss-table-filter-double-range-track",onMousemove:an,onMouseenter:an},[e.createElementVNode("input",{type:"range",min:dl.value.rangeMin,max:dl.value.rangeMax,value:dl.value.currentMin,onInput:h[15]||(h[15]=x=>$e(_t.value,"min",x.target.value)),class:"dss-table-filter-double-range-input dss-table-filter-double-range-input--min",style:e.normalizeStyle({zIndex:gn.value==="min"?2:1})},null,44,gu),e.createElementVNode("input",{type:"range",min:dl.value.rangeMin,max:dl.value.rangeMax,value:dl.value.currentMax,onInput:h[16]||(h[16]=x=>$e(_t.value,"max",x.target.value)),class:"dss-table-filter-double-range-input dss-table-filter-double-range-input--max",style:e.normalizeStyle({zIndex:gn.value==="max"?2:1})},null,44,hu)],544),e.createElementVNode("div",yu,e.toDisplayString(dl.value.currentMin)+" – "+e.toDisplayString(dl.value.currentMax),1)],4)):Wt.value.filter==="dateRange"?(e.openBlock(),e.createElementBlock("div",ku,[e.createElementVNode("div",Cu,[e.createElementVNode("label",bu,e.toDisplayString(e.unref(M)("table.filterFrom")),1),e.createElementVNode("input",{type:"date",value:Tl(_t.value).from??"",onInput:h[17]||(h[17]=x=>dt(_t.value,"from",x.target.value)),class:"dss-table-filter-input dss-table-filter-daterange-input"},null,40,wu)]),e.createElementVNode("div",xu,[e.createElementVNode("label",Eu,e.toDisplayString(e.unref(M)("table.filterTo")),1),e.createElementVNode("input",{type:"date",value:Tl(_t.value).to??"",onInput:h[18]||(h[18]=x=>dt(_t.value,"to",x.target.value)),class:"dss-table-filter-input dss-table-filter-daterange-input"},null,40,Su)])])):Wt.value.filter==="list"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("input",{type:"text",value:Qe[_t.value]??"",onInput:h[19]||(h[19]=x=>ot(_t.value,x.target.value)),class:"dss-table-filter-input dss-table-filter-list-search",placeholder:e.unref(M)("table.search")},null,40,Vu),e.createElementVNode("div",Nu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Dt(Wt.value),x=>(e.openBlock(),e.createElementBlock("label",{key:x,class:"dss-table-filter-list-item"},[e.createElementVNode("input",{type:"checkbox",checked:nl(_t.value,x),onChange:q=>Dl(_t.value,x)},null,40,Bu),e.createElementVNode("span",null,e.toDisplayString(x),1)]))),128))])],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Mu,[e.createElementVNode("button",{type:"button",class:"dss-table-filter-clear",onClick:h[20]||(h[20]=x=>sn(_t.value))},e.toDisplayString(e.unref(M)("table.clearFilter")),1)])],64)):e.createCommentVNode("",!0)],4),[[e.vShow,_t.value&&Wt.value&&hl.value]])]),_:1})]))],64))}}),Lu="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M6.008%2014V12.68H8.288V6.572L5.996%208.276V6.692L8.012%205.24H9.788V12.68H11.624V14H6.008Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",Au="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M5.948%2014V12.548L8.684%209.8C9.068%209.408%209.352%209.056%209.536%208.744C9.72%208.424%209.812%208.096%209.812%207.76C9.812%207.352%209.7%207.036%209.476%206.812C9.252%206.58%208.948%206.464%208.564%206.464C8.14%206.464%207.808%206.588%207.568%206.836C7.328%207.076%207.208%207.412%207.208%207.844H5.708C5.716%207.284%205.836%206.804%206.068%206.404C6.308%205.996%206.644%205.68%207.076%205.456C7.508%205.232%208.012%205.12%208.588%205.12C9.14%205.12%209.62%205.224%2010.028%205.432C10.436%205.64%2010.752%205.932%2010.976%206.308C11.2%206.684%2011.312%207.132%2011.312%207.652C11.312%208.188%2011.172%208.712%2010.892%209.224C10.62%209.728%2010.18%2010.272%209.572%2010.856L7.748%2012.644H11.42V14H5.948Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",Tu="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M8.516%2014.12C7.948%2014.12%207.452%2014.016%207.028%2013.808C6.612%2013.6%206.288%2013.308%206.056%2012.932C5.824%2012.556%205.708%2012.112%205.708%2011.6H7.22C7.22%2011.992%207.332%2012.3%207.556%2012.524C7.788%2012.74%208.112%2012.848%208.528%2012.848C8.944%2012.848%209.264%2012.736%209.488%2012.512C9.712%2012.288%209.824%2011.984%209.824%2011.6V10.916C9.824%2010.524%209.712%2010.22%209.488%2010.004C9.264%209.78%208.944%209.668%208.528%209.668H7.544V8.312L9.476%206.524H6.104V5.24H11V6.596L8.528%208.864V8.384C9.392%208.384%2010.076%208.612%2010.58%209.068C11.084%209.524%2011.336%2010.14%2011.336%2010.916V11.6C11.336%2012.112%2011.22%2012.556%2010.988%2012.932C10.756%2013.308%2010.428%2013.6%2010.004%2013.808C9.58%2014.016%209.084%2014.12%208.516%2014.12Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",Du="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M9.68%2014V12.26H5.78V10.088L9.152%205.24H10.832L7.22%2010.484V10.94H9.68V8.96H11.18V14H9.68Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",Hu="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M8.588%2014.12C7.78%2014.12%207.132%2013.92%206.644%2013.52C6.156%2013.112%205.888%2012.56%205.84%2011.864H7.34C7.372%2012.168%207.492%2012.404%207.7%2012.572C7.916%2012.732%208.212%2012.812%208.588%2012.812C9.004%2012.812%209.32%2012.704%209.536%2012.488C9.752%2012.264%209.86%2011.956%209.86%2011.564V10.712C9.86%2010.312%209.752%2010.008%209.536%209.8C9.32%209.584%209.004%209.476%208.588%209.476C8.332%209.476%208.112%209.528%207.928%209.632C7.744%209.736%207.604%209.88%207.508%2010.064H6.044L6.104%205.24H11.036V6.596H7.52L7.496%209.14H7.844L7.484%209.44C7.484%209.072%207.628%208.784%207.916%208.576C8.212%208.36%208.608%208.252%209.104%208.252C9.816%208.244%2010.368%208.46%2010.76%208.9C11.16%209.332%2011.36%209.936%2011.36%2010.712V11.564C11.36%2012.356%2011.112%2012.98%2010.616%2013.436C10.128%2013.892%209.452%2014.12%208.588%2014.12Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",Ru="data:image/svg+xml,%3csvg%20width='13'%20height='18'%20viewBox='0%200%2013%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.116%2012V3.24H2.196V6.984H5.004V3.24H6.084V12H5.004V7.968H2.196V12H1.116Z'%20fill='%233a3a3a'/%3e%3cpath%20d='M8.6%2014.12C8.016%2014.12%207.5%2014%207.052%2013.76C6.612%2013.512%206.268%2013.168%206.02%2012.728C5.78%2012.28%205.66%2011.764%205.66%2011.18C5.66%2010.764%205.728%2010.328%205.864%209.872C6.008%209.416%206.204%208.988%206.452%208.588L8.516%205.24H10.184L7.592%209.32L7.664%209.368C7.824%209.12%208.04%208.932%208.312%208.804C8.584%208.676%208.888%208.612%209.224%208.612C9.696%208.612%2010.104%208.724%2010.448%208.948C10.792%209.172%2011.06%209.484%2011.252%209.884C11.444%2010.284%2011.54%2010.752%2011.54%2011.288C11.54%2011.856%2011.416%2012.352%2011.168%2012.776C10.928%2013.2%2010.588%2013.532%2010.148%2013.772C9.716%2014.004%209.2%2014.12%208.6%2014.12ZM8.6%2012.848C9.04%2012.848%209.396%2012.708%209.668%2012.428C9.94%2012.14%2010.076%2011.768%2010.076%2011.312C10.076%2010.84%209.94%2010.464%209.668%2010.184C9.396%209.896%209.04%209.752%208.6%209.752C8.16%209.752%207.804%209.896%207.532%2010.184C7.26%2010.464%207.124%2010.84%207.124%2011.312C7.124%2011.768%207.26%2012.14%207.532%2012.428C7.804%2012.708%208.16%2012.848%208.6%2012.848Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",Fu={class:"dss-toolbar-left"},Iu=["title"],zu=["title"],Pu={class:"dss-toolbar-dropdown-wrapper"},Ou=["title"],qu=["src"],Wu=["src"],Zu=["src"],Uu=["src"],Xu=["src"],Yu=["src"],ju={key:6,width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"paragraph-icon"},Ku=["src"],Gu=["src"],Qu=["src"],Ju=["src"],ed=["src"],td=["src"],ld=["title"],nd=["title"],od=["title"],ad=["title"],sd=["title"],rd=["title"],id=["title"],cd=["title"],ud=["title"],dd={key:2,class:"dss-toolbar-separator"},md=["title"],pd={key:4,class:"dss-toolbar-separator"},fd={key:5,class:"dss-toolbar-dropdown-wrapper"},vd=["title"],gd={class:"dss-toolbar-dropdown-ai"},hd={class:"dss-toolbar-right"},yd={key:0,class:"dss-toolbar-custom-group"},kd={key:1,class:"dss-toolbar-separator"},Cd={class:"dss-link-modal-content"},bd={class:"dss-link-modal-field"},wd={class:"dss-link-modal-label"},xd=["placeholder"],Ed={class:"dss-link-modal-field"},Sd={class:"dss-link-modal-label"},Vd=["placeholder"],Nd={class:"dss-image-modal-tabs"},Bd={key:0,class:"dss-image-tab-content"},Md={class:"dss-link-modal-content"},_d={class:"dss-link-modal-field"},$d={key:0,class:"dss-link-modal-label"},Ld=["src"],Ad={class:"dss-link-modal-field"},Td={class:"dss-link-modal-label"},Dd=["placeholder"],Hd={class:"dss-link-modal-field"},Rd={class:"dss-link-modal-label"},Fd=["placeholder"],Id={class:"dss-link-modal-field"},zd={class:"dss-link-modal-label"},Pd=["placeholder"],Od={key:1,class:"dss-image-tab-content"},qd={class:"dss-link-modal-content"},Wd={class:"dss-link-modal-field"},Zd={class:"dss-link-modal-label"},Ud=["placeholder"],Xd={class:"dss-link-modal-field"},Yd={class:"dss-link-modal-label"},jd=["placeholder"],Kd={class:"dss-link-modal-field"},Gd={class:"dss-link-modal-label"},Qd=["placeholder"],Jd={class:"dss-link-modal-field"},e1={class:"dss-link-modal-label"},t1=["placeholder"],l1={class:"dss-text-editor-title-input-container"},n1={key:0,class:"dss-text-editor-title-preview"},o1={key:0},a1={key:1,class:"dss-text-editor-preview-placeholder"},s1=["value","placeholder","disabled"],r1={key:2,class:"dss-text-editor-title-slot dss-text-editor-slot-last"},i1={class:"dss-text-editor-description-input-container"},c1={key:0,class:"dss-text-editor-description-preview"},u1={key:0},d1={key:1,class:"dss-text-editor-preview-placeholder"},m1=["value","placeholder","disabled"],p1={key:3,class:"dss-text-editor-description-slot dss-text-editor-slot-last"},f1=["data-comment-id","onMouseenter"],v1=["onClick"],g1=["src","alt"],h1={key:1},y1=["onClick"],k1=["src","alt"],C1={key:1},b1=["data-has-second-user","onClick"],w1={class:"editor-comment-marker-count"},x1={key:4,class:"dss-text-editor-textarea-wrapper"},E1=["value","placeholder","rows","disabled"],S1={class:"dss-text-editor-footer"},V1={class:"dss-text-editor-footer-content"},N1={class:"dss-text-editor-footer-stat"},B1={class:"dss-text-editor-footer-stat"},M1={key:5,class:"dss-text-editor-content-wrapper"},_1={key:0,class:"dss-comment-overlay-body"},$1={class:"dss-comment-selection-wrapper"},L1=["innerHTML"],A1={class:"dss-comment-messages-wrapper"},T1={key:0,class:"dss-comment-avatar-wrapper"},D1={class:"dss-comment-avatar"},H1=["src","alt"],R1={key:1},F1={class:"dss-comment-header"},I1={class:"dss-comment-header-text"},z1={class:"dss-comment-author"},P1={key:0,class:"dss-comment-date"},O1=["onClick","title"],q1={class:"dss-comment-overlay-inner"},W1=["placeholder","onKeydown"],Z1={class:"dss-text-editor-footer"},U1={class:"dss-text-editor-footer-content"},X1={class:"dss-text-editor-footer-stat"},Y1={class:"dss-text-editor-footer-stat"},j1=["title"],K1=["title"],G1={xmlns:"http://www.w3.org/2000/svg",version:"1.1","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"512",height:"512",x:"0",y:"0",viewBox:"0 0 32 32",style:{"enable-background":"new 0 0 512 512"},"xml:space":"preserve",class:""},Q1={class:"dss-image-popup-content"},J1={key:0,class:"dss-image-popup-no-alt-icon"},em=["title"],tm=["title"],lm={xmlns:"http://www.w3.org/2000/svg",version:"1.1","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"512",height:"512",x:"0",y:"0",viewBox:"0 0 32 32",style:{"enable-background":"new 0 0 512 512"},"xml:space":"preserve",class:""},nm={class:"dss-toolbar-left"},om=["title"],am=["title"],sm={class:"dss-toolbar-dropdown-wrapper"},rm=["title"],im=["src"],cm=["src"],um=["src"],dm=["src"],mm=["src"],pm=["src"],fm={key:6,width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"paragraph-icon"},vm=["title"],gm=["title"],hm=["title"],ym=["title"],km=["title"],Cm=["title"],bm=["title"],wm=["title"],xm=["title"],Em=["title"],Sm={key:2,class:"dss-toolbar-separator"},Vm={key:3,class:"dss-toolbar-dropdown-wrapper"},Nm=["title"],Bm={class:"dss-toolbar-dropdown-ai"},Mm={key:0,class:"dss-toolbar-right"},_m={key:0,class:"dss-toolbar-separator"},$m={key:0,class:"dss-toolbar-custom-group"},Lm={key:1,class:"dss-toolbar-separator"},Am={name:"DSSTextEditor"},Tm=Object.assign(Am,{props:{modelValue:{type:String,default:""},title:{type:String,default:""},description:{type:String,default:""},titlePlaceholder:{type:String,default:null},descriptionPlaceholder:{type:String,default:null},placeholder:{type:String,default:null},rows:{type:Number,default:10},fullHeight:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},richText:{type:Boolean,default:!1},border:{type:Boolean,default:!0},rounded:{type:Boolean,default:!1},fixedHeight:{type:Boolean,default:!1},options:{type:Object,default:()=>({}),validator:H=>typeof H=="object"&&H!==null},floatingToolbar:{type:Boolean,default:!1},askAi:{type:Boolean,default:!1},commentUser:{type:Object,default:null},customToolbarSlots:{type:Array,default:()=>["custom-tool-1","custom-tool-2","custom-tool-3"]},customToolbarFloatingMap:{type:Object,default:()=>({}),validator:H=>typeof H=="object"&&H!==null},locale:{type:String,default:null},comments:{type:Array,default:()=>[]}},emits:["update:modelValue","update:title","update:description","update:comments","change","blur","title-change","description-change","comment-submitted","comment-marker-clicked","comment-deleted"],setup(H,{expose:ne,emit:M}){const{t:A,locale:ue}=lo.useI18n(),I={h1:Lu,h2:Au,h3:Tu,h4:Du,h5:Hu,h6:Ru},$=H,ve=M,ct=e.useSlots(),Q=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
99
99
|
<path d="M10 0C4.5 0 0 4.5 0 10C0 15.5 4.5 20 10 20C15.5 20 20 15.5 20 10C20 4.5 15.5 0 10 0ZM2 10C2 5.6 5.6 2 10 2C11.8 2 13.5 2.6 14.9 3.7L3.7 14.9C2.6 13.5 2 11.8 2 10ZM10 18C8.2 18 6.5 17.4 5.1 16.3L16.3 5.1C17.4 6.5 18 8.2 18 10C18 14.4 14.4 18 10 18Z" fill="#c13340"/>
|
|
100
100
|
</svg>`,f=e.ref(null),we=e.ref(null),Ce=e.ref(!1),G=e.ref(!1),U=e.ref(!1),pe=e.ref(""),F=e.ref({}),Ee=e.ref(!1),De=e.ref(!1),tt=e.ref(""),pt=e.ref(""),W=e.ref(null),Ze=e.ref(null),qe=e.ref(null),xe=e.ref(null),Me=e.ref(""),Ye=e.ref(!1),ee=e.ref({}),lt=e.ref(!1),be=e.ref({}),Je=e.ref(null),ut=e.ref(null),Ct=e.ref(!1),Et=e.ref(""),Ht=e.ref(null),Pt=e.ref(""),se=e.ref(""),ge=e.ref(""),He=e.ref(null),_e=e.ref(null),Xt=e.ref(null),bt=e.ref(null),Gt=e.ref(null),Lt=e.ref(!1),qt=e.ref(""),K=e.ref({}),ye=e.ref(!1),Be=e.ref("upload"),Ue=e.ref(""),Ke=e.ref(null),Tt=e.ref(null),et=e.ref([]),Ot=e.ref([]),We=e.ref(null),Fe=e.ref(!1),xt=e.ref(""),ft=e.ref(""),J=e.ref(""),Z=e.ref(""),X=e.ref(""),re=e.ref(""),fe=e.ref(null),Ge=e.ref(null),Nt=e.ref(null),rl=e.ref(!1),St=e.ref(null),ll=e.ref(!1),S=e.ref(!1),C=e.ref(null),V=e.ref("p"),Y=e.ref(!1),le=e.ref([]),ze=e.ref(null),gt=e.ref(null),rt=e.ref(null),Oe=e.ref(!1),Bt=e.ref(0),Vt=100,ht=e.ref(null),yt=e.computed(()=>({"dss-text-editor-no-border":!$.border,"dss-text-editor-rounded":$.rounded,"dss-text-editor-full-height":$.fullHeight,"dss-comment-overlay-open":At.value!==null})),Mt=e.computed(()=>({})),_t=e.computed(()=>!$.fixedHeight||$.fullHeight?{}:{height:`${1.6*14*$.rows+24+2}px`,resize:"none",overflowY:"auto"}),hl=e.computed(()=>!$.fixedHeight||$.fullHeight?{}:{height:`${1.6*14*$.rows+32}px`,overflowY:"auto"}),Al=e.computed(()=>$.richText&&Ot.value.length>0),on=e.computed(()=>{if(!$.modelValue)return"";if($.richText){let o=$.modelValue.replace(/<script[^>]*>[\s\S]*?<\/script>/gi,"");return o=o.replace(/<style[^>]*>[\s\S]*?<\/style>/gi,""),o=o.replace(/<[^>]+>/g,""),o=o.replace(/ /g," "),o=o.replace(/&/g,"&"),o=o.replace(/</g,"<"),o=o.replace(/>/g,">"),o=o.replace(/"/g,'"'),o=o.replace(/'/g,"'"),o=o.replace(/\s+/g," ").trim(),o}return $.modelValue}),Wt=e.computed(()=>{const o=on.value.trim();return o?o.split(/\s+/).filter(n=>n.length>0).length:0}),dl=e.computed(()=>on.value.length),vn=e.computed(()=>bt.value!==null&&Be.value==="upload"&&Pt.value&&Pt.value.startsWith("data:")),gn=e.computed(()=>$.titlePlaceholder||A("textEditor.placeholders.title")),an=e.computed(()=>$.descriptionPlaceholder||A("textEditor.placeholders.description")),Tl=e.computed(()=>$.placeholder||A("textEditor.placeholders.startTyping")),El=o=>ct&&ct[o]!==void 0,xn=o=>{for(let n=o+1;n<$.customToolbarSlots.length;n++)if(El($.customToolbarSlots[n]))return!0;return!1},sn=o=>{for(let n=o+1;n<$.customToolbarSlots.length;n++){const s=$.customToolbarSlots[n];if(El(s)&&Fl(s))return!0}return!1},Fl=o=>$.customToolbarFloatingMap.hasOwnProperty(o)?$.customToolbarFloatingMap[o]===!0:!0,Gl=e.computed(()=>$.customToolbarSlots.some(o=>El(o)&&Fl(o))),yl=e.computed(()=>El("title-slot")),Ql=e.computed(()=>El("description-slot")),D=o=>{if(!o||o.trim()==="")return"<html></html>";const n=o.trim();return n.startsWith("<html>")&&n.endsWith("</html>")?o:`<html>${o}</html>`},O=o=>{if(!o||o.trim()==="")return"";const n=o.replace(/<!--[\s\S]*?-->/g,""),s=n.trim();return s.startsWith("<html>")&&s.endsWith("</html>")?s.slice(6,-7).trim():n},_=o=>{if(!o)return;const n=document.createTreeWalker(o,NodeFilter.SHOW_COMMENT,null,!1),s=[];let r=n.nextNode();for(;r;)s.push(r),r=n.nextNode();s.forEach(c=>c.remove())},ce=o=>{try{const n=String(o.getDate()).padStart(2,"0"),r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][o.getMonth()],c=o.getFullYear();return`${n} ${r} ${c}`}catch{return""}},$e=o=>{if(!o||typeof o!="string")return!1;const n=o.trim();if(!n)return!1;if(["Started conversation","A démarré la conversation","started_conversation","conv_started"].includes(n))return!0;try{const c=A("textEditor.started_conversation");if(c&&n===c)return!0}catch{}const r=n.toLowerCase();return r.includes("started conversation")||r.includes("démarré la conversation")||r==="started conversation"||r==="a démarré la conversation"},dt=o=>{const n=o.target.value;ve("update:modelValue",n),ve("change",n)},Qe=()=>{if(!fe.value)return;const o=fe.value;if(o.style.setProperty("text-overflow","","important"),o.style.setProperty("white-space","","important"),o.style.setProperty("overflow-x","","important"),o.style.setProperty("height","auto","important"),o.value.trim()===""){const r=o.value;o.value="M";const c=o.scrollHeight;o.value=r,o.style.setProperty("height",`${c}px`,"important"),o.style.setProperty("overflow-y","hidden","important");return}o.offsetHeight;const s=o.scrollHeight;o.style.setProperty("height",`${s}px`,"important"),o.style.setProperty("overflow-y","hidden","important")},ot=()=>{ll.value=!0,Qe()},Dt=()=>{ll.value=!1,nl()},nl=()=>{if(!fe.value)return;const o=fe.value;o.style.setProperty("text-overflow","","important"),o.style.setProperty("white-space","","important"),o.style.setProperty("overflow-x","","important"),o.style.setProperty("height","auto","important");const n=o.value;o.value="M";const s=o.scrollHeight;o.value=n,o.offsetHeight,o.style.setProperty("height",`${s}px`,"important"),o.style.setProperty("overflow-y","hidden","important"),o.style.setProperty("overflow-x","hidden","important"),o.style.setProperty("text-overflow","ellipsis","important"),o.style.setProperty("white-space","nowrap","important")},Dl=o=>{const s=o.target.value;ll.value&&Qe(),ve("update:title",s),ve("title-change",s),Nt.value="title",$.richText&&(Fe.value||(ft.value=xt.value,X.value=J.value,re.value=Z.value),We.value&&clearTimeout(We.value),Fe.value=!0,We.value=setTimeout(()=>{Fe.value=!1,at()},500))},Nl=()=>{if(!Ge.value)return;const o=Ge.value;if(o.style.setProperty("text-overflow","","important"),o.style.setProperty("white-space","","important"),o.style.setProperty("overflow-x","","important"),o.style.setProperty("height","auto","important"),o.value.trim()===""){const r=o.value;o.value="M";const c=o.scrollHeight;o.value=r,o.style.setProperty("height",`${c}px`,"important"),o.style.setProperty("overflow-y","hidden","important");return}o.offsetHeight;const s=o.scrollHeight;o.style.setProperty("height",`${s}px`,"important"),o.style.setProperty("overflow-y","hidden","important")},Ol=()=>{S.value=!0,Nl()},$n=()=>{S.value=!1,Jl()},Jl=()=>{if(!Ge.value)return;const o=Ge.value;o.style.setProperty("text-overflow","","important"),o.style.setProperty("white-space","","important"),o.style.setProperty("overflow-x","","important"),o.style.setProperty("height","auto","important");const n=o.value;o.value="M";const s=o.scrollHeight;o.value=n,o.offsetHeight,o.style.setProperty("height",`${s}px`,"important"),o.style.setProperty("overflow-y","hidden","important"),o.style.setProperty("overflow-x","hidden","important"),o.style.setProperty("text-overflow","ellipsis","important"),o.style.setProperty("white-space","nowrap","important")},kl=o=>{const s=o.target.value;S.value&&Nl(),ve("update:description",s),ve("description-change",s),Nt.value="description",$.richText&&(Fe.value||(ft.value=xt.value,X.value=J.value,re.value=Z.value),We.value&&clearTimeout(We.value),Fe.value=!0,We.value=setTimeout(()=>{Fe.value=!1,at()},500))},Qt=()=>{const o=window.getSelection();if(o.rangeCount===0)return null;const n=o.getRangeAt(0);if(n.startContainer.nodeType===1)return{type:"element",element:n.startContainer,offset:n.startOffset};const s=n.cloneRange();return s.selectNodeContents(f.value),s.setEnd(n.startContainer,n.startOffset),{type:"text",start:s.toString().length,end:s.toString().length+n.toString().length}},ol=o=>{if(!(!o||!f.value))try{const n=window.getSelection(),s=document.createRange();if(o.type==="element"&&o.element)if(f.value.contains(o.element)){s.setStart(o.element,o.offset),s.collapse(!0),n.removeAllRanges(),n.addRange(s);return}else{f.value.focus();return}let r=0;const c=[f.value];let d=null,u=!1,m=!1;for(;!m&&(d=c.pop());)if(d.nodeType===3){const v=r+d.length;!u&&o.start>=r&&o.start<=v&&(s.setStart(d,o.start-r),u=!0),u&&o.end>=r&&o.end<=v&&(s.setEnd(d,o.end-r),m=!0),r=v}else{let v=d.childNodes.length;for(;v--;)c.push(d.childNodes[v])}n.removeAllRanges(),n.addRange(s)}catch{f.value.focus()}},rn=()=>{if(!f.value)return;f.value.focus();const o=window.getSelection(),n=document.createRange(),s=c=>{if(c.nodeType===3||c.childNodes.length===0)return c;for(let d=c.childNodes.length-1;d>=0;d--){const u=c.childNodes[d],m=s(u);if(m)return m}return c},r=s(f.value);if(r.nodeType===3)n.setStart(r,r.length),n.setEnd(r,r.length);else if(r.childNodes.length>0){const c=s(r);c&&c.nodeType===3?(n.setStart(c,c.length),n.setEnd(c,c.length)):(n.selectNodeContents(r),n.collapse(!1))}else n.setStart(r,0),n.setEnd(r,0);o.removeAllRanges(),o.addRange(n)},at=(o=!1)=>{if(!f.value)return;const n=f.value.innerHTML,s=$.title||"",r=$.description||"";if(!o&&n===xt.value&&s===J.value&&r===Z.value)return;const c={content:ft.value||xt.value,title:X.value!==void 0?X.value:J.value,description:re.value!==void 0?re.value:Z.value},d=et.value.length>0?et.value[et.value.length-1]:null;let u=!0;d&&(typeof d=="string"?u=c.content!==d:u=c.content!==d.content||c.title!==d.title||c.description!==d.description),u&&(et.value.push(c),et.value.length>50&&et.value.shift(),Ot.value=[]),xt.value=n,J.value=s,Z.value=r,ft.value=n,X.value=s,re.value=r},de=o=>{if(!f.value)return;hn(),f.value&&_(f.value);let n=null;f.value&&(f.value.querySelector("p")||(n=Qt(),kt()));const s=o&&o.inputType&&(o.inputType==="insertText"||o.inputType==="insertCompositionText"||o.inputType==="deleteContentBackward"||o.inputType==="deleteContentForward");s&&C.value&&(C.value=null),G.value=!0;const r=f.value.innerHTML.replace(/<!--[\s\S]*?-->/g,"").replace(/ |\u00A0/g," "),c=D(r);ve("update:modelValue",c),ve("change",c),Nt.value="editor",Fe.value||(ft.value=xt.value,X.value=J.value,re.value=Z.value),We.value&&clearTimeout(We.value),Fe.value=!0,We.value=setTimeout(()=>{Fe.value=!1,at(),Gn(),Mo()},500),e.nextTick(()=>{n&&ol(n),hn();const d=["bold","italic","underline"],u=window.getSelection(),m=u.rangeCount>0?u.getRangeAt(0):null,v=m&&m.collapsed;if(d.forEach(k=>{try{if(v&&C.value?.command===k){ee.value[k]=C.value.state;return}if(k==="bold")if(m){const L=m.commonAncestorContainer,R=L.nodeType===3?L.parentElement:L;let E=!1;if(R&&((R.tagName==="STRONG"||R.tagName==="B"||R.closest&&R.closest("strong, b"))&&(E=!0),!E&&R.style&&parseInt(R.style.fontWeight)>=600&&(E=!0),!E))try{const ae=window.getComputedStyle(R);parseInt(ae.fontWeight)>=600&&(E=!0)}catch{}ee.value[k]=E}else ee.value.hasOwnProperty(k)||(ee.value[k]=!1);else if(k==="italic")if(m){const L=m.commonAncestorContainer,R=L.nodeType===3?L.parentElement:L,E=R&&(R.tagName==="EM"||R.tagName==="I"||R.closest&&R.closest("em, i"));ee.value[k]=!!E}else{const L=document.queryCommandState(k);ee.value[k]=L}else{const L=document.queryCommandState(k);ee.value[k]=L}}catch{}}),Ml(),ml(),Ae(),tl(),wt(),wl("handleRichTextInput"),s&&(o.inputType==="insertText"||o.inputType==="insertCompositionText")){const k=o.data||"";k&&k.length===1&&setTimeout(()=>Mo(k),0),(k===" "||k===`
|
|
101
101
|
`||/[.,;:!?]/.test(k))&&setTimeout(()=>{Gn()},100)}G.value=!1})},hn=()=>{if(!f.value)return;const o=window.getSelection();if(!o||o.rangeCount===0)return;const n=o.getRangeAt(0),s=n.commonAncestorContainer,r=s.nodeType===3?s.parentElement:s;if(!r)return;const c=r.closest(".dss-image-wrapper");if(c){const d=c.querySelector("img");if(r!==d&&!d?.contains(r)){const u=n.startContainer.nodeType===3?n.startContainer.parentElement:n.startContainer,m=n.endContainer.nodeType===3?n.endContainer.parentElement:n.endContainer;if(c.contains(u)&&u!==d||c.contains(m)&&m!==d){const v=document.createRange();v.setStartAfter(c),v.collapse(!0),o.removeAllRanges(),o.addRange(v)}}}},kt=()=>{if(!f.value)return;const o=f.value;if(o.querySelector&&o.querySelector("p"))return;const n=new Set(["P","H1","H2","H3","H4","H5","H6","BLOCKQUOTE","UL","OL","DIV"]),s=Array.from(o.childNodes);let r=null;s.forEach(c=>{if(c.nodeType===Node.TEXT_NODE){if((c.textContent||"").trim()===""){c.parentNode===o&&o.removeChild(c);return}r||(r=document.createElement("p"),o.insertBefore(r,c)),r.appendChild(c);return}if(c.nodeType===Node.ELEMENT_NODE){const d=c,u=d.tagName;if(u==="BR"){r=null;return}if(n.has(u)){r=null;return}r||(r=document.createElement("p"),o.insertBefore(r,d)),r.appendChild(d)}})},ml=()=>{if(f.value&&!rl.value){rl.value=!0;try{f.value.querySelectorAll(".dss-image-wrapper").forEach(r=>{r.querySelector("img")||r.remove()}),f.value.querySelectorAll(".dss-image-no-alt-icon").forEach(r=>{const c=r.parentElement;!c||!c.classList.contains("dss-image-wrapper")?r.remove():c.querySelector("img")||r.remove()}),f.value.querySelectorAll("img").forEach(r=>{let c=r.getAttribute("alt");c===null&&(c=r.alt||"");const d=r.getAttribute("src")||r.src||"";if(c){const k=d.replace(/^https?:\/\//,"").replace(/^data:.*,/,""),L=c===d||c===k;(c.startsWith("http://")||c.startsWith("https://")||c.startsWith("data:")||L||L)&&(c="")}r.setAttribute("alt",c),r.setAttribute("data-alt",c);const u=!c||c.trim()==="";let m=r.parentElement;const v=m&&m.classList.contains("dss-image-wrapper");if(v){const k=m.querySelector(".dss-image-no-alt-icon");k&&k.remove()}else{const k=r.nextElementSibling?.classList.contains("dss-image-no-alt-icon")?r.nextElementSibling:null;k&&k.remove()}if(u){v?m.setAttribute("contenteditable","false"):(m=document.createElement("span"),m.className="dss-image-wrapper",m.setAttribute("contenteditable","false"),r.parentNode.insertBefore(m,r),m.appendChild(r));const k=document.createElement("div");k.className="dss-image-no-alt-icon",k.setAttribute("contenteditable","false"),k.innerHTML=Q,m.appendChild(k)}else if(v&&m.children.length===1){const k=m.parentNode;k.insertBefore(r,m),k.removeChild(m)}})}finally{rl.value=!1}}},st=o=>{Gn(),ve("blur",o),qn()},vt=()=>{if($.disabled||!$.richText||!f.value)return;il(),We.value&&(clearTimeout(We.value),We.value=null),Fe.value&&(at(),Fe.value=!1);const o=Nt.value==="title",n=Nt.value==="description",s=Nt.value==="editor";if(et.value.length===0){o&&fe.value?fe.value.focus():n&&Ge.value?Ge.value.focus():f.value.focus(),document.execCommand("undo",!1),e.nextTick(()=>{de()});return}const r={content:f.value.innerHTML,title:$.title||"",description:$.description||""};Ot.value.push(r);const c=et.value.pop();if(c!==void 0){G.value=!0;const d=typeof c=="string"?c:c.content,u=typeof c=="object"&&c.title||"",m=typeof c=="object"&&c.description||"";f.value.innerHTML=d,xt.value=d,J.value=u,Z.value=m,ft.value=d,X.value=u,re.value=m,e.nextTick(()=>{Ml(),pl(),it(),tl();const v=D(d);ve("update:modelValue",v),ve("update:title",u),ve("update:description",m),ve("change",v),ve("title-change",u),ve("description-change",m),G.value=!1,e.nextTick(()=>{setTimeout(()=>{if(o){if(fe.value){fe.value.focus();const k=u.length;fe.value.setSelectionRange&&fe.value.setSelectionRange(k,k),Qe()}}else if(n){if(Ge.value){Ge.value.focus();const k=m.length;Ge.value.setSelectionRange(k,k)}}else if(s)rn();else if(fe.value&&document.activeElement===fe.value){const k=u.length;fe.value.setSelectionRange&&fe.value.setSelectionRange(k,k),Qe()}else if(Ge.value&&document.activeElement===Ge.value){const k=m.length;Ge.value.setSelectionRange(k,k)}else f.value&&rn()},10)})})}},oe=()=>{if($.disabled||!$.richText||!f.value)return;il();const o=Nt.value==="title",n=Nt.value==="description",s=Nt.value==="editor";if(Ot.value.length===0){o&&fe.value?fe.value.focus():n&&Ge.value?Ge.value.focus():f.value.focus(),document.execCommand("redo",!1),e.nextTick(()=>{de()});return}const r={content:f.value.innerHTML,title:$.title||"",description:$.description||""};et.value.push(r);const c=Ot.value.pop();if(c!==void 0){G.value=!0;const d=typeof c=="string"?c:c.content,u=typeof c=="object"&&c.title||"",m=typeof c=="object"&&c.description||"";f.value.innerHTML=d,xt.value=d,J.value=u,Z.value=m,ft.value=d,X.value=u,re.value=m,e.nextTick(()=>{Ml(),pl(),it(),tl();const v=D(d);ve("update:modelValue",v),ve("update:title",u),ve("update:description",m),ve("change",v),ve("title-change",u),ve("description-change",m),G.value=!1,e.nextTick(()=>{setTimeout(()=>{if(o){if(fe.value){fe.value.focus();const k=u.length;fe.value.setSelectionRange&&fe.value.setSelectionRange(k,k),Qe()}}else if(n){if(Ge.value){Ge.value.focus();const k=m.length;Ge.value.setSelectionRange(k,k)}}else if(s)rn();else if(fe.value&&document.activeElement===fe.value){const k=u.length;fe.value.setSelectionRange&&fe.value.setSelectionRange(k,k),Qe()}else if(Ge.value&&document.activeElement===Ge.value){const k=m.length;Ge.value.setSelectionRange(k,k)}else f.value&&rn()},10)})})}},Yt=()=>{if(!f.value)return;f.value.querySelectorAll('span[style*="font-weight"]').forEach(r=>{const c=r.style.fontWeight;if(c==="normal"||c==="400"){const d=document.createDocumentFragment();for(;r.firstChild;)d.appendChild(r.firstChild);r.parentNode&&r.parentNode.replaceChild(d,r)}}),f.value.querySelectorAll('span[style*="font-weight"]').forEach(r=>{if(parseInt(r.style.fontWeight)>=600){const d=document.createElement("b");for(d.style.fontWeight="600";r.firstChild;)d.appendChild(r.firstChild);r.parentNode&&r.parentNode.replaceChild(d,r)}}),f.value.querySelectorAll("b, strong").forEach(r=>{r.style.fontWeight="600"})},Ae=()=>{if(!f.value)return;f.value.querySelectorAll("i, em").forEach(n=>{n.style.fontStyle="italic"})},so=()=>{const o=window.getSelection();if(!o||o.rangeCount===0)return!1;const n=o.getRangeAt(0);let s=!1;if(n.collapsed){const r=n.startContainer;let c=r.nodeType===3?r.parentElement:r;for(;c&&c!==f.value;){if(c.tagName==="EM"||c.tagName==="I"){s=!0;break}if(c.style&&c.style.fontStyle==="italic"){s=!0;break}c=c.parentElement}}else{const r=n.commonAncestorContainer.nodeType===1?n.commonAncestorContainer:n.commonAncestorContainer.parentNode;if(r){const c=document.createTreeWalker(r,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);let d;for(;d=c.nextNode();)if(!(typeof n.intersectsNode=="function"&&!n.intersectsNode(d))){if(d.nodeType===3){let u=d.parentElement;for(;u&&u!==f.value;){if(u.tagName==="EM"||u.tagName==="I"){s=!0;break}if(u.style&&u.style.fontStyle==="italic"){s=!0;break}u=u.parentElement}}else if(d.nodeType===1){const u=d;if(u.tagName==="EM"||u.tagName==="I"){s=!0;break}if(u.style&&u.style.fontStyle==="italic"){s=!0;break}}if(s)break}}}if(s)return document.execCommand("italic",!1),e.nextTick(()=>{Ae()}),!1;if(n.collapsed)document.execCommand("italic",!1),e.nextTick(()=>{Ae()});else try{const r=n.extractContents(),c=document.createElement("em");c.style.fontStyle="italic",c.appendChild(r),n.insertNode(c),n.setStartAfter(c),n.collapse(!0),o.removeAllRanges(),o.addRange(n),e.nextTick(()=>{Ae()})}catch{document.execCommand("italic",!1),e.nextTick(()=>{Ae()})}return!0},al=()=>{const o=window.getSelection();if(!o||o.rangeCount===0)return!1;const n=o.getRangeAt(0);let s=!1;if(n.collapsed){const r=n.startContainer;let c=r.nodeType===3?r.parentElement:r;for(;c&&c!==f.value;){if(c.tagName==="STRONG"||c.tagName==="B"){s=!0;break}if(c.style&&parseInt(c.style.fontWeight)>=600){s=!0;break}c=c.parentElement}}else{const r=n.commonAncestorContainer.nodeType===1?n.commonAncestorContainer:n.commonAncestorContainer.parentNode;if(r){const c=document.createTreeWalker(r,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);let d;for(;d=c.nextNode();)if(!(typeof n.intersectsNode=="function"&&!n.intersectsNode(d))){if(d.nodeType===3){let u=d.parentElement;for(;u&&u!==f.value;){if(u.tagName==="STRONG"||u.tagName==="B"){s=!0;break}if(u.style&&parseInt(u.style.fontWeight)>=600){s=!0;break}u=u.parentElement}}else if(d.nodeType===1){const u=d;if(u.tagName==="STRONG"||u.tagName==="B"){s=!0;break}if(u.style&&parseInt(u.style.fontWeight)>=600){s=!0;break}}if(s)break}}}if(s)return document.execCommand("bold",!1),e.nextTick(()=>{Yt()}),!1;if(n.collapsed)document.execCommand("bold",!1),e.nextTick(()=>{const r=window.getSelection();if(r.rangeCount>0){const c=r.getRangeAt(0),d=c.startContainer;let u=d.nodeType===3?d.parentElement:d;for(;u&&u!==f.value;){if(u.tagName==="SPAN"&&u.style.fontWeight){const m=u.style.fontWeight;if(m==="normal"||m==="400"){const v=document.createElement("b");v.style.fontWeight="600";const k=document.createDocumentFragment();for(;u.firstChild;)k.appendChild(u.firstChild);v.appendChild(k),u.parentNode&&u.parentNode.replaceChild(v,u),c.setStart(v,0),c.collapse(!0),r.removeAllRanges(),r.addRange(c);break}}else if(u.tagName==="STRONG"||u.tagName==="B"){u.style.fontWeight="600";break}u=u.parentElement}if(!u||u===f.value){const m=document.createElement("b");m.style.fontWeight="600",m.innerHTML="<br>",c.insertNode(m),c.setStart(m,0),c.collapse(!0),r.removeAllRanges(),r.addRange(c)}}Yt()});else try{const r=n.extractContents(),c=document.createElement("b");c.style.fontWeight="600",c.appendChild(r),n.insertNode(c),n.setStartAfter(c),n.collapse(!0),o.removeAllRanges(),o.addRange(n),e.nextTick(()=>{Yt()})}catch{document.execCommand("bold",!1),e.nextTick(()=>{Yt()})}return!0},Bl=(o,n=null)=>{if($.disabled||!$.richText||!f.value)return;Fe.value?(We.value&&(clearTimeout(We.value),We.value=null),at(),Fe.value=!1):at(),il(),f.value.focus();const s=window.getSelection();let r=null;if(s&&s.rangeCount>0){const d=s.getRangeAt(0);!d.collapsed&&Zt(d)&&(r=Qt())}if(o==="createLink"&&n){const d=window.getSelection();if(d.rangeCount>0){const u=d.getRangeAt(0);if(u.collapsed)try{u.expand("word")}catch{const v=document.createTextNode(n);u.insertNode(v),u.selectNodeContents(v)}}}if(o==="bold"){const d=al();ee.value.bold=d;const u=window.getSelection();u.rangeCount>0&&u.getRangeAt(0).collapsed&&(C.value={command:"bold",state:d}),e.nextTick(()=>{r&&(ol(r),e.nextTick(()=>{const m=el("bold");ee.value.bold=m})),de(),pl(),tl()});return}if(o==="italic"){const d=so();ee.value.italic=d;const u=window.getSelection();u.rangeCount>0&&u.getRangeAt(0).collapsed&&(C.value={command:"italic",state:d}),e.nextTick(()=>{r&&(ol(r),e.nextTick(()=>{const m=el("italic");ee.value.italic=m})),de(),Ae(),pl(),tl()});return}let c=!1;try{c=document.execCommand(o,!1,n)}catch{}e.nextTick(()=>{if(r&&ol(r),["bold","italic","underline"].includes(o))try{if(o==="bold")r&&e.nextTick(()=>{const u=el("bold");ee.value.bold=u});else if(o==="italic")if(r)e.nextTick(()=>{const u=el("italic");ee.value.italic=u});else{const u=document.queryCommandState(o);ee.value[o]=u}else{const u=document.queryCommandState(o);ee.value[o]=u}}catch{ee.value.hasOwnProperty(o)?ee.value[o]=!ee.value[o]:ee.value[o]=!0}if(o==="createLink"&&n){const u=window.getSelection();if(u.rangeCount>0){const v=u.getRangeAt(0),k=v.commonAncestorContainer.nodeType===1?v.commonAncestorContainer.closest("a"):v.commonAncestorContainer.parentElement?.closest("a");k&&(!k.getAttribute("href")||k.getAttribute("href")==="")&&k.setAttribute("href",n)}f.value.querySelectorAll("a").forEach(v=>{const k=v.getAttribute("href");(!k||k===""||k==="#")&&v.setAttribute("href",n)})}de(),pl(),tl()})},el=(o,n=null)=>{if($.disabled||!f.value)return!1;try{if(o==="formatBlock"&&n){const r=document.queryCommandValue("formatBlock");if(n==="<blockquote>"){const c=r.toLowerCase();if(c==="blockquote"||c==="<blockquote>")return!0;const d=window.getSelection();if(d.rangeCount>0){const m=d.getRangeAt(0).commonAncestorContainer;return!!(m.nodeType===1?m.tagName==="BLOCKQUOTE"?m:m.closest("blockquote"):m.parentElement?.closest("blockquote"))}}return r===n||r.toLowerCase()===n.toLowerCase()}if(["bold","italic","underline"].includes(o))try{const r=window.getSelection();if(r.rangeCount>0){const c=r.getRangeAt(0);if(o==="bold"){let u=!1;if(c.collapsed){const m=c.commonAncestorContainer,v=m.nodeType===3?m.parentElement:m;if(v&&((v.tagName==="STRONG"||v.tagName==="B"||v.closest&&v.closest("strong, b"))&&(u=!0),!u&&v.style&&parseInt(v.style.fontWeight)>=600&&(u=!0),!u))try{const k=window.getComputedStyle(v);parseInt(k.fontWeight)>=600&&(u=!0)}catch{}return ee.value.hasOwnProperty(o)?ee.value[o]:(ee.value[o]=u,u)}else{const m=c.commonAncestorContainer.nodeType===1?c.commonAncestorContainer:c.commonAncestorContainer.parentNode;let v=!1;if(m){const k=document.createTreeWalker(m,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);let L;for(;L=k.nextNode();)if(!(typeof c.intersectsNode=="function"&&!c.intersectsNode(L))){if(L.nodeType===3){if(!(L.textContent||"").trim())continue;v=!0;let E=L.parentElement;for(;E&&E!==f.value;){if(E.tagName==="STRONG"||E.tagName==="B"){u=!0;break}if(E.style&&parseInt(E.style.fontWeight)>=600){u=!0;break}E=E.parentElement}}else if(L.nodeType===1){const R=L;if(R.tagName==="STRONG"||R.tagName==="B"){u=!0;break}if(R.style&&parseInt(R.style.fontWeight)>=600){u=!0;break}}if(u)break}}return ee.value[o]=u&&v,u&&v}}if(o==="italic"){let u=!1;if(c.collapsed){const m=c.commonAncestorContainer,v=m.nodeType===3?m.parentElement:m;if(v&&((v.tagName==="EM"||v.tagName==="I"||v.closest&&v.closest("em, i"))&&(u=!0),!u&&v.style&&v.style.fontStyle==="italic"&&(u=!0),!u))try{window.getComputedStyle(v).fontStyle==="italic"&&(u=!0)}catch{}return ee.value.hasOwnProperty(o)?ee.value[o]:(ee.value[o]=u,u)}else{const m=c.commonAncestorContainer.nodeType===1?c.commonAncestorContainer:c.commonAncestorContainer.parentNode;let v=!1;if(m){const k=document.createTreeWalker(m,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);let L;for(;L=k.nextNode();)if(!(typeof c.intersectsNode=="function"&&!c.intersectsNode(L))){if(L.nodeType===3){if(!(L.textContent||"").trim())continue;v=!0;let E=L.parentElement;for(;E&&E!==f.value;){if(E.tagName==="EM"||E.tagName==="I"){u=!0;break}if(E.style&&E.style.fontStyle==="italic"){u=!0;break}E=E.parentElement}}else if(L.nodeType===1){const R=L;if(R.tagName==="EM"||R.tagName==="I"){u=!0;break}if(R.style&&R.style.fontStyle==="italic"){u=!0;break}}if(u)break}}return ee.value[o]=u&&v,u&&v}}const d=document.queryCommandState(o);return c.collapsed&&ee.value.hasOwnProperty(o)?ee.value[o]:(ee.value[o]=d,d)}return ee.value.hasOwnProperty(o)?ee.value[o]:!1}catch{return ee.value.hasOwnProperty(o)?ee.value[o]:!1}try{return document.queryCommandState(o)}catch{return!1}}catch{return!1}},Il=o=>{$.disabled||!$.richText||(we.value=we.value===o?null:o,o==="askAi"&&(ut.value=null))},il=()=>{we.value=null,Ke.value=null},zl=o=>{Bl("formatBlock",o),il()},In=o=>{if(!o||!f.value)return o;const n=Ie=>{let Ve=Ie.nodeType===Node.TEXT_NODE?Ie.parentElement:Ie;for(;Ve&&Ve!==f.value;){const nt=Ve.tagName;if(nt==="P"){const bl=Ve.parentElement;if(bl===f.value||bl.tagName==="BLOCKQUOTE")return Ve}if(nt==="BLOCKQUOTE")break;Ve=Ve.parentElement}return null},s=n(o.startContainer),r=n(o.endContainer);if(!s||!r)return o;const c=[],d=document.createTreeWalker(f.value,NodeFilter.SHOW_ELEMENT,{acceptNode:Ie=>{const Ve=Ie.tagName;if(Ve==="P"){const nt=Ie.parentElement;if(nt===f.value||nt.tagName==="BLOCKQUOTE")return NodeFilter.FILTER_ACCEPT}return Ve==="BLOCKQUOTE"?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_SKIP}});let u;for(;u=d.nextNode();)c.push(u);const m=c.indexOf(s),v=c.indexOf(r);if(m===-1||v===-1)return o;const k=Math.min(m,v),L=Math.max(m,v),R=c.slice(k,L+1);if(R.length===0)return o;const E=R[0],ae=R[R.length-1],j=document.createRange();return j.setStartBefore(E),j.setEndAfter(ae),j},Ln=()=>{if($.disabled||!$.richText||!f.value)return;Fe.value?(We.value&&(clearTimeout(We.value),We.value=null),at(),Fe.value=!1):at(),il(),f.value.focus();const o=window.getSelection();if(o.rangeCount===0)return;let n=o.getRangeAt(0);!n.collapsed&&Zt(n)&&(n=In(n),o.removeAllRanges(),o.addRange(n));let s=null;!n.collapsed&&Zt(n)&&(s=Qt());const r=n.commonAncestorContainer,c=r.nodeType===1?r.tagName==="BLOCKQUOTE"?r:r.closest("blockquote"):r.parentElement?.closest("blockquote");if(!!(c&&f.value.contains(c))){if(c){const u=c.parentNode;Array.from(c.childNodes).forEach(v=>{if(v.nodeType===Node.ELEMENT_NODE)if(v.tagName==="P"||v.tagName==="DIV")u.insertBefore(v,c);else{const k=document.createElement("p");k.appendChild(v.cloneNode(!0)),u.insertBefore(k,c)}else if(v.nodeType===Node.TEXT_NODE&&v.textContent.trim()){const k=document.createElement("p");k.appendChild(v.cloneNode(!0)),u.insertBefore(k,c)}}),c.remove()}}else if(n.collapsed)document.execCommand("formatBlock",!1,"<blockquote>");else{const u=document.createElement("blockquote"),m=n.extractContents();u.appendChild(m),n.insertNode(u);const v=[],k=document.createTreeWalker(u,NodeFilter.SHOW_TEXT,{acceptNode:E=>E.parentNode===u&&E.textContent.trim()?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let L;for(;L=k.nextNode();)v.push(L);if(v.forEach(E=>{const ae=document.createElement("p");E.parentNode.insertBefore(ae,E),ae.appendChild(E)}),u.querySelectorAll("p, div").forEach(E=>{E.textContent.trim()===""&&!E.querySelector("img")&&(E.innerHTML="<br>")}),u.children.length===0&&u.textContent.trim()===""){const E=document.createElement("p");E.innerHTML="<br>",u.appendChild(E)}}e.nextTick(()=>{s&&ol(s),it(),de(),tl()})},Wl=()=>{if(!f.value)return;const o=window.getSelection();if(o.rangeCount===0)return;const s=o.getRangeAt(0).commonAncestorContainer,r=s.nodeType===1?s.tagName==="BLOCKQUOTE"?s:s.closest("blockquote"):s.parentElement?.closest("blockquote");if(!r||!f.value.contains(r))return;const c=L=>{if(!L)return!1;const R=L.textContent||"",ae=(L.innerHTML||"").trim();return R.trim()===""||ae===""||ae==="<br>"||ae==="<br/>"||ae==="<p></p>"||ae==="<p><br></p>"||ae==="<p><br/></p>"||ae==="<p> </p>"||ae==="<p><br> </p>"||ae==="<div></div>"||ae==="<div><br></div>"||ae==="<div><br/></div>"};let d=null;for(s.nodeType===3?d=s.parentElement:s.tagName==="P"||s.tagName==="DIV"?d=s:d=s.closest("p, div"),d&&r.contains(d)&&c(d)&&d.remove();r.lastChild;){const L=r.lastChild;if(L.nodeType===1&&L.tagName==="BR")L.remove();else if(L.nodeType===3)if((L.textContent||"").trim()==="")L.remove();else break;else break}if(r.children.length>0)for(let L=r.children.length-1;L>=0;L--){const R=r.children[L];if((R.tagName==="P"||R.tagName==="DIV")&&c(R))R.remove();else break}let u=r.innerHTML;const m=u;u=u.replace(/(<br\s*\/?>)+$/gi,""),u!==m&&(r.innerHTML=u);const v=document.createElement("p");v.innerHTML="<br>",r.parentNode?r.nextSibling?r.parentNode.insertBefore(v,r.nextSibling):r.parentNode.appendChild(v):f.value&&f.value.appendChild(v);const k=document.createRange();k.selectNodeContents(v),k.collapse(!0),o.removeAllRanges(),o.addRange(k),e.nextTick(()=>{it(),de()})},pl=()=>{if(!f.value){Ce.value=!1;return}try{const o=window.getSelection();if(o.rangeCount>0){const s=o.getRangeAt(0).commonAncestorContainer,r=s.nodeType===1?s.closest("a"):s.parentElement?.closest("a");Ce.value=!!r}else Ce.value=!1}catch{Ce.value=!1}},Xn=()=>{if(!f.value)return;const o=window.getSelection();o&&o.rangeCount>0&&o.getRangeAt(0),xe.value=Qt();const n=window.getSelection();let s="";n.rangeCount>0&&(s=n.getRangeAt(0).toString()),tt.value="",pt.value=s,Me.value="",qe.value=null,De.value=!0,il(),e.nextTick(()=>{W.value&&W.value.focus()})},Yn=()=>{if(!f.value)return;Fe.value?(We.value&&(clearTimeout(We.value),We.value=null),at(),Fe.value=!1):at();const o=window.getSelection();let n=null;if(o.rangeCount>0){const r=o.getRangeAt(0).commonAncestorContainer;n=r.nodeType===1?r.closest("a"):r.parentElement?.closest("a")}if(!n&&qe.value&&(n=qe.value),n&&n.parentNode){const s=document.createDocumentFragment();for(;n.firstChild;)s.appendChild(n.firstChild);if(n.parentNode.replaceChild(s,n),s.firstChild){const r=document.createRange();r.setStartBefore(s.firstChild),r.setEndAfter(s.lastChild||s.firstChild),o.removeAllRanges(),o.addRange(r),document.execCommand("removeFormat",!1),r.collapse(!1),o.removeAllRanges(),o.addRange(r)}qe.value=null}else Bl("unlink");Ce.value=!1,il(),e.nextTick(()=>{de(),pl()})},cn=()=>{$.disabled||!$.richText||f.value&&(Fe.value?(We.value&&(clearTimeout(We.value),We.value=null),at(),Fe.value=!1):at(),il(),f.value.focus(),document.execCommand("insertUnorderedList",!1),e.nextTick(()=>{Ml(),de(),tl()}))},zn=()=>{$.disabled||!$.richText||f.value&&(Fe.value?(We.value&&(clearTimeout(We.value),We.value=null),at(),Fe.value=!1):at(),il(),f.value.focus(),document.execCommand("insertOrderedList",!1),e.nextTick(()=>{Ml(),de(),tl()}))},yn=o=>{const n=o.parentElement;if(!n||n.tagName!=="OL")return null;let s=0,r=o.previousElementSibling;for(;r;)r.tagName==="LI"&&s++,r=r.previousElementSibling;return s+1},Ml=()=>{if(!f.value)return;f.value.querySelectorAll("li > ol").forEach(n=>{const s=n.parentElement;if(s&&s.tagName==="LI"){const r=yn(s);r!==null&&Array.from(n.children).filter(d=>d.tagName==="LI").forEach(d=>{d.setAttribute("data-parent-num",String(r))})}})},Pn=()=>{if($.disabled||!$.richText||!f.value)return;il(),f.value.focus();const o=window.getSelection();if(o.rangeCount===0)return;const n=o.getRangeAt(0),s=n.commonAncestorContainer.nodeType===1?n.commonAncestorContainer.closest("li"):n.commonAncestorContainer.parentElement?.closest("li");if(!s){document.execCommand("indent",!1),e.nextTick(()=>{Ml(),de()});return}const r=s.parentElement;if(!r||r.tagName!=="OL"&&r.tagName!=="UL")return;const c=s.previousElementSibling;if(c&&c.tagName==="LI"){const d=r.tagName.toLowerCase();let u=c.querySelector(`:scope > ${d}`);u||(u=document.createElement(d),c.appendChild(u));const m=yn(c);u.appendChild(s),m!==null&&r.tagName==="OL"&&s.setAttribute("data-parent-num",String(m)),Ml();const v=document.createRange();v.selectNodeContents(s),v.collapse(!1),o.removeAllRanges(),o.addRange(v),e.nextTick(()=>{de(),tl()})}else document.execCommand("indent",!1),e.nextTick(()=>{Ml(),de(),tl()})},kn=()=>{if($.disabled||!$.richText||!f.value)return;il(),f.value.focus();const o=window.getSelection();if(o.rangeCount===0)return;const n=o.getRangeAt(0),s=n.commonAncestorContainer.nodeType===1?n.commonAncestorContainer.closest("li"):n.commonAncestorContainer.parentElement?.closest("li");if(!s){document.execCommand("outdent",!1),e.nextTick(()=>{Ml(),de()});return}const r=s.parentElement;if(!r||r.tagName!=="OL"&&r.tagName!=="UL")return;const c=r.parentElement;if(c&&c.tagName==="LI"){const d=c.parentElement;if(d&&(d.tagName==="OL"||d.tagName==="UL")){r.tagName==="OL"&&s.removeAttribute("data-parent-num"),d.insertBefore(s,c.nextSibling),r.children.length===0&&r.remove(),Ml();const u=document.createRange();u.selectNodeContents(s),u.collapse(!1),o.removeAllRanges(),o.addRange(u),e.nextTick(()=>{de(),tl()});return}}document.execCommand("outdent",!1),e.nextTick(()=>{Ml(),de(),tl()})},At=e.ref(null),Zl=e.ref(null),un=e.ref({}),y=e.ref(""),h=e.ref(null),x=e.ref("");e.ref("");const q=e.ref(null);e.ref("");const ie=e.ref([]),mt=e.ref(!1),Rt=e.ref(!1),_l=o=>{if(!o)return"";const n=o.cloneRange(),s=document.createElement("div");return s.appendChild(n.cloneContents()),s.innerHTML},Hl=()=>{if($.disabled||!$.richText||!f.value)return;if(At.value!==null){At.value=null,y.value="",x.value="",q.value=null,ie.value=[],xl(!0);return}il(),f.value.focus();const o=window.getSelection();if(!o||o.rangeCount===0)return;const n=o.getRangeAt(0);if(n.collapsed||!Zt(n))return;x.value=_l(n)||"",q.value=Qt();const s=n.getBoundingClientRect(),r=f.value.parentElement;if(!r)return;const c=r.getBoundingClientRect(),d=s.bottom-c.top,m=Math.max(d+8,0);un.value={top:`${m}px`,bottom:"auto"},At.value=Date.now(),e.nextTick(()=>{if(y.value="",h.value){const k=h.value;k.style.height="auto",k.style.height=`${k.scrollHeight}px`,k.focus()}const v=r.querySelector(".dss-comment-overlay");if(v&&r){const k=r.querySelector(".dss-text-editor-footer");if(k){const L=r.getBoundingClientRect(),R=v.getBoundingClientRect(),E=k.getBoundingClientRect(),ae=R.bottom-L.top,j=E.top-L.top,Ie=8;if(ae>j-Ie){const Ve=E.height;un.value={bottom:`${Ve+Ie}px`,top:"auto"}}else un.value={top:`${m}px`,bottom:"auto"}}}})},ql=()=>{if(!y.value.trim())return;const o=y.value.trim(),n=new Date,s={text:o,selectionText:x.value,selectionRange:q.value,commentId:At.value,user:$.commentUser||null,createdAt:n.toISOString()};ie.value=[...ie.value,s],ve("comment-submitted",s),io(s),q.value&&!ro(q.value)&&Eo(At.value,q.value),y.value="",e.nextTick(()=>{if(h.value){const r=h.value;r.style.height="auto",r.style.height=`${r.scrollHeight}px`,r.focus()}wl("sendComment")})},En=(o,n)=>{if(!(!$.commentUser||!o.user||o.user.id!==$.commentUser.id)){if(ie.value=ie.value.filter((s,r)=>r!==n),At.value!==null&&f.value){const s=String(At.value),r=f.value.querySelector(`[data-comment="${s}"], [data-fake-comment="${s}"]`);if(r&&ie.value.length>0){const c=[],d=new Set;ie.value.forEach(u=>{u.user&&u.user.id&&!d.has(u.user.id)&&(d.add(u.user.id),c.push(u.user))}),c.length>0?r.setAttribute("data-comment-user",JSON.stringify(c[0])):r.removeAttribute("data-comment-user"),c.length>1?r.setAttribute("data-comment-user-2",JSON.stringify(c[1])):r.removeAttribute("data-comment-user-2"),r.setAttribute("data-comment-count",String(ie.value.length))}else r&&ie.value.length===0&&(r.removeAttribute("data-comment-user"),r.removeAttribute("data-comment-user-2"),r.setAttribute("data-comment-count","0"))}if(ve("comment-deleted",{comment:o,index:n,commentId:At.value}),$.comments&&Array.isArray($.comments)){const s=$.comments.filter(r=>!(r.commentId===o.commentId&&r.text===o.text&&r.user?.id===o.user?.id));ve("update:comments",s)}e.nextTick(()=>{wl("deleteComment")})}},ro=o=>{if(!o||!f.value)return!1;try{const n=xo(o);if(!n)return!1;const s=n.commonAncestorContainer,r=s.nodeType===3?s.parentElement:s;if(r)return!!r.closest("[data-comment], [data-fake-comment]")}catch{}return!1},xo=o=>{if(!o||!f.value)return null;try{const n=document.createRange();if(o.type==="element"&&o.element)return f.value.contains(o.element)?(n.setStart(o.element,o.offset),n.collapse(!0),n):null;let s=0;const r=[f.value];let c=null,d=!1,u=!1;for(;!u&&(c=r.pop());)if(c.nodeType===3){const m=s+c.length;!d&&o.start>=s&&o.start<=m&&(n.setStart(c,o.start-s),d=!0),d&&o.end>=s&&o.end<=m&&(n.setEnd(c,o.end-s),u=!0),s=m}else{let m=c.childNodes.length;for(;m--;)r.push(c.childNodes[m])}return d?n:null}catch{return null}},Eo=(o,n)=>{if(!(!o||!n||!f.value))try{const s=xo(n);if(!s||s.collapsed)return;const r=s.commonAncestorContainer,c=r.nodeType===3?r.parentElement:r;if(c){const m=c.closest("[data-comment], [data-fake-comment]");if(m){m.getAttribute("data-comment")!==String(o)&&m.getAttribute("data-fake-comment")!==String(o)&&m.setAttribute("data-comment",String(o));return}}const d=document.createElement("span");d.setAttribute("data-comment",String(o));try{const m=s.startContainer,v=s.endContainer,k=s.startOffset,L=s.endOffset,R=m.nodeType===3?m.parentNode:m,E=v.nodeType===3?v.parentNode:v;if(R===E&&k===0&&L===(v.nodeType===3?v.length:E.childNodes.length)&&(R.tagName==="P"||R.tagName==="DIV"||R.tagName==="H1"||R.tagName==="H2"||R.tagName==="H3"||R.tagName==="H4"||R.tagName==="H5"||R.tagName==="H6")){const j=s.extractContents();d.appendChild(j),s.insertNode(d)}else s.surroundContents(d)}catch{const v=s.extractContents();d.appendChild(v),s.insertNode(d)}const u=f.value.querySelector(`[data-comment="${String(o)}"]`);e.nextTick(()=>{wl("wrapSelectionWithCommentMarker"),de()})}catch{}},io=o=>{if(!o||!o.commentId)return;const n=Array.isArray($.comments)?[...$.comments]:[],s=typeof o.commentId=="string"&&o.commentId.startsWith("comment-")?Date.now():Number(o.commentId)||o.commentId;let r=n.findIndex(d=>typeof d.conversation_id=="string"&&d.conversation_id.startsWith("comment-")?null:Number(d.conversation_id)===Number(s)||d.conversation_id===s);const c={text:o.text,user:o.user,createdAt:o.createdAt,created_at:o.createdAt,updated_at:o.createdAt};if(r>=0){const d=n[r];if(d.conversation||(d.conversation=[]),d.conversation.push(c),d.updated_at=o.createdAt,!d.article_id&&n.length>0){const u=n.find(m=>m.article_id);u&&(d.article_id=u.article_id)}}else{const d=o.selectionRange,u=n.length>0&&n.find(v=>v.article_id)?.article_id||null,m={conversation_id:s,article_id:u,selection_range:d?{start:d.start||0,end:d.end||0,type:d.type||"text"}:null,selection_text:o.selectionText||"",conversation:[c],created_by_user:o.user,created_at:o.createdAt,updated_at:o.createdAt,status:"active"};n.push(m)}mt.value=!0,ve("update:comments",n)},So=(o,n=[])=>{if($.disabled||!$.richText||!f.value)return;const s=f.value;let r=null;try{r=s.querySelector(o)}catch{return}if(!r)return;il(),s.focus();const c=document.createRange();c.selectNodeContents(r);const d=window.getSelection();d&&(d.removeAllRanges(),d.addRange(c)),x.value=r.innerHTML||"",q.value=Qt();const u=c.getBoundingClientRect(),m=s.parentElement;if(m){const L=m.getBoundingClientRect(),R=u.bottom-L.top,ae=Math.max(R+8,0);un.value={top:`${ae}px`,bottom:"auto"}}const v=r.getAttribute("data-comment")||r.getAttribute("data-fake-comment");let k=[];if(v&&$.comments&&Array.isArray($.comments)){const L=$.comments.find(R=>String(R.conversation_id)===String(v));if(L&&L.conversation&&Array.isArray(L.conversation)){const R=L.conversation.map(E=>({id:E.id||E.commentary_id,commentary_id:E.id||E.commentary_id,conversation_id:L.id||L.conversation_id,text:E.text,user:E.user,createdAt:E.created_at||E.createdAt,updated_at:E.updated_at||E.updatedAt}));k.push(...R)}}k.length===0&&Array.isArray(n)&&n.length>0&&(k=n.slice()),k.sort((L,R)=>{const E=Ie=>{if(!Ie)return 0;const Ve=new Date(Ie).getTime();return isNaN(Ve)?0:Ve},ae=E(L.createdAt),j=E(R.createdAt);return ae===j?0:ae-j}),ie.value=k,xl(!0),At.value=v||null,r&&(Zl.value=r,r.classList.add("editor-comment-highlighted")),e.nextTick(()=>{if(y.value="",h.value){const L=h.value;L.style.height="auto",L.style.height=`${L.scrollHeight}px`,L.focus()}if(m){const L=m.querySelector(".dss-comment-overlay");if(L){const R=m.querySelector(".dss-text-editor-footer");if(R){const E=m.getBoundingClientRect(),ae=L.getBoundingClientRect(),j=R.getBoundingClientRect(),Ie=ae.bottom-E.top,Ve=j.top-E.top,nt=8;if(Ie>Ve-nt){const bl=j.height;un.value={bottom:`${bl+nt}px`,top:"auto"}}}}}wl("openCommentOverlayForSelector")})},co=e.ref(null),Vo=e.ref(0),uo=o=>{if(!($.disabled||!$.richText)){if(o.key==="Escape"){const n=window.getSelection();if(n.rangeCount>0){const r=n.getRangeAt(0).commonAncestorContainer,c=r.nodeType===1?r.tagName==="BLOCKQUOTE"?r:r.closest("blockquote"):r.parentElement?.closest("blockquote");if(!!(c&&f.value&&f.value.contains(c))){o.preventDefault();let u=null;r.nodeType===3?u=r.parentElement:r.tagName==="P"||r.tagName==="DIV"?u=r:u=r.closest("p, div");const m=document.createElement("p");m.innerHTML="<br>",u&&c.contains(u)&&u.nextSibling?c.insertBefore(m,u.nextSibling):c.appendChild(m),setTimeout(()=>{Wl()},50);return}}}if(o.key.length===1||o.key==="Enter"){const n=window.getSelection();if(n&&n.rangeCount>0){const s=n.getRangeAt(0),r=s.commonAncestorContainer,c=r.nodeType===3?r.parentElement:r;if(c){const d=c.closest(".dss-image-wrapper");if(d){const u=d.querySelector("img");if(c!==u&&!u?.contains(c)){const m=s.startContainer.nodeType===3?s.startContainer.parentElement:s.startContainer,v=s.endContainer.nodeType===3?s.endContainer.parentElement:s.endContainer;if(d.contains(m)&&m!==u||d.contains(v)&&v!==u){o.preventDefault();const k=document.createRange();k.setStartAfter(d),k.collapse(!0),n.removeAllRanges(),n.addRange(k);return}}}}}}if(o.key==="Backspace"||o.key==="Delete"){const n=window.getSelection();if(n.rangeCount>0){const s=n.getRangeAt(0);let r=null,c=null;if(s.collapsed)if(o.key==="Backspace"){const d=s.startContainer;let u=d;d.nodeType===3&&(s.startOffset===0?u=d.previousSibling||d.parentNode:u=d.parentNode);const m=u.previousSibling;m&&(m.classList&&m.classList.contains("dss-image-wrapper")?c=m:m.tagName==="IMG"&&(r=m,c=r.closest(".dss-image-wrapper"))),c||(c=u.closest(".dss-image-wrapper"),c&&(r=c.querySelector("img")))}else{const d=s.startContainer;let u=d;d.nodeType===3&&(s.startOffset===d.length?u=d.nextSibling||d.parentNode:u=d.parentNode);const m=u.nextSibling;m&&(m.classList&&m.classList.contains("dss-image-wrapper")?c=m:m.tagName==="IMG"&&(r=m,c=r.closest(".dss-image-wrapper"))),c||(c=u.closest(".dss-image-wrapper"),c&&(r=c.querySelector("img")))}else{const d=s.commonAncestorContainer,u=s.startContainer.nodeType===3?s.startContainer.parentElement:s.startContainer,m=s.endContainer.nodeType===3?s.endContainer.parentElement:s.endContainer;if(d.nodeType===1&&d.tagName==="IMG"?(r=d,c=r.closest(".dss-image-wrapper")):(r=d.querySelector("img"),r&&(c=r.closest(".dss-image-wrapper"))),c){const v=c.contains(u)||u===c,k=c.contains(m)||m===c,R=s.cloneContents().textContent?.trim()||"",E=c.textContent?.trim()||"";(!v||!k||R.length>E.length)&&(c=null,r=null)}}if(c){o.preventDefault(),o.stopPropagation();const d=c.parentNode;if(d){const u=document.createTextNode("");d.insertBefore(u,c),c.remove();const m=document.createRange();m.setStartAfter(u),m.collapse(!0),n.removeAllRanges(),n.addRange(m),e.nextTick(()=>{de()});return}}}}if(o.key==="Tab"){o.preventDefault(),o.shiftKey?kn():Pn();return}if(o.key==="Enter"){const n=window.getSelection();if(n.rangeCount>0){const s=n.getRangeAt(0);if(s.collapsed){const u=s.startContainer,m=v=>{if(!v)return!1;let k=v.previousSibling;for(;k;){if(k.classList&&k.classList.contains("dss-image-wrapper")||k.tagName==="IMG"||k.querySelector&&k.querySelector(".dss-image-wrapper")||k.querySelector&&k.querySelector("img"))return!0;k=k.previousSibling}const L=v.parentElement;return L&&L!==f.value?m(L):!1};if(u.nodeType===3){const v=u.parentElement;if(v&&(m(v)||m(u))){const k=v.closest("p, div");if(k&&k!==f.value){o.preventDefault(),o.stopPropagation();let L=null;const R=s.startOffset;R<u.length&&(L=u.splitText(R));const E=document.createElement("p");if(L?E.appendChild(L):E.innerHTML="<br>",u.length===0){const j=u.parentElement;j&&(j.removeChild(u),j.childNodes.length===0&&j.appendChild(document.createElement("br")))}k.nextSibling?k.parentNode.insertBefore(E,k.nextSibling):k.parentNode.appendChild(E);const ae=document.createRange();L?ae.setStart(L,0):ae.setStart(E,0),ae.collapse(!0),n.removeAllRanges(),n.addRange(ae),e.nextTick(()=>{de()});return}}}}const r=s.commonAncestorContainer,c=r.nodeType===1?r.tagName==="BLOCKQUOTE"?r:r.closest("blockquote"):r.parentElement?.closest("blockquote");if(!!(c&&f.value&&f.value.contains(c))){let u=null;r.nodeType===3?u=r.parentElement:r.tagName==="P"||r.tagName==="DIV"?u=r:u=r.closest("p, div");const m=j=>{if(!j)return!1;const Ie=j.textContent||"",nt=(j.innerHTML||"").trim(),bl=nt.replace(/<br\s*\/?>/gi,"").trim();return Ie.trim()===""||nt===""||bl===""||nt==="<br>"||nt==="<br/>"||nt==="<p></p>"||nt==="<p><br></p>"||nt==="<p><br/></p>"||nt==="<p> </p>"||nt==="<p><br> </p>"||nt==="<div></div>"||nt==="<div><br></div>"||nt==="<div><br/></div>"},v=c.lastChild,k=v&&v.nodeType===1&&v.tagName==="BR",L=s.startContainer,R=L.nodeType===3?L.parentElement:L,E=R===c||R&&R.parentElement===c;if(u&&m(u)||k&&E){o.preventDefault(),setTimeout(()=>{Wl()},50);return}}}}if(o.key===" "){const n=Date.now(),s=n-Vo.value;if(co.value===" "&&s<300){const r=window.getSelection();if(r.rangeCount>0){const c=r.getRangeAt(0),d=c.commonAncestorContainer.nodeType===1?c.commonAncestorContainer.closest("li"):c.commonAncestorContainer.parentElement?.closest("li");if(d){const u=c.startContainer.textContent?.substring(0,c.startOffset)||"";if((d.textContent||"").indexOf(u.trim())<=10||u.trim().length<=2){o.preventDefault(),Pn();return}}}}co.value=" ",Vo.value=n}else co.value=o.key}},Zo=o=>{if($.disabled||!$.richText)return;o.preventDefault();let n=o.clipboardData.getData("text/html"),s=o.clipboardData.getData("text/plain");n&&(n=n.replace(/<!--[\s\S]*?-->/g,"")),s&&(s=s.replace(/<!--[\s\S]*?-->/g,"")),at();const r=window.getSelection();let c=null;if(r&&r.rangeCount>0){let m=r.getRangeAt(0).commonAncestorContainer;m.nodeType===3&&(m=m.parentNode),c=m.closest("p, h1, h2, h3, h4, h5, h6, li, blockquote")}const d=u=>{const v=new DOMParser().parseFromString(u,"text/html");let k=f.value.querySelector("h1")?1:0;if(v.querySelectorAll("h1").forEach(R=>{if(k>0){const E=v.createElement("p");E.innerHTML=R.innerHTML,R.parentNode.replaceChild(E,R)}else k++}),c){const R=["P","H1","H2","H3","H4","H5","H6","DIV","BLOCKQUOTE","UL","OL","LI"],E=Array.from(v.body.children).filter(ae=>R.includes(ae.tagName));if(E.length===1){const ae=E[0].tagName,j=c.tagName,Ie=c.textContent.trim()===""&&!c.querySelector("img");let Ve=!1;if(["H1","H2","H3","H4","H5","H6"].includes(j)?Ve=!0:Ie||(ae===j||ae==="P")&&(Ve=!0),Ve)return E[0].innerHTML.trim()}}return v.body.innerHTML.trim()};if(n){const u=d(n);document.execCommand("insertHTML",!1,u)}else if(s)if(/<[a-z][\s\S]*>/i.test(s)){const m=d(s);document.execCommand("insertHTML",!1,m)}else document.execCommand("insertText",!1,s);de()},jn=o=>{if(we.value){const s=o.target;!s.closest(".dss-toolbar-dropdown")&&!s.closest(".dss-toolbar-dropdown-toggle")&&il()}if(lt.value){const s=o.target,r=s.closest(".dss-floating-toolbar"),c=f.value&&s.closest(".dss-text-editor-content");!r&&!c&&qn()}if(ut.value){const s=o.target,r=s.closest(".dss-floating-toolbar"),c=s.closest(".dss-toolbar-dropdown");!r&&!c&&Kn()}const n=o.target;if(!n.closest(".dss-toolbar-dropdown")&&!n.closest(".dss-toolbar-dropdown-submenu")&&(Ke.value=null),!f.value||!n.closest(".dss-text-editor-content")){const s=window.getSelection();if(s&&s.rangeCount>0){const r=s.getRangeAt(0);Y.value=!r.collapsed&&Zt(r)}else Y.value=!1}if(At.value!==null){const s=document.querySelector(".dss-comment-overlay");let r=!1;if(s){const u=s.getBoundingClientRect(),m=o.clientX,v=o.clientY;r=m>=u.left&&m<=u.right&&v>=u.top&&v<=u.bottom}const c=n.closest(".dss-toolbar-button"),d=c&&c.getAttribute("title")==="Comment";!r&&!d&&(At.value=null,y.value="",x.value="",q.value=null,ie.value=[],xl(!0))}},$l=(o,n)=>{o&&o.stopPropagation&&o.stopPropagation(),Tt.value&&(clearTimeout(Tt.value),Tt.value=null),Ke.value=n},z=o=>{const n=o.relatedTarget;if(n){const s=n.closest(".dss-toolbar-dropdown-submenu"),r=n.closest(".dss-toolbar-dropdown-item-has-submenu");if(s||r)return}Tt.value&&clearTimeout(Tt.value),Tt.value=setTimeout(()=>{Ke.value=null,Tt.value=null},150)},Sl=o=>{Ke.value=null};let Ul=0;const On=o=>{if(!o)return;const n=Array.from(o.children);n.forEach(s=>{s.classList.contains("dss-toolbar-dropdown-submenu")||s.classList.contains("dss-toolbar-dropdown-item-has-submenu")||(s.tagName==="BUTTON"||s.tagName==="DIV")&&!s.classList.contains("dss-toolbar-dropdown-item")&&s.classList.add("dss-toolbar-dropdown-item")}),n.forEach((s,r)=>{if(s.classList.contains("dss-toolbar-dropdown-item-has-submenu")||s.classList.contains("dss-toolbar-dropdown-submenu")||!s.classList.contains("dss-toolbar-dropdown-item"))return;const c=Array.from(s.children).find(m=>m.tagName==="DIV"?m.classList.contains("dss-toolbar-dropdown-item")?!1:Array.from(m.children).filter(k=>k.tagName==="BUTTON"||k.tagName==="DIV").length>0:!1),d=s.nextElementSibling,u=d&&!d.classList.contains("dss-toolbar-dropdown-submenu")&&!d.classList.contains("dss-toolbar-dropdown-item-has-submenu")&&d.tagName==="DIV"&&!d.classList.contains("dss-toolbar-dropdown-item")&&Array.from(d.children).some(m=>m.tagName==="BUTTON"||m.tagName==="DIV");if(c||u){const m=`submenu-auto-${++Ul}`;s.classList.add("dss-toolbar-dropdown-item-has-submenu"),s.setAttribute("data-submenu-id",m);let v=null;c?(s.tagName==="BUTTON"&&s.parentNode.insertBefore(c,s.nextSibling),c.classList.add("dss-toolbar-dropdown-submenu"),v=c):u&&(d.classList.add("dss-toolbar-dropdown-submenu"),v=d),v&&(v.setAttribute("data-submenu-id",m),v.setAttribute("data-processed","true"),c&&s.tagName!=="BUTTON"?v.dataset.originalParentRef="inside":v.dataset.originalParentRef="sibling",Array.from(v.children).forEach(L=>{(L.tagName==="BUTTON"||L.tagName==="DIV")&&!L.classList.contains("dss-toolbar-dropdown-item")&&L.classList.add("dss-toolbar-dropdown-item")}))}})},Cl=()=>{document.querySelectorAll(".dss-toolbar-dropdown").forEach(n=>{On(n),n.querySelectorAll(".dss-toolbar-dropdown-item-has-submenu").forEach(c=>{const d=c._subMenuHandlers;d&&(c.removeEventListener("mouseenter",d.enter),c.removeEventListener("mouseleave",d.leave));const u=v=>{const k=c.getAttribute("data-submenu-id");k&&$l(v,k)},m=z;c.addEventListener("mouseenter",u),c.addEventListener("mouseleave",m),c._subMenuHandlers={enter:u,leave:m}}),n.querySelectorAll(".dss-toolbar-dropdown-submenu").forEach(c=>{const d=c._subMenuHandlers;d&&(c.removeEventListener("mouseenter",d.enter),c.removeEventListener("mouseleave",d.leave));const u=k=>{const L=c.getAttribute("data-submenu-id");L&&$l(k,L)},m=z;c.addEventListener("mouseenter",u),c.addEventListener("mouseleave",m),c._subMenuHandlers={enter:u,leave:m},c.querySelectorAll(".dss-toolbar-dropdown-item").forEach(k=>{k.addEventListener("click",Sl)})})})};let Ll=null;const jt=()=>{if(Ke.value){const o=document.querySelector(`.dss-toolbar-dropdown-submenu[data-submenu-id="${Ke.value}"]`),n=document.querySelector(`.dss-toolbar-dropdown-item-has-submenu[data-submenu-id="${Ke.value}"]`);o&&n&&Ao(o,n)}if(lt.value&&tl(),$.richText){if(Ll!==null)return;Ll=setTimeout(()=>{Ll=null,wl("handleWindowResize")},150)}},Jt=()=>{if(!$.richText)return;document.querySelectorAll(".dss-toolbar-custom-group").forEach(n=>{Array.from(n.children).filter(r=>r.tagName==="DIV"&&!r.classList.contains("dss-toolbar-button")).forEach(r=>{r.classList.add("dss-toolbar-button")})})},Cn=()=>{const o=document.querySelectorAll(".dss-text-editor-footer, .dss-text-editor-footer-content, .dss-text-editor-footer-stat, .dss-text-editor-footer-separator"),n=s=>{if(s.preventDefault(),s.stopPropagation(),window.getSelection){const r=window.getSelection();r.removeAllRanges?r.removeAllRanges():r.empty&&r.empty()}return!1};o.forEach(s=>{s.addEventListener("selectstart",n),s.addEventListener("mousedown",n),s.addEventListener("dragstart",n),s.addEventListener("contextmenu",n),s.addEventListener("click",r=>{if(window.getSelection){const c=window.getSelection();c.removeAllRanges&&c.removeAllRanges()}})})};e.onMounted(()=>{if(e.nextTick(()=>{requestAnimationFrame(()=>{ll.value?Qe():nl(),S.value?Nl():Jl()})}),e.nextTick(()=>{Cn()}),$.richText&&f.value){try{document.execCommand("defaultParagraphSeparator",!1,"p")}catch{}document.addEventListener("click",jn),window.addEventListener("resize",jt);let o=null;const n=()=>{o===null&&(o=setTimeout(()=>{o=null,jt()},150))};window.addEventListener("scroll",n,!0),f.value._windowScrollHandler=n,f.value._windowScrollTimeout=o,f.value.closest(".editor-with-comments"),f.value.closest(".dss-text-editor-content-wrapper");const s=f.value.closest(".dss-text-editor-content");let r=null;const c=()=>{r===null&&(r=setTimeout(()=>{r=null,jt()},150))};s&&(s.addEventListener("scroll",c),f.value._scrollHandlers={wrapper:null,content:s,handler:c}),e.nextTick(()=>{Cl(),Jt()}),f.value.addEventListener("click",m=>{const v=m.target;v.closest("a")&&!$.disabled&&m.preventDefault();const L=v.closest(".dss-image-no-alt-icon"),R=v.closest(".dss-image-wrapper");if(L||R&&v===R){m.preventDefault(),m.stopPropagation();const E=window.getSelection(),ae=document.createRange();ae.setStartAfter(R),ae.collapse(!0),E.removeAllRanges(),E.addRange(ae)}else R&&v.tagName!=="IMG"&&(m.preventDefault(),e.nextTick(()=>{const E=window.getSelection();if(E.rangeCount>0){const j=E.getRangeAt(0).commonAncestorContainer,Ie=j.nodeType===3?j.parentElement:j;if(R.contains(Ie)&&Ie!==R.querySelector("img")){const Ve=document.createRange();Ve.setStartAfter(R),Ve.collapse(!0),E.removeAllRanges(),E.addRange(Ve)}}else{const ae=document.createRange();ae.setStartAfter(R),ae.collapse(!0),E.addRange(ae)}}))},!0),f.value.addEventListener("mousedown",m=>{const v=m.target,k=v.closest(".dss-image-no-alt-icon"),L=v.closest(".dss-image-wrapper");if(k||L&&v.tagName!=="IMG"){m.preventDefault();const R=window.getSelection(),E=document.createRange();L&&(E.setStartAfter(L),E.collapse(!0),R.removeAllRanges(),R.addRange(E))}},!0),f.value.addEventListener("paste",m=>{e.nextTick(()=>{if(!f.value)return;f.value.querySelectorAll("img").forEach(k=>{if(!k.closest(".dss-image-wrapper"))k.removeAttribute("alt"),k.removeAttribute("data-alt"),k.setAttribute("alt",""),k.setAttribute("data-alt",""),k.alt="";else{const R=k.getAttribute("alt")||k.alt||"";if(R){const E=k.getAttribute("src")||k.src||"",ae=E.replace(/^https?:\/\//,"").replace(/^data:.*,/,""),j=R===E||R===ae;(R.startsWith("http://")||R.startsWith("https://")||R.startsWith("data:")||j||j)&&(k.setAttribute("alt",""),k.setAttribute("data-alt",""),k.alt="")}}}),ml()})}),f.value.addEventListener("dragstart",m=>{const v=m.target,k=v.tagName==="IMG"?v:v.closest("img"),L=k?.closest(".dss-image-wrapper");k&&f.value.contains(k)&&(St.value=L||k,m.dataTransfer.effectAllowed="move",m.dataTransfer.setData("text/html","image-drag"))}),f.value.addEventListener("dragover",m=>{St.value&&(m.preventDefault(),m.stopPropagation(),m.dataTransfer.dropEffect="move")}),f.value.addEventListener("dragenter",m=>{St.value&&(m.preventDefault(),m.stopPropagation())}),f.value.addEventListener("drop",m=>{if(!St.value||!f.value)return;m.preventDefault(),m.stopPropagation();const v=St.value,k=v.classList?.contains("dss-image-wrapper"),L=k?v.querySelector("img"):v,R=k?v:L?.closest(".dss-image-wrapper");if(!L||!f.value.contains(L)){St.value=null;return}let E=null;const ae=m.clientX,j=m.clientY;if(document.caretRangeFromPoint)E=document.caretRangeFromPoint(ae,j);else{const sl=window.getSelection();sl.rangeCount>0?E=sl.getRangeAt(0).cloneRange():(E=document.createRange(),E.selectNodeContents(f.value),E.collapse(!1))}if(!E){St.value=null;return}const Ie=E.commonAncestorContainer,Ve=Ie.nodeType===3?Ie.parentElement:Ie;if(Ve?.closest(".dss-image-wrapper")===R||R&&R.contains(Ve)){St.value=null;return}if(R&&(Ve===R||R.contains(Ve))){St.value=null;return}const bl=L.getAttribute("src");let fl=null;R?fl=R.cloneNode(!0):fl=L.cloneNode(!0);try{let sl=E.startContainer;if(sl.nodeType===3&&(sl=sl.parentElement),R&&(sl===R||R.contains(sl))){const ul=document.createRange();ul.setStartAfter(R),ul.collapse(!0),E=ul}E.insertNode(fl);const vl=document.createRange();vl.setStartAfter(fl),vl.collapse(!0);const cl=window.getSelection();cl.removeAllRanges(),cl.addRange(vl)}catch{if(f.value.childNodes.length===0){const vl=document.createElement("p");vl.appendChild(fl),f.value.appendChild(vl)}else{const vl=f.value.lastChild;if(vl&&vl.nodeType===1)vl.appendChild(fl);else{const cl=document.createElement("p");cl.appendChild(fl),f.value.appendChild(cl)}}}R?R.remove():L.remove(),St.value=null,e.nextTick(()=>{const sl=f.value.querySelectorAll("img");let vl=!1;sl.forEach(cl=>{if(cl.getAttribute("src")===bl)if(!vl)vl=!0;else{const ul=cl.closest(".dss-image-wrapper");ul?ul.remove():cl.remove()}}),ml(),de()})}),f.value.addEventListener("dragend",m=>{St.value=null});let d=null;const u=new MutationObserver(m=>{m.forEach(v=>{v.addedNodes.forEach(k=>{if(k.nodeType===1){k.tagName==="IMG"&&(k.removeAttribute("alt"),k.removeAttribute("data-alt"),k.setAttribute("alt",""),k.setAttribute("data-alt",""),k.alt="");const L=k.querySelectorAll&&k.querySelectorAll("img");L&&L.forEach(R=>{R.removeAttribute("alt"),R.removeAttribute("data-alt"),R.setAttribute("alt",""),R.setAttribute("data-alt",""),R.alt=""})}})}),d&&clearTimeout(d),d=setTimeout(()=>{ml(),Jt(),d=null},100)});if(u.observe(f.value,{childList:!0,subtree:!0}),e.nextTick(()=>{const m=document.querySelector(".dss-text-editor-toolbar");if(m){const v=new MutationObserver(()=>{e.nextTick(()=>{Jt()})});v.observe(m,{childList:!0,subtree:!0}),m._toolbarMutationObserver=v}}),$.modelValue){const m=O($.modelValue);f.value.innerHTML=m,kt()}e.nextTick(()=>{const m=f.value.innerHTML||"",v=$.title||"",k=$.description||"";xt.value=m,J.value=v,Z.value=k,X.value=v,re.value=k,Ml(),ml(),Ae(),wt(),ho(),Vl()}),pl(),it(),f.value._mutationObserver=u}}),e.onUnmounted(()=>{if(document.removeEventListener("click",jn),window.removeEventListener("resize",jt),f.value&&f.value._windowScrollHandler&&window.removeEventListener("scroll",f.value._windowScrollHandler,!0),Ll!==null&&(clearTimeout(Ll),Ll=null),f.value&&f.value._windowScrollTimeout!==null&&clearTimeout(f.value._windowScrollTimeout),We.value&&clearTimeout(We.value),Tt.value&&clearTimeout(Tt.value),f.value&&f.value._mutationObserver&&f.value._mutationObserver.disconnect(),ze.value&&ze.value.disconnect(),gt.value!==null&&(cancelAnimationFrame(gt.value),gt.value=null),rt.value!==null&&(clearTimeout(rt.value),rt.value=null),ht.value!==null&&(clearTimeout(ht.value),ht.value=null),xl(!0),f.value&&f.value._scrollHandlers){const{wrapper:n,content:s,handler:r}=f.value._scrollHandlers;n&&n.removeEventListener("scroll",r),s&&s.removeEventListener("scroll",r)}const o=document.querySelector(".dss-text-editor-toolbar");o&&o._toolbarMutationObserver&&o._toolbarMutationObserver.disconnect()});const Sn=o=>{const n=o.target,s=n.closest("a");if(s&&!$.disabled){o.preventDefault();const c=document.createRange();c.selectNodeContents(s);const d=window.getSelection();d.removeAllRanges(),d.addRange(c)}const r=n.closest(".dss-image-wrapper");r&&n.tagName!=="IMG"?e.nextTick(()=>{const c=window.getSelection();if(c.rangeCount>0){const u=c.getRangeAt(0).commonAncestorContainer,m=u.nodeType===3?u.parentElement:u;if(r.contains(m)&&m!==r.querySelector("img")){const v=document.createRange();v.setStartAfter(r),v.collapse(!0),c.removeAllRanges(),c.addRange(v)}}ml(),pl(),it(),tl(),wt()}):e.nextTick(()=>{ml(),pl(),it(),tl(),wt()})},Ft=()=>{hn();const o=window.getSelection();if(o&&o.rangeCount>0){const s=o.getRangeAt(0);Y.value=!s.collapsed&&Zt(s),!s.collapsed&&C.value&&(C.value=null)}else Y.value=!1;if(ml(),pl(),it(),tl(),wt(),o&&o.rangeCount>0){const r=o.getRangeAt(0).commonAncestorContainer,c=r.nodeType===3?r.parentElement:r;if(c&&c.closest(".dss-text-editor-footer")){o.removeAllRanges(),Y.value=!1;return}}["bold","italic","underline"].forEach(s=>{try{const r=window.getSelection();if(r.rangeCount>0){const c=r.getRangeAt(0);if(!c.collapsed)if(s==="bold"){const d=c.commonAncestorContainer,u=d.nodeType===3?d.parentElement:d;let m=!1;if(u&&((u.tagName==="STRONG"||u.tagName==="B"||u.closest&&u.closest("strong, b"))&&(m=!0),!m&&u.style&&parseInt(u.style.fontWeight)>=600&&(m=!0),!m))try{const v=window.getComputedStyle(u);parseInt(v.fontWeight)>=600&&(m=!0)}catch{}ee.value[s]=m}else{const d=document.queryCommandState(s);ee.value[s]=d}}}catch{}})},wt=()=>{if(!$.richText||$.disabled||!f.value){V.value="p";return}try{const o=window.getSelection();if(!o||o.rangeCount===0){V.value="p";return}const s=o.getRangeAt(0).commonAncestorContainer,r=s.nodeType===3?s.parentElement:s;if(!r||!f.value.contains(r)){V.value="p";return}const c=r.closest("h1, h2, h3, h4, h5, h6, p");if(!c){V.value="p";return}const d=c.tagName.toLowerCase();["h1","h2","h3","h4","h5","h6","p"].includes(d)?V.value=d:V.value="p"}catch{V.value="p"}},it=()=>{if(!f.value){Ye.value=!1;return}try{const o=window.getSelection();let n=!1;if(o.rangeCount>0){const r=o.getRangeAt(0).commonAncestorContainer,c=r.nodeType===1?r.tagName==="BLOCKQUOTE"?r:r.closest("blockquote"):r.parentElement?.closest("blockquote");n=!!(c&&f.value.contains(c))}Ye.value=n}catch{Ye.value=!1}},Zt=o=>{if(!o||!f.value)return!1;const n=o.commonAncestorContainer;if(!n)return!1;const s=n.nodeType===3?n.parentElement:n;return s?f.value.contains(s):!1},qn=()=>{lt.value=!1},tl=()=>{if(!$.floatingToolbar||!$.richText||$.disabled){lt.value=!1;return}const o=window.getSelection();if(!o||o.rangeCount===0){lt.value=!1;return}const n=o.getRangeAt(0);if(n.collapsed||!Zt(n)){lt.value=!1;return}const s=n.getBoundingClientRect();if(!s||s.width===0&&s.height===0){lt.value=!1;return}const r=f.value;if(!r){lt.value=!1;return}const c=r.getBoundingClientRect();if(!c||c.width===0){lt.value=!1;return}const d=40,u=8,m=s.top-d/2+15;let v=s.left+s.width/2;const k=window.innerWidth||document.documentElement.clientWidth||0;let L=0;Je.value&&(L=Je.value.getBoundingClientRect().width);const R=(L||320)/2;let E=c.left+R,ae=c.right-R;if(ae<E){const j=c.left+c.width/2;E=j,ae=j}if(k>0){const j=R+u,Ie=k-R-u;if(E=Math.max(E,j),ae=Math.min(ae,Ie),ae<E){const Ve=k/2;E=Ve,ae=Ve}}v<E?v=E:v>ae&&(v=ae),be.value={position:"fixed",top:`${Math.max(m,8)}px`,left:`${v}px`,transform:"translate(-50%, -100%)",zIndex:10003},lt.value=!0},An=o=>{$.disabled||!$.richText||(ut.value=ut.value===o?null:o,o==="askAi"&&(we.value=null))},Kn=()=>{ut.value=null,Ke.value=null},Pl=o=>{zl(o),Kn()};let dn=null,mn=null,Vn=null,Nn=null;const Uo=o=>{if($.disabled||!$.richText){Tn(),Wn();return}const n=o.target,s=n.closest("a"),r=n.closest("img");if(dn&&(clearTimeout(dn),dn=null),Vn&&(clearTimeout(Vn),Vn=null),s&&s!==mn){Wn(),mn=s;let c=s.getAttribute("href")||"";(!c||c==="#"||c==="")&&(c=s.textContent||""),qe.value=s,pe.value=c,U.value=!0,Ee.value=!0,en(s)}else!s&&mn?(mn=null,dn=setTimeout(()=>{Ee.value||Tn()},150)):s&&s===mn&&en(s);if(r&&r!==Nn){Tn(),Nn=r;let c=r.getAttribute("alt");c===null&&(c=r.alt||"");let d=r.getAttribute("data-alt");d===null&&(d=c),r.hasAttribute("alt")||r.setAttribute("alt",c),r.hasAttribute("data-alt")||r.setAttribute("data-alt",d),bt.value=r,qt.value=c.trim()||A("textEditor.image.noAlt"),Lt.value=!0,ye.value=!0,No(r)}else!r&&Nn?(Nn=null,Vn=setTimeout(()=>{ye.value||Wn()},150)):r&&r===Nn&&No(r)},Bn=o=>{const n=o.relatedTarget;(!n||!n.closest(".dss-text-editor-content")&&!n.closest(".dss-link-popup"))&&(mn=null,Nn=null,dn&&(clearTimeout(dn),dn=null),Vn&&(clearTimeout(Vn),Vn=null),Tn(),Wn())},Tn=()=>{Ee.value=!1,setTimeout(()=>{Ee.value||(U.value=!1,pe.value="",De.value||(qe.value=null))},100)},en=o=>{if(!o||!f.value)return;const n=o.getBoundingClientRect(),c=n.top-32-8,d=n.left+n.width/2;F.value={position:"fixed",top:`${c}px`,left:`${d}px`,transform:"translateX(-50%)",zIndex:10002}},Wn=()=>{ye.value=!1,setTimeout(()=>{ye.value||(Lt.value=!1,qt.value="",Ct.value||(bt.value=null))},100)},No=o=>{if(!o||!f.value)return;const n=o.getBoundingClientRect(),c=n.top-32-8,d=n.left+n.width/2;K.value={position:"fixed",top:`${c}px`,left:`${d}px`,transform:"translateX(-50%)",zIndex:10002}},Zn=()=>{if(!pe.value||!qe.value)return;let n=qe.value.getAttribute("href")||pe.value;!n.startsWith("http://")&&!n.startsWith("https://")&&!n.startsWith("mailto:")&&(n="https://"+n),window.open(n,"_blank","noopener,noreferrer")},Xo=()=>{if(qe.value){const o=qe.value.textContent||"",n=qe.value.getAttribute("href")||"",s=qe.value;tt.value=n,pt.value=o,Me.value=o,Ee.value=!1,U.value=!1,pe.value="",qe.value=s,De.value=!0}else if(Ce.value){const o=window.getSelection();if(o.rangeCount>0){const s=o.getRangeAt(0).commonAncestorContainer,r=s.nodeType===1?s.closest("a"):s.parentElement?.closest("a");if(r){const c=r.textContent||"",d=r.getAttribute("href")||"";tt.value=d,pt.value=c,Me.value=c,qe.value=r,De.value=!0}}}else{xe.value=Qt();const o=window.getSelection();let n="";o.rangeCount>0&&(n=o.getRangeAt(0).toString()),tt.value="",pt.value=n,Me.value="",qe.value=null,De.value=!0}e.nextTick(()=>{W.value&&(W.value.focus(),W.value.select())})},Un=()=>{De.value=!1,tt.value="",pt.value="",Me.value="",qe.value=null,xe.value=null},mo=()=>{if(!tt.value.trim()){Un();return}if(Fe.value?(We.value&&(clearTimeout(We.value),We.value=null),at(),Fe.value=!1):at(),pt.value.trim()||(pt.value=tt.value.trim()),qe.value&&f.value&&f.value.contains(qe.value)){const o=window.getSelection();o.rangeCount>0&&o.removeAllRanges();const n=qe.value;if(n.setAttribute("href",tt.value.trim()),pt.value.trim()!==Me.value.trim()){for(;n.firstChild;)n.removeChild(n.firstChild);n.textContent=pt.value.trim()}n.style.color="#60afdf",n.style.textDecoration="underline";const s=document.createRange();s.selectNodeContents(n),s.collapse(!1),o.removeAllRanges(),o.addRange(s),de()}else if(f.value){f.value.focus();const o=window.getSelection();o.removeAllRanges(),xe.value&&ol(xe.value);let n=null;if(o.rangeCount>0&&(n=o.getRangeAt(0)),n&&!n.collapsed){n.toString();const s=document.createElement("a");s.href=tt.value.trim(),s.textContent=pt.value.trim(),s.style.color="#60afdf",s.style.textDecoration="underline",n.deleteContents(),n.insertNode(s);const r=document.createTextNode(" ");n.setStartAfter(s),n.insertNode(r),n.setStartAfter(r),n.collapse(!0),o.removeAllRanges(),o.addRange(n)}else{n||(n=document.createRange(),n.selectNodeContents(f.value),n.collapse(!1));const s=n.startContainer,r=s.nodeType===3,c=r&&n.startOffset===s.textContent.length,d=document.createElement("a");if(d.href=tt.value.trim(),d.textContent=pt.value.trim(),d.style.color="#60afdf",d.style.textDecoration="underline",c){let u=s.parentElement;for(;u&&u!==f.value&&!["P","DIV","H1","H2","H3","H4","H5","H6"].includes(u.tagName);)u=u.parentElement;if(u&&u!==f.value){let m=u.nextElementSibling;if(m&&(m.innerHTML==="<br>"||m.innerHTML==="<br/>"||m.textContent.trim()==="")){m.textContent="",m.appendChild(d);const v=document.createTextNode(" ");m.appendChild(v);const k=document.createRange();k.setStartAfter(d),k.collapse(!0),o.removeAllRanges(),o.addRange(k)}else{if(n.startOffset>0){const k=s.textContent.substring(0,n.startOffset),L=k[k.length-1];if(L&&L!==" "&&L!==" "&&L!==`
|