dsp-semactic 0.6.66 → 0.6.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),co=require("vue-i18n"),$a={key:0,class:"dss-datepicker__input-wrap dss-datepicker__input-wrap--readonly"},La=["value"],Aa=["placeholder","value","disabled"],Ta=["placeholder","value"],Da=["placeholder","value"],Ha=["aria-selected","onClick"],Ra={class:"dss-datepicker__list-item-label"},Fa={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"},Ia={key:1,class:"dss-datepicker__list-empty"},za={key:1,class:"dss-datepicker__double-wrap"},Pa={key:0,class:"dss-datepicker__quick-select","aria-label":"Quick range"},Oa=["disabled","onClick"],qa={class:"dss-datepicker__double-calendars"},Wa={class:"dss-datepicker__double-calendar"},Za={class:"dss-datepicker__calendar-header"},Ua=["aria-label"],Xa={class:"dss-datepicker__month-year-row"},Ya=["aria-label"],ja={class:"dss-datepicker__weekdays"},Ka={class:"dss-datepicker__grid"},Ga=["disabled","onClick","onMouseenter"],Qa={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},Ja={class:"dss-datepicker__double-calendar"},es={class:"dss-datepicker__calendar-header"},ts=["aria-label"],ns={class:"dss-datepicker__month-year-row"},ls=["aria-label"],os={class:"dss-datepicker__weekdays"},as={class:"dss-datepicker__grid"},ss=["disabled","onClick","onMouseenter"],rs={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},is={class:"dss-datepicker__calendar-header"},cs=["aria-label"],us={class:"dss-datepicker__month-year-row"},ds=["aria-label"],ms={class:"dss-datepicker__weekdays"},ps={class:"dss-datepicker__grid"},fs=["disabled","onClick","onMouseenter"],vs={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},gs={class:"dss-datepicker__calendar-header"},hs={class:"dss-datepicker__month-year-row"},ys={class:"dss-datepicker__month-year dss-datepicker__month-year--static"},ks={class:"dss-datepicker__months-grid"},Cs=["onClick"],bs={class:"dss-datepicker__calendar-header dss-datepicker__calendar-header--center"},ws={class:"dss-datepicker__month-year"},xs={class:"dss-datepicker__years-grid"},Es=["data-year","onClick"],ua=27,Wl=8,la={__name:"DSSDatepicker",props:{mode:{type:String,default:"single",validator:A=>["single","range","singleFromAvailable","rangeFromAvailable","listFromAvailable","readonly"].includes(A)},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(A,{emit:le}){const M=A,T=le,{t:ce,locale:I}=co.useI18n(),B=e.ref(!1),ge=e.ref("days"),ut=new Date,J=e.computed(()=>M.minDate instanceof Date?M.minDate:ut),v=e.ref(J.value.getMonth()),we=e.ref(J.value.getFullYear()),ke=e.ref(J.value.getMonth()),Q=e.ref(J.value.getFullYear()),U=e.ref(J.value.getMonth()),me=e.ref(J.value.getFullYear()),F=e.ref("start"),Ee=e.ref(null),Te=e.ref(null);function lt(){const D=J.value,O=D.getMonth(),_=D.getFullYear(),ie=O===11?0:O+1,Le=O===11?_+1:_;return{left:{month:O,year:_},right:{month:ie,year:Le}}}const mt=e.ref(null),W=e.ref(null),Ze=e.ref(null),qe=e.ref(null),xe=e.ref(null),Me=e.ref(null),Xe=e.ref(null),te=e.ref(null),ot=new Date().getFullYear(),Ce=e.computed(()=>["single","singleFromAvailable"].includes(M.mode)),tt=e.computed(()=>["range","rangeFromAvailable"].includes(M.mode)),dt=e.computed(()=>M.mode==="listFromAvailable"),ht=e.computed(()=>{if(!["single","singleFromAvailable","listFromAvailable"].includes(M.mode))return null;const D=M.modelValue;return D instanceof Date?D:null}),xt=e.computed(()=>{if(!tt.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,ie=D.getFullYear(),Le=ct=>String(ct).padStart(2,"0");return`${Le(O)}/${Le(_)}/${ie}`}const It=e.computed(()=>Ht(ht.value)),se=e.computed(()=>{const{start:D,end:O}=xt.value;if(!D&&!O)return"";const _=!O||D&&D<=O?D:O,ie=!D||O&&O>=D?O:D;return re(_,ie)?Ht(_):`${Ht(_)} - ${Ht(ie)}`}),pe=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 ie=!_||O&&O<=_?O:_,Le=!O||_&&_>=O?_:O;return re(ie,Le)?Ht(ie):`${Ht(ie)} - ${Ht(Le)}`}return"—"});e.computed(()=>{const D=new Date(we.value,v.value,1);return new Intl.DateTimeFormat(I.value,{month:"long",year:"numeric"}).format(D)});const De=e.computed(()=>Te.value==="left"?ke.value:Te.value==="right"?U.value:v.value),_e=e.computed(()=>Te.value==="left"?Q.value:Te.value==="right"?me.value:we.value),Kt=e.computed(()=>{const D=new Date(we.value,v.value,1);return new Intl.DateTimeFormat(I.value,{month:"long"}).format(D)}),kt=e.computed(()=>{const D=new Date(_e.value,De.value,1);return new Intl.DateTimeFormat(I.value,{month:"long"}).format(D)}),Qt=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=(Te.value?_e.value:we.value)-Math.floor(ua/2);return Array.from({length:ua},(_,ie)=>O+ie)}),Ut=e.computed(()=>{const D=Lt.value;return D.length?`${D[0]} – ${D[D.length-1]}`:""}),G=e.computed(()=>{const D=new Intl.DateTimeFormat(I.value,{weekday:"short"}),O=new Date(2024,0,1),_=[];for(let ie=0;ie<7;ie++){const Le=new Date(O);Le.setDate(O.getDate()+ie),_.push(D.format(Le).slice(0,2))}return _});function ye(D,O){const _=new Date(D,O,1),ie=new Date(D,O+1,0),Le=_.getDay(),ct=ie.getDate(),rt=[];for(let Ye=0;Ye<Le;Ye++)rt.push(null);for(let Ye=1;Ye<=ct;Ye++)rt.push(new Date(D,O,Ye));return rt}const Be=e.computed(()=>ye(we.value,v.value)),Ue=e.computed(()=>ye(Q.value,ke.value)),Je=e.computed(()=>ye(me.value,U.value));e.computed(()=>{const D=new Date(Q.value,ke.value,1);return new Intl.DateTimeFormat(I.value,{month:"long",year:"numeric"}).format(D)}),e.computed(()=>{const D=new Date(me.value,U.value,1);return new Intl.DateTimeFormat(I.value,{month:"long",year:"numeric"}).format(D)});const At=e.computed(()=>{const D=new Date(Q.value,ke.value,1);return new Intl.DateTimeFormat(I.value,{month:"long"}).format(D)}),nt=e.computed(()=>{const D=new Date(me.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"}]),Re=e.ref({top:0,left:0}),Ct=e.ref("left");let yt=null;function ee(){B.value&&e.nextTick(()=>{B.value&&(yt!==null&&window.cancelAnimationFrame(yt),yt=window.requestAnimationFrame(()=>{yt=null,Z()}))})}function Z(){if(!xe.value||!B.value)return;const D=xe.value.getBoundingClientRect(),O=window.innerWidth||document.documentElement.clientWidth,_=window.innerHeight||document.documentElement.clientHeight;let ie=D.left,Le=D.bottom+4;const ct=Me.value;if(ct){const rt=ct.offsetWidth,Ye=ct.offsetHeight;Ct.value==="right"||ie+rt>O-Wl?(Ct.value="right",ie=D.right-rt):Ct.value="left";const fn=Math.max(Wl,O-rt-Wl);if(ie=Math.min(Math.max(ie,Wl),fn),Le+Ye>_-Wl){const Sn=D.top-4-Ye;Sn>=Wl?Le=Sn:Le=Math.max(Wl,_-Ye-Wl)}}Re.value={top:Le,left:ie}}const X=e.computed(()=>!xe.value||!B.value?{}:{position:"fixed",left:`${Re.value.left}px`,top:`${Re.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 et(D){return!M.availableDates||!M.availableDates.length?!0:M.availableDates.some(O=>O instanceof Date&&re(O,D))}function Vt(D){const O=fe(D);return!(M.minDate instanceof Date&&O<fe(M.minDate)||M.maxDate instanceof Date&&O>fe(M.maxDate))}function un(D){const O=new Date(D);return new Date(O.getFullYear(),O.getMonth(),O.getDate())}function Et(D){return D.filter(O=>Vt(O))}function on(D,O){if(!(D instanceof Date)||!(O instanceof Date))return null;let _=fe(D),ie=fe(O);if(_>ie&&([_,ie]=[ie,_]),M.minDate instanceof Date){const Le=fe(M.minDate);_=Math.max(_,Le),ie=Math.max(ie,Le)}if(M.maxDate instanceof Date){const Le=fe(M.maxDate);_=Math.min(_,Le),ie=Math.min(ie,Le)}return _>ie?null:{start:un(_),end:un(ie)}}function S(D){return!M.exceptDates||!M.exceptDates.length?!1:M.exceptDates.some(O=>O instanceof Date&&re(O,D))}function b(D){return S(D)?!1:["singleFromAvailable","rangeFromAvailable"].includes(M.mode)?et(D):Vt(D)}function V(D){const O=ht.value,_=xt.value,ie=fe(D),Le=tt.value&&_.start&&_.end&&ie>fe(_.start)&&ie<fe(_.end),ct=tt.value&&_.start&&re(D,_.start),rt=tt.value&&_.end&&re(D,_.end),Ye=ct&&rt,Tt=Ce.value&&O&&re(D,O)||ct||rt;let fn=!1;if(tt.value&&_.start&&!_.end&&Ee.value){const Sn=fe(_.start),Pn=fe(Ee.value),$n=Math.min(Sn,Pn),Rl=Math.max(Sn,Pn);fn=ie>$n&&ie<Rl}return{"dss-datepicker__day--selected":Tt&&!Ye,"dss-datepicker__day--range-start":ct&&!Ye,"dss-datepicker__day--range-end":rt&&!Ye,"dss-datepicker__day--range-single":Ye,"dss-datepicker__day--in-range":Le&&!ct&&!rt,"dss-datepicker__day--in-range-preview":fn&&!ct&&!rt&&!Le,"dss-datepicker__day--disabled":!b(D)}}function Y(D){if(!tt.value)return;const O=xt.value;if(!O.start||O.end){Ee.value=null;return}if(!b(D)){Ee.value=null;return}Ee.value=new Date(D.getFullYear(),D.getMonth(),D.getDate())}function ne(){Ee.value=null}function Ie(){if(!M.doubleCalendar||!tt.value)return;const D=xt.value,{start:O,end:_}=D;if(O&&_){const ct=O<=_?O:_,rt=O<=_?_:O,Ye=ct.getMonth(),Tt=ct.getFullYear(),fn=rt.getMonth(),Sn=rt.getFullYear();if(Ye!==fn||Tt!==Sn){const Pn=ke.value===Ye&&Q.value===Tt,$n=U.value===fn&&me.value===Sn;if(Pn&&$n)return;ke.value=Ye,Q.value=Tt,U.value=fn,me.value=Sn}else{const Pn=Ye===0?11:Ye-1,$n=Ye===0?Tt-1:Tt;ke.value===Pn&&Q.value===$n&&U.value===Ye&&me.value===Tt||(ke.value=Ye,Q.value=Tt,Ye===11?(U.value=0,me.value=Tt+1):(U.value=Ye+1,me.value=Tt))}return}const ie=O||_;if(ie){const ct=ie.getMonth(),rt=ie.getFullYear(),Ye=ke.value===ct&&Q.value===rt,Tt=U.value===ct&&me.value===rt;if(Ye||Tt)return;ke.value=ct,Q.value=rt,ct===11?(U.value=0,me.value=rt+1):(U.value=ct+1,me.value=rt);return}const Le=lt();ke.value=Le.left.month,Q.value=Le.left.year,U.value=Le.right.month,me.value=Le.right.year}const bt=e.computed(()=>new Intl.DateTimeFormat(I.value,{day:"2-digit",month:"long",year:"numeric"})),st=e.computed(()=>{if(!dt.value)return[];const D=(M.availableDates||[]).filter(_=>_ instanceof Date&&!Number.isNaN(_.getTime())).filter(_=>!S(_)&&Vt(_)).map(_=>new Date(_.getFullYear(),_.getMonth(),_.getDate()));D.sort((_,ie)=>ie.getTime()-_.getTime());const O=ht.value;return D.map(_=>({date:_,ts:_.getTime(),label:bt.value.format(_),selected:!!(O&&re(_,O))}))});function Oe(){if(B.value){pt();return}xe.value=qe.value?.closest(".dss-datepicker__input-wrap"),Ct.value="left",B.value=!0,ee(),e.nextTick(()=>{te.value?.querySelector(".dss-datepicker__list-item--selected")?.scrollIntoView({block:"nearest",behavior:"auto"})})}function Nt(D){if(!(D instanceof Date))return;const O=new Date(D.getFullYear(),D.getMonth(),D.getDate());T("update:modelValue",O),pt()}function St(D="start"){if(M.mode==="readonly")return;F.value=D;const O=ht.value,_=xt.value;if(Ce.value&&O)v.value=O.getMonth(),we.value=O.getFullYear();else if(tt.value)if(M.doubleCalendar)Ie();else{const ie=D==="start"&&_.start?_.start:_.end||_.start;ie&&(v.value=ie.getMonth(),we.value=ie.getFullYear())}xe.value=Ce.value?mt.value?.closest(".dss-datepicker__input-wrap"):W.value,ge.value="days",Te.value=null,Ct.value="left",B.value=!0,ee()}function pt(){ge.value="days",Te.value=null,Ee.value=null,B.value=!1}function at(D,O){Te.value=D,ge.value=O}function Bt(){ge.value="days",Te.value=null}function Mt(D){const O=new Date,_=O.getFullYear(),ie=O.getMonth(),Le=O.getDate();let ct,rt;if(Ot.value){const Ye=Et([...M.availableDates].filter(Tt=>Tt instanceof Date).map(Tt=>new Date(Tt.getFullYear(),Tt.getMonth(),Tt.getDate()))).sort((Tt,fn)=>Tt.getTime()-fn.getTime());if(Ye.length===0)return null;if(D==="all")ct=Ye[0],rt=Ye[Ye.length-1];else{const Tt=parseInt(D.replace("last",""),10);if(Tt<2||Tt>5)return null;const fn=Ye.slice(-Tt);if(fn.length===0)return null;ct=fn[0],rt=fn[fn.length-1]}}else{const Ye=new Date(_,ie,Le);switch(D){case"today":ct=Ye,rt=Ye;break;case"lastWeek":ct=new Date(_,ie,Le-6),rt=Ye;break;case"last15Days":ct=new Date(_,ie,Le-14),rt=Ye;break;case"last30Days":ct=new Date(_,ie,Le-29),rt=Ye;break;case"thisMonth":ct=new Date(_,ie,1),rt=Ye;break;case"last3Months":ct=new Date(_,ie-3,1),rt=new Date(_,ie,0);break;case"last6Months":ct=new Date(_,ie-6,1),rt=new Date(_,ie,0);break;case"last12Months":ct=new Date(_,ie-12,1),rt=new Date(_,ie,0);break;case"lastYear":ct=new Date(_-1,0,1),rt=new Date(_-1,11,31);break;default:return null}}return{start:ct,end:rt}}function kn(D){const O=Mt(D);return O?on(O.start,O.end):null}function Dn(D){return kn(D)!==null}function il(D){const O=kn(D);O&&(T("update:modelValue",O),Ie())}function Gt(D){Te.value==="left"?ke.value=D:Te.value==="right"?U.value=D:v.value=D,Bt()}function pn(D){Te.value==="left"?Q.value=D:Te.value==="right"?me.value=D:we.value=D,Bt()}function tl(){v.value===0?(v.value=11,we.value--):v.value--}function hl(){v.value===11?(v.value=0,we.value++):v.value++}function cl(){ke.value===0?(ke.value=11,Q.value--):ke.value--}function Mn(){ke.value===11?(ke.value=0,Q.value++):ke.value++}function yl(){U.value===0?(U.value=11,me.value--):U.value--}function _n(){U.value===11?(U.value=0,me.value++):U.value++}function ul(D){if(!b(D))return;const O=new Date(D.getFullYear(),D.getMonth(),D.getDate());if(Ce.value){T("update:modelValue",O),pt();return}const _=xt.value;if(!_.start&&!_.end){T("update:modelValue",{start:O,end:null}),F.value="end";return}if(_.start&&_.end){T("update:modelValue",{start:O,end:null}),F.value="end";return}if(F.value==="start"){let ie=O,Le=_.end;ie&&Le&&ie>Le&&([ie,Le]=[Le,ie]),T("update:modelValue",{start:ie||Le,end:Le||ie}),F.value="end"}else{let ie=_.start,Le=O;ie&&Le&&Le<ie&&([ie,Le]=[Le,ie]),T("update:modelValue",{start:ie||Le,end:Le||ie}),F.value="start"}}e.watch(xt,()=>{M.doubleCalendar&&tt.value&&B.value&&Ie()},{deep:!0});let nl=null,zn=null,Cn=null;function ll(){nl&&(document.removeEventListener("keydown",nl),nl=null),zn&&(window.removeEventListener("resize",zn),zn=null),Cn&&(window.removeEventListener("scroll",Cn,!0),Cn=null)}return e.watch(ge,D=>{D==="years"&&e.nextTick(()=>{Xe.value?.querySelector(`[data-year="${_e.value}"]`)?.scrollIntoView({block:"center",behavior:"auto"})})}),e.watch(()=>[B.value,ge.value,v.value,we.value,ke.value,Q.value,U.value,me.value,Te.value,M.doubleCalendar,M.quickSelect],()=>{ee()}),e.watch(B,D=>{ll(),D&&(nl=O=>{O.key==="Escape"&&(ge.value==="years"||ge.value==="months"?Bt():pt())},zn=()=>{Z()},Cn=()=>{Z()},document.addEventListener("keydown",nl),window.addEventListener("resize",zn),window.addEventListener("scroll",Cn,!0))}),e.onBeforeUnmount(()=>{yt!==null&&(window.cancelAnimationFrame(yt),yt=null),ll()}),(D,O)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-datepicker",{"dss-datepicker--readonly":A.mode==="readonly"}])},[A.mode==="readonly"?(e.openBlock(),e.createElementBlock("div",$a,[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:pe.value,readonly:"",disabled:"",tabindex:"-1"},null,8,La)])):Ce.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-datepicker__input-wrap",onClick:O[0]||(O[0]=_=>St("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:mt,type:"text",class:"dss-datepicker__input",placeholder:M.placeholder||e.unref(ce)("datepicker.selectDate"),value:It.value,readonly:"",disabled:A.mode==="readonly"},null,8,Aa)])):dt.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":B.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(ce)("datepicker.selectFromList"),value:It.value,readonly:""},null,8,Ta),e.createElementVNode("span",{class:e.normalizeClass(["dss-datepicker__chevron",{"dss-datepicker__chevron--open":B.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)):tt.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-datepicker__input-wrap",ref_key:"inputRangeWrapRef",ref:W,onClick:O[1]||(O[1]=_=>St("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(ce)("datepicker.selectRange"),value:se.value,readonly:""},null,8,Da)],512)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[B.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-datepicker__overlay",onClick:e.withModifiers(pt,["self"])},[e.createElementVNode("div",{ref_key:"dropdownRef",ref:Me,class:e.normalizeClass(["dss-datepicker__dropdown",{"dss-datepicker__dropdown--double":A.doubleCalendar&&tt.value&&ge.value==="days","dss-datepicker__dropdown--quick-select":A.doubleCalendar&&tt.value&&ge.value==="days"&&A.quickSelect,"dss-datepicker__dropdown--list":dt.value}]),onClick:O[9]||(O[9]=e.withModifiers(()=>{},["stop"])),style:e.normalizeStyle(X.value)},[dt.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[st.value.length?(e.openBlock(),e.createElementBlock("ul",{key:0,class:"dss-datepicker__list",role:"listbox",ref_key:"listRef",ref:te},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(st.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:ie=>Nt(_.date)},[e.createElementVNode("span",Ra,e.toDisplayString(_.label),1),_.selected?(e.openBlock(),e.createElementBlock("svg",Fa,[...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,Ha))),128))],512)):(e.openBlock(),e.createElementBlock("div",Ia,e.toDisplayString(e.unref(ce)("datepicker.noAvailableDates")),1))],64)):ge.value==="days"&&A.doubleCalendar&&tt.value?(e.openBlock(),e.createElementBlock("div",za,[A.quickSelect?(e.openBlock(),e.createElementBlock("nav",Pa,[(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:!Dn(_.id),onClick:ie=>il(_.id)},e.toDisplayString(e.unref(ce)(_.labelKey)),9,Oa))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",qa,[e.createElementVNode("div",Wa,[e.createElementVNode("div",Za,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ce)("datepicker.prevMonth"),onClick:cl}," ‹ ",8,Ua),e.createElementVNode("div",Xa,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:O[2]||(O[2]=_=>at("left","months"))},e.toDisplayString(At.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:O[3]||(O[3]=_=>at("left","years"))},e.toDisplayString(Q.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ce)("datepicker.nextMonth"),onClick:Mn}," › ",8,Ya)]),e.createElementVNode("div",ja,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,_=>(e.openBlock(),e.createElementBlock("span",{key:_,class:"dss-datepicker__weekday"},e.toDisplayString(_),1))),128))]),e.createElementVNode("div",Ka,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ue.value,(_,ie)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"L-"+ie},[_?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",V(_)]),disabled:!b(_),onClick:Le=>ul(_),onMouseenter:Le=>Y(_),onMouseleave:ne},e.toDisplayString(_.getDate()),43,Ga)):(e.openBlock(),e.createElementBlock("span",Qa))],64))),128))])]),e.createElementVNode("div",Ja,[e.createElementVNode("div",es,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ce)("datepicker.prevMonth"),onClick:yl}," ‹ ",8,ts),e.createElementVNode("div",ns,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:O[4]||(O[4]=_=>at("right","months"))},e.toDisplayString(nt.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:O[5]||(O[5]=_=>at("right","years"))},e.toDisplayString(me.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ce)("datepicker.nextMonth"),onClick:_n}," › ",8,ls)]),e.createElementVNode("div",os,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,_=>(e.openBlock(),e.createElementBlock("span",{key:_,class:"dss-datepicker__weekday"},e.toDisplayString(_),1))),128))]),e.createElementVNode("div",as,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Je.value,(_,ie)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"R-"+ie},[_?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",V(_)]),disabled:!b(_),onClick:Le=>ul(_),onMouseenter:Le=>Y(_),onMouseleave:ne},e.toDisplayString(_.getDate()),43,ss)):(e.openBlock(),e.createElementBlock("span",rs))],64))),128))])])])])):ge.value==="days"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",is,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ce)("datepicker.prevMonth"),onClick:tl}," ‹ ",8,cs),e.createElementVNode("div",us,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:O[6]||(O[6]=_=>ge.value="months")},e.toDisplayString(Kt.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:O[7]||(O[7]=_=>ge.value="years")},e.toDisplayString(we.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ce)("datepicker.nextMonth"),onClick:hl}," › ",8,ds)]),e.createElementVNode("div",ms,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,_=>(e.openBlock(),e.createElementBlock("span",{key:_,class:"dss-datepicker__weekday"},e.toDisplayString(_),1))),128))]),e.createElementVNode("div",ps,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Be.value,(_,ie)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:ie},[_?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",V(_)]),disabled:!b(_),onClick:Le=>ul(_),onMouseenter:Le=>Y(_),onMouseleave:ne},e.toDisplayString(_.getDate()),43,fs)):(e.openBlock(),e.createElementBlock("span",vs))],64))),128))])],64)):ge.value==="months"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("div",gs,[e.createElementVNode("div",hs,[e.createElementVNode("span",ys,e.toDisplayString(kt.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:O[8]||(O[8]=_=>ge.value="years")},e.toDisplayString(_e.value),1)])]),e.createElementVNode("div",ks,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Qt.value,(_,ie)=>(e.openBlock(),e.createElementBlock("button",{key:ie,type:"button",class:e.normalizeClass(["dss-datepicker__month-cell",{"dss-datepicker__month-cell--selected":ie===De.value}]),onClick:Le=>Gt(ie)},e.toDisplayString(_),11,Cs))),128))])],64)):ge.value==="years"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createElementVNode("div",bs,[e.createElementVNode("span",ws,e.toDisplayString(Ut.value),1)]),e.createElementVNode("div",{class:"dss-datepicker__years-wrap",ref_key:"yearsWrapRef",ref:Xe},[e.createElementVNode("div",xs,[(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(ot)}]),"data-year":_,onClick:ie=>pn(_)},e.toDisplayString(_),11,Es))),128))])],512)],64)):e.createCommentVNode("",!0)],6)])):e.createCommentVNode("",!0)]))],2))}},Ss=["data-chart-type"],Vs={class:"dss-chart-header-titles"},Ns={key:0,class:"dss-chart-title"},Bs={key:1,class:"dss-chart-subtitle"},Ms=["onClick","onMouseenter"],_s={class:"dss-legend-text"},$s=["onClick","onMouseenter"],Ls={class:"dss-legend-text"},As=["title"],Ts=["src"],Ds={class:"dss-chart-area-wrapper"},Hs={key:0,class:"dss-chart-z-axis-label"},Rs=["width","height","data-smooth","data-animated"],Fs=["id"],Is=["y","width","height"],zs=["id"],Ps=["d"],Os=["id"],qs=["d"],Ws={key:0},Zs=["clip-path"],Us=["x1","x2","y1","y2"],Xs={class:"dss-axes"},Ys=["x1","x2","y1","y2"],js=["x1","x2","y1","y2"],Ks=["x1","x2","y1","y2"],Gs={class:"dss-axis-labels"},Qs=["x","y"],Js=["x","y"],er=["x","y"],tr=["x","y"],nr=["y","transform"],lr=["x","y","transform"],or={key:1,class:"dss-flag-markers"},ar=["clip-path"],sr=["x1","x2","y1","y2","onMouseover"],rr=["x1","x2","y1","y2","onMouseover"],ir=["x1","x2","y1","y2","onMouseover"],cr=["cx","cy","onMouseover"],ur=["cx","cy","fill","onMouseover"],dr=["x","y"],mr=["clip-path"],pr={key:0},fr=["d","onMouseover"],vr=["x","y","width","height","fill","onMouseover"],gr={class:"dss-line-chart"},hr=["d","stroke","stroke-width","stroke-dasharray"],yr=["d","stroke","stroke-width","opacity"],kr=["cx","cy","r","fill","onMouseover"],Cr={key:1},br=["d","stroke","stroke-width","stroke-dasharray"],wr=["d","stroke","stroke-width","stroke-dasharray"],xr=["d","stroke","stroke-width","opacity"],Er=["cx","cy","r","fill","onMouseover"],Sr={key:2},Vr=["id"],Nr=["x","y","width","height"],Br=["d","fill","fill-opacity","mask"],Mr=["d","stroke","stroke-width"],_r=["d","fill","onMouseover"],$r=["x","y","width","height","onMouseover"],Lr=["clip-path"],Ar=["x1","x2","y1","y2","stroke"],Tr=["cx","cy","r","fill"],Dr={key:1,class:"dss-bubble-chart"},Hr={key:0,class:"dss-bubble-group"},Rr=["cx","cy","r","fill","fill-opacity","stroke","onMouseenter","onMouseleave","onClick"],Fr=["x","y","width","height","xlink:href","clip-path","onLoad","onError","onMouseenter","onMouseleave","onClick"],Ir=["transform"],zr=["cx","cy","r"],Pr=["data-chart-type","clip-path"],Or=["d","fill","fill-opacity","stroke","stroke-width","clip-path","onMouseover"],qr={key:1,class:"dss-radial-segment-data-labels"},Wr=["x","y"],Zr=["x","y","font-size","fill"],Ur=["x1","y1","x2","y2","stroke"],Xr=["x1","y1","x2","y2","stroke"],Yr=["x","y","text-anchor","font-size"],jr=["transform"],Kr={key:0,class:"dss-spider-grid"},Gr=["cx","cy","r"],Qr={class:"dss-spider-grid-labels"},Jr=["x","y"],ei=["x","y"],ti=["x1","x2","y1","y2"],ni={class:"dss-spider-labels"},li=["x","y","text-anchor","dominant-baseline"],oi=["points","fill","fill-opacity","stroke","stroke-width","stroke-dasharray"],ai=["cx","cy","r","fill","stroke","stroke-width","onMouseover"],si={class:"dss-chart-logos"},ri=["cx","cy","r","fill"],ii=["x","y","width","height","xlink:href","onLoad","onError","clip-path"],ci=["onClick","onMouseenter"],ui=["src"],di={class:"dss-marker-tooltip-category"},mi={key:0,class:"dss-marker-tooltip-description"},pi={key:0,class:"dss-tooltip-section dss-spider-tooltip-section"},fi={class:"dss-tooltip-title dss-spider-tooltip-area-title"},vi={class:"dss-tooltip-series-name"},gi={class:"dss-tooltip-series-value"},hi={key:1,class:"dss-tooltip-section"},yi={key:0,class:"dss-tooltip-title"},ki={class:"dss-bubble-tooltip-data"},Ci={key:2,class:"dss-tooltip-section"},bi={class:"dss-tooltip-title"},wi={class:"dss-tooltip-value"},xi={key:0,class:"dss-tooltip-section"},Ei={class:"dss-tooltip-section-title"},Si={class:"dss-tooltip-group-header"},Vi={class:"dss-tooltip-item-content"},Ni={class:"dss-tooltip-item-text"},Bi={key:1,class:"dss-tooltip-section"},Mi={class:"dss-tooltip-section-title"},_i={class:"dss-tooltip-item-content"},$i={class:"dss-tooltip-item-title"},Li={key:0,class:"dss-tooltip-item-description"},Ai={class:"dss-tooltip-section"},Ti={class:"dss-tooltip-title"},Di={key:0,class:"dss-bubble-tooltip-data"},Hi={class:"dss-tooltip-series-name"},Ri={class:"dss-tooltip-series-value"},Fi={key:0,class:"dss-tooltip-section"},Ii={class:"dss-tooltip-section-title"},zi={class:"dss-tooltip-group-header"},Pi={class:"dss-tooltip-item-content"},Oi={class:"dss-tooltip-item-text"},qi={key:1,class:"dss-tooltip-section"},Wi={class:"dss-tooltip-section-title"},Zi={class:"dss-tooltip-item-content"},Ui={class:"dss-tooltip-item-title"},Xi={key:0,class:"dss-tooltip-item-description"},Yi=["onClick","onMouseenter"],ji={class:"dss-legend-text"},Ki={key:1,class:"dss-context-menu-separator"},Gi={key:0,class:"dss-context-menu-separator"},Qi={key:0,class:"dss-context-menu-separator"},Ji=["onClick"],ec=["innerHTML"],tc={key:0,class:"dss-context-menu-icon"},nc={class:"dss-marker-modal-header"},lc={class:"dss-marker-modal-body"},oc={class:"dss-form-group"},ac={class:"dss-form-group"},sc={for:"dss-marker-description"},rc={key:0,class:"dss-form-text-display"},ic=["placeholder"],cc={class:"dss-marker-modal-footer"},uc={class:"modal-footer-left"},dc={class:"dss-modal-footer-right"},mc=["disabled"],pc={name:"DSSChart"},fc=Object.assign(pc,{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:A=>typeof A=="object"&&A!==null},innerSize:{type:Number,default:null},old:{type:Boolean,default:!1}},emits:["add-marker","update-marker","delete-marker"],setup(A,{emit:le}){const{t:M,locale:T}=co.useI18n(),ce=le,I=e.ref(null),B=e.ref(null),ge=e.ref(null),ut=e.ref(0),J=e.ref(0);let v=null,we=null;const ke=20,Q=e.computed(()=>{if(J.value,ut.value,!I.value||!B.value)return 0;try{const t=I.value.getBoundingClientRect();return B.value.getBoundingClientRect().top-t.top}catch{return 0}}),U=e.computed(()=>`chart-clip-${F.chartId}`),me=e.computed(()=>`url(#${U.value})`),F=A,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,comparison:{fillOpacity:0,strokeDasharray:"6,4",usePrimaryColor:!0,bubbleSize:0}},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 Te(t,a){const n=Object.assign({},t);return mt(t)&&mt(a)&&Object.keys(a).forEach(r=>{mt(a[r])?r in t?n[r]=Te(t[r],a[r]):Object.assign(n,{[r]:a[r]}):Object.assign(n,{[r]:a[r]})}),n}const lt=()=>{let t=20,a=0,n=0;if(dt.value&&(t+=30),ht.value&&(t+=25),G.value&&F.series.length>0){const r=F.series.filter((p,g)=>!Rt.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(r/g)*25+10}else a=r*25+10;t+=a}else n=150}return{height:t,legendHeight:a,legendWidth:n}};function mt(t){return t&&typeof t=="object"&&!Array.isArray(t)}const W=e.computed(()=>Te(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?ut.value||800:t&&t.chart&&typeof t.chart.width=="number"?t.chart.width:800}),Me=e.ref(ke),Xe=e.computed(()=>{if(qe.value){const t=Xe.value;return t??Math.max(0,(J.value||400)-Me.value*5)}}),te=e.computed(()=>{const t=W.value;if(Ce.value==="mini-radial")return xe.value;if(qe.value){const a=Xe.value;return a??Math.max(0,(J.value||400)-Me.value)}return t&&t.chart&&typeof t.chart.height=="number"?t.chart.height:400}),ot=e.computed(()=>{if(qe.value&&Ce.value==="semi-radial"&&Xe.value!=null)return Me.value+te.value+"px";if(qe.value)return"100%";if(En.value)return Me.value+te.value+"px";if(G.value&&ye.value==="bottom"){const t=lt();return te.value+(t.legendHeight||35)+"px"}return te.value+(G.value?20:0)+"px"}),Ce=e.computed(()=>{const t=W.value;return t&&t.chart&&t.chart.type?t.chart.type:"line"}),tt=e.computed(()=>{const t=F.series.map(a=>a.type||Ce.value);return new Set(t).size>1}),dt=e.computed(()=>{const t=W.value;return t&&t.title&&t.title.text?t.title.text:""}),ht=e.computed(()=>{const t=W.value;return t&&t.subtitle&&t.subtitle.text?t.subtitle.text:""}),xt=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:""}),It=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}),pe=e.computed(()=>{const t=se.value;return t&&t.title&&t.title.text?t.title.text:""}),De=e.computed(()=>{const t=W.value;if(!t||!t.yAxis)return Tn;const a=t.yAxis.min;return typeof a=="number"||a===Tn?a:Tn}),_e=e.computed(()=>{const t=W.value;if(!t||!t.yAxis)return Tn;const a=t.yAxis.max;return typeof a=="number"||a===Tn?a:Tn}),Kt=e.computed(()=>{const t=se.value;if(!t)return Tn;const a=t.min;return typeof a=="number"||a===Tn?a:Tn}),kt=e.computed(()=>{const t=se.value;if(!t)return Tn;const a=t.max;return typeof a=="number"||a===Tn?a:Tn}),Qt=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}),Ut=e.computed(()=>{const t=W.value;return t&&t.grid&&t.grid.show!==!1}),G=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}),Je=e.computed(()=>{const t=W.value;if(!t||!t.crosshair)return!1;const a=t.crosshair.show;return a===!0||a==="true"}),At=e.computed(()=>{const t=W.value;return t&&t.crosshair&&t.crosshair.color?t.crosshair.color:"#666"}),nt=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}),Re=e.computed(()=>{const t=W.value;return t&&t.stroke&&typeof t.stroke.width=="number"?t.stroke.width:2}),Ct=e.computed(()=>{if(!En.value)return 0;const t=W.value;return t&&t.stroke&&typeof t.stroke.width=="number"?t.stroke.width:0}),yt=e.computed(()=>{const t=W.value;return t&&t.bubbles&&typeof t.bubbles.size=="number"?t.bubbles.size:4}),ee=e.computed(()=>{const{maxX:t}=wt.value;return t===0}),Z=(t,a)=>ee.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}),et=e.computed(()=>{const t=W.value;return t&&t.smoothing&&typeof t.smoothing.factor=="number"?t.smoothing.factor:.3}),Vt=e.computed(()=>{const t=W.value;return fe.value?t&&t.smoothing&&typeof t.smoothing.barRadius=="number"?t.smoothing.barRadius:4:0}),un=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"]}),Et=e.computed(()=>{const t=W.value;return t&&t.animations&&t.animations.enabled!==!1}),on=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}),b=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}),ne=e.computed(()=>{const t=W.value;return t&&t.animations&&t.animations.onDataChange!==!1}),Ie=e.computed(()=>{const t=W.value;return t&&t.animations&&t.animations.respectReducedMotion!==!1}),bt=e.computed(()=>{const t=W.value;return t&&t.fill&&t.fill.spider&&typeof t.fill.spider.opacity=="number"?t.fill.spider.opacity:.15}),st=e.computed(()=>W.value?.spider?.gridSteps||5),Oe=e.computed(()=>{const t=[],a=st.value;for(let n=1;n<=a;n++)t.push(it.value/a*n);return t}),Nt=t=>{const a=St.value;if(a&&Array.isArray(a)&&a[t]!==void 0)return a[t].toString();const n=Oe.value[t];return Math.round(n/it.value*100)+"%"},St=e.computed(()=>W.value?.spider?.gridLabels||null),pt=e.computed(()=>{const t=W.value;return t&&t.contextMenu&&t.contextMenu.enabled===!0}),at=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}),Bt=e.computed(()=>{const t=W.value;return t&&t.contextMenu&&Array.isArray(t.contextMenu.customItems)?t.contextMenu.customItems:[]}),Mt=e.computed(()=>{const t=W.value;return t&&t.markers&&t.markers.icon?t.markers.icon:ll.value}),kn=e.computed(()=>{const t=W.value;return t&&t.markers&&t.markers.customIcons?t.markers.customIcons:{}}),Dn=e.computed(()=>{const t=W.value;return t&&t.markers&&typeof t.markers.iconSize=="number"?t.markers.iconSize:20}),il=e.computed(()=>{const a=W.value?.valueFormat?.extension;return typeof a=="string"?a:""}),Gt=t=>{const a=il.value;if(t==null)return"";const n=String(t);return a?n+a:n},pn=e.computed(()=>!oe.value.isZooming);e.computed(()=>nn.value.map(t=>{if(t.categoryIndex!==void 0&&(xn.value||Xt.value)){const a=en(t.categoryIndex),n=Q.value+z.value.bottom-Dn.value/2;return{...t,x:a,y:n}}return t}));function tl(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("-"),P=Number(w?.length===2?`20${w}`:w);n=new Date(P,Number(C)-1,Number(g))}else return 0;let r=0,p=1/0;return a.forEach((g,C)=>{const[w,P,N]=g.split("-"),H=Number(N?.length===2?`20${N}`:N),$=new Date(H,Number(P)-1,Number(w)),K=Math.abs($-n);K<p&&(p=K,r=C)}),r}const hl=e.computed(()=>{const t=F.markers.map(n=>{const r=tl(n.marker_date,F.categories),p=en(r),g=Q.value+z.value.bottom-Dn.value/2;return{...n,x:p,y:g,categoryIndex:r,source:"props"}}),a=nn.value.map(n=>{if(n.categoryIndex!==void 0&&(xn.value||Xt.value)){const r=en(n.categoryIndex),p=Q.value+z.value.bottom-Dn.value/2;return{...n,x:r,y:p,source:"internal"}}return{...n,source:"internal"}});return[...t,...a]}),cl=e.computed(()=>{const t=W.value;return t&&t.watermark&&t.watermark.enabled===!0}),Mn=e.computed(()=>{const t=W.value;return t&&t.watermark&&typeof t.watermark.opacity=="number"?t.watermark.opacity:.05}),yl=e.computed(()=>{const t=W.value;return t&&t.watermark&&t.watermark.size?t.watermark.size:35}),_n=e.computed(()=>{const t=W.value;return t&&t.watermark&&t.watermark.position?t.watermark.position:"bottom-right"}),ul=e.computed(()=>{const t={left:z.value.left,top:z.value.top,width:z.value.width,height:z.value.height};let a,n;const r=String(yl.value);if(r.includes("%")){const p=parseFloat(r)/100;a=t.width*p,n=a*(96/499)}else{const p=parseFloat(r)||25;a=Math.min(t.width*.25,200)*(p/25),n=a*(96/499)}return{width:a,height:n,area:t}}),nl=e.computed(()=>{const{width:t,height:a}=ul.value,n=_n.value;let r,p;const g=z.value.left,C=z.value.right,w=z.value.top,P=z.value.bottom,N=z.value.width,H=z.value.height;switch(n){case"center":r=g+(N-t)/2,p=w+(H-a)/2;break;case"top-left":r=g+15,p=w+5;break;case"top-right":r=C-t-15,p=w+5;break;case"bottom-left":r=g+15,p=P-a-5;break;case"bottom-right":default:r=C-t-15,p=P-a-5;break}return{backgroundPositionX:r+"px",backgroundPositionY:p+"px",backgroundSize:`${t}px ${a}px`}}),zn=t=>!F.flags||!F.flags.length?[]:F.flags.filter(a=>a.categoryIndex===t),Cn=t=>{const a=zn(t),n=bl(t),r=a.filter(C=>C.manual),p=a.filter(C=>!C.manual),g=[];return r.length>0&&g.push({type:M("chart.tooltip.manualFlags"),color:"#698dbe",flags:r.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"}))}},ll=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">
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),co=require("vue-i18n"),$a={key:0,class:"dss-datepicker__input-wrap dss-datepicker__input-wrap--readonly"},La=["value"],Aa=["placeholder","value","disabled"],Ta=["placeholder","value"],Da=["placeholder","value"],Ha=["aria-selected","onClick"],Ra={class:"dss-datepicker__list-item-label"},Fa={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"},Ia={key:1,class:"dss-datepicker__list-empty"},za={key:1,class:"dss-datepicker__double-wrap"},Pa={key:0,class:"dss-datepicker__quick-select","aria-label":"Quick range"},Oa=["disabled","onClick"],qa={class:"dss-datepicker__double-calendars"},Wa={class:"dss-datepicker__double-calendar"},Za={class:"dss-datepicker__calendar-header"},Ua=["aria-label"],Xa={class:"dss-datepicker__month-year-row"},Ya=["aria-label"],ja={class:"dss-datepicker__weekdays"},Ka={class:"dss-datepicker__grid"},Ga=["disabled","onClick","onMouseenter"],Qa={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},Ja={class:"dss-datepicker__double-calendar"},es={class:"dss-datepicker__calendar-header"},ts=["aria-label"],ns={class:"dss-datepicker__month-year-row"},ls=["aria-label"],os={class:"dss-datepicker__weekdays"},as={class:"dss-datepicker__grid"},ss=["disabled","onClick","onMouseenter"],rs={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},is={class:"dss-datepicker__calendar-header"},cs=["aria-label"],us={class:"dss-datepicker__month-year-row"},ds=["aria-label"],ms={class:"dss-datepicker__weekdays"},ps={class:"dss-datepicker__grid"},fs=["disabled","onClick","onMouseenter"],vs={key:1,class:"dss-datepicker__day dss-datepicker__day--empty"},gs={class:"dss-datepicker__calendar-header"},hs={class:"dss-datepicker__month-year-row"},ys={class:"dss-datepicker__month-year dss-datepicker__month-year--static"},ks={class:"dss-datepicker__months-grid"},Cs=["onClick"],bs={class:"dss-datepicker__calendar-header dss-datepicker__calendar-header--center"},ws={class:"dss-datepicker__month-year"},xs={class:"dss-datepicker__years-grid"},Es=["data-year","onClick"],ua=27,Wl=8,la={__name:"DSSDatepicker",props:{mode:{type:String,default:"single",validator:T=>["single","range","singleFromAvailable","rangeFromAvailable","listFromAvailable","readonly"].includes(T)},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(T,{emit:oe}){const _=T,D=oe,{t:ce,locale:z}=co.useI18n(),M=e.ref(!1),ve=e.ref("days"),ut=new Date,J=e.computed(()=>_.minDate instanceof Date?_.minDate:ut),v=e.ref(J.value.getMonth()),we=e.ref(J.value.getFullYear()),ke=e.ref(J.value.getMonth()),G=e.ref(J.value.getFullYear()),X=e.ref(J.value.getMonth()),me=e.ref(J.value.getFullYear()),F=e.ref("start"),Ee=e.ref(null),Te=e.ref(null);function nt(){const L=J.value,I=L.getMonth(),B=L.getFullYear(),ee=I===11?0:I+1,Ae=I===11?B+1:B;return{left:{month:I,year:B},right:{month:ee,year:Ae}}}const pt=e.ref(null),W=e.ref(null),Ue=e.ref(null),We=e.ref(null),xe=e.ref(null),Me=e.ref(null),Xe=e.ref(null),te=e.ref(null),lt=new Date().getFullYear(),Ce=e.computed(()=>["single","singleFromAvailable"].includes(_.mode)),et=e.computed(()=>["range","rangeFromAvailable"].includes(_.mode)),dt=e.computed(()=>_.mode==="listFromAvailable"),yt=e.computed(()=>{if(!["single","singleFromAvailable","listFromAvailable"].includes(_.mode))return null;const L=_.modelValue;return L instanceof Date?L:null}),Et=e.computed(()=>{if(!et.value)return{start:null,end:null};const L=_.modelValue;return!L||typeof L!="object"?{start:null,end:null}:{start:L.start instanceof Date?L.start:null,end:L.end instanceof Date?L.end:null}});function Ht(L){if(!L||!(L instanceof Date))return"";const I=L.getDate(),B=L.getMonth()+1,ee=L.getFullYear(),Ae=ft=>String(ft).padStart(2,"0");return`${Ae(I)}/${Ae(B)}/${ee}`}const It=e.computed(()=>Ht(yt.value)),re=e.computed(()=>{const{start:L,end:I}=Et.value;if(!L&&!I)return"";const B=!I||L&&L<=I?L:I,ee=!L||I&&I>=L?I:L;return Yt(B,ee)?Ht(B):`${Ht(B)} - ${Ht(ee)}`}),pe=e.computed(()=>{if(_.mode!=="readonly")return"—";const L=_.modelValue;if(L instanceof Date)return Ht(L)||"—";if(L&&typeof L=="object"&&("start"in L||"end"in L)){const I=L.start instanceof Date?L.start:null,B=L.end instanceof Date?L.end:null;if(!I&&!B)return"—";const ee=!B||I&&I<=B?I:B,Ae=!I||B&&B>=I?B:I;return Yt(ee,Ae)?Ht(ee):`${Ht(ee)} - ${Ht(Ae)}`}return"—"});e.computed(()=>{const L=new Date(we.value,v.value,1);return new Intl.DateTimeFormat(z.value,{month:"long",year:"numeric"}).format(L)});const De=e.computed(()=>Te.value==="left"?ke.value:Te.value==="right"?X.value:v.value),_e=e.computed(()=>Te.value==="left"?G.value:Te.value==="right"?me.value:we.value),Jt=e.computed(()=>{const L=new Date(we.value,v.value,1);return new Intl.DateTimeFormat(z.value,{month:"long"}).format(L)}),Ct=e.computed(()=>{const L=new Date(_e.value,De.value,1);return new Intl.DateTimeFormat(z.value,{month:"long"}).format(L)}),tn=e.computed(()=>{const L=new Intl.DateTimeFormat(z.value,{month:"short"});return Array.from({length:12},(I,B)=>L.format(new Date(2024,B,1)))}),_t=e.computed(()=>{const I=(Te.value?_e.value:we.value)-Math.floor(ua/2);return Array.from({length:ua},(B,ee)=>I+ee)}),Ut=e.computed(()=>{const L=_t.value;return L.length?`${L[0]} – ${L[L.length-1]}`:""});function Q(L){return L===7?0:L}function he(L){try{const I=new Intl.Locale(L);if(I.weekInfo?.firstDay!=null)return Q(I.weekInfo.firstDay)}catch{}return 1}function Be(L){const I=new Date(2024,0,1),B=(I.getDay()-L+7)%7,ee=new Date(I);return ee.setDate(I.getDate()-B),ee}const ze=e.computed(()=>he(z.value)),Ke=e.computed(()=>{const L=new Intl.DateTimeFormat(z.value,{weekday:"short"}),I=Be(ze.value),B=[];for(let ee=0;ee<7;ee++){const Ae=new Date(I);Ae.setDate(I.getDate()+ee),B.push(L.format(Ae).slice(0,2))}return B});function Vt(L,I,B){const ee=new Date(L,I,1),Ae=new Date(L,I+1,0),ft=(ee.getDay()-B+7)%7,mt=Ae.getDate(),st=[];for(let rt=0;rt<ft;rt++)st.push(null);for(let rt=1;rt<=mt;rt++)st.push(new Date(L,I,rt));return st}const tt=e.computed(()=>Vt(we.value,v.value,ze.value)),Xt=e.computed(()=>Vt(G.value,ke.value,ze.value)),Ze=e.computed(()=>Vt(me.value,X.value,ze.value));e.computed(()=>{const L=new Date(G.value,ke.value,1);return new Intl.DateTimeFormat(z.value,{month:"long",year:"numeric"}).format(L)}),e.computed(()=>{const L=new Date(me.value,X.value,1);return new Intl.DateTimeFormat(z.value,{month:"long",year:"numeric"}).format(L)});const Pe=e.computed(()=>{const L=new Date(G.value,ke.value,1);return new Intl.DateTimeFormat(z.value,{month:"long"}).format(L)}),Lt=e.computed(()=>{const L=new Date(me.value,X.value,1);return new Intl.DateTimeFormat(z.value,{month:"long"}).format(L)}),$t=e.computed(()=>_.availableDates&&_.availableDates.length>0),ne=e.computed(()=>$t.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"}]),Z=e.ref({top:0,left:0}),U=e.ref("left");let ie=null;function ye(){M.value&&e.nextTick(()=>{M.value&&(ie!==null&&window.cancelAnimationFrame(ie),ie=window.requestAnimationFrame(()=>{ie=null,Ge()}))})}function Ge(){if(!xe.value||!M.value)return;const L=xe.value.getBoundingClientRect(),I=window.innerWidth||document.documentElement.clientWidth,B=window.innerHeight||document.documentElement.clientHeight;let ee=L.left,Ae=L.bottom+4;const ft=Me.value;if(ft){const mt=ft.offsetWidth,st=ft.offsetHeight;U.value==="right"||ee+mt>I-Wl?(U.value="right",ee=L.right-mt):U.value="left";const vn=Math.max(Wl,I-mt-Wl);if(ee=Math.min(Math.max(ee,Wl),vn),Ae+st>B-Wl){const bn=L.top-4-st;bn>=Wl?Ae=bn:Ae=Math.max(Wl,B-st-Wl)}}Z.value={top:Ae,left:ee}}const At=e.computed(()=>!xe.value||!M.value?{}:{position:"fixed",left:`${Z.value.left}px`,top:`${Z.value.top}px`,zIndex:1002});function Yt(L,I){return!L||!I?!1:L.getFullYear()===I.getFullYear()&&L.getMonth()===I.getMonth()&&L.getDate()===I.getDate()}function ot(L){return new Date(L.getFullYear(),L.getMonth(),L.getDate()).getTime()}function sn(L){return!_.availableDates||!_.availableDates.length?!0:_.availableDates.some(I=>I instanceof Date&&Yt(I,L))}function S(L){const I=ot(L);return!(_.minDate instanceof Date&&I<ot(_.minDate)||_.maxDate instanceof Date&&I>ot(_.maxDate))}function b(L){const I=new Date(L);return new Date(I.getFullYear(),I.getMonth(),I.getDate())}function V(L){return L.filter(I=>S(I))}function Y(L,I){if(!(L instanceof Date)||!(I instanceof Date))return null;let B=ot(L),ee=ot(I);if(B>ee&&([B,ee]=[ee,B]),_.minDate instanceof Date){const Ae=ot(_.minDate);B=Math.max(B,Ae),ee=Math.max(ee,Ae)}if(_.maxDate instanceof Date){const Ae=ot(_.maxDate);B=Math.min(B,Ae),ee=Math.min(ee,Ae)}return B>ee?null:{start:b(B),end:b(ee)}}function le(L){return!_.exceptDates||!_.exceptDates.length?!1:_.exceptDates.some(I=>I instanceof Date&&Yt(I,L))}function He(L){return le(L)?!1:["singleFromAvailable","rangeFromAvailable"].includes(_.mode)?sn(L):S(L)}function kt(L){const I=yt.value,B=Et.value,ee=ot(L),Ae=et.value&&B.start&&B.end&&ee>ot(B.start)&&ee<ot(B.end),ft=et.value&&B.start&&Yt(L,B.start),mt=et.value&&B.end&&Yt(L,B.end),st=ft&&mt,rt=Ce.value&&I&&Yt(L,I)||ft||mt;let vn=!1;if(et.value&&B.start&&!B.end&&Ee.value){const bn=ot(B.start),Ot=ot(Ee.value),gn=Math.min(bn,Ot),Kt=Math.max(bn,Ot);vn=ee>gn&&ee<Kt}return{"dss-datepicker__day--selected":rt&&!st,"dss-datepicker__day--range-start":ft&&!st,"dss-datepicker__day--range-end":mt&&!st,"dss-datepicker__day--range-single":st,"dss-datepicker__day--in-range":Ae&&!ft&&!mt,"dss-datepicker__day--in-range-preview":vn&&!ft&&!mt&&!Ae,"dss-datepicker__day--disabled":!He(L)}}function at(L){if(!et.value)return;const I=Et.value;if(!I.start||I.end){Ee.value=null;return}if(!He(L)){Ee.value=null;return}Ee.value=new Date(L.getFullYear(),L.getMonth(),L.getDate())}function Ie(){Ee.value=null}function bt(){if(!_.doubleCalendar||!et.value)return;const L=Et.value,{start:I,end:B}=L;if(I&&B){const ft=I<=B?I:B,mt=I<=B?B:I,st=ft.getMonth(),rt=ft.getFullYear(),vn=mt.getMonth(),bn=mt.getFullYear();if(st!==vn||rt!==bn){const Ot=ke.value===st&&G.value===rt,gn=X.value===vn&&me.value===bn;if(Ot&&gn)return;ke.value=st,G.value=rt,X.value=vn,me.value=bn}else{const Ot=st===0?11:st-1,gn=st===0?rt-1:rt;ke.value===Ot&&G.value===gn&&X.value===st&&me.value===rt||(ke.value=st,G.value=rt,st===11?(X.value=0,me.value=rt+1):(X.value=st+1,me.value=rt))}return}const ee=I||B;if(ee){const ft=ee.getMonth(),mt=ee.getFullYear(),st=ke.value===ft&&G.value===mt,rt=X.value===ft&&me.value===mt;if(st||rt)return;ke.value=ft,G.value=mt,ft===11?(X.value=0,me.value=mt+1):(X.value=ft+1,me.value=mt);return}const Ae=nt();ke.value=Ae.left.month,G.value=Ae.left.year,X.value=Ae.right.month,me.value=Ae.right.year}const Nt=e.computed(()=>new Intl.DateTimeFormat(z.value,{day:"2-digit",month:"long",year:"numeric"})),wt=e.computed(()=>{if(!dt.value)return[];const L=(_.availableDates||[]).filter(B=>B instanceof Date&&!Number.isNaN(B.getTime())).filter(B=>!le(B)&&S(B)).map(B=>new Date(B.getFullYear(),B.getMonth(),B.getDate()));L.sort((B,ee)=>ee.getTime()-B.getTime());const I=yt.value;return L.map(B=>({date:B,ts:B.getTime(),label:Nt.value.format(B),selected:!!(I&&Yt(B,I))}))});function it(){if(M.value){rn();return}xe.value=We.value?.closest(".dss-datepicker__input-wrap"),U.value="left",M.value=!0,ye(),e.nextTick(()=>{te.value?.querySelector(".dss-datepicker__list-item--selected")?.scrollIntoView({block:"nearest",behavior:"auto"})})}function Tt(L){if(!(L instanceof Date))return;const I=new Date(L.getFullYear(),L.getMonth(),L.getDate());D("update:modelValue",I),rn()}function St(L="start"){if(_.mode==="readonly")return;F.value=L;const I=yt.value,B=Et.value;if(Ce.value&&I)v.value=I.getMonth(),we.value=I.getFullYear();else if(et.value)if(_.doubleCalendar)bt();else{const ee=L==="start"&&B.start?B.start:B.end||B.start;ee&&(v.value=ee.getMonth(),we.value=ee.getFullYear())}xe.value=Ce.value?pt.value?.closest(".dss-datepicker__input-wrap"):W.value,ve.value="days",Te.value=null,U.value="left",M.value=!0,ye()}function rn(){ve.value="days",Te.value=null,Ee.value=null,M.value=!1}function Vn(L,I){Te.value=L,ve.value=I}function Zn(){ve.value="days",Te.value=null}function en(L){const I=new Date,B=I.getFullYear(),ee=I.getMonth(),Ae=I.getDate();let ft,mt;if($t.value){const st=V([..._.availableDates].filter(rt=>rt instanceof Date).map(rt=>new Date(rt.getFullYear(),rt.getMonth(),rt.getDate()))).sort((rt,vn)=>rt.getTime()-vn.getTime());if(st.length===0)return null;if(L==="all")ft=st[0],mt=st[st.length-1];else{const rt=parseInt(L.replace("last",""),10);if(rt<2||rt>5)return null;const vn=st.slice(-rt);if(vn.length===0)return null;ft=vn[0],mt=vn[vn.length-1]}}else{const st=new Date(B,ee,Ae);switch(L){case"today":ft=st,mt=st;break;case"lastWeek":ft=new Date(B,ee,Ae-6),mt=st;break;case"last15Days":ft=new Date(B,ee,Ae-14),mt=st;break;case"last30Days":ft=new Date(B,ee,Ae-29),mt=st;break;case"thisMonth":ft=new Date(B,ee,1),mt=st;break;case"last3Months":ft=new Date(B,ee-3,1),mt=new Date(B,ee,0);break;case"last6Months":ft=new Date(B,ee-6,1),mt=new Date(B,ee,0);break;case"last12Months":ft=new Date(B,ee-12,1),mt=new Date(B,ee,0);break;case"lastYear":ft=new Date(B-1,0,1),mt=new Date(B-1,11,31);break;default:return null}}return{start:ft,end:mt}}function pn(L){const I=en(L);return I?Y(I.start,I.end):null}function ll(L){return pn(L)!==null}function vl(L){const I=pn(L);I&&(D("update:modelValue",I),bt())}function il(L){Te.value==="left"?ke.value=L:Te.value==="right"?X.value=L:v.value=L,Zn()}function _n(L){Te.value==="left"?G.value=L:Te.value==="right"?me.value=L:we.value=L,Zn()}function gl(){v.value===0?(v.value=11,we.value--):v.value--}function $n(){v.value===11?(v.value=0,we.value++):v.value++}function Vl(){ke.value===0?(ke.value=11,G.value--):ke.value--}function Rl(){ke.value===11?(ke.value=0,G.value++):ke.value++}function hl(){X.value===0?(X.value=11,me.value--):X.value--}function Tn(){X.value===11?(X.value=0,me.value++):X.value++}function Un(L){if(!He(L))return;const I=new Date(L.getFullYear(),L.getMonth(),L.getDate());if(Ce.value){D("update:modelValue",I),rn();return}const B=Et.value;if(!B.start&&!B.end){D("update:modelValue",{start:I,end:null}),F.value="end";return}if(B.start&&B.end){D("update:modelValue",{start:I,end:null}),F.value="end";return}if(F.value==="start"){let ee=I,Ae=B.end;ee&&Ae&&ee>Ae&&([ee,Ae]=[Ae,ee]),D("update:modelValue",{start:ee||Ae,end:Ae||ee}),F.value="end"}else{let ee=B.start,Ae=I;ee&&Ae&&Ae<ee&&([ee,Ae]=[Ae,ee]),D("update:modelValue",{start:ee||Ae,end:Ae||ee}),F.value="start"}}e.watch(Et,()=>{_.doubleCalendar&&et.value&&M.value&&bt()},{deep:!0});let Xn=null,Hn=null,zn=null;function Nl(){Xn&&(document.removeEventListener("keydown",Xn),Xn=null),Hn&&(window.removeEventListener("resize",Hn),Hn=null),zn&&(window.removeEventListener("scroll",zn,!0),zn=null)}return e.watch(ve,L=>{L==="years"&&e.nextTick(()=>{Xe.value?.querySelector(`[data-year="${_e.value}"]`)?.scrollIntoView({block:"center",behavior:"auto"})})}),e.watch(()=>[M.value,ve.value,v.value,we.value,ke.value,G.value,X.value,me.value,Te.value,_.doubleCalendar,_.quickSelect],()=>{ye()}),e.watch(M,L=>{Nl(),L&&(Xn=I=>{I.key==="Escape"&&(ve.value==="years"||ve.value==="months"?Zn():rn())},Hn=()=>{Ge()},zn=()=>{Ge()},document.addEventListener("keydown",Xn),window.addEventListener("resize",Hn),window.addEventListener("scroll",zn,!0))}),e.onBeforeUnmount(()=>{ie!==null&&(window.cancelAnimationFrame(ie),ie=null),Nl()}),(L,I)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-datepicker",{"dss-datepicker--readonly":T.mode==="readonly"}])},[T.mode==="readonly"?(e.openBlock(),e.createElementBlock("div",$a,[I[10]||(I[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:pe.value,readonly:"",disabled:"",tabindex:"-1"},null,8,La)])):Ce.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-datepicker__input-wrap",onClick:I[0]||(I[0]=B=>St("start"))},[I[11]||(I[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:_.placeholder||e.unref(ce)("datepicker.selectDate"),value:It.value,readonly:"",disabled:T.mode==="readonly"},null,8,Aa)])):dt.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":M.value}]),onClick:it},[I[13]||(I[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:We,type:"text",class:"dss-datepicker__input",placeholder:_.placeholder||e.unref(ce)("datepicker.selectFromList"),value:It.value,readonly:""},null,8,Ta),e.createElementVNode("span",{class:e.normalizeClass(["dss-datepicker__chevron",{"dss-datepicker__chevron--open":M.value}]),"aria-hidden":"true"},[...I[12]||(I[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)):et.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-datepicker__input-wrap",ref_key:"inputRangeWrapRef",ref:W,onClick:I[1]||(I[1]=B=>St("start"))},[I[14]||(I[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:Ue,type:"text",class:"dss-datepicker__input",placeholder:_.placeholder||e.unref(ce)("datepicker.selectRange"),value:re.value,readonly:""},null,8,Da)],512)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[M.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-datepicker__overlay",onClick:e.withModifiers(rn,["self"])},[e.createElementVNode("div",{ref_key:"dropdownRef",ref:Me,class:e.normalizeClass(["dss-datepicker__dropdown",{"dss-datepicker__dropdown--double":T.doubleCalendar&&et.value&&ve.value==="days","dss-datepicker__dropdown--quick-select":T.doubleCalendar&&et.value&&ve.value==="days"&&T.quickSelect,"dss-datepicker__dropdown--list":dt.value}]),onClick:I[9]||(I[9]=e.withModifiers(()=>{},["stop"])),style:e.normalizeStyle(At.value)},[dt.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[wt.value.length?(e.openBlock(),e.createElementBlock("ul",{key:0,class:"dss-datepicker__list",role:"listbox",ref_key:"listRef",ref:te},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(wt.value,B=>(e.openBlock(),e.createElementBlock("li",{key:B.ts,role:"option","aria-selected":B.selected,class:e.normalizeClass(["dss-datepicker__list-item",{"dss-datepicker__list-item--selected":B.selected}]),onClick:ee=>Tt(B.date)},[e.createElementVNode("span",Ra,e.toDisplayString(B.label),1),B.selected?(e.openBlock(),e.createElementBlock("svg",Fa,[...I[15]||(I[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,Ha))),128))],512)):(e.openBlock(),e.createElementBlock("div",Ia,e.toDisplayString(e.unref(ce)("datepicker.noAvailableDates")),1))],64)):ve.value==="days"&&T.doubleCalendar&&et.value?(e.openBlock(),e.createElementBlock("div",za,[T.quickSelect?(e.openBlock(),e.createElementBlock("nav",Pa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ne.value,B=>(e.openBlock(),e.createElementBlock("button",{key:B.id,type:"button",class:"dss-datepicker__quick-select-btn",disabled:!ll(B.id),onClick:ee=>vl(B.id)},e.toDisplayString(e.unref(ce)(B.labelKey)),9,Oa))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",qa,[e.createElementVNode("div",Wa,[e.createElementVNode("div",Za,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ce)("datepicker.prevMonth"),onClick:Vl}," ‹ ",8,Ua),e.createElementVNode("div",Xa,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:I[2]||(I[2]=B=>Vn("left","months"))},e.toDisplayString(Pe.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:I[3]||(I[3]=B=>Vn("left","years"))},e.toDisplayString(G.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ce)("datepicker.nextMonth"),onClick:Rl}," › ",8,Ya)]),e.createElementVNode("div",ja,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ke.value,B=>(e.openBlock(),e.createElementBlock("span",{key:B,class:"dss-datepicker__weekday"},e.toDisplayString(B),1))),128))]),e.createElementVNode("div",Ka,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Xt.value,(B,ee)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"L-"+ee},[B?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",kt(B)]),disabled:!He(B),onClick:Ae=>Un(B),onMouseenter:Ae=>at(B),onMouseleave:Ie},e.toDisplayString(B.getDate()),43,Ga)):(e.openBlock(),e.createElementBlock("span",Qa))],64))),128))])]),e.createElementVNode("div",Ja,[e.createElementVNode("div",es,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ce)("datepicker.prevMonth"),onClick:hl}," ‹ ",8,ts),e.createElementVNode("div",ns,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:I[4]||(I[4]=B=>Vn("right","months"))},e.toDisplayString(Lt.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:I[5]||(I[5]=B=>Vn("right","years"))},e.toDisplayString(me.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ce)("datepicker.nextMonth"),onClick:Tn}," › ",8,ls)]),e.createElementVNode("div",os,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ke.value,B=>(e.openBlock(),e.createElementBlock("span",{key:B,class:"dss-datepicker__weekday"},e.toDisplayString(B),1))),128))]),e.createElementVNode("div",as,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ze.value,(B,ee)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"R-"+ee},[B?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",kt(B)]),disabled:!He(B),onClick:Ae=>Un(B),onMouseenter:Ae=>at(B),onMouseleave:Ie},e.toDisplayString(B.getDate()),43,ss)):(e.openBlock(),e.createElementBlock("span",rs))],64))),128))])])])])):ve.value==="days"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",is,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ce)("datepicker.prevMonth"),onClick:gl}," ‹ ",8,cs),e.createElementVNode("div",us,[e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:I[6]||(I[6]=B=>ve.value="months")},e.toDisplayString(Jt.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:I[7]||(I[7]=B=>ve.value="years")},e.toDisplayString(we.value),1)]),e.createElementVNode("button",{type:"button",class:"dss-datepicker__nav","aria-label":e.unref(ce)("datepicker.nextMonth"),onClick:$n}," › ",8,ds)]),e.createElementVNode("div",ms,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ke.value,B=>(e.openBlock(),e.createElementBlock("span",{key:B,class:"dss-datepicker__weekday"},e.toDisplayString(B),1))),128))]),e.createElementVNode("div",ps,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(tt.value,(B,ee)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:ee},[B?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["dss-datepicker__day",kt(B)]),disabled:!He(B),onClick:Ae=>Un(B),onMouseenter:Ae=>at(B),onMouseleave:Ie},e.toDisplayString(B.getDate()),43,fs)):(e.openBlock(),e.createElementBlock("span",vs))],64))),128))])],64)):ve.value==="months"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("div",gs,[e.createElementVNode("div",hs,[e.createElementVNode("span",ys,e.toDisplayString(Ct.value),1),e.createElementVNode("button",{type:"button",class:"dss-datepicker__month-year-btn",onClick:I[8]||(I[8]=B=>ve.value="years")},e.toDisplayString(_e.value),1)])]),e.createElementVNode("div",ks,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(tn.value,(B,ee)=>(e.openBlock(),e.createElementBlock("button",{key:ee,type:"button",class:e.normalizeClass(["dss-datepicker__month-cell",{"dss-datepicker__month-cell--selected":ee===De.value}]),onClick:Ae=>il(ee)},e.toDisplayString(B),11,Cs))),128))])],64)):ve.value==="years"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createElementVNode("div",bs,[e.createElementVNode("span",ws,e.toDisplayString(Ut.value),1)]),e.createElementVNode("div",{class:"dss-datepicker__years-wrap",ref_key:"yearsWrapRef",ref:Xe},[e.createElementVNode("div",xs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_t.value,B=>(e.openBlock(),e.createElementBlock("button",{key:B,type:"button",class:e.normalizeClass(["dss-datepicker__year-cell",{"dss-datepicker__year-cell--selected":B===_e.value,"dss-datepicker__year-cell--current":B===e.unref(lt)}]),"data-year":B,onClick:ee=>_n(B)},e.toDisplayString(B),11,Es))),128))])],512)],64)):e.createCommentVNode("",!0)],6)])):e.createCommentVNode("",!0)]))],2))}},Ss=["data-chart-type"],Vs={class:"dss-chart-header-titles"},Ns={key:0,class:"dss-chart-title"},Bs={key:1,class:"dss-chart-subtitle"},Ms=["onClick","onMouseenter"],_s={class:"dss-legend-text"},$s=["onClick","onMouseenter"],Ls={class:"dss-legend-text"},As=["title"],Ts=["src"],Ds={class:"dss-chart-area-wrapper"},Hs={key:0,class:"dss-chart-z-axis-label"},Rs=["width","height","data-smooth","data-animated"],Fs=["id"],Is=["y","width","height"],zs=["id"],Ps=["d"],Os=["id"],qs=["d"],Ws={key:0},Zs=["clip-path"],Us=["x1","x2","y1","y2"],Xs={class:"dss-axes"},Ys=["x1","x2","y1","y2"],js=["x1","x2","y1","y2"],Ks=["x1","x2","y1","y2"],Gs={class:"dss-axis-labels"},Qs=["x","y"],Js=["x","y"],er=["x","y"],tr=["x","y"],nr=["y","transform"],lr=["x","y","transform"],or={key:1,class:"dss-flag-markers"},ar=["clip-path"],sr=["x1","x2","y1","y2","onMouseover"],rr=["x1","x2","y1","y2","onMouseover"],ir=["x1","x2","y1","y2","onMouseover"],cr=["cx","cy","onMouseover"],ur=["cx","cy","fill","onMouseover"],dr=["x","y"],mr=["clip-path"],pr={key:0},fr=["d","onMouseover"],vr=["x","y","width","height","fill","onMouseover"],gr={class:"dss-line-chart"},hr=["d","stroke","stroke-width","stroke-dasharray"],yr=["d","stroke","stroke-width","opacity"],kr=["cx","cy","r","fill","onMouseover"],Cr={key:1},br=["d","stroke","stroke-width","stroke-dasharray"],wr=["d","stroke","stroke-width","stroke-dasharray"],xr=["d","stroke","stroke-width","opacity"],Er=["cx","cy","r","fill","onMouseover"],Sr={key:2},Vr=["id"],Nr=["x","y","width","height"],Br=["d","fill","fill-opacity","mask"],Mr=["d","stroke","stroke-width"],_r=["d","fill","onMouseover"],$r=["x","y","width","height","onMouseover"],Lr=["clip-path"],Ar=["x1","x2","y1","y2","stroke"],Tr=["cx","cy","r","fill"],Dr={key:1,class:"dss-bubble-chart"},Hr={key:0,class:"dss-bubble-group"},Rr=["cx","cy","r","fill","fill-opacity","stroke","onMouseenter","onMouseleave","onClick"],Fr=["x","y","width","height","xlink:href","clip-path","onLoad","onError","onMouseenter","onMouseleave","onClick"],Ir=["transform"],zr=["cx","cy","r"],Pr=["data-chart-type","clip-path"],Or=["d","fill","fill-opacity","stroke","stroke-width","clip-path","onMouseover"],qr={key:1,class:"dss-radial-segment-data-labels"},Wr=["x","y"],Zr=["x","y","font-size","fill"],Ur=["x1","y1","x2","y2","stroke"],Xr=["x1","y1","x2","y2","stroke"],Yr=["x","y","text-anchor","font-size"],jr=["transform"],Kr={key:0,class:"dss-spider-grid"},Gr=["cx","cy","r"],Qr={class:"dss-spider-grid-labels"},Jr=["x","y"],ei=["x","y"],ti=["x1","x2","y1","y2"],ni={class:"dss-spider-labels"},li=["x","y","text-anchor","dominant-baseline"],oi=["points","fill","fill-opacity","stroke","stroke-width","stroke-dasharray"],ai=["cx","cy","r","fill","stroke","stroke-width","onMouseover"],si={class:"dss-chart-logos"},ri=["cx","cy","r","fill"],ii=["x","y","width","height","xlink:href","onLoad","onError","clip-path"],ci=["onClick","onMouseenter"],ui=["src"],di={class:"dss-marker-tooltip-category"},mi={key:0,class:"dss-marker-tooltip-description"},pi={key:0,class:"dss-tooltip-section dss-spider-tooltip-section"},fi={class:"dss-tooltip-title dss-spider-tooltip-area-title"},vi={class:"dss-tooltip-series-name"},gi={class:"dss-tooltip-series-value"},hi={key:1,class:"dss-tooltip-section"},yi={key:0,class:"dss-tooltip-title"},ki={class:"dss-bubble-tooltip-data"},Ci={key:2,class:"dss-tooltip-section"},bi={class:"dss-tooltip-title"},wi={class:"dss-tooltip-value"},xi={key:0,class:"dss-tooltip-section"},Ei={class:"dss-tooltip-section-title"},Si={class:"dss-tooltip-group-header"},Vi={class:"dss-tooltip-item-content"},Ni={class:"dss-tooltip-item-text"},Bi={key:1,class:"dss-tooltip-section"},Mi={class:"dss-tooltip-section-title"},_i={class:"dss-tooltip-item-content"},$i={class:"dss-tooltip-item-title"},Li={key:0,class:"dss-tooltip-item-description"},Ai={class:"dss-tooltip-section"},Ti={class:"dss-tooltip-title"},Di={key:0,class:"dss-bubble-tooltip-data"},Hi={class:"dss-tooltip-series-name"},Ri={class:"dss-tooltip-series-value"},Fi={key:0,class:"dss-tooltip-section"},Ii={class:"dss-tooltip-section-title"},zi={class:"dss-tooltip-group-header"},Pi={class:"dss-tooltip-item-content"},Oi={class:"dss-tooltip-item-text"},qi={key:1,class:"dss-tooltip-section"},Wi={class:"dss-tooltip-section-title"},Zi={class:"dss-tooltip-item-content"},Ui={class:"dss-tooltip-item-title"},Xi={key:0,class:"dss-tooltip-item-description"},Yi=["onClick","onMouseenter"],ji={class:"dss-legend-text"},Ki={key:1,class:"dss-context-menu-separator"},Gi={key:0,class:"dss-context-menu-separator"},Qi={key:0,class:"dss-context-menu-separator"},Ji=["onClick"],ec=["innerHTML"],tc={key:0,class:"dss-context-menu-icon"},nc={class:"dss-marker-modal-header"},lc={class:"dss-marker-modal-body"},oc={class:"dss-form-group"},ac={class:"dss-form-group"},sc={for:"dss-marker-description"},rc={key:0,class:"dss-form-text-display"},ic=["placeholder"],cc={class:"dss-marker-modal-footer"},uc={class:"modal-footer-left"},dc={class:"dss-modal-footer-right"},mc=["disabled"],pc={name:"DSSChart"},fc=Object.assign(pc,{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:T=>typeof T=="object"&&T!==null},innerSize:{type:Number,default:null},old:{type:Boolean,default:!1}},emits:["add-marker","update-marker","delete-marker"],setup(T,{emit:oe}){const{t:_,locale:D}=co.useI18n(),ce=oe,z=e.ref(null),M=e.ref(null),ve=e.ref(null),ut=e.ref(0),J=e.ref(0);let v=null,we=null;const ke=20,G=e.computed(()=>{if(J.value,ut.value,!z.value||!M.value)return 0;try{const t=z.value.getBoundingClientRect();return M.value.getBoundingClientRect().top-t.top}catch{return 0}}),X=e.computed(()=>`chart-clip-${F.chartId}`),me=e.computed(()=>`url(#${X.value})`),F=T,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,comparison:{fillOpacity:0,strokeDasharray:"6,4",usePrimaryColor:!0,bubbleSize:0}},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 Te(t,a){const n=Object.assign({},t);return pt(t)&&pt(a)&&Object.keys(a).forEach(r=>{pt(a[r])?r in t?n[r]=Te(t[r],a[r]):Object.assign(n,{[r]:a[r]}):Object.assign(n,{[r]:a[r]})}),n}const nt=()=>{let t=20,a=0,n=0;if(dt.value&&(t+=30),yt.value&&(t+=25),Q.value&&F.series.length>0){const r=F.series.filter((p,g)=>!Rt.value.has(g)).length;if(he.value==="top"||he.value==="bottom"){if(Be.value==="horizontal"){const g=Math.floor(xe.value/100);a=Math.ceil(r/g)*25+10}else a=r*25+10;t+=a}else n=150}return{height:t,legendHeight:a,legendWidth:n}};function pt(t){return t&&typeof t=="object"&&!Array.isArray(t)}const W=e.computed(()=>Te(Ee,F.options)),Ue=e.computed(()=>{const t=W.value;return t&&t.chart&&t.chart.width==="auto"}),We=e.computed(()=>{const t=W.value;return t&&t.chart&&t.chart.height==="auto"}),xe=e.computed(()=>{const t=W.value;return Ue.value?ut.value||800:t&&t.chart&&typeof t.chart.width=="number"?t.chart.width:800}),Me=e.ref(ke),Xe=e.computed(()=>{if(We.value){const t=Xe.value;return t??Math.max(0,(J.value||400)-Me.value*5)}}),te=e.computed(()=>{const t=W.value;if(Ce.value==="mini-radial")return xe.value;if(We.value){const a=Xe.value;return a??Math.max(0,(J.value||400)-Me.value)}return t&&t.chart&&typeof t.chart.height=="number"?t.chart.height:400}),lt=e.computed(()=>{if(We.value&&Ce.value==="semi-radial"&&Xe.value!=null)return Me.value+te.value+"px";if(We.value)return"100%";if(Sn.value)return Me.value+te.value+"px";if(Q.value&&he.value==="bottom"){const t=nt();return te.value+(t.legendHeight||35)+"px"}return te.value+(Q.value?20:0)+"px"}),Ce=e.computed(()=>{const t=W.value;return t&&t.chart&&t.chart.type?t.chart.type:"line"}),et=e.computed(()=>{const t=F.series.map(a=>a.type||Ce.value);return new Set(t).size>1}),dt=e.computed(()=>{const t=W.value;return t&&t.title&&t.title.text?t.title.text:""}),yt=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:""}),It=e.computed(()=>{const t=W.value;return t&&t.yAxis&&t.yAxis.title&&t.yAxis.title.text?t.yAxis.title.text:""}),re=e.computed(()=>{const t=W.value;return t&&t.yAxis&&t.yAxis.secondary&&typeof t.yAxis.secondary=="object"?t.yAxis.secondary:null}),pe=e.computed(()=>{const t=re.value;return t&&t.title&&t.title.text?t.title.text:""}),De=e.computed(()=>{const t=W.value;if(!t||!t.yAxis)return Dn;const a=t.yAxis.min;return typeof a=="number"||a===Dn?a:Dn}),_e=e.computed(()=>{const t=W.value;if(!t||!t.yAxis)return Dn;const a=t.yAxis.max;return typeof a=="number"||a===Dn?a:Dn}),Jt=e.computed(()=>{const t=re.value;if(!t)return Dn;const a=t.min;return typeof a=="number"||a===Dn?a:Dn}),Ct=e.computed(()=>{const t=re.value;if(!t)return Dn;const a=t.max;return typeof a=="number"||a===Dn?a:Dn}),tn=e.computed(()=>{const t=W.value;return!t||!t.xAxis?null:typeof t.xAxis.min=="number"?t.xAxis.min:null}),_t=e.computed(()=>{const t=W.value;return!t||!t.xAxis?null:typeof t.xAxis.max=="number"?t.xAxis.max:null}),Ut=e.computed(()=>{const t=W.value;return t&&t.grid&&t.grid.show!==!1}),Q=e.computed(()=>{const t=W.value;return t&&t.legend&&t.legend.show!==!1}),he=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"}),ze=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"}),Vt=e.computed(()=>{const t=W.value;return t&&t.crosshair&&t.crosshair.color?t.crosshair.color:"#666"}),tt=e.computed(()=>{const t=W.value;return!t||!t.zoom?!1:t.zoom.enabled===!0}),Xt=e.computed(()=>{const t=W.value;return t&&t.zoom&&typeof t.zoom.minScale=="number"?t.zoom.minScale:1}),Ze=e.computed(()=>{const t=W.value;return t&&t.zoom&&typeof t.zoom.maxScale=="number"?t.zoom.maxScale:2.5}),Pe=e.computed(()=>{const t=W.value;return t&&t.stroke&&typeof t.stroke.width=="number"?t.stroke.width:2}),Lt=e.computed(()=>{if(!Sn.value)return 0;const t=W.value;return t&&t.stroke&&typeof t.stroke.width=="number"?t.stroke.width:0}),$t=e.computed(()=>{const t=W.value;return t&&t.bubbles&&typeof t.bubbles.size=="number"?t.bubbles.size:4}),ne=e.computed(()=>{const{maxX:t}=xt.value;return t===0}),Z=(t,a)=>ne.value&&a===0?5:a,U=t=>{const a=Number(t);return!Number.isFinite(a)||a<=0?0:a},ie=e.computed(()=>{const t=W.value;return t&&t.fill&&t.fill.area&&typeof t.fill.area.opacity=="number"?t.fill.area.opacity:.3}),ye=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}),At=e.computed(()=>{const t=W.value;return ye.value?t&&t.smoothing&&typeof t.smoothing.barRadius=="number"?t.smoothing.barRadius:4:0}),Yt=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"]}),ot=e.computed(()=>{const t=W.value;return t&&t.animations&&t.animations.enabled!==!1}),sn=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}),b=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}),He=e.computed(()=>{const t=W.value;return t&&t.animations&&t.animations.respectReducedMotion!==!1}),kt=e.computed(()=>{const t=W.value;return t&&t.fill&&t.fill.spider&&typeof t.fill.spider.opacity=="number"?t.fill.spider.opacity:.15}),at=e.computed(()=>W.value?.spider?.gridSteps||5),Ie=e.computed(()=>{const t=[],a=at.value;for(let n=1;n<=a;n++)t.push(ct.value/a*n);return t}),bt=t=>{const a=Nt.value;if(a&&Array.isArray(a)&&a[t]!==void 0)return a[t].toString();const n=Ie.value[t];return Math.round(n/ct.value*100)+"%"},Nt=e.computed(()=>W.value?.spider?.gridLabels||null),wt=e.computed(()=>{const t=W.value;return t&&t.contextMenu&&t.contextMenu.enabled===!0}),it=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}),Tt=e.computed(()=>{const t=W.value;return t&&t.contextMenu&&Array.isArray(t.contextMenu.customItems)?t.contextMenu.customItems:[]}),St=e.computed(()=>{const t=W.value;return t&&t.markers&&t.markers.icon?t.markers.icon:Un.value}),rn=e.computed(()=>{const t=W.value;return t&&t.markers&&t.markers.customIcons?t.markers.customIcons:{}}),Vn=e.computed(()=>{const t=W.value;return t&&t.markers&&typeof t.markers.iconSize=="number"?t.markers.iconSize:20}),Zn=e.computed(()=>{const a=W.value?.valueFormat?.extension;return typeof a=="string"?a:""}),en=t=>{const a=Zn.value;if(t==null)return"";const n=String(t);return a?n+a:n},pn=e.computed(()=>!ae.value.isZooming);e.computed(()=>on.value.map(t=>{if(t.categoryIndex!==void 0&&(En.value||jt.value)){const a=ln(t.categoryIndex),n=G.value+P.value.bottom-Vn.value/2;return{...t,x:a,y:n}}return t}));function ll(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("-"),O=Number(w?.length===2?`20${w}`:w);n=new Date(O,Number(C)-1,Number(g))}else return 0;let r=0,p=1/0;return a.forEach((g,C)=>{const[w,O,N]=g.split("-"),H=Number(N?.length===2?`20${N}`:N),$=new Date(H,Number(O)-1,Number(w)),K=Math.abs($-n);K<p&&(p=K,r=C)}),r}const vl=e.computed(()=>{const t=F.markers.map(n=>{const r=ll(n.marker_date,F.categories),p=ln(r),g=G.value+P.value.bottom-Vn.value/2;return{...n,x:p,y:g,categoryIndex:r,source:"props"}}),a=on.value.map(n=>{if(n.categoryIndex!==void 0&&(En.value||jt.value)){const r=ln(n.categoryIndex),p=G.value+P.value.bottom-Vn.value/2;return{...n,x:r,y:p,source:"internal"}}return{...n,source:"internal"}});return[...t,...a]}),il=e.computed(()=>{const t=W.value;return t&&t.watermark&&t.watermark.enabled===!0}),_n=e.computed(()=>{const t=W.value;return t&&t.watermark&&typeof t.watermark.opacity=="number"?t.watermark.opacity:.05}),gl=e.computed(()=>{const t=W.value;return t&&t.watermark&&t.watermark.size?t.watermark.size:35}),$n=e.computed(()=>{const t=W.value;return t&&t.watermark&&t.watermark.position?t.watermark.position:"bottom-right"}),Vl=e.computed(()=>{const t={left:P.value.left,top:P.value.top,width:P.value.width,height:P.value.height};let a,n;const r=String(gl.value);if(r.includes("%")){const p=parseFloat(r)/100;a=t.width*p,n=a*(96/499)}else{const p=parseFloat(r)||25;a=Math.min(t.width*.25,200)*(p/25),n=a*(96/499)}return{width:a,height:n,area:t}}),Rl=e.computed(()=>{const{width:t,height:a}=Vl.value,n=$n.value;let r,p;const g=P.value.left,C=P.value.right,w=P.value.top,O=P.value.bottom,N=P.value.width,H=P.value.height;switch(n){case"center":r=g+(N-t)/2,p=w+(H-a)/2;break;case"top-left":r=g+15,p=w+5;break;case"top-right":r=C-t-15,p=w+5;break;case"bottom-left":r=g+15,p=O-a-5;break;case"bottom-right":default:r=C-t-15,p=O-a-5;break}return{backgroundPositionX:r+"px",backgroundPositionY:p+"px",backgroundSize:`${t}px ${a}px`}}),hl=t=>!F.flags||!F.flags.length?[]:F.flags.filter(a=>a.categoryIndex===t),Tn=t=>{const a=hl(t),n=kl(t),r=a.filter(C=>C.manual),p=a.filter(C=>!C.manual),g=[];return r.length>0&&g.push({type:_("chart.tooltip.manualFlags"),color:"#698dbe",flags:r.map(C=>({text:C.text,color:"#698dbe"}))}),p.length>0&&g.push({type:_("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:_("chart.tooltip.markers"),color:C.color||"#9784ba"}))}},Un=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)}`}),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">
18
+ </svg>`;return`data:image/svg+xml;base64,${btoa(t)}`}),Xn=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)}`}),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 ie=e.computed(()=>{const t=W.value;return t&&t.radialLabels&&typeof t.radialLabels.pointerLength=="number"?t.radialLabels.pointerLength:25}),Le=e.computed(()=>{const t=W.value;return t&&t.radialLabels&&typeof t.radialLabels.horizontalLength=="number"?t.radialLabels.horizontalLength:40}),ct=e.computed(()=>{const t=W.value;return t&&t.radialLabels&&typeof t.radialLabels.textOffset=="number"?t.radialLabels.textOffset:8}),rt=e.computed(()=>{const a=W.value?.radialBar?.dataLabels;return a&&(a.show===!0||a.enabled===!0)}),Ye=e.computed(()=>{const a=W.value?.radialBar?.dataLabels?.minAngleDegrees;return typeof a=="number"&&a>=0?a:20}),Tt=e.computed(()=>{const a=W.value?.radialBar?.dataCenter;return Xl.value?!0:xl.value&&a&&(a.show===!0||a.enabled===!0)}),fn=e.computed(()=>{if(!Tt.value||!Zt.value.length)return"";if(Xl.value){const r=Zt.value[1]??Zt.value[0];return Gt(r?.value??0)}const n=W.value?.radialBar?.dataCenter?.showValueOnly===!0?Zt.value[0]?.value??0:Zt.value.reduce((r,p)=>r+(p.value??0),0);return Gt(n)}),Sn=e.computed(()=>{const a=W.value?.radialBar?.dataCenter?.fontSize;return typeof a=="number"&&a>0?a:24}),Pn=e.computed(()=>({x:zt.value,y:Xl.value?Dt.value:Dt.value-Sn.value/2})),$n=e.computed(()=>{const a=W.value?.radialBar?.dataCenter?.color;return typeof a=="string"&&a?a:"#333"}),Rl=e.computed(()=>{if(!rt.value||!En.value||!Zt.value.length)return[];const t=Ye.value*Math.PI/180,a=(Wt.value+it.value)/2;return Zt.value.map(n=>{const p=n.endAngle-n.startAngle>=t&&!n.isHidden,g=zt.value+Math.cos(n.midAngle)*a,C=Dt.value+Math.sin(n.midAngle)*a;return{value:Gt(n.value),x:g,y:C,show:p,color:n.color,contrastColor:k(n.color)}})}),kl=e.computed(()=>{if(!F.flags||!F.flags.length)return[];const t=new Map;return F.flags.forEach(a=>{const n=a.categoryIndex;t.has(n)||t.set(n,[]),t.get(n).push(a)}),Array.from(t.entries()).map(([a,n])=>{const r=en(a),p=n.filter(C=>C.manual),g=n.filter(C=>!C.manual);return{categoryIndex:parseInt(a),x:r,flags:n,manualCount:p.length,autoCount:g.length,totalCount:n.length,hasManual:p.length>0,hasAuto:g.length>0,texts:n.map(C=>C.text).join(`
45
- `)}})}),dn=e.ref({show:!1,x:0,y:0,content:"",count:0}),Hn=e.computed(()=>W.value?.bubbles?.tooltip?.fields||["x","y","size","label"]),tn=e.computed(()=>{const t=W.value;return{...{x:"X",y:"Y",size:"Size",label:"Label",seriesName:"Series"},...t?.bubbles?.tooltip?.labels||{}}}),Ln=e.computed(()=>W.value?.bubbles?.tooltip?.formatters||{}),Rt=e.ref(new Set),he=e.ref(null),_t=e.ref(!1),ft=e.ref({show:!1,x:0,y:0,title:"",value:"",bubbleData:[],spiderAreas:[]}),Rn=e.ref({show:!1,x:0,y:0,categoryValue:"",description:""}),je=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}),nn=e.ref([]),Fe=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 kn.value&&t.push(...Object.keys(kn.value)),t}),e.computed(()=>{if(!F.categories||F.categories.length===0){const{maxX:t}=wt.value;return Array.from({length:t+1},(a,n)=>M("chart.fallback.item",{number:n+1}))}return F.categories});const ol=e.computed(()=>{if(!F.categories||F.categories.length===0)return null;const t=F.categories[0],[a,n,r]=String(t).split("-"),p=Number(r?.length===2?`20${r}`:r),g=Number(a),C=Number(n)-1;return!g||!n||!p?null:new Date(p,C,g)}),an=e.computed(()=>{if(!F.categories||F.categories.length===0)return null;const t=F.categories[F.categories.length-1],[a,n,r]=String(t).split("-"),p=Number(r?.length===2?`20${r}`:r),g=Number(a),C=Number(n)-1;return!g||!n||!p?null:new Date(p,C,g)}),Cl=e.computed(()=>Fe.value.editingMarkerId!==null),Vn=e.computed(()=>Fe.value.readonly),Yt=t=>{Rt.value.has(t)||(Jo.value=!0,he.value=t)},Fl=()=>{Jo.value=!1,he.value=null},sn=t=>{if(xo.value||Fo.value){je.value.show=!1;return}const n=t.currentTarget.getBoundingClientRect(),r=t.clientX-n.left,p=t.clientY-n.top,g=Xt.value?r>=z.value.left-50&&r<=z.value.right+50&&p>=z.value.top-50&&p<=z.value.bottom+100:r>=z.value.left&&r<=z.value.right&&p>=z.value.top&&p<=z.value.bottom;if(_t.value=g,Xt.value){if(!Je.value||!g||oe.value.isDragging||oe.value.isZooming){je.value.show=!1;return}if(rn.value.find(de=>!de||de.isHidden?!1:Math.sqrt(Math.pow(de.x-r,2)+Math.pow(de.y-p,2))<=de.radius+3))je.value.show=!1;else{const de=rn.value.filter(be=>!be||be.isHidden?!1:Math.sqrt(Math.pow(be.x-r,2)+Math.pow(be.y-p,2))<=250);if(de.length>0){let be=de[0],Se=Math.sqrt(Math.pow(be.x-r,2)+Math.pow(be.y-p,2));de.forEach(Pe=>{const Ae=Math.sqrt(Math.pow(Pe.x-r,2)+Math.pow(Pe.y-p,2));Ae<Se&&(Se=Ae,be=Pe)});const ve=30,Qe=rn.value.filter(Pe=>!Pe||Pe.isHidden?!1:Math.abs(Pe.x-be.x)<=ve).sort((Pe,Ae)=>Pe.y-Ae.y);je.value={show:!0,x:be.x,categoryIndex:Math.round(be.originalX),data:(()=>{const Pe=Hn.value,Ae=tn.value,$e=[];return Qe.forEach(He=>{Pe.forEach($t=>{const Pt=Ae[$t]||$t,Jn=To($t,He);Jn&&$e.push({seriesName:He.seriesName,label:He.label,value:`${Pt}: ${Jn}`,color:He.color,y:He.y})})}),$e})()}}else je.value.show=!1}return}if(oe.value.isDragging&&oe.value.scale>1&&xn.value&&nt.value){je.value.show=!1;const Ke=t.clientX-oe.value.lastMouseX,{minX:de,maxX:be}=wt.value,Se=be-de||1,Qe=Ke*.8;oe.value.offsetX+=Qe;const Pe=Se/oe.value.scale,Ae=Se-Pe,$e=0,He=-Ae/Se*z.value.width,$t=$e;oe.value.offsetX=Math.max(He,Math.min($t,oe.value.offsetX)),oe.value.lastMouseX=t.clientX,oe.value.lastMouseY=t.clientY;return}if(!Je.value||!xn.value||oe.value.isDragging||oe.value.isZooming||!g){je.value.show=!1;return}const{minX:C,maxX:w}=wt.value,P=w-C||1,N=P/oe.value.scale,H=C-oe.value.offsetX/z.value.width*P,$=(r-z.value.left)/z.value.width,K=H+$*N,Ve=Math.round(K);if(Ve>=0&&Ve<=w){const Ke=en(Ve),de=Gn.value.map((be,Se)=>{const ve=F.series.findIndex(Pe=>Pe===be),Qe=be.data[Ve];return{seriesName:be.name,value:Qe!==void 0?Qe:null,color:f(ve),y:Qe!==void 0?Zn(be,Qe):null}}).filter(be=>be.value!==null);je.value={show:!0,x:Ke,categoryIndex:Ve,data:de}}},On=()=>{je.value.show=!1,_t.value=!1,Fo.value=!1,xo.value||(dn.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(()=>{he.value=null,ft.value.show=!1},150)},Zl=t=>{if(t.preventDefault(),t.stopPropagation(),!pt.value)return;const a=t.currentTarget.getBoundingClientRect(),n=t.clientX-a.left,r=t.clientY-a.top;if(En.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,C=z.value.top,w=z.value.bottom+80;n>=p&&n<=g&&r>=C&&r<=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(n,z.value.right))-z.value.left,H=z.value.width/c.value.length,$=Math.floor(P/H);$>=0&&$<c.value.length&&(vt.value.categoryIndex=$)}))},Un=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}},Bl=t=>{if(typeof t.template=="function"){const a={series:F.series,categories:F.categories,markers:nn.value},n={chartX:vt.value.chartX,chartY:vt.value.chartY,dataX:vt.value.mouseDataX,dataY:vt.value.mouseDataY,categoryIndex:vt.value.categoryIndex};return t.template(a,n)}return t.template||t.label||""},Nn=t=>{const a=["dss-context-menu-item"];return t.cssClass&&a.push(t.cssClass),a},Gl=t=>t.style||{},dl=t=>t.type&&kn.value[t.type]?kn.value[t.type]:t.customIcon?t.customIcon:Mt.value,Ul=t=>t==null?"":F.categories&&F.categories[t]?F.categories[t]:"",bl=t=>nn.value.length?nn.value.filter(a=>a.categoryIndex===t):[],Ql=t=>{if(!xn.value&&!Xt.value)return{x:0,y:0};const a=en(t),n=Q.value+z.value.bottom-Dn.value/2;return{x:a,y:n}},Bn=()=>{nn.value.forEach(t=>{if(t.categoryIndex!==void 0&&(xn.value||Xt.value)){const a=Ql(t.categoryIndex);t.x=a.x,t.y=a.y}})},ml=()=>{if(Fe.value.description&&Fe.value.description.length&&Fe.value.date){if(Cl.value){const t=nn.value.findIndex(a=>a.id===Fe.value.editingMarkerId);t!==-1?(nn.value[t].description=Fe.value.description||"",nn.value[t].color=Fe.value.color||"",nn.value[t].type=Fe.value.type||"default",ce("update-marker",nn.value[t])):ce("update-marker",{id:Fe.value.editingMarkerId,description:Fe.value.description||"",color:Fe.value.color||"",type:Fe.value.type||"default"})}else{const t="dss-marker-"+Date.now()+"-"+Math.random().toString(36).substring(2,9);let a=tl(Fe.value.date,F.categories||[]);if(Xt.value){const{maxX:C}=wt.value;a=Math.max(0,Math.min(a,Math.floor(C)))}else xn.value&&(a=Math.max(0,Math.min(a,wt.value.maxX)));const n=en(a),r=Q.value+z.value.bottom-Dn.value/2,p=Array.isArray(F.categories)?F.categories[a]:null,g={id:t,title:"",description:Fe.value.description||"",color:Fe.value.color||"",type:Fe.value.type||"default",categoryIndex:a,x:n,y:r,marker_date:p||null};Fe.value.categoryIndex=a,nn.value.push(g),ce("add-marker",g)}wn(),h()}},wn=()=>{Fe.value.show=!1,Fe.value.title="",Fe.value.description="",Fe.value.color="#FF6B6B",Fe.value.type="default",Fe.value.editingMarkerId=null,Fe.value.readonly=!1,Fe.value.categoryIndex=null,Fe.value.fromButton=!1,Fe.value.date=null},vn=()=>{Cl.value&&(Xn(Fe.value.editingMarkerId),wn())},Xn=t=>{const a=nn.value.findIndex(n=>n.id===t);a!==-1&&(nn.value.splice(a,1),h()),ce("delete-marker",t)},y=t=>{if(Fe.value.show=!0,Fe.value.title=t?.title??t?.comment??"",Fe.value.description=t?.description??t?.comment??"",Fe.value.color=t?.color??"",Fe.value.type=t?.type??"default",Fe.value.editingMarkerId=t?.id??t?.marker_id??null,Fe.value.readonly=t?.readonly??!1,Fe.value.categoryIndex=t?.categoryIndex??null,t?.marker_date){const[a,n,r]=String(t.marker_date).split("-"),p=Number(r?.length===2?`20${r}`:r),g=Number(a),C=Number(n)-1;g&&n&&p?Fe.value.date=new Date(p,C,g):Fe.value.date=null}else Fe.value.date=null},h=()=>{try{const t=`dss-chart-markers-${F.chartId}`;localStorage.setItem(t,JSON.stringify(nn.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 n=JSON.parse(a);Array.isArray(n)&&(nn.value=n.map(r=>({...r,originalYOffset:r.originalYOffset!==void 0?r.originalYOffset:15})))}}catch(t){console.warn("Could not load markers from localStorage:",t),nn.value=[]}},q=t=>{const a=dt.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}`},ue=()=>{const t=je.value.show,a=ft.value.show;return je.value.show=!1,ft.value.show=!1,{originalCrosshair:t,originalTooltip:a}},Ge=t=>{je.value.show=t.originalCrosshair,ft.value.show=t.originalTooltip},qt=async(t,a=32,n=32)=>new Promise((r,p)=>{if(t.startsWith("data:")){r(t);return}const g=new Image;g.crossOrigin="anonymous";const C=setTimeout(()=>{console.warn("Image conversion timeout for:",t),r(t)},5e3);g.onload=()=>{clearTimeout(C);try{const w=document.createElement("canvas"),P=w.getContext("2d");w.width=a,w.height=n,P.fillStyle="#fafafa",P.fillRect(0,0,a,n),P.drawImage(g,0,0,a,n);const N=w.toDataURL("image/png");r(N)}catch(w){console.warn("Canvas conversion failed:",w),r(t)}},g.onerror=w=>{clearTimeout(C),console.warn("Failed to load image:",t,w),r(t)},g.src=t}),gn=async()=>{try{const t=ue();setTimeout(async()=>{try{const a=B.value;if(!a){console.error("Chart SVG element not found"),Ge(t);return}const n=lt(),r=xe.value,p=te.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(ve=>ve.remove());const w=g.querySelectorAll("image"),P=Array.from(w).map(async ve=>{const Qe=ve.getAttribute("xlink:href")||ve.getAttribute("href");if(Qe&&!Qe.startsWith("data:"))try{const Pe=await qt(Qe,32,32);ve.setAttribute("xlink:href",Pe),ve.setAttribute("href",Pe)}catch(Pe){console.warn("Failed to convert logo to base64:",Pe)}});await Promise.all(P);const H=new XMLSerializer().serializeToString(g).replace(/<svg[^>]*>/,"").replace("</svg>","");let $="",K=30;if(dt.value&&($+=`
44
+ </svg>`;return`data:image/svg+xml;base64,${btoa(t)}`}),Hn=e.computed(()=>{const t=W.value;return t&&t.radialLabels&&t.radialLabels.show===!0}),zn=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 Nl=e.computed(()=>{const t=W.value;return t&&t.radialLabels&&typeof t.radialLabels.pointerLength=="number"?t.radialLabels.pointerLength:25}),L=e.computed(()=>{const t=W.value;return t&&t.radialLabels&&typeof t.radialLabels.horizontalLength=="number"?t.radialLabels.horizontalLength:40}),I=e.computed(()=>{const t=W.value;return t&&t.radialLabels&&typeof t.radialLabels.textOffset=="number"?t.radialLabels.textOffset:8}),B=e.computed(()=>{const a=W.value?.radialBar?.dataLabels;return a&&(a.show===!0||a.enabled===!0)}),ee=e.computed(()=>{const a=W.value?.radialBar?.dataLabels?.minAngleDegrees;return typeof a=="number"&&a>=0?a:20}),Ae=e.computed(()=>{const a=W.value?.radialBar?.dataCenter;return Xl.value?!0:bl.value&&a&&(a.show===!0||a.enabled===!0)}),ft=e.computed(()=>{if(!Ae.value||!Zt.value.length)return"";if(Xl.value){const r=Zt.value[1]??Zt.value[0];return en(r?.value??0)}const n=W.value?.radialBar?.dataCenter?.showValueOnly===!0?Zt.value[0]?.value??0:Zt.value.reduce((r,p)=>r+(p.value??0),0);return en(n)}),mt=e.computed(()=>{const a=W.value?.radialBar?.dataCenter?.fontSize;return typeof a=="number"&&a>0?a:24}),st=e.computed(()=>({x:zt.value,y:Xl.value?Dt.value:Dt.value-mt.value/2})),rt=e.computed(()=>{const a=W.value?.radialBar?.dataCenter?.color;return typeof a=="string"&&a?a:"#333"}),vn=e.computed(()=>{if(!B.value||!Sn.value||!Zt.value.length)return[];const t=ee.value*Math.PI/180,a=(Wt.value+ct.value)/2;return Zt.value.map(n=>{const p=n.endAngle-n.startAngle>=t&&!n.isHidden,g=zt.value+Math.cos(n.midAngle)*a,C=Dt.value+Math.sin(n.midAngle)*a;return{value:en(n.value),x:g,y:C,show:p,color:n.color,contrastColor:k(n.color)}})}),bn=e.computed(()=>{if(!F.flags||!F.flags.length)return[];const t=new Map;return F.flags.forEach(a=>{const n=a.categoryIndex;t.has(n)||t.set(n,[]),t.get(n).push(a)}),Array.from(t.entries()).map(([a,n])=>{const r=ln(a),p=n.filter(C=>C.manual),g=n.filter(C=>!C.manual);return{categoryIndex:parseInt(a),x:r,flags:n,manualCount:p.length,autoCount:g.length,totalCount:n.length,hasManual:p.length>0,hasAuto:g.length>0,texts:n.map(C=>C.text).join(`
45
+ `)}})}),Ot=e.ref({show:!1,x:0,y:0,content:"",count:0}),gn=e.computed(()=>W.value?.bubbles?.tooltip?.fields||["x","y","size","label"]),Kt=e.computed(()=>{const t=W.value;return{...{x:"X",y:"Y",size:"Size",label:"Label",seriesName:"Series"},...t?.bubbles?.tooltip?.labels||{}}}),Ln=e.computed(()=>W.value?.bubbles?.tooltip?.formatters||{}),Rt=e.ref(new Set),ge=e.ref(null),Bt=e.ref(!1),vt=e.ref({show:!1,x:0,y:0,title:"",value:"",bubbleData:[],spiderAreas:[]}),Rn=e.ref({show:!1,x:0,y:0,categoryValue:"",description:""}),Ye=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}),on=e.ref([]),Fe=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 rn.value&&t.push(...Object.keys(rn.value)),t}),e.computed(()=>{if(!F.categories||F.categories.length===0){const{maxX:t}=xt.value;return Array.from({length:t+1},(a,n)=>_("chart.fallback.item",{number:n+1}))}return F.categories});const ol=e.computed(()=>{if(!F.categories||F.categories.length===0)return null;const t=F.categories[0],[a,n,r]=String(t).split("-"),p=Number(r?.length===2?`20${r}`:r),g=Number(a),C=Number(n)-1;return!g||!n||!p?null:new Date(p,C,g)}),cn=e.computed(()=>{if(!F.categories||F.categories.length===0)return null;const t=F.categories[F.categories.length-1],[a,n,r]=String(t).split("-"),p=Number(r?.length===2?`20${r}`:r),g=Number(a),C=Number(n)-1;return!g||!n||!p?null:new Date(p,C,g)}),yl=e.computed(()=>Fe.value.editingMarkerId!==null),Nn=e.computed(()=>Fe.value.readonly),Gt=t=>{Rt.value.has(t)||(Jo.value=!0,ge.value=t)},Fl=()=>{Jo.value=!1,ge.value=null},un=t=>{if(xo.value||Fo.value){Ye.value.show=!1;return}const n=t.currentTarget.getBoundingClientRect(),r=t.clientX-n.left,p=t.clientY-n.top,g=jt.value?r>=P.value.left-50&&r<=P.value.right+50&&p>=P.value.top-50&&p<=P.value.bottom+100:r>=P.value.left&&r<=P.value.right&&p>=P.value.top&&p<=P.value.bottom;if(Bt.value=g,jt.value){if(!Ke.value||!g||ae.value.isDragging||ae.value.isZooming){Ye.value.show=!1;return}if(dn.value.find(de=>!de||de.isHidden?!1:Math.sqrt(Math.pow(de.x-r,2)+Math.pow(de.y-p,2))<=de.radius+3))Ye.value.show=!1;else{const de=dn.value.filter(be=>!be||be.isHidden?!1:Math.sqrt(Math.pow(be.x-r,2)+Math.pow(be.y-p,2))<=250);if(de.length>0){let be=de[0],Se=Math.sqrt(Math.pow(be.x-r,2)+Math.pow(be.y-p,2));de.forEach(qe=>{const Le=Math.sqrt(Math.pow(qe.x-r,2)+Math.pow(qe.y-p,2));Le<Se&&(Se=Le,be=qe)});const fe=30,Je=dn.value.filter(qe=>!qe||qe.isHidden?!1:Math.abs(qe.x-be.x)<=fe).sort((qe,Le)=>qe.y-Le.y);Ye.value={show:!0,x:be.x,categoryIndex:Math.round(be.originalX),data:(()=>{const qe=gn.value,Le=Kt.value,$e=[];return Je.forEach(Re=>{qe.forEach(Mt=>{const Pt=Le[Mt]||Mt,tl=To(Mt,Re);tl&&$e.push({seriesName:Re.seriesName,label:Re.label,value:`${Pt}: ${tl}`,color:Re.color,y:Re.y})})}),$e})()}}else Ye.value.show=!1}return}if(ae.value.isDragging&&ae.value.scale>1&&En.value&&tt.value){Ye.value.show=!1;const je=t.clientX-ae.value.lastMouseX,{minX:de,maxX:be}=xt.value,Se=be-de||1,Je=je*.8;ae.value.offsetX+=Je;const qe=Se/ae.value.scale,Le=Se-qe,$e=0,Re=-Le/Se*P.value.width,Mt=$e;ae.value.offsetX=Math.max(Re,Math.min(Mt,ae.value.offsetX)),ae.value.lastMouseX=t.clientX,ae.value.lastMouseY=t.clientY;return}if(!Ke.value||!En.value||ae.value.isDragging||ae.value.isZooming||!g){Ye.value.show=!1;return}const{minX:C,maxX:w}=xt.value,O=w-C||1,N=O/ae.value.scale,H=C-ae.value.offsetX/P.value.width*O,$=(r-P.value.left)/P.value.width,K=H+$*N,Ve=Math.round(K);if(Ve>=0&&Ve<=w){const je=ln(Ve),de=Jn.value.map((be,Se)=>{const fe=F.series.findIndex(qe=>qe===be),Je=be.data[Ve];return{seriesName:be.name,value:Je!==void 0?Je:null,color:f(fe),y:Je!==void 0?Wn(be,Je):null}}).filter(be=>be.value!==null);Ye.value={show:!0,x:je,categoryIndex:Ve,data:de}}},Pn=()=>{Ye.value.show=!1,Bt.value=!1,Fo.value=!1,xo.value||(Ot.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(()=>{ge.value=null,vt.value.show=!1},150)},Zl=t=>{if(t.preventDefault(),t.stopPropagation(),!wt.value)return;const a=t.currentTarget.getBoundingClientRect(),n=t.clientX-a.left,r=t.clientY-a.top;if(Sn.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,P.value.left-20),g=P.value.right,C=P.value.top,w=P.value.bottom+80;n>=p&&n<=g&&r>=C&&r<=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 O=Math.max(P.value.left,Math.min(n,P.value.right))-P.value.left,H=P.value.width/c.value.length,$=Math.floor(O/H);$>=0&&$<c.value.length&&(gt.value.categoryIndex=$)}))},Yn=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}},Bl=t=>{if(typeof t.template=="function"){const a={series:F.series,categories:F.categories,markers:on.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||""},Bn=t=>{const a=["dss-context-menu-item"];return t.cssClass&&a.push(t.cssClass),a},Gl=t=>t.style||{},cl=t=>t.type&&rn.value[t.type]?rn.value[t.type]:t.customIcon?t.customIcon:St.value,Ul=t=>t==null?"":F.categories&&F.categories[t]?F.categories[t]:"",kl=t=>on.value.length?on.value.filter(a=>a.categoryIndex===t):[],Ql=t=>{if(!En.value&&!jt.value)return{x:0,y:0};const a=ln(t),n=G.value+P.value.bottom-Vn.value/2;return{x:a,y:n}},Mn=()=>{on.value.forEach(t=>{if(t.categoryIndex!==void 0&&(En.value||jt.value)){const a=Ql(t.categoryIndex);t.x=a.x,t.y=a.y}})},ul=()=>{if(Fe.value.description&&Fe.value.description.length&&Fe.value.date){if(yl.value){const t=on.value.findIndex(a=>a.id===Fe.value.editingMarkerId);t!==-1?(on.value[t].description=Fe.value.description||"",on.value[t].color=Fe.value.color||"",on.value[t].type=Fe.value.type||"default",ce("update-marker",on.value[t])):ce("update-marker",{id:Fe.value.editingMarkerId,description:Fe.value.description||"",color:Fe.value.color||"",type:Fe.value.type||"default"})}else{const t="dss-marker-"+Date.now()+"-"+Math.random().toString(36).substring(2,9);let a=ll(Fe.value.date,F.categories||[]);if(jt.value){const{maxX:C}=xt.value;a=Math.max(0,Math.min(a,Math.floor(C)))}else En.value&&(a=Math.max(0,Math.min(a,xt.value.maxX)));const n=ln(a),r=G.value+P.value.bottom-Vn.value/2,p=Array.isArray(F.categories)?F.categories[a]:null,g={id:t,title:"",description:Fe.value.description||"",color:Fe.value.color||"",type:Fe.value.type||"default",categoryIndex:a,x:n,y:r,marker_date:p||null};Fe.value.categoryIndex=a,on.value.push(g),ce("add-marker",g)}xn(),h()}},xn=()=>{Fe.value.show=!1,Fe.value.title="",Fe.value.description="",Fe.value.color="#FF6B6B",Fe.value.type="default",Fe.value.editingMarkerId=null,Fe.value.readonly=!1,Fe.value.categoryIndex=null,Fe.value.fromButton=!1,Fe.value.date=null},hn=()=>{yl.value&&(jn(Fe.value.editingMarkerId),xn())},jn=t=>{const a=on.value.findIndex(n=>n.id===t);a!==-1&&(on.value.splice(a,1),h()),ce("delete-marker",t)},y=t=>{if(Fe.value.show=!0,Fe.value.title=t?.title??t?.comment??"",Fe.value.description=t?.description??t?.comment??"",Fe.value.color=t?.color??"",Fe.value.type=t?.type??"default",Fe.value.editingMarkerId=t?.id??t?.marker_id??null,Fe.value.readonly=t?.readonly??!1,Fe.value.categoryIndex=t?.categoryIndex??null,t?.marker_date){const[a,n,r]=String(t.marker_date).split("-"),p=Number(r?.length===2?`20${r}`:r),g=Number(a),C=Number(n)-1;g&&n&&p?Fe.value.date=new Date(p,C,g):Fe.value.date=null}else Fe.value.date=null},h=()=>{try{const t=`dss-chart-markers-${F.chartId}`;localStorage.setItem(t,JSON.stringify(on.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 n=JSON.parse(a);Array.isArray(n)&&(on.value=n.map(r=>({...r,originalYOffset:r.originalYOffset!==void 0?r.originalYOffset:15})))}}catch(t){console.warn("Could not load markers from localStorage:",t),on.value=[]}},q=t=>{const a=dt.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}`},ue=()=>{const t=Ye.value.show,a=vt.value.show;return Ye.value.show=!1,vt.value.show=!1,{originalCrosshair:t,originalTooltip:a}},Qe=t=>{Ye.value.show=t.originalCrosshair,vt.value.show=t.originalTooltip},qt=async(t,a=32,n=32)=>new Promise((r,p)=>{if(t.startsWith("data:")){r(t);return}const g=new Image;g.crossOrigin="anonymous";const C=setTimeout(()=>{console.warn("Image conversion timeout for:",t),r(t)},5e3);g.onload=()=>{clearTimeout(C);try{const w=document.createElement("canvas"),O=w.getContext("2d");w.width=a,w.height=n,O.fillStyle="#fafafa",O.fillRect(0,0,a,n),O.drawImage(g,0,0,a,n);const N=w.toDataURL("image/png");r(N)}catch(w){console.warn("Canvas conversion failed:",w),r(t)}},g.onerror=w=>{clearTimeout(C),console.warn("Failed to load image:",t,w),r(t)},g.src=t}),yn=async()=>{try{const t=ue();setTimeout(async()=>{try{const a=M.value;if(!a){console.error("Chart SVG element not found"),Qe(t);return}const n=nt(),r=xe.value,p=te.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(fe=>fe.remove());const w=g.querySelectorAll("image"),O=Array.from(w).map(async fe=>{const Je=fe.getAttribute("xlink:href")||fe.getAttribute("href");if(Je&&!Je.startsWith("data:"))try{const qe=await qt(Je,32,32);fe.setAttribute("xlink:href",qe),fe.setAttribute("href",qe)}catch(qe){console.warn("Failed to convert logo to base64:",qe)}});await Promise.all(O);const H=new XMLSerializer().serializeToString(g).replace(/<svg[^>]*>/,"").replace("</svg>","");let $="",K=30;if(dt.value&&($+=`
46
46
  <text x="24" y="${K}"
47
47
  font-family="Arial, sans-serif"
48
48
  font-size="18"
49
49
  font-weight="bold"
50
50
  fill="#333">
51
51
  ${dt.value.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}
52
- </text>`,K+=30),ht.value&&($+=`
52
+ </text>`,K+=30),yt.value&&($+=`
53
53
  <text x="24" y="${K}"
54
54
  font-family="Arial, sans-serif"
55
55
  font-size="14"
56
56
  fill="#666">
57
- ${ht.value.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}
58
- </text>`,K+=25),G.value&&F.series.length>0){let ve=r-200,Qe=dt.value||ht.value?35:25;const Pe=Math.floor((r-250)/120);let Ae=0;F.series.forEach(($e,He)=>{if(!Rt.value.has(He)){const $t=f(He),Pt=$e.name.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");$+=`<circle cx="${ve+6}" cy="${Qe-4}" r="6" fill="${$t}"/>`,$+=`<text x="${ve+18}" y="${Qe}" font-family="Arial, sans-serif" font-size="12" fill="#333">${Pt}</text>`,Ae++,Ae%Pe===0?(ve=r-200,Qe+=20):ve+=Math.min(120,Pt.length*8+35)}})}let Ve="";if(cl.value)try{const{width:ve,height:Qe}=ul.value,Pe=_n.value,Ae=z.value.left,$e=z.value.right,He=z.value.top,$t=z.value.bottom,Pt=z.value.width,Jn=z.value.height;let yn,el;switch(Pe){case"center":yn=Ae+(Pt-ve)/2,el=He+(Jn-Qe)/2;break;case"top-left":yn=Ae+15,el=He+5;break;case"top-right":yn=$e-ve-5,el=He+5;break;case"bottom-left":yn=Ae+15,el=$t-Qe-5;break;case"bottom-right":default:yn=$e-ve-5,el=$t-Qe-5;break}Ve=`
59
- <g opacity="${Mn.value}">
60
- <g transform="translate(${yn}, ${el}) scale(${ve/499})">
57
+ ${yt.value.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}
58
+ </text>`,K+=25),Q.value&&F.series.length>0){let fe=r-200,Je=dt.value||yt.value?35:25;const qe=Math.floor((r-250)/120);let Le=0;F.series.forEach(($e,Re)=>{if(!Rt.value.has(Re)){const Mt=f(Re),Pt=$e.name.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");$+=`<circle cx="${fe+6}" cy="${Je-4}" r="6" fill="${Mt}"/>`,$+=`<text x="${fe+18}" y="${Je}" font-family="Arial, sans-serif" font-size="12" fill="#333">${Pt}</text>`,Le++,Le%qe===0?(fe=r-200,Je+=20):fe+=Math.min(120,Pt.length*8+35)}})}let Ve="";if(il.value)try{const{width:fe,height:Je}=Vl.value,qe=$n.value,Le=P.value.left,$e=P.value.right,Re=P.value.top,Mt=P.value.bottom,Pt=P.value.width,tl=P.value.height;let Cn,nl;switch(qe){case"center":Cn=Le+(Pt-fe)/2,nl=Re+(tl-Je)/2;break;case"top-left":Cn=Le+15,nl=Re+5;break;case"top-right":Cn=$e-fe-5,nl=Re+5;break;case"bottom-left":Cn=Le+15,nl=Mt-Je-5;break;case"bottom-right":default:Cn=$e-fe-5,nl=Mt-Je-5;break}Ve=`
59
+ <g opacity="${_n.value}">
60
+ <g transform="translate(${Cn}, ${nl}) scale(${fe/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(ve){console.warn("Watermark processing failed, skipping watermark in SVG:",ve),Ve=""}const Ke=`<?xml version="1.0" encoding="UTF-8"?>
75
+ </g>`}catch(fe){console.warn("Watermark processing failed, skipping watermark in SVG:",fe),Ve=""}const je=`<?xml version="1.0" encoding="UTF-8"?>
76
76
  <svg width="${r}" height="${p}"
77
77
  xmlns="http://www.w3.org/2000/svg"
78
78
  xmlns:xlink="http://www.w3.org/1999/xlink">
@@ -89,30 +89,30 @@
89
89
  ${H}
90
90
  ${Ve}
91
91
  </g>
92
- </svg>`,de=new Blob([Ke],{type:"image/svg+xml;charset=utf-8"}),be=URL.createObjectURL(de),Se=document.createElement("a");Se.href=be,Se.download=q("svg"),document.body.appendChild(Se),Se.click(),document.body.removeChild(Se),URL.revokeObjectURL(be),Ge(t),Un()}catch(a){console.error("Error downloading SVG:",a),Ge(t)}},50)}catch(t){console.error("Error downloading SVG:",t)}},Fn=async()=>{try{const t=ue();I.value&&I.value.offsetHeight,await new Promise(ve=>setTimeout(ve,300));const a=lt(),n=xe.value,r=te.value+a.height,p=document.createElement("canvas"),g=p.getContext("2d"),C=2;p.width=n*C,p.height=r*C,p.style.width=n+"px",p.style.height=r+"px",g.scale(C,C),g.fillStyle="#fafafa",g.fillRect(0,0,n,r);let w=30;if(dt.value&&(g.fillStyle="#333",g.font="bold 18px Arial, sans-serif",g.fillText(dt.value,24,w),w+=30),ht.value&&(g.fillStyle="#666",g.font="14px Arial, sans-serif",g.fillText(ht.value,24,w),w+=25),G.value&&F.series.length>0){let ve=n-200,Qe=dt.value||ht.value?35:25;const Pe=Math.floor((n-250)/120);let Ae=0;g.font="12px Arial, sans-serif",F.series.forEach(($e,He)=>{if(!Rt.value.has(He)){const $t=f(He);g.beginPath(),g.arc(ve+6,Qe-4,6,0,2*Math.PI),g.fillStyle=$t,g.fill(),g.fillStyle="#333",g.fillText($e.name,ve+18,Qe),Ae++,Ae%Pe===0?(ve=n-200,Qe+=20):ve+=Math.min(120,$e.name.length*8+35)}})}const N=B.value.cloneNode(!0),H=N.querySelectorAll(".dss-flag-markers, .dss-flag-line, .dss-flag-extension-line, .dss-flag-count-indicator, .dss-flag-count-text"),$=N.querySelectorAll(".dss-crosshair"),K=N.querySelectorAll('[class*="tooltip"]');H.forEach(ve=>ve.remove()),$.forEach(ve=>ve.remove()),K.forEach(ve=>ve.remove()),N.querySelectorAll("image").forEach((ve,Qe)=>{const Pe=ve.getAttribute("xlink:href")||ve.getAttribute("href");if(Pe&&!Pe.startsWith("data:")){const Ae=Ro.value[Qe],$e=Ae?f(Ae.seriesIndex):"#3B82F6",He=ve.getAttribute("x")||0,$t=ve.getAttribute("y")||0,Pt=ve.getAttribute("width")||32,Jn=ve.getAttribute("height")||32,yn=document.createElementNS("http://www.w3.org/2000/svg","circle");yn.setAttribute("cx",parseFloat(He)+parseFloat(Pt)/2),yn.setAttribute("cy",parseFloat($t)+parseFloat(Jn)/2),yn.setAttribute("r",Math.min(parseFloat(Pt),parseFloat(Jn))/2-1),yn.setAttribute("fill",$e),yn.setAttribute("stroke","#fafafa"),yn.setAttribute("stroke-width","2"),ve.parentNode.replaceChild(yn,ve)}});const Ke=new XMLSerializer().serializeToString(N),de=new Blob([Ke],{type:"image/svg+xml;charset=utf-8"}),be=URL.createObjectURL(de),Se=new Image;return new Promise((ve,Qe)=>{Se.onload=async()=>{try{if(g.drawImage(Se,0,a.height),Ro.value.forEach(Pe=>{const Ae=Pe.x,$e=Pe.y+a.height,He=(Pe.width||32)/2,$t=f(Pe.seriesIndex);g.save(),g.beginPath(),g.arc(Ae,$e,He-1,0,2*Math.PI),g.fillStyle=$t,g.fill(),g.strokeStyle="#fafafa",g.lineWidth=2,g.stroke(),g.restore()}),cl.value){const Pe=new Image,Ae=()=>{const{width:He,height:$t}=ul.value,Pt=_n.value,Jn=z.value.left,yn=z.value.right,el=z.value.top,zo=z.value.bottom,Ma=z.value.width,_a=z.value.height;let ro,io;switch(Pt){case"center":ro=Jn+(Ma-He)/2,io=el+a.height+(_a-$t)/2;break;case"top-left":ro=Jn+15,io=el+a.height+10;break;case"top-right":ro=yn-He-5,io=el+a.height+10;break;case"bottom-left":ro=Jn+15,io=zo+a.height-$t-5;break;case"bottom-right":default:ro=yn-He-5,io=zo+a.height-$t-5;break}g.globalAlpha=Mn.value,g.drawImage(Pe,ro,io,He,$t),g.globalAlpha=1,$e()},$e=()=>{p.toBlob(He=>{const $t=URL.createObjectURL(He),Pt=document.createElement("a");Pt.href=$t,Pt.download=q("png"),document.body.appendChild(Pt),Pt.click(),document.body.removeChild(Pt),URL.revokeObjectURL($t),URL.revokeObjectURL(be),Ge(t),Un(),ve()},"image/png")};Pe.onload=Ae,Pe.onerror=$e,Pe.src=D.value}else p.toBlob(Pe=>{const Ae=URL.createObjectURL(Pe),$e=document.createElement("a");$e.href=Ae,$e.download=q("png"),document.body.appendChild($e),$e.click(),document.body.removeChild($e),URL.revokeObjectURL(Ae),URL.revokeObjectURL(be),Ge(t),Un(),ve()},"image/png")}catch(Pe){URL.revokeObjectURL(be),Ge(t),Qe(Pe)}},Se.onerror=()=>{URL.revokeObjectURL(be),Ge(t),Qe(new Error("Failed to load SVG image"))},Se.src=be})}catch(t){console.error("Error downloading PNG:",t)}},qn=()=>{try{let t="";dt.value&&(t+=`# ${M("chart.csv.chartTitle")}: ${dt.value}
93
- `),ht.value&&(t+=`# ${M("chart.csv.chartSubtitle")}: ${ht.value}
94
- `),t+=`# ${M("chart.csv.generated")}: ${new Date().toLocaleString()}
92
+ </svg>`,de=new Blob([je],{type:"image/svg+xml;charset=utf-8"}),be=URL.createObjectURL(de),Se=document.createElement("a");Se.href=be,Se.download=q("svg"),document.body.appendChild(Se),Se.click(),document.body.removeChild(Se),URL.revokeObjectURL(be),Qe(t),Yn()}catch(a){console.error("Error downloading SVG:",a),Qe(t)}},50)}catch(t){console.error("Error downloading SVG:",t)}},Fn=async()=>{try{const t=ue();z.value&&z.value.offsetHeight,await new Promise(fe=>setTimeout(fe,300));const a=nt(),n=xe.value,r=te.value+a.height,p=document.createElement("canvas"),g=p.getContext("2d"),C=2;p.width=n*C,p.height=r*C,p.style.width=n+"px",p.style.height=r+"px",g.scale(C,C),g.fillStyle="#fafafa",g.fillRect(0,0,n,r);let w=30;if(dt.value&&(g.fillStyle="#333",g.font="bold 18px Arial, sans-serif",g.fillText(dt.value,24,w),w+=30),yt.value&&(g.fillStyle="#666",g.font="14px Arial, sans-serif",g.fillText(yt.value,24,w),w+=25),Q.value&&F.series.length>0){let fe=n-200,Je=dt.value||yt.value?35:25;const qe=Math.floor((n-250)/120);let Le=0;g.font="12px Arial, sans-serif",F.series.forEach(($e,Re)=>{if(!Rt.value.has(Re)){const Mt=f(Re);g.beginPath(),g.arc(fe+6,Je-4,6,0,2*Math.PI),g.fillStyle=Mt,g.fill(),g.fillStyle="#333",g.fillText($e.name,fe+18,Je),Le++,Le%qe===0?(fe=n-200,Je+=20):fe+=Math.min(120,$e.name.length*8+35)}})}const N=M.value.cloneNode(!0),H=N.querySelectorAll(".dss-flag-markers, .dss-flag-line, .dss-flag-extension-line, .dss-flag-count-indicator, .dss-flag-count-text"),$=N.querySelectorAll(".dss-crosshair"),K=N.querySelectorAll('[class*="tooltip"]');H.forEach(fe=>fe.remove()),$.forEach(fe=>fe.remove()),K.forEach(fe=>fe.remove()),N.querySelectorAll("image").forEach((fe,Je)=>{const qe=fe.getAttribute("xlink:href")||fe.getAttribute("href");if(qe&&!qe.startsWith("data:")){const Le=Ro.value[Je],$e=Le?f(Le.seriesIndex):"#3B82F6",Re=fe.getAttribute("x")||0,Mt=fe.getAttribute("y")||0,Pt=fe.getAttribute("width")||32,tl=fe.getAttribute("height")||32,Cn=document.createElementNS("http://www.w3.org/2000/svg","circle");Cn.setAttribute("cx",parseFloat(Re)+parseFloat(Pt)/2),Cn.setAttribute("cy",parseFloat(Mt)+parseFloat(tl)/2),Cn.setAttribute("r",Math.min(parseFloat(Pt),parseFloat(tl))/2-1),Cn.setAttribute("fill",$e),Cn.setAttribute("stroke","#fafafa"),Cn.setAttribute("stroke-width","2"),fe.parentNode.replaceChild(Cn,fe)}});const je=new XMLSerializer().serializeToString(N),de=new Blob([je],{type:"image/svg+xml;charset=utf-8"}),be=URL.createObjectURL(de),Se=new Image;return new Promise((fe,Je)=>{Se.onload=async()=>{try{if(g.drawImage(Se,0,a.height),Ro.value.forEach(qe=>{const Le=qe.x,$e=qe.y+a.height,Re=(qe.width||32)/2,Mt=f(qe.seriesIndex);g.save(),g.beginPath(),g.arc(Le,$e,Re-1,0,2*Math.PI),g.fillStyle=Mt,g.fill(),g.strokeStyle="#fafafa",g.lineWidth=2,g.stroke(),g.restore()}),il.value){const qe=new Image,Le=()=>{const{width:Re,height:Mt}=Vl.value,Pt=$n.value,tl=P.value.left,Cn=P.value.right,nl=P.value.top,zo=P.value.bottom,Ma=P.value.width,_a=P.value.height;let ro,io;switch(Pt){case"center":ro=tl+(Ma-Re)/2,io=nl+a.height+(_a-Mt)/2;break;case"top-left":ro=tl+15,io=nl+a.height+10;break;case"top-right":ro=Cn-Re-5,io=nl+a.height+10;break;case"bottom-left":ro=tl+15,io=zo+a.height-Mt-5;break;case"bottom-right":default:ro=Cn-Re-5,io=zo+a.height-Mt-5;break}g.globalAlpha=_n.value,g.drawImage(qe,ro,io,Re,Mt),g.globalAlpha=1,$e()},$e=()=>{p.toBlob(Re=>{const Mt=URL.createObjectURL(Re),Pt=document.createElement("a");Pt.href=Mt,Pt.download=q("png"),document.body.appendChild(Pt),Pt.click(),document.body.removeChild(Pt),URL.revokeObjectURL(Mt),URL.revokeObjectURL(be),Qe(t),Yn(),fe()},"image/png")};qe.onload=Le,qe.onerror=$e,qe.src=Xn.value}else p.toBlob(qe=>{const Le=URL.createObjectURL(qe),$e=document.createElement("a");$e.href=Le,$e.download=q("png"),document.body.appendChild($e),$e.click(),document.body.removeChild($e),URL.revokeObjectURL(Le),URL.revokeObjectURL(be),Qe(t),Yn(),fe()},"image/png")}catch(qe){URL.revokeObjectURL(be),Qe(t),Je(qe)}},Se.onerror=()=>{URL.revokeObjectURL(be),Qe(t),Je(new Error("Failed to load SVG image"))},Se.src=be})}catch(t){console.error("Error downloading PNG:",t)}},On=()=>{try{let t="";dt.value&&(t+=`# ${_("chart.csv.chartTitle")}: ${dt.value}
93
+ `),yt.value&&(t+=`# ${_("chart.csv.chartSubtitle")}: ${yt.value}
94
+ `),t+=`# ${_("chart.csv.generated")}: ${new Date().toLocaleString()}
95
95
 
96
96
  `,t+="Category",F.series.forEach(g=>{const C=g.name.replace(/"/g,'""');t+=',"'+C+'"'}),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 H=N.data&&N.data[g]!==void 0?N.data[g]:"";P+=","+H}),t+=P+`
98
- `}const n=new Blob([t],{type:"text/csv;charset=utf-8;"}),r=URL.createObjectURL(n),p=document.createElement("a");p.href=r,p.download=q("csv"),document.body.appendChild(p),p.click(),document.body.removeChild(p),URL.revokeObjectURL(r),Un()}catch(t){console.error("Error downloading CSV:",t)}},wl=t=>{if(typeof t.action=="function"){const a={series:F.series,categories:F.categories,markers:nn.value},n={chartX:vt.value.chartX,chartY:vt.value.chartY,dataX:vt.value.mouseDataX,dataY:vt.value.mouseDataY,categoryIndex:clampedCategoryIndex||vt.value.categoryIndex};t.action(a,n)}Un()},fo=()=>{wn(),Fe.value.show=!0,Fe.value.categoryIndex=vt.value.categoryIndex,Fe.value.fromButton=!1,Un()},Uo=()=>{wn(),Fe.value.show=!0,Fe.value.categoryIndex=0,Fe.value.fromButton=!0},vo=t=>{if(vt.value.show){const a=document.querySelector(".dss-context-menu");a&&!a.contains(t.target)&&(vt.value.show=!1)}},go=t=>{vt.value.show&&!t.target.closest(".context-menu")&&(vt.value.show=!1)},Vo=t=>{if(!xn.value||!nt.value)return;t.preventDefault(),t.stopPropagation(),oe.value.isZooming=!0,je.value.show=!1,oe.value.zoomTimeout&&clearTimeout(oe.value.zoomTimeout);const n=t.currentTarget.getBoundingClientRect(),r=t.clientX-n.left,p=t.clientY-n.top;if(r<z.value.left-50||r>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,C=Math.max(oe.value.minScale,Math.min(oe.value.maxScale,oe.value.scale*g));if(C!==oe.value.scale){const{minX:w,maxX:P}=wt.value,N=P-w||1,H=N/oe.value.scale,$=w-oe.value.offsetX/z.value.width*N,K=(r-z.value.left)/z.value.width,Ve=$+K*H;oe.value.scale=C;const Ke=N/oe.value.scale,de=Ve-K*Ke;oe.value.offsetX=-(de-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)},Xo=t=>{if(!xn.value||!nt.value||oe.value.scale<=1)return;je.value.show=!1;const n=t.currentTarget.getBoundingClientRect();t.clientX-n.left,t.clientY-n.top,oe.value.isDragging=!0,oe.value.lastMouseX=t.clientX,oe.value.lastMouseY=t.clientY,t.preventDefault()},ho=()=>{oe.value.isDragging=!1},Jl=()=>{!xn.value||!nt.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)},Yo=()=>!xn.value||!_t.value||!nt.value?"default":oe.value.isDragging?"grabbing":oe.value.scale>1?"grab":"dss-crosshair",yo=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 r=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-r.x)/6*et.value,P=p.y+(g.y-r.y)/6*et.value,N=g.x-(C.x-p.x)/6*et.value,H=g.y-(C.y-p.y)/6*et.value;a+=` C ${w} ${P} ${N} ${H} ${g.x} ${g.y}`}return a},An=e.computed(()=>{const a=W.value?.chart?.padding,n=typeof a=="number"?a:null,r=a&&typeof a=="object"?a:null,p=50;let g=p+(Ht.value?30:0)+60;if(bn.value){const $={left:p+40,top:p+40,right:p+40,bottom:p+40};return n!=null?{left:n,top:n,right:n,bottom:n}:r?{left:r.left??$.left,top:r.top??$.top,right:r.right??$.right,bottom:r.bottom??$.bottom}:$}if(En.value){const $=!G.value,K=O.value,Ve=K?ie.value+Le.value+Math.max(24,_.value+16):0,Ke=$?12:p;let de=0;dt.value&&(de+=$?8:15),ht.value&&(de+=$?6:10);const be=lt();let Se=Ke+($?4:16)+(K?Ve:0),ve=Ke+(K?Ve:0);G.value&&ye.value==="left"?Se+=be.legendWidth||150:G.value&&ye.value==="right"&&(ve+=be.legendWidth||150);const Pe=Ce.value==="semi-radial"?K?Ve:8:K?Ve:$?8:p+80,Ae=K?14:0,$e=Ke+de+Ae,He={left:Se,top:$e,right:ve,bottom:Pe};return n!=null?{left:n,top:n,right:n,bottom:n}:r?{left:r.left??He.left,top:r.top??He.top,right:r.right??He.right,bottom:r.bottom??He.bottom}:He}let C=0;dt.value&&(C+=15),ht.value&&(C+=10);const w=lt();let P=p+16+(It.value?30:0),N=p+(pe.value?30:0);G.value&&ye.value==="left"?P+=w.legendWidth||150:G.value&&ye.value==="right"&&(N+=w.legendWidth||150),Ll.value&&(N+=44);const H={left:P,top:p+C,right:N,bottom:g};return n!=null?{left:n,top:n,right:n,bottom:n}:r?{left:r.left??H.left,top:r.top??H.top,right:r.right??H.right,bottom:r.bottom??H.bottom}:H}),z=e.computed(()=>({left:An.value.left,top:An.value.top,right:xe.value-An.value.right,bottom:te.value-An.value.bottom,width:xe.value-(An.value.left+An.value.right),height:te.value-(An.value.top+An.value.bottom)})),xn=e.computed(()=>["line","area","bar"].includes(Ce.value)||tt.value),Yn=e.computed(()=>tt.value),Xl=e.computed(()=>Ce.value==="mini-radial"),En=e.computed(()=>["radial","semi-radial","mini-radial"].includes(Ce.value)),bn=e.computed(()=>Ce.value==="spider"),Xt=e.computed(()=>Ce.value==="bubble"),Jt=e.computed(()=>W.value?.chart?.orientation==="horizontal"&&(Ce.value==="bar"||Yn.value)),jn=t=>{const{minY:a,maxY:n}=wt.value,r=n-a||1;return z.value.left+(t-a)/r*z.value.width},Ml=t=>{const{maxX:a}=wt.value,n=a+1,p=z.value.height/n;return z.value.top+(t+.5)*p},zt=e.computed(()=>En.value?An.value.left+(xe.value-An.value.left-An.value.right)/2:xe.value/2),Dt=e.computed(()=>bn.value?te.value/2-40:En.value?An.value.top+(te.value-An.value.top-An.value.bottom)/2:te.value/2),it=e.computed(()=>{if(bn.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}),Wt=e.computed(()=>{const t=W.value,a=t?.plotOptions?.radialBar?.innerRadiusRatio??t?.radialBar?.innerRadiusRatio,n=typeof a=="number"&&a>=0&&a<=1?a:.45;return it.value*n}),_l=e.computed(()=>{const t=W.value,a=typeof F.innerSize=="number"?F.innerSize:t?.innerSize;return typeof a!="number"||a<=-100||!(En.value||bn.value)?1:1+a/100}),Il=e.computed(()=>{const t=_l.value;if(t===1||t<=0)return;const a=zt.value,n=Dt.value;return`translate(${a}, ${n}) scale(${t}) translate(${-a}, ${-n})`}),jt=e.ref(0),eo=e.computed(()=>`semi-radial-fill-clip-${F.chartId}`),xl=e.computed(()=>Ce.value==="semi-radial"),pl=e.computed(()=>xl.value&&Et.value&&!Hl.value),al=e.computed(()=>xl.value&&Et.value&&!Hl.value&&on.value==="fill"),zl=e.computed(()=>{const t=pl.value?jt.value:1,a=zt.value,n=Dt.value,r=Wt.value,p=it.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),P=n+p*Math.sin(g),N=a+p*Math.cos(C),H=n+p*Math.sin(C),$=a+r*Math.cos(C),K=n+r*Math.sin(C),Ve=a+r*Math.cos(g),Ke=n+r*Math.sin(g),de=t>.5?1:0;return`M ${a} ${n} L ${w} ${P} A ${p} ${p} 0 ${de} 1 ${N} ${H} L ${$} ${K} A ${r} ${r} 0 ${de} 1 ${Ve} ${Ke} Z`}),El=e.computed(()=>{if(!(!xl.value||!pl.value)&&!al.value)return`url(#${eo.value})`}),Pl=t=>{if(!(!al.value||t!==0))return`url(#${eo.value})`},$l=e.ref(0),No=e.computed(()=>`radial-reveal-clip-${F.chartId}`),In=e.computed(()=>Ce.value==="radial"),Bo=e.computed(()=>{const t=In.value?$l.value:1,a=zt.value,n=Dt.value,r=Math.max(it.value*1.5,xe.value,te.value);if(t<=0)return`M ${a} ${n} L ${a} ${n} Z`;if(t>=1){const $=a-r,K=a+r;return`M ${$} ${n} A ${r} ${r} 0 0 1 ${K} ${n} A ${r} ${r} 0 0 1 ${$} ${n} Z`}const p=-Math.PI/2,g=p+t*Math.PI*2,C=a+r*Math.cos(p),w=n+r*Math.sin(p),P=a+r*Math.cos(g),N=n+r*Math.sin(g),H=t>=.5?1:0;return`M ${a} ${n} L ${C} ${w} A ${r} ${r} 0 ${H} 1 ${P} ${N} Z`}),Yl=e.computed(()=>{if(El.value)return El.value;if(In.value)return`url(#${No.value})`});let Ol=null;const jo=()=>{if(!pl.value)return;jt.value=0;const t=S.value,a=performance.now(),n=r=>{const p=r-a,g=Math.min(1,p/t);jt.value=ea(V.value,g),g<1&&(Ol=requestAnimationFrame(n))};Ol=requestAnimationFrame(n)},Mo=e.computed(()=>W.value?.bubbles?.minSize||8),to=e.computed(()=>W.value?.bubbles?.maxSize||50),no=e.computed(()=>W.value?.bubbles?.opacity||.7),lo=(t,a)=>{const n=[15,20,25,18,22],r=n[t%n.length]||20,p=1+Math.sin(a*.5)*.2;return Math.max(5,r*p)},Ko=t=>{const a=document.querySelector(`.dss-bubble-image-${t}`);a&&(a.style.opacity="1")},_o=t=>{const a=document.querySelector(`.dss-bubble-image-${t}`);a&&(a.style.display="none")},Kn=e.computed(()=>F.series),Gn=e.computed(()=>F.series.filter((t,a)=>!Rt.value.has(a))),ko=t=>{if(!t)return"primary";const a=t.yAxis??t.axis??t.yAxisId;return a==="secondary"||a==="right"||a===1?"secondary":"primary"},oo=t=>t?typeof t.strokeDasharray=="string"?t.strokeDasharray:Array.isArray(t.strokeDasharray)?t.strokeDasharray.join(","):t.dotted===!0?"4,4":null:null,Wn=t=>t?t.old===!0||t.comparison===!0||t.dotted===!0:!1,ao=e.computed(()=>{const a=W.value?.spider?.comparison||{};return{fillOpacity:typeof a.fillOpacity=="number"?a.fillOpacity:0,strokeDasharray:a.strokeDasharray||"6,4",usePrimaryColor:a.usePrimaryColor!==!1,bubbleSize:typeof a.bubbleSize=="number"?a.bubbleSize:0}}),jl=(t,a)=>typeof t?.bubbles?.size=="number"?t.bubbles.size:typeof t?.bubbleSize=="number"?t.bubbleSize:a?ao.value.bubbleSize:yt.value,fl=(t,a)=>Wn(t)&&ao.value.usePrimaryColor?f(0):f(a),Sl=(t,a)=>bn.value&&Wn(t)?fl(t,a):f(a),Co=e.computed(()=>Gn.value.filter(t=>ko(t)==="primary")),$o=e.computed(()=>Gn.value.filter(t=>ko(t)==="secondary")),Ll=e.computed(()=>!Jt.value&&!!se.value&&$o.value.length>0),Tn="auto",Kl=(t,a,n,r=0,p=100)=>{let g=1/0,C=-1/0;if(t.forEach(N=>{N?.data?.length&&N.data.forEach(H=>{typeof H=="number"&&Number.isFinite(H)&&(g=Math.min(g,H),C=Math.max(C,H))})}),g===1/0)return{minY:r,maxY:p};let w;if(a===Tn){const N=C-g,H=N>0?N*.1:1;w=Math.max(0,g-H)}else if(typeof a=="number")w=a;else{const N=C-g,H=N>0?N*.1:1;w=Math.max(0,g-H)}let P;if(n===Tn){const N=C-g,H=N>0?N*.1:2;P=C+H}else if(typeof n=="number")P=n;else{const N=C-g,H=N>0?N*.1:2;P=C+H}return{minY:w,maxY:P}},wt=e.computed(()=>{if(Xt.value)return Al();if(!Gn.value.length)return{minX:0,maxX:1,minY:0,maxY:1};let t=0;Gn.value.forEach(n=>{n.data&&n.data.length&&(t=Math.max(t,n.data.length-1))}),F.categories.length>0&&(t=Math.max(t,F.categories.length-1));const a=Kl(Co.value.length?Co.value:Gn.value,De.value,_e.value);return{minX:0,maxX:t,minY:a.minY,maxY:a.maxY}}),Lo=e.computed(()=>Ll.value?Kl($o.value,Kt.value,kt.value,wt.value.minY,wt.value.maxY):{minY:wt.value.minY,maxY:wt.value.maxY}),Al=()=>{if(!Gn.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,r=-1/0,p=1/0,g=-1/0,C=!1;if(Gn.value.forEach((Ve,Ke)=>{Ve?.data?.length&&Ve.data.forEach((de,be)=>{let Se,ve,Qe;if(typeof de=="object"&&de!==null&&!Array.isArray(de))Se=typeof de.x=="number"?de.x:be,ve=typeof de.y=="number"?de.y:0,Qe=typeof de.size=="number"?de.size:20;else if(Array.isArray(de)&&de.length>=3)Se=typeof de[0]=="number"?de[0]:be,ve=typeof de[1]=="number"?de[1]:0,Qe=typeof de[2]=="number"?de[2]:20;else if(typeof de=="number")Se=be,ve=de,Qe=lo(Ke,be);else return;isFinite(Se)&&isFinite(ve)&&isFinite(Qe)&&(t=Math.min(t,Se),a=Math.max(a,Se),n=Math.min(n,ve),r=Math.max(r,ve),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,F.categories?.length-1||8)),n===r&&(n=Math.max(0,n-10),r=n+20);const w=a-t,P=r-n;let N,H,$,K;return Qt.value!==null?N=Qt.value:N=t-w*.1,Lt.value!==null?H=Lt.value:H=a+w*.1,De.value!==null&&typeof De.value=="number"?$=De.value:$=Math.max(0,n-P*.1),_e.value!==null&&typeof _e.value=="number"?K=_e.value:K=r+P*.1,{minX:N,maxX:H,minY:$,maxY:K,minSize:p,maxSize:g}},en=t=>{if(Xt.value){const{minX:w,maxX:P}=wt.value,N=P-w||1;return z.value.left+(t-w)/N*z.value.width}const{minX:a,maxX:n}=wt.value,r=n-a;if(n===0||r===0)return z.value.left+z.value.width/2;const p=r/oe.value.scale,g=a-oe.value.offsetX/z.value.width*r,C=(t-g)/p;return z.value.left+C*z.value.width},Tl=t=>{const{minY:a,maxY:n}=wt.value,r=n-a||1;return z.value.bottom-(t-a)/r*z.value.height},bo=t=>{const{minY:a,maxY:n}=Lo.value,r=n-a||1;return z.value.bottom-(t-a)/r*z.value.height},Zn=(t,a)=>Ll.value&&ko(t)==="secondary"?bo(a):Tl(a),o=t=>{if(!Xt.value)return yt.value||4;const{maxSize:a}=wt.value,n=Math.max(1,a),r=Math.min(1,Math.max(0,t/n));return Mo.value+r*(to.value-Mo.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 r=l.canvas.getContext("2d");return r?(r.font=`${a}px ${n}`,r.measureText(t).width):t.length*(a*.62)},s=(t,a,n=12)=>{if(typeof t!="string"||typeof a!="number"||a<=0||l(t,n)<=a)return t;const r="..";if(l(r,n)>=a)return r;let g=t.length;for(;g>0;){const C=`${t.slice(0,g)}${r}`;if(l(C,n)<=a)return C;g-=1}return r},i=e.computed(()=>u.value.map(t=>({y:t.y}))),c=e.computed(()=>{if(Xt.value)return d();if(Ce.value==="bar"){if(Jt.value){const $e=[],{minY:He,maxY:$t}=wt.value,Pt=5,Jn=$t-He||1;for(let yn=0;yn<=Pt;yn++){const el=He+Jn*(yn/Pt),zo=jn(el);$e.push({x:zo,y:z.value.bottom+20,text:Gt(Math.round(el))})}return $e}const be=[],{maxX:Se}=wt.value,ve=Se+1,Qe=5,Ae=(z.value.width-Qe*2)/ve;for(let $e=0;$e<=Se;$e++){const He=z.value.left+Qe+($e+.5)*Ae;be.push({x:He,y:z.value.bottom+20,text:s(F.categories[$e]||M("chart.fallback.item",{number:$e+1}),Math.max(Ae-8,24))})}return be}const t=[],{minX:a,maxX:n}=wt.value,r=Qt.value!==null?Qt.value:a,p=Lt.value!==null?Lt.value:n,g=p-r||1,C=g/oe.value.scale,w=r-oe.value.offsetX/z.value.width*g,P=w+C,N=Math.max(0,Math.floor(w-2)),H=Math.min(p,Math.ceil(P+2)),$=H-N,K=z.value.width,Ke=Math.floor(K/60);let de=1;$>Ke&&(de=Math.ceil($/Ke));for(let be=N;be<=H;be+=de)if(be>=0&&be<=p){const Se=en(be);Se>=z.value.left-100&&Se<=z.value.right+100&&t.push({x:Se,y:z.value.bottom+20,text:F.categories[be]||`Item ${be+1}`})}return t}),d=()=>{const t=[],{minX:a,maxX:n}=wt.value,r=n-a||1,p=Math.min(8,Math.max(4,Math.floor(z.value.width/80)));for(let g=0;g<=p;g++){const C=a+r*g/p,w=en(C);if(w>=z.value.left-10&&w<=z.value.right+10){const P=Math.round(C),N=F.categories?.[P];t.push({x:w,y:z.value.bottom+20,text:N||(Number.isInteger(C)?C.toString():C.toFixed(1))})}}return t},u=e.computed(()=>{if(Jt.value){const p=[],{maxX:g}=wt.value;for(let C=0;C<=g;C++)p.push({x:z.value.left-10,y:Ml(C),text:s(F.categories[C]||`Item ${C+1}`,Math.max(z.value.left-28,40))});return p}const t=[],{minY:a,maxY:n}=wt.value,r=5;for(let p=0;p<=r;p++){const g=a+(n-a)*(p/r),C=Math.round(g);t.push({x:z.value.left-10,y:Tl(g),text:Gt(C)})}return t}),m=e.computed(()=>{if(!Ll.value||Jt.value)return[];const t=[],{minY:a,maxY:n}=Lo.value,r=5;for(let p=0;p<=r;p++){const g=a+(n-a)*(p/r),C=Math.round(g);t.push({x:z.value.right+10,y:bo(g),text:Gt(C)})}return t}),f=t=>{const a=un.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]},k=t=>{if(!t||typeof t!="string")return"#3a3a3a";const a=t.trim();let n=0,r=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,r=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,r=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]),n=parseInt(N.slice(0,2),16)/255,r=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 H=getComputedStyle(N).color;document.body.removeChild(N);const $=H.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if($)n=Number($[1])/255,r=Number($[2])/255,p=Number($[3])/255;else return"#3a3a3a"}else return"#3a3a3a"}}return .2126*n+.7152*r+.0722*p>.5?"#3a3a3a":"#fafafa"},L=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 r=a.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/i);if(r){const g=Math.max(0,Math.floor(Number(r[1])*.65)),C=Math.max(0,Math.floor(Number(r[2])*.65)),w=Math.max(0,Math.floor(Number(r[3])*.65));return`rgba(${g}, ${C}, ${w}, ${r[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))),P=Math.max(0,Math.min(255,Math.floor(parseInt(g.slice(4,6),16)*.65)));return`#${[C,w,P].map(N=>N.toString(16).padStart(2,"0")).join("")}`}return a},R=(t,a)=>{const r=W.value?.stroke?.color;return r==null?L(a):typeof r=="string"?r:Array.isArray(r)&&r.length?r[t%r.length]??L(a):L(a)},E=t=>{let a=0;for(let n=1;n<t.length;n++){const r=t[n].x-t[n-1].x,p=t[n].y-t[n-1].y;a+=Math.sqrt(r*r+p*p)}return a},ae=e.computed(()=>Ce.value==="line"||Yn.value?(Yn.value?F.series.filter(a=>(a.type||Ce.value)==="line"):Kn.value).map((a,n)=>{const r=F.series.findIndex($=>$===a),p=[];let g=[];a.data.forEach(($,K)=>{$==null?g.length>0&&(p.push([...g]),g=[]):g.push({x:Jt.value?jn($):en(K),y:Jt.value?Ml(K):Zn(a,$),index:K})}),g.length>0&&p.push(g);let C="";p.forEach($=>{if($.length>0){let K="";fe.value?K=yo($):K=`M ${$[0].x} ${$[0].y}`+$.slice(1).map(Ve=>` L ${Ve.x} ${Ve.y}`).join(""),C+=(C?" ":"")+K}});const w=p.reduce(($,K)=>$+E(K),0),P=Rt.value.has(r),N=he.value===r,H=he.value!==null&&he.value!==r;return{path:C,color:f(r),strokeDasharray:oo(a),pathLength:w,seriesIndex:r,animationDelay:n*Y.value,isHighlighted:N,isDimmed:H,isHidden:P}}):[]),j=e.computed(()=>{if(!(Ce.value==="line"||Yn.value))return[];const t=Yn.value?F.series.filter(n=>(n.type||Ce.value)==="line"):Kn.value,a=[];return t.forEach((n,r)=>{const p=F.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,P=0;for(let N=g+1;N<n.data.length;N++){const H=n.data[N];if(H==null)P++;else{w=N;break}}if(P>0&&w!==-1){const N=n.data[w],H=Jt.value?jn(C):en(g),$=Jt.value?Ml(g):Zn(n,C),K=Jt.value?jn(N):en(w),Ve=Jt.value?Ml(w):Zn(n,N),Ke=Rt.value.has(p),de=he.value===p,be=he.value!==null&&he.value!==p;a.push({path:`M ${H} ${$} L ${K} ${Ve}`,color:f(p),seriesIndex:p,animationDelay:r*Y.value,isHighlighted:de,isDimmed:be,isHidden:Ke,gapSize:P}),g=w-1}}}}),a}),ze=e.computed(()=>Ce.value==="line"||Yn.value?!Et.value||Hl.value||Ft.value.hasAnimated?[]:(Yn.value?F.series.filter(a=>(a.type||Ce.value)==="line"):Kn.value).map((a,n)=>{const r=F.series.findIndex(P=>P===a);let p="",g=null;a.data.forEach((P,N)=>{if(P!=null){const H={x:Jt.value?jn(P):en(N),y:Jt.value?Ml(N):Zn(a,P)};g===null?p+=`M ${H.x} ${H.y}`:p+=` L ${H.x} ${H.y}`,g=H}else if(g!==null){const H=a.data.findIndex(($,K)=>K>N&&$!==null&&$!==void 0);if(H!==-1){const $={x:Jt.value?jn(a.data[H]):en(H),y:Jt.value?Ml(H):Zn(a,a.data[H])};p+=` L ${$.x} ${$.y}`,g=$}}});const C=a.data.map((P,N)=>P==null?null:{x:Jt.value?jn(P):en(N),y:Jt.value?Ml(N):Zn(a,P)}).filter(P=>P!==null),w=E(C);return{path:p,pathLength:w,color:f(r),strokeDasharray:oo(a),animationDelay:n*Y.value,seriesIndex:r}}):[]),Ne=e.computed(()=>{if(Ce.value!=="line")return[];const t=[];return Kn.value.forEach((a,n)=>{const r=he.value===n,p=he.value!==null&&he.value!==n,g=Rt.value.has(n);a.data.forEach((C,w)=>{C!=null&&t.push({x:en(w),y:Zn(a,C),color:f(n),value:C,label:F.categories[w]||w.toString(),seriesName:a.name,categoryIndex:w,dataIndex:w,animationDelay:(n*a.data.length+w)*(Y.value/8),isHighlighted:r,isDimmed:p,isHidden:g})})}),t}),gt=e.computed(()=>{if(!Yn.value)return[];const t=[];return F.series.filter(n=>(n.type||Ce.value)==="line").forEach((n,r)=>{const p=F.series.findIndex(P=>P===n),g=he.value===p,C=he.value!==null&&he.value!==p,w=Rt.value.has(p);n.data.forEach((P,N)=>{P!=null&&t.push({x:en(N),y:Zn(n,P),color:f(p),value:P,label:F.categories[N]||N.toString(),seriesName:n.name,categoryIndex:N,dataIndex:N,animationDelay:(r*n.data.length+N)*(Y.value/8),isHighlighted:g,isDimmed:C,isHidden:w})})}),t}),rn=e.computed(()=>{if(!Xt.value)return[];const t=[];return Kn.value.forEach((a,n)=>{if(!a?.data?.length)return;const r=he.value,p=r!==null&&r===n,g=r!==null&&r!==n,C=Rt.value.has(n);a.data.forEach((w,P)=>{let N,H,$,K,Ve;if(typeof w=="object"&&w!==null&&!Array.isArray(w))N=typeof w.x=="number"?w.x:P,H=typeof w.y=="number"?w.y:0,$=typeof w.size=="number"?w.size:20,K=w.label||F.categories?.[P]||`Point ${P+1}`,Ve=w.image||w.imageUrl;else if(Array.isArray(w)&&w.length>=3)N=typeof w[0]=="number"?w[0]:P,H=typeof w[1]=="number"?w[1]:0,$=typeof w[2]=="number"?w[2]:20,K=w[3]||F.categories?.[P]||`Point ${P+1}`,Ve=w[4];else if(typeof w=="number")N=P,H=w,$=lo(n,P),K=F.categories?.[P]||`Point ${P+1}`;else return;!isFinite(N)||!isFinite(H)||!isFinite($)||t.push({x:en(N),y:Tl(H),radius:o($),originalX:N,originalY:H,originalSize:$,color:f(n),seriesName:a.name||`Series ${n+1}`,label:K,imageUrl:Ve,seriesIndex:n,dataIndex:P,categoryIndex:Math.round(N),isHighlighted:p,isDimmed:g,isHidden:C,opacity:no.value})})}),t}),cn=e.computed(()=>Ce.value!=="area"?[]:Kn.value.map((t,a)=>{const n=[];let r=[];if(t.data.forEach(($,K)=>{$==null?r.length>0&&(n.push([...r]),r=[]):r.push({x:en(K),y:Zn(t,$),index:K})}),r.length>0&&n.push(r),n.length===0)return{linePath:"",areaPath:"",color:f(a),isHidden:Rt.value.has(a)};const p=z.value.bottom+1;let g="",C="";n.forEach(($,K)=>{if($.length===0)return;let Ve=`M ${$[0].x} ${$[0].y}`;fe.value&&$.length>1?Ve=yo($):$.slice(1).forEach(de=>{Ve+=` L ${de.x} ${de.y}`}),g+=(g?" ":"")+Ve;let Ke=`M ${$[0].x} ${p}`;if(Ke+=` L ${$[0].x} ${$[0].y}`,fe.value&&$.length>1){const de=yo($),be=de.substring(de.indexOf("C")||de.indexOf("Q")||de.indexOf("L"));be?Ke+=" "+be:$.slice(1).forEach(Se=>{Ke+=` L ${Se.x} ${Se.y}`})}else $.slice(1).forEach(de=>{Ke+=` L ${de.x} ${de.y}`});Ke+=` L ${$[$.length-1].x} ${p} Z`,C+=(C?" ":"")+Ke});const w=he.value===a,P=he.value!==null&&he.value!==a,N=Rt.value.has(a),H=n.reduce(($,K)=>$+E(K),0);return{linePath:g,areaPath:C,color:f(a),pathLength:H,isHighlighted:w,isDimmed:P,isHidden:N}})),ln=e.computed(()=>{if(!(["bar"].includes(Ce.value)||Yn.value))return[];const t=[],{maxX:a}=wt.value,n=Yn.value?F.series.filter(p=>(p.type||Ce.value)==="bar"):Kn.value,r=n.length;if(Jt.value){const p=a+1,C=z.value.height/p,w=C*(2/3),P=Math.min(4,w/r*.15),N=w-(r-1)*P,H=Math.max(4,N/r);n.forEach(($,K)=>{const Ve=F.series.findIndex(Se=>Se===$),Ke=he.value===Ve,de=he.value!==null&&he.value!==Ve,be=Rt.value.has(Ve);$.data.forEach((Se,ve)=>{if(Se==null||typeof Se!="number"||!isFinite(Se))return;const Ae=z.value.top+(ve+.5)*C-w/2+K*(H+P),$e=z.value.left,He=Math.abs(jn(Se)-z.value.left);let $t="";if(fe.value&&He>0){const Pt=Math.min(Vt.value,H/2,He/2);$t=[`M ${$e} ${Ae}`,`L ${$e+He-Pt} ${Ae}`,`Q ${$e+He} ${Ae} ${$e+He} ${Ae+Pt}`,`L ${$e+He} ${Ae+H-Pt}`,`Q ${$e+He} ${Ae+H} ${$e+He-Pt} ${Ae+H}`,`L ${$e} ${Ae+H}`,"Z"].join(" ")}t.push({x:$e,y:Ae,width:He,height:H,color:f(r===1?ve:Ve),value:Se,label:F.categories[ve]||ve.toString(),seriesName:$.name,animationDelay:(K*n.length+ve)*(Y.value/4),isHighlighted:Ke,isDimmed:de,isHidden:be,barPath:$t,isSmooth:fe.value&&He>0})})})}else{const p=a+1,C=z.value.width/p,w=C*.8,P=w/r,N=P*.05,H=P-N;n.forEach(($,K)=>{const Ve=F.series.findIndex(Se=>Se===$),Ke=he.value===Ve,de=he.value!==null&&he.value!==Ve,be=Rt.value.has(Ve);$.data.forEach((Se,ve)=>{if(Se==null||typeof Se!="number"||!isFinite(Se))return;const Ae=z.value.left+(ve+.5)*C-w/2+K*P+N/2,$e=Tl(Math.max(0,Se)),He=Math.abs(Tl(0)-Tl(Se));let $t="";if(fe.value&&He>0){const Pt=Math.min(Vt.value,H/2,He/2);$t=[`M ${Ae} ${$e+He}`,`L ${Ae} ${$e+Pt}`,`Q ${Ae} ${$e} ${Ae+Pt} ${$e}`,`L ${Ae+H-Pt} ${$e}`,`Q ${Ae+H} ${$e} ${Ae+H} ${$e+Pt}`,`L ${Ae+H} ${$e+He}`,"Z"].join(" ")}t.push({x:Ae,y:$e,width:H,height:He,color:f(r===1?ve:Ve),value:Se,label:F.categories[ve]||ve.toString(),seriesName:$.name,animationDelay:(K*n.length+ve)*(Y.value/4),isHighlighted:Ke,isDimmed:de,isHidden:be,barPath:$t,isSmooth:fe.value&&He>0})})})}return t}),Zt=e.computed(()=>{if(!En.value)return[];const t=Kn.value.map((C,w)=>({series:C,originalIndex:w})).filter(({originalIndex:C})=>!Rt.value.has(C));if(t.length===0)return[];let a=Ce.value==="semi-radial"?Math.PI:-Math.PI/2;const n=Ce.value==="semi-radial"?Math.PI:Math.PI*2,r=[],p=(C,w,P,N,H,$)=>{const K=C+(w-C)/2,Ve=w-C,Ke=zt.value+Math.cos(C)*Wt.value,de=Dt.value+Math.sin(C)*Wt.value,be=zt.value+Math.cos(w)*Wt.value,Se=Dt.value+Math.sin(w)*Wt.value,ve=zt.value+Math.cos(w)*it.value,Qe=Dt.value+Math.sin(w)*it.value,Pe=zt.value+Math.cos(C)*it.value,Ae=Dt.value+Math.sin(C)*it.value,$e=Ve>Math.PI?1:0,He=[`M ${Ke} ${de}`,`A ${Wt.value} ${Wt.value} 0 ${$e} 1 ${be} ${Se}`,`L ${ve} ${Qe}`,`A ${it.value} ${it.value} 0 ${$e} 0 ${Pe} ${Ae}`,"Z"].join(" "),$t=$||f(P);return{path:He,color:$t,strokeWidth:Ct.value,strokeColor:R(r.length,$t),value:H,seriesName:N,opacity:.8,isHighlighted:he.value===P,isDimmed:he.value!==null&&he.value!==P,isHidden:!1,startAngle:C,endAngle:w,midAngle:K}};if(Xl.value){const{series:C,originalIndex:w}=t[0],P=Number(C?.data?.[0]??0),N=Number.isFinite(P)?Math.min(Math.max(P,0),100):0,H=W.value,$=Math.min(Math.max(Number(H?.miniRadial?.minVisiblePercent??1),0),100),Ve=(N<=0?$:N)/100*n,Ke=Number(H?.miniRadial?.thresholds?.low??33),de=Number(H?.miniRadial?.thresholds?.medium??66),be=H?.miniRadial?.colors?.low||"#E53E3E",Se=H?.miniRadial?.colors?.medium||"#ED8936",ve=H?.miniRadial?.colors?.high||"#38A169",Qe=N<=Ke?be:N<=de?Se:ve,Pe=H?.miniRadial?.trackColor||"#E5E7EB",Ae=C?.name||"Score";return r.push(p(a,a+n-.001,w+1,"Track",100,Pe)),r.push(p(a,a+Ve,w,Ae,N,Qe)),r}if(t.length===1){const{series:C,originalIndex:w}=t[0],P=C.data[0]||0,N=a,H=a+n-.001,$=N+n/2,K=zt.value+Math.cos(N)*Wt.value,Ve=Dt.value+Math.sin(N)*Wt.value,Ke=zt.value+Math.cos(H)*Wt.value,de=Dt.value+Math.sin(H)*Wt.value,be=zt.value+Math.cos(H)*it.value,Se=Dt.value+Math.sin(H)*it.value,ve=zt.value+Math.cos(N)*it.value,Qe=Dt.value+Math.sin(N)*it.value,Pe=1,Ae=[`M ${K} ${Ve}`,`A ${Wt.value} ${Wt.value} 0 ${Pe} 1 ${Ke} ${de}`,`L ${be} ${Se}`,`A ${it.value} ${it.value} 0 ${Pe} 0 ${ve} ${Qe}`,"Z"].join(" "),$e=f(w);return r.push({path:Ae,color:$e,strokeWidth:Ct.value,strokeColor:R(0,$e),value:P,seriesName:C.name,opacity:.8,isHighlighted:he.value===w,isDimmed:!1,isHidden:!1,startAngle:N,endAngle:H,midAngle:$}),r}if(al.value&&t.length===2){const C=t[0],w=t[1],P=Math.min(100,Math.max(0,C.series.data[0]||0)),N=P/100*n;return r.push(p(a,a+N,C.originalIndex,C.series.name,P)),r.push(p(a,a+n,w.originalIndex,w.series.name,100)),r}const g=t.reduce((C,{series:w})=>C+(w.data[0]||0),0);return g===0?[]:(t.forEach(({series:C,originalIndex:w})=>{const P=C.data[0]||0,N=P/g*n,H=a,$=a+N,K=H+N/2,Ve=zt.value+Math.cos(H)*Wt.value,Ke=Dt.value+Math.sin(H)*Wt.value,de=zt.value+Math.cos($)*Wt.value,be=Dt.value+Math.sin($)*Wt.value,Se=zt.value+Math.cos($)*it.value,ve=Dt.value+Math.sin($)*it.value,Qe=zt.value+Math.cos(H)*it.value,Pe=Dt.value+Math.sin(H)*it.value,Ae=N>Math.PI?1:0,$e=[`M ${Ve} ${Ke}`,`A ${Wt.value} ${Wt.value} 0 ${Ae} 1 ${de} ${be}`,`L ${Se} ${ve}`,`A ${it.value} ${it.value} 0 ${Ae} 0 ${Qe} ${Pe}`,"Z"].join(" "),He=f(w);r.push({path:$e,color:He,strokeWidth:Ct.value,strokeColor:R(r.length,He),value:P,seriesName:C.name,opacity:.8,isHighlighted:he.value===w,isDimmed:he.value!==null&&he.value!==w,isHidden:!1,startAngle:H,endAngle:$,midAngle:K}),a=$}),r)}),hn=e.computed(()=>{const t=Zt.value;return al.value&&t.length>=2?[{segment:t[1],originalIndex:1},{segment:t[0],originalIndex:0}]:t.map((a,n)=>({segment:a,originalIndex:n}))}),mn=e.computed(()=>{if(!O.value||!En.value)return[];const t=_.value,a=ie.value,n=Le.value,r=ct.value,p=15,g=t*1.3,C=.55,w=($,K)=>{const Ve=zt.value+Math.cos($.midAngle)*it.value,Ke=Dt.value+Math.sin($.midAngle)*it.value,de=zt.value+Math.cos($.midAngle)*(it.value+a),be=Dt.value+Math.sin($.midAngle)*(it.value+a),ve=de+n*(K?1:-1),Qe=K?de+p:de-p,Pe=be-r,Ae=`${$.seriesName}: ${Gt($.value)}`,$e=Ae.length*t*C;return{pointerStartX:Ve,pointerStartY:Ke,pointerEndX:de,pointerEndY:be,horizontalEndX:ve,horizontalEndY:be,textX:Qe,textY:Pe,text:Ae,textWidth:$e,textAnchor:K?"start":"end",isRightSide:K,pointerLineLength:Math.hypot(de-Ve,be-Ke),horizontalLineLength:Math.hypot(ve-de,0)}},P=($,K)=>{const Ve=Math.abs($.textY-K.textY)<g,Ke=$.isRightSide?$.textX:$.textX-$.textWidth,de=$.isRightSide?$.textX+$.textWidth:$.textX,be=K.isRightSide?K.textX:K.textX-K.textWidth,Se=K.isRightSide?K.textX+K.textWidth:K.textX,ve=Ke<Se&&be<de;return Ve&&ve},N=Zt.value.filter($=>!$.isHidden),H=[];for(let $=0;$<N.length;$++){const K=N[$];let Ve=Math.cos(K.midAngle)>=0;if($>0){const de=H[$-1],be=w(K,Ve);P(de,be)&&(Ve=!Ve)}const Ke=w(K,Ve);H.push({...Ke,color:K.color,isHighlighted:K.isHighlighted,isDimmed:K.isDimmed})}return H}),sl=t=>{if(!t||t.isHidden)return 0;const a=t.opacity||no.value||.7;return he.value===null||he.value===void 0?a:he.value!==null?t.seriesIndex===he.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 he.value!==null?t.seriesIndex===he.value?Math.min(1,a+.1):a*.7:a},vl=(t,a)=>{if(t)try{if(he.value===t.seriesIndex?he.value=null:he.value=t.seriesIndex,typeof window<"u"&&window.dispatchEvent){const n=new CustomEvent("dss-bubble-click",{detail:{bubble:t,originalEvent:a,chartId:F.chartId}});window.dispatchEvent(n)}}catch(n){console.error("Error in onBubbleClick:",n)}},Ao=(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(" ")},wo=(t,a)=>{if(!t||(a.stopPropagation(),Fo.value=!0,he.value=t.seriesIndex,je.value.show=!1,!Ue.value))return;const n=a.target.closest(".dss-custom-chart-container");if(!n)return;const r=n.getBoundingClientRect();let p=a.clientX-r.left+10,g=a.clientY-r.top-10;const C=200,w=120;p+C>xe.value&&(p=a.clientX-r.left-C-10),g+w>r.height&&(g=a.clientY-r.top-w-10),p<0&&(p=10),g<0&&(g=10);const P=Hn.value,N=tn.value,H=P.map($=>{const K=N[$]||$,Ve=To($,t);return Ve?{seriesName:t.seriesName,label:t.label,value:`${K}: ${Ve}`,color:t.color}:null}).filter(Boolean);ft.value={show:!0,x:p,y:g,title:t.label||t.seriesName||"",value:"",bubbleData:H,categoryIndex:void 0,spiderAreas:[]}},To=(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 r=Ln.value[t];if(typeof r=="function")return r(n,a);if(typeof n=="number"){const p=n.toFixed(1);return il.value?p+il.value:p}return n?.toString()||""},Do=()=>{if(!Xt.value||!je.value.data||je.value.data.length===0)return"Bubbles";const t=[],a=new Set;return je.value.data.forEach(n=>{if(n.seriesName&&n.label){const r=`${n.seriesName} - ${n.label}`;a.has(r)||(t.push(r),a.add(r))}else n.seriesName&&(a.has(n.seriesName)||(t.push(n.seriesName),a.add(n.seriesName)))}),t.length>0?t.join(" | "):"Bubbles"},Go=(t,a)=>{t&&(Fo.value=!1,he.value=null,ft.value.show=!1,ft.value.bubbleData=[])},Ho=(t,a)=>{const n=a.target.closest(".dss-custom-chart-container");if(!n)return;const r=n.getBoundingClientRect(),p=Ul(t.categoryIndex),g=t.description||t.comment||"";let C=a.clientX-r.left+15,w=a.clientY-r.top-10;const P=200,N=g?80:50;C+P>xe.value&&(C=a.clientX-r.left-P-15),w+N>te.value&&(w=a.clientY-r.top-N-10),C<0&&(C=10),w<0&&(w=10),Rn.value={show:!0,x:C,y:w,categoryValue:p,description:g}},so=()=>{Rn.value.show=!1},Dl=e.computed(()=>F.categories.length||Math.max(...Gn.value.map(t=>t.data.length))),gl=e.computed(()=>{let t=0;return Gn.value.forEach(a=>{a.data.forEach(n=>{typeof n=="number"&&(t=Math.max(t,n))})}),t||100}),rl=e.computed(()=>{const t=[],a=Dl.value;for(let n=0;n<a;n++){const r=n*2*Math.PI/a-Math.PI/2,p=zt.value+Math.cos(r)*it.value,g=Dt.value+Math.sin(r)*it.value;t.push({x:p,y:g,angle:r,index:n})}return t}),Qn=e.computed(()=>{const t=[],a=Dl.value;return rl.value.forEach((n,r)=>{const p=it.value+15,g=r*2*Math.PI/a-Math.PI/2,C=zt.value+Math.cos(g)*p,w=Dt.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:C,y:w,text:F.categories[r]||`Axis ${r+1}`,anchor:P,baseline:N})}),t}),oa=e.ref(new Set),ha=(t,a,n)=>{const r=`current-${n}`,p=oa.value.has(r),g=a.fillOpacity??bt.value;return!p&&he.value===null?g:a.isHighlighted||p?a.isComparison?g:g+.15:a.isDimmed?g*.3:g},aa=e.computed(()=>{if(!bn.value)return[];const t=[],a=Dl.value;return Kn.value.map((r,p)=>({series:r,seriesIndex:p})).sort((r,p)=>{const g=Wn(r.series)?0:1,C=Wn(p.series)?0:1;return g-C}).forEach(({series:r,seriesIndex:p})=>{const g=Wn(r),C=[],w=[],P=[],N=he.value===p,H=he.value!==null&&he.value!==p,$=Rt.value.has(p);for(let K=0;K<a;K++){const Ve=r.data[K]||0,de=Ve/gl.value*it.value,be=K*2*Math.PI/a-Math.PI/2,Se=zt.value+Math.cos(be)*de,ve=Dt.value+Math.sin(be)*de;C.push(`${Se},${ve}`),w.push({x:Se,y:ve}),P.push({x:Se,y:ve,value:Ve,label:F.categories[K]||`Axis ${K+1}`,seriesName:r.name})}t.push({points:C.join(" "),polygonPoints:w,dataPoints:P,color:fl(r,p),fillOpacity:g?ao.value.fillOpacity:bt.value,strokeDasharray:g?oo(r)||ao.value.strokeDasharray:null,pointRadius:jl(r,g),seriesName:r.name,value:`${r.name}: ${r.data.join(", ")}`,isHighlighted:N,isDimmed:H,isHidden:$,isComparison:g,seriesIndex:p})}),t}),ya=(t,a)=>{if(!a||a.length<3)return!1;let n=!1;for(let r=0,p=a.length-1;r<a.length;p=r++){const g=a[r].x,C=a[r].y,w=a[p].x,P=a[p].y;C>t.y!=P>t.y&&t.x<(w-g)*(t.y-C)/(P-C)+g&&(n=!n)}return n},ka=t=>{if(!bn.value)return;const a=t.currentTarget.closest(".dss-custom-chart-container");if(!a)return;const n=a.getBoundingClientRect(),r=B.value?.getBoundingClientRect();if(!r)return;const p=t.clientX-r.left,g=t.clientY-r.top,C=aa.value.filter(w=>w.isHidden?!1:ya({x:p,y:g},w.polygonPoints));if(C.length>0){C.length,he.value=C[0].seriesIndex;const w=t.clientX-n.left+10,P=t.clientY-n.top-10,N=C.length>1?460:260,H=70+Dl.value*20;let $=w,K=P;$+N>xe.value&&($=t.clientX-n.left-N-10),K+H>te.value&&(K=t.clientY-n.top-H-10),$<0&&($=10),K<0&&(K=10);const Ve=C.map(Ke=>({seriesName:Ke.seriesName,color:Ke.color,points:Ke.dataPoints.map(de=>({label:de.label,value:Gt(de.value)}))}));ft.value={show:!0,x:$,y:K,title:"",value:"",bubbleData:[],spiderAreas:Ve}}else Nl()},Ro=e.computed(()=>{const t=W.value;return t.logos.map((a,n)=>{const r=F.series[a.seriesIndex];if(!r||!r.data||r.data.length===0||Rt.value.has(a.seriesIndex))return null;let p,g;if(xn.value){let w=-1,P=null;for(let H=r.data.length-1;H>=0;H--)if(r.data[H]!==null&&r.data[H]!==void 0){w=H,P=r.data[H];break}if(w===-1||P===null)return null;const N=r.data.map((H,$)=>H==null?null:{x:en($),y:Zn(r,H),index:$}).filter(H=>H!==null);if(t.animations.enabled&&!Hl.value&&t.animations.type==="draw"&&t.chart.type==="line"&&(Ft.value.isAnimating||!Ft.value.hasAnimated))if(Ft.value.isAnimating){const H=Ft.value.currentFrame/Ft.value.totalFrames,$=ea(t.animations.easing,Math.min(H,1)),K=Ba(N,$);p=K.x+(a.offsetX||0),g=K.y+(a.offsetY||0)}else p=N[0].x+(a.offsetX||0),g=N[0].y+(a.offsetY||0);else p=en(w)+(a.offsetX||0),g=Tl(P)+(a.offsetY||0)}else if(En.value||bn.value){const w=Math.PI*2/t.logos.length*n;p=zt.value+Math.cos(w)*(it.value+30)+(a.offsetX||0),g=Dt.value+Math.sin(w)*(it.value+30)+(a.offsetY||0)}return{...a,x:p,y:g,seriesIndex:a.seriesIndex}}).filter(Boolean)}),Ca=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")},ba=t=>{console.warn(`Logo ${t} failed to load, keeping fallback circle`);const a=document.querySelector(`.dss-logo-image-${t}`);a&&(a.style.display="none")},Qo=t=>{Rt.value.has(t)?Rt.value.delete(t):Rt.value.add(t)},wa=e.computed(()=>{if(!ft.value.show&&!(Je.value&&je.value.show&&!oe.value.isZooming))return{display:"none"};let t,a;if(Je.value&&je.value.show&&!oe.value.isZooming){t=je.value.x+15,a=z.value.top;const n=Xt.value?200:150;t+n>xe.value&&(t=je.value.x-n-15),t<0&&(t=10),a<10&&(a=10)}else t=ft.value.x,a=ft.value.y;return{left:t+"px",top:a+"px"}}),ql=(t,a)=>{if(!Ue.value||xo.value)return;const r=a.target.closest(".dss-custom-chart-container").getBoundingClientRect();let p=a.clientX-r.left+10,g=a.clientY-r.top-10;const C=200,w=120,P=xe.value,N=te.value;p+C>P&&(p=a.clientX-r.left-C-10),g+w>N&&(g=a.clientY-r.top-w-10),p<0&&(p=10),g<0&&(g=10);let H;typeof t.categoryIndex=="number"?H=t.categoryIndex:typeof t.dataIndex=="number"?H=t.dataIndex:t.label&&F.categories.includes(t.label)&&(H=F.categories.indexOf(t.label));const $=(Jt.value||Ce.value==="bar")&&t.label?t.label:t.seriesName||t.label||"";ft.value={show:!0,x:p,y:g,title:$,value:Gt(t.value)||"",categoryIndex:H,spiderAreas:[]}},Jo=e.ref(!1),Fo=e.ref(!1),Nl=()=>{ft.value.show=!1,ft.value.spiderAreas=[],ft.value.bubbleData=[],je.value.show=!1,Jo.value||(he.value=null)},xo=e.ref(!1),Eo=(t,a)=>{xo.value=!0,ft.value.show=!1,je.value.show=!1;const r=a.target.closest(".dss-custom-chart-container").getBoundingClientRect();let p=a.clientX-r.left+15,g=a.clientY-r.top-10;const C=250;p+C>xe.value&&(p=a.clientX-r.left-C-15),p<0&&(p=10),g<0&&(g=10),dn.value={show:!0,x:p,y:g,content:t.texts,count:t.totalCount}},So=()=>{xo.value=!1,dn.value.show=!1},Ft=e.ref({isAnimating:!1,currentFrame:0,totalFrames:0,animationId:null,hasAnimated:!1}),ea=(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}},Hl=e.computed(()=>Ie.value?window.matchMedia("(prefers-reduced-motion: reduce)").matches:!1),sa=()=>{if(!Et.value||Hl.value){Ft.value.hasAnimated=!0,In.value&&($l.value=1);return}In.value&&($l.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=ea(V.value,Math.min(a,1));xa(n),In.value&&($l.value=n),a<1?(Ft.value.currentFrame++,Ft.value.animationId=requestAnimationFrame(t)):Ea()};Ft.value.animationId=requestAnimationFrame(t)},xa=t=>{const a=I.value;a&&a.style.setProperty("--dss-animation-progress",t)},Ea=()=>{Ft.value.isAnimating=!1,Ft.value.hasAnimated=!0,In.value&&($l.value=1),Ft.value.animationId&&(cancelAnimationFrame(Ft.value.animationId),Ft.value.animationId=null)},ta=e.computed(()=>!En.value||Ft.value.hasAnimated?!0:In.value?$l.value>=1:xl.value?jt.value>=1:!0),ra=e.computed(()=>O.value&&ta.value),Io=e.ref(!1);e.watch(ra,t=>{t?(Io.value=!1,e.nextTick(()=>{requestAnimationFrame(()=>{Io.value=!0})})):Io.value=!1},{immediate:!0});const Sa=e.computed(()=>{if(!Et.value||Hl.value||Ft.value.hasAnimated)return{};const t={};return t["--dss-animation-duration"]=`${S.value}ms`,t["--dss-animation-easing"]=Va(V.value),t["--dss-stagger-delay"]=`${Y.value}ms`,t}),Va=t=>({linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out"})[t]||"ease-out",Na=()=>{if(!Et.value||Hl.value)return"";const t=["dss-chart-animated"];return Ft.value.hasAnimated||t.push(`dss-animate-${on.value}`),Ft.value.hasAnimated||(En.value&&Ce.value!=="semi-radial"?t.push("dss-animate-fill"):En.value||t.push(`dss-animate-${on.value}`)),Ft.value.isAnimating&&t.push("dss-is-animating"),t.join(" ")};e.watch(()=>F.series,(t,a)=>{ne.value&&a&&Ft.value.hasAnimated&&(Ft.value.hasAnimated=!1,e.nextTick(()=>{setTimeout(()=>sa(),b.value)}))},{deep:!0}),e.watch(()=>oe.value.isZooming,(t,a)=>{a&&!t&&setTimeout(()=>{Bn()},50)}),e.watch(()=>[oe.value.scale,oe.value.offsetX],()=>{!oe.value.isZooming&&!oe.value.isDragging&&Bn()},{flush:"post"}),e.watch([Ot,We],([t,a])=>{oe.value.minScale=t,oe.value.maxScale=a,(oe.value.scale<t||oe.value.scale>a)&&Jl()},{immediate:!0}),e.watch(()=>F.locale,t=>{t&&t!==T.value&&(T.value=t)},{immediate:!0}),e.watch(()=>vt.value.show,t=>{t?e.nextTick(()=>{document.addEventListener("click",go)}):document.removeEventListener("click",go)}),e.onMounted(()=>{he.value=null,In.value&&(!Et.value||Hl.value)&&($l.value=1),x(),I.value&&typeof ResizeObserver<"u"&&(v=new ResizeObserver(t=>{const a=t[0];!a||!a.contentRect||(we&&cancelAnimationFrame(we),we=requestAnimationFrame(()=>{we=null;const{width:n,height:r}=a.contentRect;ut.value=Math.round(n),J.value=Math.round(r),ge.value&&(Me.value=ge.value.offsetHeight||ke)}))}),v.observe(I.value)),Et.value&&!Hl.value?Ce.value==="semi-radial"?setTimeout(()=>jo(),b.value):setTimeout(()=>sa(),b.value):(Ft.value.hasAnimated=!0,Ce.value==="semi-radial"&&(jt.value=1)),document.addEventListener("mousemove",ia),document.addEventListener("mouseup",ca),document.addEventListener("click",vo)}),e.onUnmounted(()=>{we&&cancelAnimationFrame(we),v&&I.value&&(v.unobserve(I.value),v.disconnect(),v=null),Ft.value.animationId&&cancelAnimationFrame(Ft.value.animationId),Ol&&(cancelAnimationFrame(Ol),Ol=null),oe.value.zoomTimeout&&clearTimeout(oe.value.zoomTimeout),document.removeEventListener("mousemove",ia),document.removeEventListener("mouseup",ca),document.removeEventListener("click",vo),document.removeEventListener("click",go)});const ia=t=>{if(oe.value.isDragging&&oe.value.scale>1&&xn.value){je.value.show=!1;const a=t.clientX-oe.value.lastMouseX,{minX:n,maxX:r}=wt.value,p=r-n||1,C=a*.8;oe.value.offsetX+=C;const w=p/oe.value.scale,P=p-w,N=0,H=-P/p*z.value.width,$=N;oe.value.offsetX=Math.max(H,Math.min($,oe.value.offsetX)),oe.value.lastMouseX=t.clientX,oe.value.lastMouseY=t.clientY}},ca=()=>{oe.value.isDragging&&(oe.value.isDragging=!1,setTimeout(()=>{!oe.value.isDragging&&oe.value.isZooming},100))},Ba=(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 r=0;const p=[];for(let w=1;w<n.length;w++){const P=n[w].x-n[w-1].x,N=n[w].y-n[w-1].y,H=Math.sqrt(P*P+N*N);p.push(H),r+=H}const g=r*a;let C=0;for(let w=0;w<p.length;w++){const P=C+p[w];if(g<=P){const N=(g-C)/p[w],H=n[w],$=n[w+1];return{x:H.x+($.x-H.x)*N,y:H.y+($.y-H.y)*N}}C=P}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",[Na(),{"dss-chart-fill-width":Ze.value,"dss-chart-fill-height":qe.value,"dss-chart-compact":En.value&&!G.value}]]),style:e.normalizeStyle({width:Ze.value?"100%":xe.value+"px",height:ot.value,...Ze.value||qe.value?{overflow:En.value?"visible":"hidden",maxWidth:"100%",maxHeight:"100%"}:{},...Sa.value,cursor:Yo()}),"data-chart-type":Ce.value,ref_key:"containerEl",ref:I,onWheel:Vo,onMousedown:Xo,onMousemove:sn,onMouseup:ho,onMouseleave:On,onDblclick:Jl,onContextmenu:e.withModifiers(Zl,["prevent"]),onClick:e.withModifiers(Un,["left"]),onWheelCapture:Vo},[e.createElementVNode("div",{class:"dss-chart-header",ref_key:"headerEl",ref:ge},[e.createElementVNode("div",Vs,[dt.value?(e.openBlock(),e.createElementBlock("div",Ns,e.toDisplayString(dt.value),1)):e.createCommentVNode("",!0),ht.value?(e.openBlock(),e.createElementBlock("div",Bs,e.toDisplayString(ht.value),1)):e.createCommentVNode("",!0)]),G.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,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-${r}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":Rt.value.has(r),"dss-legend-hovered":he.value===r,"dss-legend-dimmed":he.value!==null&&he.value!==r}]),onClick:p=>Qo(r),onMouseenter:p=>Yt(r),onMouseleave:Fl,style:e.normalizeStyle({animationDelay:`${r*100}ms`})},[e.createElementVNode("div",{class:e.normalizeClass(["dss-legend-color",{"dss-legend-color--comparison":bn.value&&Wn(n)}]),style:e.normalizeStyle({backgroundColor:bn.value&&Wn(n)?"transparent":Sl(n,r),borderColor:Sl(n,r)})},null,6),e.createElementVNode("span",_s,e.toDisplayString(n.name),1)],46,Ms))),128))],2)):e.createCommentVNode("",!0),G.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,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-${r}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":Rt.value.has(r),"dss-legend-hovered":he.value===r,"dss-legend-dimmed":he.value!==null&&he.value!==r}]),onClick:p=>Qo(r),onMouseenter:p=>Yt(r),onMouseleave:Fl,style:e.normalizeStyle({animationDelay:`${r*100}ms`})},[e.createElementVNode("div",{class:e.normalizeClass(["dss-legend-color",{"dss-legend-color--comparison":bn.value&&Wn(n)}]),style:e.normalizeStyle({backgroundColor:bn.value&&Wn(n)?"transparent":Sl(n,r),borderColor:Sl(n,r)})},null,6),e.createElementVNode("span",Ls,e.toDisplayString(n.name),1)],46,$s))),128))],2)):e.createCommentVNode("",!0)],512),A.showAddMarkerButton&&pt.value&&at.value.addMarker&&(xn.value||Xt.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-add-marker-button",onClick:Uo,title:e.unref(M)("chart.contextMenu.addMarker")},[e.createElementVNode("img",{src:Mt.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,Ts),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,As)):e.createCommentVNode("",!0),e.createElementVNode("div",Ds,[Xt.value&&xt.value?(e.openBlock(),e.createElementBlock("div",Hs,"Bubble size: "+e.toDisplayString(xt.value),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{width:xe.value,height:te.value,class:"dss-chart-svg","data-smooth":fe.value,"data-animated":Et.value,ref_key:"svgEl",ref:B},[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,Is)],8,Fs),xl.value?(e.openBlock(),e.createElementBlock("clipPath",{key:0,id:eo.value},[e.createElementVNode("path",{d:zl.value},null,8,Ps)],8,zs)):e.createCommentVNode("",!0),In.value?(e.openBlock(),e.createElementBlock("clipPath",{key:1,id:No.value},[e.createElementVNode("path",{d:Bo.value},null,8,qs)],8,Os)):e.createCommentVNode("",!0)]),xn.value||Xt.value?(e.openBlock(),e.createElementBlock("g",Ws,[Ut.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(i.value,(n,r)=>(e.openBlock(),e.createElementBlock("line",{key:`h-grid-${r}`,x1:z.value.left,x2:z.value.right,y1:n.y,y2:n.y,stroke:"#e0e0e0","stroke-width":"1","stroke-dasharray":"4,2",style:e.normalizeStyle({animationDelay:`${r*50}ms`})},null,12,Us))),128))],8,Zs)):e.createCommentVNode("",!0),e.createElementVNode("g",Xs,[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,Ys),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,js),Ll.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,Ks)):e.createCommentVNode("",!0)]),e.createElementVNode("g",Gs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(n,r)=>(e.openBlock(),e.createElementBlock("text",{key:`x-${r}`,x:n.x,y:n.y,"text-anchor":"middle","font-size":"12",fill:"#666",style:e.normalizeStyle({animationDelay:`${r*100}ms`})},e.toDisplayString(n.text),13,Qs))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(n,r)=>(e.openBlock(),e.createElementBlock("text",{key:`y-${r}`,x:n.x,y:n.y,"text-anchor":"end","font-size":"12",fill:"#666","dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${r*80}ms`})},e.toDisplayString(n.text),13,Js))),128)),Ll.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(m.value,(n,r)=>(e.openBlock(),e.createElementBlock("text",{key:`y-secondary-${r}`,x:n.x,y:n.y,"text-anchor":"start","font-size":"12",fill:"#666","dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${r*80}ms`})},e.toDisplayString(n.text),13,er))),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",fill:"#666"},e.toDisplayString(Ht.value),9,tr)):e.createCommentVNode("",!0),It.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",fill:"#666",transform:`rotate(-90, 15, ${z.value.top+z.value.height/2})`},e.toDisplayString(It.value),9,nr)):e.createCommentVNode("",!0),Ll.value&&pe.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",fill:"#666",transform:`rotate(90, ${xe.value-15}, ${z.value.top+z.value.height/2})`},e.toDisplayString(pe.value),9,lr)):e.createCommentVNode("",!0)]),kl.value.length>0?(e.openBlock(),e.createElementBlock("g",or,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(kl.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:z.value.bottom,y2:z.value.top,stroke:"#698dbe","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:r=>Eo(n,r),onMouseleave:So},null,40,sr)):e.createCommentVNode("",!0),n.hasAuto&&!n.hasManual?(e.openBlock(),e.createElementBlock("line",{key:1,x1:n.x,x2:n.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:r=>Eo(n,r),onMouseleave:So},null,40,rr)):e.createCommentVNode("",!0),n.hasAuto&&n.hasManual?(e.openBlock(),e.createElementBlock("line",{key:2,x1:n.x,x2:n.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:r=>Eo(n,r),onMouseleave:So},null,40,ir)):e.createCommentVNode("",!0)],8,ar),n.hasManual&&n.hasAuto?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:n.x+8,cy:Math.max(15,z.value.top-10),r:"14",fill:"#a1d499",stroke:"#fafafa","stroke-width":"2",class:"flag-count-circle",onMouseover:r=>Eo(n,r),onMouseleave:So},null,40,cr)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:n.x,cy:Math.max(15,z.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:r=>Eo(n,r),onMouseleave:So},null,40,ur),e.createElementVNode("text",{x:n.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(n.totalCount),9,dr)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",{class:"dss-chart-data","clip-path":me.value},[Yn.value?(e.openBlock(),e.createElementBlock("g",pr,[e.createElementVNode("g",{class:e.normalizeClass(["dss-bar-chart",{"dss-horizontal-bars":Jt.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ln.value,(n,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`mixed-bar-${r}`},[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=>ql(n,p),onMouseleave:Nl},null,46,fr)):(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=>ql(n,p),onMouseleave:Nl},null,46,vr))],64))),128))],2),e.createElementVNode("g",gr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ae.value,(n,r)=>(e.openBlock(),e.createElementBlock("path",{key:`mixed-line-${r}`,d:n.path,stroke:n.color,"stroke-width":n.isHighlighted?Re.value+2:Re.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,hr))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,(n,r)=>(e.openBlock(),e.createElementBlock("path",{key:`mixed-gap-connector-${r}`,d:n.path,stroke:n.color,"stroke-width":n.isHighlighted?Re.value+2:Re.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,yr))),128)),yt.value>0||ee.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(gt.value,(n,r)=>(e.openBlock(),e.createElementBlock("circle",{key:`mixed-point-${r}`,cx:n.x,cy:n.y,r:X(n.isHighlighted?Z(n,yt.value)+2:Z(n,yt.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=>ql(n,p),onMouseleave:Nl},null,46,kr))),128)):e.createCommentVNode("",!0)])])):Ce.value==="line"?(e.openBlock(),e.createElementBlock("g",Cr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ze.value,(n,r)=>(e.openBlock(),e.createElementBlock("path",{key:`anim-${r}`,d:n.path,stroke:n.color,"stroke-width":Re.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,br))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ae.value,(n,r)=>(e.openBlock(),e.createElementBlock("path",{key:`line-${r}`,d:n.path,stroke:n.color,"stroke-width":n.isHighlighted?Re.value+2:Re.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,wr))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,(n,r)=>(e.openBlock(),e.createElementBlock("path",{key:`gap-connector-${r}`,d:n.path,stroke:n.color,"stroke-width":n.isHighlighted?Re.value+2:Re.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,xr))),128)),yt.value>0||ee.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(Ne.value,(n,r)=>(e.openBlock(),e.createElementBlock("circle",{key:`point-${r}`,cx:n.x,cy:n.y,r:X(n.isHighlighted?Z(n,yt.value)+2:Z(n,yt.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=>ql(n,p),onMouseleave:Nl},null,46,Er))),128)):e.createCommentVNode("",!0)])):Ce.value==="area"?(e.openBlock(),e.createElementBlock("g",Sr,[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(cn.value,(n,r)=>(e.openBlock(),e.createElementBlock("mask",{key:`mask-${r}`,id:`area-mask-${r}-${A.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,Nr)],8,Vr))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(cn.value,(n,r)=>(e.openBlock(),e.createElementBlock("path",{key:`area-fill-${r}`,d:n.areaPath,fill:n.color,"fill-opacity":n.isHighlighted?re.value+.2:re.value,mask:`url(#area-mask-${r}-${A.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,Br))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(cn.value,(n,r)=>(e.openBlock(),e.createElementBlock("path",{key:`area-line-${r}`,d:n.linePath,stroke:n.color,"stroke-width":n.isHighlighted?Re.value+1:Re.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:`${r*Y.value}ms`})},null,14,Mr))),128))])):Ce.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(ln.value,(n,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bar-${r}`},[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=>ql(n,p),onMouseleave:Nl},null,46,_r)):(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=>ql(n,p),onMouseleave:Nl},null,46,$r))],64))),128))],2)):e.createCommentVNode("",!0)],8,mr),Je.value&&je.value.show&&!oe.value.isZooming?(e.openBlock(),e.createElementBlock("g",{key:2,class:"dss-crosshair","clip-path":me.value},[e.createElementVNode("line",{x1:je.value.x,x2:je.value.x,y1:z.value.top,y2:z.value.bottom,stroke:At.value,"stroke-width":"1","stroke-dasharray":"4,4",opacity:"0.8"},null,8,Ar),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(je.value.data,(n,r)=>(e.openBlock(),e.createElementBlock("circle",{key:`dss-crosshair-point-${r}`,cx:je.value.x,cy:n.y,r:X(yt.value+2),fill:n.color,stroke:"none",opacity:"0.9"},null,8,Tr))),128))],8,Lr)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),Xt.value?(e.openBlock(),e.createElementBlock("g",Dr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(rn.value,(n,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bubble-${r}`},[n?(e.openBlock(),e.createElementBlock("g",Hr,[e.createElementVNode("circle",{cx:n.x,cy:n.y,r:X(n.radius),fill:n.color,"fill-opacity":sl(n),stroke:n.color,"stroke-width":"1","stroke-opacity":"0.8",class:e.normalizeClass(Ao(n,r)),style:{cursor:"pointer",transition:"all 0.3s ease"},onMouseenter:p=>wo(n,p),onMouseleave:p=>Go(n),onClick:p=>vl(n,p)},null,42,Rr),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-${r} ${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:Vl(n)}),onLoad:p=>Ko(r),onError:p=>_o(r),onMouseenter:p=>wo(n,p),onMouseleave:p=>Go(n),onClick:p=>vl(n,p)},null,46,Fr)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0),En.value?(e.openBlock(),e.createElementBlock("g",{key:2,class:"radial-chart",transform:Il.value},[Ce.value==="radial"?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:zt.value,cy:Dt.value,r:it.value,fill:"none",stroke:"#e0e0e0","stroke-width":"1"},null,8,zr)):e.createCommentVNode("",!0),e.createElementVNode("g",{class:"dss-radial-data","data-chart-type":Ce.value,"clip-path":Yl.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(hn.value,(n,r)=>(e.openBlock(),e.createElementBlock("path",{key:`radial-${n.originalIndex}-${r}`,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":Pl(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=>ql(n.segment,p),onMouseleave:Nl},null,42,Or))),128))],8,Pr),rt.value&&ta.value?(e.openBlock(),e.createElementBlock("g",qr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Rl.value,(n,r)=>e.withDirectives((e.openBlock(),e.createElementBlock("text",{key:`radial-segment-label-${r}`,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,Wr)),[[e.vShow,n.show]])),128))])):e.createCommentVNode("",!0),Tt.value&&(ta.value||xl.value||Xl.value)?(e.openBlock(),e.createElementBlock("text",{key:2,x:Pn.value.x,y:Pn.value.y,"text-anchor":"middle","dominant-baseline":"middle","font-size":Sn.value,fill:$n.value,class:"dss-radial-data-center"},e.toDisplayString(fn.value),9,Zr)):e.createCommentVNode("",!0),ra.value?(e.openBlock(),e.createElementBlock("g",{key:3,class:e.normalizeClass(["dss-radial-labels dss-radial-labels-initial",{"dss-radial-labels-animated":Io.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(mn.value,(n,r)=>(e.openBlock(),e.createElementBlock("g",{key:`radial-label-${r}`,class:e.normalizeClass(["dss-radial-label-group",{"dss-label-highlighted":n.isHighlighted,"dss-label-dimmed":n.isDimmed}]),style:e.normalizeStyle({"--label-delay":`${r*.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,Ur),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,Xr),e.createElementVNode("text",{class:"dss-radial-label-text",x:n.textX,y:n.textY,"text-anchor":n.textAnchor,"font-size":_.value,"dominant-baseline":"middle"},e.toDisplayString(n.text),9,Yr)],6))),128))],2)):e.createCommentVNode("",!0)],8,Ir)):e.createCommentVNode("",!0),bn.value?(e.openBlock(),e.createElementBlock("g",{key:3,class:"dss-spider-chart",transform:Il.value},[Ut.value?(e.openBlock(),e.createElementBlock("g",Kr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Oe.value,(n,r)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-grid-circle-${r}`,cx:zt.value,cy:Dt.value,r:X(n),fill:"none",stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${r*150}ms`})},null,12,Gr))),128)),e.createElementVNode("g",Qr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Oe.value,(n,r)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-grid-label-group-${r}`},[e.createElementVNode("rect",{x:zt.value-16,y:Dt.value-n-7,width:"32",height:"16",fill:"transparent",stroke:"none"},null,8,Jr),e.createElementVNode("text",{x:zt.value,y:Dt.value-n+2,"text-anchor":"middle","dominant-baseline":"central",class:"dss-spider-grid-label",style:{fontSize:"10px",fill:"#999",fontWeight:"600"}},e.toDisplayString(Nt(r)),9,ei)]))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(rl.value,(n,r)=>(e.openBlock(),e.createElementBlock("line",{key:`spider-axis-${r}`,x1:zt.value,x2:n.x,y1:Dt.value,y2:n.y,stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${r*100}ms`})},null,12,ti))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",ni,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Qn.value,(n,r)=>(e.openBlock(),e.createElementBlock("text",{key:`spider-label-${r}`,x:n.x+Math.cos(r*2*Math.PI/Dl.value-Math.PI/2)*16,y:n.y+Math.sin(r*2*Math.PI/Dl.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:`${r*120}ms`})},e.toDisplayString(n.text.charAt(0).toUpperCase()+n.text.slice(1)),13,li))),128))]),e.createElementVNode("g",{class:"dss-spider-data",onMousemove:ka,onMouseleave:Nl},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(aa.value,(n,r)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-${r}`},[e.createElementVNode("polygon",{points:n.points,fill:n.color,"fill-opacity":ha("current",n,r),stroke:n.color,"stroke-width":n.isHighlighted?Re.value+1:Re.value,"stroke-dasharray":n.strokeDasharray||void 0,"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:`${r*Y.value}ms`,transition:"all 0.2s ease"})},null,14,oi),n.pointRadius>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.dataPoints,(p,g)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-point-${r}-${g}`,cx:p.x,cy:p.y,r:X(n.isHighlighted?n.pointRadius+1:n.pointRadius),fill:n.isComparison?"none":n.color,stroke:n.isComparison?n.color:"none","stroke-width":n.isComparison?2:0,class:e.normalizeClass({"dss-point-highlighted":n.isHighlighted,"dss-point-dimmed":n.isDimmed,"dss-point-hidden":n.isHidden}),style:e.normalizeStyle({animationDelay:`${r*Y.value+g*50}ms`,transition:"all 0.2s ease"}),onMouseover:C=>ql(p,C),onMouseleave:Nl},null,46,ai))),128)):e.createCommentVNode("",!0)]))),128))],32)],8,jr)):e.createCommentVNode("",!0),e.createElementVNode("g",si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ro.value,(n,r)=>(e.openBlock(),e.createElementBlock("circle",{key:`logo-fallback-${r}`,cx:n.x,cy:n.y,r:X(n.width/2),fill:f(n.seriesIndex),stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass(`logo-fallback-${r}`),style:e.normalizeStyle({animationDelay:`${r*200}ms`})},null,14,ri))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ro.value,(n,r)=>(e.openBlock(),e.createElementBlock("image",{key:`logo-${r}`,x:n.x-n.width/2,y:n.y-n.height/2,width:n.width,height:n.height,"xlink:href":n.url,onLoad:p=>Ca(r),onError:p=>ba(r),preserveAspectRatio:"xMidYMid slice",class:e.normalizeClass(`dss-logo-image-${r}`),"clip-path":`circle(${n.width/2}px at ${n.width/2}px ${n.height/2}px)`,style:e.normalizeStyle({animationDelay:`${r*200}ms`})},null,46,ii))),128))])],8,Rs))]),cl.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:te.value+"px",backgroundImage:`url('${D.value}')`,backgroundRepeat:"no-repeat",...nl.value,opacity:Mn.value,pointerEvents:"none",zIndex:10})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(hl.value,(n,r)=>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:Dn.value+"px",height:Dn.value+"px",backgroundColor:"#fafafa",borderRadius:"50%",border:"2px solid #ddd",cursor:"pointer",zIndex:500}),onClick:e.withModifiers(p=>y(n),["stop"]),onMouseenter:p=>Ho(n,p),onMouseleave:so},[e.createElementVNode("img",{src:dl(n),class:"dss-marker-icon",alt:"Marker Icon",style:{width:"100%",height:"100%","object-fit":"contain","border-radius":"50%","pointer-events":"none"}},null,8,ui)],44,ci)),[[e.vShow,pn.value]])),128)),Rn.value.show?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-marker-tooltip",style:e.normalizeStyle({left:Rn.value.x+"px",top:Rn.value.y+"px"})},[e.createElementVNode("div",di,e.toDisplayString(Rn.value.categoryValue),1),Rn.value.description?(e.openBlock(),e.createElementBlock("div",mi,e.toDisplayString(Rn.value.description),1)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),Ue.value&&(ft.value.show||Je.value&&je.value.show&&!oe.value.isZooming)?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["dss-chart-tooltip",{"dss-crosshair-tooltip":Je.value&&je.value.show&&!oe.value.isZooming,"dss-spider-tooltip":bn.value&&ft.value.spiderAreas&&ft.value.spiderAreas.length>0}]),style:e.normalizeStyle(wa.value)},[!Je.value||!je.value.show||oe.value.isZooming?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[bn.value&&ft.value.spiderAreas&&ft.value.spiderAreas.length>0?(e.openBlock(),e.createElementBlock("div",pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ft.value.spiderAreas,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:`spider-tooltip-area-${r}`,class:"dss-spider-tooltip-area"},[e.createElementVNode("div",fi,[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-${r}-${g}`,class:"dss-tooltip-series"},[e.createElementVNode("span",vi,e.toDisplayString(p.label),1),e.createElementVNode("span",gi,e.toDisplayString(p.value),1)]))),128))]))),128))])):Xt.value&&ft.value.bubbleData&&ft.value.bubbleData.length>0?(e.openBlock(),e.createElementBlock("div",hi,[ft.value.title?(e.openBlock(),e.createElementBlock("div",yi,e.toDisplayString(ft.value.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",ki,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ft.value.bubbleData,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:`bubble-tooltip-${r}`,class:"dss-bubble-tooltip-item"},e.toDisplayString(n.value),1))),128))])])):(e.openBlock(),e.createElementBlock("div",Ci,[e.createElementVNode("div",bi,e.toDisplayString(ft.value.title),1),e.createElementVNode("div",wi,e.toDisplayString(ft.value.value),1)])),ft.value.categoryIndex!==void 0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[Cn(ft.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",xi,[a[5]||(a[5]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Ei,e.toDisplayString(e.unref(M)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Cn(ft.value.categoryIndex).flagGroups,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-flag-group-${r}`},[e.createElementVNode("div",Si,[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-${r}-${g}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",Vi,[e.createElementVNode("div",Ni,e.toDisplayString(p.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),Cn(ft.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",Bi,[a[6]||(a[6]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Mi,e.toDisplayString(e.unref(M)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Cn(ft.value.categoryIndex).markers,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-marker-${r}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:n.color})},null,4),e.createElementVNode("div",_i,[e.createElementVNode("div",$i,e.toDisplayString(n.title),1),n.description?(e.openBlock(),e.createElementBlock("div",Li,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",Ai,[e.createElementVNode("div",Ti,e.toDisplayString(Xt.value?Do():A.categories[je.value.categoryIndex]||`Category ${je.value.categoryIndex+1}`),1),Xt.value?(e.openBlock(),e.createElementBlock("div",Di,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(je.value.data,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${r}`,class:"dss-bubble-tooltip-item"},e.toDisplayString(n.value),1))),128))])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(je.value.data,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${r}`,class:"dss-tooltip-series"},[e.createElementVNode("div",{class:"dss-tooltip-series-indicator",style:e.normalizeStyle({backgroundColor:n.color})},null,4),e.createElementVNode("span",Hi,e.toDisplayString(n.seriesName)+":",1),e.createElementVNode("span",Ri,e.toDisplayString(Gt(n.value)),1)]))),128))]),Cn(je.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",Fi,[a[7]||(a[7]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Ii,e.toDisplayString(e.unref(M)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Cn(je.value.categoryIndex).flagGroups,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-flag-group-${r}`},[e.createElementVNode("div",zi,[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-${r}-${g}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",Pi,[e.createElementVNode("div",Oi,e.toDisplayString(p.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),Cn(je.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",qi,[a[8]||(a[8]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Wi,e.toDisplayString(e.unref(M)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Cn(je.value.categoryIndex).markers,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-dss-marker-${r}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:n.color})},null,4),e.createElementVNode("div",Zi,[e.createElementVNode("div",Ui,e.toDisplayString(n.title),1),n.description?(e.openBlock(),e.createElementBlock("div",Xi,e.toDisplayString(n.description),1)):e.createCommentVNode("",!0)])]))),128))])):e.createCommentVNode("",!0)],64))],6)):e.createCommentVNode("",!0),xn.value&&nt.value&&oe.value.scale>1?(e.openBlock(),e.createElementBlock("div",{key:4,class:"dss-zoom-indicator",onClick:Jl},[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,Ss),G.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,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-bottom-${r}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":Rt.value.has(r),"dss-legend-hovered":he.value===r,"dss-legend-dimmed":he.value!==null&&he.value!==r}]),onClick:p=>Qo(r),onMouseenter:p=>Yt(r),onMouseleave:Fl,style:e.normalizeStyle({animationDelay:`${r*100}ms`})},[e.createElementVNode("div",{class:e.normalizeClass(["dss-legend-color",{"dss-legend-color--comparison":bn.value&&Wn(n)}]),style:e.normalizeStyle({backgroundColor:bn.value&&Wn(n)?"transparent":Sl(n,r),borderColor:Sl(n,r)})},null,6),e.createElementVNode("span",ji,e.toDisplayString(n.name),1)],46,Yi))),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"]))},[at.value.addMarker?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-context-menu-item",onClick:fo},e.toDisplayString(e.unref(M)("chart.contextMenu.addMarker")),1)):e.createCommentVNode("",!0),at.value.addMarker&&(at.value.downloadSvg||at.value.downloadPng||at.value.downloadCsv||Bt.value.length>0)?(e.openBlock(),e.createElementBlock("div",Ki)):e.createCommentVNode("",!0),at.value.downloadSvg?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-context-menu-item",onClick:gn},e.toDisplayString(e.unref(M)("chart.contextMenu.downloadSvg")),1)):e.createCommentVNode("",!0),at.value.downloadPng?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-context-menu-item",onClick:Fn},e.toDisplayString(e.unref(M)("chart.contextMenu.downloadPng")),1)):e.createCommentVNode("",!0),at.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",{key:4,class:"dss-context-menu-item",onClick:qn},e.toDisplayString(e.unref(M)("chart.contextMenu.downloadCsv")),1)):e.createCommentVNode("",!0),Bt.value.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[at.value.downloadSvg||at.value.downloadPng||at.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",Gi)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Bt.value,(n,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"custom-"+r},[n.separator?(e.openBlock(),e.createElementBlock("div",Qi)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(Nn(n)),style:e.normalizeStyle(Gl(n)),onClick:p=>wl(n)},[n.template?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:Bl(n),class:"dss-custom-menu-content"},null,8,ec)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.icon?(e.openBlock(),e.createElementBlock("span",tc,e.toDisplayString(n.icon),1)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.label),1)],64))],14,Ji)],64))),128))],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),Fe.value.show?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-marker-modal-overlay",onClick:wn},[e.createElementVNode("div",{class:"dss-marker-modal",onClick:a[3]||(a[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",nc,[e.createElementVNode("h3",null,e.toDisplayString(Vn.value?e.unref(M)("chart.modalMarker.viewMarker"):Cl.value?e.unref(M)("chart.modalMarker.editMarker"):e.unref(M)("chart.contextMenu.addMarker")),1),e.createElementVNode("button",{class:"dss-modal-close-btn",onClick:wn},"×")]),e.createElementVNode("div",lc,[e.createElementVNode("div",oc,[e.createVNode(la,{id:"dss-marker-date",mode:"single",modelValue:Fe.value.date,"onUpdate:modelValue":a[1]||(a[1]=n=>Fe.value.date=n),"min-date":ol.value,"max-date":an.value,disabled:Vn.value},null,8,["modelValue","min-date","max-date","disabled"])]),e.createElementVNode("div",ac,[e.createElementVNode("label",sc,e.toDisplayString(e.unref(M)("chart.modalMarker.description")),1),Vn.value?(e.openBlock(),e.createElementBlock("div",rc,e.toDisplayString(Fe.value.description),1)):e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{key:1,id:"dss-marker-description","onUpdate:modelValue":a[2]||(a[2]=n=>Fe.value.description=n),placeholder:e.unref(M)("chart.modalMarker.placeholderDescription"),class:"dss-form-textarea",rows:"5"},null,8,ic)),[[e.vModelText,Fe.value.description]])])]),e.createElementVNode("div",cc,[e.createElementVNode("div",uc,[Cl.value&&!Vn.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-btn dss-btn-danger",onClick:vn},e.toDisplayString(e.unref(M)("chart.modalMarker.deleteMarker")),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",dc,[e.createElementVNode("button",{class:"dss-btn dss-btn-secondary",onClick:wn},e.toDisplayString(Vn.value?e.unref(M)("chart.modalMarker.close"):e.unref(M)("chart.modalMarker.cancel")),1),Vn.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-btn dss-btn-primary",onClick:ml,disabled:!(Fe.value.description&&Fe.value.description.length)},e.toDisplayString(Cl.value?e.unref(M)("chart.modalMarker.save"):e.unref(M)("chart.contextMenu.addMarker")),9,mc))])])])])):e.createCommentVNode("",!0)],64))}}),vc={class:"dss-modal-title"},gc={class:"dss-modal-actions"},na={__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(A,{emit:le}){const M=A,T=le,ce=e.ref(null),I=e.ref(null),B=e.computed(()=>{const U={"max-width":M.width};return M.height!=="auto"&&(U.height=M.height,U["min-height"]="0"),U}),ge=e.computed(()=>({}));function ut(){T("close-modal")}function J(){M.backDrop&&!ce.value&&T("close-modal")}function v(U){U.target.tagName==="INPUT"&&(ce.value=U.target.tagName)}function we(){setTimeout(()=>{ce.value=null},300)}function ke(){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 Q(){if(!I.value)return;const U=document.body,me=document.documentElement,{bodyOverflow:F,bodyPosition:Ee,bodyTop:Te,bodyWidth:lt,htmlOverflow:mt,scrollY:W}=I.value;U.style.overflow=F||"",U.style.position=Ee||"",U.style.top=Te||"",U.style.width=lt||"",U.style.left="",me.style.overflow=mt||"",window.scrollTo(0,W||0)}return e.watch(()=>M.showModal,U=>{if(U)ke(),document.body.classList.add("dss-modal-open"),setTimeout(()=>{const me=document.getElementById("dss-modal-backdrop");me&&(me.addEventListener("focusin",v),me.addEventListener("focusout",we))},100);else{Q(),document.body.classList.remove("dss-modal-open");const me=document.getElementById("dss-modal-backdrop");me&&(me.removeEventListener("focusin",v),me.removeEventListener("focusout",we))}},{immediate:!0}),e.onUnmounted(()=>{M.showModal&&Q()}),(U,me)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[A.showModal?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-modal-backdrop",onClick:J},[e.withDirectives(e.createElementVNode("div",{id:"dss-modal-backdrop",class:"dss-modal",style:e.normalizeStyle(B.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":A.headerType,"font-size":A.titleSize})},[e.createElementVNode("h1",vc,[e.renderSlot(U.$slots,"title",{},()=>[me[1]||(me[1]=e.createTextVNode("Default Title",-1))])]),e.renderSlot(U.$slots,"title-data"),A.showCloseBtn?(e.openBlock(),e.createElementBlock("span",{key:0,class:"dss-modal-close",onClick:ut,title:"Close"},"×")):e.createCommentVNode("",!0)],4),e.createElementVNode("div",{class:"dss-modal-body",style:e.normalizeStyle(ge.value)},[e.renderSlot(U.$slots,"content",{},()=>[me[2]||(me[2]=e.createTextVNode("Default Content",-1))])],4),e.createElementVNode("div",gc,[e.renderSlot(U.$slots,"actions")])])],4),[[e.vShow,A.showModal]])])):e.createCommentVNode("",!0)]))}},hc={key:0,class:"dss-table-toolbar"},yc={class:"dss-table-toolbar-left"},kc=["aria-expanded"],Cc={class:"dss-pagination-select-dropdown",role:"listbox"},bc={class:"dss-table-column-visibility-label"},wc={class:"dss-table-checkbox-wrapper"},xc=["checked","onChange"],Ec={key:0,class:"dss-table-checkbox__check","aria-hidden":"true"},Sc={class:"dss-table-column-visibility-text"},Vc={class:"dss-table-toolbar-right"},Nc=["placeholder","aria-label"],Bc=["aria-label"],Mc=["aria-label","aria-expanded"],_c={key:1,class:"dss-table-toolbar-extra"},$c={class:"dss-table-thead"},Lc={key:0,class:"dss-table-th dss-table-selection-column"},Ac={key:0,class:"dss-table-checkbox-wrapper"},Tc=["checked","indeterminate"],Dc={key:0,class:"dss-table-checkbox__indeterminate"},Hc={key:1,class:"dss-table-checkbox__check","aria-hidden":"true"},Rc=["aria-label"],Fc=["onClick"],Ic={class:"dss-table-th-content"},zc={class:"dss-table-th-text"},Pc={key:0},Oc={key:1},qc={key:2},Wc=["data-filter-column-key","aria-expanded","aria-label","onClick"],Zc={class:"dss-table-tbody"},Uc=["onClick"],Xc={class:"dss-table-checkbox-wrapper"},Yc=["type","name","checked","disabled","onChange"],jc={key:0,class:"dss-table-checkbox__check","aria-hidden":"true"},Kc={key:1,class:"dss-table-checkbox__dot"},Gc=["onClick"],Qc=["aria-expanded","aria-label"],Jc={key:1,class:"dss-table-expansion-placeholder","aria-hidden":"true"},eu={key:0,class:"dss-table-expansion-row"},tu=["colspan"],nu=["colspan"],lu={key:1,class:"dss-table-pagination"},ou={class:"dss-table-pagination-left"},au={key:0},su={key:1,class:"dss-table-pagination-placeholder","aria-hidden":"true"},ru={class:"dss-table-pagination-center"},iu={key:0,class:"dss-pagination-controls"},cu=["disabled","title"],uu=["disabled","title"],du=["aria-label","onKeydown"],mu={class:"dss-pagination-of"},pu=["disabled","title"],fu=["disabled","title"],vu={class:"dss-table-pagination-right"},gu={class:"dss-pagination-rows-label"},hu=["aria-expanded"],yu=["aria-selected","onClick"],ku={key:0,class:"dss-table-filter-row"},Cu=["value","placeholder"],bu=["min","max","value"],wu=["min","max","value"],xu={class:"dss-table-filter-double-range-values"},Eu={key:2,class:"dss-table-filter-daterange"},Su={class:"dss-table-filter-daterange-row"},Vu={class:"dss-table-filter-daterange-label"},Nu=["value"],Bu={class:"dss-table-filter-daterange-row"},Mu={class:"dss-table-filter-daterange-label"},_u=["value"],$u=["value","placeholder"],Lu={class:"dss-table-filter-list"},Au=["checked","onChange"],Tu={class:"dss-table-filter-actions"},Du={name:"DSSTable"},Hu=Object.assign(Du,{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:A=>typeof A=="object"&&A!==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(A,{emit:le}){const{t:M,locale:T}=co.useI18n(),ce=A,I=le,B={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 ge(y,h){const x=Object.assign({},y);return ut(y)&&ut(h)&&Object.keys(h).forEach(q=>{ut(h[q])?q in y?x[q]=ge(y[q],h[q]):Object.assign(x,{[q]:h[q]}):Object.assign(x,{[q]:h[q]})}),x}function ut(y){return y&&typeof y=="object"&&!Array.isArray(y)}const J=e.computed(()=>ge(B,ce.options)),v=e.computed(()=>{const y=J.value.table.width;return y==="auto"?null:typeof y=="number"?y:null}),we=e.computed(()=>J.value.table.height),ke=e.computed(()=>J.value.table.rowHeight??"auto"),Q=e.computed(()=>({height:ke.value})),U=e.computed(()=>J.value.table.expandable===!0),me=e.computed(()=>J.value.table.expandableRowData??null),F=e.computed(()=>J.value.table.expandableRowCondition??null),Ee=e.computed(()=>J.value.table.truncated===!0),Te=e.computed(()=>J.value.table.striped),lt=e.computed(()=>J.value.table.bordered),mt=e.computed(()=>J.value.table.hoverable),W=e.computed(()=>J.value.table.size),Ze=e.computed(()=>J.value.table.align||"left");e.computed(()=>J.value.title.text),e.computed(()=>J.value.subtitle.text);const qe=e.computed(()=>J.value.selection.enabled),xe=e.computed(()=>J.value.selection.mode),Me=e.computed(()=>J.value.selection.rowCondition??null),Xe=e.computed(()=>J.value.sorting.enabled),te=e.computed(()=>J.value.sorting.mode),ot=e.computed(()=>J.value.pagination.enabled),Ce=e.computed(()=>J.value.pagination.rows),tt=e.computed(()=>J.value.pagination.rowsPerPageOptions),dt=e.computed(()=>J.value.pagination.showCounter!==!1),ht=e.computed(()=>J.value.pagination.showControlsGroup),xt=e.computed(()=>ht.value===!1?!1:J.value.pagination.showControls!==!1),Ht=e.computed(()=>ht.value===!1?!1:J.value.pagination.showRowsPerPage!==!1),It=e.computed(()=>ot.value&&(dt.value||xt.value||Ht.value)),se=e.computed(()=>J.value.scrollable),pe=e.computed(()=>J.value.emptyMessage||M("table.emptyMessage")),De=e.computed(()=>J.value.toolbar?.downloads?.pdf!==!1),_e=e.computed(()=>J.value.toolbar?.downloads?.excel!==!1),Kt=e.computed(()=>J.value.toolbar?.search!==!1),kt=e.computed(()=>De.value||_e.value||Kt.value||Qt.value),Qt=e.computed(()=>J.value.toolbar?.columnVisibility!==!1),Lt=e.ref(""),Ut=e.ref(!1),G=e.ref(null);let ye=null;function Be(){Ut.value?(ye&&(clearTimeout(ye),ye=null),Ut.value=!1,Lt.value="",I("search",""),G.value?.blur()):(Ut.value=!0,ye=setTimeout(()=>{ye=null,G.value?.focus()},80))}function Ue(){Lt.value||(Ut.value=!1)}function Je(){Lt.value="",I("search",""),G.value?.focus()}const At=e.computed(()=>({"dss-table-striped":Te.value,"dss-table-bordered":lt.value,"dss-table-hoverable":mt.value,[`dss-table-${W.value}`]:W.value!=="default","dss-table-truncated":Ee.value})),nt=(y,h)=>y?.field??y?.key??h,Ot=e.ref(new Set);function We(){const y=new Set;return ce.columns.forEach((h,x)=>{h?.hidden!==!0&&y.add(nt(h,x))}),y}function Re(){const y=new Set;return ce.columns.forEach((h,x)=>{y.add(nt(h,x))}),y}function Ct(y){if(!Array.isArray(y))return null;const h=Re(),x=[];return y.forEach(q=>{h.has(q)&&x.push(q)}),x}function yt(){Ot.value=We()}const ee=e.computed(()=>{const y=Ct(ce.columnVisibility);return y===null?null:new Set(y)}),Z=e.computed(()=>ee.value??Ot.value),X=e.computed(()=>ce.columns.filter((y,h)=>Z.value.has(nt(y,h)))),re=y=>{const h=ce.columns.findIndex(x=>x===y);return nt(y,h>=0?h:0)},fe=(y,h)=>Z.value.has(nt(y,h));function et(y){I("update:columnVisibility",Array.from(y))}function Vt(y,h){const x=nt(y,h),q=new Set(Z.value);q.has(x)?q.delete(x):q.add(x),ee.value===null&&(Ot.value=q),et(q)}const un=e.ref(null),Et=e.ref(!1);function on(y){un.value&&!un.value.contains(y.target)&&(Et.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)),Ie=(y,h)=>{if(!U.value)return!1;if(typeof F.value=="function")return!!F.value(y,h);if(typeof me.value=="string"&&me.value.trim()){const x=wn(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},bt=(y,h,x)=>{if(x&&x.stopPropagation(),!Ie(y,h))return;const q=b(y,h),ue=new Set(V.value);ue.has(q)?(ue.delete(q),I("row-collapse",{data:y,index:h})):(ue.add(q),I("row-expand",{data:y,index:h})),V.value=ue},st=(y,h)=>{if(!Ee.value)return;const x=b(y,h);Y.value!==x&&(Y.value=x)},Oe=e.ref(null),Nt=e.ref(0),St=e.ref([]),pt=y=>{if(te.value==="single")return Oe.value===y.field?Nt.value:0;{const h=St.value.find(x=>x.field===y.field);return h?h.order:0}},at=y=>{const h=pt(y);return{"dss-sort-active":h!==0,"dss-sort-asc":h===1,"dss-sort-desc":h===-1}},Bt=e.ref({}),Mt=e.ref(null),kn=e.ref(null),Dn=220,il=e.ref(null),Gt=e.computed(()=>X.value.find(y=>re(y)===Mt.value)??null),pn=e.computed(()=>{if(!Gt.value||Gt.value.filter!=="range")return null;const y=Gt.value,h=Mt.value,{min:x,max:q}=ie(y),ue=y.filterMin??x,Ge=y.filterMax??q,qt=Mn(h),gn=qt.min??ue,Fn=qt.max??Ge,qn=Ge-ue,wl=qn===0?0:(gn-ue)/qn*100,fo=qn===0?100:(Fn-ue)/qn*100;return{rangeMin:ue,rangeMax:Ge,currentMin:gn,currentMax:Fn,minPct:wl,maxPct:fo}}),tl=e.ref(null),hl=e.ref("max");function cl(y){const h=tl.value,x=pn.value;if(!h||!x)return;const q=h.getBoundingClientRect(),Ge=(y.clientX-q.left)/q.width*100,qt=(x.minPct+x.maxPct)/2;hl.value=Ge<qt?"min":"max"}function Mn(y){return Bt.value[y]??{}}function yl(y,h){Bt.value={...Bt.value,[y]:h}}function _n(y){const h=Bt.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 ul(y){const h={...Bt.value};delete h[y],Bt.value=h,Mt.value=null,kn.value=null}function nl(){if(!Mt.value){kn.value=null;return}const y=il.value;if(!y)return;const h=y.querySelector(`.dss-table-filter-trigger[data-filter-column-key="${Mt.value}"]`);if(!h)return;const x=h.getBoundingClientRect();kn.value={top:x.bottom+6,left:Math.max(8,x.right-Dn)}}const zn=e.computed(()=>{const y=String(Lt.value??"").trim().toLowerCase();return y?ce.data.filter(h=>X.value.some(x=>ll(ml(h,x)).some(ue=>String(ue).toLowerCase().includes(y)))):ce.data}),Cn=e.computed(()=>{let y=[...zn.value];const h=(Lt.value??"").trim().toLowerCase();return h&&(y=y.filter(x=>ce.columns.some(q=>{if(!q||!q.field)return!1;const ue=ml(x,q);return String(ue??"").toLowerCase().includes(h)}))),X.value.forEach(x=>{const q=re(x),ue=Bt.value[q];if(!ue)return;const Ge=x.field;if(Ge){if(ue.type==="string"&&ue.value?.trim()){const qt=ue.value.trim().toLowerCase();y=y.filter(gn=>{const Fn=ml(gn,x);return String(Fn??"").toLowerCase().includes(qt)})}else if(ue.type==="range")y=y.filter(qt=>{const gn=wn(qt,Ge),Fn=Number(gn);return!(Number.isNaN(Fn)||ue.min!=null&&Fn<ue.min||ue.max!=null&&Fn>ue.max)});else if(ue.type==="dateRange"){const qt=ue.from?new Date(ue.from).getTime():null,gn=ue.to?new Date(ue.to).getTime():null;y=y.filter(Fn=>{const qn=wn(Fn,Ge),wl=qn?new Date(qn).getTime():NaN;return!(Number.isNaN(wl)||qt!=null&&wl<qt||gn!=null&&wl>gn)})}else if(ue.type==="list"&&ue.selected?.length){const qt=new Set(ue.selected);y=y.filter(gn=>ll(ml(gn,x)).some(qn=>qt.has(qn)))}}}),y});function ll(y){if(y==null)return[""];if(Array.isArray(y))return y.flatMap(ll);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 ce.data.forEach(x=>{ll(ml(x,y)).forEach(ue=>h.add(ue))}),Array.from(h).sort((x,q)=>String(x).localeCompare(String(q)))}function O(y,h){if(Mt.value===y){Mt.value=null,kn.value=null;return}if(Mt.value=y,h?.currentTarget){const x=h.currentTarget.getBoundingClientRect();kn.value={top:x.bottom+6,left:Math.max(8,x.right-Dn)}}else nl()}function _(y,h){yl(y,{type:"string",value:h})}function ie(y){const h=y.field;if(!h)return{min:0,max:100};let x=1/0,q=-1/0;return ce.data.forEach(ue=>{const Ge=wn(ue,h),qt=Number(Ge);Number.isNaN(qt)||(x=Math.min(x,qt),q=Math.max(q,qt))}),{min:x===1/0?0:x,max:q===-1/0?100:q}}function Le(y,h,x){const q={...Mn(y),type:"range"},ue=x===""?null:Number(x),Ge=ue===null||Number.isNaN(ue)?null:ue;q[h]=Ge,Ge!=null&&(h==="min"&&q.max!=null&&Ge>q.max&&(q.max=Ge),h==="max"&&q.min!=null&&Ge<q.min&&(q.min=Ge)),yl(y,q)}function ct(y,h,x){const q={...Mn(y),type:"dateRange"};q[h]=x||"",yl(y,q)}const rt=e.reactive({});function Ye(y,h){rt[y]=h}function Tt(y){const h=re(y),x=(rt[h]??"").trim().toLowerCase(),q=D(y);return x?q.filter(ue=>String(ue).toLowerCase().includes(x)):q}function fn(y,h){return(Mn(y).selected??[]).includes(h!=null?String(h):"")}function Sn(y,h){const q=[...Mn(y).selected??[]],ue=h!=null?String(h):"",Ge=q.indexOf(ue);Ge>=0?q.splice(Ge,1):q.push(ue),yl(y,{type:"list",selected:q})}function Pn(y){Mt.value&&!y.target.closest(".dss-table-filter-wrap")&&!y.target.closest(".dss-table-filter-dropdown")&&(Mt.value=null,kn.value=null)}function $n(){nl(),tn.value&&je()}const Rl=y=>{if(!(y.sortable===!1||!Xe.value))if(te.value==="single")Oe.value===y.field?Nt.value=Nt.value===1?-1:Nt.value===-1?0:1:(Oe.value=y.field,Nt.value=1),Nt.value===0&&(Oe.value=null),I("sort",{field:Oe.value,order:Nt.value});else{const h=St.value.findIndex(x=>x.field===y.field);h>=0?St.value[h].order===1?St.value[h].order=-1:St.value.splice(h,1):St.value.push({field:y.field,order:1}),I("sort",{multiSortMeta:St.value})}},kl=e.computed(()=>{if(!Xe.value)return Cn.value;let y=[...Cn.value];return te.value==="single"&&Oe.value&&Nt.value!==0?y.sort((h,x)=>{const q=wn(h,Oe.value),ue=wn(x,Oe.value);return q===ue?0:q==null?1:ue==null?-1:(q<ue?-1:q>ue?1:0)*Nt.value}):te.value==="multiple"&&St.value.length>0&&y.sort((h,x)=>{for(const q of St.value){const ue=wn(h,q.field),Ge=wn(x,q.field);if(ue===Ge)continue;if(ue==null)return 1;if(Ge==null)return-1;const qt=ue<Ge?-1:ue>Ge?1:0;if(qt!==0)return qt*q.order}return 0}),y}),dn=e.ref(0),Hn=e.ref(Ce.value),tn=e.ref(!1),Ln=e.ref(null),Rt=e.ref(null),he=e.ref("bottom"),_t=e.ref(null),ft=y=>{Hn.value=y,tn.value=!1,dn.value=0,I("page",{page:0,rows:Hn.value})};function Rn(y){Ln.value&&!Ln.value.contains(y.target)&&(tn.value=!1)}function je(){const y=Ln.value,h=Rt.value;if(!y||!h)return;const x=y.querySelector(".dss-pagination-select-dropdown");if(!x)return;const q=h.getBoundingClientRect(),ue=x.offsetHeight||0,qt=(window.innerHeight||document.documentElement.clientHeight)-q.bottom,gn=q.top;he.value=qt<ue+8&&gn>qt?"top":"bottom",_t.value={width:`${Math.ceil(q.width)}px`,left:`${Math.max(0,Math.round(h.offsetLeft))}px`}}const vt=e.computed(()=>kl.value.length),oe=e.computed(()=>Math.ceil(vt.value/Hn.value)),nn=e.computed(()=>Math.max(oe.value,1)),Fe=e.computed(()=>vt.value===0?0:an.value+1),ol=e.computed(()=>Cl.value),an=e.computed(()=>ot.value?dn.value*Hn.value:0),Cl=e.computed(()=>ot.value?Math.min((dn.value+1)*Hn.value,vt.value):vt.value),Vn=e.computed(()=>{if(!ot.value)return kl.value;const y=an.value,h=Cl.value;return kl.value.slice(y,h)}),Yt=e.ref(new Set),Fl=e.computed(()=>kl.value.filter((y,h)=>Yt.value.has(b(y,h)))),sn=(y,h)=>{const x=Me.value;return typeof x!="function"?!0:!!x(y,h)},On=e.computed(()=>kl.value.map((y,h)=>({row:y,index:h})).filter(({row:y,index:h})=>sn(y,h))),Zl=e.computed(()=>{const y=On.value;return y.length===0?!1:y.every(({row:h,index:x})=>Yt.value.has(b(h,x)))}),Un=e.computed(()=>{const y=On.value;if(y.length===0)return!1;const h=y.filter(({row:x,index:q})=>Yt.value.has(b(x,q))).length;return h>0&&h<y.length}),Bl=(y,h)=>Yt.value.has(b(y,h)),Nn=()=>{if(Zl.value)Yt.value=new Set,I("unselect-all");else{const y=new Set;On.value.forEach(({row:h,index:x})=>y.add(b(h,x))),Yt.value=y,I("select-all",Fl.value)}},Gl=(y,h)=>{if(!sn(y,h))return;const x=b(y,h),q=new Set(Yt.value),ue=q.has(x);xe.value==="single"?ue?(q.delete(x),I("row-unselect",y)):(q.clear(),q.add(x),I("row-select",y)):ue?(q.delete(x),I("row-unselect",y)):(q.add(x),I("row-select",y)),Yt.value=q},dl=e.ref("1"),Ul=()=>{const y=Number.parseInt(String(dl.value),10);if(!Number.isFinite(y)){dl.value=String(dn.value+1);return}const h=Math.min(nn.value,Math.max(1,y));h!==dn.value+1?bl(h-1):dl.value=String(h)},bl=y=>{y<0||y>=oe.value||(dn.value=y,I("page",{page:y,rows:Hn.value}))},Ql=(y,h,x)=>{I("row-click",{data:y,index:h,originalEvent:x}),st(y,an.value+h)},Bn=(y,h)=>{const x=an.value+h;return{"dss-table-row-selected":Bl(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===b(y,x)}},ml=(y,h)=>h.field?wn(y,h.field):"",wn=(y,h)=>h.split(".").reduce((x,q)=>x&&x[q],y),vn=y=>{const h=y.align??Ze.value;return{"dss-table-sortable":y.sortable!==!1&&Xe.value,"dss-table-align-left":h==="left","dss-table-align-center":h==="center","dss-table-align-right":h==="right",[y.className]:y.className}},Xn=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(()=>ce.locale,y=>{y&&y!==T.value&&(T.value=y)},{immediate:!0}),e.watch(Ce,y=>{Hn.value=y,dn.value=0}),e.watch(tn,async y=>{y&&(await e.nextTick(),je())}),e.watch(dn,y=>{dl.value=String(y+1)},{immediate:!0}),e.watch(Lt,y=>{I("search",y??"")}),e.watch(()=>ce.columns,()=>{if(ee.value===null){yt();return}const y=Ct(ce.columnVisibility)??[];y.length!==ce.columnVisibility.length&&I("update:columnVisibility",y)},{immediate:!0,deep:!0}),e.onMounted(()=>{document.addEventListener("click",Rn),document.addEventListener("click",on),document.addEventListener("click",Pn),window.addEventListener("resize",$n),window.addEventListener("scroll",$n,!0)}),e.onUnmounted(()=>{document.removeEventListener("click",Rn),document.removeEventListener("click",on),document.removeEventListener("click",Pn),window.removeEventListener("resize",$n),window.removeEventListener("scroll",$n,!0)}),(y,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"dss-table-container",ref_key:"tableContainerRef",ref:il,style:e.normalizeStyle({width:v.value+"px",height:we.value?we.value+"px":"auto"})},[kt.value?(e.openBlock(),e.createElementBlock("div",hc,[e.createElementVNode("div",yc,[De.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),Qt.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-table-toolbar-column-visibility",ref_key:"columnVisibilityDropdownRef",ref:un},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-pagination-select-trigger",{"dss-pagination-select-open":Et.value}]),onClick:h[2]||(h[2]=x=>Et.value=!Et.value),"aria-expanded":Et.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,kc),e.createVNode(e.Transition,{name:"dss-dropdown"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("ul",Cc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.columns,(x,q)=>(e.openBlock(),e.createElementBlock("li",{key:nt(x,q),role:"option",class:"dss-table-column-visibility-option",onClick:h[3]||(h[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("label",bc,[e.createElementVNode("span",wc,[e.createElementVNode("input",{type:"checkbox",checked:fe(x,q),onChange:ue=>Vt(x,q),class:"dss-table-checkbox dss-table-checkbox--checkbox"},null,40,xc),fe(x,q)?(e.openBlock(),e.createElementBlock("span",Ec,[...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",Sc,e.toDisplayString(x.header),1)])]))),128))],512),[[e.vShow,Et.value]])]),_:1})],512)):e.createCommentVNode("",!0),e.renderSlot(y.$slots,"header")]),e.createElementVNode("div",Vc,[Kt.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dss-table-toolbar-search",{"dss-table-toolbar-search--expanded":Ut.value||Lt.value}])},[e.withDirectives(e.createElementVNode("input",{ref_key:"searchInputRef",ref:G,"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=>Ut.value=!0),onBlur:Ue},null,40,Nc),[[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:Je},[...h[26]||(h[26]=[e.createElementVNode("span",{"aria-hidden":"true"},"×",-1)])],8,Bc)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"dss-table-toolbar-search-trigger","aria-label":e.unref(M)("table.searchAriaLabel"),"aria-expanded":Ut.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,Mc)],2)):e.createCommentVNode("",!0),y.$slots["toolbar-extra"]?(e.openBlock(),e.createElementBlock("div",_c,[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",At.value])},[e.createElementVNode("thead",$c,[e.createElementVNode("tr",null,[qe.value?(e.openBlock(),e.createElementBlock("th",Lc,[xe.value==="multiple"?(e.openBlock(),e.createElementBlock("span",Ac,[e.createElementVNode("input",{type:"checkbox",checked:Zl.value,indeterminate:Un.value,onChange:Nn,class:"dss-table-checkbox dss-table-checkbox--checkbox"},null,40,Tc),Un.value?(e.openBlock(),e.createElementBlock("span",Dc)):Zl.value?(e.openBlock(),e.createElementBlock("span",Hc,[...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,Rc)):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",vn(x)]),style:e.normalizeStyle(Xn(x)),onClick:ue=>Rl(x)},[e.createElementVNode("div",Ic,[e.createElementVNode("span",zc,e.toDisplayString(x.header),1),x.sortable!==!1&&Xe.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["dss-table-sort-icon",at(x)])},[pt(x)===0?(e.openBlock(),e.createElementBlock("span",Pc,[...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)])])):pt(x)===1?(e.openBlock(),e.createElementBlock("span",Oc,[...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)])])):pt(x)===-1?(e.openBlock(),e.createElementBlock("span",qc,[...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":Mt.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":_n(re(x))}]),"data-filter-column-key":re(x),"aria-expanded":Mt.value===re(x),"aria-label":e.unref(M)("table.filterColumnAriaLabel"),onClick:ue=>O(re(x),ue)},[...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,Wc)],2)):e.createCommentVNode("",!0)])],14,Fc))),128))])]),e.createElementVNode("tbody",Zc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Vn.value,(x,q)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:b(x,an.value+q)},[e.createElementVNode("tr",{class:e.normalizeClass(["dss-table-tr",Bn(x,q)]),style:e.normalizeStyle(Q.value),onClick:ue=>Ql(x,q,ue)},[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",Xc,[e.createElementVNode("input",{type:xe.value==="multiple"?"checkbox":"radio",name:`dss-table-select-${A.tableId}`,checked:Bl(x,an.value+q),disabled:!sn(x,an.value+q),onChange:ue=>Gl(x,an.value+q),class:e.normalizeClass(["dss-table-checkbox",xe.value==="multiple"?"dss-table-checkbox--checkbox":"dss-table-checkbox--radio",{"dss-table-checkbox--disabled":!sn(x,an.value+q)}])},null,42,Yc),xe.value==="multiple"&&Bl(x,an.value+q)?(e.openBlock(),e.createElementBlock("span",jc,[...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"&&Bl(x,an.value+q)?(e.openBlock(),e.createElementBlock("span",Kc)):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(ue=>bt(x,an.value+q,ue),["stop"])},[Ie(x,an.value+q)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-table-expansion-trigger","aria-expanded":ne(x,an.value+q),"aria-label":ne(x,an.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,an.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,Qc)):(e.openBlock(),e.createElementBlock("span",Jc))],8,Gc)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(X.value,(ue,Ge)=>(e.openBlock(),e.createElementBlock("td",{key:re(ue),class:e.normalizeClass(["dss-table-td",vn(ue)]),style:e.normalizeStyle(Xn(ue))},[e.renderSlot(y.$slots,`cell-${ue.field}`,{data:x,column:ue,rowIndex:q,isExpanded:Y.value===b(x,an.value+q)},()=>[e.createTextVNode(e.toDisplayString(ml(x,ue)),1)])],6))),128))],14,Uc),U.value&&Ie(x,an.value+q)&&ne(x,an.value+q)?(e.openBlock(),e.createElementBlock("tr",eu,[e.createElementVNode("td",{colspan:S.value,class:"dss-table-expansion-content-cell"},[e.renderSlot(y.$slots,"expansion",{data:x,rowIndex:q})],8,tu)])):e.createCommentVNode("",!0)],64))),128)),Vn.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("tr",{key:0,class:"dss-table-empty",style:e.normalizeStyle(Q.value)},[e.createElementVNode("td",{colspan:S.value,class:"dss-table-empty-cell"},[e.renderSlot(y.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(pe.value),1)])],8,nu)],4))])],2)],2),It.value?(e.openBlock(),e.createElementBlock("div",lu,[e.createElementVNode("div",ou,[dt.value?(e.openBlock(),e.createElementBlock("span",au,e.toDisplayString(e.unref(M)("table.showingRange",{start:Fe.value,end:ol.value,total:vt.value})),1)):(e.openBlock(),e.createElementBlock("span",su," "))]),e.createElementVNode("div",ru,[xt.value?(e.openBlock(),e.createElementBlock("div",iu,[e.createElementVNode("button",{class:"dss-pagination-btn",disabled:dn.value===0,onClick:h[8]||(h[8]=x=>bl(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,cu),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:dn.value===0,onClick:h[9]||(h[9]=x=>bl(dn.value-1)),title:e.unref(M)("table.previousPage")}," ‹ ",8,uu),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":h[10]||(h[10]=x=>dl.value=x),type:"text",class:"dss-pagination-page-input","aria-label":e.unref(M)("table.currentPageAriaLabel"),onBlur:Ul,onKeydown:e.withKeys(e.withModifiers(Ul,["prevent"]),["enter"])},null,40,du),[[e.vModelText,dl.value]]),e.createElementVNode("span",mu,e.toDisplayString(e.unref(M)("table.ofPages",{total:nn.value})),1),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:dn.value>=oe.value-1,onClick:h[11]||(h[11]=x=>bl(dn.value+1)),title:e.unref(M)("table.nextPage")}," › ",8,pu),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:dn.value>=oe.value-1,onClick:h[12]||(h[12]=x=>bl(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,fu)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",vu,[Ht.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-pagination-rows-per-page",ref_key:"rowsPerPageDropdownRef",ref:Ln},[e.createElementVNode("span",gu,e.toDisplayString(e.unref(M)("table.rowsPerPage"))+":",1),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-pagination-select-trigger",{"dss-pagination-select-open":tn.value}]),onClick:h[13]||(h[13]=x=>tn.value=!tn.value),"aria-expanded":tn.value,"aria-haspopup":"listbox",ref_key:"rowsPerPageTriggerRef",ref:Rt},[e.createTextVNode(e.toDisplayString(Hn.value)+" ",1),h[37]||(h[37]=e.createElementVNode("span",{class:"dss-pagination-select-chevron","aria-hidden":"true"},"▼",-1))],10,hu),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":he.value==="top"}]),style:e.normalizeStyle(_t.value),role:"listbox"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(tt.value,x=>(e.openBlock(),e.createElementBlock("li",{key:x,role:"option","aria-selected":x===Hn.value,class:e.normalizeClass(["dss-pagination-select-option",{"dss-pagination-select-option--selected":x===Hn.value}]),onClick:q=>ft(x)},e.toDisplayString(x),11,yu))),128))],6),[[e.vShow,tn.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(kn.value?{top:kn.value.top+"px",left:kn.value.left+"px",width:Dn+"px"}:void 0),onClick:h[21]||(h[21]=e.withModifiers(()=>{},["stop"]))},[Gt.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[Gt.value.filter==="string"?(e.openBlock(),e.createElementBlock("div",ku,[e.createElementVNode("input",{type:"text",value:Mn(Mt.value).value??"",onInput:h[14]||(h[14]=x=>_(Mt.value,x.target.value)),class:"dss-table-filter-input",placeholder:e.unref(M)("table.search")},null,40,Cu)])):Gt.value.filter==="range"&&pn.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-table-filter-double-range",style:e.normalizeStyle({"--range-min-pct":pn.value.minPct+"%","--range-max-pct":pn.value.maxPct+"%"})},[e.createElementVNode("div",{ref_key:"doubleRangeTrackRef",ref:tl,class:"dss-table-filter-double-range-track",onMousemove:cl,onMouseenter:cl},[e.createElementVNode("input",{type:"range",min:pn.value.rangeMin,max:pn.value.rangeMax,value:pn.value.currentMin,onInput:h[15]||(h[15]=x=>Le(Mt.value,"min",x.target.value)),class:"dss-table-filter-double-range-input dss-table-filter-double-range-input--min",style:e.normalizeStyle({zIndex:hl.value==="min"?2:1})},null,44,bu),e.createElementVNode("input",{type:"range",min:pn.value.rangeMin,max:pn.value.rangeMax,value:pn.value.currentMax,onInput:h[16]||(h[16]=x=>Le(Mt.value,"max",x.target.value)),class:"dss-table-filter-double-range-input dss-table-filter-double-range-input--max",style:e.normalizeStyle({zIndex:hl.value==="max"?2:1})},null,44,wu)],544),e.createElementVNode("div",xu,e.toDisplayString(pn.value.currentMin)+" – "+e.toDisplayString(pn.value.currentMax),1)],4)):Gt.value.filter==="dateRange"?(e.openBlock(),e.createElementBlock("div",Eu,[e.createElementVNode("div",Su,[e.createElementVNode("label",Vu,e.toDisplayString(e.unref(M)("table.filterFrom")),1),e.createElementVNode("input",{type:"date",value:Mn(Mt.value).from??"",onInput:h[17]||(h[17]=x=>ct(Mt.value,"from",x.target.value)),class:"dss-table-filter-input dss-table-filter-daterange-input"},null,40,Nu)]),e.createElementVNode("div",Bu,[e.createElementVNode("label",Mu,e.toDisplayString(e.unref(M)("table.filterTo")),1),e.createElementVNode("input",{type:"date",value:Mn(Mt.value).to??"",onInput:h[18]||(h[18]=x=>ct(Mt.value,"to",x.target.value)),class:"dss-table-filter-input dss-table-filter-daterange-input"},null,40,_u)])])):Gt.value.filter==="list"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("input",{type:"text",value:rt[Mt.value]??"",onInput:h[19]||(h[19]=x=>Ye(Mt.value,x.target.value)),class:"dss-table-filter-input dss-table-filter-list-search",placeholder:e.unref(M)("table.search")},null,40,$u),e.createElementVNode("div",Lu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tt(Gt.value),x=>(e.openBlock(),e.createElementBlock("label",{key:x,class:"dss-table-filter-list-item"},[e.createElementVNode("input",{type:"checkbox",checked:fn(Mt.value,x),onChange:q=>Sn(Mt.value,x)},null,40,Au),e.createElementVNode("span",null,e.toDisplayString(x),1)]))),128))])],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Tu,[e.createElementVNode("button",{type:"button",class:"dss-table-filter-clear",onClick:h[20]||(h[20]=x=>ul(Mt.value))},e.toDisplayString(e.unref(M)("table.clearFilter")),1)])],64)):e.createCommentVNode("",!0)],4),[[e.vShow,Mt.value&&Gt.value&&kn.value]])]),_:1})]))],64))}}),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='M6.008%2014V12.68H8.288V6.572L5.996%208.276V6.692L8.012%205.24H9.788V12.68H11.624V14H6.008Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",Fu="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",Iu="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",zu="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",Pu="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",Ou="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",qu={class:"dss-toolbar-left"},Wu=["title"],Zu=["title"],Uu={class:"dss-toolbar-dropdown-wrapper"},Xu=["title"],Yu=["src"],ju=["src"],Ku=["src"],Gu=["src"],Qu=["src"],Ju=["src"],ed={key:6,width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"paragraph-icon"},td=["src"],nd=["src"],ld=["src"],od=["src"],ad=["src"],sd=["src"],rd=["title"],id=["title"],cd=["title"],ud=["title"],dd=["title"],md=["title"],pd=["title"],fd=["title"],vd=["title"],gd={key:2,class:"dss-toolbar-separator"},hd=["title"],yd={key:4,class:"dss-toolbar-separator"},kd={key:5,class:"dss-toolbar-dropdown-wrapper"},Cd=["title"],bd={class:"dss-toolbar-dropdown-ai"},wd={class:"dss-toolbar-right"},xd={key:0,class:"dss-toolbar-custom-group"},Ed={key:1,class:"dss-toolbar-separator"},Sd={class:"dss-link-modal-content"},Vd={class:"dss-link-modal-field"},Nd={class:"dss-link-modal-label"},Bd=["placeholder"],Md={class:"dss-link-modal-field"},_d={class:"dss-link-modal-label"},$d=["placeholder"],Ld={class:"dss-image-modal-tabs"},Ad={key:0,class:"dss-image-tab-content"},Td={class:"dss-link-modal-content"},Dd={class:"dss-link-modal-field"},Hd={key:0,class:"dss-link-modal-label"},Rd=["src"],Fd={class:"dss-link-modal-field"},Id={class:"dss-link-modal-label"},zd=["placeholder"],Pd={class:"dss-link-modal-field"},Od={class:"dss-link-modal-label"},qd=["placeholder"],Wd={class:"dss-link-modal-field"},Zd={class:"dss-link-modal-label"},Ud=["placeholder"],Xd={key:1,class:"dss-image-tab-content"},Yd={class:"dss-link-modal-content"},jd={class:"dss-link-modal-field"},Kd={class:"dss-link-modal-label"},Gd=["placeholder"],Qd={class:"dss-link-modal-field"},Jd={class:"dss-link-modal-label"},e1=["placeholder"],t1={class:"dss-link-modal-field"},n1={class:"dss-link-modal-label"},l1=["placeholder"],o1={class:"dss-link-modal-field"},a1={class:"dss-link-modal-label"},s1=["placeholder"],r1={class:"dss-text-editor-title-input-container"},i1={key:0,class:"dss-text-editor-title-preview"},c1={key:0},u1={key:1,class:"dss-text-editor-preview-placeholder"},d1=["value","placeholder","disabled"],m1={key:3,class:"dss-text-editor-title-slot dss-text-editor-slot-last"},p1={class:"dss-text-editor-description-input-container"},f1={key:0,class:"dss-text-editor-description-preview"},v1={key:0},g1={key:1,class:"dss-text-editor-preview-placeholder"},h1=["value","placeholder","disabled"],y1={key:5,class:"dss-text-editor-description-slot dss-text-editor-slot-last"},k1=["data-comment-id","onMouseenter"],C1=["onClick"],b1=["src","alt"],w1={key:1},x1=["onClick"],E1=["src","alt"],S1={key:1},V1=["data-has-second-user","onClick"],N1={class:"editor-comment-marker-count"},B1={key:7,class:"dss-text-editor-textarea-wrapper"},M1=["value","placeholder","rows","disabled"],_1={class:"dss-text-editor-footer"},$1={class:"dss-text-editor-footer-content"},L1={class:"dss-text-editor-footer-stat"},A1={class:"dss-text-editor-footer-stat"},T1={key:8,class:"dss-text-editor-content-wrapper"},D1={key:0,class:"dss-comment-overlay-body"},H1={class:"dss-comment-selection-wrapper"},R1=["innerHTML"],F1={class:"dss-comment-messages-wrapper"},I1={key:0,class:"dss-comment-avatar-wrapper"},z1={class:"dss-comment-avatar"},P1=["src","alt"],O1={key:1},q1={class:"dss-comment-header"},W1={class:"dss-comment-header-text"},Z1={class:"dss-comment-author"},U1={key:0,class:"dss-comment-date"},X1=["onClick","title"],Y1={class:"dss-comment-overlay-inner"},j1=["placeholder","onKeydown"],K1={class:"dss-text-editor-footer"},G1={class:"dss-text-editor-footer-content"},Q1={class:"dss-text-editor-footer-stat"},J1={class:"dss-text-editor-footer-stat"},em=["title"],tm=["title"],nm={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:""},lm={class:"dss-image-popup-content"},om={key:0,class:"dss-image-popup-no-alt-icon"},am=["title"],sm=["title"],rm={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:""},im={class:"dss-toolbar-left"},cm=["title"],um=["title"],dm={class:"dss-toolbar-dropdown-wrapper"},mm=["title"],pm=["src"],fm=["src"],vm=["src"],gm=["src"],hm=["src"],ym=["src"],km={key:6,width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"paragraph-icon"},Cm=["title"],bm=["title"],wm=["title"],xm=["title"],Em=["title"],Sm=["title"],Vm=["title"],Nm=["title"],Bm=["title"],Mm={key:2,class:"dss-toolbar-separator"},_m=["title"],$m={key:4,class:"dss-toolbar-separator"},Lm={key:5,class:"dss-toolbar-dropdown-wrapper"},Am=["title"],Tm={class:"dss-toolbar-dropdown-ai"},Dm={key:0,class:"dss-toolbar-right"},Hm={key:0,class:"dss-toolbar-separator"},Rm={key:0,class:"dss-toolbar-custom-group"},Fm={key:1,class:"dss-toolbar-separator"},Im={name:"DSSTextEditor"},zm=Object.assign(Im,{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:A=>typeof A=="object"&&A!==null},floatingToolbar:{type:Boolean,default:!1},askAi:{type:Boolean,default:!1},showTitle:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},commentUser:{type:Object,default:null},customToolbarSlots:{type:Array,default:()=>["custom-tool-1","custom-tool-2","custom-tool-3"]},customToolbarFloatingMap:{type:Object,default:()=>({}),validator:A=>typeof A=="object"&&A!==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(A,{expose:le,emit:M}){const{t:T,locale:ce}=co.useI18n(),I={h1:Ru,h2:Fu,h3:Iu,h4:zu,h5:Pu,h6:Ou},B=A,ge=M,ut=e.useSlots(),J=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
97
+ `;const a=Math.max(...F.series.map(g=>g.data?.length||0));for(let g=0;g<a;g++){let O='"'+(F.categories[g]||_("chart.fallback.item",{number:g+1})).toString().replace(/"/g,'""')+'"';F.series.forEach(N=>{const H=N.data&&N.data[g]!==void 0?N.data[g]:"";O+=","+H}),t+=O+`
98
+ `}const n=new Blob([t],{type:"text/csv;charset=utf-8;"}),r=URL.createObjectURL(n),p=document.createElement("a");p.href=r,p.download=q("csv"),document.body.appendChild(p),p.click(),document.body.removeChild(p),URL.revokeObjectURL(r),Yn()}catch(t){console.error("Error downloading CSV:",t)}},Cl=t=>{if(typeof t.action=="function"){const a={series:F.series,categories:F.categories,markers:on.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)}Yn()},fo=()=>{xn(),Fe.value.show=!0,Fe.value.categoryIndex=gt.value.categoryIndex,Fe.value.fromButton=!1,Yn()},Uo=()=>{xn(),Fe.value.show=!0,Fe.value.categoryIndex=0,Fe.value.fromButton=!0},vo=t=>{if(gt.value.show){const a=document.querySelector(".dss-context-menu");a&&!a.contains(t.target)&&(gt.value.show=!1)}},go=t=>{gt.value.show&&!t.target.closest(".context-menu")&&(gt.value.show=!1)},Vo=t=>{if(!En.value||!tt.value)return;t.preventDefault(),t.stopPropagation(),ae.value.isZooming=!0,Ye.value.show=!1,ae.value.zoomTimeout&&clearTimeout(ae.value.zoomTimeout);const n=t.currentTarget.getBoundingClientRect(),r=t.clientX-n.left,p=t.clientY-n.top;if(r<P.value.left-50||r>P.value.right+50||p<P.value.top-50||p>P.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:O}=xt.value,N=O-w||1,H=N/ae.value.scale,$=w-ae.value.offsetX/P.value.width*N,K=(r-P.value.left)/P.value.width,Ve=$+K*H;ae.value.scale=C;const je=N/ae.value.scale,de=Ve-K*je;ae.value.offsetX=-(de-w)/N*P.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)},Xo=t=>{if(!En.value||!tt.value||ae.value.scale<=1)return;Ye.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()},ho=()=>{ae.value.isDragging=!1},Jl=()=>{!En.value||!tt.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)},Yo=()=>!En.value||!Bt.value||!tt.value?"default":ae.value.isDragging?"grabbing":ae.value.scale>1?"grab":"dss-crosshair",yo=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 r=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-r.x)/6*Ge.value,O=p.y+(g.y-r.y)/6*Ge.value,N=g.x-(C.x-p.x)/6*Ge.value,H=g.y-(C.y-p.y)/6*Ge.value;a+=` C ${w} ${O} ${N} ${H} ${g.x} ${g.y}`}return a},An=e.computed(()=>{const a=W.value?.chart?.padding,n=typeof a=="number"?a:null,r=a&&typeof a=="object"?a:null,p=50;let g=p+(Ht.value?30:0)+60;if(wn.value){const $={left:p+40,top:p+40,right:p+40,bottom:p+40};return n!=null?{left:n,top:n,right:n,bottom:n}:r?{left:r.left??$.left,top:r.top??$.top,right:r.right??$.right,bottom:r.bottom??$.bottom}:$}if(Sn.value){const $=!Q.value,K=Hn.value,Ve=K?Nl.value+L.value+Math.max(24,zn.value+16):0,je=$?12:p;let de=0;dt.value&&(de+=$?8:15),yt.value&&(de+=$?6:10);const be=nt();let Se=je+($?4:16)+(K?Ve:0),fe=je+(K?Ve:0);Q.value&&he.value==="left"?Se+=be.legendWidth||150:Q.value&&he.value==="right"&&(fe+=be.legendWidth||150);const qe=Ce.value==="semi-radial"?K?Ve:8:K?Ve:$?8:p+80,Le=K?14:0,$e=je+de+Le,Re={left:Se,top:$e,right:fe,bottom:qe};return n!=null?{left:n,top:n,right:n,bottom:n}:r?{left:r.left??Re.left,top:r.top??Re.top,right:r.right??Re.right,bottom:r.bottom??Re.bottom}:Re}let C=0;dt.value&&(C+=15),yt.value&&(C+=10);const w=nt();let O=p+16+(It.value?30:0),N=p+(pe.value?30:0);Q.value&&he.value==="left"?O+=w.legendWidth||150:Q.value&&he.value==="right"&&(N+=w.legendWidth||150),Ll.value&&(N+=44);const H={left:O,top:p+C,right:N,bottom:g};return n!=null?{left:n,top:n,right:n,bottom:n}:r?{left:r.left??H.left,top:r.top??H.top,right:r.right??H.right,bottom:r.bottom??H.bottom}:H}),P=e.computed(()=>({left:An.value.left,top:An.value.top,right:xe.value-An.value.right,bottom:te.value-An.value.bottom,width:xe.value-(An.value.left+An.value.right),height:te.value-(An.value.top+An.value.bottom)})),En=e.computed(()=>["line","area","bar"].includes(Ce.value)||et.value),Kn=e.computed(()=>et.value),Xl=e.computed(()=>Ce.value==="mini-radial"),Sn=e.computed(()=>["radial","semi-radial","mini-radial"].includes(Ce.value)),wn=e.computed(()=>Ce.value==="spider"),jt=e.computed(()=>Ce.value==="bubble"),nn=e.computed(()=>W.value?.chart?.orientation==="horizontal"&&(Ce.value==="bar"||Kn.value)),Gn=t=>{const{minY:a,maxY:n}=xt.value,r=n-a||1;return P.value.left+(t-a)/r*P.value.width},Ml=t=>{const{maxX:a}=xt.value,n=a+1,p=P.value.height/n;return P.value.top+(t+.5)*p},zt=e.computed(()=>Sn.value?An.value.left+(xe.value-An.value.left-An.value.right)/2:xe.value/2),Dt=e.computed(()=>wn.value?te.value/2-40:Sn.value?An.value.top+(te.value-An.value.top-An.value.bottom)/2:te.value/2),ct=e.computed(()=>{if(wn.value){const t=P.value.width-80,a=P.value.height-80;return Math.min(t,a)/2}return Math.min(P.value.width,P.value.height)/2}),Wt=e.computed(()=>{const t=W.value,a=t?.plotOptions?.radialBar?.innerRadiusRatio??t?.radialBar?.innerRadiusRatio,n=typeof a=="number"&&a>=0&&a<=1?a:.45;return ct.value*n}),_l=e.computed(()=>{const t=W.value,a=typeof F.innerSize=="number"?F.innerSize:t?.innerSize;return typeof a!="number"||a<=-100||!(Sn.value||wn.value)?1:1+a/100}),Il=e.computed(()=>{const t=_l.value;if(t===1||t<=0)return;const a=zt.value,n=Dt.value;return`translate(${a}, ${n}) scale(${t}) translate(${-a}, ${-n})`}),Qt=e.ref(0),eo=e.computed(()=>`semi-radial-fill-clip-${F.chartId}`),bl=e.computed(()=>Ce.value==="semi-radial"),dl=e.computed(()=>bl.value&&ot.value&&!Hl.value),al=e.computed(()=>bl.value&&ot.value&&!Hl.value&&sn.value==="fill"),zl=e.computed(()=>{const t=dl.value?Qt.value:1,a=zt.value,n=Dt.value,r=Wt.value,p=ct.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),O=n+p*Math.sin(g),N=a+p*Math.cos(C),H=n+p*Math.sin(C),$=a+r*Math.cos(C),K=n+r*Math.sin(C),Ve=a+r*Math.cos(g),je=n+r*Math.sin(g),de=t>.5?1:0;return`M ${a} ${n} L ${w} ${O} A ${p} ${p} 0 ${de} 1 ${N} ${H} L ${$} ${K} A ${r} ${r} 0 ${de} 1 ${Ve} ${je} Z`}),wl=e.computed(()=>{if(!(!bl.value||!dl.value)&&!al.value)return`url(#${eo.value})`}),Pl=t=>{if(!(!al.value||t!==0))return`url(#${eo.value})`},$l=e.ref(0),No=e.computed(()=>`radial-reveal-clip-${F.chartId}`),In=e.computed(()=>Ce.value==="radial"),Bo=e.computed(()=>{const t=In.value?$l.value:1,a=zt.value,n=Dt.value,r=Math.max(ct.value*1.5,xe.value,te.value);if(t<=0)return`M ${a} ${n} L ${a} ${n} Z`;if(t>=1){const $=a-r,K=a+r;return`M ${$} ${n} A ${r} ${r} 0 0 1 ${K} ${n} A ${r} ${r} 0 0 1 ${$} ${n} Z`}const p=-Math.PI/2,g=p+t*Math.PI*2,C=a+r*Math.cos(p),w=n+r*Math.sin(p),O=a+r*Math.cos(g),N=n+r*Math.sin(g),H=t>=.5?1:0;return`M ${a} ${n} L ${C} ${w} A ${r} ${r} 0 ${H} 1 ${O} ${N} Z`}),Yl=e.computed(()=>{if(wl.value)return wl.value;if(In.value)return`url(#${No.value})`});let Ol=null;const jo=()=>{if(!dl.value)return;Qt.value=0;const t=S.value,a=performance.now(),n=r=>{const p=r-a,g=Math.min(1,p/t);Qt.value=ea(V.value,g),g<1&&(Ol=requestAnimationFrame(n))};Ol=requestAnimationFrame(n)},Mo=e.computed(()=>W.value?.bubbles?.minSize||8),to=e.computed(()=>W.value?.bubbles?.maxSize||50),no=e.computed(()=>W.value?.bubbles?.opacity||.7),lo=(t,a)=>{const n=[15,20,25,18,22],r=n[t%n.length]||20,p=1+Math.sin(a*.5)*.2;return Math.max(5,r*p)},Ko=t=>{const a=document.querySelector(`.dss-bubble-image-${t}`);a&&(a.style.opacity="1")},_o=t=>{const a=document.querySelector(`.dss-bubble-image-${t}`);a&&(a.style.display="none")},Qn=e.computed(()=>F.series),Jn=e.computed(()=>F.series.filter((t,a)=>!Rt.value.has(a))),ko=t=>{if(!t)return"primary";const a=t.yAxis??t.axis??t.yAxisId;return a==="secondary"||a==="right"||a===1?"secondary":"primary"},oo=t=>t?typeof t.strokeDasharray=="string"?t.strokeDasharray:Array.isArray(t.strokeDasharray)?t.strokeDasharray.join(","):t.dotted===!0?"4,4":null:null,qn=t=>t?t.old===!0||t.comparison===!0||t.dotted===!0:!1,ao=e.computed(()=>{const a=W.value?.spider?.comparison||{};return{fillOpacity:typeof a.fillOpacity=="number"?a.fillOpacity:0,strokeDasharray:a.strokeDasharray||"6,4",usePrimaryColor:a.usePrimaryColor!==!1,bubbleSize:typeof a.bubbleSize=="number"?a.bubbleSize:0}}),jl=(t,a)=>typeof t?.bubbles?.size=="number"?t.bubbles.size:typeof t?.bubbleSize=="number"?t.bubbleSize:a?ao.value.bubbleSize:$t.value,ml=(t,a)=>qn(t)&&ao.value.usePrimaryColor?f(0):f(a),xl=(t,a)=>wn.value&&qn(t)?ml(t,a):f(a),Co=e.computed(()=>Jn.value.filter(t=>ko(t)==="primary")),$o=e.computed(()=>Jn.value.filter(t=>ko(t)==="secondary")),Ll=e.computed(()=>!nn.value&&!!re.value&&$o.value.length>0),Dn="auto",Kl=(t,a,n,r=0,p=100)=>{let g=1/0,C=-1/0;if(t.forEach(N=>{N?.data?.length&&N.data.forEach(H=>{typeof H=="number"&&Number.isFinite(H)&&(g=Math.min(g,H),C=Math.max(C,H))})}),g===1/0)return{minY:r,maxY:p};let w;if(a===Dn){const N=C-g,H=N>0?N*.1:1;w=Math.max(0,g-H)}else if(typeof a=="number")w=a;else{const N=C-g,H=N>0?N*.1:1;w=Math.max(0,g-H)}let O;if(n===Dn){const N=C-g,H=N>0?N*.1:2;O=C+H}else if(typeof n=="number")O=n;else{const N=C-g,H=N>0?N*.1:2;O=C+H}return{minY:w,maxY:O}},xt=e.computed(()=>{if(jt.value)return Al();if(!Jn.value.length)return{minX:0,maxX:1,minY:0,maxY:1};let t=0;Jn.value.forEach(n=>{n.data&&n.data.length&&(t=Math.max(t,n.data.length-1))}),F.categories.length>0&&(t=Math.max(t,F.categories.length-1));const a=Kl(Co.value.length?Co.value:Jn.value,De.value,_e.value);return{minX:0,maxX:t,minY:a.minY,maxY:a.maxY}}),Lo=e.computed(()=>Ll.value?Kl($o.value,Jt.value,Ct.value,xt.value.minY,xt.value.maxY):{minY:xt.value.minY,maxY:xt.value.maxY}),Al=()=>{if(!Jn.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,r=-1/0,p=1/0,g=-1/0,C=!1;if(Jn.value.forEach((Ve,je)=>{Ve?.data?.length&&Ve.data.forEach((de,be)=>{let Se,fe,Je;if(typeof de=="object"&&de!==null&&!Array.isArray(de))Se=typeof de.x=="number"?de.x:be,fe=typeof de.y=="number"?de.y:0,Je=typeof de.size=="number"?de.size:20;else if(Array.isArray(de)&&de.length>=3)Se=typeof de[0]=="number"?de[0]:be,fe=typeof de[1]=="number"?de[1]:0,Je=typeof de[2]=="number"?de[2]:20;else if(typeof de=="number")Se=be,fe=de,Je=lo(je,be);else return;isFinite(Se)&&isFinite(fe)&&isFinite(Je)&&(t=Math.min(t,Se),a=Math.max(a,Se),n=Math.min(n,fe),r=Math.max(r,fe),p=Math.min(p,Je),g=Math.max(g,Je),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,F.categories?.length-1||8)),n===r&&(n=Math.max(0,n-10),r=n+20);const w=a-t,O=r-n;let N,H,$,K;return tn.value!==null?N=tn.value:N=t-w*.1,_t.value!==null?H=_t.value:H=a+w*.1,De.value!==null&&typeof De.value=="number"?$=De.value:$=Math.max(0,n-O*.1),_e.value!==null&&typeof _e.value=="number"?K=_e.value:K=r+O*.1,{minX:N,maxX:H,minY:$,maxY:K,minSize:p,maxSize:g}},ln=t=>{if(jt.value){const{minX:w,maxX:O}=xt.value,N=O-w||1;return P.value.left+(t-w)/N*P.value.width}const{minX:a,maxX:n}=xt.value,r=n-a;if(n===0||r===0)return P.value.left+P.value.width/2;const p=r/ae.value.scale,g=a-ae.value.offsetX/P.value.width*r,C=(t-g)/p;return P.value.left+C*P.value.width},Tl=t=>{const{minY:a,maxY:n}=xt.value,r=n-a||1;return P.value.bottom-(t-a)/r*P.value.height},bo=t=>{const{minY:a,maxY:n}=Lo.value,r=n-a||1;return P.value.bottom-(t-a)/r*P.value.height},Wn=(t,a)=>Ll.value&&ko(t)==="secondary"?bo(a):Tl(a),o=t=>{if(!jt.value)return $t.value||4;const{maxSize:a}=xt.value,n=Math.max(1,a),r=Math.min(1,Math.max(0,t/n));return Mo.value+r*(to.value-Mo.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 r=l.canvas.getContext("2d");return r?(r.font=`${a}px ${n}`,r.measureText(t).width):t.length*(a*.62)},s=(t,a,n=12)=>{if(typeof t!="string"||typeof a!="number"||a<=0||l(t,n)<=a)return t;const r="..";if(l(r,n)>=a)return r;let g=t.length;for(;g>0;){const C=`${t.slice(0,g)}${r}`;if(l(C,n)<=a)return C;g-=1}return r},i=e.computed(()=>u.value.map(t=>({y:t.y}))),c=e.computed(()=>{if(jt.value)return d();if(Ce.value==="bar"){if(nn.value){const $e=[],{minY:Re,maxY:Mt}=xt.value,Pt=5,tl=Mt-Re||1;for(let Cn=0;Cn<=Pt;Cn++){const nl=Re+tl*(Cn/Pt),zo=Gn(nl);$e.push({x:zo,y:P.value.bottom+20,text:en(Math.round(nl))})}return $e}const be=[],{maxX:Se}=xt.value,fe=Se+1,Je=5,Le=(P.value.width-Je*2)/fe;for(let $e=0;$e<=Se;$e++){const Re=P.value.left+Je+($e+.5)*Le;be.push({x:Re,y:P.value.bottom+20,text:s(F.categories[$e]||_("chart.fallback.item",{number:$e+1}),Math.max(Le-8,24))})}return be}const t=[],{minX:a,maxX:n}=xt.value,r=tn.value!==null?tn.value:a,p=_t.value!==null?_t.value:n,g=p-r||1,C=g/ae.value.scale,w=r-ae.value.offsetX/P.value.width*g,O=w+C,N=Math.max(0,Math.floor(w-2)),H=Math.min(p,Math.ceil(O+2)),$=H-N,K=P.value.width,je=Math.floor(K/60);let de=1;$>je&&(de=Math.ceil($/je));for(let be=N;be<=H;be+=de)if(be>=0&&be<=p){const Se=ln(be);Se>=P.value.left-100&&Se<=P.value.right+100&&t.push({x:Se,y:P.value.bottom+20,text:F.categories[be]||`Item ${be+1}`})}return t}),d=()=>{const t=[],{minX:a,maxX:n}=xt.value,r=n-a||1,p=Math.min(8,Math.max(4,Math.floor(P.value.width/80)));for(let g=0;g<=p;g++){const C=a+r*g/p,w=ln(C);if(w>=P.value.left-10&&w<=P.value.right+10){const O=Math.round(C),N=F.categories?.[O];t.push({x:w,y:P.value.bottom+20,text:N||(Number.isInteger(C)?C.toString():C.toFixed(1))})}}return t},u=e.computed(()=>{if(nn.value){const p=[],{maxX:g}=xt.value;for(let C=0;C<=g;C++)p.push({x:P.value.left-10,y:Ml(C),text:s(F.categories[C]||`Item ${C+1}`,Math.max(P.value.left-28,40))});return p}const t=[],{minY:a,maxY:n}=xt.value,r=5;for(let p=0;p<=r;p++){const g=a+(n-a)*(p/r),C=Math.round(g);t.push({x:P.value.left-10,y:Tl(g),text:en(C)})}return t}),m=e.computed(()=>{if(!Ll.value||nn.value)return[];const t=[],{minY:a,maxY:n}=Lo.value,r=5;for(let p=0;p<=r;p++){const g=a+(n-a)*(p/r),C=Math.round(g);t.push({x:P.value.right+10,y:bo(g),text:en(C)})}return t}),f=t=>{const a=Yt.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]},k=t=>{if(!t||typeof t!="string")return"#3a3a3a";const a=t.trim();let n=0,r=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,r=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,r=Number(w[2])/255,p=Number(w[3])/255;else{const O=a.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);if(O){let N=O[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,r=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 H=getComputedStyle(N).color;document.body.removeChild(N);const $=H.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if($)n=Number($[1])/255,r=Number($[2])/255,p=Number($[3])/255;else return"#3a3a3a"}else return"#3a3a3a"}}return .2126*n+.7152*r+.0722*p>.5?"#3a3a3a":"#fafafa"},A=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 r=a.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/i);if(r){const g=Math.max(0,Math.floor(Number(r[1])*.65)),C=Math.max(0,Math.floor(Number(r[2])*.65)),w=Math.max(0,Math.floor(Number(r[3])*.65));return`rgba(${g}, ${C}, ${w}, ${r[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))),O=Math.max(0,Math.min(255,Math.floor(parseInt(g.slice(4,6),16)*.65)));return`#${[C,w,O].map(N=>N.toString(16).padStart(2,"0")).join("")}`}return a},R=(t,a)=>{const r=W.value?.stroke?.color;return r==null?A(a):typeof r=="string"?r:Array.isArray(r)&&r.length?r[t%r.length]??A(a):A(a)},E=t=>{let a=0;for(let n=1;n<t.length;n++){const r=t[n].x-t[n-1].x,p=t[n].y-t[n-1].y;a+=Math.sqrt(r*r+p*p)}return a},se=e.computed(()=>Ce.value==="line"||Kn.value?(Kn.value?F.series.filter(a=>(a.type||Ce.value)==="line"):Qn.value).map((a,n)=>{const r=F.series.findIndex($=>$===a),p=[];let g=[];a.data.forEach(($,K)=>{$==null?g.length>0&&(p.push([...g]),g=[]):g.push({x:nn.value?Gn($):ln(K),y:nn.value?Ml(K):Wn(a,$),index:K})}),g.length>0&&p.push(g);let C="";p.forEach($=>{if($.length>0){let K="";ye.value?K=yo($):K=`M ${$[0].x} ${$[0].y}`+$.slice(1).map(Ve=>` L ${Ve.x} ${Ve.y}`).join(""),C+=(C?" ":"")+K}});const w=p.reduce(($,K)=>$+E(K),0),O=Rt.value.has(r),N=ge.value===r,H=ge.value!==null&&ge.value!==r;return{path:C,color:f(r),strokeDasharray:oo(a),pathLength:w,seriesIndex:r,animationDelay:n*Y.value,isHighlighted:N,isDimmed:H,isHidden:O}}):[]),j=e.computed(()=>{if(!(Ce.value==="line"||Kn.value))return[];const t=Kn.value?F.series.filter(n=>(n.type||Ce.value)==="line"):Qn.value,a=[];return t.forEach((n,r)=>{const p=F.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,O=0;for(let N=g+1;N<n.data.length;N++){const H=n.data[N];if(H==null)O++;else{w=N;break}}if(O>0&&w!==-1){const N=n.data[w],H=nn.value?Gn(C):ln(g),$=nn.value?Ml(g):Wn(n,C),K=nn.value?Gn(N):ln(w),Ve=nn.value?Ml(w):Wn(n,N),je=Rt.value.has(p),de=ge.value===p,be=ge.value!==null&&ge.value!==p;a.push({path:`M ${H} ${$} L ${K} ${Ve}`,color:f(p),seriesIndex:p,animationDelay:r*Y.value,isHighlighted:de,isDimmed:be,isHidden:je,gapSize:O}),g=w-1}}}}),a}),Oe=e.computed(()=>Ce.value==="line"||Kn.value?!ot.value||Hl.value||Ft.value.hasAnimated?[]:(Kn.value?F.series.filter(a=>(a.type||Ce.value)==="line"):Qn.value).map((a,n)=>{const r=F.series.findIndex(O=>O===a);let p="",g=null;a.data.forEach((O,N)=>{if(O!=null){const H={x:nn.value?Gn(O):ln(N),y:nn.value?Ml(N):Wn(a,O)};g===null?p+=`M ${H.x} ${H.y}`:p+=` L ${H.x} ${H.y}`,g=H}else if(g!==null){const H=a.data.findIndex(($,K)=>K>N&&$!==null&&$!==void 0);if(H!==-1){const $={x:nn.value?Gn(a.data[H]):ln(H),y:nn.value?Ml(H):Wn(a,a.data[H])};p+=` L ${$.x} ${$.y}`,g=$}}});const C=a.data.map((O,N)=>O==null?null:{x:nn.value?Gn(O):ln(N),y:nn.value?Ml(N):Wn(a,O)}).filter(O=>O!==null),w=E(C);return{path:p,pathLength:w,color:f(r),strokeDasharray:oo(a),animationDelay:n*Y.value,seriesIndex:r}}):[]),Ne=e.computed(()=>{if(Ce.value!=="line")return[];const t=[];return Qn.value.forEach((a,n)=>{const r=ge.value===n,p=ge.value!==null&&ge.value!==n,g=Rt.value.has(n);a.data.forEach((C,w)=>{C!=null&&t.push({x:ln(w),y:Wn(a,C),color:f(n),value:C,label:F.categories[w]||w.toString(),seriesName:a.name,categoryIndex:w,dataIndex:w,animationDelay:(n*a.data.length+w)*(Y.value/8),isHighlighted:r,isDimmed:p,isHidden:g})})}),t}),ht=e.computed(()=>{if(!Kn.value)return[];const t=[];return F.series.filter(n=>(n.type||Ce.value)==="line").forEach((n,r)=>{const p=F.series.findIndex(O=>O===n),g=ge.value===p,C=ge.value!==null&&ge.value!==p,w=Rt.value.has(p);n.data.forEach((O,N)=>{O!=null&&t.push({x:ln(N),y:Wn(n,O),color:f(p),value:O,label:F.categories[N]||N.toString(),seriesName:n.name,categoryIndex:N,dataIndex:N,animationDelay:(r*n.data.length+N)*(Y.value/8),isHighlighted:g,isDimmed:C,isHidden:w})})}),t}),dn=e.computed(()=>{if(!jt.value)return[];const t=[];return Qn.value.forEach((a,n)=>{if(!a?.data?.length)return;const r=ge.value,p=r!==null&&r===n,g=r!==null&&r!==n,C=Rt.value.has(n);a.data.forEach((w,O)=>{let N,H,$,K,Ve;if(typeof w=="object"&&w!==null&&!Array.isArray(w))N=typeof w.x=="number"?w.x:O,H=typeof w.y=="number"?w.y:0,$=typeof w.size=="number"?w.size:20,K=w.label||F.categories?.[O]||`Point ${O+1}`,Ve=w.image||w.imageUrl;else if(Array.isArray(w)&&w.length>=3)N=typeof w[0]=="number"?w[0]:O,H=typeof w[1]=="number"?w[1]:0,$=typeof w[2]=="number"?w[2]:20,K=w[3]||F.categories?.[O]||`Point ${O+1}`,Ve=w[4];else if(typeof w=="number")N=O,H=w,$=lo(n,O),K=F.categories?.[O]||`Point ${O+1}`;else return;!isFinite(N)||!isFinite(H)||!isFinite($)||t.push({x:ln(N),y:Tl(H),radius:o($),originalX:N,originalY:H,originalSize:$,color:f(n),seriesName:a.name||`Series ${n+1}`,label:K,imageUrl:Ve,seriesIndex:n,dataIndex:O,categoryIndex:Math.round(N),isHighlighted:p,isDimmed:g,isHidden:C,opacity:no.value})})}),t}),mn=e.computed(()=>Ce.value!=="area"?[]:Qn.value.map((t,a)=>{const n=[];let r=[];if(t.data.forEach(($,K)=>{$==null?r.length>0&&(n.push([...r]),r=[]):r.push({x:ln(K),y:Wn(t,$),index:K})}),r.length>0&&n.push(r),n.length===0)return{linePath:"",areaPath:"",color:f(a),isHidden:Rt.value.has(a)};const p=P.value.bottom+1;let g="",C="";n.forEach(($,K)=>{if($.length===0)return;let Ve=`M ${$[0].x} ${$[0].y}`;ye.value&&$.length>1?Ve=yo($):$.slice(1).forEach(de=>{Ve+=` L ${de.x} ${de.y}`}),g+=(g?" ":"")+Ve;let je=`M ${$[0].x} ${p}`;if(je+=` L ${$[0].x} ${$[0].y}`,ye.value&&$.length>1){const de=yo($),be=de.substring(de.indexOf("C")||de.indexOf("Q")||de.indexOf("L"));be?je+=" "+be:$.slice(1).forEach(Se=>{je+=` L ${Se.x} ${Se.y}`})}else $.slice(1).forEach(de=>{je+=` L ${de.x} ${de.y}`});je+=` L ${$[$.length-1].x} ${p} Z`,C+=(C?" ":"")+je});const w=ge.value===a,O=ge.value!==null&&ge.value!==a,N=Rt.value.has(a),H=n.reduce(($,K)=>$+E(K),0);return{linePath:g,areaPath:C,color:f(a),pathLength:H,isHighlighted:w,isDimmed:O,isHidden:N}})),an=e.computed(()=>{if(!(["bar"].includes(Ce.value)||Kn.value))return[];const t=[],{maxX:a}=xt.value,n=Kn.value?F.series.filter(p=>(p.type||Ce.value)==="bar"):Qn.value,r=n.length;if(nn.value){const p=a+1,C=P.value.height/p,w=C*(2/3),O=Math.min(4,w/r*.15),N=w-(r-1)*O,H=Math.max(4,N/r);n.forEach(($,K)=>{const Ve=F.series.findIndex(Se=>Se===$),je=ge.value===Ve,de=ge.value!==null&&ge.value!==Ve,be=Rt.value.has(Ve);$.data.forEach((Se,fe)=>{if(Se==null||typeof Se!="number"||!isFinite(Se))return;const Le=P.value.top+(fe+.5)*C-w/2+K*(H+O),$e=P.value.left,Re=Math.abs(Gn(Se)-P.value.left);let Mt="";if(ye.value&&Re>0){const Pt=Math.min(At.value,H/2,Re/2);Mt=[`M ${$e} ${Le}`,`L ${$e+Re-Pt} ${Le}`,`Q ${$e+Re} ${Le} ${$e+Re} ${Le+Pt}`,`L ${$e+Re} ${Le+H-Pt}`,`Q ${$e+Re} ${Le+H} ${$e+Re-Pt} ${Le+H}`,`L ${$e} ${Le+H}`,"Z"].join(" ")}t.push({x:$e,y:Le,width:Re,height:H,color:f(r===1?fe:Ve),value:Se,label:F.categories[fe]||fe.toString(),seriesName:$.name,animationDelay:(K*n.length+fe)*(Y.value/4),isHighlighted:je,isDimmed:de,isHidden:be,barPath:Mt,isSmooth:ye.value&&Re>0})})})}else{const p=a+1,C=P.value.width/p,w=C*.8,O=w/r,N=O*.05,H=O-N;n.forEach(($,K)=>{const Ve=F.series.findIndex(Se=>Se===$),je=ge.value===Ve,de=ge.value!==null&&ge.value!==Ve,be=Rt.value.has(Ve);$.data.forEach((Se,fe)=>{if(Se==null||typeof Se!="number"||!isFinite(Se))return;const Le=P.value.left+(fe+.5)*C-w/2+K*O+N/2,$e=Tl(Math.max(0,Se)),Re=Math.abs(Tl(0)-Tl(Se));let Mt="";if(ye.value&&Re>0){const Pt=Math.min(At.value,H/2,Re/2);Mt=[`M ${Le} ${$e+Re}`,`L ${Le} ${$e+Pt}`,`Q ${Le} ${$e} ${Le+Pt} ${$e}`,`L ${Le+H-Pt} ${$e}`,`Q ${Le+H} ${$e} ${Le+H} ${$e+Pt}`,`L ${Le+H} ${$e+Re}`,"Z"].join(" ")}t.push({x:Le,y:$e,width:H,height:Re,color:f(r===1?fe:Ve),value:Se,label:F.categories[fe]||fe.toString(),seriesName:$.name,animationDelay:(K*n.length+fe)*(Y.value/4),isHighlighted:je,isDimmed:de,isHidden:be,barPath:Mt,isSmooth:ye.value&&Re>0})})})}return t}),Zt=e.computed(()=>{if(!Sn.value)return[];const t=Qn.value.map((C,w)=>({series:C,originalIndex:w})).filter(({originalIndex:C})=>!Rt.value.has(C));if(t.length===0)return[];let a=Ce.value==="semi-radial"?Math.PI:-Math.PI/2;const n=Ce.value==="semi-radial"?Math.PI:Math.PI*2,r=[],p=(C,w,O,N,H,$)=>{const K=C+(w-C)/2,Ve=w-C,je=zt.value+Math.cos(C)*Wt.value,de=Dt.value+Math.sin(C)*Wt.value,be=zt.value+Math.cos(w)*Wt.value,Se=Dt.value+Math.sin(w)*Wt.value,fe=zt.value+Math.cos(w)*ct.value,Je=Dt.value+Math.sin(w)*ct.value,qe=zt.value+Math.cos(C)*ct.value,Le=Dt.value+Math.sin(C)*ct.value,$e=Ve>Math.PI?1:0,Re=[`M ${je} ${de}`,`A ${Wt.value} ${Wt.value} 0 ${$e} 1 ${be} ${Se}`,`L ${fe} ${Je}`,`A ${ct.value} ${ct.value} 0 ${$e} 0 ${qe} ${Le}`,"Z"].join(" "),Mt=$||f(O);return{path:Re,color:Mt,strokeWidth:Lt.value,strokeColor:R(r.length,Mt),value:H,seriesName:N,opacity:.8,isHighlighted:ge.value===O,isDimmed:ge.value!==null&&ge.value!==O,isHidden:!1,startAngle:C,endAngle:w,midAngle:K}};if(Xl.value){const{series:C,originalIndex:w}=t[0],O=Number(C?.data?.[0]??0),N=Number.isFinite(O)?Math.min(Math.max(O,0),100):0,H=W.value,$=Math.min(Math.max(Number(H?.miniRadial?.minVisiblePercent??1),0),100),Ve=(N<=0?$:N)/100*n,je=Number(H?.miniRadial?.thresholds?.low??33),de=Number(H?.miniRadial?.thresholds?.medium??66),be=H?.miniRadial?.colors?.low||"#E53E3E",Se=H?.miniRadial?.colors?.medium||"#ED8936",fe=H?.miniRadial?.colors?.high||"#38A169",Je=N<=je?be:N<=de?Se:fe,qe=H?.miniRadial?.trackColor||"#E5E7EB",Le=C?.name||"Score";return r.push(p(a,a+n-.001,w+1,"Track",100,qe)),r.push(p(a,a+Ve,w,Le,N,Je)),r}if(t.length===1){const{series:C,originalIndex:w}=t[0],O=C.data[0]||0,N=a,H=a+n-.001,$=N+n/2,K=zt.value+Math.cos(N)*Wt.value,Ve=Dt.value+Math.sin(N)*Wt.value,je=zt.value+Math.cos(H)*Wt.value,de=Dt.value+Math.sin(H)*Wt.value,be=zt.value+Math.cos(H)*ct.value,Se=Dt.value+Math.sin(H)*ct.value,fe=zt.value+Math.cos(N)*ct.value,Je=Dt.value+Math.sin(N)*ct.value,qe=1,Le=[`M ${K} ${Ve}`,`A ${Wt.value} ${Wt.value} 0 ${qe} 1 ${je} ${de}`,`L ${be} ${Se}`,`A ${ct.value} ${ct.value} 0 ${qe} 0 ${fe} ${Je}`,"Z"].join(" "),$e=f(w);return r.push({path:Le,color:$e,strokeWidth:Lt.value,strokeColor:R(0,$e),value:O,seriesName:C.name,opacity:.8,isHighlighted:ge.value===w,isDimmed:!1,isHidden:!1,startAngle:N,endAngle:H,midAngle:$}),r}if(al.value&&t.length===2){const C=t[0],w=t[1],O=Math.min(100,Math.max(0,C.series.data[0]||0)),N=O/100*n;return r.push(p(a,a+N,C.originalIndex,C.series.name,O)),r.push(p(a,a+n,w.originalIndex,w.series.name,100)),r}const g=t.reduce((C,{series:w})=>C+(w.data[0]||0),0);return g===0?[]:(t.forEach(({series:C,originalIndex:w})=>{const O=C.data[0]||0,N=O/g*n,H=a,$=a+N,K=H+N/2,Ve=zt.value+Math.cos(H)*Wt.value,je=Dt.value+Math.sin(H)*Wt.value,de=zt.value+Math.cos($)*Wt.value,be=Dt.value+Math.sin($)*Wt.value,Se=zt.value+Math.cos($)*ct.value,fe=Dt.value+Math.sin($)*ct.value,Je=zt.value+Math.cos(H)*ct.value,qe=Dt.value+Math.sin(H)*ct.value,Le=N>Math.PI?1:0,$e=[`M ${Ve} ${je}`,`A ${Wt.value} ${Wt.value} 0 ${Le} 1 ${de} ${be}`,`L ${Se} ${fe}`,`A ${ct.value} ${ct.value} 0 ${Le} 0 ${Je} ${qe}`,"Z"].join(" "),Re=f(w);r.push({path:$e,color:Re,strokeWidth:Lt.value,strokeColor:R(r.length,Re),value:O,seriesName:C.name,opacity:.8,isHighlighted:ge.value===w,isDimmed:ge.value!==null&&ge.value!==w,isHidden:!1,startAngle:H,endAngle:$,midAngle:K}),a=$}),r)}),kn=e.computed(()=>{const t=Zt.value;return al.value&&t.length>=2?[{segment:t[1],originalIndex:1},{segment:t[0],originalIndex:0}]:t.map((a,n)=>({segment:a,originalIndex:n}))}),fn=e.computed(()=>{if(!Hn.value||!Sn.value)return[];const t=zn.value,a=Nl.value,n=L.value,r=I.value,p=15,g=t*1.3,C=.55,w=($,K)=>{const Ve=zt.value+Math.cos($.midAngle)*ct.value,je=Dt.value+Math.sin($.midAngle)*ct.value,de=zt.value+Math.cos($.midAngle)*(ct.value+a),be=Dt.value+Math.sin($.midAngle)*(ct.value+a),fe=de+n*(K?1:-1),Je=K?de+p:de-p,qe=be-r,Le=`${$.seriesName}: ${en($.value)}`,$e=Le.length*t*C;return{pointerStartX:Ve,pointerStartY:je,pointerEndX:de,pointerEndY:be,horizontalEndX:fe,horizontalEndY:be,textX:Je,textY:qe,text:Le,textWidth:$e,textAnchor:K?"start":"end",isRightSide:K,pointerLineLength:Math.hypot(de-Ve,be-je),horizontalLineLength:Math.hypot(fe-de,0)}},O=($,K)=>{const Ve=Math.abs($.textY-K.textY)<g,je=$.isRightSide?$.textX:$.textX-$.textWidth,de=$.isRightSide?$.textX+$.textWidth:$.textX,be=K.isRightSide?K.textX:K.textX-K.textWidth,Se=K.isRightSide?K.textX+K.textWidth:K.textX,fe=je<Se&&be<de;return Ve&&fe},N=Zt.value.filter($=>!$.isHidden),H=[];for(let $=0;$<N.length;$++){const K=N[$];let Ve=Math.cos(K.midAngle)>=0;if($>0){const de=H[$-1],be=w(K,Ve);O(de,be)&&(Ve=!Ve)}const je=w(K,Ve);H.push({...je,color:K.color,isHighlighted:K.isHighlighted,isDimmed:K.isDimmed})}return H}),sl=t=>{if(!t||t.isHidden)return 0;const a=t.opacity||no.value||.7;return ge.value===null||ge.value===void 0?a:ge.value!==null?t.seriesIndex===ge.value?Math.min(1,a+.1):Math.max(.5,a*.8):a},El=t=>{if(!t||t.isHidden)return 0;const a=t.radius>20?.9:.8;return ge.value!==null?t.seriesIndex===ge.value?Math.min(1,a+.1):a*.7:a},pl=(t,a)=>{if(t)try{if(ge.value===t.seriesIndex?ge.value=null:ge.value=t.seriesIndex,typeof window<"u"&&window.dispatchEvent){const n=new CustomEvent("dss-bubble-click",{detail:{bubble:t,originalEvent:a,chartId:F.chartId}});window.dispatchEvent(n)}}catch(n){console.error("Error in onBubbleClick:",n)}},Ao=(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(" ")},wo=(t,a)=>{if(!t||(a.stopPropagation(),Fo.value=!0,ge.value=t.seriesIndex,Ye.value.show=!1,!ze.value))return;const n=a.target.closest(".dss-custom-chart-container");if(!n)return;const r=n.getBoundingClientRect();let p=a.clientX-r.left+10,g=a.clientY-r.top-10;const C=200,w=120;p+C>xe.value&&(p=a.clientX-r.left-C-10),g+w>r.height&&(g=a.clientY-r.top-w-10),p<0&&(p=10),g<0&&(g=10);const O=gn.value,N=Kt.value,H=O.map($=>{const K=N[$]||$,Ve=To($,t);return Ve?{seriesName:t.seriesName,label:t.label,value:`${K}: ${Ve}`,color:t.color}:null}).filter(Boolean);vt.value={show:!0,x:p,y:g,title:t.label||t.seriesName||"",value:"",bubbleData:H,categoryIndex:void 0,spiderAreas:[]}},To=(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 r=Ln.value[t];if(typeof r=="function")return r(n,a);if(typeof n=="number"){const p=n.toFixed(1);return Zn.value?p+Zn.value:p}return n?.toString()||""},Do=()=>{if(!jt.value||!Ye.value.data||Ye.value.data.length===0)return"Bubbles";const t=[],a=new Set;return Ye.value.data.forEach(n=>{if(n.seriesName&&n.label){const r=`${n.seriesName} - ${n.label}`;a.has(r)||(t.push(r),a.add(r))}else n.seriesName&&(a.has(n.seriesName)||(t.push(n.seriesName),a.add(n.seriesName)))}),t.length>0?t.join(" | "):"Bubbles"},Go=(t,a)=>{t&&(Fo.value=!1,ge.value=null,vt.value.show=!1,vt.value.bubbleData=[])},Ho=(t,a)=>{const n=a.target.closest(".dss-custom-chart-container");if(!n)return;const r=n.getBoundingClientRect(),p=Ul(t.categoryIndex),g=t.description||t.comment||"";let C=a.clientX-r.left+15,w=a.clientY-r.top-10;const O=200,N=g?80:50;C+O>xe.value&&(C=a.clientX-r.left-O-15),w+N>te.value&&(w=a.clientY-r.top-N-10),C<0&&(C=10),w<0&&(w=10),Rn.value={show:!0,x:C,y:w,categoryValue:p,description:g}},so=()=>{Rn.value.show=!1},Dl=e.computed(()=>F.categories.length||Math.max(...Jn.value.map(t=>t.data.length))),fl=e.computed(()=>{let t=0;return Jn.value.forEach(a=>{a.data.forEach(n=>{typeof n=="number"&&(t=Math.max(t,n))})}),t||100}),rl=e.computed(()=>{const t=[],a=Dl.value;for(let n=0;n<a;n++){const r=n*2*Math.PI/a-Math.PI/2,p=zt.value+Math.cos(r)*ct.value,g=Dt.value+Math.sin(r)*ct.value;t.push({x:p,y:g,angle:r,index:n})}return t}),el=e.computed(()=>{const t=[],a=Dl.value;return rl.value.forEach((n,r)=>{const p=ct.value+15,g=r*2*Math.PI/a-Math.PI/2,C=zt.value+Math.cos(g)*p,w=Dt.value+Math.sin(g)*p+5;let O="middle",N="middle";Math.abs(Math.cos(g))>.5&&(O=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:F.categories[r]||`Axis ${r+1}`,anchor:O,baseline:N})}),t}),oa=e.ref(new Set),ha=(t,a,n)=>{const r=`current-${n}`,p=oa.value.has(r),g=a.fillOpacity??kt.value;return!p&&ge.value===null?g:a.isHighlighted||p?a.isComparison?g:g+.15:a.isDimmed?g*.3:g},aa=e.computed(()=>{if(!wn.value)return[];const t=[],a=Dl.value;return Qn.value.map((r,p)=>({series:r,seriesIndex:p})).sort((r,p)=>{const g=qn(r.series)?0:1,C=qn(p.series)?0:1;return g-C}).forEach(({series:r,seriesIndex:p})=>{const g=qn(r),C=[],w=[],O=[],N=ge.value===p,H=ge.value!==null&&ge.value!==p,$=Rt.value.has(p);for(let K=0;K<a;K++){const Ve=r.data[K]||0,de=Ve/fl.value*ct.value,be=K*2*Math.PI/a-Math.PI/2,Se=zt.value+Math.cos(be)*de,fe=Dt.value+Math.sin(be)*de;C.push(`${Se},${fe}`),w.push({x:Se,y:fe}),O.push({x:Se,y:fe,value:Ve,label:F.categories[K]||`Axis ${K+1}`,seriesName:r.name})}t.push({points:C.join(" "),polygonPoints:w,dataPoints:O,color:ml(r,p),fillOpacity:g?ao.value.fillOpacity:kt.value,strokeDasharray:g?oo(r)||ao.value.strokeDasharray:null,pointRadius:jl(r,g),seriesName:r.name,value:`${r.name}: ${r.data.join(", ")}`,isHighlighted:N,isDimmed:H,isHidden:$,isComparison:g,seriesIndex:p})}),t}),ya=(t,a)=>{if(!a||a.length<3)return!1;let n=!1;for(let r=0,p=a.length-1;r<a.length;p=r++){const g=a[r].x,C=a[r].y,w=a[p].x,O=a[p].y;C>t.y!=O>t.y&&t.x<(w-g)*(t.y-C)/(O-C)+g&&(n=!n)}return n},ka=t=>{if(!wn.value)return;const a=t.currentTarget.closest(".dss-custom-chart-container");if(!a)return;const n=a.getBoundingClientRect(),r=M.value?.getBoundingClientRect();if(!r)return;const p=t.clientX-r.left,g=t.clientY-r.top,C=aa.value.filter(w=>w.isHidden?!1:ya({x:p,y:g},w.polygonPoints));if(C.length>0){C.length,ge.value=C[0].seriesIndex;const w=t.clientX-n.left+10,O=t.clientY-n.top-10,N=C.length>1?460:260,H=70+Dl.value*20;let $=w,K=O;$+N>xe.value&&($=t.clientX-n.left-N-10),K+H>te.value&&(K=t.clientY-n.top-H-10),$<0&&($=10),K<0&&(K=10);const Ve=C.map(je=>({seriesName:je.seriesName,color:je.color,points:je.dataPoints.map(de=>({label:de.label,value:en(de.value)}))}));vt.value={show:!0,x:$,y:K,title:"",value:"",bubbleData:[],spiderAreas:Ve}}else Sl()},Ro=e.computed(()=>{const t=W.value;return t.logos.map((a,n)=>{const r=F.series[a.seriesIndex];if(!r||!r.data||r.data.length===0||Rt.value.has(a.seriesIndex))return null;let p,g;if(En.value){let w=-1,O=null;for(let H=r.data.length-1;H>=0;H--)if(r.data[H]!==null&&r.data[H]!==void 0){w=H,O=r.data[H];break}if(w===-1||O===null)return null;const N=r.data.map((H,$)=>H==null?null:{x:ln($),y:Wn(r,H),index:$}).filter(H=>H!==null);if(t.animations.enabled&&!Hl.value&&t.animations.type==="draw"&&t.chart.type==="line"&&(Ft.value.isAnimating||!Ft.value.hasAnimated))if(Ft.value.isAnimating){const H=Ft.value.currentFrame/Ft.value.totalFrames,$=ea(t.animations.easing,Math.min(H,1)),K=Ba(N,$);p=K.x+(a.offsetX||0),g=K.y+(a.offsetY||0)}else p=N[0].x+(a.offsetX||0),g=N[0].y+(a.offsetY||0);else p=ln(w)+(a.offsetX||0),g=Tl(O)+(a.offsetY||0)}else if(Sn.value||wn.value){const w=Math.PI*2/t.logos.length*n;p=zt.value+Math.cos(w)*(ct.value+30)+(a.offsetX||0),g=Dt.value+Math.sin(w)*(ct.value+30)+(a.offsetY||0)}return{...a,x:p,y:g,seriesIndex:a.seriesIndex}}).filter(Boolean)}),Ca=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")},ba=t=>{console.warn(`Logo ${t} failed to load, keeping fallback circle`);const a=document.querySelector(`.dss-logo-image-${t}`);a&&(a.style.display="none")},Qo=t=>{Rt.value.has(t)?Rt.value.delete(t):Rt.value.add(t)},wa=e.computed(()=>{if(!vt.value.show&&!(Ke.value&&Ye.value.show&&!ae.value.isZooming))return{display:"none"};let t,a;if(Ke.value&&Ye.value.show&&!ae.value.isZooming){t=Ye.value.x+15,a=P.value.top;const n=jt.value?200:150;t+n>xe.value&&(t=Ye.value.x-n-15),t<0&&(t=10),a<10&&(a=10)}else t=vt.value.x,a=vt.value.y;return{left:t+"px",top:a+"px"}}),ql=(t,a)=>{if(!ze.value||xo.value)return;const r=a.target.closest(".dss-custom-chart-container").getBoundingClientRect();let p=a.clientX-r.left+10,g=a.clientY-r.top-10;const C=200,w=120,O=xe.value,N=te.value;p+C>O&&(p=a.clientX-r.left-C-10),g+w>N&&(g=a.clientY-r.top-w-10),p<0&&(p=10),g<0&&(g=10);let H;typeof t.categoryIndex=="number"?H=t.categoryIndex:typeof t.dataIndex=="number"?H=t.dataIndex:t.label&&F.categories.includes(t.label)&&(H=F.categories.indexOf(t.label));const $=(nn.value||Ce.value==="bar")&&t.label?t.label:t.seriesName||t.label||"";vt.value={show:!0,x:p,y:g,title:$,value:en(t.value)||"",categoryIndex:H,spiderAreas:[]}},Jo=e.ref(!1),Fo=e.ref(!1),Sl=()=>{vt.value.show=!1,vt.value.spiderAreas=[],vt.value.bubbleData=[],Ye.value.show=!1,Jo.value||(ge.value=null)},xo=e.ref(!1),Eo=(t,a)=>{xo.value=!0,vt.value.show=!1,Ye.value.show=!1;const r=a.target.closest(".dss-custom-chart-container").getBoundingClientRect();let p=a.clientX-r.left+15,g=a.clientY-r.top-10;const C=250;p+C>xe.value&&(p=a.clientX-r.left-C-15),p<0&&(p=10),g<0&&(g=10),Ot.value={show:!0,x:p,y:g,content:t.texts,count:t.totalCount}},So=()=>{xo.value=!1,Ot.value.show=!1},Ft=e.ref({isAnimating:!1,currentFrame:0,totalFrames:0,animationId:null,hasAnimated:!1}),ea=(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}},Hl=e.computed(()=>He.value?window.matchMedia("(prefers-reduced-motion: reduce)").matches:!1),sa=()=>{if(!ot.value||Hl.value){Ft.value.hasAnimated=!0,In.value&&($l.value=1);return}In.value&&($l.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=ea(V.value,Math.min(a,1));xa(n),In.value&&($l.value=n),a<1?(Ft.value.currentFrame++,Ft.value.animationId=requestAnimationFrame(t)):Ea()};Ft.value.animationId=requestAnimationFrame(t)},xa=t=>{const a=z.value;a&&a.style.setProperty("--dss-animation-progress",t)},Ea=()=>{Ft.value.isAnimating=!1,Ft.value.hasAnimated=!0,In.value&&($l.value=1),Ft.value.animationId&&(cancelAnimationFrame(Ft.value.animationId),Ft.value.animationId=null)},ta=e.computed(()=>!Sn.value||Ft.value.hasAnimated?!0:In.value?$l.value>=1:bl.value?Qt.value>=1:!0),ra=e.computed(()=>Hn.value&&ta.value),Io=e.ref(!1);e.watch(ra,t=>{t?(Io.value=!1,e.nextTick(()=>{requestAnimationFrame(()=>{Io.value=!0})})):Io.value=!1},{immediate:!0});const Sa=e.computed(()=>{if(!ot.value||Hl.value||Ft.value.hasAnimated)return{};const t={};return t["--dss-animation-duration"]=`${S.value}ms`,t["--dss-animation-easing"]=Va(V.value),t["--dss-stagger-delay"]=`${Y.value}ms`,t}),Va=t=>({linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out"})[t]||"ease-out",Na=()=>{if(!ot.value||Hl.value)return"";const t=["dss-chart-animated"];return Ft.value.hasAnimated||t.push(`dss-animate-${sn.value}`),Ft.value.hasAnimated||(Sn.value&&Ce.value!=="semi-radial"?t.push("dss-animate-fill"):Sn.value||t.push(`dss-animate-${sn.value}`)),Ft.value.isAnimating&&t.push("dss-is-animating"),t.join(" ")};e.watch(()=>F.series,(t,a)=>{le.value&&a&&Ft.value.hasAnimated&&(Ft.value.hasAnimated=!1,e.nextTick(()=>{setTimeout(()=>sa(),b.value)}))},{deep:!0}),e.watch(()=>ae.value.isZooming,(t,a)=>{a&&!t&&setTimeout(()=>{Mn()},50)}),e.watch(()=>[ae.value.scale,ae.value.offsetX],()=>{!ae.value.isZooming&&!ae.value.isDragging&&Mn()},{flush:"post"}),e.watch([Xt,Ze],([t,a])=>{ae.value.minScale=t,ae.value.maxScale=a,(ae.value.scale<t||ae.value.scale>a)&&Jl()},{immediate:!0}),e.watch(()=>F.locale,t=>{t&&t!==D.value&&(D.value=t)},{immediate:!0}),e.watch(()=>gt.value.show,t=>{t?e.nextTick(()=>{document.addEventListener("click",go)}):document.removeEventListener("click",go)}),e.onMounted(()=>{ge.value=null,In.value&&(!ot.value||Hl.value)&&($l.value=1),x(),z.value&&typeof ResizeObserver<"u"&&(v=new ResizeObserver(t=>{const a=t[0];!a||!a.contentRect||(we&&cancelAnimationFrame(we),we=requestAnimationFrame(()=>{we=null;const{width:n,height:r}=a.contentRect;ut.value=Math.round(n),J.value=Math.round(r),ve.value&&(Me.value=ve.value.offsetHeight||ke)}))}),v.observe(z.value)),ot.value&&!Hl.value?Ce.value==="semi-radial"?setTimeout(()=>jo(),b.value):setTimeout(()=>sa(),b.value):(Ft.value.hasAnimated=!0,Ce.value==="semi-radial"&&(Qt.value=1)),document.addEventListener("mousemove",ia),document.addEventListener("mouseup",ca),document.addEventListener("click",vo)}),e.onUnmounted(()=>{we&&cancelAnimationFrame(we),v&&z.value&&(v.unobserve(z.value),v.disconnect(),v=null),Ft.value.animationId&&cancelAnimationFrame(Ft.value.animationId),Ol&&(cancelAnimationFrame(Ol),Ol=null),ae.value.zoomTimeout&&clearTimeout(ae.value.zoomTimeout),document.removeEventListener("mousemove",ia),document.removeEventListener("mouseup",ca),document.removeEventListener("click",vo),document.removeEventListener("click",go)});const ia=t=>{if(ae.value.isDragging&&ae.value.scale>1&&En.value){Ye.value.show=!1;const a=t.clientX-ae.value.lastMouseX,{minX:n,maxX:r}=xt.value,p=r-n||1,C=a*.8;ae.value.offsetX+=C;const w=p/ae.value.scale,O=p-w,N=0,H=-O/p*P.value.width,$=N;ae.value.offsetX=Math.max(H,Math.min($,ae.value.offsetX)),ae.value.lastMouseX=t.clientX,ae.value.lastMouseY=t.clientY}},ca=()=>{ae.value.isDragging&&(ae.value.isDragging=!1,setTimeout(()=>{!ae.value.isDragging&&ae.value.isZooming},100))},Ba=(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 r=0;const p=[];for(let w=1;w<n.length;w++){const O=n[w].x-n[w-1].x,N=n[w].y-n[w-1].y,H=Math.sqrt(O*O+N*N);p.push(H),r+=H}const g=r*a;let C=0;for(let w=0;w<p.length;w++){const O=C+p[w];if(g<=O){const N=(g-C)/p[w],H=n[w],$=n[w+1];return{x:H.x+($.x-H.x)*N,y:H.y+($.y-H.y)*N}}C=O}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",[Na(),{"dss-chart-fill-width":Ue.value,"dss-chart-fill-height":We.value,"dss-chart-compact":Sn.value&&!Q.value}]]),style:e.normalizeStyle({width:Ue.value?"100%":xe.value+"px",height:lt.value,...Ue.value||We.value?{overflow:Sn.value?"visible":"hidden",maxWidth:"100%",maxHeight:"100%"}:{},...Sa.value,cursor:Yo()}),"data-chart-type":Ce.value,ref_key:"containerEl",ref:z,onWheel:Vo,onMousedown:Xo,onMousemove:un,onMouseup:ho,onMouseleave:Pn,onDblclick:Jl,onContextmenu:e.withModifiers(Zl,["prevent"]),onClick:e.withModifiers(Yn,["left"]),onWheelCapture:Vo},[e.createElementVNode("div",{class:"dss-chart-header",ref_key:"headerEl",ref:ve},[e.createElementVNode("div",Vs,[dt.value?(e.openBlock(),e.createElementBlock("div",Ns,e.toDisplayString(dt.value),1)):e.createCommentVNode("",!0),yt.value?(e.openBlock(),e.createElementBlock("div",Bs,e.toDisplayString(yt.value),1)):e.createCommentVNode("",!0)]),Q.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(F.series,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-${r}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":Rt.value.has(r),"dss-legend-hovered":ge.value===r,"dss-legend-dimmed":ge.value!==null&&ge.value!==r}]),onClick:p=>Qo(r),onMouseenter:p=>Gt(r),onMouseleave:Fl,style:e.normalizeStyle({animationDelay:`${r*100}ms`})},[e.createElementVNode("div",{class:e.normalizeClass(["dss-legend-color",{"dss-legend-color--comparison":wn.value&&qn(n)}]),style:e.normalizeStyle({backgroundColor:wn.value&&qn(n)?"transparent":xl(n,r),borderColor:xl(n,r)})},null,6),e.createElementVNode("span",_s,e.toDisplayString(n.name),1)],46,Ms))),128))],2)):e.createCommentVNode("",!0),Q.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(F.series,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-${r}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":Rt.value.has(r),"dss-legend-hovered":ge.value===r,"dss-legend-dimmed":ge.value!==null&&ge.value!==r}]),onClick:p=>Qo(r),onMouseenter:p=>Gt(r),onMouseleave:Fl,style:e.normalizeStyle({animationDelay:`${r*100}ms`})},[e.createElementVNode("div",{class:e.normalizeClass(["dss-legend-color",{"dss-legend-color--comparison":wn.value&&qn(n)}]),style:e.normalizeStyle({backgroundColor:wn.value&&qn(n)?"transparent":xl(n,r),borderColor:xl(n,r)})},null,6),e.createElementVNode("span",Ls,e.toDisplayString(n.name),1)],46,$s))),128))],2)):e.createCommentVNode("",!0)],512),T.showAddMarkerButton&&wt.value&&it.value.addMarker&&(En.value||jt.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-add-marker-button",onClick:Uo,title:e.unref(_)("chart.contextMenu.addMarker")},[e.createElementVNode("img",{src:St.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,Ts),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,As)):e.createCommentVNode("",!0),e.createElementVNode("div",Ds,[jt.value&&Et.value?(e.openBlock(),e.createElementBlock("div",Hs,"Bubble size: "+e.toDisplayString(Et.value),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{width:xe.value,height:te.value,class:"dss-chart-svg","data-smooth":ye.value,"data-animated":ot.value,ref_key:"svgEl",ref:M},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",{id:X.value},[e.createElementVNode("rect",{x:0,y:P.value.top,width:xe.value,height:P.value.height*4},null,8,Is)],8,Fs),bl.value?(e.openBlock(),e.createElementBlock("clipPath",{key:0,id:eo.value},[e.createElementVNode("path",{d:zl.value},null,8,Ps)],8,zs)):e.createCommentVNode("",!0),In.value?(e.openBlock(),e.createElementBlock("clipPath",{key:1,id:No.value},[e.createElementVNode("path",{d:Bo.value},null,8,qs)],8,Os)):e.createCommentVNode("",!0)]),En.value||jt.value?(e.openBlock(),e.createElementBlock("g",Ws,[Ut.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(i.value,(n,r)=>(e.openBlock(),e.createElementBlock("line",{key:`h-grid-${r}`,x1:P.value.left,x2:P.value.right,y1:n.y,y2:n.y,stroke:"#e0e0e0","stroke-width":"1","stroke-dasharray":"4,2",style:e.normalizeStyle({animationDelay:`${r*50}ms`})},null,12,Us))),128))],8,Zs)):e.createCommentVNode("",!0),e.createElementVNode("g",Xs,[e.createElementVNode("line",{x1:P.value.left,x2:P.value.right,y1:P.value.bottom,y2:P.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,Ys),e.createElementVNode("line",{x1:P.value.left,x2:P.value.left,y1:P.value.top,y2:P.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,js),Ll.value?(e.openBlock(),e.createElementBlock("line",{key:0,x1:P.value.right,x2:P.value.right,y1:P.value.top,y2:P.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,Ks)):e.createCommentVNode("",!0)]),e.createElementVNode("g",Gs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(n,r)=>(e.openBlock(),e.createElementBlock("text",{key:`x-${r}`,x:n.x,y:n.y,"text-anchor":"middle","font-size":"12",fill:"#666",style:e.normalizeStyle({animationDelay:`${r*100}ms`})},e.toDisplayString(n.text),13,Qs))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(n,r)=>(e.openBlock(),e.createElementBlock("text",{key:`y-${r}`,x:n.x,y:n.y,"text-anchor":"end","font-size":"12",fill:"#666","dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${r*80}ms`})},e.toDisplayString(n.text),13,Js))),128)),Ll.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(m.value,(n,r)=>(e.openBlock(),e.createElementBlock("text",{key:`y-secondary-${r}`,x:n.x,y:n.y,"text-anchor":"start","font-size":"12",fill:"#666","dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${r*80}ms`})},e.toDisplayString(n.text),13,er))),128)):e.createCommentVNode("",!0),Ht.value?(e.openBlock(),e.createElementBlock("text",{key:1,x:P.value.left+P.value.width/2,y:P.value.bottom+45,"text-anchor":"middle","font-size":"14",fill:"#666"},e.toDisplayString(Ht.value),9,tr)):e.createCommentVNode("",!0),It.value?(e.openBlock(),e.createElementBlock("text",{key:2,x:15,y:P.value.top+12+P.value.height/2,"text-anchor":"middle","font-size":"14",fill:"#666",transform:`rotate(-90, 15, ${P.value.top+P.value.height/2})`},e.toDisplayString(It.value),9,nr)):e.createCommentVNode("",!0),Ll.value&&pe.value?(e.openBlock(),e.createElementBlock("text",{key:3,x:xe.value-15,y:P.value.top+12+P.value.height/2,"text-anchor":"middle","font-size":"14",fill:"#666",transform:`rotate(90, ${xe.value-15}, ${P.value.top+P.value.height/2})`},e.toDisplayString(pe.value),9,lr)):e.createCommentVNode("",!0)]),bn.value.length>0?(e.openBlock(),e.createElementBlock("g",or,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(bn.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:P.value.bottom,y2:P.value.top,stroke:"#698dbe","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:r=>Eo(n,r),onMouseleave:So},null,40,sr)):e.createCommentVNode("",!0),n.hasAuto&&!n.hasManual?(e.openBlock(),e.createElementBlock("line",{key:1,x1:n.x,x2:n.x,y1:P.value.bottom,y2:P.value.top,stroke:"#a1d499","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:r=>Eo(n,r),onMouseleave:So},null,40,rr)):e.createCommentVNode("",!0),n.hasAuto&&n.hasManual?(e.openBlock(),e.createElementBlock("line",{key:2,x1:n.x,x2:n.x,y1:P.value.bottom,y2:P.value.top,stroke:"#698dbe","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:r=>Eo(n,r),onMouseleave:So},null,40,ir)):e.createCommentVNode("",!0)],8,ar),n.hasManual&&n.hasAuto?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:n.x+8,cy:Math.max(15,P.value.top-10),r:"14",fill:"#a1d499",stroke:"#fafafa","stroke-width":"2",class:"flag-count-circle",onMouseover:r=>Eo(n,r),onMouseleave:So},null,40,cr)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:n.x,cy:Math.max(15,P.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:r=>Eo(n,r),onMouseleave:So},null,40,ur),e.createElementVNode("text",{x:n.x,y:Math.max(15,P.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,dr)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",{class:"dss-chart-data","clip-path":me.value},[Kn.value?(e.openBlock(),e.createElementBlock("g",pr,[e.createElementVNode("g",{class:e.normalizeClass(["dss-bar-chart",{"dss-horizontal-bars":nn.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(an.value,(n,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`mixed-bar-${r}`},[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=>ql(n,p),onMouseleave:Sl},null,46,fr)):(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=>ql(n,p),onMouseleave:Sl},null,46,vr))],64))),128))],2),e.createElementVNode("g",gr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(se.value,(n,r)=>(e.openBlock(),e.createElementBlock("path",{key:`mixed-line-${r}`,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,hr))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,(n,r)=>(e.openBlock(),e.createElementBlock("path",{key:`mixed-gap-connector-${r}`,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,yr))),128)),$t.value>0||ne.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(ht.value,(n,r)=>(e.openBlock(),e.createElementBlock("circle",{key:`mixed-point-${r}`,cx:n.x,cy:n.y,r:U(n.isHighlighted?Z(n,$t.value)+2:Z(n,$t.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=>ql(n,p),onMouseleave:Sl},null,46,kr))),128)):e.createCommentVNode("",!0)])])):Ce.value==="line"?(e.openBlock(),e.createElementBlock("g",Cr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Oe.value,(n,r)=>(e.openBlock(),e.createElementBlock("path",{key:`anim-${r}`,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,br))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(se.value,(n,r)=>(e.openBlock(),e.createElementBlock("path",{key:`line-${r}`,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,wr))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,(n,r)=>(e.openBlock(),e.createElementBlock("path",{key:`gap-connector-${r}`,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,xr))),128)),$t.value>0||ne.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(Ne.value,(n,r)=>(e.openBlock(),e.createElementBlock("circle",{key:`point-${r}`,cx:n.x,cy:n.y,r:U(n.isHighlighted?Z(n,$t.value)+2:Z(n,$t.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=>ql(n,p),onMouseleave:Sl},null,46,Er))),128)):e.createCommentVNode("",!0)])):Ce.value==="area"?(e.openBlock(),e.createElementBlock("g",Sr,[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(mn.value,(n,r)=>(e.openBlock(),e.createElementBlock("mask",{key:`mask-${r}`,id:`area-mask-${r}-${T.chartId}`},[e.createElementVNode("rect",{x:P.value.left-10,y:P.value.top-10,width:P.value.width+20,height:P.value.height+20,fill:"#fafafa",class:"dss-area-mask-rect",style:e.normalizeStyle({"--dss-mask-width":`${P.value.width+20}px`})},null,12,Nr)],8,Vr))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(mn.value,(n,r)=>(e.openBlock(),e.createElementBlock("path",{key:`area-fill-${r}`,d:n.areaPath,fill:n.color,"fill-opacity":n.isHighlighted?ie.value+.2:ie.value,mask:`url(#area-mask-${r}-${T.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,Br))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(mn.value,(n,r)=>(e.openBlock(),e.createElementBlock("path",{key:`area-line-${r}`,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:`${r*Y.value}ms`})},null,14,Mr))),128))])):Ce.value==="bar"?(e.openBlock(),e.createElementBlock("g",{key:3,class:e.normalizeClass({"dss-horizontal-bars":nn.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(an.value,(n,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bar-${r}`},[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=>ql(n,p),onMouseleave:Sl},null,46,_r)):(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=>ql(n,p),onMouseleave:Sl},null,46,$r))],64))),128))],2)):e.createCommentVNode("",!0)],8,mr),Ke.value&&Ye.value.show&&!ae.value.isZooming?(e.openBlock(),e.createElementBlock("g",{key:2,class:"dss-crosshair","clip-path":me.value},[e.createElementVNode("line",{x1:Ye.value.x,x2:Ye.value.x,y1:P.value.top,y2:P.value.bottom,stroke:Vt.value,"stroke-width":"1","stroke-dasharray":"4,4",opacity:"0.8"},null,8,Ar),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ye.value.data,(n,r)=>(e.openBlock(),e.createElementBlock("circle",{key:`dss-crosshair-point-${r}`,cx:Ye.value.x,cy:n.y,r:U($t.value+2),fill:n.color,stroke:"none",opacity:"0.9"},null,8,Tr))),128))],8,Lr)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),jt.value?(e.openBlock(),e.createElementBlock("g",Dr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(dn.value,(n,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bubble-${r}`},[n?(e.openBlock(),e.createElementBlock("g",Hr,[e.createElementVNode("circle",{cx:n.x,cy:n.y,r:U(n.radius),fill:n.color,"fill-opacity":sl(n),stroke:n.color,"stroke-width":"1","stroke-opacity":"0.8",class:e.normalizeClass(Ao(n,r)),style:{cursor:"pointer",transition:"all 0.3s ease"},onMouseenter:p=>wo(n,p),onMouseleave:p=>Go(n),onClick:p=>pl(n,p)},null,42,Rr),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-${r} ${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:El(n)}),onLoad:p=>Ko(r),onError:p=>_o(r),onMouseenter:p=>wo(n,p),onMouseleave:p=>Go(n),onClick:p=>pl(n,p)},null,46,Fr)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0),Sn.value?(e.openBlock(),e.createElementBlock("g",{key:2,class:"radial-chart",transform:Il.value},[Ce.value==="radial"?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:zt.value,cy:Dt.value,r:ct.value,fill:"none",stroke:"#e0e0e0","stroke-width":"1"},null,8,zr)):e.createCommentVNode("",!0),e.createElementVNode("g",{class:"dss-radial-data","data-chart-type":Ce.value,"clip-path":Yl.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(kn.value,(n,r)=>(e.openBlock(),e.createElementBlock("path",{key:`radial-${n.originalIndex}-${r}`,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":Pl(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=>ql(n.segment,p),onMouseleave:Sl},null,42,Or))),128))],8,Pr),B.value&&ta.value?(e.openBlock(),e.createElementBlock("g",qr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(vn.value,(n,r)=>e.withDirectives((e.openBlock(),e.createElementBlock("text",{key:`radial-segment-label-${r}`,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,Wr)),[[e.vShow,n.show]])),128))])):e.createCommentVNode("",!0),Ae.value&&(ta.value||bl.value||Xl.value)?(e.openBlock(),e.createElementBlock("text",{key:2,x:st.value.x,y:st.value.y,"text-anchor":"middle","dominant-baseline":"middle","font-size":mt.value,fill:rt.value,class:"dss-radial-data-center"},e.toDisplayString(ft.value),9,Zr)):e.createCommentVNode("",!0),ra.value?(e.openBlock(),e.createElementBlock("g",{key:3,class:e.normalizeClass(["dss-radial-labels dss-radial-labels-initial",{"dss-radial-labels-animated":Io.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(fn.value,(n,r)=>(e.openBlock(),e.createElementBlock("g",{key:`radial-label-${r}`,class:e.normalizeClass(["dss-radial-label-group",{"dss-label-highlighted":n.isHighlighted,"dss-label-dimmed":n.isDimmed}]),style:e.normalizeStyle({"--label-delay":`${r*.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,Ur),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,Xr),e.createElementVNode("text",{class:"dss-radial-label-text",x:n.textX,y:n.textY,"text-anchor":n.textAnchor,"font-size":zn.value,"dominant-baseline":"middle"},e.toDisplayString(n.text),9,Yr)],6))),128))],2)):e.createCommentVNode("",!0)],8,Ir)):e.createCommentVNode("",!0),wn.value?(e.openBlock(),e.createElementBlock("g",{key:3,class:"dss-spider-chart",transform:Il.value},[Ut.value?(e.openBlock(),e.createElementBlock("g",Kr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ie.value,(n,r)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-grid-circle-${r}`,cx:zt.value,cy:Dt.value,r:U(n),fill:"none",stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${r*150}ms`})},null,12,Gr))),128)),e.createElementVNode("g",Qr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ie.value,(n,r)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-grid-label-group-${r}`},[e.createElementVNode("rect",{x:zt.value-16,y:Dt.value-n-7,width:"32",height:"16",fill:"transparent",stroke:"none"},null,8,Jr),e.createElementVNode("text",{x:zt.value,y:Dt.value-n+2,"text-anchor":"middle","dominant-baseline":"central",class:"dss-spider-grid-label",style:{fontSize:"10px",fill:"#999",fontWeight:"600"}},e.toDisplayString(bt(r)),9,ei)]))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(rl.value,(n,r)=>(e.openBlock(),e.createElementBlock("line",{key:`spider-axis-${r}`,x1:zt.value,x2:n.x,y1:Dt.value,y2:n.y,stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${r*100}ms`})},null,12,ti))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",ni,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(el.value,(n,r)=>(e.openBlock(),e.createElementBlock("text",{key:`spider-label-${r}`,x:n.x+Math.cos(r*2*Math.PI/Dl.value-Math.PI/2)*16,y:n.y+Math.sin(r*2*Math.PI/Dl.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:`${r*120}ms`})},e.toDisplayString(n.text.charAt(0).toUpperCase()+n.text.slice(1)),13,li))),128))]),e.createElementVNode("g",{class:"dss-spider-data",onMousemove:ka,onMouseleave:Sl},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(aa.value,(n,r)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-${r}`},[e.createElementVNode("polygon",{points:n.points,fill:n.color,"fill-opacity":ha("current",n,r),stroke:n.color,"stroke-width":n.isHighlighted?Pe.value+1:Pe.value,"stroke-dasharray":n.strokeDasharray||void 0,"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:`${r*Y.value}ms`,transition:"all 0.2s ease"})},null,14,oi),n.pointRadius>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.dataPoints,(p,g)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-point-${r}-${g}`,cx:p.x,cy:p.y,r:U(n.isHighlighted?n.pointRadius+1:n.pointRadius),fill:n.isComparison?"none":n.color,stroke:n.isComparison?n.color:"none","stroke-width":n.isComparison?2:0,class:e.normalizeClass({"dss-point-highlighted":n.isHighlighted,"dss-point-dimmed":n.isDimmed,"dss-point-hidden":n.isHidden}),style:e.normalizeStyle({animationDelay:`${r*Y.value+g*50}ms`,transition:"all 0.2s ease"}),onMouseover:C=>ql(p,C),onMouseleave:Sl},null,46,ai))),128)):e.createCommentVNode("",!0)]))),128))],32)],8,jr)):e.createCommentVNode("",!0),e.createElementVNode("g",si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ro.value,(n,r)=>(e.openBlock(),e.createElementBlock("circle",{key:`logo-fallback-${r}`,cx:n.x,cy:n.y,r:U(n.width/2),fill:f(n.seriesIndex),stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass(`logo-fallback-${r}`),style:e.normalizeStyle({animationDelay:`${r*200}ms`})},null,14,ri))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ro.value,(n,r)=>(e.openBlock(),e.createElementBlock("image",{key:`logo-${r}`,x:n.x-n.width/2,y:n.y-n.height/2,width:n.width,height:n.height,"xlink:href":n.url,onLoad:p=>Ca(r),onError:p=>ba(r),preserveAspectRatio:"xMidYMid slice",class:e.normalizeClass(`dss-logo-image-${r}`),"clip-path":`circle(${n.width/2}px at ${n.width/2}px ${n.height/2}px)`,style:e.normalizeStyle({animationDelay:`${r*200}ms`})},null,46,ii))),128))])],8,Rs))]),il.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:te.value+"px",backgroundImage:`url('${Xn.value}')`,backgroundRepeat:"no-repeat",...Rl.value,opacity:_n.value,pointerEvents:"none",zIndex:10})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(vl.value,(n,r)=>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:Vn.value+"px",height:Vn.value+"px",backgroundColor:"#fafafa",borderRadius:"50%",border:"2px solid #ddd",cursor:"pointer",zIndex:500}),onClick:e.withModifiers(p=>y(n),["stop"]),onMouseenter:p=>Ho(n,p),onMouseleave:so},[e.createElementVNode("img",{src:cl(n),class:"dss-marker-icon",alt:"Marker Icon",style:{width:"100%",height:"100%","object-fit":"contain","border-radius":"50%","pointer-events":"none"}},null,8,ui)],44,ci)),[[e.vShow,pn.value]])),128)),Rn.value.show?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-marker-tooltip",style:e.normalizeStyle({left:Rn.value.x+"px",top:Rn.value.y+"px"})},[e.createElementVNode("div",di,e.toDisplayString(Rn.value.categoryValue),1),Rn.value.description?(e.openBlock(),e.createElementBlock("div",mi,e.toDisplayString(Rn.value.description),1)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),ze.value&&(vt.value.show||Ke.value&&Ye.value.show&&!ae.value.isZooming)?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["dss-chart-tooltip",{"dss-crosshair-tooltip":Ke.value&&Ye.value.show&&!ae.value.isZooming,"dss-spider-tooltip":wn.value&&vt.value.spiderAreas&&vt.value.spiderAreas.length>0}]),style:e.normalizeStyle(wa.value)},[!Ke.value||!Ye.value.show||ae.value.isZooming?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[wn.value&&vt.value.spiderAreas&&vt.value.spiderAreas.length>0?(e.openBlock(),e.createElementBlock("div",pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(vt.value.spiderAreas,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:`spider-tooltip-area-${r}`,class:"dss-spider-tooltip-area"},[e.createElementVNode("div",fi,[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-${r}-${g}`,class:"dss-tooltip-series"},[e.createElementVNode("span",vi,e.toDisplayString(p.label),1),e.createElementVNode("span",gi,e.toDisplayString(p.value),1)]))),128))]))),128))])):jt.value&&vt.value.bubbleData&&vt.value.bubbleData.length>0?(e.openBlock(),e.createElementBlock("div",hi,[vt.value.title?(e.openBlock(),e.createElementBlock("div",yi,e.toDisplayString(vt.value.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",ki,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(vt.value.bubbleData,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:`bubble-tooltip-${r}`,class:"dss-bubble-tooltip-item"},e.toDisplayString(n.value),1))),128))])])):(e.openBlock(),e.createElementBlock("div",Ci,[e.createElementVNode("div",bi,e.toDisplayString(vt.value.title),1),e.createElementVNode("div",wi,e.toDisplayString(vt.value.value),1)])),vt.value.categoryIndex!==void 0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[Tn(vt.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",xi,[a[5]||(a[5]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Ei,e.toDisplayString(e.unref(_)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tn(vt.value.categoryIndex).flagGroups,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-flag-group-${r}`},[e.createElementVNode("div",Si,[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-${r}-${g}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",Vi,[e.createElementVNode("div",Ni,e.toDisplayString(p.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),Tn(vt.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",Bi,[a[6]||(a[6]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Mi,e.toDisplayString(e.unref(_)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tn(vt.value.categoryIndex).markers,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-marker-${r}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:n.color})},null,4),e.createElementVNode("div",_i,[e.createElementVNode("div",$i,e.toDisplayString(n.title),1),n.description?(e.openBlock(),e.createElementBlock("div",Li,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",Ai,[e.createElementVNode("div",Ti,e.toDisplayString(jt.value?Do():T.categories[Ye.value.categoryIndex]||`Category ${Ye.value.categoryIndex+1}`),1),jt.value?(e.openBlock(),e.createElementBlock("div",Di,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ye.value.data,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${r}`,class:"dss-bubble-tooltip-item"},e.toDisplayString(n.value),1))),128))])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(Ye.value.data,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${r}`,class:"dss-tooltip-series"},[e.createElementVNode("div",{class:"dss-tooltip-series-indicator",style:e.normalizeStyle({backgroundColor:n.color})},null,4),e.createElementVNode("span",Hi,e.toDisplayString(n.seriesName)+":",1),e.createElementVNode("span",Ri,e.toDisplayString(en(n.value)),1)]))),128))]),Tn(Ye.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",Fi,[a[7]||(a[7]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Ii,e.toDisplayString(e.unref(_)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tn(Ye.value.categoryIndex).flagGroups,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-flag-group-${r}`},[e.createElementVNode("div",zi,[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-${r}-${g}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",Pi,[e.createElementVNode("div",Oi,e.toDisplayString(p.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),Tn(Ye.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",qi,[a[8]||(a[8]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Wi,e.toDisplayString(e.unref(_)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tn(Ye.value.categoryIndex).markers,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-dss-marker-${r}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:n.color})},null,4),e.createElementVNode("div",Zi,[e.createElementVNode("div",Ui,e.toDisplayString(n.title),1),n.description?(e.openBlock(),e.createElementBlock("div",Xi,e.toDisplayString(n.description),1)):e.createCommentVNode("",!0)])]))),128))])):e.createCommentVNode("",!0)],64))],6)):e.createCommentVNode("",!0),En.value&&tt.value&&ae.value.scale>1?(e.openBlock(),e.createElementBlock("div",{key:4,class:"dss-zoom-indicator",onClick:Jl},[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(_)("chart.zoom.doubleClickToReset")),1)])):e.createCommentVNode("",!0)],46,Ss),Q.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(F.series,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-bottom-${r}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":Rt.value.has(r),"dss-legend-hovered":ge.value===r,"dss-legend-dimmed":ge.value!==null&&ge.value!==r}]),onClick:p=>Qo(r),onMouseenter:p=>Gt(r),onMouseleave:Fl,style:e.normalizeStyle({animationDelay:`${r*100}ms`})},[e.createElementVNode("div",{class:e.normalizeClass(["dss-legend-color",{"dss-legend-color--comparison":wn.value&&qn(n)}]),style:e.normalizeStyle({backgroundColor:wn.value&&qn(n)?"transparent":xl(n,r),borderColor:xl(n,r)})},null,6),e.createElementVNode("span",ji,e.toDisplayString(n.name),1)],46,Yi))),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"]))},[it.value.addMarker?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-context-menu-item",onClick:fo},e.toDisplayString(e.unref(_)("chart.contextMenu.addMarker")),1)):e.createCommentVNode("",!0),it.value.addMarker&&(it.value.downloadSvg||it.value.downloadPng||it.value.downloadCsv||Tt.value.length>0)?(e.openBlock(),e.createElementBlock("div",Ki)):e.createCommentVNode("",!0),it.value.downloadSvg?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-context-menu-item",onClick:yn},e.toDisplayString(e.unref(_)("chart.contextMenu.downloadSvg")),1)):e.createCommentVNode("",!0),it.value.downloadPng?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-context-menu-item",onClick:Fn},e.toDisplayString(e.unref(_)("chart.contextMenu.downloadPng")),1)):e.createCommentVNode("",!0),it.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",{key:4,class:"dss-context-menu-item",onClick:On},e.toDisplayString(e.unref(_)("chart.contextMenu.downloadCsv")),1)):e.createCommentVNode("",!0),Tt.value.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[it.value.downloadSvg||it.value.downloadPng||it.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",Gi)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tt.value,(n,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"custom-"+r},[n.separator?(e.openBlock(),e.createElementBlock("div",Qi)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(Bn(n)),style:e.normalizeStyle(Gl(n)),onClick:p=>Cl(n)},[n.template?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:Bl(n),class:"dss-custom-menu-content"},null,8,ec)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.icon?(e.openBlock(),e.createElementBlock("span",tc,e.toDisplayString(n.icon),1)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.label),1)],64))],14,Ji)],64))),128))],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),Fe.value.show?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-marker-modal-overlay",onClick:xn},[e.createElementVNode("div",{class:"dss-marker-modal",onClick:a[3]||(a[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",nc,[e.createElementVNode("h3",null,e.toDisplayString(Nn.value?e.unref(_)("chart.modalMarker.viewMarker"):yl.value?e.unref(_)("chart.modalMarker.editMarker"):e.unref(_)("chart.contextMenu.addMarker")),1),e.createElementVNode("button",{class:"dss-modal-close-btn",onClick:xn},"×")]),e.createElementVNode("div",lc,[e.createElementVNode("div",oc,[e.createVNode(la,{id:"dss-marker-date",mode:"single",modelValue:Fe.value.date,"onUpdate:modelValue":a[1]||(a[1]=n=>Fe.value.date=n),"min-date":ol.value,"max-date":cn.value,disabled:Nn.value},null,8,["modelValue","min-date","max-date","disabled"])]),e.createElementVNode("div",ac,[e.createElementVNode("label",sc,e.toDisplayString(e.unref(_)("chart.modalMarker.description")),1),Nn.value?(e.openBlock(),e.createElementBlock("div",rc,e.toDisplayString(Fe.value.description),1)):e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{key:1,id:"dss-marker-description","onUpdate:modelValue":a[2]||(a[2]=n=>Fe.value.description=n),placeholder:e.unref(_)("chart.modalMarker.placeholderDescription"),class:"dss-form-textarea",rows:"5"},null,8,ic)),[[e.vModelText,Fe.value.description]])])]),e.createElementVNode("div",cc,[e.createElementVNode("div",uc,[yl.value&&!Nn.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-btn dss-btn-danger",onClick:hn},e.toDisplayString(e.unref(_)("chart.modalMarker.deleteMarker")),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",dc,[e.createElementVNode("button",{class:"dss-btn dss-btn-secondary",onClick:xn},e.toDisplayString(Nn.value?e.unref(_)("chart.modalMarker.close"):e.unref(_)("chart.modalMarker.cancel")),1),Nn.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-btn dss-btn-primary",onClick:ul,disabled:!(Fe.value.description&&Fe.value.description.length)},e.toDisplayString(yl.value?e.unref(_)("chart.modalMarker.save"):e.unref(_)("chart.contextMenu.addMarker")),9,mc))])])])])):e.createCommentVNode("",!0)],64))}}),vc={class:"dss-modal-title"},gc={class:"dss-modal-actions"},na={__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(T,{emit:oe}){const _=T,D=oe,ce=e.ref(null),z=e.ref(null),M=e.computed(()=>{const X={"max-width":_.width};return _.height!=="auto"&&(X.height=_.height,X["min-height"]="0"),X}),ve=e.computed(()=>({}));function ut(){D("close-modal")}function J(){_.backDrop&&!ce.value&&D("close-modal")}function v(X){X.target.tagName==="INPUT"&&(ce.value=X.target.tagName)}function we(){setTimeout(()=>{ce.value=null},300)}function ke(){const X=document.body,me=document.documentElement;z.value={bodyOverflow:X.style.overflow,bodyPosition:X.style.position,bodyTop:X.style.top,bodyWidth:X.style.width,htmlOverflow:me.style.overflow,scrollY:window.scrollY},X.style.overflow="hidden",X.style.position="fixed",X.style.top=`-${z.value.scrollY}px`,X.style.width="100%",X.style.left="0",me.style.overflow="hidden"}function G(){if(!z.value)return;const X=document.body,me=document.documentElement,{bodyOverflow:F,bodyPosition:Ee,bodyTop:Te,bodyWidth:nt,htmlOverflow:pt,scrollY:W}=z.value;X.style.overflow=F||"",X.style.position=Ee||"",X.style.top=Te||"",X.style.width=nt||"",X.style.left="",me.style.overflow=pt||"",window.scrollTo(0,W||0)}return e.watch(()=>_.showModal,X=>{if(X)ke(),document.body.classList.add("dss-modal-open"),setTimeout(()=>{const me=document.getElementById("dss-modal-backdrop");me&&(me.addEventListener("focusin",v),me.addEventListener("focusout",we))},100);else{G(),document.body.classList.remove("dss-modal-open");const me=document.getElementById("dss-modal-backdrop");me&&(me.removeEventListener("focusin",v),me.removeEventListener("focusout",we))}},{immediate:!0}),e.onUnmounted(()=>{_.showModal&&G()}),(X,me)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[T.showModal?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-modal-backdrop",onClick:J},[e.withDirectives(e.createElementVNode("div",{id:"dss-modal-backdrop",class:"dss-modal",style:e.normalizeStyle(M.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":T.headerType,"font-size":T.titleSize})},[e.createElementVNode("h1",vc,[e.renderSlot(X.$slots,"title",{},()=>[me[1]||(me[1]=e.createTextVNode("Default Title",-1))])]),e.renderSlot(X.$slots,"title-data"),T.showCloseBtn?(e.openBlock(),e.createElementBlock("span",{key:0,class:"dss-modal-close",onClick:ut,title:"Close"},"×")):e.createCommentVNode("",!0)],4),e.createElementVNode("div",{class:"dss-modal-body",style:e.normalizeStyle(ve.value)},[e.renderSlot(X.$slots,"content",{},()=>[me[2]||(me[2]=e.createTextVNode("Default Content",-1))])],4),e.createElementVNode("div",gc,[e.renderSlot(X.$slots,"actions")])])],4),[[e.vShow,T.showModal]])])):e.createCommentVNode("",!0)]))}},hc={key:0,class:"dss-table-toolbar"},yc={class:"dss-table-toolbar-left"},kc=["aria-expanded"],Cc={class:"dss-pagination-select-dropdown",role:"listbox"},bc={class:"dss-table-column-visibility-label"},wc={class:"dss-table-checkbox-wrapper"},xc=["checked","onChange"],Ec={key:0,class:"dss-table-checkbox__check","aria-hidden":"true"},Sc={class:"dss-table-column-visibility-text"},Vc={class:"dss-table-toolbar-right"},Nc=["placeholder","aria-label"],Bc=["aria-label"],Mc=["aria-label","aria-expanded"],_c={key:1,class:"dss-table-toolbar-extra"},$c={class:"dss-table-thead"},Lc={key:0,class:"dss-table-th dss-table-selection-column"},Ac={key:0,class:"dss-table-checkbox-wrapper"},Tc=["checked","indeterminate"],Dc={key:0,class:"dss-table-checkbox__indeterminate"},Hc={key:1,class:"dss-table-checkbox__check","aria-hidden":"true"},Rc=["aria-label"],Fc=["onClick"],Ic={class:"dss-table-th-content"},zc={class:"dss-table-th-text"},Pc={key:0},Oc={key:1},qc={key:2},Wc=["data-filter-column-key","aria-expanded","aria-label","onClick"],Zc={class:"dss-table-tbody"},Uc=["onClick"],Xc={class:"dss-table-checkbox-wrapper"},Yc=["type","name","checked","disabled","onChange"],jc={key:0,class:"dss-table-checkbox__check","aria-hidden":"true"},Kc={key:1,class:"dss-table-checkbox__dot"},Gc=["onClick"],Qc=["aria-expanded","aria-label"],Jc={key:1,class:"dss-table-expansion-placeholder","aria-hidden":"true"},eu={key:0,class:"dss-table-expansion-row"},tu=["colspan"],nu=["colspan"],lu={key:1,class:"dss-table-pagination"},ou={class:"dss-table-pagination-left"},au={key:0},su={key:1,class:"dss-table-pagination-placeholder","aria-hidden":"true"},ru={class:"dss-table-pagination-center"},iu={key:0,class:"dss-pagination-controls"},cu=["disabled","title"],uu=["disabled","title"],du=["aria-label","onKeydown"],mu={class:"dss-pagination-of"},pu=["disabled","title"],fu=["disabled","title"],vu={class:"dss-table-pagination-right"},gu={class:"dss-pagination-rows-label"},hu=["aria-expanded"],yu=["aria-selected","onClick"],ku={key:0,class:"dss-table-filter-row"},Cu=["value","placeholder"],bu=["min","max","value"],wu=["min","max","value"],xu={class:"dss-table-filter-double-range-values"},Eu={key:2,class:"dss-table-filter-daterange"},Su={class:"dss-table-filter-daterange-row"},Vu={class:"dss-table-filter-daterange-label"},Nu=["value"],Bu={class:"dss-table-filter-daterange-row"},Mu={class:"dss-table-filter-daterange-label"},_u=["value"],$u=["value","placeholder"],Lu={class:"dss-table-filter-list"},Au=["checked","onChange"],Tu={class:"dss-table-filter-actions"},Du={name:"DSSTable"},Hu=Object.assign(Du,{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:T=>typeof T=="object"&&T!==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(T,{emit:oe}){const{t:_,locale:D}=co.useI18n(),ce=T,z=oe,M={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 ut(y)&&ut(h)&&Object.keys(h).forEach(q=>{ut(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 ut(y){return y&&typeof y=="object"&&!Array.isArray(y)}const J=e.computed(()=>ve(M,ce.options)),v=e.computed(()=>{const y=J.value.table.width;return y==="auto"?null:typeof y=="number"?y:null}),we=e.computed(()=>J.value.table.height),ke=e.computed(()=>J.value.table.rowHeight??"auto"),G=e.computed(()=>({height:ke.value})),X=e.computed(()=>J.value.table.expandable===!0),me=e.computed(()=>J.value.table.expandableRowData??null),F=e.computed(()=>J.value.table.expandableRowCondition??null),Ee=e.computed(()=>J.value.table.truncated===!0),Te=e.computed(()=>J.value.table.striped),nt=e.computed(()=>J.value.table.bordered),pt=e.computed(()=>J.value.table.hoverable),W=e.computed(()=>J.value.table.size),Ue=e.computed(()=>J.value.table.align||"left");e.computed(()=>J.value.title.text),e.computed(()=>J.value.subtitle.text);const We=e.computed(()=>J.value.selection.enabled),xe=e.computed(()=>J.value.selection.mode),Me=e.computed(()=>J.value.selection.rowCondition??null),Xe=e.computed(()=>J.value.sorting.enabled),te=e.computed(()=>J.value.sorting.mode),lt=e.computed(()=>J.value.pagination.enabled),Ce=e.computed(()=>J.value.pagination.rows),et=e.computed(()=>J.value.pagination.rowsPerPageOptions),dt=e.computed(()=>J.value.pagination.showCounter!==!1),yt=e.computed(()=>J.value.pagination.showControlsGroup),Et=e.computed(()=>yt.value===!1?!1:J.value.pagination.showControls!==!1),Ht=e.computed(()=>yt.value===!1?!1:J.value.pagination.showRowsPerPage!==!1),It=e.computed(()=>lt.value&&(dt.value||Et.value||Ht.value)),re=e.computed(()=>J.value.scrollable),pe=e.computed(()=>J.value.emptyMessage||_("table.emptyMessage")),De=e.computed(()=>J.value.toolbar?.downloads?.pdf!==!1),_e=e.computed(()=>J.value.toolbar?.downloads?.excel!==!1),Jt=e.computed(()=>J.value.toolbar?.search!==!1),Ct=e.computed(()=>De.value||_e.value||Jt.value||tn.value),tn=e.computed(()=>J.value.toolbar?.columnVisibility!==!1),_t=e.ref(""),Ut=e.ref(!1),Q=e.ref(null);let he=null;function Be(){Ut.value?(he&&(clearTimeout(he),he=null),Ut.value=!1,_t.value="",z("search",""),Q.value?.blur()):(Ut.value=!0,he=setTimeout(()=>{he=null,Q.value?.focus()},80))}function ze(){_t.value||(Ut.value=!1)}function Ke(){_t.value="",z("search",""),Q.value?.focus()}const Vt=e.computed(()=>({"dss-table-striped":Te.value,"dss-table-bordered":nt.value,"dss-table-hoverable":pt.value,[`dss-table-${W.value}`]:W.value!=="default","dss-table-truncated":Ee.value})),tt=(y,h)=>y?.field??y?.key??h,Xt=e.ref(new Set);function Ze(){const y=new Set;return ce.columns.forEach((h,x)=>{h?.hidden!==!0&&y.add(tt(h,x))}),y}function Pe(){const y=new Set;return ce.columns.forEach((h,x)=>{y.add(tt(h,x))}),y}function Lt(y){if(!Array.isArray(y))return null;const h=Pe(),x=[];return y.forEach(q=>{h.has(q)&&x.push(q)}),x}function $t(){Xt.value=Ze()}const ne=e.computed(()=>{const y=Lt(ce.columnVisibility);return y===null?null:new Set(y)}),Z=e.computed(()=>ne.value??Xt.value),U=e.computed(()=>ce.columns.filter((y,h)=>Z.value.has(tt(y,h)))),ie=y=>{const h=ce.columns.findIndex(x=>x===y);return tt(y,h>=0?h:0)},ye=(y,h)=>Z.value.has(tt(y,h));function Ge(y){z("update:columnVisibility",Array.from(y))}function At(y,h){const x=tt(y,h),q=new Set(Z.value);q.has(x)?q.delete(x):q.add(x),ne.value===null&&(Xt.value=q),Ge(q)}const Yt=e.ref(null),ot=e.ref(!1);function sn(y){Yt.value&&!Yt.value.contains(y.target)&&(ot.value=!1)}const S=e.computed(()=>U.value.length+(We.value?1:0)+(X.value?1:0)),b=(y,h)=>y?.id??y?.key??h,V=e.ref(new Set),Y=e.ref(null),le=(y,h)=>V.value.has(b(y,h)),He=(y,h)=>{if(!X.value)return!1;if(typeof F.value=="function")return!!F.value(y,h);if(typeof me.value=="string"&&me.value.trim()){const x=xn(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},kt=(y,h,x)=>{if(x&&x.stopPropagation(),!He(y,h))return;const q=b(y,h),ue=new Set(V.value);ue.has(q)?(ue.delete(q),z("row-collapse",{data:y,index:h})):(ue.add(q),z("row-expand",{data:y,index:h})),V.value=ue},at=(y,h)=>{if(!Ee.value)return;const x=b(y,h);Y.value!==x&&(Y.value=x)},Ie=e.ref(null),bt=e.ref(0),Nt=e.ref([]),wt=y=>{if(te.value==="single")return Ie.value===y.field?bt.value:0;{const h=Nt.value.find(x=>x.field===y.field);return h?h.order:0}},it=y=>{const h=wt(y);return{"dss-sort-active":h!==0,"dss-sort-asc":h===1,"dss-sort-desc":h===-1}},Tt=e.ref({}),St=e.ref(null),rn=e.ref(null),Vn=220,Zn=e.ref(null),en=e.computed(()=>U.value.find(y=>ie(y)===St.value)??null),pn=e.computed(()=>{if(!en.value||en.value.filter!=="range")return null;const y=en.value,h=St.value,{min:x,max:q}=Nl(y),ue=y.filterMin??x,Qe=y.filterMax??q,qt=_n(h),yn=qt.min??ue,Fn=qt.max??Qe,On=Qe-ue,Cl=On===0?0:(yn-ue)/On*100,fo=On===0?100:(Fn-ue)/On*100;return{rangeMin:ue,rangeMax:Qe,currentMin:yn,currentMax:Fn,minPct:Cl,maxPct:fo}}),ll=e.ref(null),vl=e.ref("max");function il(y){const h=ll.value,x=pn.value;if(!h||!x)return;const q=h.getBoundingClientRect(),Qe=(y.clientX-q.left)/q.width*100,qt=(x.minPct+x.maxPct)/2;vl.value=Qe<qt?"min":"max"}function _n(y){return Tt.value[y]??{}}function gl(y,h){Tt.value={...Tt.value,[y]:h}}function $n(y){const h=Tt.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 Vl(y){const h={...Tt.value};delete h[y],Tt.value=h,St.value=null,rn.value=null}function Rl(){if(!St.value){rn.value=null;return}const y=Zn.value;if(!y)return;const h=y.querySelector(`.dss-table-filter-trigger[data-filter-column-key="${St.value}"]`);if(!h)return;const x=h.getBoundingClientRect();rn.value={top:x.bottom+6,left:Math.max(8,x.right-Vn)}}const hl=e.computed(()=>{const y=String(_t.value??"").trim().toLowerCase();return y?ce.data.filter(h=>U.value.some(x=>Un(ul(h,x)).some(ue=>String(ue).toLowerCase().includes(y)))):ce.data}),Tn=e.computed(()=>{let y=[...hl.value];const h=(_t.value??"").trim().toLowerCase();return h&&(y=y.filter(x=>ce.columns.some(q=>{if(!q||!q.field)return!1;const ue=ul(x,q);return String(ue??"").toLowerCase().includes(h)}))),U.value.forEach(x=>{const q=ie(x),ue=Tt.value[q];if(!ue)return;const Qe=x.field;if(Qe){if(ue.type==="string"&&ue.value?.trim()){const qt=ue.value.trim().toLowerCase();y=y.filter(yn=>{const Fn=ul(yn,x);return String(Fn??"").toLowerCase().includes(qt)})}else if(ue.type==="range")y=y.filter(qt=>{const yn=xn(qt,Qe),Fn=Number(yn);return!(Number.isNaN(Fn)||ue.min!=null&&Fn<ue.min||ue.max!=null&&Fn>ue.max)});else if(ue.type==="dateRange"){const qt=ue.from?new Date(ue.from).getTime():null,yn=ue.to?new Date(ue.to).getTime():null;y=y.filter(Fn=>{const On=xn(Fn,Qe),Cl=On?new Date(On).getTime():NaN;return!(Number.isNaN(Cl)||qt!=null&&Cl<qt||yn!=null&&Cl>yn)})}else if(ue.type==="list"&&ue.selected?.length){const qt=new Set(ue.selected);y=y.filter(yn=>Un(ul(yn,x)).some(On=>qt.has(On)))}}}),y});function Un(y){if(y==null)return[""];if(Array.isArray(y))return y.flatMap(Un);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 Xn(y){const h=new Set;return ce.data.forEach(x=>{Un(ul(x,y)).forEach(ue=>h.add(ue))}),Array.from(h).sort((x,q)=>String(x).localeCompare(String(q)))}function Hn(y,h){if(St.value===y){St.value=null,rn.value=null;return}if(St.value=y,h?.currentTarget){const x=h.currentTarget.getBoundingClientRect();rn.value={top:x.bottom+6,left:Math.max(8,x.right-Vn)}}else Rl()}function zn(y,h){gl(y,{type:"string",value:h})}function Nl(y){const h=y.field;if(!h)return{min:0,max:100};let x=1/0,q=-1/0;return ce.data.forEach(ue=>{const Qe=xn(ue,h),qt=Number(Qe);Number.isNaN(qt)||(x=Math.min(x,qt),q=Math.max(q,qt))}),{min:x===1/0?0:x,max:q===-1/0?100:q}}function L(y,h,x){const q={..._n(y),type:"range"},ue=x===""?null:Number(x),Qe=ue===null||Number.isNaN(ue)?null:ue;q[h]=Qe,Qe!=null&&(h==="min"&&q.max!=null&&Qe>q.max&&(q.max=Qe),h==="max"&&q.min!=null&&Qe<q.min&&(q.min=Qe)),gl(y,q)}function I(y,h,x){const q={..._n(y),type:"dateRange"};q[h]=x||"",gl(y,q)}const B=e.reactive({});function ee(y,h){B[y]=h}function Ae(y){const h=ie(y),x=(B[h]??"").trim().toLowerCase(),q=Xn(y);return x?q.filter(ue=>String(ue).toLowerCase().includes(x)):q}function ft(y,h){return(_n(y).selected??[]).includes(h!=null?String(h):"")}function mt(y,h){const q=[..._n(y).selected??[]],ue=h!=null?String(h):"",Qe=q.indexOf(ue);Qe>=0?q.splice(Qe,1):q.push(ue),gl(y,{type:"list",selected:q})}function st(y){St.value&&!y.target.closest(".dss-table-filter-wrap")&&!y.target.closest(".dss-table-filter-dropdown")&&(St.value=null,rn.value=null)}function rt(){Rl(),Kt.value&&Ye()}const vn=y=>{if(!(y.sortable===!1||!Xe.value))if(te.value==="single")Ie.value===y.field?bt.value=bt.value===1?-1:bt.value===-1?0:1:(Ie.value=y.field,bt.value=1),bt.value===0&&(Ie.value=null),z("sort",{field:Ie.value,order:bt.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}),z("sort",{multiSortMeta:Nt.value})}},bn=e.computed(()=>{if(!Xe.value)return Tn.value;let y=[...Tn.value];return te.value==="single"&&Ie.value&&bt.value!==0?y.sort((h,x)=>{const q=xn(h,Ie.value),ue=xn(x,Ie.value);return q===ue?0:q==null?1:ue==null?-1:(q<ue?-1:q>ue?1:0)*bt.value}):te.value==="multiple"&&Nt.value.length>0&&y.sort((h,x)=>{for(const q of Nt.value){const ue=xn(h,q.field),Qe=xn(x,q.field);if(ue===Qe)continue;if(ue==null)return 1;if(Qe==null)return-1;const qt=ue<Qe?-1:ue>Qe?1:0;if(qt!==0)return qt*q.order}return 0}),y}),Ot=e.ref(0),gn=e.ref(Ce.value),Kt=e.ref(!1),Ln=e.ref(null),Rt=e.ref(null),ge=e.ref("bottom"),Bt=e.ref(null),vt=y=>{gn.value=y,Kt.value=!1,Ot.value=0,z("page",{page:0,rows:gn.value})};function Rn(y){Ln.value&&!Ln.value.contains(y.target)&&(Kt.value=!1)}function Ye(){const y=Ln.value,h=Rt.value;if(!y||!h)return;const x=y.querySelector(".dss-pagination-select-dropdown");if(!x)return;const q=h.getBoundingClientRect(),ue=x.offsetHeight||0,qt=(window.innerHeight||document.documentElement.clientHeight)-q.bottom,yn=q.top;ge.value=qt<ue+8&&yn>qt?"top":"bottom",Bt.value={width:`${Math.ceil(q.width)}px`,left:`${Math.max(0,Math.round(h.offsetLeft))}px`}}const gt=e.computed(()=>bn.value.length),ae=e.computed(()=>Math.ceil(gt.value/gn.value)),on=e.computed(()=>Math.max(ae.value,1)),Fe=e.computed(()=>gt.value===0?0:cn.value+1),ol=e.computed(()=>yl.value),cn=e.computed(()=>lt.value?Ot.value*gn.value:0),yl=e.computed(()=>lt.value?Math.min((Ot.value+1)*gn.value,gt.value):gt.value),Nn=e.computed(()=>{if(!lt.value)return bn.value;const y=cn.value,h=yl.value;return bn.value.slice(y,h)}),Gt=e.ref(new Set),Fl=e.computed(()=>bn.value.filter((y,h)=>Gt.value.has(b(y,h)))),un=(y,h)=>{const x=Me.value;return typeof x!="function"?!0:!!x(y,h)},Pn=e.computed(()=>bn.value.map((y,h)=>({row:y,index:h})).filter(({row:y,index:h})=>un(y,h))),Zl=e.computed(()=>{const y=Pn.value;return y.length===0?!1:y.every(({row:h,index:x})=>Gt.value.has(b(h,x)))}),Yn=e.computed(()=>{const y=Pn.value;if(y.length===0)return!1;const h=y.filter(({row:x,index:q})=>Gt.value.has(b(x,q))).length;return h>0&&h<y.length}),Bl=(y,h)=>Gt.value.has(b(y,h)),Bn=()=>{if(Zl.value)Gt.value=new Set,z("unselect-all");else{const y=new Set;Pn.value.forEach(({row:h,index:x})=>y.add(b(h,x))),Gt.value=y,z("select-all",Fl.value)}},Gl=(y,h)=>{if(!un(y,h))return;const x=b(y,h),q=new Set(Gt.value),ue=q.has(x);xe.value==="single"?ue?(q.delete(x),z("row-unselect",y)):(q.clear(),q.add(x),z("row-select",y)):ue?(q.delete(x),z("row-unselect",y)):(q.add(x),z("row-select",y)),Gt.value=q},cl=e.ref("1"),Ul=()=>{const y=Number.parseInt(String(cl.value),10);if(!Number.isFinite(y)){cl.value=String(Ot.value+1);return}const h=Math.min(on.value,Math.max(1,y));h!==Ot.value+1?kl(h-1):cl.value=String(h)},kl=y=>{y<0||y>=ae.value||(Ot.value=y,z("page",{page:y,rows:gn.value}))},Ql=(y,h,x)=>{z("row-click",{data:y,index:h,originalEvent:x}),at(y,cn.value+h)},Mn=(y,h)=>{const x=cn.value+h;return{"dss-table-row-selected":Bl(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===b(y,x)}},ul=(y,h)=>h.field?xn(y,h.field):"",xn=(y,h)=>h.split(".").reduce((x,q)=>x&&x[q],y),hn=y=>{const h=y.align??Ue.value;return{"dss-table-sortable":y.sortable!==!1&&Xe.value,"dss-table-align-left":h==="left","dss-table-align-center":h==="center","dss-table-align-right":h==="right",[y.className]:y.className}},jn=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(()=>ce.locale,y=>{y&&y!==D.value&&(D.value=y)},{immediate:!0}),e.watch(Ce,y=>{gn.value=y,Ot.value=0}),e.watch(Kt,async y=>{y&&(await e.nextTick(),Ye())}),e.watch(Ot,y=>{cl.value=String(y+1)},{immediate:!0}),e.watch(_t,y=>{z("search",y??"")}),e.watch(()=>ce.columns,()=>{if(ne.value===null){$t();return}const y=Lt(ce.columnVisibility)??[];y.length!==ce.columnVisibility.length&&z("update:columnVisibility",y)},{immediate:!0,deep:!0}),e.onMounted(()=>{document.addEventListener("click",Rn),document.addEventListener("click",sn),document.addEventListener("click",st),window.addEventListener("resize",rt),window.addEventListener("scroll",rt,!0)}),e.onUnmounted(()=>{document.removeEventListener("click",Rn),document.removeEventListener("click",sn),document.removeEventListener("click",st),window.removeEventListener("resize",rt),window.removeEventListener("scroll",rt,!0)}),(y,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"dss-table-container",ref_key:"tableContainerRef",ref:Zn,style:e.normalizeStyle({width:v.value+"px",height:we.value?we.value+"px":"auto"})},[Ct.value?(e.openBlock(),e.createElementBlock("div",hc,[e.createElementVNode("div",yc,[De.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-table-toolbar-btn",onClick:h[0]||(h[0]=x=>z("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(_)("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=>z("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(_)("table.downloadExcel")),1)])):e.createCommentVNode("",!0),tn.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-table-toolbar-column-visibility",ref_key:"columnVisibilityDropdownRef",ref:Yt},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-pagination-select-trigger",{"dss-pagination-select-open":ot.value}]),onClick:h[2]||(h[2]=x=>ot.value=!ot.value),"aria-expanded":ot.value,"aria-haspopup":"listbox"},[e.createTextVNode(e.toDisplayString(e.unref(_)("table.columnVisibility"))+" ",1),h[24]||(h[24]=e.createElementVNode("span",{class:"dss-pagination-select-chevron","aria-hidden":"true"},"▼",-1))],10,kc),e.createVNode(e.Transition,{name:"dss-dropdown"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("ul",Cc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.columns,(x,q)=>(e.openBlock(),e.createElementBlock("li",{key:tt(x,q),role:"option",class:"dss-table-column-visibility-option",onClick:h[3]||(h[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("label",bc,[e.createElementVNode("span",wc,[e.createElementVNode("input",{type:"checkbox",checked:ye(x,q),onChange:ue=>At(x,q),class:"dss-table-checkbox dss-table-checkbox--checkbox"},null,40,xc),ye(x,q)?(e.openBlock(),e.createElementBlock("span",Ec,[...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",Sc,e.toDisplayString(x.header),1)])]))),128))],512),[[e.vShow,ot.value]])]),_:1})],512)):e.createCommentVNode("",!0),e.renderSlot(y.$slots,"header")]),e.createElementVNode("div",Vc,[Jt.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dss-table-toolbar-search",{"dss-table-toolbar-search--expanded":Ut.value||_t.value}])},[e.withDirectives(e.createElementVNode("input",{ref_key:"searchInputRef",ref:Q,"onUpdate:modelValue":h[4]||(h[4]=x=>_t.value=x),type:"text",class:"dss-table-toolbar-search-input",placeholder:e.unref(_)("table.searchPlaceholder"),"aria-label":e.unref(_)("table.searchTableAriaLabel"),onFocus:h[5]||(h[5]=x=>Ut.value=!0),onBlur:ze},null,40,Nc),[[e.vModelText,_t.value]]),_t.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-table-toolbar-search-clear","aria-label":e.unref(_)("table.clearSearchAriaLabel"),onClick:Ke},[...h[26]||(h[26]=[e.createElementVNode("span",{"aria-hidden":"true"},"×",-1)])],8,Bc)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"dss-table-toolbar-search-trigger","aria-label":e.unref(_)("table.searchAriaLabel"),"aria-expanded":Ut.value||!!_t.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,Mc)],2)):e.createCommentVNode("",!0),y.$slots["toolbar-extra"]?(e.openBlock(),e.createElementBlock("div",_c,[e.renderSlot(y.$slots,"toolbar-extra")])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["dss-table-wrapper",{"dss-table-scrollable":re.value}])},[e.createElementVNode("table",{class:e.normalizeClass(["dss-table",Vt.value])},[e.createElementVNode("thead",$c,[e.createElementVNode("tr",null,[We.value?(e.openBlock(),e.createElementBlock("th",Lc,[xe.value==="multiple"?(e.openBlock(),e.createElementBlock("span",Ac,[e.createElementVNode("input",{type:"checkbox",checked:Zl.value,indeterminate:Yn.value,onChange:Bn,class:"dss-table-checkbox dss-table-checkbox--checkbox"},null,40,Tc),Yn.value?(e.openBlock(),e.createElementBlock("span",Dc)):Zl.value?(e.openBlock(),e.createElementBlock("span",Hc,[...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),X.value?(e.openBlock(),e.createElementBlock("th",{key:1,class:"dss-table-th dss-table-expansion-column","aria-label":e.unref(_)("table.expandRowAriaLabel")},null,8,Rc)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(x,q)=>(e.openBlock(),e.createElementBlock("th",{key:ie(x),class:e.normalizeClass(["dss-table-th",hn(x)]),style:e.normalizeStyle(jn(x)),onClick:ue=>vn(x)},[e.createElementVNode("div",Ic,[e.createElementVNode("span",zc,e.toDisplayString(x.header),1),x.sortable!==!1&&Xe.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["dss-table-sort-icon",it(x)])},[wt(x)===0?(e.openBlock(),e.createElementBlock("span",Pc,[...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",Oc,[...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",qc,[...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":St.value===ie(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":$n(ie(x))}]),"data-filter-column-key":ie(x),"aria-expanded":St.value===ie(x),"aria-label":e.unref(_)("table.filterColumnAriaLabel"),onClick:ue=>Hn(ie(x),ue)},[...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,Wc)],2)):e.createCommentVNode("",!0)])],14,Fc))),128))])]),e.createElementVNode("tbody",Zc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Nn.value,(x,q)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:b(x,cn.value+q)},[e.createElementVNode("tr",{class:e.normalizeClass(["dss-table-tr",Mn(x,q)]),style:e.normalizeStyle(G.value),onClick:ue=>Ql(x,q,ue)},[We.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",Xc,[e.createElementVNode("input",{type:xe.value==="multiple"?"checkbox":"radio",name:`dss-table-select-${T.tableId}`,checked:Bl(x,cn.value+q),disabled:!un(x,cn.value+q),onChange:ue=>Gl(x,cn.value+q),class:e.normalizeClass(["dss-table-checkbox",xe.value==="multiple"?"dss-table-checkbox--checkbox":"dss-table-checkbox--radio",{"dss-table-checkbox--disabled":!un(x,cn.value+q)}])},null,42,Yc),xe.value==="multiple"&&Bl(x,cn.value+q)?(e.openBlock(),e.createElementBlock("span",jc,[...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"&&Bl(x,cn.value+q)?(e.openBlock(),e.createElementBlock("span",Kc)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),X.value?(e.openBlock(),e.createElementBlock("td",{key:1,class:"dss-table-td dss-table-expansion-cell",onClick:e.withModifiers(ue=>kt(x,cn.value+q,ue),["stop"])},[He(x,cn.value+q)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-table-expansion-trigger","aria-expanded":le(x,cn.value+q),"aria-label":le(x,cn.value+q)?e.unref(_)("table.collapseRowAriaLabel"):e.unref(_)("table.expandRowAriaLabel")},[e.createElementVNode("span",{class:e.normalizeClass(["dss-table-expansion-icon",{"dss-table-expansion-icon--expanded":le(x,cn.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,Qc)):(e.openBlock(),e.createElementBlock("span",Jc))],8,Gc)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(ue,Qe)=>(e.openBlock(),e.createElementBlock("td",{key:ie(ue),class:e.normalizeClass(["dss-table-td",hn(ue)]),style:e.normalizeStyle(jn(ue))},[e.renderSlot(y.$slots,`cell-${ue.field}`,{data:x,column:ue,rowIndex:q,isExpanded:Y.value===b(x,cn.value+q)},()=>[e.createTextVNode(e.toDisplayString(ul(x,ue)),1)])],6))),128))],14,Uc),X.value&&He(x,cn.value+q)&&le(x,cn.value+q)?(e.openBlock(),e.createElementBlock("tr",eu,[e.createElementVNode("td",{colspan:S.value,class:"dss-table-expansion-content-cell"},[e.renderSlot(y.$slots,"expansion",{data:x,rowIndex:q})],8,tu)])):e.createCommentVNode("",!0)],64))),128)),Nn.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(pe.value),1)])],8,nu)],4))])],2)],2),It.value?(e.openBlock(),e.createElementBlock("div",lu,[e.createElementVNode("div",ou,[dt.value?(e.openBlock(),e.createElementBlock("span",au,e.toDisplayString(e.unref(_)("table.showingRange",{start:Fe.value,end:ol.value,total:gt.value})),1)):(e.openBlock(),e.createElementBlock("span",su," "))]),e.createElementVNode("div",ru,[Et.value?(e.openBlock(),e.createElementBlock("div",iu,[e.createElementVNode("button",{class:"dss-pagination-btn",disabled:Ot.value===0,onClick:h[8]||(h[8]=x=>kl(0)),title:e.unref(_)("table.firstPage")},[...h[35]||(h[35]=[e.createElementVNode("span",{class:"dss-pagination-double-arrow"},[e.createElementVNode("span",null,"‹"),e.createElementVNode("span",null,"‹")],-1)])],8,cu),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:Ot.value===0,onClick:h[9]||(h[9]=x=>kl(Ot.value-1)),title:e.unref(_)("table.previousPage")}," ‹ ",8,uu),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":h[10]||(h[10]=x=>cl.value=x),type:"text",class:"dss-pagination-page-input","aria-label":e.unref(_)("table.currentPageAriaLabel"),onBlur:Ul,onKeydown:e.withKeys(e.withModifiers(Ul,["prevent"]),["enter"])},null,40,du),[[e.vModelText,cl.value]]),e.createElementVNode("span",mu,e.toDisplayString(e.unref(_)("table.ofPages",{total:on.value})),1),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:Ot.value>=ae.value-1,onClick:h[11]||(h[11]=x=>kl(Ot.value+1)),title:e.unref(_)("table.nextPage")}," › ",8,pu),e.createElementVNode("button",{class:"dss-pagination-btn",disabled:Ot.value>=ae.value-1,onClick:h[12]||(h[12]=x=>kl(ae.value-1)),title:e.unref(_)("table.lastPage")},[...h[36]||(h[36]=[e.createElementVNode("span",{class:"dss-pagination-double-arrow"},[e.createElementVNode("span",null,"›"),e.createElementVNode("span",null,"›")],-1)])],8,fu)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",vu,[Ht.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-pagination-rows-per-page",ref_key:"rowsPerPageDropdownRef",ref:Ln},[e.createElementVNode("span",gu,e.toDisplayString(e.unref(_)("table.rowsPerPage"))+":",1),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-pagination-select-trigger",{"dss-pagination-select-open":Kt.value}]),onClick:h[13]||(h[13]=x=>Kt.value=!Kt.value),"aria-expanded":Kt.value,"aria-haspopup":"listbox",ref_key:"rowsPerPageTriggerRef",ref:Rt},[e.createTextVNode(e.toDisplayString(gn.value)+" ",1),h[37]||(h[37]=e.createElementVNode("span",{class:"dss-pagination-select-chevron","aria-hidden":"true"},"▼",-1))],10,hu),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":ge.value==="top"}]),style:e.normalizeStyle(Bt.value),role:"listbox"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(et.value,x=>(e.openBlock(),e.createElementBlock("li",{key:x,role:"option","aria-selected":x===gn.value,class:e.normalizeClass(["dss-pagination-select-option",{"dss-pagination-select-option--selected":x===gn.value}]),onClick:q=>vt(x)},e.toDisplayString(x),11,yu))),128))],6),[[e.vShow,Kt.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(rn.value?{top:rn.value.top+"px",left:rn.value.left+"px",width:Vn+"px"}:void 0),onClick:h[21]||(h[21]=e.withModifiers(()=>{},["stop"]))},[en.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[en.value.filter==="string"?(e.openBlock(),e.createElementBlock("div",ku,[e.createElementVNode("input",{type:"text",value:_n(St.value).value??"",onInput:h[14]||(h[14]=x=>zn(St.value,x.target.value)),class:"dss-table-filter-input",placeholder:e.unref(_)("table.search")},null,40,Cu)])):en.value.filter==="range"&&pn.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-table-filter-double-range",style:e.normalizeStyle({"--range-min-pct":pn.value.minPct+"%","--range-max-pct":pn.value.maxPct+"%"})},[e.createElementVNode("div",{ref_key:"doubleRangeTrackRef",ref:ll,class:"dss-table-filter-double-range-track",onMousemove:il,onMouseenter:il},[e.createElementVNode("input",{type:"range",min:pn.value.rangeMin,max:pn.value.rangeMax,value:pn.value.currentMin,onInput:h[15]||(h[15]=x=>L(St.value,"min",x.target.value)),class:"dss-table-filter-double-range-input dss-table-filter-double-range-input--min",style:e.normalizeStyle({zIndex:vl.value==="min"?2:1})},null,44,bu),e.createElementVNode("input",{type:"range",min:pn.value.rangeMin,max:pn.value.rangeMax,value:pn.value.currentMax,onInput:h[16]||(h[16]=x=>L(St.value,"max",x.target.value)),class:"dss-table-filter-double-range-input dss-table-filter-double-range-input--max",style:e.normalizeStyle({zIndex:vl.value==="max"?2:1})},null,44,wu)],544),e.createElementVNode("div",xu,e.toDisplayString(pn.value.currentMin)+" – "+e.toDisplayString(pn.value.currentMax),1)],4)):en.value.filter==="dateRange"?(e.openBlock(),e.createElementBlock("div",Eu,[e.createElementVNode("div",Su,[e.createElementVNode("label",Vu,e.toDisplayString(e.unref(_)("table.filterFrom")),1),e.createElementVNode("input",{type:"date",value:_n(St.value).from??"",onInput:h[17]||(h[17]=x=>I(St.value,"from",x.target.value)),class:"dss-table-filter-input dss-table-filter-daterange-input"},null,40,Nu)]),e.createElementVNode("div",Bu,[e.createElementVNode("label",Mu,e.toDisplayString(e.unref(_)("table.filterTo")),1),e.createElementVNode("input",{type:"date",value:_n(St.value).to??"",onInput:h[18]||(h[18]=x=>I(St.value,"to",x.target.value)),class:"dss-table-filter-input dss-table-filter-daterange-input"},null,40,_u)])])):en.value.filter==="list"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("input",{type:"text",value:B[St.value]??"",onInput:h[19]||(h[19]=x=>ee(St.value,x.target.value)),class:"dss-table-filter-input dss-table-filter-list-search",placeholder:e.unref(_)("table.search")},null,40,$u),e.createElementVNode("div",Lu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ae(en.value),x=>(e.openBlock(),e.createElementBlock("label",{key:x,class:"dss-table-filter-list-item"},[e.createElementVNode("input",{type:"checkbox",checked:ft(St.value,x),onChange:q=>mt(St.value,x)},null,40,Au),e.createElementVNode("span",null,e.toDisplayString(x),1)]))),128))])],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Tu,[e.createElementVNode("button",{type:"button",class:"dss-table-filter-clear",onClick:h[20]||(h[20]=x=>Vl(St.value))},e.toDisplayString(e.unref(_)("table.clearFilter")),1)])],64)):e.createCommentVNode("",!0)],4),[[e.vShow,St.value&&en.value&&rn.value]])]),_:1})]))],64))}}),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='M6.008%2014V12.68H8.288V6.572L5.996%208.276V6.692L8.012%205.24H9.788V12.68H11.624V14H6.008Z'%20fill='%23CFBEED'/%3e%3c/svg%3e",Fu="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",Iu="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",zu="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",Pu="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",Ou="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",qu={class:"dss-toolbar-left"},Wu=["title"],Zu=["title"],Uu={class:"dss-toolbar-dropdown-wrapper"},Xu=["title"],Yu=["src"],ju=["src"],Ku=["src"],Gu=["src"],Qu=["src"],Ju=["src"],ed={key:6,width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"paragraph-icon"},td=["src"],nd=["src"],ld=["src"],od=["src"],ad=["src"],sd=["src"],rd=["title"],id=["title"],cd=["title"],ud=["title"],dd=["title"],md=["title"],pd=["title"],fd=["title"],vd=["title"],gd={key:2,class:"dss-toolbar-separator"},hd=["title"],yd={key:4,class:"dss-toolbar-separator"},kd={key:5,class:"dss-toolbar-dropdown-wrapper"},Cd=["title"],bd={class:"dss-toolbar-dropdown-ai"},wd={class:"dss-toolbar-right"},xd={key:0,class:"dss-toolbar-custom-group"},Ed={key:1,class:"dss-toolbar-separator"},Sd={class:"dss-link-modal-content"},Vd={class:"dss-link-modal-field"},Nd={class:"dss-link-modal-label"},Bd=["placeholder"],Md={class:"dss-link-modal-field"},_d={class:"dss-link-modal-label"},$d=["placeholder"],Ld={class:"dss-image-modal-tabs"},Ad={key:0,class:"dss-image-tab-content"},Td={class:"dss-link-modal-content"},Dd={class:"dss-link-modal-field"},Hd={key:0,class:"dss-link-modal-label"},Rd=["src"],Fd={class:"dss-link-modal-field"},Id={class:"dss-link-modal-label"},zd=["placeholder"],Pd={class:"dss-link-modal-field"},Od={class:"dss-link-modal-label"},qd=["placeholder"],Wd={class:"dss-link-modal-field"},Zd={class:"dss-link-modal-label"},Ud=["placeholder"],Xd={key:1,class:"dss-image-tab-content"},Yd={class:"dss-link-modal-content"},jd={class:"dss-link-modal-field"},Kd={class:"dss-link-modal-label"},Gd=["placeholder"],Qd={class:"dss-link-modal-field"},Jd={class:"dss-link-modal-label"},e1=["placeholder"],t1={class:"dss-link-modal-field"},n1={class:"dss-link-modal-label"},l1=["placeholder"],o1={class:"dss-link-modal-field"},a1={class:"dss-link-modal-label"},s1=["placeholder"],r1={class:"dss-text-editor-title-input-container"},i1={key:0,class:"dss-text-editor-title-preview"},c1={key:0},u1={key:1,class:"dss-text-editor-preview-placeholder"},d1=["value","placeholder","disabled"],m1={key:3,class:"dss-text-editor-title-slot dss-text-editor-slot-last"},p1={class:"dss-text-editor-description-input-container"},f1={key:0,class:"dss-text-editor-description-preview"},v1={key:0},g1={key:1,class:"dss-text-editor-preview-placeholder"},h1=["value","placeholder","disabled"],y1={key:5,class:"dss-text-editor-description-slot dss-text-editor-slot-last"},k1=["data-comment-id","onMouseenter"],C1=["onClick"],b1=["src","alt"],w1={key:1},x1=["onClick"],E1=["src","alt"],S1={key:1},V1=["data-has-second-user","onClick"],N1={class:"editor-comment-marker-count"},B1={key:7,class:"dss-text-editor-textarea-wrapper"},M1=["value","placeholder","rows","disabled"],_1={class:"dss-text-editor-footer"},$1={class:"dss-text-editor-footer-content"},L1={class:"dss-text-editor-footer-stat"},A1={class:"dss-text-editor-footer-stat"},T1={key:8,class:"dss-text-editor-content-wrapper"},D1={key:0,class:"dss-comment-overlay-body"},H1={class:"dss-comment-selection-wrapper"},R1=["innerHTML"],F1={class:"dss-comment-messages-wrapper"},I1={key:0,class:"dss-comment-avatar-wrapper"},z1={class:"dss-comment-avatar"},P1=["src","alt"],O1={key:1},q1={class:"dss-comment-header"},W1={class:"dss-comment-header-text"},Z1={class:"dss-comment-author"},U1={key:0,class:"dss-comment-date"},X1=["onClick","title"],Y1={class:"dss-comment-overlay-inner"},j1=["placeholder","onKeydown"],K1={class:"dss-text-editor-footer"},G1={class:"dss-text-editor-footer-content"},Q1={class:"dss-text-editor-footer-stat"},J1={class:"dss-text-editor-footer-stat"},em=["title"],tm=["title"],nm={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:""},lm={class:"dss-image-popup-content"},om={key:0,class:"dss-image-popup-no-alt-icon"},am=["title"],sm=["title"],rm={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:""},im={class:"dss-toolbar-left"},cm=["title"],um=["title"],dm={class:"dss-toolbar-dropdown-wrapper"},mm=["title"],pm=["src"],fm=["src"],vm=["src"],gm=["src"],hm=["src"],ym=["src"],km={key:6,width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"paragraph-icon"},Cm=["title"],bm=["title"],wm=["title"],xm=["title"],Em=["title"],Sm=["title"],Vm=["title"],Nm=["title"],Bm=["title"],Mm={key:2,class:"dss-toolbar-separator"},_m=["title"],$m={key:4,class:"dss-toolbar-separator"},Lm={key:5,class:"dss-toolbar-dropdown-wrapper"},Am=["title"],Tm={class:"dss-toolbar-dropdown-ai"},Dm={key:0,class:"dss-toolbar-right"},Hm={key:0,class:"dss-toolbar-separator"},Rm={key:0,class:"dss-toolbar-custom-group"},Fm={key:1,class:"dss-toolbar-separator"},Im={name:"DSSTextEditor"},zm=Object.assign(Im,{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:T=>typeof T=="object"&&T!==null},floatingToolbar:{type:Boolean,default:!1},askAi:{type:Boolean,default:!1},showTitle:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},commentUser:{type:Object,default:null},customToolbarSlots:{type:Array,default:()=>["custom-tool-1","custom-tool-2","custom-tool-3"]},customToolbarFloatingMap:{type:Object,default:()=>({}),validator:T=>typeof T=="object"&&T!==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(T,{expose:oe,emit:_}){const{t:D,locale:ce}=co.useI18n(),z={h1:Ru,h2:Fu,h3:Iu,h4:zu,h5:Pu,h6:Ou},M=T,ve=_,ut=e.useSlots(),J=`<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>`,v=e.ref(null),we=e.ref(null),ke=e.ref(!1),Q=e.ref(!1),U=e.ref(!1),me=e.ref(""),F=e.ref({}),Ee=e.ref(!1),Te=e.ref(!1),lt=e.ref(""),mt=e.ref(""),W=e.ref(null),Ze=e.ref(null),qe=e.ref(null),xe=e.ref(null),Me=e.ref(""),Xe=e.ref(!1),te=e.ref({}),ot=e.ref(!1),Ce=e.ref({}),tt=e.ref(null),dt=e.ref(null),ht=e.ref(!1),xt=e.ref(""),Ht=e.ref(null),It=e.ref(""),se=e.ref(""),pe=e.ref(""),De=e.ref(null),_e=e.ref(null),Kt=e.ref(null),kt=e.ref(null),Qt=e.ref(null),Lt=e.ref(!1),Ut=e.ref(""),G=e.ref({}),ye=e.ref(!1),Be=e.ref("upload"),Ue=e.ref(""),Je=e.ref(null),At=e.ref(null),nt=e.ref([]),Ot=e.ref([]),We=e.ref(null),Re=e.ref(!1),Ct=e.ref(""),yt=e.ref(""),ee=e.ref(""),Z=e.ref(""),X=e.ref(""),re=e.ref(""),fe=e.ref(null),et=e.ref(null),Vt=e.ref(null),un=e.ref(!1),Et=e.ref(null),on=e.ref(!1),S=e.ref(!1),b=e.ref(null),V=e.ref("p"),Y=e.ref(!1),ne=e.ref([]),Ie=e.ref(null),bt=e.ref(null),st=e.ref(null),Oe=e.ref(!1),Nt=e.ref(0),St=100,pt=e.ref(null),at=e.computed(()=>!!B.commentUser),Bt=e.computed(()=>({"dss-text-editor-no-border":!B.border,"dss-text-editor-rounded":B.rounded,"dss-text-editor-full-height":B.fullHeight,"dss-comment-overlay-open":at.value&&vn.value!==null})),Mt=e.computed(()=>({})),kn=e.computed(()=>!B.fixedHeight||B.fullHeight?{}:{height:`${1.6*14*B.rows+24+2}px`,resize:"none",overflowY:"auto"}),Dn=e.computed(()=>!B.fixedHeight||B.fullHeight?{}:{height:`${1.6*14*B.rows+32}px`,overflowY:"auto"}),il=e.computed(()=>B.richText&&Ot.value.length>0),Gt=e.computed(()=>{if(!B.modelValue)return"";if(B.richText){let o=B.modelValue.replace(/<script[^>]*>[\s\S]*?<\/script>/gi,"");return o=o.replace(/<style[^>]*>[\s\S]*?<\/style>/gi,""),o=o.replace(/<[^>]+>/g,""),o=o.replace(/&nbsp;/g," "),o=o.replace(/&amp;/g,"&"),o=o.replace(/&lt;/g,"<"),o=o.replace(/&gt;/g,">"),o=o.replace(/&quot;/g,'"'),o=o.replace(/&#39;/g,"'"),o=o.replace(/\s+/g," ").trim(),o}return B.modelValue}),pn=e.computed(()=>{const o=Gt.value.trim();return o?o.split(/\s+/).filter(l=>l.length>0).length:0}),tl=e.computed(()=>Gt.value.length),hl=e.computed(()=>kt.value!==null&&Be.value==="upload"&&It.value&&It.value.startsWith("data:")),cl=e.computed(()=>B.titlePlaceholder||T("textEditor.placeholders.title")),Mn=e.computed(()=>B.descriptionPlaceholder||T("textEditor.placeholders.description")),yl=e.computed(()=>B.placeholder||T("textEditor.placeholders.startTyping")),_n=o=>ut&&ut[o]!==void 0,ul=o=>{for(let l=o+1;l<B.customToolbarSlots.length;l++)if(_n(B.customToolbarSlots[l]))return!0;return!1},nl=o=>{for(let l=o+1;l<B.customToolbarSlots.length;l++){const s=B.customToolbarSlots[l];if(_n(s)&&zn(s))return!0}return!1},zn=o=>B.customToolbarFloatingMap.hasOwnProperty(o)?B.customToolbarFloatingMap[o]===!0:!0,Cn=e.computed(()=>B.customToolbarSlots.some(o=>_n(o)&&zn(o))),ll=e.computed(()=>_n("title-slot")),D=e.computed(()=>_n("description-slot")),O=o=>{if(!o||o.trim()==="")return"<html></html>";const l=o.trim();return l.startsWith("<html>")&&l.endsWith("</html>")?o:`<html>${o}</html>`},_=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},ie=o=>{if(!o)return;const l=document.createTreeWalker(o,NodeFilter.SHOW_COMMENT,null,!1),s=[];let i=l.nextNode();for(;i;)s.push(i),i=l.nextNode();s.forEach(c=>c.remove())},Le=o=>{try{const l=String(o.getDate()).padStart(2,"0"),i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][o.getMonth()],c=o.getFullYear();return`${l} ${i} ${c}`}catch{return""}},ct=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=T("textEditor.started_conversation");if(c&&l===c)return!0}catch{}const i=l.toLowerCase();return i.includes("started conversation")||i.includes("démarré la conversation")||i==="started conversation"||i==="a démarré la conversation"},rt=o=>{const l=o.target.value;ge("update:modelValue",l),ge("change",l)},Ye=()=>{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 i=o.value;o.value="M";const c=o.scrollHeight;o.value=i,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")},Tt=()=>{on.value=!0,Ye()},fn=()=>{on.value=!1,Sn()},Sn=()=>{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 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")},Pn=o=>{const s=o.target.value;on.value&&Ye(),ge("update:title",s),ge("title-change",s),Vt.value="title",B.richText&&(Re.value||(yt.value=Ct.value,X.value=ee.value,re.value=Z.value),We.value&&clearTimeout(We.value),Re.value=!0,We.value=setTimeout(()=>{Re.value=!1,he()},500))},$n=()=>{if(!et.value)return;const o=et.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 i=o.value;o.value="M";const c=o.scrollHeight;o.value=i,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")},Rl=()=>{S.value=!0,$n()},kl=()=>{S.value=!1,dn()},dn=()=>{if(!et.value)return;const o=et.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")},Hn=o=>{const s=o.target.value;S.value&&$n(),ge("update:description",s),ge("description-change",s),Vt.value="description",B.richText&&(Re.value||(yt.value=Ct.value,X.value=ee.value,re.value=Z.value),We.value&&clearTimeout(We.value),Re.value=!0,We.value=setTimeout(()=>{Re.value=!1,he()},500))},tn=()=>{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(v.value),s.setEnd(l.startContainer,l.startOffset),{type:"text",start:s.toString().length,end:s.toString().length+l.toString().length}},Ln=o=>{if(!(!o||!v.value))try{const l=window.getSelection(),s=document.createRange();if(o.type==="element"&&o.element)if(v.value.contains(o.element)){s.setStart(o.element,o.offset),s.collapse(!0),l.removeAllRanges(),l.addRange(s);return}else{v.value.focus();return}let i=0;const c=[v.value];let d=null,u=!1,m=!1;for(;!m&&(d=c.pop());)if(d.nodeType===3){const f=i+d.length;!u&&o.start>=i&&o.start<=f&&(s.setStart(d,o.start-i),u=!0),u&&o.end>=i&&o.end<=f&&(s.setEnd(d,o.end-i),m=!0),i=f}else{let f=d.childNodes.length;for(;f--;)c.push(d.childNodes[f])}l.removeAllRanges(),l.addRange(s)}catch{v.value.focus()}},Rt=()=>{if(!v.value)return;v.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},i=s(v.value);if(i.nodeType===3)l.setStart(i,i.length),l.setEnd(i,i.length);else if(i.childNodes.length>0){const c=s(i);c&&c.nodeType===3?(l.setStart(c,c.length),l.setEnd(c,c.length)):(l.selectNodeContents(i),l.collapse(!1))}else l.setStart(i,0),l.setEnd(i,0);o.removeAllRanges(),o.addRange(l)},he=(o=!1)=>{if(!v.value)return;const l=v.value.innerHTML,s=B.title||"",i=B.description||"";if(!o&&l===Ct.value&&s===ee.value&&i===Z.value)return;const c={content:yt.value||Ct.value,title:X.value!==void 0?X.value:ee.value,description:re.value!==void 0?re.value:Z.value},d=nt.value.length>0?nt.value[nt.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&&(nt.value.push(c),nt.value.length>50&&nt.value.shift(),Ot.value=[]),Ct.value=l,ee.value=s,Z.value=i,yt.value=l,X.value=s,re.value=i},_t=o=>{if(!v.value)return;ft(),v.value&&ie(v.value);let l=null;v.value&&(v.value.querySelector("p")||(l=tn(),Rn()));const s=o&&o.inputType&&(o.inputType==="insertText"||o.inputType==="insertCompositionText"||o.inputType==="deleteContentBackward"||o.inputType==="deleteContentForward");s&&b.value&&(b.value=null),Q.value=!0;const i=v.value.innerHTML.replace(/<!--[\s\S]*?-->/g,"").replace(/&nbsp;|\u00A0/g," "),c=O(i);ge("update:modelValue",c),ge("change",c),Vt.value="editor",Re.value||(yt.value=Ct.value,X.value=ee.value,re.value=Z.value),We.value&&clearTimeout(We.value),Re.value=!0,We.value=setTimeout(()=>{Re.value=!1,he(),lo(),_o()},500),e.nextTick(()=>{l&&Ln(l),ft();const d=["bold","italic","underline"],u=window.getSelection(),m=u.rangeCount>0?u.getRangeAt(0):null,f=m&&m.collapsed;if(d.forEach(k=>{try{if(f&&b.value?.command===k){te.value[k]=b.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{}te.value[k]=E}else te.value.hasOwnProperty(k)||(te.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"));te.value[k]=!!E}else{const L=document.queryCommandState(k);te.value[k]=L}else{const L=document.queryCommandState(k);te.value[k]=L}}catch{}}),Bn(),je(),ol(),jt(),it(),wt("handleRichTextInput"),s&&(o.inputType==="insertText"||o.inputType==="insertCompositionText")){const k=o.data||"";k&&k.length===1&&setTimeout(()=>_o(k),0),(k===" "||k===`
101
- `||/[.,;:!?]/.test(k))&&setTimeout(()=>{lo()},100)}Q.value=!1})},ft=()=>{if(!v.value)return;const o=window.getSelection();if(!o||o.rangeCount===0)return;const l=o.getRangeAt(0),s=l.commonAncestorContainer,i=s.nodeType===3?s.parentElement:s;if(!i)return;const c=i.closest(".dss-image-wrapper");if(c){const d=c.querySelector("img");if(i!==d&&!d?.contains(i)){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 f=document.createRange();f.setStartAfter(c),f.collapse(!0),o.removeAllRanges(),o.addRange(f)}}}},Rn=()=>{if(!v.value)return;const o=v.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 i=null;s.forEach(c=>{if(c.nodeType===Node.TEXT_NODE){if((c.textContent||"").trim()===""){c.parentNode===o&&o.removeChild(c);return}i||(i=document.createElement("p"),o.insertBefore(i,c)),i.appendChild(c);return}if(c.nodeType===Node.ELEMENT_NODE){const d=c,u=d.tagName;if(u==="BR"){i=null;return}if(l.has(u)){i=null;return}i||(i=document.createElement("p"),o.insertBefore(i,d)),i.appendChild(d)}})},je=()=>{if(v.value&&!un.value){un.value=!0;try{v.value.querySelectorAll(".dss-image-wrapper").forEach(i=>{i.querySelector("img")||i.remove()}),v.value.querySelectorAll(".dss-image-no-alt-icon").forEach(i=>{const c=i.parentElement;!c||!c.classList.contains("dss-image-wrapper")?i.remove():c.querySelector("img")||i.remove()}),v.value.querySelectorAll("img").forEach(i=>{let c=i.getAttribute("alt");c===null&&(c=i.alt||"");const d=i.getAttribute("src")||i.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="")}i.setAttribute("alt",c),i.setAttribute("data-alt",c);const u=!c||c.trim()==="";let m=i.parentElement;const f=m&&m.classList.contains("dss-image-wrapper");if(f){const k=m.querySelector(".dss-image-no-alt-icon");k&&k.remove()}else{const k=i.nextElementSibling?.classList.contains("dss-image-no-alt-icon")?i.nextElementSibling:null;k&&k.remove()}if(u){f?m.setAttribute("contenteditable","false"):(m=document.createElement("span"),m.className="dss-image-wrapper",m.setAttribute("contenteditable","false"),i.parentNode.insertBefore(m,i),m.appendChild(i));const k=document.createElement("div");k.className="dss-image-no-alt-icon",k.setAttribute("contenteditable","false"),k.innerHTML=J,m.appendChild(k)}else if(f&&m.children.length===1){const k=m.parentNode;k.insertBefore(i,m),k.removeChild(m)}})}finally{un.value=!1}}},vt=o=>{lo(),ge("blur",o),Il()},oe=()=>{if(B.disabled||!B.richText||!v.value)return;sn(),We.value&&(clearTimeout(We.value),We.value=null),Re.value&&(he(),Re.value=!1);const o=Vt.value==="title",l=Vt.value==="description",s=Vt.value==="editor";if(nt.value.length===0){o&&fe.value?fe.value.focus():l&&et.value?et.value.focus():v.value.focus(),document.execCommand("undo",!1),e.nextTick(()=>{_t()});return}const i={content:v.value.innerHTML,title:B.title||"",description:B.description||""};Ot.value.push(i);const c=nt.value.pop();if(c!==void 0){Q.value=!0;const d=typeof c=="string"?c:c.content,u=typeof c=="object"&&c.title||"",m=typeof c=="object"&&c.description||"";v.value.innerHTML=d,Ct.value=d,ee.value=u,Z.value=m,yt.value=d,X.value=u,re.value=m,e.nextTick(()=>{Bn(),Nn(),Wt(),jt();const f=O(d);ge("update:modelValue",f),ge("update:title",u),ge("update:description",m),ge("change",f),ge("title-change",u),ge("description-change",m),Q.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),Ye()}}else if(l){if(et.value){et.value.focus();const k=m.length;et.value.setSelectionRange(k,k)}}else if(s)Rt();else if(fe.value&&document.activeElement===fe.value){const k=u.length;fe.value.setSelectionRange&&fe.value.setSelectionRange(k,k),Ye()}else if(et.value&&document.activeElement===et.value){const k=m.length;et.value.setSelectionRange(k,k)}else v.value&&Rt()},10)})})}},nn=()=>{if(B.disabled||!B.richText||!v.value)return;sn();const o=Vt.value==="title",l=Vt.value==="description",s=Vt.value==="editor";if(Ot.value.length===0){o&&fe.value?fe.value.focus():l&&et.value?et.value.focus():v.value.focus(),document.execCommand("redo",!1),e.nextTick(()=>{_t()});return}const i={content:v.value.innerHTML,title:B.title||"",description:B.description||""};nt.value.push(i);const c=Ot.value.pop();if(c!==void 0){Q.value=!0;const d=typeof c=="string"?c:c.content,u=typeof c=="object"&&c.title||"",m=typeof c=="object"&&c.description||"";v.value.innerHTML=d,Ct.value=d,ee.value=u,Z.value=m,yt.value=d,X.value=u,re.value=m,e.nextTick(()=>{Bn(),Nn(),Wt(),jt();const f=O(d);ge("update:modelValue",f),ge("update:title",u),ge("update:description",m),ge("change",f),ge("title-change",u),ge("description-change",m),Q.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),Ye()}}else if(l){if(et.value){et.value.focus();const k=m.length;et.value.setSelectionRange(k,k)}}else if(s)Rt();else if(fe.value&&document.activeElement===fe.value){const k=u.length;fe.value.setSelectionRange&&fe.value.setSelectionRange(k,k),Ye()}else if(et.value&&document.activeElement===et.value){const k=m.length;et.value.setSelectionRange(k,k)}else v.value&&Rt()},10)})})}},Fe=()=>{if(!v.value)return;v.value.querySelectorAll('span[style*="font-weight"]').forEach(i=>{const c=i.style.fontWeight;if(c==="normal"||c==="400"){const d=document.createDocumentFragment();for(;i.firstChild;)d.appendChild(i.firstChild);i.parentNode&&i.parentNode.replaceChild(d,i)}}),v.value.querySelectorAll('span[style*="font-weight"]').forEach(i=>{if(parseInt(i.style.fontWeight)>=600){const d=document.createElement("b");for(d.style.fontWeight="600";i.firstChild;)d.appendChild(i.firstChild);i.parentNode&&i.parentNode.replaceChild(d,i)}}),v.value.querySelectorAll("b, strong").forEach(i=>{i.style.fontWeight="600"})},ol=()=>{if(!v.value)return;v.value.querySelectorAll("i, em").forEach(l=>{l.style.fontStyle="italic"})},an=()=>{const o=window.getSelection();if(!o||o.rangeCount===0)return!1;const l=o.getRangeAt(0);let s=!1;if(l.collapsed){const i=l.startContainer;let c=i.nodeType===3?i.parentElement:i;for(;c&&c!==v.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 i=l.commonAncestorContainer.nodeType===1?l.commonAncestorContainer:l.commonAncestorContainer.parentNode;if(i){const c=document.createTreeWalker(i,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!==v.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(()=>{ol()}),!1;if(l.collapsed)document.execCommand("italic",!1),e.nextTick(()=>{ol()});else try{const i=l.extractContents(),c=document.createElement("em");c.style.fontStyle="italic",c.appendChild(i),l.insertNode(c),l.setStartAfter(c),l.collapse(!0),o.removeAllRanges(),o.addRange(l),e.nextTick(()=>{ol()})}catch{document.execCommand("italic",!1),e.nextTick(()=>{ol()})}return!0},Cl=()=>{const o=window.getSelection();if(!o||o.rangeCount===0)return!1;const l=o.getRangeAt(0);let s=!1;if(l.collapsed){const i=l.startContainer;let c=i.nodeType===3?i.parentElement:i;for(;c&&c!==v.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 i=l.commonAncestorContainer.nodeType===1?l.commonAncestorContainer:l.commonAncestorContainer.parentNode;if(i){const c=document.createTreeWalker(i,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!==v.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(()=>{Fe()}),!1;if(l.collapsed)document.execCommand("bold",!1),e.nextTick(()=>{const i=window.getSelection();if(i.rangeCount>0){const c=i.getRangeAt(0),d=c.startContainer;let u=d.nodeType===3?d.parentElement:d;for(;u&&u!==v.value;){if(u.tagName==="SPAN"&&u.style.fontWeight){const m=u.style.fontWeight;if(m==="normal"||m==="400"){const f=document.createElement("b");f.style.fontWeight="600";const k=document.createDocumentFragment();for(;u.firstChild;)k.appendChild(u.firstChild);f.appendChild(k),u.parentNode&&u.parentNode.replaceChild(f,u),c.setStart(f,0),c.collapse(!0),i.removeAllRanges(),i.addRange(c);break}}else if(u.tagName==="STRONG"||u.tagName==="B"){u.style.fontWeight="600";break}u=u.parentElement}if(!u||u===v.value){const m=document.createElement("b");m.style.fontWeight="600",m.innerHTML="<br>",c.insertNode(m),c.setStart(m,0),c.collapse(!0),i.removeAllRanges(),i.addRange(c)}}Fe()});else try{const i=l.extractContents(),c=document.createElement("b");c.style.fontWeight="600",c.appendChild(i),l.insertNode(c),l.setStartAfter(c),l.collapse(!0),o.removeAllRanges(),o.addRange(l),e.nextTick(()=>{Fe()})}catch{document.execCommand("bold",!1),e.nextTick(()=>{Fe()})}return!0},Vn=(o,l=null)=>{if(B.disabled||!B.richText||!v.value)return;Re.value?(We.value&&(clearTimeout(We.value),We.value=null),he(),Re.value=!1):he(),sn(),v.value.focus();const s=window.getSelection();let i=null;if(s&&s.rangeCount>0){const d=s.getRangeAt(0);!d.collapsed&&_l(d)&&(i=tn())}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 f=document.createTextNode(l);u.insertNode(f),u.selectNodeContents(f)}}}if(o==="bold"){const d=Cl();te.value.bold=d;const u=window.getSelection();u.rangeCount>0&&u.getRangeAt(0).collapsed&&(b.value={command:"bold",state:d}),e.nextTick(()=>{i&&(Ln(i),e.nextTick(()=>{const m=Yt("bold");te.value.bold=m})),_t(),Nn(),jt()});return}if(o==="italic"){const d=an();te.value.italic=d;const u=window.getSelection();u.rangeCount>0&&u.getRangeAt(0).collapsed&&(b.value={command:"italic",state:d}),e.nextTick(()=>{i&&(Ln(i),e.nextTick(()=>{const m=Yt("italic");te.value.italic=m})),_t(),ol(),Nn(),jt()});return}let c=!1;try{c=document.execCommand(o,!1,l)}catch{}e.nextTick(()=>{if(i&&Ln(i),["bold","italic","underline"].includes(o))try{if(o==="bold")i&&e.nextTick(()=>{const u=Yt("bold");te.value.bold=u});else if(o==="italic")if(i)e.nextTick(()=>{const u=Yt("italic");te.value.italic=u});else{const u=document.queryCommandState(o);te.value[o]=u}else{const u=document.queryCommandState(o);te.value[o]=u}}catch{te.value.hasOwnProperty(o)?te.value[o]=!te.value[o]:te.value[o]=!0}if(o==="createLink"&&l){const u=window.getSelection();if(u.rangeCount>0){const f=u.getRangeAt(0),k=f.commonAncestorContainer.nodeType===1?f.commonAncestorContainer.closest("a"):f.commonAncestorContainer.parentElement?.closest("a");k&&(!k.getAttribute("href")||k.getAttribute("href")==="")&&k.setAttribute("href",l)}v.value.querySelectorAll("a").forEach(f=>{const k=f.getAttribute("href");(!k||k===""||k==="#")&&f.setAttribute("href",l)})}_t(),Nn(),jt()})},Yt=(o,l=null)=>{if(B.disabled||!v.value)return!1;try{if(o==="formatBlock"&&l){const i=document.queryCommandValue("formatBlock");if(l==="<blockquote>"){const c=i.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 i===l||i.toLowerCase()===l.toLowerCase()}if(["bold","italic","underline"].includes(o))try{const i=window.getSelection();if(i.rangeCount>0){const c=i.getRangeAt(0);if(o==="bold"){let u=!1;if(c.collapsed){const m=c.commonAncestorContainer,f=m.nodeType===3?m.parentElement:m;if(f&&((f.tagName==="STRONG"||f.tagName==="B"||f.closest&&f.closest("strong, b"))&&(u=!0),!u&&f.style&&parseInt(f.style.fontWeight)>=600&&(u=!0),!u))try{const k=window.getComputedStyle(f);parseInt(k.fontWeight)>=600&&(u=!0)}catch{}return te.value.hasOwnProperty(o)?te.value[o]:(te.value[o]=u,u)}else{const m=c.commonAncestorContainer.nodeType===1?c.commonAncestorContainer:c.commonAncestorContainer.parentNode;let f=!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;f=!0;let E=L.parentElement;for(;E&&E!==v.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 te.value[o]=u&&f,u&&f}}if(o==="italic"){let u=!1;if(c.collapsed){const m=c.commonAncestorContainer,f=m.nodeType===3?m.parentElement:m;if(f&&((f.tagName==="EM"||f.tagName==="I"||f.closest&&f.closest("em, i"))&&(u=!0),!u&&f.style&&f.style.fontStyle==="italic"&&(u=!0),!u))try{window.getComputedStyle(f).fontStyle==="italic"&&(u=!0)}catch{}return te.value.hasOwnProperty(o)?te.value[o]:(te.value[o]=u,u)}else{const m=c.commonAncestorContainer.nodeType===1?c.commonAncestorContainer:c.commonAncestorContainer.parentNode;let f=!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;f=!0;let E=L.parentElement;for(;E&&E!==v.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 te.value[o]=u&&f,u&&f}}const d=document.queryCommandState(o);return c.collapsed&&te.value.hasOwnProperty(o)?te.value[o]:(te.value[o]=d,d)}return te.value.hasOwnProperty(o)?te.value[o]:!1}catch{return te.value.hasOwnProperty(o)?te.value[o]:!1}try{return document.queryCommandState(o)}catch{return!1}}catch{return!1}},Fl=o=>{B.disabled||!B.richText||(we.value=we.value===o?null:o,o==="askAi"&&(dt.value=null))},sn=()=>{we.value=null,Je.value=null},On=o=>{Vn("formatBlock",o),sn()},Zl=o=>{if(!o||!v.value)return o;const l=ze=>{let Ne=ze.nodeType===Node.TEXT_NODE?ze.parentElement:ze;for(;Ne&&Ne!==v.value;){const gt=Ne.tagName;if(gt==="P"){const rn=Ne.parentElement;if(rn===v.value||rn.tagName==="BLOCKQUOTE")return Ne}if(gt==="BLOCKQUOTE")break;Ne=Ne.parentElement}return null},s=l(o.startContainer),i=l(o.endContainer);if(!s||!i)return o;const c=[],d=document.createTreeWalker(v.value,NodeFilter.SHOW_ELEMENT,{acceptNode:ze=>{const Ne=ze.tagName;if(Ne==="P"){const gt=ze.parentElement;if(gt===v.value||gt.tagName==="BLOCKQUOTE")return NodeFilter.FILTER_ACCEPT}return Ne==="BLOCKQUOTE"?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_SKIP}});let u;for(;u=d.nextNode();)c.push(u);const m=c.indexOf(s),f=c.indexOf(i);if(m===-1||f===-1)return o;const k=Math.min(m,f),L=Math.max(m,f),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},Un=()=>{if(B.disabled||!B.richText||!v.value)return;Re.value?(We.value&&(clearTimeout(We.value),We.value=null),he(),Re.value=!1):he(),sn(),v.value.focus();const o=window.getSelection();if(o.rangeCount===0)return;let l=o.getRangeAt(0);!l.collapsed&&_l(l)&&(l=Zl(l),o.removeAllRanges(),o.addRange(l));let s=null;!l.collapsed&&_l(l)&&(s=tn());const i=l.commonAncestorContainer,c=i.nodeType===1?i.tagName==="BLOCKQUOTE"?i:i.closest("blockquote"):i.parentElement?.closest("blockquote");if(!!(c&&v.value.contains(c))){if(c){const u=c.parentNode;Array.from(c.childNodes).forEach(f=>{if(f.nodeType===Node.ELEMENT_NODE)if(f.tagName==="P"||f.tagName==="DIV")u.insertBefore(f,c);else{const k=document.createElement("p");k.appendChild(f.cloneNode(!0)),u.insertBefore(k,c)}else if(f.nodeType===Node.TEXT_NODE&&f.textContent.trim()){const k=document.createElement("p");k.appendChild(f.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 f=[],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();)f.push(L);if(f.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&&Ln(s),Wt(),_t(),jt()})},Bl=()=>{if(!v.value)return;const o=window.getSelection();if(o.rangeCount===0)return;const s=o.getRangeAt(0).commonAncestorContainer,i=s.nodeType===1?s.tagName==="BLOCKQUOTE"?s:s.closest("blockquote"):s.parentElement?.closest("blockquote");if(!i||!v.value.contains(i))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&&i.contains(d)&&c(d)&&d.remove();i.lastChild;){const L=i.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(i.children.length>0)for(let L=i.children.length-1;L>=0;L--){const R=i.children[L];if((R.tagName==="P"||R.tagName==="DIV")&&c(R))R.remove();else break}let u=i.innerHTML;const m=u;u=u.replace(/(<br\s*\/?>)+$/gi,""),u!==m&&(i.innerHTML=u);const f=document.createElement("p");f.innerHTML="<br>",i.parentNode?i.nextSibling?i.parentNode.insertBefore(f,i.nextSibling):i.parentNode.appendChild(f):v.value&&v.value.appendChild(f);const k=document.createRange();k.selectNodeContents(f),k.collapse(!0),o.removeAllRanges(),o.addRange(k),e.nextTick(()=>{Wt(),_t()})},Nn=()=>{if(!v.value){ke.value=!1;return}try{const o=window.getSelection();if(o.rangeCount>0){const s=o.getRangeAt(0).commonAncestorContainer,i=s.nodeType===1?s.closest("a"):s.parentElement?.closest("a");ke.value=!!i}else ke.value=!1}catch{ke.value=!1}},Gl=()=>{if(!v.value)return;const o=window.getSelection();o&&o.rangeCount>0&&o.getRangeAt(0),xe.value=tn();const l=window.getSelection();let s="";l.rangeCount>0&&(s=l.getRangeAt(0).toString()),lt.value="",mt.value=s,Me.value="",qe.value=null,Te.value=!0,sn(),e.nextTick(()=>{W.value&&W.value.focus()})},dl=()=>{if(!v.value)return;Re.value?(We.value&&(clearTimeout(We.value),We.value=null),he(),Re.value=!1):he();const o=window.getSelection();let l=null;if(o.rangeCount>0){const i=o.getRangeAt(0).commonAncestorContainer;l=i.nodeType===1?i.closest("a"):i.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 i=document.createRange();i.setStartBefore(s.firstChild),i.setEndAfter(s.lastChild||s.firstChild),o.removeAllRanges(),o.addRange(i),document.execCommand("removeFormat",!1),i.collapse(!1),o.removeAllRanges(),o.addRange(i)}qe.value=null}else Vn("unlink");ke.value=!1,sn(),e.nextTick(()=>{_t(),Nn()})},Ul=()=>{B.disabled||!B.richText||v.value&&(Re.value?(We.value&&(clearTimeout(We.value),We.value=null),he(),Re.value=!1):he(),sn(),v.value.focus(),document.execCommand("insertUnorderedList",!1),e.nextTick(()=>{Bn(),_t(),jt()}))},bl=()=>{B.disabled||!B.richText||v.value&&(Re.value?(We.value&&(clearTimeout(We.value),We.value=null),he(),Re.value=!1):he(),sn(),v.value.focus(),document.execCommand("insertOrderedList",!1),e.nextTick(()=>{Bn(),_t(),jt()}))},Ql=o=>{const l=o.parentElement;if(!l||l.tagName!=="OL")return null;let s=0,i=o.previousElementSibling;for(;i;)i.tagName==="LI"&&s++,i=i.previousElementSibling;return s+1},Bn=()=>{if(!v.value)return;v.value.querySelectorAll("li > ol").forEach(l=>{const s=l.parentElement;if(s&&s.tagName==="LI"){const i=Ql(s);i!==null&&Array.from(l.children).filter(d=>d.tagName==="LI").forEach(d=>{d.setAttribute("data-parent-num",String(i))})}})},ml=()=>{if(B.disabled||!B.richText||!v.value)return;sn(),v.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(()=>{Bn(),_t()});return}const i=s.parentElement;if(!i||i.tagName!=="OL"&&i.tagName!=="UL")return;const c=s.previousElementSibling;if(c&&c.tagName==="LI"){const d=i.tagName.toLowerCase();let u=c.querySelector(`:scope > ${d}`);u||(u=document.createElement(d),c.appendChild(u));const m=Ql(c);u.appendChild(s),m!==null&&i.tagName==="OL"&&s.setAttribute("data-parent-num",String(m)),Bn();const f=document.createRange();f.selectNodeContents(s),f.collapse(!1),o.removeAllRanges(),o.addRange(f),e.nextTick(()=>{_t(),jt()})}else document.execCommand("indent",!1),e.nextTick(()=>{Bn(),_t(),jt()})},wn=()=>{if(B.disabled||!B.richText||!v.value)return;sn(),v.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(()=>{Bn(),_t()});return}const i=s.parentElement;if(!i||i.tagName!=="OL"&&i.tagName!=="UL")return;const c=i.parentElement;if(c&&c.tagName==="LI"){const d=c.parentElement;if(d&&(d.tagName==="OL"||d.tagName==="UL")){i.tagName==="OL"&&s.removeAttribute("data-parent-num"),d.insertBefore(s,c.nextSibling),i.children.length===0&&i.remove(),Bn();const u=document.createRange();u.selectNodeContents(s),u.collapse(!1),o.removeAllRanges(),o.addRange(u),e.nextTick(()=>{_t(),jt()});return}}document.execCommand("outdent",!1),e.nextTick(()=>{Bn(),_t(),jt()})},vn=e.ref(null),Xn=e.ref(null),y=e.ref({}),h=e.ref(""),x=e.ref(null),q=e.ref("");e.ref("");const ue=e.ref(null);e.ref("");const Ge=e.ref([]),qt=e.ref(!1),gn=e.ref(!1),Fn=o=>{if(!o)return"";const l=o.cloneRange(),s=document.createElement("div");return s.appendChild(l.cloneContents()),s.innerHTML},qn=()=>{if(!B.commentUser||B.disabled||!B.richText||!v.value)return;if(vn.value!==null){vn.value=null,h.value="",q.value="",ue.value=null,Ge.value=[],Al(!0);return}sn(),v.value.focus();const o=window.getSelection();if(!o||o.rangeCount===0)return;const l=o.getRangeAt(0);if(l.collapsed||!_l(l))return;q.value=Fn(l)||"",ue.value=tn();const s=l.getBoundingClientRect(),i=v.value.parentElement;if(!i)return;const c=i.getBoundingClientRect(),d=s.bottom-c.top,m=Math.max(d+8,0);y.value={top:`${m}px`,bottom:"auto"},vn.value=Date.now(),e.nextTick(()=>{if(h.value="",x.value){const k=x.value;k.style.height="auto",k.style.height=`${k.scrollHeight}px`,k.focus()}const f=i.querySelector(".dss-comment-overlay");if(f&&i){const k=i.querySelector(".dss-text-editor-footer");if(k){const L=i.getBoundingClientRect(),R=f.getBoundingClientRect(),E=k.getBoundingClientRect(),ae=R.bottom-L.top,j=E.top-L.top,ze=8;if(ae>j-ze){const Ne=E.height;y.value={bottom:`${Ne+ze}px`,top:"auto"}}else y.value={top:`${m}px`,bottom:"auto"}}}})},wl=()=>{if(!h.value.trim())return;const o=h.value.trim(),l=new Date,s={text:o,selectionText:q.value,selectionRange:ue.value,commentId:vn.value,user:B.commentUser||null,createdAt:l.toISOString()};Ge.value=[...Ge.value,s],ge("comment-submitted",s),Vo(s),ue.value&&!Uo(ue.value)&&go(vn.value,ue.value),h.value="",e.nextTick(()=>{if(x.value){const i=x.value;i.style.height="auto",i.style.height=`${i.scrollHeight}px`,i.focus()}wt("sendComment")})},fo=(o,l)=>{if(!(!B.commentUser||!o.user||o.user.id!==B.commentUser.id)){if(Ge.value=Ge.value.filter((s,i)=>i!==l),vn.value!==null&&v.value){const s=String(vn.value),i=v.value.querySelector(`[data-comment="${s}"], [data-fake-comment="${s}"]`);if(i&&Ge.value.length>0){const c=[],d=new Set;Ge.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?i.setAttribute("data-comment-user",JSON.stringify(c[0])):i.removeAttribute("data-comment-user"),c.length>1?i.setAttribute("data-comment-user-2",JSON.stringify(c[1])):i.removeAttribute("data-comment-user-2"),i.setAttribute("data-comment-count",String(Ge.value.length))}else i&&Ge.value.length===0&&(i.removeAttribute("data-comment-user"),i.removeAttribute("data-comment-user-2"),i.setAttribute("data-comment-count","0"))}if(ge("comment-deleted",{comment:o,index:l,commentId:vn.value}),B.comments&&Array.isArray(B.comments)){const s=B.comments.filter(i=>!(i.commentId===o.commentId&&i.text===o.text&&i.user?.id===o.user?.id));ge("update:comments",s)}e.nextTick(()=>{wt("deleteComment")})}},Uo=o=>{if(!o||!v.value)return!1;try{const l=vo(o);if(!l)return!1;const s=l.commonAncestorContainer,i=s.nodeType===3?s.parentElement:s;if(i)return!!i.closest("[data-comment], [data-fake-comment]")}catch{}return!1},vo=o=>{if(!o||!v.value)return null;try{const l=document.createRange();if(o.type==="element"&&o.element)return v.value.contains(o.element)?(l.setStart(o.element,o.offset),l.collapse(!0),l):null;let s=0;const i=[v.value];let c=null,d=!1,u=!1;for(;!u&&(c=i.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--;)i.push(c.childNodes[m])}return d?l:null}catch{return null}},go=(o,l)=>{if(!(!o||!l||!v.value))try{const s=vo(l);if(!s||s.collapsed)return;const i=s.commonAncestorContainer,c=i.nodeType===3?i.parentElement:i;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,f=s.endContainer,k=s.startOffset,L=s.endOffset,R=m.nodeType===3?m.parentNode:m,E=f.nodeType===3?f.parentNode:f;if(R===E&&k===0&&L===(f.nodeType===3?f.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 f=s.extractContents();d.appendChild(f),s.insertNode(d)}const u=v.value.querySelector(`[data-comment="${String(o)}"]`);e.nextTick(()=>{wt("wrapSelectionWithCommentMarker"),_t()})}catch{}},Vo=o=>{if(!o||!o.commentId)return;const l=Array.isArray(B.comments)?[...B.comments]:[],s=typeof o.commentId=="string"&&o.commentId.startsWith("comment-")?Date.now():Number(o.commentId)||o.commentId;let i=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(i>=0){const d=l[i];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(f=>f.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)}qt.value=!0,ge("update:comments",l)},Xo=(o,l=[])=>{if(!B.commentUser||B.disabled||!B.richText||!v.value)return;const s=v.value;let i=null;try{i=s.querySelector(o)}catch{return}if(!i)return;sn(),s.focus();const c=document.createRange();c.selectNodeContents(i);const d=window.getSelection();d&&(d.removeAllRanges(),d.addRange(c)),q.value=i.innerHTML||"",ue.value=tn();const u=c.getBoundingClientRect(),m=s.parentElement;if(m){const L=m.getBoundingClientRect(),R=u.bottom-L.top,ae=Math.max(R+8,0);y.value={top:`${ae}px`,bottom:"auto"}}const f=i.getAttribute("data-comment")||i.getAttribute("data-fake-comment");let k=[];if(f&&B.comments&&Array.isArray(B.comments)){const L=B.comments.find(R=>String(R.conversation_id)===String(f));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(l)&&l.length>0&&(k=l.slice()),k.sort((L,R)=>{const E=ze=>{if(!ze)return 0;const Ne=new Date(ze).getTime();return isNaN(Ne)?0:Ne},ae=E(L.createdAt),j=E(R.createdAt);return ae===j?0:ae-j}),Ge.value=k,Al(!0),vn.value=f||null,i&&(Xn.value=i,i.classList.add("editor-comment-highlighted")),e.nextTick(()=>{if(h.value="",x.value){const L=x.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(),ze=ae.bottom-E.top,Ne=j.top-E.top,gt=8;if(ze>Ne-gt){const rn=j.height;y.value={bottom:`${rn+gt}px`,top:"auto"}}}}}wt("openCommentOverlayForSelector")})},ho=e.ref(null),Jl=e.ref(0),Yo=o=>{if(!(B.disabled||!B.richText)){if(o.key==="Escape"){const l=window.getSelection();if(l.rangeCount>0){const i=l.getRangeAt(0).commonAncestorContainer,c=i.nodeType===1?i.tagName==="BLOCKQUOTE"?i:i.closest("blockquote"):i.parentElement?.closest("blockquote");if(!!(c&&v.value&&v.value.contains(c))){o.preventDefault();let u=null;i.nodeType===3?u=i.parentElement:i.tagName==="P"||i.tagName==="DIV"?u=i:u=i.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(()=>{Bl()},50);return}}}if(o.key.length===1||o.key==="Enter"){const l=window.getSelection();if(l&&l.rangeCount>0){const s=l.getRangeAt(0),i=s.commonAncestorContainer,c=i.nodeType===3?i.parentElement:i;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,f=s.endContainer.nodeType===3?s.endContainer.parentElement:s.endContainer;if(d.contains(m)&&m!==u||d.contains(f)&&f!==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 i=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"&&(i=m,c=i.closest(".dss-image-wrapper"))),c||(c=u.closest(".dss-image-wrapper"),c&&(i=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"&&(i=m,c=i.closest(".dss-image-wrapper"))),c||(c=u.closest(".dss-image-wrapper"),c&&(i=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"?(i=d,c=i.closest(".dss-image-wrapper")):(i=d.querySelector("img"),i&&(c=i.closest(".dss-image-wrapper"))),c){const f=c.contains(u)||u===c,k=c.contains(m)||m===c,R=s.cloneContents().textContent?.trim()||"",E=c.textContent?.trim()||"";(!f||!k||R.length>E.length)&&(c=null,i=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(()=>{_t()});return}}}}if(o.key==="Tab"){o.preventDefault(),o.shiftKey?wn():ml();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=f=>{if(!f)return!1;let k=f.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=f.parentElement;return L&&L!==v.value?m(L):!1};if(u.nodeType===3){const f=u.parentElement;if(f&&(m(f)||m(u))){const k=f.closest("p, div");if(k&&k!==v.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),l.removeAllRanges(),l.addRange(ae),e.nextTick(()=>{_t()});return}}}}const i=s.commonAncestorContainer,c=i.nodeType===1?i.tagName==="BLOCKQUOTE"?i:i.closest("blockquote"):i.parentElement?.closest("blockquote");if(!!(c&&v.value&&v.value.contains(c))){let u=null;i.nodeType===3?u=i.parentElement:i.tagName==="P"||i.tagName==="DIV"?u=i:u=i.closest("p, div");const m=j=>{if(!j)return!1;const ze=j.textContent||"",gt=(j.innerHTML||"").trim(),rn=gt.replace(/<br\s*\/?>/gi,"").trim();return ze.trim()===""||gt===""||rn===""||gt==="<br>"||gt==="<br/>"||gt==="<p></p>"||gt==="<p><br></p>"||gt==="<p><br/></p>"||gt==="<p> </p>"||gt==="<p><br> </p>"||gt==="<div></div>"||gt==="<div><br></div>"||gt==="<div><br/></div>"},f=c.lastChild,k=f&&f.nodeType===1&&f.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(()=>{Bl()},50);return}}}}if(o.key===" "){const l=Date.now(),s=l-Jl.value;if(ho.value===" "&&s<300){const i=window.getSelection();if(i.rangeCount>0){const c=i.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(),ml();return}}}}ho.value=" ",Jl.value=l}else ho.value=o.key}},yo=o=>{if(B.disabled||!B.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,"")),he();const i=window.getSelection();let c=null;if(i&&i.rangeCount>0){let m=i.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 f=new DOMParser().parseFromString(u,"text/html");let k=v.value.querySelector("h1")?1:0;if(f.querySelectorAll("h1").forEach(R=>{if(k>0){const E=f.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(f.body.children).filter(ae=>R.includes(ae.tagName));if(E.length===1){const ae=E[0].tagName,j=c.tagName,ze=c.textContent.trim()===""&&!c.querySelector("img");let Ne=!1;if(["H1","H2","H3","H4","H5","H6"].includes(j)?Ne=!0:ze||(ae===j||ae==="P")&&(Ne=!0),Ne)return E[0].innerHTML.trim()}}return f.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);_t()},An=o=>{if(we.value){const s=o.target;!s.closest(".dss-toolbar-dropdown")&&!s.closest(".dss-toolbar-dropdown-toggle")&&sn()}if(ot.value){const s=o.target,i=s.closest(".dss-floating-toolbar"),c=v.value&&s.closest(".dss-text-editor-content");!i&&!c&&Il()}if(dt.value){const s=o.target,i=s.closest(".dss-floating-toolbar"),c=s.closest(".dss-toolbar-dropdown");!i&&!c&&xl()}const l=o.target;if(!l.closest(".dss-toolbar-dropdown")&&!l.closest(".dss-toolbar-dropdown-submenu")&&(Je.value=null),!v.value||!l.closest(".dss-text-editor-content")){const s=window.getSelection();if(s&&s.rangeCount>0){const i=s.getRangeAt(0);Y.value=!i.collapsed&&_l(i)}else Y.value=!1}if(vn.value!==null){const s=document.querySelector(".dss-comment-overlay");let i=!1;if(s){const u=s.getBoundingClientRect(),m=o.clientX,f=o.clientY;i=m>=u.left&&m<=u.right&&f>=u.top&&f<=u.bottom}const c=l.closest(".dss-toolbar-button"),d=c&&c.getAttribute("title")==="Comment";!i&&!d&&(vn.value=null,h.value="",q.value="",ue.value=null,Ge.value=[],Al(!0))}},z=(o,l)=>{o&&o.stopPropagation&&o.stopPropagation(),At.value&&(clearTimeout(At.value),At.value=null),Je.value=l},xn=o=>{const l=o.relatedTarget;if(l){const s=l.closest(".dss-toolbar-dropdown-submenu"),i=l.closest(".dss-toolbar-dropdown-item-has-submenu");if(s||i)return}At.value&&clearTimeout(At.value),At.value=setTimeout(()=>{Je.value=null,At.value=null},150)},Yn=o=>{Je.value=null};let Xl=0;const En=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,i)=>{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-${++Xl}`;s.classList.add("dss-toolbar-dropdown-item-has-submenu"),s.setAttribute("data-submenu-id",m);let f=null;c?(s.tagName==="BUTTON"&&s.parentNode.insertBefore(c,s.nextSibling),c.classList.add("dss-toolbar-dropdown-submenu"),f=c):u&&(d.classList.add("dss-toolbar-dropdown-submenu"),f=d),f&&(f.setAttribute("data-submenu-id",m),f.setAttribute("data-processed","true"),c&&s.tagName!=="BUTTON"?f.dataset.originalParentRef="inside":f.dataset.originalParentRef="sibling",Array.from(f.children).forEach(L=>{(L.tagName==="BUTTON"||L.tagName==="DIV")&&!L.classList.contains("dss-toolbar-dropdown-item")&&L.classList.add("dss-toolbar-dropdown-item")}))}})},bn=()=>{document.querySelectorAll(".dss-toolbar-dropdown").forEach(l=>{En(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=f=>{const k=c.getAttribute("data-submenu-id");k&&z(f,k)},m=xn;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 L=c.getAttribute("data-submenu-id");L&&z(k,L)},m=xn;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",Yn)})})})};let Xt=null;const Jt=()=>{if(Je.value){const o=document.querySelector(`.dss-toolbar-dropdown-submenu[data-submenu-id="${Je.value}"]`),l=document.querySelector(`.dss-toolbar-dropdown-item-has-submenu[data-submenu-id="${Je.value}"]`);o&&l&&Zn(o,l)}if(ot.value&&jt(),B.richText){if(Xt!==null)return;Xt=setTimeout(()=>{Xt=null,wt("handleWindowResize")},150)}},jn=()=>{if(!B.richText)return;document.querySelectorAll(".dss-toolbar-custom-group").forEach(l=>{Array.from(l.children).filter(i=>i.tagName==="DIV"&&!i.classList.contains("dss-toolbar-button")).forEach(i=>{i.classList.add("dss-toolbar-button")})})},Ml=()=>{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 i=window.getSelection();i.removeAllRanges?i.removeAllRanges():i.empty&&i.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",i=>{if(window.getSelection){const c=window.getSelection();c.removeAllRanges&&c.removeAllRanges()}})})};e.onMounted(()=>{if(e.nextTick(()=>{requestAnimationFrame(()=>{on.value?Ye():Sn(),S.value?$n():dn()})}),e.nextTick(()=>{Ml()}),B.richText&&v.value){try{document.execCommand("defaultParagraphSeparator",!1,"p")}catch{}document.addEventListener("click",An),window.addEventListener("resize",Jt);let o=null;const l=()=>{o===null&&(o=setTimeout(()=>{o=null,Jt()},150))};window.addEventListener("scroll",l,!0),v.value._windowScrollHandler=l,v.value._windowScrollTimeout=o,v.value.closest(".editor-with-comments"),v.value.closest(".dss-text-editor-content-wrapper");const s=v.value.closest(".dss-text-editor-content");let i=null;const c=()=>{i===null&&(i=setTimeout(()=>{i=null,Jt()},150))};s&&(s.addEventListener("scroll",c),v.value._scrollHandlers={wrapper:null,content:s,handler:c}),e.nextTick(()=>{bn(),jn()}),v.value.addEventListener("click",m=>{const f=m.target;f.closest("a")&&!B.disabled&&m.preventDefault();const L=f.closest(".dss-image-no-alt-icon"),R=f.closest(".dss-image-wrapper");if(L||R&&f===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&&f.tagName!=="IMG"&&(m.preventDefault(),e.nextTick(()=>{const E=window.getSelection();if(E.rangeCount>0){const j=E.getRangeAt(0).commonAncestorContainer,ze=j.nodeType===3?j.parentElement:j;if(R.contains(ze)&&ze!==R.querySelector("img")){const Ne=document.createRange();Ne.setStartAfter(R),Ne.collapse(!0),E.removeAllRanges(),E.addRange(Ne)}}else{const ae=document.createRange();ae.setStartAfter(R),ae.collapse(!0),E.addRange(ae)}}))},!0),v.value.addEventListener("mousedown",m=>{const f=m.target,k=f.closest(".dss-image-no-alt-icon"),L=f.closest(".dss-image-wrapper");if(k||L&&f.tagName!=="IMG"){m.preventDefault();const R=window.getSelection(),E=document.createRange();L&&(E.setStartAfter(L),E.collapse(!0),R.removeAllRanges(),R.addRange(E))}},!0),v.value.addEventListener("paste",m=>{e.nextTick(()=>{if(!v.value)return;v.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="")}}}),je()})}),v.value.addEventListener("dragstart",m=>{const f=m.target,k=f.tagName==="IMG"?f:f.closest("img"),L=k?.closest(".dss-image-wrapper");k&&v.value.contains(k)&&(Et.value=L||k,m.dataTransfer.effectAllowed="move",m.dataTransfer.setData("text/html","image-drag"))}),v.value.addEventListener("dragover",m=>{Et.value&&(m.preventDefault(),m.stopPropagation(),m.dataTransfer.dropEffect="move")}),v.value.addEventListener("dragenter",m=>{Et.value&&(m.preventDefault(),m.stopPropagation())}),v.value.addEventListener("drop",m=>{if(!Et.value||!v.value)return;m.preventDefault(),m.stopPropagation();const f=Et.value,k=f.classList?.contains("dss-image-wrapper"),L=k?f.querySelector("img"):f,R=k?f:L?.closest(".dss-image-wrapper");if(!L||!v.value.contains(L)){Et.value=null;return}let E=null;const ae=m.clientX,j=m.clientY;if(document.caretRangeFromPoint)E=document.caretRangeFromPoint(ae,j);else{const ln=window.getSelection();ln.rangeCount>0?E=ln.getRangeAt(0).cloneRange():(E=document.createRange(),E.selectNodeContents(v.value),E.collapse(!1))}if(!E){Et.value=null;return}const ze=E.commonAncestorContainer,Ne=ze.nodeType===3?ze.parentElement:ze;if(Ne?.closest(".dss-image-wrapper")===R||R&&R.contains(Ne)){Et.value=null;return}if(R&&(Ne===R||R.contains(Ne))){Et.value=null;return}const rn=L.getAttribute("src");let cn=null;R?cn=R.cloneNode(!0):cn=L.cloneNode(!0);try{let ln=E.startContainer;if(ln.nodeType===3&&(ln=ln.parentElement),R&&(ln===R||R.contains(ln))){const mn=document.createRange();mn.setStartAfter(R),mn.collapse(!0),E=mn}E.insertNode(cn);const Zt=document.createRange();Zt.setStartAfter(cn),Zt.collapse(!0);const hn=window.getSelection();hn.removeAllRanges(),hn.addRange(Zt)}catch{if(v.value.childNodes.length===0){const Zt=document.createElement("p");Zt.appendChild(cn),v.value.appendChild(Zt)}else{const Zt=v.value.lastChild;if(Zt&&Zt.nodeType===1)Zt.appendChild(cn);else{const hn=document.createElement("p");hn.appendChild(cn),v.value.appendChild(hn)}}}R?R.remove():L.remove(),Et.value=null,e.nextTick(()=>{const ln=v.value.querySelectorAll("img");let Zt=!1;ln.forEach(hn=>{if(hn.getAttribute("src")===rn)if(!Zt)Zt=!0;else{const mn=hn.closest(".dss-image-wrapper");mn?mn.remove():hn.remove()}}),je(),_t()})}),v.value.addEventListener("dragend",m=>{Et.value=null});let d=null;const u=new MutationObserver(m=>{m.forEach(f=>{f.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(()=>{je(),jn(),d=null},100)});if(u.observe(v.value,{childList:!0,subtree:!0}),e.nextTick(()=>{const m=document.querySelector(".dss-text-editor-toolbar");if(m){const f=new MutationObserver(()=>{e.nextTick(()=>{jn()})});f.observe(m,{childList:!0,subtree:!0}),m._toolbarMutationObserver=f}}),B.modelValue){const m=_(B.modelValue);v.value.innerHTML=m,Rn()}e.nextTick(()=>{const m=v.value.innerHTML||"",f=B.title||"",k=B.description||"";Ct.value=m,ee.value=f,Z.value=k,X.value=f,re.value=k,Bn(),je(),ol(),it(),bo(),Sl()}),Nn(),Wt(),v.value._mutationObserver=u}}),e.onUnmounted(()=>{if(document.removeEventListener("click",An),window.removeEventListener("resize",Jt),v.value&&v.value._windowScrollHandler&&window.removeEventListener("scroll",v.value._windowScrollHandler,!0),Xt!==null&&(clearTimeout(Xt),Xt=null),v.value&&v.value._windowScrollTimeout!==null&&clearTimeout(v.value._windowScrollTimeout),We.value&&clearTimeout(We.value),At.value&&clearTimeout(At.value),v.value&&v.value._mutationObserver&&v.value._mutationObserver.disconnect(),Ie.value&&Ie.value.disconnect(),bt.value!==null&&(cancelAnimationFrame(bt.value),bt.value=null),st.value!==null&&(clearTimeout(st.value),st.value=null),pt.value!==null&&(clearTimeout(pt.value),pt.value=null),Al(!0),v.value&&v.value._scrollHandlers){const{wrapper:l,content:s,handler:i}=v.value._scrollHandlers;l&&l.removeEventListener("scroll",i),s&&s.removeEventListener("scroll",i)}const o=document.querySelector(".dss-text-editor-toolbar");o&&o._toolbarMutationObserver&&o._toolbarMutationObserver.disconnect()});const zt=o=>{const l=o.target,s=l.closest("a");if(s&&!B.disabled){o.preventDefault();const c=document.createRange();c.selectNodeContents(s);const d=window.getSelection();d.removeAllRanges(),d.addRange(c)}const i=l.closest(".dss-image-wrapper");i&&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(i.contains(m)&&m!==i.querySelector("img")){const f=document.createRange();f.setStartAfter(i),f.collapse(!0),c.removeAllRanges(),c.addRange(f)}}je(),Nn(),Wt(),jt(),it()}):e.nextTick(()=>{je(),Nn(),Wt(),jt(),it()})},Dt=()=>{ft();const o=window.getSelection();if(o&&o.rangeCount>0){const s=o.getRangeAt(0);Y.value=!s.collapsed&&_l(s),!s.collapsed&&b.value&&(b.value=null)}else Y.value=!1;if(je(),Nn(),Wt(),jt(),it(),o&&o.rangeCount>0){const i=o.getRangeAt(0).commonAncestorContainer,c=i.nodeType===3?i.parentElement:i;if(c&&c.closest(".dss-text-editor-footer")){o.removeAllRanges(),Y.value=!1;return}}["bold","italic","underline"].forEach(s=>{try{const i=window.getSelection();if(i.rangeCount>0){const c=i.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 f=window.getComputedStyle(u);parseInt(f.fontWeight)>=600&&(m=!0)}catch{}te.value[s]=m}else{const d=document.queryCommandState(s);te.value[s]=d}}}catch{}})},it=()=>{if(!B.richText||B.disabled||!v.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,i=s.nodeType===3?s.parentElement:s;if(!i||!v.value.contains(i)){V.value="p";return}const c=i.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"}},Wt=()=>{if(!v.value){Xe.value=!1;return}try{const o=window.getSelection();let l=!1;if(o.rangeCount>0){const i=o.getRangeAt(0).commonAncestorContainer,c=i.nodeType===1?i.tagName==="BLOCKQUOTE"?i:i.closest("blockquote"):i.parentElement?.closest("blockquote");l=!!(c&&v.value.contains(c))}Xe.value=l}catch{Xe.value=!1}},_l=o=>{if(!o||!v.value)return!1;const l=o.commonAncestorContainer;if(!l)return!1;const s=l.nodeType===3?l.parentElement:l;return s?v.value.contains(s):!1},Il=()=>{ot.value=!1},jt=()=>{if(!B.floatingToolbar||!B.richText||B.disabled){ot.value=!1;return}const o=window.getSelection();if(!o||o.rangeCount===0){ot.value=!1;return}const l=o.getRangeAt(0);if(l.collapsed||!_l(l)){ot.value=!1;return}const s=l.getBoundingClientRect();if(!s||s.width===0&&s.height===0){ot.value=!1;return}const i=v.value;if(!i){ot.value=!1;return}const c=i.getBoundingClientRect();if(!c||c.width===0){ot.value=!1;return}const d=40,u=8,m=s.top-d/2+15;let f=s.left+s.width/2;const k=window.innerWidth||document.documentElement.clientWidth||0;let L=0;tt.value&&(L=tt.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,ze=k-R-u;if(E=Math.max(E,j),ae=Math.min(ae,ze),ae<E){const Ne=k/2;E=Ne,ae=Ne}}f<E?f=E:f>ae&&(f=ae),Ce.value={position:"fixed",top:`${Math.max(m,8)}px`,left:`${f}px`,transform:"translate(-50%, -100%)",zIndex:10003},ot.value=!0},eo=o=>{B.disabled||!B.richText||(dt.value=dt.value===o?null:o,o==="askAi"&&(we.value=null))},xl=()=>{dt.value=null,Je.value=null},pl=o=>{On(o),xl()};let al=null,zl=null,El=null,Pl=null;const $l=o=>{if(B.disabled||!B.richText){In(),Yl();return}const l=o.target,s=l.closest("a"),i=l.closest("img");if(al&&(clearTimeout(al),al=null),El&&(clearTimeout(El),El=null),s&&s!==zl){Yl(),zl=s;let c=s.getAttribute("href")||"";(!c||c==="#"||c==="")&&(c=s.textContent||""),qe.value=s,me.value=c,U.value=!0,Ee.value=!0,Bo(s)}else!s&&zl?(zl=null,al=setTimeout(()=>{Ee.value||In()},150)):s&&s===zl&&Bo(s);if(i&&i!==Pl){In(),Pl=i;let c=i.getAttribute("alt");c===null&&(c=i.alt||"");let d=i.getAttribute("data-alt");d===null&&(d=c),i.hasAttribute("alt")||i.setAttribute("alt",c),i.hasAttribute("data-alt")||i.setAttribute("data-alt",d),kt.value=i,Ut.value=c.trim()||T("textEditor.image.noAlt"),Lt.value=!0,ye.value=!0,Ol(i)}else!i&&Pl?(Pl=null,El=setTimeout(()=>{ye.value||Yl()},150)):i&&i===Pl&&Ol(i)},No=o=>{const l=o.relatedTarget;(!l||!l.closest(".dss-text-editor-content")&&!l.closest(".dss-link-popup"))&&(zl=null,Pl=null,al&&(clearTimeout(al),al=null),El&&(clearTimeout(El),El=null),In(),Yl())},In=()=>{Ee.value=!1,setTimeout(()=>{Ee.value||(U.value=!1,me.value="",Te.value||(qe.value=null))},100)},Bo=o=>{if(!o||!v.value)return;const l=o.getBoundingClientRect(),c=l.top-32-8,d=l.left+l.width/2;F.value={position:"fixed",top:`${c}px`,left:`${d}px`,transform:"translateX(-50%)",zIndex:10002}},Yl=()=>{ye.value=!1,setTimeout(()=>{ye.value||(Lt.value=!1,Ut.value="",ht.value||(kt.value=null))},100)},Ol=o=>{if(!o||!v.value)return;const l=o.getBoundingClientRect(),c=l.top-32-8,d=l.left+l.width/2;G.value={position:"fixed",top:`${c}px`,left:`${d}px`,transform:"translateX(-50%)",zIndex:10002}},jo=()=>{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")},Mo=()=>{if(qe.value){const o=qe.value.textContent||"",l=qe.value.getAttribute("href")||"",s=qe.value;lt.value=l,mt.value=o,Me.value=o,Ee.value=!1,U.value=!1,me.value="",qe.value=s,Te.value=!0}else if(ke.value){const o=window.getSelection();if(o.rangeCount>0){const s=o.getRangeAt(0).commonAncestorContainer,i=s.nodeType===1?s.closest("a"):s.parentElement?.closest("a");if(i){const c=i.textContent||"",d=i.getAttribute("href")||"";lt.value=d,mt.value=c,Me.value=c,qe.value=i,Te.value=!0}}}else{xe.value=tn();const o=window.getSelection();let l="";o.rangeCount>0&&(l=o.getRangeAt(0).toString()),lt.value="",mt.value=l,Me.value="",qe.value=null,Te.value=!0}e.nextTick(()=>{W.value&&(W.value.focus(),W.value.select())})},to=()=>{Te.value=!1,lt.value="",mt.value="",Me.value="",qe.value=null,xe.value=null},no=()=>{if(!lt.value.trim()){to();return}if(Re.value?(We.value&&(clearTimeout(We.value),We.value=null),he(),Re.value=!1):he(),mt.value.trim()||(mt.value=lt.value.trim()),qe.value&&v.value&&v.value.contains(qe.value)){const o=window.getSelection();o.rangeCount>0&&o.removeAllRanges();const l=qe.value;if(l.setAttribute("href",lt.value.trim()),mt.value.trim()!==Me.value.trim()){for(;l.firstChild;)l.removeChild(l.firstChild);l.textContent=mt.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),_t()}else if(v.value){v.value.focus();const o=window.getSelection();o.removeAllRanges(),xe.value&&Ln(xe.value);let l=null;if(o.rangeCount>0&&(l=o.getRangeAt(0)),l&&!l.collapsed){l.toString();const s=document.createElement("a");s.href=lt.value.trim(),s.textContent=mt.value.trim(),s.style.color="#60afdf",s.style.textDecoration="underline",l.deleteContents(),l.insertNode(s);const i=document.createTextNode(" ");l.setStartAfter(s),l.insertNode(i),l.setStartAfter(i),l.collapse(!0),o.removeAllRanges(),o.addRange(l)}else{l||(l=document.createRange(),l.selectNodeContents(v.value),l.collapse(!1));const s=l.startContainer,i=s.nodeType===3,c=i&&l.startOffset===s.textContent.length,d=document.createElement("a");if(d.href=lt.value.trim(),d.textContent=mt.value.trim(),d.style.color="#60afdf",d.style.textDecoration="underline",c){let u=s.parentElement;for(;u&&u!==v.value&&!["P","DIV","H1","H2","H3","H4","H5","H6"].includes(u.tagName);)u=u.parentElement;if(u&&u!==v.value){let m=u.nextElementSibling;if(m&&(m.innerHTML==="<br>"||m.innerHTML==="<br/>"||m.textContent.trim()==="")){m.textContent="",m.appendChild(d);const f=document.createTextNode(" ");m.appendChild(f);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),L=k[k.length-1];if(L&&L!==" "&&L!==" "&&L!==`
100
+ </svg>`,v=e.ref(null),we=e.ref(null),ke=e.ref(!1),G=e.ref(!1),X=e.ref(!1),me=e.ref(""),F=e.ref({}),Ee=e.ref(!1),Te=e.ref(!1),nt=e.ref(""),pt=e.ref(""),W=e.ref(null),Ue=e.ref(null),We=e.ref(null),xe=e.ref(null),Me=e.ref(""),Xe=e.ref(!1),te=e.ref({}),lt=e.ref(!1),Ce=e.ref({}),et=e.ref(null),dt=e.ref(null),yt=e.ref(!1),Et=e.ref(""),Ht=e.ref(null),It=e.ref(""),re=e.ref(""),pe=e.ref(""),De=e.ref(null),_e=e.ref(null),Jt=e.ref(null),Ct=e.ref(null),tn=e.ref(null),_t=e.ref(!1),Ut=e.ref(""),Q=e.ref({}),he=e.ref(!1),Be=e.ref("upload"),ze=e.ref(""),Ke=e.ref(null),Vt=e.ref(null),tt=e.ref([]),Xt=e.ref([]),Ze=e.ref(null),Pe=e.ref(!1),Lt=e.ref(""),$t=e.ref(""),ne=e.ref(""),Z=e.ref(""),U=e.ref(""),ie=e.ref(""),ye=e.ref(null),Ge=e.ref(null),At=e.ref(null),Yt=e.ref(!1),ot=e.ref(null),sn=e.ref(!1),S=e.ref(!1),b=e.ref(null),V=e.ref("p"),Y=e.ref(!1),le=e.ref([]),He=e.ref(null),kt=e.ref(null),at=e.ref(null),Ie=e.ref(!1),bt=e.ref(0),Nt=100,wt=e.ref(null),it=e.computed(()=>!!M.commentUser),Tt=e.computed(()=>({"dss-text-editor-no-border":!M.border,"dss-text-editor-rounded":M.rounded,"dss-text-editor-full-height":M.fullHeight,"dss-comment-overlay-open":it.value&&hn.value!==null})),St=e.computed(()=>({})),rn=e.computed(()=>!M.fixedHeight||M.fullHeight?{}:{height:`${1.6*14*M.rows+24+2}px`,resize:"none",overflowY:"auto"}),Vn=e.computed(()=>!M.fixedHeight||M.fullHeight?{}:{height:`${1.6*14*M.rows+32}px`,overflowY:"auto"}),Zn=e.computed(()=>M.richText&&Xt.value.length>0),en=e.computed(()=>{if(!M.modelValue)return"";if(M.richText){let o=M.modelValue.replace(/<script[^>]*>[\s\S]*?<\/script>/gi,"");return o=o.replace(/<style[^>]*>[\s\S]*?<\/style>/gi,""),o=o.replace(/<[^>]+>/g,""),o=o.replace(/&nbsp;/g," "),o=o.replace(/&amp;/g,"&"),o=o.replace(/&lt;/g,"<"),o=o.replace(/&gt;/g,">"),o=o.replace(/&quot;/g,'"'),o=o.replace(/&#39;/g,"'"),o=o.replace(/\s+/g," ").trim(),o}return M.modelValue}),pn=e.computed(()=>{const o=en.value.trim();return o?o.split(/\s+/).filter(l=>l.length>0).length:0}),ll=e.computed(()=>en.value.length),vl=e.computed(()=>Ct.value!==null&&Be.value==="upload"&&It.value&&It.value.startsWith("data:")),il=e.computed(()=>M.titlePlaceholder||D("textEditor.placeholders.title")),_n=e.computed(()=>M.descriptionPlaceholder||D("textEditor.placeholders.description")),gl=e.computed(()=>M.placeholder||D("textEditor.placeholders.startTyping")),$n=o=>ut&&ut[o]!==void 0,Vl=o=>{for(let l=o+1;l<M.customToolbarSlots.length;l++)if($n(M.customToolbarSlots[l]))return!0;return!1},Rl=o=>{for(let l=o+1;l<M.customToolbarSlots.length;l++){const s=M.customToolbarSlots[l];if($n(s)&&hl(s))return!0}return!1},hl=o=>M.customToolbarFloatingMap.hasOwnProperty(o)?M.customToolbarFloatingMap[o]===!0:!0,Tn=e.computed(()=>M.customToolbarSlots.some(o=>$n(o)&&hl(o))),Un=e.computed(()=>$n("title-slot")),Xn=e.computed(()=>$n("description-slot")),Hn=o=>{if(!o||o.trim()==="")return"<html></html>";const l=o.trim();return l.startsWith("<html>")&&l.endsWith("</html>")?o:`<html>${o}</html>`},zn=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},Nl=o=>{if(!o)return;const l=document.createTreeWalker(o,NodeFilter.SHOW_COMMENT,null,!1),s=[];let i=l.nextNode();for(;i;)s.push(i),i=l.nextNode();s.forEach(c=>c.remove())},L=o=>{try{const l=String(o.getDate()).padStart(2,"0"),i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][o.getMonth()],c=o.getFullYear();return`${l} ${i} ${c}`}catch{return""}},I=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=D("textEditor.started_conversation");if(c&&l===c)return!0}catch{}const i=l.toLowerCase();return i.includes("started conversation")||i.includes("démarré la conversation")||i==="started conversation"||i==="a démarré la conversation"},B=o=>{const l=o.target.value;ve("update:modelValue",l),ve("change",l)},ee=()=>{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 i=o.value;o.value="M";const c=o.scrollHeight;o.value=i,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")},Ae=()=>{sn.value=!0,ee()},ft=()=>{sn.value=!1,mt()},mt=()=>{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")},st=o=>{const s=o.target.value;sn.value&&ee(),ve("update:title",s),ve("title-change",s),At.value="title",M.richText&&(Pe.value||($t.value=Lt.value,U.value=ne.value,ie.value=Z.value),Ze.value&&clearTimeout(Ze.value),Pe.value=!0,Ze.value=setTimeout(()=>{Pe.value=!1,ge()},500))},rt=()=>{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 i=o.value;o.value="M";const c=o.scrollHeight;o.value=i,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")},vn=()=>{S.value=!0,rt()},bn=()=>{S.value=!1,Ot()},Ot=()=>{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 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")},gn=o=>{const s=o.target.value;S.value&&rt(),ve("update:description",s),ve("description-change",s),At.value="description",M.richText&&(Pe.value||($t.value=Lt.value,U.value=ne.value,ie.value=Z.value),Ze.value&&clearTimeout(Ze.value),Pe.value=!0,Ze.value=setTimeout(()=>{Pe.value=!1,ge()},500))},Kt=()=>{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(v.value),s.setEnd(l.startContainer,l.startOffset),{type:"text",start:s.toString().length,end:s.toString().length+l.toString().length}},Ln=o=>{if(!(!o||!v.value))try{const l=window.getSelection(),s=document.createRange();if(o.type==="element"&&o.element)if(v.value.contains(o.element)){s.setStart(o.element,o.offset),s.collapse(!0),l.removeAllRanges(),l.addRange(s);return}else{v.value.focus();return}let i=0;const c=[v.value];let d=null,u=!1,m=!1;for(;!m&&(d=c.pop());)if(d.nodeType===3){const f=i+d.length;!u&&o.start>=i&&o.start<=f&&(s.setStart(d,o.start-i),u=!0),u&&o.end>=i&&o.end<=f&&(s.setEnd(d,o.end-i),m=!0),i=f}else{let f=d.childNodes.length;for(;f--;)c.push(d.childNodes[f])}l.removeAllRanges(),l.addRange(s)}catch{v.value.focus()}},Rt=()=>{if(!v.value)return;v.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},i=s(v.value);if(i.nodeType===3)l.setStart(i,i.length),l.setEnd(i,i.length);else if(i.childNodes.length>0){const c=s(i);c&&c.nodeType===3?(l.setStart(c,c.length),l.setEnd(c,c.length)):(l.selectNodeContents(i),l.collapse(!1))}else l.setStart(i,0),l.setEnd(i,0);o.removeAllRanges(),o.addRange(l)},ge=(o=!1)=>{if(!v.value)return;const l=v.value.innerHTML,s=M.title||"",i=M.description||"";if(!o&&l===Lt.value&&s===ne.value&&i===Z.value)return;const c={content:$t.value||Lt.value,title:U.value!==void 0?U.value:ne.value,description:ie.value!==void 0?ie.value:Z.value},d=tt.value.length>0?tt.value[tt.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&&(tt.value.push(c),tt.value.length>50&&tt.value.shift(),Xt.value=[]),Lt.value=l,ne.value=s,Z.value=i,$t.value=l,U.value=s,ie.value=i},Bt=o=>{if(!v.value)return;vt(),v.value&&Nl(v.value);let l=null;v.value&&(v.value.querySelector("p")||(l=Kt(),Rn()));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 i=v.value.innerHTML.replace(/<!--[\s\S]*?-->/g,"").replace(/&nbsp;|\u00A0/g," "),c=Hn(i);ve("update:modelValue",c),ve("change",c),At.value="editor",Pe.value||($t.value=Lt.value,U.value=ne.value,ie.value=Z.value),Ze.value&&clearTimeout(Ze.value),Pe.value=!0,Ze.value=setTimeout(()=>{Pe.value=!1,ge(),lo(),_o()},500),e.nextTick(()=>{l&&Ln(l),vt();const d=["bold","italic","underline"],u=window.getSelection(),m=u.rangeCount>0?u.getRangeAt(0):null,f=m&&m.collapsed;if(d.forEach(k=>{try{if(f&&b.value?.command===k){te.value[k]=b.value.state;return}if(k==="bold")if(m){const A=m.commonAncestorContainer,R=A.nodeType===3?A.parentElement:A;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 se=window.getComputedStyle(R);parseInt(se.fontWeight)>=600&&(E=!0)}catch{}te.value[k]=E}else te.value.hasOwnProperty(k)||(te.value[k]=!1);else if(k==="italic")if(m){const A=m.commonAncestorContainer,R=A.nodeType===3?A.parentElement:A,E=R&&(R.tagName==="EM"||R.tagName==="I"||R.closest&&R.closest("em, i"));te.value[k]=!!E}else{const A=document.queryCommandState(k);te.value[k]=A}else{const A=document.queryCommandState(k);te.value[k]=A}}catch{}}),Mn(),Ye(),ol(),Qt(),ct(),xt("handleRichTextInput"),s&&(o.inputType==="insertText"||o.inputType==="insertCompositionText")){const k=o.data||"";k&&k.length===1&&setTimeout(()=>_o(k),0),(k===" "||k===`
101
+ `||/[.,;:!?]/.test(k))&&setTimeout(()=>{lo()},100)}G.value=!1})},vt=()=>{if(!v.value)return;const o=window.getSelection();if(!o||o.rangeCount===0)return;const l=o.getRangeAt(0),s=l.commonAncestorContainer,i=s.nodeType===3?s.parentElement:s;if(!i)return;const c=i.closest(".dss-image-wrapper");if(c){const d=c.querySelector("img");if(i!==d&&!d?.contains(i)){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 f=document.createRange();f.setStartAfter(c),f.collapse(!0),o.removeAllRanges(),o.addRange(f)}}}},Rn=()=>{if(!v.value)return;const o=v.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 i=null;s.forEach(c=>{if(c.nodeType===Node.TEXT_NODE){if((c.textContent||"").trim()===""){c.parentNode===o&&o.removeChild(c);return}i||(i=document.createElement("p"),o.insertBefore(i,c)),i.appendChild(c);return}if(c.nodeType===Node.ELEMENT_NODE){const d=c,u=d.tagName;if(u==="BR"){i=null;return}if(l.has(u)){i=null;return}i||(i=document.createElement("p"),o.insertBefore(i,d)),i.appendChild(d)}})},Ye=()=>{if(v.value&&!Yt.value){Yt.value=!0;try{v.value.querySelectorAll(".dss-image-wrapper").forEach(i=>{i.querySelector("img")||i.remove()}),v.value.querySelectorAll(".dss-image-no-alt-icon").forEach(i=>{const c=i.parentElement;!c||!c.classList.contains("dss-image-wrapper")?i.remove():c.querySelector("img")||i.remove()}),v.value.querySelectorAll("img").forEach(i=>{let c=i.getAttribute("alt");c===null&&(c=i.alt||"");const d=i.getAttribute("src")||i.src||"";if(c){const k=d.replace(/^https?:\/\//,"").replace(/^data:.*,/,""),A=c===d||c===k;(c.startsWith("http://")||c.startsWith("https://")||c.startsWith("data:")||A||A)&&(c="")}i.setAttribute("alt",c),i.setAttribute("data-alt",c);const u=!c||c.trim()==="";let m=i.parentElement;const f=m&&m.classList.contains("dss-image-wrapper");if(f){const k=m.querySelector(".dss-image-no-alt-icon");k&&k.remove()}else{const k=i.nextElementSibling?.classList.contains("dss-image-no-alt-icon")?i.nextElementSibling:null;k&&k.remove()}if(u){f?m.setAttribute("contenteditable","false"):(m=document.createElement("span"),m.className="dss-image-wrapper",m.setAttribute("contenteditable","false"),i.parentNode.insertBefore(m,i),m.appendChild(i));const k=document.createElement("div");k.className="dss-image-no-alt-icon",k.setAttribute("contenteditable","false"),k.innerHTML=J,m.appendChild(k)}else if(f&&m.children.length===1){const k=m.parentNode;k.insertBefore(i,m),k.removeChild(m)}})}finally{Yt.value=!1}}},gt=o=>{lo(),ve("blur",o),Il()},ae=()=>{if(M.disabled||!M.richText||!v.value)return;un(),Ze.value&&(clearTimeout(Ze.value),Ze.value=null),Pe.value&&(ge(),Pe.value=!1);const o=At.value==="title",l=At.value==="description",s=At.value==="editor";if(tt.value.length===0){o&&ye.value?ye.value.focus():l&&Ge.value?Ge.value.focus():v.value.focus(),document.execCommand("undo",!1),e.nextTick(()=>{Bt()});return}const i={content:v.value.innerHTML,title:M.title||"",description:M.description||""};Xt.value.push(i);const c=tt.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||"";v.value.innerHTML=d,Lt.value=d,ne.value=u,Z.value=m,$t.value=d,U.value=u,ie.value=m,e.nextTick(()=>{Mn(),Bn(),Wt(),Qt();const f=Hn(d);ve("update:modelValue",f),ve("update:title",u),ve("update:description",m),ve("change",f),ve("title-change",u),ve("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),ee()}}else if(l){if(Ge.value){Ge.value.focus();const k=m.length;Ge.value.setSelectionRange(k,k)}}else if(s)Rt();else if(ye.value&&document.activeElement===ye.value){const k=u.length;ye.value.setSelectionRange&&ye.value.setSelectionRange(k,k),ee()}else if(Ge.value&&document.activeElement===Ge.value){const k=m.length;Ge.value.setSelectionRange(k,k)}else v.value&&Rt()},10)})})}},on=()=>{if(M.disabled||!M.richText||!v.value)return;un();const o=At.value==="title",l=At.value==="description",s=At.value==="editor";if(Xt.value.length===0){o&&ye.value?ye.value.focus():l&&Ge.value?Ge.value.focus():v.value.focus(),document.execCommand("redo",!1),e.nextTick(()=>{Bt()});return}const i={content:v.value.innerHTML,title:M.title||"",description:M.description||""};tt.value.push(i);const c=Xt.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||"";v.value.innerHTML=d,Lt.value=d,ne.value=u,Z.value=m,$t.value=d,U.value=u,ie.value=m,e.nextTick(()=>{Mn(),Bn(),Wt(),Qt();const f=Hn(d);ve("update:modelValue",f),ve("update:title",u),ve("update:description",m),ve("change",f),ve("title-change",u),ve("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),ee()}}else if(l){if(Ge.value){Ge.value.focus();const k=m.length;Ge.value.setSelectionRange(k,k)}}else if(s)Rt();else if(ye.value&&document.activeElement===ye.value){const k=u.length;ye.value.setSelectionRange&&ye.value.setSelectionRange(k,k),ee()}else if(Ge.value&&document.activeElement===Ge.value){const k=m.length;Ge.value.setSelectionRange(k,k)}else v.value&&Rt()},10)})})}},Fe=()=>{if(!v.value)return;v.value.querySelectorAll('span[style*="font-weight"]').forEach(i=>{const c=i.style.fontWeight;if(c==="normal"||c==="400"){const d=document.createDocumentFragment();for(;i.firstChild;)d.appendChild(i.firstChild);i.parentNode&&i.parentNode.replaceChild(d,i)}}),v.value.querySelectorAll('span[style*="font-weight"]').forEach(i=>{if(parseInt(i.style.fontWeight)>=600){const d=document.createElement("b");for(d.style.fontWeight="600";i.firstChild;)d.appendChild(i.firstChild);i.parentNode&&i.parentNode.replaceChild(d,i)}}),v.value.querySelectorAll("b, strong").forEach(i=>{i.style.fontWeight="600"})},ol=()=>{if(!v.value)return;v.value.querySelectorAll("i, em").forEach(l=>{l.style.fontStyle="italic"})},cn=()=>{const o=window.getSelection();if(!o||o.rangeCount===0)return!1;const l=o.getRangeAt(0);let s=!1;if(l.collapsed){const i=l.startContainer;let c=i.nodeType===3?i.parentElement:i;for(;c&&c!==v.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 i=l.commonAncestorContainer.nodeType===1?l.commonAncestorContainer:l.commonAncestorContainer.parentNode;if(i){const c=document.createTreeWalker(i,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!==v.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(()=>{ol()}),!1;if(l.collapsed)document.execCommand("italic",!1),e.nextTick(()=>{ol()});else try{const i=l.extractContents(),c=document.createElement("em");c.style.fontStyle="italic",c.appendChild(i),l.insertNode(c),l.setStartAfter(c),l.collapse(!0),o.removeAllRanges(),o.addRange(l),e.nextTick(()=>{ol()})}catch{document.execCommand("italic",!1),e.nextTick(()=>{ol()})}return!0},yl=()=>{const o=window.getSelection();if(!o||o.rangeCount===0)return!1;const l=o.getRangeAt(0);let s=!1;if(l.collapsed){const i=l.startContainer;let c=i.nodeType===3?i.parentElement:i;for(;c&&c!==v.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 i=l.commonAncestorContainer.nodeType===1?l.commonAncestorContainer:l.commonAncestorContainer.parentNode;if(i){const c=document.createTreeWalker(i,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!==v.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(()=>{Fe()}),!1;if(l.collapsed)document.execCommand("bold",!1),e.nextTick(()=>{const i=window.getSelection();if(i.rangeCount>0){const c=i.getRangeAt(0),d=c.startContainer;let u=d.nodeType===3?d.parentElement:d;for(;u&&u!==v.value;){if(u.tagName==="SPAN"&&u.style.fontWeight){const m=u.style.fontWeight;if(m==="normal"||m==="400"){const f=document.createElement("b");f.style.fontWeight="600";const k=document.createDocumentFragment();for(;u.firstChild;)k.appendChild(u.firstChild);f.appendChild(k),u.parentNode&&u.parentNode.replaceChild(f,u),c.setStart(f,0),c.collapse(!0),i.removeAllRanges(),i.addRange(c);break}}else if(u.tagName==="STRONG"||u.tagName==="B"){u.style.fontWeight="600";break}u=u.parentElement}if(!u||u===v.value){const m=document.createElement("b");m.style.fontWeight="600",m.innerHTML="<br>",c.insertNode(m),c.setStart(m,0),c.collapse(!0),i.removeAllRanges(),i.addRange(c)}}Fe()});else try{const i=l.extractContents(),c=document.createElement("b");c.style.fontWeight="600",c.appendChild(i),l.insertNode(c),l.setStartAfter(c),l.collapse(!0),o.removeAllRanges(),o.addRange(l),e.nextTick(()=>{Fe()})}catch{document.execCommand("bold",!1),e.nextTick(()=>{Fe()})}return!0},Nn=(o,l=null)=>{if(M.disabled||!M.richText||!v.value)return;Pe.value?(Ze.value&&(clearTimeout(Ze.value),Ze.value=null),ge(),Pe.value=!1):ge(),un(),v.value.focus();const s=window.getSelection();let i=null;if(s&&s.rangeCount>0){const d=s.getRangeAt(0);!d.collapsed&&_l(d)&&(i=Kt())}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 f=document.createTextNode(l);u.insertNode(f),u.selectNodeContents(f)}}}if(o==="bold"){const d=yl();te.value.bold=d;const u=window.getSelection();u.rangeCount>0&&u.getRangeAt(0).collapsed&&(b.value={command:"bold",state:d}),e.nextTick(()=>{i&&(Ln(i),e.nextTick(()=>{const m=Gt("bold");te.value.bold=m})),Bt(),Bn(),Qt()});return}if(o==="italic"){const d=cn();te.value.italic=d;const u=window.getSelection();u.rangeCount>0&&u.getRangeAt(0).collapsed&&(b.value={command:"italic",state:d}),e.nextTick(()=>{i&&(Ln(i),e.nextTick(()=>{const m=Gt("italic");te.value.italic=m})),Bt(),ol(),Bn(),Qt()});return}let c=!1;try{c=document.execCommand(o,!1,l)}catch{}e.nextTick(()=>{if(i&&Ln(i),["bold","italic","underline"].includes(o))try{if(o==="bold")i&&e.nextTick(()=>{const u=Gt("bold");te.value.bold=u});else if(o==="italic")if(i)e.nextTick(()=>{const u=Gt("italic");te.value.italic=u});else{const u=document.queryCommandState(o);te.value[o]=u}else{const u=document.queryCommandState(o);te.value[o]=u}}catch{te.value.hasOwnProperty(o)?te.value[o]=!te.value[o]:te.value[o]=!0}if(o==="createLink"&&l){const u=window.getSelection();if(u.rangeCount>0){const f=u.getRangeAt(0),k=f.commonAncestorContainer.nodeType===1?f.commonAncestorContainer.closest("a"):f.commonAncestorContainer.parentElement?.closest("a");k&&(!k.getAttribute("href")||k.getAttribute("href")==="")&&k.setAttribute("href",l)}v.value.querySelectorAll("a").forEach(f=>{const k=f.getAttribute("href");(!k||k===""||k==="#")&&f.setAttribute("href",l)})}Bt(),Bn(),Qt()})},Gt=(o,l=null)=>{if(M.disabled||!v.value)return!1;try{if(o==="formatBlock"&&l){const i=document.queryCommandValue("formatBlock");if(l==="<blockquote>"){const c=i.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 i===l||i.toLowerCase()===l.toLowerCase()}if(["bold","italic","underline"].includes(o))try{const i=window.getSelection();if(i.rangeCount>0){const c=i.getRangeAt(0);if(o==="bold"){let u=!1;if(c.collapsed){const m=c.commonAncestorContainer,f=m.nodeType===3?m.parentElement:m;if(f&&((f.tagName==="STRONG"||f.tagName==="B"||f.closest&&f.closest("strong, b"))&&(u=!0),!u&&f.style&&parseInt(f.style.fontWeight)>=600&&(u=!0),!u))try{const k=window.getComputedStyle(f);parseInt(k.fontWeight)>=600&&(u=!0)}catch{}return te.value.hasOwnProperty(o)?te.value[o]:(te.value[o]=u,u)}else{const m=c.commonAncestorContainer.nodeType===1?c.commonAncestorContainer:c.commonAncestorContainer.parentNode;let f=!1;if(m){const k=document.createTreeWalker(m,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);let A;for(;A=k.nextNode();)if(!(typeof c.intersectsNode=="function"&&!c.intersectsNode(A))){if(A.nodeType===3){if(!(A.textContent||"").trim())continue;f=!0;let E=A.parentElement;for(;E&&E!==v.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(A.nodeType===1){const R=A;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 te.value[o]=u&&f,u&&f}}if(o==="italic"){let u=!1;if(c.collapsed){const m=c.commonAncestorContainer,f=m.nodeType===3?m.parentElement:m;if(f&&((f.tagName==="EM"||f.tagName==="I"||f.closest&&f.closest("em, i"))&&(u=!0),!u&&f.style&&f.style.fontStyle==="italic"&&(u=!0),!u))try{window.getComputedStyle(f).fontStyle==="italic"&&(u=!0)}catch{}return te.value.hasOwnProperty(o)?te.value[o]:(te.value[o]=u,u)}else{const m=c.commonAncestorContainer.nodeType===1?c.commonAncestorContainer:c.commonAncestorContainer.parentNode;let f=!1;if(m){const k=document.createTreeWalker(m,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);let A;for(;A=k.nextNode();)if(!(typeof c.intersectsNode=="function"&&!c.intersectsNode(A))){if(A.nodeType===3){if(!(A.textContent||"").trim())continue;f=!0;let E=A.parentElement;for(;E&&E!==v.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(A.nodeType===1){const R=A;if(R.tagName==="EM"||R.tagName==="I"){u=!0;break}if(R.style&&R.style.fontStyle==="italic"){u=!0;break}}if(u)break}}return te.value[o]=u&&f,u&&f}}const d=document.queryCommandState(o);return c.collapsed&&te.value.hasOwnProperty(o)?te.value[o]:(te.value[o]=d,d)}return te.value.hasOwnProperty(o)?te.value[o]:!1}catch{return te.value.hasOwnProperty(o)?te.value[o]:!1}try{return document.queryCommandState(o)}catch{return!1}}catch{return!1}},Fl=o=>{M.disabled||!M.richText||(we.value=we.value===o?null:o,o==="askAi"&&(dt.value=null))},un=()=>{we.value=null,Ke.value=null},Pn=o=>{Nn("formatBlock",o),un()},Zl=o=>{if(!o||!v.value)return o;const l=Oe=>{let Ne=Oe.nodeType===Node.TEXT_NODE?Oe.parentElement:Oe;for(;Ne&&Ne!==v.value;){const ht=Ne.tagName;if(ht==="P"){const dn=Ne.parentElement;if(dn===v.value||dn.tagName==="BLOCKQUOTE")return Ne}if(ht==="BLOCKQUOTE")break;Ne=Ne.parentElement}return null},s=l(o.startContainer),i=l(o.endContainer);if(!s||!i)return o;const c=[],d=document.createTreeWalker(v.value,NodeFilter.SHOW_ELEMENT,{acceptNode:Oe=>{const Ne=Oe.tagName;if(Ne==="P"){const ht=Oe.parentElement;if(ht===v.value||ht.tagName==="BLOCKQUOTE")return NodeFilter.FILTER_ACCEPT}return Ne==="BLOCKQUOTE"?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_SKIP}});let u;for(;u=d.nextNode();)c.push(u);const m=c.indexOf(s),f=c.indexOf(i);if(m===-1||f===-1)return o;const k=Math.min(m,f),A=Math.max(m,f),R=c.slice(k,A+1);if(R.length===0)return o;const E=R[0],se=R[R.length-1],j=document.createRange();return j.setStartBefore(E),j.setEndAfter(se),j},Yn=()=>{if(M.disabled||!M.richText||!v.value)return;Pe.value?(Ze.value&&(clearTimeout(Ze.value),Ze.value=null),ge(),Pe.value=!1):ge(),un(),v.value.focus();const o=window.getSelection();if(o.rangeCount===0)return;let l=o.getRangeAt(0);!l.collapsed&&_l(l)&&(l=Zl(l),o.removeAllRanges(),o.addRange(l));let s=null;!l.collapsed&&_l(l)&&(s=Kt());const i=l.commonAncestorContainer,c=i.nodeType===1?i.tagName==="BLOCKQUOTE"?i:i.closest("blockquote"):i.parentElement?.closest("blockquote");if(!!(c&&v.value.contains(c))){if(c){const u=c.parentNode;Array.from(c.childNodes).forEach(f=>{if(f.nodeType===Node.ELEMENT_NODE)if(f.tagName==="P"||f.tagName==="DIV")u.insertBefore(f,c);else{const k=document.createElement("p");k.appendChild(f.cloneNode(!0)),u.insertBefore(k,c)}else if(f.nodeType===Node.TEXT_NODE&&f.textContent.trim()){const k=document.createElement("p");k.appendChild(f.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 f=[],k=document.createTreeWalker(u,NodeFilter.SHOW_TEXT,{acceptNode:E=>E.parentNode===u&&E.textContent.trim()?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let A;for(;A=k.nextNode();)f.push(A);if(f.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&&Ln(s),Wt(),Bt(),Qt()})},Bl=()=>{if(!v.value)return;const o=window.getSelection();if(o.rangeCount===0)return;const s=o.getRangeAt(0).commonAncestorContainer,i=s.nodeType===1?s.tagName==="BLOCKQUOTE"?s:s.closest("blockquote"):s.parentElement?.closest("blockquote");if(!i||!v.value.contains(i))return;const c=A=>{if(!A)return!1;const R=A.textContent||"",se=(A.innerHTML||"").trim();return R.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&&i.contains(d)&&c(d)&&d.remove();i.lastChild;){const A=i.lastChild;if(A.nodeType===1&&A.tagName==="BR")A.remove();else if(A.nodeType===3)if((A.textContent||"").trim()==="")A.remove();else break;else break}if(i.children.length>0)for(let A=i.children.length-1;A>=0;A--){const R=i.children[A];if((R.tagName==="P"||R.tagName==="DIV")&&c(R))R.remove();else break}let u=i.innerHTML;const m=u;u=u.replace(/(<br\s*\/?>)+$/gi,""),u!==m&&(i.innerHTML=u);const f=document.createElement("p");f.innerHTML="<br>",i.parentNode?i.nextSibling?i.parentNode.insertBefore(f,i.nextSibling):i.parentNode.appendChild(f):v.value&&v.value.appendChild(f);const k=document.createRange();k.selectNodeContents(f),k.collapse(!0),o.removeAllRanges(),o.addRange(k),e.nextTick(()=>{Wt(),Bt()})},Bn=()=>{if(!v.value){ke.value=!1;return}try{const o=window.getSelection();if(o.rangeCount>0){const s=o.getRangeAt(0).commonAncestorContainer,i=s.nodeType===1?s.closest("a"):s.parentElement?.closest("a");ke.value=!!i}else ke.value=!1}catch{ke.value=!1}},Gl=()=>{if(!v.value)return;const o=window.getSelection();o&&o.rangeCount>0&&o.getRangeAt(0),xe.value=Kt();const l=window.getSelection();let s="";l.rangeCount>0&&(s=l.getRangeAt(0).toString()),nt.value="",pt.value=s,Me.value="",We.value=null,Te.value=!0,un(),e.nextTick(()=>{W.value&&W.value.focus()})},cl=()=>{if(!v.value)return;Pe.value?(Ze.value&&(clearTimeout(Ze.value),Ze.value=null),ge(),Pe.value=!1):ge();const o=window.getSelection();let l=null;if(o.rangeCount>0){const i=o.getRangeAt(0).commonAncestorContainer;l=i.nodeType===1?i.closest("a"):i.parentElement?.closest("a")}if(!l&&We.value&&(l=We.value),l&&l.parentNode){const s=document.createDocumentFragment();for(;l.firstChild;)s.appendChild(l.firstChild);if(l.parentNode.replaceChild(s,l),s.firstChild){const i=document.createRange();i.setStartBefore(s.firstChild),i.setEndAfter(s.lastChild||s.firstChild),o.removeAllRanges(),o.addRange(i),document.execCommand("removeFormat",!1),i.collapse(!1),o.removeAllRanges(),o.addRange(i)}We.value=null}else Nn("unlink");ke.value=!1,un(),e.nextTick(()=>{Bt(),Bn()})},Ul=()=>{M.disabled||!M.richText||v.value&&(Pe.value?(Ze.value&&(clearTimeout(Ze.value),Ze.value=null),ge(),Pe.value=!1):ge(),un(),v.value.focus(),document.execCommand("insertUnorderedList",!1),e.nextTick(()=>{Mn(),Bt(),Qt()}))},kl=()=>{M.disabled||!M.richText||v.value&&(Pe.value?(Ze.value&&(clearTimeout(Ze.value),Ze.value=null),ge(),Pe.value=!1):ge(),un(),v.value.focus(),document.execCommand("insertOrderedList",!1),e.nextTick(()=>{Mn(),Bt(),Qt()}))},Ql=o=>{const l=o.parentElement;if(!l||l.tagName!=="OL")return null;let s=0,i=o.previousElementSibling;for(;i;)i.tagName==="LI"&&s++,i=i.previousElementSibling;return s+1},Mn=()=>{if(!v.value)return;v.value.querySelectorAll("li > ol").forEach(l=>{const s=l.parentElement;if(s&&s.tagName==="LI"){const i=Ql(s);i!==null&&Array.from(l.children).filter(d=>d.tagName==="LI").forEach(d=>{d.setAttribute("data-parent-num",String(i))})}})},ul=()=>{if(M.disabled||!M.richText||!v.value)return;un(),v.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(),Bt()});return}const i=s.parentElement;if(!i||i.tagName!=="OL"&&i.tagName!=="UL")return;const c=s.previousElementSibling;if(c&&c.tagName==="LI"){const d=i.tagName.toLowerCase();let u=c.querySelector(`:scope > ${d}`);u||(u=document.createElement(d),c.appendChild(u));const m=Ql(c);u.appendChild(s),m!==null&&i.tagName==="OL"&&s.setAttribute("data-parent-num",String(m)),Mn();const f=document.createRange();f.selectNodeContents(s),f.collapse(!1),o.removeAllRanges(),o.addRange(f),e.nextTick(()=>{Bt(),Qt()})}else document.execCommand("indent",!1),e.nextTick(()=>{Mn(),Bt(),Qt()})},xn=()=>{if(M.disabled||!M.richText||!v.value)return;un(),v.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(),Bt()});return}const i=s.parentElement;if(!i||i.tagName!=="OL"&&i.tagName!=="UL")return;const c=i.parentElement;if(c&&c.tagName==="LI"){const d=c.parentElement;if(d&&(d.tagName==="OL"||d.tagName==="UL")){i.tagName==="OL"&&s.removeAttribute("data-parent-num"),d.insertBefore(s,c.nextSibling),i.children.length===0&&i.remove(),Mn();const u=document.createRange();u.selectNodeContents(s),u.collapse(!1),o.removeAllRanges(),o.addRange(u),e.nextTick(()=>{Bt(),Qt()});return}}document.execCommand("outdent",!1),e.nextTick(()=>{Mn(),Bt(),Qt()})},hn=e.ref(null),jn=e.ref(null),y=e.ref({}),h=e.ref(""),x=e.ref(null),q=e.ref("");e.ref("");const ue=e.ref(null);e.ref("");const Qe=e.ref([]),qt=e.ref(!1),yn=e.ref(!1),Fn=o=>{if(!o)return"";const l=o.cloneRange(),s=document.createElement("div");return s.appendChild(l.cloneContents()),s.innerHTML},On=()=>{if(!M.commentUser||M.disabled||!M.richText||!v.value)return;if(hn.value!==null){hn.value=null,h.value="",q.value="",ue.value=null,Qe.value=[],Al(!0);return}un(),v.value.focus();const o=window.getSelection();if(!o||o.rangeCount===0)return;const l=o.getRangeAt(0);if(l.collapsed||!_l(l))return;q.value=Fn(l)||"",ue.value=Kt();const s=l.getBoundingClientRect(),i=v.value.parentElement;if(!i)return;const c=i.getBoundingClientRect(),d=s.bottom-c.top,m=Math.max(d+8,0);y.value={top:`${m}px`,bottom:"auto"},hn.value=Date.now(),e.nextTick(()=>{if(h.value="",x.value){const k=x.value;k.style.height="auto",k.style.height=`${k.scrollHeight}px`,k.focus()}const f=i.querySelector(".dss-comment-overlay");if(f&&i){const k=i.querySelector(".dss-text-editor-footer");if(k){const A=i.getBoundingClientRect(),R=f.getBoundingClientRect(),E=k.getBoundingClientRect(),se=R.bottom-A.top,j=E.top-A.top,Oe=8;if(se>j-Oe){const Ne=E.height;y.value={bottom:`${Ne+Oe}px`,top:"auto"}}else y.value={top:`${m}px`,bottom:"auto"}}}})},Cl=()=>{if(!h.value.trim())return;const o=h.value.trim(),l=new Date,s={text:o,selectionText:q.value,selectionRange:ue.value,commentId:hn.value,user:M.commentUser||null,createdAt:l.toISOString()};Qe.value=[...Qe.value,s],ve("comment-submitted",s),Vo(s),ue.value&&!Uo(ue.value)&&go(hn.value,ue.value),h.value="",e.nextTick(()=>{if(x.value){const i=x.value;i.style.height="auto",i.style.height=`${i.scrollHeight}px`,i.focus()}xt("sendComment")})},fo=(o,l)=>{if(!(!M.commentUser||!o.user||o.user.id!==M.commentUser.id)){if(Qe.value=Qe.value.filter((s,i)=>i!==l),hn.value!==null&&v.value){const s=String(hn.value),i=v.value.querySelector(`[data-comment="${s}"], [data-fake-comment="${s}"]`);if(i&&Qe.value.length>0){const c=[],d=new Set;Qe.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?i.setAttribute("data-comment-user",JSON.stringify(c[0])):i.removeAttribute("data-comment-user"),c.length>1?i.setAttribute("data-comment-user-2",JSON.stringify(c[1])):i.removeAttribute("data-comment-user-2"),i.setAttribute("data-comment-count",String(Qe.value.length))}else i&&Qe.value.length===0&&(i.removeAttribute("data-comment-user"),i.removeAttribute("data-comment-user-2"),i.setAttribute("data-comment-count","0"))}if(ve("comment-deleted",{comment:o,index:l,commentId:hn.value}),M.comments&&Array.isArray(M.comments)){const s=M.comments.filter(i=>!(i.commentId===o.commentId&&i.text===o.text&&i.user?.id===o.user?.id));ve("update:comments",s)}e.nextTick(()=>{xt("deleteComment")})}},Uo=o=>{if(!o||!v.value)return!1;try{const l=vo(o);if(!l)return!1;const s=l.commonAncestorContainer,i=s.nodeType===3?s.parentElement:s;if(i)return!!i.closest("[data-comment], [data-fake-comment]")}catch{}return!1},vo=o=>{if(!o||!v.value)return null;try{const l=document.createRange();if(o.type==="element"&&o.element)return v.value.contains(o.element)?(l.setStart(o.element,o.offset),l.collapse(!0),l):null;let s=0;const i=[v.value];let c=null,d=!1,u=!1;for(;!u&&(c=i.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--;)i.push(c.childNodes[m])}return d?l:null}catch{return null}},go=(o,l)=>{if(!(!o||!l||!v.value))try{const s=vo(l);if(!s||s.collapsed)return;const i=s.commonAncestorContainer,c=i.nodeType===3?i.parentElement:i;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,f=s.endContainer,k=s.startOffset,A=s.endOffset,R=m.nodeType===3?m.parentNode:m,E=f.nodeType===3?f.parentNode:f;if(R===E&&k===0&&A===(f.nodeType===3?f.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 f=s.extractContents();d.appendChild(f),s.insertNode(d)}const u=v.value.querySelector(`[data-comment="${String(o)}"]`);e.nextTick(()=>{xt("wrapSelectionWithCommentMarker"),Bt()})}catch{}},Vo=o=>{if(!o||!o.commentId)return;const l=Array.isArray(M.comments)?[...M.comments]:[],s=typeof o.commentId=="string"&&o.commentId.startsWith("comment-")?Date.now():Number(o.commentId)||o.commentId;let i=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(i>=0){const d=l[i];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(f=>f.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)}qt.value=!0,ve("update:comments",l)},Xo=(o,l=[])=>{if(!M.commentUser||M.disabled||!M.richText||!v.value)return;const s=v.value;let i=null;try{i=s.querySelector(o)}catch{return}if(!i)return;un(),s.focus();const c=document.createRange();c.selectNodeContents(i);const d=window.getSelection();d&&(d.removeAllRanges(),d.addRange(c)),q.value=i.innerHTML||"",ue.value=Kt();const u=c.getBoundingClientRect(),m=s.parentElement;if(m){const A=m.getBoundingClientRect(),R=u.bottom-A.top,se=Math.max(R+8,0);y.value={top:`${se}px`,bottom:"auto"}}const f=i.getAttribute("data-comment")||i.getAttribute("data-fake-comment");let k=[];if(f&&M.comments&&Array.isArray(M.comments)){const A=M.comments.find(R=>String(R.conversation_id)===String(f));if(A&&A.conversation&&Array.isArray(A.conversation)){const R=A.conversation.map(E=>({id:E.id||E.commentary_id,commentary_id:E.id||E.commentary_id,conversation_id:A.id||A.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(l)&&l.length>0&&(k=l.slice()),k.sort((A,R)=>{const E=Oe=>{if(!Oe)return 0;const Ne=new Date(Oe).getTime();return isNaN(Ne)?0:Ne},se=E(A.createdAt),j=E(R.createdAt);return se===j?0:se-j}),Qe.value=k,Al(!0),hn.value=f||null,i&&(jn.value=i,i.classList.add("editor-comment-highlighted")),e.nextTick(()=>{if(h.value="",x.value){const A=x.value;A.style.height="auto",A.style.height=`${A.scrollHeight}px`,A.focus()}if(m){const A=m.querySelector(".dss-comment-overlay");if(A){const R=m.querySelector(".dss-text-editor-footer");if(R){const E=m.getBoundingClientRect(),se=A.getBoundingClientRect(),j=R.getBoundingClientRect(),Oe=se.bottom-E.top,Ne=j.top-E.top,ht=8;if(Oe>Ne-ht){const dn=j.height;y.value={bottom:`${dn+ht}px`,top:"auto"}}}}}xt("openCommentOverlayForSelector")})},ho=e.ref(null),Jl=e.ref(0),Yo=o=>{if(!(M.disabled||!M.richText)){if(o.key==="Escape"){const l=window.getSelection();if(l.rangeCount>0){const i=l.getRangeAt(0).commonAncestorContainer,c=i.nodeType===1?i.tagName==="BLOCKQUOTE"?i:i.closest("blockquote"):i.parentElement?.closest("blockquote");if(!!(c&&v.value&&v.value.contains(c))){o.preventDefault();let u=null;i.nodeType===3?u=i.parentElement:i.tagName==="P"||i.tagName==="DIV"?u=i:u=i.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(()=>{Bl()},50);return}}}if(o.key.length===1||o.key==="Enter"){const l=window.getSelection();if(l&&l.rangeCount>0){const s=l.getRangeAt(0),i=s.commonAncestorContainer,c=i.nodeType===3?i.parentElement:i;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,f=s.endContainer.nodeType===3?s.endContainer.parentElement:s.endContainer;if(d.contains(m)&&m!==u||d.contains(f)&&f!==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 i=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"&&(i=m,c=i.closest(".dss-image-wrapper"))),c||(c=u.closest(".dss-image-wrapper"),c&&(i=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"&&(i=m,c=i.closest(".dss-image-wrapper"))),c||(c=u.closest(".dss-image-wrapper"),c&&(i=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"?(i=d,c=i.closest(".dss-image-wrapper")):(i=d.querySelector("img"),i&&(c=i.closest(".dss-image-wrapper"))),c){const f=c.contains(u)||u===c,k=c.contains(m)||m===c,R=s.cloneContents().textContent?.trim()||"",E=c.textContent?.trim()||"";(!f||!k||R.length>E.length)&&(c=null,i=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(()=>{Bt()});return}}}}if(o.key==="Tab"){o.preventDefault(),o.shiftKey?xn():ul();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=f=>{if(!f)return!1;let k=f.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 A=f.parentElement;return A&&A!==v.value?m(A):!1};if(u.nodeType===3){const f=u.parentElement;if(f&&(m(f)||m(u))){const k=f.closest("p, div");if(k&&k!==v.value){o.preventDefault(),o.stopPropagation();let A=null;const R=s.startOffset;R<u.length&&(A=u.splitText(R));const E=document.createElement("p");if(A?E.appendChild(A):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();A?se.setStart(A,0):se.setStart(E,0),se.collapse(!0),l.removeAllRanges(),l.addRange(se),e.nextTick(()=>{Bt()});return}}}}const i=s.commonAncestorContainer,c=i.nodeType===1?i.tagName==="BLOCKQUOTE"?i:i.closest("blockquote"):i.parentElement?.closest("blockquote");if(!!(c&&v.value&&v.value.contains(c))){let u=null;i.nodeType===3?u=i.parentElement:i.tagName==="P"||i.tagName==="DIV"?u=i:u=i.closest("p, div");const m=j=>{if(!j)return!1;const Oe=j.textContent||"",ht=(j.innerHTML||"").trim(),dn=ht.replace(/<br\s*\/?>/gi,"").trim();return Oe.trim()===""||ht===""||dn===""||ht==="<br>"||ht==="<br/>"||ht==="<p></p>"||ht==="<p><br></p>"||ht==="<p><br/></p>"||ht==="<p> </p>"||ht==="<p><br> </p>"||ht==="<div></div>"||ht==="<div><br></div>"||ht==="<div><br/></div>"},f=c.lastChild,k=f&&f.nodeType===1&&f.tagName==="BR",A=s.startContainer,R=A.nodeType===3?A.parentElement:A,E=R===c||R&&R.parentElement===c;if(u&&m(u)||k&&E){o.preventDefault(),setTimeout(()=>{Bl()},50);return}}}}if(o.key===" "){const l=Date.now(),s=l-Jl.value;if(ho.value===" "&&s<300){const i=window.getSelection();if(i.rangeCount>0){const c=i.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(),ul();return}}}}ho.value=" ",Jl.value=l}else ho.value=o.key}},yo=o=>{if(M.disabled||!M.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,"")),ge();const i=window.getSelection();let c=null;if(i&&i.rangeCount>0){let m=i.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 f=new DOMParser().parseFromString(u,"text/html");let k=v.value.querySelector("h1")?1:0;if(f.querySelectorAll("h1").forEach(R=>{if(k>0){const E=f.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(f.body.children).filter(se=>R.includes(se.tagName));if(E.length===1){const se=E[0].tagName,j=c.tagName,Oe=c.textContent.trim()===""&&!c.querySelector("img");let Ne=!1;if(["H1","H2","H3","H4","H5","H6"].includes(j)?Ne=!0:Oe||(se===j||se==="P")&&(Ne=!0),Ne)return E[0].innerHTML.trim()}}return f.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);Bt()},An=o=>{if(we.value){const s=o.target;!s.closest(".dss-toolbar-dropdown")&&!s.closest(".dss-toolbar-dropdown-toggle")&&un()}if(lt.value){const s=o.target,i=s.closest(".dss-floating-toolbar"),c=v.value&&s.closest(".dss-text-editor-content");!i&&!c&&Il()}if(dt.value){const s=o.target,i=s.closest(".dss-floating-toolbar"),c=s.closest(".dss-toolbar-dropdown");!i&&!c&&bl()}const l=o.target;if(!l.closest(".dss-toolbar-dropdown")&&!l.closest(".dss-toolbar-dropdown-submenu")&&(Ke.value=null),!v.value||!l.closest(".dss-text-editor-content")){const s=window.getSelection();if(s&&s.rangeCount>0){const i=s.getRangeAt(0);Y.value=!i.collapsed&&_l(i)}else Y.value=!1}if(hn.value!==null){const s=document.querySelector(".dss-comment-overlay");let i=!1;if(s){const u=s.getBoundingClientRect(),m=o.clientX,f=o.clientY;i=m>=u.left&&m<=u.right&&f>=u.top&&f<=u.bottom}const c=l.closest(".dss-toolbar-button"),d=c&&c.getAttribute("title")==="Comment";!i&&!d&&(hn.value=null,h.value="",q.value="",ue.value=null,Qe.value=[],Al(!0))}},P=(o,l)=>{o&&o.stopPropagation&&o.stopPropagation(),Vt.value&&(clearTimeout(Vt.value),Vt.value=null),Ke.value=l},En=o=>{const l=o.relatedTarget;if(l){const s=l.closest(".dss-toolbar-dropdown-submenu"),i=l.closest(".dss-toolbar-dropdown-item-has-submenu");if(s||i)return}Vt.value&&clearTimeout(Vt.value),Vt.value=setTimeout(()=>{Ke.value=null,Vt.value=null},150)},Kn=o=>{Ke.value=null};let Xl=0;const Sn=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,i)=>{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-${++Xl}`;s.classList.add("dss-toolbar-dropdown-item-has-submenu"),s.setAttribute("data-submenu-id",m);let f=null;c?(s.tagName==="BUTTON"&&s.parentNode.insertBefore(c,s.nextSibling),c.classList.add("dss-toolbar-dropdown-submenu"),f=c):u&&(d.classList.add("dss-toolbar-dropdown-submenu"),f=d),f&&(f.setAttribute("data-submenu-id",m),f.setAttribute("data-processed","true"),c&&s.tagName!=="BUTTON"?f.dataset.originalParentRef="inside":f.dataset.originalParentRef="sibling",Array.from(f.children).forEach(A=>{(A.tagName==="BUTTON"||A.tagName==="DIV")&&!A.classList.contains("dss-toolbar-dropdown-item")&&A.classList.add("dss-toolbar-dropdown-item")}))}})},wn=()=>{document.querySelectorAll(".dss-toolbar-dropdown").forEach(l=>{Sn(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=f=>{const k=c.getAttribute("data-submenu-id");k&&P(f,k)},m=En;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 A=c.getAttribute("data-submenu-id");A&&P(k,A)},m=En;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",Kn)})})})};let jt=null;const nn=()=>{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&&Wn(o,l)}if(lt.value&&Qt(),M.richText){if(jt!==null)return;jt=setTimeout(()=>{jt=null,xt("handleWindowResize")},150)}},Gn=()=>{if(!M.richText)return;document.querySelectorAll(".dss-toolbar-custom-group").forEach(l=>{Array.from(l.children).filter(i=>i.tagName==="DIV"&&!i.classList.contains("dss-toolbar-button")).forEach(i=>{i.classList.add("dss-toolbar-button")})})},Ml=()=>{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 i=window.getSelection();i.removeAllRanges?i.removeAllRanges():i.empty&&i.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",i=>{if(window.getSelection){const c=window.getSelection();c.removeAllRanges&&c.removeAllRanges()}})})};e.onMounted(()=>{if(e.nextTick(()=>{requestAnimationFrame(()=>{sn.value?ee():mt(),S.value?rt():Ot()})}),e.nextTick(()=>{Ml()}),M.richText&&v.value){try{document.execCommand("defaultParagraphSeparator",!1,"p")}catch{}document.addEventListener("click",An),window.addEventListener("resize",nn);let o=null;const l=()=>{o===null&&(o=setTimeout(()=>{o=null,nn()},150))};window.addEventListener("scroll",l,!0),v.value._windowScrollHandler=l,v.value._windowScrollTimeout=o,v.value.closest(".editor-with-comments"),v.value.closest(".dss-text-editor-content-wrapper");const s=v.value.closest(".dss-text-editor-content");let i=null;const c=()=>{i===null&&(i=setTimeout(()=>{i=null,nn()},150))};s&&(s.addEventListener("scroll",c),v.value._scrollHandlers={wrapper:null,content:s,handler:c}),e.nextTick(()=>{wn(),Gn()}),v.value.addEventListener("click",m=>{const f=m.target;f.closest("a")&&!M.disabled&&m.preventDefault();const A=f.closest(".dss-image-no-alt-icon"),R=f.closest(".dss-image-wrapper");if(A||R&&f===R){m.preventDefault(),m.stopPropagation();const E=window.getSelection(),se=document.createRange();se.setStartAfter(R),se.collapse(!0),E.removeAllRanges(),E.addRange(se)}else R&&f.tagName!=="IMG"&&(m.preventDefault(),e.nextTick(()=>{const E=window.getSelection();if(E.rangeCount>0){const j=E.getRangeAt(0).commonAncestorContainer,Oe=j.nodeType===3?j.parentElement:j;if(R.contains(Oe)&&Oe!==R.querySelector("img")){const Ne=document.createRange();Ne.setStartAfter(R),Ne.collapse(!0),E.removeAllRanges(),E.addRange(Ne)}}else{const se=document.createRange();se.setStartAfter(R),se.collapse(!0),E.addRange(se)}}))},!0),v.value.addEventListener("mousedown",m=>{const f=m.target,k=f.closest(".dss-image-no-alt-icon"),A=f.closest(".dss-image-wrapper");if(k||A&&f.tagName!=="IMG"){m.preventDefault();const R=window.getSelection(),E=document.createRange();A&&(E.setStartAfter(A),E.collapse(!0),R.removeAllRanges(),R.addRange(E))}},!0),v.value.addEventListener("paste",m=>{e.nextTick(()=>{if(!v.value)return;v.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||"",se=E.replace(/^https?:\/\//,"").replace(/^data:.*,/,""),j=R===E||R===se;(R.startsWith("http://")||R.startsWith("https://")||R.startsWith("data:")||j||j)&&(k.setAttribute("alt",""),k.setAttribute("data-alt",""),k.alt="")}}}),Ye()})}),v.value.addEventListener("dragstart",m=>{const f=m.target,k=f.tagName==="IMG"?f:f.closest("img"),A=k?.closest(".dss-image-wrapper");k&&v.value.contains(k)&&(ot.value=A||k,m.dataTransfer.effectAllowed="move",m.dataTransfer.setData("text/html","image-drag"))}),v.value.addEventListener("dragover",m=>{ot.value&&(m.preventDefault(),m.stopPropagation(),m.dataTransfer.dropEffect="move")}),v.value.addEventListener("dragenter",m=>{ot.value&&(m.preventDefault(),m.stopPropagation())}),v.value.addEventListener("drop",m=>{if(!ot.value||!v.value)return;m.preventDefault(),m.stopPropagation();const f=ot.value,k=f.classList?.contains("dss-image-wrapper"),A=k?f.querySelector("img"):f,R=k?f:A?.closest(".dss-image-wrapper");if(!A||!v.value.contains(A)){ot.value=null;return}let E=null;const se=m.clientX,j=m.clientY;if(document.caretRangeFromPoint)E=document.caretRangeFromPoint(se,j);else{const an=window.getSelection();an.rangeCount>0?E=an.getRangeAt(0).cloneRange():(E=document.createRange(),E.selectNodeContents(v.value),E.collapse(!1))}if(!E){ot.value=null;return}const Oe=E.commonAncestorContainer,Ne=Oe.nodeType===3?Oe.parentElement:Oe;if(Ne?.closest(".dss-image-wrapper")===R||R&&R.contains(Ne)){ot.value=null;return}if(R&&(Ne===R||R.contains(Ne))){ot.value=null;return}const dn=A.getAttribute("src");let mn=null;R?mn=R.cloneNode(!0):mn=A.cloneNode(!0);try{let an=E.startContainer;if(an.nodeType===3&&(an=an.parentElement),R&&(an===R||R.contains(an))){const fn=document.createRange();fn.setStartAfter(R),fn.collapse(!0),E=fn}E.insertNode(mn);const Zt=document.createRange();Zt.setStartAfter(mn),Zt.collapse(!0);const kn=window.getSelection();kn.removeAllRanges(),kn.addRange(Zt)}catch{if(v.value.childNodes.length===0){const Zt=document.createElement("p");Zt.appendChild(mn),v.value.appendChild(Zt)}else{const Zt=v.value.lastChild;if(Zt&&Zt.nodeType===1)Zt.appendChild(mn);else{const kn=document.createElement("p");kn.appendChild(mn),v.value.appendChild(kn)}}}R?R.remove():A.remove(),ot.value=null,e.nextTick(()=>{const an=v.value.querySelectorAll("img");let Zt=!1;an.forEach(kn=>{if(kn.getAttribute("src")===dn)if(!Zt)Zt=!0;else{const fn=kn.closest(".dss-image-wrapper");fn?fn.remove():kn.remove()}}),Ye(),Bt()})}),v.value.addEventListener("dragend",m=>{ot.value=null});let d=null;const u=new MutationObserver(m=>{m.forEach(f=>{f.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 A=k.querySelectorAll&&k.querySelectorAll("img");A&&A.forEach(R=>{R.removeAttribute("alt"),R.removeAttribute("data-alt"),R.setAttribute("alt",""),R.setAttribute("data-alt",""),R.alt=""})}})}),d&&clearTimeout(d),d=setTimeout(()=>{Ye(),Gn(),d=null},100)});if(u.observe(v.value,{childList:!0,subtree:!0}),e.nextTick(()=>{const m=document.querySelector(".dss-text-editor-toolbar");if(m){const f=new MutationObserver(()=>{e.nextTick(()=>{Gn()})});f.observe(m,{childList:!0,subtree:!0}),m._toolbarMutationObserver=f}}),M.modelValue){const m=zn(M.modelValue);v.value.innerHTML=m,Rn()}e.nextTick(()=>{const m=v.value.innerHTML||"",f=M.title||"",k=M.description||"";Lt.value=m,ne.value=f,Z.value=k,U.value=f,ie.value=k,Mn(),Ye(),ol(),ct(),bo(),xl()}),Bn(),Wt(),v.value._mutationObserver=u}}),e.onUnmounted(()=>{if(document.removeEventListener("click",An),window.removeEventListener("resize",nn),v.value&&v.value._windowScrollHandler&&window.removeEventListener("scroll",v.value._windowScrollHandler,!0),jt!==null&&(clearTimeout(jt),jt=null),v.value&&v.value._windowScrollTimeout!==null&&clearTimeout(v.value._windowScrollTimeout),Ze.value&&clearTimeout(Ze.value),Vt.value&&clearTimeout(Vt.value),v.value&&v.value._mutationObserver&&v.value._mutationObserver.disconnect(),He.value&&He.value.disconnect(),kt.value!==null&&(cancelAnimationFrame(kt.value),kt.value=null),at.value!==null&&(clearTimeout(at.value),at.value=null),wt.value!==null&&(clearTimeout(wt.value),wt.value=null),Al(!0),v.value&&v.value._scrollHandlers){const{wrapper:l,content:s,handler:i}=v.value._scrollHandlers;l&&l.removeEventListener("scroll",i),s&&s.removeEventListener("scroll",i)}const o=document.querySelector(".dss-text-editor-toolbar");o&&o._toolbarMutationObserver&&o._toolbarMutationObserver.disconnect()});const zt=o=>{const l=o.target,s=l.closest("a");if(s&&!M.disabled){o.preventDefault();const c=document.createRange();c.selectNodeContents(s);const d=window.getSelection();d.removeAllRanges(),d.addRange(c)}const i=l.closest(".dss-image-wrapper");i&&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(i.contains(m)&&m!==i.querySelector("img")){const f=document.createRange();f.setStartAfter(i),f.collapse(!0),c.removeAllRanges(),c.addRange(f)}}Ye(),Bn(),Wt(),Qt(),ct()}):e.nextTick(()=>{Ye(),Bn(),Wt(),Qt(),ct()})},Dt=()=>{vt();const o=window.getSelection();if(o&&o.rangeCount>0){const s=o.getRangeAt(0);Y.value=!s.collapsed&&_l(s),!s.collapsed&&b.value&&(b.value=null)}else Y.value=!1;if(Ye(),Bn(),Wt(),Qt(),ct(),o&&o.rangeCount>0){const i=o.getRangeAt(0).commonAncestorContainer,c=i.nodeType===3?i.parentElement:i;if(c&&c.closest(".dss-text-editor-footer")){o.removeAllRanges(),Y.value=!1;return}}["bold","italic","underline"].forEach(s=>{try{const i=window.getSelection();if(i.rangeCount>0){const c=i.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 f=window.getComputedStyle(u);parseInt(f.fontWeight)>=600&&(m=!0)}catch{}te.value[s]=m}else{const d=document.queryCommandState(s);te.value[s]=d}}}catch{}})},ct=()=>{if(!M.richText||M.disabled||!v.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,i=s.nodeType===3?s.parentElement:s;if(!i||!v.value.contains(i)){V.value="p";return}const c=i.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"}},Wt=()=>{if(!v.value){Xe.value=!1;return}try{const o=window.getSelection();let l=!1;if(o.rangeCount>0){const i=o.getRangeAt(0).commonAncestorContainer,c=i.nodeType===1?i.tagName==="BLOCKQUOTE"?i:i.closest("blockquote"):i.parentElement?.closest("blockquote");l=!!(c&&v.value.contains(c))}Xe.value=l}catch{Xe.value=!1}},_l=o=>{if(!o||!v.value)return!1;const l=o.commonAncestorContainer;if(!l)return!1;const s=l.nodeType===3?l.parentElement:l;return s?v.value.contains(s):!1},Il=()=>{lt.value=!1},Qt=()=>{if(!M.floatingToolbar||!M.richText||M.disabled){lt.value=!1;return}const o=window.getSelection();if(!o||o.rangeCount===0){lt.value=!1;return}const l=o.getRangeAt(0);if(l.collapsed||!_l(l)){lt.value=!1;return}const s=l.getBoundingClientRect();if(!s||s.width===0&&s.height===0){lt.value=!1;return}const i=v.value;if(!i){lt.value=!1;return}const c=i.getBoundingClientRect();if(!c||c.width===0){lt.value=!1;return}const d=40,u=8,m=s.top-d/2+15;let f=s.left+s.width/2;const k=window.innerWidth||document.documentElement.clientWidth||0;let A=0;et.value&&(A=et.value.getBoundingClientRect().width);const R=(A||320)/2;let E=c.left+R,se=c.right-R;if(se<E){const j=c.left+c.width/2;E=j,se=j}if(k>0){const j=R+u,Oe=k-R-u;if(E=Math.max(E,j),se=Math.min(se,Oe),se<E){const Ne=k/2;E=Ne,se=Ne}}f<E?f=E:f>se&&(f=se),Ce.value={position:"fixed",top:`${Math.max(m,8)}px`,left:`${f}px`,transform:"translate(-50%, -100%)",zIndex:10003},lt.value=!0},eo=o=>{M.disabled||!M.richText||(dt.value=dt.value===o?null:o,o==="askAi"&&(we.value=null))},bl=()=>{dt.value=null,Ke.value=null},dl=o=>{Pn(o),bl()};let al=null,zl=null,wl=null,Pl=null;const $l=o=>{if(M.disabled||!M.richText){In(),Yl();return}const l=o.target,s=l.closest("a"),i=l.closest("img");if(al&&(clearTimeout(al),al=null),wl&&(clearTimeout(wl),wl=null),s&&s!==zl){Yl(),zl=s;let c=s.getAttribute("href")||"";(!c||c==="#"||c==="")&&(c=s.textContent||""),We.value=s,me.value=c,X.value=!0,Ee.value=!0,Bo(s)}else!s&&zl?(zl=null,al=setTimeout(()=>{Ee.value||In()},150)):s&&s===zl&&Bo(s);if(i&&i!==Pl){In(),Pl=i;let c=i.getAttribute("alt");c===null&&(c=i.alt||"");let d=i.getAttribute("data-alt");d===null&&(d=c),i.hasAttribute("alt")||i.setAttribute("alt",c),i.hasAttribute("data-alt")||i.setAttribute("data-alt",d),Ct.value=i,Ut.value=c.trim()||D("textEditor.image.noAlt"),_t.value=!0,he.value=!0,Ol(i)}else!i&&Pl?(Pl=null,wl=setTimeout(()=>{he.value||Yl()},150)):i&&i===Pl&&Ol(i)},No=o=>{const l=o.relatedTarget;(!l||!l.closest(".dss-text-editor-content")&&!l.closest(".dss-link-popup"))&&(zl=null,Pl=null,al&&(clearTimeout(al),al=null),wl&&(clearTimeout(wl),wl=null),In(),Yl())},In=()=>{Ee.value=!1,setTimeout(()=>{Ee.value||(X.value=!1,me.value="",Te.value||(We.value=null))},100)},Bo=o=>{if(!o||!v.value)return;const l=o.getBoundingClientRect(),c=l.top-32-8,d=l.left+l.width/2;F.value={position:"fixed",top:`${c}px`,left:`${d}px`,transform:"translateX(-50%)",zIndex:10002}},Yl=()=>{he.value=!1,setTimeout(()=>{he.value||(_t.value=!1,Ut.value="",yt.value||(Ct.value=null))},100)},Ol=o=>{if(!o||!v.value)return;const l=o.getBoundingClientRect(),c=l.top-32-8,d=l.left+l.width/2;Q.value={position:"fixed",top:`${c}px`,left:`${d}px`,transform:"translateX(-50%)",zIndex:10002}},jo=()=>{if(!me.value||!We.value)return;let l=We.value.getAttribute("href")||me.value;!l.startsWith("http://")&&!l.startsWith("https://")&&!l.startsWith("mailto:")&&(l="https://"+l),window.open(l,"_blank","noopener,noreferrer")},Mo=()=>{if(We.value){const o=We.value.textContent||"",l=We.value.getAttribute("href")||"",s=We.value;nt.value=l,pt.value=o,Me.value=o,Ee.value=!1,X.value=!1,me.value="",We.value=s,Te.value=!0}else if(ke.value){const o=window.getSelection();if(o.rangeCount>0){const s=o.getRangeAt(0).commonAncestorContainer,i=s.nodeType===1?s.closest("a"):s.parentElement?.closest("a");if(i){const c=i.textContent||"",d=i.getAttribute("href")||"";nt.value=d,pt.value=c,Me.value=c,We.value=i,Te.value=!0}}}else{xe.value=Kt();const o=window.getSelection();let l="";o.rangeCount>0&&(l=o.getRangeAt(0).toString()),nt.value="",pt.value=l,Me.value="",We.value=null,Te.value=!0}e.nextTick(()=>{W.value&&(W.value.focus(),W.value.select())})},to=()=>{Te.value=!1,nt.value="",pt.value="",Me.value="",We.value=null,xe.value=null},no=()=>{if(!nt.value.trim()){to();return}if(Pe.value?(Ze.value&&(clearTimeout(Ze.value),Ze.value=null),ge(),Pe.value=!1):ge(),pt.value.trim()||(pt.value=nt.value.trim()),We.value&&v.value&&v.value.contains(We.value)){const o=window.getSelection();o.rangeCount>0&&o.removeAllRanges();const l=We.value;if(l.setAttribute("href",nt.value.trim()),pt.value.trim()!==Me.value.trim()){for(;l.firstChild;)l.removeChild(l.firstChild);l.textContent=pt.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),Bt()}else if(v.value){v.value.focus();const o=window.getSelection();o.removeAllRanges(),xe.value&&Ln(xe.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=pt.value.trim(),s.style.color="#60afdf",s.style.textDecoration="underline",l.deleteContents(),l.insertNode(s);const i=document.createTextNode(" ");l.setStartAfter(s),l.insertNode(i),l.setStartAfter(i),l.collapse(!0),o.removeAllRanges(),o.addRange(l)}else{l||(l=document.createRange(),l.selectNodeContents(v.value),l.collapse(!1));const s=l.startContainer,i=s.nodeType===3,c=i&&l.startOffset===s.textContent.length,d=document.createElement("a");if(d.href=nt.value.trim(),d.textContent=pt.value.trim(),d.style.color="#60afdf",d.style.textDecoration="underline",c){let u=s.parentElement;for(;u&&u!==v.value&&!["P","DIV","H1","H2","H3","H4","H5","H6"].includes(u.tagName);)u=u.parentElement;if(u&&u!==v.value){let m=u.nextElementSibling;if(m&&(m.innerHTML==="<br>"||m.innerHTML==="<br/>"||m.textContent.trim()==="")){m.textContent="",m.appendChild(d);const f=document.createTextNode(" ");m.appendChild(f);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),A=k[k.length-1];if(A&&A!==" "&&A!==" "&&A!==`
102
102
  `){const R=document.createTextNode(" ");l.insertNode(R),l.setStartAfter(R)}}l.insertNode(d);const f=document.createTextNode(" ");l.setStartAfter(d),l.insertNode(f),l.setStartAfter(f),l.collapse(!0),o.removeAllRanges(),o.addRange(l)}}}else{if(i&&l.startOffset>0){const m=s.textContent.substring(0,l.startOffset),f=m[m.length-1];if(f&&f!==" "&&f!==" "&&f!==`
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)}}_t()}e.nextTick(()=>{Nn(),to()})},lo=()=>{if(!v.value||Q.value)return;const o=window.getSelection();let l=null;o&&o.rangeCount>0&&(l=tn());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,i=document.createTreeWalker(v.value,NodeFilter.SHOW_TEXT,{acceptNode:m=>{const f=m.parentElement;return!f||f.closest("a")||f.closest(".dss-image-wrapper")||!m.textContent||m.textContent.trim()===""?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),c=[];let d;for(;d=i.nextNode();)c.push(d);let u=!1;for(let m=c.length-1;m>=0;m--){const f=c[m],k=f.textContent;s.lastIndex=0;const L=[...k.matchAll(s)];if(L.length===0)continue;const R=L.filter(j=>{const ze=j[0],Ne=j.index;if(Ne>0&&k[Ne-1]==="@"||Ne+ze.length<k.length&&k[Ne+ze.length]==="@")return!1;const gt=f.parentElement;return!(gt&&gt.closest("a"))});if(R.length===0)continue;if(R.length===1&&R[0][0]===k.trim()){const j=R[0][0],ze=j.startsWith("http://")||j.startsWith("https://")?j:`https://${j}`,Ne=document.createElement("a");Ne.href=ze,Ne.textContent=j,Ne.style.color="#60afdf",Ne.style.textDecoration="underline",f.parentNode&&(f.parentNode.replaceChild(Ne,f),u=!0);continue}let E=0;const ae=document.createDocumentFragment();if(R.forEach(j=>{const ze=j.index,Ne=j[0];if(ze>E){const cn=k.substring(E,ze);cn&&ae.appendChild(document.createTextNode(cn))}const gt=Ne.startsWith("http://")||Ne.startsWith("https://")?Ne:`https://${Ne}`,rn=document.createElement("a");rn.href=gt,rn.textContent=Ne,rn.style.color="#60afdf",rn.style.textDecoration="underline",ae.appendChild(rn),E=ze+Ne.length}),E<k.length){const j=k.substring(E);j&&ae.appendChild(document.createTextNode(j))}f.parentNode&&ae.childNodes.length>0&&(f.parentNode.replaceChild(ae,f),u=!0)}u&&l&&e.nextTick(()=>{Ln(l),Nn()})},Ko=()=>{if(!v.value)return;const o=/<u>([\s\S]*?)<\/u>|<ins>([\s\S]*?)<\/ins>/gi,l=document.createTreeWalker(v.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 i;for(;i=l.nextNode();)s.push(i);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 f=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>f&&k.appendChild(document.createTextNode(u.substring(f,R)));const j=document.createElement(E);j.textContent=ae,k.appendChild(j),f=R+L[0].length}),f<u.length&&k.appendChild(document.createTextNode(u.substring(f))),d.parentNode&&k.childNodes.length>0&&d.parentNode.replaceChild(k,d)}},_o=o=>{if(!v.value||Q.value)return;if(!o){Ko();return}if(!["*","_",">"].includes(o))return;const s=window.getSelection();if(!s||s.rangeCount===0)return;const i=s.getRangeAt(0);if(!i.collapsed)return;const c=i.startContainer.nodeType===Node.TEXT_NODE?i.startContainer.parentElement?.closest("p, h1, h2, h3, h4, h5, h6, li, td, th, blockquote, div"):i.startContainer.closest?.("p, h1, h2, h3, h4, h5, h6, li, td, th, blockquote, div");if(!c||c===v.value||!v.value.contains(c))return;const d=()=>{let cn="",ln=0,Zt=!1;const hn=document.createTreeWalker(c,NodeFilter.SHOW_TEXT,{acceptNode:sl=>sl.parentElement?.closest("a, code, pre")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});document.createTreeWalker(c,NodeFilter.SHOW_TEXT,null);let mn=0;for(;hn.nextNode();){const sl=hn.currentNode,Vl=sl.textContent||"",vl=mn;if(mn+=Vl.length,sl===i.startContainer){cn+=Vl.substring(0,i.startOffset),ln=vl+i.startOffset,Zt=!0;break}cn+=Vl}return Zt||(ln=cn.length),{textBeforeCursor:cn,cursorCharOffset:ln}},{textBeforeCursor:u}=d();if(!u.length)return;let m=null,f=null;if(u.endsWith("**")&&(m=u.match(/\*\*(.+?)\*\*$/s))||u.endsWith("__")&&(m=u.match(/__(.+?)__$/s))?f="strong":u.endsWith("*")&&!u.endsWith("**")&&(m=u.match(new RegExp("(?<!\\*)\\*([^*]+)\\*$")))||u.endsWith("_")&&!u.endsWith("__")&&(m=u.match(new RegExp("(?<!_)_([^_]+)_$")))?f="em":o===">"&&((m=u.match(/<u>(.+?)<\/u>$/s))||(m=u.match(/<ins>(.+?)<\/ins>$/s)))&&(f=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=(cn=>{let ln=0;const Zt=document.createTreeWalker(c,NodeFilter.SHOW_TEXT,{acceptNode:mn=>mn.parentElement?.closest("a, code, pre")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});let hn;for(;hn=Zt.nextNode();){const mn=(hn.textContent||"").length;if(ln+mn>=cn)return{node:hn,offset:cn-ln};ln+=mn}return null})(R);if(!ae)return;const j=document.createRange();j.setStart(ae.node,ae.offset),j.setEnd(i.endContainer,i.endOffset);const ze=document.createElement(f);ze.textContent=L,j.deleteContents(),j.insertNode(ze);const Ne=window.getSelection(),gt=document.createRange();gt.setStartAfter(ze),gt.collapse(!0),Ne.removeAllRanges(),Ne.addRange(gt);const rn=tn();e.nextTick(()=>{_t(),rn&&Ln(rn)})},Kn=()=>{v.value&&(Qt.value=tn(),xt.value="",It.value="",Ue.value="",se.value="",pe.value="",Ht.value=null,kt.value=null,Be.value="upload",ht.value=!0,sn(),e.nextTick(()=>{De.value&&De.value.focus(),_e.value&&(_e.value.value="")}))},Gn=o=>{const l=o.target?.files?.[0];if(!l){Ht.value=null,It.value="";return}Ht.value=l;const s=new FileReader;s.onload=i=>{It.value=i.target?.result||""},s.readAsDataURL(l)},ko=()=>{_e.value&&_e.value.click()},oo=()=>{se.value&&(pe.value="")},Wn=()=>{pe.value&&(se.value="")},ao=()=>{let o=kt.value;if(!o){const l=window.getSelection();if(l&&l.rangeCount>0){const i=l.getRangeAt(0).commonAncestorContainer;o=i.nodeType===1?i.closest("img"):i.parentElement?.closest("img")}}if(o){const l=o.getAttribute("data-alt")||o.getAttribute("alt")||"";kt.value=o,xt.value=l.trim()===""||l.trim()==="Image"?"":l;const s=o.getAttribute("src")||o.src||"";s.startsWith("http://")||s.startsWith("https://")?(Ue.value=s,It.value="",Be.value="url"):(It.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,pe.value=d.endsWith("px")?d.replace("px",""):d,Qt.value=null}else{Kn();return}ht.value=!0,ye.value=!1,Lt.value=!1,e.nextTick(()=>{Be.value==="url"&&Kt.value?(Kt.value.focus(),Kt.value.select()):De.value&&(De.value.focus(),De.value.select()),_e.value&&(_e.value.value="")})},jl=()=>{ht.value=!1,xt.value="",It.value="",Ue.value="",se.value="",pe.value="",Ht.value=null,kt.value=null,Qt.value=null,Be.value="upload"},fl=()=>{const o=(xt.value||"").trim(),l=v.value?._mutationObserver;l&&l.disconnect(),Re.value?(We.value&&(clearTimeout(We.value),We.value=null),he(),Re.value=!1):he();const s=Be.value==="url"?Ue.value.trim():It.value;if(kt.value&&v.value&&v.value.contains(kt.value)){s&&(kt.value.src=s),kt.value.setAttribute("alt",o),kt.value.setAttribute("data-alt",o),se.value?(kt.value.style.width=`${se.value}px`,kt.value.setAttribute("width",se.value)):(kt.value.style.removeProperty("width"),kt.value.removeAttribute("width")),pe.value?(kt.value.style.height=`${pe.value}px`,kt.value.setAttribute("height",pe.value)):(kt.value.style.removeProperty("height"),kt.value.removeAttribute("height"));const i=window.getSelection();if(i){i.removeAllRanges();const c=document.createRange();c.setStartAfter(kt.value),c.collapse(!0),i.addRange(c)}_t()}else{if(!s){l&&v.value&&l.observe(v.value,{childList:!0,subtree:!0}),jl();return}if(v.value){v.value.focus();const i=window.getSelection();i&&i.rangeCount>0&&i.removeAllRanges();const c=window.getSelection();let d=null;if(Qt.value&&(Ln(Qt.value),c&&c.rangeCount>0&&(d=c.getRangeAt(0))),!d&&c&&c.rangeCount>0&&(d=c.getRangeAt(0)),!d&&v.value){if(d=document.createRange(),v.value.childNodes.length===0){const k=document.createElement("p");k.innerHTML="<br>",v.value.appendChild(k),d.setStart(k,0),d.collapse(!0)}else d.selectNodeContents(v.value),d.collapse(!1);c&&(c.removeAllRanges(),c.addRange(d))}if(!d){jl();return}const u=d.commonAncestorContainer,m=u.nodeType===3?u.parentElement:u;if(!v.value.contains(m)){if(d=document.createRange(),v.value.childNodes.length===0){const k=document.createElement("p");k.innerHTML="<br>",v.value.appendChild(k),d.setStart(k,0),d.collapse(!0)}else d.selectNodeContents(v.value),d.collapse(!1);c&&(c.removeAllRanges(),c.addRange(d))}const f=document.createElement("img");f.src=s,f.setAttribute("alt",o),f.setAttribute("data-alt",o),se.value&&(f.style.width=`${se.value}px`,f.setAttribute("width",se.value)),pe.value&&(f.style.height=`${pe.value}px`,f.setAttribute("height",pe.value));try{d.insertNode(f),d.setStartAfter(f),d.collapse(!0),c&&(c.removeAllRanges(),c.addRange(d))}catch{if(v.value){if(v.value.childNodes.length===0){const R=document.createElement("p");v.value.appendChild(R),R.appendChild(f)}else{const R=v.value.lastChild;if(R&&R.nodeType===1)R.appendChild(f);else{const E=document.createElement("p");v.value.appendChild(E),E.appendChild(f)}}const L=document.createRange();L.setStartAfter(f),L.collapse(!0),c&&(c.removeAllRanges(),c.addRange(L))}}kt.value=f,_t()}}e.nextTick(()=>{l&&v.value&&l.observe(v.value,{childList:!0,subtree:!0}),Nn(),jt(),jl()})};e.watch(()=>B.modelValue,o=>{if(B.richText&&v.value&&!Q.value){const l=_(o||""),i=v.value.innerHTML.replace(/&nbsp;|\u00A0/g," "),c=l.replace(/&nbsp;|\u00A0/g," ");if(i!==c){const d=tn();v.value.innerHTML=l,e.nextTick(()=>{Rn();const u=v.value.innerHTML||"",m=B.title||"",f=B.description||"";Ct.value=u,ee.value=m,Z.value=f,yt.value=u,X.value=m,re.value=f,nt.value=[],Ot.value=[],We.value&&(clearTimeout(We.value),We.value=null),Re.value=!1,d&&Ln(d),Bn(),je(),ol(),Nn(),jt(),it(),wt("watch-modelValue")})}}},{immediate:!0}),e.watch(()=>B.richText,o=>{o?(jt(),e.nextTick(()=>{bo()})):(Il(),ne.value=[],Ie.value&&(Ie.value.disconnect(),Ie.value=null)),it()}),e.watch(()=>B.floatingToolbar,o=>{o?jt():Il()}),e.watch(()=>B.disabled,o=>{o&&Il(),it()}),e.watch(()=>B.description,()=>{e.nextTick(()=>{S.value?$n():dn()})}),e.watch(()=>B.title,()=>{e.nextTick(()=>{on.value?Ye():Sn()})}),e.watch(()=>B.customToolbarSlots,()=>{e.nextTick(()=>{jn()})},{deep:!0}),e.watch(()=>B.comments,(o,l)=>{if(B.commentUser){if(qt.value){qt.value=!1;return}gn.value||B.richText&&v.value&&e.nextTick(()=>{Sl()})}},{deep:!0,immediate:!1});const Sl=()=>{if(B.commentUser&&!gn.value&&!(!B.comments||!Array.isArray(B.comments)||B.comments.length===0)&&!(!B.richText||!v.value)){gn.value=!0;try{const o=new Set,l=B.comments.filter(u=>{const m=String(u.conversation_id||u.id);return o.has(m)?!1:(o.add(m),!0)}),s=v.value.querySelectorAll("[data-comment], [data-fake-comment]"),i=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 f=String(m);if(d.has(f))return;const k=v.value.querySelector(`[data-comment="${f}"]`);if(k){Kl(k,u),d.add(f);return}try{const L=Tn(u.selection_range,u.selection_text);if(L&&!L.collapsed){const R=L.commonAncestorContainer,E=R.nodeType===3?R.parentElement:R;if(E){const ze=E.closest("[data-comment], [data-fake-comment]");if(ze){const Ne=ze.getAttribute("data-comment")||ze.getAttribute("data-fake-comment");if(String(Ne)===String(m)){ze.setAttribute("data-comment",f),ze.removeAttribute("data-fake-comment"),Kl(ze,u),d.add(f);return}else return}}const ae=v.value.querySelector(`[data-comment="${f}"]`);if(ae){Kl(ae,u),d.add(f);return}const j=document.createElement("span");j.setAttribute("data-comment",f),Kl(j,u);try{L.surroundContents(j),c++,d.add(f)}catch{try{const Ne=document.createRange();Ne.setStart(L.startContainer,L.startOffset),Ne.setEnd(L.endContainer,L.endOffset),Co(Ne),Ne.surroundContents(j),c++,d.add(f)}catch{try{const gt=L.extractContents();j.appendChild(gt),L.insertNode(j),c++,d.add(f)}catch(gt){console.warn("Failed to create comment marker:",gt)}}}}}catch{}}),e.nextTick(()=>{wt("restoreCommentsFromModel"),_t(),gn.value=!1})}catch{gn.value=!1}}},Co=o=>{if(!o||!v.value)return o;try{const l=["P","DIV","H1","H2","H3","H4","H5","H6","LI","BLOCKQUOTE","PRE"];let s=o.startContainer,i=o.startOffset;if(s.nodeType===3){const u=s.parentElement;u&&l.includes(u.tagName)&&(i===0&&!$o(s)||o.setStartBefore(u))}else s.nodeType===1&&l.includes(s.tagName)&&i>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&&!Ll(c)||o.setEndAfter(u))}else c.nodeType===1&&l.includes(c.tagName)&&d<c.childNodes.length&&o.setEndAfter(c);return o}catch{return o}},$o=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},Ll=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},Tn=(o,l)=>{if(!o||!v.value)return null;try{const s=document.createRange();if(o.type==="text"&&typeof o.start=="number"&&typeof o.end=="number"){let i=0;const c=[v.value];let d=null,u=!1,m=!1;for(;!m&&(d=c.pop());)if(d.nodeType===3){const f=i+d.length;!u&&o.start>=i&&o.start<=f&&(s.setStart(d,o.start-i),u=!0),u&&o.end>=i&&o.end<=f&&(s.setEnd(d,o.end-i),m=!0),i=f}else{let f=d.childNodes.length;for(;f--;)c.push(d.childNodes[f])}return u?Co(s):null}}catch{return null}return null},Kl=(o,l)=>{if(!o||!l)return;const s=l.conversation||[],i=new Set,c=[],d=m=>{m&&m.id&&!i.has(m.id)&&(i.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")},wt=(o="unknown")=>{if(!B.commentUser||!B.richText||!v.value){ne.value=[];return}Date.now()-Nt.value<St&&bt.value!==null||bt.value===null&&(bt.value=requestAnimationFrame(()=>{if(bt.value=null,Nt.value=Date.now(),Oe.value)return;Oe.value=!0;const s={},i=v.value;if(!i){Oe.value=!1;return}const c=i.closest(".editor-with-comments");if(!c){Oe.value=!1;return}const d=i.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 f=c.getBoundingClientRect(),k=i.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 gl=E.textContent?.trim(),rl=B.comments?.find(Qn=>(typeof Qn.conversation_id=="string"&&Qn.conversation_id.startsWith("comment-")?null:Qn.conversation_id)&&Qn.selection_text?.trim()===gl);rl?(j=String(rl.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 ze=E.getBoundingClientRect(),Ne=window.getComputedStyle(E),gt=parseFloat(Ne.lineHeight)||parseFloat(Ne.fontSize)*1.2,ln=ze.top-k.top+gt/2-15,hn=k.top-f.top+ln;let mn=null,sl=null,Vl=0;const vl=[],Ao=new Set;if(j&&B.comments){const gl=B.comments.find(rl=>String(rl.conversation_id||rl.id)===String(j));if(gl){const rl=gl.conversation||[];rl.length>0?(rl.forEach(Qn=>{Qn.user&&Qn.user.id&&!Ao.has(Qn.user.id)&&(Ao.add(Qn.user.id),vl.push(Qn.user))}),Vl=rl.length):(Vl=0,mn=null,sl=null),vl.length>0?mn=vl[0]:mn=null,vl.length>1?sl=vl[1]:sl=null}}const wo=ze.top+gt/2-15,To=wo+30,Do=5,Ho=To>k.top+Do&&wo<k.bottom-Do?1:0;ne.value.find(gl=>gl.id===j);let so=E;if(!so&&j&&v.value){const gl=String(j);so=v.value.querySelector(`[data-comment="${gl}"], [data-fake-comment="${gl}"]`)}const Dl=vl.length;s[j]?(s[j].top=hn,s[j].opacity=Ho,s[j].element=so,s[j].firstUser=mn,s[j].secondUser=sl,s[j].totalCount=Vl,s[j].uniqueUserCount=Dl):s[j]={id:j,top:hn,opacity:Ho,element:so,firstUser:mn,secondUser:sl,totalCount:Vl,uniqueUserCount:Dl}});const L=Object.values(s).map(E=>{const ae=Math.max(0,(E.uniqueUserCount??0)-2);if(!E.element&&E.id&&v.value){const ze=String(E.id);E.element=v.value.querySelector(`[data-comment="${ze}"], [data-fake-comment="${ze}"]`)}return{...E,firstUser:E.firstUser||null,secondUser:E.secondUser||null,totalCount:E.totalCount,additionalCount:ae}});(ne.value.length!==L.length||L.some((E,ae)=>{const j=ne.value[ae];if(!j)return!0;const ze=(j.firstUser?.id||null)!==(E.firstUser?.id||null),Ne=(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||ze||Ne||j.element!==E.element}))&&(ne.value=L),Oe.value=!1}))},Lo=o=>{if(!o)return;let l=o.element;if(!l&&o.id&&v.value){const s=String(o.id);l=v.value.querySelector(`[data-comment="${s}"], [data-fake-comment="${s}"]`)}l&&(Al(),Xn.value=l,l.classList.add("editor-comment-highlighted"))},Al=(o=!1)=>{!o&&vn.value!==null&&Xn.value&&(Xn.value.getAttribute("data-comment")||Xn.value.getAttribute("data-fake-comment"))===vn.value||(v.value&&v.value.querySelectorAll(".editor-comment-highlighted").forEach(s=>{s.classList.remove("editor-comment-highlighted")}),Xn.value&&(Xn.value.classList.remove("editor-comment-highlighted"),Xn.value=null))},en=o=>{if(!o||!o.element)return;Al(!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}"]`;ge("comment-marker-clicked",{commentId:l,selector:s,element:o.element})},Tl=()=>{Al()},bo=()=>{!B.richText||!v.value||(Ie.value&&Ie.value.disconnect(),pt.value!==null&&(clearTimeout(pt.value),pt.value=null),Ie.value=new MutationObserver(()=>{pt.value===null&&(pt.value=setTimeout(()=>{pt.value=null,e.nextTick(()=>{wt("MutationObserver")})},200))}),Ie.value.observe(v.value,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-comment","data-fake-comment","data-comment-user","data-comment-user-2","data-comment-count"]}),wt("setupCommentMarkersObserver-initial"))},Zn=(o,l)=>{if(!o||!l)return;const s=l.getBoundingClientRect();let i=s.top,c=s.right+4;o.style.top=`${i}px`,o.style.left=`${c}px`,o.offsetHeight;const d=o.getBoundingClientRect(),u=window.innerWidth,m=window.innerHeight;if(d.right>u){const f=s.left-d.width-4;o.style.left=`${f}px`}if(d.bottom>m){const f=Math.max(8,m-d.height-8);o.style.top=`${f}px`}d.top<0&&(o.style.top="8px")};return e.watch(()=>Je.value,o=>{e.nextTick(()=>{document.querySelectorAll(".dss-toolbar-dropdown-submenu").forEach(s=>{const i=s.getAttribute("data-submenu-id");if(i===o&&o){const c=document.querySelector(`.dss-toolbar-dropdown-item-has-submenu[data-submenu-id="${i}"]`);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(()=>{Zn(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,dt.value],()=>{we.value==="askAi"||dt.value==="askAi"?e.nextTick(()=>{bn()}):(Je.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 i=document.querySelector(`.dss-toolbar-dropdown-item-has-submenu[data-submenu-id="${s}"]`);if(i)if(l.dataset.originalParentRef==="inside")i.appendChild(l);else{const d=i.closest(".dss-toolbar-dropdown");d&&d.insertBefore(l,i.nextSibling)}}}})}))}),e.watch(()=>B.locale,o=>{o&&o!==ce.value&&(ce.value=o)},{immediate:!0}),le({openCommentOverlayForSelector:Xo,updateCommentMarkers:wt,restoreCommentsFromModel:Sl}),(o,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-text-editor-container",[{"editor-with-comments":at.value},Bt.value]]),style:e.normalizeStyle(Mt.value)},[A.richText?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-text-editor-toolbar",onMousedown:l[14]||(l[14]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",qu,[e.createElementVNode("div",{class:"dss-toolbar-button",onClick:oe,title:e.unref(T)("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,Wu),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-disabled":!il.value}]),onClick:nn,title:e.unref(T)("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,Zu),l[61]||(l[61]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",Uu,[e.createElementVNode("div",{class:"dss-toolbar-button dss-toolbar-dropdown-toggle",onClick:l[0]||(l[0]=s=>Fl("paragraph")),title:e.unref(T)("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,Yu)):V.value==="h2"?(e.openBlock(),e.createElementBlock("img",{key:1,src:I.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,ju)):V.value==="h3"?(e.openBlock(),e.createElementBlock("img",{key:2,src:I.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,Ku)):V.value==="h4"?(e.openBlock(),e.createElementBlock("img",{key:3,src:I.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,Gu)):V.value==="h5"?(e.openBlock(),e.createElementBlock("img",{key:4,src:I.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,Qu)):V.value==="h6"?(e.openBlock(),e.createElementBlock("img",{key:5,src:I.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,Ju)):(e.openBlock(),e.createElementBlock("svg",ed,[...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,Xu),we.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=>On("<h1>"))},[e.createElementVNode("img",{src:I.h1,alt:"H1",class:"dss-toolbar-heading-icon"},null,8,td),e.createElementVNode("h1",null,e.toDisplayString(e.unref(T)("textEditor.paragraph.heading1")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[2]||(l[2]=s=>On("<h2>"))},[e.createElementVNode("img",{src:I.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,nd),e.createElementVNode("h2",null,e.toDisplayString(e.unref(T)("textEditor.paragraph.heading2")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[3]||(l[3]=s=>On("<h3>"))},[e.createElementVNode("img",{src:I.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,ld),e.createElementVNode("h3",null,e.toDisplayString(e.unref(T)("textEditor.paragraph.heading3")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[4]||(l[4]=s=>On("<h4>"))},[e.createElementVNode("img",{src:I.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,od),e.createElementVNode("h4",null,e.toDisplayString(e.unref(T)("textEditor.paragraph.heading4")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[5]||(l[5]=s=>On("<h5>"))},[e.createElementVNode("img",{src:I.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,ad),e.createElementVNode("h5",null,e.toDisplayString(e.unref(T)("textEditor.paragraph.heading5")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[6]||(l[6]=s=>On("<h6>"))},[e.createElementVNode("img",{src:I.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,sd),e.createElementVNode("h6",null,e.toDisplayString(e.unref(T)("textEditor.paragraph.heading6")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[7]||(l[7]=s=>On("<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(T)("textEditor.paragraph.paragraph")),1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Yt("bold")}]),onClick:l[9]||(l[9]=s=>Vn("bold")),title:e.unref(T)("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,rd),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Yt("italic")}]),onClick:l[10]||(l[10]=s=>Vn("italic")),title:e.unref(T)("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,id),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Yt("underline")}]),onClick:l[11]||(l[11]=s=>Vn("underline")),title:e.unref(T)("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,cd),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Xe.value}]),onClick:Un,title:e.unref(T)("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,ud),l[62]||(l[62]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),ke.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-button",onClick:dl,title:e.unref(T)("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,md)):(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-button",onClick:Gl,title:e.unref(T)("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,dd)),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":Yt("insertUnorderedList")}]),onClick:Ul,title:e.unref(T)("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,pd),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Yt("insertOrderedList")}]),onClick:bl,title:e.unref(T)("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,fd),l[64]||(l[64]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:"dss-toolbar-button",onClick:Kn,title:e.unref(T)("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,vd),at.value&&Y.value?(e.openBlock(),e.createElementBlock("div",gd)):e.createCommentVNode("",!0),at.value&&Y.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-toolbar-button",title:e.unref(T)("textEditor.toolbar.comment"),onClick:qn},[...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,hd)):e.createCommentVNode("",!0),A.askAi?(e.openBlock(),e.createElementBlock("div",yd)):e.createCommentVNode("",!0),A.askAi?(e.openBlock(),e.createElementBlock("div",kd,[e.createElementVNode("div",{class:"dss-toolbar-ai-button dss-toolbar-dropdown-toggle",onClick:l[12]||(l[12]=s=>Fl("askAi")),title:e.unref(T)("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",bd,e.toDisplayString(e.unref(T)("textEditor.toolbar.askAi")),1)],8,Cd),we.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",wd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.customToolbarSlots,(s,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:i},[_n(s)?(e.openBlock(),e.createElementBlock("div",xd,[e.renderSlot(o.$slots,s)])):e.createCommentVNode("",!0),_n(s)&&i<A.customToolbarSlots.length-1&&ul(i)?(e.openBlock(),e.createElementBlock("div",Ed)):e.createCommentVNode("",!0)],64))),128))])],32)):e.createCommentVNode("",!0),(we.value==="paragraph"||we.value==="askAi")&&A.richText?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-dropdown-overlay",onClick:sn})):e.createCommentVNode("",!0),e.createVNode(na,{showModal:Te.value,width:"500px",height:"55vh",onCloseModal:to},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(T)("textEditor.link.editLink")),1)]),content:e.withCtx(()=>[e.createElementVNode("div",Sd,[e.createElementVNode("div",Vd,[e.createElementVNode("label",Nd,e.toDisplayString(e.unref(T)("textEditor.link.altText")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"linkAltInput",ref:Ze,type:"text","onUpdate:modelValue":l[15]||(l[15]=s=>mt.value=s),class:"dss-link-modal-input",placeholder:e.unref(T)("textEditor.link.enterAltText"),onKeyup:e.withKeys(no,["enter"])},null,40,Bd),[[e.vModelText,mt.value]])]),e.createElementVNode("div",Md,[e.createElementVNode("label",_d,e.toDisplayString(e.unref(T)("textEditor.link.url")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"linkUrlInput",ref:W,type:"text","onUpdate:modelValue":l[16]||(l[16]=s=>lt.value=s),class:"dss-link-modal-input",placeholder:e.unref(T)("textEditor.link.enterUrl"),onKeyup:e.withKeys(no,["enter"])},null,40,$d),[[e.vModelText,lt.value]])])])]),actions:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-cancel",onClick:to},e.toDisplayString(e.unref(T)("textEditor.link.cancel")),1),e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-save",onClick:no},e.toDisplayString(e.unref(T)("textEditor.link.save")),1)]),_:1},8,["showModal"]),e.createVNode(na,{showModal:ht.value,width:"500px",height:"80vh",onCloseModal:jl},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(kt.value?e.unref(T)("textEditor.image.editImage"):e.unref(T)("textEditor.image.addImage")),1)]),content:e.withCtx(()=>[e.createElementVNode("div",Ld,[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(T)("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(T)("textEditor.image.imageLink")),3)]),Be.value==="upload"?(e.openBlock(),e.createElementBlock("div",Ad,[e.createElementVNode("div",Td,[e.createElementVNode("div",Dd,[hl.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("label",Hd,e.toDisplayString(e.unref(T)("textEditor.image.uploadImage")),1)),hl.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-image-upload-preview",onClick:ko},[e.createElementVNode("img",{src:It.value,alt:"Preview",class:"dss-image-preview-image"},null,8,Rd),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:_e,type:"file",accept:"image/*",class:"dss-image-file-input-hidden",onChange:Gn},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:Gn},null,544))]),e.createElementVNode("div",Fd,[e.createElementVNode("label",Id,e.toDisplayString(e.unref(T)("textEditor.image.altText")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"imageAltInput",ref:De,type:"text","onUpdate:modelValue":l[19]||(l[19]=s=>xt.value=s),class:"dss-link-modal-input",placeholder:e.unref(T)("textEditor.image.enterAltText"),onKeyup:e.withKeys(fl,["enter"])},null,40,zd),[[e.vModelText,xt.value]])]),e.createElementVNode("div",Pd,[e.createElementVNode("label",Od,e.toDisplayString(e.unref(T)("textEditor.image.width")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":l[20]||(l[20]=s=>se.value=s),class:"dss-link-modal-input",placeholder:e.unref(T)("textEditor.image.auto"),onKeyup:e.withKeys(fl,["enter"]),onInput:oo},null,40,qd),[[e.vModelText,se.value]])]),e.createElementVNode("div",Wd,[e.createElementVNode("label",Zd,e.toDisplayString(e.unref(T)("textEditor.image.height")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":l[21]||(l[21]=s=>pe.value=s),class:"dss-link-modal-input",placeholder:e.unref(T)("textEditor.image.auto"),onKeyup:e.withKeys(fl,["enter"]),onInput:Wn},null,40,Ud),[[e.vModelText,pe.value]])])])])):e.createCommentVNode("",!0),Be.value==="url"?(e.openBlock(),e.createElementBlock("div",Xd,[e.createElementVNode("div",Yd,[e.createElementVNode("div",jd,[e.createElementVNode("label",Kd,e.toDisplayString(e.unref(T)("textEditor.image.imageUrl")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"imageUrlInput",ref:Kt,type:"text","onUpdate:modelValue":l[22]||(l[22]=s=>Ue.value=s),class:"dss-link-modal-input",placeholder:e.unref(T)("textEditor.image.enterImageUrl"),onKeyup:e.withKeys(fl,["enter"])},null,40,Gd),[[e.vModelText,Ue.value]])]),e.createElementVNode("div",Qd,[e.createElementVNode("label",Jd,e.toDisplayString(e.unref(T)("textEditor.image.altText")),1),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":l[23]||(l[23]=s=>xt.value=s),class:"dss-link-modal-input",placeholder:e.unref(T)("textEditor.image.enterAltText"),onKeyup:e.withKeys(fl,["enter"])},null,40,e1),[[e.vModelText,xt.value]])]),e.createElementVNode("div",t1,[e.createElementVNode("label",n1,e.toDisplayString(e.unref(T)("textEditor.image.width")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":l[24]||(l[24]=s=>se.value=s),class:"dss-link-modal-input",placeholder:e.unref(T)("textEditor.image.auto"),onKeyup:e.withKeys(fl,["enter"]),onInput:oo},null,40,l1),[[e.vModelText,se.value]])]),e.createElementVNode("div",o1,[e.createElementVNode("label",a1,e.toDisplayString(e.unref(T)("textEditor.image.height")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":l[25]||(l[25]=s=>pe.value=s),class:"dss-link-modal-input",placeholder:e.unref(T)("textEditor.image.auto"),onKeyup:e.withKeys(fl,["enter"]),onInput:Wn},null,40,s1),[[e.vModelText,pe.value]])])])])):e.createCommentVNode("",!0)]),actions:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-cancel",onClick:jl},e.toDisplayString(e.unref(T)("textEditor.image.cancel")),1),e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-save",onClick:fl},e.toDisplayString(e.unref(T)("textEditor.image.save")),1)]),_:1},8,["showModal"]),A.showTitle?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["dss-text-editor-title-wrapper",{"dss-text-editor-no-border-bottom":ll.value&&on.value}])},[e.createElementVNode("p",null,e.toDisplayString(e.unref(T)("textEditor.labels.title")),1),e.createElementVNode("div",r1,[on.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",i1,[A.title?(e.openBlock(),e.createElementBlock("span",c1,e.toDisplayString(A.title),1)):(e.openBlock(),e.createElementBlock("span",u1,e.toDisplayString(cl.value),1))])),e.createElementVNode("textarea",{ref_key:"titleInputRef",ref:fe,value:A.title,onInput:Pn,onFocus:Tt,onBlur:fn,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-title-input",{"dss-text-editor-title-input-blurred":!on.value}]),placeholder:cl.value,disabled:A.disabled,rows:"1"},null,42,d1)])],2)):e.createCommentVNode("",!0),A.showTitle&&ll.value&&on.value?(e.openBlock(),e.createElementBlock("div",m1,[e.renderSlot(o.$slots,"title-slot")])):e.createCommentVNode("",!0),A.showDescription?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(["dss-text-editor-description-wrapper",{"dss-text-editor-no-border-bottom":D.value&&S.value}])},[e.createElementVNode("p",null,e.toDisplayString(e.unref(T)("textEditor.labels.description")),1),e.createElementVNode("div",p1,[S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",f1,[A.description?(e.openBlock(),e.createElementBlock("span",v1,e.toDisplayString(A.description),1)):(e.openBlock(),e.createElementBlock("span",g1,e.toDisplayString(Mn.value),1))])),e.createElementVNode("textarea",{ref_key:"descriptionInputRef",ref:et,value:A.description,onInput:Hn,onFocus:Rl,onBlur:kl,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-description-input",{"dss-text-editor-description-input-blurred":!S.value}]),placeholder:Mn.value,disabled:A.disabled,rows:"1"},null,42,h1)])],2)):e.createCommentVNode("",!0),A.showDescription&&D.value&&S.value?(e.openBlock(),e.createElementBlock("div",y1,[e.renderSlot(o.$slots,"description-slot")])):e.createCommentVNode("",!0),at.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:6},e.renderList(ne.value,s=>(e.openBlock(),e.createElementBlock("div",{key:s.id,class:e.normalizeClass(["editor-comment-marker-group",{"editor-comment-marker-active":vn.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:i=>Lo(s),onMouseleave:Tl},[s.firstUser?(e.openBlock(),e.createElementBlock("div",{key:0,class:"editor-comment-marker editor-comment-marker-first",onClick:e.withModifiers(i=>en(s),["stop"])},[s.firstUser.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.firstUser.avatar,alt:s.firstUser.name||"avatar"},null,8,b1)):(e.openBlock(),e.createElementBlock("span",w1,e.toDisplayString(s.firstUser.initials||(s.firstUser.name?s.firstUser.name.charAt(0):"")),1))],8,C1)):e.createCommentVNode("",!0),s.secondUser?(e.openBlock(),e.createElementBlock("div",{key:1,class:"editor-comment-marker editor-comment-marker-second",onClick:e.withModifiers(i=>en(s),["stop"])},[s.secondUser.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.secondUser.avatar,alt:s.secondUser.name||"avatar"},null,8,E1)):(e.openBlock(),e.createElementBlock("span",S1,e.toDisplayString(s.secondUser.initials||(s.secondUser.name?s.secondUser.name.charAt(0):"")),1))],8,x1)):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(i=>en(s),["stop"])},[e.createElementVNode("span",N1,"+"+e.toDisplayString(s.additionalCount),1)],12,V1)):e.createCommentVNode("",!0)],46,k1))),128)):e.createCommentVNode("",!0),A.richText?(e.openBlock(),e.createElementBlock("div",T1,[e.createElementVNode("div",{ref_key:"editorRef",ref:v,contenteditable:"true",spellcheck:"false",class:e.normalizeClass(["dss-text-editor-content",{"dss-text-editor-content-disabled":A.disabled,"dss-text-editor-fixed-height":A.fixedHeight}]),style:e.normalizeStyle(Dn.value),onInput:_t,onBlur:vt,onClick:zt,onMouseup:Dt,onKeyup:Dt,onKeydown:Yo,onPaste:yo,onMousemove:$l,onMouseleave:No},null,38),e.createVNode(e.Transition,{name:"comment-overlay"},{default:e.withCtx(()=>[at.value&&vn.value!==null?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-comment-overlay",style:e.normalizeStyle(y.value)},[q.value||Ge.value.length>0?(e.openBlock(),e.createElementBlock("div",D1,[e.createElementVNode("div",H1,[q.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-comment-selection",innerHTML:q.value},null,8,R1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",F1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ge.value,(s,i)=>(e.openBlock(),e.createElementBlock("div",{key:i,class:"dss-comment-message"},[s.user&&(s.user.avatar||s.user.initials||s.user.name)?(e.openBlock(),e.createElementBlock("div",I1,[e.createElementVNode("div",z1,[s.user.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.user.avatar,alt:s.user.name||"avatar"},null,8,P1)):(e.openBlock(),e.createElementBlock("span",O1,e.toDisplayString(s.user.initials||(s.user.name?s.user.name.charAt(0):"")),1))])])):e.createCommentVNode("",!0),e.createElementVNode("div",q1,[e.createElementVNode("div",W1,[e.createElementVNode("div",Z1,e.toDisplayString(s.user&&s.user.name||"Comment"),1),s.createdAt?(e.openBlock(),e.createElementBlock("div",U1,e.toDisplayString(Le(new Date(s.createdAt))),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["dss-comment-body-text",{"comment-started":ct(s.text)||s.class==="comment-started"}])},e.toDisplayString(s.text||""),3)]),B.commentUser&&s.user&&s.user.id===B.commentUser.id&&!ct(s.text)?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"dss-comment-delete-button",onClick:e.withModifiers(c=>fo(s,i),["stop"]),title:e.unref(T)("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,X1)):e.createCommentVNode("",!0)]))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",Y1,[e.withDirectives(e.createElementVNode("textarea",{ref_key:"commentInputRef",ref:x,"onUpdate:modelValue":l[26]||(l[26]=s=>h.value=s),class:"dss-comment-input",rows:"1",placeholder:e.unref(T)("textEditor.comment.placeholder"),onKeydown:e.withKeys(e.withModifiers(wl,["prevent","stop"]),["enter"]),onInput:l[27]||(l[27]=()=>{if(x.value){const s=x.value;s.style.height="auto",s.style.height=`${s.scrollHeight}px`}})},null,40,j1),[[e.vModelText,h.value]]),e.createElementVNode("button",{type:"button",class:"dss-comment-send-button",onClick:e.withModifiers(wl,["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",K1,[e.createElementVNode("div",G1,[e.createElementVNode("span",Q1,e.toDisplayString(pn.value)+" "+e.toDisplayString(pn.value===1?e.unref(T)("textEditor.footer.word"):e.unref(T)("textEditor.footer.words")),1),l[70]||(l[70]=e.createElementVNode("span",{class:"dss-text-editor-footer-separator"},"•",-1)),e.createElementVNode("span",J1,e.toDisplayString(tl.value)+" "+e.toDisplayString(tl.value===1?e.unref(T)("textEditor.footer.character"):e.unref(T)("textEditor.footer.characters")),1)])])])):(e.openBlock(),e.createElementBlock("div",B1,[e.createElementVNode("textarea",{value:A.modelValue,onInput:rt,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-textarea",{"dss-text-editor-fixed-height":A.fixedHeight}]),placeholder:yl.value,rows:A.rows,disabled:A.disabled,style:e.normalizeStyle(kn.value)},null,46,M1),e.createElementVNode("div",_1,[e.createElementVNode("div",$1,[e.createElementVNode("span",L1,e.toDisplayString(pn.value)+" "+e.toDisplayString(pn.value===1?e.unref(T)("textEditor.footer.word"):e.unref(T)("textEditor.footer.words")),1),l[67]||(l[67]=e.createElementVNode("span",{class:"dss-text-editor-footer-separator"},"•",-1)),e.createElementVNode("span",A1,e.toDisplayString(tl.value)+" "+e.toDisplayString(tl.value===1?e.unref(T)("textEditor.footer.character"):e.unref(T)("textEditor.footer.characters")),1)])])])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[U.value&&me.value&&v.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-link-popup",style:e.normalizeStyle(F.value),onMouseenter:l[28]||(l[28]=s=>Ee.value=!0),onMouseleave:In},[e.createElementVNode("span",{class:"dss-link-popup-url",onClick:e.withModifiers(jo,["stop"]),title:me.value},e.toDisplayString(me.value),9,em),e.createElementVNode("button",{type:"button",class:"dss-link-popup-edit",onClick:e.withModifiers(Mo,["stop"]),title:e.unref(T)("textEditor.link.editLink")},[(e.openBlock(),e.createElementBlock("svg",nm,[...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,tm)],36)):e.createCommentVNode("",!0)])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[Lt.value&&Ut.value&&v.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-link-popup",style:e.normalizeStyle(G.value),onMouseenter:l[29]||(l[29]=s=>ye.value=!0),onMouseleave:Yl},[e.createElementVNode("div",lm,[Ut.value===e.unref(T)("textEditor.image.noAlt")?(e.openBlock(),e.createElementBlock("div",om,[...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:Ut.value},e.toDisplayString(Ut.value),9,am)]),e.createElementVNode("button",{type:"button",class:"dss-link-popup-edit",onClick:e.withModifiers(ao,["stop"]),title:e.unref(T)("textEditor.image.editImage")},[(e.openBlock(),e.createElementBlock("svg",rm,[...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,sm)],36)):e.createCommentVNode("",!0)])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[A.floatingToolbar&&A.richText&&ot.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"floatingToolbarRef",ref:tt,class:"dss-floating-toolbar",style:e.normalizeStyle(Ce.value),onMousedown:l[44]||(l[44]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",im,[e.createElementVNode("div",{class:"dss-toolbar-button",onClick:e.withModifiers(oe,["stop"]),title:e.unref(T)("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,cm),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-disabled":!il.value}]),onClick:e.withModifiers(nn,["stop"]),title:e.unref(T)("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,um),l[89]||(l[89]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",dm,[e.createElementVNode("div",{class:"dss-toolbar-button dss-toolbar-dropdown-toggle",onClick:l[30]||(l[30]=e.withModifiers(s=>eo("paragraph"),["stop"])),title:e.unref(T)("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,pm)):V.value==="h2"?(e.openBlock(),e.createElementBlock("img",{key:1,src:I.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,fm)):V.value==="h3"?(e.openBlock(),e.createElementBlock("img",{key:2,src:I.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,vm)):V.value==="h4"?(e.openBlock(),e.createElementBlock("img",{key:3,src:I.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,gm)):V.value==="h5"?(e.openBlock(),e.createElementBlock("img",{key:4,src:I.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,hm)):V.value==="h6"?(e.openBlock(),e.createElementBlock("img",{key:5,src:I.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,ym)):(e.openBlock(),e.createElementBlock("svg",km,[...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,mm),dt.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=>pl("<h1>"))},[e.createElementVNode("h1",null,e.toDisplayString(e.unref(T)("textEditor.paragraph.heading1")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[32]||(l[32]=s=>pl("<h2>"))},[e.createElementVNode("h2",null,e.toDisplayString(e.unref(T)("textEditor.paragraph.heading2")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[33]||(l[33]=s=>pl("<h3>"))},[e.createElementVNode("h3",null,e.toDisplayString(e.unref(T)("textEditor.paragraph.heading3")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[34]||(l[34]=s=>pl("<h4>"))},[e.createElementVNode("h4",null,e.toDisplayString(e.unref(T)("textEditor.paragraph.heading4")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[35]||(l[35]=s=>pl("<h5>"))},[e.createElementVNode("h5",null,e.toDisplayString(e.unref(T)("textEditor.paragraph.heading5")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[36]||(l[36]=s=>pl("<h6>"))},[e.createElementVNode("h6",null,e.toDisplayString(e.unref(T)("textEditor.paragraph.heading6")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[37]||(l[37]=s=>pl("<p>"))},[e.createElementVNode("p",null,e.toDisplayString(e.unref(T)("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":Yt("bold")}]),onClick:l[39]||(l[39]=e.withModifiers(s=>Vn("bold"),["stop"])),title:e.unref(T)("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,Cm),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Yt("italic")}]),onClick:l[40]||(l[40]=e.withModifiers(s=>Vn("italic"),["stop"])),title:e.unref(T)("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,bm),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Yt("underline")}]),onClick:l[41]||(l[41]=e.withModifiers(s=>Vn("underline"),["stop"])),title:e.unref(T)("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,wm),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":Xe.value}]),onClick:e.withModifiers(Un,["stop"]),title:e.unref(T)("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,xm),l[92]||(l[92]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),ke.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-button",onClick:e.withModifiers(dl,["stop"]),title:e.unref(T)("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,Sm)):(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-button",onClick:e.withModifiers(Gl,["stop"]),title:e.unref(T)("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,Em)),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":Yt("insertUnorderedList")}]),onClick:e.withModifiers(Ul,["stop"]),title:e.unref(T)("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,Vm),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Yt("insertOrderedList")}]),onClick:e.withModifiers(bl,["stop"]),title:e.unref(T)("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,Nm),l[94]||(l[94]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:"dss-toolbar-button",onClick:e.withModifiers(Kn,["stop"]),title:e.unref(T)("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,Bm),at.value?(e.openBlock(),e.createElementBlock("div",Mm)):e.createCommentVNode("",!0),at.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-toolbar-button",title:e.unref(T)("textEditor.toolbar.comment"),onClick:e.withModifiers(qn,["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,_m)):e.createCommentVNode("",!0),A.askAi?(e.openBlock(),e.createElementBlock("div",$m)):e.createCommentVNode("",!0),A.askAi?(e.openBlock(),e.createElementBlock("div",Lm,[e.createElementVNode("div",{class:"dss-toolbar-ai-button dss-toolbar-ai-float dss-toolbar-dropdown-toggle",onClick:l[42]||(l[42]=e.withModifiers(s=>eo("askAi"),["stop"])),title:e.unref(T)("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",Tm,e.toDisplayString(e.unref(T)("textEditor.toolbar.askAi")),1)],8,Am),dt.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)]),Cn.value?(e.openBlock(),e.createElementBlock("div",Dm,[A.askAi&&Cn.value?(e.openBlock(),e.createElementBlock("div",Hm)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.customToolbarSlots,(s,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:i},[_n(s)&&zn(s)?(e.openBlock(),e.createElementBlock("div",Rm,[e.renderSlot(o.$slots,s)])):e.createCommentVNode("",!0),_n(s)&&zn(s)&&i<A.customToolbarSlots.length-1&&nl(i)?(e.openBlock(),e.createElementBlock("div",Fm)):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0)],36)):e.createCommentVNode("",!0)]))],6))}}),Pm={class:"dss-color-picker__section-title"},Om={class:"dss-color-picker__presets-row"},qm=["title","onClick"],Wm={key:1,class:"dss-color-picker__section"},Zm={class:"dss-color-picker__presets-row"},Um=["title","onClick"],Xm={key:2,class:"dss-color-picker__section"},Ym={class:"dss-color-picker__section-header"},jm={class:"dss-color-picker__presets-row"},Km=["title","onClick"],Gm=["onClick"],Qm={key:1,class:"dss-color-picker__presets-row dss-color-picker__presets-row--standalone"},Jm=["title","onClick"],e2={class:"dss-color-picker__input-row"},t2=["value"],n2={__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(A,{emit:le}){function M(ee){const Z=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(ee);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,et=Math.max(X,re,fe),Vt=Math.min(X,re,fe);let un=0,Et=0;const on=(et+Vt)/2;if(et!==Vt){const S=et-Vt;switch(Et=on>.5?S/(2-et-Vt):S/(et+Vt),et){case X:un=((re-fe)/S+(re<fe?6:0))/6;break;case re:un=((fe-X)/S+2)/6;break;case fe:un=((X-re)/S+4)/6;break}}return{h:un*360,s:Et*100,l:on*100}}function T(ee,Z,X){Z/=100,X/=100;const re=Z*Math.min(X,1-X),fe=et=>{const Vt=(et+ee/30)%12,un=X-re*Math.max(Math.min(Vt-3,9-Vt,1),-1);return Math.round(255*un).toString(16).padStart(2,"0")};return`#${fe(0)}${fe(8)}${fe(4)}`}function ce(ee){const Z=ee.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(ee){const Z=ee.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 B(ee){if(typeof ee!="string")return null;const Z=ee.trim();return ce(Z)||I(Z)}function ge(ee,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:ee,s:fe*100,v:re*100}}function ut(ee,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:ee,s:fe*100,l:re*100}}const J=A,v=le,we=e.ref(!1),ke=e.ref(!1),Q=e.ref(!1),U=e.ref(-1),me=e.ref(-1),F=e.ref(null),Ee=e.ref(null),Te=e.ref(null),lt=e.ref(null),mt=e.ref({top:0,left:0}),W=e.ref(M(J.modelValue||"#b8a5de")),Ze=e.computed(()=>Array.isArray(J.presetGroups)&&J.presetGroups.length>0),qe=e.computed(()=>!J.disableCustomColors),xe=e.computed(()=>Ze.value?0:J.initialPresetCount!=null?J.initialPresetCount:me.value<0?null:me.value),Me=e.computed(()=>{const ee=xe.value;return ee==null?!0:Math.max(0,J.presetColors.length-ee)<J.max}),Xe=e.computed(()=>!!(ke.value||U.value>=0||!te.value&&J.presetColors.length===0));e.computed(()=>{const ee=xe.value;return ee!=null&&J.presetColors.length>ee});const te=e.computed(()=>Ze.value||xe.value!=null),ot=e.computed(()=>{const ee=xe.value;return ee==null?[]:J.presetColors.slice(0,ee)}),Ce=e.computed(()=>{const ee=xe.value;return ee==null?[]:J.presetColors.slice(ee)});function tt(ee){const Z=xe.value;return Z!=null?Z+ee:-1}function dt(ee){const Z=xe.value;return Z!=null&&ee>=Z}function ht(ee){dt(ee)&&(U.value=ee,W.value=M(J.presetColors[ee]),ke.value=!0,e.nextTick(()=>lt.value?.focus()))}function xt(ee){if(!dt(ee))return;const Z=J.presetColors.filter((fe,et)=>et!==ee);v("update:presetColors",Z);const X=ce(J.modelValue),re=ce(J.presetColors[ee]);if(X&&re&&X.toLowerCase()===re.toLowerCase()){const fe=Z[Math.max(0,ee-1)]||Z[0];fe&&v("update:modelValue",fe)}}function Ht(){Q.value=!Q.value,Q.value||(U.value=-1,ke.value=!1)}function It(){if(!qe.value||U.value<0)return;const ee=_e.value,Z=ce(ee);if(Z){const X=[...J.presetColors];X[U.value]=Z,v("update:presetColors",X),v("update:modelValue",Z),U.value=-1,ke.value=!1}}function se(){J.disabled||!qe.value||(U.value=-1,ke.value=!ke.value,ke.value&&(ye(),e.nextTick(()=>lt.value?.focus())))}function pe(ee){const Z=B(ee),X=B(J.modelValue);return Z&&X&&Z.toLowerCase()===X.toLowerCase()}function De(){if(J.disabled||!qe.value||!Me.value)return;const ee=_e.value,Z=ce(ee);if(Z){const X=[...J.presetColors,Z];v("update:presetColors",X),v("update:modelValue",Z);const re=xe.value??me.value;re>=0&&X.length-re>=J.max&&(ke.value=!1)}}const _e=e.computed(()=>{const{h:ee,s:Z,l:X}=W.value;return T(ee,Z,X)}),Kt=e.computed(()=>_e.value.toLowerCase()),kt=e.computed(()=>({background:`linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${W.value.h}, 100%, 50%))`})),Qt=e.computed(()=>{const ee=ge(W.value.h,W.value.s,W.value.l);return{left:`${ee.s}%`,bottom:`${ee.v}%`,transform:"translate(-50%, 50%)"}}),Lt=e.computed(()=>({left:`${W.value.h/360*100}%`,transform:"translateX(-50%)"})),Ut=e.computed(()=>({position:"fixed",left:`${mt.value.left}px`,top:`${mt.value.top}px`,zIndex:1002}));function G(){if(!F.value||!we.value)return;const ee=F.value.getBoundingClientRect(),Z=window.innerHeight||document.documentElement.clientHeight;let X=ee.bottom+4;const re=Ee.value;re&&X+re.offsetHeight>Z-8&&(X=ee.top-4-re.offsetHeight),mt.value={top:X,left:ee.left}}function ye(){const ee=J.modelValue||"#b8a5de",Z=B(ee);Z&&(W.value=M(Z))}function Be(){v("update:modelValue",_e.value)}function Ue(){J.disabled||(we.value=!we.value,we.value&&(ye(),e.nextTick(()=>{G(),lt.value?.focus()})))}function Je(){const ee=_e.value,Z=ce(ee);if(Z){if(U.value>=0){const X=[...J.presetColors];X[U.value]=Z,v("update:presetColors",X),v("update:modelValue",Z)}else if(qe.value&&(J.presetColors.length>0||Ze.value)&&ke.value&&Me.value&&!J.presetColors.some(re=>ce(re)?.toLowerCase()===Z.toLowerCase())){const re=[...J.presetColors,Z];v("update:presetColors",re),v("update:modelValue",Z)}}we.value=!1,ke.value=!1,Q.value=!1,U.value=-1}function At(ee){if(!Te.value)return;const Z=Te.value.getBoundingClientRect(),X=re=>{const fe=Math.max(0,Math.min(1,(re.clientX-Z.left)/Z.width)),et=Math.max(0,Math.min(1,1-(re.clientY-Z.top)/Z.height)),Vt={h:W.value.h,s:fe*100,v:et*100};W.value=ut(Vt.h,Vt.s,Vt.v)};X(ee),document.addEventListener("mousemove",X),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",X),Be()},{once:!0})}function nt(ee){if(!ee.currentTarget)return;const X=ee.currentTarget.getBoundingClientRect(),re=fe=>{const et=Math.max(0,Math.min(1,(fe.clientX-X.left)/X.width));W.value={...W.value,h:et*360}};re(ee),document.addEventListener("mousemove",re),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",re),Be()},{once:!0})}function Ot(ee){const Z=ee.target.value,X=B(Z);X&&(W.value=M(X),v("update:modelValue",X))}function We(ee){if(J.disabled)return;const Z=B(ee);Z&&(W.value=M(Z),v("update:modelValue",Z))}let Re=null,Ct=null;function yt(){Re&&(document.removeEventListener("keydown",Re),Re=null),Ct&&(window.removeEventListener("resize",Ct),Ct=null)}return e.watch(we,ee=>{if(yt(),ee){if(!Ze.value&&J.initialPresetCount==null){const Z=J.presetColors.length;Z>0&&(me.value<0||Z<me.value)&&(me.value=Z)}Re=Z=>{Z.key==="Escape"&&Je()},Ct=G,document.addEventListener("keydown",Re),window.addEventListener("resize",Ct)}}),e.watch(()=>J.modelValue,()=>{we.value&&ye()},{immediate:!1}),e.watch(Ce,ee=>{ee.length===0&&(Q.value=!1,U.value=-1,ke.value=!1)}),e.onBeforeUnmount(yt),(ee,Z)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-color-picker",{"dss-color-picker--disabled":A.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(Je,["self"])},[e.createElementVNode("div",{ref_key:"dropdownRef",ref:Ee,class:"dss-color-picker__dropdown",style:e.normalizeStyle(Ut.value)},[te.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[Ze.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(A.presetGroups,(X,re)=>(e.openBlock(),e.createElementBlock("div",{key:"g-"+re,class:"dss-color-picker__section"},[e.createElementVNode("span",Pm,e.toDisplayString(X.title),1),e.createElementVNode("div",Om,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(X.colors,(fe,et)=>(e.openBlock(),e.createElementBlock("button",{key:"g-"+re+"-"+et,type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":pe(fe)}]),style:e.normalizeStyle({backgroundColor:fe,"--dss-preset-color":fe}),title:fe,onClick:e.withModifiers(Vt=>We(fe),["stop"])},null,14,qm))),128))])]))),128)):ot.value.length?(e.openBlock(),e.createElementBlock("div",Wm,[Z[1]||(Z[1]=e.createElementVNode("span",{class:"dss-color-picker__section-title"},"Preset colors",-1)),e.createElementVNode("div",Zm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ot.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":pe(X)}]),style:e.normalizeStyle({backgroundColor:X,"--dss-preset-color":X}),title:X,onClick:e.withModifiers(fe=>We(X),["stop"])},null,14,Um))),128))])])):e.createCommentVNode("",!0),qe.value?(e.openBlock(),e.createElementBlock("div",Xm,[e.createElementVNode("div",Ym,[Z[3]||(Z[3]=e.createElementVNode("span",{class:"dss-color-picker__section-title"},"Custom Colors",-1)),Ce.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":Q.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",jm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ce.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":Q.value}])},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":!Q.value&&pe(X),"dss-color-picker__preset-bubble--editing":Q.value&&U.value===tt(re)}]),style:e.normalizeStyle({backgroundColor:U.value===tt(re)?_e.value:X,"--dss-preset-color":U.value===tt(re)?_e.value:X}),title:U.value===tt(re)?_e.value:X,onClick:e.withModifiers(fe=>Q.value?ht(tt(re)):We(X),["stop"])},null,14,Km),Q.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=>xt(tt(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,Gm)):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":ke.value}]),onClick:e.withModifiers(se,["stop"])}," + ",2)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)],64)):A.presetColors.length?(e.openBlock(),e.createElementBlock("div",Qm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.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":pe(X)}]),style:e.normalizeStyle({backgroundColor:X,"--dss-preset-color":X}),title:X,onClick:e.withModifiers(fe=>We(X),["stop"])},null,14,Jm))),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":ke.value}]),onClick:e.withModifiers(se,["stop"])}," + ",2)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),Xe.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",{class:"dss-color-picker__sl-area",ref_key:"slAreaRef",ref:Te,onMousedown:At},[e.createElementVNode("div",{class:"dss-color-picker__sl-bg",style:e.normalizeStyle(kt.value)},null,4),e.createElementVNode("div",{class:"dss-color-picker__sl-pointer",style:e.normalizeStyle(Qt.value)},null,4)],544),e.createElementVNode("div",{class:"dss-color-picker__hue-wrap",onMousedown:nt},[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",e2,[e.createElementVNode("input",{ref_key:"hexInputRef",ref:lt,type:"text",class:"dss-color-picker__hex-input",value:Kt.value,onInput:Ot},null,40,t2)]),qe.value&&te.value&&(A.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:De}," Save color ")):e.createCommentVNode("",!0),qe.value&&te.value&&U.value>=0?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"dss-color-picker__add-btn",onClick:It}," Save color ")):e.createCommentVNode("",!0),te.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:"dss-color-picker__add-btn",onClick:Je}," Save color "))],64)):e.createCommentVNode("",!0)],4)])):e.createCommentVNode("",!0)]))],2))}},l2={key:0,class:"dss-loader"},o2={key:0,class:"dss-loader-label"},a2={key:1,class:"dss-loader"},s2={key:0,class:"dss-loader-label"},r2={key:2,class:"dss-loader"},i2={key:0,class:"dss-loader-label"},c2={key:3,class:"dss-loader"},u2={key:0,class:"dss-loader-label"},d2={key:4,class:"dss-loader"},m2={key:0,class:"dss-loader-label"},p2={key:5,class:"dss-loader dss-loader--inline"},f2={class:"dss-loader-inline-text"},v2={__name:"DSSLoaders",props:{type:{type:String,default:"spinner"},label:{type:String,default:""},size:{type:[String,Number],default:"medium"},color:{type:String,default:""}},setup(A){const le=A,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),T=e.computed(()=>{const ce={};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);ce["--dss-loader-size"]=I}return le.color&&(ce["--dss-loader-accent"]=le.color,ce["--dss-loader-accent-soft"]=`color-mix(in srgb, ${le.color} 30%, white)`),ce});return(ce,I)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-loaders",M.value]),style:e.normalizeStyle(T.value)},[A.type==="spinner"?(e.openBlock(),e.createElementBlock("div",l2,[I[0]||(I[0]=e.createElementVNode("span",{class:"dss-loader-spinner","aria-hidden":"true"},null,-1)),A.label?(e.openBlock(),e.createElementBlock("span",o2,e.toDisplayString(A.label),1)):e.createCommentVNode("",!0)])):A.type==="dots"?(e.openBlock(),e.createElementBlock("div",a2,[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)),A.label?(e.openBlock(),e.createElementBlock("span",s2,e.toDisplayString(A.label),1)):e.createCommentVNode("",!0)])):A.type==="battery"?(e.openBlock(),e.createElementBlock("div",r2,[I[2]||(I[2]=e.createElementVNode("div",{class:"battery","aria-hidden":"true"},null,-1)),A.label?(e.openBlock(),e.createElementBlock("span",i2,e.toDisplayString(A.label),1)):e.createCommentVNode("",!0)])):A.type==="double-circle"?(e.openBlock(),e.createElementBlock("div",c2,[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)),A.label?(e.openBlock(),e.createElementBlock("span",u2,e.toDisplayString(A.label),1)):e.createCommentVNode("",!0)])):A.type==="bars"?(e.openBlock(),e.createElementBlock("div",d2,[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)),A.label?(e.openBlock(),e.createElementBlock("span",m2,e.toDisplayString(A.label),1)):e.createCommentVNode("",!0)])):A.type==="inline"?(e.openBlock(),e.createElementBlock("div",p2,[I[5]||(I[5]=e.createElementVNode("span",{class:"dss-loader-inline-spinner","aria-hidden":"true"},null,-1)),e.createElementVNode("span",f2,[e.renderSlot(ce.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(A.label),1)])])])):e.createCommentVNode("",!0)],6))}},da="dss-skeleton-item",g2={__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:A=>["single","multiple"].includes(A)},targetClass:{type:String,default:da},bgColor:{type:String,default:null},shimmerColor:{type:String,default:null},bgDark:{type:String,default:null},shimmerDark:{type:String,default:null}},setup(A){const le=A,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!==da&&(I[`dss-skeleton--target-${le.targetClass}`]=!0),I}),T=e.computed(()=>{const I={};return le.borderRadius&&(I.borderRadius=le.borderRadius),I}),ce=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,B)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-skeleton",M.value]),style:e.normalizeStyle(ce.value)},[A.loading&&A.mode==="single"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-skeleton-overlay",style:e.normalizeStyle(T.value),"aria-hidden":"true"},null,4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["dss-skeleton-content",{"dss-skeleton-content--hidden":A.loading&&A.mode==="single"}])},[e.renderSlot(I.$slots,"default")],2)],6))}},h2={key:0,class:"dss-dnd-column-header"},y2={class:"dss-dnd-column-title"},k2={class:"dss-dnd-column-count"},C2=["data-column"],b2={key:0,class:"dss-dnd-indicator"},w2=["onPointerdown"],x2=["onPointerdown"],E2={class:"dss-dnd-item-content"},S2={class:"dss-dnd-item-default"},V2={key:0,class:"dss-dnd-empty"},N2={name:"DSSDnd"},B2=Object.assign(N2,{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(A,{emit:le}){const M=A,T=le,ce=e.useSlots(),I=e.computed(()=>!!ce["delete-zone"]),B={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},ge=e.computed(()=>({...B,...M.options})),ut=e.computed(()=>({"--dss-dnd-col-min-w":ge.value.columnMinWidth,"--dss-dnd-col-max-w":ge.value.columnMaxWidth,"--dss-dnd-col-gap":ge.value.columnGap,"--dss-dnd-indicator-color":ge.value.indicatorColor,"--dss-dnd-body-max-h":ge.value.columnBodyMaxHeight}));function J(G){if(!ge.value.ColColor||!G)return{};const ye=G.background||G.color;return ye?{background:ye}:{}}const v=e.ref(null),we=e.ref(null),ke=e.ref(!1),Q=e.ref(-1),U=e.ref(null);let me=null,F=null,Ee=null,Te=null,lt=0,mt=0,W="",Ze=null;const qe=5,xe=e.computed(()=>{const G={};for(const ye of M.columns)G[ye.value]=M.items.filter(Be=>Be[M.columnKey]===ye.value).sort((Be,Ue)=>(Be[M.positionKey]??0)-(Ue[M.positionKey]??0));return G}),Me=e.computed(()=>{const G={},ye=!!v.value,Be=v.value?.[M.itemKey],Ue=we.value,Je=Q.value;for(const At of M.columns){const nt=xe.value[At.value]||[],Ot=[],We=Ue==At.value;let Re=0;for(let Ct=0;Ct<nt.length;Ct++){const yt=nt[Ct],ee=ye&&yt[M.itemKey]===Be;!ee&&We&&Je===Re&&Ot.push({type:"indicator",key:`ind-${Re}`}),ee||Re++,Ot.push({type:"item",item:yt,isDragged:ee,key:`item-${yt[M.itemKey]}`})}We&&Je>=Re&&Ot.push({type:"indicator",key:"ind-end"}),G[At.value]=Ot}return G});function Xe(G,ye){const Ue=(xe.value[G]||[]).filter(nt=>nt[M.itemKey]!==v.value?.[M.itemKey]);if(Ue.length===0)return 1;if(ye<=0){const nt=Ue[0][M.positionKey];return nt!=null&&nt>0?nt/2:.5}if(ye>=Ue.length){const nt=Ue[Ue.length-1][M.positionKey];return(nt??0)+1}const Je=Ue[ye-1][M.positionKey]??0,At=Ue[ye][M.positionKey]??0;return(Je+At)/2}function te(G,ye,Be){Ee&&Ee.remove();const Ue=G.getBoundingClientRect(),Je=G.cloneNode(!0);Je.classList.add("dss-dnd-ghost"),Je.style.cssText=`
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)}}Bt()}e.nextTick(()=>{Bn(),to()})},lo=()=>{if(!v.value||G.value)return;const o=window.getSelection();let l=null;o&&o.rangeCount>0&&(l=Kt());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,i=document.createTreeWalker(v.value,NodeFilter.SHOW_TEXT,{acceptNode:m=>{const f=m.parentElement;return!f||f.closest("a")||f.closest(".dss-image-wrapper")||!m.textContent||m.textContent.trim()===""?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),c=[];let d;for(;d=i.nextNode();)c.push(d);let u=!1;for(let m=c.length-1;m>=0;m--){const f=c[m],k=f.textContent;s.lastIndex=0;const A=[...k.matchAll(s)];if(A.length===0)continue;const R=A.filter(j=>{const Oe=j[0],Ne=j.index;if(Ne>0&&k[Ne-1]==="@"||Ne+Oe.length<k.length&&k[Ne+Oe.length]==="@")return!1;const ht=f.parentElement;return!(ht&&ht.closest("a"))});if(R.length===0)continue;if(R.length===1&&R[0][0]===k.trim()){const j=R[0][0],Oe=j.startsWith("http://")||j.startsWith("https://")?j:`https://${j}`,Ne=document.createElement("a");Ne.href=Oe,Ne.textContent=j,Ne.style.color="#60afdf",Ne.style.textDecoration="underline",f.parentNode&&(f.parentNode.replaceChild(Ne,f),u=!0);continue}let E=0;const se=document.createDocumentFragment();if(R.forEach(j=>{const Oe=j.index,Ne=j[0];if(Oe>E){const mn=k.substring(E,Oe);mn&&se.appendChild(document.createTextNode(mn))}const ht=Ne.startsWith("http://")||Ne.startsWith("https://")?Ne:`https://${Ne}`,dn=document.createElement("a");dn.href=ht,dn.textContent=Ne,dn.style.color="#60afdf",dn.style.textDecoration="underline",se.appendChild(dn),E=Oe+Ne.length}),E<k.length){const j=k.substring(E);j&&se.appendChild(document.createTextNode(j))}f.parentNode&&se.childNodes.length>0&&(f.parentNode.replaceChild(se,f),u=!0)}u&&l&&e.nextTick(()=>{Ln(l),Bn()})},Ko=()=>{if(!v.value)return;const o=/<u>([\s\S]*?)<\/u>|<ins>([\s\S]*?)<\/ins>/gi,l=document.createTreeWalker(v.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 i;for(;i=l.nextNode();)s.push(i);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 f=0;const k=document.createDocumentFragment();m.forEach(A=>{const R=A.index,E=A[0].startsWith("<u>")?"u":"ins",se=A[1]||A[2]||"";R>f&&k.appendChild(document.createTextNode(u.substring(f,R)));const j=document.createElement(E);j.textContent=se,k.appendChild(j),f=R+A[0].length}),f<u.length&&k.appendChild(document.createTextNode(u.substring(f))),d.parentNode&&k.childNodes.length>0&&d.parentNode.replaceChild(k,d)}},_o=o=>{if(!v.value||G.value)return;if(!o){Ko();return}if(!["*","_",">"].includes(o))return;const s=window.getSelection();if(!s||s.rangeCount===0)return;const i=s.getRangeAt(0);if(!i.collapsed)return;const c=i.startContainer.nodeType===Node.TEXT_NODE?i.startContainer.parentElement?.closest("p, h1, h2, h3, h4, h5, h6, li, td, th, blockquote, div"):i.startContainer.closest?.("p, h1, h2, h3, h4, h5, h6, li, td, th, blockquote, div");if(!c||c===v.value||!v.value.contains(c))return;const d=()=>{let mn="",an=0,Zt=!1;const kn=document.createTreeWalker(c,NodeFilter.SHOW_TEXT,{acceptNode:sl=>sl.parentElement?.closest("a, code, pre")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});document.createTreeWalker(c,NodeFilter.SHOW_TEXT,null);let fn=0;for(;kn.nextNode();){const sl=kn.currentNode,El=sl.textContent||"",pl=fn;if(fn+=El.length,sl===i.startContainer){mn+=El.substring(0,i.startOffset),an=pl+i.startOffset,Zt=!0;break}mn+=El}return Zt||(an=mn.length),{textBeforeCursor:mn,cursorCharOffset:an}},{textBeforeCursor:u}=d();if(!u.length)return;let m=null,f=null;if(u.endsWith("**")&&(m=u.match(/\*\*(.+?)\*\*$/s))||u.endsWith("__")&&(m=u.match(/__(.+?)__$/s))?f="strong":u.endsWith("*")&&!u.endsWith("**")&&(m=u.match(new RegExp("(?<!\\*)\\*([^*]+)\\*$")))||u.endsWith("_")&&!u.endsWith("__")&&(m=u.match(new RegExp("(?<!_)_([^_]+)_$")))?f="em":o===">"&&((m=u.match(/<u>(.+?)<\/u>$/s))||(m=u.match(/<ins>(.+?)<\/ins>$/s)))&&(f=m[0].startsWith("<u>")?"u":"ins",m[0].startsWith("<u>"),m[0].startsWith("<u>")),!m||!m[1])return;const k=m[0],A=m[1],R=u.length-k.length,se=(mn=>{let an=0;const Zt=document.createTreeWalker(c,NodeFilter.SHOW_TEXT,{acceptNode:fn=>fn.parentElement?.closest("a, code, pre")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});let kn;for(;kn=Zt.nextNode();){const fn=(kn.textContent||"").length;if(an+fn>=mn)return{node:kn,offset:mn-an};an+=fn}return null})(R);if(!se)return;const j=document.createRange();j.setStart(se.node,se.offset),j.setEnd(i.endContainer,i.endOffset);const Oe=document.createElement(f);Oe.textContent=A,j.deleteContents(),j.insertNode(Oe);const Ne=window.getSelection(),ht=document.createRange();ht.setStartAfter(Oe),ht.collapse(!0),Ne.removeAllRanges(),Ne.addRange(ht);const dn=Kt();e.nextTick(()=>{Bt(),dn&&Ln(dn)})},Qn=()=>{v.value&&(tn.value=Kt(),Et.value="",It.value="",ze.value="",re.value="",pe.value="",Ht.value=null,Ct.value=null,Be.value="upload",yt.value=!0,un(),e.nextTick(()=>{De.value&&De.value.focus(),_e.value&&(_e.value.value="")}))},Jn=o=>{const l=o.target?.files?.[0];if(!l){Ht.value=null,It.value="";return}Ht.value=l;const s=new FileReader;s.onload=i=>{It.value=i.target?.result||""},s.readAsDataURL(l)},ko=()=>{_e.value&&_e.value.click()},oo=()=>{re.value&&(pe.value="")},qn=()=>{pe.value&&(re.value="")},ao=()=>{let o=Ct.value;if(!o){const l=window.getSelection();if(l&&l.rangeCount>0){const i=l.getRangeAt(0).commonAncestorContainer;o=i.nodeType===1?i.closest("img"):i.parentElement?.closest("img")}}if(o){const l=o.getAttribute("data-alt")||o.getAttribute("alt")||"";Ct.value=o,Et.value=l.trim()===""||l.trim()==="Image"?"":l;const s=o.getAttribute("src")||o.src||"";s.startsWith("http://")||s.startsWith("https://")?(ze.value=s,It.value="",Be.value="url"):(It.value=s,ze.value="",Be.value="upload");const c=o.style.width||o.getAttribute("width")||"",d=o.style.height||o.getAttribute("height")||"";re.value=c.endsWith("px")?c.replace("px",""):c,pe.value=d.endsWith("px")?d.replace("px",""):d,tn.value=null}else{Qn();return}yt.value=!0,he.value=!1,_t.value=!1,e.nextTick(()=>{Be.value==="url"&&Jt.value?(Jt.value.focus(),Jt.value.select()):De.value&&(De.value.focus(),De.value.select()),_e.value&&(_e.value.value="")})},jl=()=>{yt.value=!1,Et.value="",It.value="",ze.value="",re.value="",pe.value="",Ht.value=null,Ct.value=null,tn.value=null,Be.value="upload"},ml=()=>{const o=(Et.value||"").trim(),l=v.value?._mutationObserver;l&&l.disconnect(),Pe.value?(Ze.value&&(clearTimeout(Ze.value),Ze.value=null),ge(),Pe.value=!1):ge();const s=Be.value==="url"?ze.value.trim():It.value;if(Ct.value&&v.value&&v.value.contains(Ct.value)){s&&(Ct.value.src=s),Ct.value.setAttribute("alt",o),Ct.value.setAttribute("data-alt",o),re.value?(Ct.value.style.width=`${re.value}px`,Ct.value.setAttribute("width",re.value)):(Ct.value.style.removeProperty("width"),Ct.value.removeAttribute("width")),pe.value?(Ct.value.style.height=`${pe.value}px`,Ct.value.setAttribute("height",pe.value)):(Ct.value.style.removeProperty("height"),Ct.value.removeAttribute("height"));const i=window.getSelection();if(i){i.removeAllRanges();const c=document.createRange();c.setStartAfter(Ct.value),c.collapse(!0),i.addRange(c)}Bt()}else{if(!s){l&&v.value&&l.observe(v.value,{childList:!0,subtree:!0}),jl();return}if(v.value){v.value.focus();const i=window.getSelection();i&&i.rangeCount>0&&i.removeAllRanges();const c=window.getSelection();let d=null;if(tn.value&&(Ln(tn.value),c&&c.rangeCount>0&&(d=c.getRangeAt(0))),!d&&c&&c.rangeCount>0&&(d=c.getRangeAt(0)),!d&&v.value){if(d=document.createRange(),v.value.childNodes.length===0){const k=document.createElement("p");k.innerHTML="<br>",v.value.appendChild(k),d.setStart(k,0),d.collapse(!0)}else d.selectNodeContents(v.value),d.collapse(!1);c&&(c.removeAllRanges(),c.addRange(d))}if(!d){jl();return}const u=d.commonAncestorContainer,m=u.nodeType===3?u.parentElement:u;if(!v.value.contains(m)){if(d=document.createRange(),v.value.childNodes.length===0){const k=document.createElement("p");k.innerHTML="<br>",v.value.appendChild(k),d.setStart(k,0),d.collapse(!0)}else d.selectNodeContents(v.value),d.collapse(!1);c&&(c.removeAllRanges(),c.addRange(d))}const f=document.createElement("img");f.src=s,f.setAttribute("alt",o),f.setAttribute("data-alt",o),re.value&&(f.style.width=`${re.value}px`,f.setAttribute("width",re.value)),pe.value&&(f.style.height=`${pe.value}px`,f.setAttribute("height",pe.value));try{d.insertNode(f),d.setStartAfter(f),d.collapse(!0),c&&(c.removeAllRanges(),c.addRange(d))}catch{if(v.value){if(v.value.childNodes.length===0){const R=document.createElement("p");v.value.appendChild(R),R.appendChild(f)}else{const R=v.value.lastChild;if(R&&R.nodeType===1)R.appendChild(f);else{const E=document.createElement("p");v.value.appendChild(E),E.appendChild(f)}}const A=document.createRange();A.setStartAfter(f),A.collapse(!0),c&&(c.removeAllRanges(),c.addRange(A))}}Ct.value=f,Bt()}}e.nextTick(()=>{l&&v.value&&l.observe(v.value,{childList:!0,subtree:!0}),Bn(),Qt(),jl()})};e.watch(()=>M.modelValue,o=>{if(M.richText&&v.value&&!G.value){const l=zn(o||""),i=v.value.innerHTML.replace(/&nbsp;|\u00A0/g," "),c=l.replace(/&nbsp;|\u00A0/g," ");if(i!==c){const d=Kt();v.value.innerHTML=l,e.nextTick(()=>{Rn();const u=v.value.innerHTML||"",m=M.title||"",f=M.description||"";Lt.value=u,ne.value=m,Z.value=f,$t.value=u,U.value=m,ie.value=f,tt.value=[],Xt.value=[],Ze.value&&(clearTimeout(Ze.value),Ze.value=null),Pe.value=!1,d&&Ln(d),Mn(),Ye(),ol(),Bn(),Qt(),ct(),xt("watch-modelValue")})}}},{immediate:!0}),e.watch(()=>M.richText,o=>{o?(Qt(),e.nextTick(()=>{bo()})):(Il(),le.value=[],He.value&&(He.value.disconnect(),He.value=null)),ct()}),e.watch(()=>M.floatingToolbar,o=>{o?Qt():Il()}),e.watch(()=>M.disabled,o=>{o&&Il(),ct()}),e.watch(()=>M.description,()=>{e.nextTick(()=>{S.value?rt():Ot()})}),e.watch(()=>M.title,()=>{e.nextTick(()=>{sn.value?ee():mt()})}),e.watch(()=>M.customToolbarSlots,()=>{e.nextTick(()=>{Gn()})},{deep:!0}),e.watch(()=>M.comments,(o,l)=>{if(M.commentUser){if(qt.value){qt.value=!1;return}yn.value||M.richText&&v.value&&e.nextTick(()=>{xl()})}},{deep:!0,immediate:!1});const xl=()=>{if(M.commentUser&&!yn.value&&!(!M.comments||!Array.isArray(M.comments)||M.comments.length===0)&&!(!M.richText||!v.value)){yn.value=!0;try{const o=new Set,l=M.comments.filter(u=>{const m=String(u.conversation_id||u.id);return o.has(m)?!1:(o.add(m),!0)}),s=v.value.querySelectorAll("[data-comment], [data-fake-comment]"),i=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 f=String(m);if(d.has(f))return;const k=v.value.querySelector(`[data-comment="${f}"]`);if(k){Kl(k,u),d.add(f);return}try{const A=Dn(u.selection_range,u.selection_text);if(A&&!A.collapsed){const R=A.commonAncestorContainer,E=R.nodeType===3?R.parentElement:R;if(E){const Oe=E.closest("[data-comment], [data-fake-comment]");if(Oe){const Ne=Oe.getAttribute("data-comment")||Oe.getAttribute("data-fake-comment");if(String(Ne)===String(m)){Oe.setAttribute("data-comment",f),Oe.removeAttribute("data-fake-comment"),Kl(Oe,u),d.add(f);return}else return}}const se=v.value.querySelector(`[data-comment="${f}"]`);if(se){Kl(se,u),d.add(f);return}const j=document.createElement("span");j.setAttribute("data-comment",f),Kl(j,u);try{A.surroundContents(j),c++,d.add(f)}catch{try{const Ne=document.createRange();Ne.setStart(A.startContainer,A.startOffset),Ne.setEnd(A.endContainer,A.endOffset),Co(Ne),Ne.surroundContents(j),c++,d.add(f)}catch{try{const ht=A.extractContents();j.appendChild(ht),A.insertNode(j),c++,d.add(f)}catch(ht){console.warn("Failed to create comment marker:",ht)}}}}}catch{}}),e.nextTick(()=>{xt("restoreCommentsFromModel"),Bt(),yn.value=!1})}catch{yn.value=!1}}},Co=o=>{if(!o||!v.value)return o;try{const l=["P","DIV","H1","H2","H3","H4","H5","H6","LI","BLOCKQUOTE","PRE"];let s=o.startContainer,i=o.startOffset;if(s.nodeType===3){const u=s.parentElement;u&&l.includes(u.tagName)&&(i===0&&!$o(s)||o.setStartBefore(u))}else s.nodeType===1&&l.includes(s.tagName)&&i>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&&!Ll(c)||o.setEndAfter(u))}else c.nodeType===1&&l.includes(c.tagName)&&d<c.childNodes.length&&o.setEndAfter(c);return o}catch{return o}},$o=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},Ll=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},Dn=(o,l)=>{if(!o||!v.value)return null;try{const s=document.createRange();if(o.type==="text"&&typeof o.start=="number"&&typeof o.end=="number"){let i=0;const c=[v.value];let d=null,u=!1,m=!1;for(;!m&&(d=c.pop());)if(d.nodeType===3){const f=i+d.length;!u&&o.start>=i&&o.start<=f&&(s.setStart(d,o.start-i),u=!0),u&&o.end>=i&&o.end<=f&&(s.setEnd(d,o.end-i),m=!0),i=f}else{let f=d.childNodes.length;for(;f--;)c.push(d.childNodes[f])}return u?Co(s):null}}catch{return null}return null},Kl=(o,l)=>{if(!o||!l)return;const s=l.conversation||[],i=new Set,c=[],d=m=>{m&&m.id&&!i.has(m.id)&&(i.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")},xt=(o="unknown")=>{if(!M.commentUser||!M.richText||!v.value){le.value=[];return}Date.now()-bt.value<Nt&&kt.value!==null||kt.value===null&&(kt.value=requestAnimationFrame(()=>{if(kt.value=null,bt.value=Date.now(),Ie.value)return;Ie.value=!0;const s={},i=v.value;if(!i){Ie.value=!1;return}const c=i.closest(".editor-with-comments");if(!c){Ie.value=!1;return}const d=i.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 f=c.getBoundingClientRect(),k=i.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 fl=E.textContent?.trim(),rl=M.comments?.find(el=>(typeof el.conversation_id=="string"&&el.conversation_id.startsWith("comment-")?null:el.conversation_id)&&el.selection_text?.trim()===fl);rl?(j=String(rl.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 Oe=E.getBoundingClientRect(),Ne=window.getComputedStyle(E),ht=parseFloat(Ne.lineHeight)||parseFloat(Ne.fontSize)*1.2,an=Oe.top-k.top+ht/2-15,kn=k.top-f.top+an;let fn=null,sl=null,El=0;const pl=[],Ao=new Set;if(j&&M.comments){const fl=M.comments.find(rl=>String(rl.conversation_id||rl.id)===String(j));if(fl){const rl=fl.conversation||[];rl.length>0?(rl.forEach(el=>{el.user&&el.user.id&&!Ao.has(el.user.id)&&(Ao.add(el.user.id),pl.push(el.user))}),El=rl.length):(El=0,fn=null,sl=null),pl.length>0?fn=pl[0]:fn=null,pl.length>1?sl=pl[1]:sl=null}}const wo=Oe.top+ht/2-15,To=wo+30,Do=5,Ho=To>k.top+Do&&wo<k.bottom-Do?1:0;le.value.find(fl=>fl.id===j);let so=E;if(!so&&j&&v.value){const fl=String(j);so=v.value.querySelector(`[data-comment="${fl}"], [data-fake-comment="${fl}"]`)}const Dl=pl.length;s[j]?(s[j].top=kn,s[j].opacity=Ho,s[j].element=so,s[j].firstUser=fn,s[j].secondUser=sl,s[j].totalCount=El,s[j].uniqueUserCount=Dl):s[j]={id:j,top:kn,opacity:Ho,element:so,firstUser:fn,secondUser:sl,totalCount:El,uniqueUserCount:Dl}});const A=Object.values(s).map(E=>{const se=Math.max(0,(E.uniqueUserCount??0)-2);if(!E.element&&E.id&&v.value){const Oe=String(E.id);E.element=v.value.querySelector(`[data-comment="${Oe}"], [data-fake-comment="${Oe}"]`)}return{...E,firstUser:E.firstUser||null,secondUser:E.secondUser||null,totalCount:E.totalCount,additionalCount:se}});(le.value.length!==A.length||A.some((E,se)=>{const j=le.value[se];if(!j)return!0;const Oe=(j.firstUser?.id||null)!==(E.firstUser?.id||null),Ne=(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||Oe||Ne||j.element!==E.element}))&&(le.value=A),Ie.value=!1}))},Lo=o=>{if(!o)return;let l=o.element;if(!l&&o.id&&v.value){const s=String(o.id);l=v.value.querySelector(`[data-comment="${s}"], [data-fake-comment="${s}"]`)}l&&(Al(),jn.value=l,l.classList.add("editor-comment-highlighted"))},Al=(o=!1)=>{!o&&hn.value!==null&&jn.value&&(jn.value.getAttribute("data-comment")||jn.value.getAttribute("data-fake-comment"))===hn.value||(v.value&&v.value.querySelectorAll(".editor-comment-highlighted").forEach(s=>{s.classList.remove("editor-comment-highlighted")}),jn.value&&(jn.value.classList.remove("editor-comment-highlighted"),jn.value=null))},ln=o=>{if(!o||!o.element)return;Al(!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}"]`;ve("comment-marker-clicked",{commentId:l,selector:s,element:o.element})},Tl=()=>{Al()},bo=()=>{!M.richText||!v.value||(He.value&&He.value.disconnect(),wt.value!==null&&(clearTimeout(wt.value),wt.value=null),He.value=new MutationObserver(()=>{wt.value===null&&(wt.value=setTimeout(()=>{wt.value=null,e.nextTick(()=>{xt("MutationObserver")})},200))}),He.value.observe(v.value,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-comment","data-fake-comment","data-comment-user","data-comment-user-2","data-comment-count"]}),xt("setupCommentMarkersObserver-initial"))},Wn=(o,l)=>{if(!o||!l)return;const s=l.getBoundingClientRect();let i=s.top,c=s.right+4;o.style.top=`${i}px`,o.style.left=`${c}px`,o.offsetHeight;const d=o.getBoundingClientRect(),u=window.innerWidth,m=window.innerHeight;if(d.right>u){const f=s.left-d.width-4;o.style.left=`${f}px`}if(d.bottom>m){const f=Math.max(8,m-d.height-8);o.style.top=`${f}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 i=s.getAttribute("data-submenu-id");if(i===o&&o){const c=document.querySelector(`.dss-toolbar-dropdown-item-has-submenu[data-submenu-id="${i}"]`);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(()=>{Wn(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,dt.value],()=>{we.value==="askAi"||dt.value==="askAi"?e.nextTick(()=>{wn()}):(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 i=document.querySelector(`.dss-toolbar-dropdown-item-has-submenu[data-submenu-id="${s}"]`);if(i)if(l.dataset.originalParentRef==="inside")i.appendChild(l);else{const d=i.closest(".dss-toolbar-dropdown");d&&d.insertBefore(l,i.nextSibling)}}}})}))}),e.watch(()=>M.locale,o=>{o&&o!==ce.value&&(ce.value=o)},{immediate:!0}),oe({openCommentOverlayForSelector:Xo,updateCommentMarkers:xt,restoreCommentsFromModel:xl}),(o,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-text-editor-container",[{"editor-with-comments":it.value},Tt.value]]),style:e.normalizeStyle(St.value)},[T.richText?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-text-editor-toolbar",onMousedown:l[14]||(l[14]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",qu,[e.createElementVNode("div",{class:"dss-toolbar-button",onClick:ae,title:e.unref(D)("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,Wu),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-disabled":!Zn.value}]),onClick:on,title:e.unref(D)("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,Zu),l[61]||(l[61]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",Uu,[e.createElementVNode("div",{class:"dss-toolbar-button dss-toolbar-dropdown-toggle",onClick:l[0]||(l[0]=s=>Fl("paragraph")),title:e.unref(D)("textEditor.toolbar.paragraphFormat")},[V.value==="h1"?(e.openBlock(),e.createElementBlock("img",{key:0,src:z.h1,alt:"H1",class:"dss-toolbar-heading-icon"},null,8,Yu)):V.value==="h2"?(e.openBlock(),e.createElementBlock("img",{key:1,src:z.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,ju)):V.value==="h3"?(e.openBlock(),e.createElementBlock("img",{key:2,src:z.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,Ku)):V.value==="h4"?(e.openBlock(),e.createElementBlock("img",{key:3,src:z.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,Gu)):V.value==="h5"?(e.openBlock(),e.createElementBlock("img",{key:4,src:z.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,Qu)):V.value==="h6"?(e.openBlock(),e.createElementBlock("img",{key:5,src:z.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,Ju)):(e.openBlock(),e.createElementBlock("svg",ed,[...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,Xu),we.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=>Pn("<h1>"))},[e.createElementVNode("img",{src:z.h1,alt:"H1",class:"dss-toolbar-heading-icon"},null,8,td),e.createElementVNode("h1",null,e.toDisplayString(e.unref(D)("textEditor.paragraph.heading1")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[2]||(l[2]=s=>Pn("<h2>"))},[e.createElementVNode("img",{src:z.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,nd),e.createElementVNode("h2",null,e.toDisplayString(e.unref(D)("textEditor.paragraph.heading2")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[3]||(l[3]=s=>Pn("<h3>"))},[e.createElementVNode("img",{src:z.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,ld),e.createElementVNode("h3",null,e.toDisplayString(e.unref(D)("textEditor.paragraph.heading3")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[4]||(l[4]=s=>Pn("<h4>"))},[e.createElementVNode("img",{src:z.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,od),e.createElementVNode("h4",null,e.toDisplayString(e.unref(D)("textEditor.paragraph.heading4")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[5]||(l[5]=s=>Pn("<h5>"))},[e.createElementVNode("img",{src:z.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,ad),e.createElementVNode("h5",null,e.toDisplayString(e.unref(D)("textEditor.paragraph.heading5")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[6]||(l[6]=s=>Pn("<h6>"))},[e.createElementVNode("img",{src:z.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,sd),e.createElementVNode("h6",null,e.toDisplayString(e.unref(D)("textEditor.paragraph.heading6")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[7]||(l[7]=s=>Pn("<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(D)("textEditor.paragraph.paragraph")),1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Gt("bold")}]),onClick:l[9]||(l[9]=s=>Nn("bold")),title:e.unref(D)("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,rd),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Gt("italic")}]),onClick:l[10]||(l[10]=s=>Nn("italic")),title:e.unref(D)("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,id),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Gt("underline")}]),onClick:l[11]||(l[11]=s=>Nn("underline")),title:e.unref(D)("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,cd),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Xe.value}]),onClick:Yn,title:e.unref(D)("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,ud),l[62]||(l[62]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),ke.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-button",onClick:cl,title:e.unref(D)("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,md)):(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-button",onClick:Gl,title:e.unref(D)("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,dd)),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":Gt("insertUnorderedList")}]),onClick:Ul,title:e.unref(D)("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,pd),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Gt("insertOrderedList")}]),onClick:kl,title:e.unref(D)("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,fd),l[64]||(l[64]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:"dss-toolbar-button",onClick:Qn,title:e.unref(D)("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,vd),it.value&&Y.value?(e.openBlock(),e.createElementBlock("div",gd)):e.createCommentVNode("",!0),it.value&&Y.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-toolbar-button",title:e.unref(D)("textEditor.toolbar.comment"),onClick:On},[...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,hd)):e.createCommentVNode("",!0),T.askAi?(e.openBlock(),e.createElementBlock("div",yd)):e.createCommentVNode("",!0),T.askAi?(e.openBlock(),e.createElementBlock("div",kd,[e.createElementVNode("div",{class:"dss-toolbar-ai-button dss-toolbar-dropdown-toggle",onClick:l[12]||(l[12]=s=>Fl("askAi")),title:e.unref(D)("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",bd,e.toDisplayString(e.unref(D)("textEditor.toolbar.askAi")),1)],8,Cd),we.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",wd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.customToolbarSlots,(s,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:i},[$n(s)?(e.openBlock(),e.createElementBlock("div",xd,[e.renderSlot(o.$slots,s)])):e.createCommentVNode("",!0),$n(s)&&i<T.customToolbarSlots.length-1&&Vl(i)?(e.openBlock(),e.createElementBlock("div",Ed)):e.createCommentVNode("",!0)],64))),128))])],32)):e.createCommentVNode("",!0),(we.value==="paragraph"||we.value==="askAi")&&T.richText?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-dropdown-overlay",onClick:un})):e.createCommentVNode("",!0),e.createVNode(na,{showModal:Te.value,width:"500px",height:"55vh",onCloseModal:to},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(D)("textEditor.link.editLink")),1)]),content:e.withCtx(()=>[e.createElementVNode("div",Sd,[e.createElementVNode("div",Vd,[e.createElementVNode("label",Nd,e.toDisplayString(e.unref(D)("textEditor.link.altText")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"linkAltInput",ref:Ue,type:"text","onUpdate:modelValue":l[15]||(l[15]=s=>pt.value=s),class:"dss-link-modal-input",placeholder:e.unref(D)("textEditor.link.enterAltText"),onKeyup:e.withKeys(no,["enter"])},null,40,Bd),[[e.vModelText,pt.value]])]),e.createElementVNode("div",Md,[e.createElementVNode("label",_d,e.toDisplayString(e.unref(D)("textEditor.link.url")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"linkUrlInput",ref:W,type:"text","onUpdate:modelValue":l[16]||(l[16]=s=>nt.value=s),class:"dss-link-modal-input",placeholder:e.unref(D)("textEditor.link.enterUrl"),onKeyup:e.withKeys(no,["enter"])},null,40,$d),[[e.vModelText,nt.value]])])])]),actions:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-cancel",onClick:to},e.toDisplayString(e.unref(D)("textEditor.link.cancel")),1),e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-save",onClick:no},e.toDisplayString(e.unref(D)("textEditor.link.save")),1)]),_:1},8,["showModal"]),e.createVNode(na,{showModal:yt.value,width:"500px",height:"80vh",onCloseModal:jl},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Ct.value?e.unref(D)("textEditor.image.editImage"):e.unref(D)("textEditor.image.addImage")),1)]),content:e.withCtx(()=>[e.createElementVNode("div",Ld,[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(D)("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(D)("textEditor.image.imageLink")),3)]),Be.value==="upload"?(e.openBlock(),e.createElementBlock("div",Ad,[e.createElementVNode("div",Td,[e.createElementVNode("div",Dd,[vl.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("label",Hd,e.toDisplayString(e.unref(D)("textEditor.image.uploadImage")),1)),vl.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-image-upload-preview",onClick:ko},[e.createElementVNode("img",{src:It.value,alt:"Preview",class:"dss-image-preview-image"},null,8,Rd),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:_e,type:"file",accept:"image/*",class:"dss-image-file-input-hidden",onChange:Jn},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:Jn},null,544))]),e.createElementVNode("div",Fd,[e.createElementVNode("label",Id,e.toDisplayString(e.unref(D)("textEditor.image.altText")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"imageAltInput",ref:De,type:"text","onUpdate:modelValue":l[19]||(l[19]=s=>Et.value=s),class:"dss-link-modal-input",placeholder:e.unref(D)("textEditor.image.enterAltText"),onKeyup:e.withKeys(ml,["enter"])},null,40,zd),[[e.vModelText,Et.value]])]),e.createElementVNode("div",Pd,[e.createElementVNode("label",Od,e.toDisplayString(e.unref(D)("textEditor.image.width")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":l[20]||(l[20]=s=>re.value=s),class:"dss-link-modal-input",placeholder:e.unref(D)("textEditor.image.auto"),onKeyup:e.withKeys(ml,["enter"]),onInput:oo},null,40,qd),[[e.vModelText,re.value]])]),e.createElementVNode("div",Wd,[e.createElementVNode("label",Zd,e.toDisplayString(e.unref(D)("textEditor.image.height")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":l[21]||(l[21]=s=>pe.value=s),class:"dss-link-modal-input",placeholder:e.unref(D)("textEditor.image.auto"),onKeyup:e.withKeys(ml,["enter"]),onInput:qn},null,40,Ud),[[e.vModelText,pe.value]])])])])):e.createCommentVNode("",!0),Be.value==="url"?(e.openBlock(),e.createElementBlock("div",Xd,[e.createElementVNode("div",Yd,[e.createElementVNode("div",jd,[e.createElementVNode("label",Kd,e.toDisplayString(e.unref(D)("textEditor.image.imageUrl")),1),e.withDirectives(e.createElementVNode("input",{ref_key:"imageUrlInput",ref:Jt,type:"text","onUpdate:modelValue":l[22]||(l[22]=s=>ze.value=s),class:"dss-link-modal-input",placeholder:e.unref(D)("textEditor.image.enterImageUrl"),onKeyup:e.withKeys(ml,["enter"])},null,40,Gd),[[e.vModelText,ze.value]])]),e.createElementVNode("div",Qd,[e.createElementVNode("label",Jd,e.toDisplayString(e.unref(D)("textEditor.image.altText")),1),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":l[23]||(l[23]=s=>Et.value=s),class:"dss-link-modal-input",placeholder:e.unref(D)("textEditor.image.enterAltText"),onKeyup:e.withKeys(ml,["enter"])},null,40,e1),[[e.vModelText,Et.value]])]),e.createElementVNode("div",t1,[e.createElementVNode("label",n1,e.toDisplayString(e.unref(D)("textEditor.image.width")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":l[24]||(l[24]=s=>re.value=s),class:"dss-link-modal-input",placeholder:e.unref(D)("textEditor.image.auto"),onKeyup:e.withKeys(ml,["enter"]),onInput:oo},null,40,l1),[[e.vModelText,re.value]])]),e.createElementVNode("div",o1,[e.createElementVNode("label",a1,e.toDisplayString(e.unref(D)("textEditor.image.height")),1),e.withDirectives(e.createElementVNode("input",{type:"number",min:"1","onUpdate:modelValue":l[25]||(l[25]=s=>pe.value=s),class:"dss-link-modal-input",placeholder:e.unref(D)("textEditor.image.auto"),onKeyup:e.withKeys(ml,["enter"]),onInput:qn},null,40,s1),[[e.vModelText,pe.value]])])])])):e.createCommentVNode("",!0)]),actions:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-cancel",onClick:jl},e.toDisplayString(e.unref(D)("textEditor.image.cancel")),1),e.createElementVNode("button",{type:"button",class:"dss-link-modal-button dss-link-modal-button-save",onClick:ml},e.toDisplayString(e.unref(D)("textEditor.image.save")),1)]),_:1},8,["showModal"]),T.showTitle?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["dss-text-editor-title-wrapper",{"dss-text-editor-no-border-bottom":Un.value&&sn.value}])},[e.createElementVNode("p",null,e.toDisplayString(e.unref(D)("textEditor.labels.title")),1),e.createElementVNode("div",r1,[sn.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",i1,[T.title?(e.openBlock(),e.createElementBlock("span",c1,e.toDisplayString(T.title),1)):(e.openBlock(),e.createElementBlock("span",u1,e.toDisplayString(il.value),1))])),e.createElementVNode("textarea",{ref_key:"titleInputRef",ref:ye,value:T.title,onInput:st,onFocus:Ae,onBlur:ft,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-title-input",{"dss-text-editor-title-input-blurred":!sn.value}]),placeholder:il.value,disabled:T.disabled,rows:"1"},null,42,d1)])],2)):e.createCommentVNode("",!0),T.showTitle&&Un.value&&sn.value?(e.openBlock(),e.createElementBlock("div",m1,[e.renderSlot(o.$slots,"title-slot")])):e.createCommentVNode("",!0),T.showDescription?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(["dss-text-editor-description-wrapper",{"dss-text-editor-no-border-bottom":Xn.value&&S.value}])},[e.createElementVNode("p",null,e.toDisplayString(e.unref(D)("textEditor.labels.description")),1),e.createElementVNode("div",p1,[S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",f1,[T.description?(e.openBlock(),e.createElementBlock("span",v1,e.toDisplayString(T.description),1)):(e.openBlock(),e.createElementBlock("span",g1,e.toDisplayString(_n.value),1))])),e.createElementVNode("textarea",{ref_key:"descriptionInputRef",ref:Ge,value:T.description,onInput:gn,onFocus:vn,onBlur:bn,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-description-input",{"dss-text-editor-description-input-blurred":!S.value}]),placeholder:_n.value,disabled:T.disabled,rows:"1"},null,42,h1)])],2)):e.createCommentVNode("",!0),T.showDescription&&Xn.value&&S.value?(e.openBlock(),e.createElementBlock("div",y1,[e.renderSlot(o.$slots,"description-slot")])):e.createCommentVNode("",!0),it.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:6},e.renderList(le.value,s=>(e.openBlock(),e.createElementBlock("div",{key:s.id,class:e.normalizeClass(["editor-comment-marker-group",{"editor-comment-marker-active":hn.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:i=>Lo(s),onMouseleave:Tl},[s.firstUser?(e.openBlock(),e.createElementBlock("div",{key:0,class:"editor-comment-marker editor-comment-marker-first",onClick:e.withModifiers(i=>ln(s),["stop"])},[s.firstUser.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.firstUser.avatar,alt:s.firstUser.name||"avatar"},null,8,b1)):(e.openBlock(),e.createElementBlock("span",w1,e.toDisplayString(s.firstUser.initials||(s.firstUser.name?s.firstUser.name.charAt(0):"")),1))],8,C1)):e.createCommentVNode("",!0),s.secondUser?(e.openBlock(),e.createElementBlock("div",{key:1,class:"editor-comment-marker editor-comment-marker-second",onClick:e.withModifiers(i=>ln(s),["stop"])},[s.secondUser.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.secondUser.avatar,alt:s.secondUser.name||"avatar"},null,8,E1)):(e.openBlock(),e.createElementBlock("span",S1,e.toDisplayString(s.secondUser.initials||(s.secondUser.name?s.secondUser.name.charAt(0):"")),1))],8,x1)):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(i=>ln(s),["stop"])},[e.createElementVNode("span",N1,"+"+e.toDisplayString(s.additionalCount),1)],12,V1)):e.createCommentVNode("",!0)],46,k1))),128)):e.createCommentVNode("",!0),T.richText?(e.openBlock(),e.createElementBlock("div",T1,[e.createElementVNode("div",{ref_key:"editorRef",ref:v,contenteditable:"true",spellcheck:"false",class:e.normalizeClass(["dss-text-editor-content",{"dss-text-editor-content-disabled":T.disabled,"dss-text-editor-fixed-height":T.fixedHeight}]),style:e.normalizeStyle(Vn.value),onInput:Bt,onBlur:gt,onClick:zt,onMouseup:Dt,onKeyup:Dt,onKeydown:Yo,onPaste:yo,onMousemove:$l,onMouseleave:No},null,38),e.createVNode(e.Transition,{name:"comment-overlay"},{default:e.withCtx(()=>[it.value&&hn.value!==null?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-comment-overlay",style:e.normalizeStyle(y.value)},[q.value||Qe.value.length>0?(e.openBlock(),e.createElementBlock("div",D1,[e.createElementVNode("div",H1,[q.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-comment-selection",innerHTML:q.value},null,8,R1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",F1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Qe.value,(s,i)=>(e.openBlock(),e.createElementBlock("div",{key:i,class:"dss-comment-message"},[s.user&&(s.user.avatar||s.user.initials||s.user.name)?(e.openBlock(),e.createElementBlock("div",I1,[e.createElementVNode("div",z1,[s.user.avatar?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.user.avatar,alt:s.user.name||"avatar"},null,8,P1)):(e.openBlock(),e.createElementBlock("span",O1,e.toDisplayString(s.user.initials||(s.user.name?s.user.name.charAt(0):"")),1))])])):e.createCommentVNode("",!0),e.createElementVNode("div",q1,[e.createElementVNode("div",W1,[e.createElementVNode("div",Z1,e.toDisplayString(s.user&&s.user.name||"Comment"),1),s.createdAt?(e.openBlock(),e.createElementBlock("div",U1,e.toDisplayString(L(new Date(s.createdAt))),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["dss-comment-body-text",{"comment-started":I(s.text)||s.class==="comment-started"}])},e.toDisplayString(s.text||""),3)]),M.commentUser&&s.user&&s.user.id===M.commentUser.id&&!I(s.text)?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"dss-comment-delete-button",onClick:e.withModifiers(c=>fo(s,i),["stop"]),title:e.unref(D)("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,X1)):e.createCommentVNode("",!0)]))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",Y1,[e.withDirectives(e.createElementVNode("textarea",{ref_key:"commentInputRef",ref:x,"onUpdate:modelValue":l[26]||(l[26]=s=>h.value=s),class:"dss-comment-input",rows:"1",placeholder:e.unref(D)("textEditor.comment.placeholder"),onKeydown:e.withKeys(e.withModifiers(Cl,["prevent","stop"]),["enter"]),onInput:l[27]||(l[27]=()=>{if(x.value){const s=x.value;s.style.height="auto",s.style.height=`${s.scrollHeight}px`}})},null,40,j1),[[e.vModelText,h.value]]),e.createElementVNode("button",{type:"button",class:"dss-comment-send-button",onClick:e.withModifiers(Cl,["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",K1,[e.createElementVNode("div",G1,[e.createElementVNode("span",Q1,e.toDisplayString(pn.value)+" "+e.toDisplayString(pn.value===1?e.unref(D)("textEditor.footer.word"):e.unref(D)("textEditor.footer.words")),1),l[70]||(l[70]=e.createElementVNode("span",{class:"dss-text-editor-footer-separator"},"•",-1)),e.createElementVNode("span",J1,e.toDisplayString(ll.value)+" "+e.toDisplayString(ll.value===1?e.unref(D)("textEditor.footer.character"):e.unref(D)("textEditor.footer.characters")),1)])])])):(e.openBlock(),e.createElementBlock("div",B1,[e.createElementVNode("textarea",{value:T.modelValue,onInput:B,spellcheck:"false",class:e.normalizeClass(["dss-text-editor-textarea",{"dss-text-editor-fixed-height":T.fixedHeight}]),placeholder:gl.value,rows:T.rows,disabled:T.disabled,style:e.normalizeStyle(rn.value)},null,46,M1),e.createElementVNode("div",_1,[e.createElementVNode("div",$1,[e.createElementVNode("span",L1,e.toDisplayString(pn.value)+" "+e.toDisplayString(pn.value===1?e.unref(D)("textEditor.footer.word"):e.unref(D)("textEditor.footer.words")),1),l[67]||(l[67]=e.createElementVNode("span",{class:"dss-text-editor-footer-separator"},"•",-1)),e.createElementVNode("span",A1,e.toDisplayString(ll.value)+" "+e.toDisplayString(ll.value===1?e.unref(D)("textEditor.footer.character"):e.unref(D)("textEditor.footer.characters")),1)])])])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[X.value&&me.value&&v.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-link-popup",style:e.normalizeStyle(F.value),onMouseenter:l[28]||(l[28]=s=>Ee.value=!0),onMouseleave:In},[e.createElementVNode("span",{class:"dss-link-popup-url",onClick:e.withModifiers(jo,["stop"]),title:me.value},e.toDisplayString(me.value),9,em),e.createElementVNode("button",{type:"button",class:"dss-link-popup-edit",onClick:e.withModifiers(Mo,["stop"]),title:e.unref(D)("textEditor.link.editLink")},[(e.openBlock(),e.createElementBlock("svg",nm,[...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,tm)],36)):e.createCommentVNode("",!0)])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[_t.value&&Ut.value&&v.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-link-popup",style:e.normalizeStyle(Q.value),onMouseenter:l[29]||(l[29]=s=>he.value=!0),onMouseleave:Yl},[e.createElementVNode("div",lm,[Ut.value===e.unref(D)("textEditor.image.noAlt")?(e.openBlock(),e.createElementBlock("div",om,[...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:Ut.value},e.toDisplayString(Ut.value),9,am)]),e.createElementVNode("button",{type:"button",class:"dss-link-popup-edit",onClick:e.withModifiers(ao,["stop"]),title:e.unref(D)("textEditor.image.editImage")},[(e.openBlock(),e.createElementBlock("svg",rm,[...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,sm)],36)):e.createCommentVNode("",!0)])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[T.floatingToolbar&&T.richText&&lt.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"floatingToolbarRef",ref:et,class:"dss-floating-toolbar",style:e.normalizeStyle(Ce.value),onMousedown:l[44]||(l[44]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",im,[e.createElementVNode("div",{class:"dss-toolbar-button",onClick:e.withModifiers(ae,["stop"]),title:e.unref(D)("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,cm),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-disabled":!Zn.value}]),onClick:e.withModifiers(on,["stop"]),title:e.unref(D)("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,um),l[89]||(l[89]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",dm,[e.createElementVNode("div",{class:"dss-toolbar-button dss-toolbar-dropdown-toggle",onClick:l[30]||(l[30]=e.withModifiers(s=>eo("paragraph"),["stop"])),title:e.unref(D)("textEditor.toolbar.paragraphFormat")},[V.value==="h1"?(e.openBlock(),e.createElementBlock("img",{key:0,src:z.h1,alt:"H1",class:"dss-toolbar-heading-icon"},null,8,pm)):V.value==="h2"?(e.openBlock(),e.createElementBlock("img",{key:1,src:z.h2,alt:"H2",class:"dss-toolbar-heading-icon"},null,8,fm)):V.value==="h3"?(e.openBlock(),e.createElementBlock("img",{key:2,src:z.h3,alt:"H3",class:"dss-toolbar-heading-icon"},null,8,vm)):V.value==="h4"?(e.openBlock(),e.createElementBlock("img",{key:3,src:z.h4,alt:"H4",class:"dss-toolbar-heading-icon"},null,8,gm)):V.value==="h5"?(e.openBlock(),e.createElementBlock("img",{key:4,src:z.h5,alt:"H5",class:"dss-toolbar-heading-icon"},null,8,hm)):V.value==="h6"?(e.openBlock(),e.createElementBlock("img",{key:5,src:z.h6,alt:"H6",class:"dss-toolbar-heading-icon"},null,8,ym)):(e.openBlock(),e.createElementBlock("svg",km,[...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,mm),dt.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=>dl("<h1>"))},[e.createElementVNode("h1",null,e.toDisplayString(e.unref(D)("textEditor.paragraph.heading1")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[32]||(l[32]=s=>dl("<h2>"))},[e.createElementVNode("h2",null,e.toDisplayString(e.unref(D)("textEditor.paragraph.heading2")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[33]||(l[33]=s=>dl("<h3>"))},[e.createElementVNode("h3",null,e.toDisplayString(e.unref(D)("textEditor.paragraph.heading3")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[34]||(l[34]=s=>dl("<h4>"))},[e.createElementVNode("h4",null,e.toDisplayString(e.unref(D)("textEditor.paragraph.heading4")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[35]||(l[35]=s=>dl("<h5>"))},[e.createElementVNode("h5",null,e.toDisplayString(e.unref(D)("textEditor.paragraph.heading5")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[36]||(l[36]=s=>dl("<h6>"))},[e.createElementVNode("h6",null,e.toDisplayString(e.unref(D)("textEditor.paragraph.heading6")),1)]),e.createElementVNode("div",{class:"dss-toolbar-dropdown-item",onClick:l[37]||(l[37]=s=>dl("<p>"))},[e.createElementVNode("p",null,e.toDisplayString(e.unref(D)("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":Gt("bold")}]),onClick:l[39]||(l[39]=e.withModifiers(s=>Nn("bold"),["stop"])),title:e.unref(D)("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,Cm),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Gt("italic")}]),onClick:l[40]||(l[40]=e.withModifiers(s=>Nn("italic"),["stop"])),title:e.unref(D)("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,bm),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Gt("underline")}]),onClick:l[41]||(l[41]=e.withModifiers(s=>Nn("underline"),["stop"])),title:e.unref(D)("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,wm),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":Xe.value}]),onClick:e.withModifiers(Yn,["stop"]),title:e.unref(D)("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,xm),l[92]||(l[92]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),ke.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-toolbar-button",onClick:e.withModifiers(cl,["stop"]),title:e.unref(D)("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,Sm)):(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-toolbar-button",onClick:e.withModifiers(Gl,["stop"]),title:e.unref(D)("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,Em)),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":Gt("insertUnorderedList")}]),onClick:e.withModifiers(Ul,["stop"]),title:e.unref(D)("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,Vm),e.createElementVNode("div",{class:e.normalizeClass(["dss-toolbar-button",{"dss-toolbar-button-active":Gt("insertOrderedList")}]),onClick:e.withModifiers(kl,["stop"]),title:e.unref(D)("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,Nm),l[94]||(l[94]=e.createElementVNode("div",{class:"dss-toolbar-separator"},null,-1)),e.createElementVNode("div",{class:"dss-toolbar-button",onClick:e.withModifiers(Qn,["stop"]),title:e.unref(D)("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,Bm),it.value?(e.openBlock(),e.createElementBlock("div",Mm)):e.createCommentVNode("",!0),it.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-toolbar-button",title:e.unref(D)("textEditor.toolbar.comment"),onClick:e.withModifiers(On,["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,_m)):e.createCommentVNode("",!0),T.askAi?(e.openBlock(),e.createElementBlock("div",$m)):e.createCommentVNode("",!0),T.askAi?(e.openBlock(),e.createElementBlock("div",Lm,[e.createElementVNode("div",{class:"dss-toolbar-ai-button dss-toolbar-ai-float dss-toolbar-dropdown-toggle",onClick:l[42]||(l[42]=e.withModifiers(s=>eo("askAi"),["stop"])),title:e.unref(D)("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",Tm,e.toDisplayString(e.unref(D)("textEditor.toolbar.askAi")),1)],8,Am),dt.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)]),Tn.value?(e.openBlock(),e.createElementBlock("div",Dm,[T.askAi&&Tn.value?(e.openBlock(),e.createElementBlock("div",Hm)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.customToolbarSlots,(s,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:i},[$n(s)&&hl(s)?(e.openBlock(),e.createElementBlock("div",Rm,[e.renderSlot(o.$slots,s)])):e.createCommentVNode("",!0),$n(s)&&hl(s)&&i<T.customToolbarSlots.length-1&&Rl(i)?(e.openBlock(),e.createElementBlock("div",Fm)):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0)],36)):e.createCommentVNode("",!0)]))],6))}}),Pm={class:"dss-color-picker__section-title"},Om={class:"dss-color-picker__presets-row"},qm=["title","onClick"],Wm={key:1,class:"dss-color-picker__section"},Zm={class:"dss-color-picker__presets-row"},Um=["title","onClick"],Xm={key:2,class:"dss-color-picker__section"},Ym={class:"dss-color-picker__section-header"},jm={class:"dss-color-picker__presets-row"},Km=["title","onClick"],Gm=["onClick"],Qm={key:1,class:"dss-color-picker__presets-row dss-color-picker__presets-row--standalone"},Jm=["title","onClick"],e2={class:"dss-color-picker__input-row"},t2=["value"],n2={__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(T,{emit:oe}){function _(ne){const Z=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(ne);if(!Z)return{h:0,s:0,l:50};const U=parseInt(Z[1],16)/255,ie=parseInt(Z[2],16)/255,ye=parseInt(Z[3],16)/255,Ge=Math.max(U,ie,ye),At=Math.min(U,ie,ye);let Yt=0,ot=0;const sn=(Ge+At)/2;if(Ge!==At){const S=Ge-At;switch(ot=sn>.5?S/(2-Ge-At):S/(Ge+At),Ge){case U:Yt=((ie-ye)/S+(ie<ye?6:0))/6;break;case ie:Yt=((ye-U)/S+2)/6;break;case ye:Yt=((U-ie)/S+4)/6;break}}return{h:Yt*360,s:ot*100,l:sn*100}}function D(ne,Z,U){Z/=100,U/=100;const ie=Z*Math.min(U,1-U),ye=Ge=>{const At=(Ge+ne/30)%12,Yt=U-ie*Math.max(Math.min(At-3,9-At,1),-1);return Math.round(255*Yt).toString(16).padStart(2,"0")};return`#${ye(0)}${ye(8)}${ye(4)}`}function ce(ne){const Z=ne.replace(/^#/,"").match(/^([a-f\d]{6}|[a-f\d]{3})$/i);if(!Z)return null;let U=Z[1];return U.length===3&&(U=U.split("").map(ie=>ie+ie).join("")),"#"+U}function z(ne){const Z=ne.match(/^rgba?\(\s*(\d{1,3})[\s,]+(\d{1,3})[\s,]+(\d{1,3})(?:[\s,\/]+[\d.]+)?\s*\)$/i);if(!Z)return null;const U=Math.max(0,Math.min(255,Number.parseInt(Z[1],10))),ie=Math.max(0,Math.min(255,Number.parseInt(Z[2],10))),ye=Math.max(0,Math.min(255,Number.parseInt(Z[3],10)));return`#${U.toString(16).padStart(2,"0")}${ie.toString(16).padStart(2,"0")}${ye.toString(16).padStart(2,"0")}`}function M(ne){if(typeof ne!="string")return null;const Z=ne.trim();return ce(Z)||z(Z)}function ve(ne,Z,U){Z/=100,U/=100;const ie=U+Z*Math.min(U,1-U),ye=ie===0?0:2-2*U/ie;return{h:ne,s:ye*100,v:ie*100}}function ut(ne,Z,U){Z/=100,U/=100;const ie=U*(1-Z/2),ye=ie===0||ie===1?0:(U-ie)/Math.min(ie,1-ie);return{h:ne,s:ye*100,l:ie*100}}const J=T,v=oe,we=e.ref(!1),ke=e.ref(!1),G=e.ref(!1),X=e.ref(-1),me=e.ref(-1),F=e.ref(null),Ee=e.ref(null),Te=e.ref(null),nt=e.ref(null),pt=e.ref({top:0,left:0}),W=e.ref(_(J.modelValue||"#b8a5de")),Ue=e.computed(()=>Array.isArray(J.presetGroups)&&J.presetGroups.length>0),We=e.computed(()=>!J.disableCustomColors),xe=e.computed(()=>Ue.value?0:J.initialPresetCount!=null?J.initialPresetCount:me.value<0?null:me.value),Me=e.computed(()=>{const ne=xe.value;return ne==null?!0:Math.max(0,J.presetColors.length-ne)<J.max}),Xe=e.computed(()=>!!(ke.value||X.value>=0||!te.value&&J.presetColors.length===0));e.computed(()=>{const ne=xe.value;return ne!=null&&J.presetColors.length>ne});const te=e.computed(()=>Ue.value||xe.value!=null),lt=e.computed(()=>{const ne=xe.value;return ne==null?[]:J.presetColors.slice(0,ne)}),Ce=e.computed(()=>{const ne=xe.value;return ne==null?[]:J.presetColors.slice(ne)});function et(ne){const Z=xe.value;return Z!=null?Z+ne:-1}function dt(ne){const Z=xe.value;return Z!=null&&ne>=Z}function yt(ne){dt(ne)&&(X.value=ne,W.value=_(J.presetColors[ne]),ke.value=!0,e.nextTick(()=>nt.value?.focus()))}function Et(ne){if(!dt(ne))return;const Z=J.presetColors.filter((ye,Ge)=>Ge!==ne);v("update:presetColors",Z);const U=ce(J.modelValue),ie=ce(J.presetColors[ne]);if(U&&ie&&U.toLowerCase()===ie.toLowerCase()){const ye=Z[Math.max(0,ne-1)]||Z[0];ye&&v("update:modelValue",ye)}}function Ht(){G.value=!G.value,G.value||(X.value=-1,ke.value=!1)}function It(){if(!We.value||X.value<0)return;const ne=_e.value,Z=ce(ne);if(Z){const U=[...J.presetColors];U[X.value]=Z,v("update:presetColors",U),v("update:modelValue",Z),X.value=-1,ke.value=!1}}function re(){J.disabled||!We.value||(X.value=-1,ke.value=!ke.value,ke.value&&(he(),e.nextTick(()=>nt.value?.focus())))}function pe(ne){const Z=M(ne),U=M(J.modelValue);return Z&&U&&Z.toLowerCase()===U.toLowerCase()}function De(){if(J.disabled||!We.value||!Me.value)return;const ne=_e.value,Z=ce(ne);if(Z){const U=[...J.presetColors,Z];v("update:presetColors",U),v("update:modelValue",Z);const ie=xe.value??me.value;ie>=0&&U.length-ie>=J.max&&(ke.value=!1)}}const _e=e.computed(()=>{const{h:ne,s:Z,l:U}=W.value;return D(ne,Z,U)}),Jt=e.computed(()=>_e.value.toLowerCase()),Ct=e.computed(()=>({background:`linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${W.value.h}, 100%, 50%))`})),tn=e.computed(()=>{const ne=ve(W.value.h,W.value.s,W.value.l);return{left:`${ne.s}%`,bottom:`${ne.v}%`,transform:"translate(-50%, 50%)"}}),_t=e.computed(()=>({left:`${W.value.h/360*100}%`,transform:"translateX(-50%)"})),Ut=e.computed(()=>({position:"fixed",left:`${pt.value.left}px`,top:`${pt.value.top}px`,zIndex:1002}));function Q(){if(!F.value||!we.value)return;const ne=F.value.getBoundingClientRect(),Z=window.innerHeight||document.documentElement.clientHeight;let U=ne.bottom+4;const ie=Ee.value;ie&&U+ie.offsetHeight>Z-8&&(U=ne.top-4-ie.offsetHeight),pt.value={top:U,left:ne.left}}function he(){const ne=J.modelValue||"#b8a5de",Z=M(ne);Z&&(W.value=_(Z))}function Be(){v("update:modelValue",_e.value)}function ze(){J.disabled||(we.value=!we.value,we.value&&(he(),e.nextTick(()=>{Q(),nt.value?.focus()})))}function Ke(){const ne=_e.value,Z=ce(ne);if(Z){if(X.value>=0){const U=[...J.presetColors];U[X.value]=Z,v("update:presetColors",U),v("update:modelValue",Z)}else if(We.value&&(J.presetColors.length>0||Ue.value)&&ke.value&&Me.value&&!J.presetColors.some(ie=>ce(ie)?.toLowerCase()===Z.toLowerCase())){const ie=[...J.presetColors,Z];v("update:presetColors",ie),v("update:modelValue",Z)}}we.value=!1,ke.value=!1,G.value=!1,X.value=-1}function Vt(ne){if(!Te.value)return;const Z=Te.value.getBoundingClientRect(),U=ie=>{const ye=Math.max(0,Math.min(1,(ie.clientX-Z.left)/Z.width)),Ge=Math.max(0,Math.min(1,1-(ie.clientY-Z.top)/Z.height)),At={h:W.value.h,s:ye*100,v:Ge*100};W.value=ut(At.h,At.s,At.v)};U(ne),document.addEventListener("mousemove",U),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",U),Be()},{once:!0})}function tt(ne){if(!ne.currentTarget)return;const U=ne.currentTarget.getBoundingClientRect(),ie=ye=>{const Ge=Math.max(0,Math.min(1,(ye.clientX-U.left)/U.width));W.value={...W.value,h:Ge*360}};ie(ne),document.addEventListener("mousemove",ie),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",ie),Be()},{once:!0})}function Xt(ne){const Z=ne.target.value,U=M(Z);U&&(W.value=_(U),v("update:modelValue",U))}function Ze(ne){if(J.disabled)return;const Z=M(ne);Z&&(W.value=_(Z),v("update:modelValue",Z))}let Pe=null,Lt=null;function $t(){Pe&&(document.removeEventListener("keydown",Pe),Pe=null),Lt&&(window.removeEventListener("resize",Lt),Lt=null)}return e.watch(we,ne=>{if($t(),ne){if(!Ue.value&&J.initialPresetCount==null){const Z=J.presetColors.length;Z>0&&(me.value<0||Z<me.value)&&(me.value=Z)}Pe=Z=>{Z.key==="Escape"&&Ke()},Lt=Q,document.addEventListener("keydown",Pe),window.addEventListener("resize",Lt)}}),e.watch(()=>J.modelValue,()=>{we.value&&he()},{immediate:!1}),e.watch(Ce,ne=>{ne.length===0&&(G.value=!1,X.value=-1,ke.value=!1)}),e.onBeforeUnmount($t),(ne,Z)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-color-picker",{"dss-color-picker--disabled":T.disabled}])},[e.createElementVNode("div",{ref_key:"triggerRef",ref:F,class:e.normalizeClass(["dss-color-picker__trigger",{"dss-color-picker__trigger--open":we.value}]),onClick:ze},[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(Ut.value)},[te.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[Ue.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(T.presetGroups,(U,ie)=>(e.openBlock(),e.createElementBlock("div",{key:"g-"+ie,class:"dss-color-picker__section"},[e.createElementVNode("span",Pm,e.toDisplayString(U.title),1),e.createElementVNode("div",Om,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.colors,(ye,Ge)=>(e.openBlock(),e.createElementBlock("button",{key:"g-"+ie+"-"+Ge,type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":pe(ye)}]),style:e.normalizeStyle({backgroundColor:ye,"--dss-preset-color":ye}),title:ye,onClick:e.withModifiers(At=>Ze(ye),["stop"])},null,14,qm))),128))])]))),128)):lt.value.length?(e.openBlock(),e.createElementBlock("div",Wm,[Z[1]||(Z[1]=e.createElementVNode("span",{class:"dss-color-picker__section-title"},"Preset colors",-1)),e.createElementVNode("div",Zm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(lt.value,(U,ie)=>(e.openBlock(),e.createElementBlock("button",{key:"p-"+ie,type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":pe(U)}]),style:e.normalizeStyle({backgroundColor:U,"--dss-preset-color":U}),title:U,onClick:e.withModifiers(ye=>Ze(U),["stop"])},null,14,Um))),128))])])):e.createCommentVNode("",!0),We.value?(e.openBlock(),e.createElementBlock("div",Xm,[e.createElementVNode("div",Ym,[Z[3]||(Z[3]=e.createElementVNode("span",{class:"dss-color-picker__section-title"},"Custom Colors",-1)),Ce.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",jm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ce.value,(U,ie)=>(e.openBlock(),e.createElementBlock("div",{key:"c-"+ie,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&&pe(U),"dss-color-picker__preset-bubble--editing":G.value&&X.value===et(ie)}]),style:e.normalizeStyle({backgroundColor:X.value===et(ie)?_e.value:U,"--dss-preset-color":X.value===et(ie)?_e.value:U}),title:X.value===et(ie)?_e.value:U,onClick:e.withModifiers(ye=>G.value?yt(et(ie)):Ze(U),["stop"])},null,14,Km),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=>Et(et(ie)),["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,Gm)):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":ke.value}]),onClick:e.withModifiers(re,["stop"])}," + ",2)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)],64)):T.presetColors.length?(e.openBlock(),e.createElementBlock("div",Qm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.presetColors,(U,ie)=>(e.openBlock(),e.createElementBlock("button",{key:ie,type:"button",class:e.normalizeClass(["dss-color-picker__preset-bubble",{"dss-color-picker__preset-bubble--selected":pe(U)}]),style:e.normalizeStyle({backgroundColor:U,"--dss-preset-color":U}),title:U,onClick:e.withModifiers(ye=>Ze(U),["stop"])},null,14,Jm))),128)),We.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":ke.value}]),onClick:e.withModifiers(re,["stop"])}," + ",2)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),Xe.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",{class:"dss-color-picker__sl-area",ref_key:"slAreaRef",ref:Te,onMousedown:Vt},[e.createElementVNode("div",{class:"dss-color-picker__sl-bg",style:e.normalizeStyle(Ct.value)},null,4),e.createElementVNode("div",{class:"dss-color-picker__sl-pointer",style:e.normalizeStyle(tn.value)},null,4)],544),e.createElementVNode("div",{class:"dss-color-picker__hue-wrap",onMousedown:tt},[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(_t.value)},null,4)],32),e.createElementVNode("div",e2,[e.createElementVNode("input",{ref_key:"hexInputRef",ref:nt,type:"text",class:"dss-color-picker__hex-input",value:Jt.value,onInput:Xt},null,40,t2)]),We.value&&te.value&&(T.presetColors.length||Ue.value)&&Me.value&&X.value<0?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"dss-color-picker__add-btn",onClick:De}," Save color ")):e.createCommentVNode("",!0),We.value&&te.value&&X.value>=0?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"dss-color-picker__add-btn",onClick:It}," Save color ")):e.createCommentVNode("",!0),te.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))}},l2={key:0,class:"dss-loader"},o2={key:0,class:"dss-loader-label"},a2={key:1,class:"dss-loader"},s2={key:0,class:"dss-loader-label"},r2={key:2,class:"dss-loader"},i2={key:0,class:"dss-loader-label"},c2={key:3,class:"dss-loader"},u2={key:0,class:"dss-loader-label"},d2={key:4,class:"dss-loader"},m2={key:0,class:"dss-loader-label"},p2={key:5,class:"dss-loader dss-loader--inline"},f2={class:"dss-loader-inline-text"},v2={__name:"DSSLoaders",props:{type:{type:String,default:"spinner"},label:{type:String,default:""},size:{type:[String,Number],default:"medium"},color:{type:String,default:""}},setup(T){const oe=T,_=e.computed(()=>oe.size==="small"?"dss-loaders--size-small":oe.size==="large"?"dss-loaders--size-large":oe.size==="medium"||oe.size==null?"dss-loaders--size-medium":null),D=e.computed(()=>{const ce={};if(!(oe.size==="small"||oe.size==="medium"||oe.size==="large"||oe.size==null)){const z=typeof oe.size=="number"?`${oe.size}px`:String(oe.size);ce["--dss-loader-size"]=z}return oe.color&&(ce["--dss-loader-accent"]=oe.color,ce["--dss-loader-accent-soft"]=`color-mix(in srgb, ${oe.color} 30%, white)`),ce});return(ce,z)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-loaders",_.value]),style:e.normalizeStyle(D.value)},[T.type==="spinner"?(e.openBlock(),e.createElementBlock("div",l2,[z[0]||(z[0]=e.createElementVNode("span",{class:"dss-loader-spinner","aria-hidden":"true"},null,-1)),T.label?(e.openBlock(),e.createElementBlock("span",o2,e.toDisplayString(T.label),1)):e.createCommentVNode("",!0)])):T.type==="dots"?(e.openBlock(),e.createElementBlock("div",a2,[z[1]||(z[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)),T.label?(e.openBlock(),e.createElementBlock("span",s2,e.toDisplayString(T.label),1)):e.createCommentVNode("",!0)])):T.type==="battery"?(e.openBlock(),e.createElementBlock("div",r2,[z[2]||(z[2]=e.createElementVNode("div",{class:"battery","aria-hidden":"true"},null,-1)),T.label?(e.openBlock(),e.createElementBlock("span",i2,e.toDisplayString(T.label),1)):e.createCommentVNode("",!0)])):T.type==="double-circle"?(e.openBlock(),e.createElementBlock("div",c2,[z[3]||(z[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)),T.label?(e.openBlock(),e.createElementBlock("span",u2,e.toDisplayString(T.label),1)):e.createCommentVNode("",!0)])):T.type==="bars"?(e.openBlock(),e.createElementBlock("div",d2,[z[4]||(z[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)),T.label?(e.openBlock(),e.createElementBlock("span",m2,e.toDisplayString(T.label),1)):e.createCommentVNode("",!0)])):T.type==="inline"?(e.openBlock(),e.createElementBlock("div",p2,[z[5]||(z[5]=e.createElementVNode("span",{class:"dss-loader-inline-spinner","aria-hidden":"true"},null,-1)),e.createElementVNode("span",f2,[e.renderSlot(ce.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(T.label),1)])])])):e.createCommentVNode("",!0)],6))}},da="dss-skeleton-item",g2={__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:T=>["single","multiple"].includes(T)},targetClass:{type:String,default:da},bgColor:{type:String,default:null},shimmerColor:{type:String,default:null},bgDark:{type:String,default:null},shimmerDark:{type:String,default:null}},setup(T){const oe=T,_=e.computed(()=>{const z={"dss-skeleton--loading":oe.loading,"dss-skeleton--static":!oe.shimmer,"dss-skeleton--multiple":oe.mode==="multiple","dss-skeleton--dark":oe.darkMode};return oe.mode==="multiple"&&oe.targetClass!==da&&(z[`dss-skeleton--target-${oe.targetClass}`]=!0),z}),D=e.computed(()=>{const z={};return oe.borderRadius&&(z.borderRadius=oe.borderRadius),z}),ce=e.computed(()=>{const z={};return oe.borderRadius&&(z["--dss-skeleton-border-radius"]=oe.borderRadius),oe.darkMode?(z["--dss-skeleton-bg"]=oe.bgDark||"#322c3f",z["--dss-skeleton-shimmer"]=oe.shimmerDark||"#3e3f41",z):(oe.bgColor&&(z["--dss-skeleton-bg"]=oe.bgColor),oe.shimmerColor&&(z["--dss-skeleton-shimmer"]=oe.shimmerColor),z)});return(z,M)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-skeleton",_.value]),style:e.normalizeStyle(ce.value)},[T.loading&&T.mode==="single"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-skeleton-overlay",style:e.normalizeStyle(D.value),"aria-hidden":"true"},null,4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["dss-skeleton-content",{"dss-skeleton-content--hidden":T.loading&&T.mode==="single"}])},[e.renderSlot(z.$slots,"default")],2)],6))}},h2={key:0,class:"dss-dnd-column-header"},y2={class:"dss-dnd-column-title"},k2={class:"dss-dnd-column-count"},C2=["data-column"],b2={key:0,class:"dss-dnd-indicator"},w2=["onPointerdown"],x2=["onPointerdown"],E2={class:"dss-dnd-item-content"},S2={class:"dss-dnd-item-default"},V2={key:0,class:"dss-dnd-empty"},N2={name:"DSSDnd"},B2=Object.assign(N2,{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(T,{emit:oe}){const _=T,D=oe,ce=e.useSlots(),z=e.computed(()=>!!ce["delete-zone"]),M={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})),ut=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 J(Q){if(!ve.value.ColColor||!Q)return{};const he=Q.background||Q.color;return he?{background:he}:{}}const v=e.ref(null),we=e.ref(null),ke=e.ref(!1),G=e.ref(-1),X=e.ref(null);let me=null,F=null,Ee=null,Te=null,nt=0,pt=0,W="",Ue=null;const We=5,xe=e.computed(()=>{const Q={};for(const he of _.columns)Q[he.value]=_.items.filter(Be=>Be[_.columnKey]===he.value).sort((Be,ze)=>(Be[_.positionKey]??0)-(ze[_.positionKey]??0));return Q}),Me=e.computed(()=>{const Q={},he=!!v.value,Be=v.value?.[_.itemKey],ze=we.value,Ke=G.value;for(const Vt of _.columns){const tt=xe.value[Vt.value]||[],Xt=[],Ze=ze==Vt.value;let Pe=0;for(let Lt=0;Lt<tt.length;Lt++){const $t=tt[Lt],ne=he&&$t[_.itemKey]===Be;!ne&&Ze&&Ke===Pe&&Xt.push({type:"indicator",key:`ind-${Pe}`}),ne||Pe++,Xt.push({type:"item",item:$t,isDragged:ne,key:`item-${$t[_.itemKey]}`})}Ze&&Ke>=Pe&&Xt.push({type:"indicator",key:"ind-end"}),Q[Vt.value]=Xt}return Q});function Xe(Q,he){const ze=(xe.value[Q]||[]).filter(tt=>tt[_.itemKey]!==v.value?.[_.itemKey]);if(ze.length===0)return 1;if(he<=0){const tt=ze[0][_.positionKey];return tt!=null&&tt>0?tt/2:.5}if(he>=ze.length){const tt=ze[ze.length-1][_.positionKey];return(tt??0)+1}const Ke=ze[he-1][_.positionKey]??0,Vt=ze[he][_.positionKey]??0;return(Ke+Vt)/2}function te(Q,he,Be){Ee&&Ee.remove();const ze=Q.getBoundingClientRect(),Ke=Q.cloneNode(!0);Ke.classList.add("dss-dnd-ghost"),Ke.style.cssText=`
104
104
  position: fixed;
105
- left: ${ye-lt}px;
106
- top: ${Be-mt}px;
107
- width: ${Ue.width}px;
108
- height: ${Ue.height}px;
105
+ left: ${he-nt}px;
106
+ top: ${Be-pt}px;
107
+ width: ${ze.width}px;
108
+ height: ${ze.height}px;
109
109
  z-index: 9999;
110
110
  pointer-events: none;
111
- opacity: ${ge.value.dragGhostOpacity};
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: ${ge.value.dragSourceBackground};
114
+ background-color: ${ve.value.dragSourceBackground};
115
115
  font-family: 'Work Sans', sans-serif;
116
116
  cursor: grabbing;
117
- `,document.body.appendChild(Je),Ee=Je}function ot(G,ye){Ee&&(Ee.style.left=`${G-lt}px`,Ee.style.top=`${ye-mt}px`)}function Ce(G){G.classList.add("dss-dnd-item--dragging"),G.style.background=ge.value.dragSourceBackground,G.style.borderColor=ge.value.dragSourceBorder,G.style.transform="scale(0.97)"}function tt(G){G.classList.remove("dss-dnd-item--dragging"),G.style.background="",G.style.borderColor="",G.style.transform=""}function dt(G,ye){return document.elementFromPoint(G,ye)?.closest(".dss-dnd-column-body")??null}function ht(G,ye){return!!document.elementFromPoint(G,ye)?.closest("[data-dss-dnd-delete-zone]")}function xt(G,ye){if(I.value&&ht(G,ye)){ke.value=!0,we.value=null,Q.value=-1;return}ke.value=!1;const Be=dt(G,ye),Ue=Be?.getAttribute("data-column")??null;if(!Ue){we.value=null,Q.value=-1;return}we.value=Ue;const Je=Be.querySelectorAll(".dss-dnd-item:not(.dss-dnd-item--dragging)");let At=Je.length;for(let nt=0;nt<Je.length;nt++){const Ot=Je[nt].getBoundingClientRect();if(ye<Ot.top+Ot.height/2){At=nt;break}}Q.value=At}function Ht(G){G.preventDefault(),ot(G.clientX,G.clientY),!me&&(me=requestAnimationFrame(()=>{me=null,xt(G.clientX,G.clientY)}))}function It(G){window.removeEventListener("pointermove",Ht),window.removeEventListener("pointerup",It),window.removeEventListener("pointercancel",It),Te?.releasePointerCapture?.(G.pointerId),tt(Te),Te=null;const ye=I.value&&ht(G.clientX,G.clientY);if(v.value&&ye)T("delete",{item:v.value});else{const Ue=dt(G.clientX,G.clientY)?.getAttribute("data-column")??null;if(v.value&&Ue){const Je=v.value[M.columnKey],At=Ue,Ot=(xe.value[At]||[]).filter(yt=>yt[M.itemKey]!==v.value[M.itemKey]),We=Math.max(0,Math.min(Q.value,Ot.length)),Re=Xe(At,We),Ct=v.value[M.itemKey];T("move",{item:v.value,from:Je,to:At,position:Re,index:We}),F&&clearTimeout(F),U.value={id:Ct,from:Je,to:At},F=setTimeout(()=>{U.value=null},3500)}}Ee&&(Ee.remove(),Ee=null),W!==null&&(document.body.style.cursor=W,W=""),Ut()}function se(G,ye){G.preventDefault();const Be=G.target.closest(".dss-dnd-item");if(!Be)return;const Ue=Be.getBoundingClientRect();lt=G.clientX-Ue.left,mt=G.clientY-Ue.top,W=document.body.style.cursor,document.body.style.cursor="grabbing",v.value=ye,Te=Be,te(Be,G.clientX,G.clientY),requestAnimationFrame(()=>Ce(Be)),Be.setPointerCapture?.(G.pointerId),window.addEventListener("pointermove",Ht),window.addEventListener("pointerup",It,{once:!0}),window.addEventListener("pointercancel",It,{once:!0})}function pe(){Ze&&(window.removeEventListener("pointermove",De),window.removeEventListener("pointerup",_e),window.removeEventListener("pointercancel",_e),Ze=null)}function De(G){if(!Ze||G.pointerId!==Ze.pointerId)return;const ye=G.clientX-Ze.startX,Be=G.clientY-Ze.startY;if(Math.abs(ye)>=qe||Math.abs(Be)>=qe){const Ue=Ze.item;pe(),se(G,Ue)}}function _e(G){!Ze||G.pointerId!==Ze.pointerId||pe()}function Kt(G,ye){pe(),Ze={item:ye,startX:G.clientX,startY:G.clientY,pointerId:G.pointerId},window.addEventListener("pointermove",De),window.addEventListener("pointerup",_e),window.addEventListener("pointercancel",_e)}function kt(G,ye){ge.value.useHandle||Kt(G,ye)}function Qt(G,ye){Kt(G,ye)}function Lt(){me&&(cancelAnimationFrame(me),me=null)}function Ut(){Lt(),v.value=null,we.value=null,ke.value=!1,Q.value=-1}return e.onBeforeUnmount(()=>{Lt(),pe(),F&&clearTimeout(F),Ee&&(Ee.remove(),Ee=null)}),(G,ye)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-dnd",{"dss-dnd--unstyled":ge.value.unstyled}]),style:e.normalizeStyle(ut.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":ke.value}]),"data-dss-dnd-delete-zone":""},[e.renderSlot(G.$slots,"delete-zone",{isDragging:!!v.value,isOver:ke.value})],2),[[e.vShow,!!v.value||ge.value.deleteZoneAlwaysVisible]])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.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(J(Be))},[ge.value.showHeader?(e.openBlock(),e.createElementBlock("div",h2,[e.renderSlot(G.$slots,"column-header",{column:Be,items:xe.value[Be.value]||[]},()=>[e.createElementVNode("span",y2,e.toDisplayString(Be.title||Be.value),1),e.createElementVNode("span",k2,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",b2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-dnd-item",{"dss-dnd-item--dragging":Ue.isDragged,"dss-dnd-item--no-handle":!ge.value.useHandle}]),onPointerdown:Je=>kt(Je,Ue.item)},[ge.value.useHandle?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-dnd-handle",onPointerdown:e.withModifiers(Je=>Qt(Je,Ue.item),["stop"])},[e.renderSlot(G.$slots,"handle",{},()=>[ye[0]||(ye[0]=e.createElementVNode("span",{class:"dss-dnd-handle-icon"},"⠿",-1))])],40,x2)):e.createCommentVNode("",!0),e.createElementVNode("div",E2,[e.renderSlot(G.$slots,"item",{item:Ue.item,column:Be,justDropped:U.value?.id===Ue.item[A.itemKey],droppedFrom:U.value?.id===Ue.item[A.itemKey]?U.value.from:null,droppedTo:U.value?.id===Ue.item[A.itemKey]?U.value.to:null},()=>[e.createElementVNode("div",S2,e.toDisplayString(Ue.item[A.itemKey]),1)])])],42,w2))],64))),128)),(xe.value[Be.value]||[]).length===0&&we.value!=Be.value?(e.openBlock(),e.createElementBlock("div",V2,[e.renderSlot(G.$slots,"empty",{column:Be},()=>[ye[1]||(ye[1]=e.createElementVNode("span",{class:"dss-dnd-empty-text"},"No items",-1))])])):e.createCommentVNode("",!0)],8,C2)],6))),128))],6))}}),M2={name:"DSSConfetti"},_2=Object.assign(M2,{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(A){const le=A,M=e.ref(null),T=e.ref(!1);let ce=[],I=null,B=null;function ge(Q,U){const me=[];for(let F=0;F<le.count;F++)me.push(ut(Q));return me}function ut(Q,U){return{x:Math.random()*Q,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 J(Q,U,me,F){Q.clearRect(0,0,U,me);for(const Ee of ce)Q.save(),Q.globalAlpha=Ee.opacity*F,Q.beginPath(),Q.lineWidth=Ee.r,Q.strokeStyle=Ee.color,Q.moveTo(Ee.x+Ee.tilt+Ee.r/2,Ee.y),Q.lineTo(Ee.x+Ee.tilt,Ee.y+Ee.tilt+Ee.r/2),Q.stroke(),Q.restore()}function v(Q,U,me){const F=.3+me*.7;for(let Ee=0;Ee<ce.length;Ee++){const Te=ce[Ee];Te.tiltAngle+=Te.tiltInc,Te.y+=Te.speed*F,Te.x+=Math.sin(Te.d)*.5*F,Te.tilt=Math.sin(Te.tiltAngle)*15,me>=.99&&Te.y>U+20&&(ce[Ee]=ut(Q))}}function we(){T.value=!0,e.nextTick(()=>{const Q=M.value;if(!Q)return;const U=Q.getContext("2d"),me=Q.parentElement;if(!me)return;const F=me.getBoundingClientRect();Q.width=F.width,Q.height=F.height,ce=ge(Q.width,Q.height);const Ee=Date.now(),Te=Ee+le.duration,lt=()=>{const mt=Date.now(),W=mt-Ee;if(mt<Te){let Ze=1;W>le.fadeStart&&(Ze=1-(W-le.fadeStart)/(le.duration-le.fadeStart)),J(U,Q.width,Q.height,Ze),v(Q.width,Q.height,Ze),I=requestAnimationFrame(lt)}else ke()};lt()})}function ke(){I&&(cancelAnimationFrame(I),I=null),ce=[],T.value=!1}return e.watch(()=>le.trigger,Q=>{Q&&(B&&clearTimeout(B),B=setTimeout(we,le.delay))},{immediate:!0}),e.onBeforeUnmount(()=>{ke(),B&&clearTimeout(B)}),(Q,U)=>T.value?(e.openBlock(),e.createElementBlock("canvas",{key:0,ref_key:"canvasRef",ref:M,class:"dss-confetti-canvas"},null,512)):e.createCommentVNode("",!0)}}),$2={class:"dss-filter-global-inner"},L2=["placeholder","value"],A2=["title"],T2={key:0,class:"dss-filter-funnel-badge"},D2={key:1,class:"dss-filter-sortby"},H2=["value"],R2=["value"],F2=["disabled","title"],I2={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"},z2={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"},P2={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"},O2={class:"dss-filter-panel"},q2={key:0,class:"dss-filter-empty"},W2={class:"dss-filter-row-prefix"},Z2={class:"dss-filter-cell"},U2=["onClick"],X2={class:"dss-filter-trigger-text"},Y2=["placeholder"],j2={class:"dss-filter-popup-list"},K2=["onClick"],G2={key:0,class:"dss-filter-popup-empty"},Q2={key:0,class:"dss-filter-cell"},J2=["onClick"],e0={class:"dss-filter-trigger-text"},t0={class:"dss-filter-popup-list"},n0=["onClick"],l0={key:1,class:"dss-filter-cell dss-filter-cell--value"},o0=["placeholder","onUpdate:modelValue"],a0={key:1,class:"dss-filter-date-wrap"},s0=["placeholder","onUpdate:modelValue"],r0=["placeholder","value","onInput","step"],i0={key:4,class:"dss-filter-between"},c0=["placeholder","value","onInput","step"],u0={class:"dss-filter-between-sep"},d0=["placeholder","value","onInput","step"],m0={key:5,class:"dss-filter-multiselect"},p0=["onClick"],f0={class:"dss-filter-trigger-text"},v0=["placeholder"],g0={class:"dss-filter-popup-list dss-filter-popup-list--check"},h0=["onClick"],y0=["checked"],k0={key:0,class:"dss-filter-popup-empty"},C0=["onClick"],b0={class:"dss-filter-foot"},w0={class:"dss-filter-cell"},x0=["placeholder"],E0={class:"dss-filter-popup-list"},S0=["onClick"],V0={key:0,class:"dss-filter-popup-divider"},N0=["onClick"],B0=["placeholder"],M0={class:"dss-filter-popup-list"},_0=["onClick"],$0={key:0,class:"dss-filter-popup-empty"},L0=["placeholder"],A0={class:"dss-filter-popup-list"},T0=["onClick"],D0={key:0,class:"dss-filter-popup-empty"},H0={name:"DSSFilter"},R0=Object.assign(H0,{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(A,{expose:le,emit:M}){const{t:T}=co.useI18n(),ce=A,I=M,B={unstyled:!1,maxUniqueForSelect:30,maxUniqueForEnum:15},ge=e.computed(()=>({...B,...ce.options})),ut={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"}]},J=new Set(["is_empty","is_not_empty","is_true","is_false"]),v=["label","name","title","keyword","full_name","value","text"],we=e.ref(""),ke=e.ref([]),Q=e.ref(null),U=e.ref(!1),me=e.ref(null),F=e.ref(""),Ee=e.ref(null),Te=e.ref(""),lt=e.ref("asc");let mt=1;function W(S){const b=S.find(V=>V&&typeof V=="object");if(!b)return null;for(const V of v)if(V in b&&typeof b[V]=="string")return V;return Object.keys(b).find(V=>typeof b[V]=="string")||null}function Ze(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(Ie=>Ie).filter(Ie=>Ie!=null);return Y.length===0?null:typeof Y.find(Ie=>Ie!=null)=="object"?"arraySelect":"arrayText"}return V.every(Y=>typeof Y=="boolean")?"boolean":V.every(Y=>typeof Y=="number")?new Set(V).size<=ge.value.maxUniqueForEnum?"select":"range":V.every(Y=>typeof Y=="string")?new Set(V).size<=ge.value.maxUniqueForSelect?"select":"text":V.some(Y=>typeof Y=="object"&&!Array.isArray(Y))?null:"text"}const qe=e.computed(()=>{if(!ce.data?.length)return[];const S=new Set;for(const ne of ce.data)if(ne&&typeof ne=="object")for(const Ie of Object.keys(ne))S.add(Ie);const b=new Set(ce.exclude),V=[];for(const ne of S){if(b.has(ne))continue;const Ie=ce.config[ne]||{},bt=ce.data.map(pt=>pt?.[ne]),st=Ie.type||Ze(ne,bt);if(!st)continue;const Oe=Ie.filterMode||"contain",Nt=Oe==="date"?"date":Oe==="string"?"text":st,St={key:ne,label:Ie.label||Et(ne),type:Nt,filterMode:Oe};if(st==="select"){const pt=bt.filter(at=>at!=null&&at!=="NULL");St.uniqueValues=[...new Set(pt)].sort((at,Bt)=>typeof at=="number"&&typeof Bt=="number"?at-Bt:String(at).localeCompare(String(Bt)))}else if(st==="range"||st==="int"){const pt=bt.filter(at=>typeof at=="number");St.min=Math.min(...pt),St.max=Math.max(...pt)}else if(st==="arraySelect"){const pt=Ie.displayKey||W(bt.flatMap(at=>Array.isArray(at)?at:[]));if(St.displayKey=pt,Array.isArray(Ie.uniqueValues)&&Ie.uniqueValues.length>0)St.uniqueValues=Ie.uniqueValues.map(at=>String(at));else{const at=bt.flatMap(Bt=>Array.isArray(Bt)?Bt:[]).filter(Bt=>Bt!=null).map(Bt=>pt&&typeof Bt=="object"?Bt[pt]:String(Bt)).filter(Bt=>Bt!=null&&Bt!=="");St.uniqueValues=[...new Set(at)].sort((Bt,Mt)=>String(Bt).localeCompare(String(Mt)))}}V.push(St)}const Y=ce.config._order;return Y&&V.sort((ne,Ie)=>{const bt=Y.indexOf(ne.key),st=Y.indexOf(Ie.key);return bt===-1&&st===-1?0:bt===-1?1:st===-1?-1:bt-st}),V}),xe=e.computed(()=>{const S={};for(const b of qe.value)S[b.key]=b;return S}),Me=e.computed(()=>Array.isArray(ce.config.groups)&&ce.config.groups.length>0),Xe=e.computed(()=>{if(!Me.value)return[];const S=new Set(qe.value.map(b=>b.key));return ce.config.groups.map(b=>({...b,keys:b.keys.filter(V=>S.has(V))})).filter(b=>b.keys.length>0)}),te=e.computed(()=>{if(!Me.value)return[];const S=new Set(ce.config.groups.flatMap(b=>b.keys));return qe.value.filter(b=>!S.has(b.key))}),ot=e.computed(()=>{if(!Ee.value)return[];const S=new Set(Ee.value.keys),b=qe.value.filter(Y=>S.has(Y.key));if(!F.value)return b;const V=F.value.toLowerCase();return b.filter(Y=>Y.label.toLowerCase().includes(V))}),Ce=e.computed(()=>{if(!F.value)return qe.value;const S=F.value.toLowerCase();return qe.value.filter(b=>b.label.toLowerCase().includes(S))}),tt=e.computed(()=>qe.value.filter(S=>!["arraySelect","arrayText"].includes(S.type))),dt=e.computed(()=>Te.value?lt.value==="asc"?"Ascending":"Descending":"No sort selected");function ht(S){Q.value===S?xt():(Q.value=S,F.value="",Ee.value=null)}function xt(){Q.value=null,F.value="",Ee.value=null}function Ht(S){const b=S.target.closest(".dss-datepicker__overlay, .dss-datepicker__dropdown");Q.value&&!b&&!S.target.closest(".dss-filter-popup")&&!S.target.closest(".dss-filter-trigger")&&!S.target.closest(".dss-filter-add-btn")&&xt(),U.value&&me.value&&!me.value.contains(S.target)&&(b||(U.value=!1))}e.onMounted(()=>document.addEventListener("click",Ht)),e.onBeforeUnmount(()=>document.removeEventListener("click",Ht));function It(S){return xe.value[S]?.label||Et(S)}function se(S){return xe.value[S.key]?.filterMode||"contain"}function pe(S){return T(`filter.operators.${S}`)}function De(S){const b=xe.value[S.key];return(ut[b?.type]||ut.text).map(V=>({...V,label:T(`filter.operators.${V.value}`)}))}function _e(S){return J.has(S)}function Kt(S){const b=xe.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 kt(S){return ut[S]?.[0]?.value||"contains"}function Qt(S,b){return J.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 Lt(S){return xe.value[S.key]?.uniqueValues||[]}function Ut(S){const b=Lt(S);if(!F.value)return b;const V=F.value.toLowerCase();return b.filter(Y=>String(Y).toLowerCase().includes(V))}function G(S){const b=S.value;return!b||b.length===0?T("filter.select"):b.length<=2?b.join(", "):T("filter.selectedCount",{count:b.length})}function ye(S){const b=xe.value[S],V=b?.filterMode||"contain",Y=b?.type||"text",ne=V==="string"?"contains":kt(Y);ke.value.push(e.reactive({id:mt++,key:S,operator:ne,value:Qt(Y,ne)})),xt()}function Be(S){ke.value=ke.value.filter(b=>b.id!==S)}function Ue(S,b){const Y=xe.value[b]?.type||"text";S.key=b,S.operator=kt(Y),S.value=Qt(Y,S.operator),xt()}function Je(S,b){const V=Kt(S);S.operator=b;const Y=Kt(S);if(V!==Y||J.has(b)){const ne=xe.value[S.key];S.value=Qt(ne?.type||"text",b)}xt()}function At(S,b){const V=b.target.value;S.value=V===""?null:Number(V)}function nt(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 Ot(S,b){const V=S.value||[],Y=V.indexOf(b);S.value=Y>=0?V.filter(ne=>ne!==b):[...V,b]}function We(){ke.value=[],we.value="",xt()}function Re(S){we.value=S.target.value}function Ct(S){Te.value=S.target.value}function yt(){lt.value=lt.value==="asc"?"desc":"asc"}const ee=e.computed(()=>{if(!ce.data)return[];let S=ce.data;if(we.value){const b=we.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(Ie=>Ie!=null&&(typeof Ie=="string"?Ie.toLowerCase().includes(b):typeof Ie=="object"?Object.values(Ie).some(bt=>typeof bt=="string"&&bt.toLowerCase().includes(b)):!1)))return!0}return!1})}for(const b of ke.value){if(!re(b))continue;const V=xe.value[b.key];V&&(S=S.filter(Y=>fe(Y,b,V)))}if(ce.showSortBy&&Te.value){const b=Te.value,V=lt.value==="asc"?1:-1;S=[...S].sort((Y,ne)=>Z(Y?.[b],ne?.[b])*V)}return S});function Z(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 re(S){return J.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,b,V){const Y=S?.[b.key],ne=b.value,Ie=b.operator;if(Ie==="is_empty")return un(Y);if(Ie==="is_not_empty")return!un(Y);const bt=V.type;if(bt==="text"||bt==="arrayText"){const st=bt==="arrayText"&&Array.isArray(Y)?Y.filter(St=>St!=null).map(String).join(" "):Y!=null?String(Y):"",Oe=String(ne).toLowerCase(),Nt=st.toLowerCase();switch(Ie){case"contains":return Nt.includes(Oe);case"not_contains":return!Nt.includes(Oe);case"equals":return Nt===Oe;case"not_equals":return Nt!==Oe;case"starts_with":return Nt.startsWith(Oe);case"ends_with":return Nt.endsWith(Oe);default:return!0}}if(bt==="select")switch(Ie){case"is_any_of":return ne.includes(Y);case"is_none_of":return!ne.includes(Y);default:return!0}if(bt==="range"||bt==="int"){const st=typeof Y=="number"?Y:Number(Y);if(typeof st!="number"||isNaN(st))return!1;if(Ie==="between"){const Nt=ne?.min!=null?Number(ne.min):null,St=ne?.max!=null?Number(ne.max):null,pt=Nt!=null&&!isNaN(Nt)?Nt:null,at=St!=null&&!isNaN(St)?St:null;return(pt==null||st>=pt)&&(at==null||st<=at)}const Oe=typeof ne=="number"&&!isNaN(ne)?ne:Number(ne);if(Ie==="contains"||Ie==="not_contains"){const Nt=String(st),St=String(ne??"").toLowerCase(),pt=Nt.toLowerCase().includes(St);return Ie==="contains"?pt:!pt}if(typeof Oe!="number"||isNaN(Oe))return!1;switch(Ie){case"eq":return st===Oe;case"neq":return st!==Oe;case"gt":return st>Oe;case"gte":return st>=Oe;case"lt":return st<Oe;case"lte":return st<=Oe;default:return!0}}if(bt==="arraySelect"){if(!Array.isArray(Y))return!1;const st=Y.filter(Oe=>Oe!=null).map(Oe=>V.displayKey&&typeof Oe=="object"?Oe[V.displayKey]:String(Oe));switch(Ie){case"contains_any":return st.some(Oe=>ne.includes(Oe));case"contains_all":return ne.every(Oe=>st.includes(Oe));case"not_contains_any":return!st.some(Oe=>ne.includes(Oe));default:return!0}}if(bt==="date"){const st=et(ne);if(!st||isNaN(st.getTime()))return!1;const Oe=et(Y);if(!Oe||isNaN(Oe.getTime()))return!1;const Nt=Vt(Oe),St=Vt(st);switch(Ie){case"eq":return Nt===St;case"before":return Nt<St;case"after":return Nt>St;default:return!0}}if(bt==="boolean"){const st=Y===!0||Y==="true"||Y===1,Oe=Y===!1||Y==="false"||Y===0;switch(Ie){case"is_true":return st;case"is_false":return Oe;default:return!0}}return!0}function et(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 Vt(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 un(S){return!!(S==null||S===""||S==="NULL"||Array.isArray(S)&&S.length===0||Array.isArray(S)&&S.every(b=>b==null))}e.watch(ee,S=>I("update:modelValue",S),{immediate:!0}),e.watch(()=>ce.data,()=>{ke.value=[],we.value="",U.value=!1,Te.value="",lt.value="asc",xt()});function Et(S){return S.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,b=>b.toUpperCase())}function on(){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:we.value,rows:ke.value.map(b=>({key:b.key,operator:b.operator,value:S(b.value),defType:xe.value[b.key]?.type,defFilterMode:xe.value[b.key]?.filterMode})),filteredCount:ee.value?.length??0}}return le({getDebugState:on}),(S,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-filter",{"dss-filter--unstyled":ge.value.unstyled}])},[e.createElementVNode("div",{class:"dss-filter-global",ref_key:"globalRef",ref:me},[e.createElementVNode("div",$2,[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(T)("filter.searchAcrossFields"),value:we.value,onInput:Re},null,40,L2),we.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-filter-global-clear",onClick:b[0]||(b[0]=V=>we.value="")},"×")):e.createCommentVNode("",!0),e.createElementVNode("button",{class:e.normalizeClass(["dss-filter-funnel-btn",{active:U.value||ke.value.length>0,"dss-filter-funnel-btn--with-sort":ce.showSortBy}]),onClick:b[1]||(b[1]=V=>U.value=!U.value),type:"button",title:U.value?e.unref(T)("filter.closeAdvancedFilter"):e.unref(T)("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)),ke.value.length>0?(e.openBlock(),e.createElementBlock("span",T2,e.toDisplayString(ke.value.length),1)):e.createCommentVNode("",!0)],10,A2),ce.showSortBy?(e.openBlock(),e.createElementBlock("div",D2,[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:Te.value,onChange:Ct},[b[15]||(b[15]=e.createElementVNode("option",{value:""},"None",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(tt.value,V=>(e.openBlock(),e.createElementBlock("option",{key:V.key,value:V.key},e.toDisplayString(V.label),9,R2))),128))],40,H2),e.createElementVNode("button",{class:"dss-filter-sortby-order",type:"button",onClick:yt,disabled:!Te.value,title:dt.value},[Te.value?lt.value==="asc"?(e.openBlock(),e.createElementBlock("svg",z2,[...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",P2,[...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",I2,[...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,F2)])):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",O2,[ke.value.length===0?(e.openBlock(),e.createElementBlock("div",q2,e.toDisplayString(e.unref(T)("filter.noConditionsApplied")),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,(V,Y)=>(e.openBlock(),e.createElementBlock("div",{key:V.id,class:"dss-filter-row"},[e.createElementVNode("span",W2,e.toDisplayString(Y===0?e.unref(T)("filter.where"):e.unref(T)("filter.and")),1),e.createElementVNode("div",Z2,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(ne=>ht(`${V.id}:field`),["stop"])},[e.createElementVNode("span",X2,e.toDisplayString(It(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,U2),Q.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=>F.value=ne),placeholder:e.unref(T)("filter.searchAttributes")},null,8,Y2),[[e.vModelText,F.value]]),e.createElementVNode("ul",j2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ce.value,ne=>(e.openBlock(),e.createElementBlock("li",{key:ne.key,class:"dss-filter-popup-item",onClick:Ie=>Ue(V,ne.key)},e.toDisplayString(ne.label),9,K2))),128)),Ce.value.length===0?(e.openBlock(),e.createElementBlock("li",G2,e.toDisplayString(e.unref(T)("filter.noMatch")),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),se(V)==="contain"||se(V)==="date"?(e.openBlock(),e.createElementBlock("div",Q2,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(ne=>ht(`${V.id}:op`),["stop"])},[e.createElementVNode("span",e0,e.toDisplayString(pe(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,J2),Q.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",t0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(De(V),ne=>(e.openBlock(),e.createElementBlock("li",{key:ne.value,class:e.normalizeClass(["dss-filter-popup-item",{selected:V.operator===ne.value}]),onClick:Ie=>Je(V,ne.value)},e.toDisplayString(ne.label),11,n0))),128))])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),_e(V.operator)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",l0,[se(V)==="string"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,type:"text",class:"dss-filter-value-input",placeholder:e.unref(T)("filter.enterValue"),"onUpdate:modelValue":ne=>V.value=ne},null,8,o0)),[[e.vModelText,V.value]]):se(V)==="date"?(e.openBlock(),e.createElementBlock("div",a0,[e.createVNode(la,{mode:"single",modelValue:V.value,"onUpdate:modelValue":ne=>V.value=ne},null,8,["modelValue","onUpdate:modelValue"])])):Kt(V)==="text"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:2,type:"text",class:"dss-filter-value-input",placeholder:e.unref(T)("filter.enterValue"),"onUpdate:modelValue":ne=>V.value=ne},null,8,s0)),[[e.vModelText,V.value]]):Kt(V)==="number"?(e.openBlock(),e.createElementBlock("input",{key:3,type:"number",class:"dss-filter-value-input",placeholder:e.unref(T)("filter.enterValue"),value:V.value,onInput:ne=>At(V,ne),step:xe.value[V.key]?.type==="int"?1:void 0},null,40,r0)):Kt(V)==="between"?(e.openBlock(),e.createElementBlock("div",i0,[e.createElementVNode("input",{type:"number",class:"dss-filter-value-input",placeholder:e.unref(T)("filter.min"),value:V.value?.min,onInput:ne=>nt(V,"min",ne),step:xe.value[V.key]?.type==="int"?1:void 0},null,40,c0),e.createElementVNode("span",u0,e.toDisplayString(e.unref(T)("filter.and")),1),e.createElementVNode("input",{type:"number",class:"dss-filter-value-input",placeholder:e.unref(T)("filter.max"),value:V.value?.max,onInput:ne=>nt(V,"max",ne),step:xe.value[V.key]?.type==="int"?1:void 0},null,40,d0)])):Kt(V)==="multiselect"?(e.openBlock(),e.createElementBlock("div",m0,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(ne=>ht(`${V.id}:val`),["stop"])},[e.createElementVNode("span",f0,e.toDisplayString(G(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,p0),Q.value===`${V.id}:val`?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup",onClick:b[6]||(b[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":b[5]||(b[5]=ne=>F.value=ne),placeholder:e.unref(T)("filter.search")},null,8,v0)),[[e.vModelText,F.value]]):e.createCommentVNode("",!0),e.createElementVNode("ul",g0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ut(V),ne=>(e.openBlock(),e.createElementBlock("li",{key:ne,class:"dss-filter-popup-item",onClick:Ie=>Ot(V,ne)},[e.createElementVNode("input",{type:"checkbox",checked:(V.value||[]).includes(ne),tabindex:"-1"},null,8,y0),e.createElementVNode("span",null,e.toDisplayString(ne),1)],8,h0))),128)),Ut(V).length===0?(e.openBlock(),e.createElementBlock("li",k0,e.toDisplayString(e.unref(T)("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",b0,[e.createElementVNode("div",w0,[e.createElementVNode("button",{class:"dss-filter-add-btn",onClick:b[7]||(b[7]=e.withModifiers(V=>ht("add"),["stop"]))},e.toDisplayString(e.unref(T)("filter.addFilter")),1),Q.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&&!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":b[8]||(b[8]=V=>F.value=V),placeholder:e.unref(T)("filter.searchAttributes")},null,8,x0),[[e.vModelText,F.value]]),e.createElementVNode("ul",E0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Xe.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),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,S0))),128)),te.value.length>0?(e.openBlock(),e.createElementBlock("li",V0)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.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,N0))),128))])],64)):Ee.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:"dss-filter-popup-back",onClick:b[9]||(b[9]=V=>Ee.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(Ee.value.label),1)]),e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":b[10]||(b[10]=V=>F.value=V),placeholder:e.unref(T)("filter.searchAttributes")},null,8,B0),[[e.vModelText,F.value]]),e.createElementVNode("ul",M0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ot.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,_0))),128)),ot.value.length===0?(e.openBlock(),e.createElementBlock("li",$0,e.toDisplayString(e.unref(T)("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=>F.value=V),placeholder:e.unref(T)("filter.searchAttributes")},null,8,L0),[[e.vModelText,F.value]]),e.createElementVNode("ul",A0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ce.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,T0))),128)),Ce.value.length===0?(e.openBlock(),e.createElementBlock("li",D0,e.toDisplayString(e.unref(T)("filter.noMatch")),1)):e.createCommentVNode("",!0)])],64))])):e.createCommentVNode("",!0)]),ke.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-filter-clear-all",onClick:We},e.toDisplayString(e.unref(T)("filter.clearAllFilters")),1)):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],512)],2))}}),F0={class:"dss-pill-field__pills"},I0=["data-value"],z0=["disabled"],P0={class:"dss-pill-field__pill-text"},O0={key:0,class:"dss-pill-field__pill-actions"},q0=["onClick"],W0=["onClick"],Z0=["placeholder","disabled"],U0=e.defineComponent({__name:"DSSPillField",props:{modelValue:{default:()=>[]},placeholder:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(A,{emit:le}){const M=A,T=le,ce=e.ref(""),I=e.ref([...M.modelValue]),B=e.ref(null);let ge=null;const ut=e.ref(null),J=e.ref(""),v=e.ref(null),we=e.ref(null),ke=e.computed(()=>{if(!we.value)return;const{width:Me,height:Xe}=we.value;return{minWidth:`${Me}px`,height:`${Xe}px`}});function Q(Me,Xe){ut.value===Xe&&(v.value=Me)}function U(){ut.value=null,J.value="",we.value=null,v.value=null}const me=e.computed(()=>new Set(I.value.map(Me=>Me.trim()).filter(Boolean)));function F(Me){B.value=Me,ge&&clearTimeout(ge),ge=setTimeout(()=>{B.value=null,ge=null},900)}function Ee(Me){const Xe=Me.trim();return Xe?me.value.has(Xe)?(F(Xe),!1):(I.value=[...I.value,Xe],T("update:modelValue",[...I.value]),!0):!1}function Te(Me){const Xe=Me.split(/\r?\n/g).map(tt=>tt.trim()).filter(Boolean);if(!Xe.length)return;const te=new Set(I.value.map(tt=>tt.trim()).filter(Boolean)),ot=[...I.value];let Ce=null;for(const tt of Xe){if(te.has(tt)){Ce??=tt;continue}te.add(tt),ot.push(tt)}ot.length!==I.value.length&&(I.value=ot,T("update:modelValue",[...I.value])),Ce&&F(Ce)}function lt(Me){M.disabled||(ut.value===Me&&U(),I.value=I.value.filter((Xe,te)=>te!==Me),T("update:modelValue",[...I.value]))}async function mt(Me,Xe){if(M.disabled)return;const te=Xe.currentTarget.closest(".dss-pill-field__pill");te&&(we.value={width:te.offsetWidth,height:te.offsetHeight}),ut.value=Me,J.value=I.value[Me]??"",await e.nextTick();const ot=v.value;if(!ot)return;ot.focus();const Ce=ot.value.length;ot.setSelectionRange(Ce,Ce)}function W(){U()}function Ze(){if(M.disabled||ut.value===null)return;const Me=ut.value,Xe=I.value[Me]??"",te=J.value.trim();if(U(),te!==Xe&&me.value.has(te)){F(te);return}if(!te){I.value=I.value.filter((Ce,tt)=>tt!==Me),T("update:modelValue",[...I.value]);return}const ot=I.value.map((Ce,tt)=>tt===Me?te:Ce);I.value=ot,T("update:modelValue",[...I.value])}function qe(Me){Me.preventDefault(),!M.disabled&&(Ee(ce.value),ce.value="")}function xe(Me){if(M.disabled)return;const Xe=Me.clipboardData?.getData("text")??"";!Xe.includes(`
118
- `)&&!Xe.includes("\r")||(Me.preventDefault(),Te(Xe),ce.value="")}return e.watch(()=>M.modelValue,Me=>{I.value=Array.isArray(Me)?[...Me]:[]},{deep:!0}),e.onBeforeUnmount(()=>{ge&&clearTimeout(ge)}),(Me,Xe)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-pill-field",{"dss-pill-field--disabled":Me.disabled}])},[e.createElementVNode("div",F0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(te,ot)=>(e.openBlock(),e.createElementBlock("span",{key:te,class:e.normalizeClass(["dss-pill-field__pill",{"dss-pill-field__pill--highlight":B.value===te,"dss-pill-field__pill--editing":ut.value===ot}]),style:e.normalizeStyle(ut.value===ot&&we.value?ke.value:void 0)},[ut.value===ot?(e.openBlock(),e.createElementBlock("span",{key:0,class:"dss-pill-field__pill-edit-wrap","data-value":J.value||" "},[e.withDirectives(e.createElementVNode("input",{ref_for:!0,ref:Ce=>Q(Ce,ot),"onUpdate:modelValue":Xe[0]||(Xe[0]=Ce=>J.value=Ce),class:"dss-pill-field__pill-edit",type:"text",disabled:Me.disabled,onKeydown:[e.withKeys(Ze,["enter"]),e.withKeys(W,["esc"])],onBlur:Ze},null,40,z0),[[e.vModelText,J.value]])],8,I0)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("span",P0,e.toDisplayString(te),1),Me.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",O0,[e.createElementVNode("button",{type:"button",class:"dss-pill-field__pill-action",onClick:Ce=>mt(ot,Ce)},[...Xe[2]||(Xe[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,q0),e.createElementVNode("button",{type:"button",class:"dss-pill-field__pill-action dss-pill-field__pill-action--remove",onClick:Ce=>lt(ot)}," × ",8,W0)]))],64))],6))),128)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":Xe[1]||(Xe[1]=te=>ce.value=te),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,Z0),[[e.vModelText,ce.value]])])],2))}}),X0={class:"dss-step-bar__header"},Y0={class:"dss-step-bar__label"},j0={key:0,class:"dss-step-bar__counter"},K0={class:"dss-step-bar__track-wrapper"},G0=["aria-valuemax","aria-valuenow","aria-label"],Q0=["onMouseenter"],J0={__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:A=>["input","desc","asc"].includes(A)},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(A){const le=A,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"}}},T=se=>se&&typeof se=="object"&&!Array.isArray(se),ce=(se,pe)=>{const De=Object.assign({},se);return!T(se)||!T(pe)||Object.keys(pe).forEach(_e=>{if(T(pe[_e])){_e in se?De[_e]=ce(se[_e],pe[_e]):Object.assign(De,{[_e]:pe[_e]});return}Object.assign(De,{[_e]:pe[_e]})}),De},I=e.computed(()=>ce(M,le.options)),B=e.computed(()=>Math.max(1,Number(le.steps)||1)),ge=e.computed(()=>Math.min(B.value,Math.max(0,Number(le.currentStep)||0))),ut=e.computed(()=>Array.isArray(le.segments)&&le.segments.length>0),J=e.computed(()=>{if(!ut.value)return[];const se=le.segments.map((pe,De)=>{const _e=Number(pe?.value);return{label:pe?.label||`Step ${De+1}`,value:Number.isFinite(_e)&&_e>0?_e:0,color:pe?.color||le.activeColor,marker:pe?.marker}});return le.segmentOrder==="desc"?[...se].sort((pe,De)=>De.value-pe.value):le.segmentOrder==="asc"?[...se].sort((pe,De)=>pe.value-De.value):se}),v=e.computed(()=>ut.value?J.value.reduce((se,pe)=>se+pe.value,0):ge.value),we=e.computed(()=>ut.value?Number.isFinite(Number(le.totalValue))&&Number(le.totalValue)>0?Number(le.totalValue):Math.max(1,v.value):B.value),ke=e.computed(()=>ut.value&&Number.isFinite(Number(le.totalValue))&&Number(le.totalValue)>0),Q=e.computed(()=>ke.value?Math.max(0,Number(le.totalValue)-v.value):0),U=e.computed(()=>typeof le.remainderLabel=="string"&&le.remainderLabel.trim().length>0),me=e.computed(()=>Q.value>0),F=e.computed(()=>J.value.reduce((se,pe)=>Math.max(se,Number(pe.value)||0),0)),Ee=e.computed(()=>J.value.filter(se=>se.value>0).map(se=>`${se.label}: ${tt(se.value)}`).join(" | ")),Te=e.computed(()=>ut.value?ke.value?J.value.filter(se=>se.value>0):J.value:[]),lt=e.computed(()=>{if(!le.counterAsPercentage)return`${v.value} / ${we.value}`;const se=Number(we.value);if(!Number.isFinite(se)||se<=0)return"0%";const pe=Math.round(Number(v.value)/se*100);return`${Math.min(Math.max(pe,0),100)}%`}),mt=e.computed(()=>v.value),W=e.computed(()=>we.value),Ze=e.reactive({visible:!1,x:0,content:""}),qe=e.computed(()=>({left:`${Ze.x}px`})),xe=se=>{const pe=se?.parentElement;return pe?pe.offsetLeft+pe.offsetWidth/2:0},Me=se=>{if(ke.value){const _e=Math.max(0,Number(se.value)||0);return{flex:`${_e} 0 0`,minWidth:_e>0?"6px":"0",backgroundColor:se.color}}const pe=v.value;return{flex:`${se.value>0?se.value:pe>0?1e-4:1} 0 0`,minWidth:"6px",backgroundColor:se.color}},Xe=se=>Number(se?.value||0)>0&&Number(se?.value||0)===F.value,te=se=>{const pe=T(se?.marker)?se.marker:{},De=se?.marker===!0||pe.enabled===!0,_e=Xe(se)&&I.value.maxSegment?.marker?.enabled===!0;if(!(De||_e))return{enabled:!1};const kt=pe.backgroundColor??(_e?I.value.maxSegment?.marker?.backgroundColor:I.value.segmentMarker?.backgroundColor),Qt=pe.borderColor??(_e?I.value.maxSegment?.marker?.borderColor:I.value.segmentMarker?.borderColor),Lt=pe.color??(_e?I.value.maxSegment?.marker?.color:I.value.segmentMarker?.color),Ut=pe.width??(_e?I.value.maxSegment?.marker?.width:I.value.segmentMarker?.width),G=pe.height??(_e?I.value.maxSegment?.marker?.height:I.value.segmentMarker?.height);return{enabled:!0,backgroundColor:kt,borderColor:Qt,color:Lt,width:Ut,height:G,icon:pe.icon??null,...pe}},ot=se=>{const pe=te(se);return{backgroundColor:pe.backgroundColor??void 0,borderColor:pe.borderColor??void 0,color:pe.color??void 0}},Ce=se=>{const pe=te(se);return{width:pe.width??void 0,height:pe.height??void 0}},tt=se=>`${se}${le.valueLabel}`,dt=e.computed(()=>({flex:`${Q.value} 0 0`,minWidth:Q.value>0?"6px":"0",backgroundColor:le.inactiveColor})),ht=(se,pe)=>{if(!se||!pe?.currentTarget)return;const De=pe.currentTarget;if(le.remainderTooltipSummary){Ze.x=xe(De),Ze.content=Ee.value,Ze.visible=!!Ze.content;return}Ze.x=De.offsetLeft+De.offsetWidth/2,Ze.content=`${se.label}: ${tt(se.value)}`,Ze.visible=!0},xt=se=>{if(!Q.value||!se?.currentTarget)return;const pe=se.currentTarget;if(le.remainderTooltipSummary){Ze.x=xe(pe),Ze.content=Ee.value,Ze.visible=!!Ze.content;return}Ze.x=pe.offsetLeft+pe.offsetWidth/2,U.value&&(Ze.content=`${le.remainderLabel}: ${tt(Q.value)}`,Ze.visible=!0)},Ht=()=>{Ze.visible=!1},It=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(se,pe)=>(e.openBlock(),e.createElementBlock("div",{class:"dss-step-bar",style:e.normalizeStyle(It.value)},[e.createElementVNode("div",X0,[e.createElementVNode("span",Y0,[e.renderSlot(se.$slots,"label",{label:A.label},()=>[e.createTextVNode(e.toDisplayString(A.label),1)])]),A.showCounter?(e.openBlock(),e.createElementBlock("span",j0,[e.renderSlot(se.$slots,"counter",{counterDisplay:lt.value},()=>[e.createTextVNode(e.toDisplayString(lt.value),1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",K0,[e.createElementVNode("div",{class:"dss-step-bar__track",role:"progressbar","aria-valuemin":0,"aria-valuemax":W.value,"aria-valuenow":mt.value,"aria-label":A.label},[ut.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Te.value,(De,_e)=>(e.openBlock(),e.createElementBlock("div",{key:`segment-${_e}-${De.label}`,class:e.normalizeClass(["dss-step-bar__segment dss-step-bar__segment--interactive",{"dss-step-bar__segment--max":Xe(De),"dss-step-bar__segment--marker-enabled":te(De).enabled}]),style:e.normalizeStyle(Me(De)),onMouseenter:Kt=>ht(De,Kt),onMouseleave:Ht},[te(De).enabled?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-step-bar__segment-marker",style:e.normalizeStyle(ot(De)),"aria-hidden":"true"},[e.createElementVNode("span",{class:"dss-step-bar__segment-marker-icon",style:e.normalizeStyle(Ce(De))},[e.renderSlot(se.$slots,"segment-marker-icon",{segment:De,index:_e,marker:te(De)},()=>[e.renderSlot(se.$slots,"max-segment-icon",{segment:De,index:_e,marker:te(De)},()=>[e.createTextVNode(e.toDisplayString(te(De).icon||""),1)])])],4)],4)):e.createCommentVNode("",!0)],46,Q0))),128)),me.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-step-bar__segment dss-step-bar__segment--remainder",style:e.normalizeStyle(dt.value),onMouseenter:pe[0]||(pe[0]=De=>xt(De)),onMouseleave:Ht},null,36)):e.createCommentVNode("",!0)],64)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(B.value,De=>(e.openBlock(),e.createElementBlock("div",{key:De,class:e.normalizeClass(["dss-step-bar__segment",{"dss-step-bar__segment--active":De<=ge.value}])},null,2))),128))],8,G0),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))}},e9={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"}},t9={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"},n9={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"}},l9={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"}},o9={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"}},uo={chart:e9,table:t9,filter:n9,datepicker:l9,textEditor:o9},a9={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"}},s9={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"},r9={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"}},i9={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"}},c9={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"}},mo={chart:a9,table:s9,filter:r9,datepicker:i9,textEditor:c9},u9={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"}},d9={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"},m9={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"}},p9={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"}},f9={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"}},po={chart:u9,table:d9,filter:m9,datepicker:p9,textEditor:f9},Po={en:uo,fr:mo,nl:po};function ma(A){if(!A||!A.global)return;const le=A.global.availableLocales||[];Object.keys(Po).forEach(M=>{le.includes(M)&&A.global.mergeLocaleMessage(M,Po[M])})}const Oo={en:{textEditor:uo.textEditor},fr:{textEditor:mo.textEditor},nl:{textEditor:po.textEditor}};function pa(A){if(!A||!A.global)return;const le=A.global.availableLocales||[];Object.keys(Oo).forEach(M=>{le.includes(M)&&A.global.mergeLocaleMessage(M,Oo[M])})}const qo={en:{table:uo.table},fr:{table:mo.table},nl:{table:po.table}};function fa(A){if(!A||!A.global)return;const le=A.global.availableLocales||[];Object.keys(qo).forEach(M=>{le.includes(M)&&A.global.mergeLocaleMessage(M,qo[M])})}const Wo={en:{datepicker:uo.datepicker},fr:{datepicker:mo.datepicker},nl:{datepicker:po.datepicker}};function va(A){if(!A||!A.global)return;const le=A.global.availableLocales||[];Object.keys(Wo).forEach(M=>{le.includes(M)&&A.global.mergeLocaleMessage(M,Wo[M])})}const Zo={en:{filter:uo.filter},fr:{filter:mo.filter},nl:{filter:po.filter}};function ga(A){if(!A||!A.global)return;const le=A.global.availableLocales||[];Object.keys(Zo).forEach(M=>{le.includes(M)&&A.global.mergeLocaleMessage(M,Zo[M])})}const v9={chart:Po,textEditor:Oo,table:qo,datepicker:Wo,filter:Zo};function g9(A){!A||!A.global||(ma(A),pa(A),fa(A),va(A),ga(A))}const h9={en:{...uo},fr:{...mo},nl:{...po}};co.createI18n({legacy:!1,locale:"en",fallbackLocale:"en",messages:h9});exports.DSSChart=fc;exports.DSSChartMessages=Po;exports.DSSColorPicker=n2;exports.DSSConfetti=_2;exports.DSSDatepicker=la;exports.DSSDatepickerMessages=Wo;exports.DSSDnd=B2;exports.DSSFilter=R0;exports.DSSFilterMessages=Zo;exports.DSSLoader=v2;exports.DSSMessages=v9;exports.DSSModal=na;exports.DSSPillField=U0;exports.DSSSkeleton=g2;exports.DSSStepBar=J0;exports.DSSTable=Hu;exports.DSSTableMessages=qo;exports.DSSTextEditor=zm;exports.DSSTextEditorMessages=Oo;exports.addDSSChartTranslations=ma;exports.addDSSDatepickerTranslations=va;exports.addDSSFilterTranslations=ga;exports.addDSSTableTranslations=fa;exports.addDSSTextEditorTranslations=pa;exports.addDSSTranslations=g9;
117
+ `,document.body.appendChild(Ke),Ee=Ke}function lt(Q,he){Ee&&(Ee.style.left=`${Q-nt}px`,Ee.style.top=`${he-pt}px`)}function Ce(Q){Q.classList.add("dss-dnd-item--dragging"),Q.style.background=ve.value.dragSourceBackground,Q.style.borderColor=ve.value.dragSourceBorder,Q.style.transform="scale(0.97)"}function et(Q){Q.classList.remove("dss-dnd-item--dragging"),Q.style.background="",Q.style.borderColor="",Q.style.transform=""}function dt(Q,he){return document.elementFromPoint(Q,he)?.closest(".dss-dnd-column-body")??null}function yt(Q,he){return!!document.elementFromPoint(Q,he)?.closest("[data-dss-dnd-delete-zone]")}function Et(Q,he){if(z.value&&yt(Q,he)){ke.value=!0,we.value=null,G.value=-1;return}ke.value=!1;const Be=dt(Q,he),ze=Be?.getAttribute("data-column")??null;if(!ze){we.value=null,G.value=-1;return}we.value=ze;const Ke=Be.querySelectorAll(".dss-dnd-item:not(.dss-dnd-item--dragging)");let Vt=Ke.length;for(let tt=0;tt<Ke.length;tt++){const Xt=Ke[tt].getBoundingClientRect();if(he<Xt.top+Xt.height/2){Vt=tt;break}}G.value=Vt}function Ht(Q){Q.preventDefault(),lt(Q.clientX,Q.clientY),!me&&(me=requestAnimationFrame(()=>{me=null,Et(Q.clientX,Q.clientY)}))}function It(Q){window.removeEventListener("pointermove",Ht),window.removeEventListener("pointerup",It),window.removeEventListener("pointercancel",It),Te?.releasePointerCapture?.(Q.pointerId),et(Te),Te=null;const he=z.value&&yt(Q.clientX,Q.clientY);if(v.value&&he)D("delete",{item:v.value});else{const ze=dt(Q.clientX,Q.clientY)?.getAttribute("data-column")??null;if(v.value&&ze){const Ke=v.value[_.columnKey],Vt=ze,Xt=(xe.value[Vt]||[]).filter($t=>$t[_.itemKey]!==v.value[_.itemKey]),Ze=Math.max(0,Math.min(G.value,Xt.length)),Pe=Xe(Vt,Ze),Lt=v.value[_.itemKey];D("move",{item:v.value,from:Ke,to:Vt,position:Pe,index:Ze}),F&&clearTimeout(F),X.value={id:Lt,from:Ke,to:Vt},F=setTimeout(()=>{X.value=null},3500)}}Ee&&(Ee.remove(),Ee=null),W!==null&&(document.body.style.cursor=W,W=""),Ut()}function re(Q,he){Q.preventDefault();const Be=Q.target.closest(".dss-dnd-item");if(!Be)return;const ze=Be.getBoundingClientRect();nt=Q.clientX-ze.left,pt=Q.clientY-ze.top,W=document.body.style.cursor,document.body.style.cursor="grabbing",v.value=he,Te=Be,te(Be,Q.clientX,Q.clientY),requestAnimationFrame(()=>Ce(Be)),Be.setPointerCapture?.(Q.pointerId),window.addEventListener("pointermove",Ht),window.addEventListener("pointerup",It,{once:!0}),window.addEventListener("pointercancel",It,{once:!0})}function pe(){Ue&&(window.removeEventListener("pointermove",De),window.removeEventListener("pointerup",_e),window.removeEventListener("pointercancel",_e),Ue=null)}function De(Q){if(!Ue||Q.pointerId!==Ue.pointerId)return;const he=Q.clientX-Ue.startX,Be=Q.clientY-Ue.startY;if(Math.abs(he)>=We||Math.abs(Be)>=We){const ze=Ue.item;pe(),re(Q,ze)}}function _e(Q){!Ue||Q.pointerId!==Ue.pointerId||pe()}function Jt(Q,he){pe(),Ue={item:he,startX:Q.clientX,startY:Q.clientY,pointerId:Q.pointerId},window.addEventListener("pointermove",De),window.addEventListener("pointerup",_e),window.addEventListener("pointercancel",_e)}function Ct(Q,he){ve.value.useHandle||Jt(Q,he)}function tn(Q,he){Jt(Q,he)}function _t(){me&&(cancelAnimationFrame(me),me=null)}function Ut(){_t(),v.value=null,we.value=null,ke.value=!1,G.value=-1}return e.onBeforeUnmount(()=>{_t(),pe(),F&&clearTimeout(F),Ee&&(Ee.remove(),Ee=null)}),(Q,he)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-dnd",{"dss-dnd--unstyled":ve.value.unstyled}]),style:e.normalizeStyle(ut.value)},[z.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":ke.value}]),"data-dss-dnd-delete-zone":""},[e.renderSlot(Q.$slots,"delete-zone",{isDragging:!!v.value,isOver:ke.value})],2),[[e.vShow,!!v.value||ve.value.deleteZoneAlwaysVisible]])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.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(J(Be))},[ve.value.showHeader?(e.openBlock(),e.createElementBlock("div",h2,[e.renderSlot(Q.$slots,"column-header",{column:Be,items:xe.value[Be.value]||[]},()=>[e.createElementVNode("span",y2,e.toDisplayString(Be.title||Be.value),1),e.createElementVNode("span",k2,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],ze=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:ze.key},[ze.type==="indicator"?(e.openBlock(),e.createElementBlock("div",b2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-dnd-item",{"dss-dnd-item--dragging":ze.isDragged,"dss-dnd-item--no-handle":!ve.value.useHandle}]),onPointerdown:Ke=>Ct(Ke,ze.item)},[ve.value.useHandle?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-dnd-handle",onPointerdown:e.withModifiers(Ke=>tn(Ke,ze.item),["stop"])},[e.renderSlot(Q.$slots,"handle",{},()=>[he[0]||(he[0]=e.createElementVNode("span",{class:"dss-dnd-handle-icon"},"⠿",-1))])],40,x2)):e.createCommentVNode("",!0),e.createElementVNode("div",E2,[e.renderSlot(Q.$slots,"item",{item:ze.item,column:Be,justDropped:X.value?.id===ze.item[T.itemKey],droppedFrom:X.value?.id===ze.item[T.itemKey]?X.value.from:null,droppedTo:X.value?.id===ze.item[T.itemKey]?X.value.to:null},()=>[e.createElementVNode("div",S2,e.toDisplayString(ze.item[T.itemKey]),1)])])],42,w2))],64))),128)),(xe.value[Be.value]||[]).length===0&&we.value!=Be.value?(e.openBlock(),e.createElementBlock("div",V2,[e.renderSlot(Q.$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))}}),M2={name:"DSSConfetti"},_2=Object.assign(M2,{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(T){const oe=T,_=e.ref(null),D=e.ref(!1);let ce=[],z=null,M=null;function ve(G,X){const me=[];for(let F=0;F<oe.count;F++)me.push(ut(G));return me}function ut(G,X){return{x:Math.random()*G,y:-Math.random()*150-20,r:Math.random()*8+3,d:Math.random()*50,color:oe.colors[Math.floor(Math.random()*oe.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 J(G,X,me,F){G.clearRect(0,0,X,me);for(const Ee of ce)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 v(G,X,me){const F=.3+me*.7;for(let Ee=0;Ee<ce.length;Ee++){const Te=ce[Ee];Te.tiltAngle+=Te.tiltInc,Te.y+=Te.speed*F,Te.x+=Math.sin(Te.d)*.5*F,Te.tilt=Math.sin(Te.tiltAngle)*15,me>=.99&&Te.y>X+20&&(ce[Ee]=ut(G))}}function we(){D.value=!0,e.nextTick(()=>{const G=_.value;if(!G)return;const X=G.getContext("2d"),me=G.parentElement;if(!me)return;const F=me.getBoundingClientRect();G.width=F.width,G.height=F.height,ce=ve(G.width,G.height);const Ee=Date.now(),Te=Ee+oe.duration,nt=()=>{const pt=Date.now(),W=pt-Ee;if(pt<Te){let Ue=1;W>oe.fadeStart&&(Ue=1-(W-oe.fadeStart)/(oe.duration-oe.fadeStart)),J(X,G.width,G.height,Ue),v(G.width,G.height,Ue),z=requestAnimationFrame(nt)}else ke()};nt()})}function ke(){z&&(cancelAnimationFrame(z),z=null),ce=[],D.value=!1}return e.watch(()=>oe.trigger,G=>{G&&(M&&clearTimeout(M),M=setTimeout(we,oe.delay))},{immediate:!0}),e.onBeforeUnmount(()=>{ke(),M&&clearTimeout(M)}),(G,X)=>D.value?(e.openBlock(),e.createElementBlock("canvas",{key:0,ref_key:"canvasRef",ref:_,class:"dss-confetti-canvas"},null,512)):e.createCommentVNode("",!0)}}),$2={class:"dss-filter-global-inner"},L2=["placeholder","value"],A2=["title"],T2={key:0,class:"dss-filter-funnel-badge"},D2={key:1,class:"dss-filter-sortby"},H2=["value"],R2=["value"],F2=["disabled","title"],I2={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"},z2={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"},P2={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"},O2={class:"dss-filter-panel"},q2={key:0,class:"dss-filter-empty"},W2={class:"dss-filter-row-prefix"},Z2={class:"dss-filter-cell"},U2=["onClick"],X2={class:"dss-filter-trigger-text"},Y2=["placeholder"],j2={class:"dss-filter-popup-list"},K2=["onClick"],G2={key:0,class:"dss-filter-popup-empty"},Q2={key:0,class:"dss-filter-cell"},J2=["onClick"],e0={class:"dss-filter-trigger-text"},t0={class:"dss-filter-popup-list"},n0=["onClick"],l0={key:1,class:"dss-filter-cell dss-filter-cell--value"},o0=["placeholder","onUpdate:modelValue"],a0={key:1,class:"dss-filter-date-wrap"},s0=["placeholder","onUpdate:modelValue"],r0=["placeholder","value","onInput","step"],i0={key:4,class:"dss-filter-between"},c0=["placeholder","value","onInput","step"],u0={class:"dss-filter-between-sep"},d0=["placeholder","value","onInput","step"],m0={key:5,class:"dss-filter-multiselect"},p0=["onClick"],f0={class:"dss-filter-trigger-text"},v0=["placeholder"],g0={class:"dss-filter-popup-list dss-filter-popup-list--check"},h0=["onClick"],y0=["checked"],k0={key:0,class:"dss-filter-popup-empty"},C0=["onClick"],b0={class:"dss-filter-foot"},w0={class:"dss-filter-cell"},x0=["placeholder"],E0={class:"dss-filter-popup-list"},S0=["onClick"],V0={key:0,class:"dss-filter-popup-divider"},N0=["onClick"],B0=["placeholder"],M0={class:"dss-filter-popup-list"},_0=["onClick"],$0={key:0,class:"dss-filter-popup-empty"},L0=["placeholder"],A0={class:"dss-filter-popup-list"},T0=["onClick"],D0={key:0,class:"dss-filter-popup-empty"},H0={name:"DSSFilter"},R0=Object.assign(H0,{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(T,{expose:oe,emit:_}){const{t:D}=co.useI18n(),ce=T,z=_,M={unstyled:!1,maxUniqueForSelect:30,maxUniqueForEnum:15},ve=e.computed(()=>({...M,...ce.options})),ut={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"}]},J=new Set(["is_empty","is_not_empty","is_true","is_false"]),v=["label","name","title","keyword","full_name","value","text"],we=e.ref(""),ke=e.ref([]),G=e.ref(null),X=e.ref(!1),me=e.ref(null),F=e.ref(""),Ee=e.ref(null),Te=e.ref(""),nt=e.ref("asc");let pt=1;function W(S){const b=S.find(V=>V&&typeof V=="object");if(!b)return null;for(const V of v)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(He=>He).filter(He=>He!=null);return Y.length===0?null:typeof Y.find(He=>He!=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 We=e.computed(()=>{if(!ce.data?.length)return[];const S=new Set;for(const le of ce.data)if(le&&typeof le=="object")for(const He of Object.keys(le))S.add(He);const b=new Set(ce.exclude),V=[];for(const le of S){if(b.has(le))continue;const He=ce.config[le]||{},kt=ce.data.map(wt=>wt?.[le]),at=He.type||Ue(le,kt);if(!at)continue;const Ie=He.filterMode||"contain",bt=Ie==="date"?"date":Ie==="string"?"text":at,Nt={key:le,label:He.label||ot(le),type:bt,filterMode:Ie};if(at==="select"){const wt=kt.filter(it=>it!=null&&it!=="NULL");Nt.uniqueValues=[...new Set(wt)].sort((it,Tt)=>typeof it=="number"&&typeof Tt=="number"?it-Tt:String(it).localeCompare(String(Tt)))}else if(at==="range"||at==="int"){const wt=kt.filter(it=>typeof it=="number");Nt.min=Math.min(...wt),Nt.max=Math.max(...wt)}else if(at==="arraySelect"){const wt=He.displayKey||W(kt.flatMap(it=>Array.isArray(it)?it:[]));if(Nt.displayKey=wt,Array.isArray(He.uniqueValues)&&He.uniqueValues.length>0)Nt.uniqueValues=He.uniqueValues.map(it=>String(it));else{const it=kt.flatMap(Tt=>Array.isArray(Tt)?Tt:[]).filter(Tt=>Tt!=null).map(Tt=>wt&&typeof Tt=="object"?Tt[wt]:String(Tt)).filter(Tt=>Tt!=null&&Tt!=="");Nt.uniqueValues=[...new Set(it)].sort((Tt,St)=>String(Tt).localeCompare(String(St)))}}V.push(Nt)}const Y=ce.config._order;return Y&&V.sort((le,He)=>{const kt=Y.indexOf(le.key),at=Y.indexOf(He.key);return kt===-1&&at===-1?0:kt===-1?1:at===-1?-1:kt-at}),V}),xe=e.computed(()=>{const S={};for(const b of We.value)S[b.key]=b;return S}),Me=e.computed(()=>Array.isArray(ce.config.groups)&&ce.config.groups.length>0),Xe=e.computed(()=>{if(!Me.value)return[];const S=new Set(We.value.map(b=>b.key));return ce.config.groups.map(b=>({...b,keys:b.keys.filter(V=>S.has(V))})).filter(b=>b.keys.length>0)}),te=e.computed(()=>{if(!Me.value)return[];const S=new Set(ce.config.groups.flatMap(b=>b.keys));return We.value.filter(b=>!S.has(b.key))}),lt=e.computed(()=>{if(!Ee.value)return[];const S=new Set(Ee.value.keys),b=We.value.filter(Y=>S.has(Y.key));if(!F.value)return b;const V=F.value.toLowerCase();return b.filter(Y=>Y.label.toLowerCase().includes(V))}),Ce=e.computed(()=>{if(!F.value)return We.value;const S=F.value.toLowerCase();return We.value.filter(b=>b.label.toLowerCase().includes(S))}),et=e.computed(()=>We.value.filter(S=>!["arraySelect","arrayText"].includes(S.type))),dt=e.computed(()=>Te.value?nt.value==="asc"?"Ascending":"Descending":"No sort selected");function yt(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 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")&&Et(),X.value&&me.value&&!me.value.contains(S.target)&&(b||(X.value=!1))}e.onMounted(()=>document.addEventListener("click",Ht)),e.onBeforeUnmount(()=>document.removeEventListener("click",Ht));function It(S){return xe.value[S]?.label||ot(S)}function re(S){return xe.value[S.key]?.filterMode||"contain"}function pe(S){return D(`filter.operators.${S}`)}function De(S){const b=xe.value[S.key];return(ut[b?.type]||ut.text).map(V=>({...V,label:D(`filter.operators.${V.value}`)}))}function _e(S){return J.has(S)}function Jt(S){const b=xe.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 Ct(S){return ut[S]?.[0]?.value||"contains"}function tn(S,b){return J.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 _t(S){return xe.value[S.key]?.uniqueValues||[]}function Ut(S){const b=_t(S);if(!F.value)return b;const V=F.value.toLowerCase();return b.filter(Y=>String(Y).toLowerCase().includes(V))}function Q(S){const b=S.value;return!b||b.length===0?D("filter.select"):b.length<=2?b.join(", "):D("filter.selectedCount",{count:b.length})}function he(S){const b=xe.value[S],V=b?.filterMode||"contain",Y=b?.type||"text",le=V==="string"?"contains":Ct(Y);ke.value.push(e.reactive({id:pt++,key:S,operator:le,value:tn(Y,le)})),Et()}function Be(S){ke.value=ke.value.filter(b=>b.id!==S)}function ze(S,b){const Y=xe.value[b]?.type||"text";S.key=b,S.operator=Ct(Y),S.value=tn(Y,S.operator),Et()}function Ke(S,b){const V=Jt(S);S.operator=b;const Y=Jt(S);if(V!==Y||J.has(b)){const le=xe.value[S.key];S.value=tn(le?.type||"text",b)}Et()}function Vt(S,b){const V=b.target.value;S.value=V===""?null:Number(V)}function tt(S,b,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,[b]:isNaN(le)?null:le}}function Xt(S,b){const V=S.value||[],Y=V.indexOf(b);S.value=Y>=0?V.filter(le=>le!==b):[...V,b]}function Ze(){ke.value=[],we.value="",Et()}function Pe(S){we.value=S.target.value}function Lt(S){Te.value=S.target.value}function $t(){nt.value=nt.value==="asc"?"desc":"asc"}const ne=e.computed(()=>{if(!ce.data)return[];let S=ce.data;if(we.value){const b=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(b)||typeof le=="number"&&String(le).includes(b)||Array.isArray(le)&&le.some(He=>He!=null&&(typeof He=="string"?He.toLowerCase().includes(b):typeof He=="object"?Object.values(He).some(kt=>typeof kt=="string"&&kt.toLowerCase().includes(b)):!1)))return!0}return!1})}for(const b of ke.value){if(!ie(b))continue;const V=xe.value[b.key];V&&(S=S.filter(Y=>ye(Y,b,V)))}if(ce.showSortBy&&Te.value){const b=Te.value,V=nt.value==="asc"?1:-1;S=[...S].sort((Y,le)=>Z(Y?.[b],le?.[b])*V)}return S});function Z(S,b){const V=U(S),Y=U(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 U(S){return S==null||S==="NULL"?null:typeof S=="string"||typeof S=="number"||typeof S=="boolean"?S:S instanceof Date?S.getTime():null}function ie(S){return J.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],le=b.value,He=b.operator;if(He==="is_empty")return Yt(Y);if(He==="is_not_empty")return!Yt(Y);const kt=V.type;if(kt==="text"||kt==="arrayText"){const at=kt==="arrayText"&&Array.isArray(Y)?Y.filter(Nt=>Nt!=null).map(String).join(" "):Y!=null?String(Y):"",Ie=String(le).toLowerCase(),bt=at.toLowerCase();switch(He){case"contains":return bt.includes(Ie);case"not_contains":return!bt.includes(Ie);case"equals":return bt===Ie;case"not_equals":return bt!==Ie;case"starts_with":return bt.startsWith(Ie);case"ends_with":return bt.endsWith(Ie);default:return!0}}if(kt==="select")switch(He){case"is_any_of":return le.includes(Y);case"is_none_of":return!le.includes(Y);default:return!0}if(kt==="range"||kt==="int"){const at=typeof Y=="number"?Y:Number(Y);if(typeof at!="number"||isNaN(at))return!1;if(He==="between"){const bt=le?.min!=null?Number(le.min):null,Nt=le?.max!=null?Number(le.max):null,wt=bt!=null&&!isNaN(bt)?bt:null,it=Nt!=null&&!isNaN(Nt)?Nt:null;return(wt==null||at>=wt)&&(it==null||at<=it)}const Ie=typeof le=="number"&&!isNaN(le)?le:Number(le);if(He==="contains"||He==="not_contains"){const bt=String(at),Nt=String(le??"").toLowerCase(),wt=bt.toLowerCase().includes(Nt);return He==="contains"?wt:!wt}if(typeof Ie!="number"||isNaN(Ie))return!1;switch(He){case"eq":return at===Ie;case"neq":return at!==Ie;case"gt":return at>Ie;case"gte":return at>=Ie;case"lt":return at<Ie;case"lte":return at<=Ie;default:return!0}}if(kt==="arraySelect"){if(!Array.isArray(Y))return!1;const at=Y.filter(Ie=>Ie!=null).map(Ie=>V.displayKey&&typeof Ie=="object"?Ie[V.displayKey]:String(Ie));switch(He){case"contains_any":return at.some(Ie=>le.includes(Ie));case"contains_all":return le.every(Ie=>at.includes(Ie));case"not_contains_any":return!at.some(Ie=>le.includes(Ie));default:return!0}}if(kt==="date"){const at=Ge(le);if(!at||isNaN(at.getTime()))return!1;const Ie=Ge(Y);if(!Ie||isNaN(Ie.getTime()))return!1;const bt=At(Ie),Nt=At(at);switch(He){case"eq":return bt===Nt;case"before":return bt<Nt;case"after":return bt>Nt;default:return!0}}if(kt==="boolean"){const at=Y===!0||Y==="true"||Y===1,Ie=Y===!1||Y==="false"||Y===0;switch(He){case"is_true":return at;case"is_false":return Ie;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 b=new Date(S);return isNaN(b.getTime())?null:b}return null}function At(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 Yt(S){return!!(S==null||S===""||S==="NULL"||Array.isArray(S)&&S.length===0||Array.isArray(S)&&S.every(b=>b==null))}e.watch(ne,S=>z("update:modelValue",S),{immediate:!0}),e.watch(()=>ce.data,()=>{ke.value=[],we.value="",X.value=!1,Te.value="",nt.value="asc",Et()});function ot(S){return S.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,b=>b.toUpperCase())}function sn(){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:we.value,rows:ke.value.map(b=>({key:b.key,operator:b.operator,value:S(b.value),defType:xe.value[b.key]?.type,defFilterMode:xe.value[b.key]?.filterMode})),filteredCount:ne.value?.length??0}}return oe({getDebugState:sn}),(S,b)=>(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:me},[e.createElementVNode("div",$2,[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(D)("filter.searchAcrossFields"),value:we.value,onInput:Pe},null,40,L2),we.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-filter-global-clear",onClick:b[0]||(b[0]=V=>we.value="")},"×")):e.createCommentVNode("",!0),e.createElementVNode("button",{class:e.normalizeClass(["dss-filter-funnel-btn",{active:X.value||ke.value.length>0,"dss-filter-funnel-btn--with-sort":ce.showSortBy}]),onClick:b[1]||(b[1]=V=>X.value=!X.value),type:"button",title:X.value?e.unref(D)("filter.closeAdvancedFilter"):e.unref(D)("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)),ke.value.length>0?(e.openBlock(),e.createElementBlock("span",T2,e.toDisplayString(ke.value.length),1)):e.createCommentVNode("",!0)],10,A2),ce.showSortBy?(e.openBlock(),e.createElementBlock("div",D2,[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:Te.value,onChange:Lt},[b[15]||(b[15]=e.createElementVNode("option",{value:""},"None",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(et.value,V=>(e.openBlock(),e.createElementBlock("option",{key:V.key,value:V.key},e.toDisplayString(V.label),9,R2))),128))],40,H2),e.createElementVNode("button",{class:"dss-filter-sortby-order",type:"button",onClick:$t,disabled:!Te.value,title:dt.value},[Te.value?nt.value==="asc"?(e.openBlock(),e.createElementBlock("svg",z2,[...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",P2,[...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",I2,[...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,F2)])):e.createCommentVNode("",!0)]),X.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-advanced-popup",onClick:b[13]||(b[13]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",O2,[ke.value.length===0?(e.openBlock(),e.createElementBlock("div",q2,e.toDisplayString(e.unref(D)("filter.noConditionsApplied")),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,(V,Y)=>(e.openBlock(),e.createElementBlock("div",{key:V.id,class:"dss-filter-row"},[e.createElementVNode("span",W2,e.toDisplayString(Y===0?e.unref(D)("filter.where"):e.unref(D)("filter.and")),1),e.createElementVNode("div",Z2,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(le=>yt(`${V.id}:field`),["stop"])},[e.createElementVNode("span",X2,e.toDisplayString(It(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,U2),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]=le=>F.value=le),placeholder:e.unref(D)("filter.searchAttributes")},null,8,Y2),[[e.vModelText,F.value]]),e.createElementVNode("ul",j2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ce.value,le=>(e.openBlock(),e.createElementBlock("li",{key:le.key,class:"dss-filter-popup-item",onClick:He=>ze(V,le.key)},e.toDisplayString(le.label),9,K2))),128)),Ce.value.length===0?(e.openBlock(),e.createElementBlock("li",G2,e.toDisplayString(e.unref(D)("filter.noMatch")),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),re(V)==="contain"||re(V)==="date"?(e.openBlock(),e.createElementBlock("div",Q2,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(le=>yt(`${V.id}:op`),["stop"])},[e.createElementVNode("span",e0,e.toDisplayString(pe(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,J2),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",t0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(De(V),le=>(e.openBlock(),e.createElementBlock("li",{key:le.value,class:e.normalizeClass(["dss-filter-popup-item",{selected:V.operator===le.value}]),onClick:He=>Ke(V,le.value)},e.toDisplayString(le.label),11,n0))),128))])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),_e(V.operator)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",l0,[re(V)==="string"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,type:"text",class:"dss-filter-value-input",placeholder:e.unref(D)("filter.enterValue"),"onUpdate:modelValue":le=>V.value=le},null,8,o0)),[[e.vModelText,V.value]]):re(V)==="date"?(e.openBlock(),e.createElementBlock("div",a0,[e.createVNode(la,{mode:"single",modelValue:V.value,"onUpdate:modelValue":le=>V.value=le},null,8,["modelValue","onUpdate:modelValue"])])):Jt(V)==="text"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:2,type:"text",class:"dss-filter-value-input",placeholder:e.unref(D)("filter.enterValue"),"onUpdate:modelValue":le=>V.value=le},null,8,s0)),[[e.vModelText,V.value]]):Jt(V)==="number"?(e.openBlock(),e.createElementBlock("input",{key:3,type:"number",class:"dss-filter-value-input",placeholder:e.unref(D)("filter.enterValue"),value:V.value,onInput:le=>Vt(V,le),step:xe.value[V.key]?.type==="int"?1:void 0},null,40,r0)):Jt(V)==="between"?(e.openBlock(),e.createElementBlock("div",i0,[e.createElementVNode("input",{type:"number",class:"dss-filter-value-input",placeholder:e.unref(D)("filter.min"),value:V.value?.min,onInput:le=>tt(V,"min",le),step:xe.value[V.key]?.type==="int"?1:void 0},null,40,c0),e.createElementVNode("span",u0,e.toDisplayString(e.unref(D)("filter.and")),1),e.createElementVNode("input",{type:"number",class:"dss-filter-value-input",placeholder:e.unref(D)("filter.max"),value:V.value?.max,onInput:le=>tt(V,"max",le),step:xe.value[V.key]?.type==="int"?1:void 0},null,40,d0)])):Jt(V)==="multiselect"?(e.openBlock(),e.createElementBlock("div",m0,[e.createElementVNode("button",{class:"dss-filter-trigger",onClick:e.withModifiers(le=>yt(`${V.id}:val`),["stop"])},[e.createElementVNode("span",f0,e.toDisplayString(Q(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,p0),G.value===`${V.id}:val`?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-filter-popup",onClick:b[6]||(b[6]=e.withModifiers(()=>{},["stop"]))},[_t(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]=le=>F.value=le),placeholder:e.unref(D)("filter.search")},null,8,v0)),[[e.vModelText,F.value]]):e.createCommentVNode("",!0),e.createElementVNode("ul",g0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ut(V),le=>(e.openBlock(),e.createElementBlock("li",{key:le,class:"dss-filter-popup-item",onClick:He=>Xt(V,le)},[e.createElementVNode("input",{type:"checkbox",checked:(V.value||[]).includes(le),tabindex:"-1"},null,8,y0),e.createElementVNode("span",null,e.toDisplayString(le),1)],8,h0))),128)),Ut(V).length===0?(e.openBlock(),e.createElementBlock("li",k0,e.toDisplayString(e.unref(D)("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)},[...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",b0,[e.createElementVNode("div",w0,[e.createElementVNode("button",{class:"dss-filter-add-btn",onClick:b[7]||(b[7]=e.withModifiers(V=>yt("add"),["stop"]))},e.toDisplayString(e.unref(D)("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&&!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":b[8]||(b[8]=V=>F.value=V),placeholder:e.unref(D)("filter.searchAttributes")},null,8,x0),[[e.vModelText,F.value]]),e.createElementVNode("ul",E0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Xe.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),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,S0))),128)),te.value.length>0?(e.openBlock(),e.createElementBlock("li",V0)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.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,N0))),128))])],64)):Ee.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:"dss-filter-popup-back",onClick:b[9]||(b[9]=V=>Ee.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(Ee.value.label),1)]),e.withDirectives(e.createElementVNode("input",{type:"text",class:"dss-filter-popup-search","onUpdate:modelValue":b[10]||(b[10]=V=>F.value=V),placeholder:e.unref(D)("filter.searchAttributes")},null,8,B0),[[e.vModelText,F.value]]),e.createElementVNode("ul",M0,[(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=>he(V.key)},e.toDisplayString(V.label),9,_0))),128)),lt.value.length===0?(e.openBlock(),e.createElementBlock("li",$0,e.toDisplayString(e.unref(D)("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=>F.value=V),placeholder:e.unref(D)("filter.searchAttributes")},null,8,L0),[[e.vModelText,F.value]]),e.createElementVNode("ul",A0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ce.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,T0))),128)),Ce.value.length===0?(e.openBlock(),e.createElementBlock("li",D0,e.toDisplayString(e.unref(D)("filter.noMatch")),1)):e.createCommentVNode("",!0)])],64))])):e.createCommentVNode("",!0)]),ke.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-filter-clear-all",onClick:Ze},e.toDisplayString(e.unref(D)("filter.clearAllFilters")),1)):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],512)],2))}}),F0={class:"dss-pill-field__pills"},I0=["data-value"],z0=["disabled"],P0={class:"dss-pill-field__pill-text"},O0={key:0,class:"dss-pill-field__pill-actions"},q0=["onClick"],W0=["onClick"],Z0=["placeholder","disabled"],U0=e.defineComponent({__name:"DSSPillField",props:{modelValue:{default:()=>[]},placeholder:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(T,{emit:oe}){const _=T,D=oe,ce=e.ref(""),z=e.ref([..._.modelValue]),M=e.ref(null);let ve=null;const ut=e.ref(null),J=e.ref(""),v=e.ref(null),we=e.ref(null),ke=e.computed(()=>{if(!we.value)return;const{width:Me,height:Xe}=we.value;return{minWidth:`${Me}px`,height:`${Xe}px`}});function G(Me,Xe){ut.value===Xe&&(v.value=Me)}function X(){ut.value=null,J.value="",we.value=null,v.value=null}const me=e.computed(()=>new Set(z.value.map(Me=>Me.trim()).filter(Boolean)));function F(Me){M.value=Me,ve&&clearTimeout(ve),ve=setTimeout(()=>{M.value=null,ve=null},900)}function Ee(Me){const Xe=Me.trim();return Xe?me.value.has(Xe)?(F(Xe),!1):(z.value=[...z.value,Xe],D("update:modelValue",[...z.value]),!0):!1}function Te(Me){const Xe=Me.split(/\r?\n/g).map(et=>et.trim()).filter(Boolean);if(!Xe.length)return;const te=new Set(z.value.map(et=>et.trim()).filter(Boolean)),lt=[...z.value];let Ce=null;for(const et of Xe){if(te.has(et)){Ce??=et;continue}te.add(et),lt.push(et)}lt.length!==z.value.length&&(z.value=lt,D("update:modelValue",[...z.value])),Ce&&F(Ce)}function nt(Me){_.disabled||(ut.value===Me&&X(),z.value=z.value.filter((Xe,te)=>te!==Me),D("update:modelValue",[...z.value]))}async function pt(Me,Xe){if(_.disabled)return;const te=Xe.currentTarget.closest(".dss-pill-field__pill");te&&(we.value={width:te.offsetWidth,height:te.offsetHeight}),ut.value=Me,J.value=z.value[Me]??"",await e.nextTick();const lt=v.value;if(!lt)return;lt.focus();const Ce=lt.value.length;lt.setSelectionRange(Ce,Ce)}function W(){X()}function Ue(){if(_.disabled||ut.value===null)return;const Me=ut.value,Xe=z.value[Me]??"",te=J.value.trim();if(X(),te!==Xe&&me.value.has(te)){F(te);return}if(!te){z.value=z.value.filter((Ce,et)=>et!==Me),D("update:modelValue",[...z.value]);return}const lt=z.value.map((Ce,et)=>et===Me?te:Ce);z.value=lt,D("update:modelValue",[...z.value])}function We(Me){Me.preventDefault(),!_.disabled&&(Ee(ce.value),ce.value="")}function xe(Me){if(_.disabled)return;const Xe=Me.clipboardData?.getData("text")??"";!Xe.includes(`
118
+ `)&&!Xe.includes("\r")||(Me.preventDefault(),Te(Xe),ce.value="")}return e.watch(()=>_.modelValue,Me=>{z.value=Array.isArray(Me)?[...Me]:[]},{deep:!0}),e.onBeforeUnmount(()=>{ve&&clearTimeout(ve)}),(Me,Xe)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dss-pill-field",{"dss-pill-field--disabled":Me.disabled}])},[e.createElementVNode("div",F0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z.value,(te,lt)=>(e.openBlock(),e.createElementBlock("span",{key:te,class:e.normalizeClass(["dss-pill-field__pill",{"dss-pill-field__pill--highlight":M.value===te,"dss-pill-field__pill--editing":ut.value===lt}]),style:e.normalizeStyle(ut.value===lt&&we.value?ke.value:void 0)},[ut.value===lt?(e.openBlock(),e.createElementBlock("span",{key:0,class:"dss-pill-field__pill-edit-wrap","data-value":J.value||" "},[e.withDirectives(e.createElementVNode("input",{ref_for:!0,ref:Ce=>G(Ce,lt),"onUpdate:modelValue":Xe[0]||(Xe[0]=Ce=>J.value=Ce),class:"dss-pill-field__pill-edit",type:"text",disabled:Me.disabled,onKeydown:[e.withKeys(Ue,["enter"]),e.withKeys(W,["esc"])],onBlur:Ue},null,40,z0),[[e.vModelText,J.value]])],8,I0)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("span",P0,e.toDisplayString(te),1),Me.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",O0,[e.createElementVNode("button",{type:"button",class:"dss-pill-field__pill-action",onClick:Ce=>pt(lt,Ce)},[...Xe[2]||(Xe[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,q0),e.createElementVNode("button",{type:"button",class:"dss-pill-field__pill-action dss-pill-field__pill-action--remove",onClick:Ce=>nt(lt)}," × ",8,W0)]))],64))],6))),128)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":Xe[1]||(Xe[1]=te=>ce.value=te),class:"dss-pill-field__input",type:"text",placeholder:z.value.length?"":Me.placeholder,disabled:Me.disabled,onPaste:xe,onKeydown:e.withKeys(We,["enter"])},null,40,Z0),[[e.vModelText,ce.value]])])],2))}}),X0={class:"dss-step-bar__header"},Y0={class:"dss-step-bar__label"},j0={key:0,class:"dss-step-bar__counter"},K0={class:"dss-step-bar__track-wrapper"},G0=["aria-valuemax","aria-valuenow","aria-label"],Q0=["onMouseenter"],J0={__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:T=>["input","desc","asc"].includes(T)},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(T){const oe=T,_={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"}}},D=re=>re&&typeof re=="object"&&!Array.isArray(re),ce=(re,pe)=>{const De=Object.assign({},re);return!D(re)||!D(pe)||Object.keys(pe).forEach(_e=>{if(D(pe[_e])){_e in re?De[_e]=ce(re[_e],pe[_e]):Object.assign(De,{[_e]:pe[_e]});return}Object.assign(De,{[_e]:pe[_e]})}),De},z=e.computed(()=>ce(_,oe.options)),M=e.computed(()=>Math.max(1,Number(oe.steps)||1)),ve=e.computed(()=>Math.min(M.value,Math.max(0,Number(oe.currentStep)||0))),ut=e.computed(()=>Array.isArray(oe.segments)&&oe.segments.length>0),J=e.computed(()=>{if(!ut.value)return[];const re=oe.segments.map((pe,De)=>{const _e=Number(pe?.value);return{label:pe?.label||`Step ${De+1}`,value:Number.isFinite(_e)&&_e>0?_e:0,color:pe?.color||oe.activeColor,marker:pe?.marker}});return oe.segmentOrder==="desc"?[...re].sort((pe,De)=>De.value-pe.value):oe.segmentOrder==="asc"?[...re].sort((pe,De)=>pe.value-De.value):re}),v=e.computed(()=>ut.value?J.value.reduce((re,pe)=>re+pe.value,0):ve.value),we=e.computed(()=>ut.value?Number.isFinite(Number(oe.totalValue))&&Number(oe.totalValue)>0?Number(oe.totalValue):Math.max(1,v.value):M.value),ke=e.computed(()=>ut.value&&Number.isFinite(Number(oe.totalValue))&&Number(oe.totalValue)>0),G=e.computed(()=>ke.value?Math.max(0,Number(oe.totalValue)-v.value):0),X=e.computed(()=>typeof oe.remainderLabel=="string"&&oe.remainderLabel.trim().length>0),me=e.computed(()=>G.value>0),F=e.computed(()=>J.value.reduce((re,pe)=>Math.max(re,Number(pe.value)||0),0)),Ee=e.computed(()=>J.value.filter(re=>re.value>0).map(re=>`${re.label}: ${et(re.value)}`).join(" | ")),Te=e.computed(()=>ut.value?ke.value?J.value.filter(re=>re.value>0):J.value:[]),nt=e.computed(()=>{if(!oe.counterAsPercentage)return`${v.value} / ${we.value}`;const re=Number(we.value);if(!Number.isFinite(re)||re<=0)return"0%";const pe=Math.round(Number(v.value)/re*100);return`${Math.min(Math.max(pe,0),100)}%`}),pt=e.computed(()=>v.value),W=e.computed(()=>we.value),Ue=e.reactive({visible:!1,x:0,content:""}),We=e.computed(()=>({left:`${Ue.x}px`})),xe=re=>{const pe=re?.parentElement;return pe?pe.offsetLeft+pe.offsetWidth/2:0},Me=re=>{if(ke.value){const _e=Math.max(0,Number(re.value)||0);return{flex:`${_e} 0 0`,minWidth:_e>0?"6px":"0",backgroundColor:re.color}}const pe=v.value;return{flex:`${re.value>0?re.value:pe>0?1e-4:1} 0 0`,minWidth:"6px",backgroundColor:re.color}},Xe=re=>Number(re?.value||0)>0&&Number(re?.value||0)===F.value,te=re=>{const pe=D(re?.marker)?re.marker:{},De=re?.marker===!0||pe.enabled===!0,_e=Xe(re)&&z.value.maxSegment?.marker?.enabled===!0;if(!(De||_e))return{enabled:!1};const Ct=pe.backgroundColor??(_e?z.value.maxSegment?.marker?.backgroundColor:z.value.segmentMarker?.backgroundColor),tn=pe.borderColor??(_e?z.value.maxSegment?.marker?.borderColor:z.value.segmentMarker?.borderColor),_t=pe.color??(_e?z.value.maxSegment?.marker?.color:z.value.segmentMarker?.color),Ut=pe.width??(_e?z.value.maxSegment?.marker?.width:z.value.segmentMarker?.width),Q=pe.height??(_e?z.value.maxSegment?.marker?.height:z.value.segmentMarker?.height);return{enabled:!0,backgroundColor:Ct,borderColor:tn,color:_t,width:Ut,height:Q,icon:pe.icon??null,...pe}},lt=re=>{const pe=te(re);return{backgroundColor:pe.backgroundColor??void 0,borderColor:pe.borderColor??void 0,color:pe.color??void 0}},Ce=re=>{const pe=te(re);return{width:pe.width??void 0,height:pe.height??void 0}},et=re=>`${re}${oe.valueLabel}`,dt=e.computed(()=>({flex:`${G.value} 0 0`,minWidth:G.value>0?"6px":"0",backgroundColor:oe.inactiveColor})),yt=(re,pe)=>{if(!re||!pe?.currentTarget)return;const De=pe.currentTarget;if(oe.remainderTooltipSummary){Ue.x=xe(De),Ue.content=Ee.value,Ue.visible=!!Ue.content;return}Ue.x=De.offsetLeft+De.offsetWidth/2,Ue.content=`${re.label}: ${et(re.value)}`,Ue.visible=!0},Et=re=>{if(!G.value||!re?.currentTarget)return;const pe=re.currentTarget;if(oe.remainderTooltipSummary){Ue.x=xe(pe),Ue.content=Ee.value,Ue.visible=!!Ue.content;return}Ue.x=pe.offsetLeft+pe.offsetWidth/2,X.value&&(Ue.content=`${oe.remainderLabel}: ${et(G.value)}`,Ue.visible=!0)},Ht=()=>{Ue.visible=!1},It=e.computed(()=>({"--dss-step-bar-label-color":oe.labelColor??void 0,"--dss-step-bar-counter-color":oe.counterColor??void 0,"--dss-step-bar-active-color":oe.activeColor,"--dss-step-bar-inactive-color":oe.inactiveColor}));return(re,pe)=>(e.openBlock(),e.createElementBlock("div",{class:"dss-step-bar",style:e.normalizeStyle(It.value)},[e.createElementVNode("div",X0,[e.createElementVNode("span",Y0,[e.renderSlot(re.$slots,"label",{label:T.label},()=>[e.createTextVNode(e.toDisplayString(T.label),1)])]),T.showCounter?(e.openBlock(),e.createElementBlock("span",j0,[e.renderSlot(re.$slots,"counter",{counterDisplay:nt.value},()=>[e.createTextVNode(e.toDisplayString(nt.value),1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",K0,[e.createElementVNode("div",{class:"dss-step-bar__track",role:"progressbar","aria-valuemin":0,"aria-valuemax":W.value,"aria-valuenow":pt.value,"aria-label":T.label},[ut.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Te.value,(De,_e)=>(e.openBlock(),e.createElementBlock("div",{key:`segment-${_e}-${De.label}`,class:e.normalizeClass(["dss-step-bar__segment dss-step-bar__segment--interactive",{"dss-step-bar__segment--max":Xe(De),"dss-step-bar__segment--marker-enabled":te(De).enabled}]),style:e.normalizeStyle(Me(De)),onMouseenter:Jt=>yt(De,Jt),onMouseleave:Ht},[te(De).enabled?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-step-bar__segment-marker",style:e.normalizeStyle(lt(De)),"aria-hidden":"true"},[e.createElementVNode("span",{class:"dss-step-bar__segment-marker-icon",style:e.normalizeStyle(Ce(De))},[e.renderSlot(re.$slots,"segment-marker-icon",{segment:De,index:_e,marker:te(De)},()=>[e.renderSlot(re.$slots,"max-segment-icon",{segment:De,index:_e,marker:te(De)},()=>[e.createTextVNode(e.toDisplayString(te(De).icon||""),1)])])],4)],4)):e.createCommentVNode("",!0)],46,Q0))),128)),me.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-step-bar__segment dss-step-bar__segment--remainder",style:e.normalizeStyle(dt.value),onMouseenter:pe[0]||(pe[0]=De=>Et(De)),onMouseleave:Ht},null,36)):e.createCommentVNode("",!0)],64)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(M.value,De=>(e.openBlock(),e.createElementBlock("div",{key:De,class:e.normalizeClass(["dss-step-bar__segment",{"dss-step-bar__segment--active":De<=ve.value}])},null,2))),128))],8,G0),Ue.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-step-bar__tooltip",style:e.normalizeStyle(We.value)},e.toDisplayString(Ue.content),5)):e.createCommentVNode("",!0)])],4))}},e9={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"}},t9={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"},n9={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"}},l9={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"}},o9={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"}},uo={chart:e9,table:t9,filter:n9,datepicker:l9,textEditor:o9},a9={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"}},s9={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"},r9={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"}},i9={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"}},c9={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"}},mo={chart:a9,table:s9,filter:r9,datepicker:i9,textEditor:c9},u9={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"}},d9={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"},m9={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"}},p9={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"}},f9={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"}},po={chart:u9,table:d9,filter:m9,datepicker:p9,textEditor:f9},Po={en:uo,fr:mo,nl:po};function ma(T){if(!T||!T.global)return;const oe=T.global.availableLocales||[];Object.keys(Po).forEach(_=>{oe.includes(_)&&T.global.mergeLocaleMessage(_,Po[_])})}const Oo={en:{textEditor:uo.textEditor},fr:{textEditor:mo.textEditor},nl:{textEditor:po.textEditor}};function pa(T){if(!T||!T.global)return;const oe=T.global.availableLocales||[];Object.keys(Oo).forEach(_=>{oe.includes(_)&&T.global.mergeLocaleMessage(_,Oo[_])})}const qo={en:{table:uo.table},fr:{table:mo.table},nl:{table:po.table}};function fa(T){if(!T||!T.global)return;const oe=T.global.availableLocales||[];Object.keys(qo).forEach(_=>{oe.includes(_)&&T.global.mergeLocaleMessage(_,qo[_])})}const Wo={en:{datepicker:uo.datepicker},fr:{datepicker:mo.datepicker},nl:{datepicker:po.datepicker}};function va(T){if(!T||!T.global)return;const oe=T.global.availableLocales||[];Object.keys(Wo).forEach(_=>{oe.includes(_)&&T.global.mergeLocaleMessage(_,Wo[_])})}const Zo={en:{filter:uo.filter},fr:{filter:mo.filter},nl:{filter:po.filter}};function ga(T){if(!T||!T.global)return;const oe=T.global.availableLocales||[];Object.keys(Zo).forEach(_=>{oe.includes(_)&&T.global.mergeLocaleMessage(_,Zo[_])})}const v9={chart:Po,textEditor:Oo,table:qo,datepicker:Wo,filter:Zo};function g9(T){!T||!T.global||(ma(T),pa(T),fa(T),va(T),ga(T))}const h9={en:{...uo},fr:{...mo},nl:{...po}};co.createI18n({legacy:!1,locale:"en",fallbackLocale:"en",messages:h9});exports.DSSChart=fc;exports.DSSChartMessages=Po;exports.DSSColorPicker=n2;exports.DSSConfetti=_2;exports.DSSDatepicker=la;exports.DSSDatepickerMessages=Wo;exports.DSSDnd=B2;exports.DSSFilter=R0;exports.DSSFilterMessages=Zo;exports.DSSLoader=v2;exports.DSSMessages=v9;exports.DSSModal=na;exports.DSSPillField=U0;exports.DSSSkeleton=g2;exports.DSSStepBar=J0;exports.DSSTable=Hu;exports.DSSTableMessages=qo;exports.DSSTextEditor=zm;exports.DSSTextEditorMessages=Oo;exports.addDSSChartTranslations=ma;exports.addDSSDatepickerTranslations=va;exports.addDSSFilterTranslations=ga;exports.addDSSTableTranslations=fa;exports.addDSSTextEditorTranslations=pa;exports.addDSSTranslations=g9;