vue-data-ui 0.2.3 → 0.2.4
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/vue-data-ui.umd.cjs
CHANGED
|
@@ -370,12 +370,12 @@ Provide an array of objects of type:
|
|
|
370
370
|
isMultiselect: boolean;
|
|
371
371
|
isPercentage: boolean;
|
|
372
372
|
percentageTo: string; (or '')
|
|
373
|
-
}`);if(this.dataset.body.length===0)throw new Error("vue-ui-table error: missing body data");this.isLoading=!0,this.promiseWithAsyncFunction(this.prepareBodyCopy,()=>{this.$forceUpdate(),this.isLoading=!1}),document.addEventListener("keydown",t=>{const e=document.activeElement;(e&&Array.from(e.classList).includes("td-focusable")&&t.key.includes("Arrow")||t.code==="Space")&&t.preventDefault()})},watch:{showChart:function(t){t&&this.$nextTick(()=>{this.closeDragElement();const e=this.$refs.chartModal;e.onmousedown=this.dragMouseDown})}},computed:{availableDonutCategories(){return Object.keys(this.multiselects).map(t=>({index:t,name:this.dataset.header[t].name,options:this.multiselects[t]}))},canChart(){return this.tableConfig.useChart&&this.currentSelectionSpan.rows.length>1},chartData(){if(!this.canChart)return[];const t=316,e=512,r=this.currentSelectionSpan.rows.length,n=e/r,A=Math.max(...this.currentSelectionSpan.rows.map(p=>p.value)),a=Math.min(...this.currentSelectionSpan.rows.map(p=>p.value)),i=a>=0?0:Math.abs(a),s=A+i,l=A<0&&a<0,u=this.dataset.header[this.currentSelectionSpan.col].isPercentage,c=this.currentSelectionSpan.rows.map((p,d)=>({x:n*d+n/2,y:(1-(p.value+i)/s)*t,value:u?p.value*100:p.value,suffix:u?"%":this.dataset.header[this.currentSelectionSpan.col].suffix?this.dataset.header[this.currentSelectionSpan.col].suffix:"",prefix:this.dataset.header[this.currentSelectionSpan.col].prefix?this.dataset.header[this.currentSelectionSpan.col].prefix:"",index:p.index,absoluteValue:u?Math.abs(p.value)*100:Math.abs(p.value)})),g=t-t*(i/s);return{isAllNegative:l,zero:g,plots:c,slot:n,progression:c.length>=2?this.calcChartProgression(c):!1}},donutHollowLabels(){return{total:Number((this.currentDonut.map(t=>t.absoluteValue).reduce((t,e)=>t+e,0)*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),average:Number((this.currentDonut.map(t=>t.absoluteValue).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()}},hasNumericTypes(){return this.dataset.header.map(t=>t.type).includes(this.constants.NUMERIC)},icons(){return{arrowSort:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 9l4 -4l4 4m-4 -4v14" /><path d="M21 15l-4 4l-4 -4m4 4v-14" /></svg>`,bar:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 12m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M9 8m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M15 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M4 20l14 0" /></svg>`,chart:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 19l16 0" /><path d="M4 15l4 -6l4 2l4 -5l4 4" /></svg>`,chevronDown:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 9l6 6l6 -6" /></svg>`,chevronLeft:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*1.6}" height="${this.iconSize*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 6l-6 6l6 6" /></svg>`,chevronRight:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*1.6}" height="${this.iconSize*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 6l6 6l-6 6" /></svg>`,donut:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*.8}" height="${this.iconSize*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 3v5m4 4h5" /><path d="M8.929 14.582l-3.429 2.918" /><path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" /><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /></svg>`,export:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5" /><path d="M3 10h18" /><path d="M10 3v18" /><path d="M16 19h6" /><path d="M19 16l3 3l-3 3" /></svg>`,fileDownload:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 3v4a1 1 0 0 0 1 1h4" /><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /><path d="M12 17v-6" /><path d="M9.5 14.5l2.5 2.5l2.5 -2.5" /></svg>`,filter:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" /></svg>`,move:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 9l3 3l-3 3" /><path d="M15 12h6" /><path d="M6 9l-3 3l3 3" /><path d="M3 12h6" /><path d="M9 18l3 3l3 -3" /><path d="M12 15v6" /><path d="M15 6l-3 -3l-3 3" /><path d="M12 3v6" /></svg>`,sort09:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 3a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 16m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 16v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sort90:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 14a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 5v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sortAZ:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 10v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 21h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sortZA:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 21v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 10h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sum:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>`,table:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" fill="white" d="M 10 2, 21 2, 21 21, 10 21Z"/><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" /><path d="M3 10h18" /><path d="M10 3v18" /></svg>`,warning:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*.8}" height="${this.iconSize*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`}},pages(){const t=[];if(this.bodyCopy.length)for(let e=0;e<this.bodyCopy.length;e+=this.itemsPerPage)t.push(this.bodyCopy.slice(e,e+this.itemsPerPage));return t},rows(){return this.bodyCopy.map(t=>t.td)},selectedCellsCalculations(){return{sumPercentage:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)*100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),sumRegular:Number(this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),averagePercentage:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length*100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),averageRegular:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()}},tableConfig(){return Object.keys(this.config||{}).length?this.treeShake({defaultConfig:this.defaultConfig,userConfig:this.config}):this.defaultConfig},visibleRows(){return this.pages[this.currentPage]}},methods:{treeShake:ja,makeDonut:zh,applyDonutOption(){const t=this.selectedDonutCategory.options.map((e,r)=>({name:e,color:this.palette[r]||this.palette[r%this.palette.length],value:this.visibleRows.filter((n,A)=>n.td[this.selectedDonutCategory.index]===e&&this.currentSelectionSpan.rows.map(a=>a.index).includes(A)).map(n=>n.td[this.currentSelectionSpan.col]).reduce((n,A)=>Math.abs(n)+Math.abs(A),0),absoluteValue:this.visibleRows.filter((n,A)=>n.td[this.selectedDonutCategory.index]===e&&this.currentSelectionSpan.rows.map(a=>a.index).includes(A)).map(n=>n.td[this.currentSelectionSpan.col]).reduce((n,A)=>n+A,0)})).sort((e,r)=>r.value-e.value);this.currentDonut=this.makeDonut({series:t},50,50,30,30),this.$nextTick(()=>{this.chart.type=this.constants.DONUT,this.showDonutOptions=!1})},calcRectY(t,e){return t>=0?e:this.chartData.zero},canResetColumn(t,e){return!this.hasNaN[t]&&(e.isSort||e.isSearch||e.isMultiselect||e.rangeFilter)&&![this.constants.DATE].includes(e.type)},createXls(t="all"){const e=this.dataset.header.map(c=>c.name),r=t==="all"?this.bodyCopy.map(c=>c.td):this.visibleRows.map(c=>c.td),n=[e].concat(r);function A(c){let g=new ArrayBuffer(c.length),p=new Uint8Array(g);for(let d=0;d<c.length;d++)p[d]=c.charCodeAt(d)&255;return g}const a=Rr.book_new(),i=Rr.aoa_to_sheet(n);Rr.book_append_sheet(a,i,"Sheet1");const s=Ui(a,{bookType:"xlsx",type:"binary"}),l=new Blob([A(s)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),u=document.createElement("a");u.href=window.URL.createObjectURL(l),u.download="data.xlsx",u.click(),window.URL.revokeObjectURL(u.href),this.isExportRequest=!1},calcChartProgression(t){let e,r,n,A;const a=t.length;let i=0,s=0,l=0,u=0;for(const{x:p,y:d}of t)i+=p,s+=d,l+=p*d,u+=p*p;const c=(a*l-i*s)/(a*u-i*i),g=(s-c*i)/a;return e=t[0].x,n=t[a-1].x,r=c*e+g,A=c*n+g,{x1:e,y1:r,x2:n,y2:A,slope:c}},closeAllDropdowns(){const t=document.getElementsByClassName("th-dropdown");t.length&&Array.from(t).forEach(e=>{e.dataset.isOpen=!1})},debounce(t,e){let r;clearTimeout(r),r=setTimeout(t,e)},filterBody(){this.bodyCopy=this.tableBody.filter(t=>{for(const e in this.searches)if(!t.td[e].toUpperCase().includes(this.searches[e].toUpperCase()))return!1;for(const e in this.multiselects)if(!this.multiselects[e].some(n=>n===t.td[e]))return!1;for(const e in this.dates){const r=new Date(t.td[e]),n=new Date(this.dates[e].from),A=new Date(this.dates[e].to);if(r<n||r>A)return!1}return!0}),this.sortBody()},getAverage(t){return this.rows.map(e=>e[t]).map(e=>isNaN(Number(e))?0:e).reduce((e,r)=>e+r,0)/this.bodyCopy.length},getDatesRange(t){const e=this.dataset.body.map(p=>new Date(p.td[t])),r=new Date(Math.min(...e)),n=new Date(Math.max(...e)),A=r.getFullYear(),a=n.getFullYear(),i=String(r.getMonth()+1).padStart(2,"0"),s=String(n.getMonth()+1).padStart(2,"0"),l=String(r.getDate()).padStart(2,"0"),u=String(n.getDate()).padStart(2,"0"),c=`${A}-${i}-${l}`,g=`${a}-${s}-${u}`;return{from:c,to:g}},getDonutLegendValue(t){return Number((t*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()},getDropdownOptions(t){return[...new Set(this.dataset.body.map(e=>e.td[t]))]},getSum(t){return this.rows.map(e=>e[t]).map(e=>isNaN(Number(e))?0:e).reduce((e,r)=>e+r,0)},includesNaN(t){return t.includes(NaN)},isDropdownOptionSelected(t,e){return this.multiselects[e]?this.multiselects[e].includes(t):!0},isNumeric(t){return!isNaN(Number(String(t).replaceAll("%","")))},isResetDisabled(t,e){const r=e.isSort,n=e.isSearch,A=e.isMultiselect&&this.multiselects[t],a=e.rangeFilter,i=s=>{if(a&&this.rangeFilters[s])return Math.round(this.rangeFilters[s].min)===this.immutableRangeFilters[s].min&&Math.round(this.rangeFilters[s].max)===this.immutableRangeFilters[s].max};if(r&&n&&A&&a)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(r&&n&&A)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(r&&n&&a)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&i(t);if(r&&n)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t]);if(r&&A&&a)return[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(r&&A)return[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(n&&A&&a)return["",void 0].includes(this.searches[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(n&&A)return["",void 0].includes(this.searches[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(n&&a)return["",void 0].includes(this.searches[t])&&i(t);if(n)return["",void 0].includes(this.searches[t]);if(r&&a)return[void 0].includes(this.sorts[t])&&i(t);if(r)return[void 0].includes(this.sorts[t]);if(A&&a)return this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(A)return this.multiselects[t].length===this.getDropdownOptions(t).length},navigate(t){this.resetSelection(),t==="next"&&this.currentPage<this.pages.length?this.currentPage+=1:t==="previous"&&this.currentPage>=1?this.currentPage-=1:this.currentPage=t-1,this.$refs.tableWrapper.scrollTo({top:0,left:0,behavior:"smooth"})},navigateCell(t){t.preventDefault();const e=t.keyCode,r=38,n=40,A=37,a=39;if(![r,n,A,a].includes(e))return;const i=t.target.id,s=/cell_(\d+)_(\d+)_vue-ui-table-(\d+)/,l=i.match(s),u=parseInt(l[1]),c=parseInt(l[2]),g=document.getElementById(`cell_${u}_${c+1}_${this.uid}`),p=document.getElementById(`cell_${u}_${c-1}_${this.uid}`),d=document.getElementById(`cell_${u+1}_${c}_${this.uid}`),y=document.getElementById(`cell_${u-1}_${c}_${this.uid}`);let v;switch(!0){case e===a:v=g;break;case e===A:v=p;break;case e===r:v=y;break;case e===n:v=d;break;default:return}v&&(v.focus(),v.scrollIntoView({behavior:"smooth",block:"center"}))},openDonutOptions(){this.selectedDonutCategory=this.availableDonutCategories[0],this.showDonutOptions=!0},placeLabelOnTopOrBottom({previousPlot:t,currentPlot:e,nextPlot:r}){const n=e.y-38,A=e.y+16;return t&&r?t.value<e.value&&r.value<e.value?n:t.value>e.value&&r.value>e.value?A:(t.value>e.value&&r.value<e.value||t.value<e.value&&r.value>e.value,n):t&&!r?t.value>e.value?A:n:!t&&r&&r.value>e.value?A:n},async prepareBodyCopy(){return new Promise(t=>{const e=[];this.tableHead.forEach((r,n)=>{if(r.isSearch&&Object.assign(this.searches,{[n]:""}),r.isMultiselect&&Object.assign(this.multiselects,{[n]:this.getDropdownOptions(n)}),r.type===this.constants.DATE&&(Object.assign(this.dates,{[n]:this.getDatesRange(n)}),Object.assign(this.filteredDatesIndexes,{[n]:!1})),(r.isPercentage||r.percentageTo)&&Object.assign(this.percentages,{[n]:{reference:r.percentageTo,referenceIndex:this.dataset.header.map(A=>A.name).indexOf(r.percentageTo)}}),r.rangeFilter&&(Object.assign(this.rangeFilters,{[n]:{min:Math.round(Math.min(...this.dataset.body.map(A=>A.td).map(A=>A[n]))),max:Math.round(Math.max(...this.dataset.body.map(A=>A.td).map(A=>A[n])))}}),Object.assign(this.immutableRangeFilters,{[n]:{min:Math.round(Math.min(...this.dataset.body.map(A=>A.td).map(A=>A[n]))),max:Math.round(Math.max(...this.dataset.body.map(A=>A.td).map(A=>A[n])))}})),r.isPercentage){const A=this.dataset.header.map(i=>i.name).indexOf(r.percentageTo),a=this.dataset.body.map(i=>i.td[A]).reduce((i,s)=>i+s,0);e.push([n,A,a])}r.type===this.constants.NUMERIC&&!r.isPercentage&&Object.assign(this.hasNaN,{[n]:this.includesNaN(this.dataset.body.map(A=>Number(A.td[n])))})}),this.bodyCopy.forEach((r,n)=>{e.map(A=>{const[a,i,s]=A;r.td[a]=r.td[i]/s}),r.td.forEach((A,a)=>{this.dataset.header[a].type===this.constants.TEXT&&this.dataset.header[a].isSearch&&(r[a]=this.stringToNumber(A)),this.dataset.header[a].type===this.constants.DATE&&(r[a]=new Date(A).getTime()),this.dataset.header[a].type===this.constants.NUMERIC&&(r[a]=isNaN(Number(A))?a:A),this.tableBody[n][a]=r[a]})}),t(!0)})},promiseWithAsyncFunction(t,e){return new Promise((r,n)=>{t().then(A=>{try{const a=e(A);r(a)}catch(a){n(a)}}).catch(A=>{n(A)})})},resetDates(t){this.dates[t]={from:this.getDatesRange(t).from,to:this.getDatesRange(t).to},this.filteredDatesIndexes[t]=!1,this.$forceUpdate(),this.filterBody()},resetFilter(t,e,r){const n=r.currentTarget;clearTimeout(this.buttonTimeout),n.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{n.classList.remove("clicked")},200),this.currentFilter=void 0,e.rangeFilter&&(this.rangeFilters[t].min=this.immutableRangeFilters[t].min,this.rangeFilters[t].max=this.immutableRangeFilters[t].max),e.isMultiselect?(this.multiselects[t]=this.getDropdownOptions(t),e.type===this.constants.TEXT&&(this.sorts[t]=void 0),e.isSearch&&(this.searches[t]="")):e.type===this.constants.NUMERIC?this.sorts[t]=void 0:e.type===this.constants.TEXT?(this.sorts[t]=void 0,this.searches[t]=""):e.type===this.constants.DATE&&(this.sorts[t]=void 0),this.filterBody()},resetSelection(){const t=document.getElementsByClassName(`tr_${this.uid}`);Array.from(t).forEach(e=>{Array.from(e.getElementsByTagName("td")).forEach(r=>{r.dataset.row==="even"?(r.style.background=this.tableConfig.style.rows.even.backgroundColor,r.style.color=this.tableConfig.style.rows.even.color):(r.style.background=this.tableConfig.style.rows.odd.backgroundColor,r.style.color=this.tableConfig.style.rows.odd.color)})}),Array.from(t).forEach(e=>e.dataset.selected="false"),this.currentPage>this.pages.length-1&&(this.currentPage=this.pages.length-1),this.showChart=!1,this.currentDonut=void 0,this.selectedColumn=void 0,this.chart.type=this.constants.BAR,this.currentSelectionSpan={col:void 0,rows:[]},this.clientX=100,this.clientY=100},selectColumn(t){this.currentSelectionSpan.col!==t?(this.visibleRows.forEach((e,r)=>{this.selectTd({td:e.td[t],rowIndex:r,colIndex:t,headerType:this.constants.NUMERIC,event:{currentTarget:document.getElementById(`cell_${r}_${t}_${this.uid}`)}})}),this.selectedColumn=t):(this.selectedColumn=void 0,this.resetSelection())},selectDropdownOption(t,e){this.multiselects[e].includes(t)?this.multiselects[e]=this.multiselects[e].filter(r=>r!==t):this.multiselects[e].push(t),this.$forceUpdate(),this.filterBody()},selectTd({td:t,rowIndex:e,colIndex:r,headerType:n,event:A}){if(n!==this.constants.NUMERIC||isNaN(Number(t))){this.resetSelection();return}this.currentSelectionSpan.col!==r&&this.resetSelection();const a=A.currentTarget.parentNode;this.currentSelectionSpan.col=r,this.currentSelectionSpan.rows.map(i=>i.index).includes(e)?(a.dataset.selected="false",this.currentSelectionSpan.rows=this.currentSelectionSpan.rows.filter(i=>i.index!==e),A.currentTarget.classList.remove(this.cssClass.CELL),Array.from(a.children).forEach((i,s)=>{i.dataset.row==="even"?(i.style.background=this.tableConfig.style.rows.even.backgroundColor,i.style.color=this.tableConfig.style.rows.even.olor):(i.style.background=this.tableConfig.style.rows.odd.backgroundColor,i.style.color=this.tableConfig.style.rows.odd.color)}),A.currentTarget.dataset.row==="even"?(A.currentTarget.style.background=this.tableConfig.style.rows.even.backgroundColor,A.currentTarget.style.color=this.tableConfig.style.rows.even.color):(A.currentTarget.style.background=this.tableConfig.style.rows.odd.backgroundColor,A.currentTarget.style.color=this.tableConfig.style.rows.odd.color)):(a.dataset.selected="true",this.currentSelectionSpan.rows.push({index:e,value:t}),Array.from(a.children).forEach((i,s)=>{i.dataset.row==="even"?(i.style.background=this.tableConfig.style.rows.even.selectedNeighbors.backgroundColor,i.style.color=this.tableConfig.style.rows.even.selectedNeighbors.color):(i.style.background=this.tableConfig.style.rows.odd.selectedNeighbors.backgroundColor,i.style.color=this.tableConfig.style.rows.odd.selectedNeighbors.color)}),A.currentTarget.dataset.row==="odd"?(A.currentTarget.style.background=this.tableConfig.style.rows.odd.selectedCell.backgroundColor,A.currentTarget.style.color=this.tableConfig.style.rows.odd.selectedCell.color):(A.currentTarget.style.background=this.tableConfig.style.rows.even.selectedCell.backgroundColor,A.currentTarget.style.color=this.tableConfig.style.rows.even.selectedCell.color)),this.currentSelectionSpan.rows=this.currentSelectionSpan.rows.sort((i,s)=>i.index-s.index),this.chart.type===this.constants.DONUT&&this.currentSelectionSpan.rows.length>0&&this.applyDonutOption()},setFilterDatesIndexes(t){this.filteredDatesIndexes[t]=!(this.getDatesRange(t).from===this.dates[t].from&&this.getDatesRange(t).to===this.dates[t].to)},sortBody(){this.resetSelection(),Object.keys(this.rangeFilters).forEach(t=>{this.filterByRange(this.bodyCopy,t)}),Object.keys(this.sorts).forEach(t=>{this.sortByNumber(this.bodyCopy,t)}),this.currentFilter!==void 0&&this.sortByNumber(this.bodyCopy,this.currentFilter),this.dataset.header.forEach((t,e)=>{if(t.isPercentage){const r=this.percentages[e].referenceIndex,n=this.bodyCopy.map(A=>A.td[r]).reduce((A,a)=>A+a,0);this.bodyCopy.forEach(A=>{A.td[e]=A.td[r]/n})}}),this.currentPage>this.pages.length-1&&(this.currentPage=this.pages.length-1),[-1].includes(this.currentPage)&&(this.currentPage=0),this.$forceUpdate()},filterByRange(t,e){this.bodyCopy=t.filter(r=>r.td[e]>=this.rangeFilters[e].min&&r[e]<=this.rangeFilters[e].max)},sortByNumber(t,e){if(this.sorts[e]===this.constants.ASC&&(t=t.sort((r,n)=>r[e]-n[e])),this.sorts[e]===this.constants.DESC)t=t.sort((r,n)=>n[e]-r[e]);else return 0},sortTh(t,e){this.currentFilter=t;const r=e.currentTarget;clearTimeout(this.buttonTimeout),r.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{r.classList.remove("clicked")},200),this.sorts[t]===1?this.sorts[t]=this.constants.DESC:this.sorts[t]=this.constants.ASC,this.sortBody()},stringToNumber(t){let e=0;for(let r=0;r<t.length;r+=1)e+=t.charCodeAt(r);return e},toggleMultiselect(t,e,r){const n=r.currentTarget;clearTimeout(this.buttonTimeout),n.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{n.classList.remove("clicked")},200);const A=document.getElementById(`th_dropdown_${t}`);A.dataset.isOpen==="false"?A.dataset.isOpen="true":A.dataset.isOpen="false"},updateCurrentPage(t){this.resetSelection(),this.currentPage=Number(t.target.value)},calcDonutMarkerConnectorColor(t){return t.proportion*100>3?t.color:"transparent"},calcDonutMarkerLabelPositionX(t){return t.center.endX+this.calcMarkerOffset(t,50)},calcMarkerOffset(t,e){return t.center.endX-e>=0?3:-2},displayArcPercentage(t,e){return isNaN(t.value/this.sumValues(e))?0:(t.value/this.sumValues(e)*100).toFixed(0)+"%"},isArcBigEnough(t){return t.proportion*100>3},sumValues(t){return[...t].map(e=>e.value).reduce((e,r)=>e+r,0)},closeDragElement(){document.onmouseup=null,document.onmousemove=null},dragMouseDown(t){t=t||window.event,t.preventDefault(),document.onmouseup=this.closeDragElement,document.onmousemove=this.elementDrag},elementDrag(t){this.rafId||(this.rafId=window.requestAnimationFrame(()=>this.onElementDrag(t)))},onElementDrag(t){t=t||window.event,t.preventDefault();const r=this.$refs.chartModal.getBoundingClientRect();this.clientX=t.clientX-r.width/2,this.clientY=t.clientY-r.height/2,this.rafId=null}}},qA=t=>(o.pushScopeId("data-v-80d709a0"),t=t(),o.popScopeId(),t),f7={class:"vue-ui-table-export-hub"},d7=["innerHTML"],g7=["data-is-open"],p7=qA(()=>o.createElementVNode("b",{class:"vue-ui-table-export-hub-title"}," Export ",-1)),m7={class:"vue-ui-table-export-hub-options"},v7={class:"vue-ui-table-export-hub-option-wrapper"},y7={class:"label"},w7=["innerHTML"],B7={class:"vue-ui-table-export-hub-option-wrapper"},x7={class:"label"},b7=["innerHTML"],C7={class:"vue-ui-table"},E7={id:"tableHead"},F7=qA(()=>o.createElementVNode("th",{class:"invisible-cell"},null,-1)),S7={key:0},_7={key:0},k7={key:1},T7=qA(()=>o.createElementVNode("th",{class:"invisible-cell"},null,-1)),N7={key:0,style:{display:"flex","align-items":"center","justify-content":"flex-end"}},L7=["innerHTML"],U7={key:0,style:{"margin-left":"3px"}},I7=qA(()=>o.createElementVNode("th",{class:"invisible-cell"},null,-1)),Q7={key:0},D7=qA(()=>o.createElementVNode("th",{class:"invisible-cell"},null,-1)),O7={class:"th-filter"},P7={key:0,class:"th-date"},M7={class:"date-wrapper--inputs"},R7={class:"date-fieldset"},H7=["for"],V7=["id","onUpdate:modelValue","onInput"],$7={class:"date-fieldset"},z7=["for"],K7=["id","onUpdate:modelValue","onInput"],G7={class:"date-wrapper--button"},j7=["onClick"],W7=["innerHTML"],X7=["innerHTML"],q7=["innerHTML"],Y7=["onClick","disabled"],J7=["placeholder","onUpdate:modelValue","name"],Z7=["onClick"],eP=["innerHTML"],tP=["innerHTML"],rP=["innerHTML"],nP=["onClick","innerHTML"],AP=["innerHTML"],aP={key:5,class:"th-range-filter"},iP=["for"],oP=qA(()=>o.createElementVNode("span",{style:{color:"grey"}},"ᒥ",-1)),sP=qA(()=>o.createElementVNode("span",{style:{color:"grey"}},"ᒣ",-1)),lP=["id","max","min","onUpdate:modelValue"],cP=["id","max","min","onUpdate:modelValue"],uP=["for"],hP=qA(()=>o.createElementVNode("span",{style:{color:"grey"}},"ᒪ",-1)),fP=qA(()=>o.createElementVNode("span",{style:{color:"grey"}},"ᒧ",-1)),dP=["onClick","disabled"],gP=["id"],pP=["onClick"],mP=["onClick","onKeyup"],vP=qA(()=>o.createElementVNode("th",{class:"invisible-cell"},null,-1)),yP=["innerHTML","onClick","onKeyup"],wP=["data-row"],BP=["data-row"],xP=["data-row","onClick","onKeyup","id"],bP=["innerHTML"],CP={key:1},EP={key:2},FP={key:5},SP=["innerHTML"],_P={key:0},kP={style:{"margin-left":"12px"}},TP={class:"format-num"},NP={style:{"margin-left":"12px"}},LP={key:0,class:"format-num"},UP={key:1,class:"format-num"},IP={key:2},QP={style:{"margin-left":"12px"}},DP={key:0,class:"format-num"},OP={key:1,class:"format-num"},PP={key:2},MP={key:0,class:"vue-ui-table-paginator format-num"},RP={key:1,class:"vue-ui-table-size-warning"},HP=["innerHTML"],VP={key:3,class:"vue-ui-table-pagination format-num"},$P=["innerHTML","disabled"],zP=["disabled"],KP={key:0,class:"vue-ui-table-page-scroller-wrapper"},GP={for:"pageScroller",style:{"font-size":"14px"}},jP=["max","value"],WP={key:1},XP=["disabled"],qP=["innerHTML","disabled"],YP={class:"chart-modal-options"},JP=["innerHTML"],ZP=["innerHTML"],eM=["innerHTML"],tM={style:{"margin-bottom":"12px"}},rM={key:0},nM={key:1},AM={style:{width:"100%",height:"fit-content",cursor:"move"},ref:"chartModal"},aM={class:"vue-ui-table-fieldset"},iM={class:"vue-ui-table-fieldset-wrapper"},oM=["name","id","checked","onInput"],sM=["for"],lM=["disabled"],cM=["innerHTML"],uM=["viewBox"],hM=["markerWidth","markerHeight","refY"],fM=["points","fill"],dM=["x2","y1","y2","stroke","stroke-width"],gM=["y2","stroke","stroke-width"],pM=["x","width","height","fill"],mM=o.createStaticVNode('<linearGradient id="barGradientSelected" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DD" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DD80" data-v-80d709a0></stop></linearGradient><linearGradient id="barGradientSelectedNeg" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DD80" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DD" data-v-80d709a0></stop></linearGradient><linearGradient id="barGradient" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DDB3" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DD66" data-v-80d709a0></stop></linearGradient><linearGradient id="barGradientNeg" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DD66" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DDB3" data-v-80d709a0></stop></linearGradient>',4),vM=["x","y","height","width","fill","stroke"],yM=["x","y","width"],wM=["x1","y1","x2","y2","stroke-width","stroke"],BM=["x1","y1","x2","y2","stroke","stroke-width","stroke-dasharray"],xM=["cx","cy","r","fill","stroke","stroke-width"],bM=["x","y","width"],CM=["x","width","height","onMouseenter"],EM=["x1","y1","x2","y2","stroke","stroke-width","stroke-dasharray"],FM=qA(()=>o.createElementVNode("span",null,"---",-1)),SM=["d","stroke"],_M=["x","y"],kM={class:"vue-ui-table-donut-label-name"},TM=["fill"],NM=["fill"],LM=["fill"],UM=["fill"],IM={class:"vue-ui-table-donut-legend"};function QM(t,e,r,n,A,a){return o.openBlock(),o.createElementBlock("div",{class:"vue-ui-table-main",style:o.normalizeStyle(`font-family: ${a.tableConfig.fontFamily}`)},[o.createElementVNode("div",f7,[o.createElementVNode("button",{onClick:e[0]||(e[0]=i=>A.isExportRequest=!A.isExportRequest),innerHTML:a.icons.export,style:o.normalizeStyle(`background:${a.tableConfig.style.exportMenu.backgroundColor};color:${a.tableConfig.style.exportMenu.color}`)},null,12,d7),o.createElementVNode("div",{class:"vue-ui-table-export-hub-dropdown","data-is-open":A.isExportRequest||"false",style:o.normalizeStyle(`background:${a.tableConfig.style.exportMenu.backgroundColor};color:${a.tableConfig.style.exportMenu.color}`)},[p7,o.createElementVNode("button",{class:"close-dropdown",onClick:e[1]||(e[1]=i=>A.isExportRequest=!1),style:o.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color};border-radius:${a.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4),o.createElementVNode("div",m7,[o.createElementVNode("div",v7,[o.createElementVNode("div",y7,o.toDisplayString(a.tableConfig.translations.exportAllLabel)+" ("+o.toDisplayString(A.bodyCopy.length)+") ",1),o.createElementVNode("button",{id:"exportAll",onClick:e[2]||(e[2]=i=>a.createXls("all")),style:o.normalizeStyle(`background:${a.tableConfig.style.exportMenu.buttons.backgroundColor};color:${a.tableConfig.style.exportMenu.buttons.color}`)},[o.createElementVNode("div",{innerHTML:a.icons.fileDownload},null,8,w7),o.createElementVNode("span",null,o.toDisplayString(a.tableConfig.translations.exportAllButton),1)],4)]),o.createElementVNode("div",B7,[o.createElementVNode("div",x7,o.toDisplayString(a.tableConfig.translations.exportPageLabel),1),o.createElementVNode("button",{id:"exportPage",onClick:e[3]||(e[3]=i=>a.createXls("page")),style:o.normalizeStyle(`background:${a.tableConfig.style.exportMenu.buttons.backgroundColor};color:${a.tableConfig.style.exportMenu.buttons.color}`)},[o.createElementVNode("div",{innerHTML:a.icons.fileDownload},null,8,b7),o.createElementVNode("span",null,o.toDisplayString(a.tableConfig.translations.exportPageButton),1)],4)])])],12,g7)]),o.createElementVNode("div",{class:"vue-ui-table__wrapper",style:o.normalizeStyle(`max-height:${a.tableConfig.maxHeight}px`),ref:"tableWrapper"},[o.createElementVNode("table",C7,[o.createElementVNode("thead",E7,[o.createElementVNode("tr",null,[F7,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.tableHead,(i,s)=>(o.openBlock(),o.createElementBlock("th",{key:`thead_${s}`,style:o.normalizeStyle(`overflow: visible;background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`),class:o.normalizeClass({"th-has-nan":A.hasNaN[s]})},[a.hasNumericTypes&&([A.constants.TEXT,A.constants.DATE].includes(i.type)||i.isPercentage)?(o.openBlock(),o.createElementBlock("span",S7,[o.createTextVNode(o.toDisplayString(i.name)+" ",1),i.isPercentage?(o.openBlock(),o.createElementBlock("span",_7," / "+o.toDisplayString(i.percentageTo),1)):o.createCommentVNode("",!0)])):(o.openBlock(),o.createElementBlock("span",k7,o.toDisplayString(i.name),1))],6))),128))]),a.hasNumericTypes?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("tr",null,[T7,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.tableHead,(i,s)=>(o.openBlock(),o.createElementBlock("th",{key:`thead_${s}`,class:o.normalizeClass({"th-numeric":!0,"th-has-nan":A.hasNaN[s]}),style:o.normalizeStyle(`background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[i.sum&&!A.hasNaN[s]?(o.openBlock(),o.createElementBlock("span",N7,[o.createElementVNode("span",{innerHTML:a.icons.sum,style:{"margin-bottom":"-4px","margin-right":"3px"}},null,8,L7),o.createTextVNode(" "+o.toDisplayString(i.prefix)+" "+o.toDisplayString(Number(a.getSum(s).toFixed(i.decimals)).toLocaleString())+" "+o.toDisplayString(i.suffix)+" ",1),A.percentages[s]&&i.percentageTo&&!i.isPercentage?(o.openBlock(),o.createElementBlock("span",U7," ("+o.toDisplayString(isNaN(a.getSum(s)/a.getSum(A.percentages[s].referenceIndex))?"-":(a.getSum(s)/a.getSum(A.percentages[s].referenceIndex)*100).toFixed(i.decimals))+"%) ",1)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)],6))),128))]),o.createElementVNode("tr",null,[I7,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.tableHead,(i,s)=>(o.openBlock(),o.createElementBlock("th",{key:`thead_${s}`,class:o.normalizeClass({"th-numeric":!0,"th-has-nan":A.hasNaN[s]}),style:o.normalizeStyle(`background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[i.average&&!A.hasNaN[s]?(o.openBlock(),o.createElementBlock("span",Q7," ~ "+o.toDisplayString(i.prefix)+" "+o.toDisplayString(isNaN(a.getAverage(s))?"":Number(a.getAverage(s).toFixed(i.decimals)).toLocaleString())+" "+o.toDisplayString(i.suffix),1)):o.createCommentVNode("",!0)],6))),128))]),o.createElementVNode("tr",null,[D7,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.tableHead,(i,s)=>(o.openBlock(),o.createElementBlock("th",{key:`thead_${s}`,class:o.normalizeClass({"th-has-nan":A.hasNaN[s]}),style:o.normalizeStyle(`background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[o.createElementVNode("div",O7,[i.type===A.constants.DATE&&A.dates[s]?(o.openBlock(),o.createElementBlock("div",P7,[o.createElementVNode("div",M7,[o.createElementVNode("div",R7,[o.createElementVNode("label",{for:`from_${s}`},o.toDisplayString(a.tableConfig.translations.from),9,H7),o.withDirectives(o.createElementVNode("input",{id:`from_${s}`,type:"date","onUpdate:modelValue":l=>A.dates[s].from=l,onInput:l=>{a.filterBody(),a.setFilterDatesIndexes(s)},style:o.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,V7),[[o.vModelText,A.dates[s].from]])]),o.createElementVNode("div",$7,[o.createElementVNode("label",{for:`to_${s}`},o.toDisplayString(a.tableConfig.translations.to),9,z7),o.withDirectives(o.createElementVNode("input",{id:`to_${s}`,type:"date","onUpdate:modelValue":l=>A.dates[s].to=l,onInput:l=>{a.filterBody(),a.setFilterDatesIndexes(s)},style:o.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,K7),[[o.vModelText,A.dates[s].to]])])]),o.createElementVNode("div",G7,[i.isSort?(o.openBlock(),o.createElementBlock("button",{key:0,onClick:l=>a.sortTh(s,l),class:o.normalizeClass({"th-button-active":[A.constants.DESC,A.constants.ASC].includes(A.sorts[s])}),style:o.normalizeStyle(`background:${[A.constants.DESC,A.constants.ASC].includes(A.sorts[s])?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${[A.constants.DESC,A.constants.ASC].includes(A.sorts[s])?"":a.tableConfig.style.pagination.buttons.color}`)},[A.sorts[s]===A.constants.ASC?(o.openBlock(),o.createElementBlock("span",{key:0,innerHTML:[A.constants.DATE].includes(i.type)?a.icons.sort09:a.icons.sortAZ},null,8,W7)):A.sorts[s]===A.constants.DESC?(o.openBlock(),o.createElementBlock("span",{key:1,innerHTML:[A.constants.DATE].includes(i.type)?a.icons.sort90:a.icons.sortZA},null,8,X7)):(o.openBlock(),o.createElementBlock("span",{key:2,innerHTML:a.icons.arrowSort},null,8,q7))],14,j7)):o.createCommentVNode("",!0),o.createElementVNode("button",{onClick:l=>{a.resetDates(s),a.resetFilter(s,i,l)},disabled:!A.filteredDatesIndexes[s]&&a.isResetDisabled(s,i),class:"th-reset"}," ✖ ",8,Y7)])])):o.createCommentVNode("",!0),i.isSearch?o.withDirectives((o.openBlock(),o.createElementBlock("input",{key:1,placeholder:a.tableConfig.translations.inputPlaceholder,"onUpdate:modelValue":l=>A.searches[s]=l,onInput:e[4]||(e[4]=l=>a.debounce(a.filterBody,400)),name:`search_${s}`,style:o.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,J7)),[[o.vModelText,A.searches[s]]]):o.createCommentVNode("",!0),!A.hasNaN[s]&&i.isSort&&i.type!==A.constants.DATE?(o.openBlock(),o.createElementBlock("button",{key:2,onClick:l=>a.sortTh(s,l),class:o.normalizeClass({"th-button-active":[A.constants.DESC,A.constants.ASC].includes(A.sorts[s])}),style:o.normalizeStyle(`background:${[A.constants.DESC,A.constants.ASC].includes(A.sorts[s])?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${[A.constants.DESC,A.constants.ASC].includes(A.sorts[s])?"":a.tableConfig.style.pagination.buttons.color}`)},[A.sorts[s]===A.constants.ASC?(o.openBlock(),o.createElementBlock("span",{key:0,innerHTML:[A.constants.NUMERIC].includes(i.type)?a.icons.sort09:a.icons.sortZA},null,8,eP)):A.sorts[s]===A.constants.DESC?(o.openBlock(),o.createElementBlock("span",{key:1,innerHTML:[A.constants.NUMERIC].includes(i.type)?a.icons.sort90:a.icons.sortAZ},null,8,tP)):(o.openBlock(),o.createElementBlock("span",{key:2,innerHTML:a.icons.arrowSort},null,8,rP))],14,Z7)):o.createCommentVNode("",!0),i.isMultiselect?(o.openBlock(),o.createElementBlock("button",{key:3,onClick:l=>a.toggleMultiselect(s,i,l),innerHTML:a.icons.filter,class:o.normalizeClass({"th-button-active":A.multiselects[s]&&A.multiselects[s].length!==a.getDropdownOptions(s).length}),style:o.normalizeStyle(`background:${A.multiselects[s]&&A.multiselects[s].length!==a.getDropdownOptions(s).length?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${A.multiselects[s]&&A.multiselects[s].length!==a.getDropdownOptions(s).length?"":a.tableConfig.style.pagination.buttons.color}`)},null,14,nP)):o.createCommentVNode("",!0),A.currentSelectionSpan.col===s&&a.canChart?(o.openBlock(),o.createElementBlock("button",{key:4,onClick:e[5]||(e[5]=l=>A.showChart=!A.showChart),innerHTML:a.icons.chart,class:o.normalizeClass({"th-button-active":A.showChart}),style:o.normalizeStyle(`background:${A.showChart?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${A.showChart?"":a.tableConfig.style.pagination.buttons.color}`)},null,14,AP)):o.createCommentVNode("",!0),i.rangeFilter&&A.rangeFilters[s]&&!A.hasNaN[s]?(o.openBlock(),o.createElementBlock("div",aP,[o.createElementVNode("label",{for:`rangeMin${s}`},[oP,o.createTextVNode(" min "),sP],8,iP),o.withDirectives(o.createElementVNode("input",{type:"number",id:`rangeMin${s}`,max:A.immutableRangeFilters[s].max,min:A.immutableRangeFilters[s].min,"onUpdate:modelValue":l=>A.rangeFilters[s].min=l,onInput:e[6]||(e[6]=l=>a.debounce(a.filterBody,400)),style:o.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,lP),[[o.vModelText,A.rangeFilters[s].min,void 0,{number:!0}]]),o.withDirectives(o.createElementVNode("input",{type:"number",id:`rangeMax${s}`,max:A.immutableRangeFilters[s].max,min:A.immutableRangeFilters[s].min,"onUpdate:modelValue":l=>A.rangeFilters[s].max=l,onInput:e[7]||(e[7]=l=>a.debounce(a.filterBody,400)),style:o.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,cP),[[o.vModelText,A.rangeFilters[s].max,void 0,{number:!0}]]),o.createElementVNode("label",{for:`rangeMax${s}`},[hP,o.createTextVNode(" max "),fP],8,uP)])):o.createCommentVNode("",!0),a.canResetColumn(s,i)?(o.openBlock(),o.createElementBlock("button",{key:6,onClick:l=>a.resetFilter(s,i,l),disabled:a.isResetDisabled(s,i),class:"th-reset"}," ✖ ",8,dP)):o.createCommentVNode("",!0),i.isMultiselect?(o.openBlock(),o.createElementBlock("div",{key:7,class:"th-dropdown","data-is-open":"false",id:`th_dropdown_${s}`,style:o.normalizeStyle(`background:${a.tableConfig.style.dropdowns.backgroundColor};color:${a.tableConfig.style.dropdowns.color}`)},[o.createElementVNode("button",{class:"close-dropdown",onClick:l=>a.toggleMultiselect(s,i,l),style:o.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color}`)}," ✖ ",12,pP),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.getDropdownOptions(s),(l,u)=>(o.openBlock(),o.createElementBlock("span",{class:"th-option",key:`th_option_${s}_${u}`,onClick:c=>a.selectDropdownOption(l,s),onKeyup:[o.withKeys(c=>a.selectDropdownOption(l,s),["enter"]),o.withKeys(c=>a.selectDropdownOption(l,s),["space"])],style:o.normalizeStyle(`opacity:${a.isDropdownOptionSelected(l,s)?1:.5}`),tabindex:"0"},[a.isDropdownOptionSelected(l,s)?(o.openBlock(),o.createElementBlock("span",{key:0,style:o.normalizeStyle(`color:${a.tableConfig.style.dropdowns.icons.selected.color};margin-right:5px`),class:"th-icon-green"},o.toDisplayString(a.tableConfig.style.dropdowns.icons.selected.unicode),5)):(o.openBlock(),o.createElementBlock("span",{key:1,style:o.normalizeStyle(`color:${a.tableConfig.style.dropdowns.icons.unselected.color};margin-right:5px`),class:"th-icon-red"},o.toDisplayString(a.tableConfig.style.dropdowns.icons.unselected.unicode),5)),o.createElementVNode("span",null,o.toDisplayString(l),1)],44,mP))),128))],12,gP)):o.createCommentVNode("",!0)])],6))),128))])],64)):o.createCommentVNode("",!0),o.createElementVNode("tr",null,[vP,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.tableHead,(i,s)=>(o.openBlock(),o.createElementBlock("th",{key:`col_selector_${s}`,class:o.normalizeClass({"vue-ui-table-col-selector":!A.hasNaN[s],"th-has-nan":A.hasNaN[s]}),style:o.normalizeStyle(`background:${s===A.selectedColumn&&!A.hasNaN[s]?a.tableConfig.style.th.selected.backgroundColor:a.tableConfig.style.th.backgroundColor};color:${s===A.selectedColumn&&!A.hasNaN[s]?a.tableConfig.style.th.selected.color:a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[A.hasNaN[s]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:0,innerHTML:A.tableHead[s].type===A.constants.NUMERIC?a.icons.chevronDown:"",class:o.normalizeClass({"col-selector":A.tableHead[s].type===A.constants.NUMERIC}),tabindex:"0",onClick:o.withModifiers(l=>a.selectColumn(s),["stop"]),onKeyup:o.withKeys(l=>a.selectColumn(s),["enter"])},null,42,yP))],6))),128))])]),o.createElementVNode("tbody",{onClick:e[8]||(e[8]=(...i)=>a.closeAllDropdowns&&a.closeAllDropdowns(...i)),onKeydown:e[9]||(e[9]=i=>a.navigateCell(i))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.visibleRows,(i,s)=>(o.openBlock(),o.createElementBlock("tr",{key:`tbody_${s}`,"data-row":s%2===0?"odd":"even",class:o.normalizeClass(`tr_${A.uid}`),style:o.normalizeStyle(`${s%2===0?`background:${a.tableConfig.style.rows.odd.backgroundColor};color:${a.tableConfig.style.rows.odd.color}`:`background:${a.tableConfig.style.rows.even.backgroundColor};color:${a.tableConfig.style.rows.even.color}`}`)},[o.createElementVNode("td",{class:"vue-ui-table-td-iteration","data-row":s%2===0?"odd":"even"},o.toDisplayString(i.absoluteIndex+1),9,BP),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.td,(l,u)=>(o.openBlock(),o.createElementBlock("td",{"data-row":s%2===0?"odd":"even",key:`td_${s}_${u}`,style:o.normalizeStyle(a.isNumeric(l)||r.dataset.header[u].type===A.constants.DATE?"text-align:right;font-variant-numeric: tabular-nums;":""),onClick:c=>a.selectTd({td:l,rowIndex:s,colIndex:u,headerType:r.dataset.header[u].type,event:c}),onKeyup:[o.withKeys(c=>a.selectTd({td:l,rowIndex:s,colIndex:u,headerType:r.dataset.header[u].type,event:c}),["enter"]),o.withKeys(c=>a.selectTd({td:l,rowIndex:s,colIndex:u,headerType:r.dataset.header[u].type,event:c}),["space"])],class:o.normalizeClass({"td-numeric":r.dataset.header[u].type===A.constants.NUMERIC,"td-focusable":!0,"td-has-nan":A.hasNaN[u]}),id:`cell_${s}_${u}_${A.uid}`,tabindex:"0"},[i.meta&&i.meta.markerIndices.includes(u)&&i.meta.unicodeIcon?(o.openBlock(),o.createElementBlock("span",{key:0,style:o.normalizeStyle(`color:${i.meta.color};margin-right:3px`),innerHTML:i.meta.unicodeIcon},null,12,bP)):o.createCommentVNode("",!0),r.dataset.header[u].type===A.constants.DATE?(o.openBlock(),o.createElementBlock("span",CP,o.toDisplayString(r.dataset.header[u].prefix)+" "+o.toDisplayString(new Date(l).toLocaleString().slice(0,10))+" "+o.toDisplayString(r.dataset.header[u].suffix),1)):r.dataset.header[u].isPercentage?(o.openBlock(),o.createElementBlock("span",EP,o.toDisplayString(Number((l*100).toFixed(r.dataset.header[u].decimals)).toLocaleString())+"% ",1)):A.percentages[u]&&r.dataset.header[u].percentageTo&&!r.dataset.header[u].isPercentage?(o.openBlock(),o.createElementBlock("span",{key:3,class:o.normalizeClass({"td-nan":isNaN(Number(l))})},o.toDisplayString(r.dataset.header[u].prefix)+" "+o.toDisplayString(isNaN(Number(l))?`${l} is not ${A.constants.NUMERIC}`:Number(l.toFixed(r.dataset.header[u].decimals)).toLocaleString())+" "+o.toDisplayString(r.dataset.header[u].suffix)+" ("+o.toDisplayString(isNaN(Number(l))?"":Number((l/a.getSum(A.percentages[u].referenceIndex)*100).toFixed(r.dataset.header[u].decimals)).toLocaleString())+"%) ",3)):r.dataset.header[u].type===A.constants.NUMERIC?(o.openBlock(),o.createElementBlock("span",{key:4,class:o.normalizeClass({"td-nan":isNaN(Number(l))})},o.toDisplayString(r.dataset.header[u].prefix)+" "+o.toDisplayString(isNaN(Number(l))?`${l} is not ${A.constants.NUMERIC}`:Number(l.toFixed(r.dataset.header[u].decimals)).toLocaleString())+" "+o.toDisplayString(r.dataset.header[u].suffix),3)):(o.openBlock(),o.createElementBlock("span",FP,o.toDisplayString(r.dataset.header[u].prefix)+" "+o.toDisplayString(l)+" "+o.toDisplayString(r.dataset.header[u].suffix),1))],46,xP))),128))],14,wP))),128))],32)])],4),o.createElementVNode("div",{class:o.normalizeClass({"td-selector-info":!0,"td-selector-info--active":A.currentSelectionSpan.col!==void 0&&A.currentSelectionSpan.rows.length}),style:o.normalizeStyle(`background:${a.tableConfig.style.infoBar.backgroundColor};color:${a.tableConfig.style.infoBar.color}`)},[A.currentSelectionSpan.col!==void 0&&A.currentSelectionSpan.rows.length?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",{innerHTML:a.icons.table,class:"td-selector-icon"},null,8,SP),o.createElementVNode("span",null,[o.createElementVNode("b",null,[o.createTextVNode(o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].name)+" ",1),r.dataset.header[A.currentSelectionSpan.col].isPercentage?(o.openBlock(),o.createElementBlock("span",_P," / "+o.toDisplayString(r.dataset.header[A.percentages[A.currentSelectionSpan.col].referenceIndex].name),1)):o.createCommentVNode("",!0)]),o.createElementVNode("span",kP,[o.createTextVNode(o.toDisplayString(a.tableConfig.translations.nb)+" : ",1),o.createElementVNode("b",TP,o.toDisplayString(A.currentSelectionSpan.rows.length),1)]),o.createElementVNode("span",NP,[o.createTextVNode(o.toDisplayString(a.tableConfig.translations.sum)+" : ",1),r.dataset.header[A.currentSelectionSpan.col].isPercentage?(o.openBlock(),o.createElementBlock("b",LP,o.toDisplayString(a.selectedCellsCalculations.sumPercentage),1)):(o.openBlock(),o.createElementBlock("b",UP,o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].prefix)+" "+o.toDisplayString(a.selectedCellsCalculations.sumRegular)+" "+o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].suffix),1)),r.dataset.header[A.currentSelectionSpan.col].isPercentage?(o.openBlock(),o.createElementBlock("b",IP,"%")):o.createCommentVNode("",!0)]),o.createElementVNode("span",QP,[o.createTextVNode(o.toDisplayString(a.tableConfig.translations.average)+" : ",1),r.dataset.header[A.currentSelectionSpan.col].isPercentage?(o.openBlock(),o.createElementBlock("b",DP,o.toDisplayString(a.selectedCellsCalculations.averagePercentage),1)):(o.openBlock(),o.createElementBlock("b",OP,o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].prefix)+" "+o.toDisplayString(a.selectedCellsCalculations.averageRegular)+" "+o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].suffix),1)),r.dataset.header[A.currentSelectionSpan.col].isPercentage?(o.openBlock(),o.createElementBlock("b",PP,"%")):o.createCommentVNode("",!0)])]),o.createElementVNode("button",{onClick:e[10]||(e[10]=(...i)=>a.resetSelection&&a.resetSelection(...i)),class:"td-selector-info-reset",style:o.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color};border-radius:${a.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4)],64)):o.createCommentVNode("",!0)],6),A.bodyCopy.length>10?(o.openBlock(),o.createElementBlock("div",MP,[o.createTextVNode(o.toDisplayString(a.tableConfig.translations.totalRows)+" : "+o.toDisplayString(r.dataset.body.length)+" | "+o.toDisplayString(a.tableConfig.translations.paginatorLabel)+" : ",1),A.bodyCopy.length>10?o.withDirectives((o.openBlock(),o.createElementBlock("select",{key:0,id:"paginatorSelector","onUpdate:modelValue":e[11]||(e[11]=i=>A.itemsPerPage=i),onChange:e[12]||(e[12]=(...i)=>a.resetSelection&&a.resetSelection(...i)),style:o.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.paginatorOptions,(i,s)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[A.bodyCopy.length>i||r.dataset.body.length===i?(o.openBlock(),o.createElementBlock("option",{key:`paginator_option_${s}`},o.toDisplayString(i),1)):o.createCommentVNode("",!0)],64))),256))],36)),[[o.vModelSelect,A.itemsPerPage,void 0,{number:!0}]]):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),A.itemsPerPage>=250?(o.openBlock(),o.createElementBlock("div",RP,[o.createElementVNode("span",{innerHTML:a.icons.warning},null,8,HP),o.createTextVNode(o.toDisplayString(a.tableConfig.translations.sizeWarning),1)])):o.createCommentVNode("",!0),a.pages.length>1&&a.pages.length<=10?(o.openBlock(),o.createElementBlock("div",{key:2,class:"vue-ui-table-navigation-indicator",style:o.normalizeStyle(`background:${a.tableConfig.style.pagination.navigationIndicator.backgroundColor};width:calc(${A.currentPage/(a.pages.length-1)*100}%)`)},null,4)):o.createCommentVNode("",!0),a.pages.length>1?(o.openBlock(),o.createElementBlock("div",VP,[o.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[13]||(e[13]=o.withModifiers(i=>a.navigate("previous"),["stop"])),innerHTML:a.icons.chevronLeft,disabled:A.currentPage===0,style:o.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${A.currentPage===0?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},null,12,$P),a.pages.length>3?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[14]||(e[14]=o.withModifiers(i=>a.navigate(1),["stop"])),disabled:A.currentPage===0,style:o.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${A.currentPage===0?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)}," 1 ",12,zP),a.pages.length>10?(o.openBlock(),o.createElementBlock("div",KP,[o.createElementVNode("label",GP,o.toDisplayString(a.tableConfig.translations.page)+" "+o.toDisplayString(A.currentPage+1)+" / "+o.toDisplayString(a.pages.length),1),o.createElementVNode("input",{class:"vue-ui-table-page-scroller",id:"pageScroller",type:"range",step:"1",min:0,max:a.pages.length-1,onInput:e[15]||(e[15]=i=>a.updateCurrentPage(i)),value:A.currentPage,style:o.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border};accent-color:${a.tableConfig.style.inputs.accentColor}`)},null,44,jP)])):(o.openBlock(),o.createElementBlock("span",WP,o.toDisplayString(a.tableConfig.translations.page)+" "+o.toDisplayString(A.currentPage+1)+" / "+o.toDisplayString(a.pages.length),1)),o.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[16]||(e[16]=o.withModifiers(i=>a.navigate(a.pages.length),["stop"])),disabled:A.currentPage===a.pages.length-1,style:o.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${A.currentPage===a.pages.length-1?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},o.toDisplayString(a.pages.length),13,XP)],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(a.tableConfig.translations.page)+" "+o.toDisplayString(A.currentPage+1)+" / "+o.toDisplayString(a.pages.length),1)],64)),o.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[17]||(e[17]=o.withModifiers(i=>a.navigate("next"),["stop"])),innerHTML:a.icons.chevronRight,disabled:A.currentPage===a.pages.length-1,style:o.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${A.currentPage===a.pages.length-1?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},null,12,qP)])):o.createCommentVNode("",!0),A.showChart&&a.canChart?(o.openBlock(),o.createElementBlock("div",{key:4,class:"vue-ui-table-chart-modal",style:o.normalizeStyle(`top:${A.clientY}px; left:${A.clientX}px;background:${a.tableConfig.style.chart.modal.backgroundColor};color:${a.tableConfig.style.chart.modal.color}`)},[o.createElementVNode("button",{class:"close-chart-modal",onClick:e[18]||(e[18]=i=>A.showChart=!1),style:o.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color};border-radius:${a.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4),o.createElementVNode("div",YP,[a.availableDonutCategories.length?(o.openBlock(),o.createElementBlock("button",{key:0,onClick:e[19]||(e[19]=i=>A.showDonutOptions=!0),innerHTML:a.icons.donut,class:o.normalizeClass({"is-active-chart":A.chart.type===A.constants.DONUT||A.showDonutOptions}),style:o.normalizeStyle(`background:${A.chart.type===A.constants.DONUT||A.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.backgroundColor:a.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${A.chart.type===A.constants.DONUT||A.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.color:a.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,JP)):o.createCommentVNode("",!0),o.createElementVNode("button",{onClick:e[20]||(e[20]=i=>{A.chart.type=A.constants.LINE,A.showDonutOptions=!1}),innerHTML:a.icons.chart,class:o.normalizeClass({"is-active-chart":A.chart.type===A.constants.LINE&&!A.showDonutOptions}),style:o.normalizeStyle(`background:${A.chart.type===A.constants.LINE&&!A.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.backgroundColor:a.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${A.chart.type===A.constants.LINE&&!A.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.color:a.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,ZP),o.createElementVNode("button",{onClick:e[21]||(e[21]=i=>{A.chart.type=A.constants.BAR,A.showDonutOptions=!1}),innerHTML:a.icons.bar,class:o.normalizeClass({"is-active-chart":A.chart.type===A.constants.BAR&&!A.showDonutOptions}),style:o.normalizeStyle(`background:${A.chart.type===A.constants.BAR&&!A.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.backgroundColor:a.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${A.chart.type===A.constants.BAR&&!A.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.color:a.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,eM)]),o.createElementVNode("div",tM,[o.createElementVNode("b",null,[o.createTextVNode(o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].name)+" ",1),r.dataset.header[A.currentSelectionSpan.col].isPercentage&&r.dataset.header[A.currentSelectionSpan.col].percentageTo?(o.openBlock(),o.createElementBlock("span",rM," / "+o.toDisplayString(r.dataset.header[A.percentages[A.currentSelectionSpan.col].referenceIndex].name),1)):o.createCommentVNode("",!0),A.chart.type===A.constants.DONUT&&A.selectedDonutCategory&&A.selectedDonutCategory.name?(o.openBlock(),o.createElementBlock("span",nM,o.toDisplayString(a.tableConfig.translations.by)+" "+o.toDisplayString(A.selectedDonutCategory.name),1)):o.createCommentVNode("",!0)])]),o.createElementVNode("div",AM,[A.showDonutOptions&&a.availableDonutCategories.length?(o.openBlock(),o.createElementBlock("div",{key:0,style:o.normalizeStyle(`background:${a.tableConfig.style.chart.modal.backgroundColor};color:${a.tableConfig.style.chart.modal.color}`)},[o.createElementVNode("fieldset",aM,[o.createElementVNode("legend",null,o.toDisplayString(a.tableConfig.translations.chooseCategoryColumn),1),o.createElementVNode("div",iM,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.availableDonutCategories,(i,s)=>(o.openBlock(),o.createElementBlock("div",{key:`donut_radio_${s}`,class:"vue-ui-table-fieldset-option"},[o.createElementVNode("input",{type:"radio",name:i.name,id:i.name,checked:A.selectedDonutCategory&&i.name===A.selectedDonutCategory.name,onInput:l=>A.selectedDonutCategory=a.availableDonutCategories[s],style:o.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border};accent-color:${a.tableConfig.style.inputs.accentColor}`)},null,44,oM),o.createElementVNode("label",{for:i.name},o.toDisplayString(i.name),9,sM)]))),128))]),o.createElementVNode("button",{class:"vue-ui-table-generate-donut",disabled:!A.selectedDonutCategory,onClick:e[22]||(e[22]=(...i)=>a.applyDonutOption&&a.applyDonutOption(...i)),style:o.normalizeStyle(`background:${a.tableConfig.style.chart.modal.buttons.selected.backgroundColor};color:${a.tableConfig.style.chart.modal.buttons.selected.color}`)},[o.createElementVNode("div",{style:{"margin-bottom":"-3px"},innerHTML:a.icons.donut},null,8,cM),o.createTextVNode(" "+o.toDisplayString(a.tableConfig.translations.makeDonut),1)],12,lM)])],4)):o.createCommentVNode("",!0),[A.constants.BAR,A.constants.LINE].includes(A.chart.type)&&!A.showDonutOptions?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[(o.openBlock(),o.createElementBlock("svg",{viewBox:`0 0 ${A.chart.width} ${A.chart.height}`,class:"vue-ui-table-chart-svg",style:o.normalizeStyle(`background:${a.tableConfig.style.chart.layout.backgroundColor}`)},[o.createElementVNode("defs",null,[o.createElementVNode("marker",{id:"arrowhead",markerWidth:a.tableConfig.style.chart.layout.progression.arrowSize,markerHeight:a.tableConfig.style.chart.layout.progression.arrowSize,refX:"0",refY:a.tableConfig.style.chart.layout.progression.arrowSize/2,orient:"auto"},[o.createElementVNode("polygon",{points:`0 0, ${a.tableConfig.style.chart.layout.progression.arrowSize} ${a.tableConfig.style.chart.layout.progression.arrowSize/2}, 0 ${a.tableConfig.style.chart.layout.progression.arrowSize}`,fill:a.tableConfig.style.chart.layout.progression.stroke},null,8,fM)],8,hM)]),o.createElementVNode("g",null,[o.createElementVNode("line",{x1:0,x2:A.chart.width,y1:a.chartData.zero,y2:a.chartData.zero,stroke:a.tableConfig.style.chart.layout.axis.stroke,"stroke-width":a.tableConfig.style.chart.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,dM),o.createElementVNode("line",{x1:0,x2:0,y1:0,y2:A.chart.height,stroke:a.tableConfig.style.chart.layout.axis.stroke,"stroke-width":a.tableConfig.style.chart.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,gM)]),A.chart.type===A.constants.LINE?(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:0},o.renderList(a.chartData.plots,(i,s)=>(o.openBlock(),o.createElementBlock("g",{key:`trap_fill_${s}`},[o.createElementVNode("rect",{x:s*a.chartData.slot,y:0,width:a.chartData.slot,height:A.chart.height,fill:A.selectedPlot===s?"rgba(0,0,0,0.03)":"transparent"},null,8,pM)]))),128)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.chartData.plots,(i,s)=>(o.openBlock(),o.createElementBlock("g",{key:`plot_${s}`},[A.chart.type===A.constants.BAR?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[mM,o.createElementVNode("rect",{x:i.x-a.chartData.slot/2,y:a.chartData.isAllNegative?0:a.calcRectY(i.value,i.y),height:i.value>=0?a.chartData.zero-i.y:a.chartData.isAllNegative?i.y:i.y-a.chartData.zero,width:a.chartData.slot,fill:a.tableConfig.style.chart.layout.bar.fill?a.tableConfig.style.chart.layout.bar.fill:A.selectedPlot===s?i.value>=0?"url(#barGradientSelected)":"url(#barGradientSelectedNeg)":(i.value>=0,"url(#barGradient)"),stroke:a.tableConfig.style.chart.layout.bar.stroke,"stroke-width":"1"},null,8,vM),A.selectedPlot===s?(o.openBlock(),o.createElementBlock("foreignObject",{key:0,x:i.x-(a.chartData.slot<100?50:a.chartData.slot/2),y:i.value>=0?i.y-32:i.y+4,height:"20",width:a.chartData.slot<100?100:a.chartData.slot,style:{overflow:"visible"}},[o.createElementVNode("div",{style:o.normalizeStyle(`width:100%;text-align:center;font-size:20px;color:${a.tableConfig.style.chart.layout.labels.color}`)},o.toDisplayString(i.prefix)+" "+o.toDisplayString(Number(i.value.toFixed(r.dataset.header[A.currentSelectionSpan.col].decimals)).toLocaleString())+" "+o.toDisplayString(i.suffix),5)],8,yM)):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0),A.chart.type===A.constants.LINE?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[s+1<a.chartData.plots.length?(o.openBlock(),o.createElementBlock("line",{key:0,x1:i.x,y1:i.y,x2:a.chartData.plots[s+1].x,y2:a.chartData.plots[s+1].y,"stroke-width":a.tableConfig.style.chart.layout.line.strokeWidth,stroke:a.tableConfig.style.chart.layout.line.stroke},null,8,wM)):o.createCommentVNode("",!0),A.selectedPlot===s?(o.openBlock(),o.createElementBlock("line",{key:1,x1:i.x,y1:i.y,x2:i.x,y2:A.chart.height,stroke:a.tableConfig.style.chart.layout.line.selector.stroke,"stroke-width":a.tableConfig.style.chart.layout.line.selector.strokeWidth,"stroke-dasharray":a.tableConfig.style.chart.layout.line.selector.strokeDasharray},null,8,BM)):o.createCommentVNode("",!0),o.createElementVNode("circle",{cx:i.x,cy:i.y,r:A.selectedPlot===s?a.tableConfig.style.chart.layout.line.plot.radius.selected:a.tableConfig.style.chart.layout.line.plot.radius.unselected,fill:a.tableConfig.style.chart.layout.line.plot.fill,stroke:a.tableConfig.style.chart.layout.line.plot.stroke,"stroke-width":a.tableConfig.style.chart.layout.line.plot.strokeWidth},null,8,xM),A.selectedPlot===s?(o.openBlock(),o.createElementBlock("foreignObject",{key:2,x:i.x-(a.chartData.slot<100?50:a.chartData.slot/2),y:a.placeLabelOnTopOrBottom({previousPlot:a.chartData.plots[s-1],currentPlot:i,nextPlot:a.chartData.plots[s+1]}),height:"20",width:a.chartData.slot<100?100:a.chartData.slot,style:{overflow:"visible"}},[o.createElementVNode("div",{style:o.normalizeStyle(`width:100%;text-align:center;font-size:20px;color:${a.tableConfig.style.chart.layout.labels.color}`)},o.toDisplayString(i.prefix)+" "+o.toDisplayString(Number(i.value.toFixed(r.dataset.header[A.currentSelectionSpan.col].decimals)).toLocaleString())+" "+o.toDisplayString(i.suffix),5)],8,bM)):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0)]))),128)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.chartData.plots,(i,s)=>(o.openBlock(),o.createElementBlock("g",{key:`trap_${s}`},[o.createElementVNode("rect",{x:s*a.chartData.slot,y:0,width:a.chartData.slot,height:A.chart.height,fill:"transparent",onMouseenter:l=>A.selectedPlot=s,onMouseleave:e[23]||(e[23]=l=>A.selectedPlot=void 0)},null,40,CM)]))),128)),a.chartData.progression&&a.chartData.plots.length>2?(o.openBlock(),o.createElementBlock("line",{key:1,x1:a.chartData.progression.x1,y1:a.chartData.progression.y1,x2:a.chartData.progression.x2,y2:a.chartData.progression.y2,stroke:a.tableConfig.style.chart.layout.progression.stroke,"stroke-width":a.tableConfig.style.chart.layout.progression.strokeWidth,"stroke-dasharray":a.tableConfig.style.chart.layout.progression.strokeDasharray,"marker-end":"url(#arrowhead)"},null,8,EM)):o.createCommentVNode("",!0)],12,uM)),a.chartData.plots.length>=2?(o.openBlock(),o.createElementBlock("div",{key:0,class:"chart-trend",style:o.normalizeStyle(`color:${a.tableConfig.style.chart.modal.color}`)},[FM,o.createTextVNode(" Trend: "),o.createElementVNode("span",null,o.toDisplayString(a.chartData.progression.slope<0?"+":"-"),1),o.createTextVNode(" "+o.toDisplayString((Math.abs(a.chartData.progression.slope)*100).toFixed(1))+" % ",1)],4)):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0),[A.constants.DONUT].includes(A.chart.type)&&!A.showDonutOptions?(o.openBlock(),o.createElementBlock(o.Fragment,{key:2},[(o.openBlock(),o.createElementBlock("svg",{viewBox:"0 0 100 100",style:o.normalizeStyle(`max-width:100%; overflow: visible; padding: 0 24px;background:${a.tableConfig.style.chart.layout.backgroundColor}`),class:"vue-ui-table-donut-chart"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.currentDonut,(i,s)=>(o.openBlock(),o.createElementBlock("path",{key:`arc_${s}`,d:i.path,stroke:`${i.color}CC`,"stroke-width":20,fill:"none"},null,8,SM))),128)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.currentDonut,(i,s)=>(o.openBlock(),o.createElementBlock("foreignObject",{key:`text_marker_${s}`,x:a.calcDonutMarkerLabelPositionX(i)-15,y:i.center.endY-15,height:"30",width:"30",style:{overflow:"visible",display:"flex","align-items":"center","justify-content":"center"}},[a.isArcBigEnough(i)?(o.openBlock(),o.createElementBlock("div",{key:0,class:"vue-ui-table-donut-label",style:o.normalizeStyle(`color:${a.tableConfig.style.chart.layout.labels.color}`)},[o.createElementVNode("b",null,o.toDisplayString(a.displayArcPercentage(i,A.currentDonut)),1),o.createElementVNode("span",kM,o.toDisplayString(i.name),1)],4)):o.createCommentVNode("",!0)],8,_M))),128)),o.createElementVNode("text",{x:50,y:42,"text-anchor":"middle","font-size":"6",fill:a.tableConfig.style.chart.layout.labels.color},o.toDisplayString(a.tableConfig.translations.total),9,TM),o.createElementVNode("text",{x:50,y:48,"text-anchor":"middle","font-size":"4",fill:a.tableConfig.style.chart.layout.labels.color},o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].prefix)+" "+o.toDisplayString(a.donutHollowLabels.total)+" "+o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].isPercentage?"%":"")+" "+o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].suffix),9,NM),o.createElementVNode("text",{x:50,y:56,"text-anchor":"middle","font-size":"6",fill:a.tableConfig.style.chart.layout.labels.color},o.toDisplayString(a.tableConfig.translations.average),9,LM),o.createElementVNode("text",{x:50,y:62,"text-anchor":"middle","font-size":"4",fill:a.tableConfig.style.chart.layout.labels.color},o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].prefix)+" "+o.toDisplayString(a.donutHollowLabels.average)+" "+o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].isPercentage?"%":"")+" "+o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].suffix),9,UM)],4)),o.createElementVNode("div",IM,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.currentDonut.filter(i=>i.value>0),(i,s)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-table-donut-legend-item",key:`donut_legend_${s}`,style:o.normalizeStyle(`color:${a.tableConfig.style.chart.layout.labels.color}`)},[o.createElementVNode("span",{style:o.normalizeStyle(`color:${i.color}`)},"●",4),o.createElementVNode("span",null,o.toDisplayString(i.name)+" : ",1),o.createElementVNode("b",null,o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].prefix)+" "+o.toDisplayString(a.getDonutLegendValue(i.absoluteValue))+" "+o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].isPercentage?"%":"")+" "+o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].suffix),1),o.createElementVNode("span",null,"("+o.toDisplayString((i.proportion*100).toFixed(1))+"%)",1)],4))),128))])],64)):o.createCommentVNode("",!0)],512)],4)):o.createCommentVNode("",!0)],4)}const DM=Ii(h7,[["render",QM],["__scopeId","data-v-80d709a0"]]),Pne="",OM=t=>(o.pushScopeId("data-v-2bfc0993"),t=t(),o.popScopeId(),t),PM=["id"],MM={class:"vue-ui-donut-user-option-item"},RM=["id","name"],HM=["for"],VM={class:"vue-ui-donut-user-option-item"},$M=["id","name"],zM=["for"],KM={class:"vue-ui-donut-user-option-item"},GM=["id","name"],jM=["for"],WM=["disabled"],XM=["stroke"],qM=[o.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-2bfc0993></path><path d="M18 16v.01" data-v-2bfc0993></path><path d="M6 16v.01" data-v-2bfc0993></path><path d="M12 5v.01" data-v-2bfc0993></path><path d="M12 12v.01" data-v-2bfc0993></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-2bfc0993></path>',6)],YM={key:1},JM=["viewBox"],ZM=["id"],eR=["stop-color"],tR=["stop-color"],rR=["stop-color"],nR={key:0},AR=["font-size","fill","x"],aR=["font-size","fill","x","y"],iR=["d","stroke","stroke-width"],oR=["cx","cy","fill"],sR=["d","stroke","stroke-width","onMouseenter","onClick"],lR=["cx","cy","r","fill"],cR=["x","y","fill","font-size"],uR=["x","y","fill","font-size"],hR=["x","y","fill","font-size"],fR=["x","y","fill","font-size"],dR=["x","y","fill","font-size"],gR=["x","y","fill","font-size"],pR=["y"],mR=["onClick"],vR=["onClick"],yR={key:0},wR=["innerHTML"],BR={key:0},xR={key:0},bR=[OM(()=>o.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),o.createElementVNode("path",{d:"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2"})],-1))],CR={style:{"max-width":"200px margin:0 auto"}},ER=Ii({__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(t,{expose:e,emit:r}){const n=t,A=o.ref(`vue-ui-donut-${Math.random()}`),a=o.ref({style:{fontFamily:"inherit",chart:{useGradient:!0,gradientIntensity:40,backgroundColor:"#FFFFFF",color:"#2D353C",layout:{useDiv:!1,labels:{dataLabels:{show:!0,hideUnderValue:3},percentage:{color:"#2D353C",bold:!0,fontSize:18},name:{color:"#2D353C",bold:!1,fontSize:14},hollow:{total:{show:!0,bold:!1,fontSize:18,color:"#AAAAAA",text:"Total",offsetY:0,value:{color:"#2D353C",fontSize:18,bold:!0,suffix:"",prefix:"",offsetY:0,rounding:0}},average:{show:!0,bold:!1,fontSize:18,color:"#AAAAAA",text:"Average",offsetY:0,value:{color:"#2D353C",fontSize:18,bold:!0,suffix:"",prefix:"",offsetY:0,rounding:0}}}},donut:{strokeWidth:64}},legend:{backgroundColor:"#FFFFFF",color:"#2D353C",show:!0,fontSize:16,bold:!1,roundingValue:0,roundingPercentage:0},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},tooltip:{show:!0,color:"#2D353C",backgroundColor:"#FFFFFF",fontSize:14,showValue:!0,showPercentage:!0,roundingValue:0,roundingPercentage:0}}},userOptions:{show:!0,title:"options",labels:{dataLabels:"Show datalabels",useDiv:"Title & legend inside",showTable:"Show table"}},translations:{total:"Total",average:"Average"},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0}}}),i=o.ref(!1),s=o.ref(null),l=o.ref(null),u=o.ref(null),c=o.ref({x:0,y:0}),g=o.ref(!1),p=o.ref(""),d=o.ref(null);o.onMounted(()=>{document.addEventListener("mousemove",y)}),o.onBeforeUnmount(()=>{document.removeEventListener("mousemove",y)});function y(_){c.value.x=_.clientX,c.value.y=_.clientY}const v=o.computed(()=>{let _=0,E=48;if(l.value&&s.value){const{width:B,height:S}=l.value.getBoundingClientRect(),R=s.value.getBoundingClientRect();c.value.x+B/2>R.right?_=-B:c.value.x-B/2<R.left?_=0:_=-B/2,c.value.y+S>R.bottom&&(E=-S-48)}return{top:c.value.y+E,left:c.value.x+_}}),h=o.computed(()=>Object.keys(n.config||{}).length?ja({defaultConfig:a.value,userConfig:n.config}):a.value),x=o.ref({dataLabels:{show:h.value.style.chart.layout.labels.dataLabels.show},inside:h.value.style.chart.layout.useDiv,showTable:h.value.table.show}),C=o.computed(()=>({height:x.value.inside||i.value?512:360,width:512})),T=o.ref([]);function D(_){T.value.includes(_)?T.value=T.value.filter(E=>E!==_):T.value.push(_),r("selectLegend",U.value.map(E=>({name:E.name,color:E.color,value:E.value})))}const Y=o.computed(()=>n.dataset.map((_,E)=>({name:_.name,color:_.color||Ht[E]||Ht[E%Ht.length],value:_.values.reduce((B,S)=>B+S,0),absoluteValues:_.values})).sort((_,E)=>E.value-_.value));function W(){return Y.value.map(_=>({name:_.name,color:_.color,value:_.value}))}e({getData:W});const U=o.computed(()=>n.dataset.map((_,E)=>({name:_.name,color:_.color||Ht[E]||Ht[E%Ht.length],value:_.values.reduce((B,S)=>B+S,0),absoluteValues:_.values})).sort((_,E)=>E.value-_.value).filter((_,E)=>!T.value.includes(E))),I=o.computed(()=>n.dataset.map((_,E)=>({name:_.name,color:_.color||Ht[E]||Ht[E%Ht.length],value:_.values.reduce((B,S)=>B+S,0)})).sort((_,E)=>E.value-_.value)),O=o.computed(()=>zh({series:U.value},C.value.width/2,C.value.height/2,100,100));function re(_){return _.center.endX+N(_,256)}function N(_,E){return _.center.endX-E>=0?30:-30}function L(_){return _.proportion*100>h.value.style.chart.layout.labels.dataLabels.hideUnderValue}function G(_,E){return isNaN(_.value/Z(E))?0:(_.value/Z(E)*100).toFixed(0)+"%"}function Z(_){return[..._].map(E=>E.value).reduce((E,B)=>E+B,0)}const ce=o.ref(["00","03","05","08","0A","0D","0F","12","14","17","1A","1C","1F","21","24","26","29","2B","2E","30","33","36","38","3B","3D","40","42","45","47","4A","4D","4F","52","54","57","59","5C","5E","61","63","66","69","6B","6E","70","73","75","78","7A","7D","80","82","85","87","8A","8C","8F","91","94","96","99","9C","9E","A1","A3","A6","A8","AB","AD","B0","B3","B5","B8","BA","BD","BF","C2","C4","C7","C9","CC","CF","D1","D4","D6","D9","DB","DE","E0","E3","E6","E8","EB","ED","F0","F2","F5","F7","FA","FC","FF"]),le=o.computed(()=>U.value.map(_=>_.value).reduce((_,E)=>_+E,0)),he=o.computed(()=>le.value/U.value.length);function fe(){u.value&&u.value.removeAttribute("open")}function pe(_,E,B=!0){g.value=B,d.value=E;let S="";S+=`<div style="width:100%;text-align:center;border-bottom:1px solid #ccc;padding-bottom:6px;margin-bottom:3px;">${_.name}</div>`,S+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><span style="color:${_.color};font-size:${h.value.style.chart.tooltip.fontSize*1.6}px;">●</span>`,h.value.style.chart.tooltip.showValue&&(S+=`<b>${_.value.toFixed(h.value.style.chart.tooltip.roundingValue)}</b>`),h.value.style.chart.tooltip.showPercentage&&(h.value.style.chart.tooltip.showValue?S+=`<span>(${(_.proportion*100).toFixed(h.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:S+=`<b>${(_.proportion*100).toFixed(h.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),p.value=`<div>${S}</div>`}function me(){i.value=!0,uo({domElement:document.getElementById(`donut__${A.value}`),fileName:h.value.style.chart.title.text||"vue-ui-donut"}).finally(()=>{i.value=!1})}const Le=o.computed(()=>{const _=U.value.map(B=>({name:B.name,color:B.color})),E=U.value.map(B=>B.value);return{head:_,body:E}});function F(){o.nextTick(()=>{const _=Le.value.head.map((ue,Te)=>[[ue.name],[Le.value.body[Te]],[isNaN(Le.value.body[Te]/le.value)?"-":Le.value.body[Te]/le.value*100]]),E=[[h.value.style.chart.title.text],[h.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(_);function B(ue){let Te=new ArrayBuffer(ue.length),Ne=new Uint8Array(Te);for(let Me=0;Me<ue.length;Me++)Ne[Me]=ue.charCodeAt(Me)&255;return Te}const S=Rr.book_new(),R=Rr.aoa_to_sheet(E);Rr.book_append_sheet(S,R,"Sheet1");const Q=Ui(S,{bookType:"xlsx",type:"binary"}),J=new Blob([B(Q)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),H=document.createElement("a");H.href=window.URL.createObjectURL(J),H.download=`${h.value.style.chart.title.text.replaceAll(" ","_")||"vue-ui-donut"}.xlsx`,H.click(),window.URL.revokeObjectURL(H.href)})}return(_,E)=>(o.openBlock(),o.createElementBlock("div",{ref:"donutChart",class:"vue-ui-donut",style:o.normalizeStyle(`font-family:${h.value.style.fontFamily};width:100%; text-align:center`),id:`donut__${A.value}`},[(!x.value.inside||i.value)&&h.value.style.chart.title.text?(o.openBlock(),o.createElementBlock("div",{key:0,style:o.normalizeStyle(`width:100%;background:${h.value.style.chart.backgroundColor}`)},[o.createElementVNode("div",{style:o.normalizeStyle(`width:100%;text-align:center;color:${h.value.style.chart.title.color};font-size:${h.value.style.chart.title.fontSize}px;font-weight:${h.value.style.chart.title.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.text),5),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("div",{key:0,style:o.normalizeStyle(`width:100%;text-align:center;color:${h.value.style.chart.title.subtitle.color};font-size:${h.value.style.chart.title.subtitle.fontSize}px;font-weight:${h.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.subtitle.text),5)):o.createCommentVNode("",!0)],4)):o.createCommentVNode("",!0),h.value.userOptions.show?(o.openBlock(),o.createElementBlock("details",{key:1,class:"vue-ui-donut-user-options",style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:u},[o.createElementVNode("summary",{style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)},o.toDisplayString(h.value.userOptions.title),5),o.createElementVNode("div",{class:"vue-ui-donut-user-options-items",style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)},[o.createElementVNode("div",MM,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-datalabels_${A.value}`,name:`vue-ui-donut-option-datalabels_${A.value}`,"onUpdate:modelValue":E[0]||(E[0]=B=>x.value.dataLabels.show=B)},null,8,RM),[[o.vModelCheckbox,x.value.dataLabels.show]]),o.createElementVNode("label",{for:`vue-ui-donut-option-datalabels_${A.value}`},o.toDisplayString(h.value.userOptions.labels.dataLabels),9,HM)]),o.createElementVNode("div",VM,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-title_${A.value}`,name:`vue-ui-donut-option-title_${A.value}`,"onUpdate:modelValue":E[1]||(E[1]=B=>x.value.inside=B)},null,8,$M),[[o.vModelCheckbox,x.value.inside]]),o.createElementVNode("label",{for:`vue-ui-donut-option-title_${A.value}`},o.toDisplayString(h.value.userOptions.labels.useDiv),9,zM)]),o.createElementVNode("div",KM,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-table_${A.value}`,name:`vue-ui-donut-option-table_${A.value}`,"onUpdate:modelValue":E[2]||(E[2]=B=>x.value.showTable=B)},null,8,GM),[[o.vModelCheckbox,x.value.showTable]]),o.createElementVNode("label",{for:`vue-ui-donut-option-table_${A.value}`},o.toDisplayString(h.value.userOptions.labels.showTable),9,jM)]),o.createElementVNode("button",{class:"vue-ui-donut-button",onClick:me,disabled:i.value,style:o.normalizeStyle([{"margin-top":"12px"},`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`])},[i.value?(o.openBlock(),o.createElementBlock("svg",{key:0,class:"vue-ui-donut-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:h.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},qM,8,XM)):(o.openBlock(),o.createElementBlock("span",YM,"PDF"))],12,WM),o.createElementVNode("button",{class:"vue-ui-donut-button",onClick:F,style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)}," XLSX ",4)],4)],4)):o.createCommentVNode("",!0),(o.openBlock(),o.createElementBlock("svg",{viewBox:`0 0 ${C.value.width} ${C.value.height}`,style:o.normalizeStyle(`max-width:100%; overflow: visible; background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`),onClick:fe},[o.createElementVNode("defs",null,[h.value.style.chart.useGradient?(o.openBlock(),o.createElementBlock("radialGradient",{key:0,id:`gradient_${A.value}`},[o.createElementVNode("stop",{offset:"0%","stop-color":`${o.unref(ex)(h.value.style.chart.backgroundColor)}00`},null,8,eR),o.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+ce.value[h.value.style.chart.gradientIntensity]},null,8,tR),o.createElementVNode("stop",{offset:"100%","stop-color":`${o.unref(ex)(h.value.style.chart.backgroundColor)}00`},null,8,rR)],8,ZM)):o.createCommentVNode("",!0)]),h.value.style.chart.title.text&&x.value.inside&&!i.value?(o.openBlock(),o.createElementBlock("g",nR,[o.createElementVNode("text",{"font-size":h.value.style.chart.title.fontSize,fill:h.value.style.chart.title.color,x:C.value.width/2,y:48,"text-anchor":"middle",style:o.normalizeStyle(`font-weight:${h.value.style.chart.title.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.text),13,AR),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("text",{key:0,"font-size":h.value.style.chart.title.subtitle.fontSize,fill:h.value.style.chart.title.subtitle.color,x:C.value.width/2,y:48+h.value.style.chart.title.fontSize,"text-anchor":"middle",style:o.normalizeStyle(`font-weight:${h.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.subtitle.text),13,aR)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(O.value,(B,S)=>(o.openBlock(),o.createElementBlock("path",{d:B.path,stroke:`${B.color}CC`,"stroke-width":a.value.style.chart.layout.donut.strokeWidth,fill:"none"},null,8,iR))),256)),h.value.style.chart.useGradient?(o.openBlock(),o.createElementBlock("circle",{key:1,cx:C.value.width/2,cy:C.value.height/2,r:136,fill:`url(#gradient_${A.value})`},null,8,oR)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(O.value,(B,S)=>(o.openBlock(),o.createElementBlock("path",{d:B.path,stroke:d.value===S?"rgba(0,0,0,0.1)":"transparent","stroke-width":a.value.style.chart.layout.donut.strokeWidth,fill:"none",onMouseenter:R=>pe(B,S,!0),onMouseleave:E[3]||(E[3]=R=>{g.value=!1,d.value=null}),onClick:R=>D(S)},null,40,sR))),256)),o.createElementVNode("circle",{cx:C.value.width/2,cy:C.value.height/2,r:C.value.width-400-h.value.style.chart.layout.donut.strokeWidth/2,fill:h.value.style.chart.backgroundColor},null,8,lR),h.value.style.chart.layout.labels.hollow.total.show?(o.openBlock(),o.createElementBlock("text",{key:2,"text-anchor":"middle",x:C.value.width/2,y:C.value.height/2-(h.value.style.chart.layout.labels.hollow.average.show?h.value.style.chart.layout.labels.hollow.total.fontSize:0)+h.value.style.chart.layout.labels.hollow.total.offsetY,fill:h.value.style.chart.layout.labels.hollow.total.color,"font-size":h.value.style.chart.layout.labels.hollow.total.fontSize,style:o.normalizeStyle(`font-weight:${h.value.style.chart.layout.labels.hollow.total.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.layout.labels.hollow.total.text),13,cR)):o.createCommentVNode("",!0),h.value.style.chart.layout.labels.hollow.total.show?(o.openBlock(),o.createElementBlock("text",{key:3,"text-anchor":"middle",x:C.value.width/2,y:C.value.height/2+h.value.style.chart.layout.labels.hollow.total.fontSize-(h.value.style.chart.layout.labels.hollow.average.show?h.value.style.chart.layout.labels.hollow.total.fontSize:0)+h.value.style.chart.layout.labels.hollow.total.value.offsetY,fill:h.value.style.chart.layout.labels.hollow.total.value.color,"font-size":h.value.style.chart.layout.labels.hollow.total.value.fontSize,style:o.normalizeStyle(`font-weight:${h.value.style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.layout.labels.hollow.total.value.prefix)+" "+o.toDisplayString(le.value.toFixed(h.value.style.chart.layout.labels.hollow.total.value.rounding))+" "+o.toDisplayString(h.value.style.chart.layout.labels.hollow.total.value.suffix),13,uR)):o.createCommentVNode("",!0),h.value.style.chart.layout.labels.hollow.average.show?(o.openBlock(),o.createElementBlock("text",{key:4,"text-anchor":"middle",x:C.value.width/2,y:C.value.height/2+(h.value.style.chart.layout.labels.hollow.total.show?h.value.style.chart.layout.labels.hollow.average.fontSize:0)+h.value.style.chart.layout.labels.hollow.average.offsetY,fill:h.value.style.chart.layout.labels.hollow.average.color,"font-size":h.value.style.chart.layout.labels.hollow.average.fontSize,style:o.normalizeStyle(`font-weight:${h.value.style.chart.layout.labels.hollow.average.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.layout.labels.hollow.average.text),13,hR)):o.createCommentVNode("",!0),h.value.style.chart.layout.labels.hollow.average.show?(o.openBlock(),o.createElementBlock("text",{key:5,"text-anchor":"middle",x:C.value.width/2,y:C.value.height/2+(h.value.style.chart.layout.labels.hollow.total.show?h.value.style.chart.layout.labels.hollow.average.fontSize:0)+h.value.style.chart.layout.labels.hollow.average.fontSize+h.value.style.chart.layout.labels.hollow.average.value.offsetY,fill:h.value.style.chart.layout.labels.hollow.average.value.color,"font-size":h.value.style.chart.layout.labels.hollow.average.value.fontSize,style:o.normalizeStyle(`font-weight:${h.value.style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.layout.labels.hollow.average.value.prefix)+" "+o.toDisplayString(isNaN(he.value.toFixed(h.value.style.chart.layout.labels.hollow.average.value.rounding))?"-":he.value.toFixed(h.value.style.chart.layout.labels.hollow.average.value.rounding))+" "+o.toDisplayString(h.value.style.chart.layout.labels.hollow.average.value.suffix),13,fR)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(O.value,(B,S)=>(o.openBlock(),o.createElementBlock("g",null,[L(B)&&x.value.dataLabels.show?(o.openBlock(),o.createElementBlock("text",{key:0,"text-anchor":"middle",x:re(B),y:B.center.endY-h.value.style.chart.layout.labels.percentage.fontSize/2,fill:h.value.style.chart.layout.labels.percentage.color,"font-size":h.value.style.chart.layout.labels.percentage.fontSize,style:o.normalizeStyle(`font-weight:${h.value.style.chart.layout.labels.percentage.bold?"bold":""}`)},o.toDisplayString(G(B,O.value)),13,dR)):o.createCommentVNode("",!0),L(B)&&x.value.dataLabels.show?(o.openBlock(),o.createElementBlock("text",{key:1,"text-anchor":"middle",x:re(B),y:B.center.endY+h.value.style.chart.layout.labels.percentage.fontSize/2,fill:h.value.style.chart.layout.labels.name.color,"font-size":h.value.style.chart.layout.labels.name.fontSize,style:o.normalizeStyle(`font-weight:${h.value.style.chart.layout.labels.name.bold?"bold":""}`)},o.toDisplayString(B.name),13,gR)):o.createCommentVNode("",!0)]))),256)),h.value.style.chart.legend.show&&x.value.inside&&!i.value?(o.openBlock(),o.createElementBlock("foreignObject",{key:6,x:0,y:C.value.height/2+150,width:"100%",height:"100",style:{overflow:"visible"}},[o.createElementVNode("div",{class:"vue-ui-donut-legend",style:o.normalizeStyle(`background:transparent;color:${h.value.style.chart.legend.color};font-size:${h.value.style.chart.legend.fontSize}px;font-weight:${h.value.style.chart.legend.bold?"bold":""}`)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(I.value,(B,S)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-donut-legend-item",onClick:R=>D(S),style:o.normalizeStyle(`opacity:${T.value.includes(S)?.5:1}`)},[o.createElementVNode("span",{style:o.normalizeStyle(`color:${B.color};font-size:${h.value.style.chart.legend.fontSize*1.6}px`)},"●",4),o.createElementVNode("span",null,o.toDisplayString(B.name)+" : ",1),o.createElementVNode("span",null,o.toDisplayString(B.value),1),o.createElementVNode("span",null,"("+o.toDisplayString(isNaN(B.value/le.value)?"-":(B.value/le.value*100).toFixed(h.value.style.chart.legend.roundingPercentage))+"%)",1)],12,mR))),256))],4)],8,pR)):o.createCommentVNode("",!0)],12,JM)),h.value.style.chart.legend.show&&(!x.value.inside||i.value)?(o.openBlock(),o.createElementBlock("div",{key:2,class:"vue-ui-donut-legend",style:o.normalizeStyle(`background:${h.value.style.chart.legend.backgroundColor};color:${h.value.style.chart.legend.color};font-size:${h.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${h.value.style.chart.legend.bold?"bold":""}`),onClick:fe},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(I.value,(B,S)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-donut-legend-item",onClick:R=>D(S),style:o.normalizeStyle(`opacity:${T.value.includes(S)?.5:1}`)},[o.createElementVNode("span",{style:o.normalizeStyle(`color:${B.color};font-size:${h.value.style.chart.legend.fontSize*1.6}px`)},"●",4),o.createElementVNode("span",null,o.toDisplayString(B.name)+" : ",1),o.createElementVNode("span",null,o.toDisplayString(B.value.toFixed(h.value.style.chart.legend.roundingValue)),1),T.value.includes(S)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",yR,"("+o.toDisplayString(isNaN(B.value/le.value)?"-":(B.value/le.value*100).toFixed(h.value.style.chart.legend.roundingPercentage))+"%)",1))],12,vR))),256))],4)):o.createCommentVNode("",!0),h.value.style.chart.tooltip.show&&g.value?(o.openBlock(),o.createElementBlock("div",{key:3,class:"vue-ui-donut-tooltip",ref_key:"tooltip",ref:l,style:o.normalizeStyle(`top:${v.value.top}px;left:${v.value.left}px;background:${h.value.style.chart.tooltip.backgroundColor};color:${h.value.style.chart.tooltip.color}`),innerHTML:p.value},null,12,wR)):o.createCommentVNode("",!0),x.value.showTable?(o.openBlock(),o.createElementBlock("div",{key:4,onClick:fe,class:"vue-ui-donut-table",style:o.normalizeStyle(`width:100%;margin-top:${x.value.inside?"48px":""}`)},[o.createElementVNode("table",null,[o.createElementVNode("thead",null,[h.value.style.chart.title.text?(o.openBlock(),o.createElementBlock("tr",BR,[o.createElementVNode("th",{colspan:"3",style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline}`)},[o.createElementVNode("span",null,o.toDisplayString(h.value.style.chart.title.text),1),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("span",xR," : "+o.toDisplayString(h.value.style.chart.title.subtitle.text),1)):o.createCommentVNode("",!0)],4)])):o.createCommentVNode("",!0),o.createElementVNode("tr",null,[o.createElementVNode("th",{align:"right",style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline};padding-right:6px`)},bR,4),o.createElementVNode("th",{style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline};text-align:right;padding-right:6px`)},o.toDisplayString(le.value.toFixed(h.value.table.td.roundingValue)),5),o.createElementVNode("th",{style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline};text-align:right;padding-right:6px`)}," 100% ",4)])]),o.createElementVNode("tbody",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Le.value.head,(B,S)=>(o.openBlock(),o.createElementBlock("tr",null,[o.createElementVNode("td",{style:o.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},[o.createElementVNode("div",CR,[o.createElementVNode("span",{style:o.normalizeStyle(`color:${B.color};margin-right:6px;`)},"●",4),o.createElementVNode("span",null,o.toDisplayString(B.name),1)])],4),o.createElementVNode("td",{style:o.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},o.toDisplayString(Le.value.body[S].toFixed(h.value.table.td.roundingValue)),5),o.createElementVNode("td",{style:o.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},o.toDisplayString(isNaN(Le.value.body[S]/le.value)?"-":(Le.value.body[S]/le.value*100).toFixed(h.value.table.td.roundingPercentage))+"% ",5)]))),256))])])],4)):o.createCommentVNode("",!0)],12,PM))}},[["__scopeId","data-v-2bfc0993"]]),Vne="",FR=t=>(o.pushScopeId("data-v-b5e5745f"),t=t(),o.popScopeId(),t),SR=["id"],_R={class:"vue-ui-waffle-user-option-item"},kR=["id","name"],TR=["for"],NR={class:"vue-ui-waffle-user-option-item"},LR=["id","name"],UR=["for"],IR=["disabled"],QR=["stroke"],DR=[o.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-b5e5745f></path><path d="M18 16v.01" data-v-b5e5745f></path><path d="M6 16v.01" data-v-b5e5745f></path><path d="M12 5v.01" data-v-b5e5745f></path><path d="M12 12v.01" data-v-b5e5745f></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-b5e5745f></path>',6)],OR={key:1},PR=["viewBox"],MR=["id"],RR=["stop-color"],HR=["stop-color"],VR={key:0},$R=["font-size","fill","x","y"],zR=["font-size","fill","x","y"],KR=["rx","x","y","height","width","stroke","stroke-width"],GR=["onMouseover","rx","x","y","height","width","fill","stroke","stroke-width"],jR={key:1,x:0,y:512+64,width:"100%",height:"100",style:{overflow:"visible"}},WR=["onClick"],XR={key:0},qR=["onClick"],YR={key:0},JR=["innerHTML"],ZR={key:0},eH={key:0},tH=[FR(()=>o.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),o.createElementVNode("path",{d:"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2"})],-1))],rH={style:{"max-width":"200px margin:0 auto"}},nH=Ii({__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(t,{expose:e,emit:r}){const n=t,A=o.ref(`vue-ui-waffle-${Math.random()}`),a=o.ref({style:{fontFamily:"inherit",chart:{backgroundColor:"#FFFFFF",color:"#2D353C",layout:{grid:{size:20,spaceBetween:2,vertical:!1},rect:{rounded:!0,rounding:2,stroke:"#2D353C",strokeWidth:1,useGradient:!0,gradientIntensity:40},useDiv:!0},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},tooltip:{show:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,showValue:!0,showPercentage:!0,roundingValue:0,roundingPercentage:0},legend:{show:!0,bold:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,roundingValue:0,roundingPercentage:0}}},userOptions:{show:!0,title:"options",labels:{useDiv:"Title & legend inside",showTable:"Show table"}},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0}}}),i=o.ref(!1),s=o.ref(null),l=o.ref(null),u=o.ref(null),c=o.ref({x:0,y:0}),g=o.ref(!1),p=o.ref(""),d=o.ref(null),y=o.computed(()=>{let B=0,S=48;if(l.value&&s.value){const{width:R,height:Q}=l.value.getBoundingClientRect(),J=s.value.getBoundingClientRect();c.value.x+R/2>J.right?B=-R:c.value.x-R/2<J.left?B=0:B=-R/2,c.value.y+Q>J.bottom&&(S=-Q-48)}return{top:c.value.y+S,left:c.value.x+B}});o.onMounted(()=>{document.addEventListener("mousemove",v)}),o.onBeforeUnmount(()=>{document.removeEventListener("mousemove",v)});function v(B){c.value.x=B.clientX,c.value.y=B.clientY}const h=o.computed(()=>Object.keys(n.config||{}).length?ja({defaultConfig:a.value,userConfig:n.config}):a.value),x=o.ref({inside:!h.value.style.chart.layout.useDiv,showTable:h.value.table.show}),C=o.computed(()=>({height:x.value.inside?704:512,width:512})),T=o.computed(()=>({top:x.value.inside?64:0,left:0,height:512,width:512})),D=o.computed(()=>(T.value.width-h.value.style.chart.layout.grid.size*h.value.style.chart.layout.grid.spaceBetween)/h.value.style.chart.layout.grid.size);function Y(B){const S=B.reduce((J,H)=>J+H,0),R=B.map(J=>Math.round(J/S*100)/100),Q=R.reduce((J,H)=>J+H,0);if(Q!==1){const J=R.length-1;R[J]+=1-Q,R[J]=Math.round(R[J]*100)/100}return R}const W=o.computed(()=>n.dataset.map((B,S)=>({...B,color:B.color||Ht[S]||Ht[S%Ht.length],uid:`serie_${S}`}))),U=o.computed(()=>{const B=W.value.filter((S,R)=>!me.value.includes(S.uid)).map((S,R)=>S.values.reduce((Q,J)=>Q+J));return Y(B)}),I=o.computed(()=>{const B=W.value.map((S,R)=>S.values.reduce((Q,J)=>Q+J));return Y(B)}),O=o.computed(()=>W.value.filter((B,S)=>!me.value.includes(B.uid)).map((B,S)=>({uid:B.uid,name:B.name,color:B.color,value:B.values.reduce((R,Q)=>R+Q,0),absoluteValues:B.values,proportion:U.value[S]*Math.pow(h.value.style.chart.layout.grid.size,2)})).sort((B,S)=>S.value-B.value)),re=o.computed(()=>W.value.map((B,S)=>({uid:B.uid,name:B.name,color:B.color,value:B.values.reduce((R,Q)=>R+Q,0),absoluteValues:B.values,proportion:I.value[S]*Math.pow(h.value.style.chart.layout.grid.size,2)})).sort((B,S)=>S.value-B.value));function N(){return re.value.map(B=>({name:B.name,color:B.color,value:B.value,proportion:B.proportion/Math.pow(h.value.style.chart.layout.grid.size,2)}))}e({getData:N});const L=o.computed(()=>O.value.map((B,S)=>{const R=S>0?O.value.filter((H,ue)=>ue<S).map(H=>H.proportion).reduce((H,ue)=>H+ue)+B.proportion-O.value[S-1].proportion:B.proportion-B.proportion,Q=R+B.proportion,J=[];for(let H=R;H<=Q;H+=1)J.push(H);return{...B,start:S>0?O.value.filter((H,ue)=>ue<S).map(H=>H.proportion).reduce((H,ue)=>H+ue)+B.proportion-O.value[S-1].proportion:B.proportion-B.proportion,rects:J}})),G=o.computed(()=>L.value.flatMap((B,S)=>B.rects.map((R,Q)=>({name:B.name,color:B.color,value:B.value,serieIndex:S,...B})))),Z=o.computed(()=>{const B=[];for(let S=0;S<h.value.style.chart.layout.grid.size;S+=1)for(let R=0;R<h.value.style.chart.layout.grid.size;R+=1)B.push({x:(h.value.style.chart.layout.grid.vertical?S:R)*(D.value+h.value.style.chart.layout.grid.spaceBetween),y:(h.value.style.chart.layout.grid.vertical?R:S)*(D.value+h.value.style.chart.layout.grid.spaceBetween)+T.value.top});return B}),ce=o.computed(()=>W.value.map((B,S)=>({name:B.name,color:B.color||Ht[S]||Ht[S%Ht.length],value:B.values.reduce((R,Q)=>R+Q,0),uid:B.uid})).sort((B,S)=>S.value-B.value)),le=o.ref(["00","03","05","08","0A","0D","0F","12","14","17","1A","1C","1F","21","24","26","29","2B","2E","30","33","36","38","3B","3D","40","42","45","47","4A","4D","4F","52","54","57","59","5C","5E","61","63","66","69","6B","6E","70","73","75","78","7A","7D","80","82","85","87","8A","8C","8F","91","94","96","99","9C","9E","A1","A3","A6","A8","AB","AD","B0","B3","B5","B8","BA","BD","BF","C2","C4","C7","C9","CC","CF","D1","D4","D6","D9","DB","DE","E0","E3","E6","E8","EB","ED","F0","F2","F5","F7","FA","FC","FF"]),he=o.computed(()=>O.value.map(B=>B.value).reduce((B,S)=>B+S,0));o.computed(()=>he.value/O.value.length);function fe(){u.value&&u.value.removeAttribute("open")}function pe(B){if(me.value.length===n.dataset.length)return;const S=G.value[B];g.value=!0,d.value=G.value[B].serieIndex;let R="";R+=`<div style="width:100%;text-align:center;border-bottom:1px solid #ccc;padding-bottom:6px;margin-bottom:3px;">${S.name}</div>`,R+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><span style="color:${S.color};font-size:${h.value.style.chart.tooltip.fontSize*1.6}px;">◼</span>`,h.value.style.chart.tooltip.showValue&&(R+=`<b>${S.value.toFixed(h.value.style.chart.tooltip.roundingValue)}</b>`),h.value.style.chart.tooltip.showPercentage&&(h.value.style.chart.tooltip.showValue?R+=`<span>(${(S.value/he.value*100).toFixed(h.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:R+=`<b>${(S.value/he.value*100).toFixed(h.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),p.value=R}const me=o.ref([]);function Le(B){me.value.includes(B)?me.value=me.value.filter(S=>S!==B):me.value.push(B),r("selectLegend",O.value.map(S=>({name:S.name,color:S.color,value:S.value,proportion:S.proportion/Math.pow(h.value.style.chart.layout.grid.size,2)})))}const F=o.computed(()=>{const B=O.value.map(R=>({name:R.name,color:R.color})),S=O.value.map(R=>R.value);return{head:B,body:S}});function _(){i.value=!0,uo({domElement:document.getElementById(`vue-ui-waffle_${A.value}`),fileName:h.value.style.chart.title.text||"vue-ui-waffle"}).finally(()=>{i.value=!1})}function E(){o.nextTick(()=>{const B=F.value.head.map((Ne,Me)=>[[Ne.name],[F.value.body[Me]],[isNaN(F.value.body[Me]/he.value)?"-":F.value.body[Me]/he.value*100]]),S=[[h.value.style.chart.title.text],[h.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(B);function R(Ne){let Me=new ArrayBuffer(Ne.length),_e=new Uint8Array(Me);for(let Ae=0;Ae<Ne.length;Ae++)_e[Ae]=Ne.charCodeAt(Ae)&255;return Me}const Q=Rr.book_new(),J=Rr.aoa_to_sheet(S);Rr.book_append_sheet(Q,J,"Sheet1");const H=Ui(Q,{bookType:"xlsx",type:"binary"}),ue=new Blob([R(H)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),Te=document.createElement("a");Te.href=window.URL.createObjectURL(ue),Te.download=`${h.value.style.chart.title.text.replaceAll(" ","_")||"vue-ui-waffle"}.xlsx`,Te.click(),window.URL.revokeObjectURL(Te.href)})}return(B,S)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-waffle",ref_key:"waffleChart",ref:s,id:`vue-ui-waffle_${A.value}`,style:o.normalizeStyle(`font-family:${h.value.style.fontFamily};width:100%; text-align:center`)},[(!x.value.inside||i.value)&&h.value.style.chart.title.text?(o.openBlock(),o.createElementBlock("div",{key:0,style:o.normalizeStyle(`width:100%;background:${h.value.style.chart.backgroundColor};padding-bottom:12px`)},[o.createElementVNode("div",{style:o.normalizeStyle(`width:100%;text-align:center;color:${h.value.style.chart.title.color};font-size:${h.value.style.chart.title.fontSize}px;font-weight:${h.value.style.chart.title.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.text),5),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("div",{key:0,style:o.normalizeStyle(`width:100%;text-align:center;color:${h.value.style.chart.title.subtitle.color};font-size:${h.value.style.chart.title.subtitle.fontSize}px;font-weight:${h.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.subtitle.text),5)):o.createCommentVNode("",!0)],4)):o.createCommentVNode("",!0),h.value.userOptions.show?(o.openBlock(),o.createElementBlock("details",{key:1,class:"vue-ui-waffle-user-options",style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:u},[o.createElementVNode("summary",{style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)},o.toDisplayString(h.value.userOptions.title),5),o.createElementVNode("div",{class:"vue-ui-waffle-user-options-items",style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)},[o.createElementVNode("div",_R,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-waffle-option-title_${A.value}`,name:`vue-ui-waffle-option-title_${A.value}`,"onUpdate:modelValue":S[0]||(S[0]=R=>x.value.inside=R)},null,8,kR),[[o.vModelCheckbox,x.value.inside]]),o.createElementVNode("label",{for:`vue-ui-waffle-option-title_${A.value}`},o.toDisplayString(h.value.userOptions.labels.useDiv),9,TR)]),o.createElementVNode("div",NR,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-waffle-option-table_${A.value}`,name:`vue-ui-waffle-option-table_${A.value}`,"onUpdate:modelValue":S[1]||(S[1]=R=>x.value.showTable=R)},null,8,LR),[[o.vModelCheckbox,x.value.showTable]]),o.createElementVNode("label",{for:`vue-ui-waffle-option-table_${A.value}`},o.toDisplayString(h.value.userOptions.labels.showTable),9,UR)]),o.createElementVNode("button",{class:"vue-ui-waffle-button",onClick:_,disabled:i.value,style:o.normalizeStyle([{"margin-top":"12px"},`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`])},[i.value?(o.openBlock(),o.createElementBlock("svg",{key:0,class:"vue-ui-waffle-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:h.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},DR,8,QR)):(o.openBlock(),o.createElementBlock("span",OR,"PDF"))],12,IR),o.createElementVNode("button",{class:"vue-ui-waffle-button",onClick:E,style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)}," XLSX ",4)],4)],4)):o.createCommentVNode("",!0),(o.openBlock(),o.createElementBlock("svg",{viewBox:`0 0 ${C.value.width} ${C.value.height}`,style:o.normalizeStyle(`max-width:100%;overflow:visible;background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`),onClick:fe},[o.createElementVNode("defs",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(G.value,(R,Q)=>(o.openBlock(),o.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${A.value}_${Q}`},[o.createElementVNode("stop",{offset:"0%","stop-color":`${o.unref(ks)(R.color,.05)}${le.value[100-h.value.style.chart.layout.rect.gradientIntensity]}`},null,8,RR),o.createElementVNode("stop",{offset:"100%","stop-color":R.color},null,8,HR)],8,MR))),256))]),h.value.style.chart.title.text&&x.value.inside&&!i.value?(o.openBlock(),o.createElementBlock("g",VR,[o.createElementVNode("text",{"font-size":h.value.style.chart.title.fontSize,fill:h.value.style.chart.title.color,x:C.value.width/2,y:h.value.style.chart.title.fontSize,"text-anchor":"middle",style:o.normalizeStyle(`font-weight:${h.value.style.chart.title.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.text),13,$R),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("text",{key:0,"font-size":h.value.style.chart.title.subtitle.fontSize,fill:h.value.style.chart.title.subtitle.color,x:C.value.width/2,y:h.value.style.chart.title.fontSize*2,"text-anchor":"middle",style:o.normalizeStyle(`font-weight:${h.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.subtitle.text),13,zR)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Z.value,(R,Q)=>(o.openBlock(),o.createElementBlock("rect",{rx:h.value.style.chart.layout.rect.rounded?h.value.style.chart.layout.rect.rounding:0,x:R.x,y:R.y,height:D.value,width:D.value,fill:"white",stroke:h.value.style.chart.layout.rect.stroke,"stroke-width":h.value.style.chart.layout.rect.strokeWidth},null,8,KR))),256)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Z.value,(R,Q)=>(o.openBlock(),o.createElementBlock("rect",{onMouseover:J=>pe(Q),onMouseleave:S[2]||(S[2]=J=>{g.value=!1,d.value=null}),rx:h.value.style.chart.layout.rect.rounded?h.value.style.chart.layout.rect.rounding:0,x:R.x,y:R.y,height:D.value,width:D.value,fill:h.value.style.chart.layout.rect.useGradient&&h.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${A.value}_${Q})`:G.value[Q].color,stroke:h.value.style.chart.layout.rect.stroke,"stroke-width":h.value.style.chart.layout.rect.strokeWidth},null,40,GR))),256)),h.value.style.chart.legend.show&&x.value.inside&&!i.value?(o.openBlock(),o.createElementBlock("foreignObject",jR,[o.createElementVNode("div",{class:"vue-ui-waffle-legend",style:o.normalizeStyle(`font-weight:${h.value.style.chart.legend.bold?"bold":""};background:${h.value.style.chart.legend.backgroundColor};color:${h.value.style.chart.legend.color};font-size:${h.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${h.value.style.chart.legend.bold?"bold":""}`),onClick:fe},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(ce.value,(R,Q)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-waffle-legend-item",onClick:J=>Le(R.uid),style:o.normalizeStyle(`opacity:${me.value.includes(R.uid)?.5:1}`)},[o.createElementVNode("span",{style:o.normalizeStyle(`color:${R.color};font-size:${h.value.style.chart.legend.fontSize*1.6}px`)},"◼",4),o.createElementVNode("span",null,o.toDisplayString(R.name)+" : ",1),o.createElementVNode("span",null,o.toDisplayString(R.value.toFixed(h.value.style.chart.legend.roundingValue)),1),me.value.includes(R.uid)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",XR,"("+o.toDisplayString(isNaN(R.value/he.value)?"-":(R.value/he.value*100).toFixed(h.value.style.chart.legend.roundingPercentage))+"%)",1))],12,WR))),256))],4)])):o.createCommentVNode("",!0)],12,PR)),h.value.style.chart.legend.show&&(!x.value.inside||i.value)?(o.openBlock(),o.createElementBlock("div",{key:2,class:"vue-ui-waffle-legend",style:o.normalizeStyle(`font-weight:${h.value.style.chart.legend.bold?"bold":""};background:${h.value.style.chart.legend.backgroundColor};color:${h.value.style.chart.legend.color};font-size:${h.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${h.value.style.chart.legend.bold?"bold":""}`),onClick:fe},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(ce.value,(R,Q)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-waffle-legend-item",onClick:J=>Le(R.uid),style:o.normalizeStyle(`opacity:${me.value.includes(R.uid)?.5:1}`)},[o.createElementVNode("span",{style:o.normalizeStyle(`color:${R.color};font-size:${h.value.style.chart.legend.fontSize*1.6}px`)},"◼",4),o.createElementVNode("span",null,o.toDisplayString(R.name)+" : ",1),o.createElementVNode("span",null,o.toDisplayString(R.value.toFixed(h.value.style.chart.legend.roundingValue)),1),me.value.includes(R.uid)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",YR,"("+o.toDisplayString(isNaN(R.value/he.value)?"-":(R.value/he.value*100).toFixed(h.value.style.chart.legend.roundingPercentage))+"%)",1))],12,qR))),256))],4)):o.createCommentVNode("",!0),h.value.style.chart.tooltip.show&&g.value&&me.value.length<n.dataset.length?(o.openBlock(),o.createElementBlock("div",{key:3,class:"vue-ui-waffle-tooltip",ref_key:"tooltip",ref:l,style:o.normalizeStyle(`top:${y.value.top}px;left:${y.value.left}px;background:${h.value.style.chart.tooltip.backgroundColor};color:${h.value.style.chart.tooltip.color}`),innerHTML:p.value},null,12,JR)):o.createCommentVNode("",!0),x.value.showTable?(o.openBlock(),o.createElementBlock("div",{key:4,onClick:fe,class:"vue-ui-waffle-table",style:o.normalizeStyle(`width:100%;margin-top:${x.value.inside?"48px":""}`)},[o.createElementVNode("table",null,[o.createElementVNode("thead",null,[h.value.style.chart.title.text?(o.openBlock(),o.createElementBlock("tr",ZR,[o.createElementVNode("th",{colspan:"3",style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline}`)},[o.createElementVNode("span",null,o.toDisplayString(h.value.style.chart.title.text),1),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("span",eH," : "+o.toDisplayString(h.value.style.chart.title.subtitle.text),1)):o.createCommentVNode("",!0)],4)])):o.createCommentVNode("",!0),o.createElementVNode("tr",null,[o.createElementVNode("th",{align:"right",style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline};padding-right:6px`)},tH,4),o.createElementVNode("th",{style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline};text-align:right;padding-right:6px`)},o.toDisplayString(he.value.toFixed(h.value.table.td.roundingValue)),5),o.createElementVNode("th",{style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline};text-align:right;padding-right:6px`)}," 100% ",4)])]),o.createElementVNode("tbody",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(F.value.head,(R,Q)=>(o.openBlock(),o.createElementBlock("tr",null,[o.createElementVNode("td",{style:o.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},[o.createElementVNode("div",rH,[o.createElementVNode("span",{style:o.normalizeStyle(`color:${R.color};margin-right:6px;`)},"◼",4),o.createElementVNode("span",null,o.toDisplayString(R.name),1)])],4),o.createElementVNode("td",{style:o.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},o.toDisplayString(F.value.body[Q].toFixed(h.value.table.td.roundingValue)),5),o.createElementVNode("td",{style:o.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},o.toDisplayString(isNaN(F.value.body[Q]/he.value)?"-":(F.value.body[Q]/he.value*100).toFixed(h.value.table.td.roundingPercentage))+"% ",5)]))),256))])])],4)):o.createCommentVNode("",!0)],12,SR))}},[["__scopeId","data-v-b5e5745f"]]),Gne="",AH=["id"],aH={class:"vue-ui-radar-user-option-item"},iH=["id","name"],oH=["for"],sH={class:"vue-ui-radar-user-option-item"},lH=["id","name"],cH=["for"],uH=["disabled"],hH=["stroke"],fH=[o.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-65624abe></path><path d="M18 16v.01" data-v-65624abe></path><path d="M6 16v.01" data-v-65624abe></path><path d="M12 5v.01" data-v-65624abe></path><path d="M12 12v.01" data-v-65624abe></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-65624abe></path>',6)],dH={key:1},gH=["viewBox"],pH=["id"],mH=["stop-color"],vH=["stop-color"],yH={key:0},wH=["font-size","fill","x","y"],BH=["font-size","fill","x","y"],xH={key:1},bH=["x1","y1","x2","y2","stroke","stroke-width"],CH={key:0},EH=["d","stroke","stroke-width"],FH=["d","stroke","stroke-width"],SH={key:2},_H=["x","y","text-anchor","font-size","fill","onMouseenter"],kH={key:0},TH=["d","stroke","stroke-width","fill"],NH={key:3},LH=["cx","cy","fill","r"],UH={key:4,x:0,y:340,width:"100%",height:"60",style:{overflow:"visible"}},IH=["onClick"],QH=["onClick"],DH=["innerHTML"],OH={key:0},PH=["colspan"],MH={key:0},RH=["colspan"],HH={style:{width:"100%"}},VH=Ii({__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(t,{expose:e,emit:r}){const n=t,A=o.ref(`vue-ui-radar-${Math.random()}`),a=o.ref({style:{fontFamily:"inherit",chart:{backgroundColor:"#FFFFFF",color:"#2D353C",layout:{useDiv:!0,plots:{show:!0,radius:2},outerPolygon:{stroke:"#CCCCCC",strokeWidth:1},dataPolygon:{strokeWidth:1,transparent:!1,opacity:20,useGradient:!0},grid:{show:!0,stroke:"#e1e5e8",strokeWidth:.5,graduations:5},labels:{dataLabels:{show:!0,fontSize:12,color:"#2D353C"}}},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},tooltip:{show:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,showValue:!0,showPercentage:!0,roundingValue:0,roundingPercentage:0},legend:{show:!0,bold:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,roundingPercentage:0}}},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0}},userOptions:{show:!0,title:"options",labels:{useDiv:"Title & legend inside",showTable:"Show table"}},translations:{target:"Target"}}),i=o.ref(!1),s=o.ref(null),l=o.ref(null),u=o.ref(null),c=o.ref({x:0,y:0}),g=o.ref(!1),p=o.ref(""),d=o.ref(["00","03","05","08","0A","0D","0F","12","14","17","1A","1C","1F","21","24","26","29","2B","2E","30","33","36","38","3B","3D","40","42","45","47","4A","4D","4F","52","54","57","59","5C","5E","61","63","66","69","6B","6E","70","73","75","78","7A","7D","80","82","85","87","8A","8C","8F","91","94","96","99","9C","9E","A1","A3","A6","A8","AB","AD","B0","B3","B5","B8","BA","BD","BF","C2","C4","C7","C9","CC","CF","D1","D4","D6","D9","DB","DE","E0","E3","E6","E8","EB","ED","F0","F2","F5","F7","FA","FC","FF"]);o.onMounted(()=>{document.addEventListener("mousemove",y)}),o.onBeforeUnmount(()=>{document.removeEventListener("mousemove",y)});function y(_){c.value.x=_.clientX,c.value.y=_.clientY}const v=o.computed(()=>{let _=0,E=48;if(l.value&&s.value){const{width:B,height:S}=l.value.getBoundingClientRect(),R=s.value.getBoundingClientRect();c.value.x+B/2>R.right?_=-B:c.value.x-B/2<R.left?_=0:_=-B/2,c.value.y+S>R.bottom&&(E=-S-48)}return{top:c.value.y+E,left:c.value.x+_}}),h=o.computed(()=>Object.keys(n.config||{}).length?ja({defaultConfig:a.value,userConfig:n.config}):a.value),x=o.ref({dataLabels:{show:h.value.style.chart.layout.labels.dataLabels.show},inside:!h.value.style.chart.layout.useDiv,showTable:h.value.table.show}),C=o.computed(()=>({height:x.value.inside?412:312,width:512})),T=o.ref([]);function D(_){T.value.includes(_)?T.value=T.value.filter(E=>E!==_):T.value.push(_),r("selectLegend",le.value.filter((E,B)=>!T.value.includes(B)).map(E=>({name:E.name,color:E.color,proportion:E.totalProportion})))}function Y(){return le.value.map(_=>({name:_.name,color:_.color,proportion:_.totalProportion}))}e({getData:Y});const W=o.computed(()=>n.dataset.categories.map((_,E)=>({name:_.name,categoryId:`radar_category_${A.value}_${E}`,color:_.color||Ht[E]||Ht[E%Ht.length]}))),U=o.computed(()=>n.dataset.series.map((_,E)=>({..._,color:_.color||Ht[E]||Ht[E%Ht.length],serieId:`radar_serie_${A.value}_${E}`}))),I=o.computed(()=>Math.max(...U.value.flatMap(_=>_.values))),O=o.computed(()=>U.value.length),re=o.computed(()=>Co({plot:{x:256,y:C.value.height/2},radius:128,sides:O.value,rotation:0})),N=o.computed(()=>{const _=[];for(let E=0;E<128;E+=128/h.value.style.chart.layout.grid.graduations)_.push(E);return _}),L=o.computed(()=>re.value.coordinates.map((_,E)=>{const B=U.value[E].values.map(S=>Z({centerX:C.value.width/2,centerY:C.value.height/2,apexX:_.x,apexY:_.y,proportion:S/(U.value[E].target||I.value)}));return{..._,...U.value[E],plots:B}}));function G({x:_,y:E}){let B="middle";return _=Math.round(_),E=Math.round(E),_>C.value.width/2&&(_+=12,B="start"),_<C.value.width/2&&(_-=12,B="end"),E>C.value.height/2&&(E+=20),E<C.value.height/2&&(E-=12),E===C.value.height/2&&(E+=4),{x:_,y:E,anchor:B}}function Z({centerX:_,centerY:E,apexX:B,apexY:S,proportion:R}){return{x:_+(B-_)*R,y:E+(S-E)*R}}function ce(_){let E="";return _.forEach(B=>{E+=`${B.x} ${B.y},`}),`M${E}Z`}const le=o.computed(()=>{const _=U.value.map((E,B)=>E.values.map(S=>S/(E.target||I.value)));return W.value.map((E,B)=>({...E,totalProportion:_.map(S=>S[B]).reduce((S,R)=>S+R,0)/U.value.length}))}),he=o.computed(()=>{const _=[{name:"",color:""},{name:h.value.translations.target,color:""},...le.value],E=n.dataset.series.map((B,S)=>[B.name,B.target,...B.values.flatMap(R=>[R?R.toFixed(h.value.table.td.roundingValue):"-",isNaN(R/B.target)?"":(R/B.target*100).toFixed(h.value.table.td.roundingPercentage)+"%"])]);return{head:_,body:E}}),fe=o.ref(null);function pe(_,E){fe.value=E,g.value=!0;let B="";B+=`<div style="width:100%;text-align:center;border-bottom:1px solid #ccc;padding-bottom:6px;margin-bottom:3px;">${_.name}</div>`;for(let S=0;S<_.values.length;S+=1)T.value.includes(S)||(B+=`<div style="display:flex;flex-wrap:wrap;align-items:center;gap:6px"><span style="color:${W.value[S].color}">●</span><span>${W.value[S].name}</span> : ${h.value.style.chart.tooltip.showValue?`<span>${_.values[S].toFixed(h.value.style.chart.tooltip.roundingValue)}</span>`:""} ${!h.value.style.chart.tooltip.showValue&&h.value.style.chart.tooltip.showPercentage?`<span>${(_.values[S]/_.target*100).toFixed(h.value.style.chart.tooltip.roundingPercentage)}%</span>`:h.value.style.chart.tooltip.showPercentage?`<span>(${(_.values[S]/_.target*100).toFixed(h.value.style.chart.tooltip.roundingPercentage)}%)</span>`:""}</div>`);p.value=B}function me(){i.value=!0,uo({domElement:document.getElementById(`vue-ui-radar_${A.value}`),fileName:h.value.style.chart.title.text||"vue-ui-radar"}).finally(()=>{i.value=!1})}function Le(){o.nextTick(()=>{const _=[[h.value.style.chart.title.text],[h.value.style.chart.title.subtitle.text],[""]],E=[[""],[h.value.translations.target],...le.value.flatMap(Ne=>[[Ne.name],["%"]])],B=n.dataset.series.map((Ne,Me)=>[Ne.name,Ne.target,...Ne.values.flatMap(_e=>[_e,isNaN(_e/Ne.target)?"":_e/Ne.target*100])]),S=_.concat([E]).concat(B);function R(Ne){let Me=new ArrayBuffer(Ne.length),_e=new Uint8Array(Me);for(let Ae=0;Ae<Ne.length;Ae++)_e[Ae]=Ne.charCodeAt(Ae)&255;return Me}const Q=Rr.book_new(),J=Rr.aoa_to_sheet(S);Rr.book_append_sheet(Q,J,"Sheet1");const H=Ui(Q,{bookType:"xlsx",type:"binary"}),ue=new Blob([R(H)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),Te=document.createElement("a");Te.href=window.URL.createObjectURL(ue),Te.download=`${h.value.style.chart.title.text.replaceAll(" ","_")||"vue-ui-radar"}.xlsx`,Te.click(),window.URL.revokeObjectURL(Te.href)})}function F(){u.value&&u.value.removeAttribute("open")}return(_,E)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-radar",ref_key:"radarChart",ref:s,id:`vue-ui-radar_${A.value}`,style:o.normalizeStyle(`font-family:${h.value.style.fontFamily};width:100%; text-align:center`)},[(!x.value.inside||i.value)&&h.value.style.chart.title.text?(o.openBlock(),o.createElementBlock("div",{key:0,style:o.normalizeStyle(`width:100%;background:${h.value.style.chart.backgroundColor};padding-bottom:12px`)},[o.createElementVNode("div",{style:o.normalizeStyle(`width:100%;text-align:center;color:${h.value.style.chart.title.color};font-size:${h.value.style.chart.title.fontSize}px;font-weight:${h.value.style.chart.title.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.text),5),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("div",{key:0,style:o.normalizeStyle(`width:100%;text-align:center;color:${h.value.style.chart.title.subtitle.color};font-size:${h.value.style.chart.title.subtitle.fontSize}px;font-weight:${h.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.subtitle.text),5)):o.createCommentVNode("",!0)],4)):o.createCommentVNode("",!0),h.value.userOptions.show?(o.openBlock(),o.createElementBlock("details",{key:1,class:"vue-ui-radar-user-options",style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:u},[o.createElementVNode("summary",{style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)},o.toDisplayString(h.value.userOptions.title),5),o.createElementVNode("div",{class:"vue-ui-radar-user-options-items",style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)},[o.createElementVNode("div",aH,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-radar-option-title_${A.value}`,name:`vue-ui-radar-option-title_${A.value}`,"onUpdate:modelValue":E[0]||(E[0]=B=>x.value.inside=B)},null,8,iH),[[o.vModelCheckbox,x.value.inside]]),o.createElementVNode("label",{for:`vue-ui-radar-option-title_${A.value}`},o.toDisplayString(h.value.userOptions.labels.useDiv),9,oH)]),o.createElementVNode("div",sH,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-radar-option-table_${A.value}`,name:`vue-ui-radar-option-table_${A.value}`,"onUpdate:modelValue":E[1]||(E[1]=B=>x.value.showTable=B)},null,8,lH),[[o.vModelCheckbox,x.value.showTable]]),o.createElementVNode("label",{for:`vue-ui-radar-option-table_${A.value}`},o.toDisplayString(h.value.userOptions.labels.showTable),9,cH)]),o.createElementVNode("button",{class:"vue-ui-radar-button",onClick:me,disabled:i.value,style:o.normalizeStyle([{"margin-top":"12px"},`color:${h.value.style.chart.color}`])},[i.value?(o.openBlock(),o.createElementBlock("svg",{key:0,class:"vue-ui-radar-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:h.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},fH,8,hH)):(o.openBlock(),o.createElementBlock("span",dH,"PDF"))],12,uH),o.createElementVNode("button",{class:"vue-ui-radar-button",onClick:Le,style:o.normalizeStyle(`color:${h.value.style.chart.color}`)}," XLSX ",4)],4)],4)):o.createCommentVNode("",!0),(o.openBlock(),o.createElementBlock("svg",{viewBox:`0 0 ${C.value.width} ${C.value.height}`,style:o.normalizeStyle(`max-width:100%;overflow:visible;background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`),onClick:F},[o.createElementVNode("defs",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(W.value,(B,S)=>(o.openBlock(),o.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${A.value}_${S}`},[o.createElementVNode("stop",{offset:"0%","stop-color":`${o.unref(ks)(B.color,.05)}${d.value[h.value.style.chart.layout.dataPolygon.opacity]}`},null,8,mH),o.createElementVNode("stop",{offset:"100%","stop-color":B.color+d.value[h.value.style.chart.layout.dataPolygon.opacity]},null,8,vH)],8,pH))),256))]),h.value.style.chart.title.text&&x.value.inside&&!i.value?(o.openBlock(),o.createElementBlock("g",yH,[o.createElementVNode("text",{"font-size":h.value.style.chart.title.fontSize,fill:h.value.style.chart.title.color,x:C.value.width/2,y:h.value.style.chart.title.fontSize,"text-anchor":"middle",style:o.normalizeStyle(`font-weight:${h.value.style.chart.title.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.text),13,wH),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("text",{key:0,"font-size":h.value.style.chart.title.subtitle.fontSize,fill:h.value.style.chart.title.subtitle.color,x:C.value.width/2,y:h.value.style.chart.title.fontSize*2,"text-anchor":"middle",style:o.normalizeStyle(`font-weight:${h.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.subtitle.text),13,BH)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),h.value.style.chart.layout.grid.show?(o.openBlock(),o.createElementBlock("g",xH,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(L.value,B=>(o.openBlock(),o.createElementBlock("line",{x1:C.value.width/2,y1:C.value.height/2,x2:B.x,y2:B.y,stroke:h.value.style.chart.layout.grid.stroke,"stroke-width":h.value.style.chart.layout.grid.strokeWidth},null,8,bH))),256)),h.value.style.chart.layout.grid.graduations>0?(o.openBlock(),o.createElementBlock("g",CH,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,B=>(o.openBlock(),o.createElementBlock("path",{d:o.unref(Co)({plot:{x:256,y:C.value.height/2},radius:B,sides:O.value,rotation:0}).path,fill:"none",stroke:h.value.style.chart.layout.grid.stroke,"stroke-width":h.value.style.chart.layout.grid.strokeWidth},null,8,EH))),256))])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),o.createElementVNode("path",{d:re.value.path,fill:"none",stroke:h.value.style.chart.layout.outerPolygon.stroke,"stroke-width":h.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,FH),h.value.style.chart.layout.labels.dataLabels.show?(o.openBlock(),o.createElementBlock("g",SH,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(L.value,(B,S)=>(o.openBlock(),o.createElementBlock("text",{x:G(B).x,y:G(B).y,"text-anchor":G(B).anchor,"font-size":h.value.style.chart.layout.labels.dataLabels.fontSize,fill:h.value.style.chart.layout.labels.dataLabels.color,onMouseenter:R=>pe(B,S),onMouseleave:E[2]||(E[2]=R=>{g.value=!1,fe.value=null})},o.toDisplayString(B.name),41,_H))),256))])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(W.value,(B,S)=>(o.openBlock(),o.createElementBlock("g",null,[T.value.includes(S)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("g",kH,[o.createElementVNode("path",{d:ce(L.value.map(R=>R.plots[S])),stroke:B.color,"stroke-width":h.value.style.chart.layout.dataPolygon.strokeWidth,fill:h.value.style.chart.layout.dataPolygon.transparent?"transparent":h.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${A.value}_${S})`:B.color+d.value[h.value.style.chart.layout.dataPolygon.opacity]},null,8,TH)]))]))),256)),h.value.style.chart.layout.plots.show?(o.openBlock(),o.createElementBlock("g",NH,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(L.value,(B,S)=>(o.openBlock(),o.createElementBlock("g",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(B.plots,(R,Q)=>(o.openBlock(),o.createElementBlock("circle",{cx:R.x,cy:R.y,fill:T.value.includes(Q)?"transparent":W.value[Q].color,r:fe.value!==null&&fe.value===S?h.value.style.chart.layout.plots.radius*1.6:h.value.style.chart.layout.plots.radius},null,8,LH))),256))]))),256))])):o.createCommentVNode("",!0),h.value.style.chart.legend.show&&x.value.inside&&!i.value?(o.openBlock(),o.createElementBlock("foreignObject",UH,[o.createElementVNode("div",{class:"vue-ui-radar-legend",style:o.normalizeStyle(`font-weight:${h.value.style.chart.legend.bold?"bold":""};color:${h.value.style.chart.legend.color};font-size:${h.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${h.value.style.chart.legend.bold?"bold":""}`),onClick:F},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(le.value,(B,S)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-radar-legend-item",onClick:R=>D(S),style:o.normalizeStyle(`opacity:${T.value.includes(S)?.5:1}`)},[o.createElementVNode("span",{style:o.normalizeStyle(`color:${B.color};font-size:${h.value.style.chart.legend.fontSize*1.6}px`)},"●",4),o.createElementVNode("span",null,o.toDisplayString(B.name)+" : ",1),o.createElementVNode("span",null,o.toDisplayString((B.totalProportion*100).toFixed(h.value.style.chart.legend.roundingPercentage))+"%",1)],12,IH))),256))],4)])):o.createCommentVNode("",!0)],12,gH)),h.value.style.chart.legend.show&&(!x.value.inside||i.value)?(o.openBlock(),o.createElementBlock("div",{key:2,class:"vue-ui-radar-legend",style:o.normalizeStyle(`font-weight:${h.value.style.chart.legend.bold?"bold":""};background:${h.value.style.chart.legend.backgroundColor};color:${h.value.style.chart.legend.color};font-size:${h.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${h.value.style.chart.legend.bold?"bold":""}`),onClick:F},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(le.value,(B,S)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-radar-legend-item",onClick:R=>D(S),style:o.normalizeStyle(`opacity:${T.value.includes(S)?.5:1}`)},[o.createElementVNode("span",{style:o.normalizeStyle(`color:${B.color};font-size:${h.value.style.chart.legend.fontSize*1.6}px`)},"●",4),o.createElementVNode("span",null,o.toDisplayString(B.name)+" : ",1),o.createElementVNode("span",null,o.toDisplayString((B.totalProportion*100).toFixed(h.value.style.chart.legend.roundingPercentage))+"%",1)],12,QH))),256))],4)):o.createCommentVNode("",!0),h.value.style.chart.tooltip.show&&g.value?(o.openBlock(),o.createElementBlock("div",{key:3,class:"vue-ui-radar-tooltip",ref_key:"tooltip",ref:l,style:o.normalizeStyle(`top:${v.value.top}px;left:${v.value.left}px;background:${h.value.style.chart.tooltip.backgroundColor};color:${h.value.style.chart.tooltip.color}`),innerHTML:p.value},null,12,DH)):o.createCommentVNode("",!0),x.value.showTable?(o.openBlock(),o.createElementBlock("div",{key:4,onClick:F,class:"vue-ui-radar-table",style:o.normalizeStyle(`width:100%;margin-top:${x.value.inside?"48px":""}`)},[o.createElementVNode("table",null,[o.createElementVNode("thead",null,[h.value.style.chart.title.text?(o.openBlock(),o.createElementBlock("tr",OH,[o.createElementVNode("th",{colspan:le.value.length+2+3,style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline}`)},[o.createElementVNode("span",null,o.toDisplayString(h.value.style.chart.title.text),1),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("span",MH," : "+o.toDisplayString(h.value.style.chart.title.subtitle.text),1)):o.createCommentVNode("",!0)],12,PH)])):o.createCommentVNode("",!0),o.createElementVNode("tr",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(he.value.head,B=>(o.openBlock(),o.createElementBlock("th",{colspan:B.color?2:1,style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline}`)},[o.createElementVNode("div",HH,[B.color?(o.openBlock(),o.createElementBlock("span",{key:0,style:o.normalizeStyle(`color:${B.color};margin-right:3px`)},"●",4)):o.createCommentVNode("",!0),o.createElementVNode("span",null,o.toDisplayString(B.name),1)])],12,RH))),256))])]),o.createElementVNode("tbody",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(he.value.body,B=>(o.openBlock(),o.createElementBlock("tr",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(B,S=>(o.openBlock(),o.createElementBlock("td",{style:o.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},o.toDisplayString(S),5))),256))]))),256))])])],4)):o.createCommentVNode("",!0)],12,AH))}},[["__scopeId","data-v-65624abe"]]),Xne="",$H=["id"],zH={class:"vue-ui-quadrant-user-option-item"},KH=["id","name"],GH=["for"],jH={class:"vue-ui-quadrant-user-option-item"},WH=["id","name"],XH=["for"],qH={class:"vue-ui-quadrant-user-option-item"},YH=["id","name"],JH=["for"],ZH=["disabled"],e9=["stroke"],t9=[o.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-585093d1></path><path d="M18 16v.01" data-v-585093d1></path><path d="M6 16v.01" data-v-585093d1></path><path d="M12 5v.01" data-v-585093d1></path><path d="M12 12v.01" data-v-585093d1></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-585093d1></path>',6)],r9={key:1},n9=["viewBox"],A9=["id"],a9=["stop-color"],i9=["stop-color"],o9={key:0},s9=["font-size","fill","x","y"],l9=["font-size","fill","x","y"],c9={key:1},u9=["fill","x","y","height","width","stroke-width","stroke","rx"],h9=["x1","y1","x2","y2","stroke","stroke-width"],f9=["x1","y1","x2","y2","stroke","stroke-width"],d9={key:2},g9=["points","fill"],p9=["points","fill"],m9=["points","fill"],v9=["points","fill"],y9={key:3},w9=["y","fill","font-size"],B9=["x","y","fill","font-size"],x9=["x","y","fill","font-size"],b9=["y","fill","font-size"],C9={key:4},E9=["x","y","font-size","fill"],F9=["x","y","font-size","fill"],S9=["x","y","font-size","fill"],_9=["font-size","fill"],k9=["font-size","fill"],T9=["font-size","fill"],N9={key:5},L9=["fill","points"],U9={key:0},I9=["cx","cy","r","fill","stroke","stroke-width","onMouseover","onClick"],Q9={key:1},D9=["d","fill","stroke","stroke-width","onMouseover","onClick"],O9={key:2},P9=["d","fill","stroke","stroke-width","onMouseover","onClick"],M9={key:3},R9=["d","fill","stroke","stroke-width","onMouseover","onClick"],H9={key:4},V9=["d","fill","stroke","stroke-width","onMouseover","onClick"],$9={key:5},z9=["d","fill","stroke","stroke-width","onMouseover","onClick"],K9={key:6},G9=["points","fill","stroke","stroke-width","onMouseover","onClick"],j9={key:6},W9=["x","y","font-size","fill"],X9=["y"],q9=["onClick"],Y9=["innerHTML"],J9=["onClick"],Z9=["innerHTML"],eV=["innerHTML"],tV={key:0},rV={key:0},nV={style:{width:"100%"}},AV=Ii({__name:"vue-ui-quadrant",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectPlot","selectSide","selectLegend"],setup(t,{expose:e,emit:r}){const n=t,A=o.ref(`vue-ui-quadrant-${Math.random()}`),a=o.ref({style:{fontFamily:"inherit",chart:{height:512,width:512,backgroundColor:"#FFFFFF",color:"#2D353C",layout:{useDiv:!0,labels:{quadrantLabels:{show:!0,tl:{text:"",color:"#2D353C",fontSize:16,bold:!0},tr:{text:"",color:"#2D353C",fontSize:16,bold:!0},br:{text:"",color:"#2D353C",fontSize:16,bold:!0},bl:{text:"",color:"#2D353C",fontSize:16,bold:!0}},plotLabels:{show:!0,fontSize:10,color:"#2D353C",offsetY:8},axisLabels:{show:!0,fontSize:14,color:{positive:"#2D353C",negative:"#2D353C"}}},grid:{stroke:"#e1e5e8",strokeWidth:1.5,showArrows:!0,graduations:{stroke:"#e1e5e8",strokeWidth:.5,show:!0,steps:5,fill:!0,color:"#E1E5E8",roundingForce:10},xAxis:{min:-100,max:100,auto:!0,name:""},yAxis:{min:-100,max:100,auto:!0,name:""}},plots:{radius:6,outline:!0,outlineColor:"#FFFFFF",outlineWidth:1},areas:{show:!0,opacity:40,useGradient:!0}},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},tooltip:{show:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,roundingValue:0},legend:{show:!0,bold:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14}}},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0}},userOptions:{show:!0,title:"options",labels:{useDiv:"Title & legend inside",showTable:"Show table",showPlotLabels:"Show plot labels"}},translations:{category:"Category",item:"Item",side:"Side"}}),i=o.ref(!1),s=o.ref(null),l=o.ref(null),u=o.ref(null),c=o.ref({x:0,y:0}),g=o.ref(!1),p=o.ref(""),d=o.ref(["00","03","05","08","0A","0D","0F","12","14","17","1A","1C","1F","21","24","26","29","2B","2E","30","33","36","38","3B","3D","40","42","45","47","4A","4D","4F","52","54","57","59","5C","5E","61","63","66","69","6B","6E","70","73","75","78","7A","7D","80","82","85","87","8A","8C","8F","91","94","96","99","9C","9E","A1","A3","A6","A8","AB","AD","B0","B3","B5","B8","BA","BD","BF","C2","C4","C7","C9","CC","CF","D1","D4","D6","D9","DB","DE","E0","E3","E6","E8","EB","ED","F0","F2","F5","F7","FA","FC","FF"]);o.onMounted(()=>{document.addEventListener("mousemove",y);const E=document.getElementById("xLabelMin");if(E){const Q=E.getBBox().height/2+C.value.padding*.6,J=C.value.centerY;E.setAttributeNS(null,"transform",`rotate(-90, ${Q}, ${J})`),E.setAttributeNS(null,"x",Q),E.setAttributeNS(null,"y",J)}const B=document.getElementById("xLabelMax");if(B){const Q=B.getBBox().height/2+C.value.right,J=C.value.centerY;B.setAttributeNS(null,"transform",`rotate(90, ${Q}, ${J})`),B.setAttributeNS(null,"x",Q),B.setAttributeNS(null,"y",J)}const S=document.getElementById("xLabelMaxName");if(S){const Q=S.getBBox().height/2+C.value.right+C.value.padding*.3,J=C.value.centerY;S.setAttributeNS(null,"transform",`rotate(90, ${Q}, ${J})`),S.setAttributeNS(null,"x",Q),S.setAttributeNS(null,"y",J)}}),o.onBeforeUnmount(()=>{document.removeEventListener("mousemove",y)});function y(E){c.value.x=E.clientX,c.value.y=E.clientY}const v=o.computed(()=>{let E=0,B=48;if(l.value&&s.value){const{width:S,height:R}=l.value.getBoundingClientRect(),Q=s.value.getBoundingClientRect();c.value.x+S/2>Q.right?E=-S:c.value.x-S/2<Q.left?E=0:E=-S/2,c.value.y+R>Q.bottom&&(B=-R-48)}return{top:c.value.y+B,left:c.value.x+E}}),h=o.computed(()=>Object.keys(n.config||{}).length?ja({defaultConfig:a.value,userConfig:n.config}):a.value),x=o.ref({plotLabels:{show:h.value.style.chart.layout.labels.plotLabels.show},inside:!h.value.style.chart.layout.useDiv,showTable:h.value.table.show}),C=o.computed(()=>{const E=x.value.inside?100:0,B=x.value.inside?100:0,S=48;return{height:h.value.style.chart.height+E+B,usableHeight:h.value.style.chart.height-S*2,width:h.value.style.chart.width,usableWidth:h.value.style.chart.width-S*2,top:E+S,left:S,right:h.value.style.chart.width-S,bottom:h.value.style.chart.height+E-S,centerX:h.value.style.chart.width/2,centerY:h.value.style.chart.height+E-h.value.style.chart.height/2,padding:S}}),T=o.computed(()=>{const E=h.value.style.chart.layout.grid.graduations.steps,B=C.value.usableWidth/(E*2),S=C.value.top,R=[];for(let Q=0;Q<E;Q+=1)R.push({x:C.value.padding+B*Q,y:S+C.value.usableHeight*(Q/E/2),height:C.value.usableHeight*(1-Q/E),width:C.value.usableWidth*(1-Q/E),opacity:d.value[Math.round((Q+1)/E*20)]});return R}),D=o.computed(()=>{let E=h.value.style.chart.layout.grid.xAxis.max,B=h.value.style.chart.layout.grid.xAxis.min,S=h.value.style.chart.layout.grid.yAxis.max,R=h.value.style.chart.layout.grid.yAxis.min;return h.value.style.chart.layout.grid.xAxis.auto&&(E=Math.max(...W.value.flatMap(Q=>Q.series.map(J=>J.x))),B=Math.min(...W.value.flatMap(Q=>Q.series.map(J=>J.x)))),h.value.style.chart.layout.grid.yAxis.auto&&(S=Math.max(...W.value.flatMap(Q=>Q.series.map(J=>J.y))),R=Math.min(...W.value.flatMap(Q=>Q.series.map(J=>J.y)))),{x:{max:E,min:B},y:{max:S,min:R}}}),Y=o.ref([]),W=o.computed(()=>n.dataset.map((E,B)=>({...E,id:`cat_${B}_${A.value}`,color:E.color||Ht[B]}))),U=o.computed(()=>W.value.filter(E=>!Y.value.includes(E.id))),I=o.computed(()=>W.value.map((E,B)=>({...E,shape:E.shape||"circle",series:E.series.map(S=>({...S,x:re(S.x),y:N(S.y),xValue:S.x,yValue:S.y,quadrantSide:le({x:S.x,y:S.y}),categoryName:E.name,shape:E.shape,color:E.color}))}))),O=o.computed(()=>U.value.map((E,B)=>({...E,shape:E.shape||"circle",color:E.color||Ht[B],series:E.series.map(S=>({...S,x:re(S.x),y:N(S.y),xValue:S.x,yValue:S.y,quadrantSide:le({x:S.x,y:S.y}),categoryName:E.name,shape:E.shape,color:E.color}))})));function re(E){const B=E/D.value.x.max;return C.value.centerX+C.value.usableWidth/2*B}function N(E){const B=E/D.value.y.max;return C.value.centerY+(1-C.value.usableHeight/2*B)}const L=o.computed(()=>{const E=O.value.flatMap(J=>J.series.map(H=>({x:H.xValue,y:H.yValue,name:H.name,category:H.categoryName,quadrantSide:H.quadrantSide,sideName:h.value.style.chart.layout.labels.quadrantLabels[H.quadrantSide].text,color:J.color,shape:J.shape}))),B=h.value.style.chart.layout.grid.xAxis.name||"x",S=h.value.style.chart.layout.grid.yAxis.name||"y",R=[h.value.translations.category,h.value.translations.item,B,S,h.value.translations.side],Q=E.map(J=>[J.category,J.name,J.x,J.y,J.sideName||J.quadrantSide]);return{head:R,body:Q}});function G(E,B){let S="";switch(E){case"circle":S=`<span style="color:${B}">●</span>`;break;case"triangle":S=`<span style="color:${B}">▲</span>`;break;case"square":S=`<span style="color:${B}">◼</span>`;break;case"diamond":S=`<span style="color:${B}">◆</span>`;break;case"pentagon":S=`<span style="color:${B}">⬟</span>`;break;case"hexagon":S=`<span style="color:${B}">⬣</span>`;break;case"star":S=`<span style="color:${B}">🟊</span>`;break}return S}const Z=o.computed(()=>I.value.map(E=>({name:E.name,shapePath:G(E.shape,E.color),id:E.id})));function ce(E){Y.value.includes(E)?Y.value=Y.value.filter(S=>S!==E):Y.value.push(E);const B=me();r("selectLegend",B)}function le(E){switch(!0){case(E.x>=0&&E.y>=0):return"tr";case(E.x>=0&&E.y<0):return"br";case(E.x<0&&E.y<0):return"bl";case(E.x<0&&E.y>=0):return"tl";default:return""}}function he(E,B){g.value=!0;let S="";B.quadrantSide&&(S+=`<div style="color:${h.value.style.chart.layout.labels.quadrantLabels[B.quadrantSide].color};font-weight:${h.value.style.chart.layout.labels.quadrantLabels[B.quadrantSide].bold?"bold":"400"}">${h.value.style.chart.layout.labels.quadrantLabels[B.quadrantSide].text}</div>`),S+=`<div>${E.name}</div>`,S+=`<div style="padding-bottom:6px;border-bottom:1px solid #e1e5e8;margin-bottom:3px">${B.name}</div>`,S+=`<div>${h.value.style.chart.layout.grid.xAxis.name?h.value.style.chart.layout.grid.xAxis.name:"x"} : <b>${B.xValue.toFixed(h.value.style.chart.tooltip.roundingValue)}</b></div>`,S+=`<div>${h.value.style.chart.layout.grid.yAxis.name?h.value.style.chart.layout.grid.yAxis.name:"y"} : <b>${B.yValue.toFixed(h.value.style.chart.tooltip.roundingValue)}</b></div>`,p.value=`<div style="text-align:left;font-size:${h.value.style.chart.tooltip.fontSize}px">${S}</div>`}function fe(E,B){const S={category:E.name,itemName:B.name,x:B.xValue,y:B.yValue,quadrantSide:B.quadrantSide,sideName:h.value.style.chart.layout.labels.quadrantLabels[B.quadrantSide].text};r("selectPlot",S)}function pe(E){const B=O.value.flatMap(R=>R.series.filter(Q=>Q.quadrantSide===E).map(Q=>({category:Q.categoryName,itemName:Q.name,x:Q.xValue,y:Q.yValue}))),S={quadrantSide:E,sideName:h.value.style.chart.layout.labels.quadrantLabels[E].text,items:[...B]};r("selectSide",S)}function me(){return O.value.map(E=>({color:E.color,name:E.name,shape:E.shape,series:E.series.map(B=>({name:B.name,x:B.xValue,y:B.yValue,quadrantSide:B.quadrantSide,sideName:h.value.style.chart.layout.labels.quadrantLabels[B.quadrantSide].text}))}))}e({getData:me});function Le(){u.value&&u.value.removeAttribute("open")}function F(){i.value=!0,o.nextTick(()=>{uo({domElement:document.getElementById(`vue-ui-quadrant_${A.value}`),fileName:h.value.style.chart.title.text||"vue-ui-quadrant"}).finally(()=>{i.value=!1})})}function _(){o.nextTick(()=>{const E=[[h.value.style.chart.title.text],[h.value.style.chart.title.subtitle.text],[""]],B=L.value.head,S=L.value.body,R=E.concat([B]).concat(S);function Q(Me){let _e=new ArrayBuffer(Me.length),Ae=new Uint8Array(_e);for(let Pe=0;Pe<Me.length;Pe++)Ae[Pe]=Me.charCodeAt(Pe)&255;return _e}const J=Rr.book_new(),H=Rr.aoa_to_sheet(R);Rr.book_append_sheet(J,H,"Sheet1");const ue=Ui(J,{bookType:"xlsx",type:"binary"}),Te=new Blob([Q(ue)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),Ne=document.createElement("a");Ne.href=window.URL.createObjectURL(Te),Ne.download=`${h.value.style.chart.title.text.replaceAll(" ","_")||"vue-ui-radar"}.xlsx`,Ne.click(),window.URL.revokeObjectURL(Ne.href)})}return(E,B)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-quadrant",ref_key:"quadrantChart",ref:s,id:`vue-ui-quadrant_${A.value}`,style:o.normalizeStyle(`font-family:${h.value.style.fontFamily};width:100%; text-align:center`)},[(!x.value.inside||i.value)&&h.value.style.chart.title.text?(o.openBlock(),o.createElementBlock("div",{key:0,style:o.normalizeStyle(`width:100%;background:${h.value.style.chart.backgroundColor};padding-bottom:12px`)},[o.createElementVNode("div",{style:o.normalizeStyle(`width:100%;text-align:center;color:${h.value.style.chart.title.color};font-size:${h.value.style.chart.title.fontSize}px;font-weight:${h.value.style.chart.title.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.text),5),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("div",{key:0,style:o.normalizeStyle(`width:100%;text-align:center;color:${h.value.style.chart.title.subtitle.color};font-size:${h.value.style.chart.title.subtitle.fontSize}px;font-weight:${h.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.subtitle.text),5)):o.createCommentVNode("",!0)],4)):o.createCommentVNode("",!0),h.value.userOptions.show?(o.openBlock(),o.createElementBlock("details",{key:1,class:"vue-ui-quadrant-user-options",style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:u},[o.createElementVNode("summary",{style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)},o.toDisplayString(h.value.userOptions.title),5),o.createElementVNode("div",{class:"vue-ui-quadrant-user-options-items",style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)},[o.createElementVNode("div",zH,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-quadrant-option-plotLabels_${A.value}`,name:`vue-ui-quadrant-option-plotLabels_${A.value}`,"onUpdate:modelValue":B[0]||(B[0]=S=>x.value.plotLabels.show=S)},null,8,KH),[[o.vModelCheckbox,x.value.plotLabels.show]]),o.createElementVNode("label",{for:`vue-ui-quadrant-option-plotLabels_${A.value}`},o.toDisplayString(h.value.userOptions.labels.showPlotLabels),9,GH)]),o.createElementVNode("div",jH,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-quadrant-option-title_${A.value}`,name:`vue-ui-quadrant-option-title_${A.value}`,"onUpdate:modelValue":B[1]||(B[1]=S=>x.value.inside=S)},null,8,WH),[[o.vModelCheckbox,x.value.inside]]),o.createElementVNode("label",{for:`vue-ui-quadrant-option-title_${A.value}`},o.toDisplayString(h.value.userOptions.labels.useDiv),9,XH)]),o.createElementVNode("div",qH,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-quadrant-option-table_${A.value}`,name:`vue-ui-quadrant-option-table_${A.value}`,"onUpdate:modelValue":B[2]||(B[2]=S=>x.value.showTable=S)},null,8,YH),[[o.vModelCheckbox,x.value.showTable]]),o.createElementVNode("label",{for:`vue-ui-quadrant-option-table_${A.value}`},o.toDisplayString(h.value.userOptions.labels.showTable),9,JH)]),o.createElementVNode("button",{class:"vue-ui-quadrant-button",onClick:F,disabled:i.value,style:o.normalizeStyle([{"margin-top":"12px"},`color:${h.value.style.chart.color}`])},[i.value?(o.openBlock(),o.createElementBlock("svg",{key:0,class:"vue-ui-quadrant-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:h.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t9,8,e9)):(o.openBlock(),o.createElementBlock("span",r9,"PDF"))],12,ZH),o.createElementVNode("button",{class:"vue-ui-quadrant-button",onClick:_,style:o.normalizeStyle(`color:${h.value.style.chart.color}`)}," XLSX ",4)],4)],4)):o.createCommentVNode("",!0),(o.openBlock(),o.createElementBlock("svg",{viewBox:`0 0 ${C.value.width} ${C.value.height}`,style:o.normalizeStyle(`max-width:100%;overflow:visible;background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`),onClick:Le},[o.createElementVNode("defs",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(O.value,(S,R)=>(o.openBlock(),o.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`quadrant_gradient_${A.value}_${R}`},[o.createElementVNode("stop",{offset:"0%","stop-color":`${o.unref(ks)(S.color,.05)}${d.value[h.value.style.chart.layout.areas.opacity]}`},null,8,a9),o.createElementVNode("stop",{offset:"100%","stop-color":S.color+d.value[h.value.style.chart.layout.areas.opacity]},null,8,i9)],8,A9))),256))]),h.value.style.chart.title.text&&x.value.inside&&!i.value?(o.openBlock(),o.createElementBlock("g",o9,[o.createElementVNode("text",{"font-size":h.value.style.chart.title.fontSize,fill:h.value.style.chart.title.color,x:C.value.width/2,y:h.value.style.chart.title.fontSize+6,"text-anchor":"middle",style:o.normalizeStyle(`font-weight:${h.value.style.chart.title.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.text),13,s9),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("text",{key:0,"font-size":h.value.style.chart.title.subtitle.fontSize,fill:h.value.style.chart.title.subtitle.color,x:C.value.width/2,y:h.value.style.chart.title.fontSize*2+6,"text-anchor":"middle",style:o.normalizeStyle(`font-weight:${h.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.subtitle.text),13,l9)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),h.value.style.chart.layout.grid.graduations.show?(o.openBlock(),o.createElementBlock("g",c9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(T.value,S=>(o.openBlock(),o.createElementBlock("rect",{fill:h.value.style.chart.layout.grid.graduations.fill?`${h.value.style.chart.layout.grid.graduations.color}${S.opacity}`:"none",x:S.x,y:S.y,height:S.height,width:S.width,"stroke-width":h.value.style.chart.layout.grid.graduations.strokeWidth,stroke:h.value.style.chart.layout.grid.graduations.stroke,rx:h.value.style.chart.layout.grid.graduations.roundingForce},null,8,u9))),256))])):o.createCommentVNode("",!0),o.createElementVNode("line",{x1:C.value.left,y1:C.value.centerY,x2:C.value.right,y2:C.value.centerY,stroke:h.value.style.chart.layout.grid.stroke,"stroke-width":h.value.style.chart.layout.grid.strokeWidth},null,8,h9),o.createElementVNode("line",{x1:C.value.centerX,y1:C.value.top,x2:C.value.centerX,y2:C.value.bottom,stroke:h.value.style.chart.layout.grid.stroke,"stroke-width":h.value.style.chart.layout.grid.strokeWidth},null,8,f9),h.value.style.chart.layout.grid.showArrows?(o.openBlock(),o.createElementBlock("g",d9,[o.createElementVNode("polygon",{points:`${C.value.right-C.value.width*.02},${C.value.centerY-C.value.height*.009} ${C.value.right},${C.value.centerY} ${C.value.right-C.value.width*.02},${C.value.centerY+C.value.height*.009}`,fill:h.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,g9),o.createElementVNode("polygon",{points:`${C.value.left+C.value.width*.02},${C.value.centerY-C.value.height*.009} ${C.value.left},${C.value.centerY} ${C.value.left+C.value.width*.02},${C.value.centerY+C.value.height*.009}`,fill:h.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,p9),o.createElementVNode("polygon",{points:`${C.value.centerX-C.value.width*.013},${C.value.top+C.value.height*.015} ${C.value.centerX},${C.value.top} ${C.value.centerX+C.value.width*.013},${C.value.top+C.value.height*.015}`,fill:h.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,m9),o.createElementVNode("polygon",{points:`${C.value.centerX-C.value.width*.013},${C.value.bottom-C.value.height*.015} ${C.value.centerX},${C.value.bottom} ${C.value.centerX+C.value.width*.013},${C.value.bottom-C.value.height*.015}`,fill:h.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,v9)])):o.createCommentVNode("",!0),h.value.style.chart.layout.labels.quadrantLabels.show?(o.openBlock(),o.createElementBlock("g",y9,[h.value.style.chart.layout.labels.quadrantLabels.tl.text?(o.openBlock(),o.createElementBlock("text",{key:0,x:0,y:C.value.top-C.value.padding/2,"text-anchor":"start",fill:h.value.style.chart.layout.labels.quadrantLabels.tl.color,"font-size":h.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,style:o.normalizeStyle(`font-weight:${h.value.style.chart.layout.labels.quadrantLabels.tl.bold?"bold":""}`),onClick:B[3]||(B[3]=S=>pe("tl"))},o.toDisplayString(h.value.style.chart.layout.labels.quadrantLabels.tl.text),13,w9)):o.createCommentVNode("",!0),h.value.style.chart.layout.labels.quadrantLabels.tr.text?(o.openBlock(),o.createElementBlock("text",{key:1,x:C.value.width,y:C.value.top-C.value.padding/2,"text-anchor":"end",fill:h.value.style.chart.layout.labels.quadrantLabels.tr.color,"font-size":h.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,style:o.normalizeStyle(`font-weight:${h.value.style.chart.layout.labels.quadrantLabels.tr.bold?"bold":""}`),onClick:B[4]||(B[4]=S=>pe("tr"))},o.toDisplayString(h.value.style.chart.layout.labels.quadrantLabels.tr.text),13,B9)):o.createCommentVNode("",!0),h.value.style.chart.layout.labels.quadrantLabels.br.text?(o.openBlock(),o.createElementBlock("text",{key:2,x:C.value.width,y:C.value.bottom+C.value.padding*.7,"text-anchor":"end",fill:h.value.style.chart.layout.labels.quadrantLabels.br.color,"font-size":h.value.style.chart.layout.labels.quadrantLabels.br.fontSize,style:o.normalizeStyle(`font-weight:${h.value.style.chart.layout.labels.quadrantLabels.br.bold?"bold":""}`),onClick:B[5]||(B[5]=S=>pe("br"))},o.toDisplayString(h.value.style.chart.layout.labels.quadrantLabels.br.text),13,x9)):o.createCommentVNode("",!0),h.value.style.chart.layout.labels.quadrantLabels.bl.text?(o.openBlock(),o.createElementBlock("text",{key:3,x:0,y:C.value.bottom+C.value.padding*.7,"text-anchor":"start",fill:h.value.style.chart.layout.labels.quadrantLabels.bl.color,"font-size":h.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,style:o.normalizeStyle(`font-weight:${h.value.style.chart.layout.labels.quadrantLabels.bl.bold?"bold":""}`),onClick:B[6]||(B[6]=S=>pe("bl"))},o.toDisplayString(h.value.style.chart.layout.labels.quadrantLabels.bl.text),13,b9)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),h.value.style.chart.layout.labels.axisLabels.show?(o.openBlock(),o.createElementBlock("g",C9,[o.createElementVNode("text",{x:C.value.centerX,y:C.value.top-C.value.padding/6,"text-anchor":"middle","font-size":h.value.style.chart.layout.labels.axisLabels.fontSize,fill:h.value.style.chart.layout.labels.axisLabels.color.positive},o.toDisplayString(D.value.y.max),9,E9),o.createElementVNode("text",{x:C.value.centerX,y:C.value.top-C.value.padding/2,"text-anchor":"middle","font-size":h.value.style.chart.layout.labels.axisLabels.fontSize,fill:h.value.style.chart.layout.labels.axisLabels.color.positive},o.toDisplayString(h.value.style.chart.layout.grid.yAxis.name),9,F9),o.createElementVNode("text",{x:C.value.centerX,y:C.value.bottom+C.value.padding*.35,"text-anchor":"middle","font-size":h.value.style.chart.layout.labels.axisLabels.fontSize,fill:h.value.style.chart.layout.labels.axisLabels.color.negative},o.toDisplayString(D.value.y.min),9,S9),o.createElementVNode("text",{id:"xLabelMin","text-anchor":"middle","font-size":h.value.style.chart.layout.labels.axisLabels.fontSize,fill:h.value.style.chart.layout.labels.axisLabels.color.negative},o.toDisplayString(D.value.x.min),9,_9),o.createElementVNode("text",{id:"xLabelMax","text-anchor":"middle","font-size":h.value.style.chart.layout.labels.axisLabels.fontSize,fill:h.value.style.chart.layout.labels.axisLabels.color.positive},o.toDisplayString(D.value.x.max),9,k9),o.createElementVNode("text",{id:"xLabelMaxName","text-anchor":"middle","font-size":h.value.style.chart.layout.labels.axisLabels.fontSize,fill:h.value.style.chart.layout.labels.axisLabels.color.positive},o.toDisplayString(h.value.style.chart.layout.grid.xAxis.name),9,T9)])):o.createCommentVNode("",!0),h.value.style.chart.layout.areas.show?(o.openBlock(),o.createElementBlock("g",N9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(O.value,(S,R)=>(o.openBlock(),o.createElementBlock("g",null,[S.series.length>2?(o.openBlock(),o.createElementBlock("polygon",{key:0,fill:h.value.style.chart.layout.areas.useGradient?`url(#quadrant_gradient_${A.value}_${R})`:`${S.color}${d.value[h.value.style.chart.layout.areas.opacity]}`,points:o.unref(GD)(S)},null,8,L9)):o.createCommentVNode("",!0)]))),256))])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(O.value,S=>(o.openBlock(),o.createElementBlock("g",null,[S.shape==="circle"?(o.openBlock(),o.createElementBlock("g",U9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S.series,R=>(o.openBlock(),o.createElementBlock("circle",{cx:R.x,cy:R.y,r:h.value.style.chart.layout.plots.radius*.8,fill:S.color,stroke:h.value.style.chart.layout.plots.outline?h.value.style.chart.layout.plots.outlineColor:"none","stroke-width":h.value.style.chart.layout.plots.outlineWidth,onMouseover:Q=>he(S,R),onMouseout:B[7]||(B[7]=Q=>g.value=!1),onClick:Q=>fe(S,R)},null,40,I9))),256))])):o.createCommentVNode("",!0),S.shape==="triangle"?(o.openBlock(),o.createElementBlock("g",Q9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S.series,R=>(o.openBlock(),o.createElementBlock("path",{d:o.unref(Co)({plot:{x:R.x,y:R.y},radius:h.value.style.chart.layout.plots.radius,sides:3,rotation:.52}).path,fill:S.color,stroke:h.value.style.chart.layout.plots.outline?h.value.style.chart.layout.plots.outlineColor:"none","stroke-width":h.value.style.chart.layout.plots.outlineWidth,onMouseover:Q=>he(S,R),onMouseout:B[8]||(B[8]=Q=>g.value=!1),onClick:Q=>fe(S,R)},null,40,D9))),256))])):o.createCommentVNode("",!0),S.shape==="square"?(o.openBlock(),o.createElementBlock("g",O9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S.series,R=>(o.openBlock(),o.createElementBlock("path",{d:o.unref(Co)({plot:{x:R.x,y:R.y},radius:h.value.style.chart.layout.plots.radius,sides:4,rotation:.8}).path,fill:S.color,stroke:h.value.style.chart.layout.plots.outline?h.value.style.chart.layout.plots.outlineColor:"none","stroke-width":h.value.style.chart.layout.plots.outlineWidth,onMouseover:Q=>he(S,R),onMouseout:B[9]||(B[9]=Q=>g.value=!1),onClick:Q=>fe(S,R)},null,40,P9))),256))])):o.createCommentVNode("",!0),S.shape==="diamond"?(o.openBlock(),o.createElementBlock("g",M9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S.series,R=>(o.openBlock(),o.createElementBlock("path",{d:o.unref(Co)({plot:{x:R.x,y:R.y},radius:h.value.style.chart.layout.plots.radius,sides:4,rotation:0}).path,fill:S.color,stroke:h.value.style.chart.layout.plots.outline?h.value.style.chart.layout.plots.outlineColor:"none","stroke-width":h.value.style.chart.layout.plots.outlineWidth,onMouseover:Q=>he(S,R),onMouseout:B[10]||(B[10]=Q=>g.value=!1),onClick:Q=>fe(S,R)},null,40,R9))),256))])):o.createCommentVNode("",!0),S.shape==="pentagon"?(o.openBlock(),o.createElementBlock("g",H9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S.series,R=>(o.openBlock(),o.createElementBlock("path",{d:o.unref(Co)({plot:{x:R.x,y:R.y},radius:h.value.style.chart.layout.plots.radius,sides:5,rotation:.95}).path,fill:S.color,stroke:h.value.style.chart.layout.plots.outline?h.value.style.chart.layout.plots.outlineColor:"none","stroke-width":h.value.style.chart.layout.plots.outlineWidth,onMouseover:Q=>he(S,R),onMouseout:B[11]||(B[11]=Q=>g.value=!1),onClick:Q=>fe(S,R)},null,40,V9))),256))])):o.createCommentVNode("",!0),S.shape==="hexagon"?(o.openBlock(),o.createElementBlock("g",$9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S.series,R=>(o.openBlock(),o.createElementBlock("path",{d:o.unref(Co)({plot:{x:R.x,y:R.y},radius:h.value.style.chart.layout.plots.radius,sides:6,rotation:0}).path,fill:S.color,stroke:h.value.style.chart.layout.plots.outline?h.value.style.chart.layout.plots.outlineColor:"none","stroke-width":h.value.style.chart.layout.plots.outlineWidth,onMouseover:Q=>he(S,R),onMouseout:B[12]||(B[12]=Q=>g.value=!1),onClick:Q=>fe(S,R)},null,40,z9))),256))])):o.createCommentVNode("",!0),S.shape==="star"?(o.openBlock(),o.createElementBlock("g",K9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S.series,R=>(o.openBlock(),o.createElementBlock("polygon",{points:o.unref(KD)({plot:{x:R.x,y:R.y},radius:h.value.style.chart.layout.plots.radius}),fill:S.color,stroke:h.value.style.chart.layout.plots.outline?h.value.style.chart.layout.plots.outlineColor:"none","stroke-width":h.value.style.chart.layout.plots.outlineWidth,onMouseover:Q=>he(S,R),onMouseout:B[13]||(B[13]=Q=>g.value=!1),onClick:Q=>fe(S,R)},null,40,G9))),256))])):o.createCommentVNode("",!0)]))),256)),x.value.plotLabels.show?(o.openBlock(),o.createElementBlock("g",j9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(O.value,S=>(o.openBlock(),o.createElementBlock("g",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S.series,R=>(o.openBlock(),o.createElementBlock("text",{x:R.x,y:R.y+h.value.style.chart.layout.labels.plotLabels.offsetY+h.value.style.chart.layout.plots.radius,"text-anchor":"middle","font-size":h.value.style.chart.layout.labels.plotLabels.fontSize,fill:h.value.style.chart.layout.labels.plotLabels.color},o.toDisplayString(R.name),9,W9))),256))]))),256))])):o.createCommentVNode("",!0),h.value.style.chart.legend.show&&x.value.inside&&!i.value?(o.openBlock(),o.createElementBlock("foreignObject",{key:7,x:0,y:C.value.bottom+36,width:"100%",height:"90",style:{overflow:"visible"}},[o.createElementVNode("div",{class:"vue-ui-quadrant-legend",style:o.normalizeStyle(`font-weight:${h.value.style.chart.legend.bold?"bold":""};color:${h.value.style.chart.legend.color};font-size:${h.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${h.value.style.chart.legend.bold?"bold":""}`),onClick:Le},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Z.value,(S,R)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-quadrant-legend-item",onClick:Q=>ce(S.id),style:o.normalizeStyle(`opacity:${Y.value.includes(S.id)?.5:1}`)},[o.createElementVNode("div",{innerHTML:S.shapePath,style:{display:"flex","align-items":"center","justify-content":"center"}},null,8,Y9),o.createElementVNode("span",null,o.toDisplayString(S.name),1)],12,q9))),256))],4)],8,X9)):o.createCommentVNode("",!0)],12,n9)),h.value.style.chart.legend.show&&(!x.value.inside||i.value)?(o.openBlock(),o.createElementBlock("div",{key:2,class:"vue-ui-quadrant-legend",style:o.normalizeStyle(`font-weight:${h.value.style.chart.legend.bold?"bold":""};background:${h.value.style.chart.legend.backgroundColor};color:${h.value.style.chart.legend.color};font-size:${h.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${h.value.style.chart.legend.bold?"bold":""}`),onClick:Le},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Z.value,(S,R)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-quadrant-legend-item",onClick:Q=>ce(S.id),style:o.normalizeStyle(`opacity:${Y.value.includes(S.id)?.5:1}`)},[o.createElementVNode("div",{innerHTML:S.shapePath,style:{display:"flex","align-items":"center","justify-content":"center"}},null,8,Z9),o.createElementVNode("span",null,o.toDisplayString(S.name),1)],12,J9))),256))],4)):o.createCommentVNode("",!0),h.value.style.chart.tooltip.show&&g.value?(o.openBlock(),o.createElementBlock("div",{key:3,class:"vue-ui-quadrant-tooltip",ref_key:"tooltip",ref:l,style:o.normalizeStyle(`top:${v.value.top}px;left:${v.value.left}px;background:${h.value.style.chart.tooltip.backgroundColor};color:${h.value.style.chart.tooltip.color}`),innerHTML:p.value},null,12,eV)):o.createCommentVNode("",!0),x.value.showTable?(o.openBlock(),o.createElementBlock("div",{key:4,onClick:Le,class:"vue-ui-quadrant-table",style:o.normalizeStyle(`width:100%;margin-top:${x.value.inside?"48px":""}`)},[o.createElementVNode("table",null,[o.createElementVNode("thead",null,[h.value.style.chart.title.text?(o.openBlock(),o.createElementBlock("tr",tV,[o.createElementVNode("th",{colspan:5,style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline}`)},[o.createElementVNode("span",null,o.toDisplayString(h.value.style.chart.title.text),1),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("span",rV," : "+o.toDisplayString(h.value.style.chart.title.subtitle.text),1)):o.createCommentVNode("",!0)],4)])):o.createCommentVNode("",!0),o.createElementVNode("tr",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(L.value.head,S=>(o.openBlock(),o.createElementBlock("th",{style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline}`)},[o.createElementVNode("div",nV,o.toDisplayString(S),1)],4))),256))])]),o.createElementVNode("tbody",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(L.value.body,S=>(o.openBlock(),o.createElementBlock("tr",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S,R=>(o.openBlock(),o.createElementBlock("td",{style:o.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},o.toDisplayString(isNaN(R)?R:R.toFixed(h.value.table.td.roundingValue)),5))),256))]))),256))])])],4)):o.createCommentVNode("",!0)],12,$H))}},[["__scopeId","data-v-585093d1"]]),Jne="",aV=["id"],iV={class:"vue-ui-gauge-user-option-item"},oV=["id","name"],sV=["for"],lV=["disabled"],cV=["stroke"],uV=[o.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-86d647d0></path><path d="M18 16v.01" data-v-86d647d0></path><path d="M6 16v.01" data-v-86d647d0></path><path d="M12 5v.01" data-v-86d647d0></path><path d="M12 12v.01" data-v-86d647d0></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-86d647d0></path>',6)],hV={key:1},fV=["viewBox"],dV=["id"],gV=["stop-color"],pV=["stop-color"],mV=["stop-color"],vV={key:0},yV=["font-size","fill","x","y"],wV=["font-size","fill","x","y"],BV=["font-size","fill","x","y"],xV=["d","stroke","stroke-width"],bV={key:1},CV=["cx","cy","fill"],EV=["cx","cy","r","fill"],FV=["y","width","height","fill"],SV=["cx","cy","r","fill","stroke","stroke-width"],_V=["cx","cy","r","fill","stroke","stroke-width"],kV=["x","y","font-size","font-weight","fill"],TV=["x","y","font-size","font-weight","fill"],NV=["x1","y1","x2","y2","stroke","stroke-width"],LV=["x1","y1","x2","y2","stroke","stroke-width"],UV=["cx","cy","fill","r","stroke-width","stroke"],IV=["x","y","font-size","fill"],QV=Ii({__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(t){const e=t,r=o.ref(`vue-ui-gauge-${Math.random()}`),n=o.ref({style:{fontFamily:"inherit",chart:{backgroundColor:"#FFFFFF",color:"#2D353C",animation:{use:!0,speed:1,acceleration:1},layout:{useDiv:!1,track:{size:1,useGradient:!0,gradientIntensity:40},markers:{size:1,color:"#2D353C",strokeWidth:1,stroke:"#2D353C",backgroundColor:"#FFFFFF",bold:!0,fontSizeRatio:1,offsetY:0,roundingValue:0},pointer:{size:1,stroke:"#2D353C",strokeWidth:12,useRatingColor:!0,color:"#CCCCCC",circle:{radius:10,stroke:"#2D353C",strokeWidth:2,color:"#FFFFFF"}}},legend:{fontSize:48,prefix:"",suffix:"",roundingValue:1,showPlusSymbol:!0,useRatingColor:!0,color:"#2D353C"},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}}}},userOptions:{show:!0,title:"options",labels:{useDiv:"Title inside",showTable:"Show table"}},translations:{base:"Base"}}),A=o.ref(!1),a=o.ref(null),i=o.ref(null),s=o.computed(()=>Object.keys(e.config||{}).length?ja({defaultConfig:n.value,userConfig:e.config}):n.value),l=o.ref({inside:!s.value.style.chart.layout.useDiv}),u=o.computed(()=>{const W=[];e.dataset.series.forEach(I=>{W.push(I.from),W.push(I.to)});const U=Math.max(...W);return{...e.dataset,series:e.dataset.series.map((I,O)=>({...I,color:I.color||Ht[O],value:(I.to-I.from)/U*100}))}}),c=o.computed(()=>({height:l.value.inside?512:358.4,width:512,top:l.value.inside?76.8:0,bottom:l.value.inside?435.2:358.4,centerX:l.value.inside?256:179.2,centerY:256})),g=o.ref(0),p=o.ref(0),d=o.ref(s.value.style.chart.animation.use?0:e.dataset.value),y=o.computed(()=>{const W=c.value.width/2,U=c.value.height*.69,I=Math.PI*((d.value+0-p.value)/(g.value-p.value))+Math.PI;return{x1:W,y1:U,x2:W+c.value.width/3.2*s.value.style.chart.layout.pointer.size*Math.cos(I),y2:U+c.value.width/3.2*s.value.style.chart.layout.pointer.size*Math.sin(I)}}),v=o.computed(()=>{for(let W=0;W<u.value.series.length;W+=1){const{color:U,from:I,to:O}=u.value.series[W];if(d.value>=I&&d.value<=O)return U}return"#2D353C"});o.onMounted(()=>{const W=[];u.value.series.forEach(L=>{W.push(L.from),W.push(L.to)}),g.value=Math.max(...W),p.value=Math.min(...W);const U=String(g.value).length;let I=0,O=(U>2?.01:.001)*s.value.style.chart.animation.speed,re=(U>2?.05:.005)*s.value.style.chart.animation.acceleration;function N(){d.value+=O+I,I+=re,d.value<e.dataset.value?requestAnimationFrame(N):d.value=e.dataset.value}s.value.style.chart.animation.use&&(d.value=p.value,N())});function h([W,U],[I,O],[re,N],L){N=N%Math.PI;const G=JB(L),[Z,ce]=Kh(Gh(G,[I*Math.cos(re),O*Math.sin(re)]),[W,U]),[le,he]=Kh(Gh(G,[I*Math.cos(re+N),O*Math.sin(re+N)]),[W,U]),fe=N>Math.PI?1:0,pe=N>0?1:0;return{startX:Z,startY:ce,endX:le,endY:he,path:`M${Z} ${ce} A ${[I,O,L/(2*Math.PI)*180,fe,pe,le,he].join(" ")}`}}function x(W,U,I,O,re){let{series:N}=W;if(W.base||(W.base=1),!N||W.base===0)return{...N,proportion:0,ratio:0,path:"",startX:0,startY:0,endX:0,center:{}};const L=[...N].map(ce=>ce.value).reduce((ce,le)=>ce+le,0),G=[];let Z=0;for(let ce=0;ce<N.length;ce+=1){let le=N[ce].value/L;const he=le*(Math.PI*.975),pe=N[ce].value/2/L*Math.PI,{startX:me,startY:Le,endX:F,endY:_,path:E}=h([U,I],[O,re],[Z,he],110);G.push({...N[ce],proportion:le,ratio:he,path:E,startX:me,startY:Le,endX:F,endY:_,center:h([U,I],[O,re],[Z,pe],110)}),Z+=he}return G}function C(W,U,I){const re=String(I).length>2?-3:0;return W===0?U+14+re:U+9+re}function T(W){return String(W).length>2?15:20}function D(){A.value=!0,uo({domElement:document.getElementById(`vue-ui-gauge_${r.value}`),fileName:s.value.style.chart.title.text||"vue-ui-gauge"}).finally(()=>{A.value=!1})}function Y(){i.value&&i.value.removeAttribute("open")}return(W,U)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-gauge",ref_key:"gaugeChart",ref:a,id:`vue-ui-gauge_${r.value}`,style:o.normalizeStyle(`font-family:${s.value.style.fontFamily};width:100%; text-align:center`)},[(!l.value.inside||A.value)&&s.value.style.chart.title.text?(o.openBlock(),o.createElementBlock("div",{key:0,style:o.normalizeStyle(`width:100%;background:${s.value.style.chart.backgroundColor};padding-bottom:12px`)},[o.createElementVNode("div",{style:o.normalizeStyle(`width:100%;text-align:center;color:${s.value.style.chart.title.color};font-size:${s.value.style.chart.title.fontSize}px;font-weight:${s.value.style.chart.title.bold?"bold":""}`)},o.toDisplayString(s.value.style.chart.title.text),5),s.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("div",{key:0,style:o.normalizeStyle(`width:100%;text-align:center;color:${s.value.style.chart.title.subtitle.color};font-size:${s.value.style.chart.title.subtitle.fontSize}px;font-weight:${s.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(s.value.style.chart.title.subtitle.text),5)):o.createCommentVNode("",!0),isNaN(t.dataset.base)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:1,style:o.normalizeStyle(`width:100%;text-align:center;color:${s.value.style.chart.title.subtitle.color};font-size:${s.value.style.chart.title.subtitle.fontSize}px;font-weight:${s.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(s.value.translations.base)+" : "+o.toDisplayString(t.dataset.base),5))],4)):o.createCommentVNode("",!0),s.value.userOptions.show?(o.openBlock(),o.createElementBlock("details",{key:1,class:"vue-ui-gauge-user-options",style:o.normalizeStyle(`background:${s.value.style.chart.backgroundColor};color:${s.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:i},[o.createElementVNode("summary",{style:o.normalizeStyle(`background:${s.value.style.chart.backgroundColor};color:${s.value.style.chart.color}`)},o.toDisplayString(s.value.userOptions.title),5),o.createElementVNode("div",{class:"vue-ui-gauge-user-options-items",style:o.normalizeStyle(`background:${s.value.style.chart.backgroundColor};color:${s.value.style.chart.color}`)},[o.createElementVNode("div",iV,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-gauge-option-title_${r.value}`,name:`vue-ui-gauge-option-title_${r.value}`,"onUpdate:modelValue":U[0]||(U[0]=I=>l.value.inside=I)},null,8,oV),[[o.vModelCheckbox,l.value.inside]]),o.createElementVNode("label",{for:`vue-ui-gauge-option-title_${r.value}`},o.toDisplayString(s.value.userOptions.labels.useDiv),9,sV)]),o.createElementVNode("button",{class:"vue-ui-gauge-button",onClick:D,disabled:A.value,style:o.normalizeStyle([{"margin-top":"12px"},`color:${s.value.style.chart.color}`])},[A.value?(o.openBlock(),o.createElementBlock("svg",{key:0,class:"vue-ui-gauge-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:s.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},uV,8,cV)):(o.openBlock(),o.createElementBlock("span",hV,"PDF"))],12,lV)],4)],4)):o.createCommentVNode("",!0),(o.openBlock(),o.createElementBlock("svg",{viewBox:`0 0 ${c.value.width} ${c.value.height}`,style:o.normalizeStyle(`max-width:100%;overflow:hidden !important;background:${s.value.style.chart.backgroundColor};color:${s.value.style.chart.color}`),onClick:Y},[o.createElementVNode("defs",null,[o.createElementVNode("radialGradient",{id:`gradient_${r.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[o.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${o.unref(Gn)[1]}`},null,8,gV),o.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${o.unref(Gn)[s.value.style.chart.layout.track.gradientIntensity]}`},null,8,pV),o.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${o.unref(Gn)[1]}`},null,8,mV)],8,dV)]),s.value.style.chart.title.text&&l.value.inside&&!A.value?(o.openBlock(),o.createElementBlock("g",vV,[o.createElementVNode("text",{"font-size":s.value.style.chart.title.fontSize*1.5,fill:s.value.style.chart.title.color,x:c.value.width/2,y:s.value.style.chart.title.fontSize*1.5+20,"text-anchor":"middle",style:o.normalizeStyle(`font-weight:${s.value.style.chart.title.bold?"bold":""}`)},o.toDisplayString(s.value.style.chart.title.text),13,yV),s.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("text",{key:0,"font-size":s.value.style.chart.title.subtitle.fontSize*1.5,fill:s.value.style.chart.title.subtitle.color,x:c.value.width/2,y:s.value.style.chart.title.fontSize*1.5*2+20,"text-anchor":"middle",style:o.normalizeStyle(`font-weight:${s.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(s.value.style.chart.title.subtitle.text),13,wV)):o.createCommentVNode("",!0),isNaN(t.dataset.base)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("text",{key:1,"font-size":s.value.style.chart.title.subtitle.fontSize*1.5,fill:s.value.style.chart.title.subtitle.color,x:c.value.width/2,y:s.value.style.chart.title.subtitle.text?s.value.style.chart.title.fontSize*2.3*2+20:s.value.style.chart.title.fontSize*1.5*2+20,"text-anchor":"middle",style:o.normalizeStyle(`font-weight:${s.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(s.value.translations.base)+" : "+o.toDisplayString(t.dataset.base),13,BV))])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(x(u.value,c.value.width/2,c.value.height*.7,c.value.width/2.5,c.value.width/2.5),(I,O)=>(o.openBlock(),o.createElementBlock("path",{key:`arc_${O}`,d:I.path,fill:"none",stroke:I.color,"stroke-linecap":"round","stroke-width":c.value.width/16*s.value.style.chart.layout.track.size},null,8,xV))),128)),s.value.style.chart.layout.track.useGradient?(o.openBlock(),o.createElementBlock("g",bV,[o.createElementVNode("circle",{cx:c.value.width/2,cy:c.value.height*.69,r:"225",fill:`url(#gradient_${r.value})`,stroke:"none"},null,8,CV),o.createElementVNode("circle",{cx:c.value.width/2,cy:c.value.height*.69+4,r:188*1/s.value.style.chart.layout.track.size,fill:s.value.style.chart.backgroundColor,stroke:"none"},null,8,EV),o.createElementVNode("rect",{x:0,y:c.value.height*.69,width:c.value.width,height:c.value.height-c.value.height*.69,fill:s.value.style.chart.backgroundColor,stroke:"none"},null,8,FV)])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(x(u.value,c.value.width/2,c.value.height*.7,c.value.width/2.5,c.value.width/2.5),(I,O)=>(o.openBlock(),o.createElementBlock("circle",{cx:I.center.startX,cy:O===0?I.center.startY+5:I.center.startY,r:c.value.width/31*s.value.style.chart.layout.track.size*s.value.style.chart.layout.markers.size,fill:s.value.style.chart.layout.markers.backgroundColor,stroke:s.value.style.chart.layout.markers.stroke,"stroke-width":s.value.style.chart.layout.markers.strokeWidth},null,8,SV))),256)),o.createElementVNode("circle",{cx:c.value.width*.9,cy:c.value.height*.69,r:c.value.width/31*s.value.style.chart.layout.track.size*s.value.style.chart.layout.markers.size,fill:s.value.style.chart.layout.markers.backgroundColor,stroke:s.value.style.chart.layout.markers.stroke,"stroke-width":s.value.style.chart.layout.markers.strokeWidth},null,8,_V),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(x(u.value,c.value.width/2,c.value.height*.7,c.value.width/2.5,c.value.width/2.5),(I,O)=>(o.openBlock(),o.createElementBlock("text",{x:I.center.startX,y:C(O,I.center.startY,I.from)+s.value.style.chart.layout.markers.offsetY,"text-anchor":"middle","font-size":T(I.from)*s.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${s.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:s.value.style.chart.layout.markers.color},o.toDisplayString(I.from.toFixed(s.value.style.chart.layout.markers.roundingValue)),9,kV))),256)),o.createElementVNode("text",{x:c.value.width*.9,y:C(1,c.value.height*.69,g.value)+s.value.style.chart.layout.markers.offsetY,"text-anchor":"middle","font-size":T(g.value)*s.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${s.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:s.value.style.chart.layout.markers.color},o.toDisplayString(g.value.toFixed(s.value.style.chart.layout.markers.roundingValue)),9,TV),isNaN(y.value.x2)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("line",{key:2,x1:y.value.x1,y1:y.value.y1,x2:y.value.x2,y2:y.value.y2,stroke:s.value.style.chart.layout.pointer.stroke,"stroke-width":s.value.style.chart.layout.pointer.strokeWidth,"stroke-linecap":"round"},null,8,NV)),isNaN(y.value.x2)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("line",{key:3,x1:y.value.x1,y1:y.value.y1,x2:y.value.x2,y2:y.value.y2,stroke:s.value.style.chart.layout.pointer.useRatingColor?v.value:s.value.style.chart.layout.pointer.color,"stroke-linecap":"round","stroke-width":s.value.style.chart.layout.pointer.strokeWidth*.7},null,8,LV)),o.createElementVNode("circle",{cx:c.value.width/2,cy:c.value.height*.69,fill:s.value.style.chart.layout.pointer.circle.color,r:s.value.style.chart.layout.pointer.circle.radius,"stroke-width":s.value.style.chart.layout.pointer.circle.strokeWidth,stroke:s.value.style.chart.layout.pointer.circle.stroke},null,8,UV),o.createElementVNode("text",{x:c.value.width/2,y:c.value.height*.9,"text-anchor":"middle","font-size":s.value.style.chart.legend.fontSize,"font-weight":"bold",fill:s.value.style.chart.legend.useRatingColor?v.value:s.value.style.chart.legend.color},o.toDisplayString(s.value.style.chart.legend.prefix)+" "+o.toDisplayString(s.value.style.chart.legend.showPlusSymbol&&d.value>0?"+":"")+o.toDisplayString(d.value.toFixed(s.value.style.chart.legend.roundingValue))+" "+o.toDisplayString(s.value.style.chart.legend.suffix),9,IV)],12,fV))],12,aV))}},[["__scopeId","data-v-86d647d0"]]),tAe="",DV=["id"],OV={class:"vue-ui-chestnut-user-option-item"},PV=["id","name"],MV=["for"],RV=["disabled"],HV=["stroke"],VV=[o.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-2808f151></path><path d="M18 16v.01" data-v-2808f151></path><path d="M6 16v.01" data-v-2808f151></path><path d="M12 5v.01" data-v-2808f151></path><path d="M12 12v.01" data-v-2808f151></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-2808f151></path>',6)],$V={key:1},zV=["viewBox"],KV={key:0},GV=["fill","font-weight","font-size","x","y"],jV=["fill","font-weight","font-size","x","y"],WV=["id"],XV=["stop-color"],qV=["stop-color"],YV=["id"],JV=["stop-color"],ZV=["stop-color"],e$=["id"],t$=["stop-color"],r$=["stop-color"],n$=["stop-color"],A$=["id"],a$=["stop-color"],i$=["stop-color"],o$=["stop-color"],s$=["id"],l$=["stop-color"],c$=["stop-color"],u$=["stop-color"],h$={key:1},f$=["x","y","font-size","font-weight","fill"],d$=["x","y","font-size","font-weight","fill"],g$=["d","stroke"],p$=["cx","cy","r","fill"],m$=["cx","cy","r","fill","stroke","stroke-width","onClick"],v$={key:2},y$=["x","y","font-size","fill","onClick"],w$={key:0},B$=["x","y","fill","font-size","font-weight"],x$=["x","y","height","width","fill","rx","onClick"],b$=["x","y","height","width","fill","rx","stroke","stroke-width","onClick"],C$={key:3},E$=["x","y","fill","font-size","onClick"],F$=["d","stroke"],S$=["cx","cy","fill","onClick"],_$=["fill","cx","cy","r","onClick"],k$={key:4},T$=["x","y","font-size","font-weight"],N$=["x1","x2","y1","y2","stroke","stroke-width"],L$=["y","height","width"],U$={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},I$={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},Q$={viewBox:"0 0 20 20",height:"16",width:"16"},D$=["fill"],O$={key:6},P$=["y","height","width"],M$={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},R$={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},H$={viewBox:"0 0 20 20",height:"16",width:"16"},V$=["fill"],$$=["cx","cy","fill"],z$=["cx","cy","fill"],K$=["d","stroke"],G$=["cx","cy","fill"],j$=["cx","cy","fill"],W$=["d","stroke"],X$=["x","y","fill","font-size","font-weight"],q$=["x","y","fill","font-size","font-weight"],Y$=["x","text-anchor","y","fill","font-size"],J$=["x","text-anchor","y","fill","font-size"],Z$=["x","text-anchor","y","fill","font-size"],ez=["x","text-anchor","y","fill","font-size"],tz=["x","text-anchor","y","fill","font-size"],rz=["x","y","font-size","fill"],nz=["x","y","font-size","fill"],Az=["x","y","font-size","fill"],az={key:0},iz={key:0},oz={key:0},sz={key:1},lz={key:0},cz={key:1},uz={key:0},hz={key:1},fz={key:0},dz={key:1},gz={key:0},pz={key:1},mz={key:0},vz={key:1},yz={key:0},wz={key:1},Bz=Ii({__name:"vue-ui-chestnut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(t){const e=t,r=o.ref(`vue-ui-chestnut-${Math.random()}`),n=o.ref({style:{fontFamily:"inherit",chart:{backgroundColor:"#FFFFFF",color:"#2D353C",layout:{grandTotal:{show:!0,fontSize:20,bold:!0,suffix:"",prefix:"",roundingValue:0,color:"#2D353C",text:"Grand total",offsetY:0},roots:{stroke:"#FFFFFF",strokeWidth:5,useGradient:!0,gradientIntensity:20,unerlayerColor:"#FFFFFF",labels:{show:!0,fontSize:16,adaptColorToBackground:!0,color:"#FFFFFF",bold:!0,roundingValue:0,prefix:"",suffix:"",name:{color:"#2D353C",fontSize:16,bold:!0}}},verticalSeparator:{stroke:"#FFFFFF",strokeWidth:5},links:{opacity:10},branches:{stroke:"#FFFFFF",strokeWidth:0,borderRadius:6,useGradient:!0,gradientIntensity:20,underlayerColor:"#FFFFFF",widthRatio:1.5,labels:{show:!0,fontSize:14,color:"#2D353C",bold:!0,dataLabels:{show:!0,hideUnderValue:5,fontSize:14,roundingValue:0,roundingPercentage:0,prefix:"",suffix:""}}},nuts:{offsetX:20,useGradient:!0,gradientIntensity:30,selected:{useMotion:!0,useGradient:!0,gradientIntensity:40,roundingValue:0,roundingPercentage:0,labels:{dataLabels:{hideUnderValue:5,color:"#2D353C",fontSize:12,bold:!0,prefix:"",suffix:""},core:{total:{color:"#2D353C",fontSize:24,bold:!1},value:{color:"#2D353C",fontSize:24,bold:!0,prefix:"",suffix:""}}}}},legend:{fontSize:16,color:"#2D353C",roundingValue:0,roundingPercentage:0,prefix:"",suffix:""},title:{color:"#2D353C",fontSize:20,text:"",bold:!0,offsetY:0,subtitle:{text:"",color:"#CCCCCC",bold:!1,fontSize:16,offsetY:0}}}}},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8",translations:{rootName:"root name",rootValue:"root value",rootToTotal:"%/total",branchName:"branch name",branchValue:"branch value",branchToRoot:"%/root",branchToTotal:"%/total",nutName:"nut name",nutValue:"nut value",nutToBranch:"%/branch",nutToRoot:"%/root",nutToTotal:"%/total"}},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0}},userOptions:{show:!0,title:"options",labels:{showTable:"Show table"}},translations:{total:"Total",proportionToTree:"of grand total",of:"of"}}),A=o.ref(!1),a=o.ref(null),i=o.ref(null),s=o.ref(null),l=o.ref({x:0,y:0});o.ref(!1),o.ref(""),o.onMounted(()=>{document.addEventListener("mousemove",u)}),o.onBeforeUnmount(()=>{document.removeEventListener("mousemove",u)});function u(Q){l.value.x=Q.clientX,l.value.y=Q.clientY}o.computed(()=>{let Q=0,J=48;if(i.value&&radarChart.value){const{width:H,height:ue}=i.value.getBoundingClientRect(),Te=radarChart.value.getBoundingClientRect();l.value.x+H/2>Te.right?Q=-H:l.value.x-H/2<Te.left?Q=0:Q=-H/2,l.value.y+ue>Te.bottom&&(J=-ue-48)}return{top:l.value.y+J,left:l.value.x+Q}});const c=o.computed(()=>Object.keys(e.config||{}).length?ja({defaultConfig:n.value,userConfig:e.config}):n.value),g=o.ref({showTable:c.value.table.show}),p=o.ref({gap:6,padding:{top:102,left:12,right:12,bottom:96},width:1024,height:0,branchSize:32,branchStart:128}),d=o.computed(()=>({left:p.value.padding.left,top:p.value.padding.top,right:p.value.width-p.value.padding.right,bottom:p.value.height-p.value.padding.bottom,width:p.value.width-(p.value.padding.left+p.value.padding.right),height:p.value.height-(p.value.padding.top+p.value.padding.bottom),seedX:p.value.padding.left+64})),y=o.computed(()=>e.dataset.flatMap(Q=>Q.branches.map(J=>J.value)).reduce((Q,J)=>Q+J)),v=o.computed(()=>e.dataset.map((Q,J)=>{const H=Q.branches.map(ue=>ue.value).reduce((ue,Te)=>ue+Te);return{...Q,color:Q.color||Ht[J]||Ht[J%Ht.length],id:Q.id||`root_${J}_${r.value}`,type:"root",total:H,rootIndex:J,branches:Q.branches.map((ue,Te)=>({...ue,rootName:Q.name,rootIndex:J,color:Q.color||Ht[J]||Ht[J%Ht.length],value:ue.value>=0?ue.value:0,id:ue.id||`branch_${J}_${Te}_${r.value}`,proportionToRoot:ue.value/H,type:"branch",breakdown:ue.breakdown.map((Ne,Me)=>({table:{rootName:Q.name,rootValue:H,rootToTotal:H/y.value,branchName:ue.name,branchValue:ue.value,branchToTotal:ue.value/y.value,branchToRoot:ue.value/H,nutName:Ne.name,nutValue:Ne.value,nutToTotal:Ne.value/y.value,nutToRoot:Ne.value/H,nutToBranch:Ne.value/ue.value},...Ne,type:"nut",branchName:ue.name,rootName:Q.name,branchTotal:ue.value>=0?ue.value:0,proportionToBranch:Ne.value/ue.value,proportionToRoot:Ne.value/H,proportionToTree:Ne.value/y.value,rootIndex:J,id:Ne.id||`nut_${J}_${Te}_${Me}_${r.value}`,color:Ne.color||Ht[Me]||Ht[Me%Ht.length],value:Ne.value>=0?Ne.value:0}))}))}})),h=o.computed(()=>v.value.flatMap(Q=>Q.branches).length),x=o.computed(()=>Math.max(...v.value.map(Q=>Q.branches.map(J=>J.value).reduce((J,H)=>J+H,0)))),C=o.computed(()=>Math.max(...v.value.flatMap(Q=>Q.branches.map(J=>J.value)))),T=o.computed(()=>256+p.value.padding.left),D=o.computed(()=>v.value.sort((Q,J)=>J.total-Q.total).map((Q,J)=>{const H=d.value.height/v.value.length/2,ue=Q.total/x.value*(H>64?64:H);return{...Q,x:d.value.seedX,y:d.value.top+d.value.height/v.value.length*(J+1)-(d.value.height/v.value.length/2+p.value.gap/2),r:ue<p.value.branchSize/2?p.value.branchSize/2:ue}})),Y=o.computed(()=>c.value.style.chart.layout.branches.widthRatio<=0?.1:c.value.style.chart.layout.branches.widthRatio>1.8?1.8:c.value.style.chart.layout.branches.widthRatio),W=o.computed(()=>D.value.flatMap(Q=>Q.branches)),U=o.computed(()=>W.value.sort((Q,J)=>J.value-Q.value).map((Q,J)=>({...Q,y1:J*p.value.branchSize+d.value.top+J*p.value.gap,y2:J*p.value.branchSize+p.value.branchSize,x1:T.value,x2:384*Q.value/C.value*Y.value+T.value})));function I(Q){const J=D.value.find(H=>H.rootIndex===Q.rootIndex);return{x:J.x,y:J.y,r:J.r}}const O=o.ref(null),re=o.ref(null),N=o.ref(null),L=o.ref(null);function G(){O.value=null,N.value=null,L.value=null}o.computed(()=>O.value?O.value.rootIndex:null);function Z(Q){return L.value?L.value===null?!0:Q.type==="root"?Q.id===L.value.id:Q.rootIndex===L.value.rootIndex:O.value===null&&N.value===null?!0:Q.type==="nut"?O.value.id===Q.id:Q.type==="branch"?N.value.id===Q.id:Q.type==="root"?N.value&&N.value.rootIndex===Q.rootIndex||O.value&&O.value.rootIndex===Q.rootIndex:!1}function ce(Q){G(),o.nextTick(()=>{O.value=Q,N.value=Q,re.value=zh({series:Q.breakdown,base:1},Q.x2+24+c.value.style.chart.layout.nuts.offsetX,Q.y1+p.value.branchSize/2,80,80)})}function le(){O.value=null,re.value=null}function he(Q){N.value&&N.value.id===Q.id?(N.value=null,G()):(G(),N.value=Q)}function fe(Q){L.value&&L.value.id===Q.id?G():(G(),L.value=Q)}function pe(Q,J=!1){let H=0,ue=J?16:0,Te="middle";return Q.center.endX>Q.cx?(H=Q.center.endX+16+ue,Te="start"):Q.center.endX<Q.cx?(H=Q.center.endX-16-ue,Te="end"):(H=Q.centerX+ue,Te="middle"),{x:H,anchor:Te}}function me(Q){return Q.center.endY>Q.cy?Q.center.endY+16:Q.center.endY<Q.cy?Q.center.endY-32:Q.center.endY}function Le(){return d.value.bottom-(O.value.y1+180)<0?0:d.value.bottom}function F(Q){const J=`M${pe(Q).x},${me(Q)-4} `,H=` ${Q.center.endX},${Q.center.endY}`;let ue="";return Q.center.endX>Q.cx?ue=`${pe(Q).x-12},${me(Q)-4}`:Q.center.endX<Q.cx?ue=`${pe(Q).x+12},${me(Q)-4}`:ue=`${pe(Q).x+12},${me(Q)-4}`,`${J}${ue}${H}`}function _(Q){return Q.proportion*100>c.value.style.chart.layout.nuts.selected.labels.dataLabels.hideUnderValue}o.onMounted(()=>{const Q=h.value*(p.value.branchSize+p.value.gap)+p.value.padding.top+p.value.padding.bottom;p.value.height=Q});function E(){A.value=!0,uo({domElement:document.getElementById(`vue-ui-chestnut_${r.value}`),fileName:c.value.style.chart.layout.title.text||"vue-ui-chestnut"}).finally(()=>{A.value=!1})}const B=o.computed(()=>{const Q=[c.value.table.th.translations.rootName,c.value.table.th.translations.rootValue,c.value.table.th.translations.rootToTotal,c.value.table.th.translations.branchName,c.value.table.th.translations.branchValue,c.value.table.th.translations.branchToRoot,c.value.table.th.translations.branchToTotal,c.value.table.th.translations.nutName,c.value.table.th.translations.nutValue,c.value.table.th.translations.nutToBranch,c.value.table.th.translations.nutToRoot,c.value.table.th.translations.nutToTotal],J=v.value.flatMap((H,ue)=>H.branches.flatMap((Te,Ne)=>Te.breakdown.flatMap((Me,_e)=>Me.table)));return{head:Q,body:J}});function S(){o.nextTick(()=>{const Q=[[c.value.style.chart.layout.title.text],[c.value.style.chart.layout.title.subtitle.text],[""],["Grand total",y.value],[""]],J=B.value.head,H=B.value.body.map((je,Qe)=>[B.value.body[Qe-1]&&B.value.body[Qe-1].rootName===je.rootName?"":je.rootName,B.value.body[Qe-1]&&B.value.body[Qe-1].rootName===je.rootName?"":je.rootValue,B.value.body[Qe-1]&&B.value.body[Qe-1].rootName===je.rootName?"":je.rootToTotal,B.value.body[Qe-1]&&B.value.body[Qe-1].branchName===je.branchName?"":je.branchName,B.value.body[Qe-1]&&B.value.body[Qe-1].branchName===je.branchName?"":je.branchValue,B.value.body[Qe-1]&&B.value.body[Qe-1].branchName===je.branchName?"":je.branchToRoot,B.value.body[Qe-1]&&B.value.body[Qe-1].branchName===je.branchName?"":je.branchToTotal,je.nutName,je.nutValue,je.nutToBranch,je.nutToRoot,je.nutToTotal]),ue=Q.concat([J]).concat(H);function Te(je){let Qe=new ArrayBuffer(je.length),Xe=new Uint8Array(Qe);for(let Ye=0;Ye<je.length;Ye++)Xe[Ye]=je.charCodeAt(Ye)&255;return Qe}const Ne=Rr.book_new(),Me=Rr.aoa_to_sheet(ue);Rr.book_append_sheet(Ne,Me,"Sheet1");const _e=Ui(Ne,{bookType:"xlsx",type:"binary"}),Ae=new Blob([Te(_e)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),Pe=document.createElement("a");Pe.href=window.URL.createObjectURL(Ae),Pe.download=`${c.value.style.chart.layout.title.text.replaceAll(" ","_")||"vue-ui-chestnut"}.xlsx`,Pe.click(),window.URL.revokeObjectURL(Pe.href)})}function R(Q){Q.target&&Q.target.tagName==="svg"&&G(),s.value&&s.value.removeAttribute("open")}return(Q,J)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-chestnut",ref_key:"chestnutChart",ref:a,id:`vue-ui-chestnut_${r.value}`,style:o.normalizeStyle(`font-family:${c.value.style.fontFamily};width:100%; text-align:center`)},[c.value.userOptions.show?(o.openBlock(),o.createElementBlock("details",{key:0,class:"vue-ui-chestnut-user-options",style:o.normalizeStyle(`background:${c.value.style.chart.backgroundColor};color:${c.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:s},[o.createElementVNode("summary",{style:o.normalizeStyle(`background:${c.value.style.chart.backgroundColor};color:${c.value.style.chart.color}`)},o.toDisplayString(c.value.userOptions.title),5),o.createElementVNode("div",OV,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-chestnut-option-table_${r.value}`,name:`vue-ui-chestnut-option-table_${r.value}`,"onUpdate:modelValue":J[0]||(J[0]=H=>g.value.showTable=H)},null,8,PV),[[o.vModelCheckbox,g.value.showTable]]),o.createElementVNode("label",{for:`vue-ui-chestnut-option-table_${r.value}`},o.toDisplayString(c.value.userOptions.labels.showTable),9,MV)]),o.createElementVNode("div",{class:"vue-ui-chestnut-user-options-items",style:o.normalizeStyle(`background:${c.value.style.chart.backgroundColor};color:${c.value.style.chart.color}`)},[o.createElementVNode("button",{class:"vue-ui-chestnut-button",onClick:E,disabled:A.value,style:o.normalizeStyle([{"margin-top":"12px"},`color:${c.value.style.chart.color}`])},[A.value?(o.openBlock(),o.createElementBlock("svg",{key:0,class:"vue-ui-chestnut-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:c.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},VV,8,HV)):(o.openBlock(),o.createElementBlock("span",$V,"PDF"))],12,RV),o.createElementVNode("button",{class:"vue-ui-chestnut-button",onClick:S,style:o.normalizeStyle(`background:${c.value.style.chart.backgroundColor};color:${c.value.style.chart.color}`)}," XLSX ",4)],4)],4)):o.createCommentVNode("",!0),p.value.height>0?(o.openBlock(),o.createElementBlock("svg",{key:1,viewBox:`0 0 ${p.value.width} ${p.value.height}`,style:o.normalizeStyle(`max-width:100%;overflow:visible;background:${c.value.style.chart.backgroundColor};color:${c.value.style.chart.color}`),onClick:R},[O.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("g",KV,[c.value.style.chart.layout.title.text?(o.openBlock(),o.createElementBlock("text",{key:0,"text-anchor":"middle",fill:c.value.style.chart.layout.title.color,"font-weight":c.value.style.chart.layout.title.bold?"bold":"normal","font-size":c.value.style.chart.layout.title.fontSize,x:p.value.width/2,y:12+c.value.style.chart.layout.title.fontSize+c.value.style.chart.layout.title.offsetY,onClick:G},o.toDisplayString(c.value.style.chart.layout.title.text),9,GV)):o.createCommentVNode("",!0),c.value.style.chart.layout.title.subtitle.text?(o.openBlock(),o.createElementBlock("text",{key:1,"text-anchor":"middle",fill:c.value.style.chart.layout.title.subtitle.color,"font-weight":c.value.style.chart.layout.title.subtitle.bold?"bold":"normal","font-size":c.value.style.chart.layout.title.subtitle.fontSize,x:p.value.width/2,y:48+c.value.style.chart.layout.title.subtitle.fontSize+c.value.style.chart.layout.title.subtitle.offsetY,onClick:G},o.toDisplayString(c.value.style.chart.layout.title.subtitle.text),9,jV)):o.createCommentVNode("",!0)])),o.createElementVNode("defs",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(v.value,(H,ue)=>(o.openBlock(),o.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`root_gradient_${r.value}_${H.rootIndex}`},[o.createElementVNode("stop",{offset:"0%","stop-color":`${o.unref(ks)(H.color,.05)}${o.unref(Gn)[100-c.value.style.chart.layout.roots.gradientIntensity]}`},null,8,XV),o.createElementVNode("stop",{offset:"100%","stop-color":H.color},null,8,qV)],8,WV))),256)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(v.value,H=>(o.openBlock(),o.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`branch_gradient_${r.value}_${H.rootIndex}`},[o.createElementVNode("stop",{offset:"0%","stop-color":H.color},null,8,JV),o.createElementVNode("stop",{offset:"100%","stop-color":`${o.unref(ks)(H.color,.02)}${o.unref(Gn)[100-c.value.style.chart.layout.branches.gradientIntensity]}`},null,8,ZV)],8,YV))),256)),o.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nutpick_${r.value}`},[o.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${o.unref(Gn)[0]}`},null,8,t$),o.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${o.unref(Gn)[c.value.style.chart.layout.nuts.selected.gradientIntensity]}`},null,8,r$),o.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${o.unref(Gn)[0]}`},null,8,n$)],8,e$),o.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_${r.value}`},[o.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${o.unref(Gn)[0]}`},null,8,a$),o.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${o.unref(Gn)[c.value.style.chart.layout.nuts.gradientIntensity]}`},null,8,i$),o.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${o.unref(Gn)[0]}`},null,8,o$)],8,A$),o.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_underlayer_${r.value}`},[o.createElementVNode("stop",{offset:"0%","stop-color":`${c.value.style.chart.backgroundColor}${o.unref(Gn)[100]}`},null,8,l$),o.createElementVNode("stop",{offset:"80%","stop-color":`${c.value.style.chart.backgroundColor}${o.unref(Gn)[60]}`},null,8,c$),o.createElementVNode("stop",{offset:"100%","stop-color":`${c.value.style.chart.backgroundColor}${o.unref(Gn)[0]}`},null,8,u$)],8,s$)]),c.value.style.chart.layout.grandTotal.show?(o.openBlock(),o.createElementBlock("g",h$,[o.createElementVNode("text",{x:d.value.seedX,y:32+c.value.style.chart.layout.grandTotal.offsetY,"font-size":c.value.style.chart.layout.grandTotal.fontSize,"font-weight":c.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:c.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:G},o.toDisplayString(c.value.style.chart.layout.grandTotal.text),9,f$),o.createElementVNode("text",{x:d.value.seedX,y:38+c.value.style.chart.layout.grandTotal.fontSize+c.value.style.chart.layout.grandTotal.offsetY,"font-size":c.value.style.chart.layout.grandTotal.fontSize,"font-weight":c.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:c.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:G},o.toDisplayString(c.value.style.chart.layout.grandTotal.prefix)+" "+o.toDisplayString(y.value.toFixed(c.value.style.chart.layout.grandTotal.roundingValue))+" "+o.toDisplayString(c.value.style.chart.layout.grandTotal.suffix),9,d$)])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(U.value,H=>(o.openBlock(),o.createElementBlock("g",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(p.value.branchSize,(ue,Te)=>(o.openBlock(),o.createElementBlock("path",{d:`M
|
|
373
|
+
}`);if(this.dataset.body.length===0)throw new Error("vue-ui-table error: missing body data");this.isLoading=!0,this.promiseWithAsyncFunction(this.prepareBodyCopy,()=>{this.$forceUpdate(),this.isLoading=!1}),document.addEventListener("keydown",t=>{const e=document.activeElement;(e&&Array.from(e.classList).includes("td-focusable")&&t.key.includes("Arrow")||t.code==="Space")&&t.preventDefault()})},watch:{showChart:function(t){t&&this.$nextTick(()=>{this.closeDragElement();const e=this.$refs.chartModal;e.onmousedown=this.dragMouseDown})}},computed:{availableDonutCategories(){return Object.keys(this.multiselects).map(t=>({index:t,name:this.dataset.header[t].name,options:this.multiselects[t]}))},canChart(){return this.tableConfig.useChart&&this.currentSelectionSpan.rows.length>1},chartData(){if(!this.canChart)return[];const t=316,e=512,r=this.currentSelectionSpan.rows.length,n=e/r,A=Math.max(...this.currentSelectionSpan.rows.map(p=>p.value)),a=Math.min(...this.currentSelectionSpan.rows.map(p=>p.value)),i=a>=0?0:Math.abs(a),s=A+i,l=A<0&&a<0,u=this.dataset.header[this.currentSelectionSpan.col].isPercentage,c=this.currentSelectionSpan.rows.map((p,d)=>({x:n*d+n/2,y:(1-(p.value+i)/s)*t,value:u?p.value*100:p.value,suffix:u?"%":this.dataset.header[this.currentSelectionSpan.col].suffix?this.dataset.header[this.currentSelectionSpan.col].suffix:"",prefix:this.dataset.header[this.currentSelectionSpan.col].prefix?this.dataset.header[this.currentSelectionSpan.col].prefix:"",index:p.index,absoluteValue:u?Math.abs(p.value)*100:Math.abs(p.value)})),g=t-t*(i/s);return{isAllNegative:l,zero:g,plots:c,slot:n,progression:c.length>=2?this.calcChartProgression(c):!1}},donutHollowLabels(){return{total:Number((this.currentDonut.map(t=>t.absoluteValue).reduce((t,e)=>t+e,0)*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),average:Number((this.currentDonut.map(t=>t.absoluteValue).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()}},hasNumericTypes(){return this.dataset.header.map(t=>t.type).includes(this.constants.NUMERIC)},icons(){return{arrowSort:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 9l4 -4l4 4m-4 -4v14" /><path d="M21 15l-4 4l-4 -4m4 4v-14" /></svg>`,bar:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 12m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M9 8m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M15 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M4 20l14 0" /></svg>`,chart:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 19l16 0" /><path d="M4 15l4 -6l4 2l4 -5l4 4" /></svg>`,chevronDown:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 9l6 6l6 -6" /></svg>`,chevronLeft:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*1.6}" height="${this.iconSize*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 6l-6 6l6 6" /></svg>`,chevronRight:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*1.6}" height="${this.iconSize*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 6l6 6l-6 6" /></svg>`,donut:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*.8}" height="${this.iconSize*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 3v5m4 4h5" /><path d="M8.929 14.582l-3.429 2.918" /><path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" /><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /></svg>`,export:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5" /><path d="M3 10h18" /><path d="M10 3v18" /><path d="M16 19h6" /><path d="M19 16l3 3l-3 3" /></svg>`,fileDownload:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 3v4a1 1 0 0 0 1 1h4" /><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /><path d="M12 17v-6" /><path d="M9.5 14.5l2.5 2.5l2.5 -2.5" /></svg>`,filter:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" /></svg>`,move:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 9l3 3l-3 3" /><path d="M15 12h6" /><path d="M6 9l-3 3l3 3" /><path d="M3 12h6" /><path d="M9 18l3 3l3 -3" /><path d="M12 15v6" /><path d="M15 6l-3 -3l-3 3" /><path d="M12 3v6" /></svg>`,sort09:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 3a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 16m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 16v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sort90:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 14a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 5v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sortAZ:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 10v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 21h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sortZA:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 21v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 10h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sum:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>`,table:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" fill="white" d="M 10 2, 21 2, 21 21, 10 21Z"/><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" /><path d="M3 10h18" /><path d="M10 3v18" /></svg>`,warning:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*.8}" height="${this.iconSize*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`}},pages(){const t=[];if(this.bodyCopy.length)for(let e=0;e<this.bodyCopy.length;e+=this.itemsPerPage)t.push(this.bodyCopy.slice(e,e+this.itemsPerPage));return t},rows(){return this.bodyCopy.map(t=>t.td)},selectedCellsCalculations(){return{sumPercentage:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)*100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),sumRegular:Number(this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),averagePercentage:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length*100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),averageRegular:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()}},tableConfig(){return Object.keys(this.config||{}).length?this.treeShake({defaultConfig:this.defaultConfig,userConfig:this.config}):this.defaultConfig},visibleRows(){return this.pages[this.currentPage]}},methods:{treeShake:ja,makeDonut:zh,applyDonutOption(){const t=this.selectedDonutCategory.options.map((e,r)=>({name:e,color:this.palette[r]||this.palette[r%this.palette.length],value:this.visibleRows.filter((n,A)=>n.td[this.selectedDonutCategory.index]===e&&this.currentSelectionSpan.rows.map(a=>a.index).includes(A)).map(n=>n.td[this.currentSelectionSpan.col]).reduce((n,A)=>Math.abs(n)+Math.abs(A),0),absoluteValue:this.visibleRows.filter((n,A)=>n.td[this.selectedDonutCategory.index]===e&&this.currentSelectionSpan.rows.map(a=>a.index).includes(A)).map(n=>n.td[this.currentSelectionSpan.col]).reduce((n,A)=>n+A,0)})).sort((e,r)=>r.value-e.value);this.currentDonut=this.makeDonut({series:t},50,50,30,30),this.$nextTick(()=>{this.chart.type=this.constants.DONUT,this.showDonutOptions=!1})},calcRectY(t,e){return t>=0?e:this.chartData.zero},canResetColumn(t,e){return!this.hasNaN[t]&&(e.isSort||e.isSearch||e.isMultiselect||e.rangeFilter)&&![this.constants.DATE].includes(e.type)},createXls(t="all"){const e=this.dataset.header.map(c=>c.name),r=t==="all"?this.bodyCopy.map(c=>c.td):this.visibleRows.map(c=>c.td),n=[e].concat(r);function A(c){let g=new ArrayBuffer(c.length),p=new Uint8Array(g);for(let d=0;d<c.length;d++)p[d]=c.charCodeAt(d)&255;return g}const a=Rr.book_new(),i=Rr.aoa_to_sheet(n);Rr.book_append_sheet(a,i,"Sheet1");const s=Ui(a,{bookType:"xlsx",type:"binary"}),l=new Blob([A(s)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),u=document.createElement("a");u.href=window.URL.createObjectURL(l),u.download="data.xlsx",u.click(),window.URL.revokeObjectURL(u.href),this.isExportRequest=!1},calcChartProgression(t){let e,r,n,A;const a=t.length;let i=0,s=0,l=0,u=0;for(const{x:p,y:d}of t)i+=p,s+=d,l+=p*d,u+=p*p;const c=(a*l-i*s)/(a*u-i*i),g=(s-c*i)/a;return e=t[0].x,n=t[a-1].x,r=c*e+g,A=c*n+g,{x1:e,y1:r,x2:n,y2:A,slope:c}},closeAllDropdowns(){const t=document.getElementsByClassName("th-dropdown");t.length&&Array.from(t).forEach(e=>{e.dataset.isOpen=!1})},debounce(t,e){let r;clearTimeout(r),r=setTimeout(t,e)},filterBody(){this.bodyCopy=this.tableBody.filter(t=>{for(const e in this.searches)if(!t.td[e].toUpperCase().includes(this.searches[e].toUpperCase()))return!1;for(const e in this.multiselects)if(!this.multiselects[e].some(n=>n===t.td[e]))return!1;for(const e in this.dates){const r=new Date(t.td[e]),n=new Date(this.dates[e].from),A=new Date(this.dates[e].to);if(r<n||r>A)return!1}return!0}),this.sortBody()},getAverage(t){return this.rows.map(e=>e[t]).map(e=>isNaN(Number(e))?0:e).reduce((e,r)=>e+r,0)/this.bodyCopy.length},getDatesRange(t){const e=this.dataset.body.map(p=>new Date(p.td[t])),r=new Date(Math.min(...e)),n=new Date(Math.max(...e)),A=r.getFullYear(),a=n.getFullYear(),i=String(r.getMonth()+1).padStart(2,"0"),s=String(n.getMonth()+1).padStart(2,"0"),l=String(r.getDate()).padStart(2,"0"),u=String(n.getDate()).padStart(2,"0"),c=`${A}-${i}-${l}`,g=`${a}-${s}-${u}`;return{from:c,to:g}},getDonutLegendValue(t){return Number((t*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()},getDropdownOptions(t){return[...new Set(this.dataset.body.map(e=>e.td[t]))]},getSum(t){return this.rows.map(e=>e[t]).map(e=>isNaN(Number(e))?0:e).reduce((e,r)=>e+r,0)},includesNaN(t){return t.includes(NaN)},isDropdownOptionSelected(t,e){return this.multiselects[e]?this.multiselects[e].includes(t):!0},isNumeric(t){return!isNaN(Number(String(t).replaceAll("%","")))},isResetDisabled(t,e){const r=e.isSort,n=e.isSearch,A=e.isMultiselect&&this.multiselects[t],a=e.rangeFilter,i=s=>{if(a&&this.rangeFilters[s])return Math.round(this.rangeFilters[s].min)===this.immutableRangeFilters[s].min&&Math.round(this.rangeFilters[s].max)===this.immutableRangeFilters[s].max};if(r&&n&&A&&a)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(r&&n&&A)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(r&&n&&a)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&i(t);if(r&&n)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t]);if(r&&A&&a)return[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(r&&A)return[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(n&&A&&a)return["",void 0].includes(this.searches[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(n&&A)return["",void 0].includes(this.searches[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(n&&a)return["",void 0].includes(this.searches[t])&&i(t);if(n)return["",void 0].includes(this.searches[t]);if(r&&a)return[void 0].includes(this.sorts[t])&&i(t);if(r)return[void 0].includes(this.sorts[t]);if(A&&a)return this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(A)return this.multiselects[t].length===this.getDropdownOptions(t).length},navigate(t){this.resetSelection(),t==="next"&&this.currentPage<this.pages.length?this.currentPage+=1:t==="previous"&&this.currentPage>=1?this.currentPage-=1:this.currentPage=t-1,this.$refs.tableWrapper.scrollTo({top:0,left:0,behavior:"smooth"})},navigateCell(t){t.preventDefault();const e=t.keyCode,r=38,n=40,A=37,a=39;if(![r,n,A,a].includes(e))return;const i=t.target.id,s=/cell_(\d+)_(\d+)_vue-ui-table-(\d+)/,l=i.match(s),u=parseInt(l[1]),c=parseInt(l[2]),g=document.getElementById(`cell_${u}_${c+1}_${this.uid}`),p=document.getElementById(`cell_${u}_${c-1}_${this.uid}`),d=document.getElementById(`cell_${u+1}_${c}_${this.uid}`),y=document.getElementById(`cell_${u-1}_${c}_${this.uid}`);let v;switch(!0){case e===a:v=g;break;case e===A:v=p;break;case e===r:v=y;break;case e===n:v=d;break;default:return}v&&(v.focus(),v.scrollIntoView({behavior:"smooth",block:"center"}))},openDonutOptions(){this.selectedDonutCategory=this.availableDonutCategories[0],this.showDonutOptions=!0},placeLabelOnTopOrBottom({previousPlot:t,currentPlot:e,nextPlot:r}){const n=e.y-38,A=e.y+16;return t&&r?t.value<e.value&&r.value<e.value?n:t.value>e.value&&r.value>e.value?A:(t.value>e.value&&r.value<e.value||t.value<e.value&&r.value>e.value,n):t&&!r?t.value>e.value?A:n:!t&&r&&r.value>e.value?A:n},async prepareBodyCopy(){return new Promise(t=>{const e=[];this.tableHead.forEach((r,n)=>{if(r.isSearch&&Object.assign(this.searches,{[n]:""}),r.isMultiselect&&Object.assign(this.multiselects,{[n]:this.getDropdownOptions(n)}),r.type===this.constants.DATE&&(Object.assign(this.dates,{[n]:this.getDatesRange(n)}),Object.assign(this.filteredDatesIndexes,{[n]:!1})),(r.isPercentage||r.percentageTo)&&Object.assign(this.percentages,{[n]:{reference:r.percentageTo,referenceIndex:this.dataset.header.map(A=>A.name).indexOf(r.percentageTo)}}),r.rangeFilter&&(Object.assign(this.rangeFilters,{[n]:{min:Math.round(Math.min(...this.dataset.body.map(A=>A.td).map(A=>A[n]))),max:Math.round(Math.max(...this.dataset.body.map(A=>A.td).map(A=>A[n])))}}),Object.assign(this.immutableRangeFilters,{[n]:{min:Math.round(Math.min(...this.dataset.body.map(A=>A.td).map(A=>A[n]))),max:Math.round(Math.max(...this.dataset.body.map(A=>A.td).map(A=>A[n])))}})),r.isPercentage){const A=this.dataset.header.map(i=>i.name).indexOf(r.percentageTo),a=this.dataset.body.map(i=>i.td[A]).reduce((i,s)=>i+s,0);e.push([n,A,a])}r.type===this.constants.NUMERIC&&!r.isPercentage&&Object.assign(this.hasNaN,{[n]:this.includesNaN(this.dataset.body.map(A=>Number(A.td[n])))})}),this.bodyCopy.forEach((r,n)=>{e.map(A=>{const[a,i,s]=A;r.td[a]=r.td[i]/s}),r.td.forEach((A,a)=>{this.dataset.header[a].type===this.constants.TEXT&&this.dataset.header[a].isSearch&&(r[a]=this.stringToNumber(A)),this.dataset.header[a].type===this.constants.DATE&&(r[a]=new Date(A).getTime()),this.dataset.header[a].type===this.constants.NUMERIC&&(r[a]=isNaN(Number(A))?a:A),this.tableBody[n][a]=r[a]})}),t(!0)})},promiseWithAsyncFunction(t,e){return new Promise((r,n)=>{t().then(A=>{try{const a=e(A);r(a)}catch(a){n(a)}}).catch(A=>{n(A)})})},resetDates(t){this.dates[t]={from:this.getDatesRange(t).from,to:this.getDatesRange(t).to},this.filteredDatesIndexes[t]=!1,this.$forceUpdate(),this.filterBody()},resetFilter(t,e,r){const n=r.currentTarget;clearTimeout(this.buttonTimeout),n.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{n.classList.remove("clicked")},200),this.currentFilter=void 0,e.rangeFilter&&(this.rangeFilters[t].min=this.immutableRangeFilters[t].min,this.rangeFilters[t].max=this.immutableRangeFilters[t].max),e.isMultiselect?(this.multiselects[t]=this.getDropdownOptions(t),e.type===this.constants.TEXT&&(this.sorts[t]=void 0),e.isSearch&&(this.searches[t]="")):e.type===this.constants.NUMERIC?this.sorts[t]=void 0:e.type===this.constants.TEXT?(this.sorts[t]=void 0,this.searches[t]=""):e.type===this.constants.DATE&&(this.sorts[t]=void 0),this.filterBody()},resetSelection(){const t=document.getElementsByClassName(`tr_${this.uid}`);Array.from(t).forEach(e=>{Array.from(e.getElementsByTagName("td")).forEach(r=>{r.dataset.row==="even"?(r.style.background=this.tableConfig.style.rows.even.backgroundColor,r.style.color=this.tableConfig.style.rows.even.color):(r.style.background=this.tableConfig.style.rows.odd.backgroundColor,r.style.color=this.tableConfig.style.rows.odd.color)})}),Array.from(t).forEach(e=>e.dataset.selected="false"),this.currentPage>this.pages.length-1&&(this.currentPage=this.pages.length-1),this.showChart=!1,this.currentDonut=void 0,this.selectedColumn=void 0,this.chart.type=this.constants.BAR,this.currentSelectionSpan={col:void 0,rows:[]},this.clientX=100,this.clientY=100},selectColumn(t){this.currentSelectionSpan.col!==t?(this.visibleRows.forEach((e,r)=>{this.selectTd({td:e.td[t],rowIndex:r,colIndex:t,headerType:this.constants.NUMERIC,event:{currentTarget:document.getElementById(`cell_${r}_${t}_${this.uid}`)}})}),this.selectedColumn=t):(this.selectedColumn=void 0,this.resetSelection())},selectDropdownOption(t,e){this.multiselects[e].includes(t)?this.multiselects[e]=this.multiselects[e].filter(r=>r!==t):this.multiselects[e].push(t),this.$forceUpdate(),this.filterBody()},selectTd({td:t,rowIndex:e,colIndex:r,headerType:n,event:A}){if(n!==this.constants.NUMERIC||isNaN(Number(t))){this.resetSelection();return}this.currentSelectionSpan.col!==r&&this.resetSelection();const a=A.currentTarget.parentNode;this.currentSelectionSpan.col=r,this.currentSelectionSpan.rows.map(i=>i.index).includes(e)?(a.dataset.selected="false",this.currentSelectionSpan.rows=this.currentSelectionSpan.rows.filter(i=>i.index!==e),A.currentTarget.classList.remove(this.cssClass.CELL),Array.from(a.children).forEach((i,s)=>{i.dataset.row==="even"?(i.style.background=this.tableConfig.style.rows.even.backgroundColor,i.style.color=this.tableConfig.style.rows.even.olor):(i.style.background=this.tableConfig.style.rows.odd.backgroundColor,i.style.color=this.tableConfig.style.rows.odd.color)}),A.currentTarget.dataset.row==="even"?(A.currentTarget.style.background=this.tableConfig.style.rows.even.backgroundColor,A.currentTarget.style.color=this.tableConfig.style.rows.even.color):(A.currentTarget.style.background=this.tableConfig.style.rows.odd.backgroundColor,A.currentTarget.style.color=this.tableConfig.style.rows.odd.color)):(a.dataset.selected="true",this.currentSelectionSpan.rows.push({index:e,value:t}),Array.from(a.children).forEach((i,s)=>{i.dataset.row==="even"?(i.style.background=this.tableConfig.style.rows.even.selectedNeighbors.backgroundColor,i.style.color=this.tableConfig.style.rows.even.selectedNeighbors.color):(i.style.background=this.tableConfig.style.rows.odd.selectedNeighbors.backgroundColor,i.style.color=this.tableConfig.style.rows.odd.selectedNeighbors.color)}),A.currentTarget.dataset.row==="odd"?(A.currentTarget.style.background=this.tableConfig.style.rows.odd.selectedCell.backgroundColor,A.currentTarget.style.color=this.tableConfig.style.rows.odd.selectedCell.color):(A.currentTarget.style.background=this.tableConfig.style.rows.even.selectedCell.backgroundColor,A.currentTarget.style.color=this.tableConfig.style.rows.even.selectedCell.color)),this.currentSelectionSpan.rows=this.currentSelectionSpan.rows.sort((i,s)=>i.index-s.index),this.chart.type===this.constants.DONUT&&this.currentSelectionSpan.rows.length>0&&this.applyDonutOption()},setFilterDatesIndexes(t){this.filteredDatesIndexes[t]=!(this.getDatesRange(t).from===this.dates[t].from&&this.getDatesRange(t).to===this.dates[t].to)},sortBody(){this.resetSelection(),Object.keys(this.rangeFilters).forEach(t=>{this.filterByRange(this.bodyCopy,t)}),Object.keys(this.sorts).forEach(t=>{this.sortByNumber(this.bodyCopy,t)}),this.currentFilter!==void 0&&this.sortByNumber(this.bodyCopy,this.currentFilter),this.dataset.header.forEach((t,e)=>{if(t.isPercentage){const r=this.percentages[e].referenceIndex,n=this.bodyCopy.map(A=>A.td[r]).reduce((A,a)=>A+a,0);this.bodyCopy.forEach(A=>{A.td[e]=A.td[r]/n})}}),this.currentPage>this.pages.length-1&&(this.currentPage=this.pages.length-1),[-1].includes(this.currentPage)&&(this.currentPage=0),this.$forceUpdate()},filterByRange(t,e){this.bodyCopy=t.filter(r=>r.td[e]>=this.rangeFilters[e].min&&r[e]<=this.rangeFilters[e].max)},sortByNumber(t,e){if(this.sorts[e]===this.constants.ASC&&(t=t.sort((r,n)=>r[e]-n[e])),this.sorts[e]===this.constants.DESC)t=t.sort((r,n)=>n[e]-r[e]);else return 0},sortTh(t,e){this.currentFilter=t;const r=e.currentTarget;clearTimeout(this.buttonTimeout),r.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{r.classList.remove("clicked")},200),this.sorts[t]===1?this.sorts[t]=this.constants.DESC:this.sorts[t]=this.constants.ASC,this.sortBody()},stringToNumber(t){let e=0;for(let r=0;r<t.length;r+=1)e+=t.charCodeAt(r);return e},toggleMultiselect(t,e,r){const n=r.currentTarget;clearTimeout(this.buttonTimeout),n.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{n.classList.remove("clicked")},200);const A=document.getElementById(`th_dropdown_${t}`);A.dataset.isOpen==="false"?A.dataset.isOpen="true":A.dataset.isOpen="false"},updateCurrentPage(t){this.resetSelection(),this.currentPage=Number(t.target.value)},calcDonutMarkerConnectorColor(t){return t.proportion*100>3?t.color:"transparent"},calcDonutMarkerLabelPositionX(t){return t.center.endX+this.calcMarkerOffset(t,50)},calcMarkerOffset(t,e){return t.center.endX-e>=0?3:-2},displayArcPercentage(t,e){return isNaN(t.value/this.sumValues(e))?0:(t.value/this.sumValues(e)*100).toFixed(0)+"%"},isArcBigEnough(t){return t.proportion*100>3},sumValues(t){return[...t].map(e=>e.value).reduce((e,r)=>e+r,0)},closeDragElement(){document.onmouseup=null,document.onmousemove=null},dragMouseDown(t){t=t||window.event,t.preventDefault(),document.onmouseup=this.closeDragElement,document.onmousemove=this.elementDrag},elementDrag(t){this.rafId||(this.rafId=window.requestAnimationFrame(()=>this.onElementDrag(t)))},onElementDrag(t){t=t||window.event,t.preventDefault();const r=this.$refs.chartModal.getBoundingClientRect();this.clientX=t.clientX-r.width/2,this.clientY=t.clientY-r.height/2,this.rafId=null}}},qA=t=>(o.pushScopeId("data-v-80d709a0"),t=t(),o.popScopeId(),t),f7={class:"vue-ui-table-export-hub"},d7=["innerHTML"],g7=["data-is-open"],p7=qA(()=>o.createElementVNode("b",{class:"vue-ui-table-export-hub-title"}," Export ",-1)),m7={class:"vue-ui-table-export-hub-options"},v7={class:"vue-ui-table-export-hub-option-wrapper"},y7={class:"label"},w7=["innerHTML"],B7={class:"vue-ui-table-export-hub-option-wrapper"},x7={class:"label"},b7=["innerHTML"],C7={class:"vue-ui-table"},E7={id:"tableHead"},F7=qA(()=>o.createElementVNode("th",{class:"invisible-cell"},null,-1)),S7={key:0},_7={key:0},k7={key:1},T7=qA(()=>o.createElementVNode("th",{class:"invisible-cell"},null,-1)),N7={key:0,style:{display:"flex","align-items":"center","justify-content":"flex-end"}},L7=["innerHTML"],U7={key:0,style:{"margin-left":"3px"}},I7=qA(()=>o.createElementVNode("th",{class:"invisible-cell"},null,-1)),Q7={key:0},D7=qA(()=>o.createElementVNode("th",{class:"invisible-cell"},null,-1)),O7={class:"th-filter"},P7={key:0,class:"th-date"},M7={class:"date-wrapper--inputs"},R7={class:"date-fieldset"},H7=["for"],V7=["id","onUpdate:modelValue","onInput"],$7={class:"date-fieldset"},z7=["for"],K7=["id","onUpdate:modelValue","onInput"],G7={class:"date-wrapper--button"},j7=["onClick"],W7=["innerHTML"],X7=["innerHTML"],q7=["innerHTML"],Y7=["onClick","disabled"],J7=["placeholder","onUpdate:modelValue","name"],Z7=["onClick"],eP=["innerHTML"],tP=["innerHTML"],rP=["innerHTML"],nP=["onClick","innerHTML"],AP=["innerHTML"],aP={key:5,class:"th-range-filter"},iP=["for"],oP=qA(()=>o.createElementVNode("span",{style:{color:"grey"}},"ᒥ",-1)),sP=qA(()=>o.createElementVNode("span",{style:{color:"grey"}},"ᒣ",-1)),lP=["id","max","min","onUpdate:modelValue"],cP=["id","max","min","onUpdate:modelValue"],uP=["for"],hP=qA(()=>o.createElementVNode("span",{style:{color:"grey"}},"ᒪ",-1)),fP=qA(()=>o.createElementVNode("span",{style:{color:"grey"}},"ᒧ",-1)),dP=["onClick","disabled"],gP=["id"],pP=["onClick"],mP=["onClick","onKeyup"],vP=qA(()=>o.createElementVNode("th",{class:"invisible-cell"},null,-1)),yP=["innerHTML","onClick","onKeyup"],wP=["data-row"],BP=["data-row"],xP=["data-row","onClick","onKeyup","id"],bP=["innerHTML"],CP={key:1},EP={key:2},FP={key:5},SP=["innerHTML"],_P={key:0},kP={style:{"margin-left":"12px"}},TP={class:"format-num"},NP={style:{"margin-left":"12px"}},LP={key:0,class:"format-num"},UP={key:1,class:"format-num"},IP={key:2},QP={style:{"margin-left":"12px"}},DP={key:0,class:"format-num"},OP={key:1,class:"format-num"},PP={key:2},MP={key:0,class:"vue-ui-table-paginator format-num"},RP={key:1,class:"vue-ui-table-size-warning"},HP=["innerHTML"],VP={key:3,class:"vue-ui-table-pagination format-num"},$P=["innerHTML","disabled"],zP=["disabled"],KP={key:0,class:"vue-ui-table-page-scroller-wrapper"},GP={for:"pageScroller",style:{"font-size":"14px"}},jP=["max","value"],WP={key:1},XP=["disabled"],qP=["innerHTML","disabled"],YP={class:"chart-modal-options"},JP=["innerHTML"],ZP=["innerHTML"],eM=["innerHTML"],tM={style:{"margin-bottom":"12px"}},rM={key:0},nM={key:1},AM={style:{width:"100%",height:"fit-content",cursor:"move"},ref:"chartModal"},aM={class:"vue-ui-table-fieldset"},iM={class:"vue-ui-table-fieldset-wrapper"},oM=["name","id","checked","onInput"],sM=["for"],lM=["disabled"],cM=["innerHTML"],uM=["viewBox"],hM=["markerWidth","markerHeight","refY"],fM=["points","fill"],dM=["x2","y1","y2","stroke","stroke-width"],gM=["y2","stroke","stroke-width"],pM=["x","width","height","fill"],mM=o.createStaticVNode('<linearGradient id="barGradientSelected" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DD" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DD80" data-v-80d709a0></stop></linearGradient><linearGradient id="barGradientSelectedNeg" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DD80" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DD" data-v-80d709a0></stop></linearGradient><linearGradient id="barGradient" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DDB3" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DD66" data-v-80d709a0></stop></linearGradient><linearGradient id="barGradientNeg" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DD66" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DDB3" data-v-80d709a0></stop></linearGradient>',4),vM=["x","y","height","width","fill","stroke"],yM=["x","y","width"],wM=["x1","y1","x2","y2","stroke-width","stroke"],BM=["x1","y1","x2","y2","stroke","stroke-width","stroke-dasharray"],xM=["cx","cy","r","fill","stroke","stroke-width"],bM=["x","y","width"],CM=["x","width","height","onMouseenter"],EM=["x1","y1","x2","y2","stroke","stroke-width","stroke-dasharray"],FM=qA(()=>o.createElementVNode("span",null,"---",-1)),SM=["d","stroke"],_M=["x","y"],kM={class:"vue-ui-table-donut-label-name"},TM=["fill"],NM=["fill"],LM=["fill"],UM=["fill"],IM={class:"vue-ui-table-donut-legend"};function QM(t,e,r,n,A,a){return o.openBlock(),o.createElementBlock("div",{class:"vue-ui-table-main",style:o.normalizeStyle(`font-family: ${a.tableConfig.fontFamily}`)},[o.createElementVNode("div",f7,[o.createElementVNode("button",{onClick:e[0]||(e[0]=i=>A.isExportRequest=!A.isExportRequest),innerHTML:a.icons.export,style:o.normalizeStyle(`background:${a.tableConfig.style.exportMenu.backgroundColor};color:${a.tableConfig.style.exportMenu.color}`)},null,12,d7),o.createElementVNode("div",{class:"vue-ui-table-export-hub-dropdown","data-is-open":A.isExportRequest||"false",style:o.normalizeStyle(`background:${a.tableConfig.style.exportMenu.backgroundColor};color:${a.tableConfig.style.exportMenu.color}`)},[p7,o.createElementVNode("button",{class:"close-dropdown",onClick:e[1]||(e[1]=i=>A.isExportRequest=!1),style:o.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color};border-radius:${a.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4),o.createElementVNode("div",m7,[o.createElementVNode("div",v7,[o.createElementVNode("div",y7,o.toDisplayString(a.tableConfig.translations.exportAllLabel)+" ("+o.toDisplayString(A.bodyCopy.length)+") ",1),o.createElementVNode("button",{id:"exportAll",onClick:e[2]||(e[2]=i=>a.createXls("all")),style:o.normalizeStyle(`background:${a.tableConfig.style.exportMenu.buttons.backgroundColor};color:${a.tableConfig.style.exportMenu.buttons.color}`)},[o.createElementVNode("div",{innerHTML:a.icons.fileDownload},null,8,w7),o.createElementVNode("span",null,o.toDisplayString(a.tableConfig.translations.exportAllButton),1)],4)]),o.createElementVNode("div",B7,[o.createElementVNode("div",x7,o.toDisplayString(a.tableConfig.translations.exportPageLabel),1),o.createElementVNode("button",{id:"exportPage",onClick:e[3]||(e[3]=i=>a.createXls("page")),style:o.normalizeStyle(`background:${a.tableConfig.style.exportMenu.buttons.backgroundColor};color:${a.tableConfig.style.exportMenu.buttons.color}`)},[o.createElementVNode("div",{innerHTML:a.icons.fileDownload},null,8,b7),o.createElementVNode("span",null,o.toDisplayString(a.tableConfig.translations.exportPageButton),1)],4)])])],12,g7)]),o.createElementVNode("div",{class:"vue-ui-table__wrapper",style:o.normalizeStyle(`max-height:${a.tableConfig.maxHeight}px`),ref:"tableWrapper"},[o.createElementVNode("table",C7,[o.createElementVNode("thead",E7,[o.createElementVNode("tr",null,[F7,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.tableHead,(i,s)=>(o.openBlock(),o.createElementBlock("th",{key:`thead_${s}`,style:o.normalizeStyle(`overflow: visible;background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`),class:o.normalizeClass({"th-has-nan":A.hasNaN[s]})},[a.hasNumericTypes&&([A.constants.TEXT,A.constants.DATE].includes(i.type)||i.isPercentage)?(o.openBlock(),o.createElementBlock("span",S7,[o.createTextVNode(o.toDisplayString(i.name)+" ",1),i.isPercentage?(o.openBlock(),o.createElementBlock("span",_7," / "+o.toDisplayString(i.percentageTo),1)):o.createCommentVNode("",!0)])):(o.openBlock(),o.createElementBlock("span",k7,o.toDisplayString(i.name),1))],6))),128))]),a.hasNumericTypes?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("tr",null,[T7,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.tableHead,(i,s)=>(o.openBlock(),o.createElementBlock("th",{key:`thead_${s}`,class:o.normalizeClass({"th-numeric":!0,"th-has-nan":A.hasNaN[s]}),style:o.normalizeStyle(`background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[i.sum&&!A.hasNaN[s]?(o.openBlock(),o.createElementBlock("span",N7,[o.createElementVNode("span",{innerHTML:a.icons.sum,style:{"margin-bottom":"-4px","margin-right":"3px"}},null,8,L7),o.createTextVNode(" "+o.toDisplayString(i.prefix)+" "+o.toDisplayString(Number(a.getSum(s).toFixed(i.decimals)).toLocaleString())+" "+o.toDisplayString(i.suffix)+" ",1),A.percentages[s]&&i.percentageTo&&!i.isPercentage?(o.openBlock(),o.createElementBlock("span",U7," ("+o.toDisplayString(isNaN(a.getSum(s)/a.getSum(A.percentages[s].referenceIndex))?"-":(a.getSum(s)/a.getSum(A.percentages[s].referenceIndex)*100).toFixed(i.decimals))+"%) ",1)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)],6))),128))]),o.createElementVNode("tr",null,[I7,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.tableHead,(i,s)=>(o.openBlock(),o.createElementBlock("th",{key:`thead_${s}`,class:o.normalizeClass({"th-numeric":!0,"th-has-nan":A.hasNaN[s]}),style:o.normalizeStyle(`background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[i.average&&!A.hasNaN[s]?(o.openBlock(),o.createElementBlock("span",Q7," ~ "+o.toDisplayString(i.prefix)+" "+o.toDisplayString(isNaN(a.getAverage(s))?"":Number(a.getAverage(s).toFixed(i.decimals)).toLocaleString())+" "+o.toDisplayString(i.suffix),1)):o.createCommentVNode("",!0)],6))),128))]),o.createElementVNode("tr",null,[D7,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.tableHead,(i,s)=>(o.openBlock(),o.createElementBlock("th",{key:`thead_${s}`,class:o.normalizeClass({"th-has-nan":A.hasNaN[s]}),style:o.normalizeStyle(`background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[o.createElementVNode("div",O7,[i.type===A.constants.DATE&&A.dates[s]?(o.openBlock(),o.createElementBlock("div",P7,[o.createElementVNode("div",M7,[o.createElementVNode("div",R7,[o.createElementVNode("label",{for:`from_${s}`},o.toDisplayString(a.tableConfig.translations.from),9,H7),o.withDirectives(o.createElementVNode("input",{id:`from_${s}`,type:"date","onUpdate:modelValue":l=>A.dates[s].from=l,onInput:l=>{a.filterBody(),a.setFilterDatesIndexes(s)},style:o.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,V7),[[o.vModelText,A.dates[s].from]])]),o.createElementVNode("div",$7,[o.createElementVNode("label",{for:`to_${s}`},o.toDisplayString(a.tableConfig.translations.to),9,z7),o.withDirectives(o.createElementVNode("input",{id:`to_${s}`,type:"date","onUpdate:modelValue":l=>A.dates[s].to=l,onInput:l=>{a.filterBody(),a.setFilterDatesIndexes(s)},style:o.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,K7),[[o.vModelText,A.dates[s].to]])])]),o.createElementVNode("div",G7,[i.isSort?(o.openBlock(),o.createElementBlock("button",{key:0,onClick:l=>a.sortTh(s,l),class:o.normalizeClass({"th-button-active":[A.constants.DESC,A.constants.ASC].includes(A.sorts[s])}),style:o.normalizeStyle(`background:${[A.constants.DESC,A.constants.ASC].includes(A.sorts[s])?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${[A.constants.DESC,A.constants.ASC].includes(A.sorts[s])?"":a.tableConfig.style.pagination.buttons.color}`)},[A.sorts[s]===A.constants.ASC?(o.openBlock(),o.createElementBlock("span",{key:0,innerHTML:[A.constants.DATE].includes(i.type)?a.icons.sort09:a.icons.sortAZ},null,8,W7)):A.sorts[s]===A.constants.DESC?(o.openBlock(),o.createElementBlock("span",{key:1,innerHTML:[A.constants.DATE].includes(i.type)?a.icons.sort90:a.icons.sortZA},null,8,X7)):(o.openBlock(),o.createElementBlock("span",{key:2,innerHTML:a.icons.arrowSort},null,8,q7))],14,j7)):o.createCommentVNode("",!0),o.createElementVNode("button",{onClick:l=>{a.resetDates(s),a.resetFilter(s,i,l)},disabled:!A.filteredDatesIndexes[s]&&a.isResetDisabled(s,i),class:"th-reset"}," ✖ ",8,Y7)])])):o.createCommentVNode("",!0),i.isSearch?o.withDirectives((o.openBlock(),o.createElementBlock("input",{key:1,placeholder:a.tableConfig.translations.inputPlaceholder,"onUpdate:modelValue":l=>A.searches[s]=l,onInput:e[4]||(e[4]=l=>a.debounce(a.filterBody,400)),name:`search_${s}`,style:o.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,J7)),[[o.vModelText,A.searches[s]]]):o.createCommentVNode("",!0),!A.hasNaN[s]&&i.isSort&&i.type!==A.constants.DATE?(o.openBlock(),o.createElementBlock("button",{key:2,onClick:l=>a.sortTh(s,l),class:o.normalizeClass({"th-button-active":[A.constants.DESC,A.constants.ASC].includes(A.sorts[s])}),style:o.normalizeStyle(`background:${[A.constants.DESC,A.constants.ASC].includes(A.sorts[s])?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${[A.constants.DESC,A.constants.ASC].includes(A.sorts[s])?"":a.tableConfig.style.pagination.buttons.color}`)},[A.sorts[s]===A.constants.ASC?(o.openBlock(),o.createElementBlock("span",{key:0,innerHTML:[A.constants.NUMERIC].includes(i.type)?a.icons.sort09:a.icons.sortZA},null,8,eP)):A.sorts[s]===A.constants.DESC?(o.openBlock(),o.createElementBlock("span",{key:1,innerHTML:[A.constants.NUMERIC].includes(i.type)?a.icons.sort90:a.icons.sortAZ},null,8,tP)):(o.openBlock(),o.createElementBlock("span",{key:2,innerHTML:a.icons.arrowSort},null,8,rP))],14,Z7)):o.createCommentVNode("",!0),i.isMultiselect?(o.openBlock(),o.createElementBlock("button",{key:3,onClick:l=>a.toggleMultiselect(s,i,l),innerHTML:a.icons.filter,class:o.normalizeClass({"th-button-active":A.multiselects[s]&&A.multiselects[s].length!==a.getDropdownOptions(s).length}),style:o.normalizeStyle(`background:${A.multiselects[s]&&A.multiselects[s].length!==a.getDropdownOptions(s).length?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${A.multiselects[s]&&A.multiselects[s].length!==a.getDropdownOptions(s).length?"":a.tableConfig.style.pagination.buttons.color}`)},null,14,nP)):o.createCommentVNode("",!0),A.currentSelectionSpan.col===s&&a.canChart?(o.openBlock(),o.createElementBlock("button",{key:4,onClick:e[5]||(e[5]=l=>A.showChart=!A.showChart),innerHTML:a.icons.chart,class:o.normalizeClass({"th-button-active":A.showChart}),style:o.normalizeStyle(`background:${A.showChart?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${A.showChart?"":a.tableConfig.style.pagination.buttons.color}`)},null,14,AP)):o.createCommentVNode("",!0),i.rangeFilter&&A.rangeFilters[s]&&!A.hasNaN[s]?(o.openBlock(),o.createElementBlock("div",aP,[o.createElementVNode("label",{for:`rangeMin${s}`},[oP,o.createTextVNode(" min "),sP],8,iP),o.withDirectives(o.createElementVNode("input",{type:"number",id:`rangeMin${s}`,max:A.immutableRangeFilters[s].max,min:A.immutableRangeFilters[s].min,"onUpdate:modelValue":l=>A.rangeFilters[s].min=l,onInput:e[6]||(e[6]=l=>a.debounce(a.filterBody,400)),style:o.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,lP),[[o.vModelText,A.rangeFilters[s].min,void 0,{number:!0}]]),o.withDirectives(o.createElementVNode("input",{type:"number",id:`rangeMax${s}`,max:A.immutableRangeFilters[s].max,min:A.immutableRangeFilters[s].min,"onUpdate:modelValue":l=>A.rangeFilters[s].max=l,onInput:e[7]||(e[7]=l=>a.debounce(a.filterBody,400)),style:o.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,cP),[[o.vModelText,A.rangeFilters[s].max,void 0,{number:!0}]]),o.createElementVNode("label",{for:`rangeMax${s}`},[hP,o.createTextVNode(" max "),fP],8,uP)])):o.createCommentVNode("",!0),a.canResetColumn(s,i)?(o.openBlock(),o.createElementBlock("button",{key:6,onClick:l=>a.resetFilter(s,i,l),disabled:a.isResetDisabled(s,i),class:"th-reset"}," ✖ ",8,dP)):o.createCommentVNode("",!0),i.isMultiselect?(o.openBlock(),o.createElementBlock("div",{key:7,class:"th-dropdown","data-is-open":"false",id:`th_dropdown_${s}`,style:o.normalizeStyle(`background:${a.tableConfig.style.dropdowns.backgroundColor};color:${a.tableConfig.style.dropdowns.color}`)},[o.createElementVNode("button",{class:"close-dropdown",onClick:l=>a.toggleMultiselect(s,i,l),style:o.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color}`)}," ✖ ",12,pP),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.getDropdownOptions(s),(l,u)=>(o.openBlock(),o.createElementBlock("span",{class:"th-option",key:`th_option_${s}_${u}`,onClick:c=>a.selectDropdownOption(l,s),onKeyup:[o.withKeys(c=>a.selectDropdownOption(l,s),["enter"]),o.withKeys(c=>a.selectDropdownOption(l,s),["space"])],style:o.normalizeStyle(`opacity:${a.isDropdownOptionSelected(l,s)?1:.5}`),tabindex:"0"},[a.isDropdownOptionSelected(l,s)?(o.openBlock(),o.createElementBlock("span",{key:0,style:o.normalizeStyle(`color:${a.tableConfig.style.dropdowns.icons.selected.color};margin-right:5px`),class:"th-icon-green"},o.toDisplayString(a.tableConfig.style.dropdowns.icons.selected.unicode),5)):(o.openBlock(),o.createElementBlock("span",{key:1,style:o.normalizeStyle(`color:${a.tableConfig.style.dropdowns.icons.unselected.color};margin-right:5px`),class:"th-icon-red"},o.toDisplayString(a.tableConfig.style.dropdowns.icons.unselected.unicode),5)),o.createElementVNode("span",null,o.toDisplayString(l),1)],44,mP))),128))],12,gP)):o.createCommentVNode("",!0)])],6))),128))])],64)):o.createCommentVNode("",!0),o.createElementVNode("tr",null,[vP,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.tableHead,(i,s)=>(o.openBlock(),o.createElementBlock("th",{key:`col_selector_${s}`,class:o.normalizeClass({"vue-ui-table-col-selector":!A.hasNaN[s],"th-has-nan":A.hasNaN[s]}),style:o.normalizeStyle(`background:${s===A.selectedColumn&&!A.hasNaN[s]?a.tableConfig.style.th.selected.backgroundColor:a.tableConfig.style.th.backgroundColor};color:${s===A.selectedColumn&&!A.hasNaN[s]?a.tableConfig.style.th.selected.color:a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[A.hasNaN[s]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:0,innerHTML:A.tableHead[s].type===A.constants.NUMERIC?a.icons.chevronDown:"",class:o.normalizeClass({"col-selector":A.tableHead[s].type===A.constants.NUMERIC}),tabindex:"0",onClick:o.withModifiers(l=>a.selectColumn(s),["stop"]),onKeyup:o.withKeys(l=>a.selectColumn(s),["enter"])},null,42,yP))],6))),128))])]),o.createElementVNode("tbody",{onClick:e[8]||(e[8]=(...i)=>a.closeAllDropdowns&&a.closeAllDropdowns(...i)),onKeydown:e[9]||(e[9]=i=>a.navigateCell(i))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.visibleRows,(i,s)=>(o.openBlock(),o.createElementBlock("tr",{key:`tbody_${s}`,"data-row":s%2===0?"odd":"even",class:o.normalizeClass(`tr_${A.uid}`),style:o.normalizeStyle(`${s%2===0?`background:${a.tableConfig.style.rows.odd.backgroundColor};color:${a.tableConfig.style.rows.odd.color}`:`background:${a.tableConfig.style.rows.even.backgroundColor};color:${a.tableConfig.style.rows.even.color}`}`)},[o.createElementVNode("td",{class:"vue-ui-table-td-iteration","data-row":s%2===0?"odd":"even"},o.toDisplayString(i.absoluteIndex+1),9,BP),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.td,(l,u)=>(o.openBlock(),o.createElementBlock("td",{"data-row":s%2===0?"odd":"even",key:`td_${s}_${u}`,style:o.normalizeStyle(a.isNumeric(l)||r.dataset.header[u].type===A.constants.DATE?"text-align:right;font-variant-numeric: tabular-nums;":""),onClick:c=>a.selectTd({td:l,rowIndex:s,colIndex:u,headerType:r.dataset.header[u].type,event:c}),onKeyup:[o.withKeys(c=>a.selectTd({td:l,rowIndex:s,colIndex:u,headerType:r.dataset.header[u].type,event:c}),["enter"]),o.withKeys(c=>a.selectTd({td:l,rowIndex:s,colIndex:u,headerType:r.dataset.header[u].type,event:c}),["space"])],class:o.normalizeClass({"td-numeric":r.dataset.header[u].type===A.constants.NUMERIC,"td-focusable":!0,"td-has-nan":A.hasNaN[u]}),id:`cell_${s}_${u}_${A.uid}`,tabindex:"0"},[i.meta&&i.meta.markerIndices.includes(u)&&i.meta.unicodeIcon?(o.openBlock(),o.createElementBlock("span",{key:0,style:o.normalizeStyle(`color:${i.meta.color};margin-right:3px`),innerHTML:i.meta.unicodeIcon},null,12,bP)):o.createCommentVNode("",!0),r.dataset.header[u].type===A.constants.DATE?(o.openBlock(),o.createElementBlock("span",CP,o.toDisplayString(r.dataset.header[u].prefix)+" "+o.toDisplayString(new Date(l).toLocaleString().slice(0,10))+" "+o.toDisplayString(r.dataset.header[u].suffix),1)):r.dataset.header[u].isPercentage?(o.openBlock(),o.createElementBlock("span",EP,o.toDisplayString(Number((l*100).toFixed(r.dataset.header[u].decimals)).toLocaleString())+"% ",1)):A.percentages[u]&&r.dataset.header[u].percentageTo&&!r.dataset.header[u].isPercentage?(o.openBlock(),o.createElementBlock("span",{key:3,class:o.normalizeClass({"td-nan":isNaN(Number(l))})},o.toDisplayString(r.dataset.header[u].prefix)+" "+o.toDisplayString(isNaN(Number(l))?`${l} is not ${A.constants.NUMERIC}`:Number(l.toFixed(r.dataset.header[u].decimals)).toLocaleString())+" "+o.toDisplayString(r.dataset.header[u].suffix)+" ("+o.toDisplayString(isNaN(Number(l))?"":Number((l/a.getSum(A.percentages[u].referenceIndex)*100).toFixed(r.dataset.header[u].decimals)).toLocaleString())+"%) ",3)):r.dataset.header[u].type===A.constants.NUMERIC?(o.openBlock(),o.createElementBlock("span",{key:4,class:o.normalizeClass({"td-nan":isNaN(Number(l))})},o.toDisplayString(r.dataset.header[u].prefix)+" "+o.toDisplayString(isNaN(Number(l))?`${l} is not ${A.constants.NUMERIC}`:Number(l.toFixed(r.dataset.header[u].decimals)).toLocaleString())+" "+o.toDisplayString(r.dataset.header[u].suffix),3)):(o.openBlock(),o.createElementBlock("span",FP,o.toDisplayString(r.dataset.header[u].prefix)+" "+o.toDisplayString(l)+" "+o.toDisplayString(r.dataset.header[u].suffix),1))],46,xP))),128))],14,wP))),128))],32)])],4),o.createElementVNode("div",{class:o.normalizeClass({"td-selector-info":!0,"td-selector-info--active":A.currentSelectionSpan.col!==void 0&&A.currentSelectionSpan.rows.length}),style:o.normalizeStyle(`background:${a.tableConfig.style.infoBar.backgroundColor};color:${a.tableConfig.style.infoBar.color}`)},[A.currentSelectionSpan.col!==void 0&&A.currentSelectionSpan.rows.length?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",{innerHTML:a.icons.table,class:"td-selector-icon"},null,8,SP),o.createElementVNode("span",null,[o.createElementVNode("b",null,[o.createTextVNode(o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].name)+" ",1),r.dataset.header[A.currentSelectionSpan.col].isPercentage?(o.openBlock(),o.createElementBlock("span",_P," / "+o.toDisplayString(r.dataset.header[A.percentages[A.currentSelectionSpan.col].referenceIndex].name),1)):o.createCommentVNode("",!0)]),o.createElementVNode("span",kP,[o.createTextVNode(o.toDisplayString(a.tableConfig.translations.nb)+" : ",1),o.createElementVNode("b",TP,o.toDisplayString(A.currentSelectionSpan.rows.length),1)]),o.createElementVNode("span",NP,[o.createTextVNode(o.toDisplayString(a.tableConfig.translations.sum)+" : ",1),r.dataset.header[A.currentSelectionSpan.col].isPercentage?(o.openBlock(),o.createElementBlock("b",LP,o.toDisplayString(a.selectedCellsCalculations.sumPercentage),1)):(o.openBlock(),o.createElementBlock("b",UP,o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].prefix)+" "+o.toDisplayString(a.selectedCellsCalculations.sumRegular)+" "+o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].suffix),1)),r.dataset.header[A.currentSelectionSpan.col].isPercentage?(o.openBlock(),o.createElementBlock("b",IP,"%")):o.createCommentVNode("",!0)]),o.createElementVNode("span",QP,[o.createTextVNode(o.toDisplayString(a.tableConfig.translations.average)+" : ",1),r.dataset.header[A.currentSelectionSpan.col].isPercentage?(o.openBlock(),o.createElementBlock("b",DP,o.toDisplayString(a.selectedCellsCalculations.averagePercentage),1)):(o.openBlock(),o.createElementBlock("b",OP,o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].prefix)+" "+o.toDisplayString(a.selectedCellsCalculations.averageRegular)+" "+o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].suffix),1)),r.dataset.header[A.currentSelectionSpan.col].isPercentage?(o.openBlock(),o.createElementBlock("b",PP,"%")):o.createCommentVNode("",!0)])]),o.createElementVNode("button",{onClick:e[10]||(e[10]=(...i)=>a.resetSelection&&a.resetSelection(...i)),class:"td-selector-info-reset",style:o.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color};border-radius:${a.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4)],64)):o.createCommentVNode("",!0)],6),A.bodyCopy.length>10?(o.openBlock(),o.createElementBlock("div",MP,[o.createTextVNode(o.toDisplayString(a.tableConfig.translations.totalRows)+" : "+o.toDisplayString(r.dataset.body.length)+" | "+o.toDisplayString(a.tableConfig.translations.paginatorLabel)+" : ",1),A.bodyCopy.length>10?o.withDirectives((o.openBlock(),o.createElementBlock("select",{key:0,id:"paginatorSelector","onUpdate:modelValue":e[11]||(e[11]=i=>A.itemsPerPage=i),onChange:e[12]||(e[12]=(...i)=>a.resetSelection&&a.resetSelection(...i)),style:o.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.paginatorOptions,(i,s)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[A.bodyCopy.length>i||r.dataset.body.length===i?(o.openBlock(),o.createElementBlock("option",{key:`paginator_option_${s}`},o.toDisplayString(i),1)):o.createCommentVNode("",!0)],64))),256))],36)),[[o.vModelSelect,A.itemsPerPage,void 0,{number:!0}]]):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),A.itemsPerPage>=250?(o.openBlock(),o.createElementBlock("div",RP,[o.createElementVNode("span",{innerHTML:a.icons.warning},null,8,HP),o.createTextVNode(o.toDisplayString(a.tableConfig.translations.sizeWarning),1)])):o.createCommentVNode("",!0),a.pages.length>1&&a.pages.length<=10?(o.openBlock(),o.createElementBlock("div",{key:2,class:"vue-ui-table-navigation-indicator",style:o.normalizeStyle(`background:${a.tableConfig.style.pagination.navigationIndicator.backgroundColor};width:calc(${A.currentPage/(a.pages.length-1)*100}%)`)},null,4)):o.createCommentVNode("",!0),a.pages.length>1?(o.openBlock(),o.createElementBlock("div",VP,[o.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[13]||(e[13]=o.withModifiers(i=>a.navigate("previous"),["stop"])),innerHTML:a.icons.chevronLeft,disabled:A.currentPage===0,style:o.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${A.currentPage===0?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},null,12,$P),a.pages.length>3?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[14]||(e[14]=o.withModifiers(i=>a.navigate(1),["stop"])),disabled:A.currentPage===0,style:o.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${A.currentPage===0?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)}," 1 ",12,zP),a.pages.length>10?(o.openBlock(),o.createElementBlock("div",KP,[o.createElementVNode("label",GP,o.toDisplayString(a.tableConfig.translations.page)+" "+o.toDisplayString(A.currentPage+1)+" / "+o.toDisplayString(a.pages.length),1),o.createElementVNode("input",{class:"vue-ui-table-page-scroller",id:"pageScroller",type:"range",step:"1",min:0,max:a.pages.length-1,onInput:e[15]||(e[15]=i=>a.updateCurrentPage(i)),value:A.currentPage,style:o.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border};accent-color:${a.tableConfig.style.inputs.accentColor}`)},null,44,jP)])):(o.openBlock(),o.createElementBlock("span",WP,o.toDisplayString(a.tableConfig.translations.page)+" "+o.toDisplayString(A.currentPage+1)+" / "+o.toDisplayString(a.pages.length),1)),o.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[16]||(e[16]=o.withModifiers(i=>a.navigate(a.pages.length),["stop"])),disabled:A.currentPage===a.pages.length-1,style:o.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${A.currentPage===a.pages.length-1?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},o.toDisplayString(a.pages.length),13,XP)],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(a.tableConfig.translations.page)+" "+o.toDisplayString(A.currentPage+1)+" / "+o.toDisplayString(a.pages.length),1)],64)),o.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[17]||(e[17]=o.withModifiers(i=>a.navigate("next"),["stop"])),innerHTML:a.icons.chevronRight,disabled:A.currentPage===a.pages.length-1,style:o.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${A.currentPage===a.pages.length-1?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},null,12,qP)])):o.createCommentVNode("",!0),A.showChart&&a.canChart?(o.openBlock(),o.createElementBlock("div",{key:4,class:"vue-ui-table-chart-modal",style:o.normalizeStyle(`top:${A.clientY}px; left:${A.clientX}px;background:${a.tableConfig.style.chart.modal.backgroundColor};color:${a.tableConfig.style.chart.modal.color}`)},[o.createElementVNode("button",{class:"close-chart-modal",onClick:e[18]||(e[18]=i=>A.showChart=!1),style:o.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color};border-radius:${a.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4),o.createElementVNode("div",YP,[a.availableDonutCategories.length?(o.openBlock(),o.createElementBlock("button",{key:0,onClick:e[19]||(e[19]=i=>A.showDonutOptions=!0),innerHTML:a.icons.donut,class:o.normalizeClass({"is-active-chart":A.chart.type===A.constants.DONUT||A.showDonutOptions}),style:o.normalizeStyle(`background:${A.chart.type===A.constants.DONUT||A.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.backgroundColor:a.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${A.chart.type===A.constants.DONUT||A.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.color:a.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,JP)):o.createCommentVNode("",!0),o.createElementVNode("button",{onClick:e[20]||(e[20]=i=>{A.chart.type=A.constants.LINE,A.showDonutOptions=!1}),innerHTML:a.icons.chart,class:o.normalizeClass({"is-active-chart":A.chart.type===A.constants.LINE&&!A.showDonutOptions}),style:o.normalizeStyle(`background:${A.chart.type===A.constants.LINE&&!A.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.backgroundColor:a.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${A.chart.type===A.constants.LINE&&!A.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.color:a.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,ZP),o.createElementVNode("button",{onClick:e[21]||(e[21]=i=>{A.chart.type=A.constants.BAR,A.showDonutOptions=!1}),innerHTML:a.icons.bar,class:o.normalizeClass({"is-active-chart":A.chart.type===A.constants.BAR&&!A.showDonutOptions}),style:o.normalizeStyle(`background:${A.chart.type===A.constants.BAR&&!A.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.backgroundColor:a.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${A.chart.type===A.constants.BAR&&!A.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.color:a.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,eM)]),o.createElementVNode("div",tM,[o.createElementVNode("b",null,[o.createTextVNode(o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].name)+" ",1),r.dataset.header[A.currentSelectionSpan.col].isPercentage&&r.dataset.header[A.currentSelectionSpan.col].percentageTo?(o.openBlock(),o.createElementBlock("span",rM," / "+o.toDisplayString(r.dataset.header[A.percentages[A.currentSelectionSpan.col].referenceIndex].name),1)):o.createCommentVNode("",!0),A.chart.type===A.constants.DONUT&&A.selectedDonutCategory&&A.selectedDonutCategory.name?(o.openBlock(),o.createElementBlock("span",nM,o.toDisplayString(a.tableConfig.translations.by)+" "+o.toDisplayString(A.selectedDonutCategory.name),1)):o.createCommentVNode("",!0)])]),o.createElementVNode("div",AM,[A.showDonutOptions&&a.availableDonutCategories.length?(o.openBlock(),o.createElementBlock("div",{key:0,style:o.normalizeStyle(`background:${a.tableConfig.style.chart.modal.backgroundColor};color:${a.tableConfig.style.chart.modal.color}`)},[o.createElementVNode("fieldset",aM,[o.createElementVNode("legend",null,o.toDisplayString(a.tableConfig.translations.chooseCategoryColumn),1),o.createElementVNode("div",iM,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.availableDonutCategories,(i,s)=>(o.openBlock(),o.createElementBlock("div",{key:`donut_radio_${s}`,class:"vue-ui-table-fieldset-option"},[o.createElementVNode("input",{type:"radio",name:i.name,id:i.name,checked:A.selectedDonutCategory&&i.name===A.selectedDonutCategory.name,onInput:l=>A.selectedDonutCategory=a.availableDonutCategories[s],style:o.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border};accent-color:${a.tableConfig.style.inputs.accentColor}`)},null,44,oM),o.createElementVNode("label",{for:i.name},o.toDisplayString(i.name),9,sM)]))),128))]),o.createElementVNode("button",{class:"vue-ui-table-generate-donut",disabled:!A.selectedDonutCategory,onClick:e[22]||(e[22]=(...i)=>a.applyDonutOption&&a.applyDonutOption(...i)),style:o.normalizeStyle(`background:${a.tableConfig.style.chart.modal.buttons.selected.backgroundColor};color:${a.tableConfig.style.chart.modal.buttons.selected.color}`)},[o.createElementVNode("div",{style:{"margin-bottom":"-3px"},innerHTML:a.icons.donut},null,8,cM),o.createTextVNode(" "+o.toDisplayString(a.tableConfig.translations.makeDonut),1)],12,lM)])],4)):o.createCommentVNode("",!0),[A.constants.BAR,A.constants.LINE].includes(A.chart.type)&&!A.showDonutOptions?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[(o.openBlock(),o.createElementBlock("svg",{viewBox:`0 0 ${A.chart.width} ${A.chart.height}`,class:"vue-ui-table-chart-svg",style:o.normalizeStyle(`background:${a.tableConfig.style.chart.layout.backgroundColor}`)},[o.createElementVNode("defs",null,[o.createElementVNode("marker",{id:"arrowhead",markerWidth:a.tableConfig.style.chart.layout.progression.arrowSize,markerHeight:a.tableConfig.style.chart.layout.progression.arrowSize,refX:"0",refY:a.tableConfig.style.chart.layout.progression.arrowSize/2,orient:"auto"},[o.createElementVNode("polygon",{points:`0 0, ${a.tableConfig.style.chart.layout.progression.arrowSize} ${a.tableConfig.style.chart.layout.progression.arrowSize/2}, 0 ${a.tableConfig.style.chart.layout.progression.arrowSize}`,fill:a.tableConfig.style.chart.layout.progression.stroke},null,8,fM)],8,hM)]),o.createElementVNode("g",null,[o.createElementVNode("line",{x1:0,x2:A.chart.width,y1:a.chartData.zero,y2:a.chartData.zero,stroke:a.tableConfig.style.chart.layout.axis.stroke,"stroke-width":a.tableConfig.style.chart.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,dM),o.createElementVNode("line",{x1:0,x2:0,y1:0,y2:A.chart.height,stroke:a.tableConfig.style.chart.layout.axis.stroke,"stroke-width":a.tableConfig.style.chart.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,gM)]),A.chart.type===A.constants.LINE?(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:0},o.renderList(a.chartData.plots,(i,s)=>(o.openBlock(),o.createElementBlock("g",{key:`trap_fill_${s}`},[o.createElementVNode("rect",{x:s*a.chartData.slot,y:0,width:a.chartData.slot,height:A.chart.height,fill:A.selectedPlot===s?"rgba(0,0,0,0.03)":"transparent"},null,8,pM)]))),128)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.chartData.plots,(i,s)=>(o.openBlock(),o.createElementBlock("g",{key:`plot_${s}`},[A.chart.type===A.constants.BAR?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[mM,o.createElementVNode("rect",{x:i.x-a.chartData.slot/2,y:a.chartData.isAllNegative?0:a.calcRectY(i.value,i.y),height:i.value>=0?a.chartData.zero-i.y:a.chartData.isAllNegative?i.y:i.y-a.chartData.zero,width:a.chartData.slot,fill:a.tableConfig.style.chart.layout.bar.fill?a.tableConfig.style.chart.layout.bar.fill:A.selectedPlot===s?i.value>=0?"url(#barGradientSelected)":"url(#barGradientSelectedNeg)":(i.value>=0,"url(#barGradient)"),stroke:a.tableConfig.style.chart.layout.bar.stroke,"stroke-width":"1"},null,8,vM),A.selectedPlot===s?(o.openBlock(),o.createElementBlock("foreignObject",{key:0,x:i.x-(a.chartData.slot<100?50:a.chartData.slot/2),y:i.value>=0?i.y-32:i.y+4,height:"20",width:a.chartData.slot<100?100:a.chartData.slot,style:{overflow:"visible"}},[o.createElementVNode("div",{style:o.normalizeStyle(`width:100%;text-align:center;font-size:20px;color:${a.tableConfig.style.chart.layout.labels.color}`)},o.toDisplayString(i.prefix)+" "+o.toDisplayString(Number(i.value.toFixed(r.dataset.header[A.currentSelectionSpan.col].decimals)).toLocaleString())+" "+o.toDisplayString(i.suffix),5)],8,yM)):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0),A.chart.type===A.constants.LINE?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[s+1<a.chartData.plots.length?(o.openBlock(),o.createElementBlock("line",{key:0,x1:i.x,y1:i.y,x2:a.chartData.plots[s+1].x,y2:a.chartData.plots[s+1].y,"stroke-width":a.tableConfig.style.chart.layout.line.strokeWidth,stroke:a.tableConfig.style.chart.layout.line.stroke},null,8,wM)):o.createCommentVNode("",!0),A.selectedPlot===s?(o.openBlock(),o.createElementBlock("line",{key:1,x1:i.x,y1:i.y,x2:i.x,y2:A.chart.height,stroke:a.tableConfig.style.chart.layout.line.selector.stroke,"stroke-width":a.tableConfig.style.chart.layout.line.selector.strokeWidth,"stroke-dasharray":a.tableConfig.style.chart.layout.line.selector.strokeDasharray},null,8,BM)):o.createCommentVNode("",!0),o.createElementVNode("circle",{cx:i.x,cy:i.y,r:A.selectedPlot===s?a.tableConfig.style.chart.layout.line.plot.radius.selected:a.tableConfig.style.chart.layout.line.plot.radius.unselected,fill:a.tableConfig.style.chart.layout.line.plot.fill,stroke:a.tableConfig.style.chart.layout.line.plot.stroke,"stroke-width":a.tableConfig.style.chart.layout.line.plot.strokeWidth},null,8,xM),A.selectedPlot===s?(o.openBlock(),o.createElementBlock("foreignObject",{key:2,x:i.x-(a.chartData.slot<100?50:a.chartData.slot/2),y:a.placeLabelOnTopOrBottom({previousPlot:a.chartData.plots[s-1],currentPlot:i,nextPlot:a.chartData.plots[s+1]}),height:"20",width:a.chartData.slot<100?100:a.chartData.slot,style:{overflow:"visible"}},[o.createElementVNode("div",{style:o.normalizeStyle(`width:100%;text-align:center;font-size:20px;color:${a.tableConfig.style.chart.layout.labels.color}`)},o.toDisplayString(i.prefix)+" "+o.toDisplayString(Number(i.value.toFixed(r.dataset.header[A.currentSelectionSpan.col].decimals)).toLocaleString())+" "+o.toDisplayString(i.suffix),5)],8,bM)):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0)]))),128)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.chartData.plots,(i,s)=>(o.openBlock(),o.createElementBlock("g",{key:`trap_${s}`},[o.createElementVNode("rect",{x:s*a.chartData.slot,y:0,width:a.chartData.slot,height:A.chart.height,fill:"transparent",onMouseenter:l=>A.selectedPlot=s,onMouseleave:e[23]||(e[23]=l=>A.selectedPlot=void 0)},null,40,CM)]))),128)),a.chartData.progression&&a.chartData.plots.length>2?(o.openBlock(),o.createElementBlock("line",{key:1,x1:a.chartData.progression.x1,y1:a.chartData.progression.y1,x2:a.chartData.progression.x2,y2:a.chartData.progression.y2,stroke:a.tableConfig.style.chart.layout.progression.stroke,"stroke-width":a.tableConfig.style.chart.layout.progression.strokeWidth,"stroke-dasharray":a.tableConfig.style.chart.layout.progression.strokeDasharray,"marker-end":"url(#arrowhead)"},null,8,EM)):o.createCommentVNode("",!0)],12,uM)),a.chartData.plots.length>=2?(o.openBlock(),o.createElementBlock("div",{key:0,class:"chart-trend",style:o.normalizeStyle(`color:${a.tableConfig.style.chart.modal.color}`)},[FM,o.createTextVNode(" Trend: "),o.createElementVNode("span",null,o.toDisplayString(a.chartData.progression.slope<0?"+":"-"),1),o.createTextVNode(" "+o.toDisplayString((Math.abs(a.chartData.progression.slope)*100).toFixed(1))+" % ",1)],4)):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0),[A.constants.DONUT].includes(A.chart.type)&&!A.showDonutOptions?(o.openBlock(),o.createElementBlock(o.Fragment,{key:2},[(o.openBlock(),o.createElementBlock("svg",{viewBox:"0 0 100 100",style:o.normalizeStyle(`max-width:100%; overflow: visible; padding: 0 24px;background:${a.tableConfig.style.chart.layout.backgroundColor}`),class:"vue-ui-table-donut-chart"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.currentDonut,(i,s)=>(o.openBlock(),o.createElementBlock("path",{key:`arc_${s}`,d:i.path,stroke:`${i.color}CC`,"stroke-width":20,fill:"none"},null,8,SM))),128)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.currentDonut,(i,s)=>(o.openBlock(),o.createElementBlock("foreignObject",{key:`text_marker_${s}`,x:a.calcDonutMarkerLabelPositionX(i)-15,y:i.center.endY-15,height:"30",width:"30",style:{overflow:"visible",display:"flex","align-items":"center","justify-content":"center"}},[a.isArcBigEnough(i)?(o.openBlock(),o.createElementBlock("div",{key:0,class:"vue-ui-table-donut-label",style:o.normalizeStyle(`color:${a.tableConfig.style.chart.layout.labels.color}`)},[o.createElementVNode("b",null,o.toDisplayString(a.displayArcPercentage(i,A.currentDonut)),1),o.createElementVNode("span",kM,o.toDisplayString(i.name),1)],4)):o.createCommentVNode("",!0)],8,_M))),128)),o.createElementVNode("text",{x:50,y:42,"text-anchor":"middle","font-size":"6",fill:a.tableConfig.style.chart.layout.labels.color},o.toDisplayString(a.tableConfig.translations.total),9,TM),o.createElementVNode("text",{x:50,y:48,"text-anchor":"middle","font-size":"4",fill:a.tableConfig.style.chart.layout.labels.color},o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].prefix)+" "+o.toDisplayString(a.donutHollowLabels.total)+" "+o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].isPercentage?"%":"")+" "+o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].suffix),9,NM),o.createElementVNode("text",{x:50,y:56,"text-anchor":"middle","font-size":"6",fill:a.tableConfig.style.chart.layout.labels.color},o.toDisplayString(a.tableConfig.translations.average),9,LM),o.createElementVNode("text",{x:50,y:62,"text-anchor":"middle","font-size":"4",fill:a.tableConfig.style.chart.layout.labels.color},o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].prefix)+" "+o.toDisplayString(a.donutHollowLabels.average)+" "+o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].isPercentage?"%":"")+" "+o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].suffix),9,UM)],4)),o.createElementVNode("div",IM,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.currentDonut.filter(i=>i.value>0),(i,s)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-table-donut-legend-item",key:`donut_legend_${s}`,style:o.normalizeStyle(`color:${a.tableConfig.style.chart.layout.labels.color}`)},[o.createElementVNode("span",{style:o.normalizeStyle(`color:${i.color}`)},"●",4),o.createElementVNode("span",null,o.toDisplayString(i.name)+" : ",1),o.createElementVNode("b",null,o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].prefix)+" "+o.toDisplayString(a.getDonutLegendValue(i.absoluteValue))+" "+o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].isPercentage?"%":"")+" "+o.toDisplayString(r.dataset.header[A.currentSelectionSpan.col].suffix),1),o.createElementVNode("span",null,"("+o.toDisplayString((i.proportion*100).toFixed(1))+"%)",1)],4))),128))])],64)):o.createCommentVNode("",!0)],512)],4)):o.createCommentVNode("",!0)],4)}const DM=Ii(h7,[["render",QM],["__scopeId","data-v-80d709a0"]]),Pne="",OM=t=>(o.pushScopeId("data-v-2bfc0993"),t=t(),o.popScopeId(),t),PM=["id"],MM={class:"vue-ui-donut-user-option-item"},RM=["id","name"],HM=["for"],VM={class:"vue-ui-donut-user-option-item"},$M=["id","name"],zM=["for"],KM={class:"vue-ui-donut-user-option-item"},GM=["id","name"],jM=["for"],WM=["disabled"],XM=["stroke"],qM=[o.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-2bfc0993></path><path d="M18 16v.01" data-v-2bfc0993></path><path d="M6 16v.01" data-v-2bfc0993></path><path d="M12 5v.01" data-v-2bfc0993></path><path d="M12 12v.01" data-v-2bfc0993></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-2bfc0993></path>',6)],YM={key:1},JM=["viewBox"],ZM=["id"],eR=["stop-color"],tR=["stop-color"],rR=["stop-color"],nR={key:0},AR=["font-size","fill","x"],aR=["font-size","fill","x","y"],iR=["d","stroke","stroke-width"],oR=["cx","cy","fill"],sR=["d","stroke","stroke-width","onMouseenter","onClick"],lR=["cx","cy","r","fill"],cR=["x","y","fill","font-size"],uR=["x","y","fill","font-size"],hR=["x","y","fill","font-size"],fR=["x","y","fill","font-size"],dR=["x","y","fill","font-size"],gR=["x","y","fill","font-size"],pR=["y"],mR=["onClick"],vR=["onClick"],yR={key:0},wR=["innerHTML"],BR={key:0},xR={key:0},bR=[OM(()=>o.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),o.createElementVNode("path",{d:"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2"})],-1))],CR={style:{"max-width":"200px margin:0 auto"}},ER=Ii({__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(t,{expose:e,emit:r}){const n=t,A=o.ref(`vue-ui-donut-${Math.random()}`),a=o.ref({style:{fontFamily:"inherit",chart:{useGradient:!0,gradientIntensity:40,backgroundColor:"#FFFFFF",color:"#2D353C",layout:{useDiv:!1,labels:{dataLabels:{show:!0,hideUnderValue:3},percentage:{color:"#2D353C",bold:!0,fontSize:18},name:{color:"#2D353C",bold:!1,fontSize:14},hollow:{total:{show:!0,bold:!1,fontSize:18,color:"#AAAAAA",text:"Total",offsetY:0,value:{color:"#2D353C",fontSize:18,bold:!0,suffix:"",prefix:"",offsetY:0,rounding:0}},average:{show:!0,bold:!1,fontSize:18,color:"#AAAAAA",text:"Average",offsetY:0,value:{color:"#2D353C",fontSize:18,bold:!0,suffix:"",prefix:"",offsetY:0,rounding:0}}}},donut:{strokeWidth:64}},legend:{backgroundColor:"#FFFFFF",color:"#2D353C",show:!0,fontSize:16,bold:!1,roundingValue:0,roundingPercentage:0},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},tooltip:{show:!0,color:"#2D353C",backgroundColor:"#FFFFFF",fontSize:14,showValue:!0,showPercentage:!0,roundingValue:0,roundingPercentage:0}}},userOptions:{show:!0,title:"options",labels:{dataLabels:"Show datalabels",useDiv:"Title & legend inside",showTable:"Show table"}},translations:{total:"Total",average:"Average"},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0}}}),i=o.ref(!1),s=o.ref(null),l=o.ref(null),u=o.ref(null),c=o.ref({x:0,y:0}),g=o.ref(!1),p=o.ref(""),d=o.ref(null);o.onMounted(()=>{document.addEventListener("mousemove",y)}),o.onBeforeUnmount(()=>{document.removeEventListener("mousemove",y)});function y(_){c.value.x=_.clientX,c.value.y=_.clientY}const v=o.computed(()=>{let _=0,E=48;if(l.value&&s.value){const{width:B,height:S}=l.value.getBoundingClientRect(),R=s.value.getBoundingClientRect();c.value.x+B/2>R.right?_=-B:c.value.x-B/2<R.left?_=0:_=-B/2,c.value.y+S>R.bottom&&(E=-S-48)}return{top:c.value.y+E,left:c.value.x+_}}),h=o.computed(()=>Object.keys(n.config||{}).length?ja({defaultConfig:a.value,userConfig:n.config}):a.value),x=o.ref({dataLabels:{show:h.value.style.chart.layout.labels.dataLabels.show},inside:h.value.style.chart.layout.useDiv,showTable:h.value.table.show}),C=o.computed(()=>({height:x.value.inside||i.value?512:360,width:512})),T=o.ref([]);function D(_){T.value.includes(_)?T.value=T.value.filter(E=>E!==_):T.value.push(_),r("selectLegend",U.value.map(E=>({name:E.name,color:E.color,value:E.value})))}const Y=o.computed(()=>n.dataset.map((_,E)=>({name:_.name,color:_.color||Ht[E]||Ht[E%Ht.length],value:_.values.reduce((B,S)=>B+S,0),absoluteValues:_.values})).sort((_,E)=>E.value-_.value));function W(){return Y.value.map(_=>({name:_.name,color:_.color,value:_.value}))}e({getData:W});const U=o.computed(()=>n.dataset.map((_,E)=>({name:_.name,color:_.color||Ht[E]||Ht[E%Ht.length],value:_.values.reduce((B,S)=>B+S,0),absoluteValues:_.values})).sort((_,E)=>E.value-_.value).filter((_,E)=>!T.value.includes(E))),I=o.computed(()=>n.dataset.map((_,E)=>({name:_.name,color:_.color||Ht[E]||Ht[E%Ht.length],value:_.values.reduce((B,S)=>B+S,0)})).sort((_,E)=>E.value-_.value)),O=o.computed(()=>zh({series:U.value},C.value.width/2,C.value.height/2,100,100));function re(_){return _.center.endX+N(_,256)}function N(_,E){return _.center.endX-E>=0?30:-30}function L(_){return _.proportion*100>h.value.style.chart.layout.labels.dataLabels.hideUnderValue}function G(_,E){return isNaN(_.value/Z(E))?0:(_.value/Z(E)*100).toFixed(0)+"%"}function Z(_){return[..._].map(E=>E.value).reduce((E,B)=>E+B,0)}const ce=o.ref(["00","03","05","08","0A","0D","0F","12","14","17","1A","1C","1F","21","24","26","29","2B","2E","30","33","36","38","3B","3D","40","42","45","47","4A","4D","4F","52","54","57","59","5C","5E","61","63","66","69","6B","6E","70","73","75","78","7A","7D","80","82","85","87","8A","8C","8F","91","94","96","99","9C","9E","A1","A3","A6","A8","AB","AD","B0","B3","B5","B8","BA","BD","BF","C2","C4","C7","C9","CC","CF","D1","D4","D6","D9","DB","DE","E0","E3","E6","E8","EB","ED","F0","F2","F5","F7","FA","FC","FF"]),le=o.computed(()=>U.value.map(_=>_.value).reduce((_,E)=>_+E,0)),he=o.computed(()=>le.value/U.value.length);function fe(){u.value&&u.value.removeAttribute("open")}function pe(_,E,B=!0){g.value=B,d.value=E;let S="";S+=`<div style="width:100%;text-align:center;border-bottom:1px solid #ccc;padding-bottom:6px;margin-bottom:3px;">${_.name}</div>`,S+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><span style="color:${_.color};font-size:${h.value.style.chart.tooltip.fontSize*1.6}px;">●</span>`,h.value.style.chart.tooltip.showValue&&(S+=`<b>${_.value.toFixed(h.value.style.chart.tooltip.roundingValue)}</b>`),h.value.style.chart.tooltip.showPercentage&&(h.value.style.chart.tooltip.showValue?S+=`<span>(${(_.proportion*100).toFixed(h.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:S+=`<b>${(_.proportion*100).toFixed(h.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),p.value=`<div>${S}</div>`}function me(){i.value=!0,uo({domElement:document.getElementById(`donut__${A.value}`),fileName:h.value.style.chart.title.text||"vue-ui-donut"}).finally(()=>{i.value=!1})}const Le=o.computed(()=>{const _=U.value.map(B=>({name:B.name,color:B.color})),E=U.value.map(B=>B.value);return{head:_,body:E}});function F(){o.nextTick(()=>{const _=Le.value.head.map((ue,Te)=>[[ue.name],[Le.value.body[Te]],[isNaN(Le.value.body[Te]/le.value)?"-":Le.value.body[Te]/le.value*100]]),E=[[h.value.style.chart.title.text],[h.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(_);function B(ue){let Te=new ArrayBuffer(ue.length),Ne=new Uint8Array(Te);for(let Me=0;Me<ue.length;Me++)Ne[Me]=ue.charCodeAt(Me)&255;return Te}const S=Rr.book_new(),R=Rr.aoa_to_sheet(E);Rr.book_append_sheet(S,R,"Sheet1");const Q=Ui(S,{bookType:"xlsx",type:"binary"}),J=new Blob([B(Q)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),H=document.createElement("a");H.href=window.URL.createObjectURL(J),H.download=`${h.value.style.chart.title.text.replaceAll(" ","_")||"vue-ui-donut"}.xlsx`,H.click(),window.URL.revokeObjectURL(H.href)})}return(_,E)=>(o.openBlock(),o.createElementBlock("div",{ref:"donutChart",class:"vue-ui-donut",style:o.normalizeStyle(`font-family:${h.value.style.fontFamily};width:100%; text-align:center`),id:`donut__${A.value}`},[(!x.value.inside||i.value)&&h.value.style.chart.title.text?(o.openBlock(),o.createElementBlock("div",{key:0,style:o.normalizeStyle(`width:100%;background:${h.value.style.chart.backgroundColor}`)},[o.createElementVNode("div",{style:o.normalizeStyle(`width:100%;text-align:center;color:${h.value.style.chart.title.color};font-size:${h.value.style.chart.title.fontSize}px;font-weight:${h.value.style.chart.title.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.text),5),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("div",{key:0,style:o.normalizeStyle(`width:100%;text-align:center;color:${h.value.style.chart.title.subtitle.color};font-size:${h.value.style.chart.title.subtitle.fontSize}px;font-weight:${h.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.subtitle.text),5)):o.createCommentVNode("",!0)],4)):o.createCommentVNode("",!0),h.value.userOptions.show?(o.openBlock(),o.createElementBlock("details",{key:1,class:"vue-ui-donut-user-options",style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:u},[o.createElementVNode("summary",{style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)},o.toDisplayString(h.value.userOptions.title),5),o.createElementVNode("div",{class:"vue-ui-donut-user-options-items",style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)},[o.createElementVNode("div",MM,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-datalabels_${A.value}`,name:`vue-ui-donut-option-datalabels_${A.value}`,"onUpdate:modelValue":E[0]||(E[0]=B=>x.value.dataLabels.show=B)},null,8,RM),[[o.vModelCheckbox,x.value.dataLabels.show]]),o.createElementVNode("label",{for:`vue-ui-donut-option-datalabels_${A.value}`},o.toDisplayString(h.value.userOptions.labels.dataLabels),9,HM)]),o.createElementVNode("div",VM,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-title_${A.value}`,name:`vue-ui-donut-option-title_${A.value}`,"onUpdate:modelValue":E[1]||(E[1]=B=>x.value.inside=B)},null,8,$M),[[o.vModelCheckbox,x.value.inside]]),o.createElementVNode("label",{for:`vue-ui-donut-option-title_${A.value}`},o.toDisplayString(h.value.userOptions.labels.useDiv),9,zM)]),o.createElementVNode("div",KM,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-table_${A.value}`,name:`vue-ui-donut-option-table_${A.value}`,"onUpdate:modelValue":E[2]||(E[2]=B=>x.value.showTable=B)},null,8,GM),[[o.vModelCheckbox,x.value.showTable]]),o.createElementVNode("label",{for:`vue-ui-donut-option-table_${A.value}`},o.toDisplayString(h.value.userOptions.labels.showTable),9,jM)]),o.createElementVNode("button",{class:"vue-ui-donut-button",onClick:me,disabled:i.value,style:o.normalizeStyle([{"margin-top":"12px"},`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`])},[i.value?(o.openBlock(),o.createElementBlock("svg",{key:0,class:"vue-ui-donut-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:h.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},qM,8,XM)):(o.openBlock(),o.createElementBlock("span",YM,"PDF"))],12,WM),o.createElementVNode("button",{class:"vue-ui-donut-button",onClick:F,style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)}," XLSX ",4)],4)],4)):o.createCommentVNode("",!0),(o.openBlock(),o.createElementBlock("svg",{viewBox:`0 0 ${C.value.width} ${C.value.height}`,style:o.normalizeStyle(`max-width:100%; overflow: visible; background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`),onClick:fe},[o.createElementVNode("defs",null,[h.value.style.chart.useGradient?(o.openBlock(),o.createElementBlock("radialGradient",{key:0,id:`gradient_${A.value}`},[o.createElementVNode("stop",{offset:"0%","stop-color":`${o.unref(ex)(h.value.style.chart.backgroundColor)}00`},null,8,eR),o.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+ce.value[h.value.style.chart.gradientIntensity]},null,8,tR),o.createElementVNode("stop",{offset:"100%","stop-color":`${o.unref(ex)(h.value.style.chart.backgroundColor)}00`},null,8,rR)],8,ZM)):o.createCommentVNode("",!0)]),h.value.style.chart.title.text&&x.value.inside&&!i.value?(o.openBlock(),o.createElementBlock("g",nR,[o.createElementVNode("text",{"font-size":h.value.style.chart.title.fontSize,fill:h.value.style.chart.title.color,x:C.value.width/2,y:48,"text-anchor":"middle",style:o.normalizeStyle(`font-weight:${h.value.style.chart.title.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.text),13,AR),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("text",{key:0,"font-size":h.value.style.chart.title.subtitle.fontSize,fill:h.value.style.chart.title.subtitle.color,x:C.value.width/2,y:48+h.value.style.chart.title.fontSize,"text-anchor":"middle",style:o.normalizeStyle(`font-weight:${h.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.subtitle.text),13,aR)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(O.value,(B,S)=>(o.openBlock(),o.createElementBlock("path",{d:B.path,stroke:`${B.color}CC`,"stroke-width":a.value.style.chart.layout.donut.strokeWidth,fill:"none"},null,8,iR))),256)),h.value.style.chart.useGradient?(o.openBlock(),o.createElementBlock("circle",{key:1,cx:C.value.width/2,cy:C.value.height/2,r:136,fill:`url(#gradient_${A.value})`},null,8,oR)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(O.value,(B,S)=>(o.openBlock(),o.createElementBlock("path",{d:B.path,stroke:d.value===S?"rgba(0,0,0,0.1)":"transparent","stroke-width":a.value.style.chart.layout.donut.strokeWidth,fill:"none",onMouseenter:R=>pe(B,S,!0),onMouseleave:E[3]||(E[3]=R=>{g.value=!1,d.value=null}),onClick:R=>D(S)},null,40,sR))),256)),o.createElementVNode("circle",{cx:C.value.width/2,cy:C.value.height/2,r:C.value.width-400-h.value.style.chart.layout.donut.strokeWidth/2,fill:h.value.style.chart.backgroundColor},null,8,lR),h.value.style.chart.layout.labels.hollow.total.show?(o.openBlock(),o.createElementBlock("text",{key:2,"text-anchor":"middle",x:C.value.width/2,y:C.value.height/2-(h.value.style.chart.layout.labels.hollow.average.show?h.value.style.chart.layout.labels.hollow.total.fontSize:0)+h.value.style.chart.layout.labels.hollow.total.offsetY,fill:h.value.style.chart.layout.labels.hollow.total.color,"font-size":h.value.style.chart.layout.labels.hollow.total.fontSize,style:o.normalizeStyle(`font-weight:${h.value.style.chart.layout.labels.hollow.total.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.layout.labels.hollow.total.text),13,cR)):o.createCommentVNode("",!0),h.value.style.chart.layout.labels.hollow.total.show?(o.openBlock(),o.createElementBlock("text",{key:3,"text-anchor":"middle",x:C.value.width/2,y:C.value.height/2+h.value.style.chart.layout.labels.hollow.total.fontSize-(h.value.style.chart.layout.labels.hollow.average.show?h.value.style.chart.layout.labels.hollow.total.fontSize:0)+h.value.style.chart.layout.labels.hollow.total.value.offsetY,fill:h.value.style.chart.layout.labels.hollow.total.value.color,"font-size":h.value.style.chart.layout.labels.hollow.total.value.fontSize,style:o.normalizeStyle(`font-weight:${h.value.style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.layout.labels.hollow.total.value.prefix)+" "+o.toDisplayString(le.value.toFixed(h.value.style.chart.layout.labels.hollow.total.value.rounding))+" "+o.toDisplayString(h.value.style.chart.layout.labels.hollow.total.value.suffix),13,uR)):o.createCommentVNode("",!0),h.value.style.chart.layout.labels.hollow.average.show?(o.openBlock(),o.createElementBlock("text",{key:4,"text-anchor":"middle",x:C.value.width/2,y:C.value.height/2+(h.value.style.chart.layout.labels.hollow.total.show?h.value.style.chart.layout.labels.hollow.average.fontSize:0)+h.value.style.chart.layout.labels.hollow.average.offsetY,fill:h.value.style.chart.layout.labels.hollow.average.color,"font-size":h.value.style.chart.layout.labels.hollow.average.fontSize,style:o.normalizeStyle(`font-weight:${h.value.style.chart.layout.labels.hollow.average.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.layout.labels.hollow.average.text),13,hR)):o.createCommentVNode("",!0),h.value.style.chart.layout.labels.hollow.average.show?(o.openBlock(),o.createElementBlock("text",{key:5,"text-anchor":"middle",x:C.value.width/2,y:C.value.height/2+(h.value.style.chart.layout.labels.hollow.total.show?h.value.style.chart.layout.labels.hollow.average.fontSize:0)+h.value.style.chart.layout.labels.hollow.average.fontSize+h.value.style.chart.layout.labels.hollow.average.value.offsetY,fill:h.value.style.chart.layout.labels.hollow.average.value.color,"font-size":h.value.style.chart.layout.labels.hollow.average.value.fontSize,style:o.normalizeStyle(`font-weight:${h.value.style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.layout.labels.hollow.average.value.prefix)+" "+o.toDisplayString(isNaN(he.value.toFixed(h.value.style.chart.layout.labels.hollow.average.value.rounding))?"-":he.value.toFixed(h.value.style.chart.layout.labels.hollow.average.value.rounding))+" "+o.toDisplayString(h.value.style.chart.layout.labels.hollow.average.value.suffix),13,fR)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(O.value,(B,S)=>(o.openBlock(),o.createElementBlock("g",null,[L(B)&&x.value.dataLabels.show?(o.openBlock(),o.createElementBlock("text",{key:0,"text-anchor":"middle",x:re(B),y:B.center.endY-h.value.style.chart.layout.labels.percentage.fontSize/2,fill:h.value.style.chart.layout.labels.percentage.color,"font-size":h.value.style.chart.layout.labels.percentage.fontSize,style:o.normalizeStyle(`font-weight:${h.value.style.chart.layout.labels.percentage.bold?"bold":""}`)},o.toDisplayString(G(B,O.value)),13,dR)):o.createCommentVNode("",!0),L(B)&&x.value.dataLabels.show?(o.openBlock(),o.createElementBlock("text",{key:1,"text-anchor":"middle",x:re(B),y:B.center.endY+h.value.style.chart.layout.labels.percentage.fontSize/2,fill:h.value.style.chart.layout.labels.name.color,"font-size":h.value.style.chart.layout.labels.name.fontSize,style:o.normalizeStyle(`font-weight:${h.value.style.chart.layout.labels.name.bold?"bold":""}`)},o.toDisplayString(B.name),13,gR)):o.createCommentVNode("",!0)]))),256)),h.value.style.chart.legend.show&&x.value.inside&&!i.value?(o.openBlock(),o.createElementBlock("foreignObject",{key:6,x:0,y:C.value.height/2+150,width:"100%",height:"100",style:{overflow:"visible"}},[o.createElementVNode("div",{class:"vue-ui-donut-legend",style:o.normalizeStyle(`background:transparent;color:${h.value.style.chart.legend.color};font-size:${h.value.style.chart.legend.fontSize}px;font-weight:${h.value.style.chart.legend.bold?"bold":""}`)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(I.value,(B,S)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-donut-legend-item",onClick:R=>D(S),style:o.normalizeStyle(`opacity:${T.value.includes(S)?.5:1}`)},[o.createElementVNode("span",{style:o.normalizeStyle(`color:${B.color};font-size:${h.value.style.chart.legend.fontSize*1.6}px`)},"●",4),o.createElementVNode("span",null,o.toDisplayString(B.name)+" : ",1),o.createElementVNode("span",null,o.toDisplayString(B.value),1),o.createElementVNode("span",null,"("+o.toDisplayString(isNaN(B.value/le.value)?"-":(B.value/le.value*100).toFixed(h.value.style.chart.legend.roundingPercentage))+"%)",1)],12,mR))),256))],4)],8,pR)):o.createCommentVNode("",!0)],12,JM)),h.value.style.chart.legend.show&&(!x.value.inside||i.value)?(o.openBlock(),o.createElementBlock("div",{key:2,class:"vue-ui-donut-legend",style:o.normalizeStyle(`background:${h.value.style.chart.legend.backgroundColor};color:${h.value.style.chart.legend.color};font-size:${h.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${h.value.style.chart.legend.bold?"bold":""}`),onClick:fe},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(I.value,(B,S)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-donut-legend-item",onClick:R=>D(S),style:o.normalizeStyle(`opacity:${T.value.includes(S)?.5:1}`)},[o.createElementVNode("span",{style:o.normalizeStyle(`color:${B.color};font-size:${h.value.style.chart.legend.fontSize*1.6}px`)},"●",4),o.createElementVNode("span",null,o.toDisplayString(B.name)+" : ",1),o.createElementVNode("span",null,o.toDisplayString(B.value.toFixed(h.value.style.chart.legend.roundingValue)),1),T.value.includes(S)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",yR,"("+o.toDisplayString(isNaN(B.value/le.value)?"-":(B.value/le.value*100).toFixed(h.value.style.chart.legend.roundingPercentage))+"%)",1))],12,vR))),256))],4)):o.createCommentVNode("",!0),h.value.style.chart.tooltip.show&&g.value?(o.openBlock(),o.createElementBlock("div",{key:3,class:"vue-ui-donut-tooltip",ref_key:"tooltip",ref:l,style:o.normalizeStyle(`top:${v.value.top}px;left:${v.value.left}px;background:${h.value.style.chart.tooltip.backgroundColor};color:${h.value.style.chart.tooltip.color}`),innerHTML:p.value},null,12,wR)):o.createCommentVNode("",!0),x.value.showTable?(o.openBlock(),o.createElementBlock("div",{key:4,onClick:fe,class:"vue-ui-donut-table",style:o.normalizeStyle(`width:100%;margin-top:${x.value.inside?"48px":""}`)},[o.createElementVNode("table",null,[o.createElementVNode("thead",null,[h.value.style.chart.title.text?(o.openBlock(),o.createElementBlock("tr",BR,[o.createElementVNode("th",{colspan:"3",style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline}`)},[o.createElementVNode("span",null,o.toDisplayString(h.value.style.chart.title.text),1),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("span",xR," : "+o.toDisplayString(h.value.style.chart.title.subtitle.text),1)):o.createCommentVNode("",!0)],4)])):o.createCommentVNode("",!0),o.createElementVNode("tr",null,[o.createElementVNode("th",{align:"right",style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline};padding-right:6px`)},bR,4),o.createElementVNode("th",{style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline};text-align:right;padding-right:6px`)},o.toDisplayString(le.value.toFixed(h.value.table.td.roundingValue)),5),o.createElementVNode("th",{style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline};text-align:right;padding-right:6px`)}," 100% ",4)])]),o.createElementVNode("tbody",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Le.value.head,(B,S)=>(o.openBlock(),o.createElementBlock("tr",null,[o.createElementVNode("td",{style:o.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},[o.createElementVNode("div",CR,[o.createElementVNode("span",{style:o.normalizeStyle(`color:${B.color};margin-right:6px;`)},"●",4),o.createElementVNode("span",null,o.toDisplayString(B.name),1)])],4),o.createElementVNode("td",{style:o.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},o.toDisplayString(Le.value.body[S].toFixed(h.value.table.td.roundingValue)),5),o.createElementVNode("td",{style:o.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},o.toDisplayString(isNaN(Le.value.body[S]/le.value)?"-":(Le.value.body[S]/le.value*100).toFixed(h.value.table.td.roundingPercentage))+"% ",5)]))),256))])])],4)):o.createCommentVNode("",!0)],12,PM))}},[["__scopeId","data-v-2bfc0993"]]),Vne="",FR=t=>(o.pushScopeId("data-v-b5e5745f"),t=t(),o.popScopeId(),t),SR=["id"],_R={class:"vue-ui-waffle-user-option-item"},kR=["id","name"],TR=["for"],NR={class:"vue-ui-waffle-user-option-item"},LR=["id","name"],UR=["for"],IR=["disabled"],QR=["stroke"],DR=[o.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-b5e5745f></path><path d="M18 16v.01" data-v-b5e5745f></path><path d="M6 16v.01" data-v-b5e5745f></path><path d="M12 5v.01" data-v-b5e5745f></path><path d="M12 12v.01" data-v-b5e5745f></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-b5e5745f></path>',6)],OR={key:1},PR=["viewBox"],MR=["id"],RR=["stop-color"],HR=["stop-color"],VR={key:0},$R=["font-size","fill","x","y"],zR=["font-size","fill","x","y"],KR=["rx","x","y","height","width","stroke","stroke-width"],GR=["onMouseover","rx","x","y","height","width","fill","stroke","stroke-width"],jR={key:1,x:0,y:512+64,width:"100%",height:"100",style:{overflow:"visible"}},WR=["onClick"],XR={key:0},qR=["onClick"],YR={key:0},JR=["innerHTML"],ZR={key:0},eH={key:0},tH=[FR(()=>o.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),o.createElementVNode("path",{d:"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2"})],-1))],rH={style:{"max-width":"200px margin:0 auto"}},nH=Ii({__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(t,{expose:e,emit:r}){const n=t,A=o.ref(`vue-ui-waffle-${Math.random()}`),a=o.ref({style:{fontFamily:"inherit",chart:{backgroundColor:"#FFFFFF",color:"#2D353C",layout:{grid:{size:20,spaceBetween:2,vertical:!1},rect:{rounded:!0,rounding:2,stroke:"#2D353C",strokeWidth:1,useGradient:!0,gradientIntensity:40},useDiv:!0},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},tooltip:{show:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,showValue:!0,showPercentage:!0,roundingValue:0,roundingPercentage:0},legend:{show:!0,bold:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,roundingValue:0,roundingPercentage:0}}},userOptions:{show:!0,title:"options",labels:{useDiv:"Title & legend inside",showTable:"Show table"}},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0}}}),i=o.ref(!1),s=o.ref(null),l=o.ref(null),u=o.ref(null),c=o.ref({x:0,y:0}),g=o.ref(!1),p=o.ref(""),d=o.ref(null),y=o.computed(()=>{let B=0,S=48;if(l.value&&s.value){const{width:R,height:Q}=l.value.getBoundingClientRect(),J=s.value.getBoundingClientRect();c.value.x+R/2>J.right?B=-R:c.value.x-R/2<J.left?B=0:B=-R/2,c.value.y+Q>J.bottom&&(S=-Q-48)}return{top:c.value.y+S,left:c.value.x+B}});o.onMounted(()=>{document.addEventListener("mousemove",v)}),o.onBeforeUnmount(()=>{document.removeEventListener("mousemove",v)});function v(B){c.value.x=B.clientX,c.value.y=B.clientY}const h=o.computed(()=>Object.keys(n.config||{}).length?ja({defaultConfig:a.value,userConfig:n.config}):a.value),x=o.ref({inside:!h.value.style.chart.layout.useDiv,showTable:h.value.table.show}),C=o.computed(()=>({height:x.value.inside?704:512,width:512})),T=o.computed(()=>({top:x.value.inside?64:0,left:0,height:512,width:512})),D=o.computed(()=>(T.value.width-h.value.style.chart.layout.grid.size*h.value.style.chart.layout.grid.spaceBetween)/h.value.style.chart.layout.grid.size);function Y(B){const S=B.reduce((J,H)=>J+H,0),R=B.map(J=>Math.round(J/S*100)/100),Q=R.reduce((J,H)=>J+H,0);if(Q!==1){const J=R.length-1;R[J]+=1-Q,R[J]=Math.round(R[J]*100)/100}return R}const W=o.computed(()=>n.dataset.map((B,S)=>({...B,color:B.color||Ht[S]||Ht[S%Ht.length],uid:`serie_${S}`}))),U=o.computed(()=>{const B=W.value.filter((S,R)=>!me.value.includes(S.uid)).map((S,R)=>S.values.reduce((Q,J)=>Q+J));return Y(B)}),I=o.computed(()=>{const B=W.value.map((S,R)=>S.values.reduce((Q,J)=>Q+J));return Y(B)}),O=o.computed(()=>W.value.filter((B,S)=>!me.value.includes(B.uid)).map((B,S)=>({uid:B.uid,name:B.name,color:B.color,value:B.values.reduce((R,Q)=>R+Q,0),absoluteValues:B.values,proportion:U.value[S]*Math.pow(h.value.style.chart.layout.grid.size,2)})).sort((B,S)=>S.value-B.value)),re=o.computed(()=>W.value.map((B,S)=>({uid:B.uid,name:B.name,color:B.color,value:B.values.reduce((R,Q)=>R+Q,0),absoluteValues:B.values,proportion:I.value[S]*Math.pow(h.value.style.chart.layout.grid.size,2)})).sort((B,S)=>S.value-B.value));function N(){return re.value.map(B=>({name:B.name,color:B.color,value:B.value,proportion:B.proportion/Math.pow(h.value.style.chart.layout.grid.size,2)}))}e({getData:N});const L=o.computed(()=>O.value.map((B,S)=>{const R=S>0?O.value.filter((H,ue)=>ue<S).map(H=>H.proportion).reduce((H,ue)=>H+ue)+B.proportion-O.value[S-1].proportion:B.proportion-B.proportion,Q=R+B.proportion,J=[];for(let H=R;H<=Q;H+=1)J.push(H);return{...B,start:S>0?O.value.filter((H,ue)=>ue<S).map(H=>H.proportion).reduce((H,ue)=>H+ue)+B.proportion-O.value[S-1].proportion:B.proportion-B.proportion,rects:J}})),G=o.computed(()=>L.value.flatMap((B,S)=>B.rects.map((R,Q)=>({name:B.name,color:B.color,value:B.value,serieIndex:S,...B})))),Z=o.computed(()=>{const B=[];for(let S=0;S<h.value.style.chart.layout.grid.size;S+=1)for(let R=0;R<h.value.style.chart.layout.grid.size;R+=1)B.push({x:(h.value.style.chart.layout.grid.vertical?S:R)*(D.value+h.value.style.chart.layout.grid.spaceBetween),y:(h.value.style.chart.layout.grid.vertical?R:S)*(D.value+h.value.style.chart.layout.grid.spaceBetween)+T.value.top});return B}),ce=o.computed(()=>W.value.map((B,S)=>({name:B.name,color:B.color||Ht[S]||Ht[S%Ht.length],value:B.values.reduce((R,Q)=>R+Q,0),uid:B.uid})).sort((B,S)=>S.value-B.value)),le=o.ref(["00","03","05","08","0A","0D","0F","12","14","17","1A","1C","1F","21","24","26","29","2B","2E","30","33","36","38","3B","3D","40","42","45","47","4A","4D","4F","52","54","57","59","5C","5E","61","63","66","69","6B","6E","70","73","75","78","7A","7D","80","82","85","87","8A","8C","8F","91","94","96","99","9C","9E","A1","A3","A6","A8","AB","AD","B0","B3","B5","B8","BA","BD","BF","C2","C4","C7","C9","CC","CF","D1","D4","D6","D9","DB","DE","E0","E3","E6","E8","EB","ED","F0","F2","F5","F7","FA","FC","FF"]),he=o.computed(()=>O.value.map(B=>B.value).reduce((B,S)=>B+S,0));o.computed(()=>he.value/O.value.length);function fe(){u.value&&u.value.removeAttribute("open")}function pe(B){if(me.value.length===n.dataset.length)return;const S=G.value[B];g.value=!0,d.value=G.value[B].serieIndex;let R="";R+=`<div style="width:100%;text-align:center;border-bottom:1px solid #ccc;padding-bottom:6px;margin-bottom:3px;">${S.name}</div>`,R+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><span style="color:${S.color};font-size:${h.value.style.chart.tooltip.fontSize*1.6}px;">◼</span>`,h.value.style.chart.tooltip.showValue&&(R+=`<b>${S.value.toFixed(h.value.style.chart.tooltip.roundingValue)}</b>`),h.value.style.chart.tooltip.showPercentage&&(h.value.style.chart.tooltip.showValue?R+=`<span>(${(S.value/he.value*100).toFixed(h.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:R+=`<b>${(S.value/he.value*100).toFixed(h.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),p.value=R}const me=o.ref([]);function Le(B){me.value.includes(B)?me.value=me.value.filter(S=>S!==B):me.value.push(B),r("selectLegend",O.value.map(S=>({name:S.name,color:S.color,value:S.value,proportion:S.proportion/Math.pow(h.value.style.chart.layout.grid.size,2)})))}const F=o.computed(()=>{const B=O.value.map(R=>({name:R.name,color:R.color})),S=O.value.map(R=>R.value);return{head:B,body:S}});function _(){i.value=!0,uo({domElement:document.getElementById(`vue-ui-waffle_${A.value}`),fileName:h.value.style.chart.title.text||"vue-ui-waffle"}).finally(()=>{i.value=!1})}function E(){o.nextTick(()=>{const B=F.value.head.map((Ne,Me)=>[[Ne.name],[F.value.body[Me]],[isNaN(F.value.body[Me]/he.value)?"-":F.value.body[Me]/he.value*100]]),S=[[h.value.style.chart.title.text],[h.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(B);function R(Ne){let Me=new ArrayBuffer(Ne.length),_e=new Uint8Array(Me);for(let Ae=0;Ae<Ne.length;Ae++)_e[Ae]=Ne.charCodeAt(Ae)&255;return Me}const Q=Rr.book_new(),J=Rr.aoa_to_sheet(S);Rr.book_append_sheet(Q,J,"Sheet1");const H=Ui(Q,{bookType:"xlsx",type:"binary"}),ue=new Blob([R(H)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),Te=document.createElement("a");Te.href=window.URL.createObjectURL(ue),Te.download=`${h.value.style.chart.title.text.replaceAll(" ","_")||"vue-ui-waffle"}.xlsx`,Te.click(),window.URL.revokeObjectURL(Te.href)})}return(B,S)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-waffle",ref_key:"waffleChart",ref:s,id:`vue-ui-waffle_${A.value}`,style:o.normalizeStyle(`font-family:${h.value.style.fontFamily};width:100%; text-align:center`)},[(!x.value.inside||i.value)&&h.value.style.chart.title.text?(o.openBlock(),o.createElementBlock("div",{key:0,style:o.normalizeStyle(`width:100%;background:${h.value.style.chart.backgroundColor};padding-bottom:12px`)},[o.createElementVNode("div",{style:o.normalizeStyle(`width:100%;text-align:center;color:${h.value.style.chart.title.color};font-size:${h.value.style.chart.title.fontSize}px;font-weight:${h.value.style.chart.title.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.text),5),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("div",{key:0,style:o.normalizeStyle(`width:100%;text-align:center;color:${h.value.style.chart.title.subtitle.color};font-size:${h.value.style.chart.title.subtitle.fontSize}px;font-weight:${h.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.subtitle.text),5)):o.createCommentVNode("",!0)],4)):o.createCommentVNode("",!0),h.value.userOptions.show?(o.openBlock(),o.createElementBlock("details",{key:1,class:"vue-ui-waffle-user-options",style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:u},[o.createElementVNode("summary",{style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)},o.toDisplayString(h.value.userOptions.title),5),o.createElementVNode("div",{class:"vue-ui-waffle-user-options-items",style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)},[o.createElementVNode("div",_R,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-waffle-option-title_${A.value}`,name:`vue-ui-waffle-option-title_${A.value}`,"onUpdate:modelValue":S[0]||(S[0]=R=>x.value.inside=R)},null,8,kR),[[o.vModelCheckbox,x.value.inside]]),o.createElementVNode("label",{for:`vue-ui-waffle-option-title_${A.value}`},o.toDisplayString(h.value.userOptions.labels.useDiv),9,TR)]),o.createElementVNode("div",NR,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-waffle-option-table_${A.value}`,name:`vue-ui-waffle-option-table_${A.value}`,"onUpdate:modelValue":S[1]||(S[1]=R=>x.value.showTable=R)},null,8,LR),[[o.vModelCheckbox,x.value.showTable]]),o.createElementVNode("label",{for:`vue-ui-waffle-option-table_${A.value}`},o.toDisplayString(h.value.userOptions.labels.showTable),9,UR)]),o.createElementVNode("button",{class:"vue-ui-waffle-button",onClick:_,disabled:i.value,style:o.normalizeStyle([{"margin-top":"12px"},`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`])},[i.value?(o.openBlock(),o.createElementBlock("svg",{key:0,class:"vue-ui-waffle-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:h.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},DR,8,QR)):(o.openBlock(),o.createElementBlock("span",OR,"PDF"))],12,IR),o.createElementVNode("button",{class:"vue-ui-waffle-button",onClick:E,style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)}," XLSX ",4)],4)],4)):o.createCommentVNode("",!0),(o.openBlock(),o.createElementBlock("svg",{viewBox:`0 0 ${C.value.width} ${C.value.height}`,style:o.normalizeStyle(`max-width:100%;overflow:visible;background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`),onClick:fe},[o.createElementVNode("defs",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(G.value,(R,Q)=>(o.openBlock(),o.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${A.value}_${Q}`},[o.createElementVNode("stop",{offset:"0%","stop-color":`${o.unref(ks)(R.color,.05)}${le.value[100-h.value.style.chart.layout.rect.gradientIntensity]}`},null,8,RR),o.createElementVNode("stop",{offset:"100%","stop-color":R.color},null,8,HR)],8,MR))),256))]),h.value.style.chart.title.text&&x.value.inside&&!i.value?(o.openBlock(),o.createElementBlock("g",VR,[o.createElementVNode("text",{"font-size":h.value.style.chart.title.fontSize,fill:h.value.style.chart.title.color,x:C.value.width/2,y:h.value.style.chart.title.fontSize,"text-anchor":"middle",style:o.normalizeStyle(`font-weight:${h.value.style.chart.title.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.text),13,$R),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("text",{key:0,"font-size":h.value.style.chart.title.subtitle.fontSize,fill:h.value.style.chart.title.subtitle.color,x:C.value.width/2,y:h.value.style.chart.title.fontSize*2,"text-anchor":"middle",style:o.normalizeStyle(`font-weight:${h.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.subtitle.text),13,zR)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Z.value,(R,Q)=>(o.openBlock(),o.createElementBlock("rect",{rx:h.value.style.chart.layout.rect.rounded?h.value.style.chart.layout.rect.rounding:0,x:R.x,y:R.y,height:D.value,width:D.value,fill:"white",stroke:h.value.style.chart.layout.rect.stroke,"stroke-width":h.value.style.chart.layout.rect.strokeWidth},null,8,KR))),256)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Z.value,(R,Q)=>(o.openBlock(),o.createElementBlock("rect",{onMouseover:J=>pe(Q),onMouseleave:S[2]||(S[2]=J=>{g.value=!1,d.value=null}),rx:h.value.style.chart.layout.rect.rounded?h.value.style.chart.layout.rect.rounding:0,x:R.x,y:R.y,height:D.value,width:D.value,fill:h.value.style.chart.layout.rect.useGradient&&h.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${A.value}_${Q})`:G.value[Q].color,stroke:h.value.style.chart.layout.rect.stroke,"stroke-width":h.value.style.chart.layout.rect.strokeWidth},null,40,GR))),256)),h.value.style.chart.legend.show&&x.value.inside&&!i.value?(o.openBlock(),o.createElementBlock("foreignObject",jR,[o.createElementVNode("div",{class:"vue-ui-waffle-legend",style:o.normalizeStyle(`font-weight:${h.value.style.chart.legend.bold?"bold":""};background:${h.value.style.chart.legend.backgroundColor};color:${h.value.style.chart.legend.color};font-size:${h.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${h.value.style.chart.legend.bold?"bold":""}`),onClick:fe},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(ce.value,(R,Q)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-waffle-legend-item",onClick:J=>Le(R.uid),style:o.normalizeStyle(`opacity:${me.value.includes(R.uid)?.5:1}`)},[o.createElementVNode("span",{style:o.normalizeStyle(`color:${R.color};font-size:${h.value.style.chart.legend.fontSize*1.6}px`)},"◼",4),o.createElementVNode("span",null,o.toDisplayString(R.name)+" : ",1),o.createElementVNode("span",null,o.toDisplayString(R.value.toFixed(h.value.style.chart.legend.roundingValue)),1),me.value.includes(R.uid)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",XR,"("+o.toDisplayString(isNaN(R.value/he.value)?"-":(R.value/he.value*100).toFixed(h.value.style.chart.legend.roundingPercentage))+"%)",1))],12,WR))),256))],4)])):o.createCommentVNode("",!0)],12,PR)),h.value.style.chart.legend.show&&(!x.value.inside||i.value)?(o.openBlock(),o.createElementBlock("div",{key:2,class:"vue-ui-waffle-legend",style:o.normalizeStyle(`font-weight:${h.value.style.chart.legend.bold?"bold":""};background:${h.value.style.chart.legend.backgroundColor};color:${h.value.style.chart.legend.color};font-size:${h.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${h.value.style.chart.legend.bold?"bold":""}`),onClick:fe},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(ce.value,(R,Q)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-waffle-legend-item",onClick:J=>Le(R.uid),style:o.normalizeStyle(`opacity:${me.value.includes(R.uid)?.5:1}`)},[o.createElementVNode("span",{style:o.normalizeStyle(`color:${R.color};font-size:${h.value.style.chart.legend.fontSize*1.6}px`)},"◼",4),o.createElementVNode("span",null,o.toDisplayString(R.name)+" : ",1),o.createElementVNode("span",null,o.toDisplayString(R.value.toFixed(h.value.style.chart.legend.roundingValue)),1),me.value.includes(R.uid)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",YR,"("+o.toDisplayString(isNaN(R.value/he.value)?"-":(R.value/he.value*100).toFixed(h.value.style.chart.legend.roundingPercentage))+"%)",1))],12,qR))),256))],4)):o.createCommentVNode("",!0),h.value.style.chart.tooltip.show&&g.value&&me.value.length<n.dataset.length?(o.openBlock(),o.createElementBlock("div",{key:3,class:"vue-ui-waffle-tooltip",ref_key:"tooltip",ref:l,style:o.normalizeStyle(`top:${y.value.top}px;left:${y.value.left}px;background:${h.value.style.chart.tooltip.backgroundColor};color:${h.value.style.chart.tooltip.color}`),innerHTML:p.value},null,12,JR)):o.createCommentVNode("",!0),x.value.showTable?(o.openBlock(),o.createElementBlock("div",{key:4,onClick:fe,class:"vue-ui-waffle-table",style:o.normalizeStyle(`width:100%;margin-top:${x.value.inside?"48px":""}`)},[o.createElementVNode("table",null,[o.createElementVNode("thead",null,[h.value.style.chart.title.text?(o.openBlock(),o.createElementBlock("tr",ZR,[o.createElementVNode("th",{colspan:"3",style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline}`)},[o.createElementVNode("span",null,o.toDisplayString(h.value.style.chart.title.text),1),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("span",eH," : "+o.toDisplayString(h.value.style.chart.title.subtitle.text),1)):o.createCommentVNode("",!0)],4)])):o.createCommentVNode("",!0),o.createElementVNode("tr",null,[o.createElementVNode("th",{align:"right",style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline};padding-right:6px`)},tH,4),o.createElementVNode("th",{style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline};text-align:right;padding-right:6px`)},o.toDisplayString(he.value.toFixed(h.value.table.td.roundingValue)),5),o.createElementVNode("th",{style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline};text-align:right;padding-right:6px`)}," 100% ",4)])]),o.createElementVNode("tbody",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(F.value.head,(R,Q)=>(o.openBlock(),o.createElementBlock("tr",null,[o.createElementVNode("td",{style:o.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},[o.createElementVNode("div",rH,[o.createElementVNode("span",{style:o.normalizeStyle(`color:${R.color};margin-right:6px;`)},"◼",4),o.createElementVNode("span",null,o.toDisplayString(R.name),1)])],4),o.createElementVNode("td",{style:o.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},o.toDisplayString(F.value.body[Q].toFixed(h.value.table.td.roundingValue)),5),o.createElementVNode("td",{style:o.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},o.toDisplayString(isNaN(F.value.body[Q]/he.value)?"-":(F.value.body[Q]/he.value*100).toFixed(h.value.table.td.roundingPercentage))+"% ",5)]))),256))])])],4)):o.createCommentVNode("",!0)],12,SR))}},[["__scopeId","data-v-b5e5745f"]]),Gne="",AH=["id"],aH={class:"vue-ui-radar-user-option-item"},iH=["id","name"],oH=["for"],sH={class:"vue-ui-radar-user-option-item"},lH=["id","name"],cH=["for"],uH=["disabled"],hH=["stroke"],fH=[o.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-65624abe></path><path d="M18 16v.01" data-v-65624abe></path><path d="M6 16v.01" data-v-65624abe></path><path d="M12 5v.01" data-v-65624abe></path><path d="M12 12v.01" data-v-65624abe></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-65624abe></path>',6)],dH={key:1},gH=["viewBox"],pH=["id"],mH=["stop-color"],vH=["stop-color"],yH={key:0},wH=["font-size","fill","x","y"],BH=["font-size","fill","x","y"],xH={key:1},bH=["x1","y1","x2","y2","stroke","stroke-width"],CH={key:0},EH=["d","stroke","stroke-width"],FH=["d","stroke","stroke-width"],SH={key:2},_H=["x","y","text-anchor","font-size","fill","onMouseenter"],kH={key:0},TH=["d","stroke","stroke-width","fill"],NH={key:3},LH=["cx","cy","fill","r"],UH={key:4,x:0,y:340,width:"100%",height:"60",style:{overflow:"visible"}},IH=["onClick"],QH=["onClick"],DH=["innerHTML"],OH={key:0},PH=["colspan"],MH={key:0},RH=["colspan"],HH={style:{width:"100%"}},VH=Ii({__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(t,{expose:e,emit:r}){const n=t,A=o.ref(`vue-ui-radar-${Math.random()}`),a=o.ref({style:{fontFamily:"inherit",chart:{backgroundColor:"#FFFFFF",color:"#2D353C",layout:{useDiv:!0,plots:{show:!0,radius:2},outerPolygon:{stroke:"#CCCCCC",strokeWidth:1},dataPolygon:{strokeWidth:1,transparent:!1,opacity:20,useGradient:!0},grid:{show:!0,stroke:"#e1e5e8",strokeWidth:.5,graduations:5},labels:{dataLabels:{show:!0,fontSize:12,color:"#2D353C"}}},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},tooltip:{show:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,showValue:!0,showPercentage:!0,roundingValue:0,roundingPercentage:0},legend:{show:!0,bold:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,roundingPercentage:0}}},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0}},userOptions:{show:!0,title:"options",labels:{useDiv:"Title & legend inside",showTable:"Show table"}},translations:{target:"Target"}}),i=o.ref(!1),s=o.ref(null),l=o.ref(null),u=o.ref(null),c=o.ref({x:0,y:0}),g=o.ref(!1),p=o.ref(""),d=o.ref(["00","03","05","08","0A","0D","0F","12","14","17","1A","1C","1F","21","24","26","29","2B","2E","30","33","36","38","3B","3D","40","42","45","47","4A","4D","4F","52","54","57","59","5C","5E","61","63","66","69","6B","6E","70","73","75","78","7A","7D","80","82","85","87","8A","8C","8F","91","94","96","99","9C","9E","A1","A3","A6","A8","AB","AD","B0","B3","B5","B8","BA","BD","BF","C2","C4","C7","C9","CC","CF","D1","D4","D6","D9","DB","DE","E0","E3","E6","E8","EB","ED","F0","F2","F5","F7","FA","FC","FF"]);o.onMounted(()=>{document.addEventListener("mousemove",y)}),o.onBeforeUnmount(()=>{document.removeEventListener("mousemove",y)});function y(_){c.value.x=_.clientX,c.value.y=_.clientY}const v=o.computed(()=>{let _=0,E=48;if(l.value&&s.value){const{width:B,height:S}=l.value.getBoundingClientRect(),R=s.value.getBoundingClientRect();c.value.x+B/2>R.right?_=-B:c.value.x-B/2<R.left?_=0:_=-B/2,c.value.y+S>R.bottom&&(E=-S-48)}return{top:c.value.y+E,left:c.value.x+_}}),h=o.computed(()=>Object.keys(n.config||{}).length?ja({defaultConfig:a.value,userConfig:n.config}):a.value),x=o.ref({dataLabels:{show:h.value.style.chart.layout.labels.dataLabels.show},inside:!h.value.style.chart.layout.useDiv,showTable:h.value.table.show}),C=o.computed(()=>({height:x.value.inside?412:312,width:512})),T=o.ref([]);function D(_){T.value.includes(_)?T.value=T.value.filter(E=>E!==_):T.value.push(_),r("selectLegend",le.value.filter((E,B)=>!T.value.includes(B)).map(E=>({name:E.name,color:E.color,proportion:E.totalProportion})))}function Y(){return le.value.map(_=>({name:_.name,color:_.color,proportion:_.totalProportion}))}e({getData:Y});const W=o.computed(()=>n.dataset.categories.map((_,E)=>({name:_.name,categoryId:`radar_category_${A.value}_${E}`,color:_.color||Ht[E]||Ht[E%Ht.length]}))),U=o.computed(()=>n.dataset.series.map((_,E)=>({..._,color:_.color||Ht[E]||Ht[E%Ht.length],serieId:`radar_serie_${A.value}_${E}`}))),I=o.computed(()=>Math.max(...U.value.flatMap(_=>_.values))),O=o.computed(()=>U.value.length),re=o.computed(()=>Co({plot:{x:256,y:C.value.height/2},radius:128,sides:O.value,rotation:0})),N=o.computed(()=>{const _=[];for(let E=0;E<128;E+=128/h.value.style.chart.layout.grid.graduations)_.push(E);return _}),L=o.computed(()=>re.value.coordinates.map((_,E)=>{const B=U.value[E].values.map(S=>Z({centerX:C.value.width/2,centerY:C.value.height/2,apexX:_.x,apexY:_.y,proportion:S/(U.value[E].target||I.value)}));return{..._,...U.value[E],plots:B}}));function G({x:_,y:E}){let B="middle";return _=Math.round(_),E=Math.round(E),_>C.value.width/2&&(_+=12,B="start"),_<C.value.width/2&&(_-=12,B="end"),E>C.value.height/2&&(E+=20),E<C.value.height/2&&(E-=12),E===C.value.height/2&&(E+=4),{x:_,y:E,anchor:B}}function Z({centerX:_,centerY:E,apexX:B,apexY:S,proportion:R}){return{x:_+(B-_)*R,y:E+(S-E)*R}}function ce(_){let E="";return _.forEach(B=>{E+=`${B.x} ${B.y},`}),`M${E}Z`}const le=o.computed(()=>{const _=U.value.map((E,B)=>E.values.map(S=>S/(E.target||I.value)));return W.value.map((E,B)=>({...E,totalProportion:_.map(S=>S[B]).reduce((S,R)=>S+R,0)/U.value.length}))}),he=o.computed(()=>{const _=[{name:"",color:""},{name:h.value.translations.target,color:""},...le.value],E=n.dataset.series.map((B,S)=>[B.name,B.target,...B.values.flatMap(R=>[R?R.toFixed(h.value.table.td.roundingValue):"-",isNaN(R/B.target)?"":(R/B.target*100).toFixed(h.value.table.td.roundingPercentage)+"%"])]);return{head:_,body:E}}),fe=o.ref(null);function pe(_,E){fe.value=E,g.value=!0;let B="";B+=`<div style="width:100%;text-align:center;border-bottom:1px solid #ccc;padding-bottom:6px;margin-bottom:3px;">${_.name}</div>`;for(let S=0;S<_.values.length;S+=1)T.value.includes(S)||(B+=`<div style="display:flex;flex-wrap:wrap;align-items:center;gap:6px"><span style="color:${W.value[S].color}">●</span><span>${W.value[S].name}</span> : ${h.value.style.chart.tooltip.showValue?`<span>${_.values[S].toFixed(h.value.style.chart.tooltip.roundingValue)}</span>`:""} ${!h.value.style.chart.tooltip.showValue&&h.value.style.chart.tooltip.showPercentage?`<span>${(_.values[S]/_.target*100).toFixed(h.value.style.chart.tooltip.roundingPercentage)}%</span>`:h.value.style.chart.tooltip.showPercentage?`<span>(${(_.values[S]/_.target*100).toFixed(h.value.style.chart.tooltip.roundingPercentage)}%)</span>`:""}</div>`);p.value=B}function me(){i.value=!0,uo({domElement:document.getElementById(`vue-ui-radar_${A.value}`),fileName:h.value.style.chart.title.text||"vue-ui-radar"}).finally(()=>{i.value=!1})}function Le(){o.nextTick(()=>{const _=[[h.value.style.chart.title.text],[h.value.style.chart.title.subtitle.text],[""]],E=[[""],[h.value.translations.target],...le.value.flatMap(Ne=>[[Ne.name],["%"]])],B=n.dataset.series.map((Ne,Me)=>[Ne.name,Ne.target,...Ne.values.flatMap(_e=>[_e,isNaN(_e/Ne.target)?"":_e/Ne.target*100])]),S=_.concat([E]).concat(B);function R(Ne){let Me=new ArrayBuffer(Ne.length),_e=new Uint8Array(Me);for(let Ae=0;Ae<Ne.length;Ae++)_e[Ae]=Ne.charCodeAt(Ae)&255;return Me}const Q=Rr.book_new(),J=Rr.aoa_to_sheet(S);Rr.book_append_sheet(Q,J,"Sheet1");const H=Ui(Q,{bookType:"xlsx",type:"binary"}),ue=new Blob([R(H)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),Te=document.createElement("a");Te.href=window.URL.createObjectURL(ue),Te.download=`${h.value.style.chart.title.text.replaceAll(" ","_")||"vue-ui-radar"}.xlsx`,Te.click(),window.URL.revokeObjectURL(Te.href)})}function F(){u.value&&u.value.removeAttribute("open")}return(_,E)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-radar",ref_key:"radarChart",ref:s,id:`vue-ui-radar_${A.value}`,style:o.normalizeStyle(`font-family:${h.value.style.fontFamily};width:100%; text-align:center`)},[(!x.value.inside||i.value)&&h.value.style.chart.title.text?(o.openBlock(),o.createElementBlock("div",{key:0,style:o.normalizeStyle(`width:100%;background:${h.value.style.chart.backgroundColor};padding-bottom:12px`)},[o.createElementVNode("div",{style:o.normalizeStyle(`width:100%;text-align:center;color:${h.value.style.chart.title.color};font-size:${h.value.style.chart.title.fontSize}px;font-weight:${h.value.style.chart.title.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.text),5),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("div",{key:0,style:o.normalizeStyle(`width:100%;text-align:center;color:${h.value.style.chart.title.subtitle.color};font-size:${h.value.style.chart.title.subtitle.fontSize}px;font-weight:${h.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.subtitle.text),5)):o.createCommentVNode("",!0)],4)):o.createCommentVNode("",!0),h.value.userOptions.show?(o.openBlock(),o.createElementBlock("details",{key:1,class:"vue-ui-radar-user-options",style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:u},[o.createElementVNode("summary",{style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)},o.toDisplayString(h.value.userOptions.title),5),o.createElementVNode("div",{class:"vue-ui-radar-user-options-items",style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)},[o.createElementVNode("div",aH,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-radar-option-title_${A.value}`,name:`vue-ui-radar-option-title_${A.value}`,"onUpdate:modelValue":E[0]||(E[0]=B=>x.value.inside=B)},null,8,iH),[[o.vModelCheckbox,x.value.inside]]),o.createElementVNode("label",{for:`vue-ui-radar-option-title_${A.value}`},o.toDisplayString(h.value.userOptions.labels.useDiv),9,oH)]),o.createElementVNode("div",sH,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-radar-option-table_${A.value}`,name:`vue-ui-radar-option-table_${A.value}`,"onUpdate:modelValue":E[1]||(E[1]=B=>x.value.showTable=B)},null,8,lH),[[o.vModelCheckbox,x.value.showTable]]),o.createElementVNode("label",{for:`vue-ui-radar-option-table_${A.value}`},o.toDisplayString(h.value.userOptions.labels.showTable),9,cH)]),o.createElementVNode("button",{class:"vue-ui-radar-button",onClick:me,disabled:i.value,style:o.normalizeStyle([{"margin-top":"12px"},`color:${h.value.style.chart.color}`])},[i.value?(o.openBlock(),o.createElementBlock("svg",{key:0,class:"vue-ui-radar-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:h.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},fH,8,hH)):(o.openBlock(),o.createElementBlock("span",dH,"PDF"))],12,uH),o.createElementVNode("button",{class:"vue-ui-radar-button",onClick:Le,style:o.normalizeStyle(`color:${h.value.style.chart.color}`)}," XLSX ",4)],4)],4)):o.createCommentVNode("",!0),(o.openBlock(),o.createElementBlock("svg",{viewBox:`0 0 ${C.value.width} ${C.value.height}`,style:o.normalizeStyle(`max-width:100%;overflow:visible;background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`),onClick:F},[o.createElementVNode("defs",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(W.value,(B,S)=>(o.openBlock(),o.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${A.value}_${S}`},[o.createElementVNode("stop",{offset:"0%","stop-color":`${o.unref(ks)(B.color,.05)}${d.value[h.value.style.chart.layout.dataPolygon.opacity]}`},null,8,mH),o.createElementVNode("stop",{offset:"100%","stop-color":B.color+d.value[h.value.style.chart.layout.dataPolygon.opacity]},null,8,vH)],8,pH))),256))]),h.value.style.chart.title.text&&x.value.inside&&!i.value?(o.openBlock(),o.createElementBlock("g",yH,[o.createElementVNode("text",{"font-size":h.value.style.chart.title.fontSize,fill:h.value.style.chart.title.color,x:C.value.width/2,y:h.value.style.chart.title.fontSize,"text-anchor":"middle",style:o.normalizeStyle(`font-weight:${h.value.style.chart.title.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.text),13,wH),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("text",{key:0,"font-size":h.value.style.chart.title.subtitle.fontSize,fill:h.value.style.chart.title.subtitle.color,x:C.value.width/2,y:h.value.style.chart.title.fontSize*2,"text-anchor":"middle",style:o.normalizeStyle(`font-weight:${h.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.subtitle.text),13,BH)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),h.value.style.chart.layout.grid.show?(o.openBlock(),o.createElementBlock("g",xH,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(L.value,B=>(o.openBlock(),o.createElementBlock("line",{x1:C.value.width/2,y1:C.value.height/2,x2:B.x,y2:B.y,stroke:h.value.style.chart.layout.grid.stroke,"stroke-width":h.value.style.chart.layout.grid.strokeWidth},null,8,bH))),256)),h.value.style.chart.layout.grid.graduations>0?(o.openBlock(),o.createElementBlock("g",CH,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,B=>(o.openBlock(),o.createElementBlock("path",{d:o.unref(Co)({plot:{x:256,y:C.value.height/2},radius:B,sides:O.value,rotation:0}).path,fill:"none",stroke:h.value.style.chart.layout.grid.stroke,"stroke-width":h.value.style.chart.layout.grid.strokeWidth},null,8,EH))),256))])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),o.createElementVNode("path",{d:re.value.path,fill:"none",stroke:h.value.style.chart.layout.outerPolygon.stroke,"stroke-width":h.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,FH),h.value.style.chart.layout.labels.dataLabels.show?(o.openBlock(),o.createElementBlock("g",SH,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(L.value,(B,S)=>(o.openBlock(),o.createElementBlock("text",{x:G(B).x,y:G(B).y,"text-anchor":G(B).anchor,"font-size":h.value.style.chart.layout.labels.dataLabels.fontSize,fill:h.value.style.chart.layout.labels.dataLabels.color,onMouseenter:R=>pe(B,S),onMouseleave:E[2]||(E[2]=R=>{g.value=!1,fe.value=null})},o.toDisplayString(B.name),41,_H))),256))])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(W.value,(B,S)=>(o.openBlock(),o.createElementBlock("g",null,[T.value.includes(S)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("g",kH,[o.createElementVNode("path",{d:ce(L.value.map(R=>R.plots[S])),stroke:B.color,"stroke-width":h.value.style.chart.layout.dataPolygon.strokeWidth,fill:h.value.style.chart.layout.dataPolygon.transparent?"transparent":h.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${A.value}_${S})`:B.color+d.value[h.value.style.chart.layout.dataPolygon.opacity]},null,8,TH)]))]))),256)),h.value.style.chart.layout.plots.show?(o.openBlock(),o.createElementBlock("g",NH,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(L.value,(B,S)=>(o.openBlock(),o.createElementBlock("g",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(B.plots,(R,Q)=>(o.openBlock(),o.createElementBlock("circle",{cx:R.x,cy:R.y,fill:T.value.includes(Q)?"transparent":W.value[Q].color,r:fe.value!==null&&fe.value===S?h.value.style.chart.layout.plots.radius*1.6:h.value.style.chart.layout.plots.radius},null,8,LH))),256))]))),256))])):o.createCommentVNode("",!0),h.value.style.chart.legend.show&&x.value.inside&&!i.value?(o.openBlock(),o.createElementBlock("foreignObject",UH,[o.createElementVNode("div",{class:"vue-ui-radar-legend",style:o.normalizeStyle(`font-weight:${h.value.style.chart.legend.bold?"bold":""};color:${h.value.style.chart.legend.color};font-size:${h.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${h.value.style.chart.legend.bold?"bold":""}`),onClick:F},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(le.value,(B,S)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-radar-legend-item",onClick:R=>D(S),style:o.normalizeStyle(`opacity:${T.value.includes(S)?.5:1}`)},[o.createElementVNode("span",{style:o.normalizeStyle(`color:${B.color};font-size:${h.value.style.chart.legend.fontSize*1.6}px`)},"●",4),o.createElementVNode("span",null,o.toDisplayString(B.name)+" : ",1),o.createElementVNode("span",null,o.toDisplayString((B.totalProportion*100).toFixed(h.value.style.chart.legend.roundingPercentage))+"%",1)],12,IH))),256))],4)])):o.createCommentVNode("",!0)],12,gH)),h.value.style.chart.legend.show&&(!x.value.inside||i.value)?(o.openBlock(),o.createElementBlock("div",{key:2,class:"vue-ui-radar-legend",style:o.normalizeStyle(`font-weight:${h.value.style.chart.legend.bold?"bold":""};background:${h.value.style.chart.legend.backgroundColor};color:${h.value.style.chart.legend.color};font-size:${h.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${h.value.style.chart.legend.bold?"bold":""}`),onClick:F},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(le.value,(B,S)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-radar-legend-item",onClick:R=>D(S),style:o.normalizeStyle(`opacity:${T.value.includes(S)?.5:1}`)},[o.createElementVNode("span",{style:o.normalizeStyle(`color:${B.color};font-size:${h.value.style.chart.legend.fontSize*1.6}px`)},"●",4),o.createElementVNode("span",null,o.toDisplayString(B.name)+" : ",1),o.createElementVNode("span",null,o.toDisplayString((B.totalProportion*100).toFixed(h.value.style.chart.legend.roundingPercentage))+"%",1)],12,QH))),256))],4)):o.createCommentVNode("",!0),h.value.style.chart.tooltip.show&&g.value?(o.openBlock(),o.createElementBlock("div",{key:3,class:"vue-ui-radar-tooltip",ref_key:"tooltip",ref:l,style:o.normalizeStyle(`top:${v.value.top}px;left:${v.value.left}px;background:${h.value.style.chart.tooltip.backgroundColor};color:${h.value.style.chart.tooltip.color}`),innerHTML:p.value},null,12,DH)):o.createCommentVNode("",!0),x.value.showTable?(o.openBlock(),o.createElementBlock("div",{key:4,onClick:F,class:"vue-ui-radar-table",style:o.normalizeStyle(`width:100%;margin-top:${x.value.inside?"48px":""}`)},[o.createElementVNode("table",null,[o.createElementVNode("thead",null,[h.value.style.chart.title.text?(o.openBlock(),o.createElementBlock("tr",OH,[o.createElementVNode("th",{colspan:le.value.length+2+3,style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline}`)},[o.createElementVNode("span",null,o.toDisplayString(h.value.style.chart.title.text),1),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("span",MH," : "+o.toDisplayString(h.value.style.chart.title.subtitle.text),1)):o.createCommentVNode("",!0)],12,PH)])):o.createCommentVNode("",!0),o.createElementVNode("tr",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(he.value.head,B=>(o.openBlock(),o.createElementBlock("th",{colspan:B.color?2:1,style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline}`)},[o.createElementVNode("div",HH,[B.color?(o.openBlock(),o.createElementBlock("span",{key:0,style:o.normalizeStyle(`color:${B.color};margin-right:3px`)},"●",4)):o.createCommentVNode("",!0),o.createElementVNode("span",null,o.toDisplayString(B.name),1)])],12,RH))),256))])]),o.createElementVNode("tbody",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(he.value.body,B=>(o.openBlock(),o.createElementBlock("tr",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(B,S=>(o.openBlock(),o.createElementBlock("td",{style:o.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},o.toDisplayString(S),5))),256))]))),256))])])],4)):o.createCommentVNode("",!0)],12,AH))}},[["__scopeId","data-v-65624abe"]]),Xne="",$H=["id"],zH={class:"vue-ui-quadrant-user-option-item"},KH=["id","name"],GH=["for"],jH={class:"vue-ui-quadrant-user-option-item"},WH=["id","name"],XH=["for"],qH={class:"vue-ui-quadrant-user-option-item"},YH=["id","name"],JH=["for"],ZH=["disabled"],e9=["stroke"],t9=[o.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-585093d1></path><path d="M18 16v.01" data-v-585093d1></path><path d="M6 16v.01" data-v-585093d1></path><path d="M12 5v.01" data-v-585093d1></path><path d="M12 12v.01" data-v-585093d1></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-585093d1></path>',6)],r9={key:1},n9=["viewBox"],A9=["id"],a9=["stop-color"],i9=["stop-color"],o9={key:0},s9=["font-size","fill","x","y"],l9=["font-size","fill","x","y"],c9={key:1},u9=["fill","x","y","height","width","stroke-width","stroke","rx"],h9=["x1","y1","x2","y2","stroke","stroke-width"],f9=["x1","y1","x2","y2","stroke","stroke-width"],d9={key:2},g9=["points","fill"],p9=["points","fill"],m9=["points","fill"],v9=["points","fill"],y9={key:3},w9=["y","fill","font-size"],B9=["x","y","fill","font-size"],x9=["x","y","fill","font-size"],b9=["y","fill","font-size"],C9={key:4},E9=["x","y","font-size","fill"],F9=["x","y","font-size","fill"],S9=["x","y","font-size","fill"],_9=["font-size","fill"],k9=["font-size","fill"],T9=["font-size","fill"],N9={key:5},L9=["fill","points"],U9={key:0},I9=["cx","cy","r","fill","stroke","stroke-width","onMouseover","onClick"],Q9={key:1},D9=["d","fill","stroke","stroke-width","onMouseover","onClick"],O9={key:2},P9=["d","fill","stroke","stroke-width","onMouseover","onClick"],M9={key:3},R9=["d","fill","stroke","stroke-width","onMouseover","onClick"],H9={key:4},V9=["d","fill","stroke","stroke-width","onMouseover","onClick"],$9={key:5},z9=["d","fill","stroke","stroke-width","onMouseover","onClick"],K9={key:6},G9=["points","fill","stroke","stroke-width","onMouseover","onClick"],j9={key:6},W9=["x","y","font-size","fill"],X9=["y"],q9=["onClick"],Y9=["innerHTML"],J9=["onClick"],Z9=["innerHTML"],eV=["innerHTML"],tV={key:0},rV={key:0},nV={style:{width:"100%"}},AV=Ii({__name:"vue-ui-quadrant",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectPlot","selectSide","selectLegend"],setup(t,{expose:e,emit:r}){const n=t,A=o.ref(`vue-ui-quadrant-${Math.random()}`),a=o.ref({style:{fontFamily:"inherit",chart:{height:512,width:512,backgroundColor:"#FFFFFF",color:"#2D353C",layout:{useDiv:!0,labels:{quadrantLabels:{show:!0,tl:{text:"",color:"#2D353C",fontSize:16,bold:!0},tr:{text:"",color:"#2D353C",fontSize:16,bold:!0},br:{text:"",color:"#2D353C",fontSize:16,bold:!0},bl:{text:"",color:"#2D353C",fontSize:16,bold:!0}},plotLabels:{show:!0,fontSize:10,color:"#2D353C",offsetY:8},axisLabels:{show:!0,fontSize:14,color:{positive:"#2D353C",negative:"#2D353C"}}},grid:{stroke:"#e1e5e8",strokeWidth:1.5,showArrows:!0,graduations:{stroke:"#e1e5e8",strokeWidth:.5,show:!0,steps:5,fill:!0,color:"#E1E5E8",roundingForce:10},xAxis:{min:-100,max:100,auto:!0,name:""},yAxis:{min:-100,max:100,auto:!0,name:""}},plots:{radius:6,outline:!0,outlineColor:"#FFFFFF",outlineWidth:1},areas:{show:!0,opacity:40,useGradient:!0}},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},tooltip:{show:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,roundingValue:0},legend:{show:!0,bold:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14}}},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0}},userOptions:{show:!0,title:"options",labels:{useDiv:"Title & legend inside",showTable:"Show table",showPlotLabels:"Show plot labels"}},translations:{category:"Category",item:"Item",side:"Side"}}),i=o.ref(!1),s=o.ref(null),l=o.ref(null),u=o.ref(null),c=o.ref({x:0,y:0}),g=o.ref(!1),p=o.ref(""),d=o.ref(["00","03","05","08","0A","0D","0F","12","14","17","1A","1C","1F","21","24","26","29","2B","2E","30","33","36","38","3B","3D","40","42","45","47","4A","4D","4F","52","54","57","59","5C","5E","61","63","66","69","6B","6E","70","73","75","78","7A","7D","80","82","85","87","8A","8C","8F","91","94","96","99","9C","9E","A1","A3","A6","A8","AB","AD","B0","B3","B5","B8","BA","BD","BF","C2","C4","C7","C9","CC","CF","D1","D4","D6","D9","DB","DE","E0","E3","E6","E8","EB","ED","F0","F2","F5","F7","FA","FC","FF"]);o.onMounted(()=>{document.addEventListener("mousemove",y);const E=document.getElementById("xLabelMin");if(E){const Q=E.getBBox().height/2+C.value.padding*.6,J=C.value.centerY;E.setAttributeNS(null,"transform",`rotate(-90, ${Q}, ${J})`),E.setAttributeNS(null,"x",Q),E.setAttributeNS(null,"y",J)}const B=document.getElementById("xLabelMax");if(B){const Q=B.getBBox().height/2+C.value.right,J=C.value.centerY;B.setAttributeNS(null,"transform",`rotate(90, ${Q}, ${J})`),B.setAttributeNS(null,"x",Q),B.setAttributeNS(null,"y",J)}const S=document.getElementById("xLabelMaxName");if(S){const Q=S.getBBox().height/2+C.value.right+C.value.padding*.3,J=C.value.centerY;S.setAttributeNS(null,"transform",`rotate(90, ${Q}, ${J})`),S.setAttributeNS(null,"x",Q),S.setAttributeNS(null,"y",J)}}),o.onBeforeUnmount(()=>{document.removeEventListener("mousemove",y)});function y(E){c.value.x=E.clientX,c.value.y=E.clientY}const v=o.computed(()=>{let E=0,B=48;if(l.value&&s.value){const{width:S,height:R}=l.value.getBoundingClientRect(),Q=s.value.getBoundingClientRect();c.value.x+S/2>Q.right?E=-S:c.value.x-S/2<Q.left?E=0:E=-S/2,c.value.y+R>Q.bottom&&(B=-R-48)}return{top:c.value.y+B,left:c.value.x+E}}),h=o.computed(()=>Object.keys(n.config||{}).length?ja({defaultConfig:a.value,userConfig:n.config}):a.value),x=o.ref({plotLabels:{show:h.value.style.chart.layout.labels.plotLabels.show},inside:!h.value.style.chart.layout.useDiv,showTable:h.value.table.show}),C=o.computed(()=>{const E=x.value.inside?100:0,B=x.value.inside?100:0,S=48;return{height:h.value.style.chart.height+E+B,usableHeight:h.value.style.chart.height-S*2,width:h.value.style.chart.width,usableWidth:h.value.style.chart.width-S*2,top:E+S,left:S,right:h.value.style.chart.width-S,bottom:h.value.style.chart.height+E-S,centerX:h.value.style.chart.width/2,centerY:h.value.style.chart.height+E-h.value.style.chart.height/2,padding:S}}),T=o.computed(()=>{const E=h.value.style.chart.layout.grid.graduations.steps,B=C.value.usableWidth/(E*2),S=C.value.top,R=[];for(let Q=0;Q<E;Q+=1)R.push({x:C.value.padding+B*Q,y:S+C.value.usableHeight*(Q/E/2),height:C.value.usableHeight*(1-Q/E),width:C.value.usableWidth*(1-Q/E),opacity:d.value[Math.round((Q+1)/E*20)]});return R}),D=o.computed(()=>{let E=h.value.style.chart.layout.grid.xAxis.max,B=h.value.style.chart.layout.grid.xAxis.min,S=h.value.style.chart.layout.grid.yAxis.max,R=h.value.style.chart.layout.grid.yAxis.min;return h.value.style.chart.layout.grid.xAxis.auto&&(E=Math.max(...W.value.flatMap(Q=>Q.series.map(J=>J.x))),B=Math.min(...W.value.flatMap(Q=>Q.series.map(J=>J.x)))),h.value.style.chart.layout.grid.yAxis.auto&&(S=Math.max(...W.value.flatMap(Q=>Q.series.map(J=>J.y))),R=Math.min(...W.value.flatMap(Q=>Q.series.map(J=>J.y)))),{x:{max:E,min:B},y:{max:S,min:R}}}),Y=o.ref([]),W=o.computed(()=>n.dataset.map((E,B)=>({...E,id:`cat_${B}_${A.value}`,color:E.color||Ht[B]}))),U=o.computed(()=>W.value.filter(E=>!Y.value.includes(E.id))),I=o.computed(()=>W.value.map((E,B)=>({...E,shape:E.shape||"circle",series:E.series.map(S=>({...S,x:re(S.x),y:N(S.y),xValue:S.x,yValue:S.y,quadrantSide:le({x:S.x,y:S.y}),categoryName:E.name,shape:E.shape,color:E.color}))}))),O=o.computed(()=>U.value.map((E,B)=>({...E,shape:E.shape||"circle",color:E.color||Ht[B],series:E.series.map(S=>({...S,x:re(S.x),y:N(S.y),xValue:S.x,yValue:S.y,quadrantSide:le({x:S.x,y:S.y}),categoryName:E.name,shape:E.shape,color:E.color}))})));function re(E){const B=E/D.value.x.max;return C.value.centerX+C.value.usableWidth/2*B}function N(E){const B=E/D.value.y.max;return C.value.centerY+(1-C.value.usableHeight/2*B)}const L=o.computed(()=>{const E=O.value.flatMap(J=>J.series.map(H=>({x:H.xValue,y:H.yValue,name:H.name,category:H.categoryName,quadrantSide:H.quadrantSide,sideName:h.value.style.chart.layout.labels.quadrantLabels[H.quadrantSide].text,color:J.color,shape:J.shape}))),B=h.value.style.chart.layout.grid.xAxis.name||"x",S=h.value.style.chart.layout.grid.yAxis.name||"y",R=[h.value.translations.category,h.value.translations.item,B,S,h.value.translations.side],Q=E.map(J=>[J.category,J.name,J.x,J.y,J.sideName||J.quadrantSide]);return{head:R,body:Q}});function G(E,B){let S="";switch(E){case"circle":S=`<span style="color:${B}">●</span>`;break;case"triangle":S=`<span style="color:${B}">▲</span>`;break;case"square":S=`<span style="color:${B}">◼</span>`;break;case"diamond":S=`<span style="color:${B}">◆</span>`;break;case"pentagon":S=`<span style="color:${B}">⬟</span>`;break;case"hexagon":S=`<span style="color:${B}">⬣</span>`;break;case"star":S=`<span style="color:${B}">🟊</span>`;break}return S}const Z=o.computed(()=>I.value.map(E=>({name:E.name,shapePath:G(E.shape,E.color),id:E.id})));function ce(E){Y.value.includes(E)?Y.value=Y.value.filter(S=>S!==E):Y.value.push(E);const B=me();r("selectLegend",B)}function le(E){switch(!0){case(E.x>=0&&E.y>=0):return"tr";case(E.x>=0&&E.y<0):return"br";case(E.x<0&&E.y<0):return"bl";case(E.x<0&&E.y>=0):return"tl";default:return""}}function he(E,B){g.value=!0;let S="";B.quadrantSide&&(S+=`<div style="color:${h.value.style.chart.layout.labels.quadrantLabels[B.quadrantSide].color};font-weight:${h.value.style.chart.layout.labels.quadrantLabels[B.quadrantSide].bold?"bold":"400"}">${h.value.style.chart.layout.labels.quadrantLabels[B.quadrantSide].text}</div>`),S+=`<div>${E.name}</div>`,S+=`<div style="padding-bottom:6px;border-bottom:1px solid #e1e5e8;margin-bottom:3px">${B.name}</div>`,S+=`<div>${h.value.style.chart.layout.grid.xAxis.name?h.value.style.chart.layout.grid.xAxis.name:"x"} : <b>${B.xValue.toFixed(h.value.style.chart.tooltip.roundingValue)}</b></div>`,S+=`<div>${h.value.style.chart.layout.grid.yAxis.name?h.value.style.chart.layout.grid.yAxis.name:"y"} : <b>${B.yValue.toFixed(h.value.style.chart.tooltip.roundingValue)}</b></div>`,p.value=`<div style="text-align:left;font-size:${h.value.style.chart.tooltip.fontSize}px">${S}</div>`}function fe(E,B){const S={category:E.name,itemName:B.name,x:B.xValue,y:B.yValue,quadrantSide:B.quadrantSide,sideName:h.value.style.chart.layout.labels.quadrantLabels[B.quadrantSide].text};r("selectPlot",S)}function pe(E){const B=O.value.flatMap(R=>R.series.filter(Q=>Q.quadrantSide===E).map(Q=>({category:Q.categoryName,itemName:Q.name,x:Q.xValue,y:Q.yValue}))),S={quadrantSide:E,sideName:h.value.style.chart.layout.labels.quadrantLabels[E].text,items:[...B]};r("selectSide",S)}function me(){return O.value.map(E=>({color:E.color,name:E.name,shape:E.shape,series:E.series.map(B=>({name:B.name,x:B.xValue,y:B.yValue,quadrantSide:B.quadrantSide,sideName:h.value.style.chart.layout.labels.quadrantLabels[B.quadrantSide].text}))}))}e({getData:me});function Le(){u.value&&u.value.removeAttribute("open")}function F(){i.value=!0,o.nextTick(()=>{uo({domElement:document.getElementById(`vue-ui-quadrant_${A.value}`),fileName:h.value.style.chart.title.text||"vue-ui-quadrant"}).finally(()=>{i.value=!1})})}function _(){o.nextTick(()=>{const E=[[h.value.style.chart.title.text],[h.value.style.chart.title.subtitle.text],[""]],B=L.value.head,S=L.value.body,R=E.concat([B]).concat(S);function Q(Me){let _e=new ArrayBuffer(Me.length),Ae=new Uint8Array(_e);for(let Pe=0;Pe<Me.length;Pe++)Ae[Pe]=Me.charCodeAt(Pe)&255;return _e}const J=Rr.book_new(),H=Rr.aoa_to_sheet(R);Rr.book_append_sheet(J,H,"Sheet1");const ue=Ui(J,{bookType:"xlsx",type:"binary"}),Te=new Blob([Q(ue)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),Ne=document.createElement("a");Ne.href=window.URL.createObjectURL(Te),Ne.download=`${h.value.style.chart.title.text.replaceAll(" ","_")||"vue-ui-radar"}.xlsx`,Ne.click(),window.URL.revokeObjectURL(Ne.href)})}return(E,B)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-quadrant",ref_key:"quadrantChart",ref:s,id:`vue-ui-quadrant_${A.value}`,style:o.normalizeStyle(`font-family:${h.value.style.fontFamily};width:100%; text-align:center`)},[(!x.value.inside||i.value)&&h.value.style.chart.title.text?(o.openBlock(),o.createElementBlock("div",{key:0,style:o.normalizeStyle(`width:100%;background:${h.value.style.chart.backgroundColor};padding-bottom:12px`)},[o.createElementVNode("div",{style:o.normalizeStyle(`width:100%;text-align:center;color:${h.value.style.chart.title.color};font-size:${h.value.style.chart.title.fontSize}px;font-weight:${h.value.style.chart.title.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.text),5),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("div",{key:0,style:o.normalizeStyle(`width:100%;text-align:center;color:${h.value.style.chart.title.subtitle.color};font-size:${h.value.style.chart.title.subtitle.fontSize}px;font-weight:${h.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.subtitle.text),5)):o.createCommentVNode("",!0)],4)):o.createCommentVNode("",!0),h.value.userOptions.show?(o.openBlock(),o.createElementBlock("details",{key:1,class:"vue-ui-quadrant-user-options",style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:u},[o.createElementVNode("summary",{style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)},o.toDisplayString(h.value.userOptions.title),5),o.createElementVNode("div",{class:"vue-ui-quadrant-user-options-items",style:o.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)},[o.createElementVNode("div",zH,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-quadrant-option-plotLabels_${A.value}`,name:`vue-ui-quadrant-option-plotLabels_${A.value}`,"onUpdate:modelValue":B[0]||(B[0]=S=>x.value.plotLabels.show=S)},null,8,KH),[[o.vModelCheckbox,x.value.plotLabels.show]]),o.createElementVNode("label",{for:`vue-ui-quadrant-option-plotLabels_${A.value}`},o.toDisplayString(h.value.userOptions.labels.showPlotLabels),9,GH)]),o.createElementVNode("div",jH,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-quadrant-option-title_${A.value}`,name:`vue-ui-quadrant-option-title_${A.value}`,"onUpdate:modelValue":B[1]||(B[1]=S=>x.value.inside=S)},null,8,WH),[[o.vModelCheckbox,x.value.inside]]),o.createElementVNode("label",{for:`vue-ui-quadrant-option-title_${A.value}`},o.toDisplayString(h.value.userOptions.labels.useDiv),9,XH)]),o.createElementVNode("div",qH,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-quadrant-option-table_${A.value}`,name:`vue-ui-quadrant-option-table_${A.value}`,"onUpdate:modelValue":B[2]||(B[2]=S=>x.value.showTable=S)},null,8,YH),[[o.vModelCheckbox,x.value.showTable]]),o.createElementVNode("label",{for:`vue-ui-quadrant-option-table_${A.value}`},o.toDisplayString(h.value.userOptions.labels.showTable),9,JH)]),o.createElementVNode("button",{class:"vue-ui-quadrant-button",onClick:F,disabled:i.value,style:o.normalizeStyle([{"margin-top":"12px"},`color:${h.value.style.chart.color}`])},[i.value?(o.openBlock(),o.createElementBlock("svg",{key:0,class:"vue-ui-quadrant-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:h.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t9,8,e9)):(o.openBlock(),o.createElementBlock("span",r9,"PDF"))],12,ZH),o.createElementVNode("button",{class:"vue-ui-quadrant-button",onClick:_,style:o.normalizeStyle(`color:${h.value.style.chart.color}`)}," XLSX ",4)],4)],4)):o.createCommentVNode("",!0),(o.openBlock(),o.createElementBlock("svg",{viewBox:`0 0 ${C.value.width} ${C.value.height}`,style:o.normalizeStyle(`max-width:100%;overflow:visible;background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`),onClick:Le},[o.createElementVNode("defs",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(O.value,(S,R)=>(o.openBlock(),o.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`quadrant_gradient_${A.value}_${R}`},[o.createElementVNode("stop",{offset:"0%","stop-color":`${o.unref(ks)(S.color,.05)}${d.value[h.value.style.chart.layout.areas.opacity]}`},null,8,a9),o.createElementVNode("stop",{offset:"100%","stop-color":S.color+d.value[h.value.style.chart.layout.areas.opacity]},null,8,i9)],8,A9))),256))]),h.value.style.chart.title.text&&x.value.inside&&!i.value?(o.openBlock(),o.createElementBlock("g",o9,[o.createElementVNode("text",{"font-size":h.value.style.chart.title.fontSize,fill:h.value.style.chart.title.color,x:C.value.width/2,y:h.value.style.chart.title.fontSize+6,"text-anchor":"middle",style:o.normalizeStyle(`font-weight:${h.value.style.chart.title.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.text),13,s9),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("text",{key:0,"font-size":h.value.style.chart.title.subtitle.fontSize,fill:h.value.style.chart.title.subtitle.color,x:C.value.width/2,y:h.value.style.chart.title.fontSize*2+6,"text-anchor":"middle",style:o.normalizeStyle(`font-weight:${h.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(h.value.style.chart.title.subtitle.text),13,l9)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),h.value.style.chart.layout.grid.graduations.show?(o.openBlock(),o.createElementBlock("g",c9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(T.value,S=>(o.openBlock(),o.createElementBlock("rect",{fill:h.value.style.chart.layout.grid.graduations.fill?`${h.value.style.chart.layout.grid.graduations.color}${S.opacity}`:"none",x:S.x,y:S.y,height:S.height,width:S.width,"stroke-width":h.value.style.chart.layout.grid.graduations.strokeWidth,stroke:h.value.style.chart.layout.grid.graduations.stroke,rx:h.value.style.chart.layout.grid.graduations.roundingForce},null,8,u9))),256))])):o.createCommentVNode("",!0),o.createElementVNode("line",{x1:C.value.left,y1:C.value.centerY,x2:C.value.right,y2:C.value.centerY,stroke:h.value.style.chart.layout.grid.stroke,"stroke-width":h.value.style.chart.layout.grid.strokeWidth},null,8,h9),o.createElementVNode("line",{x1:C.value.centerX,y1:C.value.top,x2:C.value.centerX,y2:C.value.bottom,stroke:h.value.style.chart.layout.grid.stroke,"stroke-width":h.value.style.chart.layout.grid.strokeWidth},null,8,f9),h.value.style.chart.layout.grid.showArrows?(o.openBlock(),o.createElementBlock("g",d9,[o.createElementVNode("polygon",{points:`${C.value.right-C.value.width*.02},${C.value.centerY-C.value.height*.009} ${C.value.right},${C.value.centerY} ${C.value.right-C.value.width*.02},${C.value.centerY+C.value.height*.009}`,fill:h.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,g9),o.createElementVNode("polygon",{points:`${C.value.left+C.value.width*.02},${C.value.centerY-C.value.height*.009} ${C.value.left},${C.value.centerY} ${C.value.left+C.value.width*.02},${C.value.centerY+C.value.height*.009}`,fill:h.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,p9),o.createElementVNode("polygon",{points:`${C.value.centerX-C.value.width*.013},${C.value.top+C.value.height*.015} ${C.value.centerX},${C.value.top} ${C.value.centerX+C.value.width*.013},${C.value.top+C.value.height*.015}`,fill:h.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,m9),o.createElementVNode("polygon",{points:`${C.value.centerX-C.value.width*.013},${C.value.bottom-C.value.height*.015} ${C.value.centerX},${C.value.bottom} ${C.value.centerX+C.value.width*.013},${C.value.bottom-C.value.height*.015}`,fill:h.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,v9)])):o.createCommentVNode("",!0),h.value.style.chart.layout.labels.quadrantLabels.show?(o.openBlock(),o.createElementBlock("g",y9,[h.value.style.chart.layout.labels.quadrantLabels.tl.text?(o.openBlock(),o.createElementBlock("text",{key:0,x:0,y:C.value.top-C.value.padding/2,"text-anchor":"start",fill:h.value.style.chart.layout.labels.quadrantLabels.tl.color,"font-size":h.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,style:o.normalizeStyle(`font-weight:${h.value.style.chart.layout.labels.quadrantLabels.tl.bold?"bold":""}`),onClick:B[3]||(B[3]=S=>pe("tl"))},o.toDisplayString(h.value.style.chart.layout.labels.quadrantLabels.tl.text),13,w9)):o.createCommentVNode("",!0),h.value.style.chart.layout.labels.quadrantLabels.tr.text?(o.openBlock(),o.createElementBlock("text",{key:1,x:C.value.width,y:C.value.top-C.value.padding/2,"text-anchor":"end",fill:h.value.style.chart.layout.labels.quadrantLabels.tr.color,"font-size":h.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,style:o.normalizeStyle(`font-weight:${h.value.style.chart.layout.labels.quadrantLabels.tr.bold?"bold":""}`),onClick:B[4]||(B[4]=S=>pe("tr"))},o.toDisplayString(h.value.style.chart.layout.labels.quadrantLabels.tr.text),13,B9)):o.createCommentVNode("",!0),h.value.style.chart.layout.labels.quadrantLabels.br.text?(o.openBlock(),o.createElementBlock("text",{key:2,x:C.value.width,y:C.value.bottom+C.value.padding*.7,"text-anchor":"end",fill:h.value.style.chart.layout.labels.quadrantLabels.br.color,"font-size":h.value.style.chart.layout.labels.quadrantLabels.br.fontSize,style:o.normalizeStyle(`font-weight:${h.value.style.chart.layout.labels.quadrantLabels.br.bold?"bold":""}`),onClick:B[5]||(B[5]=S=>pe("br"))},o.toDisplayString(h.value.style.chart.layout.labels.quadrantLabels.br.text),13,x9)):o.createCommentVNode("",!0),h.value.style.chart.layout.labels.quadrantLabels.bl.text?(o.openBlock(),o.createElementBlock("text",{key:3,x:0,y:C.value.bottom+C.value.padding*.7,"text-anchor":"start",fill:h.value.style.chart.layout.labels.quadrantLabels.bl.color,"font-size":h.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,style:o.normalizeStyle(`font-weight:${h.value.style.chart.layout.labels.quadrantLabels.bl.bold?"bold":""}`),onClick:B[6]||(B[6]=S=>pe("bl"))},o.toDisplayString(h.value.style.chart.layout.labels.quadrantLabels.bl.text),13,b9)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),h.value.style.chart.layout.labels.axisLabels.show?(o.openBlock(),o.createElementBlock("g",C9,[o.createElementVNode("text",{x:C.value.centerX,y:C.value.top-C.value.padding/6,"text-anchor":"middle","font-size":h.value.style.chart.layout.labels.axisLabels.fontSize,fill:h.value.style.chart.layout.labels.axisLabels.color.positive},o.toDisplayString(D.value.y.max),9,E9),o.createElementVNode("text",{x:C.value.centerX,y:C.value.top-C.value.padding/2,"text-anchor":"middle","font-size":h.value.style.chart.layout.labels.axisLabels.fontSize,fill:h.value.style.chart.layout.labels.axisLabels.color.positive},o.toDisplayString(h.value.style.chart.layout.grid.yAxis.name),9,F9),o.createElementVNode("text",{x:C.value.centerX,y:C.value.bottom+C.value.padding*.35,"text-anchor":"middle","font-size":h.value.style.chart.layout.labels.axisLabels.fontSize,fill:h.value.style.chart.layout.labels.axisLabels.color.negative},o.toDisplayString(D.value.y.min),9,S9),o.createElementVNode("text",{id:"xLabelMin","text-anchor":"middle","font-size":h.value.style.chart.layout.labels.axisLabels.fontSize,fill:h.value.style.chart.layout.labels.axisLabels.color.negative},o.toDisplayString(D.value.x.min),9,_9),o.createElementVNode("text",{id:"xLabelMax","text-anchor":"middle","font-size":h.value.style.chart.layout.labels.axisLabels.fontSize,fill:h.value.style.chart.layout.labels.axisLabels.color.positive},o.toDisplayString(D.value.x.max),9,k9),o.createElementVNode("text",{id:"xLabelMaxName","text-anchor":"middle","font-size":h.value.style.chart.layout.labels.axisLabels.fontSize,fill:h.value.style.chart.layout.labels.axisLabels.color.positive},o.toDisplayString(h.value.style.chart.layout.grid.xAxis.name),9,T9)])):o.createCommentVNode("",!0),h.value.style.chart.layout.areas.show?(o.openBlock(),o.createElementBlock("g",N9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(O.value,(S,R)=>(o.openBlock(),o.createElementBlock("g",null,[S.series.length>2?(o.openBlock(),o.createElementBlock("polygon",{key:0,fill:h.value.style.chart.layout.areas.useGradient?`url(#quadrant_gradient_${A.value}_${R})`:`${S.color}${d.value[h.value.style.chart.layout.areas.opacity]}`,points:o.unref(GD)(S)},null,8,L9)):o.createCommentVNode("",!0)]))),256))])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(O.value,S=>(o.openBlock(),o.createElementBlock("g",null,[S.shape==="circle"?(o.openBlock(),o.createElementBlock("g",U9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S.series,R=>(o.openBlock(),o.createElementBlock("circle",{cx:R.x,cy:R.y,r:h.value.style.chart.layout.plots.radius*.8,fill:S.color,stroke:h.value.style.chart.layout.plots.outline?h.value.style.chart.layout.plots.outlineColor:"none","stroke-width":h.value.style.chart.layout.plots.outlineWidth,onMouseover:Q=>he(S,R),onMouseout:B[7]||(B[7]=Q=>g.value=!1),onClick:Q=>fe(S,R)},null,40,I9))),256))])):o.createCommentVNode("",!0),S.shape==="triangle"?(o.openBlock(),o.createElementBlock("g",Q9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S.series,R=>(o.openBlock(),o.createElementBlock("path",{d:o.unref(Co)({plot:{x:R.x,y:R.y},radius:h.value.style.chart.layout.plots.radius,sides:3,rotation:.52}).path,fill:S.color,stroke:h.value.style.chart.layout.plots.outline?h.value.style.chart.layout.plots.outlineColor:"none","stroke-width":h.value.style.chart.layout.plots.outlineWidth,onMouseover:Q=>he(S,R),onMouseout:B[8]||(B[8]=Q=>g.value=!1),onClick:Q=>fe(S,R)},null,40,D9))),256))])):o.createCommentVNode("",!0),S.shape==="square"?(o.openBlock(),o.createElementBlock("g",O9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S.series,R=>(o.openBlock(),o.createElementBlock("path",{d:o.unref(Co)({plot:{x:R.x,y:R.y},radius:h.value.style.chart.layout.plots.radius,sides:4,rotation:.8}).path,fill:S.color,stroke:h.value.style.chart.layout.plots.outline?h.value.style.chart.layout.plots.outlineColor:"none","stroke-width":h.value.style.chart.layout.plots.outlineWidth,onMouseover:Q=>he(S,R),onMouseout:B[9]||(B[9]=Q=>g.value=!1),onClick:Q=>fe(S,R)},null,40,P9))),256))])):o.createCommentVNode("",!0),S.shape==="diamond"?(o.openBlock(),o.createElementBlock("g",M9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S.series,R=>(o.openBlock(),o.createElementBlock("path",{d:o.unref(Co)({plot:{x:R.x,y:R.y},radius:h.value.style.chart.layout.plots.radius,sides:4,rotation:0}).path,fill:S.color,stroke:h.value.style.chart.layout.plots.outline?h.value.style.chart.layout.plots.outlineColor:"none","stroke-width":h.value.style.chart.layout.plots.outlineWidth,onMouseover:Q=>he(S,R),onMouseout:B[10]||(B[10]=Q=>g.value=!1),onClick:Q=>fe(S,R)},null,40,R9))),256))])):o.createCommentVNode("",!0),S.shape==="pentagon"?(o.openBlock(),o.createElementBlock("g",H9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S.series,R=>(o.openBlock(),o.createElementBlock("path",{d:o.unref(Co)({plot:{x:R.x,y:R.y},radius:h.value.style.chart.layout.plots.radius,sides:5,rotation:.95}).path,fill:S.color,stroke:h.value.style.chart.layout.plots.outline?h.value.style.chart.layout.plots.outlineColor:"none","stroke-width":h.value.style.chart.layout.plots.outlineWidth,onMouseover:Q=>he(S,R),onMouseout:B[11]||(B[11]=Q=>g.value=!1),onClick:Q=>fe(S,R)},null,40,V9))),256))])):o.createCommentVNode("",!0),S.shape==="hexagon"?(o.openBlock(),o.createElementBlock("g",$9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S.series,R=>(o.openBlock(),o.createElementBlock("path",{d:o.unref(Co)({plot:{x:R.x,y:R.y},radius:h.value.style.chart.layout.plots.radius,sides:6,rotation:0}).path,fill:S.color,stroke:h.value.style.chart.layout.plots.outline?h.value.style.chart.layout.plots.outlineColor:"none","stroke-width":h.value.style.chart.layout.plots.outlineWidth,onMouseover:Q=>he(S,R),onMouseout:B[12]||(B[12]=Q=>g.value=!1),onClick:Q=>fe(S,R)},null,40,z9))),256))])):o.createCommentVNode("",!0),S.shape==="star"?(o.openBlock(),o.createElementBlock("g",K9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S.series,R=>(o.openBlock(),o.createElementBlock("polygon",{points:o.unref(KD)({plot:{x:R.x,y:R.y},radius:h.value.style.chart.layout.plots.radius}),fill:S.color,stroke:h.value.style.chart.layout.plots.outline?h.value.style.chart.layout.plots.outlineColor:"none","stroke-width":h.value.style.chart.layout.plots.outlineWidth,onMouseover:Q=>he(S,R),onMouseout:B[13]||(B[13]=Q=>g.value=!1),onClick:Q=>fe(S,R)},null,40,G9))),256))])):o.createCommentVNode("",!0)]))),256)),x.value.plotLabels.show?(o.openBlock(),o.createElementBlock("g",j9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(O.value,S=>(o.openBlock(),o.createElementBlock("g",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S.series,R=>(o.openBlock(),o.createElementBlock("text",{x:R.x,y:R.y+h.value.style.chart.layout.labels.plotLabels.offsetY+h.value.style.chart.layout.plots.radius,"text-anchor":"middle","font-size":h.value.style.chart.layout.labels.plotLabels.fontSize,fill:h.value.style.chart.layout.labels.plotLabels.color},o.toDisplayString(R.name),9,W9))),256))]))),256))])):o.createCommentVNode("",!0),h.value.style.chart.legend.show&&x.value.inside&&!i.value?(o.openBlock(),o.createElementBlock("foreignObject",{key:7,x:0,y:C.value.bottom+36,width:"100%",height:"90",style:{overflow:"visible"}},[o.createElementVNode("div",{class:"vue-ui-quadrant-legend",style:o.normalizeStyle(`font-weight:${h.value.style.chart.legend.bold?"bold":""};color:${h.value.style.chart.legend.color};font-size:${h.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${h.value.style.chart.legend.bold?"bold":""}`),onClick:Le},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Z.value,(S,R)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-quadrant-legend-item",onClick:Q=>ce(S.id),style:o.normalizeStyle(`opacity:${Y.value.includes(S.id)?.5:1}`)},[o.createElementVNode("div",{innerHTML:S.shapePath,style:{display:"flex","align-items":"center","justify-content":"center"}},null,8,Y9),o.createElementVNode("span",null,o.toDisplayString(S.name),1)],12,q9))),256))],4)],8,X9)):o.createCommentVNode("",!0)],12,n9)),h.value.style.chart.legend.show&&(!x.value.inside||i.value)?(o.openBlock(),o.createElementBlock("div",{key:2,class:"vue-ui-quadrant-legend",style:o.normalizeStyle(`font-weight:${h.value.style.chart.legend.bold?"bold":""};background:${h.value.style.chart.legend.backgroundColor};color:${h.value.style.chart.legend.color};font-size:${h.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${h.value.style.chart.legend.bold?"bold":""}`),onClick:Le},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Z.value,(S,R)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-quadrant-legend-item",onClick:Q=>ce(S.id),style:o.normalizeStyle(`opacity:${Y.value.includes(S.id)?.5:1}`)},[o.createElementVNode("div",{innerHTML:S.shapePath,style:{display:"flex","align-items":"center","justify-content":"center"}},null,8,Z9),o.createElementVNode("span",null,o.toDisplayString(S.name),1)],12,J9))),256))],4)):o.createCommentVNode("",!0),h.value.style.chart.tooltip.show&&g.value?(o.openBlock(),o.createElementBlock("div",{key:3,class:"vue-ui-quadrant-tooltip",ref_key:"tooltip",ref:l,style:o.normalizeStyle(`top:${v.value.top}px;left:${v.value.left}px;background:${h.value.style.chart.tooltip.backgroundColor};color:${h.value.style.chart.tooltip.color}`),innerHTML:p.value},null,12,eV)):o.createCommentVNode("",!0),x.value.showTable?(o.openBlock(),o.createElementBlock("div",{key:4,onClick:Le,class:"vue-ui-quadrant-table",style:o.normalizeStyle(`width:100%;margin-top:${x.value.inside?"48px":""}`)},[o.createElementVNode("table",null,[o.createElementVNode("thead",null,[h.value.style.chart.title.text?(o.openBlock(),o.createElementBlock("tr",tV,[o.createElementVNode("th",{colspan:5,style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline}`)},[o.createElementVNode("span",null,o.toDisplayString(h.value.style.chart.title.text),1),h.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("span",rV," : "+o.toDisplayString(h.value.style.chart.title.subtitle.text),1)):o.createCommentVNode("",!0)],4)])):o.createCommentVNode("",!0),o.createElementVNode("tr",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(L.value.head,S=>(o.openBlock(),o.createElementBlock("th",{style:o.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline}`)},[o.createElementVNode("div",nV,o.toDisplayString(S),1)],4))),256))])]),o.createElementVNode("tbody",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(L.value.body,S=>(o.openBlock(),o.createElementBlock("tr",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S,R=>(o.openBlock(),o.createElementBlock("td",{style:o.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},o.toDisplayString(isNaN(R)?R:R.toFixed(h.value.table.td.roundingValue)),5))),256))]))),256))])])],4)):o.createCommentVNode("",!0)],12,$H))}},[["__scopeId","data-v-585093d1"]]),Jne="",aV=["id"],iV={class:"vue-ui-gauge-user-option-item"},oV=["id","name"],sV=["for"],lV=["disabled"],cV=["stroke"],uV=[o.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-86d647d0></path><path d="M18 16v.01" data-v-86d647d0></path><path d="M6 16v.01" data-v-86d647d0></path><path d="M12 5v.01" data-v-86d647d0></path><path d="M12 12v.01" data-v-86d647d0></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-86d647d0></path>',6)],hV={key:1},fV=["viewBox"],dV=["id"],gV=["stop-color"],pV=["stop-color"],mV=["stop-color"],vV={key:0},yV=["font-size","fill","x","y"],wV=["font-size","fill","x","y"],BV=["font-size","fill","x","y"],xV=["d","stroke","stroke-width"],bV={key:1},CV=["cx","cy","fill"],EV=["cx","cy","r","fill"],FV=["y","width","height","fill"],SV=["cx","cy","r","fill","stroke","stroke-width"],_V=["cx","cy","r","fill","stroke","stroke-width"],kV=["x","y","font-size","font-weight","fill"],TV=["x","y","font-size","font-weight","fill"],NV=["x1","y1","x2","y2","stroke","stroke-width"],LV=["x1","y1","x2","y2","stroke","stroke-width"],UV=["cx","cy","fill","r","stroke-width","stroke"],IV=["x","y","font-size","fill"],QV=Ii({__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(t){const e=t,r=o.ref(`vue-ui-gauge-${Math.random()}`),n=o.ref({style:{fontFamily:"inherit",chart:{backgroundColor:"#FFFFFF",color:"#2D353C",animation:{use:!0,speed:1,acceleration:1},layout:{useDiv:!1,track:{size:1,useGradient:!0,gradientIntensity:40},markers:{size:1,color:"#2D353C",strokeWidth:1,stroke:"#2D353C",backgroundColor:"#FFFFFF",bold:!0,fontSizeRatio:1,offsetY:0,roundingValue:0},pointer:{size:1,stroke:"#2D353C",strokeWidth:12,useRatingColor:!0,color:"#CCCCCC",circle:{radius:10,stroke:"#2D353C",strokeWidth:2,color:"#FFFFFF"}}},legend:{fontSize:48,prefix:"",suffix:"",roundingValue:1,showPlusSymbol:!0,useRatingColor:!0,color:"#2D353C"},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}}}},userOptions:{show:!0,title:"options",labels:{useDiv:"Title inside",showTable:"Show table"}},translations:{base:"Base"}}),A=o.ref(!1),a=o.ref(null),i=o.ref(null),s=o.computed(()=>Object.keys(e.config||{}).length?ja({defaultConfig:n.value,userConfig:e.config}):n.value),l=o.ref({inside:!s.value.style.chart.layout.useDiv}),u=o.computed(()=>{const W=[];e.dataset.series.forEach(I=>{W.push(I.from),W.push(I.to)});const U=Math.max(...W);return{...e.dataset,series:e.dataset.series.map((I,O)=>({...I,color:I.color||Ht[O],value:(I.to-I.from)/U*100}))}}),c=o.computed(()=>({height:l.value.inside?512:358.4,width:512,top:l.value.inside?76.8:0,bottom:l.value.inside?435.2:358.4,centerX:l.value.inside?256:179.2,centerY:256})),g=o.ref(0),p=o.ref(0),d=o.ref(s.value.style.chart.animation.use?0:e.dataset.value),y=o.computed(()=>{const W=c.value.width/2,U=c.value.height*.69,I=Math.PI*((d.value+0-p.value)/(g.value-p.value))+Math.PI;return{x1:W,y1:U,x2:W+c.value.width/3.2*s.value.style.chart.layout.pointer.size*Math.cos(I),y2:U+c.value.width/3.2*s.value.style.chart.layout.pointer.size*Math.sin(I)}}),v=o.computed(()=>{for(let W=0;W<u.value.series.length;W+=1){const{color:U,from:I,to:O}=u.value.series[W];if(d.value>=I&&d.value<=O)return U}return"#2D353C"});o.onMounted(()=>{const W=[];u.value.series.forEach(L=>{W.push(L.from),W.push(L.to)}),g.value=Math.max(...W),p.value=Math.min(...W);const U=String(g.value).length;let I=0,O=(U>2?.01:.001)*s.value.style.chart.animation.speed,re=(U>2?.05:.005)*s.value.style.chart.animation.acceleration;function N(){d.value+=O+I,I+=re,d.value<e.dataset.value?requestAnimationFrame(N):d.value=e.dataset.value}s.value.style.chart.animation.use&&(d.value=p.value,N())});function h([W,U],[I,O],[re,N],L){N=N%Math.PI;const G=JB(L),[Z,ce]=Kh(Gh(G,[I*Math.cos(re),O*Math.sin(re)]),[W,U]),[le,he]=Kh(Gh(G,[I*Math.cos(re+N),O*Math.sin(re+N)]),[W,U]),fe=N>Math.PI?1:0,pe=N>0?1:0;return{startX:Z,startY:ce,endX:le,endY:he,path:`M${Z} ${ce} A ${[I,O,L/(2*Math.PI)*180,fe,pe,le,he].join(" ")}`}}function x(W,U,I,O,re){let{series:N}=W;if(W.base||(W.base=1),!N||W.base===0)return{...N,proportion:0,ratio:0,path:"",startX:0,startY:0,endX:0,center:{}};const L=[...N].map(ce=>ce.value).reduce((ce,le)=>ce+le,0),G=[];let Z=0;for(let ce=0;ce<N.length;ce+=1){let le=N[ce].value/L;const he=le*(Math.PI*.975),pe=N[ce].value/2/L*Math.PI,{startX:me,startY:Le,endX:F,endY:_,path:E}=h([U,I],[O,re],[Z,he],110);G.push({...N[ce],proportion:le,ratio:he,path:E,startX:me,startY:Le,endX:F,endY:_,center:h([U,I],[O,re],[Z,pe],110)}),Z+=he}return G}function C(W,U,I){const re=String(I).length>2?-3:0;return W===0?U+14+re:U+9+re}function T(W){return String(W).length>2?15:20}function D(){A.value=!0,uo({domElement:document.getElementById(`vue-ui-gauge_${r.value}`),fileName:s.value.style.chart.title.text||"vue-ui-gauge"}).finally(()=>{A.value=!1})}function Y(){i.value&&i.value.removeAttribute("open")}return(W,U)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-gauge",ref_key:"gaugeChart",ref:a,id:`vue-ui-gauge_${r.value}`,style:o.normalizeStyle(`font-family:${s.value.style.fontFamily};width:100%; text-align:center`)},[(!l.value.inside||A.value)&&s.value.style.chart.title.text?(o.openBlock(),o.createElementBlock("div",{key:0,style:o.normalizeStyle(`width:100%;background:${s.value.style.chart.backgroundColor};padding-bottom:12px`)},[o.createElementVNode("div",{style:o.normalizeStyle(`width:100%;text-align:center;color:${s.value.style.chart.title.color};font-size:${s.value.style.chart.title.fontSize}px;font-weight:${s.value.style.chart.title.bold?"bold":""}`)},o.toDisplayString(s.value.style.chart.title.text),5),s.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("div",{key:0,style:o.normalizeStyle(`width:100%;text-align:center;color:${s.value.style.chart.title.subtitle.color};font-size:${s.value.style.chart.title.subtitle.fontSize}px;font-weight:${s.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(s.value.style.chart.title.subtitle.text),5)):o.createCommentVNode("",!0),isNaN(t.dataset.base)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:1,style:o.normalizeStyle(`width:100%;text-align:center;color:${s.value.style.chart.title.subtitle.color};font-size:${s.value.style.chart.title.subtitle.fontSize}px;font-weight:${s.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(s.value.translations.base)+" : "+o.toDisplayString(t.dataset.base),5))],4)):o.createCommentVNode("",!0),s.value.userOptions.show?(o.openBlock(),o.createElementBlock("details",{key:1,class:"vue-ui-gauge-user-options",style:o.normalizeStyle(`background:${s.value.style.chart.backgroundColor};color:${s.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:i},[o.createElementVNode("summary",{style:o.normalizeStyle(`background:${s.value.style.chart.backgroundColor};color:${s.value.style.chart.color}`)},o.toDisplayString(s.value.userOptions.title),5),o.createElementVNode("div",{class:"vue-ui-gauge-user-options-items",style:o.normalizeStyle(`background:${s.value.style.chart.backgroundColor};color:${s.value.style.chart.color}`)},[o.createElementVNode("div",iV,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-gauge-option-title_${r.value}`,name:`vue-ui-gauge-option-title_${r.value}`,"onUpdate:modelValue":U[0]||(U[0]=I=>l.value.inside=I)},null,8,oV),[[o.vModelCheckbox,l.value.inside]]),o.createElementVNode("label",{for:`vue-ui-gauge-option-title_${r.value}`},o.toDisplayString(s.value.userOptions.labels.useDiv),9,sV)]),o.createElementVNode("button",{class:"vue-ui-gauge-button",onClick:D,disabled:A.value,style:o.normalizeStyle([{"margin-top":"12px"},`color:${s.value.style.chart.color}`])},[A.value?(o.openBlock(),o.createElementBlock("svg",{key:0,class:"vue-ui-gauge-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:s.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},uV,8,cV)):(o.openBlock(),o.createElementBlock("span",hV,"PDF"))],12,lV)],4)],4)):o.createCommentVNode("",!0),(o.openBlock(),o.createElementBlock("svg",{viewBox:`0 0 ${c.value.width} ${c.value.height}`,style:o.normalizeStyle(`max-width:100%;overflow:hidden !important;background:${s.value.style.chart.backgroundColor};color:${s.value.style.chart.color}`),onClick:Y},[o.createElementVNode("defs",null,[o.createElementVNode("radialGradient",{id:`gradient_${r.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[o.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${o.unref(Gn)[1]}`},null,8,gV),o.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${o.unref(Gn)[s.value.style.chart.layout.track.gradientIntensity]}`},null,8,pV),o.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${o.unref(Gn)[1]}`},null,8,mV)],8,dV)]),s.value.style.chart.title.text&&l.value.inside&&!A.value?(o.openBlock(),o.createElementBlock("g",vV,[o.createElementVNode("text",{"font-size":s.value.style.chart.title.fontSize*1.5,fill:s.value.style.chart.title.color,x:c.value.width/2,y:s.value.style.chart.title.fontSize*1.5+20,"text-anchor":"middle",style:o.normalizeStyle(`font-weight:${s.value.style.chart.title.bold?"bold":""}`)},o.toDisplayString(s.value.style.chart.title.text),13,yV),s.value.style.chart.title.subtitle.text?(o.openBlock(),o.createElementBlock("text",{key:0,"font-size":s.value.style.chart.title.subtitle.fontSize*1.5,fill:s.value.style.chart.title.subtitle.color,x:c.value.width/2,y:s.value.style.chart.title.fontSize*1.5*2+20,"text-anchor":"middle",style:o.normalizeStyle(`font-weight:${s.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(s.value.style.chart.title.subtitle.text),13,wV)):o.createCommentVNode("",!0),isNaN(t.dataset.base)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("text",{key:1,"font-size":s.value.style.chart.title.subtitle.fontSize*1.5,fill:s.value.style.chart.title.subtitle.color,x:c.value.width/2,y:s.value.style.chart.title.subtitle.text?s.value.style.chart.title.fontSize*2.3*2+20:s.value.style.chart.title.fontSize*1.5*2+20,"text-anchor":"middle",style:o.normalizeStyle(`font-weight:${s.value.style.chart.title.subtitle.bold?"bold":""}`)},o.toDisplayString(s.value.translations.base)+" : "+o.toDisplayString(t.dataset.base),13,BV))])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(x(u.value,c.value.width/2,c.value.height*.7,c.value.width/2.5,c.value.width/2.5),(I,O)=>(o.openBlock(),o.createElementBlock("path",{key:`arc_${O}`,d:I.path,fill:"none",stroke:I.color,"stroke-linecap":"round","stroke-width":c.value.width/16*s.value.style.chart.layout.track.size},null,8,xV))),128)),s.value.style.chart.layout.track.useGradient?(o.openBlock(),o.createElementBlock("g",bV,[o.createElementVNode("circle",{cx:c.value.width/2,cy:c.value.height*.69,r:"225",fill:`url(#gradient_${r.value})`,stroke:"none"},null,8,CV),o.createElementVNode("circle",{cx:c.value.width/2,cy:c.value.height*.69+4,r:188*1/s.value.style.chart.layout.track.size,fill:s.value.style.chart.backgroundColor,stroke:"none"},null,8,EV),o.createElementVNode("rect",{x:0,y:c.value.height*.69,width:c.value.width,height:c.value.height-c.value.height*.69,fill:s.value.style.chart.backgroundColor,stroke:"none"},null,8,FV)])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(x(u.value,c.value.width/2,c.value.height*.7,c.value.width/2.5,c.value.width/2.5),(I,O)=>(o.openBlock(),o.createElementBlock("circle",{cx:I.center.startX,cy:O===0?I.center.startY+5:I.center.startY,r:c.value.width/31*s.value.style.chart.layout.track.size*s.value.style.chart.layout.markers.size,fill:s.value.style.chart.layout.markers.backgroundColor,stroke:s.value.style.chart.layout.markers.stroke,"stroke-width":s.value.style.chart.layout.markers.strokeWidth},null,8,SV))),256)),o.createElementVNode("circle",{cx:c.value.width*.9,cy:c.value.height*.69,r:c.value.width/31*s.value.style.chart.layout.track.size*s.value.style.chart.layout.markers.size,fill:s.value.style.chart.layout.markers.backgroundColor,stroke:s.value.style.chart.layout.markers.stroke,"stroke-width":s.value.style.chart.layout.markers.strokeWidth},null,8,_V),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(x(u.value,c.value.width/2,c.value.height*.7,c.value.width/2.5,c.value.width/2.5),(I,O)=>(o.openBlock(),o.createElementBlock("text",{x:I.center.startX,y:C(O,I.center.startY,I.from)+s.value.style.chart.layout.markers.offsetY,"text-anchor":"middle","font-size":T(I.from)*s.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${s.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:s.value.style.chart.layout.markers.color},o.toDisplayString(I.from.toFixed(s.value.style.chart.layout.markers.roundingValue)),9,kV))),256)),o.createElementVNode("text",{x:c.value.width*.9,y:C(1,c.value.height*.69,g.value)+s.value.style.chart.layout.markers.offsetY,"text-anchor":"middle","font-size":T(g.value)*s.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${s.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:s.value.style.chart.layout.markers.color},o.toDisplayString(g.value.toFixed(s.value.style.chart.layout.markers.roundingValue)),9,TV),isNaN(y.value.x2)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("line",{key:2,x1:y.value.x1,y1:y.value.y1,x2:y.value.x2,y2:y.value.y2,stroke:s.value.style.chart.layout.pointer.stroke,"stroke-width":s.value.style.chart.layout.pointer.strokeWidth,"stroke-linecap":"round"},null,8,NV)),isNaN(y.value.x2)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("line",{key:3,x1:y.value.x1,y1:y.value.y1,x2:y.value.x2,y2:y.value.y2,stroke:s.value.style.chart.layout.pointer.useRatingColor?v.value:s.value.style.chart.layout.pointer.color,"stroke-linecap":"round","stroke-width":s.value.style.chart.layout.pointer.strokeWidth*.7},null,8,LV)),o.createElementVNode("circle",{cx:c.value.width/2,cy:c.value.height*.69,fill:s.value.style.chart.layout.pointer.circle.color,r:s.value.style.chart.layout.pointer.circle.radius,"stroke-width":s.value.style.chart.layout.pointer.circle.strokeWidth,stroke:s.value.style.chart.layout.pointer.circle.stroke},null,8,UV),o.createElementVNode("text",{x:c.value.width/2,y:c.value.height*.9,"text-anchor":"middle","font-size":s.value.style.chart.legend.fontSize,"font-weight":"bold",fill:s.value.style.chart.legend.useRatingColor?v.value:s.value.style.chart.legend.color},o.toDisplayString(s.value.style.chart.legend.prefix)+" "+o.toDisplayString(s.value.style.chart.legend.showPlusSymbol&&d.value>0?"+":"")+o.toDisplayString(d.value.toFixed(s.value.style.chart.legend.roundingValue))+" "+o.toDisplayString(s.value.style.chart.legend.suffix),9,IV)],12,fV))],12,aV))}},[["__scopeId","data-v-86d647d0"]]),tAe="",DV=["id"],OV={class:"vue-ui-chestnut-user-option-item"},PV=["id","name"],MV=["for"],RV=["disabled"],HV=["stroke"],VV=[o.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-e94b9419></path><path d="M18 16v.01" data-v-e94b9419></path><path d="M6 16v.01" data-v-e94b9419></path><path d="M12 5v.01" data-v-e94b9419></path><path d="M12 12v.01" data-v-e94b9419></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-e94b9419></path>',6)],$V={key:1},zV=["viewBox"],KV={key:0},GV=["fill","font-weight","font-size","x","y"],jV=["fill","font-weight","font-size","x","y"],WV=["id"],XV=["stop-color"],qV=["stop-color"],YV=["id"],JV=["stop-color"],ZV=["stop-color"],e$=["id"],t$=["stop-color"],r$=["stop-color"],n$=["stop-color"],A$=["id"],a$=["stop-color"],i$=["stop-color"],o$=["stop-color"],s$=["id"],l$=["stop-color"],c$=["stop-color"],u$=["stop-color"],h$={key:1},f$=["x","y","font-size","font-weight","fill"],d$=["x","y","font-size","font-weight","fill"],g$=["d","stroke"],p$=["cx","cy","r","fill"],m$=["cx","cy","r","fill","stroke","stroke-width","onClick"],v$={key:2},y$=["x","y","font-size","fill","onClick"],w$={key:0},B$=["x","y","fill","font-size","font-weight"],x$=["x","y","height","width","fill","rx","onClick"],b$=["x","y","height","width","fill","rx","stroke","stroke-width","onClick"],C$={key:3},E$=["x","y","fill","font-size","onClick"],F$=["d","stroke"],S$=["cx","cy","fill","onClick"],_$=["fill","cx","cy","r","onClick"],k$={key:4},T$=["x","y","font-size","font-weight"],N$=["x1","x2","y1","y2","stroke","stroke-width"],L$=["y","height","width"],U$={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},I$={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},Q$={viewBox:"0 0 20 20",height:"16",width:"16"},D$=["fill"],O$={key:6},P$=["y","height","width"],M$={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},R$={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},H$={viewBox:"0 0 20 20",height:"16",width:"16"},V$=["fill"],$$=["cx","cy","fill"],z$=["cx","cy","fill"],K$=["d","stroke"],G$=["cx","cy","fill"],j$=["cx","cy","fill"],W$=["d","stroke"],X$=["x","y","fill","font-size","font-weight"],q$=["x","y","fill","font-size","font-weight"],Y$=["x","text-anchor","y","fill","font-size"],J$=["x","text-anchor","y","fill","font-size"],Z$=["x","text-anchor","y","fill","font-size"],ez=["x","text-anchor","y","fill","font-size"],tz=["x","text-anchor","y","fill","font-size"],rz=["x","y","font-size","fill"],nz=["x","y","font-size","fill"],Az=["x","y","font-size","fill"],az={key:0},iz={key:0},oz={key:0},sz={key:1},lz={key:0},cz={key:1},uz={key:0},hz={key:1},fz={key:0},dz={key:1},gz={key:0},pz={key:1},mz={key:0},vz={key:1},yz={key:0},wz={key:1},Bz=Ii({__name:"vue-ui-chestnut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(t){const e=t,r=o.ref(`vue-ui-chestnut-${Math.random()}`),n=o.ref({style:{fontFamily:"inherit",chart:{backgroundColor:"#FFFFFF",color:"#2D353C",layout:{grandTotal:{show:!0,fontSize:20,bold:!0,suffix:"",prefix:"",roundingValue:0,color:"#2D353C",text:"Grand total",offsetY:0},roots:{stroke:"#FFFFFF",strokeWidth:5,useGradient:!0,gradientIntensity:20,unerlayerColor:"#FFFFFF",labels:{show:!0,fontSize:16,adaptColorToBackground:!0,color:"#FFFFFF",bold:!0,roundingValue:0,prefix:"",suffix:"",name:{color:"#2D353C",fontSize:16,bold:!0}}},verticalSeparator:{stroke:"#FFFFFF",strokeWidth:5},links:{opacity:10},branches:{stroke:"#FFFFFF",strokeWidth:0,borderRadius:6,useGradient:!0,gradientIntensity:20,underlayerColor:"#FFFFFF",widthRatio:1.5,labels:{show:!0,fontSize:14,color:"#2D353C",bold:!0,dataLabels:{show:!0,hideUnderValue:5,fontSize:14,roundingValue:0,roundingPercentage:0,prefix:"",suffix:""}}},nuts:{offsetX:20,useGradient:!0,gradientIntensity:30,selected:{useMotion:!0,useGradient:!0,gradientIntensity:40,roundingValue:0,roundingPercentage:0,labels:{dataLabels:{hideUnderValue:5,color:"#2D353C",fontSize:12,bold:!0,prefix:"",suffix:""},core:{total:{color:"#2D353C",fontSize:24,bold:!1},value:{color:"#2D353C",fontSize:24,bold:!0,prefix:"",suffix:""}}}}},legend:{fontSize:16,color:"#2D353C",roundingValue:0,roundingPercentage:0,prefix:"",suffix:""},title:{color:"#2D353C",fontSize:20,text:"",bold:!0,offsetY:0,subtitle:{text:"",color:"#CCCCCC",bold:!1,fontSize:16,offsetY:0}}}}},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8",translations:{rootName:"root name",rootValue:"root value",rootToTotal:"%/total",branchName:"branch name",branchValue:"branch value",branchToRoot:"%/root",branchToTotal:"%/total",nutName:"nut name",nutValue:"nut value",nutToBranch:"%/branch",nutToRoot:"%/root",nutToTotal:"%/total"}},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0}},userOptions:{show:!0,title:"options",labels:{showTable:"Show table"}},translations:{total:"Total",proportionToTree:"of grand total",of:"of"}}),A=o.ref(!1),a=o.ref(null),i=o.ref(null),s=o.ref(null),l=o.ref({x:0,y:0});o.ref(!1),o.ref(""),o.onMounted(()=>{document.addEventListener("mousemove",u)}),o.onBeforeUnmount(()=>{document.removeEventListener("mousemove",u)});function u(Q){l.value.x=Q.clientX,l.value.y=Q.clientY}o.computed(()=>{let Q=0,J=48;if(i.value&&radarChart.value){const{width:H,height:ue}=i.value.getBoundingClientRect(),Te=radarChart.value.getBoundingClientRect();l.value.x+H/2>Te.right?Q=-H:l.value.x-H/2<Te.left?Q=0:Q=-H/2,l.value.y+ue>Te.bottom&&(J=-ue-48)}return{top:l.value.y+J,left:l.value.x+Q}});const c=o.computed(()=>Object.keys(e.config||{}).length?ja({defaultConfig:n.value,userConfig:e.config}):n.value),g=o.ref({showTable:c.value.table.show}),p=o.ref({gap:6,padding:{top:102,left:12,right:12,bottom:96},width:1024,height:0,branchSize:32,branchStart:128}),d=o.computed(()=>({left:p.value.padding.left,top:p.value.padding.top,right:p.value.width-p.value.padding.right,bottom:p.value.height-p.value.padding.bottom,width:p.value.width-(p.value.padding.left+p.value.padding.right),height:p.value.height-(p.value.padding.top+p.value.padding.bottom),seedX:p.value.padding.left+64})),y=o.computed(()=>e.dataset.flatMap(Q=>Q.branches.map(J=>J.value)).reduce((Q,J)=>Q+J)),v=o.computed(()=>e.dataset.map((Q,J)=>{const H=Q.branches.map(ue=>ue.value).reduce((ue,Te)=>ue+Te);return{...Q,color:Q.color||Ht[J]||Ht[J%Ht.length],id:Q.id||`root_${J}_${r.value}`,type:"root",total:H,rootIndex:J,branches:Q.branches.map((ue,Te)=>({...ue,rootName:Q.name,rootIndex:J,color:Q.color||Ht[J]||Ht[J%Ht.length],value:ue.value>=0?ue.value:0,id:ue.id||`branch_${J}_${Te}_${r.value}`,proportionToRoot:ue.value/H,type:"branch",breakdown:ue.breakdown.map((Ne,Me)=>({table:{rootName:Q.name,rootValue:H,rootToTotal:H/y.value,branchName:ue.name,branchValue:ue.value,branchToTotal:ue.value/y.value,branchToRoot:ue.value/H,nutName:Ne.name,nutValue:Ne.value,nutToTotal:Ne.value/y.value,nutToRoot:Ne.value/H,nutToBranch:Ne.value/ue.value},...Ne,type:"nut",branchName:ue.name,rootName:Q.name,branchTotal:ue.value>=0?ue.value:0,proportionToBranch:Ne.value/ue.value,proportionToRoot:Ne.value/H,proportionToTree:Ne.value/y.value,rootIndex:J,id:Ne.id||`nut_${J}_${Te}_${Me}_${r.value}`,color:Ne.color||Ht[Me]||Ht[Me%Ht.length],value:Ne.value>=0?Ne.value:0}))}))}})),h=o.computed(()=>v.value.flatMap(Q=>Q.branches).length),x=o.computed(()=>Math.max(...v.value.map(Q=>Q.branches.map(J=>J.value).reduce((J,H)=>J+H,0)))),C=o.computed(()=>Math.max(...v.value.flatMap(Q=>Q.branches.map(J=>J.value)))),T=o.computed(()=>256+p.value.padding.left),D=o.computed(()=>v.value.sort((Q,J)=>J.total-Q.total).map((Q,J)=>{const H=d.value.height/v.value.length/2,ue=Q.total/x.value*(H>64?64:H);return{...Q,x:d.value.seedX,y:d.value.top+d.value.height/v.value.length*(J+1)-(d.value.height/v.value.length/2+p.value.gap/2),r:ue<p.value.branchSize/2?p.value.branchSize/2:ue}})),Y=o.computed(()=>c.value.style.chart.layout.branches.widthRatio<=0?.1:c.value.style.chart.layout.branches.widthRatio>1.8?1.8:c.value.style.chart.layout.branches.widthRatio),W=o.computed(()=>D.value.flatMap(Q=>Q.branches)),U=o.computed(()=>W.value.sort((Q,J)=>J.value-Q.value).map((Q,J)=>({...Q,y1:J*p.value.branchSize+d.value.top+J*p.value.gap,y2:J*p.value.branchSize+p.value.branchSize,x1:T.value,x2:384*Q.value/C.value*Y.value+T.value})));function I(Q){const J=D.value.find(H=>H.rootIndex===Q.rootIndex);return{x:J.x,y:J.y,r:J.r}}const O=o.ref(null),re=o.ref(null),N=o.ref(null),L=o.ref(null);function G(){O.value=null,N.value=null,L.value=null}o.computed(()=>O.value?O.value.rootIndex:null);function Z(Q){return L.value?L.value===null?!0:Q.type==="root"?Q.id===L.value.id:Q.rootIndex===L.value.rootIndex:O.value===null&&N.value===null?!0:Q.type==="nut"?O.value.id===Q.id:Q.type==="branch"?N.value.id===Q.id:Q.type==="root"?N.value&&N.value.rootIndex===Q.rootIndex||O.value&&O.value.rootIndex===Q.rootIndex:!1}function ce(Q){G(),o.nextTick(()=>{O.value=Q,N.value=Q,re.value=zh({series:Q.breakdown,base:1},Q.x2+24+c.value.style.chart.layout.nuts.offsetX,Q.y1+p.value.branchSize/2,80,80)})}function le(){O.value=null,re.value=null}function he(Q){N.value&&N.value.id===Q.id?(N.value=null,G()):(G(),N.value=Q)}function fe(Q){L.value&&L.value.id===Q.id?G():(G(),L.value=Q)}function pe(Q,J=!1){let H=0,ue=J?16:0,Te="middle";return Q.center.endX>Q.cx?(H=Q.center.endX+16+ue,Te="start"):Q.center.endX<Q.cx?(H=Q.center.endX-16-ue,Te="end"):(H=Q.centerX+ue,Te="middle"),{x:H,anchor:Te}}function me(Q){return Q.center.endY>Q.cy?Q.center.endY+16:Q.center.endY<Q.cy?Q.center.endY-32:Q.center.endY}function Le(){return d.value.bottom-(O.value.y1+180)<0?0:d.value.bottom}function F(Q){const J=`M${pe(Q).x},${me(Q)-4} `,H=` ${Q.center.endX},${Q.center.endY}`;let ue="";return Q.center.endX>Q.cx?ue=`${pe(Q).x-12},${me(Q)-4}`:Q.center.endX<Q.cx?ue=`${pe(Q).x+12},${me(Q)-4}`:ue=`${pe(Q).x+12},${me(Q)-4}`,`${J}${ue}${H}`}function _(Q){return Q.proportion*100>c.value.style.chart.layout.nuts.selected.labels.dataLabels.hideUnderValue}o.onMounted(()=>{const Q=h.value*(p.value.branchSize+p.value.gap)+p.value.padding.top+p.value.padding.bottom;p.value.height=Q});function E(){A.value=!0,uo({domElement:document.getElementById(`vue-ui-chestnut_${r.value}`),fileName:c.value.style.chart.layout.title.text||"vue-ui-chestnut"}).finally(()=>{A.value=!1})}const B=o.computed(()=>{const Q=[c.value.table.th.translations.rootName,c.value.table.th.translations.rootValue,c.value.table.th.translations.rootToTotal,c.value.table.th.translations.branchName,c.value.table.th.translations.branchValue,c.value.table.th.translations.branchToRoot,c.value.table.th.translations.branchToTotal,c.value.table.th.translations.nutName,c.value.table.th.translations.nutValue,c.value.table.th.translations.nutToBranch,c.value.table.th.translations.nutToRoot,c.value.table.th.translations.nutToTotal],J=v.value.flatMap((H,ue)=>H.branches.flatMap((Te,Ne)=>Te.breakdown.flatMap((Me,_e)=>Me.table)));return{head:Q,body:J}});function S(){o.nextTick(()=>{const Q=[[c.value.style.chart.layout.title.text],[c.value.style.chart.layout.title.subtitle.text],[""],["Grand total",y.value],[""]],J=B.value.head,H=B.value.body.map((je,Qe)=>[B.value.body[Qe-1]&&B.value.body[Qe-1].rootName===je.rootName?"":je.rootName,B.value.body[Qe-1]&&B.value.body[Qe-1].rootName===je.rootName?"":je.rootValue,B.value.body[Qe-1]&&B.value.body[Qe-1].rootName===je.rootName?"":je.rootToTotal,B.value.body[Qe-1]&&B.value.body[Qe-1].branchName===je.branchName?"":je.branchName,B.value.body[Qe-1]&&B.value.body[Qe-1].branchName===je.branchName?"":je.branchValue,B.value.body[Qe-1]&&B.value.body[Qe-1].branchName===je.branchName?"":je.branchToRoot,B.value.body[Qe-1]&&B.value.body[Qe-1].branchName===je.branchName?"":je.branchToTotal,je.nutName,je.nutValue,je.nutToBranch,je.nutToRoot,je.nutToTotal]),ue=Q.concat([J]).concat(H);function Te(je){let Qe=new ArrayBuffer(je.length),Xe=new Uint8Array(Qe);for(let Ye=0;Ye<je.length;Ye++)Xe[Ye]=je.charCodeAt(Ye)&255;return Qe}const Ne=Rr.book_new(),Me=Rr.aoa_to_sheet(ue);Rr.book_append_sheet(Ne,Me,"Sheet1");const _e=Ui(Ne,{bookType:"xlsx",type:"binary"}),Ae=new Blob([Te(_e)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),Pe=document.createElement("a");Pe.href=window.URL.createObjectURL(Ae),Pe.download=`${c.value.style.chart.layout.title.text.replaceAll(" ","_")||"vue-ui-chestnut"}.xlsx`,Pe.click(),window.URL.revokeObjectURL(Pe.href)})}function R(Q){Q.target&&Q.target.tagName==="svg"&&G(),s.value&&s.value.removeAttribute("open")}return(Q,J)=>(o.openBlock(),o.createElementBlock("div",{class:"vue-ui-chestnut",ref_key:"chestnutChart",ref:a,id:`vue-ui-chestnut_${r.value}`,style:o.normalizeStyle(`font-family:${c.value.style.fontFamily};width:100%; text-align:center`)},[c.value.userOptions.show?(o.openBlock(),o.createElementBlock("details",{key:0,class:"vue-ui-chestnut-user-options",style:o.normalizeStyle(`background:${c.value.style.chart.backgroundColor};color:${c.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:s},[o.createElementVNode("summary",{style:o.normalizeStyle(`background:${c.value.style.chart.backgroundColor};color:${c.value.style.chart.color}`)},o.toDisplayString(c.value.userOptions.title),5),o.createElementVNode("div",OV,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:`vue-ui-chestnut-option-table_${r.value}`,name:`vue-ui-chestnut-option-table_${r.value}`,"onUpdate:modelValue":J[0]||(J[0]=H=>g.value.showTable=H)},null,8,PV),[[o.vModelCheckbox,g.value.showTable]]),o.createElementVNode("label",{for:`vue-ui-chestnut-option-table_${r.value}`},o.toDisplayString(c.value.userOptions.labels.showTable),9,MV)]),o.createElementVNode("div",{class:"vue-ui-chestnut-user-options-items",style:o.normalizeStyle(`background:${c.value.style.chart.backgroundColor};color:${c.value.style.chart.color}`)},[o.createElementVNode("button",{class:"vue-ui-chestnut-button",onClick:E,disabled:A.value,style:o.normalizeStyle([{"margin-top":"12px"},`color:${c.value.style.chart.color}`])},[A.value?(o.openBlock(),o.createElementBlock("svg",{key:0,class:"vue-ui-chestnut-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:c.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},VV,8,HV)):(o.openBlock(),o.createElementBlock("span",$V,"PDF"))],12,RV),o.createElementVNode("button",{class:"vue-ui-chestnut-button",onClick:S,style:o.normalizeStyle(`background:${c.value.style.chart.backgroundColor};color:${c.value.style.chart.color}`)}," XLSX ",4)],4)],4)):o.createCommentVNode("",!0),p.value.height>0?(o.openBlock(),o.createElementBlock("svg",{key:1,viewBox:`0 0 ${p.value.width} ${p.value.height}`,style:o.normalizeStyle(`max-width:100%;overflow:visible;background:${c.value.style.chart.backgroundColor};color:${c.value.style.chart.color}`),onClick:R},[O.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("g",KV,[c.value.style.chart.layout.title.text?(o.openBlock(),o.createElementBlock("text",{key:0,"text-anchor":"middle",fill:c.value.style.chart.layout.title.color,"font-weight":c.value.style.chart.layout.title.bold?"bold":"normal","font-size":c.value.style.chart.layout.title.fontSize,x:p.value.width/2,y:12+c.value.style.chart.layout.title.fontSize+c.value.style.chart.layout.title.offsetY,onClick:G},o.toDisplayString(c.value.style.chart.layout.title.text),9,GV)):o.createCommentVNode("",!0),c.value.style.chart.layout.title.subtitle.text?(o.openBlock(),o.createElementBlock("text",{key:1,"text-anchor":"middle",fill:c.value.style.chart.layout.title.subtitle.color,"font-weight":c.value.style.chart.layout.title.subtitle.bold?"bold":"normal","font-size":c.value.style.chart.layout.title.subtitle.fontSize,x:p.value.width/2,y:48+c.value.style.chart.layout.title.subtitle.fontSize+c.value.style.chart.layout.title.subtitle.offsetY,onClick:G},o.toDisplayString(c.value.style.chart.layout.title.subtitle.text),9,jV)):o.createCommentVNode("",!0)])),o.createElementVNode("defs",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(v.value,(H,ue)=>(o.openBlock(),o.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`root_gradient_${r.value}_${H.rootIndex}`},[o.createElementVNode("stop",{offset:"0%","stop-color":`${o.unref(ks)(H.color,.05)}${o.unref(Gn)[100-c.value.style.chart.layout.roots.gradientIntensity]}`},null,8,XV),o.createElementVNode("stop",{offset:"100%","stop-color":H.color},null,8,qV)],8,WV))),256)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(v.value,H=>(o.openBlock(),o.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`branch_gradient_${r.value}_${H.rootIndex}`},[o.createElementVNode("stop",{offset:"0%","stop-color":H.color},null,8,JV),o.createElementVNode("stop",{offset:"100%","stop-color":`${o.unref(ks)(H.color,.02)}${o.unref(Gn)[100-c.value.style.chart.layout.branches.gradientIntensity]}`},null,8,ZV)],8,YV))),256)),o.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nutpick_${r.value}`},[o.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${o.unref(Gn)[0]}`},null,8,t$),o.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${o.unref(Gn)[c.value.style.chart.layout.nuts.selected.gradientIntensity]}`},null,8,r$),o.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${o.unref(Gn)[0]}`},null,8,n$)],8,e$),o.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_${r.value}`},[o.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${o.unref(Gn)[0]}`},null,8,a$),o.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${o.unref(Gn)[c.value.style.chart.layout.nuts.gradientIntensity]}`},null,8,i$),o.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${o.unref(Gn)[0]}`},null,8,o$)],8,A$),o.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_underlayer_${r.value}`},[o.createElementVNode("stop",{offset:"0%","stop-color":`${c.value.style.chart.backgroundColor}${o.unref(Gn)[100]}`},null,8,l$),o.createElementVNode("stop",{offset:"80%","stop-color":`${c.value.style.chart.backgroundColor}${o.unref(Gn)[60]}`},null,8,c$),o.createElementVNode("stop",{offset:"100%","stop-color":`${c.value.style.chart.backgroundColor}${o.unref(Gn)[0]}`},null,8,u$)],8,s$)]),c.value.style.chart.layout.grandTotal.show?(o.openBlock(),o.createElementBlock("g",h$,[o.createElementVNode("text",{x:d.value.seedX,y:32+c.value.style.chart.layout.grandTotal.offsetY,"font-size":c.value.style.chart.layout.grandTotal.fontSize,"font-weight":c.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:c.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:G},o.toDisplayString(c.value.style.chart.layout.grandTotal.text),9,f$),o.createElementVNode("text",{x:d.value.seedX,y:38+c.value.style.chart.layout.grandTotal.fontSize+c.value.style.chart.layout.grandTotal.offsetY,"font-size":c.value.style.chart.layout.grandTotal.fontSize,"font-weight":c.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:c.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:G},o.toDisplayString(c.value.style.chart.layout.grandTotal.prefix)+" "+o.toDisplayString(y.value.toFixed(c.value.style.chart.layout.grandTotal.roundingValue))+" "+o.toDisplayString(c.value.style.chart.layout.grandTotal.suffix),9,d$)])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(U.value,H=>(o.openBlock(),o.createElementBlock("g",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(p.value.branchSize,(ue,Te)=>(o.openBlock(),o.createElementBlock("path",{d:`M
|
|
374
374
|
${H.x1},${H.y1+Te}
|
|
375
375
|
C${H.x1-20},${H.y1+Te}
|
|
376
376
|
${H.x1-80},${H.y1+Te}
|
|
377
377
|
${I(H).x+I(H).r/2}, ${I(H).y}
|
|
378
|
-
`,stroke:`${H.color}${o.unref(Gn)[c.value.style.chart.layout.links.opacity]}`,fill:"none","stroke-width":"2","shape-rendering":"cirspEdges",style:o.normalizeStyle(`opacity:${Z(H)?1:0}`),onClick:J[1]||(J[1]=(...Ne)=>Q.restTree&&Q.restTree(...Ne))},null,12,g$))),256))]))),256)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(D.value,H=>(o.openBlock(),o.createElementBlock("circle",{cx:H.x,cy:H.y,r:H.r,fill:c.value.style.chart.layout.roots.unerlayerColor,stroke:"none",style:o.normalizeStyle(`cursor:pointer; opacity:${Z(H)?1:.05}`)},null,12,p$))),256)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(D.value,H=>(o.openBlock(),o.createElementBlock("circle",{cx:H.x,cy:H.y,r:H.r,fill:c.value.style.chart.layout.roots.useGradient?`url(#root_gradient_${r.value}_${H.rootIndex})`:H.color,stroke:c.value.style.chart.layout.roots.stroke,"stroke-width":c.value.style.chart.layout.roots.strokeWidth,style:o.normalizeStyle(`cursor:pointer; opacity:${Z(H)?1:.05}`),onClick:ue=>fe(H)},null,12,m$))),256)),c.value.style.chart.layout.roots.labels.show?(o.openBlock(),o.createElementBlock("g",v$,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(D.value,H=>(o.openBlock(),o.createElementBlock("text",{x:H.x,y:H.y+c.value.style.chart.layout.roots.labels.fontSize/2.6,"text-anchor":"middle","font-size":c.value.style.chart.layout.roots.labels.fontSize,fill:c.value.style.chart.layout.roots.labels.adaptColorToBackground?o.unref(tx)(H.color):c.value.style.chart.layout.roots.labels.color,"font-weight":"bold",stroke:"black","stroke-width":"0.3",style:o.normalizeStyle(`cursor:pointer; opacity:${Z(H)?1:.05}`),onClick:ue=>fe(H)},o.toDisplayString(c.value.style.chart.layout.roots.labels.prefix)+" "+o.toDisplayString(H.total.toFixed(c.value.style.chart.layout.roots.labels.roundingValue))+" "+o.toDisplayString(c.value.style.chart.layout.roots.labels.suffix),13,y$))),256)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(D.value,H=>(o.openBlock(),o.createElementBlock("g",null,[O.value&&H.rootIndex===O.value.rootIndex||N.value&&H.rootIndex===N.value.rootIndex||L.value&&H.rootIndex===L.value.rootIndex?(o.openBlock(),o.createElementBlock("g",w$,[o.createElementVNode("text",{x:H.x,y:H.y+H.r+24,"text-anchor":"middle",fill:c.value.style.chart.layout.roots.labels.name.color,"font-size":c.value.style.chart.layout.roots.labels.name.fontSize,"font-weight":c.value.style.chart.layout.roots.labels.name.bold?"bold":"normal",onClick:G},o.toDisplayString(H.name),9,B$)])):o.createCommentVNode("",!0)]))),256))])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(U.value,H=>(o.openBlock(),o.createElementBlock("rect",{x:H.x1,y:H.y1,height:p.value.branchSize,width:H.x2-H.x1,fill:c.value.style.chart.layout.branches.underlayerColor,rx:c.value.style.chart.layout.branches.borderRadius,stroke:"none",style:o.normalizeStyle(`opacity:${Z(H)?1:.05}`),onClick:ue=>he(H)},null,12,x$))),256)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(U.value,H=>(o.openBlock(),o.createElementBlock("rect",{x:H.x1,y:H.y1,height:p.value.branchSize,width:H.x2-H.x1,fill:c.value.style.chart.layout.branches.useGradient?`url(#branch_gradient_${r.value}_${H.rootIndex})`:H.color,rx:c.value.style.chart.layout.branches.borderRadius,stroke:c.value.style.chart.layout.branches.stroke,"stroke-width":c.value.style.chart.layout.branches.strokeWidth,style:o.normalizeStyle(`cursor:pointer; opacity:${Z(H)?1:.05}`),onClick:ue=>he(H)},null,12,b$))),256)),c.value.style.chart.layout.branches.labels.dataLabels.show?(o.openBlock(),o.createElementBlock("g",C$,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(U.value,H=>(o.openBlock(),o.createElementBlock("g",null,[H.proportionToRoot*100>c.value.style.chart.layout.branches.labels.dataLabels.hideUnderValue?(o.openBlock(),o.createElementBlock("text",{key:0,x:H.x1+6,y:H.y1+p.value.branchSize/1.5,"text-anchor":"start",fill:o.unref(tx)(H.color),"font-size":c.value.style.chart.layout.branches.labels.dataLabels.fontSize,"font-weight":"bold",stroke:"black","stroke-width":"0.3",style:o.normalizeStyle(`cursor:pointer; opacity:${Z(H)?1:.05}`),onClick:ue=>he(H)},o.toDisplayString(c.value.style.chart.layout.branches.labels.dataLabels.prefix)+" "+o.toDisplayString(H.value.toFixed(c.value.style.chart.layout.branches.labels.dataLabels.roundingValue))+" "+o.toDisplayString(c.value.style.chart.layout.branches.labels.dataLabels.suffix),13,E$)):o.createCommentVNode("",!0)]))),256))])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(U.value,H=>(o.openBlock(),o.createElementBlock("g",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(zh)({series:H.breakdown,base:1},H.x2+24+c.value.style.chart.layout.nuts.offsetX,H.y1+p.value.branchSize/2,p.value.branchSize/3,p.value.branchSize/3),(ue,Te)=>(o.openBlock(),o.createElementBlock("path",{d:ue.path,stroke:ue.color,"stroke-width":10,fill:"none",style:o.normalizeStyle(`opacity:${Z(H)?1:.1}`)},null,12,F$))),256)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(U.value,ue=>(o.openBlock(),o.createElementBlock("circle",{cx:ue.x2+24+c.value.style.chart.layout.nuts.offsetX,cy:ue.y1+p.value.branchSize/2,r:6,fill:c.value.style.chart.backgroundColor,onClick:Te=>ce(ue),style:{cursor:"pointer"}},null,8,S$))),256)),o.createElementVNode("circle",{fill:c.value.style.chart.layout.nuts.useGradient?`url(#nut_${r.value})`:"transparent",cx:H.x2+24+c.value.style.chart.layout.nuts.offsetX,cy:H.y1+p.value.branchSize/2,r:p.value.branchSize/2+2,onClick:ue=>ce(H),style:o.normalizeStyle(`cursor:pointer;opacity:${Z(H)?1:.1}`)},null,12,_$)]))),256)),c.value.style.chart.layout.branches.labels.show&&!N.value?(o.openBlock(),o.createElementBlock("g",k$,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(U.value,H=>(o.openBlock(),o.createElementBlock("text",{x:H.x2+p.value.branchSize+24+c.value.style.chart.layout.nuts.offsetX,y:H.y1+p.value.branchSize/2+5,"font-size":c.value.style.chart.layout.branches.labels.fontSize,"font-weight":c.value.style.chart.layout.branches.labels.bold?"bold":"normal","text-anchor":"start",style:o.normalizeStyle(`opacity:${Z(H)?1:.1}`)},o.toDisplayString(H.name),13,T$))),256))])):o.createCommentVNode("",!0),o.createElementVNode("line",{x1:256+p.value.padding.left,x2:256+p.value.padding.left,y1:d.value.top,y2:d.value.bottom,stroke:c.value.style.chart.layout.verticalSeparator.stroke,"stroke-width":c.value.style.chart.layout.verticalSeparator.strokeWidth},null,8,N$),!O.value&&!N.value?(o.openBlock(),o.createElementBlock("foreignObject",{key:5,x:0,y:d.value.bottom,height:p.value.height-d.value.bottom,width:p.value.width,style:{overflow:"visible"},onClick:G},[o.createElementVNode("div",U$,[o.createElementVNode("div",I$,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(D.value,H=>(o.openBlock(),o.createElementBlock("div",{style:o.normalizeStyle(`display:flex;align-items:center;gap:3px;flex-direction:row;font-size:${c.value.style.chart.layout.legend.fontSize}px;`)},[(o.openBlock(),o.createElementBlock("svg",Q$,[o.createElementVNode("circle",{cx:"10",cy:"10",r:"10",fill:H.color,stroke:"none"},null,8,D$)])),o.createElementVNode("span",null,o.toDisplayString(H.name),1),o.createTextVNode(" : "),o.createElementVNode("b",null,o.toDisplayString(c.value.style.chart.layout.legend.prefix)+" "+o.toDisplayString(H.total.toFixed(c.value.style.chart.layout.legend.roundingValue))+" "+o.toDisplayString(c.value.style.chart.layout.legend.suffix),1),o.createTextVNode("("+o.toDisplayString((H.total/y.value*100).toFixed(c.value.style.chart.layout.legend.roundingPercentage))+"%) ",1)],4))),256))])])],8,L$)):o.createCommentVNode("",!0),O.value&&re.value?(o.openBlock(),o.createElementBlock("g",O$,[(o.openBlock(),o.createElementBlock("foreignObject",{x:0,y:Le(),height:p.value.height-d.value.bottom,width:p.value.width,style:{overflow:"visible"},onClick:G},[o.createElementVNode("div",M$,[o.createElementVNode("b",null,o.toDisplayString(O.value.name),1),o.createElementVNode("div",R$,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(O.value.breakdown,(H,ue)=>(o.openBlock(),o.createElementBlock("div",{style:o.normalizeStyle(`display:flex;align-items:center;gap:6px;flex-direction:row;font-size:${c.value.style.chart.layout.legend.fontSize}px;`)},[(o.openBlock(),o.createElementBlock("svg",H$,[o.createElementVNode("circle",{cx:"10",cy:"10",r:"10",fill:H.color,stroke:"none"},null,8,V$)])),o.createElementVNode("span",null,[o.createTextVNode(o.toDisplayString(H.name)+" : ",1),o.createElementVNode("b",null,o.toDisplayString(c.value.style.chart.layout.legend.prefix)+" "+o.toDisplayString(H.value.toFixed(c.value.style.chart.layout.nuts.selected.labels.roundingValue))+" "+o.toDisplayString(c.value.style.chart.layout.legend.suffix),1),o.createTextVNode(" ("+o.toDisplayString((H.proportionToBranch*100).toFixed(c.value.style.chart.layout.nuts.selected.labels.roundingPercentage))+"%)",1)])],4))),256))])])],8,P$)),o.createElementVNode("circle",{cx:O.value.x2+24+c.value.style.chart.layout.nuts.offsetX,cy:O.value.y1+p.value.branchSize/2,r:256,fill:`url(#nut_underlayer_${r.value})`,onClick:le,class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,$$),o.createElementVNode("circle",{cx:O.value.x2+24+c.value.style.chart.layout.nuts.offsetX,cy:O.value.y1+p.value.branchSize/2,r:118,fill:c.value.style.chart.backgroundColor,onClick:le,class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,z$),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(re.value,H=>(o.openBlock(),o.createElementBlock("path",{d:H.path,stroke:H.color,"stroke-width":64,fill:"none",onClick:le,class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,K$))),256)),o.createElementVNode("circle",{cx:O.value.x2+24+c.value.style.chart.layout.nuts.offsetX,cy:O.value.y1+p.value.branchSize/2,r:100,fill:`url(#nutpick_${r.value})`,onClick:le,class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,G$),o.createElementVNode("circle",{cx:O.value.x2+24+c.value.style.chart.layout.nuts.offsetX,cy:O.value.y1+p.value.branchSize/2,r:48,fill:c.value.style.chart.backgroundColor,onClick:le,class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,j$),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(re.value,H=>(o.openBlock(),o.createElementBlock("g",null,[_(H)?(o.openBlock(),o.createElementBlock("path",{key:0,d:F(H),stroke:H.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,W$)):o.createCommentVNode("",!0)]))),256)),o.createElementVNode("text",{x:O.value.x2+24+c.value.style.chart.layout.nuts.offsetX,y:O.value.y1+8,fill:c.value.style.chart.layout.nuts.selected.labels.core.total.color,"font-size":c.value.style.chart.layout.nuts.selected.labels.core.total.fontSize,"font-weight":c.value.style.chart.layout.nuts.selected.labels.core.total.bold?"bold":"normal","text-anchor":"middle",onClick:le,class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},o.toDisplayString(c.value.translations.total),11,X$),o.createElementVNode("text",{x:O.value.x2+24+c.value.style.chart.layout.nuts.offsetX,y:O.value.y1+36,fill:c.value.style.chart.layout.nuts.selected.labels.core.value.color,"font-size":c.value.style.chart.layout.nuts.selected.labels.core.value.fontSize,"font-weight":c.value.style.chart.layout.nuts.selected.labels.core.value.bold?"bold":"normal","text-anchor":"middle",onClick:le,class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},o.toDisplayString(c.value.style.chart.layout.nuts.selected.labels.core.value.prefix)+" "+o.toDisplayString(O.value.value.toFixed(c.value.style.chart.layout.nuts.selected.roundingValue))+" "+o.toDisplayString(c.value.style.chart.layout.nuts.selected.labels.core.value.suffix),11,q$),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(re.value,(H,ue)=>(o.openBlock(),o.createElementBlock("g",null,[_(H)?(o.openBlock(),o.createElementBlock("text",{key:0,x:pe(H).x,"text-anchor":pe(H).anchor,y:me(H),fill:H.color,"font-size":c.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:o.normalizeStyle(`font-weight:${c.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")}," ⬤ ",14,Y$)):o.createCommentVNode("",!0),_(H)?(o.openBlock(),o.createElementBlock("text",{key:1,x:pe(H,!0).x,"text-anchor":pe(H,!0).anchor,y:me(H),fill:c.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":c.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:o.normalizeStyle(`font-weight:${c.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},o.toDisplayString(O.value.breakdown[ue].name),15,J$)):o.createCommentVNode("",!0)]))),256)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(re.value,(H,ue)=>(o.openBlock(),o.createElementBlock("g",null,[_(H)?(o.openBlock(),o.createElementBlock("text",{key:0,x:pe(H,!0).x,"text-anchor":pe(H).anchor,y:me(H)+c.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,fill:c.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":c.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:o.normalizeStyle(`font-weight:${c.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},o.toDisplayString((O.value.breakdown[ue].value/O.value.value*100).toFixed(c.value.style.chart.layout.nuts.selected.labels.roundingPercentage))+"% "+o.toDisplayString(c.value.translations.of)+" "+o.toDisplayString(O.value.breakdown[ue].branchName)+" ("+o.toDisplayString(c.value.style.chart.layout.nuts.selected.labels.dataLabels.prefix)+" "+o.toDisplayString(O.value.breakdown[ue].value)+" "+o.toDisplayString(c.value.style.chart.layout.nuts.selected.labels.dataLabels.suffix)+") ",15,Z$)):o.createCommentVNode("",!0),_(H)?(o.openBlock(),o.createElementBlock("text",{key:1,x:pe(H,!0).x,"text-anchor":pe(H).anchor,y:me(H)+c.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize*2,fill:c.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":c.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:o.normalizeStyle(`font-weight:${c.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},o.toDisplayString((O.value.breakdown[ue].proportionToRoot*100).toFixed(c.value.style.chart.layout.nuts.selected.labels.roundingPercentage))+"% "+o.toDisplayString(c.value.translations.of)+" "+o.toDisplayString(O.value.breakdown[ue].rootName),15,ez)):o.createCommentVNode("",!0),_(H)?(o.openBlock(),o.createElementBlock("text",{key:2,x:pe(H,!0).x,"text-anchor":pe(H).anchor,y:me(H)+c.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize*3,fill:c.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":c.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:o.normalizeStyle(`font-weight:${c.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},o.toDisplayString((O.value.breakdown[ue].proportionToTree*100).toFixed(c.value.style.chart.layout.nuts.selected.labels.roundingPercentage))+"% "+o.toDisplayString(c.value.translations.proportionToTree),15,tz)):o.createCommentVNode("",!0)]))),256))])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(U.value,H=>(o.openBlock(),o.createElementBlock("g",null,[N.value&&N.value.id===H.id&&!O.value?(o.openBlock(),o.createElementBlock("text",{key:0,x:H.x1+6,y:H.y1+p.value.branchSize+24,"font-weight":"bold","text-anchor":"start","font-size":c.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:c.value.style.chart.layout.branches.labels.color,onClick:G},o.toDisplayString(H.name)+" : "+o.toDisplayString(c.value.style.chart.layout.branches.labels.dataLabels.prefix)+" "+o.toDisplayString(H.value.toFixed(c.value.style.chart.layout.branches.labels.dataLabels.roundingValue))+" "+o.toDisplayString(c.value.style.chart.layout.branches.labels.dataLabels.suffix),9,rz)):o.createCommentVNode("",!0),N.value&&N.value.id===H.id&&!O.value?(o.openBlock(),o.createElementBlock("text",{key:1,x:H.x1+6,y:H.y1+p.value.branchSize+48,"text-anchor":"start","font-size":c.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:c.value.style.chart.layout.branches.labels.color,onClick:G},o.toDisplayString((H.proportionToRoot*100).toFixed(c.value.style.chart.layout.branches.labels.dataLabels.roundingPercentage))+"% "+o.toDisplayString(c.value.translations.of)+" "+o.toDisplayString(H.rootName),9,nz)):o.createCommentVNode("",!0),N.value&&N.value.id===H.id&&!O.value?(o.openBlock(),o.createElementBlock("text",{key:2,x:H.x1+6,y:H.y1+p.value.branchSize+72,"text-anchor":"start","font-size":c.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:c.value.style.chart.layout.branches.labels.color,onClick:G},o.toDisplayString((H.value/y.value*100).toFixed(c.value.style.chart.layout.branches.labels.dataLabels.roundingPercentage))+"% "+o.toDisplayString(c.value.translations.proportionToTree),9,Az)):o.createCommentVNode("",!0)]))),256))],12,zV)):o.createCommentVNode("",!0),g.value.showTable?(o.openBlock(),o.createElementBlock("div",{key:2,onClick:R,class:"vue-ui-chestnut-table",style:"width:100%;overflow-x:auto"},[o.createElementVNode("table",null,[o.createElementVNode("thead",null,[c.value.style.chart.layout.title.text?(o.openBlock(),o.createElementBlock("tr",az,[o.createElementVNode("th",{colspan:"12",style:o.normalizeStyle(`background:${c.value.table.th.backgroundColor};color:${c.value.table.th.color};outline:${c.value.table.th.outline}`)},[o.createElementVNode("span",null,o.toDisplayString(c.value.style.chart.layout.title.text),1),c.value.style.chart.layout.title.subtitle.text?(o.openBlock(),o.createElementBlock("span",iz," : "+o.toDisplayString(c.value.style.chart.layout.title.subtitle.text),1)):o.createCommentVNode("",!0)],4)])):o.createCommentVNode("",!0),o.createElementVNode("tr",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(B.value.head,H=>(o.openBlock(),o.createElementBlock("th",{style:o.normalizeStyle(`background:${c.value.table.th.backgroundColor};color:${c.value.table.th.color};outline:${c.value.table.th.outline}`)},o.toDisplayString(H),5))),256))])]),o.createElementVNode("tbody",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(B.value.body,(H,ue)=>(o.openBlock(),o.createElementBlock("tr",null,[o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},[B.value.body[ue-1]&&B.value.body[ue-1].rootName===H.rootName?(o.openBlock(),o.createElementBlock("span",oz)):(o.openBlock(),o.createElementBlock("span",sz,o.toDisplayString(H.rootName),1))],4),o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},[B.value.body[ue-1]&&B.value.body[ue-1].rootName===H.rootName?(o.openBlock(),o.createElementBlock("span",lz)):(o.openBlock(),o.createElementBlock("span",cz,o.toDisplayString(H.rootValue.toFixed(c.value.table.td.roundingValue)),1))],4),o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},[B.value.body[ue-1]&&B.value.body[ue-1].rootName===H.rootName?(o.openBlock(),o.createElementBlock("span",uz)):(o.openBlock(),o.createElementBlock("span",hz,o.toDisplayString((H.rootToTotal*100).toFixed(c.value.table.td.roundingPercentage))+"% ",1))],4),o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},[B.value.body[ue-1]&&B.value.body[ue-1].branchName===H.branchName?(o.openBlock(),o.createElementBlock("span",fz)):(o.openBlock(),o.createElementBlock("span",dz,o.toDisplayString(H.branchName),1))],4),o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},[B.value.body[ue-1]&&B.value.body[ue-1].branchName===H.branchName?(o.openBlock(),o.createElementBlock("span",gz)):(o.openBlock(),o.createElementBlock("span",pz,o.toDisplayString(H.branchValue.toFixed(c.value.table.td.roundingValue)),1))],4),o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},[B.value.body[ue-1]&&B.value.body[ue-1].branchName===H.branchName?(o.openBlock(),o.createElementBlock("span",mz)):(o.openBlock(),o.createElementBlock("span",vz,o.toDisplayString((H.branchToRoot*100).toFixed(c.value.table.td.roundingPercentage))+"% ",1))],4),o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},[B.value.body[ue-1]&&B.value.body[ue-1].branchName===H.branchName?(o.openBlock(),o.createElementBlock("span",yz)):(o.openBlock(),o.createElementBlock("span",wz,o.toDisplayString((H.branchToTotal*100).toFixed(c.value.table.td.roundingPercentage))+"% ",1))],4),o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},o.toDisplayString(H.nutName),5),o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},o.toDisplayString(H.nutValue.toFixed(c.value.table.td.roundingValue)),5),o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},o.toDisplayString((H.nutToBranch*100).toFixed(c.value.table.td.roundingPercentage))+"% ",5),o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},o.toDisplayString((H.nutToRoot*100).toFixed(c.value.table.td.roundingPercentage))+"% ",5),o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},o.toDisplayString((H.nutToTotal*100).toFixed(c.value.table.td.roundingPercentage))+"% ",5)]))),256))])])])):o.createCommentVNode("",!0)],12,DV))}},[["__scopeId","data-v-2808f151"]]);/*! @license DOMPurify 2.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.7/LICENSE */function Qi(t){"@babel/helpers - typeof";return Qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qi(t)}function N1(t,e){return N1=Object.setPrototypeOf||function(n,A){return n.__proto__=A,n},N1(t,e)}function xz(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function jh(t,e,r){return xz()?jh=Reflect.construct:jh=function(A,a,i){var s=[null];s.push.apply(s,a);var l=Function.bind.apply(A,s),u=new l;return i&&N1(u,i.prototype),u},jh.apply(null,arguments)}function YA(t){return bz(t)||Cz(t)||Ez(t)||Fz()}function bz(t){if(Array.isArray(t))return L1(t)}function Cz(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Ez(t,e){if(t){if(typeof t=="string")return L1(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return L1(t,e)}}function L1(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Fz(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
378
|
+
`,stroke:`${H.color}${o.unref(Gn)[c.value.style.chart.layout.links.opacity]}`,fill:"none","stroke-width":"2","shape-rendering":"cirspEdges",style:o.normalizeStyle(`opacity:${Z(H)?1:0}`),onClick:G},null,12,g$))),256))]))),256)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(D.value,H=>(o.openBlock(),o.createElementBlock("circle",{cx:H.x,cy:H.y,r:H.r,fill:c.value.style.chart.layout.roots.unerlayerColor,stroke:"none",style:o.normalizeStyle(`cursor:pointer; opacity:${Z(H)?1:.05}`)},null,12,p$))),256)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(D.value,H=>(o.openBlock(),o.createElementBlock("circle",{cx:H.x,cy:H.y,r:H.r,fill:c.value.style.chart.layout.roots.useGradient?`url(#root_gradient_${r.value}_${H.rootIndex})`:H.color,stroke:c.value.style.chart.layout.roots.stroke,"stroke-width":c.value.style.chart.layout.roots.strokeWidth,style:o.normalizeStyle(`cursor:pointer; opacity:${Z(H)?1:.05}`),onClick:ue=>fe(H)},null,12,m$))),256)),c.value.style.chart.layout.roots.labels.show?(o.openBlock(),o.createElementBlock("g",v$,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(D.value,H=>(o.openBlock(),o.createElementBlock("text",{x:H.x,y:H.y+c.value.style.chart.layout.roots.labels.fontSize/2.6,"text-anchor":"middle","font-size":c.value.style.chart.layout.roots.labels.fontSize,fill:c.value.style.chart.layout.roots.labels.adaptColorToBackground?o.unref(tx)(H.color):c.value.style.chart.layout.roots.labels.color,"font-weight":"bold",style:o.normalizeStyle(`cursor:pointer; opacity:${Z(H)?1:.05}`),onClick:ue=>fe(H)},o.toDisplayString(c.value.style.chart.layout.roots.labels.prefix)+" "+o.toDisplayString(H.total.toFixed(c.value.style.chart.layout.roots.labels.roundingValue))+" "+o.toDisplayString(c.value.style.chart.layout.roots.labels.suffix),13,y$))),256)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(D.value,H=>(o.openBlock(),o.createElementBlock("g",null,[O.value&&H.rootIndex===O.value.rootIndex||N.value&&H.rootIndex===N.value.rootIndex||L.value&&H.rootIndex===L.value.rootIndex?(o.openBlock(),o.createElementBlock("g",w$,[o.createElementVNode("text",{x:H.x,y:H.y+H.r+24,"text-anchor":"middle",fill:c.value.style.chart.layout.roots.labels.name.color,"font-size":c.value.style.chart.layout.roots.labels.name.fontSize,"font-weight":c.value.style.chart.layout.roots.labels.name.bold?"bold":"normal",onClick:G},o.toDisplayString(H.name),9,B$)])):o.createCommentVNode("",!0)]))),256))])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(U.value,H=>(o.openBlock(),o.createElementBlock("rect",{x:H.x1,y:H.y1,height:p.value.branchSize,width:H.x2-H.x1,fill:c.value.style.chart.layout.branches.underlayerColor,rx:c.value.style.chart.layout.branches.borderRadius,stroke:"none",style:o.normalizeStyle(`opacity:${Z(H)?1:.05}`),onClick:ue=>he(H)},null,12,x$))),256)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(U.value,H=>(o.openBlock(),o.createElementBlock("rect",{x:H.x1,y:H.y1,height:p.value.branchSize,width:H.x2-H.x1,fill:c.value.style.chart.layout.branches.useGradient?`url(#branch_gradient_${r.value}_${H.rootIndex})`:H.color,rx:c.value.style.chart.layout.branches.borderRadius,stroke:c.value.style.chart.layout.branches.stroke,"stroke-width":c.value.style.chart.layout.branches.strokeWidth,style:o.normalizeStyle(`cursor:pointer; opacity:${Z(H)?1:.05}`),onClick:ue=>he(H)},null,12,b$))),256)),c.value.style.chart.layout.branches.labels.dataLabels.show?(o.openBlock(),o.createElementBlock("g",C$,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(U.value,H=>(o.openBlock(),o.createElementBlock("g",null,[H.proportionToRoot*100>c.value.style.chart.layout.branches.labels.dataLabels.hideUnderValue?(o.openBlock(),o.createElementBlock("text",{key:0,x:H.x1+6,y:H.y1+p.value.branchSize/1.5,"text-anchor":"start",fill:o.unref(tx)(H.color),"font-size":c.value.style.chart.layout.branches.labels.dataLabels.fontSize,"font-weight":"bold",style:o.normalizeStyle(`cursor:pointer; opacity:${Z(H)?1:.05}`),onClick:ue=>he(H)},o.toDisplayString(c.value.style.chart.layout.branches.labels.dataLabels.prefix)+" "+o.toDisplayString(H.value.toFixed(c.value.style.chart.layout.branches.labels.dataLabels.roundingValue))+" "+o.toDisplayString(c.value.style.chart.layout.branches.labels.dataLabels.suffix),13,E$)):o.createCommentVNode("",!0)]))),256))])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(U.value,H=>(o.openBlock(),o.createElementBlock("g",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(zh)({series:H.breakdown,base:1},H.x2+24+c.value.style.chart.layout.nuts.offsetX,H.y1+p.value.branchSize/2,p.value.branchSize/3,p.value.branchSize/3),(ue,Te)=>(o.openBlock(),o.createElementBlock("path",{d:ue.path,stroke:ue.color,"stroke-width":10,fill:"none",style:o.normalizeStyle(`opacity:${Z(H)?1:.1}`)},null,12,F$))),256)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(U.value,ue=>(o.openBlock(),o.createElementBlock("circle",{cx:ue.x2+24+c.value.style.chart.layout.nuts.offsetX,cy:ue.y1+p.value.branchSize/2,r:6,fill:c.value.style.chart.backgroundColor,onClick:Te=>ce(ue),style:{cursor:"pointer"}},null,8,S$))),256)),o.createElementVNode("circle",{fill:c.value.style.chart.layout.nuts.useGradient?`url(#nut_${r.value})`:"transparent",cx:H.x2+24+c.value.style.chart.layout.nuts.offsetX,cy:H.y1+p.value.branchSize/2,r:p.value.branchSize/2+2,onClick:ue=>ce(H),style:o.normalizeStyle(`cursor:pointer;opacity:${Z(H)?1:.1}`)},null,12,_$)]))),256)),c.value.style.chart.layout.branches.labels.show&&!N.value?(o.openBlock(),o.createElementBlock("g",k$,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(U.value,H=>(o.openBlock(),o.createElementBlock("text",{x:H.x2+p.value.branchSize+24+c.value.style.chart.layout.nuts.offsetX,y:H.y1+p.value.branchSize/2+5,"font-size":c.value.style.chart.layout.branches.labels.fontSize,"font-weight":c.value.style.chart.layout.branches.labels.bold?"bold":"normal","text-anchor":"start",style:o.normalizeStyle(`opacity:${Z(H)?1:.1}`)},o.toDisplayString(H.name),13,T$))),256))])):o.createCommentVNode("",!0),o.createElementVNode("line",{x1:256+p.value.padding.left,x2:256+p.value.padding.left,y1:d.value.top,y2:d.value.bottom,stroke:c.value.style.chart.layout.verticalSeparator.stroke,"stroke-width":c.value.style.chart.layout.verticalSeparator.strokeWidth},null,8,N$),!O.value&&!N.value?(o.openBlock(),o.createElementBlock("foreignObject",{key:5,x:0,y:d.value.bottom,height:p.value.height-d.value.bottom,width:p.value.width,style:{overflow:"visible"},onClick:G},[o.createElementVNode("div",U$,[o.createElementVNode("div",I$,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(D.value,H=>(o.openBlock(),o.createElementBlock("div",{style:o.normalizeStyle(`display:flex;align-items:center;gap:3px;flex-direction:row;font-size:${c.value.style.chart.layout.legend.fontSize}px;`)},[(o.openBlock(),o.createElementBlock("svg",Q$,[o.createElementVNode("circle",{cx:"10",cy:"10",r:"10",fill:H.color,stroke:"none"},null,8,D$)])),o.createElementVNode("span",null,o.toDisplayString(H.name),1),o.createTextVNode(" : "),o.createElementVNode("b",null,o.toDisplayString(c.value.style.chart.layout.legend.prefix)+" "+o.toDisplayString(H.total.toFixed(c.value.style.chart.layout.legend.roundingValue))+" "+o.toDisplayString(c.value.style.chart.layout.legend.suffix),1),o.createTextVNode("("+o.toDisplayString((H.total/y.value*100).toFixed(c.value.style.chart.layout.legend.roundingPercentage))+"%) ",1)],4))),256))])])],8,L$)):o.createCommentVNode("",!0),O.value&&re.value?(o.openBlock(),o.createElementBlock("g",O$,[(o.openBlock(),o.createElementBlock("foreignObject",{x:0,y:Le(),height:p.value.height-d.value.bottom,width:p.value.width,style:{overflow:"visible"},onClick:G},[o.createElementVNode("div",M$,[o.createElementVNode("b",null,o.toDisplayString(O.value.name),1),o.createElementVNode("div",R$,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(O.value.breakdown,(H,ue)=>(o.openBlock(),o.createElementBlock("div",{style:o.normalizeStyle(`display:flex;align-items:center;gap:6px;flex-direction:row;font-size:${c.value.style.chart.layout.legend.fontSize}px;`)},[(o.openBlock(),o.createElementBlock("svg",H$,[o.createElementVNode("circle",{cx:"10",cy:"10",r:"10",fill:H.color,stroke:"none"},null,8,V$)])),o.createElementVNode("span",null,[o.createTextVNode(o.toDisplayString(H.name)+" : ",1),o.createElementVNode("b",null,o.toDisplayString(c.value.style.chart.layout.legend.prefix)+" "+o.toDisplayString(H.value.toFixed(c.value.style.chart.layout.nuts.selected.labels.roundingValue))+" "+o.toDisplayString(c.value.style.chart.layout.legend.suffix),1),o.createTextVNode(" ("+o.toDisplayString((H.proportionToBranch*100).toFixed(c.value.style.chart.layout.nuts.selected.labels.roundingPercentage))+"%)",1)])],4))),256))])])],8,P$)),o.createElementVNode("circle",{cx:O.value.x2+24+c.value.style.chart.layout.nuts.offsetX,cy:O.value.y1+p.value.branchSize/2,r:256,fill:`url(#nut_underlayer_${r.value})`,onClick:le,class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,$$),o.createElementVNode("circle",{cx:O.value.x2+24+c.value.style.chart.layout.nuts.offsetX,cy:O.value.y1+p.value.branchSize/2,r:118,fill:c.value.style.chart.backgroundColor,onClick:le,class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,z$),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(re.value,H=>(o.openBlock(),o.createElementBlock("path",{d:H.path,stroke:H.color,"stroke-width":64,fill:"none",onClick:le,class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,K$))),256)),o.createElementVNode("circle",{cx:O.value.x2+24+c.value.style.chart.layout.nuts.offsetX,cy:O.value.y1+p.value.branchSize/2,r:100,fill:`url(#nutpick_${r.value})`,onClick:le,class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,G$),o.createElementVNode("circle",{cx:O.value.x2+24+c.value.style.chart.layout.nuts.offsetX,cy:O.value.y1+p.value.branchSize/2,r:48,fill:c.value.style.chart.backgroundColor,onClick:le,class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,j$),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(re.value,H=>(o.openBlock(),o.createElementBlock("g",null,[_(H)?(o.openBlock(),o.createElementBlock("path",{key:0,d:F(H),stroke:H.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,W$)):o.createCommentVNode("",!0)]))),256)),o.createElementVNode("text",{x:O.value.x2+24+c.value.style.chart.layout.nuts.offsetX,y:O.value.y1+8,fill:c.value.style.chart.layout.nuts.selected.labels.core.total.color,"font-size":c.value.style.chart.layout.nuts.selected.labels.core.total.fontSize,"font-weight":c.value.style.chart.layout.nuts.selected.labels.core.total.bold?"bold":"normal","text-anchor":"middle",onClick:le,class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},o.toDisplayString(c.value.translations.total),11,X$),o.createElementVNode("text",{x:O.value.x2+24+c.value.style.chart.layout.nuts.offsetX,y:O.value.y1+36,fill:c.value.style.chart.layout.nuts.selected.labels.core.value.color,"font-size":c.value.style.chart.layout.nuts.selected.labels.core.value.fontSize,"font-weight":c.value.style.chart.layout.nuts.selected.labels.core.value.bold?"bold":"normal","text-anchor":"middle",onClick:le,class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},o.toDisplayString(c.value.style.chart.layout.nuts.selected.labels.core.value.prefix)+" "+o.toDisplayString(O.value.value.toFixed(c.value.style.chart.layout.nuts.selected.roundingValue))+" "+o.toDisplayString(c.value.style.chart.layout.nuts.selected.labels.core.value.suffix),11,q$),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(re.value,(H,ue)=>(o.openBlock(),o.createElementBlock("g",null,[_(H)?(o.openBlock(),o.createElementBlock("text",{key:0,x:pe(H).x,"text-anchor":pe(H).anchor,y:me(H),fill:H.color,"font-size":c.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:o.normalizeStyle(`font-weight:${c.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")}," ⬤ ",14,Y$)):o.createCommentVNode("",!0),_(H)?(o.openBlock(),o.createElementBlock("text",{key:1,x:pe(H,!0).x,"text-anchor":pe(H,!0).anchor,y:me(H),fill:c.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":c.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:o.normalizeStyle(`font-weight:${c.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},o.toDisplayString(O.value.breakdown[ue].name),15,J$)):o.createCommentVNode("",!0)]))),256)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(re.value,(H,ue)=>(o.openBlock(),o.createElementBlock("g",null,[_(H)?(o.openBlock(),o.createElementBlock("text",{key:0,x:pe(H,!0).x,"text-anchor":pe(H).anchor,y:me(H)+c.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,fill:c.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":c.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:o.normalizeStyle(`font-weight:${c.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},o.toDisplayString((O.value.breakdown[ue].value/O.value.value*100).toFixed(c.value.style.chart.layout.nuts.selected.labels.roundingPercentage))+"% "+o.toDisplayString(c.value.translations.of)+" "+o.toDisplayString(O.value.breakdown[ue].branchName)+" ("+o.toDisplayString(c.value.style.chart.layout.nuts.selected.labels.dataLabels.prefix)+" "+o.toDisplayString(O.value.breakdown[ue].value)+" "+o.toDisplayString(c.value.style.chart.layout.nuts.selected.labels.dataLabels.suffix)+") ",15,Z$)):o.createCommentVNode("",!0),_(H)?(o.openBlock(),o.createElementBlock("text",{key:1,x:pe(H,!0).x,"text-anchor":pe(H).anchor,y:me(H)+c.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize*2,fill:c.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":c.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:o.normalizeStyle(`font-weight:${c.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},o.toDisplayString((O.value.breakdown[ue].proportionToRoot*100).toFixed(c.value.style.chart.layout.nuts.selected.labels.roundingPercentage))+"% "+o.toDisplayString(c.value.translations.of)+" "+o.toDisplayString(O.value.breakdown[ue].rootName),15,ez)):o.createCommentVNode("",!0),_(H)?(o.openBlock(),o.createElementBlock("text",{key:2,x:pe(H,!0).x,"text-anchor":pe(H).anchor,y:me(H)+c.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize*3,fill:c.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":c.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:o.normalizeStyle(`font-weight:${c.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:o.normalizeClass(c.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},o.toDisplayString((O.value.breakdown[ue].proportionToTree*100).toFixed(c.value.style.chart.layout.nuts.selected.labels.roundingPercentage))+"% "+o.toDisplayString(c.value.translations.proportionToTree),15,tz)):o.createCommentVNode("",!0)]))),256))])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(U.value,H=>(o.openBlock(),o.createElementBlock("g",null,[N.value&&N.value.id===H.id&&!O.value?(o.openBlock(),o.createElementBlock("text",{key:0,x:H.x1+6,y:H.y1+p.value.branchSize+24,"font-weight":"bold","text-anchor":"start","font-size":c.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:c.value.style.chart.layout.branches.labels.color,onClick:G},o.toDisplayString(H.name)+" : "+o.toDisplayString(c.value.style.chart.layout.branches.labels.dataLabels.prefix)+" "+o.toDisplayString(H.value.toFixed(c.value.style.chart.layout.branches.labels.dataLabels.roundingValue))+" "+o.toDisplayString(c.value.style.chart.layout.branches.labels.dataLabels.suffix),9,rz)):o.createCommentVNode("",!0),N.value&&N.value.id===H.id&&!O.value?(o.openBlock(),o.createElementBlock("text",{key:1,x:H.x1+6,y:H.y1+p.value.branchSize+48,"text-anchor":"start","font-size":c.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:c.value.style.chart.layout.branches.labels.color,onClick:G},o.toDisplayString((H.proportionToRoot*100).toFixed(c.value.style.chart.layout.branches.labels.dataLabels.roundingPercentage))+"% "+o.toDisplayString(c.value.translations.of)+" "+o.toDisplayString(H.rootName),9,nz)):o.createCommentVNode("",!0),N.value&&N.value.id===H.id&&!O.value?(o.openBlock(),o.createElementBlock("text",{key:2,x:H.x1+6,y:H.y1+p.value.branchSize+72,"text-anchor":"start","font-size":c.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:c.value.style.chart.layout.branches.labels.color,onClick:G},o.toDisplayString((H.value/y.value*100).toFixed(c.value.style.chart.layout.branches.labels.dataLabels.roundingPercentage))+"% "+o.toDisplayString(c.value.translations.proportionToTree),9,Az)):o.createCommentVNode("",!0)]))),256))],12,zV)):o.createCommentVNode("",!0),g.value.showTable?(o.openBlock(),o.createElementBlock("div",{key:2,onClick:R,class:"vue-ui-chestnut-table",style:"width:100%;overflow-x:auto"},[o.createElementVNode("table",null,[o.createElementVNode("thead",null,[c.value.style.chart.layout.title.text?(o.openBlock(),o.createElementBlock("tr",az,[o.createElementVNode("th",{colspan:"12",style:o.normalizeStyle(`background:${c.value.table.th.backgroundColor};color:${c.value.table.th.color};outline:${c.value.table.th.outline}`)},[o.createElementVNode("span",null,o.toDisplayString(c.value.style.chart.layout.title.text),1),c.value.style.chart.layout.title.subtitle.text?(o.openBlock(),o.createElementBlock("span",iz," : "+o.toDisplayString(c.value.style.chart.layout.title.subtitle.text),1)):o.createCommentVNode("",!0)],4)])):o.createCommentVNode("",!0),o.createElementVNode("tr",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(B.value.head,H=>(o.openBlock(),o.createElementBlock("th",{style:o.normalizeStyle(`background:${c.value.table.th.backgroundColor};color:${c.value.table.th.color};outline:${c.value.table.th.outline}`)},o.toDisplayString(H),5))),256))])]),o.createElementVNode("tbody",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(B.value.body,(H,ue)=>(o.openBlock(),o.createElementBlock("tr",null,[o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},[B.value.body[ue-1]&&B.value.body[ue-1].rootName===H.rootName?(o.openBlock(),o.createElementBlock("span",oz)):(o.openBlock(),o.createElementBlock("span",sz,o.toDisplayString(H.rootName),1))],4),o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},[B.value.body[ue-1]&&B.value.body[ue-1].rootName===H.rootName?(o.openBlock(),o.createElementBlock("span",lz)):(o.openBlock(),o.createElementBlock("span",cz,o.toDisplayString(H.rootValue.toFixed(c.value.table.td.roundingValue)),1))],4),o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},[B.value.body[ue-1]&&B.value.body[ue-1].rootName===H.rootName?(o.openBlock(),o.createElementBlock("span",uz)):(o.openBlock(),o.createElementBlock("span",hz,o.toDisplayString((H.rootToTotal*100).toFixed(c.value.table.td.roundingPercentage))+"% ",1))],4),o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},[B.value.body[ue-1]&&B.value.body[ue-1].branchName===H.branchName?(o.openBlock(),o.createElementBlock("span",fz)):(o.openBlock(),o.createElementBlock("span",dz,o.toDisplayString(H.branchName),1))],4),o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},[B.value.body[ue-1]&&B.value.body[ue-1].branchName===H.branchName?(o.openBlock(),o.createElementBlock("span",gz)):(o.openBlock(),o.createElementBlock("span",pz,o.toDisplayString(H.branchValue.toFixed(c.value.table.td.roundingValue)),1))],4),o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},[B.value.body[ue-1]&&B.value.body[ue-1].branchName===H.branchName?(o.openBlock(),o.createElementBlock("span",mz)):(o.openBlock(),o.createElementBlock("span",vz,o.toDisplayString((H.branchToRoot*100).toFixed(c.value.table.td.roundingPercentage))+"% ",1))],4),o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},[B.value.body[ue-1]&&B.value.body[ue-1].branchName===H.branchName?(o.openBlock(),o.createElementBlock("span",yz)):(o.openBlock(),o.createElementBlock("span",wz,o.toDisplayString((H.branchToTotal*100).toFixed(c.value.table.td.roundingPercentage))+"% ",1))],4),o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},o.toDisplayString(H.nutName),5),o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},o.toDisplayString(H.nutValue.toFixed(c.value.table.td.roundingValue)),5),o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},o.toDisplayString((H.nutToBranch*100).toFixed(c.value.table.td.roundingPercentage))+"% ",5),o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},o.toDisplayString((H.nutToRoot*100).toFixed(c.value.table.td.roundingPercentage))+"% ",5),o.createElementVNode("td",{style:o.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},o.toDisplayString((H.nutToTotal*100).toFixed(c.value.table.td.roundingPercentage))+"% ",5)]))),256))])])])):o.createCommentVNode("",!0)],12,DV))}},[["__scopeId","data-v-e94b9419"]]);/*! @license DOMPurify 2.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.7/LICENSE */function Qi(t){"@babel/helpers - typeof";return Qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qi(t)}function N1(t,e){return N1=Object.setPrototypeOf||function(n,A){return n.__proto__=A,n},N1(t,e)}function xz(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function jh(t,e,r){return xz()?jh=Reflect.construct:jh=function(A,a,i){var s=[null];s.push.apply(s,a);var l=Function.bind.apply(A,s),u=new l;return i&&N1(u,i.prototype),u},jh.apply(null,arguments)}function YA(t){return bz(t)||Cz(t)||Ez(t)||Fz()}function bz(t){if(Array.isArray(t))return L1(t)}function Cz(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Ez(t,e){if(t){if(typeof t=="string")return L1(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return L1(t,e)}}function L1(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Fz(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
379
379
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Sz=Object.hasOwnProperty,rx=Object.setPrototypeOf,_z=Object.isFrozen,kz=Object.getPrototypeOf,Tz=Object.getOwnPropertyDescriptor,jn=Object.freeze,JA=Object.seal,Nz=Object.create,nx=typeof Reflect<"u"&&Reflect,Wh=nx.apply,U1=nx.construct;Wh||(Wh=function(e,r,n){return e.apply(r,n)}),jn||(jn=function(e){return e}),JA||(JA=function(e){return e}),U1||(U1=function(e,r){return jh(e,YA(r))});var Lz=LA(Array.prototype.forEach),Ax=LA(Array.prototype.pop),oc=LA(Array.prototype.push),Xh=LA(String.prototype.toLowerCase),I1=LA(String.prototype.toString),Uz=LA(String.prototype.match),ZA=LA(String.prototype.replace),Iz=LA(String.prototype.indexOf),Qz=LA(String.prototype.trim),Wn=LA(RegExp.prototype.test),Q1=Dz(TypeError);function LA(t){return function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),A=1;A<r;A++)n[A-1]=arguments[A];return Wh(t,e,n)}}function Dz(t){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return U1(t,r)}}function Dt(t,e,r){var n;r=(n=r)!==null&&n!==void 0?n:Xh,rx&&rx(t,null);for(var A=e.length;A--;){var a=e[A];if(typeof a=="string"){var i=r(a);i!==a&&(_z(e)||(e[A]=i),a=i)}t[a]=!0}return t}function Eo(t){var e=Nz(null),r;for(r in t)Wh(Sz,t,[r])===!0&&(e[r]=t[r]);return e}function qh(t,e){for(;t!==null;){var r=Tz(t,e);if(r){if(r.get)return LA(r.get);if(typeof r.value=="function")return LA(r.value)}t=kz(t)}function n(A){return console.warn("fallback value for",A),null}return n}var ax=jn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),D1=jn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),O1=jn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Oz=jn(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),P1=jn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Pz=jn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ix=jn(["#text"]),ox=jn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),M1=jn(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),sx=jn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Yh=jn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Mz=JA(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Rz=JA(/<%[\w\W]*|[\w\W]*%>/gm),Hz=JA(/\${[\w\W]*}/gm),Vz=JA(/^data-[\-\w.\u00B7-\uFFFF]/),$z=JA(/^aria-[\-\w]+$/),zz=JA(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Kz=JA(/^(?:\w+script|data):/i),Gz=JA(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),jz=JA(/^html$/i),Wz=function(){return typeof window>"u"?null:window},Xz=function(e,r){if(Qi(e)!=="object"||typeof e.createPolicy!="function")return null;var n=null,A="data-tt-policy-suffix";r.currentScript&&r.currentScript.hasAttribute(A)&&(n=r.currentScript.getAttribute(A));var a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML:function(s){return s},createScriptURL:function(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function lx(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Wz(),e=function(X){return lx(X)};if(e.version="2.4.7",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;var r=t.document,n=t.document,A=t.DocumentFragment,a=t.HTMLTemplateElement,i=t.Node,s=t.Element,l=t.NodeFilter,u=t.NamedNodeMap,c=u===void 0?t.NamedNodeMap||t.MozNamedAttrMap:u,g=t.HTMLFormElement,p=t.DOMParser,d=t.trustedTypes,y=s.prototype,v=qh(y,"cloneNode"),h=qh(y,"nextSibling"),x=qh(y,"childNodes"),C=qh(y,"parentNode");if(typeof a=="function"){var T=n.createElement("template");T.content&&T.content.ownerDocument&&(n=T.content.ownerDocument)}var D=Xz(d,r),Y=D?D.createHTML(""):"",W=n,U=W.implementation,I=W.createNodeIterator,O=W.createDocumentFragment,re=W.getElementsByTagName,N=r.importNode,L={};try{L=Eo(n).documentMode?n.documentMode:{}}catch{}var G={};e.isSupported=typeof C=="function"&&U&&U.createHTMLDocument!==void 0&&L!==9;var Z=Mz,ce=Rz,le=Hz,he=Vz,fe=$z,pe=Kz,me=Gz,Le=zz,F=null,_=Dt({},[].concat(YA(ax),YA(D1),YA(O1),YA(P1),YA(ix))),E=null,B=Dt({},[].concat(YA(ox),YA(M1),YA(sx),YA(Yh))),S=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),R=null,Q=null,J=!0,H=!0,ue=!1,Te=!0,Ne=!1,Me=!1,_e=!1,Ae=!1,Pe=!1,je=!1,Qe=!1,Xe=!0,Ye=!1,Ze="user-content-",ot=!0,At=!1,ft={},vt=null,_t=Dt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Tt=null,dt=Dt({},["audio","video","img","source","image","track"]),xt=null,rt=Dt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ar="http://www.w3.org/1998/Math/MathML",Nt="http://www.w3.org/2000/svg",hr="http://www.w3.org/1999/xhtml",It=hr,zt=!1,Yr=null,Pt=Dt({},[ar,Nt,hr],I1),Er,qt=["application/xhtml+xml","text/html"],An="text/html",Et,Kt=null,bt=n.createElement("form"),Vt=function(X){return X instanceof RegExp||X instanceof Function},yA=function(X){Kt&&Kt===X||((!X||Qi(X)!=="object")&&(X={}),X=Eo(X),Er=qt.indexOf(X.PARSER_MEDIA_TYPE)===-1?Er=An:Er=X.PARSER_MEDIA_TYPE,Et=Er==="application/xhtml+xml"?I1:Xh,F="ALLOWED_TAGS"in X?Dt({},X.ALLOWED_TAGS,Et):_,E="ALLOWED_ATTR"in X?Dt({},X.ALLOWED_ATTR,Et):B,Yr="ALLOWED_NAMESPACES"in X?Dt({},X.ALLOWED_NAMESPACES,I1):Pt,xt="ADD_URI_SAFE_ATTR"in X?Dt(Eo(rt),X.ADD_URI_SAFE_ATTR,Et):rt,Tt="ADD_DATA_URI_TAGS"in X?Dt(Eo(dt),X.ADD_DATA_URI_TAGS,Et):dt,vt="FORBID_CONTENTS"in X?Dt({},X.FORBID_CONTENTS,Et):_t,R="FORBID_TAGS"in X?Dt({},X.FORBID_TAGS,Et):{},Q="FORBID_ATTR"in X?Dt({},X.FORBID_ATTR,Et):{},ft="USE_PROFILES"in X?X.USE_PROFILES:!1,J=X.ALLOW_ARIA_ATTR!==!1,H=X.ALLOW_DATA_ATTR!==!1,ue=X.ALLOW_UNKNOWN_PROTOCOLS||!1,Te=X.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ne=X.SAFE_FOR_TEMPLATES||!1,Me=X.WHOLE_DOCUMENT||!1,Pe=X.RETURN_DOM||!1,je=X.RETURN_DOM_FRAGMENT||!1,Qe=X.RETURN_TRUSTED_TYPE||!1,Ae=X.FORCE_BODY||!1,Xe=X.SANITIZE_DOM!==!1,Ye=X.SANITIZE_NAMED_PROPS||!1,ot=X.KEEP_CONTENT!==!1,At=X.IN_PLACE||!1,Le=X.ALLOWED_URI_REGEXP||Le,It=X.NAMESPACE||hr,S=X.CUSTOM_ELEMENT_HANDLING||{},X.CUSTOM_ELEMENT_HANDLING&&Vt(X.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(S.tagNameCheck=X.CUSTOM_ELEMENT_HANDLING.tagNameCheck),X.CUSTOM_ELEMENT_HANDLING&&Vt(X.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(S.attributeNameCheck=X.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),X.CUSTOM_ELEMENT_HANDLING&&typeof X.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(S.allowCustomizedBuiltInElements=X.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ne&&(H=!1),je&&(Pe=!0),ft&&(F=Dt({},YA(ix)),E=[],ft.html===!0&&(Dt(F,ax),Dt(E,ox)),ft.svg===!0&&(Dt(F,D1),Dt(E,M1),Dt(E,Yh)),ft.svgFilters===!0&&(Dt(F,O1),Dt(E,M1),Dt(E,Yh)),ft.mathMl===!0&&(Dt(F,P1),Dt(E,sx),Dt(E,Yh))),X.ADD_TAGS&&(F===_&&(F=Eo(F)),Dt(F,X.ADD_TAGS,Et)),X.ADD_ATTR&&(E===B&&(E=Eo(E)),Dt(E,X.ADD_ATTR,Et)),X.ADD_URI_SAFE_ATTR&&Dt(xt,X.ADD_URI_SAFE_ATTR,Et),X.FORBID_CONTENTS&&(vt===_t&&(vt=Eo(vt)),Dt(vt,X.FORBID_CONTENTS,Et)),ot&&(F["#text"]=!0),Me&&Dt(F,["html","head","body"]),F.table&&(Dt(F,["tbody"]),delete R.tbody),jn&&jn(X),Kt=X)},Lr=Dt({},["mi","mo","mn","ms","mtext"]),qn=Dt({},["foreignobject","desc","title","annotation-xml"]),aA=Dt({},["title","style","font","a","script"]),gt=Dt({},D1);Dt(gt,O1),Dt(gt,Oz);var En=Dt({},P1);Dt(En,Pz);var On=function(X){var we=C(X);(!we||!we.tagName)&&(we={namespaceURI:It,tagName:"template"});var ke=Xh(X.tagName),Ke=Xh(we.tagName);return Yr[X.namespaceURI]?X.namespaceURI===Nt?we.namespaceURI===hr?ke==="svg":we.namespaceURI===ar?ke==="svg"&&(Ke==="annotation-xml"||Lr[Ke]):!!gt[ke]:X.namespaceURI===ar?we.namespaceURI===hr?ke==="math":we.namespaceURI===Nt?ke==="math"&&qn[Ke]:!!En[ke]:X.namespaceURI===hr?we.namespaceURI===Nt&&!qn[Ke]||we.namespaceURI===ar&&!Lr[Ke]?!1:!En[ke]&&(aA[ke]||!gt[ke]):!!(Er==="application/xhtml+xml"&&Yr[X.namespaceURI]):!1},pr=function(X){oc(e.removed,{element:X});try{X.parentNode.removeChild(X)}catch{try{X.outerHTML=Y}catch{X.remove()}}},Br=function(X,we){try{oc(e.removed,{attribute:we.getAttributeNode(X),from:we})}catch{oc(e.removed,{attribute:null,from:we})}if(we.removeAttribute(X),X==="is"&&!E[X])if(Pe||je)try{pr(we)}catch{}else try{we.setAttribute(X,"")}catch{}},xr=function(X){var we,ke;if(Ae)X="<remove></remove>"+X;else{var Ke=Uz(X,/^[\r\n\t ]+/);ke=Ke&&Ke[0]}Er==="application/xhtml+xml"&&It===hr&&(X='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+X+"</body></html>");var ze=D?D.createHTML(X):X;if(It===hr)try{we=new p().parseFromString(ze,Er)}catch{}if(!we||!we.documentElement){we=U.createDocument(It,"template",null);try{we.documentElement.innerHTML=zt?Y:ze}catch{}}var Je=we.body||we.documentElement;return X&&ke&&Je.insertBefore(n.createTextNode(ke),Je.childNodes[0]||null),It===hr?re.call(we,Me?"html":"body")[0]:Me?we.documentElement:Je},V=function(X){return I.call(X.ownerDocument||X,X,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},ie=function(X){return X instanceof g&&(typeof X.nodeName!="string"||typeof X.textContent!="string"||typeof X.removeChild!="function"||!(X.attributes instanceof c)||typeof X.removeAttribute!="function"||typeof X.setAttribute!="function"||typeof X.namespaceURI!="string"||typeof X.insertBefore!="function"||typeof X.hasChildNodes!="function")},ee=function(X){return Qi(i)==="object"?X instanceof i:X&&Qi(X)==="object"&&typeof X.nodeType=="number"&&typeof X.nodeName=="string"},te=function(X,we,ke){G[X]&&Lz(G[X],function(Ke){Ke.call(e,we,ke,Kt)})},ae=function(X){var we;if(te("beforeSanitizeElements",X,null),ie(X)||Wn(/[\u0080-\uFFFF]/,X.nodeName))return pr(X),!0;var ke=Et(X.nodeName);if(te("uponSanitizeElement",X,{tagName:ke,allowedTags:F}),X.hasChildNodes()&&!ee(X.firstElementChild)&&(!ee(X.content)||!ee(X.content.firstElementChild))&&Wn(/<[/\w]/g,X.innerHTML)&&Wn(/<[/\w]/g,X.textContent)||ke==="select"&&Wn(/<template/i,X.innerHTML))return pr(X),!0;if(!F[ke]||R[ke]){if(!R[ke]&&Ee(ke)&&(S.tagNameCheck instanceof RegExp&&Wn(S.tagNameCheck,ke)||S.tagNameCheck instanceof Function&&S.tagNameCheck(ke)))return!1;if(ot&&!vt[ke]){var Ke=C(X)||X.parentNode,ze=x(X)||X.childNodes;if(ze&&Ke)for(var Je=ze.length,ut=Je-1;ut>=0;--ut)Ke.insertBefore(v(ze[ut],!0),h(X))}return pr(X),!0}return X instanceof s&&!On(X)||(ke==="noscript"||ke==="noembed"||ke==="noframes")&&Wn(/<\/no(script|embed|frames)/i,X.innerHTML)?(pr(X),!0):(Ne&&X.nodeType===3&&(we=X.textContent,we=ZA(we,Z," "),we=ZA(we,ce," "),we=ZA(we,le," "),X.textContent!==we&&(oc(e.removed,{element:X.cloneNode()}),X.textContent=we)),te("afterSanitizeElements",X,null),!1)},oe=function(X,we,ke){if(Xe&&(we==="id"||we==="name")&&(ke in n||ke in bt))return!1;if(!(H&&!Q[we]&&Wn(he,we))){if(!(J&&Wn(fe,we))){if(!E[we]||Q[we]){if(!(Ee(X)&&(S.tagNameCheck instanceof RegExp&&Wn(S.tagNameCheck,X)||S.tagNameCheck instanceof Function&&S.tagNameCheck(X))&&(S.attributeNameCheck instanceof RegExp&&Wn(S.attributeNameCheck,we)||S.attributeNameCheck instanceof Function&&S.attributeNameCheck(we))||we==="is"&&S.allowCustomizedBuiltInElements&&(S.tagNameCheck instanceof RegExp&&Wn(S.tagNameCheck,ke)||S.tagNameCheck instanceof Function&&S.tagNameCheck(ke))))return!1}else if(!xt[we]){if(!Wn(Le,ZA(ke,me,""))){if(!((we==="src"||we==="xlink:href"||we==="href")&&X!=="script"&&Iz(ke,"data:")===0&&Tt[X])){if(!(ue&&!Wn(pe,ZA(ke,me,"")))){if(ke)return!1}}}}}}return!0},Ee=function(X){return X.indexOf("-")>0},Ue=function(X){var we,ke,Ke,ze;te("beforeSanitizeAttributes",X,null);var Je=X.attributes;if(Je){var ut={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:E};for(ze=Je.length;ze--;){we=Je[ze];var $t=we,Ct=$t.name,Cr=$t.namespaceURI;if(ke=Ct==="value"?we.value:Qz(we.value),Ke=Et(Ct),ut.attrName=Ke,ut.attrValue=ke,ut.keepAttr=!0,ut.forceKeepAttr=void 0,te("uponSanitizeAttribute",X,ut),ke=ut.attrValue,!ut.forceKeepAttr&&(Br(Ct,X),!!ut.keepAttr)){if(!Te&&Wn(/\/>/i,ke)){Br(Ct,X);continue}Ne&&(ke=ZA(ke,Z," "),ke=ZA(ke,ce," "),ke=ZA(ke,le," "));var iA=Et(X.nodeName);if(oe(iA,Ke,ke)){if(Ye&&(Ke==="id"||Ke==="name")&&(Br(Ct,X),ke=Ze+ke),D&&Qi(d)==="object"&&typeof d.getAttributeType=="function"&&!Cr)switch(d.getAttributeType(iA,Ke)){case"TrustedHTML":{ke=D.createHTML(ke);break}case"TrustedScriptURL":{ke=D.createScriptURL(ke);break}}try{Cr?X.setAttributeNS(Cr,Ct,ke):X.setAttribute(Ct,ke),Ax(e.removed)}catch{}}}}te("afterSanitizeAttributes",X,null)}},Ce=function de(X){var we,ke=V(X);for(te("beforeSanitizeShadowDOM",X,null);we=ke.nextNode();)te("uponSanitizeShadowNode",we,null),!ae(we)&&(we.content instanceof A&&de(we.content),Ue(we));te("afterSanitizeShadowDOM",X,null)};return e.sanitize=function(de){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},we,ke,Ke,ze,Je;if(zt=!de,zt&&(de="<!-->"),typeof de!="string"&&!ee(de))if(typeof de.toString=="function"){if(de=de.toString(),typeof de!="string")throw Q1("dirty is not a string, aborting")}else throw Q1("toString is not a function");if(!e.isSupported){if(Qi(t.toStaticHTML)==="object"||typeof t.toStaticHTML=="function"){if(typeof de=="string")return t.toStaticHTML(de);if(ee(de))return t.toStaticHTML(de.outerHTML)}return de}if(_e||yA(X),e.removed=[],typeof de=="string"&&(At=!1),At){if(de.nodeName){var ut=Et(de.nodeName);if(!F[ut]||R[ut])throw Q1("root node is forbidden and cannot be sanitized in-place")}}else if(de instanceof i)we=xr("<!---->"),ke=we.ownerDocument.importNode(de,!0),ke.nodeType===1&&ke.nodeName==="BODY"||ke.nodeName==="HTML"?we=ke:we.appendChild(ke);else{if(!Pe&&!Ne&&!Me&&de.indexOf("<")===-1)return D&&Qe?D.createHTML(de):de;if(we=xr(de),!we)return Pe?null:Qe?Y:""}we&&Ae&&pr(we.firstChild);for(var $t=V(At?de:we);Ke=$t.nextNode();)Ke.nodeType===3&&Ke===ze||ae(Ke)||(Ke.content instanceof A&&Ce(Ke.content),Ue(Ke),ze=Ke);if(ze=null,At)return de;if(Pe){if(je)for(Je=O.call(we.ownerDocument);we.firstChild;)Je.appendChild(we.firstChild);else Je=we;return(E.shadowroot||E.shadowrootmod)&&(Je=N.call(r,Je,!0)),Je}var Ct=Me?we.outerHTML:we.innerHTML;return Me&&F["!doctype"]&&we.ownerDocument&&we.ownerDocument.doctype&&we.ownerDocument.doctype.name&&Wn(jz,we.ownerDocument.doctype.name)&&(Ct="<!DOCTYPE "+we.ownerDocument.doctype.name+`>
|
|
380
380
|
`+Ct),Ne&&(Ct=ZA(Ct,Z," "),Ct=ZA(Ct,ce," "),Ct=ZA(Ct,le," ")),D&&Qe?D.createHTML(Ct):Ct},e.setConfig=function(de){yA(de),_e=!0},e.clearConfig=function(){Kt=null,_e=!1},e.isValidAttribute=function(de,X,we){Kt||yA({});var ke=Et(de),Ke=Et(X);return oe(ke,Ke,we)},e.addHook=function(de,X){typeof X=="function"&&(G[de]=G[de]||[],oc(G[de],X))},e.removeHook=function(de){if(G[de])return Ax(G[de])},e.removeHooks=function(de){G[de]&&(G[de]=[])},e.removeAllHooks=function(){G={}},e}var qz=lx();const Yz=Object.freeze(Object.defineProperty({__proto__:null,default:qz},Symbol.toStringTag,{value:"Module"}));var sc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cx(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Jh=function(t){return t&&t.Math==Math&&t},nn=Jh(typeof globalThis=="object"&&globalThis)||Jh(typeof window=="object"&&window)||Jh(typeof self=="object"&&self)||Jh(typeof sc=="object"&&sc)||function(){return this}()||sc||Function("return this")(),Ts={},Hr=function(t){try{return!!t()}catch{return!0}},Jz=Hr,Ca=!Jz(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Zz=Hr,Zh=!Zz(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),eK=Zh,ef=Function.prototype.call,Cn=eK?ef.bind(ef):function(){return ef.apply(ef,arguments)},ux={},hx={}.propertyIsEnumerable,fx=Object.getOwnPropertyDescriptor,tK=fx&&!hx.call({1:2},1);ux.f=tK?function(e){var r=fx(this,e);return!!r&&r.enumerable}:hx;var tf=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}},dx=Zh,gx=Function.prototype,R1=gx.call,rK=dx&&gx.bind.bind(R1,R1),Vr=dx?rK:function(t){return function(){return R1.apply(t,arguments)}},px=Vr,nK=px({}.toString),AK=px("".slice),Fo=function(t){return AK(nK(t),8,-1)},aK=Vr,iK=Hr,oK=Fo,H1=Object,sK=aK("".split),mx=iK(function(){return!H1("z").propertyIsEnumerable(0)})?function(t){return oK(t)=="String"?sK(t,""):H1(t)}:H1,So=function(t){return t==null},lK=So,cK=TypeError,Ea=function(t){if(lK(t))throw cK("Can't call method on "+t);return t},uK=mx,hK=Ea,lc=function(t){return uK(hK(t))},V1=typeof document=="object"&&document.all,fK=typeof V1>"u"&&V1!==void 0,vx={all:V1,IS_HTMLDDA:fK},yx=vx,dK=yx.all,Tr=yx.IS_HTMLDDA?function(t){return typeof t=="function"||t===dK}:function(t){return typeof t=="function"},wx=Tr,Bx=vx,gK=Bx.all,Wa=Bx.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:wx(t)||t===gK}:function(t){return typeof t=="object"?t!==null:wx(t)},$1=nn,pK=Tr,mK=function(t){return pK(t)?t:void 0},_o=function(t,e){return arguments.length<2?mK($1[t]):$1[t]&&$1[t][e]},vK=Vr,rf=vK({}.isPrototypeOf),nf=typeof navigator<"u"&&String(navigator.userAgent)||"",xx=nn,z1=nf,bx=xx.process,Cx=xx.Deno,Ex=bx&&bx.versions||Cx&&Cx.version,Fx=Ex&&Ex.v8,ea,Af;Fx&&(ea=Fx.split("."),Af=ea[0]>0&&ea[0]<4?1:+(ea[0]+ea[1])),!Af&&z1&&(ea=z1.match(/Edge\/(\d+)/),(!ea||ea[1]>=74)&&(ea=z1.match(/Chrome\/(\d+)/),ea&&(Af=+ea[1])));var K1=Af,Sx=K1,yK=Hr,wK=nn,BK=wK.String,_x=!!Object.getOwnPropertySymbols&&!yK(function(){var t=Symbol();return!BK(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Sx&&Sx<41}),xK=_x,kx=xK&&!Symbol.sham&&typeof Symbol.iterator=="symbol",bK=_o,CK=Tr,EK=rf,FK=kx,SK=Object,Tx=FK?function(t){return typeof t=="symbol"}:function(t){var e=bK("Symbol");return CK(e)&&EK(e.prototype,SK(t))},_K=String,af=function(t){try{return _K(t)}catch{return"Object"}},kK=Tr,TK=af,NK=TypeError,Xa=function(t){if(kK(t))return t;throw NK(TK(t)+" is not a function")},LK=Xa,UK=So,Ns=function(t,e){var r=t[e];return UK(r)?void 0:LK(r)},G1=Cn,j1=Tr,W1=Wa,IK=TypeError,QK=function(t,e){var r,n;if(e==="string"&&j1(r=t.toString)&&!W1(n=G1(r,t))||j1(r=t.valueOf)&&!W1(n=G1(r,t))||e!=="string"&&j1(r=t.toString)&&!W1(n=G1(r,t)))return n;throw IK("Can't convert object to primitive value")},Nx={exports:{}},Lx=nn,DK=Object.defineProperty,X1=function(t,e){try{DK(Lx,t,{value:e,configurable:!0,writable:!0})}catch{Lx[t]=e}return e},OK=nn,PK=X1,Ux="__core-js_shared__",MK=OK[Ux]||PK(Ux,{}),q1=MK,Ix=q1;(Nx.exports=function(t,e){return Ix[t]||(Ix[t]=e!==void 0?e:{})})("versions",[]).push({version:"3.32.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Y1=Nx.exports,RK=Ea,HK=Object,of=function(t){return HK(RK(t))},VK=Vr,$K=of,zK=VK({}.hasOwnProperty),ta=Object.hasOwn||function(e,r){return zK($K(e),r)},KK=Vr,GK=0,jK=Math.random(),WK=KK(1 .toString),Qx=function(t){return"Symbol("+(t===void 0?"":t)+")_"+WK(++GK+jK,36)},XK=nn,qK=Y1,Dx=ta,YK=Qx,JK=_x,ZK=kx,Ls=XK.Symbol,J1=qK("wks"),eG=ZK?Ls.for||Ls:Ls&&Ls.withoutSetter||YK,hn=function(t){return Dx(J1,t)||(J1[t]=JK&&Dx(Ls,t)?Ls[t]:eG("Symbol."+t)),J1[t]},tG=Cn,Ox=Wa,Px=Tx,rG=Ns,nG=QK,AG=hn,aG=TypeError,iG=AG("toPrimitive"),oG=function(t,e){if(!Ox(t)||Px(t))return t;var r=rG(t,iG),n;if(r){if(e===void 0&&(e="default"),n=tG(r,t,e),!Ox(n)||Px(n))return n;throw aG("Can't convert object to primitive value")}return e===void 0&&(e="number"),nG(t,e)},sG=oG,lG=Tx,Z1=function(t){var e=sG(t,"string");return lG(e)?e:e+""},cG=nn,Mx=Wa,eg=cG.document,uG=Mx(eg)&&Mx(eg.createElement),sf=function(t){return uG?eg.createElement(t):{}},hG=Ca,fG=Hr,dG=sf,Rx=!hG&&!fG(function(){return Object.defineProperty(dG("div"),"a",{get:function(){return 7}}).a!=7}),gG=Ca,pG=Cn,mG=ux,vG=tf,yG=lc,wG=Z1,BG=ta,xG=Rx,Hx=Object.getOwnPropertyDescriptor;Ts.f=gG?Hx:function(e,r){if(e=yG(e),r=wG(r),xG)try{return Hx(e,r)}catch{}if(BG(e,r))return vG(!pG(mG.f,e,r),e[r])};var Fa={},bG=Ca,CG=Hr,Vx=bG&&CG(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),EG=Wa,FG=String,SG=TypeError,Qn=function(t){if(EG(t))return t;throw SG(FG(t)+" is not an object")},_G=Ca,kG=Rx,TG=Vx,lf=Qn,$x=Z1,NG=TypeError,tg=Object.defineProperty,LG=Object.getOwnPropertyDescriptor,rg="enumerable",ng="configurable",Ag="writable";Fa.f=_G?TG?function(e,r,n){if(lf(e),r=$x(r),lf(n),typeof e=="function"&&r==="prototype"&&"value"in n&&Ag in n&&!n[Ag]){var A=LG(e,r);A&&A[Ag]&&(e[r]=n.value,n={configurable:ng in n?n[ng]:A[ng],enumerable:rg in n?n[rg]:A[rg],writable:!1})}return tg(e,r,n)}:tg:function(e,r,n){if(lf(e),r=$x(r),lf(n),kG)try{return tg(e,r,n)}catch{}if("get"in n||"set"in n)throw NG("Accessors not supported");return"value"in n&&(e[r]=n.value),e};var UG=Ca,IG=Fa,QG=tf,cc=UG?function(t,e,r){return IG.f(t,e,QG(1,r))}:function(t,e,r){return t[e]=r,t},zx={exports:{}},ag=Ca,DG=ta,Kx=Function.prototype,OG=ag&&Object.getOwnPropertyDescriptor,ig=DG(Kx,"name"),PG=ig&&(function(){}).name==="something",MG=ig&&(!ag||ag&&OG(Kx,"name").configurable),cf={EXISTS:ig,PROPER:PG,CONFIGURABLE:MG},RG=Vr,HG=Tr,og=q1,VG=RG(Function.toString);HG(og.inspectSource)||(og.inspectSource=function(t){return VG(t)});var sg=og.inspectSource,$G=nn,zG=Tr,Gx=$G.WeakMap,KG=zG(Gx)&&/native code/.test(String(Gx)),GG=Y1,jG=Qx,jx=GG("keys"),lg=function(t){return jx[t]||(jx[t]=jG(t))},cg={},WG=KG,Wx=nn,XG=Wa,qG=cc,ug=ta,hg=q1,YG=lg,JG=cg,Xx="Object already initialized",fg=Wx.TypeError,ZG=Wx.WeakMap,uf,uc,hf,ej=function(t){return hf(t)?uc(t):uf(t,{})},tj=function(t){return function(e){var r;if(!XG(e)||(r=uc(e)).type!==t)throw fg("Incompatible receiver, "+t+" required");return r}};if(WG||hg.state){var Sa=hg.state||(hg.state=new ZG);Sa.get=Sa.get,Sa.has=Sa.has,Sa.set=Sa.set,uf=function(t,e){if(Sa.has(t))throw fg(Xx);return e.facade=t,Sa.set(t,e),e},uc=function(t){return Sa.get(t)||{}},hf=function(t){return Sa.has(t)}}else{var Us=YG("state");JG[Us]=!0,uf=function(t,e){if(ug(t,Us))throw fg(Xx);return e.facade=t,qG(t,Us,e),e},uc=function(t){return ug(t,Us)?t[Us]:{}},hf=function(t){return ug(t,Us)}}var ff={set:uf,get:uc,has:hf,enforce:ej,getterFor:tj},dg=Vr,rj=Hr,nj=Tr,df=ta,gg=Ca,Aj=cf.CONFIGURABLE,aj=sg,qx=ff,ij=qx.enforce,oj=qx.get,Yx=String,gf=Object.defineProperty,sj=dg("".slice),lj=dg("".replace),cj=dg([].join),uj=gg&&!rj(function(){return gf(function(){},"length",{value:8}).length!==8}),hj=String(String).split("String"),fj=zx.exports=function(t,e,r){sj(Yx(e),0,7)==="Symbol("&&(e="["+lj(Yx(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!df(t,"name")||Aj&&t.name!==e)&&(gg?gf(t,"name",{value:e,configurable:!0}):t.name=e),uj&&r&&df(r,"arity")&&t.length!==r.arity&&gf(t,"length",{value:r.arity});try{r&&df(r,"constructor")&&r.constructor?gg&&gf(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch{}var n=ij(t);return df(n,"source")||(n.source=cj(hj,typeof e=="string"?e:"")),t};Function.prototype.toString=fj(function(){return nj(this)&&oj(this).source||aj(this)},"toString");var Jx=zx.exports,dj=Tr,gj=Fa,pj=Jx,mj=X1,ko=function(t,e,r,n){n||(n={});var A=n.enumerable,a=n.name!==void 0?n.name:e;if(dj(r)&&pj(r,a,n),n.global)A?t[e]=r:mj(e,r);else{try{n.unsafe?t[e]&&(A=!0):delete t[e]}catch{}A?t[e]=r:gj.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},Zx={},vj=Math.ceil,yj=Math.floor,wj=Math.trunc||function(e){var r=+e;return(r>0?yj:vj)(r)},Bj=wj,pf=function(t){var e=+t;return e!==e||e===0?0:Bj(e)},xj=pf,bj=Math.max,Cj=Math.min,e5=function(t,e){var r=xj(t);return r<0?bj(r+e,0):Cj(r,e)},Ej=pf,Fj=Math.min,Is=function(t){return t>0?Fj(Ej(t),9007199254740991):0},Sj=Is,mf=function(t){return Sj(t.length)},_j=lc,kj=e5,Tj=mf,t5=function(t){return function(e,r,n){var A=_j(e),a=Tj(A),i=kj(n,a),s;if(t&&r!=r){for(;a>i;)if(s=A[i++],s!=s)return!0}else for(;a>i;i++)if((t||i in A)&&A[i]===r)return t||i||0;return!t&&-1}},r5={includes:t5(!0),indexOf:t5(!1)},Nj=Vr,pg=ta,Lj=lc,Uj=r5.indexOf,Ij=cg,n5=Nj([].push),A5=function(t,e){var r=Lj(t),n=0,A=[],a;for(a in r)!pg(Ij,a)&&pg(r,a)&&n5(A,a);for(;e.length>n;)pg(r,a=e[n++])&&(~Uj(A,a)||n5(A,a));return A},mg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Qj=A5,Dj=mg,Oj=Dj.concat("length","prototype");Zx.f=Object.getOwnPropertyNames||function(e){return Qj(e,Oj)};var a5={};a5.f=Object.getOwnPropertySymbols;var Pj=_o,Mj=Vr,Rj=Zx,Hj=a5,Vj=Qn,$j=Mj([].concat),zj=Pj("Reflect","ownKeys")||function(e){var r=Rj.f(Vj(e)),n=Hj.f;return n?$j(r,n(e)):r},i5=ta,Kj=zj,Gj=Ts,jj=Fa,Wj=function(t,e,r){for(var n=Kj(e),A=jj.f,a=Gj.f,i=0;i<n.length;i++){var s=n[i];!i5(t,s)&&!(r&&i5(r,s))&&A(t,s,a(e,s))}},Xj=Hr,qj=Tr,Yj=/#|\.prototype\./,hc=function(t,e){var r=Zj[Jj(t)];return r==tW?!0:r==eW?!1:qj(e)?Xj(e):!!e},Jj=hc.normalize=function(t){return String(t).replace(Yj,".").toLowerCase()},Zj=hc.data={},eW=hc.NATIVE="N",tW=hc.POLYFILL="P",o5=hc,vg=nn,rW=Ts.f,nW=cc,AW=ko,aW=X1,iW=Wj,oW=o5,Xn=function(t,e){var r=t.target,n=t.global,A=t.stat,a,i,s,l,u,c;if(n?i=vg:A?i=vg[r]||aW(r,{}):i=(vg[r]||{}).prototype,i)for(s in e){if(u=e[s],t.dontCallGetSet?(c=rW(i,s),l=c&&c.value):l=i[s],a=oW(n?s:r+(A?".":"#")+s,t.forced),!a&&l!==void 0){if(typeof u==typeof l)continue;iW(u,l)}(t.sham||l&&l.sham)&&nW(u,"sham",!0),AW(i,s,u,t)}},sW=Fo,fc=typeof process<"u"&&sW(process)=="process",lW=Vr,cW=Xa,uW=function(t,e,r){try{return lW(cW(Object.getOwnPropertyDescriptor(t,e)[r]))}catch{}},hW=Tr,fW=String,dW=TypeError,gW=function(t){if(typeof t=="object"||hW(t))return t;throw dW("Can't set "+fW(t)+" as a prototype")},pW=uW,mW=Qn,vW=gW,s5=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,e={},r;try{r=pW(Object.prototype,"__proto__","set"),r(e,[]),t=e instanceof Array}catch{}return function(A,a){return mW(A),vW(a),t?r(A,a):A.__proto__=a,A}}():void 0),yW=Fa.f,wW=ta,BW=hn,l5=BW("toStringTag"),yg=function(t,e,r){t&&!r&&(t=t.prototype),t&&!wW(t,l5)&&yW(t,l5,{configurable:!0,value:e})},c5=Jx,xW=Fa,bW=function(t,e,r){return r.get&&c5(r.get,e,{getter:!0}),r.set&&c5(r.set,e,{setter:!0}),xW.f(t,e,r)},CW=_o,EW=bW,FW=hn,SW=Ca,u5=FW("species"),_W=function(t){var e=CW(t);SW&&e&&!e[u5]&&EW(e,u5,{configurable:!0,get:function(){return this}})},kW=rf,TW=TypeError,NW=function(t,e){if(kW(e,t))return t;throw TW("Incorrect invocation")},LW=hn,UW=LW("toStringTag"),h5={};h5[UW]="z";var IW=String(h5)==="[object z]",QW=IW,DW=Tr,vf=Fo,OW=hn,PW=OW("toStringTag"),MW=Object,RW=vf(function(){return arguments}())=="Arguments",HW=function(t,e){try{return t[e]}catch{}},wg=QW?vf:function(t){var e,r,n;return t===void 0?"Undefined":t===null?"Null":typeof(r=HW(e=MW(t),PW))=="string"?r:RW?vf(e):(n=vf(e))=="Object"&&DW(e.callee)?"Arguments":n},VW=Vr,$W=Hr,f5=Tr,zW=wg,KW=_o,GW=sg,d5=function(){},jW=[],g5=KW("Reflect","construct"),Bg=/^\s*(?:class|function)\b/,WW=VW(Bg.exec),XW=!Bg.exec(d5),dc=function(e){if(!f5(e))return!1;try{return g5(d5,jW,e),!0}catch{return!1}},p5=function(e){if(!f5(e))return!1;switch(zW(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return XW||!!WW(Bg,GW(e))}catch{return!0}};p5.sham=!0;var qW=!g5||$W(function(){var t;return dc(dc.call)||!dc(Object)||!dc(function(){t=!0})||t})?p5:dc,YW=qW,JW=af,ZW=TypeError,eX=function(t){if(YW(t))return t;throw ZW(JW(t)+" is not a constructor")},m5=Qn,tX=eX,rX=So,nX=hn,AX=nX("species"),v5=function(t,e){var r=m5(t).constructor,n;return r===void 0||rX(n=m5(r)[AX])?e:tX(n)},aX=Zh,y5=Function.prototype,w5=y5.apply,B5=y5.call,xg=typeof Reflect=="object"&&Reflect.apply||(aX?B5.bind(w5):function(){return B5.apply(w5,arguments)}),iX=Fo,oX=Vr,gc=function(t){if(iX(t)==="Function")return oX(t)},x5=gc,sX=Xa,lX=Zh,cX=x5(x5.bind),bg=function(t,e){return sX(t),e===void 0?t:lX?cX(t,e):function(){return t.apply(e,arguments)}},uX=_o,b5=uX("document","documentElement"),hX=Vr,fX=hX([].slice),dX=TypeError,gX=function(t,e){if(t<e)throw dX("Not enough arguments");return t},pX=nf,C5=/(?:ipad|iphone|ipod).*applewebkit/i.test(pX),vA=nn,mX=xg,vX=bg,E5=Tr,yX=ta,F5=Hr,S5=b5,wX=fX,_5=sf,BX=gX,xX=C5,bX=fc,Cg=vA.setImmediate,Eg=vA.clearImmediate,CX=vA.process,Fg=vA.Dispatch,EX=vA.Function,k5=vA.MessageChannel,FX=vA.String,Sg=0,pc={},T5="onreadystatechange",mc,To,_g,kg;F5(function(){mc=vA.location});var Tg=function(t){if(yX(pc,t)){var e=pc[t];delete pc[t],e()}},Ng=function(t){return function(){Tg(t)}},N5=function(t){Tg(t.data)},L5=function(t){vA.postMessage(FX(t),mc.protocol+"//"+mc.host)};(!Cg||!Eg)&&(Cg=function(e){BX(arguments.length,1);var r=E5(e)?e:EX(e),n=wX(arguments,1);return pc[++Sg]=function(){mX(r,void 0,n)},To(Sg),Sg},Eg=function(e){delete pc[e]},bX?To=function(t){CX.nextTick(Ng(t))}:Fg&&Fg.now?To=function(t){Fg.now(Ng(t))}:k5&&!xX?(_g=new k5,kg=_g.port2,_g.port1.onmessage=N5,To=vX(kg.postMessage,kg)):vA.addEventListener&&E5(vA.postMessage)&&!vA.importScripts&&mc&&mc.protocol!=="file:"&&!F5(L5)?(To=L5,vA.addEventListener("message",N5,!1)):T5 in _5("script")?To=function(t){S5.appendChild(_5("script"))[T5]=function(){S5.removeChild(this),Tg(t)}}:To=function(t){setTimeout(Ng(t),0)});var U5={set:Cg,clear:Eg},I5=function(){this.head=null,this.tail=null};I5.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t){var e=this.head=t.next;return e===null&&(this.tail=null),t.item}}};var Q5=I5,SX=nf,_X=/ipad|iphone|ipod/i.test(SX)&&typeof Pebble<"u",kX=nf,TX=/web0s(?!.*chrome)/i.test(kX),No=nn,D5=bg,NX=Ts.f,Lg=U5.set,LX=Q5,UX=C5,IX=_X,QX=TX,Ug=fc,O5=No.MutationObserver||No.WebKitMutationObserver,P5=No.document,M5=No.process,yf=No.Promise,R5=NX(No,"queueMicrotask"),Ig=R5&&R5.value,Qs,Qg,Dg,wf,H5;if(!Ig){var Bf=new LX,xf=function(){var t,e;for(Ug&&(t=M5.domain)&&t.exit();e=Bf.get();)try{e()}catch(r){throw Bf.head&&Qs(),r}t&&t.enter()};!UX&&!Ug&&!QX&&O5&&P5?(Qg=!0,Dg=P5.createTextNode(""),new O5(xf).observe(Dg,{characterData:!0}),Qs=function(){Dg.data=Qg=!Qg}):!IX&&yf&&yf.resolve?(wf=yf.resolve(void 0),wf.constructor=yf,H5=D5(wf.then,wf),Qs=function(){H5(xf)}):Ug?Qs=function(){M5.nextTick(xf)}:(Lg=D5(Lg,No),Qs=function(){Lg(xf)}),Ig=function(t){Bf.head||Qs(),Bf.add(t)}}var DX=Ig,OX=function(t,e){try{arguments.length==1?console.error(t):console.error(t,e)}catch{}},Og=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}},PX=nn,bf=PX.Promise,V5=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",MX=V5,RX=fc,HX=!MX&&!RX&&typeof window=="object"&&typeof document=="object",VX=nn,vc=bf,$X=Tr,zX=o5,KX=sg,GX=hn,jX=HX,WX=V5,Pg=K1;vc&&vc.prototype;var XX=GX("species"),Mg=!1,$5=$X(VX.PromiseRejectionEvent),qX=zX("Promise",function(){var t=KX(vc),e=t!==String(vc);if(!e&&Pg===66)return!0;if(!Pg||Pg<51||!/native code/.test(t)){var r=new vc(function(a){a(1)}),n=function(a){a(function(){},function(){})},A=r.constructor={};if(A[XX]=n,Mg=r.then(function(){})instanceof n,!Mg)return!0}return!e&&(jX||WX)&&!$5}),yc={CONSTRUCTOR:qX,REJECTION_EVENT:$5,SUBCLASSING:Mg},Ds={},z5=Xa,YX=TypeError,JX=function(t){var e,r;this.promise=new t(function(n,A){if(e!==void 0||r!==void 0)throw YX("Bad Promise constructor");e=n,r=A}),this.resolve=z5(e),this.reject=z5(r)};Ds.f=function(t){return new JX(t)};var ZX=Xn,Cf=fc,Di=nn,Os=Cn,K5=ko,G5=s5,eq=yg,tq=_W,rq=Xa,Ef=Tr,nq=Wa,Aq=NW,aq=v5,j5=U5.set,Rg=DX,iq=OX,oq=Og,sq=Q5,W5=ff,Ff=bf,Hg=yc,X5=Ds,Sf="Promise",q5=Hg.CONSTRUCTOR,lq=Hg.REJECTION_EVENT,cq=Hg.SUBCLASSING,Vg=W5.getterFor(Sf),uq=W5.set,Ps=Ff&&Ff.prototype,Lo=Ff,_f=Ps,Y5=Di.TypeError,$g=Di.document,zg=Di.process,Kg=X5.f,hq=Kg,fq=!!($g&&$g.createEvent&&Di.dispatchEvent),J5="unhandledrejection",dq="rejectionhandled",Z5=0,eb=1,gq=2,Gg=1,tb=2,kf,rb,pq,nb,Ab=function(t){var e;return nq(t)&&Ef(e=t.then)?e:!1},ab=function(t,e){var r=e.value,n=e.state==eb,A=n?t.ok:t.fail,a=t.resolve,i=t.reject,s=t.domain,l,u,c;try{A?(n||(e.rejection===tb&&vq(e),e.rejection=Gg),A===!0?l=r:(s&&s.enter(),l=A(r),s&&(s.exit(),c=!0)),l===t.promise?i(Y5("Promise-chain cycle")):(u=Ab(l))?Os(u,l,a,i):a(l)):i(r)}catch(g){s&&!c&&s.exit(),i(g)}},ib=function(t,e){t.notified||(t.notified=!0,Rg(function(){for(var r=t.reactions,n;n=r.get();)ab(n,t);t.notified=!1,e&&!t.rejection&&mq(t)}))},ob=function(t,e,r){var n,A;fq?(n=$g.createEvent("Event"),n.promise=e,n.reason=r,n.initEvent(t,!1,!0),Di.dispatchEvent(n)):n={promise:e,reason:r},!lq&&(A=Di["on"+t])?A(n):t===J5&&iq("Unhandled promise rejection",r)},mq=function(t){Os(j5,Di,function(){var e=t.facade,r=t.value,n=sb(t),A;if(n&&(A=oq(function(){Cf?zg.emit("unhandledRejection",r,e):ob(J5,e,r)}),t.rejection=Cf||sb(t)?tb:Gg,A.error))throw A.value})},sb=function(t){return t.rejection!==Gg&&!t.parent},vq=function(t){Os(j5,Di,function(){var e=t.facade;Cf?zg.emit("rejectionHandled",e):ob(dq,e,t.value)})},Ms=function(t,e,r){return function(n){t(e,n,r)}},Rs=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=gq,ib(t,!0))},jg=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw Y5("Promise can't be resolved itself");var n=Ab(e);n?Rg(function(){var A={done:!1};try{Os(n,e,Ms(jg,A,t),Ms(Rs,A,t))}catch(a){Rs(A,a,t)}}):(t.value=e,t.state=eb,ib(t,!1))}catch(A){Rs({done:!1},A,t)}}};if(q5&&(Lo=function(e){Aq(this,_f),rq(e),Os(kf,this);var r=Vg(this);try{e(Ms(jg,r),Ms(Rs,r))}catch(n){Rs(r,n)}},_f=Lo.prototype,kf=function(e){uq(this,{type:Sf,done:!1,notified:!1,parent:!1,reactions:new sq,rejection:!1,state:Z5,value:void 0})},kf.prototype=K5(_f,"then",function(e,r){var n=Vg(this),A=Kg(aq(this,Lo));return n.parent=!0,A.ok=Ef(e)?e:!0,A.fail=Ef(r)&&r,A.domain=Cf?zg.domain:void 0,n.state==Z5?n.reactions.add(A):Rg(function(){ab(A,n)}),A.promise}),rb=function(){var t=new kf,e=Vg(t);this.promise=t,this.resolve=Ms(jg,e),this.reject=Ms(Rs,e)},X5.f=Kg=function(t){return t===Lo||t===pq?new rb(t):hq(t)},Ef(Ff)&&Ps!==Object.prototype)){nb=Ps.then,cq||K5(Ps,"then",function(e,r){var n=this;return new Lo(function(A,a){Os(nb,n,A,a)}).then(e,r)},{unsafe:!0});try{delete Ps.constructor}catch{}G5&&G5(Ps,_f)}ZX({global:!0,constructor:!0,wrap:!0,forced:q5},{Promise:Lo}),eq(Lo,Sf,!1),tq(Sf);var wc={},yq=hn,wq=wc,Bq=yq("iterator"),xq=Array.prototype,bq=function(t){return t!==void 0&&(wq.Array===t||xq[Bq]===t)},Cq=wg,lb=Ns,Eq=So,Fq=wc,Sq=hn,_q=Sq("iterator"),cb=function(t){if(!Eq(t))return lb(t,_q)||lb(t,"@@iterator")||Fq[Cq(t)]},kq=Cn,Tq=Xa,Nq=Qn,Lq=af,Uq=cb,Iq=TypeError,Qq=function(t,e){var r=arguments.length<2?Uq(t):e;if(Tq(r))return Nq(kq(r,t));throw Iq(Lq(t)+" is not iterable")},Dq=Cn,ub=Qn,Oq=Ns,Pq=function(t,e,r){var n,A;ub(t);try{if(n=Oq(t,"return"),!n){if(e==="throw")throw r;return r}n=Dq(n,t)}catch(a){A=!0,n=a}if(e==="throw")throw r;if(A)throw n;return ub(n),r},Mq=bg,Rq=Cn,Hq=Qn,Vq=af,$q=bq,zq=mf,hb=rf,Kq=Qq,Gq=cb,fb=Pq,jq=TypeError,Tf=function(t,e){this.stopped=t,this.result=e},db=Tf.prototype,gb=function(t,e,r){var n=r&&r.that,A=!!(r&&r.AS_ENTRIES),a=!!(r&&r.IS_RECORD),i=!!(r&&r.IS_ITERATOR),s=!!(r&&r.INTERRUPTED),l=Mq(e,n),u,c,g,p,d,y,v,h=function(C){return u&&fb(u,"normal",C),new Tf(!0,C)},x=function(C){return A?(Hq(C),s?l(C[0],C[1],h):l(C[0],C[1])):s?l(C,h):l(C)};if(a)u=t.iterator;else if(i)u=t;else{if(c=Gq(t),!c)throw jq(Vq(t)+" is not iterable");if($q(c)){for(g=0,p=zq(t);p>g;g++)if(d=x(t[g]),d&&hb(db,d))return d;return new Tf(!1)}u=Kq(t,c)}for(y=a?t.next:u.next;!(v=Rq(y,u)).done;){try{d=x(v.value)}catch(C){fb(u,"throw",C)}if(typeof d=="object"&&d&&hb(db,d))return d}return new Tf(!1)},Wq=hn,pb=Wq("iterator"),mb=!1;try{var Xq=0,vb={next:function(){return{done:!!Xq++}},return:function(){mb=!0}};vb[pb]=function(){return this},Array.from(vb,function(){throw 2})}catch{}var qq=function(t,e){if(!e&&!mb)return!1;var r=!1;try{var n={};n[pb]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch{}return r},Yq=bf,Jq=qq,Zq=yc.CONSTRUCTOR,yb=Zq||!Jq(function(t){Yq.all(t).then(void 0,function(){})}),eY=Xn,tY=Cn,rY=Xa,nY=Ds,AY=Og,aY=gb,iY=yb;eY({target:"Promise",stat:!0,forced:iY},{all:function(e){var r=this,n=nY.f(r),A=n.resolve,a=n.reject,i=AY(function(){var s=rY(r.resolve),l=[],u=0,c=1;aY(e,function(g){var p=u++,d=!1;c++,tY(s,r,g).then(function(y){d||(d=!0,l[p]=y,--c||A(l))},a)}),--c||A(l)});return i.error&&a(i.value),n.promise}});var oY=Xn,sY=yc.CONSTRUCTOR,Wg=bf,lY=_o,cY=Tr,uY=ko,wb=Wg&&Wg.prototype;if(oY({target:"Promise",proto:!0,forced:sY,real:!0},{catch:function(t){return this.then(void 0,t)}}),cY(Wg)){var Bb=lY("Promise").prototype.catch;wb.catch!==Bb&&uY(wb,"catch",Bb,{unsafe:!0})}var hY=Xn,fY=Cn,dY=Xa,gY=Ds,pY=Og,mY=gb,vY=yb;hY({target:"Promise",stat:!0,forced:vY},{race:function(e){var r=this,n=gY.f(r),A=n.reject,a=pY(function(){var i=dY(r.resolve);mY(e,function(s){fY(i,r,s).then(n.resolve,A)})});return a.error&&A(a.value),n.promise}});var yY=Xn,wY=Cn,BY=Ds,xY=yc.CONSTRUCTOR;yY({target:"Promise",stat:!0,forced:xY},{reject:function(e){var r=BY.f(this);return wY(r.reject,void 0,e),r.promise}});var bY=Qn,CY=Wa,EY=Ds,FY=function(t,e){if(bY(t),CY(e)&&e.constructor===t)return e;var r=EY.f(t),n=r.resolve;return n(e),r.promise},SY=Xn,_Y=_o,kY=yc.CONSTRUCTOR,TY=FY;_Y("Promise"),SY({target:"Promise",stat:!0,forced:kY},{resolve:function(e){return TY(this,e)}});function xb(t,e,r,n,A,a,i){try{var s=t[a](i),l=s.value}catch(u){r(u);return}s.done?e(l):Promise.resolve(l).then(n,A)}function qa(t){return function(){var e=this,r=arguments;return new Promise(function(n,A){var a=t.apply(e,r);function i(l){xb(a,n,A,i,s,"next",l)}function s(l){xb(a,n,A,i,s,"throw",l)}i(void 0)})}}var NY=wg,LY=String,_a=function(t){if(NY(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return LY(t)},UY=Qn,bb=function(){var t=UY(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},Xg=Hr,IY=nn,qg=IY.RegExp,Yg=Xg(function(){var t=qg("a","y");return t.lastIndex=2,t.exec("abcd")!=null}),QY=Yg||Xg(function(){return!qg("a","y").sticky}),DY=Yg||Xg(function(){var t=qg("^r","gy");return t.lastIndex=2,t.exec("str")!=null}),Cb={BROKEN_CARET:DY,MISSED_STICKY:QY,UNSUPPORTED_Y:Yg},Eb={},OY=A5,PY=mg,MY=Object.keys||function(e){return OY(e,PY)},RY=Ca,HY=Vx,VY=Fa,$Y=Qn,zY=lc,KY=MY;Eb.f=RY&&!HY?Object.defineProperties:function(e,r){$Y(e);for(var n=zY(r),A=KY(r),a=A.length,i=0,s;a>i;)VY.f(e,s=A[i++],n[s]);return e};var GY=Qn,jY=Eb,Fb=mg,WY=cg,XY=b5,qY=sf,YY=lg,Sb=">",_b="<",Jg="prototype",Zg="script",kb=YY("IE_PROTO"),ep=function(){},Tb=function(t){return _b+Zg+Sb+t+_b+"/"+Zg+Sb},Nb=function(t){t.write(Tb("")),t.close();var e=t.parentWindow.Object;return t=null,e},JY=function(){var t=qY("iframe"),e="java"+Zg+":",r;return t.style.display="none",XY.appendChild(t),t.src=String(e),r=t.contentWindow.document,r.open(),r.write(Tb("document.F=Object")),r.close(),r.F},Nf,Lf=function(){try{Nf=new ActiveXObject("htmlfile")}catch{}Lf=typeof document<"u"?document.domain&&Nf?Nb(Nf):JY():Nb(Nf);for(var t=Fb.length;t--;)delete Lf[Jg][Fb[t]];return Lf()};WY[kb]=!0;var tp=Object.create||function(e,r){var n;return e!==null?(ep[Jg]=GY(e),n=new ep,ep[Jg]=null,n[kb]=e):n=Lf(),r===void 0?n:jY.f(n,r)},ZY=Hr,eJ=nn,tJ=eJ.RegExp,rJ=ZY(function(){var t=tJ(".","s");return!(t.dotAll&&t.exec(`
|
|
381
381
|
`)&&t.flags==="s")}),nJ=Hr,AJ=nn,aJ=AJ.RegExp,iJ=nJ(function(){var t=aJ("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),Hs=Cn,Uf=Vr,oJ=_a,sJ=bb,lJ=Cb,cJ=Y1,uJ=tp,hJ=ff.get,fJ=rJ,dJ=iJ,gJ=cJ("native-string-replace",String.prototype.replace),If=RegExp.prototype.exec,rp=If,pJ=Uf("".charAt),mJ=Uf("".indexOf),vJ=Uf("".replace),np=Uf("".slice),Ap=function(){var t=/a/,e=/b*/g;return Hs(If,t,"a"),Hs(If,e,"a"),t.lastIndex!==0||e.lastIndex!==0}(),Lb=lJ.BROKEN_CARET,ap=/()??/.exec("")[1]!==void 0,yJ=Ap||ap||Lb||fJ||dJ;yJ&&(rp=function(e){var r=this,n=hJ(r),A=oJ(e),a=n.raw,i,s,l,u,c,g,p;if(a)return a.lastIndex=r.lastIndex,i=Hs(rp,a,A),r.lastIndex=a.lastIndex,i;var d=n.groups,y=Lb&&r.sticky,v=Hs(sJ,r),h=r.source,x=0,C=A;if(y&&(v=vJ(v,"y",""),mJ(v,"g")===-1&&(v+="g"),C=np(A,r.lastIndex),r.lastIndex>0&&(!r.multiline||r.multiline&&pJ(A,r.lastIndex-1)!==`
|