dsp-semactic 0.6.58 → 0.6.59
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/dsp-semactic.css +1 -1
- package/dist/index.cjs.js +30 -30
- package/dist/index.es.js +6185 -6079
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),eo=require("vue-i18n"),Va={key:0,class:"dss-datepicker__input-wrap dss-datepicker__input-wrap--readonly"},Na=["value"],Ba=["placeholder","value","disabled"],Ma=["placeholder","value"],_a={key:0,class:"dss-datepicker__double-wrap"},$a={key:0,class:"dss-datepicker__quick-select","aria-label":"Quick range"},La=["disabled","onClick"],Ta={class:"dss-datepicker__double-calendars"},Aa={class:"dss-datepicker__double-calendar"},Da={class:"dss-datepicker__calendar-header"},Ha=["aria-label"],Ra={class:"dss-datepicker__month-year-row"},Fa=["aria-label"],Ia={class:"dss-datepicker__weekdays"},za={class:"dss-datepicker__grid"},Pa=["disabled","onClick","onMouseenter"],Oa={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},qa={class:"dss-datepicker__double-calendar"},Wa={class:"dss-datepicker__calendar-header"},Za=["aria-label"],Ua={class:"dss-datepicker__month-year-row"},Xa=["aria-label"],Ya={class:"dss-datepicker__weekdays"},ja={class:"dss-datepicker__grid"},Ka=["disabled","onClick","onMouseenter"],Ga={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},Qa={class:"dss-datepicker__calendar-header"},Ja=["aria-label"],es={class:"dss-datepicker__month-year-row"},ts=["aria-label"],ns={class:"dss-datepicker__weekdays"},ls={class:"dss-datepicker__grid"},os=["disabled","onClick","onMouseenter"],as={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},ss={class:"dss-datepicker__calendar-header"},rs={class:"dss-datepicker__month-year-row"},is={class:"dss-datepicker__month-year dss-datepicker__month-year--static"},cs={class:"dss-datepicker__months-grid"},us=["onClick"],ds={class:"dss-datepicker__calendar-header dss-datepicker__calendar-header--center"},ms={class:"dss-datepicker__month-year"},ps={class:"dss-datepicker__years-grid"},fs=["data-year","onClick"],ia=27,Tl=8,ta={__name:"DSSDatepicker",props:{mode:{type:String,default:"single",validator:D=>["single","range","singleFromAvailable","rangeFromAvailable","readonly"].includes(D)},modelValue:{type:[Date,Object],default:null},availableDates:{type:Array,default:()=>[]},minDate:{type:Date,default:null},maxDate:{type:Date,default:null},exceptDates:{type:Array,default:()=>[]},doubleCalendar:{type:Boolean,default:!1},quickSelect:{type:Boolean,default:!0},placeholder:{type:String,default:""}},emits:["update:modelValue"],setup(D,{emit:le}){const M=D,L=le,{t:de,locale:I}=eo.useI18n(),T=e.ref(!1),fe=e.ref("days"),dt=new Date,ee=e.computed(()=>M.minDate instanceof Date?M.minDate:dt),f=e.ref(ee.value.getMonth()),be=e.ref(ee.value.getFullYear()),Ce=e.ref(ee.value.getMonth()),G=e.ref(ee.value.getFullYear()),U=e.ref(ee.value.getMonth()),me=e.ref(ee.value.getFullYear()),R=e.ref("start"),xe=e.ref(null),Ae=e.ref(null);function nt(){const A=ee.value,O=A.getMonth(),P=A.getFullYear(),ie=O===11?0:O+1,Te=O===11?P+1:P;return{left:{month:O,year:P},right:{month:ie,year:Te}}}const ft=e.ref(null),Z=e.ref(null),Ue=e.ref(null),qe=e.ref(null),Ee=e.ref(null),Me=e.ref(null),je=new Date().getFullYear(),Q=e.computed(()=>["single","singleFromAvailable"].includes(M.mode)),ze=e.computed(()=>["range","rangeFromAvailable"].includes(M.mode)),we=e.computed(()=>{if(M.mode!=="single"&&M.mode!=="singleFromAvailable")return null;const A=M.modelValue;return A instanceof Date?A:null}),it=e.computed(()=>{if(!ze.value)return{start:null,end:null};const A=M.modelValue;return!A||typeof A!="object"?{start:null,end:null}:{start:A.start instanceof Date?A.start:null,end:A.end instanceof Date?A.end:null}});function ot(A){if(!A||!(A instanceof Date))return"";const O=A.getDate(),P=A.getMonth()+1,ie=A.getFullYear(),Te=et=>String(et).padStart(2,"0");return`${Te(O)}/${Te(P)}/${ie}`}const bt=e.computed(()=>ot(we.value)),It=e.computed(()=>{const{start:A,end:O}=it.value;if(!A&&!O)return"";const P=!O||A&&A<=O?A:O,ie=!A||O&&O>=A?O:A;return K(P,ie)?ot(P):`${ot(P)} - ${ot(ie)}`}),en=e.computed(()=>{if(M.mode!=="readonly")return"—";const A=M.modelValue;if(A instanceof Date)return ot(A)||"—";if(A&&typeof A=="object"&&("start"in A||"end"in A)){const O=A.start instanceof Date?A.start:null,P=A.end instanceof Date?A.end:null;if(!O&&!P)return"—";const ie=!P||O&&O<=P?O:P,Te=!O||P&&P>=O?P:O;return K(ie,Te)?ot(ie):`${ot(ie)} - ${ot(Te)}`}return"—"});e.computed(()=>{const A=new Date(be.value,f.value,1);return new Intl.DateTimeFormat(I.value,{month:"long",year:"numeric"}).format(A)});const Pt=e.computed(()=>Ae.value==="left"?Ce.value:Ae.value==="right"?U.value:f.value),oe=e.computed(()=>Ae.value==="left"?G.value:Ae.value==="right"?me.value:be.value),ve=e.computed(()=>{const A=new Date(be.value,f.value,1);return new Intl.DateTimeFormat(I.value,{month:"long"}).format(A)}),Fe=e.computed(()=>{const A=new Date(oe.value,Pt.value,1);return new Intl.DateTimeFormat(I.value,{month:"long"}).format(A)}),De=e.computed(()=>{const A=new Intl.DateTimeFormat(I.value,{month:"short"});return Array.from({length:12},(O,P)=>A.format(new Date(2024,P,1)))}),Zt=e.computed(()=>{const O=(Ae.value?oe.value:be.value)-Math.floor(ia/2);return Array.from({length:ia},(P,ie)=>O+ie)}),yt=e.computed(()=>{const A=Zt.value;return A.length?`${A[0]} – ${A[A.length-1]}`:""}),Ut=e.computed(()=>{const A=new Intl.DateTimeFormat(I.value,{weekday:"short"}),O=new Date(2024,0,1),P=[];for(let ie=0;ie<7;ie++){const Te=new Date(O);Te.setDate(O.getDate()+ie),P.push(A.format(Te).slice(0,2))}return P});function xt(A,O){const P=new Date(A,O,1),ie=new Date(A,O+1,0),Te=P.getDay(),et=ie.getDate(),rt=[];for(let tt=0;tt<Te;tt++)rt.push(null);for(let tt=1;tt<=et;tt++)rt.push(new Date(A,O,tt));return rt}const Ot=e.computed(()=>xt(be.value,f.value)),J=e.computed(()=>xt(G.value,Ce.value)),he=e.computed(()=>xt(me.value,U.value));e.computed(()=>{const A=new Date(G.value,Ce.value,1);return new Intl.DateTimeFormat(I.value,{month:"long",year:"numeric"}).format(A)}),e.computed(()=>{const A=new Date(me.value,U.value,1);return new Intl.DateTimeFormat(I.value,{month:"long",year:"numeric"}).format(A)});const Be=e.computed(()=>{const A=new Date(G.value,Ce.value,1);return new Intl.DateTimeFormat(I.value,{month:"long"}).format(A)}),Xe=e.computed(()=>{const A=new Date(me.value,U.value,1);return new Intl.DateTimeFormat(I.value,{month:"long"}).format(A)}),Ke=e.computed(()=>M.availableDates&&M.availableDates.length>0),Lt=e.computed(()=>Ke.value?[{id:"all",labelKey:"datepicker.quickSelect.allDates"},{id:"last2",labelKey:"datepicker.quickSelect.last2Dates"},{id:"last3",labelKey:"datepicker.quickSelect.last3Dates"},{id:"last4",labelKey:"datepicker.quickSelect.last4Dates"},{id:"last5",labelKey:"datepicker.quickSelect.last5Dates"}]:[{id:"today",labelKey:"datepicker.quickSelect.today"},{id:"lastWeek",labelKey:"datepicker.quickSelect.lastWeek"},{id:"last15Days",labelKey:"datepicker.quickSelect.last15Days"},{id:"last30Days",labelKey:"datepicker.quickSelect.last30Days"},{id:"thisMonth",labelKey:"datepicker.quickSelect.thisMonth"},{id:"last3Months",labelKey:"datepicker.quickSelect.last3Months"},{id:"last6Months",labelKey:"datepicker.quickSelect.last6Months"},{id:"last12Months",labelKey:"datepicker.quickSelect.last12Months"},{id:"lastYear",labelKey:"datepicker.quickSelect.lastYear"}]),Ge=e.ref({top:0,left:0}),Dt=e.ref("left");let He=null;function Pe(){T.value&&e.nextTick(()=>{T.value&&(He!==null&&window.cancelAnimationFrame(He),He=window.requestAnimationFrame(()=>{He=null,Et()}))})}function Et(){if(!qe.value||!T.value)return;const A=qe.value.getBoundingClientRect(),O=window.innerWidth||document.documentElement.clientWidth,P=window.innerHeight||document.documentElement.clientHeight;let ie=A.left,Te=A.bottom+4;const et=Ee.value;if(et){const rt=et.offsetWidth,tt=et.offsetHeight;Dt.value==="right"||ie+rt>O-Tl?(Dt.value="right",ie=A.right-rt):Dt.value="left";const on=Math.max(Tl,O-rt-Tl);if(ie=Math.min(Math.max(ie,Tl),on),Te+tt>P-Tl){const An=A.top-4-tt;An>=Tl?Te=An:Te=Math.max(Tl,P-tt-Tl)}}Ge.value={top:Te,left:ie}}const St=e.computed(()=>!qe.value||!T.value?{}:{position:"fixed",left:`${Ge.value.left}px`,top:`${Ge.value.top}px`,zIndex:1002});function K(A,O){return!A||!O?!1:A.getFullYear()===O.getFullYear()&&A.getMonth()===O.getMonth()&&A.getDate()===O.getDate()}function W(A){return new Date(A.getFullYear(),A.getMonth(),A.getDate()).getTime()}function X(A){return!M.availableDates||!M.availableDates.length?!0:M.availableDates.some(O=>O instanceof Date&&K(O,A))}function pe(A){const O=W(A);return!(M.minDate instanceof Date&&O<W(M.minDate)||M.maxDate instanceof Date&&O>W(M.maxDate))}function ye(A){const O=new Date(A);return new Date(O.getFullYear(),O.getMonth(),O.getDate())}function Je(A){return A.filter(O=>pe(O))}function Tt(A,O){if(!(A instanceof Date)||!(O instanceof Date))return null;let P=W(A),ie=W(O);if(P>ie&&([P,ie]=[ie,P]),M.minDate instanceof Date){const Te=W(M.minDate);P=Math.max(P,Te),ie=Math.max(ie,Te)}if(M.maxDate instanceof Date){const Te=W(M.maxDate);P=Math.min(P,Te),ie=Math.min(ie,Te)}return P>ie?null:{start:ye(P),end:ye(ie)}}function mn(A){return!M.exceptDates||!M.exceptDates.length?!1:M.exceptDates.some(O=>O instanceof Date&&K(O,A))}function vt(A){return mn(A)?!1:["singleFromAvailable","rangeFromAvailable"].includes(M.mode)?X(A):pe(A)}function Gt(A){const O=we.value,P=it.value,ie=W(A),Te=ze.value&&P.start&&P.end&&ie>W(P.start)&&ie<W(P.end),et=ze.value&&P.start&&K(A,P.start),rt=ze.value&&P.end&&K(A,P.end),tt=et&&rt,Mt=Q.value&&O&&K(A,O)||et||rt;let on=!1;if(ze.value&&P.start&&!P.end&&xe.value){const An=W(P.start),Fn=W(xe.value),Qn=Math.min(An,Fn),En=Math.max(An,Fn);on=ie>Qn&&ie<En}return{"dss-datepicker__day--selected":Mt&&!tt,"dss-datepicker__day--range-start":et&&!tt,"dss-datepicker__day--range-end":rt&&!tt,"dss-datepicker__day--range-single":tt,"dss-datepicker__day--in-range":Te&&!et&&!rt,"dss-datepicker__day--in-range-preview":on&&!et&&!rt&&!Te,"dss-datepicker__day--disabled":!vt(A)}}function S(A){if(!ze.value)return;const O=it.value;if(!O.start||O.end){xe.value=null;return}if(!vt(A)){xe.value=null;return}xe.value=new Date(A.getFullYear(),A.getMonth(),A.getDate())}function b(){xe.value=null}function V(){if(!M.doubleCalendar||!ze.value)return;const A=it.value,{start:O,end:P}=A;if(O&&P){const et=O<=P?O:P,rt=O<=P?P:O,tt=et.getMonth(),Mt=et.getFullYear(),on=rt.getMonth(),An=rt.getFullYear();if(tt!==on||Mt!==An){const Fn=Ce.value===tt&&G.value===Mt,Qn=U.value===on&&me.value===An;if(Fn&&Qn)return;Ce.value=tt,G.value=Mt,U.value=on,me.value=An}else{const Fn=tt===0?11:tt-1,Qn=tt===0?Mt-1:Mt;Ce.value===Fn&&G.value===Qn&&U.value===tt&&me.value===Mt||(Ce.value=tt,G.value=Mt,tt===11?(U.value=0,me.value=Mt+1):(U.value=tt+1,me.value=Mt))}return}const ie=O||P;if(ie){const et=ie.getMonth(),rt=ie.getFullYear(),tt=Ce.value===et&&G.value===rt,Mt=U.value===et&&me.value===rt;if(tt||Mt)return;Ce.value=et,G.value=rt,et===11?(U.value=0,me.value=rt+1):(U.value=et+1,me.value=rt);return}const Te=nt();Ce.value=Te.left.month,G.value=Te.left.year,U.value=Te.right.month,me.value=Te.right.year}function Y(A="start"){if(M.mode==="readonly")return;R.value=A;const O=we.value,P=it.value;if(Q.value&&O)f.value=O.getMonth(),be.value=O.getFullYear();else if(ze.value)if(M.doubleCalendar)V();else{const ie=A==="start"&&P.start?P.start:P.end||P.start;ie&&(f.value=ie.getMonth(),be.value=ie.getFullYear())}qe.value=Q.value?ft.value?.closest(".dss-datepicker__input-wrap"):Z.value,fe.value="days",Ae.value=null,Dt.value="left",T.value=!0,Pe()}function ne(){fe.value="days",Ae.value=null,xe.value=null,T.value=!1}function Oe(A,O){Ae.value=A,fe.value=O}function mt(){fe.value="days",Ae.value=null}function ct(A){const O=new Date,P=O.getFullYear(),ie=O.getMonth(),Te=O.getDate();let et,rt;if(Ke.value){const tt=Je([...M.availableDates].filter(Mt=>Mt instanceof Date).map(Mt=>new Date(Mt.getFullYear(),Mt.getMonth(),Mt.getDate()))).sort((Mt,on)=>Mt.getTime()-on.getTime());if(tt.length===0)return null;if(A==="all")et=tt[0],rt=tt[tt.length-1];else{const Mt=parseInt(A.replace("last",""),10);if(Mt<2||Mt>5)return null;const on=tt.slice(-Mt);if(on.length===0)return null;et=on[0],rt=on[on.length-1]}}else{const tt=new Date(P,ie,Te);switch(A){case"today":et=tt,rt=tt;break;case"lastWeek":et=new Date(P,ie,Te-6),rt=tt;break;case"last15Days":et=new Date(P,ie,Te-14),rt=tt;break;case"last30Days":et=new Date(P,ie,Te-29),rt=tt;break;case"thisMonth":et=new Date(P,ie,1),rt=tt;break;case"last3Months":et=new Date(P,ie-3,1),rt=new Date(P,ie,0);break;case"last6Months":et=new Date(P,ie-6,1),rt=new Date(P,ie,0);break;case"last12Months":et=new Date(P,ie-12,1),rt=new Date(P,ie,0);break;case"lastYear":et=new Date(P-1,0,1),rt=new Date(P-1,11,31);break;default:return null}}return{start:et,end:rt}}function We(A){const O=ct(A);return O?Tt(O.start,O.end):null}function Vt(A){return We(A)!==null}function Nt(A){const O=We(A);O&&(L("update:modelValue",O),V())}function wt(A){Ae.value==="left"?Ce.value=A:Ae.value==="right"?U.value=A:f.value=A,mt()}function Ct(A){Ae.value==="left"?G.value=A:Ae.value==="right"?me.value=A:be.value=A,mt()}function At(){f.value===0?(f.value=11,be.value--):f.value--}function Bt(){f.value===11?(f.value=0,be.value++):f.value++}function bn(){Ce.value===0?(Ce.value=11,G.value--):Ce.value--}function Tn(){Ce.value===11?(Ce.value=0,G.value++):Ce.value++}function ol(){U.value===0?(U.value=11,me.value--):U.value--}function qt(){U.value===11?(U.value=0,me.value++):U.value++}function ln(A){if(!vt(A))return;const O=new Date(A.getFullYear(),A.getMonth(),A.getDate());if(Q.value){L("update:modelValue",O),ne();return}const P=it.value;if(!P.start&&!P.end){L("update:modelValue",{start:O,end:null}),R.value="end";return}if(P.start&&P.end){L("update:modelValue",{start:O,end:null}),R.value="end";return}if(R.value==="start"){let ie=O,Te=P.end;ie&&Te&&ie>Te&&([ie,Te]=[Te,ie]),L("update:modelValue",{start:ie||Te,end:Te||ie}),R.value="end"}else{let ie=P.start,Te=O;ie&&Te&&Te<ie&&([ie,Te]=[Te,ie]),L("update:modelValue",{start:ie||Te,end:Te||ie}),R.value="start"}}e.watch(it,()=>{M.doubleCalendar&&ze.value&&T.value&&V()},{deep:!0});let On=null,qn=null,Rn=null;function Nn(){On&&(document.removeEventListener("keydown",On),On=null),qn&&(window.removeEventListener("resize",qn),qn=null),Rn&&(window.removeEventListener("scroll",Rn,!0),Rn=null)}return e.watch(fe,A=>{A==="years"&&e.nextTick(()=>{Me.value?.querySelector(`[data-year="${oe.value}"]`)?.scrollIntoView({block:"center",behavior:"auto"})})}),e.watch(()=>[T.value,fe.value,f.value,be.value,Ce.value,G.value,U.value,me.value,Ae.value,M.doubleCalendar,M.quickSelect],()=>{Pe()}),e.watch(T,A=>{Nn(),A&&(On=O=>{O.key==="Escape"&&(fe.value==="years"||fe.value==="months"?mt():ne())},qn=()=>{Et()},Rn=()=>{Et()},document.addEventListener("keydown",On),window.addEventListener("resize",qn),window.addEventListener("scroll",Rn,!0))}),e.onBeforeUnmount(()=>{He!==null&&(window.cancelAnimationFrame(He),He=null),Nn()}),(A,O)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-datepicker",{"dss-datepicker--readonly":D.mode==="readonly"}])},[D.mode==="readonly"?(e.openBlock(),e.createElementBlock("div",Va,[O[10]||(O[10]=e.createElementVNode("span",{class:"dss-datepicker__icon","aria-hidden":"true"},[e.createElementVNode("svg",{class:"dss-datepicker__icon-svg",width:"24",height:"24",viewBox:"0 0 256 256",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[e.createElementVNode("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,48H48V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24Z"})])],-1)),e.createElementVNode("input",{type:"text",class:"dss-datepicker__input",value:en.value,readonly:"",disabled:"",tabindex:"-1"},null,8,Na)])):Q.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-datepicker__input-wrap",onClick:O[0]||(O[0]=P=>Y("start"))},[O[11]||(O[11]=e.createElementVNode("span",{class:"dss-datepicker__icon","aria-hidden":"true"},[e.createElementVNode("svg",{class:"dss-datepicker__icon-svg",width:"24",height:"24",viewBox:"0 0 256 256",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[e.createElementVNode("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,48H48V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24Z"})])],-1)),e.createElementVNode("input",{ref_key:"inputSingleRef",ref:ft,type:"text",class:"dss-datepicker__input",placeholder:M.placeholder||e.unref(de)("datepicker.selectDate"),value:bt.value,readonly:"",disabled:D.mode==="readonly"},null,8,Ba)])):ze.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-datepicker__input-wrap",ref_key:"inputRangeWrapRef",ref:Z,onClick:O[1]||(O[1]=P=>Y("start"))},[O[12]||(O[12]=e.createElementVNode("span",{class:"dss-datepicker__icon","aria-hidden":"true"},[e.createElementVNode("svg",{class:"dss-datepicker__icon-svg",width:"24",height:"24",viewBox:"0 0 256 256",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[e.createElementVNode("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,48H48V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24Z"})])],-1)),e.createElementVNode("input",{ref_key:"inputRangeRef",ref:Ue,type:"text",class:"dss-datepicker__input",placeholder:M.placeholder||e.unref(de)("datepicker.selectRange"),value:It.value,readonly:""},null,8,Ma)],512)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[T.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-datepicker__overlay",onClick:e.withModifiers(ne,["self"])},[e.createElementVNode("div",{ref_key:"dropdownRef",ref:Ee,class:e.normalizeClass(["dss-datepicker__dropdown",{"dss-datepicker__dropdown--double":D.doubleCalendar&&ze.value&&fe.value==="days","dss-datepicker__dropdown--quick-select":D.doubleCalendar&&ze.value&&fe.value==="days"&&D.quickSelect}]),onClick:O[9]||(O[9]=e.withModifiers(()=>{},["stop"])),style:e.normalizeStyle(St.value)},[fe.value==="days"&&D.doubleCalendar&&ze.value?(e.openBlock(),e.createElementBlock("div",_a,[D.quickSelect?(e.openBlock(),e.createElementBlock("nav",$a,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Lt.value,P=>(e.openBlock(),e.createElementBlock("button",{key:P.id,type:"button",class:"dss-datepicker__quick-select-btn",disabled:!Vt(P.id),onClick:ie=>Nt(P.id)},e.toDisplayString(e.unref(de)(P.labelKey)),9,La))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Ta,[e.createElementVNode("div",Aa,[e.createElementVNode("div",Da,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(de)("datepicker.prevMonth"),onClick:bn}," ‹ ",8,Ha),e.createElementVNode("div",Ra,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:O[2]||(O[2]=P=>Oe("left","months"))},e.toDisplayString(Be.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:O[3]||(O[3]=P=>Oe("left","years"))},e.toDisplayString(G.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(de)("datepicker.nextMonth"),onClick:Tn}," › ",8,Fa)]),e.createElementVNode("div",Ia,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ut.value,P=>(e.openBlock(),e.createElementBlock("span",{key:P,class:"dss-datepicker__weekday"},e.toDisplayString(P),1))),128))]),e.createElementVNode("div",za,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(J.value,(P,ie)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"L-"+ie},[P?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",Gt(P)]),disabled:!vt(P),onClick:Te=>ln(P),onMouseenter:Te=>S(P),onMouseleave:b},e.toDisplayString(P.getDate()),43,Pa)):(e.openBlock(),e.createElementBlock("span",Oa))],64))),128))])]),e.createElementVNode("div",qa,[e.createElementVNode("div",Wa,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(de)("datepicker.prevMonth"),onClick:ol}," ‹ ",8,Za),e.createElementVNode("div",Ua,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:O[4]||(O[4]=P=>Oe("right","months"))},e.toDisplayString(Xe.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:O[5]||(O[5]=P=>Oe("right","years"))},e.toDisplayString(me.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(de)("datepicker.nextMonth"),onClick:qt}," › ",8,Xa)]),e.createElementVNode("div",Ya,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ut.value,P=>(e.openBlock(),e.createElementBlock("span",{key:P,class:"dss-datepicker__weekday"},e.toDisplayString(P),1))),128))]),e.createElementVNode("div",ja,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he.value,(P,ie)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"R-"+ie},[P?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",Gt(P)]),disabled:!vt(P),onClick:Te=>ln(P),onMouseenter:Te=>S(P),onMouseleave:b},e.toDisplayString(P.getDate()),43,Ka)):(e.openBlock(),e.createElementBlock("span",Ga))],64))),128))])])])])):fe.value==="days"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Qa,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(de)("datepicker.prevMonth"),onClick:At}," ‹ ",8,Ja),e.createElementVNode("div",es,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:O[6]||(O[6]=P=>fe.value="months")},e.toDisplayString(ve.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:O[7]||(O[7]=P=>fe.value="years")},e.toDisplayString(be.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(de)("datepicker.nextMonth"),onClick:Bt}," › ",8,ts)]),e.createElementVNode("div",ns,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ut.value,P=>(e.openBlock(),e.createElementBlock("span",{key:P,class:"dss-datepicker__weekday"},e.toDisplayString(P),1))),128))]),e.createElementVNode("div",ls,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ot.value,(P,ie)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:ie},[P?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",Gt(P)]),disabled:!vt(P),onClick:Te=>ln(P),onMouseenter:Te=>S(P),onMouseleave:b},e.toDisplayString(P.getDate()),43,os)):(e.openBlock(),e.createElementBlock("span",as))],64))),128))])],64)):fe.value==="months"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",ss,[e.createElementVNode("div",rs,[e.createElementVNode("span",is,e.toDisplayString(Fe.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:O[8]||(O[8]=P=>fe.value="years")},e.toDisplayString(oe.value),1)])]),e.createElementVNode("div",cs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(De.value,(P,ie)=>(e.openBlock(),e.createElementBlock("button",{key:ie,type:"button",class:e.normalizeClass(["dss-datepicker__month-cell",{"dss-datepicker__month-cell--selected":ie===Pt.value}]),onClick:Te=>wt(ie)},e.toDisplayString(P),11,us))),128))])],64)):fe.value==="years"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("div",ds,[e.createElementVNode("span",ms,e.toDisplayString(yt.value),1)]),e.createElementVNode("div",{class:"dss-datepicker__years-wrap",ref_key:"yearsWrapRef",ref:Me},[e.createElementVNode("div",ps,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Zt.value,P=>(e.openBlock(),e.createElementBlock("button",{key:P,type:"button",class:e.normalizeClass(["dss-datepicker__year-cell",{"dss-datepicker__year-cell--selected":P===oe.value,"dss-datepicker__year-cell--current":P===e.unref(je)}]),"data-year":P,onClick:ie=>Ct(P)},e.toDisplayString(P),11,fs))),128))])],512)],64)):e.createCommentVNode("",!0)],6)])):e.createCommentVNode("",!0)]))],2))}},vs=["data-chart-type"],gs={class:"dss-chart-header-titles"},hs={key:0,class:"dss-chart-title"},ys={key:1,class:"dss-chart-subtitle"},ks=["onClick","onMouseenter"],Cs={class:"dss-legend-text"},bs=["onClick","onMouseenter"],ws={class:"dss-legend-text"},xs=["title"],Es=["src"],Ss={class:"dss-chart-area-wrapper"},Vs={key:0,class:"dss-chart-z-axis-label"},Ns=["width","height","data-smooth","data-animated"],Bs=["id"],Ms=["y","width","height"],_s=["id"],$s=["d"],Ls=["id"],Ts=["d"],As={key:0},Ds=["clip-path"],Hs=["x1","x2","y1","y2"],Rs={class:"dss-axes"},Fs=["x1","x2","y1","y2"],Is=["x1","x2","y1","y2"],zs=["x1","x2","y1","y2"],Ps={class:"dss-axis-labels"},Os=["x","y"],qs=["x","y"],Ws=["x","y"],Zs=["x","y"],Us=["y","transform"],Xs=["x","y","transform"],Ys={key:1,class:"dss-flag-markers"},js=["clip-path"],Ks=["x1","x2","y1","y2","onMouseover"],Gs=["x1","x2","y1","y2","onMouseover"],Qs=["x1","x2","y1","y2","onMouseover"],Js=["cx","cy","onMouseover"],er=["cx","cy","fill","onMouseover"],tr=["x","y"],nr=["clip-path"],lr={key:0},or=["d","onMouseover"],ar=["x","y","width","height","fill","onMouseover"],sr={class:"dss-line-chart"},rr=["d","stroke","stroke-width","stroke-dasharray"],ir=["d","stroke","stroke-width","opacity"],cr=["cx","cy","r","fill","onMouseover"],ur={key:1},dr=["d","stroke","stroke-width","stroke-dasharray"],mr=["d","stroke","stroke-width","stroke-dasharray"],pr=["d","stroke","stroke-width","opacity"],fr=["cx","cy","r","fill","onMouseover"],vr={key:2},gr=["id"],hr=["x","y","width","height"],yr=["d","fill","fill-opacity","mask"],kr=["d","stroke","stroke-width"],Cr=["d","fill","onMouseover"],br=["x","y","width","height","onMouseover"],wr=["clip-path"],xr=["x1","x2","y1","y2","stroke"],Er=["cx","cy","r","fill"],Sr={key:1,class:"dss-bubble-chart"},Vr={key:0,class:"dss-bubble-group"},Nr=["cx","cy","r","fill","fill-opacity","stroke","onMouseenter","onMouseleave","onClick"],Br=["x","y","width","height","xlink:href","clip-path","onLoad","onError","onMouseenter","onMouseleave","onClick"],Mr=["transform"],_r=["cx","cy","r"],$r=["data-chart-type","clip-path"],Lr=["d","fill","fill-opacity","stroke","stroke-width","clip-path","onMouseover"],Tr={key:1,class:"dss-radial-segment-data-labels"},Ar=["x","y"],Dr=["x","y","font-size","fill"],Hr=["x1","y1","x2","y2","stroke"],Rr=["x1","y1","x2","y2","stroke"],Fr=["x","y","text-anchor","font-size"],Ir=["transform"],zr={key:0,class:"dss-spider-grid"},Pr=["cx","cy","r"],Or={class:"dss-spider-grid-labels"},qr=["x","y"],Wr=["x","y"],Zr=["x1","x2","y1","y2"],Ur={class:"dss-spider-labels"},Xr=["x","y","text-anchor","dominant-baseline"],Yr=["points","fill","fill-opacity","stroke","stroke-width"],jr=["cx","cy","r","fill","onMouseover"],Kr={class:"dss-chart-logos"},Gr=["cx","cy","r","fill"],Qr=["x","y","width","height","xlink:href","onLoad","onError","clip-path"],Jr=["onClick","onMouseenter"],ei=["src"],ti={class:"dss-marker-tooltip-category"},ni={key:0,class:"dss-marker-tooltip-description"},li={key:0,class:"dss-tooltip-section dss-spider-tooltip-section"},oi={class:"dss-tooltip-title dss-spider-tooltip-area-title"},ai={class:"dss-tooltip-series-name"},si={class:"dss-tooltip-series-value"},ri={key:1,class:"dss-tooltip-section"},ii={key:0,class:"dss-tooltip-title"},ci={class:"dss-bubble-tooltip-data"},ui={key:2,class:"dss-tooltip-section"},di={class:"dss-tooltip-title"},mi={class:"dss-tooltip-value"},pi={key:0,class:"dss-tooltip-section"},fi={class:"dss-tooltip-section-title"},vi={class:"dss-tooltip-group-header"},gi={class:"dss-tooltip-item-content"},hi={class:"dss-tooltip-item-text"},yi={key:1,class:"dss-tooltip-section"},ki={class:"dss-tooltip-section-title"},Ci={class:"dss-tooltip-item-content"},bi={class:"dss-tooltip-item-title"},wi={key:0,class:"dss-tooltip-item-description"},xi={class:"dss-tooltip-section"},Ei={class:"dss-tooltip-title"},Si={key:0,class:"dss-bubble-tooltip-data"},Vi={class:"dss-tooltip-series-name"},Ni={class:"dss-tooltip-series-value"},Bi={key:0,class:"dss-tooltip-section"},Mi={class:"dss-tooltip-section-title"},_i={class:"dss-tooltip-group-header"},$i={class:"dss-tooltip-item-content"},Li={class:"dss-tooltip-item-text"},Ti={key:1,class:"dss-tooltip-section"},Ai={class:"dss-tooltip-section-title"},Di={class:"dss-tooltip-item-content"},Hi={class:"dss-tooltip-item-title"},Ri={key:0,class:"dss-tooltip-item-description"},Fi=["onClick","onMouseenter"],Ii={class:"dss-legend-text"},zi={key:1,class:"dss-context-menu-separator"},Pi={key:0,class:"dss-context-menu-separator"},Oi={key:0,class:"dss-context-menu-separator"},qi=["onClick"],Wi=["innerHTML"],Zi={key:0,class:"dss-context-menu-icon"},Ui={class:"dss-marker-modal-header"},Xi={class:"dss-marker-modal-body"},Yi={class:"dss-form-group"},ji={class:"dss-form-group"},Ki={for:"dss-marker-description"},Gi={key:0,class:"dss-form-text-display"},Qi=["placeholder"],Ji={class:"dss-marker-modal-footer"},ec={class:"modal-footer-left"},tc={class:"dss-modal-footer-right"},nc=["disabled"],lc={name:"DSSChart"},oc=Object.assign(lc,{props:{series:{type:Array,required:!0,default:()=>[]},categories:{type:Array,default:()=>[]},flags:{type:Array,default:()=>[]},markers:{type:Array,default:()=>[]},showAddMarkerButton:{type:Boolean,default:!0},chartId:{type:String,default:()=>"chart-"+Math.random().toString(36).substring(2,9)},i18n:{type:Object,default:null},locale:{type:String,default:null},options:{type:Object,default:()=>({}),validator:D=>typeof D=="object"&&D!==null},innerSize:{type:Number,default:null},old:{type:Boolean,default:!1}},emits:["add-marker","update-marker","delete-marker"],setup(D,{emit:le}){const{t:M,locale:L}=eo.useI18n(),de=le,I=e.ref(null),T=e.ref(null),fe=e.ref(null),dt=e.ref(0),ee=e.ref(0);let f=null,be=null;const Ce=20,G=e.computed(()=>{if(ee.value,dt.value,!I.value||!T.value)return 0;try{const t=I.value.getBoundingClientRect();return T.value.getBoundingClientRect().top-t.top}catch{return 0}}),U=e.computed(()=>`chart-clip-${R.chartId}`),me=e.computed(()=>`url(#${U.value})`),R=D,xe={chart:{type:"line",width:800,height:400,orientation:"vertical"},title:{text:"",style:{}},subtitle:{text:"",style:{}},zAxis:"",xAxis:{title:{text:""},type:"category"},yAxis:{min:"auto",max:"auto",title:{text:""}},legend:{show:!0,position:"top",orientation:"horizontal"},radialLabels:{show:!1,pointerLength:25,horizontalLength:35,fontSize:14,color:"#000",textOffset:8},radialBar:{dataLabels:{show:!1,minAngleDegrees:20},dataCenter:{show:!1,fontSize:16}},miniRadial:{minVisiblePercent:1,trackColor:"#E5E7EB",thresholds:{low:33,medium:66},colors:{low:"#E53E3E",medium:"#ED8936",high:"#38A169"}},grid:{show:!0,style:{}},watermark:{enabled:!0,opacity:.05,size:35,position:"bottom-right"},colors:["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"],logos:[],stroke:{width:2,curve:"smooth"},bubbles:{size:4},markers:{show:!0,icon:null,iconSize:25,customIcons:{}},fill:{area:{opacity:.3},spider:{opacity:.15}},crosshair:{show:!1,color:"#666"},bubbles:{size:4,tooltip:{fields:["x","y","size"],labels:{x:"X",y:"Y",size:"Size",label:"Label",seriesName:"Series"},formatters:{}}},spider:{gridLabels:null,gridSteps:5},zoom:{enabled:!1,minScale:1,maxScale:2.5},smoothing:{enabled:!1,factor:.3,barRadius:4},animations:{enabled:!0,type:"draw",duration:2500,delay:0,staggerDelay:200,easing:"ease-out",onDataChange:!0,respectReducedMotion:!0},valueFormat:{extension:""},contextMenu:{enabled:!0,items:{addMarker:!0,downloadSvg:!0,downloadPng:!0,downloadCsv:!0},customItems:[]}};function Ae(t,a){const n=Object.assign({},t);return ft(t)&&ft(a)&&Object.keys(a).forEach(i=>{ft(a[i])?i in t?n[i]=Ae(t[i],a[i]):Object.assign(n,{[i]:a[i]}):Object.assign(n,{[i]:a[i]})}),n}const nt=()=>{let t=20,a=0,n=0;if(ot.value&&(t+=30),bt.value&&(t+=25),J.value&&R.series.length>0){const i=R.series.filter((p,g)=>!at.value.has(g)).length;if(he.value==="top"||he.value==="bottom"){if(Be.value==="horizontal"){const g=Math.floor(Ee.value/100);a=Math.ceil(i/g)*25+10}else a=i*25+10;t+=a}else n=150}return{height:t,legendHeight:a,legendWidth:n}};function ft(t){return t&&typeof t=="object"&&!Array.isArray(t)}const Z=e.computed(()=>Ae(xe,R.options)),Ue=e.computed(()=>{const t=Z.value;return t&&t.chart&&t.chart.width==="auto"}),qe=e.computed(()=>{const t=Z.value;return t&&t.chart&&t.chart.height==="auto"}),Ee=e.computed(()=>{const t=Z.value;return Ue.value?dt.value||800:t&&t.chart&&typeof t.chart.width=="number"?t.chart.width:800}),Me=e.ref(Ce),je=e.computed(()=>{if(qe.value){const t=je.value;return t??Math.max(0,(ee.value||400)-Me.value*5)}}),Q=e.computed(()=>{const t=Z.value;if(we.value==="mini-radial")return Ee.value;if(qe.value){const a=je.value;return a??Math.max(0,(ee.value||400)-Me.value)}return t&&t.chart&&typeof t.chart.height=="number"?t.chart.height:400}),ze=e.computed(()=>{if(qe.value&&we.value==="semi-radial"&&je.value!=null)return Me.value+Q.value+"px";if(qe.value)return"100%";if(kn.value)return Me.value+Q.value+"px";if(J.value&&he.value==="bottom"){const t=nt();return Q.value+(t.legendHeight||35)+"px"}return Q.value+(J.value?20:0)+"px"}),we=e.computed(()=>{const t=Z.value;return t&&t.chart&&t.chart.type?t.chart.type:"line"}),it=e.computed(()=>{const t=R.series.map(a=>a.type||we.value);return new Set(t).size>1}),ot=e.computed(()=>{const t=Z.value;return t&&t.title&&t.title.text?t.title.text:""}),bt=e.computed(()=>{const t=Z.value;return t&&t.subtitle&&t.subtitle.text?t.subtitle.text:""}),It=e.computed(()=>{const t=Z.value;if(!t||!t.zAxis)return"";const a=t.zAxis;return typeof a=="string"?a:a&&typeof a.label=="string"?a.label:""}),en=e.computed(()=>{const t=Z.value;return t&&t.xAxis&&t.xAxis.title&&t.xAxis.title.text?t.xAxis.title.text:""}),Pt=e.computed(()=>{const t=Z.value;return t&&t.yAxis&&t.yAxis.title&&t.yAxis.title.text?t.yAxis.title.text:""}),oe=e.computed(()=>{const t=Z.value;return t&&t.yAxis&&t.yAxis.secondary&&typeof t.yAxis.secondary=="object"?t.yAxis.secondary:null}),ve=e.computed(()=>{const t=oe.value;return t&&t.title&&t.title.text?t.title.text:""}),Fe=e.computed(()=>{const t=Z.value;if(!t||!t.yAxis)return Vn;const a=t.yAxis.min;return typeof a=="number"||a===Vn?a:Vn}),De=e.computed(()=>{const t=Z.value;if(!t||!t.yAxis)return Vn;const a=t.yAxis.max;return typeof a=="number"||a===Vn?a:Vn}),Zt=e.computed(()=>{const t=oe.value;if(!t)return Vn;const a=t.min;return typeof a=="number"||a===Vn?a:Vn}),yt=e.computed(()=>{const t=oe.value;if(!t)return Vn;const a=t.max;return typeof a=="number"||a===Vn?a:Vn}),Ut=e.computed(()=>{const t=Z.value;return!t||!t.xAxis?null:typeof t.xAxis.min=="number"?t.xAxis.min:null}),xt=e.computed(()=>{const t=Z.value;return!t||!t.xAxis?null:typeof t.xAxis.max=="number"?t.xAxis.max:null}),Ot=e.computed(()=>{const t=Z.value;return t&&t.grid&&t.grid.show!==!1}),J=e.computed(()=>{const t=Z.value;return t&&t.legend&&t.legend.show!==!1}),he=e.computed(()=>{const t=Z.value;return t&&t.legend&&t.legend.position?t.legend.position:"top"}),Be=e.computed(()=>{const t=Z.value;return t&&t.legend&&t.legend.orientation?t.legend.orientation:"horizontal"}),Xe=e.computed(()=>{const t=Z.value;return!t||!t.tooltip?!0:t.tooltip.enabled!==!1}),Ke=e.computed(()=>{const t=Z.value;if(!t||!t.crosshair)return!1;const a=t.crosshair.show;return a===!0||a==="true"}),Lt=e.computed(()=>{const t=Z.value;return t&&t.crosshair&&t.crosshair.color?t.crosshair.color:"#666"}),Ge=e.computed(()=>{const t=Z.value;return!t||!t.zoom?!1:t.zoom.enabled===!0}),Dt=e.computed(()=>{const t=Z.value;return t&&t.zoom&&typeof t.zoom.minScale=="number"?t.zoom.minScale:1}),He=e.computed(()=>{const t=Z.value;return t&&t.zoom&&typeof t.zoom.maxScale=="number"?t.zoom.maxScale:2.5}),Pe=e.computed(()=>{const t=Z.value;return t&&t.stroke&&typeof t.stroke.width=="number"?t.stroke.width:2}),Et=e.computed(()=>{if(!kn.value)return 0;const t=Z.value;return t&&t.stroke&&typeof t.stroke.width=="number"?t.stroke.width:0}),St=e.computed(()=>{const t=Z.value;return t&&t.bubbles&&typeof t.bubbles.size=="number"?t.bubbles.size:4}),K=e.computed(()=>{const{maxX:t}=Xt.value;return t===0}),W=(t,a)=>K.value&&a===0?5:a,X=t=>{const a=Number(t);return!Number.isFinite(a)||a<=0?0:a},pe=e.computed(()=>{const t=Z.value;return t&&t.fill&&t.fill.area&&typeof t.fill.area.opacity=="number"?t.fill.area.opacity:.3}),ye=e.computed(()=>{const t=Z.value;return t&&t.smoothing&&t.smoothing.enabled===!0}),Je=e.computed(()=>{const t=Z.value;return t&&t.smoothing&&typeof t.smoothing.factor=="number"?t.smoothing.factor:.3}),Tt=e.computed(()=>{const t=Z.value;return ye.value?t&&t.smoothing&&typeof t.smoothing.barRadius=="number"?t.smoothing.barRadius:4:0}),mn=e.computed(()=>{const t=Z.value,a=t&&t.colors&&Array.isArray(t.colors)?t.colors:[];return a.length>0?a:["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"]}),vt=e.computed(()=>{const t=Z.value;return t&&t.animations&&t.animations.enabled!==!1}),Gt=e.computed(()=>{const t=Z.value;return t&&t.animations&&t.animations.type?t.animations.type:"draw"}),S=e.computed(()=>{const t=Z.value;return t&&t.animations&&typeof t.animations.duration=="number"?t.animations.duration:2500}),b=e.computed(()=>{const t=Z.value;return t&&t.animations&&typeof t.animations.delay=="number"?t.animations.delay:0}),V=e.computed(()=>{const t=Z.value;return t&&t.animations&&t.animations.easing?t.animations.easing:"ease-out"}),Y=e.computed(()=>{const t=Z.value;return t&&t.animations&&typeof t.animations.staggerDelay=="number"?t.animations.staggerDelay:200}),ne=e.computed(()=>{const t=Z.value;return t&&t.animations&&t.animations.onDataChange!==!1}),Oe=e.computed(()=>{const t=Z.value;return t&&t.animations&&t.animations.respectReducedMotion!==!1}),mt=e.computed(()=>{const t=Z.value;return t&&t.fill&&t.fill.spider&&typeof t.fill.spider.opacity=="number"?t.fill.spider.opacity:.15}),ct=e.computed(()=>Z.value?.spider?.gridSteps||5),We=e.computed(()=>{const t=[],a=ct.value;for(let n=1;n<=a;n++)t.push(ut.value/a*n);return t}),Vt=t=>{const a=Nt.value;if(a&&Array.isArray(a)&&a[t]!==void 0)return a[t].toString();const n=We.value[t];return Math.round(n/ut.value*100)+"%"},Nt=e.computed(()=>Z.value?.spider?.gridLabels||null),wt=e.computed(()=>{const t=Z.value;return t&&t.contextMenu&&t.contextMenu.enabled===!0}),Ct=e.computed(()=>{const t=Z.value,a={addMarker:!0,downloadSvg:!0,downloadPng:!0,downloadCsv:!0};return t&&t.contextMenu&&t.contextMenu.items?{...a,...t.contextMenu.items}:a}),At=e.computed(()=>{const t=Z.value;return t&&t.contextMenu&&Array.isArray(t.contextMenu.customItems)?t.contextMenu.customItems:[]}),Bt=e.computed(()=>{const t=Z.value;return t&&t.markers&&t.markers.icon?t.markers.icon:rt.value}),bn=e.computed(()=>{const t=Z.value;return t&&t.markers&&t.markers.customIcons?t.markers.customIcons:{}}),Tn=e.computed(()=>{const t=Z.value;return t&&t.markers&&typeof t.markers.iconSize=="number"?t.markers.iconSize:20}),ol=e.computed(()=>{const a=Z.value?.valueFormat?.extension;return typeof a=="string"?a:""}),qt=t=>{const a=ol.value;if(t==null)return"";const n=String(t);return a?n+a:n},ln=e.computed(()=>!ae.value.isZooming);e.computed(()=>Yt.value.map(t=>{if(t.categoryIndex!==void 0&&(Sn.value||jt.value)){const a=Kt(t.categoryIndex),n=G.value+F.value.bottom-Tn.value/2;return{...t,x:a,y:n}}return t}));function On(t,a){let n;if(t instanceof Date)n=new Date(t.getFullYear(),t.getMonth(),t.getDate());else if(typeof t=="string"){const[g,C,w]=t.split("-"),z=Number(w?.length===2?`20${w}`:w);n=new Date(z,Number(C)-1,Number(g))}else return 0;let i=0,p=1/0;return a.forEach((g,C)=>{const[w,z,N]=g.split("-"),$=Number(N?.length===2?`20${N}`:N),B=new Date($,Number(z)-1,Number(w)),te=Math.abs(B-n);te<p&&(p=te,i=C)}),i}const qn=e.computed(()=>{const t=R.markers.map(n=>{const i=On(n.marker_date,R.categories),p=Kt(i),g=G.value+F.value.bottom-Tn.value/2;return{...n,x:p,y:g,categoryIndex:i,source:"props"}}),a=Yt.value.map(n=>{if(n.categoryIndex!==void 0&&(Sn.value||jt.value)){const i=Kt(n.categoryIndex),p=G.value+F.value.bottom-Tn.value/2;return{...n,x:i,y:p,source:"internal"}}return{...n,source:"internal"}});return[...t,...a]}),Rn=e.computed(()=>{const t=Z.value;return t&&t.watermark&&t.watermark.enabled===!0}),Nn=e.computed(()=>{const t=Z.value;return t&&t.watermark&&typeof t.watermark.opacity=="number"?t.watermark.opacity:.05}),A=e.computed(()=>{const t=Z.value;return t&&t.watermark&&t.watermark.size?t.watermark.size:35}),O=e.computed(()=>{const t=Z.value;return t&&t.watermark&&t.watermark.position?t.watermark.position:"bottom-right"}),P=e.computed(()=>{const t={left:F.value.left,top:F.value.top,width:F.value.width,height:F.value.height};let a,n;const i=String(A.value);if(i.includes("%")){const p=parseFloat(i)/100;a=t.width*p,n=a*(96/499)}else{const p=parseFloat(i)||25;a=Math.min(t.width*.25,200)*(p/25),n=a*(96/499)}return{width:a,height:n,area:t}}),ie=e.computed(()=>{const{width:t,height:a}=P.value,n=O.value;let i,p;const g=F.value.left,C=F.value.right,w=F.value.top,z=F.value.bottom,N=F.value.width,$=F.value.height;switch(n){case"center":i=g+(N-t)/2,p=w+($-a)/2;break;case"top-left":i=g+15,p=w+5;break;case"top-right":i=C-t-15,p=w+5;break;case"bottom-left":i=g+15,p=z-a-5;break;case"bottom-right":default:i=C-t-15,p=z-a-5;break}return{backgroundPositionX:i+"px",backgroundPositionY:p+"px",backgroundSize:`${t}px ${a}px`}}),Te=t=>!R.flags||!R.flags.length?[]:R.flags.filter(a=>a.categoryIndex===t),et=t=>{const a=Te(t),n=fl(t),i=a.filter(C=>C.manual),p=a.filter(C=>!C.manual),g=[];return i.length>0&&g.push({type:M("chart.tooltip.manualFlags"),color:"#698dbe",flags:i.map(C=>({text:C.text,color:"#698dbe"}))}),p.length>0&&g.push({type:M("chart.tooltip.autoFlags"),color:"#a1d499",flags:p.map(C=>({text:C.text,color:"#a1d499"}))}),{flagGroups:g,markers:n.map(C=>({title:C.title,description:C.description,type:M("chart.tooltip.markers"),color:C.color||"#9784ba"}))}},rt=e.computed(()=>{const t=R.old?`<svg width="55" height="56" viewBox="0 0 55 56" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),lo=require("vue-i18n"),Va={key:0,class:"dss-datepicker__input-wrap dss-datepicker__input-wrap--readonly"},Na=["value"],Ba=["placeholder","value","disabled"],Ma=["placeholder","value"],_a=["placeholder","value"],$a=["aria-selected","onClick"],La={class:"dss-datepicker__list-item-label"},Aa={key:0,class:"dss-datepicker__list-item-check",width:"16",height:"16",viewBox:"0 0 256 256",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},Ta={key:1,class:"dss-datepicker__list-empty"},Da={key:1,class:"dss-datepicker__double-wrap"},Ha={key:0,class:"dss-datepicker__quick-select","aria-label":"Quick range"},Ra=["disabled","onClick"],Fa={class:"dss-datepicker__double-calendars"},Ia={class:"dss-datepicker__double-calendar"},za={class:"dss-datepicker__calendar-header"},Pa=["aria-label"],Oa={class:"dss-datepicker__month-year-row"},qa=["aria-label"],Wa={class:"dss-datepicker__weekdays"},Za={class:"dss-datepicker__grid"},Ua=["disabled","onClick","onMouseenter"],Xa={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},Ya={class:"dss-datepicker__double-calendar"},ja={class:"dss-datepicker__calendar-header"},Ka=["aria-label"],Ga={class:"dss-datepicker__month-year-row"},Qa=["aria-label"],Ja={class:"dss-datepicker__weekdays"},es={class:"dss-datepicker__grid"},ts=["disabled","onClick","onMouseenter"],ls={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},ns={class:"dss-datepicker__calendar-header"},os=["aria-label"],as={class:"dss-datepicker__month-year-row"},ss=["aria-label"],rs={class:"dss-datepicker__weekdays"},is={class:"dss-datepicker__grid"},cs=["disabled","onClick","onMouseenter"],us={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},ds={class:"dss-datepicker__calendar-header"},ms={class:"dss-datepicker__month-year-row"},ps={class:"dss-datepicker__month-year dss-datepicker__month-year--static"},fs={class:"dss-datepicker__months-grid"},vs=["onClick"],gs={class:"dss-datepicker__calendar-header dss-datepicker__calendar-header--center"},hs={class:"dss-datepicker__month-year"},ys={class:"dss-datepicker__years-grid"},ks=["data-year","onClick"],ia=27,Fn=8,ta={__name:"DSSDatepicker",props:{mode:{type:String,default:"single",validator:H=>["single","range","singleFromAvailable","rangeFromAvailable","listFromAvailable","readonly"].includes(H)},modelValue:{type:[Date,Object],default:null},availableDates:{type:Array,default:()=>[]},minDate:{type:Date,default:null},maxDate:{type:Date,default:null},exceptDates:{type:Array,default:()=>[]},doubleCalendar:{type:Boolean,default:!1},quickSelect:{type:Boolean,default:!0},placeholder:{type:String,default:""}},emits:["update:modelValue"],setup(H,{emit:ne}){const M=H,A=ne,{t:ue,locale:I}=lo.useI18n(),$=e.ref(!1),ve=e.ref("days"),ct=new Date,Q=e.computed(()=>M.minDate instanceof Date?M.minDate:ct),f=e.ref(Q.value.getMonth()),we=e.ref(Q.value.getFullYear()),Ce=e.ref(Q.value.getMonth()),G=e.ref(Q.value.getFullYear()),U=e.ref(Q.value.getMonth()),pe=e.ref(Q.value.getFullYear()),F=e.ref("start"),Ee=e.ref(null),De=e.ref(null);function tt(){const D=Q.value,O=D.getMonth(),_=D.getFullYear(),ce=O===11?0:O+1,$e=O===11?_+1:_;return{left:{month:O,year:_},right:{month:ce,year:$e}}}const pt=e.ref(null),W=e.ref(null),Ze=e.ref(null),qe=e.ref(null),xe=e.ref(null),Me=e.ref(null),Ye=e.ref(null),ee=e.ref(null),lt=new Date().getFullYear(),be=e.computed(()=>["single","singleFromAvailable"].includes(M.mode)),Je=e.computed(()=>["range","rangeFromAvailable"].includes(M.mode)),ut=e.computed(()=>M.mode==="listFromAvailable"),Ct=e.computed(()=>{if(!["single","singleFromAvailable","listFromAvailable"].includes(M.mode))return null;const D=M.modelValue;return D instanceof Date?D:null}),Et=e.computed(()=>{if(!Je.value)return{start:null,end:null};const D=M.modelValue;return!D||typeof D!="object"?{start:null,end:null}:{start:D.start instanceof Date?D.start:null,end:D.end instanceof Date?D.end:null}});function Ht(D){if(!D||!(D instanceof Date))return"";const O=D.getDate(),_=D.getMonth()+1,ce=D.getFullYear(),$e=dt=>String(dt).padStart(2,"0");return`${$e(O)}/${$e(_)}/${ce}`}const Pt=e.computed(()=>Ht(Ct.value)),se=e.computed(()=>{const{start:D,end:O}=Et.value;if(!D&&!O)return"";const _=!O||D&&D<=O?D:O,ce=!D||O&&O>=D?O:D;return re(_,ce)?Ht(_):`${Ht(_)} - ${Ht(ce)}`}),ge=e.computed(()=>{if(M.mode!=="readonly")return"—";const D=M.modelValue;if(D instanceof Date)return Ht(D)||"—";if(D&&typeof D=="object"&&("start"in D||"end"in D)){const O=D.start instanceof Date?D.start:null,_=D.end instanceof Date?D.end:null;if(!O&&!_)return"—";const ce=!_||O&&O<=_?O:_,$e=!O||_&&_>=O?_:O;return re(ce,$e)?Ht(ce):`${Ht(ce)} - ${Ht($e)}`}return"—"});e.computed(()=>{const D=new Date(we.value,f.value,1);return new Intl.DateTimeFormat(I.value,{month:"long",year:"numeric"}).format(D)});const He=e.computed(()=>De.value==="left"?Ce.value:De.value==="right"?U.value:f.value),_e=e.computed(()=>De.value==="left"?G.value:De.value==="right"?pe.value:we.value),Xt=e.computed(()=>{const D=new Date(we.value,f.value,1);return new Intl.DateTimeFormat(I.value,{month:"long"}).format(D)}),bt=e.computed(()=>{const D=new Date(_e.value,He.value,1);return new Intl.DateTimeFormat(I.value,{month:"long"}).format(D)}),Gt=e.computed(()=>{const D=new Intl.DateTimeFormat(I.value,{month:"short"});return Array.from({length:12},(O,_)=>D.format(new Date(2024,_,1)))}),Lt=e.computed(()=>{const O=(De.value?_e.value:we.value)-Math.floor(ia/2);return Array.from({length:ia},(_,ce)=>O+ce)}),qt=e.computed(()=>{const D=Lt.value;return D.length?`${D[0]} – ${D[D.length-1]}`:""}),K=e.computed(()=>{const D=new Intl.DateTimeFormat(I.value,{weekday:"short"}),O=new Date(2024,0,1),_=[];for(let ce=0;ce<7;ce++){const $e=new Date(O);$e.setDate(O.getDate()+ce),_.push(D.format($e).slice(0,2))}return _});function ye(D,O){const _=new Date(D,O,1),ce=new Date(D,O+1,0),$e=_.getDay(),dt=ce.getDate(),Qe=[];for(let ot=0;ot<$e;ot++)Qe.push(null);for(let ot=1;ot<=dt;ot++)Qe.push(new Date(D,O,ot));return Qe}const Be=e.computed(()=>ye(we.value,f.value)),Ue=e.computed(()=>ye(G.value,Ce.value)),Ke=e.computed(()=>ye(pe.value,U.value));e.computed(()=>{const D=new Date(G.value,Ce.value,1);return new Intl.DateTimeFormat(I.value,{month:"long",year:"numeric"}).format(D)}),e.computed(()=>{const D=new Date(pe.value,U.value,1);return new Intl.DateTimeFormat(I.value,{month:"long",year:"numeric"}).format(D)});const Tt=e.computed(()=>{const D=new Date(G.value,Ce.value,1);return new Intl.DateTimeFormat(I.value,{month:"long"}).format(D)}),et=e.computed(()=>{const D=new Date(pe.value,U.value,1);return new Intl.DateTimeFormat(I.value,{month:"long"}).format(D)}),Ot=e.computed(()=>M.availableDates&&M.availableDates.length>0),We=e.computed(()=>Ot.value?[{id:"all",labelKey:"datepicker.quickSelect.allDates"},{id:"last2",labelKey:"datepicker.quickSelect.last2Dates"},{id:"last3",labelKey:"datepicker.quickSelect.last3Dates"},{id:"last4",labelKey:"datepicker.quickSelect.last4Dates"},{id:"last5",labelKey:"datepicker.quickSelect.last5Dates"}]:[{id:"today",labelKey:"datepicker.quickSelect.today"},{id:"lastWeek",labelKey:"datepicker.quickSelect.lastWeek"},{id:"last15Days",labelKey:"datepicker.quickSelect.last15Days"},{id:"last30Days",labelKey:"datepicker.quickSelect.last30Days"},{id:"thisMonth",labelKey:"datepicker.quickSelect.thisMonth"},{id:"last3Months",labelKey:"datepicker.quickSelect.last3Months"},{id:"last6Months",labelKey:"datepicker.quickSelect.last6Months"},{id:"last12Months",labelKey:"datepicker.quickSelect.last12Months"},{id:"lastYear",labelKey:"datepicker.quickSelect.lastYear"}]),Fe=e.ref({top:0,left:0}),xt=e.ref("left");let ft=null;function J(){$.value&&e.nextTick(()=>{$.value&&(ft!==null&&window.cancelAnimationFrame(ft),ft=window.requestAnimationFrame(()=>{ft=null,Z()}))})}function Z(){if(!xe.value||!$.value)return;const D=xe.value.getBoundingClientRect(),O=window.innerWidth||document.documentElement.clientWidth,_=window.innerHeight||document.documentElement.clientHeight;let ce=D.left,$e=D.bottom+4;const dt=Me.value;if(dt){const Qe=dt.offsetWidth,ot=dt.offsetHeight;xt.value==="right"||ce+Qe>O-Fn?(xt.value="right",ce=D.right-Qe):xt.value="left";const nl=Math.max(Fn,O-Qe-Fn);if(ce=Math.min(Math.max(ce,Fn),nl),$e+ot>_-Fn){const Dl=D.top-4-ot;Dl>=Fn?$e=Dl:$e=Math.max(Fn,_-ot-Fn)}}Fe.value={top:$e,left:ce}}const X=e.computed(()=>!xe.value||!$.value?{}:{position:"fixed",left:`${Fe.value.left}px`,top:`${Fe.value.top}px`,zIndex:1002});function re(D,O){return!D||!O?!1:D.getFullYear()===O.getFullYear()&&D.getMonth()===O.getMonth()&&D.getDate()===O.getDate()}function fe(D){return new Date(D.getFullYear(),D.getMonth(),D.getDate()).getTime()}function Ge(D){return!M.availableDates||!M.availableDates.length?!0:M.availableDates.some(O=>O instanceof Date&&re(O,D))}function Nt(D){const O=fe(D);return!(M.minDate instanceof Date&&O<fe(M.minDate)||M.maxDate instanceof Date&&O>fe(M.maxDate))}function rl(D){const O=new Date(D);return new Date(O.getFullYear(),O.getMonth(),O.getDate())}function St(D){return D.filter(O=>Nt(O))}function ll(D,O){if(!(D instanceof Date)||!(O instanceof Date))return null;let _=fe(D),ce=fe(O);if(_>ce&&([_,ce]=[ce,_]),M.minDate instanceof Date){const $e=fe(M.minDate);_=Math.max(_,$e),ce=Math.max(ce,$e)}if(M.maxDate instanceof Date){const $e=fe(M.maxDate);_=Math.min(_,$e),ce=Math.min(ce,$e)}return _>ce?null:{start:rl(_),end:rl(ce)}}function S(D){return!M.exceptDates||!M.exceptDates.length?!1:M.exceptDates.some(O=>O instanceof Date&&re(O,D))}function C(D){return S(D)?!1:["singleFromAvailable","rangeFromAvailable"].includes(M.mode)?Ge(D):Nt(D)}function V(D){const O=Ct.value,_=Et.value,ce=fe(D),$e=Je.value&&_.start&&_.end&&ce>fe(_.start)&&ce<fe(_.end),dt=Je.value&&_.start&&re(D,_.start),Qe=Je.value&&_.end&&re(D,_.end),ot=dt&&Qe,Dt=be.value&&O&&re(D,O)||dt||Qe;let nl=!1;if(Je.value&&_.start&&!_.end&&Ee.value){const Dl=fe(_.start),Nl=fe(Ee.value),Ol=Math.min(Dl,Nl),$n=Math.max(Dl,Nl);nl=ce>Ol&&ce<$n}return{"dss-datepicker__day--selected":Dt&&!ot,"dss-datepicker__day--range-start":dt&&!ot,"dss-datepicker__day--range-end":Qe&&!ot,"dss-datepicker__day--range-single":ot,"dss-datepicker__day--in-range":$e&&!dt&&!Qe,"dss-datepicker__day--in-range-preview":nl&&!dt&&!Qe&&!$e,"dss-datepicker__day--disabled":!C(D)}}function Y(D){if(!Je.value)return;const O=Et.value;if(!O.start||O.end){Ee.value=null;return}if(!C(D)){Ee.value=null;return}Ee.value=new Date(D.getFullYear(),D.getMonth(),D.getDate())}function le(){Ee.value=null}function ze(){if(!M.doubleCalendar||!Je.value)return;const D=Et.value,{start:O,end:_}=D;if(O&&_){const dt=O<=_?O:_,Qe=O<=_?_:O,ot=dt.getMonth(),Dt=dt.getFullYear(),nl=Qe.getMonth(),Dl=Qe.getFullYear();if(ot!==nl||Dt!==Dl){const Nl=Ce.value===ot&&G.value===Dt,Ol=U.value===nl&&pe.value===Dl;if(Nl&&Ol)return;Ce.value=ot,G.value=Dt,U.value=nl,pe.value=Dl}else{const Nl=ot===0?11:ot-1,Ol=ot===0?Dt-1:Dt;Ce.value===Nl&&G.value===Ol&&U.value===ot&&pe.value===Dt||(Ce.value=ot,G.value=Dt,ot===11?(U.value=0,pe.value=Dt+1):(U.value=ot+1,pe.value=Dt))}return}const ce=O||_;if(ce){const dt=ce.getMonth(),Qe=ce.getFullYear(),ot=Ce.value===dt&&G.value===Qe,Dt=U.value===dt&&pe.value===Qe;if(ot||Dt)return;Ce.value=dt,G.value=Qe,dt===11?(U.value=0,pe.value=Qe+1):(U.value=dt+1,pe.value=Qe);return}const $e=tt();Ce.value=$e.left.month,G.value=$e.left.year,U.value=$e.right.month,pe.value=$e.right.year}const gt=e.computed(()=>new Intl.DateTimeFormat(I.value,{day:"2-digit",month:"long",year:"numeric"})),rt=e.computed(()=>{if(!ut.value)return[];const D=(M.availableDates||[]).filter(_=>_ instanceof Date&&!Number.isNaN(_.getTime())).filter(_=>!S(_)&&Nt(_)).map(_=>new Date(_.getFullYear(),_.getMonth(),_.getDate()));D.sort((_,ce)=>ce.getTime()-_.getTime());const O=Ct.value;return D.map(_=>({date:_,ts:_.getTime(),label:gt.value.format(_),selected:!!(O&&re(_,O))}))});function Oe(){if($.value){ht();return}xe.value=qe.value?.closest(".dss-datepicker__input-wrap"),xt.value="left",$.value=!0,J(),e.nextTick(()=>{ee.value?.querySelector(".dss-datepicker__list-item--selected")?.scrollIntoView({block:"nearest",behavior:"auto"})})}function Bt(D){if(!(D instanceof Date))return;const O=new Date(D.getFullYear(),D.getMonth(),D.getDate());A("update:modelValue",O),ht()}function Vt(D="start"){if(M.mode==="readonly")return;F.value=D;const O=Ct.value,_=Et.value;if(be.value&&O)f.value=O.getMonth(),we.value=O.getFullYear();else if(Je.value)if(M.doubleCalendar)ze();else{const ce=D==="start"&&_.start?_.start:_.end||_.start;ce&&(f.value=ce.getMonth(),we.value=ce.getFullYear())}xe.value=be.value?pt.value?.closest(".dss-datepicker__input-wrap"):W.value,ve.value="days",De.value=null,xt.value="left",$.value=!0,J()}function ht(){ve.value="days",De.value=null,Ee.value=null,$.value=!1}function yt(D,O){De.value=D,ve.value=O}function Mt(){ve.value="days",De.value=null}function _t(D){const O=new Date,_=O.getFullYear(),ce=O.getMonth(),$e=O.getDate();let dt,Qe;if(Ot.value){const ot=St([...M.availableDates].filter(Dt=>Dt instanceof Date).map(Dt=>new Date(Dt.getFullYear(),Dt.getMonth(),Dt.getDate()))).sort((Dt,nl)=>Dt.getTime()-nl.getTime());if(ot.length===0)return null;if(D==="all")dt=ot[0],Qe=ot[ot.length-1];else{const Dt=parseInt(D.replace("last",""),10);if(Dt<2||Dt>5)return null;const nl=ot.slice(-Dt);if(nl.length===0)return null;dt=nl[0],Qe=nl[nl.length-1]}}else{const ot=new Date(_,ce,$e);switch(D){case"today":dt=ot,Qe=ot;break;case"lastWeek":dt=new Date(_,ce,$e-6),Qe=ot;break;case"last15Days":dt=new Date(_,ce,$e-14),Qe=ot;break;case"last30Days":dt=new Date(_,ce,$e-29),Qe=ot;break;case"thisMonth":dt=new Date(_,ce,1),Qe=ot;break;case"last3Months":dt=new Date(_,ce-3,1),Qe=new Date(_,ce,0);break;case"last6Months":dt=new Date(_,ce-6,1),Qe=new Date(_,ce,0);break;case"last12Months":dt=new Date(_,ce-12,1),Qe=new Date(_,ce,0);break;case"lastYear":dt=new Date(_-1,0,1),Qe=new Date(_-1,11,31);break;default:return null}}return{start:dt,end:Qe}}function hl(D){const O=_t(D);return O?ll(O.start,O.end):null}function Al(D){return hl(D)!==null}function on(D){const O=hl(D);O&&(A("update:modelValue",O),ze())}function Wt(D){De.value==="left"?Ce.value=D:De.value==="right"?U.value=D:f.value=D,Mt()}function dl(D){De.value==="left"?G.value=D:De.value==="right"?pe.value=D:we.value=D,Mt()}function vn(){f.value===0?(f.value=11,we.value--):f.value--}function gn(){f.value===11?(f.value=0,we.value++):f.value++}function an(){Ce.value===0?(Ce.value=11,G.value--):Ce.value--}function Tl(){Ce.value===11?(Ce.value=0,G.value++):Ce.value++}function El(){U.value===0?(U.value=11,pe.value--):U.value--}function xn(){U.value===11?(U.value=0,pe.value++):U.value++}function sn(D){if(!C(D))return;const O=new Date(D.getFullYear(),D.getMonth(),D.getDate());if(be.value){A("update:modelValue",O),ht();return}const _=Et.value;if(!_.start&&!_.end){A("update:modelValue",{start:O,end:null}),F.value="end";return}if(_.start&&_.end){A("update:modelValue",{start:O,end:null}),F.value="end";return}if(F.value==="start"){let ce=O,$e=_.end;ce&&$e&&ce>$e&&([ce,$e]=[$e,ce]),A("update:modelValue",{start:ce||$e,end:$e||ce}),F.value="end"}else{let ce=_.start,$e=O;ce&&$e&&$e<ce&&([ce,$e]=[$e,ce]),A("update:modelValue",{start:ce||$e,end:$e||ce}),F.value="start"}}e.watch(Et,()=>{M.doubleCalendar&&Je.value&&$.value&&ze()},{deep:!0});let Fl=null,Gl=null,yl=null;function Ql(){Fl&&(document.removeEventListener("keydown",Fl),Fl=null),Gl&&(window.removeEventListener("resize",Gl),Gl=null),yl&&(window.removeEventListener("scroll",yl,!0),yl=null)}return e.watch(ve,D=>{D==="years"&&e.nextTick(()=>{Ye.value?.querySelector(`[data-year="${_e.value}"]`)?.scrollIntoView({block:"center",behavior:"auto"})})}),e.watch(()=>[$.value,ve.value,f.value,we.value,Ce.value,G.value,U.value,pe.value,De.value,M.doubleCalendar,M.quickSelect],()=>{J()}),e.watch($,D=>{Ql(),D&&(Fl=O=>{O.key==="Escape"&&(ve.value==="years"||ve.value==="months"?Mt():ht())},Gl=()=>{Z()},yl=()=>{Z()},document.addEventListener("keydown",Fl),window.addEventListener("resize",Gl),window.addEventListener("scroll",yl,!0))}),e.onBeforeUnmount(()=>{ft!==null&&(window.cancelAnimationFrame(ft),ft=null),Ql()}),(D,O)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-datepicker",{"dss-datepicker--readonly":H.mode==="readonly"}])},[H.mode==="readonly"?(e.openBlock(),e.createElementBlock("div",Va,[O[10]||(O[10]=e.createElementVNode("span",{class:"dss-datepicker__icon","aria-hidden":"true"},[e.createElementVNode("svg",{class:"dss-datepicker__icon-svg",width:"24",height:"24",viewBox:"0 0 256 256",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[e.createElementVNode("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,48H48V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24Z"})])],-1)),e.createElementVNode("input",{type:"text",class:"dss-datepicker__input",value:ge.value,readonly:"",disabled:"",tabindex:"-1"},null,8,Na)])):be.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-datepicker__input-wrap",onClick:O[0]||(O[0]=_=>Vt("start"))},[O[11]||(O[11]=e.createElementVNode("span",{class:"dss-datepicker__icon","aria-hidden":"true"},[e.createElementVNode("svg",{class:"dss-datepicker__icon-svg",width:"24",height:"24",viewBox:"0 0 256 256",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[e.createElementVNode("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,48H48V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24Z"})])],-1)),e.createElementVNode("input",{ref_key:"inputSingleRef",ref:pt,type:"text",class:"dss-datepicker__input",placeholder:M.placeholder||e.unref(ue)("datepicker.selectDate"),value:Pt.value,readonly:"",disabled:H.mode==="readonly"},null,8,Ba)])):ut.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["dss-datepicker__input-wrap dss-datepicker__input-wrap--list",{"dss-datepicker__input-wrap--open":$.value}]),onClick:Oe},[O[13]||(O[13]=e.createElementVNode("span",{class:"dss-datepicker__icon","aria-hidden":"true"},[e.createElementVNode("svg",{class:"dss-datepicker__icon-svg",width:"24",height:"24",viewBox:"0 0 256 256",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[e.createElementVNode("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,48H48V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24Z"})])],-1)),e.createElementVNode("input",{ref_key:"inputListRef",ref:qe,type:"text",class:"dss-datepicker__input",placeholder:M.placeholder||e.unref(ue)("datepicker.selectFromList"),value:Pt.value,readonly:""},null,8,Ma),e.createElementVNode("span",{class:e.normalizeClass(["dss-datepicker__chevron",{"dss-datepicker__chevron--open":$.value}]),"aria-hidden":"true"},[...O[12]||(O[12]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 256 256",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"})],-1)])],2)],2)):Je.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-datepicker__input-wrap",ref_key:"inputRangeWrapRef",ref:W,onClick:O[1]||(O[1]=_=>Vt("start"))},[O[14]||(O[14]=e.createElementVNode("span",{class:"dss-datepicker__icon","aria-hidden":"true"},[e.createElementVNode("svg",{class:"dss-datepicker__icon-svg",width:"24",height:"24",viewBox:"0 0 256 256",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[e.createElementVNode("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,48H48V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24Z"})])],-1)),e.createElementVNode("input",{ref_key:"inputRangeRef",ref:Ze,type:"text",class:"dss-datepicker__input",placeholder:M.placeholder||e.unref(ue)("datepicker.selectRange"),value:se.value,readonly:""},null,8,_a)],512)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[$.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-datepicker__overlay",onClick:e.withModifiers(ht,["self"])},[e.createElementVNode("div",{ref_key:"dropdownRef",ref:Me,class:e.normalizeClass(["dss-datepicker__dropdown",{"dss-datepicker__dropdown--double":H.doubleCalendar&&Je.value&&ve.value==="days","dss-datepicker__dropdown--quick-select":H.doubleCalendar&&Je.value&&ve.value==="days"&&H.quickSelect,"dss-datepicker__dropdown--list":ut.value}]),onClick:O[9]||(O[9]=e.withModifiers(()=>{},["stop"])),style:e.normalizeStyle(X.value)},[ut.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[rt.value.length?(e.openBlock(),e.createElementBlock("ul",{key:0,class:"dss-datepicker__list",role:"listbox",ref_key:"listRef",ref:ee},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(rt.value,_=>(e.openBlock(),e.createElementBlock("li",{key:_.ts,role:"option","aria-selected":_.selected,class:e.normalizeClass(["dss-datepicker__list-item",{"dss-datepicker__list-item--selected":_.selected}]),onClick:ce=>Bt(_.date)},[e.createElementVNode("span",La,e.toDisplayString(_.label),1),_.selected?(e.openBlock(),e.createElementBlock("svg",Aa,[...O[15]||(O[15]=[e.createElementVNode("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"},null,-1)])])):e.createCommentVNode("",!0)],10,$a))),128))],512)):(e.openBlock(),e.createElementBlock("div",Ta,e.toDisplayString(e.unref(ue)("datepicker.noAvailableDates")),1))],64)):ve.value==="days"&&H.doubleCalendar&&Je.value?(e.openBlock(),e.createElementBlock("div",Da,[H.quickSelect?(e.openBlock(),e.createElementBlock("nav",Ha,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(We.value,_=>(e.openBlock(),e.createElementBlock("button",{key:_.id,type:"button",class:"dss-datepicker__quick-select-btn",disabled:!Al(_.id),onClick:ce=>on(_.id)},e.toDisplayString(e.unref(ue)(_.labelKey)),9,Ra))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Fa,[e.createElementVNode("div",Ia,[e.createElementVNode("div",za,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ue)("datepicker.prevMonth"),onClick:an}," ‹ ",8,Pa),e.createElementVNode("div",Oa,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:O[2]||(O[2]=_=>yt("left","months"))},e.toDisplayString(Tt.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:O[3]||(O[3]=_=>yt("left","years"))},e.toDisplayString(G.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ue)("datepicker.nextMonth"),onClick:Tl}," › ",8,qa)]),e.createElementVNode("div",Wa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(K.value,_=>(e.openBlock(),e.createElementBlock("span",{key:_,class:"dss-datepicker__weekday"},e.toDisplayString(_),1))),128))]),e.createElementVNode("div",Za,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ue.value,(_,ce)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"L-"+ce},[_?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",V(_)]),disabled:!C(_),onClick:$e=>sn(_),onMouseenter:$e=>Y(_),onMouseleave:le},e.toDisplayString(_.getDate()),43,Ua)):(e.openBlock(),e.createElementBlock("span",Xa))],64))),128))])]),e.createElementVNode("div",Ya,[e.createElementVNode("div",ja,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ue)("datepicker.prevMonth"),onClick:El}," ‹ ",8,Ka),e.createElementVNode("div",Ga,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:O[4]||(O[4]=_=>yt("right","months"))},e.toDisplayString(et.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:O[5]||(O[5]=_=>yt("right","years"))},e.toDisplayString(pe.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ue)("datepicker.nextMonth"),onClick:xn}," › ",8,Qa)]),e.createElementVNode("div",Ja,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(K.value,_=>(e.openBlock(),e.createElementBlock("span",{key:_,class:"dss-datepicker__weekday"},e.toDisplayString(_),1))),128))]),e.createElementVNode("div",es,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ke.value,(_,ce)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"R-"+ce},[_?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",V(_)]),disabled:!C(_),onClick:$e=>sn(_),onMouseenter:$e=>Y(_),onMouseleave:le},e.toDisplayString(_.getDate()),43,ts)):(e.openBlock(),e.createElementBlock("span",ls))],64))),128))])])])])):ve.value==="days"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",ns,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ue)("datepicker.prevMonth"),onClick:vn}," ‹ ",8,os),e.createElementVNode("div",as,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:O[6]||(O[6]=_=>ve.value="months")},e.toDisplayString(Xt.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:O[7]||(O[7]=_=>ve.value="years")},e.toDisplayString(we.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ue)("datepicker.nextMonth"),onClick:gn}," › ",8,ss)]),e.createElementVNode("div",rs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(K.value,_=>(e.openBlock(),e.createElementBlock("span",{key:_,class:"dss-datepicker__weekday"},e.toDisplayString(_),1))),128))]),e.createElementVNode("div",is,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Be.value,(_,ce)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:ce},[_?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",V(_)]),disabled:!C(_),onClick:$e=>sn(_),onMouseenter:$e=>Y(_),onMouseleave:le},e.toDisplayString(_.getDate()),43,cs)):(e.openBlock(),e.createElementBlock("span",us))],64))),128))])],64)):ve.value==="months"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("div",ds,[e.createElementVNode("div",ms,[e.createElementVNode("span",ps,e.toDisplayString(bt.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:O[8]||(O[8]=_=>ve.value="years")},e.toDisplayString(_e.value),1)])]),e.createElementVNode("div",fs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Gt.value,(_,ce)=>(e.openBlock(),e.createElementBlock("button",{key:ce,type:"button",class:e.normalizeClass(["dss-datepicker__month-cell",{"dss-datepicker__month-cell--selected":ce===He.value}]),onClick:$e=>Wt(ce)},e.toDisplayString(_),11,vs))),128))])],64)):ve.value==="years"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createElementVNode("div",gs,[e.createElementVNode("span",hs,e.toDisplayString(qt.value),1)]),e.createElementVNode("div",{class:"dss-datepicker__years-wrap",ref_key:"yearsWrapRef",ref:Ye},[e.createElementVNode("div",ys,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Lt.value,_=>(e.openBlock(),e.createElementBlock("button",{key:_,type:"button",class:e.normalizeClass(["dss-datepicker__year-cell",{"dss-datepicker__year-cell--selected":_===_e.value,"dss-datepicker__year-cell--current":_===e.unref(lt)}]),"data-year":_,onClick:ce=>dl(_)},e.toDisplayString(_),11,ks))),128))])],512)],64)):e.createCommentVNode("",!0)],6)])):e.createCommentVNode("",!0)]))],2))}},Cs=["data-chart-type"],bs={class:"dss-chart-header-titles"},ws={key:0,class:"dss-chart-title"},xs={key:1,class:"dss-chart-subtitle"},Es=["onClick","onMouseenter"],Ss={class:"dss-legend-text"},Vs=["onClick","onMouseenter"],Ns={class:"dss-legend-text"},Bs=["title"],Ms=["src"],_s={class:"dss-chart-area-wrapper"},$s={key:0,class:"dss-chart-z-axis-label"},Ls=["width","height","data-smooth","data-animated"],As=["id"],Ts=["y","width","height"],Ds=["id"],Hs=["d"],Rs=["id"],Fs=["d"],Is={key:0},zs=["clip-path"],Ps=["x1","x2","y1","y2"],Os={class:"dss-axes"},qs=["x1","x2","y1","y2"],Ws=["x1","x2","y1","y2"],Zs=["x1","x2","y1","y2"],Us={class:"dss-axis-labels"},Xs=["x","y"],Ys=["x","y"],js=["x","y"],Ks=["x","y"],Gs=["y","transform"],Qs=["x","y","transform"],Js={key:1,class:"dss-flag-markers"},er=["clip-path"],tr=["x1","x2","y1","y2","onMouseover"],lr=["x1","x2","y1","y2","onMouseover"],nr=["x1","x2","y1","y2","onMouseover"],or=["cx","cy","onMouseover"],ar=["cx","cy","fill","onMouseover"],sr=["x","y"],rr=["clip-path"],ir={key:0},cr=["d","onMouseover"],ur=["x","y","width","height","fill","onMouseover"],dr={class:"dss-line-chart"},mr=["d","stroke","stroke-width","stroke-dasharray"],pr=["d","stroke","stroke-width","opacity"],fr=["cx","cy","r","fill","onMouseover"],vr={key:1},gr=["d","stroke","stroke-width","stroke-dasharray"],hr=["d","stroke","stroke-width","stroke-dasharray"],yr=["d","stroke","stroke-width","opacity"],kr=["cx","cy","r","fill","onMouseover"],Cr={key:2},br=["id"],wr=["x","y","width","height"],xr=["d","fill","fill-opacity","mask"],Er=["d","stroke","stroke-width"],Sr=["d","fill","onMouseover"],Vr=["x","y","width","height","onMouseover"],Nr=["clip-path"],Br=["x1","x2","y1","y2","stroke"],Mr=["cx","cy","r","fill"],_r={key:1,class:"dss-bubble-chart"},$r={key:0,class:"dss-bubble-group"},Lr=["cx","cy","r","fill","fill-opacity","stroke","onMouseenter","onMouseleave","onClick"],Ar=["x","y","width","height","xlink:href","clip-path","onLoad","onError","onMouseenter","onMouseleave","onClick"],Tr=["transform"],Dr=["cx","cy","r"],Hr=["data-chart-type","clip-path"],Rr=["d","fill","fill-opacity","stroke","stroke-width","clip-path","onMouseover"],Fr={key:1,class:"dss-radial-segment-data-labels"},Ir=["x","y"],zr=["x","y","font-size","fill"],Pr=["x1","y1","x2","y2","stroke"],Or=["x1","y1","x2","y2","stroke"],qr=["x","y","text-anchor","font-size"],Wr=["transform"],Zr={key:0,class:"dss-spider-grid"},Ur=["cx","cy","r"],Xr={class:"dss-spider-grid-labels"},Yr=["x","y"],jr=["x","y"],Kr=["x1","x2","y1","y2"],Gr={class:"dss-spider-labels"},Qr=["x","y","text-anchor","dominant-baseline"],Jr=["points","fill","fill-opacity","stroke","stroke-width"],ei=["cx","cy","r","fill","onMouseover"],ti={class:"dss-chart-logos"},li=["cx","cy","r","fill"],ni=["x","y","width","height","xlink:href","onLoad","onError","clip-path"],oi=["onClick","onMouseenter"],ai=["src"],si={class:"dss-marker-tooltip-category"},ri={key:0,class:"dss-marker-tooltip-description"},ii={key:0,class:"dss-tooltip-section dss-spider-tooltip-section"},ci={class:"dss-tooltip-title dss-spider-tooltip-area-title"},ui={class:"dss-tooltip-series-name"},di={class:"dss-tooltip-series-value"},mi={key:1,class:"dss-tooltip-section"},pi={key:0,class:"dss-tooltip-title"},fi={class:"dss-bubble-tooltip-data"},vi={key:2,class:"dss-tooltip-section"},gi={class:"dss-tooltip-title"},hi={class:"dss-tooltip-value"},yi={key:0,class:"dss-tooltip-section"},ki={class:"dss-tooltip-section-title"},Ci={class:"dss-tooltip-group-header"},bi={class:"dss-tooltip-item-content"},wi={class:"dss-tooltip-item-text"},xi={key:1,class:"dss-tooltip-section"},Ei={class:"dss-tooltip-section-title"},Si={class:"dss-tooltip-item-content"},Vi={class:"dss-tooltip-item-title"},Ni={key:0,class:"dss-tooltip-item-description"},Bi={class:"dss-tooltip-section"},Mi={class:"dss-tooltip-title"},_i={key:0,class:"dss-bubble-tooltip-data"},$i={class:"dss-tooltip-series-name"},Li={class:"dss-tooltip-series-value"},Ai={key:0,class:"dss-tooltip-section"},Ti={class:"dss-tooltip-section-title"},Di={class:"dss-tooltip-group-header"},Hi={class:"dss-tooltip-item-content"},Ri={class:"dss-tooltip-item-text"},Fi={key:1,class:"dss-tooltip-section"},Ii={class:"dss-tooltip-section-title"},zi={class:"dss-tooltip-item-content"},Pi={class:"dss-tooltip-item-title"},Oi={key:0,class:"dss-tooltip-item-description"},qi=["onClick","onMouseenter"],Wi={class:"dss-legend-text"},Zi={key:1,class:"dss-context-menu-separator"},Ui={key:0,class:"dss-context-menu-separator"},Xi={key:0,class:"dss-context-menu-separator"},Yi=["onClick"],ji=["innerHTML"],Ki={key:0,class:"dss-context-menu-icon"},Gi={class:"dss-marker-modal-header"},Qi={class:"dss-marker-modal-body"},Ji={class:"dss-form-group"},ec={class:"dss-form-group"},tc={for:"dss-marker-description"},lc={key:0,class:"dss-form-text-display"},nc=["placeholder"],oc={class:"dss-marker-modal-footer"},ac={class:"modal-footer-left"},sc={class:"dss-modal-footer-right"},rc=["disabled"],ic={name:"DSSChart"},cc=Object.assign(ic,{props:{series:{type:Array,required:!0,default:()=>[]},categories:{type:Array,default:()=>[]},flags:{type:Array,default:()=>[]},markers:{type:Array,default:()=>[]},showAddMarkerButton:{type:Boolean,default:!0},chartId:{type:String,default:()=>"chart-"+Math.random().toString(36).substring(2,9)},i18n:{type:Object,default:null},locale:{type:String,default:null},options:{type:Object,default:()=>({}),validator:H=>typeof H=="object"&&H!==null},innerSize:{type:Number,default:null},old:{type:Boolean,default:!1}},emits:["add-marker","update-marker","delete-marker"],setup(H,{emit:ne}){const{t:M,locale:A}=lo.useI18n(),ue=ne,I=e.ref(null),$=e.ref(null),ve=e.ref(null),ct=e.ref(0),Q=e.ref(0);let f=null,we=null;const Ce=20,G=e.computed(()=>{if(Q.value,ct.value,!I.value||!$.value)return 0;try{const t=I.value.getBoundingClientRect();return $.value.getBoundingClientRect().top-t.top}catch{return 0}}),U=e.computed(()=>`chart-clip-${F.chartId}`),pe=e.computed(()=>`url(#${U.value})`),F=H,Ee={chart:{type:"line",width:800,height:400,orientation:"vertical"},title:{text:"",style:{}},subtitle:{text:"",style:{}},zAxis:"",xAxis:{title:{text:""},type:"category"},yAxis:{min:"auto",max:"auto",title:{text:""}},legend:{show:!0,position:"top",orientation:"horizontal"},radialLabels:{show:!1,pointerLength:25,horizontalLength:35,fontSize:14,color:"#000",textOffset:8},radialBar:{dataLabels:{show:!1,minAngleDegrees:20},dataCenter:{show:!1,fontSize:16}},miniRadial:{minVisiblePercent:1,trackColor:"#E5E7EB",thresholds:{low:33,medium:66},colors:{low:"#E53E3E",medium:"#ED8936",high:"#38A169"}},grid:{show:!0,style:{}},watermark:{enabled:!0,opacity:.05,size:35,position:"bottom-right"},colors:["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"],logos:[],stroke:{width:2,curve:"smooth"},bubbles:{size:4},markers:{show:!0,icon:null,iconSize:25,customIcons:{}},fill:{area:{opacity:.3},spider:{opacity:.15}},crosshair:{show:!1,color:"#666"},bubbles:{size:4,tooltip:{fields:["x","y","size"],labels:{x:"X",y:"Y",size:"Size",label:"Label",seriesName:"Series"},formatters:{}}},spider:{gridLabels:null,gridSteps:5},zoom:{enabled:!1,minScale:1,maxScale:2.5},smoothing:{enabled:!1,factor:.3,barRadius:4},animations:{enabled:!0,type:"draw",duration:2500,delay:0,staggerDelay:200,easing:"ease-out",onDataChange:!0,respectReducedMotion:!0},valueFormat:{extension:""},contextMenu:{enabled:!0,items:{addMarker:!0,downloadSvg:!0,downloadPng:!0,downloadCsv:!0},customItems:[]}};function De(t,a){const l=Object.assign({},t);return pt(t)&&pt(a)&&Object.keys(a).forEach(i=>{pt(a[i])?i in t?l[i]=De(t[i],a[i]):Object.assign(l,{[i]:a[i]}):Object.assign(l,{[i]:a[i]})}),l}const tt=()=>{let t=20,a=0,l=0;if(ut.value&&(t+=30),Ct.value&&(t+=25),K.value&&F.series.length>0){const i=F.series.filter((p,g)=>!at.value.has(g)).length;if(ye.value==="top"||ye.value==="bottom"){if(Be.value==="horizontal"){const g=Math.floor(xe.value/100);a=Math.ceil(i/g)*25+10}else a=i*25+10;t+=a}else l=150}return{height:t,legendHeight:a,legendWidth:l}};function pt(t){return t&&typeof t=="object"&&!Array.isArray(t)}const W=e.computed(()=>De(Ee,F.options)),Ze=e.computed(()=>{const t=W.value;return t&&t.chart&&t.chart.width==="auto"}),qe=e.computed(()=>{const t=W.value;return t&&t.chart&&t.chart.height==="auto"}),xe=e.computed(()=>{const t=W.value;return Ze.value?ct.value||800:t&&t.chart&&typeof t.chart.width=="number"?t.chart.width:800}),Me=e.ref(Ce),Ye=e.computed(()=>{if(qe.value){const t=Ye.value;return t??Math.max(0,(Q.value||400)-Me.value*5)}}),ee=e.computed(()=>{const t=W.value;if(be.value==="mini-radial")return xe.value;if(qe.value){const a=Ye.value;return a??Math.max(0,(Q.value||400)-Me.value)}return t&&t.chart&&typeof t.chart.height=="number"?t.chart.height:400}),lt=e.computed(()=>{if(qe.value&&be.value==="semi-radial"&&Ye.value!=null)return Me.value+ee.value+"px";if(qe.value)return"100%";if(Cl.value)return Me.value+ee.value+"px";if(K.value&&ye.value==="bottom"){const t=tt();return ee.value+(t.legendHeight||35)+"px"}return ee.value+(K.value?20:0)+"px"}),be=e.computed(()=>{const t=W.value;return t&&t.chart&&t.chart.type?t.chart.type:"line"}),Je=e.computed(()=>{const t=F.series.map(a=>a.type||be.value);return new Set(t).size>1}),ut=e.computed(()=>{const t=W.value;return t&&t.title&&t.title.text?t.title.text:""}),Ct=e.computed(()=>{const t=W.value;return t&&t.subtitle&&t.subtitle.text?t.subtitle.text:""}),Et=e.computed(()=>{const t=W.value;if(!t||!t.zAxis)return"";const a=t.zAxis;return typeof a=="string"?a:a&&typeof a.label=="string"?a.label:""}),Ht=e.computed(()=>{const t=W.value;return t&&t.xAxis&&t.xAxis.title&&t.xAxis.title.text?t.xAxis.title.text:""}),Pt=e.computed(()=>{const t=W.value;return t&&t.yAxis&&t.yAxis.title&&t.yAxis.title.text?t.yAxis.title.text:""}),se=e.computed(()=>{const t=W.value;return t&&t.yAxis&&t.yAxis.secondary&&typeof t.yAxis.secondary=="object"?t.yAxis.secondary:null}),ge=e.computed(()=>{const t=se.value;return t&&t.title&&t.title.text?t.title.text:""}),He=e.computed(()=>{const t=W.value;if(!t||!t.yAxis)return Vl;const a=t.yAxis.min;return typeof a=="number"||a===Vl?a:Vl}),_e=e.computed(()=>{const t=W.value;if(!t||!t.yAxis)return Vl;const a=t.yAxis.max;return typeof a=="number"||a===Vl?a:Vl}),Xt=e.computed(()=>{const t=se.value;if(!t)return Vl;const a=t.min;return typeof a=="number"||a===Vl?a:Vl}),bt=e.computed(()=>{const t=se.value;if(!t)return Vl;const a=t.max;return typeof a=="number"||a===Vl?a:Vl}),Gt=e.computed(()=>{const t=W.value;return!t||!t.xAxis?null:typeof t.xAxis.min=="number"?t.xAxis.min:null}),Lt=e.computed(()=>{const t=W.value;return!t||!t.xAxis?null:typeof t.xAxis.max=="number"?t.xAxis.max:null}),qt=e.computed(()=>{const t=W.value;return t&&t.grid&&t.grid.show!==!1}),K=e.computed(()=>{const t=W.value;return t&&t.legend&&t.legend.show!==!1}),ye=e.computed(()=>{const t=W.value;return t&&t.legend&&t.legend.position?t.legend.position:"top"}),Be=e.computed(()=>{const t=W.value;return t&&t.legend&&t.legend.orientation?t.legend.orientation:"horizontal"}),Ue=e.computed(()=>{const t=W.value;return!t||!t.tooltip?!0:t.tooltip.enabled!==!1}),Ke=e.computed(()=>{const t=W.value;if(!t||!t.crosshair)return!1;const a=t.crosshair.show;return a===!0||a==="true"}),Tt=e.computed(()=>{const t=W.value;return t&&t.crosshair&&t.crosshair.color?t.crosshair.color:"#666"}),et=e.computed(()=>{const t=W.value;return!t||!t.zoom?!1:t.zoom.enabled===!0}),Ot=e.computed(()=>{const t=W.value;return t&&t.zoom&&typeof t.zoom.minScale=="number"?t.zoom.minScale:1}),We=e.computed(()=>{const t=W.value;return t&&t.zoom&&typeof t.zoom.maxScale=="number"?t.zoom.maxScale:2.5}),Fe=e.computed(()=>{const t=W.value;return t&&t.stroke&&typeof t.stroke.width=="number"?t.stroke.width:2}),xt=e.computed(()=>{if(!Cl.value)return 0;const t=W.value;return t&&t.stroke&&typeof t.stroke.width=="number"?t.stroke.width:0}),ft=e.computed(()=>{const t=W.value;return t&&t.bubbles&&typeof t.bubbles.size=="number"?t.bubbles.size:4}),J=e.computed(()=>{const{maxX:t}=Ut.value;return t===0}),Z=(t,a)=>J.value&&a===0?5:a,X=t=>{const a=Number(t);return!Number.isFinite(a)||a<=0?0:a},re=e.computed(()=>{const t=W.value;return t&&t.fill&&t.fill.area&&typeof t.fill.area.opacity=="number"?t.fill.area.opacity:.3}),fe=e.computed(()=>{const t=W.value;return t&&t.smoothing&&t.smoothing.enabled===!0}),Ge=e.computed(()=>{const t=W.value;return t&&t.smoothing&&typeof t.smoothing.factor=="number"?t.smoothing.factor:.3}),Nt=e.computed(()=>{const t=W.value;return fe.value?t&&t.smoothing&&typeof t.smoothing.barRadius=="number"?t.smoothing.barRadius:4:0}),rl=e.computed(()=>{const t=W.value,a=t&&t.colors&&Array.isArray(t.colors)?t.colors:[];return a.length>0?a:["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"]}),St=e.computed(()=>{const t=W.value;return t&&t.animations&&t.animations.enabled!==!1}),ll=e.computed(()=>{const t=W.value;return t&&t.animations&&t.animations.type?t.animations.type:"draw"}),S=e.computed(()=>{const t=W.value;return t&&t.animations&&typeof t.animations.duration=="number"?t.animations.duration:2500}),C=e.computed(()=>{const t=W.value;return t&&t.animations&&typeof t.animations.delay=="number"?t.animations.delay:0}),V=e.computed(()=>{const t=W.value;return t&&t.animations&&t.animations.easing?t.animations.easing:"ease-out"}),Y=e.computed(()=>{const t=W.value;return t&&t.animations&&typeof t.animations.staggerDelay=="number"?t.animations.staggerDelay:200}),le=e.computed(()=>{const t=W.value;return t&&t.animations&&t.animations.onDataChange!==!1}),ze=e.computed(()=>{const t=W.value;return t&&t.animations&&t.animations.respectReducedMotion!==!1}),gt=e.computed(()=>{const t=W.value;return t&&t.fill&&t.fill.spider&&typeof t.fill.spider.opacity=="number"?t.fill.spider.opacity:.15}),rt=e.computed(()=>W.value?.spider?.gridSteps||5),Oe=e.computed(()=>{const t=[],a=rt.value;for(let l=1;l<=a;l++)t.push(it.value/a*l);return t}),Bt=t=>{const a=Vt.value;if(a&&Array.isArray(a)&&a[t]!==void 0)return a[t].toString();const l=Oe.value[t];return Math.round(l/it.value*100)+"%"},Vt=e.computed(()=>W.value?.spider?.gridLabels||null),ht=e.computed(()=>{const t=W.value;return t&&t.contextMenu&&t.contextMenu.enabled===!0}),yt=e.computed(()=>{const t=W.value,a={addMarker:!0,downloadSvg:!0,downloadPng:!0,downloadCsv:!0};return t&&t.contextMenu&&t.contextMenu.items?{...a,...t.contextMenu.items}:a}),Mt=e.computed(()=>{const t=W.value;return t&&t.contextMenu&&Array.isArray(t.contextMenu.customItems)?t.contextMenu.customItems:[]}),_t=e.computed(()=>{const t=W.value;return t&&t.markers&&t.markers.icon?t.markers.icon:Ql.value}),hl=e.computed(()=>{const t=W.value;return t&&t.markers&&t.markers.customIcons?t.markers.customIcons:{}}),Al=e.computed(()=>{const t=W.value;return t&&t.markers&&typeof t.markers.iconSize=="number"?t.markers.iconSize:20}),on=e.computed(()=>{const a=W.value?.valueFormat?.extension;return typeof a=="string"?a:""}),Wt=t=>{const a=on.value;if(t==null)return"";const l=String(t);return a?l+a:l},dl=e.computed(()=>!oe.value.isZooming);e.computed(()=>Yt.value.map(t=>{if(t.categoryIndex!==void 0&&(Sl.value||jt.value)){const a=Kt(t.categoryIndex),l=G.value+z.value.bottom-Al.value/2;return{...t,x:a,y:l}}return t}));function vn(t,a){let l;if(t instanceof Date)l=new Date(t.getFullYear(),t.getMonth(),t.getDate());else if(typeof t=="string"){const[g,b,w]=t.split("-"),P=Number(w?.length===2?`20${w}`:w);l=new Date(P,Number(b)-1,Number(g))}else return 0;let i=0,p=1/0;return a.forEach((g,b)=>{const[w,P,N]=g.split("-"),T=Number(N?.length===2?`20${N}`:N),B=new Date(T,Number(P)-1,Number(w)),te=Math.abs(B-l);te<p&&(p=te,i=b)}),i}const gn=e.computed(()=>{const t=F.markers.map(l=>{const i=vn(l.marker_date,F.categories),p=Kt(i),g=G.value+z.value.bottom-Al.value/2;return{...l,x:p,y:g,categoryIndex:i,source:"props"}}),a=Yt.value.map(l=>{if(l.categoryIndex!==void 0&&(Sl.value||jt.value)){const i=Kt(l.categoryIndex),p=G.value+z.value.bottom-Al.value/2;return{...l,x:i,y:p,source:"internal"}}return{...l,source:"internal"}});return[...t,...a]}),an=e.computed(()=>{const t=W.value;return t&&t.watermark&&t.watermark.enabled===!0}),Tl=e.computed(()=>{const t=W.value;return t&&t.watermark&&typeof t.watermark.opacity=="number"?t.watermark.opacity:.05}),El=e.computed(()=>{const t=W.value;return t&&t.watermark&&t.watermark.size?t.watermark.size:35}),xn=e.computed(()=>{const t=W.value;return t&&t.watermark&&t.watermark.position?t.watermark.position:"bottom-right"}),sn=e.computed(()=>{const t={left:z.value.left,top:z.value.top,width:z.value.width,height:z.value.height};let a,l;const i=String(El.value);if(i.includes("%")){const p=parseFloat(i)/100;a=t.width*p,l=a*(96/499)}else{const p=parseFloat(i)||25;a=Math.min(t.width*.25,200)*(p/25),l=a*(96/499)}return{width:a,height:l,area:t}}),Fl=e.computed(()=>{const{width:t,height:a}=sn.value,l=xn.value;let i,p;const g=z.value.left,b=z.value.right,w=z.value.top,P=z.value.bottom,N=z.value.width,T=z.value.height;switch(l){case"center":i=g+(N-t)/2,p=w+(T-a)/2;break;case"top-left":i=g+15,p=w+5;break;case"top-right":i=b-t-15,p=w+5;break;case"bottom-left":i=g+15,p=P-a-5;break;case"bottom-right":default:i=b-t-15,p=P-a-5;break}return{backgroundPositionX:i+"px",backgroundPositionY:p+"px",backgroundSize:`${t}px ${a}px`}}),Gl=t=>!F.flags||!F.flags.length?[]:F.flags.filter(a=>a.categoryIndex===t),yl=t=>{const a=Gl(t),l=yn(t),i=a.filter(b=>b.manual),p=a.filter(b=>!b.manual),g=[];return i.length>0&&g.push({type:M("chart.tooltip.manualFlags"),color:"#698dbe",flags:i.map(b=>({text:b.text,color:"#698dbe"}))}),p.length>0&&g.push({type:M("chart.tooltip.autoFlags"),color:"#a1d499",flags:p.map(b=>({text:b.text,color:"#a1d499"}))}),{flagGroups:g,markers:l.map(b=>({title:b.title,description:b.description,type:M("chart.tooltip.markers"),color:b.color||"#9784ba"}))}},Ql=e.computed(()=>{const t=F.old?`<svg width="55" height="56" viewBox="0 0 55 56" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<path d="M55 51.841V4.14647C55 1.86149 53.1797 0.00915527 50.9343 0.00915527L4.06568 0.00915527C1.82027 0.00915527 0 1.86149 0 4.14647V51.841C0 54.126 1.82027 55.9783 4.06568 55.9783H50.9343C53.1797 55.9783 55 54.126 55 51.841Z" fill="#020203"/>
|
|
3
3
|
<path d="M27.7145 10.8883H16.9591C12.7639 10.8883 9.3623 14.3498 9.3623 18.619C9.3623 22.8882 12.7639 26.3497 16.9591 26.3497H27.8036C28.3624 26.3497 28.816 25.8881 28.816 25.3112L28.7188 11.9103C28.7188 11.3416 28.2653 10.8883 27.7064 10.8883H27.7145Z" fill="#FFC230"/>
|
|
4
4
|
<path d="M38.6799 25.649C42.5176 25.649 45.6288 22.483 45.6288 18.5776C45.6288 14.6722 42.5176 11.5063 38.6799 11.5063C34.8421 11.5063 31.731 14.6722 31.731 18.5776C31.731 22.483 34.8421 25.649 38.6799 25.649Z" fill="white"/>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<rect width="57" height="57" fill="white"/>
|
|
16
16
|
</clipPath>
|
|
17
17
|
</defs>
|
|
18
|
-
</svg>`;return`data:image/svg+xml;base64,${btoa(t)}`}),
|
|
18
|
+
</svg>`;return`data:image/svg+xml;base64,${btoa(t)}`}),D=e.computed(()=>{const t=F.old?`<svg width="499" height="96" viewBox="0 0 499 96" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
19
19
|
<path d="M171.52 37.8399H160.38C160.26 36.4799 160.02 35.0599 159.68 33.5699C159.34 32.0799 158.77 30.7399 157.96 29.5299C157.16 28.3199 156 27.3199 154.48 26.5099C152.96 25.7099 150.94 25.2999 148.4 25.2999C144.69 25.2999 141.93 26.1299 140.14 27.8099C138.34 29.4799 137.45 31.5499 137.45 34.0299C137.45 37.7999 139.29 40.0799 142.97 40.8499C146.65 41.6299 150.67 42.3799 155.03 43.1199C159.39 43.8599 163.41 45.3899 167.09 47.7099C170.77 50.0299 172.61 54.6199 172.61 61.4899C172.61 64.6499 172.02 67.5099 170.85 70.0699C169.67 72.6399 168.02 74.7899 165.89 76.5199C163.76 78.2499 161.19 79.5799 158.19 80.5099C155.19 81.4399 151.93 81.8999 148.4 81.8999C143.95 81.8999 140.12 81.2699 136.94 79.9999C133.75 78.7299 131.19 77.0799 129.24 75.0399C127.29 72.9999 125.93 70.6899 125.16 68.1299C124.39 65.5599 124.19 62.9499 124.56 60.2899H136.25C136.37 62.0799 136.58 63.7899 136.85 65.3899C137.13 66.9999 137.68 68.4099 138.52 69.6099C139.35 70.8199 140.58 71.7799 142.19 72.4899C143.8 73.1999 145.99 73.5599 148.78 73.5599C153.3 73.5599 156.47 72.6199 158.29 70.7299C160.11 68.8399 161.03 66.6899 161.03 64.2799C161.03 60.2599 159.19 57.7799 155.51 56.8599C151.83 55.9299 147.79 55.0499 143.4 54.2099C139.01 53.3799 134.97 51.7699 131.29 49.3799C127.61 46.9999 125.77 42.3699 125.77 35.5099C125.77 32.8499 126.3 30.3899 127.35 28.1299C128.4 25.8699 129.9 23.9199 131.85 22.2799C133.8 20.6399 136.16 19.3399 138.95 18.3799C141.73 17.4199 144.8 16.9399 148.14 16.9399C152.41 16.9399 156.07 17.4699 159.14 18.5199C162.2 19.5699 164.69 21.0299 166.61 22.8799C168.53 24.7399 169.89 26.9499 170.69 29.5199C171.49 32.0899 171.77 34.8599 171.52 37.8199V37.8399Z" fill="#020203"/>
|
|
20
20
|
<path d="M179.04 58.1699C179.04 55.0799 179.55 52.0499 180.57 49.0699C181.59 46.0999 183.04 43.4899 184.93 41.2299C186.82 38.9699 189.09 37.1499 191.75 35.7499C194.41 34.3599 197.35 33.6599 200.57 33.6599C207 33.6599 212.15 35.9299 216.02 40.4799C219.89 45.0299 221.97 51.5999 222.28 60.1999H189.34C189.77 64.2199 191.09 67.1499 193.28 68.9699C195.48 70.7999 198.12 71.7099 201.21 71.7099C203 71.7099 204.5 71.4599 205.71 70.9699C206.92 70.4799 207.91 69.8899 208.68 69.2099C209.45 68.5299 210.06 67.8199 210.49 67.0799C210.92 66.3399 211.26 65.7199 211.51 65.2199H221.72C221.6 66.7699 221.1 68.5099 220.24 70.4599C219.37 72.4099 218.14 74.2299 216.53 75.9399C214.92 77.6399 212.85 79.0599 210.31 80.2099C207.77 81.3499 204.77 81.9299 201.31 81.9299C197.85 81.9299 194.91 81.2799 192.12 79.9799C189.34 78.6799 186.98 76.9499 185.07 74.7799C183.15 72.6099 181.67 70.0899 180.61 67.2199C179.56 64.3399 179.03 61.3299 179.03 58.1699H179.04ZM200.94 42.0199C198.47 42.0199 196.24 42.7299 194.26 44.1499C192.28 45.5699 190.89 47.8299 190.08 50.9199H211.33C211.02 48.0799 209.95 45.8799 208.13 44.3299C206.3 42.7899 203.91 42.0099 200.94 42.0099V42.0199Z" fill="#020203"/>
|
|
21
21
|
<path d="M268.59 80.9999H258.01V50.3799C258.01 48.2099 257.3 46.5099 255.88 45.2799C254.46 44.0399 252.6 43.4199 250.31 43.4199C248.45 43.4199 246.94 43.8399 245.76 44.6699C244.58 45.4999 243.67 46.5399 243.02 47.7799C242.37 49.0199 241.94 50.3799 241.72 51.8599C241.5 53.3399 241.4 54.7099 241.4 55.9399V80.9999H230.82V34.5999H241.03V38.3099C241.83 37.6899 243.27 36.7599 245.34 35.5199C247.41 34.2799 250.3 33.6599 254.02 33.6599C256.68 33.6599 259.12 34.1599 261.35 35.1399C263.58 36.1299 265.31 37.6799 266.55 39.7799C267.04 39.2899 267.71 38.6799 268.55 37.9699C269.38 37.2599 270.41 36.5799 271.61 35.9299C272.82 35.2799 274.22 34.7399 275.83 34.3099C277.44 33.8799 279.23 33.6599 281.21 33.6599C285.23 33.6599 288.67 34.8099 291.51 37.0899C294.36 39.3799 295.78 43.0599 295.78 48.1299V80.9799H285.2V50.3599C285.2 48.1899 284.49 46.4899 283.07 45.2599C281.65 44.0199 279.79 43.3999 277.5 43.3999C275.64 43.3999 274.13 43.8199 272.95 44.6499C271.77 45.4799 270.86 46.5199 270.21 47.7599C269.56 48.9999 269.13 50.3599 268.91 51.8399C268.69 53.3199 268.59 54.6899 268.59 55.9199V80.9799V80.9999Z" fill="#020203"/>
|
|
@@ -41,23 +41,23 @@
|
|
|
41
41
|
<rect width="45" height="45" fill="white" transform="translate(0 1)"/>
|
|
42
42
|
</clipPath>
|
|
43
43
|
</defs>
|
|
44
|
-
</svg>`;return`data:image/svg+xml;base64,${btoa(t)}`}),
|
|
45
|
-
`)}})}),yn=e.ref({show:!1,x:0,y:0,content:"",count:0}),Qt=e.computed(()=>Z.value?.bubbles?.tooltip?.fields||["x","y","size","label"]),an=e.computed(()=>{const t=Z.value;return{...{x:"X",y:"Y",size:"Size",label:"Label",seriesName:"Series"},...t?.bubbles?.tooltip?.labels||{}}}),al=e.computed(()=>Z.value?.bubbles?.tooltip?.formatters||{}),at=e.ref(new Set),ce=e.ref(null),pl=e.ref(!1),ht=e.ref({show:!1,x:0,y:0,title:"",value:"",bubbleData:[],spiderAreas:[]}),pn=e.ref({show:!1,x:0,y:0,categoryValue:"",description:""}),st=e.ref({show:!1,x:0,categoryIndex:-1,data:[]}),gt=e.ref({show:!1,x:0,y:0,mouseDataX:0,mouseDataY:0,categoryIndex:-1,chartX:0,chartY:0}),ae=e.ref({scale:1,offsetX:0,minScale:1,maxScale:2.5,isDragging:!1,lastMouseX:0,lastMouseY:0,isZooming:!1,zoomTimeout:null}),Yt=e.ref([]),$e=e.ref({show:!1,title:"",description:"",color:"#FF6B6B",type:"default",editingMarkerId:null,readonly:!1,categoryIndex:null,fromButton:!1,date:null});e.computed(()=>{const t=["default"];return bn.value&&t.push(...Object.keys(bn.value)),t}),e.computed(()=>{if(!R.categories||R.categories.length===0){const{maxX:t}=Xt.value;return Array.from({length:t+1},(a,n)=>M("chart.fallback.item",{number:n+1}))}return R.categories});const so=e.computed(()=>{if(!R.categories||R.categories.length===0)return null;const t=R.categories[0],[a,n,i]=String(t).split("-"),p=Number(i?.length===2?`20${i}`:i),g=Number(a),C=Number(n)-1;return!g||!n||!p?null:new Date(p,C,g)}),sn=e.computed(()=>{if(!R.categories||R.categories.length===0)return null;const t=R.categories[R.categories.length-1],[a,n,i]=String(t).split("-"),p=Number(i?.length===2?`20${i}`:i),g=Number(a),C=Number(n)-1;return!g||!n||!p?null:new Date(p,C,g)}),Bn=e.computed(()=>$e.value.editingMarkerId!==null),tn=e.computed(()=>$e.value.readonly),In=t=>{at.value.has(t)||(Go.value=!0,ce.value=t)},cn=()=>{Go.value=!1,ce.value=null},zn=t=>{if(Co.value||Ro.value){st.value.show=!1;return}const n=t.currentTarget.getBoundingClientRect(),i=t.clientX-n.left,p=t.clientY-n.top,g=jt.value?i>=F.value.left-50&&i<=F.value.right+50&&p>=F.value.top-50&&p<=F.value.bottom+100:i>=F.value.left&&i<=F.value.right&&p>=F.value.top&&p<=F.value.bottom;if(pl.value=g,jt.value){if(!Ke.value||!g||ae.value.isDragging||ae.value.isZooming){st.value.show=!1;return}if(j.value.find(ue=>!ue||ue.isHidden?!1:Math.sqrt(Math.pow(ue.x-i,2)+Math.pow(ue.y-p,2))<=ue.radius+3))st.value.show=!1;else{const ue=j.value.filter(ke=>!ke||ke.isHidden?!1:Math.sqrt(Math.pow(ke.x-i,2)+Math.pow(ke.y-p,2))<=250);if(ue.length>0){let ke=ue[0],Ne=Math.sqrt(Math.pow(ke.x-i,2)+Math.pow(ke.y-p,2));ue.forEach(Ze=>{const Le=Math.sqrt(Math.pow(Ze.x-i,2)+Math.pow(Ze.y-p,2));Le<Ne&&(Ne=Le,ke=Ze)});const ge=30,Qe=j.value.filter(Ze=>!Ze||Ze.isHidden?!1:Math.abs(Ze.x-ke.x)<=ge).sort((Ze,Le)=>Ze.y-Le.y);st.value={show:!0,x:ke.x,categoryIndex:Math.round(ke.originalX),data:(()=>{const Ze=Qt.value,Le=an.value,_e=[];return Qe.forEach(Re=>{Ze.forEach(_t=>{const zt=Le[_t]||_t,Kn=ul(_t,Re);Kn&&_e.push({seriesName:Re.seriesName,label:Re.label,value:`${zt}: ${Kn}`,color:Re.color,y:Re.y})})}),_e})()}}else st.value.show=!1}return}if(ae.value.isDragging&&ae.value.scale>1&&Sn.value&&Ge.value){st.value.show=!1;const Ye=t.clientX-ae.value.lastMouseX,{minX:ue,maxX:ke}=Xt.value,Ne=ke-ue||1,Qe=Ye*.8;ae.value.offsetX+=Qe;const Ze=Ne/ae.value.scale,Le=Ne-Ze,_e=0,Re=-Le/Ne*F.value.width,_t=_e;ae.value.offsetX=Math.max(Re,Math.min(_t,ae.value.offsetX)),ae.value.lastMouseX=t.clientX,ae.value.lastMouseY=t.clientY;return}if(!Ke.value||!Sn.value||ae.value.isDragging||ae.value.isZooming||!g){st.value.show=!1;return}const{minX:C,maxX:w}=Xt.value,z=w-C||1,N=z/ae.value.scale,$=C-ae.value.offsetX/F.value.width*z,B=(i-F.value.left)/F.value.width,te=$+B*N,Se=Math.round(te);if(Se>=0&&Se<=w){const Ye=Kt(Se),ue=nl.value.map((ke,Ne)=>{const ge=R.series.findIndex(Ze=>Ze===ke),Qe=ke.data[Se];return{seriesName:ke.name,value:Qe!==void 0?Qe:null,color:c(ge),y:Qe!==void 0?xn(ke,Qe):null}}).filter(ke=>ke.value!==null);st.value={show:!0,x:Ye,categoryIndex:Se,data:ue}}},Dl=()=>{st.value.show=!1,pl.value=!1,Ro.value=!1,Co.value||(yn.value.show=!1),ae.value.isDragging&&(ae.value.isDragging=!1),ae.value.zoomTimeout&&(clearTimeout(ae.value.zoomTimeout),ae.value.zoomTimeout=null),ae.value.isZooming=!1,setTimeout(()=>{ce.value=null,ht.value.show=!1},150)},Nl=t=>{if(t.preventDefault(),t.stopPropagation(),!wt.value)return;const a=t.currentTarget.getBoundingClientRect(),n=t.clientX-a.left,i=t.clientY-a.top;if(kn.value){gt.value.show=!1,e.nextTick(()=>{gt.value.show=!0,gt.value.x=t.clientX,gt.value.y=t.clientY,gt.value.categoryIndex=null});return}const p=Math.max(0,F.value.left-20),g=F.value.right,C=F.value.top,w=F.value.bottom+80;n>=p&&n<=g&&i>=C&&i<=w&&(gt.value.show=!1,e.nextTick(()=>{gt.value.show=!0,gt.value.x=t.clientX,gt.value.y=t.clientY,gt.value.categoryIndex=null;const z=Math.max(F.value.left,Math.min(n,F.value.right))-F.value.left,$=F.value.width/o.value.length,B=Math.floor(z/$);B>=0&&B<o.value.length&&(gt.value.categoryIndex=B)}))},Zn=t=>{if(!(t&&t.button===2)){if(gt.value.show&&t&&t.type==="click"){const a=document.querySelector(".dss-context-menu");if(a&&a.contains(t.target))return}gt.value.show=!1}},fn=t=>{if(typeof t.template=="function"){const a={series:R.series,categories:R.categories,markers:Yt.value},n={chartX:gt.value.chartX,chartY:gt.value.chartY,dataX:gt.value.mouseDataX,dataY:gt.value.mouseDataY,categoryIndex:gt.value.categoryIndex};return t.template(a,n)}return t.template||t.label||""},Zl=t=>{const a=["dss-context-menu-item"];return t.cssClass&&a.push(t.cssClass),a},Ul=t=>t.style||{},sl=t=>t.type&&bn.value[t.type]?bn.value[t.type]:t.customIcon?t.customIcon:Bt.value,Hl=t=>t==null?"":R.categories&&R.categories[t]?R.categories[t]:"",fl=t=>Yt.value.length?Yt.value.filter(a=>a.categoryIndex===t):[],Mn=t=>{if(!Sn.value&&!jt.value)return{x:0,y:0};const a=Kt(t),n=G.value+F.value.bottom-Tn.value/2;return{x:a,y:n}},Rl=()=>{Yt.value.forEach(t=>{if(t.categoryIndex!==void 0&&(Sn.value||jt.value)){const a=Mn(t.categoryIndex);t.x=a.x,t.y=a.y}})},vl=()=>{if($e.value.description&&$e.value.description.length&&$e.value.date){if(Bn.value){const t=Yt.value.findIndex(a=>a.id===$e.value.editingMarkerId);t!==-1?(Yt.value[t].description=$e.value.description||"",Yt.value[t].color=$e.value.color||"",Yt.value[t].type=$e.value.type||"default",de("update-marker",Yt.value[t])):de("update-marker",{id:$e.value.editingMarkerId,description:$e.value.description||"",color:$e.value.color||"",type:$e.value.type||"default"})}else{const t="dss-marker-"+Date.now()+"-"+Math.random().toString(36).substring(2,9);let a=On($e.value.date,R.categories||[]);if(jt.value){const{maxX:C}=Xt.value;a=Math.max(0,Math.min(a,Math.floor(C)))}else Sn.value&&(a=Math.max(0,Math.min(a,Xt.value.maxX)));const n=Kt(a),i=G.value+F.value.bottom-Tn.value/2,p=Array.isArray(R.categories)?R.categories[a]:null,g={id:t,title:"",description:$e.value.description||"",color:$e.value.color||"",type:$e.value.type||"default",categoryIndex:a,x:n,y:i,marker_date:p||null};$e.value.categoryIndex=a,Yt.value.push(g),de("add-marker",g)}$t(),h()}},$t=()=>{$e.value.show=!1,$e.value.title="",$e.value.description="",$e.value.color="#FF6B6B",$e.value.type="default",$e.value.editingMarkerId=null,$e.value.readonly=!1,$e.value.categoryIndex=null,$e.value.fromButton=!1,$e.value.date=null},Un=()=>{Bn.value&&(rl($e.value.editingMarkerId),$t())},rl=t=>{const a=Yt.value.findIndex(n=>n.id===t);a!==-1&&(Yt.value.splice(a,1),h()),de("delete-marker",t)},y=t=>{if($e.value.show=!0,$e.value.title=t?.title??t?.comment??"",$e.value.description=t?.description??t?.comment??"",$e.value.color=t?.color??"",$e.value.type=t?.type??"default",$e.value.editingMarkerId=t?.id??t?.marker_id??null,$e.value.readonly=t?.readonly??!1,$e.value.categoryIndex=t?.categoryIndex??null,t?.marker_date){const[a,n,i]=String(t.marker_date).split("-"),p=Number(i?.length===2?`20${i}`:i),g=Number(a),C=Number(n)-1;g&&n&&p?$e.value.date=new Date(p,C,g):$e.value.date=null}else $e.value.date=null},h=()=>{try{const t=`dss-chart-markers-${R.chartId}`;localStorage.setItem(t,JSON.stringify(Yt.value))}catch(t){console.warn("Could not save markers to localStorage:",t)}},x=()=>{try{const t=`dss-chart-markers-${R.chartId}`,a=localStorage.getItem(t);if(a){const n=JSON.parse(a);Array.isArray(n)&&(Yt.value=n.map(i=>({...i,originalYOffset:i.originalYOffset!==void 0?i.originalYOffset:15})))}}catch(t){console.warn("Could not load markers from localStorage:",t),Yt.value=[]}},q=t=>{const a=ot.value||"Chart",n=new Date().toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}).replace(/\//g,"-");return`${a.replace(/[^a-zA-Z0-9\s]/g,"").replace(/\s+/g,"-").substring(0,50).replace(/^-|-$/g,"")||"Chart"}-${n}.${t}`},re=()=>{const t=st.value.show,a=ht.value.show;return st.value.show=!1,ht.value.show=!1,{originalCrosshair:t,originalTooltip:a}},pt=t=>{st.value.show=t.originalCrosshair,ht.value.show=t.originalTooltip},Ht=async(t,a=32,n=32)=>new Promise((i,p)=>{if(t.startsWith("data:")){i(t);return}const g=new Image;g.crossOrigin="anonymous";const C=setTimeout(()=>{console.warn("Image conversion timeout for:",t),i(t)},5e3);g.onload=()=>{clearTimeout(C);try{const w=document.createElement("canvas"),z=w.getContext("2d");w.width=a,w.height=n,z.fillStyle="#fafafa",z.fillRect(0,0,a,n),z.drawImage(g,0,0,a,n);const N=w.toDataURL("image/png");i(N)}catch(w){console.warn("Canvas conversion failed:",w),i(t)}},g.onerror=w=>{clearTimeout(C),console.warn("Failed to load image:",t,w),i(t)},g.src=t}),_n=async()=>{try{const t=re();setTimeout(async()=>{try{const a=T.value;if(!a){console.error("Chart SVG element not found"),pt(t);return}const n=nt(),i=Ee.value,p=Q.value+n.height,g=a.cloneNode(!0);g.querySelectorAll(".dss-flag-markers, .dss-flag-line, .dss-flag-extension-line, .dss-flag-count-indicator, .dss-flag-count-text").forEach(ge=>ge.remove());const w=g.querySelectorAll("image"),z=Array.from(w).map(async ge=>{const Qe=ge.getAttribute("xlink:href")||ge.getAttribute("href");if(Qe&&!Qe.startsWith("data:"))try{const Ze=await Ht(Qe,32,32);ge.setAttribute("xlink:href",Ze),ge.setAttribute("href",Ze)}catch(Ze){console.warn("Failed to convert logo to base64:",Ze)}});await Promise.all(z);const $=new XMLSerializer().serializeToString(g).replace(/<svg[^>]*>/,"").replace("</svg>","");let B="",te=30;if(ot.value&&(B+=`
|
|
44
|
+
</svg>`;return`data:image/svg+xml;base64,${btoa(t)}`}),O=e.computed(()=>{const t=W.value;return t&&t.radialLabels&&t.radialLabels.show===!0}),_=e.computed(()=>{const t=W.value;return t&&t.radialLabels&&typeof t.radialLabels.fontSize=="number"?t.radialLabels.fontSize:12});e.computed(()=>{const t=W.value;return t&&t.radialLabels&&t.radialLabels.color?t.radialLabels.color:"#000"});const ce=e.computed(()=>{const t=W.value;return t&&t.radialLabels&&typeof t.radialLabels.pointerLength=="number"?t.radialLabels.pointerLength:25}),$e=e.computed(()=>{const t=W.value;return t&&t.radialLabels&&typeof t.radialLabels.horizontalLength=="number"?t.radialLabels.horizontalLength:40}),dt=e.computed(()=>{const t=W.value;return t&&t.radialLabels&&typeof t.radialLabels.textOffset=="number"?t.radialLabels.textOffset:8}),Qe=e.computed(()=>{const a=W.value?.radialBar?.dataLabels;return a&&(a.show===!0||a.enabled===!0)}),ot=e.computed(()=>{const a=W.value?.radialBar?.dataLabels?.minAngleDegrees;return typeof a=="number"&&a>=0?a:20}),Dt=e.computed(()=>{const a=W.value?.radialBar?.dataCenter;return On.value?!0:Pl.value&&a&&(a.show===!0||a.enabled===!0)}),nl=e.computed(()=>{if(!Dt.value||!nt.value.length)return"";if(On.value){const i=nt.value[1]??nt.value[0];return Wt(i?.value??0)}const l=W.value?.radialBar?.dataCenter?.showValueOnly===!0?nt.value[0]?.value??0:nt.value.reduce((i,p)=>i+(p.value??0),0);return Wt(l)}),Dl=e.computed(()=>{const a=W.value?.radialBar?.dataCenter?.fontSize;return typeof a=="number"&&a>0?a:24}),Nl=e.computed(()=>({x:Ft.value,y:On.value?wt.value:wt.value-Dl.value/2})),Ol=e.computed(()=>{const a=W.value?.radialBar?.dataCenter?.color;return typeof a=="string"&&a?a:"#333"}),$n=e.computed(()=>{if(!Qe.value||!Cl.value||!nt.value.length)return[];const t=ot.value*Math.PI/180,a=(Zt.value+it.value)/2;return nt.value.map(l=>{const p=l.endAngle-l.startAngle>=t&&!l.isHidden,g=Ft.value+Math.cos(l.midAngle)*a,b=wt.value+Math.sin(l.midAngle)*a;return{value:Wt(l.value),x:g,y:b,show:p,color:l.color,contrastColor:d(l.color)}})}),Jl=e.computed(()=>{if(!F.flags||!F.flags.length)return[];const t=new Map;return F.flags.forEach(a=>{const l=a.categoryIndex;t.has(l)||t.set(l,[]),t.get(l).push(a)}),Array.from(t.entries()).map(([a,l])=>{const i=Kt(a),p=l.filter(b=>b.manual),g=l.filter(b=>!b.manual);return{categoryIndex:parseInt(a),x:i,flags:l,manualCount:p.length,autoCount:g.length,totalCount:l.length,hasManual:p.length>0,hasAuto:g.length>0,texts:l.map(b=>b.text).join(`
|
|
45
|
+
`)}})}),kl=e.ref({show:!1,x:0,y:0,content:"",count:0}),Qt=e.computed(()=>W.value?.bubbles?.tooltip?.fields||["x","y","size","label"]),ol=e.computed(()=>{const t=W.value;return{...{x:"X",y:"Y",size:"Size",label:"Label",seriesName:"Series"},...t?.bubbles?.tooltip?.labels||{}}}),rn=e.computed(()=>W.value?.bubbles?.tooltip?.formatters||{}),at=e.ref(new Set),de=e.ref(null),hn=e.ref(!1),kt=e.ref({show:!1,x:0,y:0,title:"",value:"",bubbleData:[],spiderAreas:[]}),ml=e.ref({show:!1,x:0,y:0,categoryValue:"",description:""}),st=e.ref({show:!1,x:0,categoryIndex:-1,data:[]}),vt=e.ref({show:!1,x:0,y:0,mouseDataX:0,mouseDataY:0,categoryIndex:-1,chartX:0,chartY:0}),oe=e.ref({scale:1,offsetX:0,minScale:1,maxScale:2.5,isDragging:!1,lastMouseX:0,lastMouseY:0,isZooming:!1,zoomTimeout:null}),Yt=e.ref([]),Ae=e.ref({show:!1,title:"",description:"",color:"#FF6B6B",type:"default",editingMarkerId:null,readonly:!1,categoryIndex:null,fromButton:!1,date:null});e.computed(()=>{const t=["default"];return hl.value&&t.push(...Object.keys(hl.value)),t}),e.computed(()=>{if(!F.categories||F.categories.length===0){const{maxX:t}=Ut.value;return Array.from({length:t+1},(a,l)=>M("chart.fallback.item",{number:l+1}))}return F.categories});const so=e.computed(()=>{if(!F.categories||F.categories.length===0)return null;const t=F.categories[0],[a,l,i]=String(t).split("-"),p=Number(i?.length===2?`20${i}`:i),g=Number(a),b=Number(l)-1;return!g||!l||!p?null:new Date(p,b,g)}),al=e.computed(()=>{if(!F.categories||F.categories.length===0)return null;const t=F.categories[F.categories.length-1],[a,l,i]=String(t).split("-"),p=Number(i?.length===2?`20${i}`:i),g=Number(a),b=Number(l)-1;return!g||!l||!p?null:new Date(p,b,g)}),Bl=e.computed(()=>Ae.value.editingMarkerId!==null),el=e.computed(()=>Ae.value.readonly),Il=t=>{at.value.has(t)||(Go.value=!0,de.value=t)},il=()=>{Go.value=!1,de.value=null},zl=t=>{if(Co.value||Ro.value){st.value.show=!1;return}const l=t.currentTarget.getBoundingClientRect(),i=t.clientX-l.left,p=t.clientY-l.top,g=jt.value?i>=z.value.left-50&&i<=z.value.right+50&&p>=z.value.top-50&&p<=z.value.bottom+100:i>=z.value.left&&i<=z.value.right&&p>=z.value.top&&p<=z.value.bottom;if(hn.value=g,jt.value){if(!Ke.value||!g||oe.value.isDragging||oe.value.isZooming){st.value.show=!1;return}if(j.value.find(me=>!me||me.isHidden?!1:Math.sqrt(Math.pow(me.x-i,2)+Math.pow(me.y-p,2))<=me.radius+3))st.value.show=!1;else{const me=j.value.filter(ke=>!ke||ke.isHidden?!1:Math.sqrt(Math.pow(ke.x-i,2)+Math.pow(ke.y-p,2))<=250);if(me.length>0){let ke=me[0],Ne=Math.sqrt(Math.pow(ke.x-i,2)+Math.pow(ke.y-p,2));me.forEach(Pe=>{const Te=Math.sqrt(Math.pow(Pe.x-i,2)+Math.pow(Pe.y-p,2));Te<Ne&&(Ne=Te,ke=Pe)});const he=30,je=j.value.filter(Pe=>!Pe||Pe.isHidden?!1:Math.abs(Pe.x-ke.x)<=he).sort((Pe,Te)=>Pe.y-Te.y);st.value={show:!0,x:ke.x,categoryIndex:Math.round(ke.originalX),data:(()=>{const Pe=Qt.value,Te=ol.value,Le=[];return je.forEach(Re=>{Pe.forEach($t=>{const zt=Te[$t]||$t,jl=pn($t,Re);jl&&Le.push({seriesName:Re.seriesName,label:Re.label,value:`${zt}: ${jl}`,color:Re.color,y:Re.y})})}),Le})()}}else st.value.show=!1}return}if(oe.value.isDragging&&oe.value.scale>1&&Sl.value&&et.value){st.value.show=!1;const Xe=t.clientX-oe.value.lastMouseX,{minX:me,maxX:ke}=Ut.value,Ne=ke-me||1,je=Xe*.8;oe.value.offsetX+=je;const Pe=Ne/oe.value.scale,Te=Ne-Pe,Le=0,Re=-Te/Ne*z.value.width,$t=Le;oe.value.offsetX=Math.max(Re,Math.min($t,oe.value.offsetX)),oe.value.lastMouseX=t.clientX,oe.value.lastMouseY=t.clientY;return}if(!Ke.value||!Sl.value||oe.value.isDragging||oe.value.isZooming||!g){st.value.show=!1;return}const{minX:b,maxX:w}=Ut.value,P=w-b||1,N=P/oe.value.scale,T=b-oe.value.offsetX/z.value.width*P,B=(i-z.value.left)/z.value.width,te=T+B*N,Se=Math.round(te);if(Se>=0&&Se<=w){const Xe=Kt(Se),me=ln.value.map((ke,Ne)=>{const he=F.series.findIndex(Pe=>Pe===ke),je=ke.data[Se];return{seriesName:ke.name,value:je!==void 0?je:null,color:c(he),y:je!==void 0?xl(ke,je):null}}).filter(ke=>ke.value!==null);st.value={show:!0,x:Xe,categoryIndex:Se,data:me}}},In=()=>{st.value.show=!1,hn.value=!1,Ro.value=!1,Co.value||(kl.value.show=!1),oe.value.isDragging&&(oe.value.isDragging=!1),oe.value.zoomTimeout&&(clearTimeout(oe.value.zoomTimeout),oe.value.zoomTimeout=null),oe.value.isZooming=!1,setTimeout(()=>{de.value=null,kt.value.show=!1},150)},Ln=t=>{if(t.preventDefault(),t.stopPropagation(),!ht.value)return;const a=t.currentTarget.getBoundingClientRect(),l=t.clientX-a.left,i=t.clientY-a.top;if(Cl.value){vt.value.show=!1,e.nextTick(()=>{vt.value.show=!0,vt.value.x=t.clientX,vt.value.y=t.clientY,vt.value.categoryIndex=null});return}const p=Math.max(0,z.value.left-20),g=z.value.right,b=z.value.top,w=z.value.bottom+80;l>=p&&l<=g&&i>=b&&i<=w&&(vt.value.show=!1,e.nextTick(()=>{vt.value.show=!0,vt.value.x=t.clientX,vt.value.y=t.clientY,vt.value.categoryIndex=null;const P=Math.max(z.value.left,Math.min(l,z.value.right))-z.value.left,T=z.value.width/o.value.length,B=Math.floor(P/T);B>=0&&B<o.value.length&&(vt.value.categoryIndex=B)}))},Wl=t=>{if(!(t&&t.button===2)){if(vt.value.show&&t&&t.type==="click"){const a=document.querySelector(".dss-context-menu");if(a&&a.contains(t.target))return}vt.value.show=!1}},pl=t=>{if(typeof t.template=="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:vt.value.categoryIndex};return t.template(a,l)}return t.template||t.label||""},Xn=t=>{const a=["dss-context-menu-item"];return t.cssClass&&a.push(t.cssClass),a},Yn=t=>t.style||{},cn=t=>t.type&&hl.value[t.type]?hl.value[t.type]:t.customIcon?t.customIcon:_t.value,zn=t=>t==null?"":F.categories&&F.categories[t]?F.categories[t]:"",yn=t=>Yt.value.length?Yt.value.filter(a=>a.categoryIndex===t):[],Ml=t=>{if(!Sl.value&&!jt.value)return{x:0,y:0};const a=Kt(t),l=G.value+z.value.bottom-Al.value/2;return{x:a,y:l}},Pn=()=>{Yt.value.forEach(t=>{if(t.categoryIndex!==void 0&&(Sl.value||jt.value)){const a=Ml(t.categoryIndex);t.x=a.x,t.y=a.y}})},kn=()=>{if(Ae.value.description&&Ae.value.description.length&&Ae.value.date){if(Bl.value){const t=Yt.value.findIndex(a=>a.id===Ae.value.editingMarkerId);t!==-1?(Yt.value[t].description=Ae.value.description||"",Yt.value[t].color=Ae.value.color||"",Yt.value[t].type=Ae.value.type||"default",ue("update-marker",Yt.value[t])):ue("update-marker",{id:Ae.value.editingMarkerId,description:Ae.value.description||"",color:Ae.value.color||"",type:Ae.value.type||"default"})}else{const t="dss-marker-"+Date.now()+"-"+Math.random().toString(36).substring(2,9);let a=vn(Ae.value.date,F.categories||[]);if(jt.value){const{maxX:b}=Ut.value;a=Math.max(0,Math.min(a,Math.floor(b)))}else Sl.value&&(a=Math.max(0,Math.min(a,Ut.value.maxX)));const l=Kt(a),i=G.value+z.value.bottom-Al.value/2,p=Array.isArray(F.categories)?F.categories[a]:null,g={id:t,title:"",description:Ae.value.description||"",color:Ae.value.color||"",type:Ae.value.type||"default",categoryIndex:a,x:l,y:i,marker_date:p||null};Ae.value.categoryIndex=a,Yt.value.push(g),ue("add-marker",g)}At(),h()}},At=()=>{Ae.value.show=!1,Ae.value.title="",Ae.value.description="",Ae.value.color="#FF6B6B",Ae.value.type="default",Ae.value.editingMarkerId=null,Ae.value.readonly=!1,Ae.value.categoryIndex=null,Ae.value.fromButton=!1,Ae.value.date=null},Zl=()=>{Bl.value&&(un(Ae.value.editingMarkerId),At())},un=t=>{const a=Yt.value.findIndex(l=>l.id===t);a!==-1&&(Yt.value.splice(a,1),h()),ue("delete-marker",t)},y=t=>{if(Ae.value.show=!0,Ae.value.title=t?.title??t?.comment??"",Ae.value.description=t?.description??t?.comment??"",Ae.value.color=t?.color??"",Ae.value.type=t?.type??"default",Ae.value.editingMarkerId=t?.id??t?.marker_id??null,Ae.value.readonly=t?.readonly??!1,Ae.value.categoryIndex=t?.categoryIndex??null,t?.marker_date){const[a,l,i]=String(t.marker_date).split("-"),p=Number(i?.length===2?`20${i}`:i),g=Number(a),b=Number(l)-1;g&&l&&p?Ae.value.date=new Date(p,b,g):Ae.value.date=null}else Ae.value.date=null},h=()=>{try{const t=`dss-chart-markers-${F.chartId}`;localStorage.setItem(t,JSON.stringify(Yt.value))}catch(t){console.warn("Could not save markers to localStorage:",t)}},x=()=>{try{const t=`dss-chart-markers-${F.chartId}`,a=localStorage.getItem(t);if(a){const l=JSON.parse(a);Array.isArray(l)&&(Yt.value=l.map(i=>({...i,originalYOffset:i.originalYOffset!==void 0?i.originalYOffset:15})))}}catch(t){console.warn("Could not load markers from localStorage:",t),Yt.value=[]}},q=t=>{const a=ut.value||"Chart",l=new Date().toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}).replace(/\//g,"-");return`${a.replace(/[^a-zA-Z0-9\s]/g,"").replace(/\s+/g,"-").substring(0,50).replace(/^-|-$/g,"")||"Chart"}-${l}.${t}`},ie=()=>{const t=st.value.show,a=kt.value.show;return st.value.show=!1,kt.value.show=!1,{originalCrosshair:t,originalTooltip:a}},mt=t=>{st.value.show=t.originalCrosshair,kt.value.show=t.originalTooltip},Rt=async(t,a=32,l=32)=>new Promise((i,p)=>{if(t.startsWith("data:")){i(t);return}const g=new Image;g.crossOrigin="anonymous";const b=setTimeout(()=>{console.warn("Image conversion timeout for:",t),i(t)},5e3);g.onload=()=>{clearTimeout(b);try{const w=document.createElement("canvas"),P=w.getContext("2d");w.width=a,w.height=l,P.fillStyle="#fafafa",P.fillRect(0,0,a,l),P.drawImage(g,0,0,a,l);const N=w.toDataURL("image/png");i(N)}catch(w){console.warn("Canvas conversion failed:",w),i(t)}},g.onerror=w=>{clearTimeout(b),console.warn("Failed to load image:",t,w),i(t)},g.src=t}),_l=async()=>{try{const t=ie();setTimeout(async()=>{try{const a=$.value;if(!a){console.error("Chart SVG element not found"),mt(t);return}const l=tt(),i=xe.value,p=ee.value+l.height,g=a.cloneNode(!0);g.querySelectorAll(".dss-flag-markers, .dss-flag-line, .dss-flag-extension-line, .dss-flag-count-indicator, .dss-flag-count-text").forEach(he=>he.remove());const w=g.querySelectorAll("image"),P=Array.from(w).map(async he=>{const je=he.getAttribute("xlink:href")||he.getAttribute("href");if(je&&!je.startsWith("data:"))try{const Pe=await Rt(je,32,32);he.setAttribute("xlink:href",Pe),he.setAttribute("href",Pe)}catch(Pe){console.warn("Failed to convert logo to base64:",Pe)}});await Promise.all(P);const T=new XMLSerializer().serializeToString(g).replace(/<svg[^>]*>/,"").replace("</svg>","");let B="",te=30;if(ut.value&&(B+=`
|
|
46
46
|
<text x="24" y="${te}"
|
|
47
47
|
font-family="Arial, sans-serif"
|
|
48
48
|
font-size="18"
|
|
49
49
|
font-weight="bold"
|
|
50
50
|
fill="#333">
|
|
51
|
-
${
|
|
52
|
-
</text>`,te+=30),
|
|
51
|
+
${ut.value.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}
|
|
52
|
+
</text>`,te+=30),Ct.value&&(B+=`
|
|
53
53
|
<text x="24" y="${te}"
|
|
54
54
|
font-family="Arial, sans-serif"
|
|
55
55
|
font-size="14"
|
|
56
56
|
fill="#666">
|
|
57
|
-
${
|
|
58
|
-
</text>`,te+=25),
|
|
59
|
-
<g opacity="${
|
|
60
|
-
<g transform="translate(${
|
|
57
|
+
${Ct.value.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}
|
|
58
|
+
</text>`,te+=25),K.value&&F.series.length>0){let he=i-200,je=ut.value||Ct.value?35:25;const Pe=Math.floor((i-250)/120);let Te=0;F.series.forEach((Le,Re)=>{if(!at.value.has(Re)){const $t=c(Re),zt=Le.name.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");B+=`<circle cx="${he+6}" cy="${je-4}" r="6" fill="${$t}"/>`,B+=`<text x="${he+18}" y="${je}" font-family="Arial, sans-serif" font-size="12" fill="#333">${zt}</text>`,Te++,Te%Pe===0?(he=i-200,je+=20):he+=Math.min(120,zt.length*8+35)}})}let Se="";if(an.value)try{const{width:he,height:je}=sn.value,Pe=xn.value,Te=z.value.left,Le=z.value.right,Re=z.value.top,$t=z.value.bottom,zt=z.value.width,jl=z.value.height;let gl,Kl;switch(Pe){case"center":gl=Te+(zt-he)/2,Kl=Re+(jl-je)/2;break;case"top-left":gl=Te+15,Kl=Re+5;break;case"top-right":gl=Le-he-5,Kl=Re+5;break;case"bottom-left":gl=Te+15,Kl=$t-je-5;break;case"bottom-right":default:gl=Le-he-5,Kl=$t-je-5;break}Se=`
|
|
59
|
+
<g opacity="${Tl.value}">
|
|
60
|
+
<g transform="translate(${gl}, ${Kl}) scale(${he/499})">
|
|
61
61
|
<path d="M171.52 37.8399H160.38C160.26 36.4799 160.02 35.0599 159.68 33.5699C159.34 32.0799 158.77 30.7399 157.96 29.5299C157.16 28.3199 156 27.3199 154.48 26.5099C152.96 25.7099 150.94 25.2999 148.4 25.2999C144.69 25.2999 141.93 26.1299 140.14 27.8099C138.34 29.4799 137.45 31.5499 137.45 34.0299C137.45 37.7999 139.29 40.0799 142.97 40.8499C146.65 41.6299 150.67 42.3799 155.03 43.1199C159.39 43.8599 163.41 45.3899 167.09 47.7099C170.77 50.0299 172.61 54.6199 172.61 61.4899C172.61 64.6499 172.02 67.5099 170.85 70.0699C169.67 72.6399 168.02 74.7899 165.89 76.5199C163.76 78.2499 161.19 79.5799 158.19 80.5099C155.19 81.4399 151.93 81.8999 148.4 81.8999C143.95 81.8999 140.12 81.2699 136.94 79.9999C133.75 78.7299 131.19 77.0799 129.24 75.0399C127.29 72.9999 125.93 70.6899 125.16 68.1299C124.39 65.5599 124.19 62.9499 124.56 60.2899H136.25C136.37 62.0799 136.58 63.7899 136.85 65.3899C137.13 66.9999 137.68 68.4099 138.52 69.6099C139.35 70.8199 140.58 71.7799 142.19 72.4899C143.8 73.1999 145.99 73.5599 148.78 73.5599C153.3 73.5599 156.47 72.6199 158.29 70.7299C160.11 68.8399 161.03 66.6899 161.03 64.2799C161.03 60.2599 159.19 57.7799 155.51 56.8599C151.83 55.9299 147.79 55.0499 143.4 54.2099C139.01 53.3799 134.97 51.7699 131.29 49.3799C127.61 46.9999 125.77 42.3699 125.77 35.5099C125.77 32.8499 126.3 30.3899 127.35 28.1299C128.4 25.8699 129.9 23.9199 131.85 22.2799C133.8 20.6399 136.16 19.3399 138.95 18.3799C141.73 17.4199 144.8 16.9399 148.14 16.9399C152.41 16.9399 156.07 17.4699 159.14 18.5199C162.2 19.5699 164.69 21.0299 166.61 22.8799C168.53 24.7399 169.89 26.9499 170.69 29.5199C171.49 32.0899 171.77 34.8599 171.52 37.8199V37.8399Z" fill="#020203"/>
|
|
62
62
|
<path d="M179.04 58.1699C179.04 55.0799 179.55 52.0499 180.57 49.0699C181.59 46.0999 183.04 43.4899 184.93 41.2299C186.82 38.9699 189.09 37.1499 191.75 35.7499C194.41 34.3599 197.35 33.6599 200.57 33.6599C207 33.6599 212.15 35.9299 216.02 40.4799C219.89 45.0299 221.97 51.5999 222.28 60.1999H189.34C189.77 64.2199 191.09 67.1499 193.28 68.9699C195.48 70.7999 198.12 71.7099 201.21 71.7099C203 71.7099 204.5 71.4599 205.71 70.9699C206.92 70.4799 207.91 69.8899 208.68 69.2099C209.45 68.5299 210.06 67.8199 210.49 67.0799C210.92 66.3399 211.26 65.7199 211.51 65.2199H221.72C221.6 66.7699 221.1 68.5099 220.24 70.4599C219.37 72.4099 218.14 74.2299 216.53 75.9399C214.92 77.6399 212.85 79.0599 210.31 80.2099C207.77 81.3499 204.77 81.9299 201.31 81.9299C197.85 81.9299 194.91 81.2799 192.12 79.9799C189.34 78.6799 186.98 76.9499 185.07 74.7799C183.15 72.6099 181.67 70.0899 180.61 67.2199C179.56 64.3399 179.03 61.3299 179.03 58.1699H179.04ZM200.94 42.0199C198.47 42.0199 196.24 42.7299 194.26 44.1499C192.28 45.5699 190.89 47.8299 190.08 50.9199H211.33C211.02 48.0799 209.95 45.8799 208.13 44.3299C206.3 42.7899 203.91 42.0099 200.94 42.0099V42.0199Z" fill="#020203"/>
|
|
63
63
|
<path d="M268.59 80.9999H258.01V50.3799C258.01 48.2099 257.3 46.5099 255.88 45.2799C254.46 44.0399 252.6 43.4199 250.31 43.4199C248.45 43.4199 246.94 43.8399 245.76 44.6699C244.58 45.4999 243.67 46.5399 243.02 47.7799C242.37 49.0199 241.94 50.3799 241.72 51.8599C241.5 53.3399 241.4 54.7099 241.4 55.9399V80.9999H230.82V34.5999H241.03V38.3099C241.83 37.6899 243.27 36.7599 245.34 35.5199C247.41 34.2799 250.3 33.6599 254.02 33.6599C256.68 33.6599 259.12 34.1599 261.35 35.1399C263.58 36.1299 265.31 37.6799 266.55 39.7799C267.04 39.2899 267.71 38.6799 268.55 37.9699C269.38 37.2599 270.41 36.5799 271.61 35.9299C272.82 35.2799 274.22 34.7399 275.83 34.3099C277.44 33.8799 279.23 33.6599 281.21 33.6599C285.23 33.6599 288.67 34.8099 291.51 37.0899C294.36 39.3799 295.78 43.0599 295.78 48.1299V80.9799H285.2V50.3599C285.2 48.1899 284.49 46.4899 283.07 45.2599C281.65 44.0199 279.79 43.3999 277.5 43.3999C275.64 43.3999 274.13 43.8199 272.95 44.6499C271.77 45.4799 270.86 46.5199 270.21 47.7599C269.56 48.9999 269.13 50.3599 268.91 51.8399C268.69 53.3199 268.59 54.6899 268.59 55.9199V80.9799V80.9999Z" fill="#020203"/>
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
<path d="M47.5201 77.18H66.2501C73.5601 77.18 79.4801 71.26 79.4801 63.95C79.4801 56.64 73.5601 50.72 66.2501 50.72H47.3601C46.3801 50.72 45.5901 51.52 45.6001 52.5L45.7601 75.44C45.7601 76.41 46.5501 77.19 47.5201 77.19V77.18Z" fill="#07ACDD"/>
|
|
73
73
|
<path d="M28.4201 76.12C35.1082 76.12 40.5301 70.6982 40.5301 64.01C40.5301 57.3218 35.1082 51.9 28.4201 51.9C21.7319 51.9 16.3101 57.3218 16.3101 64.01C16.3101 70.6982 21.7319 76.12 28.4201 76.12Z" fill="#fafafa"/>
|
|
74
74
|
</g>
|
|
75
|
-
</g>`}catch(
|
|
75
|
+
</g>`}catch(he){console.warn("Watermark processing failed, skipping watermark in SVG:",he),Se=""}const Xe=`<?xml version="1.0" encoding="UTF-8"?>
|
|
76
76
|
<svg width="${i}" height="${p}"
|
|
77
77
|
xmlns="http://www.w3.org/2000/svg"
|
|
78
78
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
@@ -85,34 +85,34 @@
|
|
|
85
85
|
</defs>
|
|
86
86
|
<rect width="100%" height="100%" fill="#fafafa"/>
|
|
87
87
|
${B}
|
|
88
|
-
<g transform="translate(0, ${
|
|
89
|
-
${
|
|
88
|
+
<g transform="translate(0, ${l.height})">
|
|
89
|
+
${T}
|
|
90
90
|
${Se}
|
|
91
91
|
</g>
|
|
92
|
-
</svg>`,
|
|
93
|
-
`),
|
|
92
|
+
</svg>`,me=new Blob([Xe],{type:"image/svg+xml;charset=utf-8"}),ke=URL.createObjectURL(me),Ne=document.createElement("a");Ne.href=ke,Ne.download=q("svg"),document.body.appendChild(Ne),Ne.click(),document.body.removeChild(Ne),URL.revokeObjectURL(ke),mt(t),Wl()}catch(a){console.error("Error downloading SVG:",a),mt(t)}},50)}catch(t){console.error("Error downloading SVG:",t)}},Hl=async()=>{try{const t=ie();I.value&&I.value.offsetHeight,await new Promise(he=>setTimeout(he,300));const a=tt(),l=xe.value,i=ee.value+a.height,p=document.createElement("canvas"),g=p.getContext("2d"),b=2;p.width=l*b,p.height=i*b,p.style.width=l+"px",p.style.height=i+"px",g.scale(b,b),g.fillStyle="#fafafa",g.fillRect(0,0,l,i);let w=30;if(ut.value&&(g.fillStyle="#333",g.font="bold 18px Arial, sans-serif",g.fillText(ut.value,24,w),w+=30),Ct.value&&(g.fillStyle="#666",g.font="14px Arial, sans-serif",g.fillText(Ct.value,24,w),w+=25),K.value&&F.series.length>0){let he=l-200,je=ut.value||Ct.value?35:25;const Pe=Math.floor((l-250)/120);let Te=0;g.font="12px Arial, sans-serif",F.series.forEach((Le,Re)=>{if(!at.value.has(Re)){const $t=c(Re);g.beginPath(),g.arc(he+6,je-4,6,0,2*Math.PI),g.fillStyle=$t,g.fill(),g.fillStyle="#333",g.fillText(Le.name,he+18,je),Te++,Te%Pe===0?(he=l-200,je+=20):he+=Math.min(120,Le.name.length*8+35)}})}const N=$.value.cloneNode(!0),T=N.querySelectorAll(".dss-flag-markers, .dss-flag-line, .dss-flag-extension-line, .dss-flag-count-indicator, .dss-flag-count-text"),B=N.querySelectorAll(".dss-crosshair"),te=N.querySelectorAll('[class*="tooltip"]');T.forEach(he=>he.remove()),B.forEach(he=>he.remove()),te.forEach(he=>he.remove()),N.querySelectorAll("image").forEach((he,je)=>{const Pe=he.getAttribute("xlink:href")||he.getAttribute("href");if(Pe&&!Pe.startsWith("data:")){const Te=Ho.value[je],Le=Te?c(Te.seriesIndex):"#3B82F6",Re=he.getAttribute("x")||0,$t=he.getAttribute("y")||0,zt=he.getAttribute("width")||32,jl=he.getAttribute("height")||32,gl=document.createElementNS("http://www.w3.org/2000/svg","circle");gl.setAttribute("cx",parseFloat(Re)+parseFloat(zt)/2),gl.setAttribute("cy",parseFloat($t)+parseFloat(jl)/2),gl.setAttribute("r",Math.min(parseFloat(zt),parseFloat(jl))/2-1),gl.setAttribute("fill",Le),gl.setAttribute("stroke","#fafafa"),gl.setAttribute("stroke-width","2"),he.parentNode.replaceChild(gl,he)}});const Xe=new XMLSerializer().serializeToString(N),me=new Blob([Xe],{type:"image/svg+xml;charset=utf-8"}),ke=URL.createObjectURL(me),Ne=new Image;return new Promise((he,je)=>{Ne.onload=async()=>{try{if(g.drawImage(Ne,0,a.height),Ho.value.forEach(Pe=>{const Te=Pe.x,Le=Pe.y+a.height,Re=(Pe.width||32)/2,$t=c(Pe.seriesIndex);g.save(),g.beginPath(),g.arc(Te,Le,Re-1,0,2*Math.PI),g.fillStyle=$t,g.fill(),g.strokeStyle="#fafafa",g.lineWidth=2,g.stroke(),g.restore()}),an.value){const Pe=new Image,Te=()=>{const{width:Re,height:$t}=sn.value,zt=xn.value,jl=z.value.left,gl=z.value.right,Kl=z.value.top,Io=z.value.bottom,Ea=z.value.width,Sa=z.value.height;let eo,to;switch(zt){case"center":eo=jl+(Ea-Re)/2,to=Kl+a.height+(Sa-$t)/2;break;case"top-left":eo=jl+15,to=Kl+a.height+10;break;case"top-right":eo=gl-Re-5,to=Kl+a.height+10;break;case"bottom-left":eo=jl+15,to=Io+a.height-$t-5;break;case"bottom-right":default:eo=gl-Re-5,to=Io+a.height-$t-5;break}g.globalAlpha=Tl.value,g.drawImage(Pe,eo,to,Re,$t),g.globalAlpha=1,Le()},Le=()=>{p.toBlob(Re=>{const $t=URL.createObjectURL(Re),zt=document.createElement("a");zt.href=$t,zt.download=q("png"),document.body.appendChild(zt),zt.click(),document.body.removeChild(zt),URL.revokeObjectURL($t),URL.revokeObjectURL(ke),mt(t),Wl(),he()},"image/png")};Pe.onload=Te,Pe.onerror=Le,Pe.src=D.value}else p.toBlob(Pe=>{const Te=URL.createObjectURL(Pe),Le=document.createElement("a");Le.href=Te,Le.download=q("png"),document.body.appendChild(Le),Le.click(),document.body.removeChild(Le),URL.revokeObjectURL(Te),URL.revokeObjectURL(ke),mt(t),Wl(),he()},"image/png")}catch(Pe){URL.revokeObjectURL(ke),mt(t),je(Pe)}},Ne.onerror=()=>{URL.revokeObjectURL(ke),mt(t),je(new Error("Failed to load SVG image"))},Ne.src=ke})}catch(t){console.error("Error downloading PNG:",t)}},ql=()=>{try{let t="";ut.value&&(t+=`# ${M("chart.csv.chartTitle")}: ${ut.value}
|
|
93
|
+
`),Ct.value&&(t+=`# ${M("chart.csv.chartSubtitle")}: ${Ct.value}
|
|
94
94
|
`),t+=`# ${M("chart.csv.generated")}: ${new Date().toLocaleString()}
|
|
95
95
|
|
|
96
|
-
`,t+="Category",
|
|
97
|
-
`;const a=Math.max(...
|
|
98
|
-
`}const n=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(n),p=document.createElement("a");p.href=i,p.download=q("csv"),document.body.appendChild(p),p.click(),document.body.removeChild(p),URL.revokeObjectURL(i),Zn()}catch(t){console.error("Error downloading CSV:",t)}},kl=t=>{if(typeof t.action=="function"){const a={series:R.series,categories:R.categories,markers:Yt.value},n={chartX:gt.value.chartX,chartY:gt.value.chartY,dataX:gt.value.mouseDataX,dataY:gt.value.mouseDataY,categoryIndex:clampedCategoryIndex||gt.value.categoryIndex};t.action(a,n)}Zn()},ro=()=>{$t(),$e.value.show=!0,$e.value.categoryIndex=gt.value.categoryIndex,$e.value.fromButton=!1,Zn()},xo=()=>{$t(),$e.value.show=!0,$e.value.categoryIndex=0,$e.value.fromButton=!0},Eo=t=>{if(gt.value.show){const a=document.querySelector(".dss-context-menu");a&&!a.contains(t.target)&&(gt.value.show=!1)}},io=t=>{gt.value.show&&!t.target.closest(".context-menu")&&(gt.value.show=!1)},So=t=>{if(!Sn.value||!Ge.value)return;t.preventDefault(),t.stopPropagation(),ae.value.isZooming=!0,st.value.show=!1,ae.value.zoomTimeout&&clearTimeout(ae.value.zoomTimeout);const n=t.currentTarget.getBoundingClientRect(),i=t.clientX-n.left,p=t.clientY-n.top;if(i<F.value.left-50||i>F.value.right+50||p<F.value.top-50||p>F.value.bottom+100){ae.value.isZooming=!1;return}const g=t.deltaY>0?.9:1.1,C=Math.max(ae.value.minScale,Math.min(ae.value.maxScale,ae.value.scale*g));if(C!==ae.value.scale){const{minX:w,maxX:z}=Xt.value,N=z-w||1,$=N/ae.value.scale,B=w-ae.value.offsetX/F.value.width*N,te=(i-F.value.left)/F.value.width,Se=B+te*$;ae.value.scale=C;const Ye=N/ae.value.scale,ue=Se-te*Ye;ae.value.offsetX=-(ue-w)/N*F.value.width,ae.value.scale<=1.01&&(ae.value.scale=1,ae.value.offsetX=0)}ae.value.zoomTimeout=setTimeout(()=>{ae.value.isZooming=!1,ae.value.zoomTimeout=null},300)},co=t=>{if(!Sn.value||!Ge.value||ae.value.scale<=1)return;st.value.show=!1;const n=t.currentTarget.getBoundingClientRect();t.clientX-n.left,t.clientY-n.top,ae.value.isDragging=!0,ae.value.lastMouseX=t.clientX,ae.value.lastMouseY=t.clientY,t.preventDefault()},Vo=()=>{ae.value.isDragging=!1},uo=()=>{!Sn.value||!Ge.value||(ae.value.scale=1,ae.value.offsetX=0,ae.value.isDragging=!1,ae.value.zoomTimeout&&(clearTimeout(ae.value.zoomTimeout),ae.value.zoomTimeout=null),ae.value.isZooming=!1)},Zo=()=>!Sn.value||!pl.value||!Ge.value?"default":ae.value.isDragging?"grabbing":ae.value.scale>1?"grab":"dss-crosshair",Xl=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 n=0;n<t.length-1;n++){const i=t[Math.max(n-1,0)],p=t[n],g=t[n+1],C=t[Math.min(n+2,t.length-1)],w=p.x+(g.x-i.x)/6*Je.value,z=p.y+(g.y-i.y)/6*Je.value,N=g.x-(C.x-p.x)/6*Je.value,$=g.y-(C.y-p.y)/6*Je.value;a+=` C ${w} ${z} ${N} ${$} ${g.x} ${g.y}`}return a},$n=e.computed(()=>{const a=Z.value?.chart?.padding,n=typeof a=="number"?a:null,i=a&&typeof a=="object"?a:null,p=50;let g=p+(en.value?30:0)+60;if(Ln.value){const B={left:p+40,top:p+40,right:p+40,bottom:p+40};return n!=null?{left:n,top:n,right:n,bottom:n}:i?{left:i.left??B.left,top:i.top??B.top,right:i.right??B.right,bottom:i.bottom??B.bottom}:B}if(kn.value){const B=!J.value,te=Mt.value,Se=te?An.value+Fn.value+Math.max(24,on.value+16):0,Ye=B?12:p;let ue=0;ot.value&&(ue+=B?8:15),bt.value&&(ue+=B?6:10);const ke=nt();let Ne=Ye+(B?4:16)+(te?Se:0),ge=Ye+(te?Se:0);J.value&&he.value==="left"?Ne+=ke.legendWidth||150:J.value&&he.value==="right"&&(ge+=ke.legendWidth||150);const Ze=we.value==="semi-radial"?te?Se:8:te?Se:B?8:p+80,Le=te?14:0,_e=Ye+ue+Le,Re={left:Ne,top:_e,right:ge,bottom:Ze};return n!=null?{left:n,top:n,right:n,bottom:n}:i?{left:i.left??Re.left,top:i.top??Re.top,right:i.right??Re.right,bottom:i.bottom??Re.bottom}:Re}let C=0;ot.value&&(C+=15),bt.value&&(C+=10);const w=nt();let z=p+16,N=p;J.value&&he.value==="left"?z+=w.legendWidth||150:J.value&&he.value==="right"&&(N+=w.legendWidth||150),Hn.value&&(N+=44);const $={left:z,top:p+C,right:N,bottom:g};return n!=null?{left:n,top:n,right:n,bottom:n}:i?{left:i.left??$.left,top:i.top??$.top,right:i.right??$.right,bottom:i.bottom??$.bottom}:$}),F=e.computed(()=>({left:$n.value.left,top:$n.value.top,right:Ee.value-$n.value.right,bottom:Q.value-$n.value.bottom,width:Ee.value-($n.value.left+$n.value.right),height:Q.value-($n.value.top+$n.value.bottom)})),Sn=e.computed(()=>["line","area","bar"].includes(we.value)||it.value),Xn=e.computed(()=>it.value),Fl=e.computed(()=>we.value==="mini-radial"),kn=e.computed(()=>["radial","semi-radial","mini-radial"].includes(we.value)),Ln=e.computed(()=>we.value==="spider"),jt=e.computed(()=>we.value==="bubble"),Jt=e.computed(()=>Z.value?.chart?.orientation==="horizontal"&&(we.value==="bar"||Xn.value)),gl=t=>{const{minY:a,maxY:n}=Xt.value,i=n-a||1;return F.value.left+(t-a)/i*F.value.width},Cl=t=>{const{maxX:a}=Xt.value,n=a+1,p=F.value.height/n;return F.value.top+(t+.5)*p},Rt=e.computed(()=>kn.value?$n.value.left+(Ee.value-$n.value.left-$n.value.right)/2:Ee.value/2),kt=e.computed(()=>Ln.value?Q.value/2-40:kn.value?$n.value.top+(Q.value-$n.value.top-$n.value.bottom)/2:Q.value/2),ut=e.computed(()=>{if(Ln.value){const t=F.value.width-80,a=F.value.height-80;return Math.min(t,a)/2}return Math.min(F.value.width,F.value.height)/2}),Wt=e.computed(()=>{const t=Z.value,a=t?.plotOptions?.radialBar?.innerRadiusRatio??t?.radialBar?.innerRadiusRatio,n=typeof a=="number"&&a>=0&&a<=1?a:.45;return ut.value*n}),Il=e.computed(()=>{const t=Z.value,a=typeof R.innerSize=="number"?R.innerSize:t?.innerSize;return typeof a!="number"||a<=-100||!(kn.value||Ln.value)?1:1+a/100}),nn=e.computed(()=>{const t=Il.value;if(t===1||t<=0)return;const a=Rt.value,n=kt.value;return`translate(${a}, ${n}) scale(${t}) translate(${-a}, ${-n})`}),Bl=e.ref(0),Yl=e.computed(()=>`semi-radial-fill-clip-${R.chartId}`),Pn=e.computed(()=>we.value==="semi-radial"),il=e.computed(()=>Pn.value&&vt.value&&!Sl.value),cl=e.computed(()=>Pn.value&&vt.value&&!Sl.value&&Gt.value==="fill"),bl=e.computed(()=>{const t=il.value?Bl.value:1,a=Rt.value,n=kt.value,i=Wt.value,p=ut.value,g=Math.PI,C=Math.PI+t*Math.PI;if(t<=0)return`M ${a} ${n} L ${a} ${n} Z`;const w=a+p*Math.cos(g),z=n+p*Math.sin(g),N=a+p*Math.cos(C),$=n+p*Math.sin(C),B=a+i*Math.cos(C),te=n+i*Math.sin(C),Se=a+i*Math.cos(g),Ye=n+i*Math.sin(g),ue=t>.5?1:0;return`M ${a} ${n} L ${w} ${z} A ${p} ${p} 0 ${ue} 1 ${N} ${$} L ${B} ${te} A ${i} ${i} 0 ${ue} 1 ${Se} ${Ye} Z`}),wl=e.computed(()=>{if(!(!Pn.value||!il.value)&&!cl.value)return`url(#${Yl.value})`}),Uo=t=>{if(!(!cl.value||t!==0))return`url(#${Yl.value})`},xl=e.ref(0),Ml=e.computed(()=>`radial-reveal-clip-${R.chartId}`),el=e.computed(()=>we.value==="radial"),zl=e.computed(()=>{const t=el.value?xl.value:1,a=Rt.value,n=kt.value,i=Math.max(ut.value*1.5,Ee.value,Q.value);if(t<=0)return`M ${a} ${n} L ${a} ${n} Z`;if(t>=1){const B=a-i,te=a+i;return`M ${B} ${n} A ${i} ${i} 0 0 1 ${te} ${n} A ${i} ${i} 0 0 1 ${B} ${n} Z`}const p=-Math.PI/2,g=p+t*Math.PI*2,C=a+i*Math.cos(p),w=n+i*Math.sin(p),z=a+i*Math.cos(g),N=n+i*Math.sin(g),$=t>=.5?1:0;return`M ${a} ${n} L ${C} ${w} A ${i} ${i} 0 ${$} 1 ${z} ${N} Z`}),No=e.computed(()=>{if(wl.value)return wl.value;if(el.value)return`url(#${Ml.value})`});let Pl=null;const Xo=()=>{if(!il.value)return;Bl.value=0;const t=S.value,a=performance.now(),n=i=>{const p=i-a,g=Math.min(1,p/t);Bl.value=Qo(V.value,g),g<1&&(Pl=requestAnimationFrame(n))};Pl=requestAnimationFrame(n)},Ol=e.computed(()=>Z.value?.bubbles?.minSize||8),mo=e.computed(()=>Z.value?.bubbles?.maxSize||50),jl=e.computed(()=>Z.value?.bubbles?.opacity||.7),Bo=(t,a)=>{const n=[15,20,25,18,22],i=n[t%n.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")},tl=e.computed(()=>R.series),nl=e.computed(()=>R.series.filter((t,a)=>!at.value.has(a))),Kl=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(()=>nl.value.filter(t=>Kl(t)==="primary")),_l=e.computed(()=>nl.value.filter(t=>Kl(t)==="secondary")),Hn=e.computed(()=>!Jt.value&&!!oe.value&&_l.value.length>0),Vn="auto",vo=(t,a,n,i=0,p=100)=>{let g=1/0,C=-1/0;if(t.forEach(N=>{N?.data?.length&&N.data.forEach($=>{typeof $=="number"&&Number.isFinite($)&&(g=Math.min(g,$),C=Math.max(C,$))})}),g===1/0)return{minY:i,maxY:p};let w;if(a===Vn){const N=C-g,$=N>0?N*.1:1;w=Math.max(0,g-$)}else if(typeof a=="number")w=a;else{const N=C-g,$=N>0?N*.1:1;w=Math.max(0,g-$)}let z;if(n===Vn){const N=C-g,$=N>0?N*.1:2;z=C+$}else if(typeof n=="number")z=n;else{const N=C-g,$=N>0?N*.1:2;z=C+$}return{minY:w,maxY:z}},Xt=e.computed(()=>{if(jt.value)return Yo();if(!nl.value.length)return{minX:0,maxX:1,minY:0,maxY:1};let t=0;nl.value.forEach(n=>{n.data&&n.data.length&&(t=Math.max(t,n.data.length-1))}),R.categories.length>0&&(t=Math.max(t,R.categories.length-1));const a=vo(_o.value.length?_o.value:nl.value,Fe.value,De.value);return{minX:0,maxX:t,minY:a.minY,maxY:a.maxY}}),$o=e.computed(()=>Hn.value?vo(_l.value,Zt.value,yt.value,Xt.value.minY,Xt.value.maxY):{minY:Xt.value.minY,maxY:Xt.value.maxY}),Yo=()=>{if(!nl.value.length)return{minX:0,maxX:8,minY:0,maxY:50,minSize:10,maxSize:30};let t=1/0,a=-1/0,n=1/0,i=-1/0,p=1/0,g=-1/0,C=!1;if(nl.value.forEach((Se,Ye)=>{Se?.data?.length&&Se.data.forEach((ue,ke)=>{let Ne,ge,Qe;if(typeof ue=="object"&&ue!==null&&!Array.isArray(ue))Ne=typeof ue.x=="number"?ue.x:ke,ge=typeof ue.y=="number"?ue.y:0,Qe=typeof ue.size=="number"?ue.size:20;else if(Array.isArray(ue)&&ue.length>=3)Ne=typeof ue[0]=="number"?ue[0]:ke,ge=typeof ue[1]=="number"?ue[1]:0,Qe=typeof ue[2]=="number"?ue[2]:20;else if(typeof ue=="number")Ne=ke,ge=ue,Qe=Bo(Ye,ke);else return;isFinite(Ne)&&isFinite(ge)&&isFinite(Qe)&&(t=Math.min(t,Ne),a=Math.max(a,Ne),n=Math.min(n,ge),i=Math.max(i,ge),p=Math.min(p,Qe),g=Math.max(g,Qe),C=!0)})}),!C)return{minX:0,maxX:8,minY:0,maxY:50,minSize:10,maxSize:30};t===a&&(t=Math.min(t,0),a=Math.max(a,R.categories?.length-1||8)),n===i&&(n=Math.max(0,n-10),i=n+20);const w=a-t,z=i-n;let N,$,B,te;return Ut.value!==null?N=Ut.value:N=t-w*.1,xt.value!==null?$=xt.value:$=a+w*.1,Fe.value!==null&&typeof Fe.value=="number"?B=Fe.value:B=Math.max(0,n-z*.1),De.value!==null&&typeof De.value=="number"?te=De.value:te=i+z*.1,{minX:N,maxX:$,minY:B,maxY:te,minSize:p,maxSize:g}},Kt=t=>{if(jt.value){const{minX:w,maxX:z}=Xt.value,N=z-w||1;return F.value.left+(t-w)/N*F.value.width}const{minX:a,maxX:n}=Xt.value,i=n-a;if(n===0||i===0)return F.value.left+F.value.width/2;const p=i/ae.value.scale,g=a-ae.value.offsetX/F.value.width*i,C=(t-g)/p;return F.value.left+C*F.value.width},wn=t=>{const{minY:a,maxY:n}=Xt.value,i=n-a||1;return F.value.bottom-(t-a)/i*F.value.height},Lo=t=>{const{minY:a,maxY:n}=$o.value,i=n-a||1;return F.value.bottom-(t-a)/i*F.value.height},xn=(t,a)=>Hn.value&&Kl(t)==="secondary"?Lo(a):wn(a),go=t=>{if(!jt.value)return St.value||4;const{maxSize:a}=Xt.value,n=Math.max(1,a),i=Math.min(1,Math.max(0,t/n));return Ol.value+i*(mo.value-Ol.value)},$l=(t,a=12,n="Arial, sans-serif")=>{if(typeof t!="string"||!t)return 0;if(typeof document>"u")return t.length*(a*.62);$l.canvas||($l.canvas=document.createElement("canvas"));const i=$l.canvas.getContext("2d");return i?(i.font=`${a}px ${n}`,i.measureText(t).width):t.length*(a*.62)},ho=(t,a,n=12)=>{if(typeof t!="string"||typeof a!="number"||a<=0||$l(t,n)<=a)return t;const i="..";if($l(i,n)>=a)return i;let g=t.length;for(;g>0;){const C=`${t.slice(0,g)}${i}`;if($l(C,n)<=a)return C;g-=1}return i},To=e.computed(()=>s.value.map(t=>({y:t.y}))),o=e.computed(()=>{if(jt.value)return l();if(we.value==="bar"){if(Jt.value){const _e=[],{minY:Re,maxY:_t}=Xt.value,zt=5,Kn=_t-Re||1;for(let hn=0;hn<=zt;hn++){const Gn=Re+Kn*(hn/zt),Io=gl(Gn);_e.push({x:Io,y:F.value.bottom+20,text:qt(Math.round(Gn))})}return _e}const ke=[],{maxX:Ne}=Xt.value,ge=Ne+1,Qe=5,Le=(F.value.width-Qe*2)/ge;for(let _e=0;_e<=Ne;_e++){const Re=F.value.left+Qe+(_e+.5)*Le;ke.push({x:Re,y:F.value.bottom+20,text:ho(R.categories[_e]||M("chart.fallback.item",{number:_e+1}),Math.max(Le-8,24))})}return ke}const t=[],{minX:a,maxX:n}=Xt.value,i=Ut.value!==null?Ut.value:a,p=xt.value!==null?xt.value:n,g=p-i||1,C=g/ae.value.scale,w=i-ae.value.offsetX/F.value.width*g,z=w+C,N=Math.max(0,Math.floor(w-2)),$=Math.min(p,Math.ceil(z+2)),B=$-N,te=F.value.width,Ye=Math.floor(te/60);let ue=1;B>Ye&&(ue=Math.ceil(B/Ye));for(let ke=N;ke<=$;ke+=ue)if(ke>=0&&ke<=p){const Ne=Kt(ke);Ne>=F.value.left-100&&Ne<=F.value.right+100&&t.push({x:Ne,y:F.value.bottom+20,text:R.categories[ke]||`Item ${ke+1}`})}return t}),l=()=>{const t=[],{minX:a,maxX:n}=Xt.value,i=n-a||1,p=Math.min(8,Math.max(4,Math.floor(F.value.width/80)));for(let g=0;g<=p;g++){const C=a+i*g/p,w=Kt(C);if(w>=F.value.left-10&&w<=F.value.right+10){const z=Math.round(C),N=R.categories?.[z];t.push({x:w,y:F.value.bottom+20,text:N||(Number.isInteger(C)?C.toString():C.toFixed(1))})}}return t},s=e.computed(()=>{if(Jt.value){const p=[],{maxX:g}=Xt.value;for(let C=0;C<=g;C++)p.push({x:F.value.left-10,y:Cl(C),text:ho(R.categories[C]||`Item ${C+1}`,Math.max(F.value.left-28,40))});return p}const t=[],{minY:a,maxY:n}=Xt.value,i=5;for(let p=0;p<=i;p++){const g=a+(n-a)*(p/i),C=Math.round(g);t.push({x:F.value.left-10,y:wn(g),text:qt(C)})}return t}),r=e.computed(()=>{if(!Hn.value||Jt.value)return[];const t=[],{minY:a,maxY:n}=$o.value,i=5;for(let p=0;p<=i;p++){const g=a+(n-a)*(p/i),C=Math.round(g);t.push({x:F.value.right+10,y:Lo(g),text:qt(C)})}return t}),c=t=>{const a=mn.value;if(!a||a.length===0){const n=["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"];return n[t%n.length]}return a[t%a.length]},d=t=>{if(!t||typeof t!="string")return"#3a3a3a";const a=t.trim();let n=0,i=0,p=0;const g=a.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(g)n=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)n=Number(w[1])/255,i=Number(w[2])/255,p=Number(w[3])/255;else{const z=a.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);if(z){let N=z[1];N.length===3&&(N=N[0]+N[0]+N[1]+N[1]+N[2]+N[2]),n=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 $=getComputedStyle(N).color;document.body.removeChild(N);const B=$.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(B)n=Number(B[1])/255,i=Number(B[2])/255,p=Number(B[3])/255;else return"#3a3a3a"}else return"#3a3a3a"}}return .2126*n+.7152*i+.0722*p>.5?"#3a3a3a":"#fafafa"},u=t=>{if(!t||typeof t!="string")return t;const a=t.trim(),n=a.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(n){const g=Math.max(0,Math.floor(Number(n[1])*.65)),C=Math.max(0,Math.floor(Number(n[2])*.65)),w=Math.max(0,Math.floor(Number(n[3])*.65));return`rgb(${g}, ${C}, ${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)),C=Math.max(0,Math.floor(Number(i[2])*.65)),w=Math.max(0,Math.floor(Number(i[3])*.65));return`rgba(${g}, ${C}, ${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 C=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))),z=Math.max(0,Math.min(255,Math.floor(parseInt(g.slice(4,6),16)*.65)));return`#${[C,w,z].map(N=>N.toString(16).padStart(2,"0")).join("")}`}return a},m=(t,a)=>{const i=Z.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 n=1;n<t.length;n++){const i=t[n].x-t[n-1].x,p=t[n].y-t[n-1].y;a+=Math.sqrt(i*i+p*p)}return a},k=e.computed(()=>we.value==="line"||Xn.value?(Xn.value?R.series.filter(a=>(a.type||we.value)==="line"):tl.value).map((a,n)=>{const i=R.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?gl(B):Kt(te),y:Jt.value?Cl(te):xn(a,B),index:te})}),g.length>0&&p.push(g);let C="";p.forEach(B=>{if(B.length>0){let te="";ye.value?te=Xl(B):te=`M ${B[0].x} ${B[0].y}`+B.slice(1).map(Se=>` L ${Se.x} ${Se.y}`).join(""),C+=(C?" ":"")+te}});const w=p.reduce((B,te)=>B+v(te),0),z=at.value.has(i),N=ce.value===i,$=ce.value!==null&&ce.value!==i;return{path:C,color:c(i),strokeDasharray:fo(a),pathLength:w,seriesIndex:i,animationDelay:n*Y.value,isHighlighted:N,isDimmed:$,isHidden:z}}):[]),_=e.computed(()=>{if(!(we.value==="line"||Xn.value))return[];const t=Xn.value?R.series.filter(n=>(n.type||we.value)==="line"):tl.value,a=[];return t.forEach((n,i)=>{const p=R.series.findIndex(g=>g===n);for(let g=0;g<n.data.length-1;g++){const C=n.data[g];if(C!=null){let w=-1,z=0;for(let N=g+1;N<n.data.length;N++){const $=n.data[N];if($==null)z++;else{w=N;break}}if(z>0&&w!==-1){const N=n.data[w],$=Jt.value?gl(C):Kt(g),B=Jt.value?Cl(g):xn(n,C),te=Jt.value?gl(N):Kt(w),Se=Jt.value?Cl(w):xn(n,N),Ye=at.value.has(p),ue=ce.value===p,ke=ce.value!==null&&ce.value!==p;a.push({path:`M ${$} ${B} L ${te} ${Se}`,color:c(p),seriesIndex:p,animationDelay:i*Y.value,isHighlighted:ue,isDimmed:ke,isHidden:Ye,gapSize:z}),g=w-1}}}}),a}),H=e.computed(()=>we.value==="line"||Xn.value?!vt.value||Sl.value||Ft.value.hasAnimated?[]:(Xn.value?R.series.filter(a=>(a.type||we.value)==="line"):tl.value).map((a,n)=>{const i=R.series.findIndex(z=>z===a);let p="",g=null;a.data.forEach((z,N)=>{if(z!=null){const $={x:Jt.value?gl(z):Kt(N),y:Jt.value?Cl(N):xn(a,z)};g===null?p+=`M ${$.x} ${$.y}`:p+=` L ${$.x} ${$.y}`,g=$}else if(g!==null){const $=a.data.findIndex((B,te)=>te>N&&B!==null&&B!==void 0);if($!==-1){const B={x:Jt.value?gl(a.data[$]):Kt($),y:Jt.value?Cl($):xn(a,a.data[$])};p+=` L ${B.x} ${B.y}`,g=B}}});const C=a.data.map((z,N)=>z==null?null:{x:Jt.value?gl(z):Kt(N),y:Jt.value?Cl(N):xn(a,z)}).filter(z=>z!==null),w=v(C);return{path:p,pathLength:w,color:c(i),strokeDasharray:fo(a),animationDelay:n*Y.value,seriesIndex:i}}):[]),E=e.computed(()=>{if(we.value!=="line")return[];const t=[];return tl.value.forEach((a,n)=>{const i=ce.value===n,p=ce.value!==null&&ce.value!==n,g=at.value.has(n);a.data.forEach((C,w)=>{C!=null&&t.push({x:Kt(w),y:xn(a,C),color:c(n),value:C,label:R.categories[w]||w.toString(),seriesName:a.name,categoryIndex:w,dataIndex:w,animationDelay:(n*a.data.length+w)*(Y.value/8),isHighlighted:i,isDimmed:p,isHidden:g})})}),t}),se=e.computed(()=>{if(!Xn.value)return[];const t=[];return R.series.filter(n=>(n.type||we.value)==="line").forEach((n,i)=>{const p=R.series.findIndex(z=>z===n),g=ce.value===p,C=ce.value!==null&&ce.value!==p,w=at.value.has(p);n.data.forEach((z,N)=>{z!=null&&t.push({x:Kt(N),y:xn(n,z),color:c(p),value:z,label:R.categories[N]||N.toString(),seriesName:n.name,categoryIndex:N,dataIndex:N,animationDelay:(i*n.data.length+N)*(Y.value/8),isHighlighted:g,isDimmed:C,isHidden:w})})}),t}),j=e.computed(()=>{if(!jt.value)return[];const t=[];return tl.value.forEach((a,n)=>{if(!a?.data?.length)return;const i=ce.value,p=i!==null&&i===n,g=i!==null&&i!==n,C=at.value.has(n);a.data.forEach((w,z)=>{let N,$,B,te,Se;if(typeof w=="object"&&w!==null&&!Array.isArray(w))N=typeof w.x=="number"?w.x:z,$=typeof w.y=="number"?w.y:0,B=typeof w.size=="number"?w.size:20,te=w.label||R.categories?.[z]||`Point ${z+1}`,Se=w.image||w.imageUrl;else if(Array.isArray(w)&&w.length>=3)N=typeof w[0]=="number"?w[0]:z,$=typeof w[1]=="number"?w[1]:0,B=typeof w[2]=="number"?w[2]:20,te=w[3]||R.categories?.[z]||`Point ${z+1}`,Se=w[4];else if(typeof w=="number")N=z,$=w,B=Bo(n,z),te=R.categories?.[z]||`Point ${z+1}`;else return;!isFinite(N)||!isFinite($)||!isFinite(B)||t.push({x:Kt(N),y:wn($),radius:go(B),originalX:N,originalY:$,originalSize:B,color:c(n),seriesName:a.name||`Series ${n+1}`,label:te,imageUrl:Se,seriesIndex:n,dataIndex:z,categoryIndex:Math.round(N),isHighlighted:p,isDimmed:g,isHidden:C,opacity:jl.value})})}),t}),Ie=e.computed(()=>we.value!=="area"?[]:tl.value.map((t,a)=>{const n=[];let i=[];if(t.data.forEach((B,te)=>{B==null?i.length>0&&(n.push([...i]),i=[]):i.push({x:Kt(te),y:xn(t,B),index:te})}),i.length>0&&n.push(i),n.length===0)return{linePath:"",areaPath:"",color:c(a),isHidden:at.value.has(a)};const p=F.value.bottom+1;let g="",C="";n.forEach((B,te)=>{if(B.length===0)return;let Se=`M ${B[0].x} ${B[0].y}`;ye.value&&B.length>1?Se=Xl(B):B.slice(1).forEach(ue=>{Se+=` L ${ue.x} ${ue.y}`}),g+=(g?" ":"")+Se;let Ye=`M ${B[0].x} ${p}`;if(Ye+=` L ${B[0].x} ${B[0].y}`,ye.value&&B.length>1){const ue=Xl(B),ke=ue.substring(ue.indexOf("C")||ue.indexOf("Q")||ue.indexOf("L"));ke?Ye+=" "+ke:B.slice(1).forEach(Ne=>{Ye+=` L ${Ne.x} ${Ne.y}`})}else B.slice(1).forEach(ue=>{Ye+=` L ${ue.x} ${ue.y}`});Ye+=` L ${B[B.length-1].x} ${p} Z`,C+=(C?" ":"")+Ye});const w=ce.value===a,z=ce.value!==null&&ce.value!==a,N=at.value.has(a),$=n.reduce((B,te)=>B+v(te),0);return{linePath:g,areaPath:C,color:c(a),pathLength:$,isHighlighted:w,isDimmed:z,isHidden:N}})),Ve=e.computed(()=>{if(!(["bar"].includes(we.value)||Xn.value))return[];const t=[],{maxX:a}=Xt.value,n=Xn.value?R.series.filter(p=>(p.type||we.value)==="bar"):tl.value,i=n.length;if(Jt.value){const p=a+1,C=F.value.height/p,w=C*(2/3),z=Math.min(4,w/i*.15),N=w-(i-1)*z,$=Math.max(4,N/i);n.forEach((B,te)=>{const Se=R.series.findIndex(Ne=>Ne===B),Ye=ce.value===Se,ue=ce.value!==null&&ce.value!==Se,ke=at.value.has(Se);B.data.forEach((Ne,ge)=>{if(Ne==null||typeof Ne!="number"||!isFinite(Ne))return;const Le=F.value.top+(ge+.5)*C-w/2+te*($+z),_e=F.value.left,Re=Math.abs(gl(Ne)-F.value.left);let _t="";if(ye.value&&Re>0){const zt=Math.min(Tt.value,$/2,Re/2);_t=[`M ${_e} ${Le}`,`L ${_e+Re-zt} ${Le}`,`Q ${_e+Re} ${Le} ${_e+Re} ${Le+zt}`,`L ${_e+Re} ${Le+$-zt}`,`Q ${_e+Re} ${Le+$} ${_e+Re-zt} ${Le+$}`,`L ${_e} ${Le+$}`,"Z"].join(" ")}t.push({x:_e,y:Le,width:Re,height:$,color:c(i===1?ge:Se),value:Ne,label:R.categories[ge]||ge.toString(),seriesName:B.name,animationDelay:(te*n.length+ge)*(Y.value/4),isHighlighted:Ye,isDimmed:ue,isHidden:ke,barPath:_t,isSmooth:ye.value&&Re>0})})})}else{const p=a+1,C=F.value.width/p,w=C*.8,z=w/i,N=z*.05,$=z-N;n.forEach((B,te)=>{const Se=R.series.findIndex(Ne=>Ne===B),Ye=ce.value===Se,ue=ce.value!==null&&ce.value!==Se,ke=at.value.has(Se);B.data.forEach((Ne,ge)=>{if(Ne==null||typeof Ne!="number"||!isFinite(Ne))return;const Le=F.value.left+(ge+.5)*C-w/2+te*z+N/2,_e=wn(Math.max(0,Ne)),Re=Math.abs(wn(0)-wn(Ne));let _t="";if(ye.value&&Re>0){const zt=Math.min(Tt.value,$/2,Re/2);_t=[`M ${Le} ${_e+Re}`,`L ${Le} ${_e+zt}`,`Q ${Le} ${_e} ${Le+zt} ${_e}`,`L ${Le+$-zt} ${_e}`,`Q ${Le+$} ${_e} ${Le+$} ${_e+zt}`,`L ${Le+$} ${_e+Re}`,"Z"].join(" ")}t.push({x:Le,y:_e,width:$,height:Re,color:c(i===1?ge:Se),value:Ne,label:R.categories[ge]||ge.toString(),seriesName:B.name,animationDelay:(te*n.length+ge)*(Y.value/4),isHighlighted:Ye,isDimmed:ue,isHidden:ke,barPath:_t,isSmooth:ye.value&&Re>0})})})}return t}),lt=e.computed(()=>{if(!kn.value)return[];const t=tl.value.map((C,w)=>({series:C,originalIndex:w})).filter(({originalIndex:C})=>!at.value.has(C));if(t.length===0)return[];let a=we.value==="semi-radial"?Math.PI:-Math.PI/2;const n=we.value==="semi-radial"?Math.PI:Math.PI*2,i=[],p=(C,w,z,N,$,B)=>{const te=C+(w-C)/2,Se=w-C,Ye=Rt.value+Math.cos(C)*Wt.value,ue=kt.value+Math.sin(C)*Wt.value,ke=Rt.value+Math.cos(w)*Wt.value,Ne=kt.value+Math.sin(w)*Wt.value,ge=Rt.value+Math.cos(w)*ut.value,Qe=kt.value+Math.sin(w)*ut.value,Ze=Rt.value+Math.cos(C)*ut.value,Le=kt.value+Math.sin(C)*ut.value,_e=Se>Math.PI?1:0,Re=[`M ${Ye} ${ue}`,`A ${Wt.value} ${Wt.value} 0 ${_e} 1 ${ke} ${Ne}`,`L ${ge} ${Qe}`,`A ${ut.value} ${ut.value} 0 ${_e} 0 ${Ze} ${Le}`,"Z"].join(" "),_t=B||c(z);return{path:Re,color:_t,strokeWidth:Et.value,strokeColor:m(i.length,_t),value:$,seriesName:N,opacity:.8,isHighlighted:ce.value===z,isDimmed:ce.value!==null&&ce.value!==z,isHidden:!1,startAngle:C,endAngle:w,midAngle:te}};if(Fl.value){const{series:C,originalIndex:w}=t[0],z=Number(C?.data?.[0]??0),N=Number.isFinite(z)?Math.min(Math.max(z,0),100):0,$=Z.value,B=Math.min(Math.max(Number($?.miniRadial?.minVisiblePercent??1),0),100),Se=(N<=0?B:N)/100*n,Ye=Number($?.miniRadial?.thresholds?.low??33),ue=Number($?.miniRadial?.thresholds?.medium??66),ke=$?.miniRadial?.colors?.low||"#E53E3E",Ne=$?.miniRadial?.colors?.medium||"#ED8936",ge=$?.miniRadial?.colors?.high||"#38A169",Qe=N<=Ye?ke:N<=ue?Ne:ge,Ze=$?.miniRadial?.trackColor||"#E5E7EB",Le=C?.name||"Score";return i.push(p(a,a+n-.001,w+1,"Track",100,Ze)),i.push(p(a,a+Se,w,Le,N,Qe)),i}if(t.length===1){const{series:C,originalIndex:w}=t[0],z=C.data[0]||0,N=a,$=a+n-.001,B=N+n/2,te=Rt.value+Math.cos(N)*Wt.value,Se=kt.value+Math.sin(N)*Wt.value,Ye=Rt.value+Math.cos($)*Wt.value,ue=kt.value+Math.sin($)*Wt.value,ke=Rt.value+Math.cos($)*ut.value,Ne=kt.value+Math.sin($)*ut.value,ge=Rt.value+Math.cos(N)*ut.value,Qe=kt.value+Math.sin(N)*ut.value,Ze=1,Le=[`M ${te} ${Se}`,`A ${Wt.value} ${Wt.value} 0 ${Ze} 1 ${Ye} ${ue}`,`L ${ke} ${Ne}`,`A ${ut.value} ${ut.value} 0 ${Ze} 0 ${ge} ${Qe}`,"Z"].join(" "),_e=c(w);return i.push({path:Le,color:_e,strokeWidth:Et.value,strokeColor:m(0,_e),value:z,seriesName:C.name,opacity:.8,isHighlighted:ce.value===w,isDimmed:!1,isHidden:!1,startAngle:N,endAngle:$,midAngle:B}),i}if(cl.value&&t.length===2){const C=t[0],w=t[1],z=Math.min(100,Math.max(0,C.series.data[0]||0)),N=z/100*n;return i.push(p(a,a+N,C.originalIndex,C.series.name,z)),i.push(p(a,a+n,w.originalIndex,w.series.name,100)),i}const g=t.reduce((C,{series:w})=>C+(w.data[0]||0),0);return g===0?[]:(t.forEach(({series:C,originalIndex:w})=>{const z=C.data[0]||0,N=z/g*n,$=a,B=a+N,te=$+N/2,Se=Rt.value+Math.cos($)*Wt.value,Ye=kt.value+Math.sin($)*Wt.value,ue=Rt.value+Math.cos(B)*Wt.value,ke=kt.value+Math.sin(B)*Wt.value,Ne=Rt.value+Math.cos(B)*ut.value,ge=kt.value+Math.sin(B)*ut.value,Qe=Rt.value+Math.cos($)*ut.value,Ze=kt.value+Math.sin($)*ut.value,Le=N>Math.PI?1:0,_e=[`M ${Se} ${Ye}`,`A ${Wt.value} ${Wt.value} 0 ${Le} 1 ${ue} ${ke}`,`L ${Ne} ${ge}`,`A ${ut.value} ${ut.value} 0 ${Le} 0 ${Qe} ${Ze}`,"Z"].join(" "),Re=c(w);i.push({path:_e,color:Re,strokeWidth:Et.value,strokeColor:m(i.length,Re),value:z,seriesName:C.name,opacity:.8,isHighlighted:ce.value===w,isDimmed:ce.value!==null&&ce.value!==w,isHidden:!1,startAngle:$,endAngle:B,midAngle:te}),a=B}),i)}),Cn=e.computed(()=>{const t=lt.value;return cl.value&&t.length>=2?[{segment:t[1],originalIndex:1},{segment:t[0],originalIndex:0}]:t.map((a,n)=>({segment:a,originalIndex:n}))}),vn=e.computed(()=>{if(!Mt.value||!kn.value)return[];const t=on.value,a=An.value,n=Fn.value,i=Qn.value,p=15,g=t*1.3,C=.55,w=(B,te)=>{const Se=Rt.value+Math.cos(B.midAngle)*ut.value,Ye=kt.value+Math.sin(B.midAngle)*ut.value,ue=Rt.value+Math.cos(B.midAngle)*(ut.value+a),ke=kt.value+Math.sin(B.midAngle)*(ut.value+a),ge=ue+n*(te?1:-1),Qe=te?ue+p:ue-p,Ze=ke-i,Le=`${B.seriesName}: ${qt(B.value)}`,_e=Le.length*t*C;return{pointerStartX:Se,pointerStartY:Ye,pointerEndX:ue,pointerEndY:ke,horizontalEndX:ge,horizontalEndY:ke,textX:Qe,textY:Ze,text:Le,textWidth:_e,textAnchor:te?"start":"end",isRightSide:te,pointerLineLength:Math.hypot(ue-Se,ke-Ye),horizontalLineLength:Math.hypot(ge-ue,0)}},z=(B,te)=>{const Se=Math.abs(B.textY-te.textY)<g,Ye=B.isRightSide?B.textX:B.textX-B.textWidth,ue=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,ge=Ye<Ne&&ke<ue;return Se&&ge},N=lt.value.filter(B=>!B.isHidden),$=[];for(let B=0;B<N.length;B++){const te=N[B];let Se=Math.cos(te.midAngle)>=0;if(B>0){const ue=$[B-1],ke=w(te,Se);z(ue,ke)&&(Se=!Se)}const Ye=w(te,Se);$.push({...Ye,color:te.color,isHighlighted:te.isHighlighted,isDimmed:te.isDimmed})}return $}),rn=t=>{if(!t||t.isHidden)return 0;const a=t.opacity||jl.value||.7;return ce.value===null||ce.value===void 0?a:ce.value!==null?t.seriesIndex===ce.value?Math.min(1,a+.1):Math.max(.5,a*.8):a},gn=t=>{if(!t||t.isHidden)return 0;const a=t.radius>20?.9:.8;return ce.value!==null?t.seriesIndex===ce.value?Math.min(1,a+.1):a*.7:a},un=(t,a)=>{if(t)try{if(ce.value===t.seriesIndex?ce.value=null:ce.value=t.seriesIndex,typeof window<"u"&&window.dispatchEvent){const n=new CustomEvent("dss-bubble-click",{detail:{bubble:t,originalEvent:a,chartId:R.chartId}});window.dispatchEvent(n)}}catch(n){console.error("Error in onBubbleClick:",n)}},dn=(t,a)=>{const n=[`dss-bubble-fallback-${a}`];return t.isHighlighted&&n.push("dss-bubble-highlighted"),t.isDimmed&&n.push("dss-bubble-dimmed"),t.isHidden&&n.push("dss-bubble-hidden"),n.push(`dss-bubble-series-${t.seriesIndex}`),n.join(" ")},Yn=(t,a)=>{if(!t||(a.stopPropagation(),Ro.value=!0,ce.value=t.seriesIndex,st.value.show=!1,!Xe.value))return;const n=a.target.closest(".dss-custom-chart-container");if(!n)return;const i=n.getBoundingClientRect();let p=a.clientX-i.left+10,g=a.clientY-i.top-10;const C=200,w=120;p+C>Ee.value&&(p=a.clientX-i.left-C-10),g+w>i.height&&(g=a.clientY-i.top-w-10),p<0&&(p=10),g<0&&(g=10);const z=Qt.value,N=an.value,$=z.map(B=>{const te=N[B]||B,Se=ul(B,t);return Se?{seriesName:t.seriesName,label:t.label,value:`${te}: ${Se}`,color:t.color}:null}).filter(Boolean);ht.value={show:!0,x:p,y:g,title:t.label||t.seriesName||"",value:"",bubbleData:$,categoryIndex:void 0,spiderAreas:[]}},ul=(t,a)=>{let n;switch(t){case"x":n=a.originalX;break;case"y":n=a.originalY;break;case"size":n=a.originalSize;break;case"label":n=a.label;break;case"seriesName":n=a.seriesName;break;default:n=a[t]||""}const i=al.value[t];if(typeof i=="function")return i(n,a);if(typeof n=="number"){const p=n.toFixed(1);return ol.value?p+ol.value:p}return n?.toString()||""},hl=()=>{if(!jt.value||!st.value.data||st.value.data.length===0)return"Bubbles";const t=[],a=new Set;return st.value.data.forEach(n=>{if(n.seriesName&&n.label){const i=`${n.seriesName} - ${n.label}`;a.has(i)||(t.push(i),a.add(i))}else n.seriesName&&(a.has(n.seriesName)||(t.push(n.seriesName),a.add(n.seriesName)))}),t.length>0?t.join(" | "):"Bubbles"},yo=(t,a)=>{t&&(Ro.value=!1,ce.value=null,ht.value.show=!1,ht.value.bubbleData=[])},Ao=(t,a)=>{const n=a.target.closest(".dss-custom-chart-container");if(!n)return;const i=n.getBoundingClientRect(),p=Hl(t.categoryIndex),g=t.description||t.comment||"";let C=a.clientX-i.left+15,w=a.clientY-i.top-10;const z=200,N=g?80:50;C+z>Ee.value&&(C=a.clientX-i.left-z-15),w+N>Q.value&&(w=a.clientY-i.top-N-10),C<0&&(C=10),w<0&&(w=10),pn.value={show:!0,x:C,y:w,categoryValue:p,description:g}},jo=()=>{pn.value.show=!1},El=e.computed(()=>R.categories.length||Math.max(...nl.value.map(t=>t.data.length))),na=e.computed(()=>{let t=0;return nl.value.forEach(a=>{a.data.forEach(n=>{typeof n=="number"&&(t=Math.max(t,n))})}),t||100}),ko=e.computed(()=>{const t=[],a=El.value;for(let n=0;n<a;n++){const i=n*2*Math.PI/a-Math.PI/2,p=Rt.value+Math.cos(i)*ut.value,g=kt.value+Math.sin(i)*ut.value;t.push({x:p,y:g,angle:i,index:n})}return t}),Gl=e.computed(()=>{const t=[],a=El.value;return ko.value.forEach((n,i)=>{const p=ut.value+15,g=i*2*Math.PI/a-Math.PI/2,C=Rt.value+Math.cos(g)*p,w=kt.value+Math.sin(g)*p+5;let z="middle",N="middle";Math.abs(Math.cos(g))>.5&&(z=Math.cos(g)>0?"start":"end"),Math.abs(Math.sin(g))>.5&&(N=Math.sin(g)>0?"hanging":"auto"),t.push({x:C,y:w,text:R.categories[i]||`Axis ${i+1}`,anchor:z,baseline:N})}),t}),Do=e.ref(new Set),dl=(t,a,n)=>{const i=`current-${n}`,p=Do.value.has(i);return!p&&ce.value===null?a.fillOpacity||mt.value:a.isHighlighted||p?(a.fillOpacity||mt.value)+.15:a.isDimmed?(a.fillOpacity||mt.value)*.3:a.fillOpacity||mt.value},ll=e.computed(()=>{if(!Ln.value)return[];const t=[],a=El.value;return tl.value.forEach((n,i)=>{const p=[],g=[],C=[],w=ce.value===i,z=ce.value!==null&&ce.value!==i,N=at.value.has(i);for(let $=0;$<a;$++){const B=n.data[$]||0,Se=B/na.value*ut.value,Ye=$*2*Math.PI/a-Math.PI/2,ue=Rt.value+Math.cos(Ye)*Se,ke=kt.value+Math.sin(Ye)*Se;p.push(`${ue},${ke}`),g.push({x:ue,y:ke}),C.push({x:ue,y:ke,value:B,label:R.categories[$]||`Axis ${$+1}`,seriesName:n.name})}t.push({points:p.join(" "),polygonPoints:g,dataPoints:C,color:c(i),fillOpacity:mt.value,seriesName:n.name,value:`${n.name}: ${n.data.join(", ")}`,isHighlighted:w,isDimmed:z,isHidden:N,seriesIndex:i})}),t}),jn=(t,a)=>{if(!a||a.length<3)return!1;let n=!1;for(let i=0,p=a.length-1;i<a.length;p=i++){const g=a[i].x,C=a[i].y,w=a[p].x,z=a[p].y;C>t.y!=z>t.y&&t.x<(w-g)*(t.y-C)/(z-C)+g&&(n=!n)}return n},la=t=>{if(!Ln.value)return;const a=t.currentTarget.closest(".dss-custom-chart-container");if(!a)return;const n=a.getBoundingClientRect(),i=T.value?.getBoundingClientRect();if(!i)return;const p=t.clientX-i.left,g=t.clientY-i.top,C=ll.value.filter(w=>w.isHidden?!1:jn({x:p,y:g},w.polygonPoints));if(C.length>0){C.length,ce.value=C[0].seriesIndex;const w=t.clientX-n.left+10,z=t.clientY-n.top-10,N=C.length>1?460:260,$=70+El.value*20;let B=w,te=z;B+N>Ee.value&&(B=t.clientX-n.left-N-10),te+$>Q.value&&(te=t.clientY-n.top-$-10),B<0&&(B=10),te<0&&(te=10);const Se=C.map(Ye=>({seriesName:Ye.seriesName,color:Ye.color,points:Ye.dataPoints.map(ue=>({label:ue.label,value:qt(ue.value)}))}));ht.value={show:!0,x:B,y:te,title:"",value:"",bubbleData:[],spiderAreas:Se}}else yl()},Ho=e.computed(()=>{const t=Z.value;return t.logos.map((a,n)=>{const i=R.series[a.seriesIndex];if(!i||!i.data||i.data.length===0||at.value.has(a.seriesIndex))return null;let p,g;if(Sn.value){let w=-1,z=null;for(let $=i.data.length-1;$>=0;$--)if(i.data[$]!==null&&i.data[$]!==void 0){w=$,z=i.data[$];break}if(w===-1||z===null)return null;const N=i.data.map(($,B)=>$==null?null:{x:Kt(B),y:xn(i,$),index:B}).filter($=>$!==null);if(t.animations.enabled&&!Sl.value&&t.animations.type==="draw"&&t.chart.type==="line"&&(Ft.value.isAnimating||!Ft.value.hasAnimated))if(Ft.value.isAnimating){const $=Ft.value.currentFrame/Ft.value.totalFrames,B=Qo(t.animations.easing,Math.min($,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=wn(z)+(a.offsetY||0)}else if(kn.value||Ln.value){const w=Math.PI*2/t.logos.length*n;p=Rt.value+Math.cos(w)*(ut.value+30)+(a.offsetX||0),g=kt.value+Math.sin(w)*(ut.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}`),n=document.querySelector(`.dss-logo-image-${t}`);a&&(a.style.opacity="0"),n&&(n.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(!ht.value.show&&!(Ke.value&&st.value.show&&!ae.value.isZooming))return{display:"none"};let t,a;if(Ke.value&&st.value.show&&!ae.value.isZooming){t=st.value.x+15,a=F.value.top;const n=jt.value?200:150;t+n>Ee.value&&(t=st.value.x-n-15),t<0&&(t=10),a<10&&(a=10)}else t=ht.value.x,a=ht.value.y;return{left:t+"px",top:a+"px"}}),Ll=(t,a)=>{if(!Xe.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 C=200,w=120,z=Ee.value,N=Q.value;p+C>z&&(p=a.clientX-i.left-C-10),g+w>N&&(g=a.clientY-i.top-w-10),p<0&&(p=10),g<0&&(g=10);let $;typeof t.categoryIndex=="number"?$=t.categoryIndex:typeof t.dataIndex=="number"?$=t.dataIndex:t.label&&R.categories.includes(t.label)&&($=R.categories.indexOf(t.label));const B=(Jt.value||we.value==="bar")&&t.label?t.label:t.seriesName||t.label||"";ht.value={show:!0,x:p,y:g,title:B,value:qt(t.value)||"",categoryIndex:$,spiderAreas:[]}},Go=e.ref(!1),Ro=e.ref(!1),yl=()=>{ht.value.show=!1,ht.value.spiderAreas=[],ht.value.bubbleData=[],st.value.show=!1,Go.value||(ce.value=null)},Co=e.ref(!1),bo=(t,a)=>{Co.value=!0,ht.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 C=250;p+C>Ee.value&&(p=a.clientX-i.left-C-15),p<0&&(p=10),g<0&&(g=10),yn.value={show:!0,x:p,y:g,content:t.texts,count:t.totalCount}},wo=()=>{Co.value=!1,yn.value.show=!1},Ft=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}},Sl=e.computed(()=>Oe.value?window.matchMedia("(prefers-reduced-motion: reduce)").matches:!1),oa=()=>{if(!vt.value||Sl.value){Ft.value.hasAnimated=!0,el.value&&(xl.value=1);return}el.value&&(xl.value=0),Ft.value.isAnimating=!0,Ft.value.currentFrame=0,Ft.value.totalFrames=Math.ceil(S.value/16.67);const t=()=>{const a=Ft.value.currentFrame/Ft.value.totalFrames,n=Qo(V.value,Math.min(a,1));ya(n),el.value&&(xl.value=n),a<1?(Ft.value.currentFrame++,Ft.value.animationId=requestAnimationFrame(t)):ka()};Ft.value.animationId=requestAnimationFrame(t)},ya=t=>{const a=I.value;a&&a.style.setProperty("--dss-animation-progress",t)},ka=()=>{Ft.value.isAnimating=!1,Ft.value.hasAnimated=!0,el.value&&(xl.value=1),Ft.value.animationId&&(cancelAnimationFrame(Ft.value.animationId),Ft.value.animationId=null)},Jo=e.computed(()=>!kn.value||Ft.value.hasAnimated?!0:el.value?xl.value>=1:Pn.value?Bl.value>=1:!0),aa=e.computed(()=>Mt.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(!vt.value||Sl.value||Ft.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(!vt.value||Sl.value)return"";const t=["dss-chart-animated"];return Ft.value.hasAnimated||t.push(`dss-animate-${Gt.value}`),Ft.value.hasAnimated||(kn.value&&we.value!=="semi-radial"?t.push("dss-animate-fill"):kn.value||t.push(`dss-animate-${Gt.value}`)),Ft.value.isAnimating&&t.push("dss-is-animating"),t.join(" ")};e.watch(()=>R.series,(t,a)=>{ne.value&&a&&Ft.value.hasAnimated&&(Ft.value.hasAnimated=!1,e.nextTick(()=>{setTimeout(()=>oa(),b.value)}))},{deep:!0}),e.watch(()=>ae.value.isZooming,(t,a)=>{a&&!t&&setTimeout(()=>{Rl()},50)}),e.watch(()=>[ae.value.scale,ae.value.offsetX],()=>{!ae.value.isZooming&&!ae.value.isDragging&&Rl()},{flush:"post"}),e.watch([Dt,He],([t,a])=>{ae.value.minScale=t,ae.value.maxScale=a,(ae.value.scale<t||ae.value.scale>a)&&uo()},{immediate:!0}),e.watch(()=>R.locale,t=>{t&&t!==L.value&&(L.value=t)},{immediate:!0}),e.watch(()=>gt.value.show,t=>{t?e.nextTick(()=>{document.addEventListener("click",io)}):document.removeEventListener("click",io)}),e.onMounted(()=>{ce.value=null,el.value&&(!vt.value||Sl.value)&&(xl.value=1),x(),I.value&&typeof ResizeObserver<"u"&&(f=new ResizeObserver(t=>{const a=t[0];!a||!a.contentRect||(be&&cancelAnimationFrame(be),be=requestAnimationFrame(()=>{be=null;const{width:n,height:i}=a.contentRect;dt.value=Math.round(n),ee.value=Math.round(i),fe.value&&(Me.value=fe.value.offsetHeight||Ce)}))}),f.observe(I.value)),vt.value&&!Sl.value?we.value==="semi-radial"?setTimeout(()=>Xo(),b.value):setTimeout(()=>oa(),b.value):(Ft.value.hasAnimated=!0,we.value==="semi-radial"&&(Bl.value=1)),document.addEventListener("mousemove",sa),document.addEventListener("mouseup",ra),document.addEventListener("click",Eo)}),e.onUnmounted(()=>{be&&cancelAnimationFrame(be),f&&I.value&&(f.unobserve(I.value),f.disconnect(),f=null),Ft.value.animationId&&cancelAnimationFrame(Ft.value.animationId),Pl&&(cancelAnimationFrame(Pl),Pl=null),ae.value.zoomTimeout&&clearTimeout(ae.value.zoomTimeout),document.removeEventListener("mousemove",sa),document.removeEventListener("mouseup",ra),document.removeEventListener("click",Eo),document.removeEventListener("click",io)});const sa=t=>{if(ae.value.isDragging&&ae.value.scale>1&&Sn.value){st.value.show=!1;const a=t.clientX-ae.value.lastMouseX,{minX:n,maxX:i}=Xt.value,p=i-n||1,C=a*.8;ae.value.offsetX+=C;const w=p/ae.value.scale,z=p-w,N=0,$=-z/p*F.value.width,B=N;ae.value.offsetX=Math.max($,Math.min(B,ae.value.offsetX)),ae.value.lastMouseX=t.clientX,ae.value.lastMouseY=t.clientY}},ra=()=>{ae.value.isDragging&&(ae.value.isDragging=!1,setTimeout(()=>{!ae.value.isDragging&&ae.value.isZooming},100))},xa=(t,a)=>{const n=t.filter(w=>w!=null);if(!n||n.length===0)return{x:0,y:0};if(n.length===1||a<=0)return n[0];if(a>=1)return n[n.length-1];let i=0;const p=[];for(let w=1;w<n.length;w++){const z=n[w].x-n[w-1].x,N=n[w].y-n[w-1].y,$=Math.sqrt(z*z+N*N);p.push($),i+=$}const g=i*a;let C=0;for(let w=0;w<p.length;w++){const z=C+p[w];if(g<=z){const N=(g-C)/p[w],$=n[w],B=n[w+1];return{x:$.x+(B.x-$.x)*N,y:$.y+(B.y-$.y)*N}}C=z}return n[n.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":Ue.value,"dss-chart-fill-height":qe.value,"dss-chart-compact":kn.value&&!J.value}]]),style:e.normalizeStyle({width:Ue.value?"100%":Ee.value+"px",height:ze.value,...Ue.value||qe.value?{overflow:kn.value?"visible":"hidden",maxWidth:"100%",maxHeight:"100%"}:{},...Ca.value,cursor:Zo()}),"data-chart-type":we.value,ref_key:"containerEl",ref:I,onWheel:So,onMousedown:co,onMousemove:zn,onMouseup:Vo,onMouseleave:Dl,onDblclick:uo,onContextmenu:e.withModifiers(Nl,["prevent"]),onClick:e.withModifiers(Zn,["left"]),onWheelCapture:So},[e.createElementVNode("div",{class:"dss-chart-header",ref_key:"headerEl",ref:fe},[e.createElementVNode("div",gs,[ot.value?(e.openBlock(),e.createElementBlock("div",hs,e.toDisplayString(ot.value),1)):e.createCommentVNode("",!0),bt.value?(e.openBlock(),e.createElementBlock("div",ys,e.toDisplayString(bt.value),1)):e.createCommentVNode("",!0)]),J.value&&he.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":he.value==="top","dss-legend-bottom":he.value==="bottom"}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.series,(n,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":ce.value===i,"dss-legend-dimmed":ce.value!==null&&ce.value!==i}]),onClick:p=>Ko(i),onMouseenter:p=>In(i),onMouseleave:cn,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",Cs,e.toDisplayString(n.name),1)],46,ks))),128))],2)):e.createCommentVNode("",!0),J.value&&(he.value==="left"||he.value==="right")?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-chart-legend-side",{"dss-legend-left":he.value==="left","dss-legend-right":he.value==="right"}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.series,(n,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":ce.value===i,"dss-legend-dimmed":ce.value!==null&&ce.value!==i}]),onClick:p=>Ko(i),onMouseenter:p=>In(i),onMouseleave:cn,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",ws,e.toDisplayString(n.name),1)],46,bs))),128))],2)):e.createCommentVNode("",!0)],512),D.showAddMarkerButton&&wt.value&&Ct.value.addMarker&&(Sn.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:Bt.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,Es),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,xs)):e.createCommentVNode("",!0),e.createElementVNode("div",Ss,[jt.value&&It.value?(e.openBlock(),e.createElementBlock("div",Vs,"Bubble size: "+e.toDisplayString(It.value),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{width:Ee.value,height:Q.value,class:"dss-chart-svg","data-smooth":ye.value,"data-animated":vt.value,ref_key:"svgEl",ref:T},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",{id:U.value},[e.createElementVNode("rect",{x:0,y:F.value.top,width:Ee.value,height:F.value.height*4},null,8,Ms)],8,Bs),Pn.value?(e.openBlock(),e.createElementBlock("clipPath",{key:0,id:Yl.value},[e.createElementVNode("path",{d:bl.value},null,8,$s)],8,_s)):e.createCommentVNode("",!0),el.value?(e.openBlock(),e.createElementBlock("clipPath",{key:1,id:Ml.value},[e.createElementVNode("path",{d:zl.value},null,8,Ts)],8,Ls)):e.createCommentVNode("",!0)]),Sn.value||jt.value?(e.openBlock(),e.createElementBlock("g",As,[Ot.value?(e.openBlock(),e.createElementBlock("g",{key:0,class:"dss-grid-lines","clip-path":me.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(To.value,(n,i)=>(e.openBlock(),e.createElementBlock("line",{key:`h-grid-${i}`,x1:F.value.left,x2:F.value.right,y1:n.y,y2:n.y,stroke:"#e0e0e0","stroke-width":"1","stroke-dasharray":"4,2",style:e.normalizeStyle({animationDelay:`${i*50}ms`})},null,12,Hs))),128))],8,Ds)):e.createCommentVNode("",!0),e.createElementVNode("g",Rs,[e.createElementVNode("line",{x1:F.value.left,x2:F.value.right,y1:F.value.bottom,y2:F.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,Fs),e.createElementVNode("line",{x1:F.value.left,x2:F.value.left,y1:F.value.top,y2:F.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,Is),Hn.value?(e.openBlock(),e.createElementBlock("line",{key:0,x1:F.value.right,x2:F.value.right,y1:F.value.top,y2:F.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,zs)):e.createCommentVNode("",!0)]),e.createElementVNode("g",Ps,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(n,i)=>(e.openBlock(),e.createElementBlock("text",{key:`x-${i}`,x:n.x,y:n.y,"text-anchor":"middle","font-size":"12",fill:"#666",style:e.normalizeStyle({animationDelay:`${i*100}ms`})},e.toDisplayString(n.text),13,Os))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(n,i)=>(e.openBlock(),e.createElementBlock("text",{key:`y-${i}`,x:n.x,y:n.y,"text-anchor":"end","font-size":"12",fill:"#666","dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${i*80}ms`})},e.toDisplayString(n.text),13,qs))),128)),Hn.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.value,(n,i)=>(e.openBlock(),e.createElementBlock("text",{key:`y-secondary-${i}`,x:n.x,y:n.y,"text-anchor":"start","font-size":"12",fill:"#666","dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${i*80}ms`})},e.toDisplayString(n.text),13,Ws))),128)):e.createCommentVNode("",!0),en.value?(e.openBlock(),e.createElementBlock("text",{key:1,x:F.value.left+F.value.width/2,y:F.value.bottom+45,"text-anchor":"middle","font-size":"14","font-weight":"bold",fill:"#333"},e.toDisplayString(en.value),9,Zs)):e.createCommentVNode("",!0),Pt.value?(e.openBlock(),e.createElementBlock("text",{key:2,x:15,y:F.value.top+12+F.value.height/2,"text-anchor":"middle","font-size":"14","font-weight":"bold",fill:"#333",transform:`rotate(-90, 15, ${F.value.top+F.value.height/2})`},e.toDisplayString(Pt.value),9,Us)):e.createCommentVNode("",!0),Hn.value&&ve.value?(e.openBlock(),e.createElementBlock("text",{key:3,x:Ee.value-15,y:F.value.top+12+F.value.height/2,"text-anchor":"middle","font-size":"14","font-weight":"bold",fill:"#333",transform:`rotate(90, ${Ee.value-15}, ${F.value.top+F.value.height/2})`},e.toDisplayString(ve.value),9,Xs)):e.createCommentVNode("",!0)]),Jn.value.length>0?(e.openBlock(),e.createElementBlock("g",Ys,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Jn.value,n=>(e.openBlock(),e.createElementBlock("g",{key:`flag-group-${n.categoryIndex}`},[e.createElementVNode("g",{"clip-path":me.value},[n.hasManual?(e.openBlock(),e.createElementBlock("line",{key:0,x1:n.x,x2:n.x,y1:F.value.bottom,y2:F.value.top,stroke:"#698dbe","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:i=>bo(n,i),onMouseleave:wo},null,40,Ks)):e.createCommentVNode("",!0),n.hasAuto&&!n.hasManual?(e.openBlock(),e.createElementBlock("line",{key:1,x1:n.x,x2:n.x,y1:F.value.bottom,y2:F.value.top,stroke:"#a1d499","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:i=>bo(n,i),onMouseleave:wo},null,40,Gs)):e.createCommentVNode("",!0),n.hasAuto&&n.hasManual?(e.openBlock(),e.createElementBlock("line",{key:2,x1:n.x,x2:n.x,y1:F.value.bottom,y2:F.value.top,stroke:"#698dbe","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:i=>bo(n,i),onMouseleave:wo},null,40,Qs)):e.createCommentVNode("",!0)],8,js),n.hasManual&&n.hasAuto?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:n.x+8,cy:Math.max(15,F.value.top-10),r:"14",fill:"#a1d499",stroke:"#fafafa","stroke-width":"2",class:"flag-count-circle",onMouseover:i=>bo(n,i),onMouseleave:wo},null,40,Js)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:n.x,cy:Math.max(15,F.value.top-10),r:"14",fill:n.hasManual&&n.hasAuto||n.hasManual?"#698dbe":"#a1d499",stroke:"#fafafa","stroke-width":"2",class:"dss-flag-count-indicator",onMouseover:i=>bo(n,i),onMouseleave:wo},null,40,er),e.createElementVNode("text",{x:n.x,y:Math.max(15,F.value.top-5),"text-anchor":"middle","font-size":"12","font-weight":"bold",fill:"#fafafa",class:"dss-flag-count-text","pointer-events":"none"},e.toDisplayString(n.totalCount),9,tr)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",{class:"dss-chart-data","clip-path":me.value},[Xn.value?(e.openBlock(),e.createElementBlock("g",lr,[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,(n,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`mixed-bar-${i}`},[n.isSmooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:n.barPath,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":n.isHighlighted,"dss-bar-dimmed":n.isDimmed,"dss-bar-hidden":n.isHidden}),style:e.normalizeStyle({fill:n.color,fillOpacity:n.isDimmed?.4:1,animationDelay:`${n.animationDelay}ms`}),onMouseover:p=>Ll(n,p),onMouseleave:yl},null,46,or)):(e.openBlock(),e.createElementBlock("rect",{key:1,x:n.x,y:n.y,width:n.width,height:n.height,fill:n.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":n.isHighlighted,"dss-bar-dimmed":n.isDimmed,"dss-bar-hidden":n.isHidden}),style:e.normalizeStyle({animationDelay:`${n.animationDelay}ms`}),onMouseover:p=>Ll(n,p),onMouseleave:yl},null,46,ar))],64))),128))],2),e.createElementVNode("g",sr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(n,i)=>(e.openBlock(),e.createElementBlock("path",{key:`mixed-line-${i}`,d:n.path,stroke:n.color,"stroke-width":n.isHighlighted?Pe.value+2:Pe.value,"stroke-dasharray":n.strokeDasharray,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":n.isHighlighted,"dss-series-dimmed":n.isDimmed,"dss-series-hidden":n.isHidden}),style:e.normalizeStyle({"--dss-path-length":n.pathLength,animationDelay:`${n.animationDelay}ms`})},null,14,rr))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(n,i)=>(e.openBlock(),e.createElementBlock("path",{key:`mixed-gap-connector-${i}`,d:n.path,stroke:n.color,"stroke-width":n.isHighlighted?Pe.value+2:Pe.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":"15, 10, 5, 10",opacity:n.isHighlighted?0:.5,class:e.normalizeClass({"dss-gap-connector":!0,"dss-series-dimmed":n.isDimmed,"dss-series-hidden":n.isHidden}),style:e.normalizeStyle({animationDelay:`${n.animationDelay}ms`,transition:"opacity 0.2s ease"})},null,14,ir))),128)),St.value>0||K.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(se.value,(n,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`mixed-point-${i}`,cx:n.x,cy:n.y,r:X(n.isHighlighted?W(n,St.value)+2:W(n,St.value)),fill:n.color,stroke:"none",class:e.normalizeClass({"dss-point-highlighted":n.isHighlighted,"dss-point-dimmed":n.isDimmed,"dss-point-hidden":n.isHidden}),style:e.normalizeStyle({animationDelay:`${n.animationDelay}ms`}),onMouseover:p=>Ll(n,p),onMouseleave:yl},null,46,cr))),128)):e.createCommentVNode("",!0)])])):we.value==="line"?(e.openBlock(),e.createElementBlock("g",ur,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.value,(n,i)=>(e.openBlock(),e.createElementBlock("path",{key:`anim-${i}`,d:n.path,stroke:n.color,"stroke-width":Pe.value,"stroke-dasharray":n.strokeDasharray,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass(["dss-line-animation-overlay",{"dss-animation-complete":Ft.value.hasAnimated}]),style:e.normalizeStyle({"--dss-path-length":n.pathLength,animationDelay:`${n.animationDelay}ms`})},null,14,dr))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(n,i)=>(e.openBlock(),e.createElementBlock("path",{key:`line-${i}`,d:n.path,stroke:n.color,"stroke-width":n.isHighlighted?Pe.value+2:Pe.value,"stroke-dasharray":n.strokeDasharray,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":n.isHighlighted,"dss-series-dimmed":n.isDimmed,"dss-series-hidden":n.isHidden}),style:e.normalizeStyle({"--dss-path-length":n.pathLength,animationDelay:`${n.animationDelay}ms`})},null,14,mr))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(n,i)=>(e.openBlock(),e.createElementBlock("path",{key:`gap-connector-${i}`,d:n.path,stroke:n.color,"stroke-width":n.isHighlighted?Pe.value+2:Pe.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":"15, 10, 5, 10",opacity:n.isHighlighted?0:.5,class:e.normalizeClass({"dss-gap-connector":!0,"dss-series-dimmed":n.isDimmed,"dss-series-hidden":n.isHidden}),style:e.normalizeStyle({animationDelay:`${n.animationDelay}ms`,transition:"opacity 0.2s ease"})},null,14,pr))),128)),St.value>0||K.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(E.value,(n,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`point-${i}`,cx:n.x,cy:n.y,r:X(n.isHighlighted?W(n,St.value)+2:W(n,St.value)),fill:n.color,stroke:"none",class:e.normalizeClass({"dss-point-highlighted":n.isHighlighted,"dss-point-dimmed":n.isDimmed,"dss-point-hidden":n.isHidden}),style:e.normalizeStyle({animationDelay:`${n.animationDelay}ms`}),onMouseover:p=>Ll(n,p),onMouseleave:yl},null,46,fr))),128)):e.createCommentVNode("",!0)])):we.value==="area"?(e.openBlock(),e.createElementBlock("g",vr,[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ie.value,(n,i)=>(e.openBlock(),e.createElementBlock("mask",{key:`mask-${i}`,id:`area-mask-${i}-${D.chartId}`},[e.createElementVNode("rect",{x:F.value.left-10,y:F.value.top-10,width:F.value.width+20,height:F.value.height+20,fill:"#fafafa",class:"dss-area-mask-rect",style:e.normalizeStyle({"--dss-mask-width":`${F.value.width+20}px`})},null,12,hr)],8,gr))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ie.value,(n,i)=>(e.openBlock(),e.createElementBlock("path",{key:`area-fill-${i}`,d:n.areaPath,fill:n.color,"fill-opacity":n.isHighlighted?pe.value+.2:pe.value,mask:`url(#area-mask-${i}-${D.chartId})`,class:e.normalizeClass({"dss-area-fill-smooth":!0,"dss-series-highlighted":n.isHighlighted,"dss-series-dimmed":n.isDimmed,"dss-series-hidden":n.isHidden})},null,10,yr))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ie.value,(n,i)=>(e.openBlock(),e.createElementBlock("path",{key:`area-line-${i}`,d:n.linePath,stroke:n.color,"stroke-width":n.isHighlighted?Pe.value+1:Pe.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-area-line-animated":!0,"dss-series-highlighted":n.isHighlighted,"dss-series-dimmed":n.isDimmed,"dss-series-hidden":n.isHidden}),style:e.normalizeStyle({"--dss-path-length":n.pathLength,animationDelay:`${i*Y.value}ms`})},null,14,kr))),128))])):we.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,(n,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bar-${i}`},[n.isSmooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:n.barPath,fill:n.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":n.isHighlighted,"dss-bar-dimmed":n.isDimmed,"dss-bar-hidden":n.isHidden}),style:e.normalizeStyle({animationDelay:`${n.animationDelay}ms`}),onMouseover:p=>Ll(n,p),onMouseleave:yl},null,46,Cr)):(e.openBlock(),e.createElementBlock("rect",{key:1,x:n.x,y:n.y,width:n.width,height:n.height,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":n.isHighlighted,"dss-bar-dimmed":n.isDimmed,"dss-bar-hidden":n.isHidden}),style:e.normalizeStyle({fill:n.color,fillOpacity:n.isDimmed?.4:1,animationDelay:`${n.animationDelay}ms`}),onMouseover:p=>Ll(n,p),onMouseleave:yl},null,46,br))],64))),128))],2)):e.createCommentVNode("",!0)],8,nr),Ke.value&&st.value.show&&!ae.value.isZooming?(e.openBlock(),e.createElementBlock("g",{key:2,class:"dss-crosshair","clip-path":me.value},[e.createElementVNode("line",{x1:st.value.x,x2:st.value.x,y1:F.value.top,y2:F.value.bottom,stroke:Lt.value,"stroke-width":"1","stroke-dasharray":"4,4",opacity:"0.8"},null,8,xr),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(st.value.data,(n,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`dss-crosshair-point-${i}`,cx:st.value.x,cy:n.y,r:X(St.value+2),fill:n.color,stroke:"none",opacity:"0.9"},null,8,Er))),128))],8,wr)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),jt.value?(e.openBlock(),e.createElementBlock("g",Sr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,(n,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bubble-${i}`},[n?(e.openBlock(),e.createElementBlock("g",Vr,[e.createElementVNode("circle",{cx:n.x,cy:n.y,r:X(n.radius),fill:n.color,"fill-opacity":rn(n),stroke:n.color,"stroke-width":"1","stroke-opacity":"0.8",class:e.normalizeClass(dn(n,i)),style:{cursor:"pointer",transition:"all 0.3s ease"},onMouseenter:p=>Yn(n,p),onMouseleave:p=>yo(n),onClick:p=>un(n,p)},null,42,Nr),n.imageUrl?(e.openBlock(),e.createElementBlock("image",{key:0,x:n.x-n.radius*.65,y:n.y-n.radius*.65,width:n.radius*1.3,height:n.radius*1.3,"xlink:href":n.imageUrl,class:e.normalizeClass(`dss-bubble-image-${i} ${n.isHighlighted?"dss-bubble-highlighted":""} ${n.isDimmed?"dss-bubble-dimmed":""} ${n.isHidden?"dss-bubble-hidden":""}`),"clip-path":`circle(${n.radius*.65}px at ${n.radius*.65}px ${n.radius*.65}px)`,style:e.normalizeStyle({cursor:"pointer",transition:"all 0.3s ease",opacity:gn(n)}),onLoad:p=>Mo(i),onError:p=>po(i),onMouseenter:p=>Yn(n,p),onMouseleave:p=>yo(n),onClick:p=>un(n,p)},null,46,Br)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0),kn.value?(e.openBlock(),e.createElementBlock("g",{key:2,class:"radial-chart",transform:nn.value},[we.value==="radial"?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:Rt.value,cy:kt.value,r:ut.value,fill:"none",stroke:"#e0e0e0","stroke-width":"1"},null,8,_r)):e.createCommentVNode("",!0),e.createElementVNode("g",{class:"dss-radial-data","data-chart-type":we.value,"clip-path":No.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Cn.value,(n,i)=>(e.openBlock(),e.createElementBlock("path",{key:`radial-${n.originalIndex}-${i}`,d:n.segment.path,fill:n.segment.color,"fill-opacity":n.segment.isHighlighted?(n.segment.opacity||.8)+.2:n.segment.opacity||.8,stroke:n.segment.strokeWidth?n.segment.strokeColor||n.segment.color:"none","stroke-width":n.segment.strokeWidth||0,"clip-path":Uo(n.originalIndex),class:e.normalizeClass({"dss-series-highlighted":n.segment.isHighlighted,"dss-series-dimmed":n.segment.isDimmed,"dss-series-hidden":n.segment.isHidden}),onMouseover:p=>Ll(n.segment,p),onMouseleave:yl},null,42,Lr))),128))],8,$r),En.value&&Jo.value?(e.openBlock(),e.createElementBlock("g",Tr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ao.value,(n,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("text",{key:`radial-segment-label-${i}`,x:n.x,y:n.y,"text-anchor":"middle","dominant-baseline":"middle",class:"dss-radial-segment-data-label",style:e.normalizeStyle({fill:n.contrastColor})},e.toDisplayString(n.value),13,Ar)),[[e.vShow,n.show]])),128))])):e.createCommentVNode("",!0),ql.value&&(Jo.value||Pn.value||Fl.value)?(e.openBlock(),e.createElementBlock("text",{key:2,x:ml.value.x,y:ml.value.y,"text-anchor":"middle","dominant-baseline":"middle","font-size":Wl.value,fill:Vl.value,class:"dss-radial-data-center"},e.toDisplayString(Al.value),9,Dr)):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(vn.value,(n,i)=>(e.openBlock(),e.createElementBlock("g",{key:`radial-label-${i}`,class:e.normalizeClass(["dss-radial-label-group",{"dss-label-highlighted":n.isHighlighted,"dss-label-dimmed":n.isDimmed}]),style:e.normalizeStyle({"--label-delay":`${i*.08}s`})},[e.createElementVNode("line",{class:"dss-radial-label-line dss-radial-label-line-pointer",x1:n.pointerStartX,y1:n.pointerStartY,x2:n.pointerEndX,y2:n.pointerEndY,stroke:n.color,"stroke-width":"1.5",opacity:"0.8",style:e.normalizeStyle({"--line-length":n.pointerLineLength})},null,12,Hr),e.createElementVNode("line",{class:"dss-radial-label-line dss-radial-label-line-horizontal",x1:n.pointerEndX,y1:n.pointerEndY,x2:n.horizontalEndX,y2:n.horizontalEndY,stroke:n.color,"stroke-width":"1.5",opacity:"0.8",style:e.normalizeStyle({"--line-length":n.horizontalLineLength})},null,12,Rr),e.createElementVNode("text",{class:"dss-radial-label-text",x:n.textX,y:n.textY,"text-anchor":n.textAnchor,"font-size":on.value,"dominant-baseline":"middle"},e.toDisplayString(n.text),9,Fr)],6))),128))],2)):e.createCommentVNode("",!0)],8,Mr)):e.createCommentVNode("",!0),Ln.value?(e.openBlock(),e.createElementBlock("g",{key:3,class:"dss-spider-chart",transform:nn.value},[Ot.value?(e.openBlock(),e.createElementBlock("g",zr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(We.value,(n,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-grid-circle-${i}`,cx:Rt.value,cy:kt.value,r:X(n),fill:"none",stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${i*150}ms`})},null,12,Pr))),128)),e.createElementVNode("g",Or,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(We.value,(n,i)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-grid-label-group-${i}`},[e.createElementVNode("rect",{x:Rt.value-16,y:kt.value-n-7,width:"32",height:"16",fill:"transparent",stroke:"none"},null,8,qr),e.createElementVNode("text",{x:Rt.value,y:kt.value-n+2,"text-anchor":"middle","dominant-baseline":"central",class:"dss-spider-grid-label",style:{fontSize:"10px",fill:"#999",fontWeight:"600"}},e.toDisplayString(Vt(i)),9,Wr)]))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ko.value,(n,i)=>(e.openBlock(),e.createElementBlock("line",{key:`spider-axis-${i}`,x1:Rt.value,x2:n.x,y1:kt.value,y2:n.y,stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${i*100}ms`})},null,12,Zr))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",Ur,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Gl.value,(n,i)=>(e.openBlock(),e.createElementBlock("text",{key:`spider-label-${i}`,x:n.x+Math.cos(i*2*Math.PI/El.value-Math.PI/2)*16,y:n.y+Math.sin(i*2*Math.PI/El.value-Math.PI/2)*16,"text-anchor":n.anchor,"dominant-baseline":n.baseline,"font-size":"14px",fill:"#666","font-weight":"500",style:e.normalizeStyle({animationDelay:`${i*120}ms`})},e.toDisplayString(n.text.charAt(0).toUpperCase()+n.text.slice(1)),13,Xr))),128))]),e.createElementVNode("g",{class:"dss-spider-data",onMousemove:la,onMouseleave:yl},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ll.value,(n,i)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-${i}`},[e.createElementVNode("polygon",{points:n.points,fill:n.color,"fill-opacity":dl("current",n,i),stroke:n.color,"stroke-width":n.isHighlighted?Pe.value+1:Pe.value,"stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":n.isHighlighted,"dss-series-dimmed":n.isDimmed,"dss-series-hidden":n.isHidden}),style:e.normalizeStyle({animationDelay:`${i*Y.value}ms`,transition:"all 0.2s ease"})},null,14,Yr),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataPoints,(p,g)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-point-${i}-${g}`,cx:p.x,cy:p.y,r:X(n.isHighlighted?St.value+1:St.value>0?St.value:0),fill:n.color,stroke:"none",class:e.normalizeClass({"dss-point-highlighted":n.isHighlighted,"dss-point-dimmed":n.isDimmed,"dss-point-hidden":n.isHidden}),style:e.normalizeStyle({animationDelay:`${i*Y.value+g*50}ms`,transition:"all 0.2s ease"}),onMouseover:C=>Ll(p,C),onMouseleave:yl},null,46,jr))),128))]))),128))],32)],8,Ir)):e.createCommentVNode("",!0),e.createElementVNode("g",Kr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ho.value,(n,i)=>(e.openBlock(),e.createElementBlock("circle",{key:`logo-fallback-${i}`,cx:n.x,cy:n.y,r:X(n.width/2),fill:c(n.seriesIndex),stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass(`logo-fallback-${i}`),style:e.normalizeStyle({animationDelay:`${i*200}ms`})},null,14,Gr))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ho.value,(n,i)=>(e.openBlock(),e.createElementBlock("image",{key:`logo-${i}`,x:n.x-n.width/2,y:n.y-n.height/2,width:n.width,height:n.height,"xlink:href":n.url,onLoad:p=>va(i),onError:p=>ga(i),preserveAspectRatio:"xMidYMid slice",class:e.normalizeClass(`dss-logo-image-${i}`),"clip-path":`circle(${n.width/2}px at ${n.width/2}px ${n.height/2}px)`,style:e.normalizeStyle({animationDelay:`${i*200}ms`})},null,46,Qr))),128))])],8,Ns))]),Rn.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-chart-watermark",style:e.normalizeStyle({position:"absolute",top:"0px",left:"0px",width:Ee.value+"px",height:Q.value+"px",backgroundImage:`url('${tt.value}')`,backgroundRepeat:"no-repeat",...ie.value,opacity:Nn.value,pointerEvents:"none",zIndex:10})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(qn.value,(n,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:"marker-"+n.id,class:"dss-chart-marker",style:e.normalizeStyle({position:"absolute",left:n.x+"px",top:n.y+"px",width:Tn.value+"px",height:Tn.value+"px",backgroundColor:"#fafafa",borderRadius:"50%",border:"2px solid #ddd",cursor:"pointer",zIndex:500}),onClick:e.withModifiers(p=>y(n),["stop"]),onMouseenter:p=>Ao(n,p),onMouseleave:jo},[e.createElementVNode("img",{src:sl(n),class:"dss-marker-icon",alt:"Marker Icon",style:{width:"100%",height:"100%","object-fit":"contain","border-radius":"50%","pointer-events":"none"}},null,8,ei)],44,Jr)),[[e.vShow,ln.value]])),128)),pn.value.show?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-marker-tooltip",style:e.normalizeStyle({left:pn.value.x+"px",top:pn.value.y+"px"})},[e.createElementVNode("div",ti,e.toDisplayString(pn.value.categoryValue),1),pn.value.description?(e.openBlock(),e.createElementBlock("div",ni,e.toDisplayString(pn.value.description),1)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),Xe.value&&(ht.value.show||Ke.value&&st.value.show&&!ae.value.isZooming)?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["dss-chart-tooltip",{"dss-crosshair-tooltip":Ke.value&&st.value.show&&!ae.value.isZooming,"dss-spider-tooltip":Ln.value&&ht.value.spiderAreas&&ht.value.spiderAreas.length>0}]),style:e.normalizeStyle(ha.value)},[!Ke.value||!st.value.show||ae.value.isZooming?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[Ln.value&&ht.value.spiderAreas&&ht.value.spiderAreas.length>0?(e.openBlock(),e.createElementBlock("div",li,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ht.value.spiderAreas,(n,i)=>(e.openBlock(),e.createElementBlock("div",{key:`spider-tooltip-area-${i}`,class:"dss-spider-tooltip-area"},[e.createElementVNode("div",oi,[e.createElementVNode("span",{class:"dss-spider-tooltip-area-indicator",style:e.normalizeStyle({backgroundColor:n.color})},null,4),e.createTextVNode(" "+e.toDisplayString(n.seriesName),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.points,(p,g)=>(e.openBlock(),e.createElementBlock("div",{key:`spider-tooltip-point-${i}-${g}`,class:"dss-tooltip-series"},[e.createElementVNode("span",ai,e.toDisplayString(p.label),1),e.createElementVNode("span",si,e.toDisplayString(p.value),1)]))),128))]))),128))])):jt.value&&ht.value.bubbleData&&ht.value.bubbleData.length>0?(e.openBlock(),e.createElementBlock("div",ri,[ht.value.title?(e.openBlock(),e.createElementBlock("div",ii,e.toDisplayString(ht.value.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",ci,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ht.value.bubbleData,(n,i)=>(e.openBlock(),e.createElementBlock("div",{key:`bubble-tooltip-${i}`,class:"dss-bubble-tooltip-item"},e.toDisplayString(n.value),1))),128))])])):(e.openBlock(),e.createElementBlock("div",ui,[e.createElementVNode("div",di,e.toDisplayString(ht.value.title),1),e.createElementVNode("div",mi,e.toDisplayString(ht.value.value),1)])),ht.value.categoryIndex!==void 0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[et(ht.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",pi,[a[5]||(a[5]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",fi,e.toDisplayString(e.unref(M)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(et(ht.value.categoryIndex).flagGroups,(n,i)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-flag-group-${i}`},[e.createElementVNode("div",vi,[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:n.color})},null,4),e.createElementVNode("span",null,e.toDisplayString(n.type),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.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",gi,[e.createElementVNode("div",hi,e.toDisplayString(p.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),et(ht.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",yi,[a[6]||(a[6]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",ki,e.toDisplayString(e.unref(M)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(et(ht.value.categoryIndex).markers,(n,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:n.color})},null,4),e.createElementVNode("div",Ci,[e.createElementVNode("div",bi,e.toDisplayString(n.title),1),n.description?(e.openBlock(),e.createElementBlock("div",wi,e.toDisplayString(n.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",xi,[e.createElementVNode("div",Ei,e.toDisplayString(jt.value?hl():D.categories[st.value.categoryIndex]||`Category ${st.value.categoryIndex+1}`),1),jt.value?(e.openBlock(),e.createElementBlock("div",Si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(st.value.data,(n,i)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${i}`,class:"dss-bubble-tooltip-item"},e.toDisplayString(n.value),1))),128))])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(st.value.data,(n,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:n.color})},null,4),e.createElementVNode("span",Vi,e.toDisplayString(n.seriesName)+":",1),e.createElementVNode("span",Ni,e.toDisplayString(qt(n.value)),1)]))),128))]),et(st.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",Bi,[a[7]||(a[7]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Mi,e.toDisplayString(e.unref(M)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(et(st.value.categoryIndex).flagGroups,(n,i)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-flag-group-${i}`},[e.createElementVNode("div",_i,[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:n.color})},null,4),e.createElementVNode("span",null,e.toDisplayString(n.type),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.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",$i,[e.createElementVNode("div",Li,e.toDisplayString(p.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),et(st.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",Ti,[a[8]||(a[8]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Ai,e.toDisplayString(e.unref(M)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(et(st.value.categoryIndex).markers,(n,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:n.color})},null,4),e.createElementVNode("div",Di,[e.createElementVNode("div",Hi,e.toDisplayString(n.title),1),n.description?(e.openBlock(),e.createElementBlock("div",Ri,e.toDisplayString(n.description),1)):e.createCommentVNode("",!0)])]))),128))])):e.createCommentVNode("",!0)],64))],6)):e.createCommentVNode("",!0),Sn.value&&Ge.value&&ae.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(ae.value.scale*100))+"% "+e.toDisplayString(e.unref(M)("chart.zoom.doubleClickToReset")),1)])):e.createCommentVNode("",!0)],46,vs),J.value&&he.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(R.series,(n,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":ce.value===i,"dss-legend-dimmed":ce.value!==null&&ce.value!==i}]),onClick:p=>Ko(i),onMouseenter:p=>In(i),onMouseleave:cn,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",Ii,e.toDisplayString(n.name),1)],46,Fi))),128))],2)):e.createCommentVNode("",!0),gt.value.show?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-chart-context-menu",style:e.normalizeStyle({left:gt.value.x+"px",top:gt.value.y+"px"}),onClick:a[0]||(a[0]=e.withModifiers(()=>{},["stop"]))},[Ct.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),Ct.value.addMarker&&(Ct.value.downloadSvg||Ct.value.downloadPng||Ct.value.downloadCsv||At.value.length>0)?(e.openBlock(),e.createElementBlock("div",zi)):e.createCommentVNode("",!0),Ct.value.downloadSvg?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-context-menu-item",onClick:_n},e.toDisplayString(e.unref(M)("chart.contextMenu.downloadSvg")),1)):e.createCommentVNode("",!0),Ct.value.downloadPng?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-context-menu-item",onClick:Dn},e.toDisplayString(e.unref(M)("chart.contextMenu.downloadPng")),1)):e.createCommentVNode("",!0),Ct.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",{key:4,class:"dss-context-menu-item",onClick:Wn},e.toDisplayString(e.unref(M)("chart.contextMenu.downloadCsv")),1)):e.createCommentVNode("",!0),At.value.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[Ct.value.downloadSvg||Ct.value.downloadPng||Ct.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",Pi)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(At.value,(n,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"custom-"+i},[n.separator?(e.openBlock(),e.createElementBlock("div",Oi)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(Zl(n)),style:e.normalizeStyle(Ul(n)),onClick:p=>kl(n)},[n.template?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:fn(n),class:"dss-custom-menu-content"},null,8,Wi)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.icon?(e.openBlock(),e.createElementBlock("span",Zi,e.toDisplayString(n.icon),1)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.label),1)],64))],14,qi)],64))),128))],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),$e.value.show?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-marker-modal-overlay",onClick:$t},[e.createElementVNode("div",{class:"dss-marker-modal",onClick:a[3]||(a[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Ui,[e.createElementVNode("h3",null,e.toDisplayString(tn.value?e.unref(M)("chart.modalMarker.viewMarker"):Bn.value?e.unref(M)("chart.modalMarker.editMarker"):e.unref(M)("chart.contextMenu.addMarker")),1),e.createElementVNode("button",{class:"dss-modal-close-btn",onClick:$t},"×")]),e.createElementVNode("div",Xi,[e.createElementVNode("div",Yi,[e.createVNode(ta,{id:"dss-marker-date",mode:"single",modelValue:$e.value.date,"onUpdate:modelValue":a[1]||(a[1]=n=>$e.value.date=n),"min-date":so.value,"max-date":sn.value,disabled:tn.value},null,8,["modelValue","min-date","max-date","disabled"])]),e.createElementVNode("div",ji,[e.createElementVNode("label",Ki,e.toDisplayString(e.unref(M)("chart.modalMarker.description")),1),tn.value?(e.openBlock(),e.createElementBlock("div",Gi,e.toDisplayString($e.value.description),1)):e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{key:1,id:"dss-marker-description","onUpdate:modelValue":a[2]||(a[2]=n=>$e.value.description=n),placeholder:e.unref(M)("chart.modalMarker.placeholderDescription"),class:"dss-form-textarea",rows:"5"},null,8,Qi)),[[e.vModelText,$e.value.description]])])]),e.createElementVNode("div",Ji,[e.createElementVNode("div",ec,[Bn.value&&!tn.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-btn dss-btn-danger",onClick:Un},e.toDisplayString(e.unref(M)("chart.modalMarker.deleteMarker")),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",tc,[e.createElementVNode("button",{class:"dss-btn dss-btn-secondary",onClick:$t},e.toDisplayString(tn.value?e.unref(M)("chart.modalMarker.close"):e.unref(M)("chart.modalMarker.cancel")),1),tn.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-btn dss-btn-primary",onClick:vl,disabled:!($e.value.description&&$e.value.description.length)},e.toDisplayString(Bn.value?e.unref(M)("chart.modalMarker.save"):e.unref(M)("chart.contextMenu.addMarker")),9,nc))])])])])):e.createCommentVNode("",!0)],64))}}),ac={class:"dss-modal-title"},sc={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(D,{emit:le}){const M=D,L=le,de=e.ref(null),I=e.ref(null),T=e.computed(()=>{const U={"max-width":M.width};return M.height!=="auto"&&(U.height=M.height,U["min-height"]="0"),U}),fe=e.computed(()=>({}));function dt(){L("close-modal")}function ee(){M.backDrop&&!de.value&&L("close-modal")}function f(U){U.target.tagName==="INPUT"&&(de.value=U.target.tagName)}function be(){setTimeout(()=>{de.value=null},300)}function Ce(){const U=document.body,me=document.documentElement;I.value={bodyOverflow:U.style.overflow,bodyPosition:U.style.position,bodyTop:U.style.top,bodyWidth:U.style.width,htmlOverflow:me.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",me.style.overflow="hidden"}function G(){if(!I.value)return;const U=document.body,me=document.documentElement,{bodyOverflow:R,bodyPosition:xe,bodyTop:Ae,bodyWidth:nt,htmlOverflow:ft,scrollY:Z}=I.value;U.style.overflow=R||"",U.style.position=xe||"",U.style.top=Ae||"",U.style.width=nt||"",U.style.left="",me.style.overflow=ft||"",window.scrollTo(0,Z||0)}return e.watch(()=>M.showModal,U=>{if(U)Ce(),document.body.classList.add("dss-modal-open"),setTimeout(()=>{const me=document.getElementById("dss-modal-backdrop");me&&(me.addEventListener("focusin",f),me.addEventListener("focusout",be))},100);else{G(),document.body.classList.remove("dss-modal-open");const me=document.getElementById("dss-modal-backdrop");me&&(me.removeEventListener("focusin",f),me.removeEventListener("focusout",be))}},{immediate:!0}),e.onUnmounted(()=>{M.showModal&&G()}),(U,me)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[D.showModal?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-modal-backdrop",onClick:ee},[e.withDirectives(e.createElementVNode("div",{id:"dss-modal-backdrop",class:"dss-modal",style:e.normalizeStyle(T.value)},[e.createElementVNode("div",{class:"dss-modal-content",onClick:me[0]||(me[0]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"dss-modal-header",style:e.normalizeStyle({"justify-content":D.headerType,"font-size":D.titleSize})},[e.createElementVNode("h1",ac,[e.renderSlot(U.$slots,"title",{},()=>[me[1]||(me[1]=e.createTextVNode("Default Title",-1))])]),e.renderSlot(U.$slots,"title-data"),D.showCloseBtn?(e.openBlock(),e.createElementBlock("span",{key:0,class:"dss-modal-close",onClick:dt,title:"Close"},"×")):e.createCommentVNode("",!0)],4),e.createElementVNode("div",{class:"dss-modal-body",style:e.normalizeStyle(fe.value)},[e.renderSlot(U.$slots,"content",{},()=>[me[2]||(me[2]=e.createTextVNode("Default Content",-1))])],4),e.createElementVNode("div",sc,[e.renderSlot(U.$slots,"actions")])])],4),[[e.vShow,D.showModal]])])):e.createCommentVNode("",!0)]))}},rc={key:0,class:"dss-table-toolbar"},ic={class:"dss-table-toolbar-left"},cc=["aria-expanded"],uc={class:"dss-pagination-select-dropdown",role:"listbox"},dc={class:"dss-table-column-visibility-label"},mc={class:"dss-table-checkbox-wrapper"},pc=["checked","onChange"],fc={key:0,class:"dss-table-checkbox__check","aria-hidden":"true"},vc={class:"dss-table-column-visibility-text"},gc={class:"dss-table-toolbar-right"},hc=["placeholder","aria-label"],yc=["aria-label"],kc=["aria-label","aria-expanded"],Cc={key:1,class:"dss-table-toolbar-extra"},bc={class:"dss-table-thead"},wc={key:0,class:"dss-table-th dss-table-selection-column"},xc={key:0,class:"dss-table-checkbox-wrapper"},Ec=["checked","indeterminate"],Sc={key:0,class:"dss-table-checkbox__indeterminate"},Vc={key:1,class:"dss-table-checkbox__check","aria-hidden":"true"},Nc=["aria-label"],Bc=["onClick"],Mc={class:"dss-table-th-content"},_c={class:"dss-table-th-text"},$c={key:0},Lc={key:1},Tc={key:2},Ac=["data-filter-column-key","aria-expanded","aria-label","onClick"],Dc={class:"dss-table-tbody"},Hc=["onClick"],Rc={class:"dss-table-checkbox-wrapper"},Fc=["type","name","checked","disabled","onChange"],Ic={key:0,class:"dss-table-checkbox__check","aria-hidden":"true"},zc={key:1,class:"dss-table-checkbox__dot"},Pc=["onClick"],Oc=["aria-expanded","aria-label"],qc={key:1,class:"dss-table-expansion-placeholder","aria-hidden":"true"},Wc={key:0,class:"dss-table-expansion-row"},Zc=["colspan"],Uc=["colspan"],Xc={key:1,class:"dss-table-pagination"},Yc={class:"dss-table-pagination-left"},jc={key:0},Kc={key:1,class:"dss-table-pagination-placeholder","aria-hidden":"true"},Gc={class:"dss-table-pagination-center"},Qc={key:0,class:"dss-pagination-controls"},Jc=["disabled","title"],eu=["disabled","title"],tu=["aria-label","onKeydown"],nu={class:"dss-pagination-of"},lu=["disabled","title"],ou=["disabled","title"],au={class:"dss-table-pagination-right"},su={class:"dss-pagination-rows-label"},ru=["aria-expanded"],iu=["aria-selected","onClick"],cu={key:0,class:"dss-table-filter-row"},uu=["value","placeholder"],du=["min","max","value"],mu=["min","max","value"],pu={class:"dss-table-filter-double-range-values"},fu={key:2,class:"dss-table-filter-daterange"},vu={class:"dss-table-filter-daterange-row"},gu={class:"dss-table-filter-daterange-label"},hu=["value"],yu={class:"dss-table-filter-daterange-row"},ku={class:"dss-table-filter-daterange-label"},Cu=["value"],bu=["value","placeholder"],wu={class:"dss-table-filter-list"},xu=["checked","onChange"],Eu={class:"dss-table-filter-actions"},Su={name:"DSSTable"},Vu=Object.assign(Su,{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:D=>typeof D=="object"&&D!==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(D,{emit:le}){const{t:M,locale:L}=eo.useI18n(),de=D,I=le,T={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 fe(y,h){const x=Object.assign({},y);return dt(y)&&dt(h)&&Object.keys(h).forEach(q=>{dt(h[q])?q in y?x[q]=fe(y[q],h[q]):Object.assign(x,{[q]:h[q]}):Object.assign(x,{[q]:h[q]})}),x}function dt(y){return y&&typeof y=="object"&&!Array.isArray(y)}const ee=e.computed(()=>fe(T,de.options)),f=e.computed(()=>{const y=ee.value.table.width;return y==="auto"?null:typeof y=="number"?y:null}),be=e.computed(()=>ee.value.table.height),Ce=e.computed(()=>ee.value.table.rowHeight??"auto"),G=e.computed(()=>({height:Ce.value})),U=e.computed(()=>ee.value.table.expandable===!0),me=e.computed(()=>ee.value.table.expandableRowData??null),R=e.computed(()=>ee.value.table.expandableRowCondition??null),xe=e.computed(()=>ee.value.table.truncated===!0),Ae=e.computed(()=>ee.value.table.striped),nt=e.computed(()=>ee.value.table.bordered),ft=e.computed(()=>ee.value.table.hoverable),Z=e.computed(()=>ee.value.table.size),Ue=e.computed(()=>ee.value.table.align||"left");e.computed(()=>ee.value.title.text),e.computed(()=>ee.value.subtitle.text);const qe=e.computed(()=>ee.value.selection.enabled),Ee=e.computed(()=>ee.value.selection.mode),Me=e.computed(()=>ee.value.selection.rowCondition??null),je=e.computed(()=>ee.value.sorting.enabled),Q=e.computed(()=>ee.value.sorting.mode),ze=e.computed(()=>ee.value.pagination.enabled),we=e.computed(()=>ee.value.pagination.rows),it=e.computed(()=>ee.value.pagination.rowsPerPageOptions),ot=e.computed(()=>ee.value.pagination.showCounter!==!1),bt=e.computed(()=>ee.value.pagination.showControlsGroup),It=e.computed(()=>bt.value===!1?!1:ee.value.pagination.showControls!==!1),en=e.computed(()=>bt.value===!1?!1:ee.value.pagination.showRowsPerPage!==!1),Pt=e.computed(()=>ze.value&&(ot.value||It.value||en.value)),oe=e.computed(()=>ee.value.scrollable),ve=e.computed(()=>ee.value.emptyMessage||M("table.emptyMessage")),Fe=e.computed(()=>ee.value.toolbar?.downloads?.pdf!==!1),De=e.computed(()=>ee.value.toolbar?.downloads?.excel!==!1),Zt=e.computed(()=>ee.value.toolbar?.search!==!1),yt=e.computed(()=>Fe.value||De.value||Zt.value||Ut.value),Ut=e.computed(()=>ee.value.toolbar?.columnVisibility!==!1),xt=e.ref(""),Ot=e.ref(!1),J=e.ref(null);let he=null;function Be(){Ot.value?(he&&(clearTimeout(he),he=null),Ot.value=!1,xt.value="",I("search",""),J.value?.blur()):(Ot.value=!0,he=setTimeout(()=>{he=null,J.value?.focus()},80))}function Xe(){xt.value||(Ot.value=!1)}function Ke(){xt.value="",I("search",""),J.value?.focus()}const Lt=e.computed(()=>({"dss-table-striped":Ae.value,"dss-table-bordered":nt.value,"dss-table-hoverable":ft.value,[`dss-table-${Z.value}`]:Z.value!=="default","dss-table-truncated":xe.value})),Ge=(y,h)=>y?.field??y?.key??h,Dt=e.ref(new Set);function He(){const y=new Set;return de.columns.forEach((h,x)=>{h?.hidden!==!0&&y.add(Ge(h,x))}),y}function Pe(){const y=new Set;return de.columns.forEach((h,x)=>{y.add(Ge(h,x))}),y}function Et(y){if(!Array.isArray(y))return null;const h=Pe(),x=[];return y.forEach(q=>{h.has(q)&&x.push(q)}),x}function St(){Dt.value=He()}const K=e.computed(()=>{const y=Et(de.columnVisibility);return y===null?null:new Set(y)}),W=e.computed(()=>K.value??Dt.value),X=e.computed(()=>de.columns.filter((y,h)=>W.value.has(Ge(y,h)))),pe=y=>{const h=de.columns.findIndex(x=>x===y);return Ge(y,h>=0?h:0)},ye=(y,h)=>W.value.has(Ge(y,h));function Je(y){I("update:columnVisibility",Array.from(y))}function Tt(y,h){const x=Ge(y,h),q=new Set(W.value);q.has(x)?q.delete(x):q.add(x),K.value===null&&(Dt.value=q),Je(q)}const mn=e.ref(null),vt=e.ref(!1);function Gt(y){mn.value&&!mn.value.contains(y.target)&&(vt.value=!1)}const S=e.computed(()=>X.value.length+(qe.value?1:0)+(U.value?1:0)),b=(y,h)=>y?.id??y?.key??h,V=e.ref(new Set),Y=e.ref(null),ne=(y,h)=>V.value.has(b(y,h)),Oe=(y,h)=>{if(!U.value)return!1;if(typeof R.value=="function")return!!R.value(y,h);if(typeof me.value=="string"&&me.value.trim()){const x=$t(y,me.value.trim());return Array.isArray(x)?x.length>0:x&&typeof x=="object"?Object.keys(x).length>0:x!=null&&x!==""}return!0},mt=(y,h,x)=>{if(x&&x.stopPropagation(),!Oe(y,h))return;const q=b(y,h),re=new Set(V.value);re.has(q)?(re.delete(q),I("row-collapse",{data:y,index:h})):(re.add(q),I("row-expand",{data:y,index:h})),V.value=re},ct=(y,h)=>{if(!xe.value)return;const x=b(y,h);Y.value!==x&&(Y.value=x)},We=e.ref(null),Vt=e.ref(0),Nt=e.ref([]),wt=y=>{if(Q.value==="single")return We.value===y.field?Vt.value:0;{const h=Nt.value.find(x=>x.field===y.field);return h?h.order:0}},Ct=y=>{const h=wt(y);return{"dss-sort-active":h!==0,"dss-sort-asc":h===1,"dss-sort-desc":h===-1}},At=e.ref({}),Bt=e.ref(null),bn=e.ref(null),Tn=220,ol=e.ref(null),qt=e.computed(()=>X.value.find(y=>pe(y)===Bt.value)??null),ln=e.computed(()=>{if(!qt.value||qt.value.filter!=="range")return null;const y=qt.value,h=Bt.value,{min:x,max:q}=An(y),re=y.filterMin??x,pt=y.filterMax??q,Ht=Nn(h),_n=Ht.min??re,Dn=Ht.max??pt,Wn=pt-re,kl=Wn===0?0:(_n-re)/Wn*100,ro=Wn===0?100:(Dn-re)/Wn*100;return{rangeMin:re,rangeMax:pt,currentMin:_n,currentMax:Dn,minPct:kl,maxPct:ro}}),On=e.ref(null),qn=e.ref("max");function Rn(y){const h=On.value,x=ln.value;if(!h||!x)return;const q=h.getBoundingClientRect(),pt=(y.clientX-q.left)/q.width*100,Ht=(x.minPct+x.maxPct)/2;qn.value=pt<Ht?"min":"max"}function Nn(y){return At.value[y]??{}}function A(y,h){At.value={...At.value,[y]:h}}function O(y){const h=At.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 P(y){const h={...At.value};delete h[y],At.value=h,Bt.value=null,bn.value=null}function ie(){if(!Bt.value){bn.value=null;return}const y=ol.value;if(!y)return;const h=y.querySelector(`.dss-table-filter-trigger[data-filter-column-key="${Bt.value}"]`);if(!h)return;const x=h.getBoundingClientRect();bn.value={top:x.bottom+6,left:Math.max(8,x.right-Tn)}}const Te=e.computed(()=>{const y=String(xt.value??"").trim().toLowerCase();return y?de.data.filter(h=>X.value.some(x=>rt(vl(h,x)).some(re=>String(re).toLowerCase().includes(y)))):de.data}),et=e.computed(()=>{let y=[...Te.value];const h=(xt.value??"").trim().toLowerCase();return h&&(y=y.filter(x=>de.columns.some(q=>{if(!q||!q.field)return!1;const re=vl(x,q);return String(re??"").toLowerCase().includes(h)}))),X.value.forEach(x=>{const q=pe(x),re=At.value[q];if(!re)return;const pt=x.field;if(pt){if(re.type==="string"&&re.value?.trim()){const Ht=re.value.trim().toLowerCase();y=y.filter(_n=>{const Dn=vl(_n,x);return String(Dn??"").toLowerCase().includes(Ht)})}else if(re.type==="range")y=y.filter(Ht=>{const _n=$t(Ht,pt),Dn=Number(_n);return!(Number.isNaN(Dn)||re.min!=null&&Dn<re.min||re.max!=null&&Dn>re.max)});else if(re.type==="dateRange"){const Ht=re.from?new Date(re.from).getTime():null,_n=re.to?new Date(re.to).getTime():null;y=y.filter(Dn=>{const Wn=$t(Dn,pt),kl=Wn?new Date(Wn).getTime():NaN;return!(Number.isNaN(kl)||Ht!=null&&kl<Ht||_n!=null&&kl>_n)})}else if(re.type==="list"&&re.selected?.length){const Ht=new Set(re.selected);y=y.filter(_n=>rt(vl(_n,x)).some(Wn=>Ht.has(Wn)))}}}),y});function rt(y){if(y==null)return[""];if(Array.isArray(y))return y.flatMap(rt);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 tt(y){const h=new Set;return de.data.forEach(x=>{rt(vl(x,y)).forEach(re=>h.add(re))}),Array.from(h).sort((x,q)=>String(x).localeCompare(String(q)))}function Mt(y,h){if(Bt.value===y){Bt.value=null,bn.value=null;return}if(Bt.value=y,h?.currentTarget){const x=h.currentTarget.getBoundingClientRect();bn.value={top:x.bottom+6,left:Math.max(8,x.right-Tn)}}else ie()}function on(y,h){A(y,{type:"string",value:h})}function An(y){const h=y.field;if(!h)return{min:0,max:100};let x=1/0,q=-1/0;return de.data.forEach(re=>{const pt=$t(re,h),Ht=Number(pt);Number.isNaN(Ht)||(x=Math.min(x,Ht),q=Math.max(q,Ht))}),{min:x===1/0?0:x,max:q===-1/0?100:q}}function Fn(y,h,x){const q={...Nn(y),type:"range"},re=x===""?null:Number(x),pt=re===null||Number.isNaN(re)?null:re;q[h]=pt,pt!=null&&(h==="min"&&q.max!=null&&pt>q.max&&(q.max=pt),h==="max"&&q.min!=null&&pt<q.min&&(q.min=pt)),A(y,q)}function Qn(y,h,x){const q={...Nn(y),type:"dateRange"};q[h]=x||"",A(y,q)}const En=e.reactive({});function oo(y,h){En[y]=h}function ql(y){const h=pe(y),x=(En[h]??"").trim().toLowerCase(),q=tt(y);return x?q.filter(re=>String(re).toLowerCase().includes(x)):q}function Al(y,h){return(Nn(y).selected??[]).includes(h!=null?String(h):"")}function Wl(y,h){const q=[...Nn(y).selected??[]],re=h!=null?String(h):"",pt=q.indexOf(re);pt>=0?q.splice(pt,1):q.push(re),A(y,{type:"list",selected:q})}function ml(y){Bt.value&&!y.target.closest(".dss-table-filter-wrap")&&!y.target.closest(".dss-table-filter-dropdown")&&(Bt.value=null,bn.value=null)}function Vl(){ie(),an.value&&st()}const ao=y=>{if(!(y.sortable===!1||!je.value))if(Q.value==="single")We.value===y.field?Vt.value=Vt.value===1?-1:Vt.value===-1?0:1:(We.value=y.field,Vt.value=1),Vt.value===0&&(We.value=null),I("sort",{field:We.value,order:Vt.value});else{const h=Nt.value.findIndex(x=>x.field===y.field);h>=0?Nt.value[h].order===1?Nt.value[h].order=-1:Nt.value.splice(h,1):Nt.value.push({field:y.field,order:1}),I("sort",{multiSortMeta:Nt.value})}},Jn=e.computed(()=>{if(!je.value)return et.value;let y=[...et.value];return Q.value==="single"&&We.value&&Vt.value!==0?y.sort((h,x)=>{const q=$t(h,We.value),re=$t(x,We.value);return q===re?0:q==null?1:re==null?-1:(q<re?-1:q>re?1:0)*Vt.value}):Q.value==="multiple"&&Nt.value.length>0&&y.sort((h,x)=>{for(const q of Nt.value){const re=$t(h,q.field),pt=$t(x,q.field);if(re===pt)continue;if(re==null)return 1;if(pt==null)return-1;const Ht=re<pt?-1:re>pt?1:0;if(Ht!==0)return Ht*q.order}return 0}),y}),yn=e.ref(0),Qt=e.ref(we.value),an=e.ref(!1),al=e.ref(null),at=e.ref(null),ce=e.ref("bottom"),pl=e.ref(null),ht=y=>{Qt.value=y,an.value=!1,yn.value=0,I("page",{page:0,rows:Qt.value})};function pn(y){al.value&&!al.value.contains(y.target)&&(an.value=!1)}function st(){const y=al.value,h=at.value;if(!y||!h)return;const x=y.querySelector(".dss-pagination-select-dropdown");if(!x)return;const q=h.getBoundingClientRect(),re=x.offsetHeight||0,Ht=(window.innerHeight||document.documentElement.clientHeight)-q.bottom,_n=q.top;ce.value=Ht<re+8&&_n>Ht?"top":"bottom",pl.value={width:`${Math.ceil(q.width)}px`,left:`${Math.max(0,Math.round(h.offsetLeft))}px`}}const gt=e.computed(()=>Jn.value.length),ae=e.computed(()=>Math.ceil(gt.value/Qt.value)),Yt=e.computed(()=>Math.max(ae.value,1)),$e=e.computed(()=>gt.value===0?0:sn.value+1),so=e.computed(()=>Bn.value),sn=e.computed(()=>ze.value?yn.value*Qt.value:0),Bn=e.computed(()=>ze.value?Math.min((yn.value+1)*Qt.value,gt.value):gt.value),tn=e.computed(()=>{if(!ze.value)return Jn.value;const y=sn.value,h=Bn.value;return Jn.value.slice(y,h)}),In=e.ref(new Set),cn=e.computed(()=>Jn.value.filter((y,h)=>In.value.has(b(y,h)))),zn=(y,h)=>{const x=Me.value;return typeof x!="function"?!0:!!x(y,h)},Dl=e.computed(()=>Jn.value.map((y,h)=>({row:y,index:h})).filter(({row:y,index:h})=>zn(y,h))),Nl=e.computed(()=>{const y=Dl.value;return y.length===0?!1:y.every(({row:h,index:x})=>In.value.has(b(h,x)))}),Zn=e.computed(()=>{const y=Dl.value;if(y.length===0)return!1;const h=y.filter(({row:x,index:q})=>In.value.has(b(x,q))).length;return h>0&&h<y.length}),fn=(y,h)=>In.value.has(b(y,h)),Zl=()=>{if(Nl.value)In.value=new Set,I("unselect-all");else{const y=new Set;Dl.value.forEach(({row:h,index:x})=>y.add(b(h,x))),In.value=y,I("select-all",cn.value)}},Ul=(y,h)=>{if(!zn(y,h))return;const x=b(y,h),q=new Set(In.value),re=q.has(x);Ee.value==="single"?re?(q.delete(x),I("row-unselect",y)):(q.clear(),q.add(x),I("row-select",y)):re?(q.delete(x),I("row-unselect",y)):(q.add(x),I("row-select",y)),In.value=q},sl=e.ref("1"),Hl=()=>{const y=Number.parseInt(String(sl.value),10);if(!Number.isFinite(y)){sl.value=String(yn.value+1);return}const h=Math.min(Yt.value,Math.max(1,y));h!==yn.value+1?fl(h-1):sl.value=String(h)},fl=y=>{y<0||y>=ae.value||(yn.value=y,I("page",{page:y,rows:Qt.value}))},Mn=(y,h,x)=>{I("row-click",{data:y,index:h,originalEvent:x}),ct(y,sn.value+h)},Rl=(y,h)=>{const x=sn.value+h;return{"dss-table-row-selected":fn(y,x),"dss-table-row-even":h%2===0,"dss-table-row-odd":h%2!==0,"dss-table-row-truncated-clickable":xe.value,"dss-table-row-truncated-expanded":Y.value===b(y,x)}},vl=(y,h)=>h.field?$t(y,h.field):"",$t=(y,h)=>h.split(".").reduce((x,q)=>x&&x[q],y),Un=y=>{const h=y.align??Ue.value;return{"dss-table-sortable":y.sortable!==!1&&je.value,"dss-table-align-left":h==="left","dss-table-align-center":h==="center","dss-table-align-right":h==="right",[y.className]:y.className}},rl=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(()=>de.locale,y=>{y&&y!==L.value&&(L.value=y)},{immediate:!0}),e.watch(we,y=>{Qt.value=y,yn.value=0}),e.watch(an,async y=>{y&&(await e.nextTick(),st())}),e.watch(yn,y=>{sl.value=String(y+1)},{immediate:!0}),e.watch(xt,y=>{I("search",y??"")}),e.watch(()=>de.columns,()=>{if(K.value===null){St();return}const y=Et(de.columnVisibility)??[];y.length!==de.columnVisibility.length&&I("update:columnVisibility",y)},{immediate:!0,deep:!0}),e.onMounted(()=>{document.addEventListener("click",pn),document.addEventListener("click",Gt),document.addEventListener("click",ml),window.addEventListener("resize",Vl),window.addEventListener("scroll",Vl,!0)}),e.onUnmounted(()=>{document.removeEventListener("click",pn),document.removeEventListener("click",Gt),document.removeEventListener("click",ml),window.removeEventListener("resize",Vl),window.removeEventListener("scroll",Vl,!0)}),(y,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"dss-table-container",ref_key:"tableContainerRef",ref:ol,style:e.normalizeStyle({width:f.value+"px",height:be.value?be.value+"px":"auto"})},[yt.value?(e.openBlock(),e.createElementBlock("div",rc,[e.createElementVNode("div",ic,[Fe.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),De.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),Ut.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-table-toolbar-column-visibility",ref_key:"columnVisibilityDropdownRef",ref:mn},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-pagination-select-trigger",{"dss-pagination-select-open":vt.value}]),onClick:h[2]||(h[2]=x=>vt.value=!vt.value),"aria-expanded":vt.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,cc),e.createVNode(e.Transition,{name:"dss-dropdown"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("ul",uc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.columns,(x,q)=>(e.openBlock(),e.createElementBlock("li",{key:Ge(x,q),role:"option",class:"dss-table-column-visibility-option",onClick:h[3]||(h[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("label",dc,[e.createElementVNode("span",mc,[e.createElementVNode("input",{type:"checkbox",checked:ye(x,q),onChange:re=>Tt(x,q),class:"dss-table-checkbox dss-table-checkbox--checkbox"},null,40,pc),ye(x,q)?(e.openBlock(),e.createElementBlock("span",fc,[...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",vc,e.toDisplayString(x.header),1)])]))),128))],512),[[e.vShow,vt.value]])]),_:1})],512)):e.createCommentVNode("",!0)]),e.createElementVNode("div",gc,[Zt.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dss-table-toolbar-search",{"dss-table-toolbar-search--expanded":Ot.value||xt.value}])},[e.withDirectives(e.createElementVNode("input",{ref_key:"searchInputRef",ref:J,"onUpdate:modelValue":h[4]||(h[4]=x=>xt.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=>Ot.value=!0),onBlur:Xe},null,40,hc),[[e.vModelText,xt.value]]),xt.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,yc)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"dss-table-toolbar-search-trigger","aria-label":e.unref(M)("table.searchAriaLabel"),"aria-expanded":Ot.value||!!xt.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,kc)],2)):e.createCommentVNode("",!0),y.$slots["toolbar-extra"]?(e.openBlock(),e.createElementBlock("div",Cc,[e.renderSlot(y.$slots,"toolbar-extra")])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["dss-table-wrapper",{"dss-table-scrollable":oe.value}])},[e.createElementVNode("table",{class:e.normalizeClass(["dss-table",Lt.value])},[e.createElementVNode("thead",bc,[e.createElementVNode("tr",null,[qe.value?(e.openBlock(),e.createElementBlock("th",wc,[Ee.value==="multiple"?(e.openBlock(),e.createElementBlock("span",xc,[e.createElementVNode("input",{type:"checkbox",checked:Nl.value,indeterminate:Zn.value,onChange:Zl,class:"dss-table-checkbox dss-table-checkbox--checkbox"},null,40,Ec),Zn.value?(e.openBlock(),e.createElementBlock("span",Sc)):Nl.value?(e.openBlock(),e.createElementBlock("span",Vc,[...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,Nc)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(X.value,(x,q)=>(e.openBlock(),e.createElementBlock("th",{key:pe(x),class:e.normalizeClass(["dss-table-th",Un(x)]),style:e.normalizeStyle(rl(x)),onClick:re=>ao(x)},[e.createElementVNode("div",Mc,[e.createElementVNode("span",_c,e.toDisplayString(x.header),1),x.sortable!==!1&&je.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["dss-table-sort-icon",Ct(x)])},[wt(x)===0?(e.openBlock(),e.createElementBlock("span",$c,[...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)])])):wt(x)===1?(e.openBlock(),e.createElementBlock("span",Lc,[...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)])])):wt(x)===-1?(e.openBlock(),e.createElementBlock("span",Tc,[...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":Bt.value===pe(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":O(pe(x))}]),"data-filter-column-key":pe(x),"aria-expanded":Bt.value===pe(x),"aria-label":e.unref(M)("table.filterColumnAriaLabel"),onClick:re=>Mt(pe(x),re)},[...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,Ac)],2)):e.createCommentVNode("",!0)])],14,Bc))),128))])]),e.createElementVNode("tbody",Dc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(tn.value,(x,q)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:b(x,sn.value+q)},[e.createElementVNode("tr",{class:e.normalizeClass(["dss-table-tr",Rl(x,q)]),style:e.normalizeStyle(G.value),onClick:re=>Mn(x,q,re)},[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",Rc,[e.createElementVNode("input",{type:Ee.value==="multiple"?"checkbox":"radio",name:`dss-table-select-${D.tableId}`,checked:fn(x,sn.value+q),disabled:!zn(x,sn.value+q),onChange:re=>Ul(x,sn.value+q),class:e.normalizeClass(["dss-table-checkbox",Ee.value==="multiple"?"dss-table-checkbox--checkbox":"dss-table-checkbox--radio",{"dss-table-checkbox--disabled":!zn(x,sn.value+q)}])},null,42,Fc),Ee.value==="multiple"&&fn(x,sn.value+q)?(e.openBlock(),e.createElementBlock("span",Ic,[...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)])])):Ee.value==="single"&&fn(x,sn.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(re=>mt(x,sn.value+q,re),["stop"])},[Oe(x,sn.value+q)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-table-expansion-trigger","aria-expanded":ne(x,sn.value+q),"aria-label":ne(x,sn.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":ne(x,sn.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,Oc)):(e.openBlock(),e.createElementBlock("span",qc))],8,Pc)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(X.value,(re,pt)=>(e.openBlock(),e.createElementBlock("td",{key:pe(re),class:e.normalizeClass(["dss-table-td",Un(re)]),style:e.normalizeStyle(rl(re))},[e.renderSlot(y.$slots,`cell-${re.field}`,{data:x,column:re,rowIndex:q,isExpanded:Y.value===b(x,sn.value+q)},()=>[e.createTextVNode(e.toDisplayString(vl(x,re)),1)])],6))),128))],14,Hc),U.value&&Oe(x,sn.value+q)&&ne(x,sn.value+q)?(e.openBlock(),e.createElementBlock("tr",Wc,[e.createElementVNode("td",{colspan:S.value,class:"dss-table-expansion-content-cell"},[e.renderSlot(y.$slots,"expansion",{data:x,rowIndex:q})],8,Zc)])):e.createCommentVNode("",!0)],64))),128)),tn.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(ve.value),1)])],8,Uc)],4))])],2)],2),Pt.value?(e.openBlock(),e.createElementBlock("div",Xc,[e.createElementVNode("div",Yc,[ot.value?(e.openBlock(),e.createElementBlock("span",jc,e.toDisplayString(e.unref(M)("table.showingRange",{start:$e.value,end:so.value,total:gt.value})),1)):(e.openBlock(),e.createElementBlock("span",Kc," "))]),e.createElementVNode("div",Gc,[It.value?(e.openBlock(),e.createElementBlock("div",Qc,[e.createElementVNode("button",{class:"dss-pagination-btn",disabled:yn.value===0,onClick:h[8]||(h[8]=x=>fl(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,Jc),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:yn.value===0,onClick:h[9]||(h[9]=x=>fl(yn.value-1)),title:e.unref(M)("table.previousPage")}," ‹ ",8,eu),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":h[10]||(h[10]=x=>sl.value=x),type:"text",class:"dss-pagination-page-input","aria-label":e.unref(M)("table.currentPageAriaLabel"),onBlur:Hl,onKeydown:e.withKeys(e.withModifiers(Hl,["prevent"]),["enter"])},null,40,tu),[[e.vModelText,sl.value]]),e.createElementVNode("span",nu,e.toDisplayString(e.unref(M)("table.ofPages",{total:Yt.value})),1),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:yn.value>=ae.value-1,onClick:h[11]||(h[11]=x=>fl(yn.value+1)),title:e.unref(M)("table.nextPage")}," › ",8,lu),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:yn.value>=ae.value-1,onClick:h[12]||(h[12]=x=>fl(ae.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,ou)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",au,[en.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-pagination-rows-per-page",ref_key:"rowsPerPageDropdownRef",ref:al},[e.createElementVNode("span",su,e.toDisplayString(e.unref(M)("table.rowsPerPage"))+":",1),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-pagination-select-trigger",{"dss-pagination-select-open":an.value}]),onClick:h[13]||(h[13]=x=>an.value=!an.value),"aria-expanded":an.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,ru),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":ce.value==="top"}]),style:e.normalizeStyle(pl.value),role:"listbox"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(it.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=>ht(x)},e.toDisplayString(x),11,iu))),128))],6),[[e.vShow,an.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(bn.value?{top:bn.value.top+"px",left:bn.value.left+"px",width:Tn+"px"}:void 0),onClick:h[21]||(h[21]=e.withModifiers(()=>{},["stop"]))},[qt.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[qt.value.filter==="string"?(e.openBlock(),e.createElementBlock("div",cu,[e.createElementVNode("input",{type:"text",value:Nn(Bt.value).value??"",onInput:h[14]||(h[14]=x=>on(Bt.value,x.target.value)),class:"dss-table-filter-input",placeholder:e.unref(M)("table.search")},null,40,uu)])):qt.value.filter==="range"&&ln.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-table-filter-double-range",style:e.normalizeStyle({"--range-min-pct":ln.value.minPct+"%","--range-max-pct":ln.value.maxPct+"%"})},[e.createElementVNode("div",{ref_key:"doubleRangeTrackRef",ref:On,class:"dss-table-filter-double-range-track",onMousemove:Rn,onMouseenter:Rn},[e.createElementVNode("input",{type:"range",min:ln.value.rangeMin,max:ln.value.rangeMax,value:ln.value.currentMin,onInput:h[15]||(h[15]=x=>Fn(Bt.value,"min",x.target.value)),class:"dss-table-filter-double-range-input dss-table-filter-double-range-input--min",style:e.normalizeStyle({zIndex:qn.value==="min"?2:1})},null,44,du),e.createElementVNode("input",{type:"range",min:ln.value.rangeMin,max:ln.value.rangeMax,value:ln.value.currentMax,onInput:h[16]||(h[16]=x=>Fn(Bt.value,"max",x.target.value)),class:"dss-table-filter-double-range-input dss-table-filter-double-range-input--max",style:e.normalizeStyle({zIndex:qn.value==="max"?2:1})},null,44,mu)],544),e.createElementVNode("div",pu,e.toDisplayString(ln.value.currentMin)+" – "+e.toDisplayString(ln.value.currentMax),1)],4)):qt.value.filter==="dateRange"?(e.openBlock(),e.createElementBlock("div",fu,[e.createElementVNode("div",vu,[e.createElementVNode("label",gu,e.toDisplayString(e.unref(M)("table.filterFrom")),1),e.createElementVNode("input",{type:"date",value:Nn(Bt.value).from??"",onInput:h[17]||(h[17]=x=>Qn(Bt.value,"from",x.target.value)),class:"dss-table-filter-input dss-table-filter-daterange-input"},null,40,hu)]),e.createElementVNode("div",yu,[e.createElementVNode("label",ku,e.toDisplayString(e.unref(M)("table.filterTo")),1),e.createElementVNode("input",{type:"date",value:Nn(Bt.value).to??"",onInput:h[18]||(h[18]=x=>Qn(Bt.value,"to",x.target.value)),class:"dss-table-filter-input dss-table-filter-daterange-input"},null,40,Cu)])])):qt.value.filter==="list"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("input",{type:"text",value:En[Bt.value]??"",onInput:h[19]||(h[19]=x=>oo(Bt.value,x.target.value)),class:"dss-table-filter-input dss-table-filter-list-search",placeholder:e.unref(M)("table.search")},null,40,bu),e.createElementVNode("div",wu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ql(qt.value),x=>(e.openBlock(),e.createElementBlock("label",{key:x,class:"dss-table-filter-list-item"},[e.createElementVNode("input",{type:"checkbox",checked:Al(Bt.value,x),onChange:q=>Wl(Bt.value,x)},null,40,xu),e.createElementVNode("span",null,e.toDisplayString(x),1)]))),128))])],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Eu,[e.createElementVNode("button",{type:"button",class:"dss-table-filter-clear",onClick:h[20]||(h[20]=x=>P(Bt.value))},e.toDisplayString(e.unref(M)("table.clearFilter")),1)])],64)):e.createCommentVNode("",!0)],4),[[e.vShow,Bt.value&&qt.value&&bn.value]])]),_:1})]))],64))}}),Nu="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",Bu="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",Mu="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",_u="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",$u="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",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='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",Tu={class:"dss-toolbar-left"},Au=["title"],Du=["title"],Hu={class:"dss-toolbar-dropdown-wrapper"},Ru=["title"],Fu=["src"],Iu=["src"],zu=["src"],Pu=["src"],Ou=["src"],qu=["src"],Wu={key:6,width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"paragraph-icon"},Zu=["src"],Uu=["src"],Xu=["src"],Yu=["src"],ju=["src"],Ku=["src"],Gu=["title"],Qu=["title"],Ju=["title"],ed=["title"],td=["title"],nd=["title"],ld=["title"],od=["title"],ad=["title"],sd={key:2,class:"dss-toolbar-separator"},rd=["title"],id={key:4,class:"dss-toolbar-separator"},cd={key:5,class:"dss-toolbar-dropdown-wrapper"},ud=["title"],dd={class:"dss-toolbar-dropdown-ai"},md={class:"dss-toolbar-right"},pd={key:0,class:"dss-toolbar-custom-group"},fd={key:1,class:"dss-toolbar-separator"},vd={class:"dss-link-modal-content"},gd={class:"dss-link-modal-field"},hd={class:"dss-link-modal-label"},yd=["placeholder"],kd={class:"dss-link-modal-field"},Cd={class:"dss-link-modal-label"},bd=["placeholder"],wd={class:"dss-image-modal-tabs"},xd={key:0,class:"dss-image-tab-content"},Ed={class:"dss-link-modal-content"},Sd={class:"dss-link-modal-field"},Vd={key:0,class:"dss-link-modal-label"},Nd=["src"],Bd={class:"dss-link-modal-field"},Md={class:"dss-link-modal-label"},_d=["placeholder"],$d={class:"dss-link-modal-field"},Ld={class:"dss-link-modal-label"},Td=["placeholder"],Ad={class:"dss-link-modal-field"},Dd={class:"dss-link-modal-label"},Hd=["placeholder"],Rd={key:1,class:"dss-image-tab-content"},Fd={class:"dss-link-modal-content"},Id={class:"dss-link-modal-field"},zd={class:"dss-link-modal-label"},Pd=["placeholder"],Od={class:"dss-link-modal-field"},qd={class:"dss-link-modal-label"},Wd=["placeholder"],Zd={class:"dss-link-modal-field"},Ud={class:"dss-link-modal-label"},Xd=["placeholder"],Yd={class:"dss-link-modal-field"},jd={class:"dss-link-modal-label"},Kd=["placeholder"],Gd={class:"dss-text-editor-title-input-container"},Qd={key:0,class:"dss-text-editor-title-preview"},Jd={key:0},e1={key:1,class:"dss-text-editor-preview-placeholder"},t1=["value","placeholder","disabled"],n1={key:2,class:"dss-text-editor-title-slot dss-text-editor-slot-last"},l1={class:"dss-text-editor-description-input-container"},o1={key:0,class:"dss-text-editor-description-preview"},a1={key:0},s1={key:1,class:"dss-text-editor-preview-placeholder"},r1=["value","placeholder","disabled"],i1={key:3,class:"dss-text-editor-description-slot dss-text-editor-slot-last"},c1=["data-comment-id","onMouseenter"],u1=["onClick"],d1=["src","alt"],m1={key:1},p1=["onClick"],f1=["src","alt"],v1={key:1},g1=["data-has-second-user","onClick"],h1={class:"editor-comment-marker-count"},y1={key:4,class:"dss-text-editor-textarea-wrapper"},k1=["value","placeholder","rows","disabled"],C1={class:"dss-text-editor-footer"},b1={class:"dss-text-editor-footer-content"},w1={class:"dss-text-editor-footer-stat"},x1={class:"dss-text-editor-footer-stat"},E1={key:5,class:"dss-text-editor-content-wrapper"},S1={key:0,class:"dss-comment-overlay-body"},V1={class:"dss-comment-selection-wrapper"},N1=["innerHTML"],B1={class:"dss-comment-messages-wrapper"},M1={key:0,class:"dss-comment-avatar-wrapper"},_1={class:"dss-comment-avatar"},$1=["src","alt"],L1={key:1},T1={class:"dss-comment-header"},A1={class:"dss-comment-header-text"},D1={class:"dss-comment-author"},H1={key:0,class:"dss-comment-date"},R1=["onClick","title"],F1={class:"dss-comment-overlay-inner"},I1=["placeholder","onKeydown"],z1={class:"dss-text-editor-footer"},P1={class:"dss-text-editor-footer-content"},O1={class:"dss-text-editor-footer-stat"},q1={class:"dss-text-editor-footer-stat"},W1=["title"],Z1=["title"],U1={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:""},X1={class:"dss-image-popup-content"},Y1={key:0,class:"dss-image-popup-no-alt-icon"},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-toolbar-left"},J1=["title"],em=["title"],tm={class:"dss-toolbar-dropdown-wrapper"},nm=["title"],lm=["src"],om=["src"],am=["src"],sm=["src"],rm=["src"],im=["src"],cm={key:6,width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"paragraph-icon"},um=["title"],dm=["title"],mm=["title"],pm=["title"],fm=["title"],vm=["title"],gm=["title"],hm=["title"],ym=["title"],km=["title"],Cm={key:2,class:"dss-toolbar-separator"},bm={key:3,class:"dss-toolbar-dropdown-wrapper"},wm=["title"],xm={class:"dss-toolbar-dropdown-ai"},Em={key:0,class:"dss-toolbar-right"},Sm={key:0,class:"dss-toolbar-separator"},Vm={key:0,class:"dss-toolbar-custom-group"},Nm={key:1,class:"dss-toolbar-separator"},Bm={name:"DSSTextEditor"},Mm=Object.assign(Bm,{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:D=>typeof D=="object"&&D!==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:D=>typeof D=="object"&&D!==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(D,{expose:le,emit:M}){const{t:L,locale:de}=eo.useI18n(),I={h1:Nu,h2:Bu,h3:Mu,h4:_u,h5:$u,h6:Lu},T=D,fe=M,dt=e.useSlots(),ee=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
96
|
+
`,t+="Category",F.series.forEach(g=>{const b=g.name.replace(/"/g,'""');t+=',"'+b+'"'}),t+=`
|
|
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">
|
|
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
|
-
</svg>`,f=e.ref(null),be=e.ref(null),Ce=e.ref(!1),G=e.ref(!1),U=e.ref(!1),me=e.ref(""),R=e.ref({}),xe=e.ref(!1),Ae=e.ref(!1),nt=e.ref(""),ft=e.ref(""),Z=e.ref(null),Ue=e.ref(null),qe=e.ref(null),Ee=e.ref(null),Me=e.ref(""),je=e.ref(!1),Q=e.ref({}),ze=e.ref(!1),we=e.ref({}),it=e.ref(null),ot=e.ref(null),bt=e.ref(!1),It=e.ref(""),en=e.ref(null),Pt=e.ref(""),oe=e.ref(""),ve=e.ref(""),Fe=e.ref(null),De=e.ref(null),Zt=e.ref(null),yt=e.ref(null),Ut=e.ref(null),xt=e.ref(!1),Ot=e.ref(""),J=e.ref({}),he=e.ref(!1),Be=e.ref("upload"),Xe=e.ref(""),Ke=e.ref(null),Lt=e.ref(null),Ge=e.ref([]),Dt=e.ref([]),He=e.ref(null),Pe=e.ref(!1),Et=e.ref(""),St=e.ref(""),K=e.ref(""),W=e.ref(""),X=e.ref(""),pe=e.ref(""),ye=e.ref(null),Je=e.ref(null),Tt=e.ref(null),mn=e.ref(!1),vt=e.ref(null),Gt=e.ref(!1),S=e.ref(!1),b=e.ref(null),V=e.ref("p"),Y=e.ref(!1),ne=e.ref([]),Oe=e.ref(null),mt=e.ref(null),ct=e.ref(null),We=e.ref(!1),Vt=e.ref(0),Nt=100,wt=e.ref(null),Ct=e.computed(()=>({"dss-text-editor-no-border":!T.border,"dss-text-editor-rounded":T.rounded,"dss-text-editor-full-height":T.fullHeight,"dss-comment-overlay-open":$t.value!==null})),At=e.computed(()=>({})),Bt=e.computed(()=>!T.fixedHeight||T.fullHeight?{}:{height:`${1.6*14*T.rows+24+2}px`,resize:"none",overflowY:"auto"}),bn=e.computed(()=>!T.fixedHeight||T.fullHeight?{}:{height:`${1.6*14*T.rows+32}px`,overflowY:"auto"}),Tn=e.computed(()=>T.richText&&Dt.value.length>0),ol=e.computed(()=>{if(!T.modelValue)return"";if(T.richText){let o=T.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 T.modelValue}),qt=e.computed(()=>{const o=ol.value.trim();return o?o.split(/\s+/).filter(l=>l.length>0).length:0}),ln=e.computed(()=>ol.value.length),On=e.computed(()=>yt.value!==null&&Be.value==="upload"&&Pt.value&&Pt.value.startsWith("data:")),qn=e.computed(()=>T.titlePlaceholder||L("textEditor.placeholders.title")),Rn=e.computed(()=>T.descriptionPlaceholder||L("textEditor.placeholders.description")),Nn=e.computed(()=>T.placeholder||L("textEditor.placeholders.startTyping")),A=o=>dt&&dt[o]!==void 0,O=o=>{for(let l=o+1;l<T.customToolbarSlots.length;l++)if(A(T.customToolbarSlots[l]))return!0;return!1},P=o=>{for(let l=o+1;l<T.customToolbarSlots.length;l++){const s=T.customToolbarSlots[l];if(A(s)&&ie(s))return!0}return!1},ie=o=>T.customToolbarFloatingMap.hasOwnProperty(o)?T.customToolbarFloatingMap[o]===!0:!0,Te=e.computed(()=>T.customToolbarSlots.some(o=>A(o)&&ie(o))),et=e.computed(()=>A("title-slot")),rt=e.computed(()=>A("description-slot")),tt=o=>{if(!o||o.trim()==="")return"<html></html>";const l=o.trim();return l.startsWith("<html>")&&l.endsWith("</html>")?o:`<html>${o}</html>`},Mt=o=>{if(!o||o.trim()==="")return"";const l=o.replace(/<!--[\s\S]*?-->/g,""),s=l.trim();return s.startsWith("<html>")&&s.endsWith("</html>")?s.slice(6,-7).trim():l},on=o=>{if(!o)return;const l=document.createTreeWalker(o,NodeFilter.SHOW_COMMENT,null,!1),s=[];let r=l.nextNode();for(;r;)s.push(r),r=l.nextNode();s.forEach(c=>c.remove())},An=o=>{try{const l=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`${l} ${r} ${c}`}catch{return""}},Fn=o=>{if(!o||typeof o!="string")return!1;const l=o.trim();if(!l)return!1;if(["Started conversation","A démarré la conversation","started_conversation","conv_started"].includes(l))return!0;try{const c=L("textEditor.started_conversation");if(c&&l===c)return!0}catch{}const r=l.toLowerCase();return r.includes("started conversation")||r.includes("démarré la conversation")||r==="started conversation"||r==="a démarré la conversation"},Qn=o=>{const l=o.target.value;fe("update:modelValue",l),fe("change",l)},En=()=>{if(!ye.value)return;const o=ye.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")},oo=()=>{Gt.value=!0,En()},ql=()=>{Gt.value=!1,Al()},Al=()=>{if(!ye.value)return;const o=ye.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 l=o.value;o.value="M";const s=o.scrollHeight;o.value=l,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")},Wl=o=>{const s=o.target.value;Gt.value&&En(),fe("update:title",s),fe("title-change",s),Tt.value="title",T.richText&&(Pe.value||(St.value=Et.value,X.value=K.value,pe.value=W.value),He.value&&clearTimeout(He.value),Pe.value=!0,He.value=setTimeout(()=>{Pe.value=!1,at()},500))},ml=()=>{if(!Je.value)return;const o=Je.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")},Vl=()=>{S.value=!0,ml()},ao=()=>{S.value=!1,Jn()},Jn=()=>{if(!Je.value)return;const o=Je.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 l=o.value;o.value="M";const s=o.scrollHeight;o.value=l,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")},yn=o=>{const s=o.target.value;S.value&&ml(),fe("update:description",s),fe("description-change",s),Tt.value="description",T.richText&&(Pe.value||(St.value=Et.value,X.value=K.value,pe.value=W.value),He.value&&clearTimeout(He.value),Pe.value=!0,He.value=setTimeout(()=>{Pe.value=!1,at()},500))},Qt=()=>{const o=window.getSelection();if(o.rangeCount===0)return null;const l=o.getRangeAt(0);if(l.startContainer.nodeType===1)return{type:"element",element:l.startContainer,offset:l.startOffset};const s=l.cloneRange();return s.selectNodeContents(f.value),s.setEnd(l.startContainer,l.startOffset),{type:"text",start:s.toString().length,end:s.toString().length+l.toString().length}},an=o=>{if(!(!o||!f.value))try{const l=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),l.removeAllRanges(),l.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])}l.removeAllRanges(),l.addRange(s)}catch{f.value.focus()}},al=()=>{if(!f.value)return;f.value.focus();const o=window.getSelection(),l=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)l.setStart(r,r.length),l.setEnd(r,r.length);else if(r.childNodes.length>0){const c=s(r);c&&c.nodeType===3?(l.setStart(c,c.length),l.setEnd(c,c.length)):(l.selectNodeContents(r),l.collapse(!1))}else l.setStart(r,0),l.setEnd(r,0);o.removeAllRanges(),o.addRange(l)},at=(o=!1)=>{if(!f.value)return;const l=f.value.innerHTML,s=T.title||"",r=T.description||"";if(!o&&l===Et.value&&s===K.value&&r===W.value)return;const c={content:St.value||Et.value,title:X.value!==void 0?X.value:K.value,description:pe.value!==void 0?pe.value:W.value},d=Ge.value.length>0?Ge.value[Ge.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&&(Ge.value.push(c),Ge.value.length>50&&Ge.value.shift(),Dt.value=[]),Et.value=l,K.value=s,W.value=r,St.value=l,X.value=s,pe.value=r},ce=o=>{if(!f.value)return;pl(),f.value&&on(f.value);let l=null;f.value&&(f.value.querySelector("p")||(l=Qt(),ht()));const s=o&&o.inputType&&(o.inputType==="insertText"||o.inputType==="insertCompositionText"||o.inputType==="deleteContentBackward"||o.inputType==="deleteContentForward");s&&b.value&&(b.value=null),G.value=!0;const r=f.value.innerHTML.replace(/<!--[\s\S]*?-->/g,"").replace(/ |\u00A0/g," "),c=tt(r);fe("update:modelValue",c),fe("change",c),Tt.value="editor",Pe.value||(St.value=Et.value,X.value=K.value,pe.value=W.value),He.value&&clearTimeout(He.value),Pe.value=!0,He.value=setTimeout(()=>{Pe.value=!1,at(),jl(),Mo()},500),e.nextTick(()=>{l&&an(l),pl();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&&b.value?.command===k){Q.value[k]=b.value.state;return}if(k==="bold")if(m){const _=m.commonAncestorContainer,H=_.nodeType===3?_.parentElement:_;let E=!1;if(H&&((H.tagName==="STRONG"||H.tagName==="B"||H.closest&&H.closest("strong, b"))&&(E=!0),!E&&H.style&&parseInt(H.style.fontWeight)>=600&&(E=!0),!E))try{const se=window.getComputedStyle(H);parseInt(se.fontWeight)>=600&&(E=!0)}catch{}Q.value[k]=E}else Q.value.hasOwnProperty(k)||(Q.value[k]=!1);else if(k==="italic")if(m){const _=m.commonAncestorContainer,H=_.nodeType===3?_.parentElement:_,E=H&&(H.tagName==="EM"||H.tagName==="I"||H.closest&&H.closest("em, i"));Q.value[k]=!!E}else{const _=document.queryCommandState(k);Q.value[k]=_}else{const _=document.queryCommandState(k);Q.value[k]=_}}catch{}}),Mn(),pn(),$e(),nn(),kt(),wn("handleRichTextInput"),s&&(o.inputType==="insertText"||o.inputType==="insertCompositionText")){const k=o.data||"";k&&k.length===1&&setTimeout(()=>Mo(k),0),(k===" "||k===`
|
|
101
|
-
`||/[.,;:!?]/.test(k))&&setTimeout(()=>{jl()},100)}G.value=!1})},pl=()=>{if(!f.value)return;const o=window.getSelection();if(!o||o.rangeCount===0)return;const l=o.getRangeAt(0),s=l.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=l.startContainer.nodeType===3?l.startContainer.parentElement:l.startContainer,m=l.endContainer.nodeType===3?l.endContainer.parentElement:l.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)}}}},ht=()=>{if(!f.value)return;const o=f.value;if(o.querySelector&&o.querySelector("p"))return;const l=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(l.has(u)){r=null;return}r||(r=document.createElement("p"),o.insertBefore(r,d)),r.appendChild(d)}})},pn=()=>{if(f.value&&!mn.value){mn.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:.*,/,""),_=c===d||c===k;(c.startsWith("http://")||c.startsWith("https://")||c.startsWith("data:")||_||_)&&(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=ee,m.appendChild(k)}else if(v&&m.children.length===1){const k=m.parentNode;k.insertBefore(r,m),k.removeChild(m)}})}finally{mn.value=!1}}},st=o=>{jl(),fe("blur",o),Il()},gt=()=>{if(T.disabled||!T.richText||!f.value)return;cn(),He.value&&(clearTimeout(He.value),He.value=null),Pe.value&&(at(),Pe.value=!1);const o=Tt.value==="title",l=Tt.value==="description",s=Tt.value==="editor";if(Ge.value.length===0){o&&ye.value?ye.value.focus():l&&Je.value?Je.value.focus():f.value.focus(),document.execCommand("undo",!1),e.nextTick(()=>{ce()});return}const r={content:f.value.innerHTML,title:T.title||"",description:T.description||""};Dt.value.push(r);const c=Ge.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,Et.value=d,K.value=u,W.value=m,St.value=d,X.value=u,pe.value=m,e.nextTick(()=>{Mn(),fn(),ut(),nn();const v=tt(d);fe("update:modelValue",v),fe("update:title",u),fe("update:description",m),fe("change",v),fe("title-change",u),fe("description-change",m),G.value=!1,e.nextTick(()=>{setTimeout(()=>{if(o){if(ye.value){ye.value.focus();const k=u.length;ye.value.setSelectionRange&&ye.value.setSelectionRange(k,k),En()}}else if(l){if(Je.value){Je.value.focus();const k=m.length;Je.value.setSelectionRange(k,k)}}else if(s)al();else if(ye.value&&document.activeElement===ye.value){const k=u.length;ye.value.setSelectionRange&&ye.value.setSelectionRange(k,k),En()}else if(Je.value&&document.activeElement===Je.value){const k=m.length;Je.value.setSelectionRange(k,k)}else f.value&&al()},10)})})}},ae=()=>{if(T.disabled||!T.richText||!f.value)return;cn();const o=Tt.value==="title",l=Tt.value==="description",s=Tt.value==="editor";if(Dt.value.length===0){o&&ye.value?ye.value.focus():l&&Je.value?Je.value.focus():f.value.focus(),document.execCommand("redo",!1),e.nextTick(()=>{ce()});return}const r={content:f.value.innerHTML,title:T.title||"",description:T.description||""};Ge.value.push(r);const c=Dt.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,Et.value=d,K.value=u,W.value=m,St.value=d,X.value=u,pe.value=m,e.nextTick(()=>{Mn(),fn(),ut(),nn();const v=tt(d);fe("update:modelValue",v),fe("update:title",u),fe("update:description",m),fe("change",v),fe("title-change",u),fe("description-change",m),G.value=!1,e.nextTick(()=>{setTimeout(()=>{if(o){if(ye.value){ye.value.focus();const k=u.length;ye.value.setSelectionRange&&ye.value.setSelectionRange(k,k),En()}}else if(l){if(Je.value){Je.value.focus();const k=m.length;Je.value.setSelectionRange(k,k)}}else if(s)al();else if(ye.value&&document.activeElement===ye.value){const k=u.length;ye.value.setSelectionRange&&ye.value.setSelectionRange(k,k),En()}else if(Je.value&&document.activeElement===Je.value){const k=m.length;Je.value.setSelectionRange(k,k)}else f.value&&al()},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"})},$e=()=>{if(!f.value)return;f.value.querySelectorAll("i, em").forEach(l=>{l.style.fontStyle="italic"})},so=()=>{const o=window.getSelection();if(!o||o.rangeCount===0)return!1;const l=o.getRangeAt(0);let s=!1;if(l.collapsed){const r=l.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=l.commonAncestorContainer.nodeType===1?l.commonAncestorContainer:l.commonAncestorContainer.parentNode;if(r){const c=document.createTreeWalker(r,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);let d;for(;d=c.nextNode();)if(!(typeof l.intersectsNode=="function"&&!l.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(()=>{$e()}),!1;if(l.collapsed)document.execCommand("italic",!1),e.nextTick(()=>{$e()});else try{const r=l.extractContents(),c=document.createElement("em");c.style.fontStyle="italic",c.appendChild(r),l.insertNode(c),l.setStartAfter(c),l.collapse(!0),o.removeAllRanges(),o.addRange(l),e.nextTick(()=>{$e()})}catch{document.execCommand("italic",!1),e.nextTick(()=>{$e()})}return!0},sn=()=>{const o=window.getSelection();if(!o||o.rangeCount===0)return!1;const l=o.getRangeAt(0);let s=!1;if(l.collapsed){const r=l.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=l.commonAncestorContainer.nodeType===1?l.commonAncestorContainer:l.commonAncestorContainer.parentNode;if(r){const c=document.createTreeWalker(r,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);let d;for(;d=c.nextNode();)if(!(typeof l.intersectsNode=="function"&&!l.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(l.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=l.extractContents(),c=document.createElement("b");c.style.fontWeight="600",c.appendChild(r),l.insertNode(c),l.setStartAfter(c),l.collapse(!0),o.removeAllRanges(),o.addRange(l),e.nextTick(()=>{Yt()})}catch{document.execCommand("bold",!1),e.nextTick(()=>{Yt()})}return!0},Bn=(o,l=null)=>{if(T.disabled||!T.richText||!f.value)return;Pe.value?(He.value&&(clearTimeout(He.value),He.value=null),at(),Pe.value=!1):at(),cn(),f.value.focus();const s=window.getSelection();let r=null;if(s&&s.rangeCount>0){const d=s.getRangeAt(0);!d.collapsed&&Wt(d)&&(r=Qt())}if(o==="createLink"&&l){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(l);u.insertNode(v),u.selectNodeContents(v)}}}if(o==="bold"){const d=sn();Q.value.bold=d;const u=window.getSelection();u.rangeCount>0&&u.getRangeAt(0).collapsed&&(b.value={command:"bold",state:d}),e.nextTick(()=>{r&&(an(r),e.nextTick(()=>{const m=tn("bold");Q.value.bold=m})),ce(),fn(),nn()});return}if(o==="italic"){const d=so();Q.value.italic=d;const u=window.getSelection();u.rangeCount>0&&u.getRangeAt(0).collapsed&&(b.value={command:"italic",state:d}),e.nextTick(()=>{r&&(an(r),e.nextTick(()=>{const m=tn("italic");Q.value.italic=m})),ce(),$e(),fn(),nn()});return}let c=!1;try{c=document.execCommand(o,!1,l)}catch{}e.nextTick(()=>{if(r&&an(r),["bold","italic","underline"].includes(o))try{if(o==="bold")r&&e.nextTick(()=>{const u=tn("bold");Q.value.bold=u});else if(o==="italic")if(r)e.nextTick(()=>{const u=tn("italic");Q.value.italic=u});else{const u=document.queryCommandState(o);Q.value[o]=u}else{const u=document.queryCommandState(o);Q.value[o]=u}}catch{Q.value.hasOwnProperty(o)?Q.value[o]=!Q.value[o]:Q.value[o]=!0}if(o==="createLink"&&l){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",l)}f.value.querySelectorAll("a").forEach(v=>{const k=v.getAttribute("href");(!k||k===""||k==="#")&&v.setAttribute("href",l)})}ce(),fn(),nn()})},tn=(o,l=null)=>{if(T.disabled||!f.value)return!1;try{if(o==="formatBlock"&&l){const r=document.queryCommandValue("formatBlock");if(l==="<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===l||r.toLowerCase()===l.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 Q.value.hasOwnProperty(o)?Q.value[o]:(Q.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 _;for(;_=k.nextNode();)if(!(typeof c.intersectsNode=="function"&&!c.intersectsNode(_))){if(_.nodeType===3){if(!(_.textContent||"").trim())continue;v=!0;let E=_.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(_.nodeType===1){const H=_;if(H.tagName==="STRONG"||H.tagName==="B"){u=!0;break}if(H.style&&parseInt(H.style.fontWeight)>=600){u=!0;break}}if(u)break}}return Q.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 Q.value.hasOwnProperty(o)?Q.value[o]:(Q.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 _;for(;_=k.nextNode();)if(!(typeof c.intersectsNode=="function"&&!c.intersectsNode(_))){if(_.nodeType===3){if(!(_.textContent||"").trim())continue;v=!0;let E=_.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(_.nodeType===1){const H=_;if(H.tagName==="EM"||H.tagName==="I"){u=!0;break}if(H.style&&H.style.fontStyle==="italic"){u=!0;break}}if(u)break}}return Q.value[o]=u&&v,u&&v}}const d=document.queryCommandState(o);return c.collapsed&&Q.value.hasOwnProperty(o)?Q.value[o]:(Q.value[o]=d,d)}return Q.value.hasOwnProperty(o)?Q.value[o]:!1}catch{return Q.value.hasOwnProperty(o)?Q.value[o]:!1}try{return document.queryCommandState(o)}catch{return!1}}catch{return!1}},In=o=>{T.disabled||!T.richText||(be.value=be.value===o?null:o,o==="askAi"&&(ot.value=null))},cn=()=>{be.value=null,Ke.value=null},zn=o=>{Bn("formatBlock",o),cn()},Dl=o=>{if(!o||!f.value)return o;const l=Ie=>{let Ve=Ie.nodeType===Node.TEXT_NODE?Ie.parentElement:Ie;for(;Ve&&Ve!==f.value;){const lt=Ve.tagName;if(lt==="P"){const Cn=Ve.parentElement;if(Cn===f.value||Cn.tagName==="BLOCKQUOTE")return Ve}if(lt==="BLOCKQUOTE")break;Ve=Ve.parentElement}return null},s=l(o.startContainer),r=l(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 lt=Ie.parentElement;if(lt===f.value||lt.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),_=Math.max(m,v),H=c.slice(k,_+1);if(H.length===0)return o;const E=H[0],se=H[H.length-1],j=document.createRange();return j.setStartBefore(E),j.setEndAfter(se),j},Nl=()=>{if(T.disabled||!T.richText||!f.value)return;Pe.value?(He.value&&(clearTimeout(He.value),He.value=null),at(),Pe.value=!1):at(),cn(),f.value.focus();const o=window.getSelection();if(o.rangeCount===0)return;let l=o.getRangeAt(0);!l.collapsed&&Wt(l)&&(l=Dl(l),o.removeAllRanges(),o.addRange(l));let s=null;!l.collapsed&&Wt(l)&&(s=Qt());const r=l.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(l.collapsed)document.execCommand("formatBlock",!1,"<blockquote>");else{const u=document.createElement("blockquote"),m=l.extractContents();u.appendChild(m),l.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 _;for(;_=k.nextNode();)v.push(_);if(v.forEach(E=>{const se=document.createElement("p");E.parentNode.insertBefore(se,E),se.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&&an(s),ut(),ce(),nn()})},Zn=()=>{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=_=>{if(!_)return!1;const H=_.textContent||"",se=(_.innerHTML||"").trim();return H.trim()===""||se===""||se==="<br>"||se==="<br/>"||se==="<p></p>"||se==="<p><br></p>"||se==="<p><br/></p>"||se==="<p> </p>"||se==="<p><br> </p>"||se==="<div></div>"||se==="<div><br></div>"||se==="<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 _=r.lastChild;if(_.nodeType===1&&_.tagName==="BR")_.remove();else if(_.nodeType===3)if((_.textContent||"").trim()==="")_.remove();else break;else break}if(r.children.length>0)for(let _=r.children.length-1;_>=0;_--){const H=r.children[_];if((H.tagName==="P"||H.tagName==="DIV")&&c(H))H.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(()=>{ut(),ce()})},fn=()=>{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}},Zl=()=>{if(!f.value)return;const o=window.getSelection();o&&o.rangeCount>0&&o.getRangeAt(0),Ee.value=Qt();const l=window.getSelection();let s="";l.rangeCount>0&&(s=l.getRangeAt(0).toString()),nt.value="",ft.value=s,Me.value="",qe.value=null,Ae.value=!0,cn(),e.nextTick(()=>{Z.value&&Z.value.focus()})},Ul=()=>{if(!f.value)return;Pe.value?(He.value&&(clearTimeout(He.value),He.value=null),at(),Pe.value=!1):at();const o=window.getSelection();let l=null;if(o.rangeCount>0){const r=o.getRangeAt(0).commonAncestorContainer;l=r.nodeType===1?r.closest("a"):r.parentElement?.closest("a")}if(!l&&qe.value&&(l=qe.value),l&&l.parentNode){const s=document.createDocumentFragment();for(;l.firstChild;)s.appendChild(l.firstChild);if(l.parentNode.replaceChild(s,l),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 Bn("unlink");Ce.value=!1,cn(),e.nextTick(()=>{ce(),fn()})},sl=()=>{T.disabled||!T.richText||f.value&&(Pe.value?(He.value&&(clearTimeout(He.value),He.value=null),at(),Pe.value=!1):at(),cn(),f.value.focus(),document.execCommand("insertUnorderedList",!1),e.nextTick(()=>{Mn(),ce(),nn()}))},Hl=()=>{T.disabled||!T.richText||f.value&&(Pe.value?(He.value&&(clearTimeout(He.value),He.value=null),at(),Pe.value=!1):at(),cn(),f.value.focus(),document.execCommand("insertOrderedList",!1),e.nextTick(()=>{Mn(),ce(),nn()}))},fl=o=>{const l=o.parentElement;if(!l||l.tagName!=="OL")return null;let s=0,r=o.previousElementSibling;for(;r;)r.tagName==="LI"&&s++,r=r.previousElementSibling;return s+1},Mn=()=>{if(!f.value)return;f.value.querySelectorAll("li > ol").forEach(l=>{const s=l.parentElement;if(s&&s.tagName==="LI"){const r=fl(s);r!==null&&Array.from(l.children).filter(d=>d.tagName==="LI").forEach(d=>{d.setAttribute("data-parent-num",String(r))})}})},Rl=()=>{if(T.disabled||!T.richText||!f.value)return;cn(),f.value.focus();const o=window.getSelection();if(o.rangeCount===0)return;const l=o.getRangeAt(0),s=l.commonAncestorContainer.nodeType===1?l.commonAncestorContainer.closest("li"):l.commonAncestorContainer.parentElement?.closest("li");if(!s){document.execCommand("indent",!1),e.nextTick(()=>{Mn(),ce()});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=fl(c);u.appendChild(s),m!==null&&r.tagName==="OL"&&s.setAttribute("data-parent-num",String(m)),Mn();const v=document.createRange();v.selectNodeContents(s),v.collapse(!1),o.removeAllRanges(),o.addRange(v),e.nextTick(()=>{ce(),nn()})}else document.execCommand("indent",!1),e.nextTick(()=>{Mn(),ce(),nn()})},vl=()=>{if(T.disabled||!T.richText||!f.value)return;cn(),f.value.focus();const o=window.getSelection();if(o.rangeCount===0)return;const l=o.getRangeAt(0),s=l.commonAncestorContainer.nodeType===1?l.commonAncestorContainer.closest("li"):l.commonAncestorContainer.parentElement?.closest("li");if(!s){document.execCommand("outdent",!1),e.nextTick(()=>{Mn(),ce()});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(),Mn();const u=document.createRange();u.selectNodeContents(s),u.collapse(!1),o.removeAllRanges(),o.addRange(u),e.nextTick(()=>{ce(),nn()});return}}document.execCommand("outdent",!1),e.nextTick(()=>{Mn(),ce(),nn()})},$t=e.ref(null),Un=e.ref(null),rl=e.ref({}),y=e.ref(""),h=e.ref(null),x=e.ref("");e.ref("");const q=e.ref(null);e.ref("");const re=e.ref([]),pt=e.ref(!1),Ht=e.ref(!1),_n=o=>{if(!o)return"";const l=o.cloneRange(),s=document.createElement("div");return s.appendChild(l.cloneContents()),s.innerHTML},Dn=()=>{if(T.disabled||!T.richText||!f.value)return;if($t.value!==null){$t.value=null,y.value="",x.value="",q.value=null,re.value=[],xn(!0);return}cn(),f.value.focus();const o=window.getSelection();if(!o||o.rangeCount===0)return;const l=o.getRangeAt(0);if(l.collapsed||!Wt(l))return;x.value=_n(l)||"",q.value=Qt();const s=l.getBoundingClientRect(),r=f.value.parentElement;if(!r)return;const c=r.getBoundingClientRect(),d=s.bottom-c.top,m=Math.max(d+8,0);rl.value={top:`${m}px`,bottom:"auto"},$t.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 _=r.getBoundingClientRect(),H=v.getBoundingClientRect(),E=k.getBoundingClientRect(),se=H.bottom-_.top,j=E.top-_.top,Ie=8;if(se>j-Ie){const Ve=E.height;rl.value={bottom:`${Ve+Ie}px`,top:"auto"}}else rl.value={top:`${m}px`,bottom:"auto"}}}})},Wn=()=>{if(!y.value.trim())return;const o=y.value.trim(),l=new Date,s={text:o,selectionText:x.value,selectionRange:q.value,commentId:$t.value,user:T.commentUser||null,createdAt:l.toISOString()};re.value=[...re.value,s],fe("comment-submitted",s),io(s),q.value&&!ro(q.value)&&Eo($t.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()}wn("sendComment")})},kl=(o,l)=>{if(!(!T.commentUser||!o.user||o.user.id!==T.commentUser.id)){if(re.value=re.value.filter((s,r)=>r!==l),$t.value!==null&&f.value){const s=String($t.value),r=f.value.querySelector(`[data-comment="${s}"], [data-fake-comment="${s}"]`);if(r&&re.value.length>0){const c=[],d=new Set;re.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(re.value.length))}else r&&re.value.length===0&&(r.removeAttribute("data-comment-user"),r.removeAttribute("data-comment-user-2"),r.setAttribute("data-comment-count","0"))}if(fe("comment-deleted",{comment:o,index:l,commentId:$t.value}),T.comments&&Array.isArray(T.comments)){const s=T.comments.filter(r=>!(r.commentId===o.commentId&&r.text===o.text&&r.user?.id===o.user?.id));fe("update:comments",s)}e.nextTick(()=>{wn("deleteComment")})}},ro=o=>{if(!o||!f.value)return!1;try{const l=xo(o);if(!l)return!1;const s=l.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 l=document.createRange();if(o.type==="element"&&o.element)return f.value.contains(o.element)?(l.setStart(o.element,o.offset),l.collapse(!0),l):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&&(l.setStart(c,o.start-s),d=!0),d&&o.end>=s&&o.end<=m&&(l.setEnd(c,o.end-s),u=!0),s=m}else{let m=c.childNodes.length;for(;m--;)r.push(c.childNodes[m])}return d?l:null}catch{return null}},Eo=(o,l)=>{if(!(!o||!l||!f.value))try{const s=xo(l);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,_=s.endOffset,H=m.nodeType===3?m.parentNode:m,E=v.nodeType===3?v.parentNode:v;if(H===E&&k===0&&_===(v.nodeType===3?v.length:E.childNodes.length)&&(H.tagName==="P"||H.tagName==="DIV"||H.tagName==="H1"||H.tagName==="H2"||H.tagName==="H3"||H.tagName==="H4"||H.tagName==="H5"||H.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(()=>{wn("wrapSelectionWithCommentMarker"),ce()})}catch{}},io=o=>{if(!o||!o.commentId)return;const l=Array.isArray(T.comments)?[...T.comments]:[],s=typeof o.commentId=="string"&&o.commentId.startsWith("comment-")?Date.now():Number(o.commentId)||o.commentId;let r=l.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=l[r];if(d.conversation||(d.conversation=[]),d.conversation.push(c),d.updated_at=o.createdAt,!d.article_id&&l.length>0){const u=l.find(m=>m.article_id);u&&(d.article_id=u.article_id)}}else{const d=o.selectionRange,u=l.length>0&&l.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"};l.push(m)}pt.value=!0,fe("update:comments",l)},So=(o,l=[])=>{if(T.disabled||!T.richText||!f.value)return;const s=f.value;let r=null;try{r=s.querySelector(o)}catch{return}if(!r)return;cn(),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 _=m.getBoundingClientRect(),H=u.bottom-_.top,se=Math.max(H+8,0);rl.value={top:`${se}px`,bottom:"auto"}}const v=r.getAttribute("data-comment")||r.getAttribute("data-fake-comment");let k=[];if(v&&T.comments&&Array.isArray(T.comments)){const _=T.comments.find(H=>String(H.conversation_id)===String(v));if(_&&_.conversation&&Array.isArray(_.conversation)){const H=_.conversation.map(E=>({id:E.id||E.commentary_id,commentary_id:E.id||E.commentary_id,conversation_id:_.id||_.conversation_id,text:E.text,user:E.user,createdAt:E.created_at||E.createdAt,updated_at:E.updated_at||E.updatedAt}));k.push(...H)}}k.length===0&&Array.isArray(l)&&l.length>0&&(k=l.slice()),k.sort((_,H)=>{const E=Ie=>{if(!Ie)return 0;const Ve=new Date(Ie).getTime();return isNaN(Ve)?0:Ve},se=E(_.createdAt),j=E(H.createdAt);return se===j?0:se-j}),re.value=k,xn(!0),$t.value=v||null,r&&(Un.value=r,r.classList.add("editor-comment-highlighted")),e.nextTick(()=>{if(y.value="",h.value){const _=h.value;_.style.height="auto",_.style.height=`${_.scrollHeight}px`,_.focus()}if(m){const _=m.querySelector(".dss-comment-overlay");if(_){const H=m.querySelector(".dss-text-editor-footer");if(H){const E=m.getBoundingClientRect(),se=_.getBoundingClientRect(),j=H.getBoundingClientRect(),Ie=se.bottom-E.top,Ve=j.top-E.top,lt=8;if(Ie>Ve-lt){const Cn=j.height;rl.value={bottom:`${Cn+lt}px`,top:"auto"}}}}}wn("openCommentOverlayForSelector")})},co=e.ref(null),Vo=e.ref(0),uo=o=>{if(!(T.disabled||!T.richText)){if(o.key==="Escape"){const l=window.getSelection();if(l.rangeCount>0){const r=l.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(()=>{Zn()},50);return}}}if(o.key.length===1||o.key==="Enter"){const l=window.getSelection();if(l&&l.rangeCount>0){const s=l.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),l.removeAllRanges(),l.addRange(k);return}}}}}}if(o.key==="Backspace"||o.key==="Delete"){const l=window.getSelection();if(l.rangeCount>0){const s=l.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,H=s.cloneContents().textContent?.trim()||"",E=c.textContent?.trim()||"";(!v||!k||H.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),l.removeAllRanges(),l.addRange(m),e.nextTick(()=>{ce()});return}}}}if(o.key==="Tab"){o.preventDefault(),o.shiftKey?vl():Rl();return}if(o.key==="Enter"){const l=window.getSelection();if(l.rangeCount>0){const s=l.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 _=v.parentElement;return _&&_!==f.value?m(_):!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 _=null;const H=s.startOffset;H<u.length&&(_=u.splitText(H));const E=document.createElement("p");if(_?E.appendChild(_):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 se=document.createRange();_?se.setStart(_,0):se.setStart(E,0),se.collapse(!0),l.removeAllRanges(),l.addRange(se),e.nextTick(()=>{ce()});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||"",lt=(j.innerHTML||"").trim(),Cn=lt.replace(/<br\s*\/?>/gi,"").trim();return Ie.trim()===""||lt===""||Cn===""||lt==="<br>"||lt==="<br/>"||lt==="<p></p>"||lt==="<p><br></p>"||lt==="<p><br/></p>"||lt==="<p> </p>"||lt==="<p><br> </p>"||lt==="<div></div>"||lt==="<div><br></div>"||lt==="<div><br/></div>"},v=c.lastChild,k=v&&v.nodeType===1&&v.tagName==="BR",_=s.startContainer,H=_.nodeType===3?_.parentElement:_,E=H===c||H&&H.parentElement===c;if(u&&m(u)||k&&E){o.preventDefault(),setTimeout(()=>{Zn()},50);return}}}}if(o.key===" "){const l=Date.now(),s=l-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(),Rl();return}}}}co.value=" ",Vo.value=l}else co.value=o.key}},Zo=o=>{if(T.disabled||!T.richText)return;o.preventDefault();let l=o.clipboardData.getData("text/html"),s=o.clipboardData.getData("text/plain");l&&(l=l.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(H=>{if(k>0){const E=v.createElement("p");E.innerHTML=H.innerHTML,H.parentNode.replaceChild(E,H)}else k++}),c){const H=["P","H1","H2","H3","H4","H5","H6","DIV","BLOCKQUOTE","UL","OL","LI"],E=Array.from(v.body.children).filter(se=>H.includes(se.tagName));if(E.length===1){const se=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||(se===j||se==="P")&&(Ve=!0),Ve)return E[0].innerHTML.trim()}}return v.body.innerHTML.trim()};if(l){const u=d(l);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);ce()},Xl=o=>{if(be.value){const s=o.target;!s.closest(".dss-toolbar-dropdown")&&!s.closest(".dss-toolbar-dropdown-toggle")&&cn()}if(ze.value){const s=o.target,r=s.closest(".dss-floating-toolbar"),c=f.value&&s.closest(".dss-text-editor-content");!r&&!c&&Il()}if(ot.value){const s=o.target,r=s.closest(".dss-floating-toolbar"),c=s.closest(".dss-toolbar-dropdown");!r&&!c&&Yl()}const l=o.target;if(!l.closest(".dss-toolbar-dropdown")&&!l.closest(".dss-toolbar-dropdown-submenu")&&(Ke.value=null),!f.value||!l.closest(".dss-text-editor-content")){const s=window.getSelection();if(s&&s.rangeCount>0){const r=s.getRangeAt(0);Y.value=!r.collapsed&&Wt(r)}else Y.value=!1}if($t.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=l.closest(".dss-toolbar-button"),d=c&&c.getAttribute("title")==="Comment";!r&&!d&&($t.value=null,y.value="",x.value="",q.value=null,re.value=[],xn(!0))}},$n=(o,l)=>{o&&o.stopPropagation&&o.stopPropagation(),Lt.value&&(clearTimeout(Lt.value),Lt.value=null),Ke.value=l},F=o=>{const l=o.relatedTarget;if(l){const s=l.closest(".dss-toolbar-dropdown-submenu"),r=l.closest(".dss-toolbar-dropdown-item-has-submenu");if(s||r)return}Lt.value&&clearTimeout(Lt.value),Lt.value=setTimeout(()=>{Ke.value=null,Lt.value=null},150)},Sn=o=>{Ke.value=null};let Xn=0;const Fl=o=>{if(!o)return;const l=Array.from(o.children);l.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")}),l.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-${++Xn}`;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(_=>{(_.tagName==="BUTTON"||_.tagName==="DIV")&&!_.classList.contains("dss-toolbar-dropdown-item")&&_.classList.add("dss-toolbar-dropdown-item")}))}})},kn=()=>{document.querySelectorAll(".dss-toolbar-dropdown").forEach(l=>{Fl(l),l.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&&$n(v,k)},m=F;c.addEventListener("mouseenter",u),c.addEventListener("mouseleave",m),c._subMenuHandlers={enter:u,leave:m}}),l.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 _=c.getAttribute("data-submenu-id");_&&$n(k,_)},m=F;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",Sn)})})})};let Ln=null;const jt=()=>{if(Ke.value){const o=document.querySelector(`.dss-toolbar-dropdown-submenu[data-submenu-id="${Ke.value}"]`),l=document.querySelector(`.dss-toolbar-dropdown-item-has-submenu[data-submenu-id="${Ke.value}"]`);o&&l&&To(o,l)}if(ze.value&&nn(),T.richText){if(Ln!==null)return;Ln=setTimeout(()=>{Ln=null,wn("handleWindowResize")},150)}},Jt=()=>{if(!T.richText)return;document.querySelectorAll(".dss-toolbar-custom-group").forEach(l=>{Array.from(l.children).filter(r=>r.tagName==="DIV"&&!r.classList.contains("dss-toolbar-button")).forEach(r=>{r.classList.add("dss-toolbar-button")})})},gl=()=>{const o=document.querySelectorAll(".dss-text-editor-footer, .dss-text-editor-footer-content, .dss-text-editor-footer-stat, .dss-text-editor-footer-separator"),l=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",l),s.addEventListener("mousedown",l),s.addEventListener("dragstart",l),s.addEventListener("contextmenu",l),s.addEventListener("click",r=>{if(window.getSelection){const c=window.getSelection();c.removeAllRanges&&c.removeAllRanges()}})})};e.onMounted(()=>{if(e.nextTick(()=>{requestAnimationFrame(()=>{Gt.value?En():Al(),S.value?ml():Jn()})}),e.nextTick(()=>{gl()}),T.richText&&f.value){try{document.execCommand("defaultParagraphSeparator",!1,"p")}catch{}document.addEventListener("click",Xl),window.addEventListener("resize",jt);let o=null;const l=()=>{o===null&&(o=setTimeout(()=>{o=null,jt()},150))};window.addEventListener("scroll",l,!0),f.value._windowScrollHandler=l,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(()=>{kn(),Jt()}),f.value.addEventListener("click",m=>{const v=m.target;v.closest("a")&&!T.disabled&&m.preventDefault();const _=v.closest(".dss-image-no-alt-icon"),H=v.closest(".dss-image-wrapper");if(_||H&&v===H){m.preventDefault(),m.stopPropagation();const E=window.getSelection(),se=document.createRange();se.setStartAfter(H),se.collapse(!0),E.removeAllRanges(),E.addRange(se)}else H&&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(H.contains(Ie)&&Ie!==H.querySelector("img")){const Ve=document.createRange();Ve.setStartAfter(H),Ve.collapse(!0),E.removeAllRanges(),E.addRange(Ve)}}else{const se=document.createRange();se.setStartAfter(H),se.collapse(!0),E.addRange(se)}}))},!0),f.value.addEventListener("mousedown",m=>{const v=m.target,k=v.closest(".dss-image-no-alt-icon"),_=v.closest(".dss-image-wrapper");if(k||_&&v.tagName!=="IMG"){m.preventDefault();const H=window.getSelection(),E=document.createRange();_&&(E.setStartAfter(_),E.collapse(!0),H.removeAllRanges(),H.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 H=k.getAttribute("alt")||k.alt||"";if(H){const E=k.getAttribute("src")||k.src||"",se=E.replace(/^https?:\/\//,"").replace(/^data:.*,/,""),j=H===E||H===se;(H.startsWith("http://")||H.startsWith("https://")||H.startsWith("data:")||j||j)&&(k.setAttribute("alt",""),k.setAttribute("data-alt",""),k.alt="")}}}),pn()})}),f.value.addEventListener("dragstart",m=>{const v=m.target,k=v.tagName==="IMG"?v:v.closest("img"),_=k?.closest(".dss-image-wrapper");k&&f.value.contains(k)&&(vt.value=_||k,m.dataTransfer.effectAllowed="move",m.dataTransfer.setData("text/html","image-drag"))}),f.value.addEventListener("dragover",m=>{vt.value&&(m.preventDefault(),m.stopPropagation(),m.dataTransfer.dropEffect="move")}),f.value.addEventListener("dragenter",m=>{vt.value&&(m.preventDefault(),m.stopPropagation())}),f.value.addEventListener("drop",m=>{if(!vt.value||!f.value)return;m.preventDefault(),m.stopPropagation();const v=vt.value,k=v.classList?.contains("dss-image-wrapper"),_=k?v.querySelector("img"):v,H=k?v:_?.closest(".dss-image-wrapper");if(!_||!f.value.contains(_)){vt.value=null;return}let E=null;const se=m.clientX,j=m.clientY;if(document.caretRangeFromPoint)E=document.caretRangeFromPoint(se,j);else{const rn=window.getSelection();rn.rangeCount>0?E=rn.getRangeAt(0).cloneRange():(E=document.createRange(),E.selectNodeContents(f.value),E.collapse(!1))}if(!E){vt.value=null;return}const Ie=E.commonAncestorContainer,Ve=Ie.nodeType===3?Ie.parentElement:Ie;if(Ve?.closest(".dss-image-wrapper")===H||H&&H.contains(Ve)){vt.value=null;return}if(H&&(Ve===H||H.contains(Ve))){vt.value=null;return}const Cn=_.getAttribute("src");let vn=null;H?vn=H.cloneNode(!0):vn=_.cloneNode(!0);try{let rn=E.startContainer;if(rn.nodeType===3&&(rn=rn.parentElement),H&&(rn===H||H.contains(rn))){const dn=document.createRange();dn.setStartAfter(H),dn.collapse(!0),E=dn}E.insertNode(vn);const gn=document.createRange();gn.setStartAfter(vn),gn.collapse(!0);const un=window.getSelection();un.removeAllRanges(),un.addRange(gn)}catch{if(f.value.childNodes.length===0){const gn=document.createElement("p");gn.appendChild(vn),f.value.appendChild(gn)}else{const gn=f.value.lastChild;if(gn&&gn.nodeType===1)gn.appendChild(vn);else{const un=document.createElement("p");un.appendChild(vn),f.value.appendChild(un)}}}H?H.remove():_.remove(),vt.value=null,e.nextTick(()=>{const rn=f.value.querySelectorAll("img");let gn=!1;rn.forEach(un=>{if(un.getAttribute("src")===Cn)if(!gn)gn=!0;else{const dn=un.closest(".dss-image-wrapper");dn?dn.remove():un.remove()}}),pn(),ce()})}),f.value.addEventListener("dragend",m=>{vt.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 _=k.querySelectorAll&&k.querySelectorAll("img");_&&_.forEach(H=>{H.removeAttribute("alt"),H.removeAttribute("data-alt"),H.setAttribute("alt",""),H.setAttribute("data-alt",""),H.alt=""})}})}),d&&clearTimeout(d),d=setTimeout(()=>{pn(),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}}),T.modelValue){const m=Mt(T.modelValue);f.value.innerHTML=m,ht()}e.nextTick(()=>{const m=f.value.innerHTML||"",v=T.title||"",k=T.description||"";Et.value=m,K.value=v,W.value=k,X.value=v,pe.value=k,Mn(),pn(),$e(),kt(),ho(),Vn()}),fn(),ut(),f.value._mutationObserver=u}}),e.onUnmounted(()=>{if(document.removeEventListener("click",Xl),window.removeEventListener("resize",jt),f.value&&f.value._windowScrollHandler&&window.removeEventListener("scroll",f.value._windowScrollHandler,!0),Ln!==null&&(clearTimeout(Ln),Ln=null),f.value&&f.value._windowScrollTimeout!==null&&clearTimeout(f.value._windowScrollTimeout),He.value&&clearTimeout(He.value),Lt.value&&clearTimeout(Lt.value),f.value&&f.value._mutationObserver&&f.value._mutationObserver.disconnect(),Oe.value&&Oe.value.disconnect(),mt.value!==null&&(cancelAnimationFrame(mt.value),mt.value=null),ct.value!==null&&(clearTimeout(ct.value),ct.value=null),wt.value!==null&&(clearTimeout(wt.value),wt.value=null),xn(!0),f.value&&f.value._scrollHandlers){const{wrapper:l,content:s,handler:r}=f.value._scrollHandlers;l&&l.removeEventListener("scroll",r),s&&s.removeEventListener("scroll",r)}const o=document.querySelector(".dss-text-editor-toolbar");o&&o._toolbarMutationObserver&&o._toolbarMutationObserver.disconnect()});const Cl=o=>{const l=o.target,s=l.closest("a");if(s&&!T.disabled){o.preventDefault();const c=document.createRange();c.selectNodeContents(s);const d=window.getSelection();d.removeAllRanges(),d.addRange(c)}const r=l.closest(".dss-image-wrapper");r&&l.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)}}pn(),fn(),ut(),nn(),kt()}):e.nextTick(()=>{pn(),fn(),ut(),nn(),kt()})},Rt=()=>{pl();const o=window.getSelection();if(o&&o.rangeCount>0){const s=o.getRangeAt(0);Y.value=!s.collapsed&&Wt(s),!s.collapsed&&b.value&&(b.value=null)}else Y.value=!1;if(pn(),fn(),ut(),nn(),kt(),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{}Q.value[s]=m}else{const d=document.queryCommandState(s);Q.value[s]=d}}}catch{}})},kt=()=>{if(!T.richText||T.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"}},ut=()=>{if(!f.value){je.value=!1;return}try{const o=window.getSelection();let l=!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");l=!!(c&&f.value.contains(c))}je.value=l}catch{je.value=!1}},Wt=o=>{if(!o||!f.value)return!1;const l=o.commonAncestorContainer;if(!l)return!1;const s=l.nodeType===3?l.parentElement:l;return s?f.value.contains(s):!1},Il=()=>{ze.value=!1},nn=()=>{if(!T.floatingToolbar||!T.richText||T.disabled){ze.value=!1;return}const o=window.getSelection();if(!o||o.rangeCount===0){ze.value=!1;return}const l=o.getRangeAt(0);if(l.collapsed||!Wt(l)){ze.value=!1;return}const s=l.getBoundingClientRect();if(!s||s.width===0&&s.height===0){ze.value=!1;return}const r=f.value;if(!r){ze.value=!1;return}const c=r.getBoundingClientRect();if(!c||c.width===0){ze.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 _=0;it.value&&(_=it.value.getBoundingClientRect().width);const H=(_||320)/2;let E=c.left+H,se=c.right-H;if(se<E){const j=c.left+c.width/2;E=j,se=j}if(k>0){const j=H+u,Ie=k-H-u;if(E=Math.max(E,j),se=Math.min(se,Ie),se<E){const Ve=k/2;E=Ve,se=Ve}}v<E?v=E:v>se&&(v=se),we.value={position:"fixed",top:`${Math.max(m,8)}px`,left:`${v}px`,transform:"translate(-50%, -100%)",zIndex:10003},ze.value=!0},Bl=o=>{T.disabled||!T.richText||(ot.value=ot.value===o?null:o,o==="askAi"&&(be.value=null))},Yl=()=>{ot.value=null,Ke.value=null},Pn=o=>{zn(o),Yl()};let il=null,cl=null,bl=null,wl=null;const Uo=o=>{if(T.disabled||!T.richText){Ml(),zl();return}const l=o.target,s=l.closest("a"),r=l.closest("img");if(il&&(clearTimeout(il),il=null),bl&&(clearTimeout(bl),bl=null),s&&s!==cl){zl(),cl=s;let c=s.getAttribute("href")||"";(!c||c==="#"||c==="")&&(c=s.textContent||""),qe.value=s,me.value=c,U.value=!0,xe.value=!0,el(s)}else!s&&cl?(cl=null,il=setTimeout(()=>{xe.value||Ml()},150)):s&&s===cl&&el(s);if(r&&r!==wl){Ml(),wl=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),yt.value=r,Ot.value=c.trim()||L("textEditor.image.noAlt"),xt.value=!0,he.value=!0,No(r)}else!r&&wl?(wl=null,bl=setTimeout(()=>{he.value||zl()},150)):r&&r===wl&&No(r)},xl=o=>{const l=o.relatedTarget;(!l||!l.closest(".dss-text-editor-content")&&!l.closest(".dss-link-popup"))&&(cl=null,wl=null,il&&(clearTimeout(il),il=null),bl&&(clearTimeout(bl),bl=null),Ml(),zl())},Ml=()=>{xe.value=!1,setTimeout(()=>{xe.value||(U.value=!1,me.value="",Ae.value||(qe.value=null))},100)},el=o=>{if(!o||!f.value)return;const l=o.getBoundingClientRect(),c=l.top-32-8,d=l.left+l.width/2;R.value={position:"fixed",top:`${c}px`,left:`${d}px`,transform:"translateX(-50%)",zIndex:10002}},zl=()=>{he.value=!1,setTimeout(()=>{he.value||(xt.value=!1,Ot.value="",bt.value||(yt.value=null))},100)},No=o=>{if(!o||!f.value)return;const l=o.getBoundingClientRect(),c=l.top-32-8,d=l.left+l.width/2;J.value={position:"fixed",top:`${c}px`,left:`${d}px`,transform:"translateX(-50%)",zIndex:10002}},Pl=()=>{if(!me.value||!qe.value)return;let l=qe.value.getAttribute("href")||me.value;!l.startsWith("http://")&&!l.startsWith("https://")&&!l.startsWith("mailto:")&&(l="https://"+l),window.open(l,"_blank","noopener,noreferrer")},Xo=()=>{if(qe.value){const o=qe.value.textContent||"",l=qe.value.getAttribute("href")||"",s=qe.value;nt.value=l,ft.value=o,Me.value=o,xe.value=!1,U.value=!1,me.value="",qe.value=s,Ae.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")||"";nt.value=d,ft.value=c,Me.value=c,qe.value=r,Ae.value=!0}}}else{Ee.value=Qt();const o=window.getSelection();let l="";o.rangeCount>0&&(l=o.getRangeAt(0).toString()),nt.value="",ft.value=l,Me.value="",qe.value=null,Ae.value=!0}e.nextTick(()=>{Z.value&&(Z.value.focus(),Z.value.select())})},Ol=()=>{Ae.value=!1,nt.value="",ft.value="",Me.value="",qe.value=null,Ee.value=null},mo=()=>{if(!nt.value.trim()){Ol();return}if(Pe.value?(He.value&&(clearTimeout(He.value),He.value=null),at(),Pe.value=!1):at(),ft.value.trim()||(ft.value=nt.value.trim()),qe.value&&f.value&&f.value.contains(qe.value)){const o=window.getSelection();o.rangeCount>0&&o.removeAllRanges();const l=qe.value;if(l.setAttribute("href",nt.value.trim()),ft.value.trim()!==Me.value.trim()){for(;l.firstChild;)l.removeChild(l.firstChild);l.textContent=ft.value.trim()}l.style.color="#60afdf",l.style.textDecoration="underline";const s=document.createRange();s.selectNodeContents(l),s.collapse(!1),o.removeAllRanges(),o.addRange(s),ce()}else if(f.value){f.value.focus();const o=window.getSelection();o.removeAllRanges(),Ee.value&&an(Ee.value);let l=null;if(o.rangeCount>0&&(l=o.getRangeAt(0)),l&&!l.collapsed){l.toString();const s=document.createElement("a");s.href=nt.value.trim(),s.textContent=ft.value.trim(),s.style.color="#60afdf",s.style.textDecoration="underline",l.deleteContents(),l.insertNode(s);const r=document.createTextNode(" ");l.setStartAfter(s),l.insertNode(r),l.setStartAfter(r),l.collapse(!0),o.removeAllRanges(),o.addRange(l)}else{l||(l=document.createRange(),l.selectNodeContents(f.value),l.collapse(!1));const s=l.startContainer,r=s.nodeType===3,c=r&&l.startOffset===s.textContent.length,d=document.createElement("a");if(d.href=nt.value.trim(),d.textContent=ft.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(l.startOffset>0){const k=s.textContent.substring(0,l.startOffset),_=k[k.length-1];if(_&&_!==" "&&_!==" "&&_!==`
|
|
102
|
-
`){const
|
|
103
|
-
`){const k=document.createTextNode(" ");l.insertNode(k),l.setStartAfter(k)}}l.insertNode(d);const u=document.createTextNode(" ");l.setStartAfter(d),l.insertNode(u),l.setStartAfter(u),l.collapse(!0),o.removeAllRanges(),o.addRange(l)}}ce()}e.nextTick(()=>{fn(),Ol()})},jl=()=>{if(!f.value||G.value)return;const o=window.getSelection();let l=null;o&&o.rangeCount>0&&(l=Qt());const s=/(https?:\/\/[^\s<>"{}|\\^`\[\]]+[^\s<>"{}|\\^`\[\].,;:!?])|(www\.[^\s<>"{}|\\^`\[\]]+[^\s<>"{}|\\^`\[\].,;:!?])|([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.([a-zA-Z]{2,})(\/[^\s<>"{}|\\^`\[\]]*)?)/gi,r=document.createTreeWalker(f.value,NodeFilter.SHOW_TEXT,{acceptNode:m=>{const v=m.parentElement;return!v||v.closest("a")||v.closest(".dss-image-wrapper")||!m.textContent||m.textContent.trim()===""?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),c=[];let d;for(;d=r.nextNode();)c.push(d);let u=!1;for(let m=c.length-1;m>=0;m--){const v=c[m],k=v.textContent;s.lastIndex=0;const _=[...k.matchAll(s)];if(_.length===0)continue;const H=_.filter(j=>{const Ie=j[0],Ve=j.index;if(Ve>0&&k[Ve-1]==="@"||Ve+Ie.length<k.length&&k[Ve+Ie.length]==="@")return!1;const lt=v.parentElement;return!(lt&<.closest("a"))});if(H.length===0)continue;if(H.length===1&&H[0][0]===k.trim()){const j=H[0][0],Ie=j.startsWith("http://")||j.startsWith("https://")?j:`https://${j}`,Ve=document.createElement("a");Ve.href=Ie,Ve.textContent=j,Ve.style.color="#60afdf",Ve.style.textDecoration="underline",v.parentNode&&(v.parentNode.replaceChild(Ve,v),u=!0);continue}let E=0;const se=document.createDocumentFragment();if(H.forEach(j=>{const Ie=j.index,Ve=j[0];if(Ie>E){const vn=k.substring(E,Ie);vn&&se.appendChild(document.createTextNode(vn))}const lt=Ve.startsWith("http://")||Ve.startsWith("https://")?Ve:`https://${Ve}`,Cn=document.createElement("a");Cn.href=lt,Cn.textContent=Ve,Cn.style.color="#60afdf",Cn.style.textDecoration="underline",se.appendChild(Cn),E=Ie+Ve.length}),E<k.length){const j=k.substring(E);j&&se.appendChild(document.createTextNode(j))}v.parentNode&&se.childNodes.length>0&&(v.parentNode.replaceChild(se,v),u=!0)}u&&l&&e.nextTick(()=>{an(l),fn()})},Bo=()=>{if(!f.value)return;const o=/<u>([\s\S]*?)<\/u>|<ins>([\s\S]*?)<\/ins>/gi,l=document.createTreeWalker(f.value,NodeFilter.SHOW_TEXT,{acceptNode:c=>{const d=c.parentElement;return!d||d.closest("a, code, pre, u, ins")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),s=[];let r;for(;r=l.nextNode();)s.push(r);for(let c=s.length-1;c>=0;c--){const d=s[c],u=d.textContent,m=[...u.matchAll(o)];if(m.length===0)continue;let v=0;const k=document.createDocumentFragment();m.forEach(_=>{const H=_.index,E=_[0].startsWith("<u>")?"u":"ins",se=_[1]||_[2]||"";H>v&&k.appendChild(document.createTextNode(u.substring(v,H)));const j=document.createElement(E);j.textContent=se,k.appendChild(j),v=H+_[0].length}),v<u.length&&k.appendChild(document.createTextNode(u.substring(v))),d.parentNode&&k.childNodes.length>0&&d.parentNode.replaceChild(k,d)}},Mo=o=>{if(!f.value||G.value)return;if(!o){Bo();return}if(!["*","_",">"].includes(o))return;const s=window.getSelection();if(!s||s.rangeCount===0)return;const r=s.getRangeAt(0);if(!r.collapsed)return;const c=r.startContainer.nodeType===Node.TEXT_NODE?r.startContainer.parentElement?.closest("p, h1, h2, h3, h4, h5, h6, li, td, th, blockquote, div"):r.startContainer.closest?.("p, h1, h2, h3, h4, h5, h6, li, td, th, blockquote, div");if(!c||c===f.value||!f.value.contains(c))return;const d=()=>{let vn="",rn=0,gn=!1;const un=document.createTreeWalker(c,NodeFilter.SHOW_TEXT,{acceptNode:Yn=>Yn.parentElement?.closest("a, code, pre")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});document.createTreeWalker(c,NodeFilter.SHOW_TEXT,null);let dn=0;for(;un.nextNode();){const Yn=un.currentNode,ul=Yn.textContent||"",hl=dn;if(dn+=ul.length,Yn===r.startContainer){vn+=ul.substring(0,r.startOffset),rn=hl+r.startOffset,gn=!0;break}vn+=ul}return gn||(rn=vn.length),{textBeforeCursor:vn,cursorCharOffset:rn}},{textBeforeCursor:u}=d();if(!u.length)return;let m=null,v=null;if(u.endsWith("**")&&(m=u.match(/\*\*(.+?)\*\*$/s))||u.endsWith("__")&&(m=u.match(/__(.+?)__$/s))?v="strong":u.endsWith("*")&&!u.endsWith("**")&&(m=u.match(new RegExp("(?<!\\*)\\*([^*]+)\\*$")))||u.endsWith("_")&&!u.endsWith("__")&&(m=u.match(new RegExp("(?<!_)_([^_]+)_$")))?v="em":o===">"&&((m=u.match(/<u>(.+?)<\/u>$/s))||(m=u.match(/<ins>(.+?)<\/ins>$/s)))&&(v=m[0].startsWith("<u>")?"u":"ins",m[0].startsWith("<u>"),m[0].startsWith("<u>")),!m||!m[1])return;const k=m[0],_=m[1],H=u.length-k.length,se=(vn=>{let rn=0;const gn=document.createTreeWalker(c,NodeFilter.SHOW_TEXT,{acceptNode:dn=>dn.parentElement?.closest("a, code, pre")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});let un;for(;un=gn.nextNode();){const dn=(un.textContent||"").length;if(rn+dn>=vn)return{node:un,offset:vn-rn};rn+=dn}return null})(H);if(!se)return;const j=document.createRange();j.setStart(se.node,se.offset),j.setEnd(r.endContainer,r.endOffset);const Ie=document.createElement(v);Ie.textContent=_,j.deleteContents(),j.insertNode(Ie);const Ve=window.getSelection(),lt=document.createRange();lt.setStartAfter(Ie),lt.collapse(!0),Ve.removeAllRanges(),Ve.addRange(lt);const Cn=Qt();e.nextTick(()=>{ce(),Cn&&an(Cn)})},po=()=>{f.value&&(Ut.value=Qt(),It.value="",Pt.value="",Xe.value="",oe.value="",ve.value="",en.value=null,yt.value=null,Be.value="upload",bt.value=!0,cn(),e.nextTick(()=>{Fe.value&&Fe.value.focus(),De.value&&(De.value.value="")}))},tl=o=>{const l=o.target?.files?.[0];if(!l){en.value=null,Pt.value="";return}en.value=l;const s=new FileReader;s.onload=r=>{Pt.value=r.target?.result||""},s.readAsDataURL(l)},nl=()=>{De.value&&De.value.click()},Kl=()=>{oe.value&&(ve.value="")},fo=()=>{ve.value&&(oe.value="")},_o=()=>{let o=yt.value;if(!o){const l=window.getSelection();if(l&&l.rangeCount>0){const r=l.getRangeAt(0).commonAncestorContainer;o=r.nodeType===1?r.closest("img"):r.parentElement?.closest("img")}}if(o){const l=o.getAttribute("data-alt")||o.getAttribute("alt")||"";yt.value=o,It.value=l.trim()===""||l.trim()==="Image"?"":l;const s=o.getAttribute("src")||o.src||"";s.startsWith("http://")||s.startsWith("https://")?(Xe.value=s,Pt.value="",Be.value="url"):(Pt.value=s,Xe.value="",Be.value="upload");const c=o.style.width||o.getAttribute("width")||"",d=o.style.height||o.getAttribute("height")||"";oe.value=c.endsWith("px")?c.replace("px",""):c,ve.value=d.endsWith("px")?d.replace("px",""):d,Ut.value=null}else{po();return}bt.value=!0,he.value=!1,xt.value=!1,e.nextTick(()=>{Be.value==="url"&&Zt.value?(Zt.value.focus(),Zt.value.select()):Fe.value&&(Fe.value.focus(),Fe.value.select()),De.value&&(De.value.value="")})},_l=()=>{bt.value=!1,It.value="",Pt.value="",Xe.value="",oe.value="",ve.value="",en.value=null,yt.value=null,Ut.value=null,Be.value="upload"},Hn=()=>{const o=(It.value||"").trim(),l=f.value?._mutationObserver;l&&l.disconnect(),Pe.value?(He.value&&(clearTimeout(He.value),He.value=null),at(),Pe.value=!1):at();const s=Be.value==="url"?Xe.value.trim():Pt.value;if(yt.value&&f.value&&f.value.contains(yt.value)){s&&(yt.value.src=s),yt.value.setAttribute("alt",o),yt.value.setAttribute("data-alt",o),oe.value?(yt.value.style.width=`${oe.value}px`,yt.value.setAttribute("width",oe.value)):(yt.value.style.removeProperty("width"),yt.value.removeAttribute("width")),ve.value?(yt.value.style.height=`${ve.value}px`,yt.value.setAttribute("height",ve.value)):(yt.value.style.removeProperty("height"),yt.value.removeAttribute("height"));const r=window.getSelection();if(r){r.removeAllRanges();const c=document.createRange();c.setStartAfter(yt.value),c.collapse(!0),r.addRange(c)}ce()}else{if(!s){l&&f.value&&l.observe(f.value,{childList:!0,subtree:!0}),_l();return}if(f.value){f.value.focus();const r=window.getSelection();r&&r.rangeCount>0&&r.removeAllRanges();const c=window.getSelection();let d=null;if(Ut.value&&(an(Ut.value),c&&c.rangeCount>0&&(d=c.getRangeAt(0))),!d&&c&&c.rangeCount>0&&(d=c.getRangeAt(0)),!d&&f.value){if(d=document.createRange(),f.value.childNodes.length===0){const k=document.createElement("p");k.innerHTML="<br>",f.value.appendChild(k),d.setStart(k,0),d.collapse(!0)}else d.selectNodeContents(f.value),d.collapse(!1);c&&(c.removeAllRanges(),c.addRange(d))}if(!d){_l();return}const u=d.commonAncestorContainer,m=u.nodeType===3?u.parentElement:u;if(!f.value.contains(m)){if(d=document.createRange(),f.value.childNodes.length===0){const k=document.createElement("p");k.innerHTML="<br>",f.value.appendChild(k),d.setStart(k,0),d.collapse(!0)}else d.selectNodeContents(f.value),d.collapse(!1);c&&(c.removeAllRanges(),c.addRange(d))}const v=document.createElement("img");v.src=s,v.setAttribute("alt",o),v.setAttribute("data-alt",o),oe.value&&(v.style.width=`${oe.value}px`,v.setAttribute("width",oe.value)),ve.value&&(v.style.height=`${ve.value}px`,v.setAttribute("height",ve.value));try{d.insertNode(v),d.setStartAfter(v),d.collapse(!0),c&&(c.removeAllRanges(),c.addRange(d))}catch{if(f.value){if(f.value.childNodes.length===0){const H=document.createElement("p");f.value.appendChild(H),H.appendChild(v)}else{const H=f.value.lastChild;if(H&&H.nodeType===1)H.appendChild(v);else{const E=document.createElement("p");f.value.appendChild(E),E.appendChild(v)}}const _=document.createRange();_.setStartAfter(v),_.collapse(!0),c&&(c.removeAllRanges(),c.addRange(_))}}yt.value=v,ce()}}e.nextTick(()=>{l&&f.value&&l.observe(f.value,{childList:!0,subtree:!0}),fn(),nn(),_l()})};e.watch(()=>T.modelValue,o=>{if(T.richText&&f.value&&!G.value){const l=Mt(o||""),r=f.value.innerHTML.replace(/ |\u00A0/g," "),c=l.replace(/ |\u00A0/g," ");if(r!==c){const d=Qt();f.value.innerHTML=l,e.nextTick(()=>{ht();const u=f.value.innerHTML||"",m=T.title||"",v=T.description||"";Et.value=u,K.value=m,W.value=v,St.value=u,X.value=m,pe.value=v,Ge.value=[],Dt.value=[],He.value&&(clearTimeout(He.value),He.value=null),Pe.value=!1,d&&an(d),Mn(),pn(),$e(),fn(),nn(),kt(),wn("watch-modelValue")})}}},{immediate:!0}),e.watch(()=>T.richText,o=>{o?(nn(),e.nextTick(()=>{ho()})):(Il(),ne.value=[],Oe.value&&(Oe.value.disconnect(),Oe.value=null)),kt()}),e.watch(()=>T.floatingToolbar,o=>{o?nn():Il()}),e.watch(()=>T.disabled,o=>{o&&Il(),kt()}),e.watch(()=>T.description,()=>{e.nextTick(()=>{S.value?ml():Jn()})}),e.watch(()=>T.title,()=>{e.nextTick(()=>{Gt.value?En():Al()})}),e.watch(()=>T.customToolbarSlots,()=>{e.nextTick(()=>{Jt()})},{deep:!0}),e.watch(()=>T.comments,(o,l)=>{if(pt.value){pt.value=!1;return}Ht.value||T.richText&&f.value&&e.nextTick(()=>{Vn()})},{deep:!0,immediate:!1});const Vn=()=>{if(!Ht.value&&!(!T.comments||!Array.isArray(T.comments)||T.comments.length===0)&&!(!T.richText||!f.value)){Ht.value=!0;try{const o=new Set,l=T.comments.filter(u=>{const m=String(u.conversation_id||u.id);return o.has(m)?!1:(o.add(m),!0)}),s=f.value.querySelectorAll("[data-comment], [data-fake-comment]"),r=s.length;s.forEach(u=>{const m=u.parentNode;if(m){for(;u.firstChild;)m.insertBefore(u.firstChild,u);m.removeChild(u)}});let c=0;const d=new Set;l.forEach(u=>{if(!u.conversation_id||!u.selection_range)return;const m=typeof u.conversation_id=="string"&&u.conversation_id.startsWith("comment-")?null:Number(u.conversation_id)||u.conversation_id;if(!m)return;const v=String(m);if(d.has(v))return;const k=f.value.querySelector(`[data-comment="${v}"]`);if(k){Kt(k,u),d.add(v);return}try{const _=Yo(u.selection_range,u.selection_text);if(_&&!_.collapsed){const H=_.commonAncestorContainer,E=H.nodeType===3?H.parentElement:H;if(E){const Ie=E.closest("[data-comment], [data-fake-comment]");if(Ie){const Ve=Ie.getAttribute("data-comment")||Ie.getAttribute("data-fake-comment");if(String(Ve)===String(m)){Ie.setAttribute("data-comment",v),Ie.removeAttribute("data-fake-comment"),Kt(Ie,u),d.add(v);return}else return}}const se=f.value.querySelector(`[data-comment="${v}"]`);if(se){Kt(se,u),d.add(v);return}const j=document.createElement("span");j.setAttribute("data-comment",v),Kt(j,u);try{_.surroundContents(j),c++,d.add(v)}catch{try{const Ve=document.createRange();Ve.setStart(_.startContainer,_.startOffset),Ve.setEnd(_.endContainer,_.endOffset),vo(Ve),Ve.surroundContents(j),c++,d.add(v)}catch{try{const lt=_.extractContents();j.appendChild(lt),_.insertNode(j),c++,d.add(v)}catch(lt){console.warn("Failed to create comment marker:",lt)}}}}}catch{}}),e.nextTick(()=>{wn("restoreCommentsFromModel"),ce(),Ht.value=!1})}catch{Ht.value=!1}}},vo=o=>{if(!o||!f.value)return o;try{const l=["P","DIV","H1","H2","H3","H4","H5","H6","LI","BLOCKQUOTE","PRE"];let s=o.startContainer,r=o.startOffset;if(s.nodeType===3){const u=s.parentElement;u&&l.includes(u.tagName)&&(r===0&&!Xt(s)||o.setStartBefore(u))}else s.nodeType===1&&l.includes(s.tagName)&&r>0&&o.setStartBefore(s);let c=o.endContainer,d=o.endOffset;if(c.nodeType===3){const u=c.parentElement;u&&l.includes(u.tagName)&&(d===c.length&&!$o(c)||o.setEndAfter(u))}else c.nodeType===1&&l.includes(c.tagName)&&d<c.childNodes.length&&o.setEndAfter(c);return o}catch{return o}},Xt=o=>{let l=o.previousSibling;for(;l;){if(l.nodeType===3&&l.textContent.trim().length>0||l.nodeType===1&&l.textContent.trim().length>0)return!0;l=l.previousSibling}return!1},$o=o=>{let l=o.nextSibling;for(;l;){if(l.nodeType===3&&l.textContent.trim().length>0||l.nodeType===1&&l.textContent.trim().length>0)return!0;l=l.nextSibling}return!1},Yo=(o,l)=>{if(!o||!f.value)return null;try{const s=document.createRange();if(o.type==="text"&&typeof o.start=="number"&&typeof o.end=="number"){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])}return u?vo(s):null}}catch{return null}return null},Kt=(o,l)=>{if(!o||!l)return;const s=l.conversation||[],r=new Set,c=[],d=m=>{m&&m.id&&!r.has(m.id)&&(r.add(m.id),c.push(m))};s.length>0&&s.forEach(m=>{m.user&&d(m.user)}),c.length>0?o.setAttribute("data-comment-user",JSON.stringify(c[0])):o.removeAttribute("data-comment-user"),c.length>1?o.setAttribute("data-comment-user-2",JSON.stringify(c[1])):o.removeAttribute("data-comment-user-2");const u=s.length;u>0?o.setAttribute("data-comment-count",String(u)):o.removeAttribute("data-comment-count")},wn=(o="unknown")=>{if(!T.richText||!f.value){ne.value=[];return}Date.now()-Vt.value<Nt&&mt.value!==null||mt.value===null&&(mt.value=requestAnimationFrame(()=>{if(mt.value=null,Vt.value=Date.now(),We.value)return;We.value=!0;const s={},r=f.value;if(!r){We.value=!1;return}const c=r.closest(".editor-with-comments");if(!c){We.value=!1;return}const d=r.querySelectorAll("[data-comment], [data-fake-comment]"),u=[],m=new Set;d.forEach(E=>{const se=E.getAttribute("data-comment")||E.getAttribute("data-fake-comment");se&&E.tagName==="SPAN"&&(m.has(se)||(u.push(E),m.add(se)))}),d.forEach(E=>{const se=E.getAttribute("data-comment")||E.getAttribute("data-fake-comment");!se||m.has(se)||(["P","DIV","H1","H2","H3","H4","H5","H6"].includes(E.tagName)?E.querySelector(`span[data-comment="${se}"], span[data-fake-comment="${se}"]`)||(u.push(E),m.add(se)):E.tagName!=="SPAN"&&(u.push(E),m.add(se)))});const v=c.getBoundingClientRect(),k=r.getBoundingClientRect();u.forEach((E,se)=>{let j=E.getAttribute("data-comment")||E.getAttribute("data-fake-comment");if(!j)return;if(typeof j=="string"&&j.startsWith("comment-")){const dl=E.textContent?.trim(),ll=T.comments?.find(jn=>(typeof jn.conversation_id=="string"&&jn.conversation_id.startsWith("comment-")?null:jn.conversation_id)&&jn.selection_text?.trim()===dl);ll?(j=String(ll.conversation_id),E.setAttribute("data-comment",j),E.removeAttribute("data-fake-comment")):(j=String(Date.now()),E.setAttribute("data-comment",j),E.removeAttribute("data-fake-comment"))}const Ie=E.getBoundingClientRect(),Ve=window.getComputedStyle(E),lt=parseFloat(Ve.lineHeight)||parseFloat(Ve.fontSize)*1.2,rn=Ie.top-k.top+lt/2-15,un=k.top-v.top+rn;let dn=null,Yn=null,ul=0;const hl=[],yo=new Set;if(j&&T.comments){const dl=T.comments.find(ll=>String(ll.conversation_id||ll.id)===String(j));if(dl){const ll=dl.conversation||[];ll.length>0?(ll.forEach(jn=>{jn.user&&jn.user.id&&!yo.has(jn.user.id)&&(yo.add(jn.user.id),hl.push(jn.user))}),ul=ll.length):(ul=0,dn=null,Yn=null),hl.length>0?dn=hl[0]:dn=null,hl.length>1?Yn=hl[1]:Yn=null}}const Ao=Ie.top+lt/2-15,jo=Ao+30,El=5,ko=jo>k.top+El&&Ao<k.bottom-El?1:0;ne.value.find(dl=>dl.id===j);let Gl=E;if(!Gl&&j&&f.value){const dl=String(j);Gl=f.value.querySelector(`[data-comment="${dl}"], [data-fake-comment="${dl}"]`)}const Do=hl.length;s[j]?(s[j].top=un,s[j].opacity=ko,s[j].element=Gl,s[j].firstUser=dn,s[j].secondUser=Yn,s[j].totalCount=ul,s[j].uniqueUserCount=Do):s[j]={id:j,top:un,opacity:ko,element:Gl,firstUser:dn,secondUser:Yn,totalCount:ul,uniqueUserCount:Do}});const _=Object.values(s).map(E=>{const se=Math.max(0,(E.uniqueUserCount??0)-2);if(!E.element&&E.id&&f.value){const Ie=String(E.id);E.element=f.value.querySelector(`[data-comment="${Ie}"], [data-fake-comment="${Ie}"]`)}return{...E,firstUser:E.firstUser||null,secondUser:E.secondUser||null,totalCount:E.totalCount,additionalCount:se}});(ne.value.length!==_.length||_.some((E,se)=>{const j=ne.value[se];if(!j)return!0;const Ie=(j.firstUser?.id||null)!==(E.firstUser?.id||null),Ve=(j.secondUser?.id||null)!==(E.secondUser?.id||null);return j.id!==E.id||Math.abs(j.top-E.top)>1||j.opacity!==E.opacity||j.totalCount!==E.totalCount||j.additionalCount!==E.additionalCount||Ie||Ve||j.element!==E.element}))&&(ne.value=_),We.value=!1}))},Lo=o=>{if(!o)return;let l=o.element;if(!l&&o.id&&f.value){const s=String(o.id);l=f.value.querySelector(`[data-comment="${s}"], [data-fake-comment="${s}"]`)}l&&(xn(),Un.value=l,l.classList.add("editor-comment-highlighted"))},xn=(o=!1)=>{!o&&$t.value!==null&&Un.value&&(Un.value.getAttribute("data-comment")||Un.value.getAttribute("data-fake-comment"))===$t.value||(f.value&&f.value.querySelectorAll(".editor-comment-highlighted").forEach(s=>{s.classList.remove("editor-comment-highlighted")}),Un.value&&(Un.value.classList.remove("editor-comment-highlighted"),Un.value=null))},go=o=>{if(!o||!o.element)return;xn(!0);const l=o.element.getAttribute("data-comment")||o.element.getAttribute("data-fake-comment");if(!l)return;const s=`[data-comment="${l}"], [data-fake-comment="${l}"]`;fe("comment-marker-clicked",{commentId:l,selector:s,element:o.element})},$l=()=>{xn()},ho=()=>{!T.richText||!f.value||(Oe.value&&Oe.value.disconnect(),wt.value!==null&&(clearTimeout(wt.value),wt.value=null),Oe.value=new MutationObserver(()=>{wt.value===null&&(wt.value=setTimeout(()=>{wt.value=null,e.nextTick(()=>{wn("MutationObserver")})},200))}),Oe.value.observe(f.value,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-comment","data-fake-comment","data-comment-user","data-comment-user-2","data-comment-count"]}),wn("setupCommentMarkersObserver-initial"))},To=(o,l)=>{if(!o||!l)return;const s=l.getBoundingClientRect();let r=s.top,c=s.right+4;o.style.top=`${r}px`,o.style.left=`${c}px`,o.offsetHeight;const d=o.getBoundingClientRect(),u=window.innerWidth,m=window.innerHeight;if(d.right>u){const v=s.left-d.width-4;o.style.left=`${v}px`}if(d.bottom>m){const v=Math.max(8,m-d.height-8);o.style.top=`${v}px`}d.top<0&&(o.style.top="8px")};return e.watch(()=>Ke.value,o=>{e.nextTick(()=>{document.querySelectorAll(".dss-toolbar-dropdown-submenu").forEach(s=>{const r=s.getAttribute("data-submenu-id");if(r===o&&o){const c=document.querySelector(`.dss-toolbar-dropdown-item-has-submenu[data-submenu-id="${r}"]`);if(c){if(s.parentNode!==document.body){const d=s.parentNode;s.dataset.originalParentRef=d===c?"inside":"sibling",document.body.appendChild(s)}s.style.display="block",s.style.visibility="hidden",s.style.opacity="0",requestAnimationFrame(()=>{requestAnimationFrame(()=>{To(s,c),s.offsetHeight,s.setAttribute("data-active","true"),s.style.visibility="visible",s.style.opacity="1"})})}else s.setAttribute("data-active","true")}else s.setAttribute("data-active","false"),s.style.display="none",s.style.top="",s.style.left="",s.style.visibility="",s.style.opacity=""})})}),e.watch(()=>[be.value,ot.value],()=>{be.value==="askAi"||ot.value==="askAi"?e.nextTick(()=>{kn()}):(Ke.value=null,e.nextTick(()=>{document.querySelectorAll(".dss-toolbar-dropdown-submenu").forEach(l=>{if(l.parentNode===document.body){const s=l.getAttribute("data-submenu-id");if(s){const r=document.querySelector(`.dss-toolbar-dropdown-item-has-submenu[data-submenu-id="${s}"]`);if(r)if(l.dataset.originalParentRef==="inside")r.appendChild(l);else{const d=r.closest(".dss-toolbar-dropdown");d&&d.insertBefore(l,r.nextSibling)}}}})}))}),e.watch(()=>T.locale,o=>{o&&o!==de.value&&(de.value=o)},{immediate:!0}),le({openCommentOverlayForSelector:So,updateCommentMarkers:wn,restoreCommentsFromModel:Vn}),(o,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-text-editor-container editor-with-comments",Ct.value]),style:e.normalizeStyle(At.value)},[D.richText?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-text-editor-toolbar",onMousedown:l[14]||(l[14]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",Tu,[e.createElementVNode("div",{class:"dss-toolbar-button",onClick:gt,title:e.unref(L)("textEditor.toolbar.undo")},[...l[45]||(l[45]=[e.createElementVNode("svg",{viewBox:"0 0 18 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M9.23302 0.888889C6.90278 0.888889 4.79238 1.76889 3.16561 3.2L0 0V8H7.91402L4.73083 4.78222C5.9531 3.75111 7.50953 3.11111 9.23302 3.11111C12.3459 3.11111 14.9927 5.16444 15.916 8L18 7.30667C16.7777 3.58222 13.3219 0.888889 9.23302 0.888889Z",fill:"#323232"})],-1)])],8,Au),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-disabled":!Tn.value}]),onClick:ae,title:e.unref(L)("textEditor.toolbar.redo")},[...l[46]||(l[46]=[e.createElementVNode("svg",{viewBox:"0 0 18 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M14.8328 3.2C13.2053 1.76889 11.0938 0.888889 8.76246 0.888889C4.67155 0.888889 1.21408 3.58222 0 7.30667L2.07625 8C3 5.16444 5.6393 3.11111 8.76246 3.11111C10.478 3.11111 12.044 3.75111 13.2669 4.78222L10.0821 8H18V0L14.8328 3.2Z",fill:"#323232"})],-1)])],10,Du),l[61]||(l[61]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",Hu,[e.createElementVNode("div",{class:"dss-toolbar-button dss-toolbar-dropdown-toggle",onClick:l[0]||(l[0]=s=>In("paragraph")),title:e.unref(L)("textEditor.toolbar.paragraphFormat")},[V.value==="h1"?(e.openBlock(),e.createElementBlock("img",{key:0,src:I.h1,alt:"H1",class:"dss-toolbar-heading-icon"},null,8,Fu)):V.value==="h2"?(e.openBlock(),e.createElementBlock("img",{key:1,src:I.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,Iu)):V.value==="h3"?(e.openBlock(),e.createElementBlock("img",{key:2,src:I.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,zu)):V.value==="h4"?(e.openBlock(),e.createElementBlock("img",{key:3,src:I.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,Pu)):V.value==="h5"?(e.openBlock(),e.createElementBlock("img",{key:4,src:I.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,Ou)):V.value==="h6"?(e.openBlock(),e.createElementBlock("img",{key:5,src:I.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,qu)):(e.openBlock(),e.createElementBlock("svg",Wu,[...l[47]||(l[47]=[e.createElementVNode("path",{d:"M4.33333 8.61539V14H6.5V2.15385H8.66667V14H10.8333V2.15385H13V0H4.33333C1.93917 0 0 1.92769 0 4.30769C0 6.68769 1.93917 8.61539 4.33333 8.61539Z",fill:"#323232"},null,-1)])])),l[48]||(l[48]=e.createElementVNode("span",{class:"dss-toolbar-dropdown-arrow"},"˅",-1))],8,Ru),be.value==="paragraph"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-dropdown",onClick:l[8]||(l[8]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[1]||(l[1]=s=>zn("<h1>"))},[e.createElementVNode("img",{src:I.h1,alt:"H1",class:"dss-toolbar-heading-icon"},null,8,Zu),e.createElementVNode("h1",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading1")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[2]||(l[2]=s=>zn("<h2>"))},[e.createElementVNode("img",{src:I.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,Uu),e.createElementVNode("h2",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading2")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[3]||(l[3]=s=>zn("<h3>"))},[e.createElementVNode("img",{src:I.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,Xu),e.createElementVNode("h3",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading3")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[4]||(l[4]=s=>zn("<h4>"))},[e.createElementVNode("img",{src:I.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,Yu),e.createElementVNode("h4",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading4")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[5]||(l[5]=s=>zn("<h5>"))},[e.createElementVNode("img",{src:I.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,ju),e.createElementVNode("h5",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading5")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[6]||(l[6]=s=>zn("<h6>"))},[e.createElementVNode("img",{src:I.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,Ku),e.createElementVNode("h6",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading6")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[7]||(l[7]=s=>zn("<p>"))},[l[49]||(l[49]=e.createElementVNode("svg",{width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"paragraph-icon"},[e.createElementVNode("path",{d:"M4.33333 8.61539V14H6.5V2.15385H8.66667V14H10.8333V2.15385H13V0H4.33333C1.93917 0 0 1.92769 0 4.30769C0 6.68769 1.93917 8.61539 4.33333 8.61539Z",fill:"#323232"})],-1)),e.createElementVNode("p",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.paragraph")),1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":tn("bold")}]),onClick:l[9]||(l[9]=s=>Bn("bold")),title:e.unref(L)("textEditor.toolbar.bold")},[...l[50]||(l[50]=[e.createElementVNode("svg",{viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M8.8 6.79C9.79256 6.12 10.4884 5.02 10.4884 4C10.4884 1.74 8.69767 0 6.39535 0H0V14H7.20372C9.34233 14 11 12.3 11 10.21C11 8.69 10.12 7.39 8.8 6.79ZM3.06977 2.5H6.13953C6.98884 2.5 7.67442 3.17 7.67442 4C7.67442 4.83 6.98884 5.5 6.13953 5.5H3.06977V2.5ZM6.65116 11.5H3.06977V8.5H6.65116C7.50047 8.5 8.18605 9.17 8.18605 10C8.18605 10.83 7.50047 11.5 6.65116 11.5Z",fill:"currentColor"})],-1)])],10,Gu),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":tn("italic")}]),onClick:l[10]||(l[10]=s=>Bn("italic")),title:e.unref(L)("textEditor.toolbar.italic")},[...l[51]||(l[51]=[e.createElementVNode("svg",{viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4 0V3H6.21L2.79 11H0V14H8V11H5.79L9.21 3H12V0H4Z",fill:"#323232"})],-1)])],10,Qu),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":tn("underline")}]),onClick:l[11]||(l[11]=s=>Bn("underline")),title:e.unref(L)("textEditor.toolbar.underline")},[...l[52]||(l[52]=[e.createElementVNode("svg",{viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M5.5 10.8889C8.10071 10.8889 10.2143 8.79667 10.2143 6.22222V0H8.25V6.22222C8.25 7.72333 7.01643 8.94444 5.5 8.94444C3.98357 8.94444 2.75 7.72333 2.75 6.22222V0H0.785714V6.22222C0.785714 8.79667 2.89929 10.8889 5.5 10.8889ZM0 12.4444V14H11V12.4444H0Z",fill:"#323232"})],-1)])],10,Ju),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":je.value}]),onClick:Nl,title:e.unref(L)("textEditor.toolbar.citation")},[...l[53]||(l[53]=[e.createElementVNode("svg",{viewBox:"0 0 20 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M1.42857 14H5.71429L8.57143 8.4V0H0V8.4H4.28571L1.42857 14ZM12.8571 14H17.1429L20 8.4V0H11.4286V8.4H15.7143L12.8571 14Z",fill:"currentColor"})],-1)])],10,ed),l[62]||(l[62]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),Ce.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-button",onClick:Ul,title:e.unref(L)("textEditor.toolbar.removeLink")},[...l[55]||(l[55]=[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M18 4.88889H13.2V7.21111H18C20.052 7.21111 21.72 8.91 21.72 11C21.72 12.7478 20.544 14.2144 18.948 14.6422L20.7 16.4267C22.656 15.4122 24 13.3833 24 11C24 7.62667 21.312 4.88889 18 4.88889ZM16.8 9.77778H14.172L16.572 12.2222H16.8V9.77778ZM0 1.55222L3.732 5.35333C1.548 6.25778 0 8.44556 0 11C0 14.3733 2.688 17.1111 6 17.1111H10.8V14.7889H6C3.948 14.7889 2.28 13.09 2.28 11C2.28 9.05667 3.732 7.45556 5.592 7.24778L8.076 9.77778H7.2V12.2222H10.476L13.2 14.9967V17.1111H15.276L20.088 22L21.6 20.46L1.524 0L0 1.55222Z",fill:"#323232"})],-1)])],8,nd)):(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-button",onClick:Zl,title:e.unref(L)("textEditor.toolbar.insertLink")},[...l[54]||(l[54]=[e.createElementVNode("svg",{width:"20",height:"14",viewBox:"0 0 27 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M2.565 7C2.565 4.606 4.4415 2.66 6.75 2.66H12.15V0H6.75C3.024 0 0 3.136 0 7C0 10.864 3.024 14 6.75 14H12.15V11.34H6.75C4.4415 11.34 2.565 9.394 2.565 7ZM8.1 8.4H18.9V5.6H8.1V8.4ZM20.25 0H14.85V2.66H20.25C22.5585 2.66 24.435 4.606 24.435 7C24.435 9.394 22.5585 11.34 20.25 11.34H14.85V14H20.25C23.976 14 27 10.864 27 7C27 3.136 23.976 0 20.25 0Z",fill:"#323232"})],-1)])],8,td)),l[63]||(l[63]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":tn("insertUnorderedList")}]),onClick:sl,title:e.unref(L)("textEditor.toolbar.bulletList")},[...l[56]||(l[56]=[e.createElementVNode("svg",{viewBox:"0 0 17 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M1.37838 5.2C0.615676 5.2 0 5.78067 0 6.5C0 7.21933 0.615676 7.8 1.37838 7.8C2.14108 7.8 2.75676 7.21933 2.75676 6.5C2.75676 5.78067 2.14108 5.2 1.37838 5.2ZM1.37838 0C0.615676 0 0 0.580667 0 1.3C0 2.01933 0.615676 2.6 1.37838 2.6C2.14108 2.6 2.75676 2.01933 2.75676 1.3C2.75676 0.580667 2.14108 0 1.37838 0ZM1.37838 10.4C0.615676 10.4 0 10.9893 0 11.7C0 12.4107 0.624865 13 1.37838 13C2.13189 13 2.75676 12.4107 2.75676 11.7C2.75676 10.9893 2.14108 10.4 1.37838 10.4ZM4.13514 12.5667H17V10.8333H4.13514V12.5667ZM4.13514 7.36667H17V5.63333H4.13514V7.36667ZM4.13514 0.433333V2.16667H17V0.433333H4.13514Z",fill:"#323232"})],-1)])],10,ld),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":tn("insertOrderedList")}]),onClick:Hl,title:e.unref(L)("textEditor.toolbar.numberList")},[...l[57]||(l[57]=[e.createElementVNode("svg",{viewBox:"0 0 18 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M0 12.1875H1.89474V12.6562H0.947368V13.5938H1.89474V14.0625H0V15H2.84211V11.25H0V12.1875ZM0.947368 3.75H1.89474V0H0V0.9375H0.947368V3.75ZM0 6.5625H1.70526L0 8.53125V9.375H2.84211V8.4375H1.13684L2.84211 6.46875V5.625H0V6.5625ZM4.73684 0.9375V2.8125H18V0.9375H4.73684ZM4.73684 14.0625H18V12.1875H4.73684V14.0625ZM4.73684 8.4375H18V6.5625H4.73684V8.4375Z",fill:"#323232"})],-1)])],10,od),l[64]||(l[64]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:"dss-toolbar-button",onClick:po,title:e.unref(L)("textEditor.toolbar.image")},[...l[58]||(l[58]=[e.createElementVNode("svg",{viewBox:"1.5 1.5 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M2.15065 15.8414L2.13398 15.8581C1.90898 15.3664 1.76732 14.8081 1.70898 14.1914C1.76732 14.7997 1.92565 15.3497 2.15065 15.8414Z",fill:"#323232"}),e.createElementVNode("path",{d:"M7.50091 8.65026C8.59628 8.65026 9.48425 7.76229 9.48425 6.66693C9.48425 5.57156 8.59628 4.68359 7.50091 4.68359C6.40555 4.68359 5.51758 5.57156 5.51758 6.66693C5.51758 7.76229 6.40555 8.65026 7.50091 8.65026Z",fill:"#323232"}),e.createElementVNode("path",{d:"M13.491 1.66699H6.50768C3.47435 1.66699 1.66602 3.47533 1.66602 6.50866V13.492C1.66602 14.4003 1.82435 15.192 2.13268 15.8587C2.84935 17.442 4.38268 18.3337 6.50768 18.3337H13.491C16.5243 18.3337 18.3327 16.5253 18.3327 13.492V11.5837V6.50866C18.3327 3.47533 16.5243 1.66699 13.491 1.66699ZM16.9743 10.417C16.3243 9.85866 15.2743 9.85866 14.6243 10.417L11.1577 13.392C10.5077 13.9503 9.45768 13.9503 8.80768 13.392L8.52435 13.1587C7.93268 12.642 6.99102 12.592 6.32435 13.042L3.20768 15.1337C3.02435 14.667 2.91602 14.1253 2.91602 13.492V6.50866C2.91602 4.15866 4.15768 2.91699 6.50768 2.91699H13.491C15.841 2.91699 17.0827 4.15866 17.0827 6.50866V10.5087L16.9743 10.417Z",fill:"#323232"})],-1)])],8,ad),Y.value?(e.openBlock(),e.createElementBlock("div",sd)):e.createCommentVNode("",!0),Y.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-toolbar-button",title:e.unref(L)("textEditor.toolbar.comment"),onClick:Dn},[...l[59]||(l[59]=[e.createElementVNode("svg",{viewBox:"2 2 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13.19 6H6.79C6.53 6 6.28 6.01 6.04 6.04C3.35 6.27 2 7.86 2 10.79V14.79C2 18.79 3.6 19.58 6.79 19.58H7.19C7.41 19.58 7.7 19.73 7.83 19.9L9.03 21.5C9.56 22.21 10.42 22.21 10.95 21.5L12.15 19.9C12.3 19.7 12.54 19.58 12.79 19.58H13.19C16.12 19.58 17.71 18.24 17.94 15.54C17.97 15.3 17.98 15.05 17.98 14.79V10.79C17.98 7.6 16.38 6 13.19 6ZM6.5 14C5.94 14 5.5 13.55 5.5 13C5.5 12.45 5.95 12 6.5 12C7.05 12 7.5 12.45 7.5 13C7.5 13.55 7.05 14 6.5 14ZM9.99 14C9.43 14 8.99 13.55 8.99 13C8.99 12.45 9.44 12 9.99 12C10.54 12 10.99 12.45 10.99 13C10.99 13.55 10.55 14 9.99 14ZM13.49 14C12.93 14 12.49 13.55 12.49 13C12.49 12.45 12.94 12 13.49 12C14.04 12 14.49 12.45 14.49 13C14.49 13.55 14.04 14 13.49 14Z",fill:"#323232"}),e.createElementVNode("path",{d:"M21.9802 6.79V10.79C21.9802 12.79 21.3602 14.15 20.1202 14.9C19.8202 15.08 19.4702 14.84 19.4702 14.49L19.4802 10.79C19.4802 6.79 17.1902 4.5 13.1902 4.5L7.10025 4.51C6.75025 4.51 6.51025 4.16 6.69025 3.86C7.44025 2.62 8.80025 2 10.7902 2H17.1902C20.3802 2 21.9802 3.6 21.9802 6.79Z",fill:"#323232"})],-1)])],8,rd)):e.createCommentVNode("",!0),D.askAi?(e.openBlock(),e.createElementBlock("div",id)):e.createCommentVNode("",!0),D.askAi?(e.openBlock(),e.createElementBlock("div",cd,[e.createElementVNode("div",{class:"dss-toolbar-ai-button dss-toolbar-dropdown-toggle",onClick:l[12]||(l[12]=s=>In("askAi")),title:e.unref(L)("textEditor.toolbar.askAi")},[l[60]||(l[60]=e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M3.97363 4.34473C5.4926 6.769 7.88838 8.45732 10.7598 9.01855C9.21102 10.2499 7.99851 11.8959 7.30762 13.8027C7.21982 14.066 6.82404 14.066 6.69238 13.8027C5.59521 10.7746 3.18158 8.40476 0.197266 7.30762C-0.0658032 7.21978 -0.0656958 6.82515 0.197266 6.69336C1.62341 6.17665 2.90369 5.36753 3.97363 4.34473Z",fill:"#9784ba"}),e.createElementVNode("path",{d:"M6.66895 0.197266C6.75687 -0.0657415 7.1515 -0.0657945 7.2832 0.197266C8.38035 3.22532 10.7941 5.5952 13.7783 6.69238C14.0416 6.78015 14.0416 7.17497 13.7783 7.30664C12.6735 7.71282 11.6469 8.29371 10.7363 9.01758C7.86425 8.45633 5.46822 6.76786 3.94922 4.34277C5.15088 3.1939 6.08858 1.77583 6.66895 0.197266Z",fill:"#cfbeed"})],-1)),e.createElementVNode("span",dd,e.toDisplayString(e.unref(L)("textEditor.toolbar.askAi")),1)],8,ud),be.value==="askAi"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-dropdown",onClick:l[13]||(l[13]=e.withModifiers(()=>{},["stop"]))},[e.renderSlot(o.$slots,"ask-ai-dropdown")])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",md,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.customToolbarSlots,(s,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r},[A(s)?(e.openBlock(),e.createElementBlock("div",pd,[e.renderSlot(o.$slots,s)])):e.createCommentVNode("",!0),A(s)&&r<D.customToolbarSlots.length-1&&O(r)?(e.openBlock(),e.createElementBlock("div",fd)):e.createCommentVNode("",!0)],64))),128))])],32)):e.createCommentVNode("",!0),(be.value==="paragraph"||be.value==="askAi")&&D.richText?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-dropdown-overlay",onClick:cn})):e.createCommentVNode("",!0),e.createVNode(ea,{showModal:Ae.value,width:"500px",height:"55vh",onCloseModal:Ol},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(L)("textEditor.link.editLink")),1)]),content:e.withCtx(()=>[e.createElementVNode("div",vd,[e.createElementVNode("div",gd,[e.createElementVNode("label",hd,e.toDisplayString(e.unref(L)("textEditor.link.altText")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"linkAltInput",ref:Ue,type:"text","onUpdate:modelValue":l[15]||(l[15]=s=>ft.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.link.enterAltText"),onKeyup:e.withKeys(mo,["enter"])},null,40,yd),[[e.vModelText,ft.value]])]),e.createElementVNode("div",kd,[e.createElementVNode("label",Cd,e.toDisplayString(e.unref(L)("textEditor.link.url")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"linkUrlInput",ref:Z,type:"text","onUpdate:modelValue":l[16]||(l[16]=s=>nt.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.link.enterUrl"),onKeyup:e.withKeys(mo,["enter"])},null,40,bd),[[e.vModelText,nt.value]])])])]),actions:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-cancel",onClick:Ol},e.toDisplayString(e.unref(L)("textEditor.link.cancel")),1),e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-save",onClick:mo},e.toDisplayString(e.unref(L)("textEditor.link.save")),1)]),_:1},8,["showModal"]),e.createVNode(ea,{showModal:bt.value,width:"500px",height:"80vh",onCloseModal:_l},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(yt.value?e.unref(L)("textEditor.image.editImage"):e.unref(L)("textEditor.image.addImage")),1)]),content:e.withCtx(()=>[e.createElementVNode("div",wd,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-image-modal-tab",{"dss-image-modal-tab-active":Be.value==="upload"}]),onClick:l[17]||(l[17]=s=>Be.value="upload")},e.toDisplayString(e.unref(L)("textEditor.image.upload")),3),l[65]||(l[65]=e.createElementVNode("div",{class:"dss-image-modal-tab-separator"},null,-1)),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-image-modal-tab",{"dss-image-modal-tab-active":Be.value==="url"}]),onClick:l[18]||(l[18]=s=>Be.value="url")},e.toDisplayString(e.unref(L)("textEditor.image.imageLink")),3)]),Be.value==="upload"?(e.openBlock(),e.createElementBlock("div",xd,[e.createElementVNode("div",Ed,[e.createElementVNode("div",Sd,[On.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("label",Vd,e.toDisplayString(e.unref(L)("textEditor.image.uploadImage")),1)),On.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-image-upload-preview",onClick:nl},[e.createElementVNode("img",{src:Pt.value,alt:"Preview",class:"dss-image-preview-image"},null,8,Nd),l[66]||(l[66]=e.createElementVNode("div",{class:"dss-image-preview-overlay"},[e.createElementVNode("svg",{width:"35",height:"35",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M14.06 9.02L14.98 9.94L5.92 19H5V18.08L14.06 9.02ZM17.66 3C17.41 3 17.15 3.1 16.96 3.29L15.13 5.12L18.88 8.87L20.71 7.04C21.1 6.65 21.1 6.02 20.71 5.63L18.37 3.29C18.17 3.1 17.92 3 17.66 3ZM14.06 6.19L3 17.25V21H6.75L17.81 9.94L14.06 6.19Z",fill:"white"})])],-1)),e.createElementVNode("input",{ref_key:"imageFileInput",ref:De,type:"file",accept:"image/*",class:"dss-image-file-input-hidden",onChange:tl},null,544)])):(e.openBlock(),e.createElementBlock("input",{key:2,ref_key:"imageFileInput",ref:De,type:"file",accept:"image/*",class:"dss-link-modal-input dss-link-modal-input-image",onChange:tl},null,544))]),e.createElementVNode("div",Bd,[e.createElementVNode("label",Md,e.toDisplayString(e.unref(L)("textEditor.image.altText")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"imageAltInput",ref:Fe,type:"text","onUpdate:modelValue":l[19]||(l[19]=s=>It.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.enterAltText"),onKeyup:e.withKeys(Hn,["enter"])},null,40,_d),[[e.vModelText,It.value]])]),e.createElementVNode("div",$d,[e.createElementVNode("label",Ld,e.toDisplayString(e.unref(L)("textEditor.image.width")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":l[20]||(l[20]=s=>oe.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.auto"),onKeyup:e.withKeys(Hn,["enter"]),onInput:Kl},null,40,Td),[[e.vModelText,oe.value]])]),e.createElementVNode("div",Ad,[e.createElementVNode("label",Dd,e.toDisplayString(e.unref(L)("textEditor.image.height")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":l[21]||(l[21]=s=>ve.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.auto"),onKeyup:e.withKeys(Hn,["enter"]),onInput:fo},null,40,Hd),[[e.vModelText,ve.value]])])])])):e.createCommentVNode("",!0),Be.value==="url"?(e.openBlock(),e.createElementBlock("div",Rd,[e.createElementVNode("div",Fd,[e.createElementVNode("div",Id,[e.createElementVNode("label",zd,e.toDisplayString(e.unref(L)("textEditor.image.imageUrl")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"imageUrlInput",ref:Zt,type:"text","onUpdate:modelValue":l[22]||(l[22]=s=>Xe.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.enterImageUrl"),onKeyup:e.withKeys(Hn,["enter"])},null,40,Pd),[[e.vModelText,Xe.value]])]),e.createElementVNode("div",Od,[e.createElementVNode("label",qd,e.toDisplayString(e.unref(L)("textEditor.image.altText")),1),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":l[23]||(l[23]=s=>It.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.enterAltText"),onKeyup:e.withKeys(Hn,["enter"])},null,40,Wd),[[e.vModelText,It.value]])]),e.createElementVNode("div",Zd,[e.createElementVNode("label",Ud,e.toDisplayString(e.unref(L)("textEditor.image.width")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":l[24]||(l[24]=s=>oe.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.auto"),onKeyup:e.withKeys(Hn,["enter"]),onInput:Kl},null,40,Xd),[[e.vModelText,oe.value]])]),e.createElementVNode("div",Yd,[e.createElementVNode("label",jd,e.toDisplayString(e.unref(L)("textEditor.image.height")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":l[25]||(l[25]=s=>ve.value=s),class:"dss-link-modal-input",placeholder:e.unref(L)("textEditor.image.auto"),onKeyup:e.withKeys(Hn,["enter"]),onInput:fo},null,40,Kd),[[e.vModelText,ve.value]])])])])):e.createCommentVNode("",!0)]),actions:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-cancel",onClick:_l},e.toDisplayString(e.unref(L)("textEditor.image.cancel")),1),e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-save",onClick:Hn},e.toDisplayString(e.unref(L)("textEditor.image.save")),1)]),_:1},8,["showModal"]),e.createElementVNode("div",{class:e.normalizeClass(["dss-text-editor-title-wrapper",{"dss-text-editor-no-border-bottom":et.value&&Gt.value}])},[e.createElementVNode("p",null,e.toDisplayString(e.unref(L)("textEditor.labels.title")),1),e.createElementVNode("div",Gd,[Gt.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Qd,[D.title?(e.openBlock(),e.createElementBlock("span",Jd,e.toDisplayString(D.title),1)):(e.openBlock(),e.createElementBlock("span",e1,e.toDisplayString(qn.value),1))])),e.createElementVNode("textarea",{ref_key:"titleInputRef",ref:ye,value:D.title,onInput:Wl,onFocus:oo,onBlur:ql,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-title-input",{"dss-text-editor-title-input-blurred":!Gt.value}]),placeholder:qn.value,disabled:D.disabled,rows:"1"},null,42,t1)])],2),et.value&&Gt.value?(e.openBlock(),e.createElementBlock("div",n1,[e.renderSlot(o.$slots,"title-slot")])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["dss-text-editor-description-wrapper",{"dss-text-editor-no-border-bottom":rt.value&&S.value}])},[e.createElementVNode("p",null,e.toDisplayString(e.unref(L)("textEditor.labels.description")),1),e.createElementVNode("div",l1,[S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",o1,[D.description?(e.openBlock(),e.createElementBlock("span",a1,e.toDisplayString(D.description),1)):(e.openBlock(),e.createElementBlock("span",s1,e.toDisplayString(Rn.value),1))])),e.createElementVNode("textarea",{ref_key:"descriptionInputRef",ref:Je,value:D.description,onInput:yn,onFocus:Vl,onBlur:ao,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-description-input",{"dss-text-editor-description-input-blurred":!S.value}]),placeholder:Rn.value,disabled:D.disabled,rows:"1"},null,42,r1)])],2),rt.value&&S.value?(e.openBlock(),e.createElementBlock("div",i1,[e.renderSlot(o.$slots,"description-slot")])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ne.value,s=>(e.openBlock(),e.createElementBlock("div",{key:s.id,class:e.normalizeClass(["editor-comment-marker-group",{"editor-comment-marker-active":$t.value===s.id,"editor-comment-marker-group-out-of-view":s.opacity===0}]),"data-comment-id":s.id,style:e.normalizeStyle({top:s.top+"px"}),onMouseenter:r=>Lo(s),onMouseleave:$l},[s.firstUser?(e.openBlock(),e.createElementBlock("div",{key:0,class:"editor-comment-marker editor-comment-marker-first",onClick:e.withModifiers(r=>go(s),["stop"])},[s.firstUser.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.firstUser.avatar,alt:s.firstUser.name||"avatar"},null,8,d1)):(e.openBlock(),e.createElementBlock("span",m1,e.toDisplayString(s.firstUser.initials||(s.firstUser.name?s.firstUser.name.charAt(0):"")),1))],8,u1)):e.createCommentVNode("",!0),s.secondUser?(e.openBlock(),e.createElementBlock("div",{key:1,class:"editor-comment-marker editor-comment-marker-second",onClick:e.withModifiers(r=>go(s),["stop"])},[s.secondUser.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.secondUser.avatar,alt:s.secondUser.name||"avatar"},null,8,f1)):(e.openBlock(),e.createElementBlock("span",v1,e.toDisplayString(s.secondUser.initials||(s.secondUser.name?s.secondUser.name.charAt(0):"")),1))],8,p1)):e.createCommentVNode("",!0),s.additionalCount>0?(e.openBlock(),e.createElementBlock("div",{key:2,class:"editor-comment-marker editor-comment-marker-additional",style:e.normalizeStyle({top:s.secondUser?"30px":"15px"}),"data-has-second-user":s.secondUser?"true":"false",onClick:e.withModifiers(r=>go(s),["stop"])},[e.createElementVNode("span",h1,"+"+e.toDisplayString(s.additionalCount),1)],12,g1)):e.createCommentVNode("",!0)],46,c1))),128)),D.richText?(e.openBlock(),e.createElementBlock("div",E1,[e.createElementVNode("div",{ref_key:"editorRef",ref:f,contenteditable:"true",spellcheck:"false",class:e.normalizeClass(["dss-text-editor-content",{"dss-text-editor-content-disabled":D.disabled,"dss-text-editor-fixed-height":D.fixedHeight}]),style:e.normalizeStyle(bn.value),onInput:ce,onBlur:st,onClick:Cl,onMouseup:Rt,onKeyup:Rt,onKeydown:uo,onPaste:Zo,onMousemove:Uo,onMouseleave:xl},null,38),e.createVNode(e.Transition,{name:"comment-overlay"},{default:e.withCtx(()=>[$t.value!==null?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-comment-overlay",style:e.normalizeStyle(rl.value)},[x.value||re.value.length>0?(e.openBlock(),e.createElementBlock("div",S1,[e.createElementVNode("div",V1,[x.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-comment-selection",innerHTML:x.value},null,8,N1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",B1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(re.value,(s,r)=>(e.openBlock(),e.createElementBlock("div",{key:r,class:"dss-comment-message"},[s.user&&(s.user.avatar||s.user.initials||s.user.name)?(e.openBlock(),e.createElementBlock("div",M1,[e.createElementVNode("div",_1,[s.user.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.user.avatar,alt:s.user.name||"avatar"},null,8,$1)):(e.openBlock(),e.createElementBlock("span",L1,e.toDisplayString(s.user.initials||(s.user.name?s.user.name.charAt(0):"")),1))])])):e.createCommentVNode("",!0),e.createElementVNode("div",T1,[e.createElementVNode("div",A1,[e.createElementVNode("div",D1,e.toDisplayString(s.user&&s.user.name||"Comment"),1),s.createdAt?(e.openBlock(),e.createElementBlock("div",H1,e.toDisplayString(An(new Date(s.createdAt))),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["dss-comment-body-text",{"comment-started":Fn(s.text)||s.class==="comment-started"}])},e.toDisplayString(s.text||""),3)]),T.commentUser&&s.user&&s.user.id===T.commentUser.id&&!Fn(s.text)?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"dss-comment-delete-button",onClick:e.withModifiers(c=>kl(s,r),["stop"]),title:e.unref(L)("textEditor.comment.delete")||"Delete comment"},[...l[68]||(l[68]=[e.createElementVNode("svg",{width:"22",height:"25",viewBox:"0 0 22 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M19.5986 21.3535C19.5985 23.3679 18.1282 25 16.2891 25H5.30957C3.48166 24.9997 2.00011 23.3702 2 21.3535V8H19.5986V21.3535ZM8 11C7.44772 11 7 11.4477 7 12V20C7 20.5523 7.44772 21 8 21C8.55229 21 9 20.5523 9 20V12C9 11.4477 8.55229 11 8 11ZM14 11C13.4477 11 13 11.4477 13 12V20C13 20.5523 13.4477 21 14 21C14.5523 21 15 20.5523 15 20V12C15 11.4477 14.5523 11 14 11ZM13.2002 0C15.0227 0.000104554 16.4999 1.46937 16.5 3.27246V4.36328H20.9092C21.5117 4.36348 21.9998 4.84789 22 5.4541C22 6.05615 21.4986 6.54569 20.9092 6.5459H1.09082C0.488195 6.54569 0 6.06052 0 5.4541C0.000246661 4.85225 0.50153 4.36349 1.09082 4.36328H5.5L5.50098 3.27246C5.50112 1.46505 6.98382 0.000171185 8.80078 0H13.2002ZM8.79004 2.18164C8.19615 2.18167 7.70034 2.67042 7.7002 3.27246C7.7002 3.87899 8.18837 4.36325 8.79004 4.36328H13.21C13.8039 4.36325 14.2998 3.87462 14.2998 3.27246C14.2997 2.66606 13.8115 2.18167 13.21 2.18164H8.79004Z",fill:"#323232"})],-1)])],8,R1)):e.createCommentVNode("",!0)]))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",F1,[e.withDirectives(e.createElementVNode("textarea",{ref_key:"commentInputRef",ref:h,"onUpdate:modelValue":l[26]||(l[26]=s=>y.value=s),class:"dss-comment-input",rows:"1",placeholder:e.unref(L)("textEditor.comment.placeholder"),onKeydown:e.withKeys(e.withModifiers(Wn,["prevent","stop"]),["enter"]),onInput:l[27]||(l[27]=()=>{if(h.value){const s=h.value;s.style.height="auto",s.style.height=`${s.scrollHeight}px`}})},null,40,I1),[[e.vModelText,y.value]]),e.createElementVNode("button",{type:"button",class:"dss-comment-send-button",onClick:e.withModifiers(Wn,["stop"])},[...l[69]||(l[69]=[e.createElementVNode("svg",{width:"21",height:"18",viewBox:"0 0 21 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M0.00999999 18L21 9L0.00999999 0L0 7L15 9L0 11L0.00999999 18Z",fill:"#31312F"})],-1)])])])],4)):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",z1,[e.createElementVNode("div",P1,[e.createElementVNode("span",O1,e.toDisplayString(qt.value)+" "+e.toDisplayString(qt.value===1?e.unref(L)("textEditor.footer.word"):e.unref(L)("textEditor.footer.words")),1),l[70]||(l[70]=e.createElementVNode("span",{class:"dss-text-editor-footer-separator"},"•",-1)),e.createElementVNode("span",q1,e.toDisplayString(ln.value)+" "+e.toDisplayString(ln.value===1?e.unref(L)("textEditor.footer.character"):e.unref(L)("textEditor.footer.characters")),1)])])])):(e.openBlock(),e.createElementBlock("div",y1,[e.createElementVNode("textarea",{value:D.modelValue,onInput:Qn,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-textarea",{"dss-text-editor-fixed-height":D.fixedHeight}]),placeholder:Nn.value,rows:D.rows,disabled:D.disabled,style:e.normalizeStyle(Bt.value)},null,46,k1),e.createElementVNode("div",C1,[e.createElementVNode("div",b1,[e.createElementVNode("span",w1,e.toDisplayString(qt.value)+" "+e.toDisplayString(qt.value===1?e.unref(L)("textEditor.footer.word"):e.unref(L)("textEditor.footer.words")),1),l[67]||(l[67]=e.createElementVNode("span",{class:"dss-text-editor-footer-separator"},"•",-1)),e.createElementVNode("span",x1,e.toDisplayString(ln.value)+" "+e.toDisplayString(ln.value===1?e.unref(L)("textEditor.footer.character"):e.unref(L)("textEditor.footer.characters")),1)])])])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[U.value&&me.value&&f.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-link-popup",style:e.normalizeStyle(R.value),onMouseenter:l[28]||(l[28]=s=>xe.value=!0),onMouseleave:Ml},[e.createElementVNode("span",{class:"dss-link-popup-url",onClick:e.withModifiers(Pl,["stop"]),title:me.value},e.toDisplayString(me.value),9,W1),e.createElementVNode("button",{type:"button",class:"dss-link-popup-edit",onClick:e.withModifiers(Xo,["stop"]),title:e.unref(L)("textEditor.link.editLink")},[(e.openBlock(),e.createElementBlock("svg",U1,[...l[71]||(l[71]=[e.createElementVNode("g",null,[e.createElementVNode("path",{d:"M25.264 1.008c-.524 0-1.049.197-1.443.592l-2.248 2.248 6.58 6.578 2.246-2.248a2.058 2.058 0 0 0 0-2.887L26.707 1.6a2.032 2.032 0 0 0-1.443-.592zm-5.106 4.254L3.889 21.532a1.022 1.022 0 0 0-.242.391c-.729 2.187-2.035 5.759-2.6 7.803a1 1 0 0 0 1.188 1.24c2.432-.562 5.687-1.896 7.84-2.613a1.03 1.03 0 0 0 .392-.236l16.269-16.275z",fill:"hsl(0, 0%, 98%)",opacity:"1","data-original":"#000000",class:""})],-1)])]))],8,Z1)],36)):e.createCommentVNode("",!0)])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[xt.value&&Ot.value&&f.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-link-popup",style:e.normalizeStyle(J.value),onMouseenter:l[29]||(l[29]=s=>he.value=!0),onMouseleave:zl},[e.createElementVNode("div",X1,[Ot.value===e.unref(L)("textEditor.image.noAlt")?(e.openBlock(),e.createElementBlock("div",Y1,[...l[72]||(l[72]=[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("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:"#fafafa"})],-1)])])):e.createCommentVNode("",!0),e.createElementVNode("p",{class:"dss-image-popup-alt",title:Ot.value},e.toDisplayString(Ot.value),9,j1)]),e.createElementVNode("button",{type:"button",class:"dss-link-popup-edit",onClick:e.withModifiers(_o,["stop"]),title:e.unref(L)("textEditor.image.editImage")},[(e.openBlock(),e.createElementBlock("svg",G1,[...l[73]||(l[73]=[e.createElementVNode("g",null,[e.createElementVNode("path",{d:"M25.264 1.008c-.524 0-1.049.197-1.443.592l-2.248 2.248 6.58 6.578 2.246-2.248a2.058 2.058 0 0 0 0-2.887L26.707 1.6a2.032 2.032 0 0 0-1.443-.592zm-5.106 4.254L3.889 21.532a1.022 1.022 0 0 0-.242.391c-.729 2.187-2.035 5.759-2.6 7.803a1 1 0 0 0 1.188 1.24c2.432-.562 5.687-1.896 7.84-2.613a1.03 1.03 0 0 0 .392-.236l16.269-16.275z",fill:"hsl(0, 0%, 98%)",opacity:"1","data-original":"#000000",class:""})],-1)])]))],8,K1)],36)):e.createCommentVNode("",!0)])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[D.floatingToolbar&&D.richText&&ze.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"floatingToolbarRef",ref:it,class:"dss-floating-toolbar",style:e.normalizeStyle(we.value),onMousedown:l[44]||(l[44]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",Q1,[e.createElementVNode("div",{class:"dss-toolbar-button",onClick:e.withModifiers(gt,["stop"]),title:e.unref(L)("textEditor.toolbar.undo")},[...l[74]||(l[74]=[e.createElementVNode("svg",{viewBox:"0 0 18 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M9.23302 0.888889C6.90278 0.888889 4.79238 1.76889 3.16561 3.2L0 0V8H7.91402L4.73083 4.78222C5.9531 3.75111 7.50953 3.11111 9.23302 3.11111C12.3459 3.11111 14.9927 5.16444 15.916 8L18 7.30667C16.7777 3.58222 13.3219 0.888889 9.23302 0.888889Z",fill:"#323232"})],-1)])],8,J1),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-disabled":!Tn.value}]),onClick:e.withModifiers(ae,["stop"]),title:e.unref(L)("textEditor.toolbar.redo")},[...l[75]||(l[75]=[e.createElementVNode("svg",{viewBox:"0 0 18 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M14.8328 3.2C13.2053 1.76889 11.0938 0.888889 8.76246 0.888889C4.67155 0.888889 1.21408 3.58222 0 7.30667L2.07625 8C3 5.16444 5.6393 3.11111 8.76246 3.11111C10.478 3.11111 12.044 3.75111 13.2669 4.78222L10.0821 8H18V0L14.8328 3.2Z",fill:"#323232"})],-1)])],10,em),l[89]||(l[89]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",tm,[e.createElementVNode("div",{class:"dss-toolbar-button dss-toolbar-dropdown-toggle",onClick:l[30]||(l[30]=e.withModifiers(s=>Bl("paragraph"),["stop"])),title:e.unref(L)("textEditor.toolbar.paragraphFormat")},[V.value==="h1"?(e.openBlock(),e.createElementBlock("img",{key:0,src:I.h1,alt:"H1",class:"dss-toolbar-heading-icon"},null,8,lm)):V.value==="h2"?(e.openBlock(),e.createElementBlock("img",{key:1,src:I.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,om)):V.value==="h3"?(e.openBlock(),e.createElementBlock("img",{key:2,src:I.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,am)):V.value==="h4"?(e.openBlock(),e.createElementBlock("img",{key:3,src:I.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,sm)):V.value==="h5"?(e.openBlock(),e.createElementBlock("img",{key:4,src:I.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,rm)):V.value==="h6"?(e.openBlock(),e.createElementBlock("img",{key:5,src:I.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,im)):(e.openBlock(),e.createElementBlock("svg",cm,[...l[76]||(l[76]=[e.createElementVNode("path",{d:"M4.33333 8.61539V14H6.5V2.15385H8.66667V14H10.8333V2.15385H13V0H4.33333C1.93917 0 0 1.92769 0 4.30769C0 6.68769 1.93917 8.61539 4.33333 8.61539Z",fill:"#323232"},null,-1)])])),l[77]||(l[77]=e.createElementVNode("span",{class:"dss-toolbar-dropdown-arrow"},"˅",-1))],8,nm),ot.value==="paragraph"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-dropdown",onClick:l[38]||(l[38]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[31]||(l[31]=s=>Pn("<h1>"))},[e.createElementVNode("h1",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading1")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[32]||(l[32]=s=>Pn("<h2>"))},[e.createElementVNode("h2",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading2")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[33]||(l[33]=s=>Pn("<h3>"))},[e.createElementVNode("h3",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading3")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[34]||(l[34]=s=>Pn("<h4>"))},[e.createElementVNode("h4",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading4")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[35]||(l[35]=s=>Pn("<h5>"))},[e.createElementVNode("h5",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading5")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[36]||(l[36]=s=>Pn("<h6>"))},[e.createElementVNode("h6",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.heading6")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[37]||(l[37]=s=>Pn("<p>"))},[e.createElementVNode("p",null,e.toDisplayString(e.unref(L)("textEditor.paragraph.paragraph")),1)])])):e.createCommentVNode("",!0)]),l[90]||(l[90]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":tn("bold")}]),onClick:l[39]||(l[39]=e.withModifiers(s=>Bn("bold"),["stop"])),title:e.unref(L)("textEditor.toolbar.bold")},[...l[78]||(l[78]=[e.createElementVNode("svg",{viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M8.8 6.79C9.79256 6.12 10.4884 5.02 10.4884 4C10.4884 1.74 8.69767 0 6.39535 0H0V14H7.20372C9.34233 14 11 12.3 11 10.21C11 8.69 10.12 7.39 8.8 6.79ZM3.06977 2.5H6.13953C6.98884 2.5 7.67442 3.17 7.67442 4C7.67442 4.83 6.98884 5.5 6.13953 5.5H3.06977V2.5ZM6.65116 11.5H3.06977V8.5H6.65116C7.50047 8.5 8.18605 9.17 8.18605 10C8.18605 10.83 7.50047 11.5 6.65116 11.5Z",fill:"currentColor"})],-1)])],10,um),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":tn("italic")}]),onClick:l[40]||(l[40]=e.withModifiers(s=>Bn("italic"),["stop"])),title:e.unref(L)("textEditor.toolbar.italic")},[...l[79]||(l[79]=[e.createElementVNode("svg",{viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4 0V3H6.21L2.79 11H0V14H8V11H5.79L9.21 3H12V0H4Z",fill:"#323232"})],-1)])],10,dm),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":tn("underline")}]),onClick:l[41]||(l[41]=e.withModifiers(s=>Bn("underline"),["stop"])),title:e.unref(L)("textEditor.toolbar.underline")},[...l[80]||(l[80]=[e.createElementVNode("svg",{viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M5.5 10.8889C8.10071 10.8889 10.2143 8.79667 10.2143 6.22222V0H8.25V6.22222C8.25 7.72333 7.01643 8.94444 5.5 8.94444C3.98357 8.94444 2.75 7.72333 2.75 6.22222V0H0.785714V6.22222C0.785714 8.79667 2.89929 10.8889 5.5 10.8889ZM0 12.4444V14H11V12.4444H0Z",fill:"#323232"})],-1)])],10,mm),l[91]||(l[91]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":je.value}]),onClick:e.withModifiers(Nl,["stop"]),title:e.unref(L)("textEditor.toolbar.citation")},[...l[81]||(l[81]=[e.createElementVNode("svg",{viewBox:"0 0 20 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M1.42857 14H5.71429L8.57143 8.4V0H0V8.4H4.28571L1.42857 14ZM12.8571 14H17.1429L20 8.4V0H11.4286V8.4H15.7143L12.8571 14Z",fill:"currentColor"})],-1)])],10,pm),l[92]||(l[92]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),Ce.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-button",onClick:e.withModifiers(Ul,["stop"]),title:e.unref(L)("textEditor.toolbar.removeLink")},[...l[83]||(l[83]=[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M18 4.88889H13.2V7.21111H18C20.052 7.21111 21.72 8.91 21.72 11C21.72 12.7478 20.544 14.2144 18.948 14.6422L20.7 16.4267C22.656 15.4122 24 13.3833 24 11C24 7.62667 21.312 4.88889 18 4.88889ZM16.8 9.77778H14.172L16.572 12.2222H16.8V9.77778ZM0 1.55222L3.732 5.35333C1.548 6.25778 0 8.44556 0 11C0 14.3733 2.688 17.1111 6 17.1111H10.8V14.7889H6C3.948 14.7889 2.28 13.09 2.28 11C2.28 9.05667 3.732 7.45556 5.592 7.24778L8.076 9.77778H7.2V12.2222H10.476L13.2 14.9967V17.1111H15.276L20.088 22L21.6 20.46L1.524 0L0 1.55222Z",fill:"#323232"})],-1)])],8,vm)):(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-button",onClick:e.withModifiers(Zl,["stop"]),title:e.unref(L)("textEditor.toolbar.insertLink")},[...l[82]||(l[82]=[e.createElementVNode("svg",{width:"20",height:"14",viewBox:"0 0 27 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M2.565 7C2.565 4.606 4.4415 2.66 6.75 2.66H12.15V0H6.75C3.024 0 0 3.136 0 7C0 10.864 3.024 14 6.75 14H12.15V11.34H6.75C4.4415 11.34 2.565 9.394 2.565 7ZM8.1 8.4H18.9V5.6H8.1V8.4ZM20.25 0H14.85V2.66H20.25C22.5585 2.66 24.435 4.606 24.435 7C24.435 9.394 22.5585 11.34 20.25 11.34H14.85V14H20.25C23.976 14 27 10.864 27 7C27 3.136 23.976 0 20.25 0Z",fill:"#323232"})],-1)])],8,fm)),l[93]||(l[93]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":tn("insertUnorderedList")}]),onClick:e.withModifiers(sl,["stop"]),title:e.unref(L)("textEditor.toolbar.bulletList")},[...l[84]||(l[84]=[e.createElementVNode("svg",{viewBox:"0 0 17 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M1.37838 5.2C0.615676 5.2 0 5.78067 0 6.5C0 7.21933 0.615676 7.8 1.37838 7.8C2.14108 7.8 2.75676 7.21933 2.75676 6.5C2.75676 5.78067 2.14108 5.2 1.37838 5.2ZM1.37838 0C0.615676 0 0 0.580667 0 1.3C0 2.01933 0.615676 2.6 1.37838 2.6C2.14108 2.6 2.75676 2.01933 2.75676 1.3C2.75676 0.580667 2.14108 0 1.37838 0ZM1.37838 10.4C0.615676 10.4 0 10.9893 0 11.7C0 12.4107 0.624865 13 1.37838 13C2.13189 13 2.75676 12.4107 2.75676 11.7C2.75676 10.9893 2.14108 10.4 1.37838 10.4ZM4.13514 12.5667H17V10.8333H4.13514V12.5667ZM4.13514 7.36667H17V5.63333H4.13514V7.36667ZM4.13514 0.433333V2.16667H17V0.433333H4.13514Z",fill:"#323232"})],-1)])],10,gm),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":tn("insertOrderedList")}]),onClick:e.withModifiers(Hl,["stop"]),title:e.unref(L)("textEditor.toolbar.numberList")},[...l[85]||(l[85]=[e.createElementVNode("svg",{viewBox:"0 0 18 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M0 12.1875H1.89474V12.6562H0.947368V13.5938H1.89474V14.0625H0V15H2.84211V11.25H0V12.1875ZM0.947368 3.75H1.89474V0H0V0.9375H0.947368V3.75ZM0 6.5625H1.70526L0 8.53125V9.375H2.84211V8.4375H1.13684L2.84211 6.46875V5.625H0V6.5625ZM4.73684 0.9375V2.8125H18V0.9375H4.73684ZM4.73684 14.0625H18V12.1875H4.73684V14.0625ZM4.73684 8.4375H18V6.5625H4.73684V8.4375Z",fill:"#323232"})],-1)])],10,hm),l[94]||(l[94]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:"dss-toolbar-button",onClick:e.withModifiers(po,["stop"]),title:e.unref(L)("textEditor.toolbar.image")},[...l[86]||(l[86]=[e.createElementVNode("svg",{viewBox:"1.5 1.5 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M2.15065 15.8414L2.13398 15.8581C1.90898 15.3664 1.76732 14.8081 1.70898 14.1914C1.76732 14.7997 1.92565 15.3497 2.15065 15.8414Z",fill:"#323232"}),e.createElementVNode("path",{d:"M7.50091 8.65026C8.59628 8.65026 9.48425 7.76229 9.48425 6.66693C9.48425 5.57156 8.59628 4.68359 7.50091 4.68359C6.40555 4.68359 5.51758 5.57156 5.51758 6.66693C5.51758 7.76229 6.40555 8.65026 7.50091 8.65026Z",fill:"#323232"}),e.createElementVNode("path",{d:"M13.491 1.66699H6.50768C3.47435 1.66699 1.66602 3.47533 1.66602 6.50866V13.492C1.66602 14.4003 1.82435 15.192 2.13268 15.8587C2.84935 17.442 4.38268 18.3337 6.50768 18.3337H13.491C16.5243 18.3337 18.3327 16.5253 18.3327 13.492V11.5837V6.50866C18.3327 3.47533 16.5243 1.66699 13.491 1.66699ZM16.9743 10.417C16.3243 9.85866 15.2743 9.85866 14.6243 10.417L11.1577 13.392C10.5077 13.9503 9.45768 13.9503 8.80768 13.392L8.52435 13.1587C7.93268 12.642 6.99102 12.592 6.32435 13.042L3.20768 15.1337C3.02435 14.667 2.91602 14.1253 2.91602 13.492V6.50866C2.91602 4.15866 4.15768 2.91699 6.50768 2.91699H13.491C15.841 2.91699 17.0827 4.15866 17.0827 6.50866V10.5087L16.9743 10.417Z",fill:"#323232"})],-1)])],8,ym),l[95]||(l[95]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:"dss-toolbar-button",title:e.unref(L)("textEditor.toolbar.comment"),onClick:e.withModifiers(Dn,["stop"])},[...l[87]||(l[87]=[e.createElementVNode("svg",{viewBox:"2 2 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13.19 6H6.79C6.53 6 6.28 6.01 6.04 6.04C3.35 6.27 2 7.86 2 10.79V14.79C2 18.79 3.6 19.58 6.79 19.58H7.19C7.41 19.58 7.7 19.73 7.83 19.9L9.03 21.5C9.56 22.21 10.42 22.21 10.95 21.5L12.15 19.9C12.3 19.7 12.54 19.58 12.79 19.58H13.19C16.12 19.58 17.71 18.24 17.94 15.54C17.97 15.3 17.98 15.05 17.98 14.79V10.79C17.98 7.6 16.38 6 13.19 6ZM6.5 14C5.94 14 5.5 13.55 5.5 13C5.5 12.45 5.95 12 6.5 12C7.05 12 7.5 12.45 7.5 13C7.5 13.55 7.05 14 6.5 14ZM9.99 14C9.43 14 8.99 13.55 8.99 13C8.99 12.45 9.44 12 9.99 12C10.54 12 10.99 12.45 10.99 13C10.99 13.55 10.55 14 9.99 14ZM13.49 14C12.93 14 12.49 13.55 12.49 13C12.49 12.45 12.94 12 13.49 12C14.04 12 14.49 12.45 14.49 13C14.49 13.55 14.04 14 13.49 14Z",fill:"#323232"}),e.createElementVNode("path",{d:"M21.9802 6.79V10.79C21.9802 12.79 21.3602 14.15 20.1202 14.9C19.8202 15.08 19.4702 14.84 19.4702 14.49L19.4802 10.79C19.4802 6.79 17.1902 4.5 13.1902 4.5L7.10025 4.51C6.75025 4.51 6.51025 4.16 6.69025 3.86C7.44025 2.62 8.80025 2 10.7902 2H17.1902C20.3802 2 21.9802 3.6 21.9802 6.79Z",fill:"#323232"})],-1)])],8,km),D.askAi?(e.openBlock(),e.createElementBlock("div",Cm)):e.createCommentVNode("",!0),D.askAi?(e.openBlock(),e.createElementBlock("div",bm,[e.createElementVNode("div",{class:"dss-toolbar-ai-button dss-toolbar-ai-float dss-toolbar-dropdown-toggle",onClick:l[42]||(l[42]=e.withModifiers(s=>Bl("askAi"),["stop"])),title:e.unref(L)("textEditor.toolbar.askAi")},[l[88]||(l[88]=e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M3.97363 4.34473C5.4926 6.769 7.88838 8.45732 10.7598 9.01855C9.21102 10.2499 7.99851 11.8959 7.30762 13.8027C7.21982 14.066 6.82404 14.066 6.69238 13.8027C5.59521 10.7746 3.18158 8.40476 0.197266 7.30762C-0.0658032 7.21978 -0.0656958 6.82515 0.197266 6.69336C1.62341 6.17665 2.90369 5.36753 3.97363 4.34473Z",fill:"#9784ba"}),e.createElementVNode("path",{d:"M6.66895 0.197266C6.75687 -0.0657415 7.1515 -0.0657945 7.2832 0.197266C8.38035 3.22532 10.7941 5.5952 13.7783 6.69238C14.0416 6.78015 14.0416 7.17497 13.7783 7.30664C12.6735 7.71282 11.6469 8.29371 10.7363 9.01758C7.86425 8.45633 5.46822 6.76786 3.94922 4.34277C5.15088 3.1939 6.08858 1.77583 6.66895 0.197266Z",fill:"#cfbeed"})],-1)),e.createElementVNode("span",xm,e.toDisplayString(e.unref(L)("textEditor.toolbar.askAi")),1)],8,wm),ot.value==="askAi"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-dropdown",onClick:l[43]||(l[43]=e.withModifiers(()=>{},["stop"]))},[e.renderSlot(o.$slots,"ask-ai-dropdown")])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),Te.value?(e.openBlock(),e.createElementBlock("div",Em,[D.askAi&&Te.value?(e.openBlock(),e.createElementBlock("div",Sm)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.customToolbarSlots,(s,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r},[A(s)&&ie(s)?(e.openBlock(),e.createElementBlock("div",Vm,[e.renderSlot(o.$slots,s)])):e.createCommentVNode("",!0),A(s)&&ie(s)&&r<D.customToolbarSlots.length-1&&P(r)?(e.openBlock(),e.createElementBlock("div",Nm)):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0)],36)):e.createCommentVNode("",!0)]))],6))}}),_m={class:"dss-color-picker__section-title"},$m={class:"dss-color-picker__presets-row"},Lm=["title","onClick"],Tm={key:1,class:"dss-color-picker__section"},Am={class:"dss-color-picker__presets-row"},Dm=["title","onClick"],Hm={key:2,class:"dss-color-picker__section"},Rm={class:"dss-color-picker__section-header"},Fm={class:"dss-color-picker__presets-row"},Im=["title","onClick"],zm=["onClick"],Pm={key:1,class:"dss-color-picker__presets-row dss-color-picker__presets-row--standalone"},Om=["title","onClick"],qm={class:"dss-color-picker__input-row"},Wm=["value"],Zm={__name:"DSSColorPicker",props:{modelValue:{type:String,default:"#b8a5de"},disabled:{type:Boolean,default:!1},presetColors:{type:Array,default:()=>[]},presetGroups:{type:Array,default:null},max:{type:Number,default:12},initialPresetCount:{type:Number,default:null},disableCustomColors:{type:Boolean,default:!1}},emits:["update:modelValue","update:presetColors"],setup(D,{emit:le}){function M(K){const W=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(K);if(!W)return{h:0,s:0,l:50};const X=parseInt(W[1],16)/255,pe=parseInt(W[2],16)/255,ye=parseInt(W[3],16)/255,Je=Math.max(X,pe,ye),Tt=Math.min(X,pe,ye);let mn=0,vt=0;const Gt=(Je+Tt)/2;if(Je!==Tt){const S=Je-Tt;switch(vt=Gt>.5?S/(2-Je-Tt):S/(Je+Tt),Je){case X:mn=((pe-ye)/S+(pe<ye?6:0))/6;break;case pe:mn=((ye-X)/S+2)/6;break;case ye:mn=((X-pe)/S+4)/6;break}}return{h:mn*360,s:vt*100,l:Gt*100}}function L(K,W,X){W/=100,X/=100;const pe=W*Math.min(X,1-X),ye=Je=>{const Tt=(Je+K/30)%12,mn=X-pe*Math.max(Math.min(Tt-3,9-Tt,1),-1);return Math.round(255*mn).toString(16).padStart(2,"0")};return`#${ye(0)}${ye(8)}${ye(4)}`}function de(K){const W=K.replace(/^#/,"").match(/^([a-f\d]{6}|[a-f\d]{3})$/i);if(!W)return null;let X=W[1];return X.length===3&&(X=X.split("").map(pe=>pe+pe).join("")),"#"+X}function I(K){const W=K.match(/^rgba?\(\s*(\d{1,3})[\s,]+(\d{1,3})[\s,]+(\d{1,3})(?:[\s,\/]+[\d.]+)?\s*\)$/i);if(!W)return null;const X=Math.max(0,Math.min(255,Number.parseInt(W[1],10))),pe=Math.max(0,Math.min(255,Number.parseInt(W[2],10))),ye=Math.max(0,Math.min(255,Number.parseInt(W[3],10)));return`#${X.toString(16).padStart(2,"0")}${pe.toString(16).padStart(2,"0")}${ye.toString(16).padStart(2,"0")}`}function T(K){if(typeof K!="string")return null;const W=K.trim();return de(W)||I(W)}function fe(K,W,X){W/=100,X/=100;const pe=X+W*Math.min(X,1-X),ye=pe===0?0:2-2*X/pe;return{h:K,s:ye*100,v:pe*100}}function dt(K,W,X){W/=100,X/=100;const pe=X*(1-W/2),ye=pe===0||pe===1?0:(X-pe)/Math.min(pe,1-pe);return{h:K,s:ye*100,l:pe*100}}const ee=D,f=le,be=e.ref(!1),Ce=e.ref(!1),G=e.ref(!1),U=e.ref(-1),me=e.ref(-1),R=e.ref(null),xe=e.ref(null),Ae=e.ref(null),nt=e.ref(null),ft=e.ref({top:0,left:0}),Z=e.ref(M(ee.modelValue||"#b8a5de")),Ue=e.computed(()=>Array.isArray(ee.presetGroups)&&ee.presetGroups.length>0),qe=e.computed(()=>!ee.disableCustomColors),Ee=e.computed(()=>Ue.value?0:ee.initialPresetCount!=null?ee.initialPresetCount:me.value<0?null:me.value),Me=e.computed(()=>{const K=Ee.value;return K==null?!0:Math.max(0,ee.presetColors.length-K)<ee.max}),je=e.computed(()=>!!(Ce.value||U.value>=0||!Q.value&&ee.presetColors.length===0));e.computed(()=>{const K=Ee.value;return K!=null&&ee.presetColors.length>K});const Q=e.computed(()=>Ue.value||Ee.value!=null),ze=e.computed(()=>{const K=Ee.value;return K==null?[]:ee.presetColors.slice(0,K)}),we=e.computed(()=>{const K=Ee.value;return K==null?[]:ee.presetColors.slice(K)});function it(K){const W=Ee.value;return W!=null?W+K:-1}function ot(K){const W=Ee.value;return W!=null&&K>=W}function bt(K){ot(K)&&(U.value=K,Z.value=M(ee.presetColors[K]),Ce.value=!0,e.nextTick(()=>nt.value?.focus()))}function It(K){if(!ot(K))return;const W=ee.presetColors.filter((ye,Je)=>Je!==K);f("update:presetColors",W);const X=de(ee.modelValue),pe=de(ee.presetColors[K]);if(X&&pe&&X.toLowerCase()===pe.toLowerCase()){const ye=W[Math.max(0,K-1)]||W[0];ye&&f("update:modelValue",ye)}}function en(){G.value=!G.value,G.value||(U.value=-1,Ce.value=!1)}function Pt(){if(!qe.value||U.value<0)return;const K=De.value,W=de(K);if(W){const X=[...ee.presetColors];X[U.value]=W,f("update:presetColors",X),f("update:modelValue",W),U.value=-1,Ce.value=!1}}function oe(){ee.disabled||!qe.value||(U.value=-1,Ce.value=!Ce.value,Ce.value&&(he(),e.nextTick(()=>nt.value?.focus())))}function ve(K){const W=T(K),X=T(ee.modelValue);return W&&X&&W.toLowerCase()===X.toLowerCase()}function Fe(){if(ee.disabled||!qe.value||!Me.value)return;const K=De.value,W=de(K);if(W){const X=[...ee.presetColors,W];f("update:presetColors",X),f("update:modelValue",W);const pe=Ee.value??me.value;pe>=0&&X.length-pe>=ee.max&&(Ce.value=!1)}}const De=e.computed(()=>{const{h:K,s:W,l:X}=Z.value;return L(K,W,X)}),Zt=e.computed(()=>De.value.toLowerCase()),yt=e.computed(()=>({background:`linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${Z.value.h}, 100%, 50%))`})),Ut=e.computed(()=>{const K=fe(Z.value.h,Z.value.s,Z.value.l);return{left:`${K.s}%`,bottom:`${K.v}%`,transform:"translate(-50%, 50%)"}}),xt=e.computed(()=>({left:`${Z.value.h/360*100}%`,transform:"translateX(-50%)"})),Ot=e.computed(()=>({position:"fixed",left:`${ft.value.left}px`,top:`${ft.value.top}px`,zIndex:1002}));function J(){if(!R.value||!be.value)return;const K=R.value.getBoundingClientRect(),W=window.innerHeight||document.documentElement.clientHeight;let X=K.bottom+4;const pe=xe.value;pe&&X+pe.offsetHeight>W-8&&(X=K.top-4-pe.offsetHeight),ft.value={top:X,left:K.left}}function he(){const K=ee.modelValue||"#b8a5de",W=T(K);W&&(Z.value=M(W))}function Be(){f("update:modelValue",De.value)}function Xe(){ee.disabled||(be.value=!be.value,be.value&&(he(),e.nextTick(()=>{J(),nt.value?.focus()})))}function Ke(){const K=De.value,W=de(K);if(W){if(U.value>=0){const X=[...ee.presetColors];X[U.value]=W,f("update:presetColors",X),f("update:modelValue",W)}else if(qe.value&&(ee.presetColors.length>0||Ue.value)&&Ce.value&&Me.value&&!ee.presetColors.some(pe=>de(pe)?.toLowerCase()===W.toLowerCase())){const pe=[...ee.presetColors,W];f("update:presetColors",pe),f("update:modelValue",W)}}be.value=!1,Ce.value=!1,G.value=!1,U.value=-1}function Lt(K){if(!Ae.value)return;const W=Ae.value.getBoundingClientRect(),X=pe=>{const ye=Math.max(0,Math.min(1,(pe.clientX-W.left)/W.width)),Je=Math.max(0,Math.min(1,1-(pe.clientY-W.top)/W.height)),Tt={h:Z.value.h,s:ye*100,v:Je*100};Z.value=dt(Tt.h,Tt.s,Tt.v)};X(K),document.addEventListener("mousemove",X),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",X),Be()},{once:!0})}function Ge(K){if(!K.currentTarget)return;const X=K.currentTarget.getBoundingClientRect(),pe=ye=>{const Je=Math.max(0,Math.min(1,(ye.clientX-X.left)/X.width));Z.value={...Z.value,h:Je*360}};pe(K),document.addEventListener("mousemove",pe),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",pe),Be()},{once:!0})}function Dt(K){const W=K.target.value,X=T(W);X&&(Z.value=M(X),f("update:modelValue",X))}function He(K){if(ee.disabled)return;const W=T(K);W&&(Z.value=M(W),f("update:modelValue",W))}let Pe=null,Et=null;function St(){Pe&&(document.removeEventListener("keydown",Pe),Pe=null),Et&&(window.removeEventListener("resize",Et),Et=null)}return e.watch(be,K=>{if(St(),K){if(!Ue.value&&ee.initialPresetCount==null){const W=ee.presetColors.length;W>0&&(me.value<0||W<me.value)&&(me.value=W)}Pe=W=>{W.key==="Escape"&&Ke()},Et=J,document.addEventListener("keydown",Pe),window.addEventListener("resize",Et)}}),e.watch(()=>ee.modelValue,()=>{be.value&&he()},{immediate:!1}),e.watch(we,K=>{K.length===0&&(G.value=!1,U.value=-1,Ce.value=!1)}),e.onBeforeUnmount(St),(K,W)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-color-picker",{"dss-color-picker--disabled":D.disabled}])},[e.createElementVNode("div",{ref_key:"triggerRef",ref:R,class:e.normalizeClass(["dss-color-picker__trigger",{"dss-color-picker__trigger--open":be.value}]),onClick:Xe},[e.createElementVNode("span",{class:"dss-color-picker__swatch",style:e.normalizeStyle({backgroundColor:De.value})},[...W[0]||(W[0]=[e.createElementVNode("span",{class:"dss-color-picker__hover-layer"},[e.createElementVNode("svg",{class:"dss-color-picker__pen-icon",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[e.createElementVNode("path",{d:"M0 9.64033V11.6667C0 11.8534 0.146646 12 0.333287 12H2.35967C2.44633 12 2.53298 11.9667 2.59297 11.9L9.87196 4.62769L7.37231 2.12804L0.0999862 9.40036C0.0333288 9.46702 0 9.54701 0 9.64033ZM11.805 2.69463C12.065 2.43466 12.065 2.01472 11.805 1.75476L10.2452 0.194973C9.98528 -0.064991 9.56534 -0.064991 9.30537 0.194973L8.08554 1.4148L10.5852 3.91446L11.805 2.69463Z",fill:"currentColor"})])],-1)])],4)],2),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[be.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-color-picker__overlay",onClick:e.withModifiers(Ke,["self"])},[e.createElementVNode("div",{ref_key:"dropdownRef",ref:xe,class:"dss-color-picker__dropdown",style:e.normalizeStyle(Ot.value)},[Q.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[Ue.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(D.presetGroups,(X,pe)=>(e.openBlock(),e.createElementBlock("div",{key:"g-"+pe,class:"dss-color-picker__section"},[e.createElementVNode("span",_m,e.toDisplayString(X.title),1),e.createElementVNode("div",$m,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(X.colors,(ye,Je)=>(e.openBlock(),e.createElementBlock("button",{key:"g-"+pe+"-"+Je,type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":ve(ye)}]),style:e.normalizeStyle({backgroundColor:ye,"--dss-preset-color":ye}),title:ye,onClick:e.withModifiers(Tt=>He(ye),["stop"])},null,14,Lm))),128))])]))),128)):ze.value.length?(e.openBlock(),e.createElementBlock("div",Tm,[W[1]||(W[1]=e.createElementVNode("span",{class:"dss-color-picker__section-title"},"Preset colors",-1)),e.createElementVNode("div",Am,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ze.value,(X,pe)=>(e.openBlock(),e.createElementBlock("button",{key:"p-"+pe,type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":ve(X)}]),style:e.normalizeStyle({backgroundColor:X,"--dss-preset-color":X}),title:X,onClick:e.withModifiers(ye=>He(X),["stop"])},null,14,Dm))),128))])])):e.createCommentVNode("",!0),qe.value?(e.openBlock(),e.createElementBlock("div",Hm,[e.createElementVNode("div",Rm,[W[3]||(W[3]=e.createElementVNode("span",{class:"dss-color-picker__section-title"},"Custom Colors",-1)),we.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-color-picker__manage-icon",{"dss-color-picker__manage-icon--active":G.value}]),title:"Manage custom colors",onClick:e.withModifiers(en,["stop"])},[...W[2]||(W[2]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M0 9.64V11.67c0 .19.15.33.33.33h2.03c.09 0 .17-.03.23-.1l7.28-7.27-2.5-2.5L.1 9.4A.33.33 0 0 0 0 9.64ZM11.8 2.69c.26-.26.26-.68 0-.94L10.25.2a.66.66 0 0 0-.94 0L8.09 1.41l2.5 2.5 1.22-1.22Z",fill:"currentColor"})],-1)])],2)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Fm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(we.value,(X,pe)=>(e.openBlock(),e.createElementBlock("div",{key:"c-"+pe,class:e.normalizeClass(["dss-color-picker__preset-wrap",{"dss-color-picker__preset-wrap--manage":G.value}])},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":!G.value&&ve(X),"dss-color-picker__preset-bubble--editing":G.value&&U.value===it(pe)}]),style:e.normalizeStyle({backgroundColor:U.value===it(pe)?De.value:X,"--dss-preset-color":U.value===it(pe)?De.value:X}),title:U.value===it(pe)?De.value:X,onClick:e.withModifiers(ye=>G.value?bt(it(pe)):He(X),["stop"])},null,14,Im),G.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-color-picker__preset-action dss-color-picker__preset-action--delete",title:"Delete",onClick:e.withModifiers(ye=>It(it(pe)),["stop"])},[...W[4]||(W[4]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M2 2l8 8M10 2L2 10",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})],-1)])],8,zm)):e.createCommentVNode("",!0)],2))),128)),Me.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-color-picker__add-bubble",{"dss-color-picker__add-bubble--active":Ce.value}]),onClick:e.withModifiers(oe,["stop"])}," + ",2)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)],64)):D.presetColors.length?(e.openBlock(),e.createElementBlock("div",Pm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.presetColors,(X,pe)=>(e.openBlock(),e.createElementBlock("button",{key:pe,type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":ve(X)}]),style:e.normalizeStyle({backgroundColor:X,"--dss-preset-color":X}),title:X,onClick:e.withModifiers(ye=>He(X),["stop"])},null,14,Om))),128)),qe.value&&Me.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-color-picker__add-bubble",{"dss-color-picker__add-bubble--active":Ce.value}]),onClick:e.withModifiers(oe,["stop"])}," + ",2)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),je.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",{class:"dss-color-picker__sl-area",ref_key:"slAreaRef",ref:Ae,onMousedown:Lt},[e.createElementVNode("div",{class:"dss-color-picker__sl-bg",style:e.normalizeStyle(yt.value)},null,4),e.createElementVNode("div",{class:"dss-color-picker__sl-pointer",style:e.normalizeStyle(Ut.value)},null,4)],544),e.createElementVNode("div",{class:"dss-color-picker__hue-wrap",onMousedown:Ge},[W[5]||(W[5]=e.createElementVNode("div",{class:"dss-color-picker__hue-track"},null,-1)),e.createElementVNode("div",{class:"dss-color-picker__hue-pointer",style:e.normalizeStyle(xt.value)},null,4)],32),e.createElementVNode("div",qm,[e.createElementVNode("input",{ref_key:"hexInputRef",ref:nt,type:"text",class:"dss-color-picker__hex-input",value:Zt.value,onInput:Dt},null,40,Wm)]),qe.value&&Q.value&&(D.presetColors.length||Ue.value)&&Me.value&&U.value<0?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-color-picker__add-btn",onClick:Fe}," Save color ")):e.createCommentVNode("",!0),qe.value&&Q.value&&U.value>=0?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"dss-color-picker__add-btn",onClick:Pt}," Save color ")):e.createCommentVNode("",!0),Q.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:"dss-color-picker__add-btn",onClick:Ke}," Save color "))],64)):e.createCommentVNode("",!0)],4)])):e.createCommentVNode("",!0)]))],2))}},Um={key:0,class:"dss-loader"},Xm={key:0,class:"dss-loader-label"},Ym={key:1,class:"dss-loader"},jm={key:0,class:"dss-loader-label"},Km={key:2,class:"dss-loader"},Gm={key:0,class:"dss-loader-label"},Qm={key:3,class:"dss-loader"},Jm={key:0,class:"dss-loader-label"},e2={key:4,class:"dss-loader"},t2={key:0,class:"dss-loader-label"},n2={key:5,class:"dss-loader dss-loader--inline"},l2={class:"dss-loader-inline-text"},o2={__name:"DSSLoaders",props:{type:{type:String,default:"spinner"},label:{type:String,default:""},size:{type:[String,Number],default:"medium"},color:{type:String,default:""}},setup(D){const le=D,M=e.computed(()=>le.size==="small"?"dss-loaders--size-small":le.size==="large"?"dss-loaders--size-large":le.size==="medium"||le.size==null?"dss-loaders--size-medium":null),L=e.computed(()=>{const de={};if(!(le.size==="small"||le.size==="medium"||le.size==="large"||le.size==null)){const I=typeof le.size=="number"?`${le.size}px`:String(le.size);de["--dss-loader-size"]=I}return le.color&&(de["--dss-loader-accent"]=le.color,de["--dss-loader-accent-soft"]=`color-mix(in srgb, ${le.color} 30%, white)`),de});return(de,I)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-loaders",M.value]),style:e.normalizeStyle(L.value)},[D.type==="spinner"?(e.openBlock(),e.createElementBlock("div",Um,[I[0]||(I[0]=e.createElementVNode("span",{class:"dss-loader-spinner","aria-hidden":"true"},null,-1)),D.label?(e.openBlock(),e.createElementBlock("span",Xm,e.toDisplayString(D.label),1)):e.createCommentVNode("",!0)])):D.type==="dots"?(e.openBlock(),e.createElementBlock("div",Ym,[I[1]||(I[1]=e.createElementVNode("span",{class:"dss-loader-dots","aria-hidden":"true"},[e.createElementVNode("span",{class:"dss-loader-dot"}),e.createElementVNode("span",{class:"dss-loader-dot"}),e.createElementVNode("span",{class:"dss-loader-dot"})],-1)),D.label?(e.openBlock(),e.createElementBlock("span",jm,e.toDisplayString(D.label),1)):e.createCommentVNode("",!0)])):D.type==="battery"?(e.openBlock(),e.createElementBlock("div",Km,[I[2]||(I[2]=e.createElementVNode("div",{class:"battery","aria-hidden":"true"},null,-1)),D.label?(e.openBlock(),e.createElementBlock("span",Gm,e.toDisplayString(D.label),1)):e.createCommentVNode("",!0)])):D.type==="double-circle"?(e.openBlock(),e.createElementBlock("div",Qm,[I[3]||(I[3]=e.createElementVNode("span",{class:"dss-loader-double-circle","aria-hidden":"true"},[e.createElementVNode("span",{class:"dss-loader-double-circle-outer"}),e.createElementVNode("span",{class:"dss-loader-double-circle-inner"})],-1)),D.label?(e.openBlock(),e.createElementBlock("span",Jm,e.toDisplayString(D.label),1)):e.createCommentVNode("",!0)])):D.type==="bars"?(e.openBlock(),e.createElementBlock("div",e2,[I[4]||(I[4]=e.createElementVNode("span",{class:"dss-loader-bars","aria-hidden":"true"},[e.createElementVNode("span",{class:"dss-loader-bar"}),e.createElementVNode("span",{class:"dss-loader-bar"}),e.createElementVNode("span",{class:"dss-loader-bar"})],-1)),D.label?(e.openBlock(),e.createElementBlock("span",t2,e.toDisplayString(D.label),1)):e.createCommentVNode("",!0)])):D.type==="inline"?(e.openBlock(),e.createElementBlock("div",n2,[I[5]||(I[5]=e.createElementVNode("span",{class:"dss-loader-inline-spinner","aria-hidden":"true"},null,-1)),e.createElementVNode("span",l2,[e.renderSlot(de.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(D.label),1)])])])):e.createCommentVNode("",!0)],6))}},ca="dss-skeleton-item",a2={__name:"DSSSkeleton",props:{loading:{type:Boolean,default:!1},darkMode:{type:Boolean,default:!1},borderRadius:{type:String,default:"16px"},shimmer:{type:Boolean,default:!0},mode:{type:String,default:"single",validator:D=>["single","multiple"].includes(D)},targetClass:{type:String,default:ca},bgColor:{type:String,default:null},shimmerColor:{type:String,default:null},bgDark:{type:String,default:null},shimmerDark:{type:String,default:null}},setup(D){const le=D,M=e.computed(()=>{const I={"dss-skeleton--loading":le.loading,"dss-skeleton--static":!le.shimmer,"dss-skeleton--multiple":le.mode==="multiple","dss-skeleton--dark":le.darkMode};return le.mode==="multiple"&&le.targetClass!==ca&&(I[`dss-skeleton--target-${le.targetClass}`]=!0),I}),L=e.computed(()=>{const I={};return le.borderRadius&&(I.borderRadius=le.borderRadius),I}),de=e.computed(()=>{const I={};return le.borderRadius&&(I["--dss-skeleton-border-radius"]=le.borderRadius),le.darkMode?(I["--dss-skeleton-bg"]=le.bgDark||"#322c3f",I["--dss-skeleton-shimmer"]=le.shimmerDark||"#3e3f41",I):(le.bgColor&&(I["--dss-skeleton-bg"]=le.bgColor),le.shimmerColor&&(I["--dss-skeleton-shimmer"]=le.shimmerColor),I)});return(I,T)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-skeleton",M.value]),style:e.normalizeStyle(de.value)},[D.loading&&D.mode==="single"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-skeleton-overlay",style:e.normalizeStyle(L.value),"aria-hidden":"true"},null,4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["dss-skeleton-content",{"dss-skeleton-content--hidden":D.loading&&D.mode==="single"}])},[e.renderSlot(I.$slots,"default")],2)],6))}},s2={key:0,class:"dss-dnd-column-header"},r2={class:"dss-dnd-column-title"},i2={class:"dss-dnd-column-count"},c2=["data-column"],u2={key:0,class:"dss-dnd-indicator"},d2=["onPointerdown"],m2=["onPointerdown"],p2={class:"dss-dnd-item-content"},f2={class:"dss-dnd-item-default"},v2={key:0,class:"dss-dnd-empty"},g2={name:"DSSDnd"},h2=Object.assign(g2,{props:{items:{type:Array,required:!0},columns:{type:Array,required:!0},columnKey:{type:String,default:"status"},positionKey:{type:String,default:"position"},itemKey:{type:String,default:"id"},options:{type:Object,default:()=>({})}},emits:["move","delete"],setup(D,{emit:le}){const M=D,L=le,de=e.useSlots(),I=e.computed(()=>!!de["delete-zone"]),T={columnMinWidth:"280px",columnMaxWidth:"none",columnGap:"12px",indicatorColor:"#7c6bc4",dragGhostOpacity:.75,dragSourceBackground:"#f5f5f5",dragSourceBorder:"#e0e0e0",useHandle:!1,columnBodyMaxHeight:"none",showHeader:!0,unstyled:!1,deleteZoneAlwaysVisible:!1,ColColor:!1},fe=e.computed(()=>({...T,...M.options})),dt=e.computed(()=>({"--dss-dnd-col-min-w":fe.value.columnMinWidth,"--dss-dnd-col-max-w":fe.value.columnMaxWidth,"--dss-dnd-col-gap":fe.value.columnGap,"--dss-dnd-indicator-color":fe.value.indicatorColor,"--dss-dnd-body-max-h":fe.value.columnBodyMaxHeight}));function ee(J){if(!fe.value.ColColor||!J)return{};const he=J.background||J.color;return he?{background:he}:{}}const f=e.ref(null),be=e.ref(null),Ce=e.ref(!1),G=e.ref(-1),U=e.ref(null);let me=null,R=null,xe=null,Ae=null,nt=0,ft=0,Z="",Ue=null;const qe=5,Ee=e.computed(()=>{const J={};for(const he of M.columns)J[he.value]=M.items.filter(Be=>Be[M.columnKey]===he.value).sort((Be,Xe)=>(Be[M.positionKey]??0)-(Xe[M.positionKey]??0));return J}),Me=e.computed(()=>{const J={},he=!!f.value,Be=f.value?.[M.itemKey],Xe=be.value,Ke=G.value;for(const Lt of M.columns){const Ge=Ee.value[Lt.value]||[],Dt=[],He=Xe==Lt.value;let Pe=0;for(let Et=0;Et<Ge.length;Et++){const St=Ge[Et],K=he&&St[M.itemKey]===Be;!K&&He&&Ke===Pe&&Dt.push({type:"indicator",key:`ind-${Pe}`}),K||Pe++,Dt.push({type:"item",item:St,isDragged:K,key:`item-${St[M.itemKey]}`})}He&&Ke>=Pe&&Dt.push({type:"indicator",key:"ind-end"}),J[Lt.value]=Dt}return J});function je(J,he){const Xe=(Ee.value[J]||[]).filter(Ge=>Ge[M.itemKey]!==f.value?.[M.itemKey]);if(Xe.length===0)return 1;if(he<=0){const Ge=Xe[0][M.positionKey];return Ge!=null&&Ge>0?Ge/2:.5}if(he>=Xe.length){const Ge=Xe[Xe.length-1][M.positionKey];return(Ge??0)+1}const Ke=Xe[he-1][M.positionKey]??0,Lt=Xe[he][M.positionKey]??0;return(Ke+Lt)/2}function Q(J,he,Be){xe&&xe.remove();const Xe=J.getBoundingClientRect(),Ke=J.cloneNode(!0);Ke.classList.add("dss-dnd-ghost"),Ke.style.cssText=`
|
|
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
|
+
`||/[.,;:!?]/.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!==`
|
|
102
|
+
`){const R=document.createTextNode(" ");n.insertNode(R),n.setStartAfter(R)}}n.insertNode(d);const v=document.createTextNode(" ");n.setStartAfter(d),n.insertNode(v),n.setStartAfter(v),n.collapse(!0),o.removeAllRanges(),o.addRange(n)}}}else{if(r&&n.startOffset>0){const m=s.textContent.substring(0,n.startOffset),v=m[m.length-1];if(v&&v!==" "&&v!==" "&&v!==`
|
|
103
|
+
`){const k=document.createTextNode(" ");n.insertNode(k),n.setStartAfter(k)}}n.insertNode(d);const u=document.createTextNode(" ");n.setStartAfter(d),n.insertNode(u),n.setStartAfter(u),n.collapse(!0),o.removeAllRanges(),o.addRange(n)}}de()}e.nextTick(()=>{pl(),Un()})},Gn=()=>{if(!f.value||G.value)return;const o=window.getSelection();let n=null;o&&o.rangeCount>0&&(n=Qt());const s=/(https?:\/\/[^\s<>"{}|\\^`\[\]]+[^\s<>"{}|\\^`\[\].,;:!?])|(www\.[^\s<>"{}|\\^`\[\]]+[^\s<>"{}|\\^`\[\].,;:!?])|([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.([a-zA-Z]{2,})(\/[^\s<>"{}|\\^`\[\]]*)?)/gi,r=document.createTreeWalker(f.value,NodeFilter.SHOW_TEXT,{acceptNode:m=>{const v=m.parentElement;return!v||v.closest("a")||v.closest(".dss-image-wrapper")||!m.textContent||m.textContent.trim()===""?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),c=[];let d;for(;d=r.nextNode();)c.push(d);let u=!1;for(let m=c.length-1;m>=0;m--){const v=c[m],k=v.textContent;s.lastIndex=0;const L=[...k.matchAll(s)];if(L.length===0)continue;const R=L.filter(j=>{const Ie=j[0],Ve=j.index;if(Ve>0&&k[Ve-1]==="@"||Ve+Ie.length<k.length&&k[Ve+Ie.length]==="@")return!1;const nt=v.parentElement;return!(nt&&nt.closest("a"))});if(R.length===0)continue;if(R.length===1&&R[0][0]===k.trim()){const j=R[0][0],Ie=j.startsWith("http://")||j.startsWith("https://")?j:`https://${j}`,Ve=document.createElement("a");Ve.href=Ie,Ve.textContent=j,Ve.style.color="#60afdf",Ve.style.textDecoration="underline",v.parentNode&&(v.parentNode.replaceChild(Ve,v),u=!0);continue}let E=0;const ae=document.createDocumentFragment();if(R.forEach(j=>{const Ie=j.index,Ve=j[0];if(Ie>E){const fl=k.substring(E,Ie);fl&&ae.appendChild(document.createTextNode(fl))}const nt=Ve.startsWith("http://")||Ve.startsWith("https://")?Ve:`https://${Ve}`,bl=document.createElement("a");bl.href=nt,bl.textContent=Ve,bl.style.color="#60afdf",bl.style.textDecoration="underline",ae.appendChild(bl),E=Ie+Ve.length}),E<k.length){const j=k.substring(E);j&&ae.appendChild(document.createTextNode(j))}v.parentNode&&ae.childNodes.length>0&&(v.parentNode.replaceChild(ae,v),u=!0)}u&&n&&e.nextTick(()=>{ol(n),pl()})},Bo=()=>{if(!f.value)return;const o=/<u>([\s\S]*?)<\/u>|<ins>([\s\S]*?)<\/ins>/gi,n=document.createTreeWalker(f.value,NodeFilter.SHOW_TEXT,{acceptNode:c=>{const d=c.parentElement;return!d||d.closest("a, code, pre, u, ins")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),s=[];let r;for(;r=n.nextNode();)s.push(r);for(let c=s.length-1;c>=0;c--){const d=s[c],u=d.textContent,m=[...u.matchAll(o)];if(m.length===0)continue;let v=0;const k=document.createDocumentFragment();m.forEach(L=>{const R=L.index,E=L[0].startsWith("<u>")?"u":"ins",ae=L[1]||L[2]||"";R>v&&k.appendChild(document.createTextNode(u.substring(v,R)));const j=document.createElement(E);j.textContent=ae,k.appendChild(j),v=R+L[0].length}),v<u.length&&k.appendChild(document.createTextNode(u.substring(v))),d.parentNode&&k.childNodes.length>0&&d.parentNode.replaceChild(k,d)}},Mo=o=>{if(!f.value||G.value)return;if(!o){Bo();return}if(!["*","_",">"].includes(o))return;const s=window.getSelection();if(!s||s.rangeCount===0)return;const r=s.getRangeAt(0);if(!r.collapsed)return;const c=r.startContainer.nodeType===Node.TEXT_NODE?r.startContainer.parentElement?.closest("p, h1, h2, h3, h4, h5, h6, li, td, th, blockquote, div"):r.startContainer.closest?.("p, h1, h2, h3, h4, h5, h6, li, td, th, blockquote, div");if(!c||c===f.value||!f.value.contains(c))return;const d=()=>{let fl="",sl=0,vl=!1;const cl=document.createTreeWalker(c,NodeFilter.SHOW_TEXT,{acceptNode:Xl=>Xl.parentElement?.closest("a, code, pre")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});document.createTreeWalker(c,NodeFilter.SHOW_TEXT,null);let ul=0;for(;cl.nextNode();){const Xl=cl.currentNode,pn=Xl.textContent||"",bn=ul;if(ul+=pn.length,Xl===r.startContainer){fl+=pn.substring(0,r.startOffset),sl=bn+r.startOffset,vl=!0;break}fl+=pn}return vl||(sl=fl.length),{textBeforeCursor:fl,cursorCharOffset:sl}},{textBeforeCursor:u}=d();if(!u.length)return;let m=null,v=null;if(u.endsWith("**")&&(m=u.match(/\*\*(.+?)\*\*$/s))||u.endsWith("__")&&(m=u.match(/__(.+?)__$/s))?v="strong":u.endsWith("*")&&!u.endsWith("**")&&(m=u.match(new RegExp("(?<!\\*)\\*([^*]+)\\*$")))||u.endsWith("_")&&!u.endsWith("__")&&(m=u.match(new RegExp("(?<!_)_([^_]+)_$")))?v="em":o===">"&&((m=u.match(/<u>(.+?)<\/u>$/s))||(m=u.match(/<ins>(.+?)<\/ins>$/s)))&&(v=m[0].startsWith("<u>")?"u":"ins",m[0].startsWith("<u>"),m[0].startsWith("<u>")),!m||!m[1])return;const k=m[0],L=m[1],R=u.length-k.length,ae=(fl=>{let sl=0;const vl=document.createTreeWalker(c,NodeFilter.SHOW_TEXT,{acceptNode:ul=>ul.parentElement?.closest("a, code, pre")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});let cl;for(;cl=vl.nextNode();){const ul=(cl.textContent||"").length;if(sl+ul>=fl)return{node:cl,offset:fl-sl};sl+=ul}return null})(R);if(!ae)return;const j=document.createRange();j.setStart(ae.node,ae.offset),j.setEnd(r.endContainer,r.endOffset);const Ie=document.createElement(v);Ie.textContent=L,j.deleteContents(),j.insertNode(Ie);const Ve=window.getSelection(),nt=document.createRange();nt.setStartAfter(Ie),nt.collapse(!0),Ve.removeAllRanges(),Ve.addRange(nt);const bl=Qt();e.nextTick(()=>{de(),bl&&ol(bl)})},po=()=>{f.value&&(Gt.value=Qt(),Et.value="",Pt.value="",Ue.value="",se.value="",ge.value="",Ht.value=null,bt.value=null,Be.value="upload",Ct.value=!0,il(),e.nextTick(()=>{He.value&&He.value.focus(),_e.value&&(_e.value.value="")}))},tn=o=>{const n=o.target?.files?.[0];if(!n){Ht.value=null,Pt.value="";return}Ht.value=n;const s=new FileReader;s.onload=r=>{Pt.value=r.target?.result||""},s.readAsDataURL(n)},ln=()=>{_e.value&&_e.value.click()},Qn=()=>{se.value&&(ge.value="")},fo=()=>{ge.value&&(se.value="")},_o=()=>{let o=bt.value;if(!o){const n=window.getSelection();if(n&&n.rangeCount>0){const r=n.getRangeAt(0).commonAncestorContainer;o=r.nodeType===1?r.closest("img"):r.parentElement?.closest("img")}}if(o){const n=o.getAttribute("data-alt")||o.getAttribute("alt")||"";bt.value=o,Et.value=n.trim()===""||n.trim()==="Image"?"":n;const s=o.getAttribute("src")||o.src||"";s.startsWith("http://")||s.startsWith("https://")?(Ue.value=s,Pt.value="",Be.value="url"):(Pt.value=s,Ue.value="",Be.value="upload");const c=o.style.width||o.getAttribute("width")||"",d=o.style.height||o.getAttribute("height")||"";se.value=c.endsWith("px")?c.replace("px",""):c,ge.value=d.endsWith("px")?d.replace("px",""):d,Gt.value=null}else{po();return}Ct.value=!0,ye.value=!1,Lt.value=!1,e.nextTick(()=>{Be.value==="url"&&Xt.value?(Xt.value.focus(),Xt.value.select()):He.value&&(He.value.focus(),He.value.select()),_e.value&&(_e.value.value="")})},Dn=()=>{Ct.value=!1,Et.value="",Pt.value="",Ue.value="",se.value="",ge.value="",Ht.value=null,bt.value=null,Gt.value=null,Be.value="upload"},Rl=()=>{const o=(Et.value||"").trim(),n=f.value?._mutationObserver;n&&n.disconnect(),Fe.value?(We.value&&(clearTimeout(We.value),We.value=null),at(),Fe.value=!1):at();const s=Be.value==="url"?Ue.value.trim():Pt.value;if(bt.value&&f.value&&f.value.contains(bt.value)){s&&(bt.value.src=s),bt.value.setAttribute("alt",o),bt.value.setAttribute("data-alt",o),se.value?(bt.value.style.width=`${se.value}px`,bt.value.setAttribute("width",se.value)):(bt.value.style.removeProperty("width"),bt.value.removeAttribute("width")),ge.value?(bt.value.style.height=`${ge.value}px`,bt.value.setAttribute("height",ge.value)):(bt.value.style.removeProperty("height"),bt.value.removeAttribute("height"));const r=window.getSelection();if(r){r.removeAllRanges();const c=document.createRange();c.setStartAfter(bt.value),c.collapse(!0),r.addRange(c)}de()}else{if(!s){n&&f.value&&n.observe(f.value,{childList:!0,subtree:!0}),Dn();return}if(f.value){f.value.focus();const r=window.getSelection();r&&r.rangeCount>0&&r.removeAllRanges();const c=window.getSelection();let d=null;if(Gt.value&&(ol(Gt.value),c&&c.rangeCount>0&&(d=c.getRangeAt(0))),!d&&c&&c.rangeCount>0&&(d=c.getRangeAt(0)),!d&&f.value){if(d=document.createRange(),f.value.childNodes.length===0){const k=document.createElement("p");k.innerHTML="<br>",f.value.appendChild(k),d.setStart(k,0),d.collapse(!0)}else d.selectNodeContents(f.value),d.collapse(!1);c&&(c.removeAllRanges(),c.addRange(d))}if(!d){Dn();return}const u=d.commonAncestorContainer,m=u.nodeType===3?u.parentElement:u;if(!f.value.contains(m)){if(d=document.createRange(),f.value.childNodes.length===0){const k=document.createElement("p");k.innerHTML="<br>",f.value.appendChild(k),d.setStart(k,0),d.collapse(!0)}else d.selectNodeContents(f.value),d.collapse(!1);c&&(c.removeAllRanges(),c.addRange(d))}const v=document.createElement("img");v.src=s,v.setAttribute("alt",o),v.setAttribute("data-alt",o),se.value&&(v.style.width=`${se.value}px`,v.setAttribute("width",se.value)),ge.value&&(v.style.height=`${ge.value}px`,v.setAttribute("height",ge.value));try{d.insertNode(v),d.setStartAfter(v),d.collapse(!0),c&&(c.removeAllRanges(),c.addRange(d))}catch{if(f.value){if(f.value.childNodes.length===0){const R=document.createElement("p");f.value.appendChild(R),R.appendChild(v)}else{const R=f.value.lastChild;if(R&&R.nodeType===1)R.appendChild(v);else{const E=document.createElement("p");f.value.appendChild(E),E.appendChild(v)}}const L=document.createRange();L.setStartAfter(v),L.collapse(!0),c&&(c.removeAllRanges(),c.addRange(L))}}bt.value=v,de()}}e.nextTick(()=>{n&&f.value&&n.observe(f.value,{childList:!0,subtree:!0}),pl(),tl(),Dn()})};e.watch(()=>$.modelValue,o=>{if($.richText&&f.value&&!G.value){const n=O(o||""),r=f.value.innerHTML.replace(/ |\u00A0/g," "),c=n.replace(/ |\u00A0/g," ");if(r!==c){const d=Qt();f.value.innerHTML=n,e.nextTick(()=>{kt();const u=f.value.innerHTML||"",m=$.title||"",v=$.description||"";xt.value=u,J.value=m,Z.value=v,ft.value=u,X.value=m,re.value=v,et.value=[],Ot.value=[],We.value&&(clearTimeout(We.value),We.value=null),Fe.value=!1,d&&ol(d),Ml(),ml(),Ae(),pl(),tl(),wt(),wl("watch-modelValue")})}}},{immediate:!0}),e.watch(()=>$.richText,o=>{o?(tl(),e.nextTick(()=>{ho()})):(qn(),le.value=[],ze.value&&(ze.value.disconnect(),ze.value=null)),wt()}),e.watch(()=>$.floatingToolbar,o=>{o?tl():qn()}),e.watch(()=>$.disabled,o=>{o&&qn(),wt()}),e.watch(()=>$.description,()=>{e.nextTick(()=>{S.value?Nl():Jl()})}),e.watch(()=>$.title,()=>{e.nextTick(()=>{ll.value?Qe():nl()})}),e.watch(()=>$.customToolbarSlots,()=>{e.nextTick(()=>{Jt()})},{deep:!0}),e.watch(()=>$.comments,(o,n)=>{if(mt.value){mt.value=!1;return}Rt.value||$.richText&&f.value&&e.nextTick(()=>{Vl()})},{deep:!0,immediate:!1});const Vl=()=>{if(!Rt.value&&!(!$.comments||!Array.isArray($.comments)||$.comments.length===0)&&!(!$.richText||!f.value)){Rt.value=!0;try{const o=new Set,n=$.comments.filter(u=>{const m=String(u.conversation_id||u.id);return o.has(m)?!1:(o.add(m),!0)}),s=f.value.querySelectorAll("[data-comment], [data-fake-comment]"),r=s.length;s.forEach(u=>{const m=u.parentNode;if(m){for(;u.firstChild;)m.insertBefore(u.firstChild,u);m.removeChild(u)}});let c=0;const d=new Set;n.forEach(u=>{if(!u.conversation_id||!u.selection_range)return;const m=typeof u.conversation_id=="string"&&u.conversation_id.startsWith("comment-")?null:Number(u.conversation_id)||u.conversation_id;if(!m)return;const v=String(m);if(d.has(v))return;const k=f.value.querySelector(`[data-comment="${v}"]`);if(k){Kt(k,u),d.add(v);return}try{const L=Yo(u.selection_range,u.selection_text);if(L&&!L.collapsed){const R=L.commonAncestorContainer,E=R.nodeType===3?R.parentElement:R;if(E){const Ie=E.closest("[data-comment], [data-fake-comment]");if(Ie){const Ve=Ie.getAttribute("data-comment")||Ie.getAttribute("data-fake-comment");if(String(Ve)===String(m)){Ie.setAttribute("data-comment",v),Ie.removeAttribute("data-fake-comment"),Kt(Ie,u),d.add(v);return}else return}}const ae=f.value.querySelector(`[data-comment="${v}"]`);if(ae){Kt(ae,u),d.add(v);return}const j=document.createElement("span");j.setAttribute("data-comment",v),Kt(j,u);try{L.surroundContents(j),c++,d.add(v)}catch{try{const Ve=document.createRange();Ve.setStart(L.startContainer,L.startOffset),Ve.setEnd(L.endContainer,L.endOffset),vo(Ve),Ve.surroundContents(j),c++,d.add(v)}catch{try{const nt=L.extractContents();j.appendChild(nt),L.insertNode(j),c++,d.add(v)}catch(nt){console.warn("Failed to create comment marker:",nt)}}}}}catch{}}),e.nextTick(()=>{wl("restoreCommentsFromModel"),de(),Rt.value=!1})}catch{Rt.value=!1}}},vo=o=>{if(!o||!f.value)return o;try{const n=["P","DIV","H1","H2","H3","H4","H5","H6","LI","BLOCKQUOTE","PRE"];let s=o.startContainer,r=o.startOffset;if(s.nodeType===3){const u=s.parentElement;u&&n.includes(u.tagName)&&(r===0&&!Ut(s)||o.setStartBefore(u))}else s.nodeType===1&&n.includes(s.tagName)&&r>0&&o.setStartBefore(s);let c=o.endContainer,d=o.endOffset;if(c.nodeType===3){const u=c.parentElement;u&&n.includes(u.tagName)&&(d===c.length&&!$o(c)||o.setEndAfter(u))}else c.nodeType===1&&n.includes(c.tagName)&&d<c.childNodes.length&&o.setEndAfter(c);return o}catch{return o}},Ut=o=>{let n=o.previousSibling;for(;n;){if(n.nodeType===3&&n.textContent.trim().length>0||n.nodeType===1&&n.textContent.trim().length>0)return!0;n=n.previousSibling}return!1},$o=o=>{let n=o.nextSibling;for(;n;){if(n.nodeType===3&&n.textContent.trim().length>0||n.nodeType===1&&n.textContent.trim().length>0)return!0;n=n.nextSibling}return!1},Yo=(o,n)=>{if(!o||!f.value)return null;try{const s=document.createRange();if(o.type==="text"&&typeof o.start=="number"&&typeof o.end=="number"){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])}return u?vo(s):null}}catch{return null}return null},Kt=(o,n)=>{if(!o||!n)return;const s=n.conversation||[],r=new Set,c=[],d=m=>{m&&m.id&&!r.has(m.id)&&(r.add(m.id),c.push(m))};s.length>0&&s.forEach(m=>{m.user&&d(m.user)}),c.length>0?o.setAttribute("data-comment-user",JSON.stringify(c[0])):o.removeAttribute("data-comment-user"),c.length>1?o.setAttribute("data-comment-user-2",JSON.stringify(c[1])):o.removeAttribute("data-comment-user-2");const u=s.length;u>0?o.setAttribute("data-comment-count",String(u)):o.removeAttribute("data-comment-count")},wl=(o="unknown")=>{if(!$.richText||!f.value){le.value=[];return}Date.now()-Bt.value<Vt&>.value!==null||gt.value===null&&(gt.value=requestAnimationFrame(()=>{if(gt.value=null,Bt.value=Date.now(),Oe.value)return;Oe.value=!0;const s={},r=f.value;if(!r){Oe.value=!1;return}const c=r.closest(".editor-with-comments");if(!c){Oe.value=!1;return}const d=r.querySelectorAll("[data-comment], [data-fake-comment]"),u=[],m=new Set;d.forEach(E=>{const ae=E.getAttribute("data-comment")||E.getAttribute("data-fake-comment");ae&&E.tagName==="SPAN"&&(m.has(ae)||(u.push(E),m.add(ae)))}),d.forEach(E=>{const ae=E.getAttribute("data-comment")||E.getAttribute("data-fake-comment");!ae||m.has(ae)||(["P","DIV","H1","H2","H3","H4","H5","H6"].includes(E.tagName)?E.querySelector(`span[data-comment="${ae}"], span[data-fake-comment="${ae}"]`)||(u.push(E),m.add(ae)):E.tagName!=="SPAN"&&(u.push(E),m.add(ae)))});const v=c.getBoundingClientRect(),k=r.getBoundingClientRect();u.forEach((E,ae)=>{let j=E.getAttribute("data-comment")||E.getAttribute("data-fake-comment");if(!j)return;if(typeof j=="string"&&j.startsWith("comment-")){const fn=E.textContent?.trim(),nn=$.comments?.find(Yl=>(typeof Yl.conversation_id=="string"&&Yl.conversation_id.startsWith("comment-")?null:Yl.conversation_id)&&Yl.selection_text?.trim()===fn);nn?(j=String(nn.conversation_id),E.setAttribute("data-comment",j),E.removeAttribute("data-fake-comment")):(j=String(Date.now()),E.setAttribute("data-comment",j),E.removeAttribute("data-fake-comment"))}const Ie=E.getBoundingClientRect(),Ve=window.getComputedStyle(E),nt=parseFloat(Ve.lineHeight)||parseFloat(Ve.fontSize)*1.2,sl=Ie.top-k.top+nt/2-15,cl=k.top-v.top+sl;let ul=null,Xl=null,pn=0;const bn=[],yo=new Set;if(j&&$.comments){const fn=$.comments.find(nn=>String(nn.conversation_id||nn.id)===String(j));if(fn){const nn=fn.conversation||[];nn.length>0?(nn.forEach(Yl=>{Yl.user&&Yl.user.id&&!yo.has(Yl.user.id)&&(yo.add(Yl.user.id),bn.push(Yl.user))}),pn=nn.length):(pn=0,ul=null,Xl=null),bn.length>0?ul=bn[0]:ul=null,bn.length>1?Xl=bn[1]:Xl=null}}const To=Ie.top+nt/2-15,jo=To+30,Mn=5,ko=jo>k.top+Mn&&To<k.bottom-Mn?1:0;le.value.find(fn=>fn.id===j);let Jn=E;if(!Jn&&j&&f.value){const fn=String(j);Jn=f.value.querySelector(`[data-comment="${fn}"], [data-fake-comment="${fn}"]`)}const Do=bn.length;s[j]?(s[j].top=cl,s[j].opacity=ko,s[j].element=Jn,s[j].firstUser=ul,s[j].secondUser=Xl,s[j].totalCount=pn,s[j].uniqueUserCount=Do):s[j]={id:j,top:cl,opacity:ko,element:Jn,firstUser:ul,secondUser:Xl,totalCount:pn,uniqueUserCount:Do}});const L=Object.values(s).map(E=>{const ae=Math.max(0,(E.uniqueUserCount??0)-2);if(!E.element&&E.id&&f.value){const Ie=String(E.id);E.element=f.value.querySelector(`[data-comment="${Ie}"], [data-fake-comment="${Ie}"]`)}return{...E,firstUser:E.firstUser||null,secondUser:E.secondUser||null,totalCount:E.totalCount,additionalCount:ae}});(le.value.length!==L.length||L.some((E,ae)=>{const j=le.value[ae];if(!j)return!0;const Ie=(j.firstUser?.id||null)!==(E.firstUser?.id||null),Ve=(j.secondUser?.id||null)!==(E.secondUser?.id||null);return j.id!==E.id||Math.abs(j.top-E.top)>1||j.opacity!==E.opacity||j.totalCount!==E.totalCount||j.additionalCount!==E.additionalCount||Ie||Ve||j.element!==E.element}))&&(le.value=L),Oe.value=!1}))},Lo=o=>{if(!o)return;let n=o.element;if(!n&&o.id&&f.value){const s=String(o.id);n=f.value.querySelector(`[data-comment="${s}"], [data-fake-comment="${s}"]`)}n&&(xl(),Zl.value=n,n.classList.add("editor-comment-highlighted"))},xl=(o=!1)=>{!o&&At.value!==null&&Zl.value&&(Zl.value.getAttribute("data-comment")||Zl.value.getAttribute("data-fake-comment"))===At.value||(f.value&&f.value.querySelectorAll(".editor-comment-highlighted").forEach(s=>{s.classList.remove("editor-comment-highlighted")}),Zl.value&&(Zl.value.classList.remove("editor-comment-highlighted"),Zl.value=null))},go=o=>{if(!o||!o.element)return;xl(!0);const n=o.element.getAttribute("data-comment")||o.element.getAttribute("data-fake-comment");if(!n)return;const s=`[data-comment="${n}"], [data-fake-comment="${n}"]`;ve("comment-marker-clicked",{commentId:n,selector:s,element:o.element})},Hn=()=>{xl()},ho=()=>{!$.richText||!f.value||(ze.value&&ze.value.disconnect(),ht.value!==null&&(clearTimeout(ht.value),ht.value=null),ze.value=new MutationObserver(()=>{ht.value===null&&(ht.value=setTimeout(()=>{ht.value=null,e.nextTick(()=>{wl("MutationObserver")})},200))}),ze.value.observe(f.value,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-comment","data-fake-comment","data-comment-user","data-comment-user-2","data-comment-count"]}),wl("setupCommentMarkersObserver-initial"))},Ao=(o,n)=>{if(!o||!n)return;const s=n.getBoundingClientRect();let r=s.top,c=s.right+4;o.style.top=`${r}px`,o.style.left=`${c}px`,o.offsetHeight;const d=o.getBoundingClientRect(),u=window.innerWidth,m=window.innerHeight;if(d.right>u){const v=s.left-d.width-4;o.style.left=`${v}px`}if(d.bottom>m){const v=Math.max(8,m-d.height-8);o.style.top=`${v}px`}d.top<0&&(o.style.top="8px")};return e.watch(()=>Ke.value,o=>{e.nextTick(()=>{document.querySelectorAll(".dss-toolbar-dropdown-submenu").forEach(s=>{const r=s.getAttribute("data-submenu-id");if(r===o&&o){const c=document.querySelector(`.dss-toolbar-dropdown-item-has-submenu[data-submenu-id="${r}"]`);if(c){if(s.parentNode!==document.body){const d=s.parentNode;s.dataset.originalParentRef=d===c?"inside":"sibling",document.body.appendChild(s)}s.style.display="block",s.style.visibility="hidden",s.style.opacity="0",requestAnimationFrame(()=>{requestAnimationFrame(()=>{Ao(s,c),s.offsetHeight,s.setAttribute("data-active","true"),s.style.visibility="visible",s.style.opacity="1"})})}else s.setAttribute("data-active","true")}else s.setAttribute("data-active","false"),s.style.display="none",s.style.top="",s.style.left="",s.style.visibility="",s.style.opacity=""})})}),e.watch(()=>[we.value,ut.value],()=>{we.value==="askAi"||ut.value==="askAi"?e.nextTick(()=>{Cl()}):(Ke.value=null,e.nextTick(()=>{document.querySelectorAll(".dss-toolbar-dropdown-submenu").forEach(n=>{if(n.parentNode===document.body){const s=n.getAttribute("data-submenu-id");if(s){const r=document.querySelector(`.dss-toolbar-dropdown-item-has-submenu[data-submenu-id="${s}"]`);if(r)if(n.dataset.originalParentRef==="inside")r.appendChild(n);else{const d=r.closest(".dss-toolbar-dropdown");d&&d.insertBefore(n,r.nextSibling)}}}})}))}),e.watch(()=>$.locale,o=>{o&&o!==ue.value&&(ue.value=o)},{immediate:!0}),ne({openCommentOverlayForSelector:So,updateCommentMarkers:wl,restoreCommentsFromModel:Vl}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-text-editor-container editor-with-comments",yt.value]),style:e.normalizeStyle(Mt.value)},[H.richText?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-text-editor-toolbar",onMousedown:n[14]||(n[14]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",Fu,[e.createElementVNode("div",{class:"dss-toolbar-button",onClick:vt,title:e.unref(A)("textEditor.toolbar.undo")},[...n[45]||(n[45]=[e.createElementVNode("svg",{viewBox:"0 0 18 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M9.23302 0.888889C6.90278 0.888889 4.79238 1.76889 3.16561 3.2L0 0V8H7.91402L4.73083 4.78222C5.9531 3.75111 7.50953 3.11111 9.23302 3.11111C12.3459 3.11111 14.9927 5.16444 15.916 8L18 7.30667C16.7777 3.58222 13.3219 0.888889 9.23302 0.888889Z",fill:"#323232"})],-1)])],8,Iu),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-disabled":!Al.value}]),onClick:oe,title:e.unref(A)("textEditor.toolbar.redo")},[...n[46]||(n[46]=[e.createElementVNode("svg",{viewBox:"0 0 18 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M14.8328 3.2C13.2053 1.76889 11.0938 0.888889 8.76246 0.888889C4.67155 0.888889 1.21408 3.58222 0 7.30667L2.07625 8C3 5.16444 5.6393 3.11111 8.76246 3.11111C10.478 3.11111 12.044 3.75111 13.2669 4.78222L10.0821 8H18V0L14.8328 3.2Z",fill:"#323232"})],-1)])],10,zu),n[61]||(n[61]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",Pu,[e.createElementVNode("div",{class:"dss-toolbar-button dss-toolbar-dropdown-toggle",onClick:n[0]||(n[0]=s=>Il("paragraph")),title:e.unref(A)("textEditor.toolbar.paragraphFormat")},[V.value==="h1"?(e.openBlock(),e.createElementBlock("img",{key:0,src:I.h1,alt:"H1",class:"dss-toolbar-heading-icon"},null,8,qu)):V.value==="h2"?(e.openBlock(),e.createElementBlock("img",{key:1,src:I.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,Wu)):V.value==="h3"?(e.openBlock(),e.createElementBlock("img",{key:2,src:I.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,Zu)):V.value==="h4"?(e.openBlock(),e.createElementBlock("img",{key:3,src:I.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,Uu)):V.value==="h5"?(e.openBlock(),e.createElementBlock("img",{key:4,src:I.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,Xu)):V.value==="h6"?(e.openBlock(),e.createElementBlock("img",{key:5,src:I.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,Yu)):(e.openBlock(),e.createElementBlock("svg",ju,[...n[47]||(n[47]=[e.createElementVNode("path",{d:"M4.33333 8.61539V14H6.5V2.15385H8.66667V14H10.8333V2.15385H13V0H4.33333C1.93917 0 0 1.92769 0 4.30769C0 6.68769 1.93917 8.61539 4.33333 8.61539Z",fill:"#323232"},null,-1)])])),n[48]||(n[48]=e.createElementVNode("span",{class:"dss-toolbar-dropdown-arrow"},"˅",-1))],8,Ou),we.value==="paragraph"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-dropdown",onClick:n[8]||(n[8]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[1]||(n[1]=s=>zl("<h1>"))},[e.createElementVNode("img",{src:I.h1,alt:"H1",class:"dss-toolbar-heading-icon"},null,8,Ku),e.createElementVNode("h1",null,e.toDisplayString(e.unref(A)("textEditor.paragraph.heading1")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[2]||(n[2]=s=>zl("<h2>"))},[e.createElementVNode("img",{src:I.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,Gu),e.createElementVNode("h2",null,e.toDisplayString(e.unref(A)("textEditor.paragraph.heading2")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[3]||(n[3]=s=>zl("<h3>"))},[e.createElementVNode("img",{src:I.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,Qu),e.createElementVNode("h3",null,e.toDisplayString(e.unref(A)("textEditor.paragraph.heading3")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[4]||(n[4]=s=>zl("<h4>"))},[e.createElementVNode("img",{src:I.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,Ju),e.createElementVNode("h4",null,e.toDisplayString(e.unref(A)("textEditor.paragraph.heading4")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[5]||(n[5]=s=>zl("<h5>"))},[e.createElementVNode("img",{src:I.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,ed),e.createElementVNode("h5",null,e.toDisplayString(e.unref(A)("textEditor.paragraph.heading5")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[6]||(n[6]=s=>zl("<h6>"))},[e.createElementVNode("img",{src:I.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,td),e.createElementVNode("h6",null,e.toDisplayString(e.unref(A)("textEditor.paragraph.heading6")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[7]||(n[7]=s=>zl("<p>"))},[n[49]||(n[49]=e.createElementVNode("svg",{width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"paragraph-icon"},[e.createElementVNode("path",{d:"M4.33333 8.61539V14H6.5V2.15385H8.66667V14H10.8333V2.15385H13V0H4.33333C1.93917 0 0 1.92769 0 4.30769C0 6.68769 1.93917 8.61539 4.33333 8.61539Z",fill:"#323232"})],-1)),e.createElementVNode("p",null,e.toDisplayString(e.unref(A)("textEditor.paragraph.paragraph")),1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":el("bold")}]),onClick:n[9]||(n[9]=s=>Bl("bold")),title:e.unref(A)("textEditor.toolbar.bold")},[...n[50]||(n[50]=[e.createElementVNode("svg",{viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M8.8 6.79C9.79256 6.12 10.4884 5.02 10.4884 4C10.4884 1.74 8.69767 0 6.39535 0H0V14H7.20372C9.34233 14 11 12.3 11 10.21C11 8.69 10.12 7.39 8.8 6.79ZM3.06977 2.5H6.13953C6.98884 2.5 7.67442 3.17 7.67442 4C7.67442 4.83 6.98884 5.5 6.13953 5.5H3.06977V2.5ZM6.65116 11.5H3.06977V8.5H6.65116C7.50047 8.5 8.18605 9.17 8.18605 10C8.18605 10.83 7.50047 11.5 6.65116 11.5Z",fill:"currentColor"})],-1)])],10,ld),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":el("italic")}]),onClick:n[10]||(n[10]=s=>Bl("italic")),title:e.unref(A)("textEditor.toolbar.italic")},[...n[51]||(n[51]=[e.createElementVNode("svg",{viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4 0V3H6.21L2.79 11H0V14H8V11H5.79L9.21 3H12V0H4Z",fill:"#323232"})],-1)])],10,nd),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":el("underline")}]),onClick:n[11]||(n[11]=s=>Bl("underline")),title:e.unref(A)("textEditor.toolbar.underline")},[...n[52]||(n[52]=[e.createElementVNode("svg",{viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M5.5 10.8889C8.10071 10.8889 10.2143 8.79667 10.2143 6.22222V0H8.25V6.22222C8.25 7.72333 7.01643 8.94444 5.5 8.94444C3.98357 8.94444 2.75 7.72333 2.75 6.22222V0H0.785714V6.22222C0.785714 8.79667 2.89929 10.8889 5.5 10.8889ZM0 12.4444V14H11V12.4444H0Z",fill:"#323232"})],-1)])],10,od),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Ye.value}]),onClick:Ln,title:e.unref(A)("textEditor.toolbar.citation")},[...n[53]||(n[53]=[e.createElementVNode("svg",{viewBox:"0 0 20 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M1.42857 14H5.71429L8.57143 8.4V0H0V8.4H4.28571L1.42857 14ZM12.8571 14H17.1429L20 8.4V0H11.4286V8.4H15.7143L12.8571 14Z",fill:"currentColor"})],-1)])],10,ad),n[62]||(n[62]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),Ce.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-button",onClick:Yn,title:e.unref(A)("textEditor.toolbar.removeLink")},[...n[55]||(n[55]=[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M18 4.88889H13.2V7.21111H18C20.052 7.21111 21.72 8.91 21.72 11C21.72 12.7478 20.544 14.2144 18.948 14.6422L20.7 16.4267C22.656 15.4122 24 13.3833 24 11C24 7.62667 21.312 4.88889 18 4.88889ZM16.8 9.77778H14.172L16.572 12.2222H16.8V9.77778ZM0 1.55222L3.732 5.35333C1.548 6.25778 0 8.44556 0 11C0 14.3733 2.688 17.1111 6 17.1111H10.8V14.7889H6C3.948 14.7889 2.28 13.09 2.28 11C2.28 9.05667 3.732 7.45556 5.592 7.24778L8.076 9.77778H7.2V12.2222H10.476L13.2 14.9967V17.1111H15.276L20.088 22L21.6 20.46L1.524 0L0 1.55222Z",fill:"#323232"})],-1)])],8,rd)):(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-button",onClick:Xn,title:e.unref(A)("textEditor.toolbar.insertLink")},[...n[54]||(n[54]=[e.createElementVNode("svg",{width:"20",height:"14",viewBox:"0 0 27 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M2.565 7C2.565 4.606 4.4415 2.66 6.75 2.66H12.15V0H6.75C3.024 0 0 3.136 0 7C0 10.864 3.024 14 6.75 14H12.15V11.34H6.75C4.4415 11.34 2.565 9.394 2.565 7ZM8.1 8.4H18.9V5.6H8.1V8.4ZM20.25 0H14.85V2.66H20.25C22.5585 2.66 24.435 4.606 24.435 7C24.435 9.394 22.5585 11.34 20.25 11.34H14.85V14H20.25C23.976 14 27 10.864 27 7C27 3.136 23.976 0 20.25 0Z",fill:"#323232"})],-1)])],8,sd)),n[63]||(n[63]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":el("insertUnorderedList")}]),onClick:cn,title:e.unref(A)("textEditor.toolbar.bulletList")},[...n[56]||(n[56]=[e.createElementVNode("svg",{viewBox:"0 0 17 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M1.37838 5.2C0.615676 5.2 0 5.78067 0 6.5C0 7.21933 0.615676 7.8 1.37838 7.8C2.14108 7.8 2.75676 7.21933 2.75676 6.5C2.75676 5.78067 2.14108 5.2 1.37838 5.2ZM1.37838 0C0.615676 0 0 0.580667 0 1.3C0 2.01933 0.615676 2.6 1.37838 2.6C2.14108 2.6 2.75676 2.01933 2.75676 1.3C2.75676 0.580667 2.14108 0 1.37838 0ZM1.37838 10.4C0.615676 10.4 0 10.9893 0 11.7C0 12.4107 0.624865 13 1.37838 13C2.13189 13 2.75676 12.4107 2.75676 11.7C2.75676 10.9893 2.14108 10.4 1.37838 10.4ZM4.13514 12.5667H17V10.8333H4.13514V12.5667ZM4.13514 7.36667H17V5.63333H4.13514V7.36667ZM4.13514 0.433333V2.16667H17V0.433333H4.13514Z",fill:"#323232"})],-1)])],10,id),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":el("insertOrderedList")}]),onClick:zn,title:e.unref(A)("textEditor.toolbar.numberList")},[...n[57]||(n[57]=[e.createElementVNode("svg",{viewBox:"0 0 18 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M0 12.1875H1.89474V12.6562H0.947368V13.5938H1.89474V14.0625H0V15H2.84211V11.25H0V12.1875ZM0.947368 3.75H1.89474V0H0V0.9375H0.947368V3.75ZM0 6.5625H1.70526L0 8.53125V9.375H2.84211V8.4375H1.13684L2.84211 6.46875V5.625H0V6.5625ZM4.73684 0.9375V2.8125H18V0.9375H4.73684ZM4.73684 14.0625H18V12.1875H4.73684V14.0625ZM4.73684 8.4375H18V6.5625H4.73684V8.4375Z",fill:"#323232"})],-1)])],10,cd),n[64]||(n[64]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:"dss-toolbar-button",onClick:po,title:e.unref(A)("textEditor.toolbar.image")},[...n[58]||(n[58]=[e.createElementVNode("svg",{viewBox:"1.5 1.5 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M2.15065 15.8414L2.13398 15.8581C1.90898 15.3664 1.76732 14.8081 1.70898 14.1914C1.76732 14.7997 1.92565 15.3497 2.15065 15.8414Z",fill:"#323232"}),e.createElementVNode("path",{d:"M7.50091 8.65026C8.59628 8.65026 9.48425 7.76229 9.48425 6.66693C9.48425 5.57156 8.59628 4.68359 7.50091 4.68359C6.40555 4.68359 5.51758 5.57156 5.51758 6.66693C5.51758 7.76229 6.40555 8.65026 7.50091 8.65026Z",fill:"#323232"}),e.createElementVNode("path",{d:"M13.491 1.66699H6.50768C3.47435 1.66699 1.66602 3.47533 1.66602 6.50866V13.492C1.66602 14.4003 1.82435 15.192 2.13268 15.8587C2.84935 17.442 4.38268 18.3337 6.50768 18.3337H13.491C16.5243 18.3337 18.3327 16.5253 18.3327 13.492V11.5837V6.50866C18.3327 3.47533 16.5243 1.66699 13.491 1.66699ZM16.9743 10.417C16.3243 9.85866 15.2743 9.85866 14.6243 10.417L11.1577 13.392C10.5077 13.9503 9.45768 13.9503 8.80768 13.392L8.52435 13.1587C7.93268 12.642 6.99102 12.592 6.32435 13.042L3.20768 15.1337C3.02435 14.667 2.91602 14.1253 2.91602 13.492V6.50866C2.91602 4.15866 4.15768 2.91699 6.50768 2.91699H13.491C15.841 2.91699 17.0827 4.15866 17.0827 6.50866V10.5087L16.9743 10.417Z",fill:"#323232"})],-1)])],8,ud),Y.value?(e.openBlock(),e.createElementBlock("div",dd)):e.createCommentVNode("",!0),Y.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-toolbar-button",title:e.unref(A)("textEditor.toolbar.comment"),onClick:Hl},[...n[59]||(n[59]=[e.createElementVNode("svg",{viewBox:"2 2 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13.19 6H6.79C6.53 6 6.28 6.01 6.04 6.04C3.35 6.27 2 7.86 2 10.79V14.79C2 18.79 3.6 19.58 6.79 19.58H7.19C7.41 19.58 7.7 19.73 7.83 19.9L9.03 21.5C9.56 22.21 10.42 22.21 10.95 21.5L12.15 19.9C12.3 19.7 12.54 19.58 12.79 19.58H13.19C16.12 19.58 17.71 18.24 17.94 15.54C17.97 15.3 17.98 15.05 17.98 14.79V10.79C17.98 7.6 16.38 6 13.19 6ZM6.5 14C5.94 14 5.5 13.55 5.5 13C5.5 12.45 5.95 12 6.5 12C7.05 12 7.5 12.45 7.5 13C7.5 13.55 7.05 14 6.5 14ZM9.99 14C9.43 14 8.99 13.55 8.99 13C8.99 12.45 9.44 12 9.99 12C10.54 12 10.99 12.45 10.99 13C10.99 13.55 10.55 14 9.99 14ZM13.49 14C12.93 14 12.49 13.55 12.49 13C12.49 12.45 12.94 12 13.49 12C14.04 12 14.49 12.45 14.49 13C14.49 13.55 14.04 14 13.49 14Z",fill:"#323232"}),e.createElementVNode("path",{d:"M21.9802 6.79V10.79C21.9802 12.79 21.3602 14.15 20.1202 14.9C19.8202 15.08 19.4702 14.84 19.4702 14.49L19.4802 10.79C19.4802 6.79 17.1902 4.5 13.1902 4.5L7.10025 4.51C6.75025 4.51 6.51025 4.16 6.69025 3.86C7.44025 2.62 8.80025 2 10.7902 2H17.1902C20.3802 2 21.9802 3.6 21.9802 6.79Z",fill:"#323232"})],-1)])],8,md)):e.createCommentVNode("",!0),H.askAi?(e.openBlock(),e.createElementBlock("div",pd)):e.createCommentVNode("",!0),H.askAi?(e.openBlock(),e.createElementBlock("div",fd,[e.createElementVNode("div",{class:"dss-toolbar-ai-button dss-toolbar-dropdown-toggle",onClick:n[12]||(n[12]=s=>Il("askAi")),title:e.unref(A)("textEditor.toolbar.askAi")},[n[60]||(n[60]=e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M3.97363 4.34473C5.4926 6.769 7.88838 8.45732 10.7598 9.01855C9.21102 10.2499 7.99851 11.8959 7.30762 13.8027C7.21982 14.066 6.82404 14.066 6.69238 13.8027C5.59521 10.7746 3.18158 8.40476 0.197266 7.30762C-0.0658032 7.21978 -0.0656958 6.82515 0.197266 6.69336C1.62341 6.17665 2.90369 5.36753 3.97363 4.34473Z",fill:"#9784ba"}),e.createElementVNode("path",{d:"M6.66895 0.197266C6.75687 -0.0657415 7.1515 -0.0657945 7.2832 0.197266C8.38035 3.22532 10.7941 5.5952 13.7783 6.69238C14.0416 6.78015 14.0416 7.17497 13.7783 7.30664C12.6735 7.71282 11.6469 8.29371 10.7363 9.01758C7.86425 8.45633 5.46822 6.76786 3.94922 4.34277C5.15088 3.1939 6.08858 1.77583 6.66895 0.197266Z",fill:"#cfbeed"})],-1)),e.createElementVNode("span",gd,e.toDisplayString(e.unref(A)("textEditor.toolbar.askAi")),1)],8,vd),we.value==="askAi"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-dropdown",onClick:n[13]||(n[13]=e.withModifiers(()=>{},["stop"]))},[e.renderSlot(o.$slots,"ask-ai-dropdown")])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",hd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.customToolbarSlots,(s,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r},[El(s)?(e.openBlock(),e.createElementBlock("div",yd,[e.renderSlot(o.$slots,s)])):e.createCommentVNode("",!0),El(s)&&r<H.customToolbarSlots.length-1&&xn(r)?(e.openBlock(),e.createElementBlock("div",kd)):e.createCommentVNode("",!0)],64))),128))])],32)):e.createCommentVNode("",!0),(we.value==="paragraph"||we.value==="askAi")&&H.richText?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-dropdown-overlay",onClick:il})):e.createCommentVNode("",!0),e.createVNode(ea,{showModal:De.value,width:"500px",height:"55vh",onCloseModal:Un},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(A)("textEditor.link.editLink")),1)]),content:e.withCtx(()=>[e.createElementVNode("div",Cd,[e.createElementVNode("div",bd,[e.createElementVNode("label",wd,e.toDisplayString(e.unref(A)("textEditor.link.altText")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"linkAltInput",ref:Ze,type:"text","onUpdate:modelValue":n[15]||(n[15]=s=>pt.value=s),class:"dss-link-modal-input",placeholder:e.unref(A)("textEditor.link.enterAltText"),onKeyup:e.withKeys(mo,["enter"])},null,40,xd),[[e.vModelText,pt.value]])]),e.createElementVNode("div",Ed,[e.createElementVNode("label",Sd,e.toDisplayString(e.unref(A)("textEditor.link.url")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"linkUrlInput",ref:W,type:"text","onUpdate:modelValue":n[16]||(n[16]=s=>tt.value=s),class:"dss-link-modal-input",placeholder:e.unref(A)("textEditor.link.enterUrl"),onKeyup:e.withKeys(mo,["enter"])},null,40,Vd),[[e.vModelText,tt.value]])])])]),actions:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-cancel",onClick:Un},e.toDisplayString(e.unref(A)("textEditor.link.cancel")),1),e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-save",onClick:mo},e.toDisplayString(e.unref(A)("textEditor.link.save")),1)]),_:1},8,["showModal"]),e.createVNode(ea,{showModal:Ct.value,width:"500px",height:"80vh",onCloseModal:Dn},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(bt.value?e.unref(A)("textEditor.image.editImage"):e.unref(A)("textEditor.image.addImage")),1)]),content:e.withCtx(()=>[e.createElementVNode("div",Nd,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-image-modal-tab",{"dss-image-modal-tab-active":Be.value==="upload"}]),onClick:n[17]||(n[17]=s=>Be.value="upload")},e.toDisplayString(e.unref(A)("textEditor.image.upload")),3),n[65]||(n[65]=e.createElementVNode("div",{class:"dss-image-modal-tab-separator"},null,-1)),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-image-modal-tab",{"dss-image-modal-tab-active":Be.value==="url"}]),onClick:n[18]||(n[18]=s=>Be.value="url")},e.toDisplayString(e.unref(A)("textEditor.image.imageLink")),3)]),Be.value==="upload"?(e.openBlock(),e.createElementBlock("div",Bd,[e.createElementVNode("div",Md,[e.createElementVNode("div",_d,[vn.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("label",$d,e.toDisplayString(e.unref(A)("textEditor.image.uploadImage")),1)),vn.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-image-upload-preview",onClick:ln},[e.createElementVNode("img",{src:Pt.value,alt:"Preview",class:"dss-image-preview-image"},null,8,Ld),n[66]||(n[66]=e.createElementVNode("div",{class:"dss-image-preview-overlay"},[e.createElementVNode("svg",{width:"35",height:"35",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M14.06 9.02L14.98 9.94L5.92 19H5V18.08L14.06 9.02ZM17.66 3C17.41 3 17.15 3.1 16.96 3.29L15.13 5.12L18.88 8.87L20.71 7.04C21.1 6.65 21.1 6.02 20.71 5.63L18.37 3.29C18.17 3.1 17.92 3 17.66 3ZM14.06 6.19L3 17.25V21H6.75L17.81 9.94L14.06 6.19Z",fill:"white"})])],-1)),e.createElementVNode("input",{ref_key:"imageFileInput",ref:_e,type:"file",accept:"image/*",class:"dss-image-file-input-hidden",onChange:tn},null,544)])):(e.openBlock(),e.createElementBlock("input",{key:2,ref_key:"imageFileInput",ref:_e,type:"file",accept:"image/*",class:"dss-link-modal-input dss-link-modal-input-image",onChange:tn},null,544))]),e.createElementVNode("div",Ad,[e.createElementVNode("label",Td,e.toDisplayString(e.unref(A)("textEditor.image.altText")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"imageAltInput",ref:He,type:"text","onUpdate:modelValue":n[19]||(n[19]=s=>Et.value=s),class:"dss-link-modal-input",placeholder:e.unref(A)("textEditor.image.enterAltText"),onKeyup:e.withKeys(Rl,["enter"])},null,40,Dd),[[e.vModelText,Et.value]])]),e.createElementVNode("div",Hd,[e.createElementVNode("label",Rd,e.toDisplayString(e.unref(A)("textEditor.image.width")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":n[20]||(n[20]=s=>se.value=s),class:"dss-link-modal-input",placeholder:e.unref(A)("textEditor.image.auto"),onKeyup:e.withKeys(Rl,["enter"]),onInput:Qn},null,40,Fd),[[e.vModelText,se.value]])]),e.createElementVNode("div",Id,[e.createElementVNode("label",zd,e.toDisplayString(e.unref(A)("textEditor.image.height")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":n[21]||(n[21]=s=>ge.value=s),class:"dss-link-modal-input",placeholder:e.unref(A)("textEditor.image.auto"),onKeyup:e.withKeys(Rl,["enter"]),onInput:fo},null,40,Pd),[[e.vModelText,ge.value]])])])])):e.createCommentVNode("",!0),Be.value==="url"?(e.openBlock(),e.createElementBlock("div",Od,[e.createElementVNode("div",qd,[e.createElementVNode("div",Wd,[e.createElementVNode("label",Zd,e.toDisplayString(e.unref(A)("textEditor.image.imageUrl")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"imageUrlInput",ref:Xt,type:"text","onUpdate:modelValue":n[22]||(n[22]=s=>Ue.value=s),class:"dss-link-modal-input",placeholder:e.unref(A)("textEditor.image.enterImageUrl"),onKeyup:e.withKeys(Rl,["enter"])},null,40,Ud),[[e.vModelText,Ue.value]])]),e.createElementVNode("div",Xd,[e.createElementVNode("label",Yd,e.toDisplayString(e.unref(A)("textEditor.image.altText")),1),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":n[23]||(n[23]=s=>Et.value=s),class:"dss-link-modal-input",placeholder:e.unref(A)("textEditor.image.enterAltText"),onKeyup:e.withKeys(Rl,["enter"])},null,40,jd),[[e.vModelText,Et.value]])]),e.createElementVNode("div",Kd,[e.createElementVNode("label",Gd,e.toDisplayString(e.unref(A)("textEditor.image.width")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":n[24]||(n[24]=s=>se.value=s),class:"dss-link-modal-input",placeholder:e.unref(A)("textEditor.image.auto"),onKeyup:e.withKeys(Rl,["enter"]),onInput:Qn},null,40,Qd),[[e.vModelText,se.value]])]),e.createElementVNode("div",Jd,[e.createElementVNode("label",e1,e.toDisplayString(e.unref(A)("textEditor.image.height")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":n[25]||(n[25]=s=>ge.value=s),class:"dss-link-modal-input",placeholder:e.unref(A)("textEditor.image.auto"),onKeyup:e.withKeys(Rl,["enter"]),onInput:fo},null,40,t1),[[e.vModelText,ge.value]])])])])):e.createCommentVNode("",!0)]),actions:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-cancel",onClick:Dn},e.toDisplayString(e.unref(A)("textEditor.image.cancel")),1),e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-save",onClick:Rl},e.toDisplayString(e.unref(A)("textEditor.image.save")),1)]),_:1},8,["showModal"]),e.createElementVNode("div",{class:e.normalizeClass(["dss-text-editor-title-wrapper",{"dss-text-editor-no-border-bottom":yl.value&&ll.value}])},[e.createElementVNode("p",null,e.toDisplayString(e.unref(A)("textEditor.labels.title")),1),e.createElementVNode("div",l1,[ll.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",n1,[H.title?(e.openBlock(),e.createElementBlock("span",o1,e.toDisplayString(H.title),1)):(e.openBlock(),e.createElementBlock("span",a1,e.toDisplayString(gn.value),1))])),e.createElementVNode("textarea",{ref_key:"titleInputRef",ref:fe,value:H.title,onInput:Dl,onFocus:ot,onBlur:Dt,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-title-input",{"dss-text-editor-title-input-blurred":!ll.value}]),placeholder:gn.value,disabled:H.disabled,rows:"1"},null,42,s1)])],2),yl.value&&ll.value?(e.openBlock(),e.createElementBlock("div",r1,[e.renderSlot(o.$slots,"title-slot")])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["dss-text-editor-description-wrapper",{"dss-text-editor-no-border-bottom":Ql.value&&S.value}])},[e.createElementVNode("p",null,e.toDisplayString(e.unref(A)("textEditor.labels.description")),1),e.createElementVNode("div",i1,[S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",c1,[H.description?(e.openBlock(),e.createElementBlock("span",u1,e.toDisplayString(H.description),1)):(e.openBlock(),e.createElementBlock("span",d1,e.toDisplayString(an.value),1))])),e.createElementVNode("textarea",{ref_key:"descriptionInputRef",ref:Ge,value:H.description,onInput:kl,onFocus:Ol,onBlur:$n,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-description-input",{"dss-text-editor-description-input-blurred":!S.value}]),placeholder:an.value,disabled:H.disabled,rows:"1"},null,42,m1)])],2),Ql.value&&S.value?(e.openBlock(),e.createElementBlock("div",p1,[e.renderSlot(o.$slots,"description-slot")])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.value,s=>(e.openBlock(),e.createElementBlock("div",{key:s.id,class:e.normalizeClass(["editor-comment-marker-group",{"editor-comment-marker-active":At.value===s.id,"editor-comment-marker-group-out-of-view":s.opacity===0}]),"data-comment-id":s.id,style:e.normalizeStyle({top:s.top+"px"}),onMouseenter:r=>Lo(s),onMouseleave:Hn},[s.firstUser?(e.openBlock(),e.createElementBlock("div",{key:0,class:"editor-comment-marker editor-comment-marker-first",onClick:e.withModifiers(r=>go(s),["stop"])},[s.firstUser.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.firstUser.avatar,alt:s.firstUser.name||"avatar"},null,8,g1)):(e.openBlock(),e.createElementBlock("span",h1,e.toDisplayString(s.firstUser.initials||(s.firstUser.name?s.firstUser.name.charAt(0):"")),1))],8,v1)):e.createCommentVNode("",!0),s.secondUser?(e.openBlock(),e.createElementBlock("div",{key:1,class:"editor-comment-marker editor-comment-marker-second",onClick:e.withModifiers(r=>go(s),["stop"])},[s.secondUser.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.secondUser.avatar,alt:s.secondUser.name||"avatar"},null,8,k1)):(e.openBlock(),e.createElementBlock("span",C1,e.toDisplayString(s.secondUser.initials||(s.secondUser.name?s.secondUser.name.charAt(0):"")),1))],8,y1)):e.createCommentVNode("",!0),s.additionalCount>0?(e.openBlock(),e.createElementBlock("div",{key:2,class:"editor-comment-marker editor-comment-marker-additional",style:e.normalizeStyle({top:s.secondUser?"30px":"15px"}),"data-has-second-user":s.secondUser?"true":"false",onClick:e.withModifiers(r=>go(s),["stop"])},[e.createElementVNode("span",w1,"+"+e.toDisplayString(s.additionalCount),1)],12,b1)):e.createCommentVNode("",!0)],46,f1))),128)),H.richText?(e.openBlock(),e.createElementBlock("div",M1,[e.createElementVNode("div",{ref_key:"editorRef",ref:f,contenteditable:"true",spellcheck:"false",class:e.normalizeClass(["dss-text-editor-content",{"dss-text-editor-content-disabled":H.disabled,"dss-text-editor-fixed-height":H.fixedHeight}]),style:e.normalizeStyle(hl.value),onInput:de,onBlur:st,onClick:Sn,onMouseup:Ft,onKeyup:Ft,onKeydown:uo,onPaste:Zo,onMousemove:Uo,onMouseleave:Bn},null,38),e.createVNode(e.Transition,{name:"comment-overlay"},{default:e.withCtx(()=>[At.value!==null?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-comment-overlay",style:e.normalizeStyle(un.value)},[x.value||ie.value.length>0?(e.openBlock(),e.createElementBlock("div",_1,[e.createElementVNode("div",$1,[x.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-comment-selection",innerHTML:x.value},null,8,L1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",A1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,(s,r)=>(e.openBlock(),e.createElementBlock("div",{key:r,class:"dss-comment-message"},[s.user&&(s.user.avatar||s.user.initials||s.user.name)?(e.openBlock(),e.createElementBlock("div",T1,[e.createElementVNode("div",D1,[s.user.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.user.avatar,alt:s.user.name||"avatar"},null,8,H1)):(e.openBlock(),e.createElementBlock("span",R1,e.toDisplayString(s.user.initials||(s.user.name?s.user.name.charAt(0):"")),1))])])):e.createCommentVNode("",!0),e.createElementVNode("div",F1,[e.createElementVNode("div",I1,[e.createElementVNode("div",z1,e.toDisplayString(s.user&&s.user.name||"Comment"),1),s.createdAt?(e.openBlock(),e.createElementBlock("div",P1,e.toDisplayString(ce(new Date(s.createdAt))),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["dss-comment-body-text",{"comment-started":$e(s.text)||s.class==="comment-started"}])},e.toDisplayString(s.text||""),3)]),$.commentUser&&s.user&&s.user.id===$.commentUser.id&&!$e(s.text)?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"dss-comment-delete-button",onClick:e.withModifiers(c=>En(s,r),["stop"]),title:e.unref(A)("textEditor.comment.delete")||"Delete comment"},[...n[68]||(n[68]=[e.createElementVNode("svg",{width:"22",height:"25",viewBox:"0 0 22 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M19.5986 21.3535C19.5985 23.3679 18.1282 25 16.2891 25H5.30957C3.48166 24.9997 2.00011 23.3702 2 21.3535V8H19.5986V21.3535ZM8 11C7.44772 11 7 11.4477 7 12V20C7 20.5523 7.44772 21 8 21C8.55229 21 9 20.5523 9 20V12C9 11.4477 8.55229 11 8 11ZM14 11C13.4477 11 13 11.4477 13 12V20C13 20.5523 13.4477 21 14 21C14.5523 21 15 20.5523 15 20V12C15 11.4477 14.5523 11 14 11ZM13.2002 0C15.0227 0.000104554 16.4999 1.46937 16.5 3.27246V4.36328H20.9092C21.5117 4.36348 21.9998 4.84789 22 5.4541C22 6.05615 21.4986 6.54569 20.9092 6.5459H1.09082C0.488195 6.54569 0 6.06052 0 5.4541C0.000246661 4.85225 0.50153 4.36349 1.09082 4.36328H5.5L5.50098 3.27246C5.50112 1.46505 6.98382 0.000171185 8.80078 0H13.2002ZM8.79004 2.18164C8.19615 2.18167 7.70034 2.67042 7.7002 3.27246C7.7002 3.87899 8.18837 4.36325 8.79004 4.36328H13.21C13.8039 4.36325 14.2998 3.87462 14.2998 3.27246C14.2997 2.66606 13.8115 2.18167 13.21 2.18164H8.79004Z",fill:"#323232"})],-1)])],8,O1)):e.createCommentVNode("",!0)]))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",q1,[e.withDirectives(e.createElementVNode("textarea",{ref_key:"commentInputRef",ref:h,"onUpdate:modelValue":n[26]||(n[26]=s=>y.value=s),class:"dss-comment-input",rows:"1",placeholder:e.unref(A)("textEditor.comment.placeholder"),onKeydown:e.withKeys(e.withModifiers(ql,["prevent","stop"]),["enter"]),onInput:n[27]||(n[27]=()=>{if(h.value){const s=h.value;s.style.height="auto",s.style.height=`${s.scrollHeight}px`}})},null,40,W1),[[e.vModelText,y.value]]),e.createElementVNode("button",{type:"button",class:"dss-comment-send-button",onClick:e.withModifiers(ql,["stop"])},[...n[69]||(n[69]=[e.createElementVNode("svg",{width:"21",height:"18",viewBox:"0 0 21 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M0.00999999 18L21 9L0.00999999 0L0 7L15 9L0 11L0.00999999 18Z",fill:"#31312F"})],-1)])])])],4)):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",Z1,[e.createElementVNode("div",U1,[e.createElementVNode("span",X1,e.toDisplayString(Wt.value)+" "+e.toDisplayString(Wt.value===1?e.unref(A)("textEditor.footer.word"):e.unref(A)("textEditor.footer.words")),1),n[70]||(n[70]=e.createElementVNode("span",{class:"dss-text-editor-footer-separator"},"•",-1)),e.createElementVNode("span",Y1,e.toDisplayString(dl.value)+" "+e.toDisplayString(dl.value===1?e.unref(A)("textEditor.footer.character"):e.unref(A)("textEditor.footer.characters")),1)])])])):(e.openBlock(),e.createElementBlock("div",x1,[e.createElementVNode("textarea",{value:H.modelValue,onInput:dt,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-textarea",{"dss-text-editor-fixed-height":H.fixedHeight}]),placeholder:Tl.value,rows:H.rows,disabled:H.disabled,style:e.normalizeStyle(_t.value)},null,46,E1),e.createElementVNode("div",S1,[e.createElementVNode("div",V1,[e.createElementVNode("span",N1,e.toDisplayString(Wt.value)+" "+e.toDisplayString(Wt.value===1?e.unref(A)("textEditor.footer.word"):e.unref(A)("textEditor.footer.words")),1),n[67]||(n[67]=e.createElementVNode("span",{class:"dss-text-editor-footer-separator"},"•",-1)),e.createElementVNode("span",B1,e.toDisplayString(dl.value)+" "+e.toDisplayString(dl.value===1?e.unref(A)("textEditor.footer.character"):e.unref(A)("textEditor.footer.characters")),1)])])])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[U.value&&pe.value&&f.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-link-popup",style:e.normalizeStyle(F.value),onMouseenter:n[28]||(n[28]=s=>Ee.value=!0),onMouseleave:Tn},[e.createElementVNode("span",{class:"dss-link-popup-url",onClick:e.withModifiers(Zn,["stop"]),title:pe.value},e.toDisplayString(pe.value),9,j1),e.createElementVNode("button",{type:"button",class:"dss-link-popup-edit",onClick:e.withModifiers(Xo,["stop"]),title:e.unref(A)("textEditor.link.editLink")},[(e.openBlock(),e.createElementBlock("svg",G1,[...n[71]||(n[71]=[e.createElementVNode("g",null,[e.createElementVNode("path",{d:"M25.264 1.008c-.524 0-1.049.197-1.443.592l-2.248 2.248 6.58 6.578 2.246-2.248a2.058 2.058 0 0 0 0-2.887L26.707 1.6a2.032 2.032 0 0 0-1.443-.592zm-5.106 4.254L3.889 21.532a1.022 1.022 0 0 0-.242.391c-.729 2.187-2.035 5.759-2.6 7.803a1 1 0 0 0 1.188 1.24c2.432-.562 5.687-1.896 7.84-2.613a1.03 1.03 0 0 0 .392-.236l16.269-16.275z",fill:"hsl(0, 0%, 98%)",opacity:"1","data-original":"#000000",class:""})],-1)])]))],8,K1)],36)):e.createCommentVNode("",!0)])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[Lt.value&&qt.value&&f.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-link-popup",style:e.normalizeStyle(K.value),onMouseenter:n[29]||(n[29]=s=>ye.value=!0),onMouseleave:Wn},[e.createElementVNode("div",Q1,[qt.value===e.unref(A)("textEditor.image.noAlt")?(e.openBlock(),e.createElementBlock("div",J1,[...n[72]||(n[72]=[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("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:"#fafafa"})],-1)])])):e.createCommentVNode("",!0),e.createElementVNode("p",{class:"dss-image-popup-alt",title:qt.value},e.toDisplayString(qt.value),9,em)]),e.createElementVNode("button",{type:"button",class:"dss-link-popup-edit",onClick:e.withModifiers(_o,["stop"]),title:e.unref(A)("textEditor.image.editImage")},[(e.openBlock(),e.createElementBlock("svg",lm,[...n[73]||(n[73]=[e.createElementVNode("g",null,[e.createElementVNode("path",{d:"M25.264 1.008c-.524 0-1.049.197-1.443.592l-2.248 2.248 6.58 6.578 2.246-2.248a2.058 2.058 0 0 0 0-2.887L26.707 1.6a2.032 2.032 0 0 0-1.443-.592zm-5.106 4.254L3.889 21.532a1.022 1.022 0 0 0-.242.391c-.729 2.187-2.035 5.759-2.6 7.803a1 1 0 0 0 1.188 1.24c2.432-.562 5.687-1.896 7.84-2.613a1.03 1.03 0 0 0 .392-.236l16.269-16.275z",fill:"hsl(0, 0%, 98%)",opacity:"1","data-original":"#000000",class:""})],-1)])]))],8,tm)],36)):e.createCommentVNode("",!0)])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[H.floatingToolbar&&H.richText&<.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"floatingToolbarRef",ref:Je,class:"dss-floating-toolbar",style:e.normalizeStyle(be.value),onMousedown:n[44]||(n[44]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",nm,[e.createElementVNode("div",{class:"dss-toolbar-button",onClick:e.withModifiers(vt,["stop"]),title:e.unref(A)("textEditor.toolbar.undo")},[...n[74]||(n[74]=[e.createElementVNode("svg",{viewBox:"0 0 18 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M9.23302 0.888889C6.90278 0.888889 4.79238 1.76889 3.16561 3.2L0 0V8H7.91402L4.73083 4.78222C5.9531 3.75111 7.50953 3.11111 9.23302 3.11111C12.3459 3.11111 14.9927 5.16444 15.916 8L18 7.30667C16.7777 3.58222 13.3219 0.888889 9.23302 0.888889Z",fill:"#323232"})],-1)])],8,om),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-disabled":!Al.value}]),onClick:e.withModifiers(oe,["stop"]),title:e.unref(A)("textEditor.toolbar.redo")},[...n[75]||(n[75]=[e.createElementVNode("svg",{viewBox:"0 0 18 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M14.8328 3.2C13.2053 1.76889 11.0938 0.888889 8.76246 0.888889C4.67155 0.888889 1.21408 3.58222 0 7.30667L2.07625 8C3 5.16444 5.6393 3.11111 8.76246 3.11111C10.478 3.11111 12.044 3.75111 13.2669 4.78222L10.0821 8H18V0L14.8328 3.2Z",fill:"#323232"})],-1)])],10,am),n[89]||(n[89]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",sm,[e.createElementVNode("div",{class:"dss-toolbar-button dss-toolbar-dropdown-toggle",onClick:n[30]||(n[30]=e.withModifiers(s=>An("paragraph"),["stop"])),title:e.unref(A)("textEditor.toolbar.paragraphFormat")},[V.value==="h1"?(e.openBlock(),e.createElementBlock("img",{key:0,src:I.h1,alt:"H1",class:"dss-toolbar-heading-icon"},null,8,im)):V.value==="h2"?(e.openBlock(),e.createElementBlock("img",{key:1,src:I.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,cm)):V.value==="h3"?(e.openBlock(),e.createElementBlock("img",{key:2,src:I.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,um)):V.value==="h4"?(e.openBlock(),e.createElementBlock("img",{key:3,src:I.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,dm)):V.value==="h5"?(e.openBlock(),e.createElementBlock("img",{key:4,src:I.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,mm)):V.value==="h6"?(e.openBlock(),e.createElementBlock("img",{key:5,src:I.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,pm)):(e.openBlock(),e.createElementBlock("svg",fm,[...n[76]||(n[76]=[e.createElementVNode("path",{d:"M4.33333 8.61539V14H6.5V2.15385H8.66667V14H10.8333V2.15385H13V0H4.33333C1.93917 0 0 1.92769 0 4.30769C0 6.68769 1.93917 8.61539 4.33333 8.61539Z",fill:"#323232"},null,-1)])])),n[77]||(n[77]=e.createElementVNode("span",{class:"dss-toolbar-dropdown-arrow"},"˅",-1))],8,rm),ut.value==="paragraph"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-dropdown",onClick:n[38]||(n[38]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[31]||(n[31]=s=>Pl("<h1>"))},[e.createElementVNode("h1",null,e.toDisplayString(e.unref(A)("textEditor.paragraph.heading1")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[32]||(n[32]=s=>Pl("<h2>"))},[e.createElementVNode("h2",null,e.toDisplayString(e.unref(A)("textEditor.paragraph.heading2")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[33]||(n[33]=s=>Pl("<h3>"))},[e.createElementVNode("h3",null,e.toDisplayString(e.unref(A)("textEditor.paragraph.heading3")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[34]||(n[34]=s=>Pl("<h4>"))},[e.createElementVNode("h4",null,e.toDisplayString(e.unref(A)("textEditor.paragraph.heading4")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[35]||(n[35]=s=>Pl("<h5>"))},[e.createElementVNode("h5",null,e.toDisplayString(e.unref(A)("textEditor.paragraph.heading5")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[36]||(n[36]=s=>Pl("<h6>"))},[e.createElementVNode("h6",null,e.toDisplayString(e.unref(A)("textEditor.paragraph.heading6")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:n[37]||(n[37]=s=>Pl("<p>"))},[e.createElementVNode("p",null,e.toDisplayString(e.unref(A)("textEditor.paragraph.paragraph")),1)])])):e.createCommentVNode("",!0)]),n[90]||(n[90]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":el("bold")}]),onClick:n[39]||(n[39]=e.withModifiers(s=>Bl("bold"),["stop"])),title:e.unref(A)("textEditor.toolbar.bold")},[...n[78]||(n[78]=[e.createElementVNode("svg",{viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M8.8 6.79C9.79256 6.12 10.4884 5.02 10.4884 4C10.4884 1.74 8.69767 0 6.39535 0H0V14H7.20372C9.34233 14 11 12.3 11 10.21C11 8.69 10.12 7.39 8.8 6.79ZM3.06977 2.5H6.13953C6.98884 2.5 7.67442 3.17 7.67442 4C7.67442 4.83 6.98884 5.5 6.13953 5.5H3.06977V2.5ZM6.65116 11.5H3.06977V8.5H6.65116C7.50047 8.5 8.18605 9.17 8.18605 10C8.18605 10.83 7.50047 11.5 6.65116 11.5Z",fill:"currentColor"})],-1)])],10,vm),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":el("italic")}]),onClick:n[40]||(n[40]=e.withModifiers(s=>Bl("italic"),["stop"])),title:e.unref(A)("textEditor.toolbar.italic")},[...n[79]||(n[79]=[e.createElementVNode("svg",{viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M4 0V3H6.21L2.79 11H0V14H8V11H5.79L9.21 3H12V0H4Z",fill:"#323232"})],-1)])],10,gm),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":el("underline")}]),onClick:n[41]||(n[41]=e.withModifiers(s=>Bl("underline"),["stop"])),title:e.unref(A)("textEditor.toolbar.underline")},[...n[80]||(n[80]=[e.createElementVNode("svg",{viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M5.5 10.8889C8.10071 10.8889 10.2143 8.79667 10.2143 6.22222V0H8.25V6.22222C8.25 7.72333 7.01643 8.94444 5.5 8.94444C3.98357 8.94444 2.75 7.72333 2.75 6.22222V0H0.785714V6.22222C0.785714 8.79667 2.89929 10.8889 5.5 10.8889ZM0 12.4444V14H11V12.4444H0Z",fill:"#323232"})],-1)])],10,hm),n[91]||(n[91]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Ye.value}]),onClick:e.withModifiers(Ln,["stop"]),title:e.unref(A)("textEditor.toolbar.citation")},[...n[81]||(n[81]=[e.createElementVNode("svg",{viewBox:"0 0 20 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M1.42857 14H5.71429L8.57143 8.4V0H0V8.4H4.28571L1.42857 14ZM12.8571 14H17.1429L20 8.4V0H11.4286V8.4H15.7143L12.8571 14Z",fill:"currentColor"})],-1)])],10,ym),n[92]||(n[92]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),Ce.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-button",onClick:e.withModifiers(Yn,["stop"]),title:e.unref(A)("textEditor.toolbar.removeLink")},[...n[83]||(n[83]=[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M18 4.88889H13.2V7.21111H18C20.052 7.21111 21.72 8.91 21.72 11C21.72 12.7478 20.544 14.2144 18.948 14.6422L20.7 16.4267C22.656 15.4122 24 13.3833 24 11C24 7.62667 21.312 4.88889 18 4.88889ZM16.8 9.77778H14.172L16.572 12.2222H16.8V9.77778ZM0 1.55222L3.732 5.35333C1.548 6.25778 0 8.44556 0 11C0 14.3733 2.688 17.1111 6 17.1111H10.8V14.7889H6C3.948 14.7889 2.28 13.09 2.28 11C2.28 9.05667 3.732 7.45556 5.592 7.24778L8.076 9.77778H7.2V12.2222H10.476L13.2 14.9967V17.1111H15.276L20.088 22L21.6 20.46L1.524 0L0 1.55222Z",fill:"#323232"})],-1)])],8,Cm)):(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-button",onClick:e.withModifiers(Xn,["stop"]),title:e.unref(A)("textEditor.toolbar.insertLink")},[...n[82]||(n[82]=[e.createElementVNode("svg",{width:"20",height:"14",viewBox:"0 0 27 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M2.565 7C2.565 4.606 4.4415 2.66 6.75 2.66H12.15V0H6.75C3.024 0 0 3.136 0 7C0 10.864 3.024 14 6.75 14H12.15V11.34H6.75C4.4415 11.34 2.565 9.394 2.565 7ZM8.1 8.4H18.9V5.6H8.1V8.4ZM20.25 0H14.85V2.66H20.25C22.5585 2.66 24.435 4.606 24.435 7C24.435 9.394 22.5585 11.34 20.25 11.34H14.85V14H20.25C23.976 14 27 10.864 27 7C27 3.136 23.976 0 20.25 0Z",fill:"#323232"})],-1)])],8,km)),n[93]||(n[93]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":el("insertUnorderedList")}]),onClick:e.withModifiers(cn,["stop"]),title:e.unref(A)("textEditor.toolbar.bulletList")},[...n[84]||(n[84]=[e.createElementVNode("svg",{viewBox:"0 0 17 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M1.37838 5.2C0.615676 5.2 0 5.78067 0 6.5C0 7.21933 0.615676 7.8 1.37838 7.8C2.14108 7.8 2.75676 7.21933 2.75676 6.5C2.75676 5.78067 2.14108 5.2 1.37838 5.2ZM1.37838 0C0.615676 0 0 0.580667 0 1.3C0 2.01933 0.615676 2.6 1.37838 2.6C2.14108 2.6 2.75676 2.01933 2.75676 1.3C2.75676 0.580667 2.14108 0 1.37838 0ZM1.37838 10.4C0.615676 10.4 0 10.9893 0 11.7C0 12.4107 0.624865 13 1.37838 13C2.13189 13 2.75676 12.4107 2.75676 11.7C2.75676 10.9893 2.14108 10.4 1.37838 10.4ZM4.13514 12.5667H17V10.8333H4.13514V12.5667ZM4.13514 7.36667H17V5.63333H4.13514V7.36667ZM4.13514 0.433333V2.16667H17V0.433333H4.13514Z",fill:"#323232"})],-1)])],10,bm),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":el("insertOrderedList")}]),onClick:e.withModifiers(zn,["stop"]),title:e.unref(A)("textEditor.toolbar.numberList")},[...n[85]||(n[85]=[e.createElementVNode("svg",{viewBox:"0 0 18 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M0 12.1875H1.89474V12.6562H0.947368V13.5938H1.89474V14.0625H0V15H2.84211V11.25H0V12.1875ZM0.947368 3.75H1.89474V0H0V0.9375H0.947368V3.75ZM0 6.5625H1.70526L0 8.53125V9.375H2.84211V8.4375H1.13684L2.84211 6.46875V5.625H0V6.5625ZM4.73684 0.9375V2.8125H18V0.9375H4.73684ZM4.73684 14.0625H18V12.1875H4.73684V14.0625ZM4.73684 8.4375H18V6.5625H4.73684V8.4375Z",fill:"#323232"})],-1)])],10,wm),n[94]||(n[94]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:"dss-toolbar-button",onClick:e.withModifiers(po,["stop"]),title:e.unref(A)("textEditor.toolbar.image")},[...n[86]||(n[86]=[e.createElementVNode("svg",{viewBox:"1.5 1.5 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M2.15065 15.8414L2.13398 15.8581C1.90898 15.3664 1.76732 14.8081 1.70898 14.1914C1.76732 14.7997 1.92565 15.3497 2.15065 15.8414Z",fill:"#323232"}),e.createElementVNode("path",{d:"M7.50091 8.65026C8.59628 8.65026 9.48425 7.76229 9.48425 6.66693C9.48425 5.57156 8.59628 4.68359 7.50091 4.68359C6.40555 4.68359 5.51758 5.57156 5.51758 6.66693C5.51758 7.76229 6.40555 8.65026 7.50091 8.65026Z",fill:"#323232"}),e.createElementVNode("path",{d:"M13.491 1.66699H6.50768C3.47435 1.66699 1.66602 3.47533 1.66602 6.50866V13.492C1.66602 14.4003 1.82435 15.192 2.13268 15.8587C2.84935 17.442 4.38268 18.3337 6.50768 18.3337H13.491C16.5243 18.3337 18.3327 16.5253 18.3327 13.492V11.5837V6.50866C18.3327 3.47533 16.5243 1.66699 13.491 1.66699ZM16.9743 10.417C16.3243 9.85866 15.2743 9.85866 14.6243 10.417L11.1577 13.392C10.5077 13.9503 9.45768 13.9503 8.80768 13.392L8.52435 13.1587C7.93268 12.642 6.99102 12.592 6.32435 13.042L3.20768 15.1337C3.02435 14.667 2.91602 14.1253 2.91602 13.492V6.50866C2.91602 4.15866 4.15768 2.91699 6.50768 2.91699H13.491C15.841 2.91699 17.0827 4.15866 17.0827 6.50866V10.5087L16.9743 10.417Z",fill:"#323232"})],-1)])],8,xm),n[95]||(n[95]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:"dss-toolbar-button",title:e.unref(A)("textEditor.toolbar.comment"),onClick:e.withModifiers(Hl,["stop"])},[...n[87]||(n[87]=[e.createElementVNode("svg",{viewBox:"2 2 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13.19 6H6.79C6.53 6 6.28 6.01 6.04 6.04C3.35 6.27 2 7.86 2 10.79V14.79C2 18.79 3.6 19.58 6.79 19.58H7.19C7.41 19.58 7.7 19.73 7.83 19.9L9.03 21.5C9.56 22.21 10.42 22.21 10.95 21.5L12.15 19.9C12.3 19.7 12.54 19.58 12.79 19.58H13.19C16.12 19.58 17.71 18.24 17.94 15.54C17.97 15.3 17.98 15.05 17.98 14.79V10.79C17.98 7.6 16.38 6 13.19 6ZM6.5 14C5.94 14 5.5 13.55 5.5 13C5.5 12.45 5.95 12 6.5 12C7.05 12 7.5 12.45 7.5 13C7.5 13.55 7.05 14 6.5 14ZM9.99 14C9.43 14 8.99 13.55 8.99 13C8.99 12.45 9.44 12 9.99 12C10.54 12 10.99 12.45 10.99 13C10.99 13.55 10.55 14 9.99 14ZM13.49 14C12.93 14 12.49 13.55 12.49 13C12.49 12.45 12.94 12 13.49 12C14.04 12 14.49 12.45 14.49 13C14.49 13.55 14.04 14 13.49 14Z",fill:"#323232"}),e.createElementVNode("path",{d:"M21.9802 6.79V10.79C21.9802 12.79 21.3602 14.15 20.1202 14.9C19.8202 15.08 19.4702 14.84 19.4702 14.49L19.4802 10.79C19.4802 6.79 17.1902 4.5 13.1902 4.5L7.10025 4.51C6.75025 4.51 6.51025 4.16 6.69025 3.86C7.44025 2.62 8.80025 2 10.7902 2H17.1902C20.3802 2 21.9802 3.6 21.9802 6.79Z",fill:"#323232"})],-1)])],8,Em),H.askAi?(e.openBlock(),e.createElementBlock("div",Sm)):e.createCommentVNode("",!0),H.askAi?(e.openBlock(),e.createElementBlock("div",Vm,[e.createElementVNode("div",{class:"dss-toolbar-ai-button dss-toolbar-ai-float dss-toolbar-dropdown-toggle",onClick:n[42]||(n[42]=e.withModifiers(s=>An("askAi"),["stop"])),title:e.unref(A)("textEditor.toolbar.askAi")},[n[88]||(n[88]=e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M3.97363 4.34473C5.4926 6.769 7.88838 8.45732 10.7598 9.01855C9.21102 10.2499 7.99851 11.8959 7.30762 13.8027C7.21982 14.066 6.82404 14.066 6.69238 13.8027C5.59521 10.7746 3.18158 8.40476 0.197266 7.30762C-0.0658032 7.21978 -0.0656958 6.82515 0.197266 6.69336C1.62341 6.17665 2.90369 5.36753 3.97363 4.34473Z",fill:"#9784ba"}),e.createElementVNode("path",{d:"M6.66895 0.197266C6.75687 -0.0657415 7.1515 -0.0657945 7.2832 0.197266C8.38035 3.22532 10.7941 5.5952 13.7783 6.69238C14.0416 6.78015 14.0416 7.17497 13.7783 7.30664C12.6735 7.71282 11.6469 8.29371 10.7363 9.01758C7.86425 8.45633 5.46822 6.76786 3.94922 4.34277C5.15088 3.1939 6.08858 1.77583 6.66895 0.197266Z",fill:"#cfbeed"})],-1)),e.createElementVNode("span",Bm,e.toDisplayString(e.unref(A)("textEditor.toolbar.askAi")),1)],8,Nm),ut.value==="askAi"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-dropdown",onClick:n[43]||(n[43]=e.withModifiers(()=>{},["stop"]))},[e.renderSlot(o.$slots,"ask-ai-dropdown")])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),Gl.value?(e.openBlock(),e.createElementBlock("div",Mm,[H.askAi&&Gl.value?(e.openBlock(),e.createElementBlock("div",_m)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.customToolbarSlots,(s,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r},[El(s)&&Fl(s)?(e.openBlock(),e.createElementBlock("div",$m,[e.renderSlot(o.$slots,s)])):e.createCommentVNode("",!0),El(s)&&Fl(s)&&r<H.customToolbarSlots.length-1&&sn(r)?(e.openBlock(),e.createElementBlock("div",Lm)):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0)],36)):e.createCommentVNode("",!0)]))],6))}}),Dm={class:"dss-color-picker__section-title"},Hm={class:"dss-color-picker__presets-row"},Rm=["title","onClick"],Fm={key:1,class:"dss-color-picker__section"},Im={class:"dss-color-picker__presets-row"},zm=["title","onClick"],Pm={key:2,class:"dss-color-picker__section"},Om={class:"dss-color-picker__section-header"},qm={class:"dss-color-picker__presets-row"},Wm=["title","onClick"],Zm=["onClick"],Um={key:1,class:"dss-color-picker__presets-row dss-color-picker__presets-row--standalone"},Xm=["title","onClick"],Ym={class:"dss-color-picker__input-row"},jm=["value"],Km={__name:"DSSColorPicker",props:{modelValue:{type:String,default:"#b8a5de"},disabled:{type:Boolean,default:!1},presetColors:{type:Array,default:()=>[]},presetGroups:{type:Array,default:null},max:{type:Number,default:12},initialPresetCount:{type:Number,default:null},disableCustomColors:{type:Boolean,default:!1}},emits:["update:modelValue","update:presetColors"],setup(H,{emit:ne}){function M(J){const Z=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(J);if(!Z)return{h:0,s:0,l:50};const X=parseInt(Z[1],16)/255,re=parseInt(Z[2],16)/255,fe=parseInt(Z[3],16)/255,Ge=Math.max(X,re,fe),Nt=Math.min(X,re,fe);let rl=0,St=0;const ll=(Ge+Nt)/2;if(Ge!==Nt){const S=Ge-Nt;switch(St=ll>.5?S/(2-Ge-Nt):S/(Ge+Nt),Ge){case X:rl=((re-fe)/S+(re<fe?6:0))/6;break;case re:rl=((fe-X)/S+2)/6;break;case fe:rl=((X-re)/S+4)/6;break}}return{h:rl*360,s:St*100,l:ll*100}}function A(J,Z,X){Z/=100,X/=100;const re=Z*Math.min(X,1-X),fe=Ge=>{const Nt=(Ge+J/30)%12,rl=X-re*Math.max(Math.min(Nt-3,9-Nt,1),-1);return Math.round(255*rl).toString(16).padStart(2,"0")};return`#${fe(0)}${fe(8)}${fe(4)}`}function ue(J){const Z=J.replace(/^#/,"").match(/^([a-f\d]{6}|[a-f\d]{3})$/i);if(!Z)return null;let X=Z[1];return X.length===3&&(X=X.split("").map(re=>re+re).join("")),"#"+X}function I(J){const Z=J.match(/^rgba?\(\s*(\d{1,3})[\s,]+(\d{1,3})[\s,]+(\d{1,3})(?:[\s,\/]+[\d.]+)?\s*\)$/i);if(!Z)return null;const X=Math.max(0,Math.min(255,Number.parseInt(Z[1],10))),re=Math.max(0,Math.min(255,Number.parseInt(Z[2],10))),fe=Math.max(0,Math.min(255,Number.parseInt(Z[3],10)));return`#${X.toString(16).padStart(2,"0")}${re.toString(16).padStart(2,"0")}${fe.toString(16).padStart(2,"0")}`}function $(J){if(typeof J!="string")return null;const Z=J.trim();return ue(Z)||I(Z)}function ve(J,Z,X){Z/=100,X/=100;const re=X+Z*Math.min(X,1-X),fe=re===0?0:2-2*X/re;return{h:J,s:fe*100,v:re*100}}function ct(J,Z,X){Z/=100,X/=100;const re=X*(1-Z/2),fe=re===0||re===1?0:(X-re)/Math.min(re,1-re);return{h:J,s:fe*100,l:re*100}}const Q=H,f=ne,we=e.ref(!1),Ce=e.ref(!1),G=e.ref(!1),U=e.ref(-1),pe=e.ref(-1),F=e.ref(null),Ee=e.ref(null),De=e.ref(null),tt=e.ref(null),pt=e.ref({top:0,left:0}),W=e.ref(M(Q.modelValue||"#b8a5de")),Ze=e.computed(()=>Array.isArray(Q.presetGroups)&&Q.presetGroups.length>0),qe=e.computed(()=>!Q.disableCustomColors),xe=e.computed(()=>Ze.value?0:Q.initialPresetCount!=null?Q.initialPresetCount:pe.value<0?null:pe.value),Me=e.computed(()=>{const J=xe.value;return J==null?!0:Math.max(0,Q.presetColors.length-J)<Q.max}),Ye=e.computed(()=>!!(Ce.value||U.value>=0||!ee.value&&Q.presetColors.length===0));e.computed(()=>{const J=xe.value;return J!=null&&Q.presetColors.length>J});const ee=e.computed(()=>Ze.value||xe.value!=null),lt=e.computed(()=>{const J=xe.value;return J==null?[]:Q.presetColors.slice(0,J)}),be=e.computed(()=>{const J=xe.value;return J==null?[]:Q.presetColors.slice(J)});function Je(J){const Z=xe.value;return Z!=null?Z+J:-1}function ut(J){const Z=xe.value;return Z!=null&&J>=Z}function Ct(J){ut(J)&&(U.value=J,W.value=M(Q.presetColors[J]),Ce.value=!0,e.nextTick(()=>tt.value?.focus()))}function Et(J){if(!ut(J))return;const Z=Q.presetColors.filter((fe,Ge)=>Ge!==J);f("update:presetColors",Z);const X=ue(Q.modelValue),re=ue(Q.presetColors[J]);if(X&&re&&X.toLowerCase()===re.toLowerCase()){const fe=Z[Math.max(0,J-1)]||Z[0];fe&&f("update:modelValue",fe)}}function Ht(){G.value=!G.value,G.value||(U.value=-1,Ce.value=!1)}function Pt(){if(!qe.value||U.value<0)return;const J=_e.value,Z=ue(J);if(Z){const X=[...Q.presetColors];X[U.value]=Z,f("update:presetColors",X),f("update:modelValue",Z),U.value=-1,Ce.value=!1}}function se(){Q.disabled||!qe.value||(U.value=-1,Ce.value=!Ce.value,Ce.value&&(ye(),e.nextTick(()=>tt.value?.focus())))}function ge(J){const Z=$(J),X=$(Q.modelValue);return Z&&X&&Z.toLowerCase()===X.toLowerCase()}function He(){if(Q.disabled||!qe.value||!Me.value)return;const J=_e.value,Z=ue(J);if(Z){const X=[...Q.presetColors,Z];f("update:presetColors",X),f("update:modelValue",Z);const re=xe.value??pe.value;re>=0&&X.length-re>=Q.max&&(Ce.value=!1)}}const _e=e.computed(()=>{const{h:J,s:Z,l:X}=W.value;return A(J,Z,X)}),Xt=e.computed(()=>_e.value.toLowerCase()),bt=e.computed(()=>({background:`linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${W.value.h}, 100%, 50%))`})),Gt=e.computed(()=>{const J=ve(W.value.h,W.value.s,W.value.l);return{left:`${J.s}%`,bottom:`${J.v}%`,transform:"translate(-50%, 50%)"}}),Lt=e.computed(()=>({left:`${W.value.h/360*100}%`,transform:"translateX(-50%)"})),qt=e.computed(()=>({position:"fixed",left:`${pt.value.left}px`,top:`${pt.value.top}px`,zIndex:1002}));function K(){if(!F.value||!we.value)return;const J=F.value.getBoundingClientRect(),Z=window.innerHeight||document.documentElement.clientHeight;let X=J.bottom+4;const re=Ee.value;re&&X+re.offsetHeight>Z-8&&(X=J.top-4-re.offsetHeight),pt.value={top:X,left:J.left}}function ye(){const J=Q.modelValue||"#b8a5de",Z=$(J);Z&&(W.value=M(Z))}function Be(){f("update:modelValue",_e.value)}function Ue(){Q.disabled||(we.value=!we.value,we.value&&(ye(),e.nextTick(()=>{K(),tt.value?.focus()})))}function Ke(){const J=_e.value,Z=ue(J);if(Z){if(U.value>=0){const X=[...Q.presetColors];X[U.value]=Z,f("update:presetColors",X),f("update:modelValue",Z)}else if(qe.value&&(Q.presetColors.length>0||Ze.value)&&Ce.value&&Me.value&&!Q.presetColors.some(re=>ue(re)?.toLowerCase()===Z.toLowerCase())){const re=[...Q.presetColors,Z];f("update:presetColors",re),f("update:modelValue",Z)}}we.value=!1,Ce.value=!1,G.value=!1,U.value=-1}function Tt(J){if(!De.value)return;const Z=De.value.getBoundingClientRect(),X=re=>{const fe=Math.max(0,Math.min(1,(re.clientX-Z.left)/Z.width)),Ge=Math.max(0,Math.min(1,1-(re.clientY-Z.top)/Z.height)),Nt={h:W.value.h,s:fe*100,v:Ge*100};W.value=ct(Nt.h,Nt.s,Nt.v)};X(J),document.addEventListener("mousemove",X),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",X),Be()},{once:!0})}function et(J){if(!J.currentTarget)return;const X=J.currentTarget.getBoundingClientRect(),re=fe=>{const Ge=Math.max(0,Math.min(1,(fe.clientX-X.left)/X.width));W.value={...W.value,h:Ge*360}};re(J),document.addEventListener("mousemove",re),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",re),Be()},{once:!0})}function Ot(J){const Z=J.target.value,X=$(Z);X&&(W.value=M(X),f("update:modelValue",X))}function We(J){if(Q.disabled)return;const Z=$(J);Z&&(W.value=M(Z),f("update:modelValue",Z))}let Fe=null,xt=null;function ft(){Fe&&(document.removeEventListener("keydown",Fe),Fe=null),xt&&(window.removeEventListener("resize",xt),xt=null)}return e.watch(we,J=>{if(ft(),J){if(!Ze.value&&Q.initialPresetCount==null){const Z=Q.presetColors.length;Z>0&&(pe.value<0||Z<pe.value)&&(pe.value=Z)}Fe=Z=>{Z.key==="Escape"&&Ke()},xt=K,document.addEventListener("keydown",Fe),window.addEventListener("resize",xt)}}),e.watch(()=>Q.modelValue,()=>{we.value&&ye()},{immediate:!1}),e.watch(be,J=>{J.length===0&&(G.value=!1,U.value=-1,Ce.value=!1)}),e.onBeforeUnmount(ft),(J,Z)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-color-picker",{"dss-color-picker--disabled":H.disabled}])},[e.createElementVNode("div",{ref_key:"triggerRef",ref:F,class:e.normalizeClass(["dss-color-picker__trigger",{"dss-color-picker__trigger--open":we.value}]),onClick:Ue},[e.createElementVNode("span",{class:"dss-color-picker__swatch",style:e.normalizeStyle({backgroundColor:_e.value})},[...Z[0]||(Z[0]=[e.createElementVNode("span",{class:"dss-color-picker__hover-layer"},[e.createElementVNode("svg",{class:"dss-color-picker__pen-icon",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[e.createElementVNode("path",{d:"M0 9.64033V11.6667C0 11.8534 0.146646 12 0.333287 12H2.35967C2.44633 12 2.53298 11.9667 2.59297 11.9L9.87196 4.62769L7.37231 2.12804L0.0999862 9.40036C0.0333288 9.46702 0 9.54701 0 9.64033ZM11.805 2.69463C12.065 2.43466 12.065 2.01472 11.805 1.75476L10.2452 0.194973C9.98528 -0.064991 9.56534 -0.064991 9.30537 0.194973L8.08554 1.4148L10.5852 3.91446L11.805 2.69463Z",fill:"currentColor"})])],-1)])],4)],2),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[we.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-color-picker__overlay",onClick:e.withModifiers(Ke,["self"])},[e.createElementVNode("div",{ref_key:"dropdownRef",ref:Ee,class:"dss-color-picker__dropdown",style:e.normalizeStyle(qt.value)},[ee.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[Ze.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(H.presetGroups,(X,re)=>(e.openBlock(),e.createElementBlock("div",{key:"g-"+re,class:"dss-color-picker__section"},[e.createElementVNode("span",Dm,e.toDisplayString(X.title),1),e.createElementVNode("div",Hm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(X.colors,(fe,Ge)=>(e.openBlock(),e.createElementBlock("button",{key:"g-"+re+"-"+Ge,type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":ge(fe)}]),style:e.normalizeStyle({backgroundColor:fe,"--dss-preset-color":fe}),title:fe,onClick:e.withModifiers(Nt=>We(fe),["stop"])},null,14,Rm))),128))])]))),128)):lt.value.length?(e.openBlock(),e.createElementBlock("div",Fm,[Z[1]||(Z[1]=e.createElementVNode("span",{class:"dss-color-picker__section-title"},"Preset colors",-1)),e.createElementVNode("div",Im,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(lt.value,(X,re)=>(e.openBlock(),e.createElementBlock("button",{key:"p-"+re,type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":ge(X)}]),style:e.normalizeStyle({backgroundColor:X,"--dss-preset-color":X}),title:X,onClick:e.withModifiers(fe=>We(X),["stop"])},null,14,zm))),128))])])):e.createCommentVNode("",!0),qe.value?(e.openBlock(),e.createElementBlock("div",Pm,[e.createElementVNode("div",Om,[Z[3]||(Z[3]=e.createElementVNode("span",{class:"dss-color-picker__section-title"},"Custom Colors",-1)),be.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-color-picker__manage-icon",{"dss-color-picker__manage-icon--active":G.value}]),title:"Manage custom colors",onClick:e.withModifiers(Ht,["stop"])},[...Z[2]||(Z[2]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M0 9.64V11.67c0 .19.15.33.33.33h2.03c.09 0 .17-.03.23-.1l7.28-7.27-2.5-2.5L.1 9.4A.33.33 0 0 0 0 9.64ZM11.8 2.69c.26-.26.26-.68 0-.94L10.25.2a.66.66 0 0 0-.94 0L8.09 1.41l2.5 2.5 1.22-1.22Z",fill:"currentColor"})],-1)])],2)):e.createCommentVNode("",!0)]),e.createElementVNode("div",qm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(be.value,(X,re)=>(e.openBlock(),e.createElementBlock("div",{key:"c-"+re,class:e.normalizeClass(["dss-color-picker__preset-wrap",{"dss-color-picker__preset-wrap--manage":G.value}])},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":!G.value&&ge(X),"dss-color-picker__preset-bubble--editing":G.value&&U.value===Je(re)}]),style:e.normalizeStyle({backgroundColor:U.value===Je(re)?_e.value:X,"--dss-preset-color":U.value===Je(re)?_e.value:X}),title:U.value===Je(re)?_e.value:X,onClick:e.withModifiers(fe=>G.value?Ct(Je(re)):We(X),["stop"])},null,14,Wm),G.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-color-picker__preset-action dss-color-picker__preset-action--delete",title:"Delete",onClick:e.withModifiers(fe=>Et(Je(re)),["stop"])},[...Z[4]||(Z[4]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M2 2l8 8M10 2L2 10",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})],-1)])],8,Zm)):e.createCommentVNode("",!0)],2))),128)),Me.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-color-picker__add-bubble",{"dss-color-picker__add-bubble--active":Ce.value}]),onClick:e.withModifiers(se,["stop"])}," + ",2)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)],64)):H.presetColors.length?(e.openBlock(),e.createElementBlock("div",Um,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.presetColors,(X,re)=>(e.openBlock(),e.createElementBlock("button",{key:re,type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":ge(X)}]),style:e.normalizeStyle({backgroundColor:X,"--dss-preset-color":X}),title:X,onClick:e.withModifiers(fe=>We(X),["stop"])},null,14,Xm))),128)),qe.value&&Me.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-color-picker__add-bubble",{"dss-color-picker__add-bubble--active":Ce.value}]),onClick:e.withModifiers(se,["stop"])}," + ",2)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),Ye.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",{class:"dss-color-picker__sl-area",ref_key:"slAreaRef",ref:De,onMousedown:Tt},[e.createElementVNode("div",{class:"dss-color-picker__sl-bg",style:e.normalizeStyle(bt.value)},null,4),e.createElementVNode("div",{class:"dss-color-picker__sl-pointer",style:e.normalizeStyle(Gt.value)},null,4)],544),e.createElementVNode("div",{class:"dss-color-picker__hue-wrap",onMousedown:et},[Z[5]||(Z[5]=e.createElementVNode("div",{class:"dss-color-picker__hue-track"},null,-1)),e.createElementVNode("div",{class:"dss-color-picker__hue-pointer",style:e.normalizeStyle(Lt.value)},null,4)],32),e.createElementVNode("div",Ym,[e.createElementVNode("input",{ref_key:"hexInputRef",ref:tt,type:"text",class:"dss-color-picker__hex-input",value:Xt.value,onInput:Ot},null,40,jm)]),qe.value&&ee.value&&(H.presetColors.length||Ze.value)&&Me.value&&U.value<0?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-color-picker__add-btn",onClick:He}," Save color ")):e.createCommentVNode("",!0),qe.value&&ee.value&&U.value>=0?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"dss-color-picker__add-btn",onClick:Pt}," Save color ")):e.createCommentVNode("",!0),ee.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:"dss-color-picker__add-btn",onClick:Ke}," Save color "))],64)):e.createCommentVNode("",!0)],4)])):e.createCommentVNode("",!0)]))],2))}},Gm={key:0,class:"dss-loader"},Qm={key:0,class:"dss-loader-label"},Jm={key:1,class:"dss-loader"},e2={key:0,class:"dss-loader-label"},t2={key:2,class:"dss-loader"},l2={key:0,class:"dss-loader-label"},n2={key:3,class:"dss-loader"},o2={key:0,class:"dss-loader-label"},a2={key:4,class:"dss-loader"},s2={key:0,class:"dss-loader-label"},r2={key:5,class:"dss-loader dss-loader--inline"},i2={class:"dss-loader-inline-text"},c2={__name:"DSSLoaders",props:{type:{type:String,default:"spinner"},label:{type:String,default:""},size:{type:[String,Number],default:"medium"},color:{type:String,default:""}},setup(H){const ne=H,M=e.computed(()=>ne.size==="small"?"dss-loaders--size-small":ne.size==="large"?"dss-loaders--size-large":ne.size==="medium"||ne.size==null?"dss-loaders--size-medium":null),A=e.computed(()=>{const ue={};if(!(ne.size==="small"||ne.size==="medium"||ne.size==="large"||ne.size==null)){const I=typeof ne.size=="number"?`${ne.size}px`:String(ne.size);ue["--dss-loader-size"]=I}return ne.color&&(ue["--dss-loader-accent"]=ne.color,ue["--dss-loader-accent-soft"]=`color-mix(in srgb, ${ne.color} 30%, white)`),ue});return(ue,I)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-loaders",M.value]),style:e.normalizeStyle(A.value)},[H.type==="spinner"?(e.openBlock(),e.createElementBlock("div",Gm,[I[0]||(I[0]=e.createElementVNode("span",{class:"dss-loader-spinner","aria-hidden":"true"},null,-1)),H.label?(e.openBlock(),e.createElementBlock("span",Qm,e.toDisplayString(H.label),1)):e.createCommentVNode("",!0)])):H.type==="dots"?(e.openBlock(),e.createElementBlock("div",Jm,[I[1]||(I[1]=e.createElementVNode("span",{class:"dss-loader-dots","aria-hidden":"true"},[e.createElementVNode("span",{class:"dss-loader-dot"}),e.createElementVNode("span",{class:"dss-loader-dot"}),e.createElementVNode("span",{class:"dss-loader-dot"})],-1)),H.label?(e.openBlock(),e.createElementBlock("span",e2,e.toDisplayString(H.label),1)):e.createCommentVNode("",!0)])):H.type==="battery"?(e.openBlock(),e.createElementBlock("div",t2,[I[2]||(I[2]=e.createElementVNode("div",{class:"battery","aria-hidden":"true"},null,-1)),H.label?(e.openBlock(),e.createElementBlock("span",l2,e.toDisplayString(H.label),1)):e.createCommentVNode("",!0)])):H.type==="double-circle"?(e.openBlock(),e.createElementBlock("div",n2,[I[3]||(I[3]=e.createElementVNode("span",{class:"dss-loader-double-circle","aria-hidden":"true"},[e.createElementVNode("span",{class:"dss-loader-double-circle-outer"}),e.createElementVNode("span",{class:"dss-loader-double-circle-inner"})],-1)),H.label?(e.openBlock(),e.createElementBlock("span",o2,e.toDisplayString(H.label),1)):e.createCommentVNode("",!0)])):H.type==="bars"?(e.openBlock(),e.createElementBlock("div",a2,[I[4]||(I[4]=e.createElementVNode("span",{class:"dss-loader-bars","aria-hidden":"true"},[e.createElementVNode("span",{class:"dss-loader-bar"}),e.createElementVNode("span",{class:"dss-loader-bar"}),e.createElementVNode("span",{class:"dss-loader-bar"})],-1)),H.label?(e.openBlock(),e.createElementBlock("span",s2,e.toDisplayString(H.label),1)):e.createCommentVNode("",!0)])):H.type==="inline"?(e.openBlock(),e.createElementBlock("div",r2,[I[5]||(I[5]=e.createElementVNode("span",{class:"dss-loader-inline-spinner","aria-hidden":"true"},null,-1)),e.createElementVNode("span",i2,[e.renderSlot(ue.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(H.label),1)])])])):e.createCommentVNode("",!0)],6))}},ca="dss-skeleton-item",u2={__name:"DSSSkeleton",props:{loading:{type:Boolean,default:!1},darkMode:{type:Boolean,default:!1},borderRadius:{type:String,default:"16px"},shimmer:{type:Boolean,default:!0},mode:{type:String,default:"single",validator:H=>["single","multiple"].includes(H)},targetClass:{type:String,default:ca},bgColor:{type:String,default:null},shimmerColor:{type:String,default:null},bgDark:{type:String,default:null},shimmerDark:{type:String,default:null}},setup(H){const ne=H,M=e.computed(()=>{const I={"dss-skeleton--loading":ne.loading,"dss-skeleton--static":!ne.shimmer,"dss-skeleton--multiple":ne.mode==="multiple","dss-skeleton--dark":ne.darkMode};return ne.mode==="multiple"&&ne.targetClass!==ca&&(I[`dss-skeleton--target-${ne.targetClass}`]=!0),I}),A=e.computed(()=>{const I={};return ne.borderRadius&&(I.borderRadius=ne.borderRadius),I}),ue=e.computed(()=>{const I={};return ne.borderRadius&&(I["--dss-skeleton-border-radius"]=ne.borderRadius),ne.darkMode?(I["--dss-skeleton-bg"]=ne.bgDark||"#322c3f",I["--dss-skeleton-shimmer"]=ne.shimmerDark||"#3e3f41",I):(ne.bgColor&&(I["--dss-skeleton-bg"]=ne.bgColor),ne.shimmerColor&&(I["--dss-skeleton-shimmer"]=ne.shimmerColor),I)});return(I,$)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-skeleton",M.value]),style:e.normalizeStyle(ue.value)},[H.loading&&H.mode==="single"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-skeleton-overlay",style:e.normalizeStyle(A.value),"aria-hidden":"true"},null,4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["dss-skeleton-content",{"dss-skeleton-content--hidden":H.loading&&H.mode==="single"}])},[e.renderSlot(I.$slots,"default")],2)],6))}},d2={key:0,class:"dss-dnd-column-header"},m2={class:"dss-dnd-column-title"},p2={class:"dss-dnd-column-count"},f2=["data-column"],v2={key:0,class:"dss-dnd-indicator"},g2=["onPointerdown"],h2=["onPointerdown"],y2={class:"dss-dnd-item-content"},k2={class:"dss-dnd-item-default"},C2={key:0,class:"dss-dnd-empty"},b2={name:"DSSDnd"},w2=Object.assign(b2,{props:{items:{type:Array,required:!0},columns:{type:Array,required:!0},columnKey:{type:String,default:"status"},positionKey:{type:String,default:"position"},itemKey:{type:String,default:"id"},options:{type:Object,default:()=>({})}},emits:["move","delete"],setup(H,{emit:ne}){const M=H,A=ne,ue=e.useSlots(),I=e.computed(()=>!!ue["delete-zone"]),$={columnMinWidth:"280px",columnMaxWidth:"none",columnGap:"12px",indicatorColor:"#7c6bc4",dragGhostOpacity:.75,dragSourceBackground:"#f5f5f5",dragSourceBorder:"#e0e0e0",useHandle:!1,columnBodyMaxHeight:"none",showHeader:!0,unstyled:!1,deleteZoneAlwaysVisible:!1,ColColor:!1},ve=e.computed(()=>({...$,...M.options})),ct=e.computed(()=>({"--dss-dnd-col-min-w":ve.value.columnMinWidth,"--dss-dnd-col-max-w":ve.value.columnMaxWidth,"--dss-dnd-col-gap":ve.value.columnGap,"--dss-dnd-indicator-color":ve.value.indicatorColor,"--dss-dnd-body-max-h":ve.value.columnBodyMaxHeight}));function Q(K){if(!ve.value.ColColor||!K)return{};const ye=K.background||K.color;return ye?{background:ye}:{}}const f=e.ref(null),we=e.ref(null),Ce=e.ref(!1),G=e.ref(-1),U=e.ref(null);let pe=null,F=null,Ee=null,De=null,tt=0,pt=0,W="",Ze=null;const qe=5,xe=e.computed(()=>{const K={};for(const ye of M.columns)K[ye.value]=M.items.filter(Be=>Be[M.columnKey]===ye.value).sort((Be,Ue)=>(Be[M.positionKey]??0)-(Ue[M.positionKey]??0));return K}),Me=e.computed(()=>{const K={},ye=!!f.value,Be=f.value?.[M.itemKey],Ue=we.value,Ke=G.value;for(const Tt of M.columns){const et=xe.value[Tt.value]||[],Ot=[],We=Ue==Tt.value;let Fe=0;for(let xt=0;xt<et.length;xt++){const ft=et[xt],J=ye&&ft[M.itemKey]===Be;!J&&We&&Ke===Fe&&Ot.push({type:"indicator",key:`ind-${Fe}`}),J||Fe++,Ot.push({type:"item",item:ft,isDragged:J,key:`item-${ft[M.itemKey]}`})}We&&Ke>=Fe&&Ot.push({type:"indicator",key:"ind-end"}),K[Tt.value]=Ot}return K});function Ye(K,ye){const Ue=(xe.value[K]||[]).filter(et=>et[M.itemKey]!==f.value?.[M.itemKey]);if(Ue.length===0)return 1;if(ye<=0){const et=Ue[0][M.positionKey];return et!=null&&et>0?et/2:.5}if(ye>=Ue.length){const et=Ue[Ue.length-1][M.positionKey];return(et??0)+1}const Ke=Ue[ye-1][M.positionKey]??0,Tt=Ue[ye][M.positionKey]??0;return(Ke+Tt)/2}function ee(K,ye,Be){Ee&&Ee.remove();const Ue=K.getBoundingClientRect(),Ke=K.cloneNode(!0);Ke.classList.add("dss-dnd-ghost"),Ke.style.cssText=`
|
|
104
104
|
position: fixed;
|
|
105
|
-
left: ${
|
|
106
|
-
top: ${Be-
|
|
107
|
-
width: ${
|
|
108
|
-
height: ${
|
|
105
|
+
left: ${ye-tt}px;
|
|
106
|
+
top: ${Be-pt}px;
|
|
107
|
+
width: ${Ue.width}px;
|
|
108
|
+
height: ${Ue.height}px;
|
|
109
109
|
z-index: 9999;
|
|
110
110
|
pointer-events: none;
|
|
111
|
-
opacity: ${
|
|
111
|
+
opacity: ${ve.value.dragGhostOpacity};
|
|
112
112
|
box-sizing: border-box;
|
|
113
113
|
box-shadow: 0 8px 24px rgba(0,0,0,0.15);
|
|
114
|
-
background-color: ${
|
|
114
|
+
background-color: ${ve.value.dragSourceBackground};
|
|
115
115
|
font-family: 'Work Sans', sans-serif;
|
|
116
116
|
cursor: grabbing;
|
|
117
|
-
`,document.body.appendChild(Ke),xe=Ke}function ze(J,he){xe&&(xe.style.left=`${J-nt}px`,xe.style.top=`${he-ft}px`)}function we(J){J.classList.add("dss-dnd-item--dragging"),J.style.background=fe.value.dragSourceBackground,J.style.borderColor=fe.value.dragSourceBorder,J.style.transform="scale(0.97)"}function it(J){J.classList.remove("dss-dnd-item--dragging"),J.style.background="",J.style.borderColor="",J.style.transform=""}function ot(J,he){return document.elementFromPoint(J,he)?.closest(".dss-dnd-column-body")??null}function bt(J,he){return!!document.elementFromPoint(J,he)?.closest("[data-dss-dnd-delete-zone]")}function It(J,he){if(I.value&&bt(J,he)){Ce.value=!0,be.value=null,G.value=-1;return}Ce.value=!1;const Be=ot(J,he),Xe=Be?.getAttribute("data-column")??null;if(!Xe){be.value=null,G.value=-1;return}be.value=Xe;const Ke=Be.querySelectorAll(".dss-dnd-item:not(.dss-dnd-item--dragging)");let Lt=Ke.length;for(let Ge=0;Ge<Ke.length;Ge++){const Dt=Ke[Ge].getBoundingClientRect();if(he<Dt.top+Dt.height/2){Lt=Ge;break}}G.value=Lt}function en(J){J.preventDefault(),ze(J.clientX,J.clientY),!me&&(me=requestAnimationFrame(()=>{me=null,It(J.clientX,J.clientY)}))}function Pt(J){window.removeEventListener("pointermove",en),window.removeEventListener("pointerup",Pt),window.removeEventListener("pointercancel",Pt),Ae?.releasePointerCapture?.(J.pointerId),it(Ae),Ae=null;const he=I.value&&bt(J.clientX,J.clientY);if(f.value&&he)L("delete",{item:f.value});else{const Xe=ot(J.clientX,J.clientY)?.getAttribute("data-column")??null;if(f.value&&Xe){const Ke=f.value[M.columnKey],Lt=Xe,Dt=(Ee.value[Lt]||[]).filter(St=>St[M.itemKey]!==f.value[M.itemKey]),He=Math.max(0,Math.min(G.value,Dt.length)),Pe=je(Lt,He),Et=f.value[M.itemKey];L("move",{item:f.value,from:Ke,to:Lt,position:Pe,index:He}),R&&clearTimeout(R),U.value={id:Et,from:Ke,to:Lt},R=setTimeout(()=>{U.value=null},3500)}}xe&&(xe.remove(),xe=null),Z!==null&&(document.body.style.cursor=Z,Z=""),Ot()}function oe(J,he){J.preventDefault();const Be=J.target.closest(".dss-dnd-item");if(!Be)return;const Xe=Be.getBoundingClientRect();nt=J.clientX-Xe.left,ft=J.clientY-Xe.top,Z=document.body.style.cursor,document.body.style.cursor="grabbing",f.value=he,Ae=Be,Q(Be,J.clientX,J.clientY),requestAnimationFrame(()=>we(Be)),Be.setPointerCapture?.(J.pointerId),window.addEventListener("pointermove",en),window.addEventListener("pointerup",Pt,{once:!0}),window.addEventListener("pointercancel",Pt,{once:!0})}function ve(){Ue&&(window.removeEventListener("pointermove",Fe),window.removeEventListener("pointerup",De),window.removeEventListener("pointercancel",De),Ue=null)}function Fe(J){if(!Ue||J.pointerId!==Ue.pointerId)return;const he=J.clientX-Ue.startX,Be=J.clientY-Ue.startY;if(Math.abs(he)>=qe||Math.abs(Be)>=qe){const Xe=Ue.item;ve(),oe(J,Xe)}}function De(J){!Ue||J.pointerId!==Ue.pointerId||ve()}function Zt(J,he){ve(),Ue={item:he,startX:J.clientX,startY:J.clientY,pointerId:J.pointerId},window.addEventListener("pointermove",Fe),window.addEventListener("pointerup",De),window.addEventListener("pointercancel",De)}function yt(J,he){fe.value.useHandle||Zt(J,he)}function Ut(J,he){Zt(J,he)}function xt(){me&&(cancelAnimationFrame(me),me=null)}function Ot(){xt(),f.value=null,be.value=null,Ce.value=!1,G.value=-1}return e.onBeforeUnmount(()=>{xt(),ve(),R&&clearTimeout(R),xe&&(xe.remove(),xe=null)}),(J,he)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-dnd",{"dss-dnd--unstyled":fe.value.unstyled}]),style:e.normalizeStyle(dt.value)},[I.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["dss-dnd-delete-zone",{"dss-dnd-delete-zone--drag-over":Ce.value}]),"data-dss-dnd-delete-zone":""},[e.renderSlot(J.$slots,"delete-zone",{isDragging:!!f.value,isOver:Ce.value})],2),[[e.vShow,!!f.value||fe.value.deleteZoneAlwaysVisible]])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.columns,Be=>(e.openBlock(),e.createElementBlock("div",{key:Be.value,class:e.normalizeClass(["dss-dnd-column",[{"dss-dnd-column--drag-over":be.value==Be.value},Be.class||""]]),style:e.normalizeStyle(ee(Be))},[fe.value.showHeader?(e.openBlock(),e.createElementBlock("div",s2,[e.renderSlot(J.$slots,"column-header",{column:Be,items:Ee.value[Be.value]||[]},()=>[e.createElementVNode("span",r2,e.toDisplayString(Be.title||Be.value),1),e.createElementVNode("span",i2,e.toDisplayString((Ee.value[Be.value]||[]).length),1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"dss-dnd-column-body","data-column":Be.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Me.value[Be.value],Xe=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:Xe.key},[Xe.type==="indicator"?(e.openBlock(),e.createElementBlock("div",u2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-dnd-item",{"dss-dnd-item--dragging":Xe.isDragged,"dss-dnd-item--no-handle":!fe.value.useHandle}]),onPointerdown:Ke=>yt(Ke,Xe.item)},[fe.value.useHandle?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-dnd-handle",onPointerdown:e.withModifiers(Ke=>Ut(Ke,Xe.item),["stop"])},[e.renderSlot(J.$slots,"handle",{},()=>[he[0]||(he[0]=e.createElementVNode("span",{class:"dss-dnd-handle-icon"},"⠿",-1))])],40,m2)):e.createCommentVNode("",!0),e.createElementVNode("div",p2,[e.renderSlot(J.$slots,"item",{item:Xe.item,column:Be,justDropped:U.value?.id===Xe.item[D.itemKey],droppedFrom:U.value?.id===Xe.item[D.itemKey]?U.value.from:null,droppedTo:U.value?.id===Xe.item[D.itemKey]?U.value.to:null},()=>[e.createElementVNode("div",f2,e.toDisplayString(Xe.item[D.itemKey]),1)])])],42,d2))],64))),128)),(Ee.value[Be.value]||[]).length===0&&be.value!=Be.value?(e.openBlock(),e.createElementBlock("div",v2,[e.renderSlot(J.$slots,"empty",{column:Be},()=>[he[1]||(he[1]=e.createElementVNode("span",{class:"dss-dnd-empty-text"},"No items",-1))])])):e.createCommentVNode("",!0)],8,c2)],6))),128))],6))}}),y2={name:"DSSConfetti"},k2=Object.assign(y2,{props:{trigger:{type:Boolean,default:!1},duration:{type:Number,default:3e3},fadeStart:{type:Number,default:2e3},count:{type:Number,default:90},colors:{type:Array,default:()=>["#047395","#ffc230","#0897c1","#fe3b59","#11e1a2","#b3b2fb","#fadb8d","#ffa25b","#feaab1"]},delay:{type:Number,default:300}},setup(D){const le=D,M=e.ref(null),L=e.ref(!1);let de=[],I=null,T=null;function fe(G,U){const me=[];for(let R=0;R<le.count;R++)me.push(dt(G));return me}function dt(G,U){return{x:Math.random()*G,y:-Math.random()*150-20,r:Math.random()*8+3,d:Math.random()*50,color:le.colors[Math.floor(Math.random()*le.colors.length)],tilt:Math.floor(Math.random()*10)-10,tiltInc:Math.random()*.08+.04,tiltAngle:0,opacity:Math.random()*.7+.3,speed:Math.random()*4+1.5}}function ee(G,U,me,R){G.clearRect(0,0,U,me);for(const xe of de)G.save(),G.globalAlpha=xe.opacity*R,G.beginPath(),G.lineWidth=xe.r,G.strokeStyle=xe.color,G.moveTo(xe.x+xe.tilt+xe.r/2,xe.y),G.lineTo(xe.x+xe.tilt,xe.y+xe.tilt+xe.r/2),G.stroke(),G.restore()}function f(G,U,me){const R=.3+me*.7;for(let xe=0;xe<de.length;xe++){const Ae=de[xe];Ae.tiltAngle+=Ae.tiltInc,Ae.y+=Ae.speed*R,Ae.x+=Math.sin(Ae.d)*.5*R,Ae.tilt=Math.sin(Ae.tiltAngle)*15,me>=.99&&Ae.y>U+20&&(de[xe]=dt(G))}}function be(){L.value=!0,e.nextTick(()=>{const G=M.value;if(!G)return;const U=G.getContext("2d"),me=G.parentElement;if(!me)return;const R=me.getBoundingClientRect();G.width=R.width,G.height=R.height,de=fe(G.width,G.height);const xe=Date.now(),Ae=xe+le.duration,nt=()=>{const ft=Date.now(),Z=ft-xe;if(ft<Ae){let Ue=1;Z>le.fadeStart&&(Ue=1-(Z-le.fadeStart)/(le.duration-le.fadeStart)),ee(U,G.width,G.height,Ue),f(G.width,G.height,Ue),I=requestAnimationFrame(nt)}else Ce()};nt()})}function Ce(){I&&(cancelAnimationFrame(I),I=null),de=[],L.value=!1}return e.watch(()=>le.trigger,G=>{G&&(T&&clearTimeout(T),T=setTimeout(be,le.delay))},{immediate:!0}),e.onBeforeUnmount(()=>{Ce(),T&&clearTimeout(T)}),(G,U)=>L.value?(e.openBlock(),e.createElementBlock("canvas",{key:0,ref_key:"canvasRef",ref:M,class:"dss-confetti-canvas"},null,512)):e.createCommentVNode("",!0)}}),C2={class:"dss-filter-global-inner"},b2=["placeholder","value"],w2=["title"],x2={key:0,class:"dss-filter-funnel-badge"},E2={key:1,class:"dss-filter-sortby"},S2=["value"],V2=["value"],N2=["disabled","title"],B2={key:0,class:"dss-filter-sortby-order-icon",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},M2={key:1,class:"dss-filter-sortby-order-icon",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_2={key:2,class:"dss-filter-sortby-order-icon",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$2={class:"dss-filter-panel"},L2={key:0,class:"dss-filter-empty"},T2={class:"dss-filter-row-prefix"},A2={class:"dss-filter-cell"},D2=["onClick"],H2={class:"dss-filter-trigger-text"},R2=["placeholder"],F2={class:"dss-filter-popup-list"},I2=["onClick"],z2={key:0,class:"dss-filter-popup-empty"},P2={key:0,class:"dss-filter-cell"},O2=["onClick"],q2={class:"dss-filter-trigger-text"},W2={class:"dss-filter-popup-list"},Z2=["onClick"],U2={key:1,class:"dss-filter-cell dss-filter-cell--value"},X2=["placeholder","onUpdate:modelValue"],Y2={key:1,class:"dss-filter-date-wrap"},j2=["placeholder","onUpdate:modelValue"],K2=["placeholder","value","onInput","step"],G2={key:4,class:"dss-filter-between"},Q2=["placeholder","value","onInput","step"],J2={class:"dss-filter-between-sep"},e0=["placeholder","value","onInput","step"],t0={key:5,class:"dss-filter-multiselect"},n0=["onClick"],l0={class:"dss-filter-trigger-text"},o0=["placeholder"],a0={class:"dss-filter-popup-list dss-filter-popup-list--check"},s0=["onClick"],r0=["checked"],i0={key:0,class:"dss-filter-popup-empty"},c0=["onClick"],u0={class:"dss-filter-foot"},d0={class:"dss-filter-cell"},m0=["placeholder"],p0={class:"dss-filter-popup-list"},f0=["onClick"],v0={key:0,class:"dss-filter-popup-divider"},g0=["onClick"],h0=["placeholder"],y0={class:"dss-filter-popup-list"},k0=["onClick"],C0={key:0,class:"dss-filter-popup-empty"},b0=["placeholder"],w0={class:"dss-filter-popup-list"},x0=["onClick"],E0={key:0,class:"dss-filter-popup-empty"},S0={name:"DSSFilter"},V0=Object.assign(S0,{props:{data:{type:Array,required:!0},modelValue:{type:Array,default:void 0},exclude:{type:Array,default:()=>[]},config:{type:Object,default:()=>({})},options:{type:Object,default:()=>({})},showSortBy:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(D,{expose:le,emit:M}){const{t:L}=eo.useI18n(),de=D,I=M,T={unstyled:!1,maxUniqueForSelect:30,maxUniqueForEnum:15},fe=e.computed(()=>({...T,...de.options})),dt={text:[{value:"contains"},{value:"not_contains"},{value:"equals"},{value:"not_equals"},{value:"starts_with"},{value:"ends_with"},{value:"is_empty"},{value:"is_not_empty"}],select:[{value:"is_any_of"},{value:"is_none_of"},{value:"is_empty"},{value:"is_not_empty"}],range:[{value:"eq"},{value:"neq"},{value:"gt"},{value:"gte"},{value:"lt"},{value:"lte"},{value:"between"},{value:"is_empty"},{value:"is_not_empty"}],int:[{value:"eq"},{value:"neq"},{value:"gt"},{value:"gte"},{value:"lt"},{value:"lte"},{value:"between"},{value:"is_empty"},{value:"is_not_empty"}],arraySelect:[{value:"contains_any"},{value:"contains_all"},{value:"not_contains_any"},{value:"is_empty"},{value:"is_not_empty"}],arrayText:[{value:"contains"},{value:"not_contains"},{value:"is_empty"},{value:"is_not_empty"}],date:[{value:"eq"},{value:"before"},{value:"after"},{value:"is_empty"},{value:"is_not_empty"}],boolean:[{value:"is_true"},{value:"is_false"},{value:"is_empty"},{value:"is_not_empty"}]},ee=new Set(["is_empty","is_not_empty","is_true","is_false"]),f=["label","name","title","keyword","full_name","value","text"],be=e.ref(""),Ce=e.ref([]),G=e.ref(null),U=e.ref(!1),me=e.ref(null),R=e.ref(""),xe=e.ref(null),Ae=e.ref(""),nt=e.ref("asc");let ft=1;function Z(S){const b=S.find(V=>V&&typeof V=="object");if(!b)return null;for(const V of f)if(V in b&&typeof b[V]=="string")return V;return Object.keys(b).find(V=>typeof b[V]=="string")||null}function Ue(S,b){const V=b.filter(Y=>Y!=null&&Y!=="NULL");if(V.length===0)return null;if(V.every(Y=>Array.isArray(Y))){const Y=V.flatMap(Oe=>Oe).filter(Oe=>Oe!=null);return Y.length===0?null:typeof Y.find(Oe=>Oe!=null)=="object"?"arraySelect":"arrayText"}return V.every(Y=>typeof Y=="boolean")?"boolean":V.every(Y=>typeof Y=="number")?new Set(V).size<=fe.value.maxUniqueForEnum?"select":"range":V.every(Y=>typeof Y=="string")?new Set(V).size<=fe.value.maxUniqueForSelect?"select":"text":V.some(Y=>typeof Y=="object"&&!Array.isArray(Y))?null:"text"}const qe=e.computed(()=>{if(!de.data?.length)return[];const S=new Set;for(const ne of de.data)if(ne&&typeof ne=="object")for(const Oe of Object.keys(ne))S.add(Oe);const b=new Set(de.exclude),V=[];for(const ne of S){if(b.has(ne))continue;const Oe=de.config[ne]||{},mt=de.data.map(wt=>wt?.[ne]),ct=Oe.type||Ue(ne,mt);if(!ct)continue;const We=Oe.filterMode||"contain",Vt=We==="date"?"date":We==="string"?"text":ct,Nt={key:ne,label:Oe.label||vt(ne),type:Vt,filterMode:We};if(ct==="select"){const wt=mt.filter(Ct=>Ct!=null&&Ct!=="NULL");Nt.uniqueValues=[...new Set(wt)].sort((Ct,At)=>typeof Ct=="number"&&typeof At=="number"?Ct-At:String(Ct).localeCompare(String(At)))}else if(ct==="range"||ct==="int"){const wt=mt.filter(Ct=>typeof Ct=="number");Nt.min=Math.min(...wt),Nt.max=Math.max(...wt)}else if(ct==="arraySelect"){const wt=Oe.displayKey||Z(mt.flatMap(Ct=>Array.isArray(Ct)?Ct:[]));if(Nt.displayKey=wt,Array.isArray(Oe.uniqueValues)&&Oe.uniqueValues.length>0)Nt.uniqueValues=Oe.uniqueValues.map(Ct=>String(Ct));else{const Ct=mt.flatMap(At=>Array.isArray(At)?At:[]).filter(At=>At!=null).map(At=>wt&&typeof At=="object"?At[wt]:String(At)).filter(At=>At!=null&&At!=="");Nt.uniqueValues=[...new Set(Ct)].sort((At,Bt)=>String(At).localeCompare(String(Bt)))}}V.push(Nt)}const Y=de.config._order;return Y&&V.sort((ne,Oe)=>{const mt=Y.indexOf(ne.key),ct=Y.indexOf(Oe.key);return mt===-1&&ct===-1?0:mt===-1?1:ct===-1?-1:mt-ct}),V}),Ee=e.computed(()=>{const S={};for(const b of qe.value)S[b.key]=b;return S}),Me=e.computed(()=>Array.isArray(de.config.groups)&&de.config.groups.length>0),je=e.computed(()=>{if(!Me.value)return[];const S=new Set(qe.value.map(b=>b.key));return de.config.groups.map(b=>({...b,keys:b.keys.filter(V=>S.has(V))})).filter(b=>b.keys.length>0)}),Q=e.computed(()=>{if(!Me.value)return[];const S=new Set(de.config.groups.flatMap(b=>b.keys));return qe.value.filter(b=>!S.has(b.key))}),ze=e.computed(()=>{if(!xe.value)return[];const S=new Set(xe.value.keys),b=qe.value.filter(Y=>S.has(Y.key));if(!R.value)return b;const V=R.value.toLowerCase();return b.filter(Y=>Y.label.toLowerCase().includes(V))}),we=e.computed(()=>{if(!R.value)return qe.value;const S=R.value.toLowerCase();return qe.value.filter(b=>b.label.toLowerCase().includes(S))}),it=e.computed(()=>qe.value.filter(S=>!["arraySelect","arrayText"].includes(S.type))),ot=e.computed(()=>Ae.value?nt.value==="asc"?"Ascending":"Descending":"No sort selected");function bt(S){G.value===S?It():(G.value=S,R.value="",xe.value=null)}function It(){G.value=null,R.value="",xe.value=null}function en(S){const b=S.target.closest(".dss-datepicker__overlay, .dss-datepicker__dropdown");G.value&&!b&&!S.target.closest(".dss-filter-popup")&&!S.target.closest(".dss-filter-trigger")&&!S.target.closest(".dss-filter-add-btn")&&It(),U.value&&me.value&&!me.value.contains(S.target)&&(b||(U.value=!1))}e.onMounted(()=>document.addEventListener("click",en)),e.onBeforeUnmount(()=>document.removeEventListener("click",en));function Pt(S){return Ee.value[S]?.label||vt(S)}function oe(S){return Ee.value[S.key]?.filterMode||"contain"}function ve(S){return L(`filter.operators.${S}`)}function Fe(S){const b=Ee.value[S.key];return(dt[b?.type]||dt.text).map(V=>({...V,label:L(`filter.operators.${V.value}`)}))}function De(S){return ee.has(S)}function Zt(S){const b=Ee.value[S.key];return b?b.type==="date"?"date":b.type==="boolean"?"boolean":b.type==="text"||b.type==="arrayText"?"text":b.type==="select"||b.type==="arraySelect"?"multiselect":b.type==="range"||b.type==="int"?S.operator==="between"?"between":"number":"text":"text"}function yt(S){return dt[S]?.[0]?.value||"contains"}function Ut(S,b){return ee.has(b)||S==="date"?null:S==="select"||S==="arraySelect"?[]:(S==="range"||S==="int")&&b==="between"?{min:null,max:null}:S==="range"||S==="int"?null:""}function xt(S){return Ee.value[S.key]?.uniqueValues||[]}function Ot(S){const b=xt(S);if(!R.value)return b;const V=R.value.toLowerCase();return b.filter(Y=>String(Y).toLowerCase().includes(V))}function J(S){const b=S.value;return!b||b.length===0?L("filter.select"):b.length<=2?b.join(", "):L("filter.selectedCount",{count:b.length})}function he(S){const b=Ee.value[S],V=b?.filterMode||"contain",Y=b?.type||"text",ne=V==="string"?"contains":yt(Y);Ce.value.push(e.reactive({id:ft++,key:S,operator:ne,value:Ut(Y,ne)})),It()}function Be(S){Ce.value=Ce.value.filter(b=>b.id!==S)}function Xe(S,b){const Y=Ee.value[b]?.type||"text";S.key=b,S.operator=yt(Y),S.value=Ut(Y,S.operator),It()}function Ke(S,b){const V=Zt(S);S.operator=b;const Y=Zt(S);if(V!==Y||ee.has(b)){const ne=Ee.value[S.key];S.value=Ut(ne?.type||"text",b)}It()}function Lt(S,b){const V=b.target.value;S.value=V===""?null:Number(V)}function Ge(S,b,V){const Y=V.target.value,ne=Y===""?null:Number(Y);(!S.value||typeof S.value!="object")&&(S.value={min:null,max:null}),S.value={...S.value,[b]:isNaN(ne)?null:ne}}function Dt(S,b){const V=S.value||[],Y=V.indexOf(b);S.value=Y>=0?V.filter(ne=>ne!==b):[...V,b]}function He(){Ce.value=[],be.value="",It()}function Pe(S){be.value=S.target.value}function Et(S){Ae.value=S.target.value}function St(){nt.value=nt.value==="asc"?"desc":"asc"}const K=e.computed(()=>{if(!de.data)return[];let S=de.data;if(be.value){const b=be.value.toLowerCase();S=S.filter(V=>{for(const Y of Object.keys(V)){const ne=V[Y];if(typeof ne=="string"&&ne.toLowerCase().includes(b)||typeof ne=="number"&&String(ne).includes(b)||Array.isArray(ne)&&ne.some(Oe=>Oe!=null&&(typeof Oe=="string"?Oe.toLowerCase().includes(b):typeof Oe=="object"?Object.values(Oe).some(mt=>typeof mt=="string"&&mt.toLowerCase().includes(b)):!1)))return!0}return!1})}for(const b of Ce.value){if(!pe(b))continue;const V=Ee.value[b.key];V&&(S=S.filter(Y=>ye(Y,b,V)))}if(de.showSortBy&&Ae.value){const b=Ae.value,V=nt.value==="asc"?1:-1;S=[...S].sort((Y,ne)=>W(Y?.[b],ne?.[b])*V)}return S});function W(S,b){const V=X(S),Y=X(b);return V==null&&Y==null?0:V==null?1:Y==null?-1:typeof V=="number"&&typeof Y=="number"?V-Y:String(V).localeCompare(String(Y),void 0,{numeric:!0,sensitivity:"base"})}function X(S){return S==null||S==="NULL"?null:typeof S=="string"||typeof S=="number"||typeof S=="boolean"?S:S instanceof Date?S.getTime():null}function pe(S){return ee.has(S.operator)?!0:S.value==null||typeof S.value=="string"&&S.value===""||Array.isArray(S.value)&&S.value.length===0?!1:S.value instanceof Date?!isNaN(S.value.getTime()):!(typeof S.value=="object"&&!Array.isArray(S.value)&&S.value.min==null&&S.value.max==null)}function ye(S,b,V){const Y=S?.[b.key],ne=b.value,Oe=b.operator;if(Oe==="is_empty")return mn(Y);if(Oe==="is_not_empty")return!mn(Y);const mt=V.type;if(mt==="text"||mt==="arrayText"){const ct=mt==="arrayText"&&Array.isArray(Y)?Y.filter(Nt=>Nt!=null).map(String).join(" "):Y!=null?String(Y):"",We=String(ne).toLowerCase(),Vt=ct.toLowerCase();switch(Oe){case"contains":return Vt.includes(We);case"not_contains":return!Vt.includes(We);case"equals":return Vt===We;case"not_equals":return Vt!==We;case"starts_with":return Vt.startsWith(We);case"ends_with":return Vt.endsWith(We);default:return!0}}if(mt==="select")switch(Oe){case"is_any_of":return ne.includes(Y);case"is_none_of":return!ne.includes(Y);default:return!0}if(mt==="range"||mt==="int"){const ct=typeof Y=="number"?Y:Number(Y);if(typeof ct!="number"||isNaN(ct))return!1;if(Oe==="between"){const Vt=ne?.min!=null?Number(ne.min):null,Nt=ne?.max!=null?Number(ne.max):null,wt=Vt!=null&&!isNaN(Vt)?Vt:null,Ct=Nt!=null&&!isNaN(Nt)?Nt:null;return(wt==null||ct>=wt)&&(Ct==null||ct<=Ct)}const We=typeof ne=="number"&&!isNaN(ne)?ne:Number(ne);if(Oe==="contains"||Oe==="not_contains"){const Vt=String(ct),Nt=String(ne??"").toLowerCase(),wt=Vt.toLowerCase().includes(Nt);return Oe==="contains"?wt:!wt}if(typeof We!="number"||isNaN(We))return!1;switch(Oe){case"eq":return ct===We;case"neq":return ct!==We;case"gt":return ct>We;case"gte":return ct>=We;case"lt":return ct<We;case"lte":return ct<=We;default:return!0}}if(mt==="arraySelect"){if(!Array.isArray(Y))return!1;const ct=Y.filter(We=>We!=null).map(We=>V.displayKey&&typeof We=="object"?We[V.displayKey]:String(We));switch(Oe){case"contains_any":return ct.some(We=>ne.includes(We));case"contains_all":return ne.every(We=>ct.includes(We));case"not_contains_any":return!ct.some(We=>ne.includes(We));default:return!0}}if(mt==="date"){const ct=Je(ne);if(!ct||isNaN(ct.getTime()))return!1;const We=Je(Y);if(!We||isNaN(We.getTime()))return!1;const Vt=Tt(We),Nt=Tt(ct);switch(Oe){case"eq":return Vt===Nt;case"before":return Vt<Nt;case"after":return Vt>Nt;default:return!0}}if(mt==="boolean"){const ct=Y===!0||Y==="true"||Y===1,We=Y===!1||Y==="false"||Y===0;switch(Oe){case"is_true":return ct;case"is_false":return We;default:return!0}}return!0}function Je(S){if(S==null)return null;if(S instanceof Date)return isNaN(S.getTime())?null:S;if(typeof S=="number")return new Date(S>1e10?S:S*1e3);if(typeof S=="string"){const b=new Date(S);return isNaN(b.getTime())?null:b}return null}function Tt(S){const b=S.getFullYear(),V=String(S.getMonth()+1).padStart(2,"0"),Y=String(S.getDate()).padStart(2,"0");return`${b}-${V}-${Y}`}function mn(S){return!!(S==null||S===""||S==="NULL"||Array.isArray(S)&&S.length===0||Array.isArray(S)&&S.every(b=>b==null))}e.watch(K,S=>I("update:modelValue",S),{immediate:!0}),e.watch(()=>de.data,()=>{Ce.value=[],be.value="",U.value=!1,Ae.value="",nt.value="asc",It()});function vt(S){return S.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,b=>b.toUpperCase())}function Gt(){const S=b=>{if(b==null)return b;if(b instanceof Date)return{_type:"Date",value:b.toISOString(),local:b.toLocaleDateString()};if(Array.isArray(b))return b.map(S);if(typeof b=="object"&&!Array.isArray(b)){const V={};for(const Y of Object.keys(b))V[Y]=S(b[Y]);return V}return b};return{globalSearch:be.value,rows:Ce.value.map(b=>({key:b.key,operator:b.operator,value:S(b.value),defType:Ee.value[b.key]?.type,defFilterMode:Ee.value[b.key]?.filterMode})),filteredCount:K.value?.length??0}}return le({getDebugState:Gt}),(S,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-filter",{"dss-filter--unstyled":fe.value.unstyled}])},[e.createElementVNode("div",{class:"dss-filter-global",ref_key:"globalRef",ref:me},[e.createElementVNode("div",C2,[b[20]||(b[20]=e.createElementVNode("svg",{class:"dss-filter-global-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),e.createElementVNode("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})],-1)),e.createElementVNode("input",{type:"text",class:"dss-filter-global-input",placeholder:e.unref(L)("filter.searchAcrossFields"),value:be.value,onInput:Pe},null,40,b2),be.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-filter-global-clear",onClick:b[0]||(b[0]=V=>be.value="")},"×")):e.createCommentVNode("",!0),e.createElementVNode("button",{class:e.normalizeClass(["dss-filter-funnel-btn",{active:U.value||Ce.value.length>0,"dss-filter-funnel-btn--with-sort":de.showSortBy}]),onClick:b[1]||(b[1]=V=>U.value=!U.value),type:"button",title:U.value?e.unref(L)("filter.closeAdvancedFilter"):e.unref(L)("filter.openAdvancedFilter")},[b[14]||(b[14]=e.createElementVNode("svg",{class:"dss-filter-funnel-icon",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M11.7583 2.00407L11.7537 2.00926L7.84558 6.18223V9.38409C7.84581 9.53637 7.80836 9.68634 7.73658 9.82064C7.6648 9.95494 7.56091 10.0694 7.43417 10.1538L5.58772 11.3852C5.44858 11.4779 5.28688 11.531 5.11988 11.539C4.95288 11.5469 4.78685 11.5094 4.63952 11.4304C4.49219 11.3514 4.36908 11.2338 4.28334 11.0903C4.1976 10.9467 4.15244 10.7826 4.15269 10.6154V6.18223L0.244567 2.00926L0.239951 2.00407C0.119785 1.87182 0.0405781 1.70755 0.0119374 1.53118C-0.0167033 1.35481 0.00645342 1.17391 0.0785984 1.01044C0.150743 0.846967 0.268776 0.707944 0.418378 0.610235C0.56798 0.512525 0.742722 0.460328 0.921405 0.459976H11.0769C11.2557 0.459994 11.4307 0.511948 11.5805 0.609528C11.7304 0.707107 11.8487 0.846111 11.9211 1.00965C11.9934 1.17319 12.0167 1.35422 11.9881 1.53075C11.9596 1.70728 11.8803 1.87172 11.7601 2.00407H11.7583Z",fill:"currentColor"})],-1)),Ce.value.length>0?(e.openBlock(),e.createElementBlock("span",x2,e.toDisplayString(Ce.value.length),1)):e.createCommentVNode("",!0)],10,w2),de.showSortBy?(e.openBlock(),e.createElementBlock("div",E2,[b[19]||(b[19]=e.createElementVNode("label",{class:"dss-filter-sortby-label",for:"dss-filter-sort-select"},"Sort by",-1)),e.createElementVNode("select",{id:"dss-filter-sort-select",class:"dss-filter-sortby-select",value:Ae.value,onChange:Et},[b[15]||(b[15]=e.createElementVNode("option",{value:""},"None",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(it.value,V=>(e.openBlock(),e.createElementBlock("option",{key:V.key,value:V.key},e.toDisplayString(V.label),9,V2))),128))],40,S2),e.createElementVNode("button",{class:"dss-filter-sortby-order",type:"button",onClick:St,disabled:!Ae.value,title:ot.value},[Ae.value?nt.value==="asc"?(e.openBlock(),e.createElementBlock("svg",M2,[...b[17]||(b[17]=[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:"currentColor"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",_2,[...b[18]||(b[18]=[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:"currentColor"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",B2,[...b[16]||(b[16]=[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:"currentColor"},null,-1)])]))],8,N2)])):e.createCommentVNode("",!0)]),U.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-advanced-popup",onClick:b[13]||(b[13]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",$2,[Ce.value.length===0?(e.openBlock(),e.createElementBlock("div",L2,e.toDisplayString(e.unref(L)("filter.noConditionsApplied")),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ce.value,(V,Y)=>(e.openBlock(),e.createElementBlock("div",{key:V.id,class:"dss-filter-row"},[e.createElementVNode("span",T2,e.toDisplayString(Y===0?e.unref(L)("filter.where"):e.unref(L)("filter.and")),1),e.createElementVNode("div",A2,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(ne=>bt(`${V.id}:field`),["stop"])},[e.createElementVNode("span",H2,e.toDisplayString(Pt(V.key)),1),b[21]||(b[21]=e.createElementVNode("svg",{class:"dss-filter-chevron",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("polyline",{points:"6 9 12 15 18 9"})],-1))],8,D2),G.value===`${V.id}:field`?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup",onClick:b[3]||(b[3]=e.withModifiers(()=>{},["stop"]))},[e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":b[2]||(b[2]=ne=>R.value=ne),placeholder:e.unref(L)("filter.searchAttributes")},null,8,R2),[[e.vModelText,R.value]]),e.createElementVNode("ul",F2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(we.value,ne=>(e.openBlock(),e.createElementBlock("li",{key:ne.key,class:"dss-filter-popup-item",onClick:Oe=>Xe(V,ne.key)},e.toDisplayString(ne.label),9,I2))),128)),we.value.length===0?(e.openBlock(),e.createElementBlock("li",z2,e.toDisplayString(e.unref(L)("filter.noMatch")),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),oe(V)==="contain"||oe(V)==="date"?(e.openBlock(),e.createElementBlock("div",P2,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(ne=>bt(`${V.id}:op`),["stop"])},[e.createElementVNode("span",q2,e.toDisplayString(ve(V.operator)),1),b[22]||(b[22]=e.createElementVNode("svg",{class:"dss-filter-chevron",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("polyline",{points:"6 9 12 15 18 9"})],-1))],8,O2),G.value===`${V.id}:op`?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup",onClick:b[4]||(b[4]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("ul",W2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Fe(V),ne=>(e.openBlock(),e.createElementBlock("li",{key:ne.value,class:e.normalizeClass(["dss-filter-popup-item",{selected:V.operator===ne.value}]),onClick:Oe=>Ke(V,ne.value)},e.toDisplayString(ne.label),11,Z2))),128))])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),De(V.operator)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",U2,[oe(V)==="string"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,type:"text",class:"dss-filter-value-input",placeholder:e.unref(L)("filter.enterValue"),"onUpdate:modelValue":ne=>V.value=ne},null,8,X2)),[[e.vModelText,V.value]]):oe(V)==="date"?(e.openBlock(),e.createElementBlock("div",Y2,[e.createVNode(ta,{mode:"single",modelValue:V.value,"onUpdate:modelValue":ne=>V.value=ne},null,8,["modelValue","onUpdate:modelValue"])])):Zt(V)==="text"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:2,type:"text",class:"dss-filter-value-input",placeholder:e.unref(L)("filter.enterValue"),"onUpdate:modelValue":ne=>V.value=ne},null,8,j2)),[[e.vModelText,V.value]]):Zt(V)==="number"?(e.openBlock(),e.createElementBlock("input",{key:3,type:"number",class:"dss-filter-value-input",placeholder:e.unref(L)("filter.enterValue"),value:V.value,onInput:ne=>Lt(V,ne),step:Ee.value[V.key]?.type==="int"?1:void 0},null,40,K2)):Zt(V)==="between"?(e.openBlock(),e.createElementBlock("div",G2,[e.createElementVNode("input",{type:"number",class:"dss-filter-value-input",placeholder:e.unref(L)("filter.min"),value:V.value?.min,onInput:ne=>Ge(V,"min",ne),step:Ee.value[V.key]?.type==="int"?1:void 0},null,40,Q2),e.createElementVNode("span",J2,e.toDisplayString(e.unref(L)("filter.and")),1),e.createElementVNode("input",{type:"number",class:"dss-filter-value-input",placeholder:e.unref(L)("filter.max"),value:V.value?.max,onInput:ne=>Ge(V,"max",ne),step:Ee.value[V.key]?.type==="int"?1:void 0},null,40,e0)])):Zt(V)==="multiselect"?(e.openBlock(),e.createElementBlock("div",t0,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(ne=>bt(`${V.id}:val`),["stop"])},[e.createElementVNode("span",l0,e.toDisplayString(J(V)),1),b[23]||(b[23]=e.createElementVNode("svg",{class:"dss-filter-chevron",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("polyline",{points:"6 9 12 15 18 9"})],-1))],8,n0),G.value===`${V.id}:val`?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup",onClick:b[6]||(b[6]=e.withModifiers(()=>{},["stop"]))},[xt(V).length>6?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":b[5]||(b[5]=ne=>R.value=ne),placeholder:e.unref(L)("filter.search")},null,8,o0)),[[e.vModelText,R.value]]):e.createCommentVNode("",!0),e.createElementVNode("ul",a0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ot(V),ne=>(e.openBlock(),e.createElementBlock("li",{key:ne,class:"dss-filter-popup-item",onClick:Oe=>Dt(V,ne)},[e.createElementVNode("input",{type:"checkbox",checked:(V.value||[]).includes(ne),tabindex:"-1"},null,8,r0),e.createElementVNode("span",null,e.toDisplayString(ne),1)],8,s0))),128)),Ot(V).length===0?(e.openBlock(),e.createElementBlock("li",i0,e.toDisplayString(e.unref(L)("filter.noMatch")),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])),e.createElementVNode("button",{class:"dss-filter-row-remove",onClick:ne=>Be(V.id)},[...b[24]||(b[24]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])],8,c0)]))),128)),e.createElementVNode("div",u0,[e.createElementVNode("div",d0,[e.createElementVNode("button",{class:"dss-filter-add-btn",onClick:b[7]||(b[7]=e.withModifiers(V=>bt("add"),["stop"]))},e.toDisplayString(e.unref(L)("filter.addFilter")),1),G.value==="add"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup dss-filter-add-popup",onClick:b[12]||(b[12]=e.withModifiers(()=>{},["stop"]))},[Me.value&&!xe.value&&!R.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":b[8]||(b[8]=V=>R.value=V),placeholder:e.unref(L)("filter.searchAttributes")},null,8,m0),[[e.vModelText,R.value]]),e.createElementVNode("ul",p0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(je.value,V=>(e.openBlock(),e.createElementBlock("li",{key:V.label,class:"dss-filter-popup-item dss-filter-popup-group",onClick:Y=>xe.value=V},[e.createElementVNode("span",null,e.toDisplayString(V.label),1),b[25]||(b[25]=e.createElementVNode("svg",{class:"dss-filter-chevron-right",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("polyline",{points:"9 18 15 12 9 6"})],-1))],8,f0))),128)),Q.value.length>0?(e.openBlock(),e.createElementBlock("li",v0)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.value,V=>(e.openBlock(),e.createElementBlock("li",{key:V.key,class:"dss-filter-popup-item",onClick:Y=>he(V.key)},e.toDisplayString(V.label),9,g0))),128))])],64)):xe.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:"dss-filter-popup-back",onClick:b[9]||(b[9]=V=>xe.value=null)},[b[26]||(b[26]=e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("polyline",{points:"15 18 9 12 15 6"})],-1)),e.createElementVNode("span",null,e.toDisplayString(xe.value.label),1)]),e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":b[10]||(b[10]=V=>R.value=V),placeholder:e.unref(L)("filter.searchAttributes")},null,8,h0),[[e.vModelText,R.value]]),e.createElementVNode("ul",y0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ze.value,V=>(e.openBlock(),e.createElementBlock("li",{key:V.key,class:"dss-filter-popup-item",onClick:Y=>he(V.key)},e.toDisplayString(V.label),9,k0))),128)),ze.value.length===0?(e.openBlock(),e.createElementBlock("li",C0,e.toDisplayString(e.unref(L)("filter.noMatch")),1)):e.createCommentVNode("",!0)])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":b[11]||(b[11]=V=>R.value=V),placeholder:e.unref(L)("filter.searchAttributes")},null,8,b0),[[e.vModelText,R.value]]),e.createElementVNode("ul",w0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(we.value,V=>(e.openBlock(),e.createElementBlock("li",{key:V.key,class:"dss-filter-popup-item",onClick:Y=>he(V.key)},e.toDisplayString(V.label),9,x0))),128)),we.value.length===0?(e.openBlock(),e.createElementBlock("li",E0,e.toDisplayString(e.unref(L)("filter.noMatch")),1)):e.createCommentVNode("",!0)])],64))])):e.createCommentVNode("",!0)]),Ce.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-filter-clear-all",onClick:He},e.toDisplayString(e.unref(L)("filter.clearAllFilters")),1)):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],512)],2))}}),N0={class:"dss-pill-field__pills"},B0=["data-value"],M0=["disabled"],_0={class:"dss-pill-field__pill-text"},$0={key:0,class:"dss-pill-field__pill-actions"},L0=["onClick"],T0=["onClick"],A0=["placeholder","disabled"],D0=e.defineComponent({__name:"DSSPillField",props:{modelValue:{default:()=>[]},placeholder:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(D,{emit:le}){const M=D,L=le,de=e.ref(""),I=e.ref([...M.modelValue]),T=e.ref(null);let fe=null;const dt=e.ref(null),ee=e.ref(""),f=e.ref(null),be=e.ref(null),Ce=e.computed(()=>{if(!be.value)return;const{width:Me,height:je}=be.value;return{minWidth:`${Me}px`,height:`${je}px`}});function G(Me,je){dt.value===je&&(f.value=Me)}function U(){dt.value=null,ee.value="",be.value=null,f.value=null}const me=e.computed(()=>new Set(I.value.map(Me=>Me.trim()).filter(Boolean)));function R(Me){T.value=Me,fe&&clearTimeout(fe),fe=setTimeout(()=>{T.value=null,fe=null},900)}function xe(Me){const je=Me.trim();return je?me.value.has(je)?(R(je),!1):(I.value=[...I.value,je],L("update:modelValue",[...I.value]),!0):!1}function Ae(Me){const je=Me.split(/\r?\n/g).map(it=>it.trim()).filter(Boolean);if(!je.length)return;const Q=new Set(I.value.map(it=>it.trim()).filter(Boolean)),ze=[...I.value];let we=null;for(const it of je){if(Q.has(it)){we??=it;continue}Q.add(it),ze.push(it)}ze.length!==I.value.length&&(I.value=ze,L("update:modelValue",[...I.value])),we&&R(we)}function nt(Me){M.disabled||(dt.value===Me&&U(),I.value=I.value.filter((je,Q)=>Q!==Me),L("update:modelValue",[...I.value]))}async function ft(Me,je){if(M.disabled)return;const Q=je.currentTarget.closest(".dss-pill-field__pill");Q&&(be.value={width:Q.offsetWidth,height:Q.offsetHeight}),dt.value=Me,ee.value=I.value[Me]??"",await e.nextTick();const ze=f.value;if(!ze)return;ze.focus();const we=ze.value.length;ze.setSelectionRange(we,we)}function Z(){U()}function Ue(){if(M.disabled||dt.value===null)return;const Me=dt.value,je=I.value[Me]??"",Q=ee.value.trim();if(U(),Q!==je&&me.value.has(Q)){R(Q);return}if(!Q){I.value=I.value.filter((we,it)=>it!==Me),L("update:modelValue",[...I.value]);return}const ze=I.value.map((we,it)=>it===Me?Q:we);I.value=ze,L("update:modelValue",[...I.value])}function qe(Me){Me.preventDefault(),!M.disabled&&(xe(de.value),de.value="")}function Ee(Me){if(M.disabled)return;const je=Me.clipboardData?.getData("text")??"";!je.includes(`
|
|
118
|
-
`)&&!je.includes("\r")||(Me.preventDefault(),Ae(je),de.value="")}return e.watch(()=>M.modelValue,Me=>{I.value=Array.isArray(Me)?[...Me]:[]},{deep:!0}),e.onBeforeUnmount(()=>{fe&&clearTimeout(fe)}),(Me,je)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-pill-field",{"dss-pill-field--disabled":Me.disabled}])},[e.createElementVNode("div",N0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(Q,ze)=>(e.openBlock(),e.createElementBlock("span",{key:Q,class:e.normalizeClass(["dss-pill-field__pill",{"dss-pill-field__pill--highlight":T.value===Q,"dss-pill-field__pill--editing":dt.value===ze}]),style:e.normalizeStyle(dt.value===ze&&be.value?Ce.value:void 0)},[dt.value===ze?(e.openBlock(),e.createElementBlock("span",{key:0,class:"dss-pill-field__pill-edit-wrap","data-value":ee.value||" "},[e.withDirectives(e.createElementVNode("input",{ref_for:!0,ref:we=>G(we,ze),"onUpdate:modelValue":je[0]||(je[0]=we=>ee.value=we),class:"dss-pill-field__pill-edit",type:"text",disabled:Me.disabled,onKeydown:[e.withKeys(Ue,["enter"]),e.withKeys(Z,["esc"])],onBlur:Ue},null,40,M0),[[e.vModelText,ee.value]])],8,B0)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("span",_0,e.toDisplayString(Q),1),Me.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",$0,[e.createElementVNode("button",{type:"button",class:"dss-pill-field__pill-action",onClick:we=>ft(ze,we)},[...je[2]||(je[2]=[e.createElementVNode("svg",{class:"dss-pill-field__pill-action-icon",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M0 9.64033V11.6667C0 11.8534 0.146646 12 0.333287 12H2.35967C2.44633 12 2.53298 11.9667 2.59297 11.9L9.87196 4.62769L7.37231 2.12804L0.0999862 9.40036C0.0333288 9.46702 0 9.54701 0 9.64033ZM11.805 2.69463C12.065 2.43466 12.065 2.01472 11.805 1.75476L10.2452 0.194973C9.98528 -0.064991 9.56534 -0.064991 9.30537 0.194973L8.08554 1.4148L10.5852 3.91446L11.805 2.69463Z",fill:"currentColor"})],-1)])],8,L0),e.createElementVNode("button",{type:"button",class:"dss-pill-field__pill-action dss-pill-field__pill-action--remove",onClick:we=>nt(ze)}," × ",8,T0)]))],64))],6))),128)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":je[1]||(je[1]=Q=>de.value=Q),class:"dss-pill-field__input",type:"text",placeholder:I.value.length?"":Me.placeholder,disabled:Me.disabled,onPaste:Ee,onKeydown:e.withKeys(qe,["enter"])},null,40,A0),[[e.vModelText,de.value]])])],2))}}),H0={class:"dss-step-bar__header"},R0={class:"dss-step-bar__label"},F0={key:0,class:"dss-step-bar__counter"},I0={class:"dss-step-bar__track-wrapper"},z0=["aria-valuemax","aria-valuenow","aria-label"],P0=["onMouseenter"],O0={__name:"DSSStepBar",props:{label:{type:String,default:"Progress"},steps:{type:Number,default:5},currentStep:{type:Number,default:0},segments:{type:Array,default:()=>[]},segmentOrder:{type:String,default:"input",validator:D=>["input","desc","asc"].includes(D)},totalValue:{type:Number,default:null},activeColor:{type:String,default:"#34c759"},labelColor:{type:String,default:null},counterColor:{type:String,default:null},valueLabel:{type:String,default:""},counterAsPercentage:{type:Boolean,default:!1},showCounter:{type:Boolean,default:!0},inactiveColor:{type:String,default:"#e5e7eb"},remainderLabel:{type:String,default:"Unused"},remainderTooltipSummary:{type:Boolean,default:!1},options:{type:Object,default:()=>({})}},setup(D){const le=D,M={segmentMarker:{color:null,width:null,height:null,backgroundColor:"transparent",borderColor:"transparent"},maxSegment:{marker:{enabled:!1,color:null,width:null,height:null,backgroundColor:"transparent",borderColor:"transparent"}}},L=oe=>oe&&typeof oe=="object"&&!Array.isArray(oe),de=(oe,ve)=>{const Fe=Object.assign({},oe);return!L(oe)||!L(ve)||Object.keys(ve).forEach(De=>{if(L(ve[De])){De in oe?Fe[De]=de(oe[De],ve[De]):Object.assign(Fe,{[De]:ve[De]});return}Object.assign(Fe,{[De]:ve[De]})}),Fe},I=e.computed(()=>de(M,le.options)),T=e.computed(()=>Math.max(1,Number(le.steps)||1)),fe=e.computed(()=>Math.min(T.value,Math.max(0,Number(le.currentStep)||0))),dt=e.computed(()=>Array.isArray(le.segments)&&le.segments.length>0),ee=e.computed(()=>{if(!dt.value)return[];const oe=le.segments.map((ve,Fe)=>{const De=Number(ve?.value);return{label:ve?.label||`Step ${Fe+1}`,value:Number.isFinite(De)&&De>0?De:0,color:ve?.color||le.activeColor,marker:ve?.marker}});return le.segmentOrder==="desc"?[...oe].sort((ve,Fe)=>Fe.value-ve.value):le.segmentOrder==="asc"?[...oe].sort((ve,Fe)=>ve.value-Fe.value):oe}),f=e.computed(()=>dt.value?ee.value.reduce((oe,ve)=>oe+ve.value,0):fe.value),be=e.computed(()=>dt.value?Number.isFinite(Number(le.totalValue))&&Number(le.totalValue)>0?Number(le.totalValue):Math.max(1,f.value):T.value),Ce=e.computed(()=>dt.value&&Number.isFinite(Number(le.totalValue))&&Number(le.totalValue)>0),G=e.computed(()=>Ce.value?Math.max(0,Number(le.totalValue)-f.value):0),U=e.computed(()=>typeof le.remainderLabel=="string"&&le.remainderLabel.trim().length>0),me=e.computed(()=>G.value>0),R=e.computed(()=>ee.value.reduce((oe,ve)=>Math.max(oe,Number(ve.value)||0),0)),xe=e.computed(()=>ee.value.filter(oe=>oe.value>0).map(oe=>`${oe.label}: ${it(oe.value)}`).join(" | ")),Ae=e.computed(()=>dt.value?Ce.value?ee.value.filter(oe=>oe.value>0):ee.value:[]),nt=e.computed(()=>{if(!le.counterAsPercentage)return`${f.value} / ${be.value}`;const oe=Number(be.value);if(!Number.isFinite(oe)||oe<=0)return"0%";const ve=Math.round(Number(f.value)/oe*100);return`${Math.min(Math.max(ve,0),100)}%`}),ft=e.computed(()=>f.value),Z=e.computed(()=>be.value),Ue=e.reactive({visible:!1,x:0,content:""}),qe=e.computed(()=>({left:`${Ue.x}px`})),Ee=oe=>{const ve=oe?.parentElement;return ve?ve.offsetLeft+ve.offsetWidth/2:0},Me=oe=>{if(Ce.value){const De=Math.max(0,Number(oe.value)||0);return{flex:`${De} 0 0`,minWidth:De>0?"6px":"0",backgroundColor:oe.color}}const ve=f.value;return{flex:`${oe.value>0?oe.value:ve>0?1e-4:1} 0 0`,minWidth:"6px",backgroundColor:oe.color}},je=oe=>Number(oe?.value||0)>0&&Number(oe?.value||0)===R.value,Q=oe=>{const ve=L(oe?.marker)?oe.marker:{},Fe=oe?.marker===!0||ve.enabled===!0,De=je(oe)&&I.value.maxSegment?.marker?.enabled===!0;if(!(Fe||De))return{enabled:!1};const yt=ve.backgroundColor??(De?I.value.maxSegment?.marker?.backgroundColor:I.value.segmentMarker?.backgroundColor),Ut=ve.borderColor??(De?I.value.maxSegment?.marker?.borderColor:I.value.segmentMarker?.borderColor),xt=ve.color??(De?I.value.maxSegment?.marker?.color:I.value.segmentMarker?.color),Ot=ve.width??(De?I.value.maxSegment?.marker?.width:I.value.segmentMarker?.width),J=ve.height??(De?I.value.maxSegment?.marker?.height:I.value.segmentMarker?.height);return{enabled:!0,backgroundColor:yt,borderColor:Ut,color:xt,width:Ot,height:J,icon:ve.icon??null,...ve}},ze=oe=>{const ve=Q(oe);return{backgroundColor:ve.backgroundColor??void 0,borderColor:ve.borderColor??void 0,color:ve.color??void 0}},we=oe=>{const ve=Q(oe);return{width:ve.width??void 0,height:ve.height??void 0}},it=oe=>`${oe}${le.valueLabel}`,ot=e.computed(()=>({flex:`${G.value} 0 0`,minWidth:G.value>0?"6px":"0",backgroundColor:le.inactiveColor})),bt=(oe,ve)=>{if(!oe||!ve?.currentTarget)return;const Fe=ve.currentTarget;if(le.remainderTooltipSummary){Ue.x=Ee(Fe),Ue.content=xe.value,Ue.visible=!!Ue.content;return}Ue.x=Fe.offsetLeft+Fe.offsetWidth/2,Ue.content=`${oe.label}: ${it(oe.value)}`,Ue.visible=!0},It=oe=>{if(!G.value||!oe?.currentTarget)return;const ve=oe.currentTarget;if(le.remainderTooltipSummary){Ue.x=Ee(ve),Ue.content=xe.value,Ue.visible=!!Ue.content;return}Ue.x=ve.offsetLeft+ve.offsetWidth/2,U.value&&(Ue.content=`${le.remainderLabel}: ${it(G.value)}`,Ue.visible=!0)},en=()=>{Ue.visible=!1},Pt=e.computed(()=>({"--dss-step-bar-label-color":le.labelColor??void 0,"--dss-step-bar-counter-color":le.counterColor??void 0,"--dss-step-bar-active-color":le.activeColor,"--dss-step-bar-inactive-color":le.inactiveColor}));return(oe,ve)=>(e.openBlock(),e.createElementBlock("div",{class:"dss-step-bar",style:e.normalizeStyle(Pt.value)},[e.createElementVNode("div",H0,[e.createElementVNode("span",R0,[e.renderSlot(oe.$slots,"label",{label:D.label},()=>[e.createTextVNode(e.toDisplayString(D.label),1)])]),D.showCounter?(e.openBlock(),e.createElementBlock("span",F0,[e.renderSlot(oe.$slots,"counter",{counterDisplay:nt.value},()=>[e.createTextVNode(e.toDisplayString(nt.value),1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",I0,[e.createElementVNode("div",{class:"dss-step-bar__track",role:"progressbar","aria-valuemin":0,"aria-valuemax":Z.value,"aria-valuenow":ft.value,"aria-label":D.label},[dt.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ae.value,(Fe,De)=>(e.openBlock(),e.createElementBlock("div",{key:`segment-${De}-${Fe.label}`,class:e.normalizeClass(["dss-step-bar__segment dss-step-bar__segment--interactive",{"dss-step-bar__segment--max":je(Fe),"dss-step-bar__segment--marker-enabled":Q(Fe).enabled}]),style:e.normalizeStyle(Me(Fe)),onMouseenter:Zt=>bt(Fe,Zt),onMouseleave:en},[Q(Fe).enabled?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-step-bar__segment-marker",style:e.normalizeStyle(ze(Fe)),"aria-hidden":"true"},[e.createElementVNode("span",{class:"dss-step-bar__segment-marker-icon",style:e.normalizeStyle(we(Fe))},[e.renderSlot(oe.$slots,"segment-marker-icon",{segment:Fe,index:De,marker:Q(Fe)},()=>[e.renderSlot(oe.$slots,"max-segment-icon",{segment:Fe,index:De,marker:Q(Fe)},()=>[e.createTextVNode(e.toDisplayString(Q(Fe).icon||""),1)])])],4)],4)):e.createCommentVNode("",!0)],46,P0))),128)),me.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-step-bar__segment dss-step-bar__segment--remainder",style:e.normalizeStyle(ot.value),onMouseenter:ve[0]||(ve[0]=Fe=>It(Fe)),onMouseleave:en},null,36)):e.createCommentVNode("",!0)],64)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(T.value,Fe=>(e.openBlock(),e.createElementBlock("div",{key:Fe,class:e.normalizeClass(["dss-step-bar__segment",{"dss-step-bar__segment--active":Fe<=fe.value}])},null,2))),128))],8,z0),Ue.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-step-bar__tooltip",style:e.normalizeStyle(qe.value)},e.toDisplayString(Ue.content),5)):e.createCommentVNode("",!0)])],4))}},q0={contextMenu:{addMarker:"Add Marker",clearAllMarkers:"Clear All Markers",downloadSvg:"Download SVG",downloadPng:"Download PNG",downloadCsv:"Download CSV"},modalMarker:{editMarker:"Edit Marker",viewMarker:"View Marker",title:"Title",description:"Description",iconType:"Icon Type",defaultIcon:"Default Logo",iconPreview:"Icon Preview",deleteMarker:"Delete Marker",cancel:"Cancel",close:"Close",save:"Save",placeholderTitle:"Enter marker title",placeholderDescription:"Enter marker description (required)"},zoom:{doubleClickToReset:"(Double-click to reset)"},csv:{chartTitle:"Chart Title",chartSubtitle:"Chart Subtitle",generated:"Generated"},fallback:{item:"Item",axis:"Axis"},tooltip:{flags:"Flags",markers:"Markers",manualFlags:"Manual Flags",autoFlags:"Auto Flags"}},W0={firstPage:"First page",previousPage:"Previous page",nextPage:"Next page",lastPage:"Last page",currentPageAriaLabel:"Current page",rowsPerPage:"Rows per page",searchPlaceholder:"Search...",searchAriaLabel:"Search",searchTableAriaLabel:"Search table",clearSearchAriaLabel:"Clear search",downloadPdf:"Download PDF",downloadExcel:"Download Excel",columnVisibility:"Columns Visibility",expandRowAriaLabel:"Expand row",collapseRowAriaLabel:"Collapse row",filterColumnAriaLabel:"Filter column",clearFilter:"Clear",search:"Search...",filterFrom:"From:",filterTo:"To:",dateFormat:"dd/mm/yyyy",showingRange:"Showing {start}-{end} from {total}",ofPages:"of {total}",emptyMessage:"No data available"},Z0={searchAcrossFields:"Search across all fields...",openAdvancedFilter:"Open advanced filter",closeAdvancedFilter:"Close advanced filter",noConditionsApplied:"No filter conditions are applied to this view",where:"Where",and:"And",searchAttributes:"Search attributes...",noMatch:"No match",enterValue:"Enter value...",min:"Min",max:"Max",search:"Search...",addFilter:"Add filter",clearAllFilters:"Clear all filters",select:"Select...",selectedCount:"{count} selected",operators:{contains:"contains",not_contains:"does not contain",equals:"equals",not_equals:"does not equal",starts_with:"starts with",ends_with:"ends with",is_empty:"is empty",is_not_empty:"is not empty",is_any_of:"is any of",is_none_of:"is none of",eq:"=",neq:"≠",gt:">",gte:"≥",lt:"<",lte:"≤",between:"between",contains_any:"contains any of",contains_all:"contains all of",not_contains_any:"does not contain",before:"before",after:"after",is_true:"is true",is_false:"is false"}},U0={selectDate:"Select Date",selectRange:"Select range",startDate:"Start date",endDate:"End date",prevMonth:"Previous month",nextMonth:"Next month",quickSelect:{today:"Today",lastWeek:"Last week",last15Days:"Last 15 days",last30Days:"Last 30 days",thisMonth:"This month",last3Months:"Last 3 months",last6Months:"Last 6 months",last12Months:"Last 12 months",lastYear:"Last year",allDates:"All dates",last2Dates:"Last 2 dates",last3Dates:"Last 3 dates",last4Dates:"Last 4 dates",last5Dates:"Last 5 dates"}},X0={toolbar:{undo:"Undo",redo:"Redo",paragraphFormat:"Paragraph Format",bold:"Bold",italic:"Italic",underline:"Underline",citation:"Citation",insertLink:"Insert Link",removeLink:"Remove Link",bulletList:"Bullet List",numberList:"Number List",image:"Image",comment:"Comment",askAi:"Ask AI"},paragraph:{heading1:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",heading4:"Heading 4",heading5:"Heading 5",heading6:"Heading 6",paragraph:"Paragraph"},link:{editLink:"Edit Link",altText:"Alt text:",url:"URL:",enterAltText:"Enter alt text...",enterUrl:"Enter URL...",cancel:"Cancel",save:"Save"},image:{addImage:"Add Image",editImage:"Edit Image",upload:"Upload",imageLink:"Image Link",uploadImage:"Upload image:",imageUrl:"Image URL:",altText:"Alt text:",width:"Width (px):",height:"Height (px):",enterAltText:"Enter alt text...",enterImageUrl:"https://example.com/image.jpg",auto:"Auto",noAlt:"No alt",cancel:"Cancel",save:"Save"},comment:{placeholder:"Add a comment",send:"Send",delete:"Delete comment"},started_conversation:"Started conversation",labels:{title:"Title",description:"Description"},placeholders:{title:"Enter title...",description:"Enter description...",startTyping:"Start typing..."},footer:{word:"word",words:"words",character:"character",characters:"characters"}},to={chart:q0,table:W0,filter:Z0,datepicker:U0,textEditor:X0},Y0={contextMenu:{addMarker:"Ajouter un marqueur",clearAllMarkers:"Effacer tous les marqueurs",downloadSvg:"Télécharger SVG",downloadPng:"Télécharger PNG",downloadCsv:"Télécharger CSV"},modalMarker:{editMarker:"Modifier le marqueur",viewMarker:"Voir le marqueur",title:"Titre",description:"Description",iconType:"Type d'icône",defaultIcon:"Logo par défaut",iconPreview:"Aperçu de l'icône",deleteMarker:"Supprimer le marqueur",cancel:"Annuler",close:"Fermer",save:"Enregistrer",placeholderTitle:"Entrez le titre du marqueur",placeholderDescription:"Entrez la description du marqueur (requise)"},zoom:{doubleClickToReset:"(Double-cliquez pour réinitialiser)"},csv:{chartTitle:"Titre du graphique",chartSubtitle:"Sous-titre du graphique",generated:"Généré"},fallback:{item:"Élément",axis:"Axe"},tooltip:{flags:"Drapeaux",markers:"Marqueurs",manualFlags:"Drapeaux manuels",autoFlags:"Drapeaux automatiques"}},j0={firstPage:"Première page",previousPage:"Page précédente",nextPage:"Page suivante",lastPage:"Dernière page",currentPageAriaLabel:"Page actuelle",rowsPerPage:"Lignes par page",searchPlaceholder:"Rechercher...",searchAriaLabel:"Rechercher",searchTableAriaLabel:"Rechercher dans le tableau",clearSearchAriaLabel:"Effacer la recherche",downloadPdf:"Télécharger PDF",downloadExcel:"Télécharger Excel",columnVisibility:"Visibilité des colonnes",expandRowAriaLabel:"Développer la ligne",collapseRowAriaLabel:"Réduire la ligne",filterColumnAriaLabel:"Filtrer la colonne",clearFilter:"Effacer",search:"Rechercher...",filterFrom:"Du :",filterTo:"Au :",dateFormat:"jj/mm/aaaa",showingRange:"Affichage de {start}-{end} sur {total}",ofPages:"sur {total}",emptyMessage:"Aucune donnée disponible"},K0={searchAcrossFields:"Rechercher dans tous les champs...",openAdvancedFilter:"Ouvrir le filtre avancé",closeAdvancedFilter:"Fermer le filtre avancé",noConditionsApplied:"Aucune condition de filtre n'est appliquée à cette vue",where:"Où",and:"Et",searchAttributes:"Rechercher des attributs...",noMatch:"Aucun résultat",enterValue:"Saisir une valeur...",min:"Min",max:"Max",search:"Rechercher...",addFilter:"Ajouter un filtre",clearAllFilters:"Effacer tous les filtres",select:"Sélectionner...",selectedCount:"{count} sélectionnés",operators:{contains:"contient",not_contains:"ne contient pas",equals:"est égal à",not_equals:"est différent de",starts_with:"commence par",ends_with:"se termine par",is_empty:"est vide",is_not_empty:"n'est pas vide",is_any_of:"est l'un de",is_none_of:"n'est aucun de",eq:"=",neq:"≠",gt:">",gte:"≥",lt:"<",lte:"≤",between:"entre",contains_any:"contient l'un de",contains_all:"contient tous",not_contains_any:"ne contient pas",before:"avant",after:"après",is_true:"est vrai",is_false:"est faux"}},G0={selectDate:"Sélectionner une date",selectRange:"Sélectionner une plage",startDate:"Date de début",endDate:"Date de fin",prevMonth:"Mois précédent",nextMonth:"Mois suivant",quickSelect:{today:"Aujourd'hui",lastWeek:"Dernière semaine",last15Days:"15 derniers jours",last30Days:"30 derniers jours",thisMonth:"Ce mois",last3Months:"3 derniers mois",last6Months:"6 derniers mois",last12Months:"12 derniers mois",lastYear:"Dernière année",allDates:"Toutes les dates",last2Dates:"2 dernières dates",last3Dates:"3 dernières dates",last4Dates:"4 dernières dates",last5Dates:"5 dernières dates"}},Q0={toolbar:{undo:"Annuler",redo:"Rétablir",paragraphFormat:"Format de paragraphe",bold:"Gras",italic:"Italique",underline:"Souligné",citation:"Citation",insertLink:"Insérer un lien",removeLink:"Supprimer le lien",bulletList:"Liste à puces",numberList:"Liste numérotée",image:"Image",comment:"Commentaire",askAi:"Demander à l'IA"},paragraph:{heading1:"En-tête 1",heading2:"En-tête 2",heading3:"En-tête 3",heading4:"En-tête 4",heading5:"En-tête 5",heading6:"En-tête 6",paragraph:"Paragraphe"},link:{editLink:"Modifier le lien",altText:"Texte alternatif :",url:"URL :",enterAltText:"Entrez le texte alternatif...",enterUrl:"Entrez l'URL...",cancel:"Annuler",save:"Enregistrer"},image:{addImage:"Ajouter une image",editImage:"Modifier l'image",upload:"Télécharger",imageLink:"Lien de l'image",uploadImage:"Télécharger l'image :",imageUrl:"URL de l'image :",altText:"Texte alternatif :",width:"Largeur (px) :",height:"Hauteur (px) :",enterAltText:"Entrez le texte alternatif...",enterImageUrl:"https://exemple.com/image.jpg",auto:"Auto",noAlt:"Pas de texte alternatif",cancel:"Annuler",save:"Enregistrer"},comment:{placeholder:"Ajouter un commentaire",send:"Envoyer",delete:"Supprimer le commentaire"},started_conversation:"A démarré la conversation",labels:{title:"Titre",description:"Description"},placeholders:{title:"Entrez le titre...",description:"Entrez la description...",startTyping:"Commencez à taper..."},footer:{word:"mot",words:"mots",character:"caractère",characters:"caractères"}},no={chart:Y0,table:j0,filter:K0,datepicker:G0,textEditor:Q0},J0={contextMenu:{addMarker:"Markering toevoegen",clearAllMarkers:"Alle markeringen wissen",downloadSvg:"SVG downloaden",downloadPng:"PNG downloaden",downloadCsv:"CSV downloaden"},modalMarker:{editMarker:"Markering bewerken",viewMarker:"Markering bekijken",title:"Titel",description:"Beschrijving",iconType:"Pictogramtype",defaultIcon:"Standaard logo",iconPreview:"Pictogramvoorbeeld",deleteMarker:"Markering verwijderen",cancel:"Annuleren",close:"Sluiten",save:"Opslaan",placeholderTitle:"Voer markeringstitel in",placeholderDescription:"Voer markeringsbeschrijving in (optioneel)"},zoom:{doubleClickToReset:"(Dubbelklik om te resetten)"},csv:{chartTitle:"Grafiek titel",chartSubtitle:"Grafiek ondertitel",generated:"Gegenereerd"},fallback:{item:"Item",axis:"As"},tooltip:{flags:"Vlaggen",markers:"Markeringen",manualFlags:"Handmatige vlaggen",autoFlags:"Automatische vlaggen"}},e9={firstPage:"Eerste pagina",previousPage:"Vorige pagina",nextPage:"Volgende pagina",lastPage:"Laatste pagina",currentPageAriaLabel:"Huidige pagina",rowsPerPage:"Rijen per pagina",searchPlaceholder:"Zoeken...",searchAriaLabel:"Zoeken",searchTableAriaLabel:"Zoeken in tabel",clearSearchAriaLabel:"Zoekopdracht wissen",downloadPdf:"PDF downloaden",downloadExcel:"Excel downloaden",columnVisibility:"Kolommen weer te geven",expandRowAriaLabel:"Rij uitklappen",collapseRowAriaLabel:"Rij inklappen",filterColumnAriaLabel:"Kolom filteren",clearFilter:"Wissen",search:"Zoeken...",filterFrom:"Van:",filterTo:"Tot:",dateFormat:"dd-mm-jjjj",showingRange:"{start}-{end} van {total} weergegeven",ofPages:"van {total}",emptyMessage:"Geen gegevens beschikbaar"},t9={searchAcrossFields:"Zoeken in alle velden...",openAdvancedFilter:"Geavanceerde filter openen",closeAdvancedFilter:"Geavanceerde filter sluiten",noConditionsApplied:"Er zijn geen filtervoorwaarden toegepast op deze weergave",where:"Waar",and:"En",searchAttributes:"Zoek attributen...",noMatch:"Geen overeenkomst",enterValue:"Voer waarde in...",min:"Min",max:"Max",search:"Zoeken...",addFilter:"Filter toevoegen",clearAllFilters:"Alle filters wissen",select:"Selecteren...",selectedCount:"{count} geselecteerd",operators:{contains:"bevat",not_contains:"bevat niet",equals:"is gelijk aan",not_equals:"is niet gelijk aan",starts_with:"begint met",ends_with:"eindigt op",is_empty:"is leeg",is_not_empty:"is niet leeg",is_any_of:"is een van",is_none_of:"is geen van",eq:"=",neq:"≠",gt:">",gte:"≥",lt:"<",lte:"≤",between:"tussen",contains_any:"bevat een van",contains_all:"bevat alle",not_contains_any:"bevat niet",before:"voor",after:"na",is_true:"is waar",is_false:"is onwaar"}},n9={selectDate:"Selecteer datum",selectRange:"Selecteer bereik",startDate:"Startdatum",endDate:"Einddatum",prevMonth:"Vorige maand",nextMonth:"Volgende maand",quickSelect:{today:"Vandaag",lastWeek:"Afgelopen week",last15Days:"Laatste 15 dagen",last30Days:"Laatste 30 dagen",thisMonth:"Deze maand",last3Months:"Laatste 3 maanden",last6Months:"Laatste 6 maanden",last12Months:"Laatste 12 maanden",lastYear:"Afgelopen jaar",allDates:"Alle datums",last2Dates:"Laatste 2 datums",last3Dates:"Laatste 3 datums",last4Dates:"Laatste 4 datums",last5Dates:"Laatste 5 datums"}},l9={toolbar:{undo:"Ongedaan maken",redo:"Opnieuw",paragraphFormat:"Alineaopmaak",bold:"Vet",italic:"Cursief",underline:"Onderstreept",citation:"Citaat",insertLink:"Link invoegen",removeLink:"Link verwijderen",bulletList:"Lijst met opsommingstekens",numberList:"Genummerde lijst",image:"Afbeelding",comment:"Commentaar",askAi:"Vraag AI"},paragraph:{heading1:"Kop 1",heading2:"Kop 2",heading3:"Kop 3",heading4:"Kop 4",heading5:"Kop 5",heading6:"Kop 6",paragraph:"Alinea"},link:{editLink:"Link bewerken",altText:"Alt-tekst:",url:"URL:",enterAltText:"Voer alt-tekst in...",enterUrl:"Voer URL in...",cancel:"Annuleren",save:"Opslaan"},image:{addImage:"Afbeelding toevoegen",editImage:"Afbeelding bewerken",upload:"Uploaden",imageLink:"Afbeeldingslink",uploadImage:"Afbeelding uploaden:",imageUrl:"Afbeeldings-URL:",altText:"Alt-tekst:",width:"Breedte (px):",height:"Hoogte (px):",enterAltText:"Voer alt-tekst in...",enterImageUrl:"https://voorbeeld.com/afbeelding.jpg",auto:"Auto",noAlt:"Geen alt-tekst",cancel:"Annuleren",save:"Opslaan"},comment:{placeholder:"Voeg een opmerking toe",send:"Verzenden",delete:"Opmerking verwijderen"},started_conversation:"Gesprek gestart",labels:{title:"Titel",description:"Beschrijving"},placeholders:{title:"Voer titel in...",description:"Voer beschrijving in...",startTyping:"Begin met typen..."},footer:{word:"woord",words:"woorden",character:"teken",characters:"tekens"}},lo={chart:J0,table:e9,filter:t9,datepicker:n9,textEditor:l9},zo={en:to,fr:no,nl:lo};function ua(D){if(!D||!D.global)return;const le=D.global.availableLocales||[];Object.keys(zo).forEach(M=>{le.includes(M)&&D.global.mergeLocaleMessage(M,zo[M])})}const Po={en:{textEditor:to.textEditor},fr:{textEditor:no.textEditor},nl:{textEditor:lo.textEditor}};function da(D){if(!D||!D.global)return;const le=D.global.availableLocales||[];Object.keys(Po).forEach(M=>{le.includes(M)&&D.global.mergeLocaleMessage(M,Po[M])})}const Oo={en:{table:to.table},fr:{table:no.table},nl:{table:lo.table}};function ma(D){if(!D||!D.global)return;const le=D.global.availableLocales||[];Object.keys(Oo).forEach(M=>{le.includes(M)&&D.global.mergeLocaleMessage(M,Oo[M])})}const qo={en:{datepicker:to.datepicker},fr:{datepicker:no.datepicker},nl:{datepicker:lo.datepicker}};function pa(D){if(!D||!D.global)return;const le=D.global.availableLocales||[];Object.keys(qo).forEach(M=>{le.includes(M)&&D.global.mergeLocaleMessage(M,qo[M])})}const Wo={en:{filter:to.filter},fr:{filter:no.filter},nl:{filter:lo.filter}};function fa(D){if(!D||!D.global)return;const le=D.global.availableLocales||[];Object.keys(Wo).forEach(M=>{le.includes(M)&&D.global.mergeLocaleMessage(M,Wo[M])})}const o9={chart:zo,textEditor:Po,table:Oo,datepicker:qo,filter:Wo};function a9(D){!D||!D.global||(ua(D),da(D),ma(D),pa(D),fa(D))}const s9={en:{...to},fr:{...no},nl:{...lo}};eo.createI18n({legacy:!1,locale:"en",fallbackLocale:"en",messages:s9});exports.DSSChart=oc;exports.DSSChartMessages=zo;exports.DSSColorPicker=Zm;exports.DSSConfetti=k2;exports.DSSDatepicker=ta;exports.DSSDatepickerMessages=qo;exports.DSSDnd=h2;exports.DSSFilter=V0;exports.DSSFilterMessages=Wo;exports.DSSLoader=o2;exports.DSSMessages=o9;exports.DSSModal=ea;exports.DSSPillField=D0;exports.DSSSkeleton=a2;exports.DSSStepBar=O0;exports.DSSTable=Vu;exports.DSSTableMessages=Oo;exports.DSSTextEditor=Mm;exports.DSSTextEditorMessages=Po;exports.addDSSChartTranslations=ua;exports.addDSSDatepickerTranslations=pa;exports.addDSSFilterTranslations=fa;exports.addDSSTableTranslations=ma;exports.addDSSTextEditorTranslations=da;exports.addDSSTranslations=a9;
|
|
117
|
+
`,document.body.appendChild(Ke),Ee=Ke}function lt(K,ye){Ee&&(Ee.style.left=`${K-tt}px`,Ee.style.top=`${ye-pt}px`)}function be(K){K.classList.add("dss-dnd-item--dragging"),K.style.background=ve.value.dragSourceBackground,K.style.borderColor=ve.value.dragSourceBorder,K.style.transform="scale(0.97)"}function Je(K){K.classList.remove("dss-dnd-item--dragging"),K.style.background="",K.style.borderColor="",K.style.transform=""}function ut(K,ye){return document.elementFromPoint(K,ye)?.closest(".dss-dnd-column-body")??null}function Ct(K,ye){return!!document.elementFromPoint(K,ye)?.closest("[data-dss-dnd-delete-zone]")}function Et(K,ye){if(I.value&&Ct(K,ye)){Ce.value=!0,we.value=null,G.value=-1;return}Ce.value=!1;const Be=ut(K,ye),Ue=Be?.getAttribute("data-column")??null;if(!Ue){we.value=null,G.value=-1;return}we.value=Ue;const Ke=Be.querySelectorAll(".dss-dnd-item:not(.dss-dnd-item--dragging)");let Tt=Ke.length;for(let et=0;et<Ke.length;et++){const Ot=Ke[et].getBoundingClientRect();if(ye<Ot.top+Ot.height/2){Tt=et;break}}G.value=Tt}function Ht(K){K.preventDefault(),lt(K.clientX,K.clientY),!pe&&(pe=requestAnimationFrame(()=>{pe=null,Et(K.clientX,K.clientY)}))}function Pt(K){window.removeEventListener("pointermove",Ht),window.removeEventListener("pointerup",Pt),window.removeEventListener("pointercancel",Pt),De?.releasePointerCapture?.(K.pointerId),Je(De),De=null;const ye=I.value&&Ct(K.clientX,K.clientY);if(f.value&&ye)A("delete",{item:f.value});else{const Ue=ut(K.clientX,K.clientY)?.getAttribute("data-column")??null;if(f.value&&Ue){const Ke=f.value[M.columnKey],Tt=Ue,Ot=(xe.value[Tt]||[]).filter(ft=>ft[M.itemKey]!==f.value[M.itemKey]),We=Math.max(0,Math.min(G.value,Ot.length)),Fe=Ye(Tt,We),xt=f.value[M.itemKey];A("move",{item:f.value,from:Ke,to:Tt,position:Fe,index:We}),F&&clearTimeout(F),U.value={id:xt,from:Ke,to:Tt},F=setTimeout(()=>{U.value=null},3500)}}Ee&&(Ee.remove(),Ee=null),W!==null&&(document.body.style.cursor=W,W=""),qt()}function se(K,ye){K.preventDefault();const Be=K.target.closest(".dss-dnd-item");if(!Be)return;const Ue=Be.getBoundingClientRect();tt=K.clientX-Ue.left,pt=K.clientY-Ue.top,W=document.body.style.cursor,document.body.style.cursor="grabbing",f.value=ye,De=Be,ee(Be,K.clientX,K.clientY),requestAnimationFrame(()=>be(Be)),Be.setPointerCapture?.(K.pointerId),window.addEventListener("pointermove",Ht),window.addEventListener("pointerup",Pt,{once:!0}),window.addEventListener("pointercancel",Pt,{once:!0})}function ge(){Ze&&(window.removeEventListener("pointermove",He),window.removeEventListener("pointerup",_e),window.removeEventListener("pointercancel",_e),Ze=null)}function He(K){if(!Ze||K.pointerId!==Ze.pointerId)return;const ye=K.clientX-Ze.startX,Be=K.clientY-Ze.startY;if(Math.abs(ye)>=qe||Math.abs(Be)>=qe){const Ue=Ze.item;ge(),se(K,Ue)}}function _e(K){!Ze||K.pointerId!==Ze.pointerId||ge()}function Xt(K,ye){ge(),Ze={item:ye,startX:K.clientX,startY:K.clientY,pointerId:K.pointerId},window.addEventListener("pointermove",He),window.addEventListener("pointerup",_e),window.addEventListener("pointercancel",_e)}function bt(K,ye){ve.value.useHandle||Xt(K,ye)}function Gt(K,ye){Xt(K,ye)}function Lt(){pe&&(cancelAnimationFrame(pe),pe=null)}function qt(){Lt(),f.value=null,we.value=null,Ce.value=!1,G.value=-1}return e.onBeforeUnmount(()=>{Lt(),ge(),F&&clearTimeout(F),Ee&&(Ee.remove(),Ee=null)}),(K,ye)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-dnd",{"dss-dnd--unstyled":ve.value.unstyled}]),style:e.normalizeStyle(ct.value)},[I.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["dss-dnd-delete-zone",{"dss-dnd-delete-zone--drag-over":Ce.value}]),"data-dss-dnd-delete-zone":""},[e.renderSlot(K.$slots,"delete-zone",{isDragging:!!f.value,isOver:Ce.value})],2),[[e.vShow,!!f.value||ve.value.deleteZoneAlwaysVisible]])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.columns,Be=>(e.openBlock(),e.createElementBlock("div",{key:Be.value,class:e.normalizeClass(["dss-dnd-column",[{"dss-dnd-column--drag-over":we.value==Be.value},Be.class||""]]),style:e.normalizeStyle(Q(Be))},[ve.value.showHeader?(e.openBlock(),e.createElementBlock("div",d2,[e.renderSlot(K.$slots,"column-header",{column:Be,items:xe.value[Be.value]||[]},()=>[e.createElementVNode("span",m2,e.toDisplayString(Be.title||Be.value),1),e.createElementVNode("span",p2,e.toDisplayString((xe.value[Be.value]||[]).length),1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"dss-dnd-column-body","data-column":Be.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Me.value[Be.value],Ue=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:Ue.key},[Ue.type==="indicator"?(e.openBlock(),e.createElementBlock("div",v2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-dnd-item",{"dss-dnd-item--dragging":Ue.isDragged,"dss-dnd-item--no-handle":!ve.value.useHandle}]),onPointerdown:Ke=>bt(Ke,Ue.item)},[ve.value.useHandle?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-dnd-handle",onPointerdown:e.withModifiers(Ke=>Gt(Ke,Ue.item),["stop"])},[e.renderSlot(K.$slots,"handle",{},()=>[ye[0]||(ye[0]=e.createElementVNode("span",{class:"dss-dnd-handle-icon"},"⠿",-1))])],40,h2)):e.createCommentVNode("",!0),e.createElementVNode("div",y2,[e.renderSlot(K.$slots,"item",{item:Ue.item,column:Be,justDropped:U.value?.id===Ue.item[H.itemKey],droppedFrom:U.value?.id===Ue.item[H.itemKey]?U.value.from:null,droppedTo:U.value?.id===Ue.item[H.itemKey]?U.value.to:null},()=>[e.createElementVNode("div",k2,e.toDisplayString(Ue.item[H.itemKey]),1)])])],42,g2))],64))),128)),(xe.value[Be.value]||[]).length===0&&we.value!=Be.value?(e.openBlock(),e.createElementBlock("div",C2,[e.renderSlot(K.$slots,"empty",{column:Be},()=>[ye[1]||(ye[1]=e.createElementVNode("span",{class:"dss-dnd-empty-text"},"No items",-1))])])):e.createCommentVNode("",!0)],8,f2)],6))),128))],6))}}),x2={name:"DSSConfetti"},E2=Object.assign(x2,{props:{trigger:{type:Boolean,default:!1},duration:{type:Number,default:3e3},fadeStart:{type:Number,default:2e3},count:{type:Number,default:90},colors:{type:Array,default:()=>["#047395","#ffc230","#0897c1","#fe3b59","#11e1a2","#b3b2fb","#fadb8d","#ffa25b","#feaab1"]},delay:{type:Number,default:300}},setup(H){const ne=H,M=e.ref(null),A=e.ref(!1);let ue=[],I=null,$=null;function ve(G,U){const pe=[];for(let F=0;F<ne.count;F++)pe.push(ct(G));return pe}function ct(G,U){return{x:Math.random()*G,y:-Math.random()*150-20,r:Math.random()*8+3,d:Math.random()*50,color:ne.colors[Math.floor(Math.random()*ne.colors.length)],tilt:Math.floor(Math.random()*10)-10,tiltInc:Math.random()*.08+.04,tiltAngle:0,opacity:Math.random()*.7+.3,speed:Math.random()*4+1.5}}function Q(G,U,pe,F){G.clearRect(0,0,U,pe);for(const Ee of ue)G.save(),G.globalAlpha=Ee.opacity*F,G.beginPath(),G.lineWidth=Ee.r,G.strokeStyle=Ee.color,G.moveTo(Ee.x+Ee.tilt+Ee.r/2,Ee.y),G.lineTo(Ee.x+Ee.tilt,Ee.y+Ee.tilt+Ee.r/2),G.stroke(),G.restore()}function f(G,U,pe){const F=.3+pe*.7;for(let Ee=0;Ee<ue.length;Ee++){const De=ue[Ee];De.tiltAngle+=De.tiltInc,De.y+=De.speed*F,De.x+=Math.sin(De.d)*.5*F,De.tilt=Math.sin(De.tiltAngle)*15,pe>=.99&&De.y>U+20&&(ue[Ee]=ct(G))}}function we(){A.value=!0,e.nextTick(()=>{const G=M.value;if(!G)return;const U=G.getContext("2d"),pe=G.parentElement;if(!pe)return;const F=pe.getBoundingClientRect();G.width=F.width,G.height=F.height,ue=ve(G.width,G.height);const Ee=Date.now(),De=Ee+ne.duration,tt=()=>{const pt=Date.now(),W=pt-Ee;if(pt<De){let Ze=1;W>ne.fadeStart&&(Ze=1-(W-ne.fadeStart)/(ne.duration-ne.fadeStart)),Q(U,G.width,G.height,Ze),f(G.width,G.height,Ze),I=requestAnimationFrame(tt)}else Ce()};tt()})}function Ce(){I&&(cancelAnimationFrame(I),I=null),ue=[],A.value=!1}return e.watch(()=>ne.trigger,G=>{G&&($&&clearTimeout($),$=setTimeout(we,ne.delay))},{immediate:!0}),e.onBeforeUnmount(()=>{Ce(),$&&clearTimeout($)}),(G,U)=>A.value?(e.openBlock(),e.createElementBlock("canvas",{key:0,ref_key:"canvasRef",ref:M,class:"dss-confetti-canvas"},null,512)):e.createCommentVNode("",!0)}}),S2={class:"dss-filter-global-inner"},V2=["placeholder","value"],N2=["title"],B2={key:0,class:"dss-filter-funnel-badge"},M2={key:1,class:"dss-filter-sortby"},_2=["value"],$2=["value"],L2=["disabled","title"],A2={key:0,class:"dss-filter-sortby-order-icon",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},T2={key:1,class:"dss-filter-sortby-order-icon",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},D2={key:2,class:"dss-filter-sortby-order-icon",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},H2={class:"dss-filter-panel"},R2={key:0,class:"dss-filter-empty"},F2={class:"dss-filter-row-prefix"},I2={class:"dss-filter-cell"},z2=["onClick"],P2={class:"dss-filter-trigger-text"},O2=["placeholder"],q2={class:"dss-filter-popup-list"},W2=["onClick"],Z2={key:0,class:"dss-filter-popup-empty"},U2={key:0,class:"dss-filter-cell"},X2=["onClick"],Y2={class:"dss-filter-trigger-text"},j2={class:"dss-filter-popup-list"},K2=["onClick"],G2={key:1,class:"dss-filter-cell dss-filter-cell--value"},Q2=["placeholder","onUpdate:modelValue"],J2={key:1,class:"dss-filter-date-wrap"},e0=["placeholder","onUpdate:modelValue"],t0=["placeholder","value","onInput","step"],l0={key:4,class:"dss-filter-between"},n0=["placeholder","value","onInput","step"],o0={class:"dss-filter-between-sep"},a0=["placeholder","value","onInput","step"],s0={key:5,class:"dss-filter-multiselect"},r0=["onClick"],i0={class:"dss-filter-trigger-text"},c0=["placeholder"],u0={class:"dss-filter-popup-list dss-filter-popup-list--check"},d0=["onClick"],m0=["checked"],p0={key:0,class:"dss-filter-popup-empty"},f0=["onClick"],v0={class:"dss-filter-foot"},g0={class:"dss-filter-cell"},h0=["placeholder"],y0={class:"dss-filter-popup-list"},k0=["onClick"],C0={key:0,class:"dss-filter-popup-divider"},b0=["onClick"],w0=["placeholder"],x0={class:"dss-filter-popup-list"},E0=["onClick"],S0={key:0,class:"dss-filter-popup-empty"},V0=["placeholder"],N0={class:"dss-filter-popup-list"},B0=["onClick"],M0={key:0,class:"dss-filter-popup-empty"},_0={name:"DSSFilter"},$0=Object.assign(_0,{props:{data:{type:Array,required:!0},modelValue:{type:Array,default:void 0},exclude:{type:Array,default:()=>[]},config:{type:Object,default:()=>({})},options:{type:Object,default:()=>({})},showSortBy:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(H,{expose:ne,emit:M}){const{t:A}=lo.useI18n(),ue=H,I=M,$={unstyled:!1,maxUniqueForSelect:30,maxUniqueForEnum:15},ve=e.computed(()=>({...$,...ue.options})),ct={text:[{value:"contains"},{value:"not_contains"},{value:"equals"},{value:"not_equals"},{value:"starts_with"},{value:"ends_with"},{value:"is_empty"},{value:"is_not_empty"}],select:[{value:"is_any_of"},{value:"is_none_of"},{value:"is_empty"},{value:"is_not_empty"}],range:[{value:"eq"},{value:"neq"},{value:"gt"},{value:"gte"},{value:"lt"},{value:"lte"},{value:"between"},{value:"is_empty"},{value:"is_not_empty"}],int:[{value:"eq"},{value:"neq"},{value:"gt"},{value:"gte"},{value:"lt"},{value:"lte"},{value:"between"},{value:"is_empty"},{value:"is_not_empty"}],arraySelect:[{value:"contains_any"},{value:"contains_all"},{value:"not_contains_any"},{value:"is_empty"},{value:"is_not_empty"}],arrayText:[{value:"contains"},{value:"not_contains"},{value:"is_empty"},{value:"is_not_empty"}],date:[{value:"eq"},{value:"before"},{value:"after"},{value:"is_empty"},{value:"is_not_empty"}],boolean:[{value:"is_true"},{value:"is_false"},{value:"is_empty"},{value:"is_not_empty"}]},Q=new Set(["is_empty","is_not_empty","is_true","is_false"]),f=["label","name","title","keyword","full_name","value","text"],we=e.ref(""),Ce=e.ref([]),G=e.ref(null),U=e.ref(!1),pe=e.ref(null),F=e.ref(""),Ee=e.ref(null),De=e.ref(""),tt=e.ref("asc");let pt=1;function W(S){const C=S.find(V=>V&&typeof V=="object");if(!C)return null;for(const V of f)if(V in C&&typeof C[V]=="string")return V;return Object.keys(C).find(V=>typeof C[V]=="string")||null}function Ze(S,C){const V=C.filter(Y=>Y!=null&&Y!=="NULL");if(V.length===0)return null;if(V.every(Y=>Array.isArray(Y))){const Y=V.flatMap(ze=>ze).filter(ze=>ze!=null);return Y.length===0?null:typeof Y.find(ze=>ze!=null)=="object"?"arraySelect":"arrayText"}return V.every(Y=>typeof Y=="boolean")?"boolean":V.every(Y=>typeof Y=="number")?new Set(V).size<=ve.value.maxUniqueForEnum?"select":"range":V.every(Y=>typeof Y=="string")?new Set(V).size<=ve.value.maxUniqueForSelect?"select":"text":V.some(Y=>typeof Y=="object"&&!Array.isArray(Y))?null:"text"}const qe=e.computed(()=>{if(!ue.data?.length)return[];const S=new Set;for(const le of ue.data)if(le&&typeof le=="object")for(const ze of Object.keys(le))S.add(ze);const C=new Set(ue.exclude),V=[];for(const le of S){if(C.has(le))continue;const ze=ue.config[le]||{},gt=ue.data.map(ht=>ht?.[le]),rt=ze.type||Ze(le,gt);if(!rt)continue;const Oe=ze.filterMode||"contain",Bt=Oe==="date"?"date":Oe==="string"?"text":rt,Vt={key:le,label:ze.label||St(le),type:Bt,filterMode:Oe};if(rt==="select"){const ht=gt.filter(yt=>yt!=null&&yt!=="NULL");Vt.uniqueValues=[...new Set(ht)].sort((yt,Mt)=>typeof yt=="number"&&typeof Mt=="number"?yt-Mt:String(yt).localeCompare(String(Mt)))}else if(rt==="range"||rt==="int"){const ht=gt.filter(yt=>typeof yt=="number");Vt.min=Math.min(...ht),Vt.max=Math.max(...ht)}else if(rt==="arraySelect"){const ht=ze.displayKey||W(gt.flatMap(yt=>Array.isArray(yt)?yt:[]));if(Vt.displayKey=ht,Array.isArray(ze.uniqueValues)&&ze.uniqueValues.length>0)Vt.uniqueValues=ze.uniqueValues.map(yt=>String(yt));else{const yt=gt.flatMap(Mt=>Array.isArray(Mt)?Mt:[]).filter(Mt=>Mt!=null).map(Mt=>ht&&typeof Mt=="object"?Mt[ht]:String(Mt)).filter(Mt=>Mt!=null&&Mt!=="");Vt.uniqueValues=[...new Set(yt)].sort((Mt,_t)=>String(Mt).localeCompare(String(_t)))}}V.push(Vt)}const Y=ue.config._order;return Y&&V.sort((le,ze)=>{const gt=Y.indexOf(le.key),rt=Y.indexOf(ze.key);return gt===-1&&rt===-1?0:gt===-1?1:rt===-1?-1:gt-rt}),V}),xe=e.computed(()=>{const S={};for(const C of qe.value)S[C.key]=C;return S}),Me=e.computed(()=>Array.isArray(ue.config.groups)&&ue.config.groups.length>0),Ye=e.computed(()=>{if(!Me.value)return[];const S=new Set(qe.value.map(C=>C.key));return ue.config.groups.map(C=>({...C,keys:C.keys.filter(V=>S.has(V))})).filter(C=>C.keys.length>0)}),ee=e.computed(()=>{if(!Me.value)return[];const S=new Set(ue.config.groups.flatMap(C=>C.keys));return qe.value.filter(C=>!S.has(C.key))}),lt=e.computed(()=>{if(!Ee.value)return[];const S=new Set(Ee.value.keys),C=qe.value.filter(Y=>S.has(Y.key));if(!F.value)return C;const V=F.value.toLowerCase();return C.filter(Y=>Y.label.toLowerCase().includes(V))}),be=e.computed(()=>{if(!F.value)return qe.value;const S=F.value.toLowerCase();return qe.value.filter(C=>C.label.toLowerCase().includes(S))}),Je=e.computed(()=>qe.value.filter(S=>!["arraySelect","arrayText"].includes(S.type))),ut=e.computed(()=>De.value?tt.value==="asc"?"Ascending":"Descending":"No sort selected");function Ct(S){G.value===S?Et():(G.value=S,F.value="",Ee.value=null)}function Et(){G.value=null,F.value="",Ee.value=null}function Ht(S){const C=S.target.closest(".dss-datepicker__overlay, .dss-datepicker__dropdown");G.value&&!C&&!S.target.closest(".dss-filter-popup")&&!S.target.closest(".dss-filter-trigger")&&!S.target.closest(".dss-filter-add-btn")&&Et(),U.value&&pe.value&&!pe.value.contains(S.target)&&(C||(U.value=!1))}e.onMounted(()=>document.addEventListener("click",Ht)),e.onBeforeUnmount(()=>document.removeEventListener("click",Ht));function Pt(S){return xe.value[S]?.label||St(S)}function se(S){return xe.value[S.key]?.filterMode||"contain"}function ge(S){return A(`filter.operators.${S}`)}function He(S){const C=xe.value[S.key];return(ct[C?.type]||ct.text).map(V=>({...V,label:A(`filter.operators.${V.value}`)}))}function _e(S){return Q.has(S)}function Xt(S){const C=xe.value[S.key];return C?C.type==="date"?"date":C.type==="boolean"?"boolean":C.type==="text"||C.type==="arrayText"?"text":C.type==="select"||C.type==="arraySelect"?"multiselect":C.type==="range"||C.type==="int"?S.operator==="between"?"between":"number":"text":"text"}function bt(S){return ct[S]?.[0]?.value||"contains"}function Gt(S,C){return Q.has(C)||S==="date"?null:S==="select"||S==="arraySelect"?[]:(S==="range"||S==="int")&&C==="between"?{min:null,max:null}:S==="range"||S==="int"?null:""}function Lt(S){return xe.value[S.key]?.uniqueValues||[]}function qt(S){const C=Lt(S);if(!F.value)return C;const V=F.value.toLowerCase();return C.filter(Y=>String(Y).toLowerCase().includes(V))}function K(S){const C=S.value;return!C||C.length===0?A("filter.select"):C.length<=2?C.join(", "):A("filter.selectedCount",{count:C.length})}function ye(S){const C=xe.value[S],V=C?.filterMode||"contain",Y=C?.type||"text",le=V==="string"?"contains":bt(Y);Ce.value.push(e.reactive({id:pt++,key:S,operator:le,value:Gt(Y,le)})),Et()}function Be(S){Ce.value=Ce.value.filter(C=>C.id!==S)}function Ue(S,C){const Y=xe.value[C]?.type||"text";S.key=C,S.operator=bt(Y),S.value=Gt(Y,S.operator),Et()}function Ke(S,C){const V=Xt(S);S.operator=C;const Y=Xt(S);if(V!==Y||Q.has(C)){const le=xe.value[S.key];S.value=Gt(le?.type||"text",C)}Et()}function Tt(S,C){const V=C.target.value;S.value=V===""?null:Number(V)}function et(S,C,V){const Y=V.target.value,le=Y===""?null:Number(Y);(!S.value||typeof S.value!="object")&&(S.value={min:null,max:null}),S.value={...S.value,[C]:isNaN(le)?null:le}}function Ot(S,C){const V=S.value||[],Y=V.indexOf(C);S.value=Y>=0?V.filter(le=>le!==C):[...V,C]}function We(){Ce.value=[],we.value="",Et()}function Fe(S){we.value=S.target.value}function xt(S){De.value=S.target.value}function ft(){tt.value=tt.value==="asc"?"desc":"asc"}const J=e.computed(()=>{if(!ue.data)return[];let S=ue.data;if(we.value){const C=we.value.toLowerCase();S=S.filter(V=>{for(const Y of Object.keys(V)){const le=V[Y];if(typeof le=="string"&&le.toLowerCase().includes(C)||typeof le=="number"&&String(le).includes(C)||Array.isArray(le)&&le.some(ze=>ze!=null&&(typeof ze=="string"?ze.toLowerCase().includes(C):typeof ze=="object"?Object.values(ze).some(gt=>typeof gt=="string"&>.toLowerCase().includes(C)):!1)))return!0}return!1})}for(const C of Ce.value){if(!re(C))continue;const V=xe.value[C.key];V&&(S=S.filter(Y=>fe(Y,C,V)))}if(ue.showSortBy&&De.value){const C=De.value,V=tt.value==="asc"?1:-1;S=[...S].sort((Y,le)=>Z(Y?.[C],le?.[C])*V)}return S});function Z(S,C){const V=X(S),Y=X(C);return V==null&&Y==null?0:V==null?1:Y==null?-1:typeof V=="number"&&typeof Y=="number"?V-Y:String(V).localeCompare(String(Y),void 0,{numeric:!0,sensitivity:"base"})}function X(S){return S==null||S==="NULL"?null:typeof S=="string"||typeof S=="number"||typeof S=="boolean"?S:S instanceof Date?S.getTime():null}function re(S){return Q.has(S.operator)?!0:S.value==null||typeof S.value=="string"&&S.value===""||Array.isArray(S.value)&&S.value.length===0?!1:S.value instanceof Date?!isNaN(S.value.getTime()):!(typeof S.value=="object"&&!Array.isArray(S.value)&&S.value.min==null&&S.value.max==null)}function fe(S,C,V){const Y=S?.[C.key],le=C.value,ze=C.operator;if(ze==="is_empty")return rl(Y);if(ze==="is_not_empty")return!rl(Y);const gt=V.type;if(gt==="text"||gt==="arrayText"){const rt=gt==="arrayText"&&Array.isArray(Y)?Y.filter(Vt=>Vt!=null).map(String).join(" "):Y!=null?String(Y):"",Oe=String(le).toLowerCase(),Bt=rt.toLowerCase();switch(ze){case"contains":return Bt.includes(Oe);case"not_contains":return!Bt.includes(Oe);case"equals":return Bt===Oe;case"not_equals":return Bt!==Oe;case"starts_with":return Bt.startsWith(Oe);case"ends_with":return Bt.endsWith(Oe);default:return!0}}if(gt==="select")switch(ze){case"is_any_of":return le.includes(Y);case"is_none_of":return!le.includes(Y);default:return!0}if(gt==="range"||gt==="int"){const rt=typeof Y=="number"?Y:Number(Y);if(typeof rt!="number"||isNaN(rt))return!1;if(ze==="between"){const Bt=le?.min!=null?Number(le.min):null,Vt=le?.max!=null?Number(le.max):null,ht=Bt!=null&&!isNaN(Bt)?Bt:null,yt=Vt!=null&&!isNaN(Vt)?Vt:null;return(ht==null||rt>=ht)&&(yt==null||rt<=yt)}const Oe=typeof le=="number"&&!isNaN(le)?le:Number(le);if(ze==="contains"||ze==="not_contains"){const Bt=String(rt),Vt=String(le??"").toLowerCase(),ht=Bt.toLowerCase().includes(Vt);return ze==="contains"?ht:!ht}if(typeof Oe!="number"||isNaN(Oe))return!1;switch(ze){case"eq":return rt===Oe;case"neq":return rt!==Oe;case"gt":return rt>Oe;case"gte":return rt>=Oe;case"lt":return rt<Oe;case"lte":return rt<=Oe;default:return!0}}if(gt==="arraySelect"){if(!Array.isArray(Y))return!1;const rt=Y.filter(Oe=>Oe!=null).map(Oe=>V.displayKey&&typeof Oe=="object"?Oe[V.displayKey]:String(Oe));switch(ze){case"contains_any":return rt.some(Oe=>le.includes(Oe));case"contains_all":return le.every(Oe=>rt.includes(Oe));case"not_contains_any":return!rt.some(Oe=>le.includes(Oe));default:return!0}}if(gt==="date"){const rt=Ge(le);if(!rt||isNaN(rt.getTime()))return!1;const Oe=Ge(Y);if(!Oe||isNaN(Oe.getTime()))return!1;const Bt=Nt(Oe),Vt=Nt(rt);switch(ze){case"eq":return Bt===Vt;case"before":return Bt<Vt;case"after":return Bt>Vt;default:return!0}}if(gt==="boolean"){const rt=Y===!0||Y==="true"||Y===1,Oe=Y===!1||Y==="false"||Y===0;switch(ze){case"is_true":return rt;case"is_false":return Oe;default:return!0}}return!0}function Ge(S){if(S==null)return null;if(S instanceof Date)return isNaN(S.getTime())?null:S;if(typeof S=="number")return new Date(S>1e10?S:S*1e3);if(typeof S=="string"){const C=new Date(S);return isNaN(C.getTime())?null:C}return null}function Nt(S){const C=S.getFullYear(),V=String(S.getMonth()+1).padStart(2,"0"),Y=String(S.getDate()).padStart(2,"0");return`${C}-${V}-${Y}`}function rl(S){return!!(S==null||S===""||S==="NULL"||Array.isArray(S)&&S.length===0||Array.isArray(S)&&S.every(C=>C==null))}e.watch(J,S=>I("update:modelValue",S),{immediate:!0}),e.watch(()=>ue.data,()=>{Ce.value=[],we.value="",U.value=!1,De.value="",tt.value="asc",Et()});function St(S){return S.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,C=>C.toUpperCase())}function ll(){const S=C=>{if(C==null)return C;if(C instanceof Date)return{_type:"Date",value:C.toISOString(),local:C.toLocaleDateString()};if(Array.isArray(C))return C.map(S);if(typeof C=="object"&&!Array.isArray(C)){const V={};for(const Y of Object.keys(C))V[Y]=S(C[Y]);return V}return C};return{globalSearch:we.value,rows:Ce.value.map(C=>({key:C.key,operator:C.operator,value:S(C.value),defType:xe.value[C.key]?.type,defFilterMode:xe.value[C.key]?.filterMode})),filteredCount:J.value?.length??0}}return ne({getDebugState:ll}),(S,C)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-filter",{"dss-filter--unstyled":ve.value.unstyled}])},[e.createElementVNode("div",{class:"dss-filter-global",ref_key:"globalRef",ref:pe},[e.createElementVNode("div",S2,[C[20]||(C[20]=e.createElementVNode("svg",{class:"dss-filter-global-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),e.createElementVNode("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})],-1)),e.createElementVNode("input",{type:"text",class:"dss-filter-global-input",placeholder:e.unref(A)("filter.searchAcrossFields"),value:we.value,onInput:Fe},null,40,V2),we.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-filter-global-clear",onClick:C[0]||(C[0]=V=>we.value="")},"×")):e.createCommentVNode("",!0),e.createElementVNode("button",{class:e.normalizeClass(["dss-filter-funnel-btn",{active:U.value||Ce.value.length>0,"dss-filter-funnel-btn--with-sort":ue.showSortBy}]),onClick:C[1]||(C[1]=V=>U.value=!U.value),type:"button",title:U.value?e.unref(A)("filter.closeAdvancedFilter"):e.unref(A)("filter.openAdvancedFilter")},[C[14]||(C[14]=e.createElementVNode("svg",{class:"dss-filter-funnel-icon",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M11.7583 2.00407L11.7537 2.00926L7.84558 6.18223V9.38409C7.84581 9.53637 7.80836 9.68634 7.73658 9.82064C7.6648 9.95494 7.56091 10.0694 7.43417 10.1538L5.58772 11.3852C5.44858 11.4779 5.28688 11.531 5.11988 11.539C4.95288 11.5469 4.78685 11.5094 4.63952 11.4304C4.49219 11.3514 4.36908 11.2338 4.28334 11.0903C4.1976 10.9467 4.15244 10.7826 4.15269 10.6154V6.18223L0.244567 2.00926L0.239951 2.00407C0.119785 1.87182 0.0405781 1.70755 0.0119374 1.53118C-0.0167033 1.35481 0.00645342 1.17391 0.0785984 1.01044C0.150743 0.846967 0.268776 0.707944 0.418378 0.610235C0.56798 0.512525 0.742722 0.460328 0.921405 0.459976H11.0769C11.2557 0.459994 11.4307 0.511948 11.5805 0.609528C11.7304 0.707107 11.8487 0.846111 11.9211 1.00965C11.9934 1.17319 12.0167 1.35422 11.9881 1.53075C11.9596 1.70728 11.8803 1.87172 11.7601 2.00407H11.7583Z",fill:"currentColor"})],-1)),Ce.value.length>0?(e.openBlock(),e.createElementBlock("span",B2,e.toDisplayString(Ce.value.length),1)):e.createCommentVNode("",!0)],10,N2),ue.showSortBy?(e.openBlock(),e.createElementBlock("div",M2,[C[19]||(C[19]=e.createElementVNode("label",{class:"dss-filter-sortby-label",for:"dss-filter-sort-select"},"Sort by",-1)),e.createElementVNode("select",{id:"dss-filter-sort-select",class:"dss-filter-sortby-select",value:De.value,onChange:xt},[C[15]||(C[15]=e.createElementVNode("option",{value:""},"None",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Je.value,V=>(e.openBlock(),e.createElementBlock("option",{key:V.key,value:V.key},e.toDisplayString(V.label),9,$2))),128))],40,_2),e.createElementVNode("button",{class:"dss-filter-sortby-order",type:"button",onClick:ft,disabled:!De.value,title:ut.value},[De.value?tt.value==="asc"?(e.openBlock(),e.createElementBlock("svg",T2,[...C[17]||(C[17]=[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:"currentColor"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",D2,[...C[18]||(C[18]=[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:"currentColor"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",A2,[...C[16]||(C[16]=[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:"currentColor"},null,-1)])]))],8,L2)])):e.createCommentVNode("",!0)]),U.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-advanced-popup",onClick:C[13]||(C[13]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",H2,[Ce.value.length===0?(e.openBlock(),e.createElementBlock("div",R2,e.toDisplayString(e.unref(A)("filter.noConditionsApplied")),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ce.value,(V,Y)=>(e.openBlock(),e.createElementBlock("div",{key:V.id,class:"dss-filter-row"},[e.createElementVNode("span",F2,e.toDisplayString(Y===0?e.unref(A)("filter.where"):e.unref(A)("filter.and")),1),e.createElementVNode("div",I2,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(le=>Ct(`${V.id}:field`),["stop"])},[e.createElementVNode("span",P2,e.toDisplayString(Pt(V.key)),1),C[21]||(C[21]=e.createElementVNode("svg",{class:"dss-filter-chevron",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("polyline",{points:"6 9 12 15 18 9"})],-1))],8,z2),G.value===`${V.id}:field`?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup",onClick:C[3]||(C[3]=e.withModifiers(()=>{},["stop"]))},[e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":C[2]||(C[2]=le=>F.value=le),placeholder:e.unref(A)("filter.searchAttributes")},null,8,O2),[[e.vModelText,F.value]]),e.createElementVNode("ul",q2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(be.value,le=>(e.openBlock(),e.createElementBlock("li",{key:le.key,class:"dss-filter-popup-item",onClick:ze=>Ue(V,le.key)},e.toDisplayString(le.label),9,W2))),128)),be.value.length===0?(e.openBlock(),e.createElementBlock("li",Z2,e.toDisplayString(e.unref(A)("filter.noMatch")),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),se(V)==="contain"||se(V)==="date"?(e.openBlock(),e.createElementBlock("div",U2,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(le=>Ct(`${V.id}:op`),["stop"])},[e.createElementVNode("span",Y2,e.toDisplayString(ge(V.operator)),1),C[22]||(C[22]=e.createElementVNode("svg",{class:"dss-filter-chevron",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("polyline",{points:"6 9 12 15 18 9"})],-1))],8,X2),G.value===`${V.id}:op`?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup",onClick:C[4]||(C[4]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("ul",j2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(He(V),le=>(e.openBlock(),e.createElementBlock("li",{key:le.value,class:e.normalizeClass(["dss-filter-popup-item",{selected:V.operator===le.value}]),onClick:ze=>Ke(V,le.value)},e.toDisplayString(le.label),11,K2))),128))])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),_e(V.operator)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",G2,[se(V)==="string"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,type:"text",class:"dss-filter-value-input",placeholder:e.unref(A)("filter.enterValue"),"onUpdate:modelValue":le=>V.value=le},null,8,Q2)),[[e.vModelText,V.value]]):se(V)==="date"?(e.openBlock(),e.createElementBlock("div",J2,[e.createVNode(ta,{mode:"single",modelValue:V.value,"onUpdate:modelValue":le=>V.value=le},null,8,["modelValue","onUpdate:modelValue"])])):Xt(V)==="text"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:2,type:"text",class:"dss-filter-value-input",placeholder:e.unref(A)("filter.enterValue"),"onUpdate:modelValue":le=>V.value=le},null,8,e0)),[[e.vModelText,V.value]]):Xt(V)==="number"?(e.openBlock(),e.createElementBlock("input",{key:3,type:"number",class:"dss-filter-value-input",placeholder:e.unref(A)("filter.enterValue"),value:V.value,onInput:le=>Tt(V,le),step:xe.value[V.key]?.type==="int"?1:void 0},null,40,t0)):Xt(V)==="between"?(e.openBlock(),e.createElementBlock("div",l0,[e.createElementVNode("input",{type:"number",class:"dss-filter-value-input",placeholder:e.unref(A)("filter.min"),value:V.value?.min,onInput:le=>et(V,"min",le),step:xe.value[V.key]?.type==="int"?1:void 0},null,40,n0),e.createElementVNode("span",o0,e.toDisplayString(e.unref(A)("filter.and")),1),e.createElementVNode("input",{type:"number",class:"dss-filter-value-input",placeholder:e.unref(A)("filter.max"),value:V.value?.max,onInput:le=>et(V,"max",le),step:xe.value[V.key]?.type==="int"?1:void 0},null,40,a0)])):Xt(V)==="multiselect"?(e.openBlock(),e.createElementBlock("div",s0,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(le=>Ct(`${V.id}:val`),["stop"])},[e.createElementVNode("span",i0,e.toDisplayString(K(V)),1),C[23]||(C[23]=e.createElementVNode("svg",{class:"dss-filter-chevron",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("polyline",{points:"6 9 12 15 18 9"})],-1))],8,r0),G.value===`${V.id}:val`?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup",onClick:C[6]||(C[6]=e.withModifiers(()=>{},["stop"]))},[Lt(V).length>6?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":C[5]||(C[5]=le=>F.value=le),placeholder:e.unref(A)("filter.search")},null,8,c0)),[[e.vModelText,F.value]]):e.createCommentVNode("",!0),e.createElementVNode("ul",u0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(qt(V),le=>(e.openBlock(),e.createElementBlock("li",{key:le,class:"dss-filter-popup-item",onClick:ze=>Ot(V,le)},[e.createElementVNode("input",{type:"checkbox",checked:(V.value||[]).includes(le),tabindex:"-1"},null,8,m0),e.createElementVNode("span",null,e.toDisplayString(le),1)],8,d0))),128)),qt(V).length===0?(e.openBlock(),e.createElementBlock("li",p0,e.toDisplayString(e.unref(A)("filter.noMatch")),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])),e.createElementVNode("button",{class:"dss-filter-row-remove",onClick:le=>Be(V.id)},[...C[24]||(C[24]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])],8,f0)]))),128)),e.createElementVNode("div",v0,[e.createElementVNode("div",g0,[e.createElementVNode("button",{class:"dss-filter-add-btn",onClick:C[7]||(C[7]=e.withModifiers(V=>Ct("add"),["stop"]))},e.toDisplayString(e.unref(A)("filter.addFilter")),1),G.value==="add"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup dss-filter-add-popup",onClick:C[12]||(C[12]=e.withModifiers(()=>{},["stop"]))},[Me.value&&!Ee.value&&!F.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":C[8]||(C[8]=V=>F.value=V),placeholder:e.unref(A)("filter.searchAttributes")},null,8,h0),[[e.vModelText,F.value]]),e.createElementVNode("ul",y0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ye.value,V=>(e.openBlock(),e.createElementBlock("li",{key:V.label,class:"dss-filter-popup-item dss-filter-popup-group",onClick:Y=>Ee.value=V},[e.createElementVNode("span",null,e.toDisplayString(V.label),1),C[25]||(C[25]=e.createElementVNode("svg",{class:"dss-filter-chevron-right",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("polyline",{points:"9 18 15 12 9 6"})],-1))],8,k0))),128)),ee.value.length>0?(e.openBlock(),e.createElementBlock("li",C0)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ee.value,V=>(e.openBlock(),e.createElementBlock("li",{key:V.key,class:"dss-filter-popup-item",onClick:Y=>ye(V.key)},e.toDisplayString(V.label),9,b0))),128))])],64)):Ee.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:"dss-filter-popup-back",onClick:C[9]||(C[9]=V=>Ee.value=null)},[C[26]||(C[26]=e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("polyline",{points:"15 18 9 12 15 6"})],-1)),e.createElementVNode("span",null,e.toDisplayString(Ee.value.label),1)]),e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":C[10]||(C[10]=V=>F.value=V),placeholder:e.unref(A)("filter.searchAttributes")},null,8,w0),[[e.vModelText,F.value]]),e.createElementVNode("ul",x0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(lt.value,V=>(e.openBlock(),e.createElementBlock("li",{key:V.key,class:"dss-filter-popup-item",onClick:Y=>ye(V.key)},e.toDisplayString(V.label),9,E0))),128)),lt.value.length===0?(e.openBlock(),e.createElementBlock("li",S0,e.toDisplayString(e.unref(A)("filter.noMatch")),1)):e.createCommentVNode("",!0)])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":C[11]||(C[11]=V=>F.value=V),placeholder:e.unref(A)("filter.searchAttributes")},null,8,V0),[[e.vModelText,F.value]]),e.createElementVNode("ul",N0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(be.value,V=>(e.openBlock(),e.createElementBlock("li",{key:V.key,class:"dss-filter-popup-item",onClick:Y=>ye(V.key)},e.toDisplayString(V.label),9,B0))),128)),be.value.length===0?(e.openBlock(),e.createElementBlock("li",M0,e.toDisplayString(e.unref(A)("filter.noMatch")),1)):e.createCommentVNode("",!0)])],64))])):e.createCommentVNode("",!0)]),Ce.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-filter-clear-all",onClick:We},e.toDisplayString(e.unref(A)("filter.clearAllFilters")),1)):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],512)],2))}}),L0={class:"dss-pill-field__pills"},A0=["data-value"],T0=["disabled"],D0={class:"dss-pill-field__pill-text"},H0={key:0,class:"dss-pill-field__pill-actions"},R0=["onClick"],F0=["onClick"],I0=["placeholder","disabled"],z0=e.defineComponent({__name:"DSSPillField",props:{modelValue:{default:()=>[]},placeholder:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(H,{emit:ne}){const M=H,A=ne,ue=e.ref(""),I=e.ref([...M.modelValue]),$=e.ref(null);let ve=null;const ct=e.ref(null),Q=e.ref(""),f=e.ref(null),we=e.ref(null),Ce=e.computed(()=>{if(!we.value)return;const{width:Me,height:Ye}=we.value;return{minWidth:`${Me}px`,height:`${Ye}px`}});function G(Me,Ye){ct.value===Ye&&(f.value=Me)}function U(){ct.value=null,Q.value="",we.value=null,f.value=null}const pe=e.computed(()=>new Set(I.value.map(Me=>Me.trim()).filter(Boolean)));function F(Me){$.value=Me,ve&&clearTimeout(ve),ve=setTimeout(()=>{$.value=null,ve=null},900)}function Ee(Me){const Ye=Me.trim();return Ye?pe.value.has(Ye)?(F(Ye),!1):(I.value=[...I.value,Ye],A("update:modelValue",[...I.value]),!0):!1}function De(Me){const Ye=Me.split(/\r?\n/g).map(Je=>Je.trim()).filter(Boolean);if(!Ye.length)return;const ee=new Set(I.value.map(Je=>Je.trim()).filter(Boolean)),lt=[...I.value];let be=null;for(const Je of Ye){if(ee.has(Je)){be??=Je;continue}ee.add(Je),lt.push(Je)}lt.length!==I.value.length&&(I.value=lt,A("update:modelValue",[...I.value])),be&&F(be)}function tt(Me){M.disabled||(ct.value===Me&&U(),I.value=I.value.filter((Ye,ee)=>ee!==Me),A("update:modelValue",[...I.value]))}async function pt(Me,Ye){if(M.disabled)return;const ee=Ye.currentTarget.closest(".dss-pill-field__pill");ee&&(we.value={width:ee.offsetWidth,height:ee.offsetHeight}),ct.value=Me,Q.value=I.value[Me]??"",await e.nextTick();const lt=f.value;if(!lt)return;lt.focus();const be=lt.value.length;lt.setSelectionRange(be,be)}function W(){U()}function Ze(){if(M.disabled||ct.value===null)return;const Me=ct.value,Ye=I.value[Me]??"",ee=Q.value.trim();if(U(),ee!==Ye&&pe.value.has(ee)){F(ee);return}if(!ee){I.value=I.value.filter((be,Je)=>Je!==Me),A("update:modelValue",[...I.value]);return}const lt=I.value.map((be,Je)=>Je===Me?ee:be);I.value=lt,A("update:modelValue",[...I.value])}function qe(Me){Me.preventDefault(),!M.disabled&&(Ee(ue.value),ue.value="")}function xe(Me){if(M.disabled)return;const Ye=Me.clipboardData?.getData("text")??"";!Ye.includes(`
|
|
118
|
+
`)&&!Ye.includes("\r")||(Me.preventDefault(),De(Ye),ue.value="")}return e.watch(()=>M.modelValue,Me=>{I.value=Array.isArray(Me)?[...Me]:[]},{deep:!0}),e.onBeforeUnmount(()=>{ve&&clearTimeout(ve)}),(Me,Ye)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-pill-field",{"dss-pill-field--disabled":Me.disabled}])},[e.createElementVNode("div",L0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(ee,lt)=>(e.openBlock(),e.createElementBlock("span",{key:ee,class:e.normalizeClass(["dss-pill-field__pill",{"dss-pill-field__pill--highlight":$.value===ee,"dss-pill-field__pill--editing":ct.value===lt}]),style:e.normalizeStyle(ct.value===lt&&we.value?Ce.value:void 0)},[ct.value===lt?(e.openBlock(),e.createElementBlock("span",{key:0,class:"dss-pill-field__pill-edit-wrap","data-value":Q.value||" "},[e.withDirectives(e.createElementVNode("input",{ref_for:!0,ref:be=>G(be,lt),"onUpdate:modelValue":Ye[0]||(Ye[0]=be=>Q.value=be),class:"dss-pill-field__pill-edit",type:"text",disabled:Me.disabled,onKeydown:[e.withKeys(Ze,["enter"]),e.withKeys(W,["esc"])],onBlur:Ze},null,40,T0),[[e.vModelText,Q.value]])],8,A0)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("span",D0,e.toDisplayString(ee),1),Me.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",H0,[e.createElementVNode("button",{type:"button",class:"dss-pill-field__pill-action",onClick:be=>pt(lt,be)},[...Ye[2]||(Ye[2]=[e.createElementVNode("svg",{class:"dss-pill-field__pill-action-icon",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M0 9.64033V11.6667C0 11.8534 0.146646 12 0.333287 12H2.35967C2.44633 12 2.53298 11.9667 2.59297 11.9L9.87196 4.62769L7.37231 2.12804L0.0999862 9.40036C0.0333288 9.46702 0 9.54701 0 9.64033ZM11.805 2.69463C12.065 2.43466 12.065 2.01472 11.805 1.75476L10.2452 0.194973C9.98528 -0.064991 9.56534 -0.064991 9.30537 0.194973L8.08554 1.4148L10.5852 3.91446L11.805 2.69463Z",fill:"currentColor"})],-1)])],8,R0),e.createElementVNode("button",{type:"button",class:"dss-pill-field__pill-action dss-pill-field__pill-action--remove",onClick:be=>tt(lt)}," × ",8,F0)]))],64))],6))),128)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":Ye[1]||(Ye[1]=ee=>ue.value=ee),class:"dss-pill-field__input",type:"text",placeholder:I.value.length?"":Me.placeholder,disabled:Me.disabled,onPaste:xe,onKeydown:e.withKeys(qe,["enter"])},null,40,I0),[[e.vModelText,ue.value]])])],2))}}),P0={class:"dss-step-bar__header"},O0={class:"dss-step-bar__label"},q0={key:0,class:"dss-step-bar__counter"},W0={class:"dss-step-bar__track-wrapper"},Z0=["aria-valuemax","aria-valuenow","aria-label"],U0=["onMouseenter"],X0={__name:"DSSStepBar",props:{label:{type:String,default:"Progress"},steps:{type:Number,default:5},currentStep:{type:Number,default:0},segments:{type:Array,default:()=>[]},segmentOrder:{type:String,default:"input",validator:H=>["input","desc","asc"].includes(H)},totalValue:{type:Number,default:null},activeColor:{type:String,default:"#34c759"},labelColor:{type:String,default:null},counterColor:{type:String,default:null},valueLabel:{type:String,default:""},counterAsPercentage:{type:Boolean,default:!1},showCounter:{type:Boolean,default:!0},inactiveColor:{type:String,default:"#e5e7eb"},remainderLabel:{type:String,default:"Unused"},remainderTooltipSummary:{type:Boolean,default:!1},options:{type:Object,default:()=>({})}},setup(H){const ne=H,M={segmentMarker:{color:null,width:null,height:null,backgroundColor:"transparent",borderColor:"transparent"},maxSegment:{marker:{enabled:!1,color:null,width:null,height:null,backgroundColor:"transparent",borderColor:"transparent"}}},A=se=>se&&typeof se=="object"&&!Array.isArray(se),ue=(se,ge)=>{const He=Object.assign({},se);return!A(se)||!A(ge)||Object.keys(ge).forEach(_e=>{if(A(ge[_e])){_e in se?He[_e]=ue(se[_e],ge[_e]):Object.assign(He,{[_e]:ge[_e]});return}Object.assign(He,{[_e]:ge[_e]})}),He},I=e.computed(()=>ue(M,ne.options)),$=e.computed(()=>Math.max(1,Number(ne.steps)||1)),ve=e.computed(()=>Math.min($.value,Math.max(0,Number(ne.currentStep)||0))),ct=e.computed(()=>Array.isArray(ne.segments)&&ne.segments.length>0),Q=e.computed(()=>{if(!ct.value)return[];const se=ne.segments.map((ge,He)=>{const _e=Number(ge?.value);return{label:ge?.label||`Step ${He+1}`,value:Number.isFinite(_e)&&_e>0?_e:0,color:ge?.color||ne.activeColor,marker:ge?.marker}});return ne.segmentOrder==="desc"?[...se].sort((ge,He)=>He.value-ge.value):ne.segmentOrder==="asc"?[...se].sort((ge,He)=>ge.value-He.value):se}),f=e.computed(()=>ct.value?Q.value.reduce((se,ge)=>se+ge.value,0):ve.value),we=e.computed(()=>ct.value?Number.isFinite(Number(ne.totalValue))&&Number(ne.totalValue)>0?Number(ne.totalValue):Math.max(1,f.value):$.value),Ce=e.computed(()=>ct.value&&Number.isFinite(Number(ne.totalValue))&&Number(ne.totalValue)>0),G=e.computed(()=>Ce.value?Math.max(0,Number(ne.totalValue)-f.value):0),U=e.computed(()=>typeof ne.remainderLabel=="string"&&ne.remainderLabel.trim().length>0),pe=e.computed(()=>G.value>0),F=e.computed(()=>Q.value.reduce((se,ge)=>Math.max(se,Number(ge.value)||0),0)),Ee=e.computed(()=>Q.value.filter(se=>se.value>0).map(se=>`${se.label}: ${Je(se.value)}`).join(" | ")),De=e.computed(()=>ct.value?Ce.value?Q.value.filter(se=>se.value>0):Q.value:[]),tt=e.computed(()=>{if(!ne.counterAsPercentage)return`${f.value} / ${we.value}`;const se=Number(we.value);if(!Number.isFinite(se)||se<=0)return"0%";const ge=Math.round(Number(f.value)/se*100);return`${Math.min(Math.max(ge,0),100)}%`}),pt=e.computed(()=>f.value),W=e.computed(()=>we.value),Ze=e.reactive({visible:!1,x:0,content:""}),qe=e.computed(()=>({left:`${Ze.x}px`})),xe=se=>{const ge=se?.parentElement;return ge?ge.offsetLeft+ge.offsetWidth/2:0},Me=se=>{if(Ce.value){const _e=Math.max(0,Number(se.value)||0);return{flex:`${_e} 0 0`,minWidth:_e>0?"6px":"0",backgroundColor:se.color}}const ge=f.value;return{flex:`${se.value>0?se.value:ge>0?1e-4:1} 0 0`,minWidth:"6px",backgroundColor:se.color}},Ye=se=>Number(se?.value||0)>0&&Number(se?.value||0)===F.value,ee=se=>{const ge=A(se?.marker)?se.marker:{},He=se?.marker===!0||ge.enabled===!0,_e=Ye(se)&&I.value.maxSegment?.marker?.enabled===!0;if(!(He||_e))return{enabled:!1};const bt=ge.backgroundColor??(_e?I.value.maxSegment?.marker?.backgroundColor:I.value.segmentMarker?.backgroundColor),Gt=ge.borderColor??(_e?I.value.maxSegment?.marker?.borderColor:I.value.segmentMarker?.borderColor),Lt=ge.color??(_e?I.value.maxSegment?.marker?.color:I.value.segmentMarker?.color),qt=ge.width??(_e?I.value.maxSegment?.marker?.width:I.value.segmentMarker?.width),K=ge.height??(_e?I.value.maxSegment?.marker?.height:I.value.segmentMarker?.height);return{enabled:!0,backgroundColor:bt,borderColor:Gt,color:Lt,width:qt,height:K,icon:ge.icon??null,...ge}},lt=se=>{const ge=ee(se);return{backgroundColor:ge.backgroundColor??void 0,borderColor:ge.borderColor??void 0,color:ge.color??void 0}},be=se=>{const ge=ee(se);return{width:ge.width??void 0,height:ge.height??void 0}},Je=se=>`${se}${ne.valueLabel}`,ut=e.computed(()=>({flex:`${G.value} 0 0`,minWidth:G.value>0?"6px":"0",backgroundColor:ne.inactiveColor})),Ct=(se,ge)=>{if(!se||!ge?.currentTarget)return;const He=ge.currentTarget;if(ne.remainderTooltipSummary){Ze.x=xe(He),Ze.content=Ee.value,Ze.visible=!!Ze.content;return}Ze.x=He.offsetLeft+He.offsetWidth/2,Ze.content=`${se.label}: ${Je(se.value)}`,Ze.visible=!0},Et=se=>{if(!G.value||!se?.currentTarget)return;const ge=se.currentTarget;if(ne.remainderTooltipSummary){Ze.x=xe(ge),Ze.content=Ee.value,Ze.visible=!!Ze.content;return}Ze.x=ge.offsetLeft+ge.offsetWidth/2,U.value&&(Ze.content=`${ne.remainderLabel}: ${Je(G.value)}`,Ze.visible=!0)},Ht=()=>{Ze.visible=!1},Pt=e.computed(()=>({"--dss-step-bar-label-color":ne.labelColor??void 0,"--dss-step-bar-counter-color":ne.counterColor??void 0,"--dss-step-bar-active-color":ne.activeColor,"--dss-step-bar-inactive-color":ne.inactiveColor}));return(se,ge)=>(e.openBlock(),e.createElementBlock("div",{class:"dss-step-bar",style:e.normalizeStyle(Pt.value)},[e.createElementVNode("div",P0,[e.createElementVNode("span",O0,[e.renderSlot(se.$slots,"label",{label:H.label},()=>[e.createTextVNode(e.toDisplayString(H.label),1)])]),H.showCounter?(e.openBlock(),e.createElementBlock("span",q0,[e.renderSlot(se.$slots,"counter",{counterDisplay:tt.value},()=>[e.createTextVNode(e.toDisplayString(tt.value),1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",W0,[e.createElementVNode("div",{class:"dss-step-bar__track",role:"progressbar","aria-valuemin":0,"aria-valuemax":W.value,"aria-valuenow":pt.value,"aria-label":H.label},[ct.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(De.value,(He,_e)=>(e.openBlock(),e.createElementBlock("div",{key:`segment-${_e}-${He.label}`,class:e.normalizeClass(["dss-step-bar__segment dss-step-bar__segment--interactive",{"dss-step-bar__segment--max":Ye(He),"dss-step-bar__segment--marker-enabled":ee(He).enabled}]),style:e.normalizeStyle(Me(He)),onMouseenter:Xt=>Ct(He,Xt),onMouseleave:Ht},[ee(He).enabled?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-step-bar__segment-marker",style:e.normalizeStyle(lt(He)),"aria-hidden":"true"},[e.createElementVNode("span",{class:"dss-step-bar__segment-marker-icon",style:e.normalizeStyle(be(He))},[e.renderSlot(se.$slots,"segment-marker-icon",{segment:He,index:_e,marker:ee(He)},()=>[e.renderSlot(se.$slots,"max-segment-icon",{segment:He,index:_e,marker:ee(He)},()=>[e.createTextVNode(e.toDisplayString(ee(He).icon||""),1)])])],4)],4)):e.createCommentVNode("",!0)],46,U0))),128)),pe.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-step-bar__segment dss-step-bar__segment--remainder",style:e.normalizeStyle(ut.value),onMouseenter:ge[0]||(ge[0]=He=>Et(He)),onMouseleave:Ht},null,36)):e.createCommentVNode("",!0)],64)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList($.value,He=>(e.openBlock(),e.createElementBlock("div",{key:He,class:e.normalizeClass(["dss-step-bar__segment",{"dss-step-bar__segment--active":He<=ve.value}])},null,2))),128))],8,Z0),Ze.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-step-bar__tooltip",style:e.normalizeStyle(qe.value)},e.toDisplayString(Ze.content),5)):e.createCommentVNode("",!0)])],4))}},Y0={contextMenu:{addMarker:"Add Marker",clearAllMarkers:"Clear All Markers",downloadSvg:"Download SVG",downloadPng:"Download PNG",downloadCsv:"Download CSV"},modalMarker:{editMarker:"Edit Marker",viewMarker:"View Marker",title:"Title",description:"Description",iconType:"Icon Type",defaultIcon:"Default Logo",iconPreview:"Icon Preview",deleteMarker:"Delete Marker",cancel:"Cancel",close:"Close",save:"Save",placeholderTitle:"Enter marker title",placeholderDescription:"Enter marker description (required)"},zoom:{doubleClickToReset:"(Double-click to reset)"},csv:{chartTitle:"Chart Title",chartSubtitle:"Chart Subtitle",generated:"Generated"},fallback:{item:"Item",axis:"Axis"},tooltip:{flags:"Flags",markers:"Markers",manualFlags:"Manual Flags",autoFlags:"Auto Flags"}},j0={firstPage:"First page",previousPage:"Previous page",nextPage:"Next page",lastPage:"Last page",currentPageAriaLabel:"Current page",rowsPerPage:"Rows per page",searchPlaceholder:"Search...",searchAriaLabel:"Search",searchTableAriaLabel:"Search table",clearSearchAriaLabel:"Clear search",downloadPdf:"Download PDF",downloadExcel:"Download Excel",columnVisibility:"Columns Visibility",expandRowAriaLabel:"Expand row",collapseRowAriaLabel:"Collapse row",filterColumnAriaLabel:"Filter column",clearFilter:"Clear",search:"Search...",filterFrom:"From:",filterTo:"To:",dateFormat:"dd/mm/yyyy",showingRange:"Showing {start}-{end} from {total}",ofPages:"of {total}",emptyMessage:"No data available"},K0={searchAcrossFields:"Search across all fields...",openAdvancedFilter:"Open advanced filter",closeAdvancedFilter:"Close advanced filter",noConditionsApplied:"No filter conditions are applied to this view",where:"Where",and:"And",searchAttributes:"Search attributes...",noMatch:"No match",enterValue:"Enter value...",min:"Min",max:"Max",search:"Search...",addFilter:"Add filter",clearAllFilters:"Clear all filters",select:"Select...",selectedCount:"{count} selected",operators:{contains:"contains",not_contains:"does not contain",equals:"equals",not_equals:"does not equal",starts_with:"starts with",ends_with:"ends with",is_empty:"is empty",is_not_empty:"is not empty",is_any_of:"is any of",is_none_of:"is none of",eq:"=",neq:"≠",gt:">",gte:"≥",lt:"<",lte:"≤",between:"between",contains_any:"contains any of",contains_all:"contains all of",not_contains_any:"does not contain",before:"before",after:"after",is_true:"is true",is_false:"is false"}},G0={selectDate:"Select Date",selectRange:"Select range",selectFromList:"Select a date",noAvailableDates:"No dates available",startDate:"Start date",endDate:"End date",prevMonth:"Previous month",nextMonth:"Next month",quickSelect:{today:"Today",lastWeek:"Last week",last15Days:"Last 15 days",last30Days:"Last 30 days",thisMonth:"This month",last3Months:"Last 3 months",last6Months:"Last 6 months",last12Months:"Last 12 months",lastYear:"Last year",allDates:"All dates",last2Dates:"Last 2 dates",last3Dates:"Last 3 dates",last4Dates:"Last 4 dates",last5Dates:"Last 5 dates"}},Q0={toolbar:{undo:"Undo",redo:"Redo",paragraphFormat:"Paragraph Format",bold:"Bold",italic:"Italic",underline:"Underline",citation:"Citation",insertLink:"Insert Link",removeLink:"Remove Link",bulletList:"Bullet List",numberList:"Number List",image:"Image",comment:"Comment",askAi:"Ask AI"},paragraph:{heading1:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",heading4:"Heading 4",heading5:"Heading 5",heading6:"Heading 6",paragraph:"Paragraph"},link:{editLink:"Edit Link",altText:"Alt text:",url:"URL:",enterAltText:"Enter alt text...",enterUrl:"Enter URL...",cancel:"Cancel",save:"Save"},image:{addImage:"Add Image",editImage:"Edit Image",upload:"Upload",imageLink:"Image Link",uploadImage:"Upload image:",imageUrl:"Image URL:",altText:"Alt text:",width:"Width (px):",height:"Height (px):",enterAltText:"Enter alt text...",enterImageUrl:"https://example.com/image.jpg",auto:"Auto",noAlt:"No alt",cancel:"Cancel",save:"Save"},comment:{placeholder:"Add a comment",send:"Send",delete:"Delete comment"},started_conversation:"Started conversation",labels:{title:"Title",description:"Description"},placeholders:{title:"Enter title...",description:"Enter description...",startTyping:"Start typing..."},footer:{word:"word",words:"words",character:"character",characters:"characters"}},no={chart:Y0,table:j0,filter:K0,datepicker:G0,textEditor:Q0},J0={contextMenu:{addMarker:"Ajouter un marqueur",clearAllMarkers:"Effacer tous les marqueurs",downloadSvg:"Télécharger SVG",downloadPng:"Télécharger PNG",downloadCsv:"Télécharger CSV"},modalMarker:{editMarker:"Modifier le marqueur",viewMarker:"Voir le marqueur",title:"Titre",description:"Description",iconType:"Type d'icône",defaultIcon:"Logo par défaut",iconPreview:"Aperçu de l'icône",deleteMarker:"Supprimer le marqueur",cancel:"Annuler",close:"Fermer",save:"Enregistrer",placeholderTitle:"Entrez le titre du marqueur",placeholderDescription:"Entrez la description du marqueur (requise)"},zoom:{doubleClickToReset:"(Double-cliquez pour réinitialiser)"},csv:{chartTitle:"Titre du graphique",chartSubtitle:"Sous-titre du graphique",generated:"Généré"},fallback:{item:"Élément",axis:"Axe"},tooltip:{flags:"Drapeaux",markers:"Marqueurs",manualFlags:"Drapeaux manuels",autoFlags:"Drapeaux automatiques"}},e9={firstPage:"Première page",previousPage:"Page précédente",nextPage:"Page suivante",lastPage:"Dernière page",currentPageAriaLabel:"Page actuelle",rowsPerPage:"Lignes par page",searchPlaceholder:"Rechercher...",searchAriaLabel:"Rechercher",searchTableAriaLabel:"Rechercher dans le tableau",clearSearchAriaLabel:"Effacer la recherche",downloadPdf:"Télécharger PDF",downloadExcel:"Télécharger Excel",columnVisibility:"Visibilité des colonnes",expandRowAriaLabel:"Développer la ligne",collapseRowAriaLabel:"Réduire la ligne",filterColumnAriaLabel:"Filtrer la colonne",clearFilter:"Effacer",search:"Rechercher...",filterFrom:"Du :",filterTo:"Au :",dateFormat:"jj/mm/aaaa",showingRange:"Affichage de {start}-{end} sur {total}",ofPages:"sur {total}",emptyMessage:"Aucune donnée disponible"},t9={searchAcrossFields:"Rechercher dans tous les champs...",openAdvancedFilter:"Ouvrir le filtre avancé",closeAdvancedFilter:"Fermer le filtre avancé",noConditionsApplied:"Aucune condition de filtre n'est appliquée à cette vue",where:"Où",and:"Et",searchAttributes:"Rechercher des attributs...",noMatch:"Aucun résultat",enterValue:"Saisir une valeur...",min:"Min",max:"Max",search:"Rechercher...",addFilter:"Ajouter un filtre",clearAllFilters:"Effacer tous les filtres",select:"Sélectionner...",selectedCount:"{count} sélectionnés",operators:{contains:"contient",not_contains:"ne contient pas",equals:"est égal à",not_equals:"est différent de",starts_with:"commence par",ends_with:"se termine par",is_empty:"est vide",is_not_empty:"n'est pas vide",is_any_of:"est l'un de",is_none_of:"n'est aucun de",eq:"=",neq:"≠",gt:">",gte:"≥",lt:"<",lte:"≤",between:"entre",contains_any:"contient l'un de",contains_all:"contient tous",not_contains_any:"ne contient pas",before:"avant",after:"après",is_true:"est vrai",is_false:"est faux"}},l9={selectDate:"Sélectionner une date",selectRange:"Sélectionner une plage",selectFromList:"Sélectionner une date",noAvailableDates:"Aucune date disponible",startDate:"Date de début",endDate:"Date de fin",prevMonth:"Mois précédent",nextMonth:"Mois suivant",quickSelect:{today:"Aujourd'hui",lastWeek:"Dernière semaine",last15Days:"15 derniers jours",last30Days:"30 derniers jours",thisMonth:"Ce mois",last3Months:"3 derniers mois",last6Months:"6 derniers mois",last12Months:"12 derniers mois",lastYear:"Dernière année",allDates:"Toutes les dates",last2Dates:"2 dernières dates",last3Dates:"3 dernières dates",last4Dates:"4 dernières dates",last5Dates:"5 dernières dates"}},n9={toolbar:{undo:"Annuler",redo:"Rétablir",paragraphFormat:"Format de paragraphe",bold:"Gras",italic:"Italique",underline:"Souligné",citation:"Citation",insertLink:"Insérer un lien",removeLink:"Supprimer le lien",bulletList:"Liste à puces",numberList:"Liste numérotée",image:"Image",comment:"Commentaire",askAi:"Demander à l'IA"},paragraph:{heading1:"En-tête 1",heading2:"En-tête 2",heading3:"En-tête 3",heading4:"En-tête 4",heading5:"En-tête 5",heading6:"En-tête 6",paragraph:"Paragraphe"},link:{editLink:"Modifier le lien",altText:"Texte alternatif :",url:"URL :",enterAltText:"Entrez le texte alternatif...",enterUrl:"Entrez l'URL...",cancel:"Annuler",save:"Enregistrer"},image:{addImage:"Ajouter une image",editImage:"Modifier l'image",upload:"Télécharger",imageLink:"Lien de l'image",uploadImage:"Télécharger l'image :",imageUrl:"URL de l'image :",altText:"Texte alternatif :",width:"Largeur (px) :",height:"Hauteur (px) :",enterAltText:"Entrez le texte alternatif...",enterImageUrl:"https://exemple.com/image.jpg",auto:"Auto",noAlt:"Pas de texte alternatif",cancel:"Annuler",save:"Enregistrer"},comment:{placeholder:"Ajouter un commentaire",send:"Envoyer",delete:"Supprimer le commentaire"},started_conversation:"A démarré la conversation",labels:{title:"Titre",description:"Description"},placeholders:{title:"Entrez le titre...",description:"Entrez la description...",startTyping:"Commencez à taper..."},footer:{word:"mot",words:"mots",character:"caractère",characters:"caractères"}},oo={chart:J0,table:e9,filter:t9,datepicker:l9,textEditor:n9},o9={contextMenu:{addMarker:"Markering toevoegen",clearAllMarkers:"Alle markeringen wissen",downloadSvg:"SVG downloaden",downloadPng:"PNG downloaden",downloadCsv:"CSV downloaden"},modalMarker:{editMarker:"Markering bewerken",viewMarker:"Markering bekijken",title:"Titel",description:"Beschrijving",iconType:"Pictogramtype",defaultIcon:"Standaard logo",iconPreview:"Pictogramvoorbeeld",deleteMarker:"Markering verwijderen",cancel:"Annuleren",close:"Sluiten",save:"Opslaan",placeholderTitle:"Voer markeringstitel in",placeholderDescription:"Voer markeringsbeschrijving in (optioneel)"},zoom:{doubleClickToReset:"(Dubbelklik om te resetten)"},csv:{chartTitle:"Grafiek titel",chartSubtitle:"Grafiek ondertitel",generated:"Gegenereerd"},fallback:{item:"Item",axis:"As"},tooltip:{flags:"Vlaggen",markers:"Markeringen",manualFlags:"Handmatige vlaggen",autoFlags:"Automatische vlaggen"}},a9={firstPage:"Eerste pagina",previousPage:"Vorige pagina",nextPage:"Volgende pagina",lastPage:"Laatste pagina",currentPageAriaLabel:"Huidige pagina",rowsPerPage:"Rijen per pagina",searchPlaceholder:"Zoeken...",searchAriaLabel:"Zoeken",searchTableAriaLabel:"Zoeken in tabel",clearSearchAriaLabel:"Zoekopdracht wissen",downloadPdf:"PDF downloaden",downloadExcel:"Excel downloaden",columnVisibility:"Kolommen weer te geven",expandRowAriaLabel:"Rij uitklappen",collapseRowAriaLabel:"Rij inklappen",filterColumnAriaLabel:"Kolom filteren",clearFilter:"Wissen",search:"Zoeken...",filterFrom:"Van:",filterTo:"Tot:",dateFormat:"dd-mm-jjjj",showingRange:"{start}-{end} van {total} weergegeven",ofPages:"van {total}",emptyMessage:"Geen gegevens beschikbaar"},s9={searchAcrossFields:"Zoeken in alle velden...",openAdvancedFilter:"Geavanceerde filter openen",closeAdvancedFilter:"Geavanceerde filter sluiten",noConditionsApplied:"Er zijn geen filtervoorwaarden toegepast op deze weergave",where:"Waar",and:"En",searchAttributes:"Zoek attributen...",noMatch:"Geen overeenkomst",enterValue:"Voer waarde in...",min:"Min",max:"Max",search:"Zoeken...",addFilter:"Filter toevoegen",clearAllFilters:"Alle filters wissen",select:"Selecteren...",selectedCount:"{count} geselecteerd",operators:{contains:"bevat",not_contains:"bevat niet",equals:"is gelijk aan",not_equals:"is niet gelijk aan",starts_with:"begint met",ends_with:"eindigt op",is_empty:"is leeg",is_not_empty:"is niet leeg",is_any_of:"is een van",is_none_of:"is geen van",eq:"=",neq:"≠",gt:">",gte:"≥",lt:"<",lte:"≤",between:"tussen",contains_any:"bevat een van",contains_all:"bevat alle",not_contains_any:"bevat niet",before:"voor",after:"na",is_true:"is waar",is_false:"is onwaar"}},r9={selectDate:"Selecteer datum",selectRange:"Selecteer bereik",selectFromList:"Selecteer een datum",noAvailableDates:"Geen datums beschikbaar",startDate:"Startdatum",endDate:"Einddatum",prevMonth:"Vorige maand",nextMonth:"Volgende maand",quickSelect:{today:"Vandaag",lastWeek:"Afgelopen week",last15Days:"Laatste 15 dagen",last30Days:"Laatste 30 dagen",thisMonth:"Deze maand",last3Months:"Laatste 3 maanden",last6Months:"Laatste 6 maanden",last12Months:"Laatste 12 maanden",lastYear:"Afgelopen jaar",allDates:"Alle datums",last2Dates:"Laatste 2 datums",last3Dates:"Laatste 3 datums",last4Dates:"Laatste 4 datums",last5Dates:"Laatste 5 datums"}},i9={toolbar:{undo:"Ongedaan maken",redo:"Opnieuw",paragraphFormat:"Alineaopmaak",bold:"Vet",italic:"Cursief",underline:"Onderstreept",citation:"Citaat",insertLink:"Link invoegen",removeLink:"Link verwijderen",bulletList:"Lijst met opsommingstekens",numberList:"Genummerde lijst",image:"Afbeelding",comment:"Commentaar",askAi:"Vraag AI"},paragraph:{heading1:"Kop 1",heading2:"Kop 2",heading3:"Kop 3",heading4:"Kop 4",heading5:"Kop 5",heading6:"Kop 6",paragraph:"Alinea"},link:{editLink:"Link bewerken",altText:"Alt-tekst:",url:"URL:",enterAltText:"Voer alt-tekst in...",enterUrl:"Voer URL in...",cancel:"Annuleren",save:"Opslaan"},image:{addImage:"Afbeelding toevoegen",editImage:"Afbeelding bewerken",upload:"Uploaden",imageLink:"Afbeeldingslink",uploadImage:"Afbeelding uploaden:",imageUrl:"Afbeeldings-URL:",altText:"Alt-tekst:",width:"Breedte (px):",height:"Hoogte (px):",enterAltText:"Voer alt-tekst in...",enterImageUrl:"https://voorbeeld.com/afbeelding.jpg",auto:"Auto",noAlt:"Geen alt-tekst",cancel:"Annuleren",save:"Opslaan"},comment:{placeholder:"Voeg een opmerking toe",send:"Verzenden",delete:"Opmerking verwijderen"},started_conversation:"Gesprek gestart",labels:{title:"Titel",description:"Beschrijving"},placeholders:{title:"Voer titel in...",description:"Voer beschrijving in...",startTyping:"Begin met typen..."},footer:{word:"woord",words:"woorden",character:"teken",characters:"tekens"}},ao={chart:o9,table:a9,filter:s9,datepicker:r9,textEditor:i9},zo={en:no,fr:oo,nl:ao};function ua(H){if(!H||!H.global)return;const ne=H.global.availableLocales||[];Object.keys(zo).forEach(M=>{ne.includes(M)&&H.global.mergeLocaleMessage(M,zo[M])})}const Po={en:{textEditor:no.textEditor},fr:{textEditor:oo.textEditor},nl:{textEditor:ao.textEditor}};function da(H){if(!H||!H.global)return;const ne=H.global.availableLocales||[];Object.keys(Po).forEach(M=>{ne.includes(M)&&H.global.mergeLocaleMessage(M,Po[M])})}const Oo={en:{table:no.table},fr:{table:oo.table},nl:{table:ao.table}};function ma(H){if(!H||!H.global)return;const ne=H.global.availableLocales||[];Object.keys(Oo).forEach(M=>{ne.includes(M)&&H.global.mergeLocaleMessage(M,Oo[M])})}const qo={en:{datepicker:no.datepicker},fr:{datepicker:oo.datepicker},nl:{datepicker:ao.datepicker}};function pa(H){if(!H||!H.global)return;const ne=H.global.availableLocales||[];Object.keys(qo).forEach(M=>{ne.includes(M)&&H.global.mergeLocaleMessage(M,qo[M])})}const Wo={en:{filter:no.filter},fr:{filter:oo.filter},nl:{filter:ao.filter}};function fa(H){if(!H||!H.global)return;const ne=H.global.availableLocales||[];Object.keys(Wo).forEach(M=>{ne.includes(M)&&H.global.mergeLocaleMessage(M,Wo[M])})}const c9={chart:zo,textEditor:Po,table:Oo,datepicker:qo,filter:Wo};function u9(H){!H||!H.global||(ua(H),da(H),ma(H),pa(H),fa(H))}const d9={en:{...no},fr:{...oo},nl:{...ao}};lo.createI18n({legacy:!1,locale:"en",fallbackLocale:"en",messages:d9});exports.DSSChart=cc;exports.DSSChartMessages=zo;exports.DSSColorPicker=Km;exports.DSSConfetti=E2;exports.DSSDatepicker=ta;exports.DSSDatepickerMessages=qo;exports.DSSDnd=w2;exports.DSSFilter=$0;exports.DSSFilterMessages=Wo;exports.DSSLoader=c2;exports.DSSMessages=c9;exports.DSSModal=ea;exports.DSSPillField=z0;exports.DSSSkeleton=u2;exports.DSSStepBar=X0;exports.DSSTable=$u;exports.DSSTableMessages=Oo;exports.DSSTextEditor=Tm;exports.DSSTextEditorMessages=Po;exports.addDSSChartTranslations=ua;exports.addDSSDatepickerTranslations=pa;exports.addDSSFilterTranslations=fa;exports.addDSSTableTranslations=ma;exports.addDSSTextEditorTranslations=da;exports.addDSSTranslations=u9;
|