hisonvue 1.1.1 → 1.1.2
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/{HAccordion-ClPgc3MA.mjs → HAccordion-DXkKdzdS.mjs} +2 -2
- package/dist/{HAccordion-yaZ0sBWj.js → HAccordion-nste-gIh.js} +1 -1
- package/dist/{HBaggie-BOcwzfs2.mjs → HBaggie-CNEAlhu4.mjs} +2 -2
- package/dist/{HBaggie-DhMiL1-B.js → HBaggie-D9XHuvli.js} +1 -1
- package/dist/{HBanner-CkIr-lzQ.js → HBanner-B8DynVnX.js} +1 -1
- package/dist/{HBanner-dQdDEjcq.mjs → HBanner-Bh1c1LQ0.mjs} +2 -2
- package/dist/{HButton-CQA9AHfR.mjs → HButton-9dYGtsQK.mjs} +2 -2
- package/dist/{HButton-CT0Az7ea.js → HButton-eTsFKKnM.js} +1 -1
- package/dist/{HCalendar-C7RbTZT9.js → HCalendar-Cq5zpcAr.js} +1 -1
- package/dist/{HCalendar-LYKfuBRk.mjs → HCalendar-UVAkYS-W.mjs} +1 -1
- package/dist/{HCaption-hIaWtt1A.mjs → HCaption-C51bVq01.mjs} +1 -1
- package/dist/{HCaption-DslrgN-4.js → HCaption-uIKYMMan.js} +1 -1
- package/dist/{HChart-C_Np6dyj.mjs → HChart-B5ejc-SG.mjs} +1 -1
- package/dist/{HChart-Dw1BMCJS.js → HChart-oEkG07OJ.js} +1 -1
- package/dist/{HDrawer-C8dvmJDK.js → HDrawer-Cc3jqUlQ.js} +1 -1
- package/dist/{HDrawer-Z7npMmnm.mjs → HDrawer-DHJl-quY.mjs} +1 -1
- package/dist/HDropdown-CU3zKxJ3.js +1 -0
- package/dist/{HDropdown-50SbH5xE.mjs → HDropdown-Dtw78Nkz.mjs} +128 -119
- package/dist/{HFileset-Bu2-UdKj.js → HFileset-BTxxYDz4.js} +1 -1
- package/dist/{HFileset-C8m3Fs_v.mjs → HFileset-CthT1M21.mjs} +1 -1
- package/dist/{HGap-D8Iaf-5T.mjs → HGap-B-PVteyd.mjs} +1 -1
- package/dist/{HGap-DsJy_QnE.js → HGap-BWYEUzBg.js} +1 -1
- package/dist/{HGrid-GnXheGEH.mjs → HGrid-BdSoZ3Df.mjs} +1 -1
- package/dist/{HGrid-1YUZ2y6u.js → HGrid-V2xOmqxp.js} +1 -1
- package/dist/{HImagebox-BxTUweOq.mjs → HImagebox-Cy1XmZOi.mjs} +1 -1
- package/dist/{HImagebox-r9i5w5WN.js → HImagebox-Rjlk6PO-.js} +1 -1
- package/dist/{HInput-DT2SixiY.mjs → HInput-CEtGDqFm.mjs} +1 -1
- package/dist/{HInput-CcWTYayE.js → HInput-DATgRssT.js} +1 -1
- package/dist/{HInputGroup-lVdHU36z.js → HInputGroup-C5CCa_H8.js} +1 -1
- package/dist/{HInputGroup-D47YfrUp.mjs → HInputGroup-CVVIbprI.mjs} +1 -1
- package/dist/{HLabel-BlczHNCh.mjs → HLabel-DZA3unsC.mjs} +2 -2
- package/dist/{HLabel-vkRYvApC.js → HLabel-Dn0SXEHh.js} +1 -1
- package/dist/{HLayout-VCGeEX_T.js → HLayout-BbYIgmYy.js} +1 -1
- package/dist/{HLayout-62BFnvbF.mjs → HLayout-DXRXlsWL.mjs} +1 -1
- package/dist/{HList-T55xOKTU.js → HList-BbhTZa3d.js} +1 -1
- package/dist/{HList-C7mRWu55.mjs → HList-BdC2kv9A.mjs} +2 -2
- package/dist/{HModal-28_wsn_-.mjs → HModal-4ABSx2me.mjs} +1 -1
- package/dist/{HModal-C4C4J9GA.js → HModal-BuIgfi_-.js} +1 -1
- package/dist/{HNote-BqW_J3tq.mjs → HNote-DSQJDOUy.mjs} +1 -1
- package/dist/{HNote-RUUsRTzx.js → HNote-h-lB6QZv.js} +1 -1
- package/dist/{HPagination-2Qlqr_ZS.mjs → HPagination-BqoDaVlP.mjs} +2 -2
- package/dist/{HPagination-BxRAk9Pi.js → HPagination-CostpT0D.js} +1 -1
- package/dist/{HParagraph-DG0-Th1k.mjs → HParagraph-BGOLdRFM.mjs} +112 -104
- package/dist/HParagraph-C_afHbvS.js +1 -0
- package/dist/{HPopup-CMHfS31s.mjs → HPopup-B7lscsTs.mjs} +1 -1
- package/dist/{HPopup-Cnt1__JS.js → HPopup-BBpZXoYa.js} +1 -1
- package/dist/{HSpinner-CMZ2W-GY.js → HSpinner--MbdeUop.js} +1 -1
- package/dist/{HSpinner-C4FmAya2.mjs → HSpinner-CYbVuwRT.mjs} +1 -1
- package/dist/{HTable-Bd3ErPRn.mjs → HTable-CJFft6Z1.mjs} +1 -1
- package/dist/{HTable-Dx5l45_-.js → HTable-DI9-1vqI.js} +1 -1
- package/dist/hisonvue.cjs.js +1 -1
- package/dist/hisonvue.css +1 -1
- package/dist/hisonvue.d.ts +303 -107
- package/dist/hisonvue.es.js +2 -2
- package/dist/{index-CrciHSGg.mjs → index-lqOpF_Ng.mjs} +9 -9
- package/dist/{index-CPFyQIpi.js → index-nNWQ7mcU.js} +3 -3
- package/dist/{setButtonCssEvent-BOWM7Rfs.mjs → setButtonCssEvent-Ba1z9cap.mjs} +1 -1
- package/dist/{setButtonCssEvent-Dv_zDL0C.js → setButtonCssEvent-DLH6Bh2r.js} +1 -1
- package/package.json +1 -1
- package/dist/HDropdown-mSEm-0ZC.js +0 -1
- package/dist/HParagraph-B3VkXyh7.js +0 -1
|
@@ -45,7 +45,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
45
45
|
`&&(me!=="\r"||Q!==`
|
|
46
46
|
`)?de+=me:(q.push(de),de="",me==="\r"&&Q===`
|
|
47
47
|
`&&se++)}de&&q.push(de);for(var u=H.rowIndex,b=H.colIndex,_=A[p].methods.getRowCount(),R=A[p].methods.getColCount(),F=0,P=0,z=0;z<q.length;z++){var pe=u+P+F;if(pe>_)return;var Se=x._getRow(p,pe);if(Se[0].rowVisible&&!Se[0].filter){for(var ze=0,je=0,Ue=q[P].split(" "),it=function(){var De=b+je-1+ze;if(De>=R)return 0;var lt=Se[De];if(!lt.colVisible){ze++;for(var ae=1,te=Se[De+ae];te&&!te.colVisible;)ze++,ae++,te=Se[De+ae];return 1}var ht=Ue[je];if(["select","checkbox","button","link"].indexOf(lt.dataType)<0&&!lt.untarget&&!lt.locked){ht=ht.replaceAll('"',"");var d=!0;Object.keys(w.dataType).forEach(function(y){if(lt.dataType===y)if(w.dataType[y].getPasteValue){if(typeof w.dataType[y].getPasteValue!="function")throw new Error("getPasteValue must be a function.");ht=w.dataType[y].getPasteValue(lt._gridId,x.__getData(lt),ht)}else d=!1}),d&&oe.push.apply(oe,Ge(x.getRecordsWithModifyValue(lt,ht)))}je++},rt=0;rt<Ue.length&&it()!==0;rt++);P++}else{F++;for(var ct=1,Ne=x._getCell(p,Se[0].rowIndex+ct,1);Ne&&(!Ne.rowVisible||Ne.filter);)F++,ct++,Ne=x._getCell(p,Se[0].rowIndex+ct,1)}}oe.length>0&&x.recordGridModify(p,oe)}},x.getRecordsWithModifyValue=function(g,p){var B=arguments.length>2&&arguments[2]!==void 0&&arguments[2],H=[];return x.modifyCellValue(g,p,H,B),H},x.getTabCell=function(g,p){if(!g)return null;for(var B,H=g._gridId,U=g.rowIndex,q=p?g.colIndex-1:g.colIndex+1;!B&&U>=1&&U<=A[H].methods.getRowCount();){for(;!B&&q>=1&&q<=A[H].methods.getColCount();)(B=x._getCell(H,U,q))&&(B.isRowMerge||B.isColMerge||B.untarget?B=null:x.isCellVisible(B)||(B=null)),q=p?q-1:q+1;U=p?U-1:U+1,q=p?A[H].methods.getColCount():1}return B||(B=g),B},x.getMoveRowCell=function(g,p){if(!g)return null;var B,H=g._gridId,U=g.rowIndex,q=g.colIndex;if(!p)return g;for(;!B&&!((U+=p)<1||U>A[H].methods.getRowCount());)(B=x._getCell(H,U,q))&&(B.isRowMerge||B.isColMerge||B.untarget?B=null:x.isCellVisible(B)||(B=null));return B||(B=g),B},x.getMoveColCell=function(g,p){if(!g)return null;var B,H=g._gridId,U=g.rowIndex,q=g.colIndex;if(!p)return g;for(;!B&&!((q+=p)<1||q>A[H].methods.getColCount());)(B=x._getCell(H,U,q))&&(B.isRowMerge||B.isColMerge||B.untarget?B=null:x.isCellVisible(B)||(B=null));return B||(B=g),B},x.recordGridModify=function(g,p){p.length<=0||(A[g].data.variables.recordseq<A[g].data.variables.records.length&&A[g].data.variables.records.splice(A[g].data.variables.recordseq),A[g].data.variables.records.push(p),A[g].data.variables.recordseq=A[g].data.variables.recordseq+1,A[g].data.variables.recordseq>A[g].data.gridInfo.redoCount&&(A[g].data.variables.records.shift(),A[g].data.variables.recordseq=A[g].data.variables.recordseq-1))},x.redoundo=function(g,p){if(!A[g].data.gridInfo.redoable)return!1;var B=p!==!1;if(B&&A[g].data.variables.recordseq<=0||!B&&A[g].data.variables.recordseq+1>A[g].data.variables.records.length)return!1;A[g].data.variables.recordseq=B?A[g].data.variables.recordseq-1:A[g].data.variables.recordseq+1;var H=B?A[g].data.variables.records[A[g].data.variables.recordseq]:A[g].data.variables.records[A[g].data.variables.recordseq-1];if(!H||!Array.isArray(H))return!1;x.selectCell(H[0].cell);var U,q=j(H);try{for(q.s();!(U=q.n()).done;){var oe=U.value;oe.cell.value=B?oe.oldValue:oe.newValue,x.reConnectedCallbackElement(oe.cell),x.reloadGridWithModifyCell(g,oe.cell.colIndex)}}catch(de){q.e(de)}finally{q.f()}return!0},x.selectAndCheckboxOnChange=function(g){if(g.nType){var p=g.parentNode,B=p._gridId,H=!0;if(g.nType==="select"?w._status.editNewValue=g.value:g.nType==="checkbox"&&(w._status.editNewValue=g.checked?A[B].data.gridInfo.checkedValue:A[B].data.gridInfo.uncheckedValue),A[B].events.onBeforeChange(p.rowIndex,p.colId,w._status.editOldValue,w._status.editNewValue)===!1&&(H=!1),!H||p.untarget||p.locked){switch(g.nType){case"select":g.value=w._status.editOldValue;break;case"checkbox":g.checked=!g.checked}return w._status.editOldValue=null,!1}switch(g.nType){case"select":x.recordGridModify(B,x.getRecordsWithModifyValue(p,x.getSelectOptions(g)));break;case"checkbox":x.recordGridModify(B,x.getRecordsWithModifyValue(p,w._status.editNewValue))}A[B].events.onAfterChange(p.rowIndex,p.colId,w._status.editOldValue,w._status.editNewValue)}}}(v,et,Ve),function(w,A,x){x.modifyColSize=function(g,p){if(g&&g.resizable&&g.colId!=="v-g-rownum"&&g.colId!=="v-g-status"){var B=A[g._gridId];if(B.events.onResize(g.colId)!==!1){var H=B.elements.gridHeader.style.gridTemplateColumns.split(" "),U=H[g.colIndex-1];Ie(U).unit==="%"&&(p=p>0?1:p<0?-1:0);var q=Ie(U).number+p+Ie(U).unit;H[g.colIndex-1]=q;var oe=H.join(" ");B.elements.gridHeader.style.gridTemplateColumns=oe,B.elements.gridBody.style.gridTemplateColumns=oe,B.elements.gridFooter.style.gridTemplateColumns=oe}}},x.changeColSize=function(g,p,B){if(typeof B!="number"||B<0)throw new Error("The format of size is only zero or positive integers.");var H=A[g];if(!x._getHeaderCell(g,1,p)._frozenCol){for(var U=B!==0,q=1;q<=H.methods.getHeaderRowCount();q++){var oe=x._getHeaderCell(g,q,p);oe.colVisible=U,x.reConnectedCallbackElement(oe)}for(var de=1;de<=H.methods.getRowCount();de++)x._getCell(g,de,p).colVisible=U;for(var he=1;he<=H.methods.getFooterRowCount();he++){var se=x._getFooterCell(g,he,p);se.colVisible=U,x.reConnectedCallbackElement(se)}var me=H.elements.gridHeader,Q=H.elements.gridBody,u=H.elements.gridFooter,b=me.style.gridTemplateColumns.split(" "),_=b[p-1],R=B+Ie(_).unit;b[p-1]=R;var F=b.join(" ");me.style.gridTemplateColumns=F,Q.style.gridTemplateColumns=F,u.style.gridTemplateColumns=F}},x.modifyCellValue=function(g,p,B){if(!(!(arguments.length>3&&arguments[3]!==void 0&&arguments[3])&&(!x.isCellVisible(g)||g.untarget||g.locked))&&(p=x.getValidValue(g,p),g.value!==p)){var H=g.value,U=p;B&&Array.isArray(B)&&B.push({cell:g,oldValue:H,newValue:U}),A[g._gridId].methods.getRowStatus(g.rowIndex)||A[g._gridId].methods.setRowStatus(g.rowIndex,"U"),g.value=p,x.reConnectedCallbackElement(g),x.reloadGridWithModifyCell(g._gridId,g.colIndex)}},x.modifyCell=function(g){if(g._status.activeGridEditor){var p=g._status.activeGridEditor.parentNode;if(!p.untarget&&!p.locked&&(g._status.editNewValue=g._status.activeGridEditor.value,Object.keys(g.dataType).forEach(function(U){if(p.dataType===U)if(g.dataType[U].getEditedValue){if(typeof g.dataType[U].getEditedValue!="function")throw new Error("getEditedValue must be a function.");g._status.editNewValue=g.dataType[U].getEditedValue(g._status.activeGridEditor,p._gridId,x.__getData(p))}else g._status.editNewValue=g._status.editOldValue}),x.removeGridEditor(),A[p._gridId].events.onBeforeChange(p.rowIndex,p.colId,g._status.editOldValue,g._status.editNewValue)!==!1)){var B=g._status.editNewValue,H=x.getRecordsWithModifyValue(p,B);x.recordGridModify(p._gridId,H),A[p._gridId].events.onAfterChange(p.rowIndex,p.colId,g._status.editOldValue,g._status.editNewValue)}}},x.sort=function(g,p,B){var H=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],U=arguments.length>4&&arguments[4]!==void 0&&arguments[4],q=ot(p),oe=A[g];return q.sort(function(de,he){var se=de.find(function(Se){return Se.colId===B}),me=he.find(function(Se){return Se.colId===B}),Q=se?se.value:null,u=se?se.dataType:null,b=me?me.value:null,_=me?me.dataType:null,R=U;if(typeof Q!="number"&&typeof b!="number"||(R=!0),Q===oe.data.gridInfo.nullValue&&(Q=null),b===oe.data.gridInfo.nullValue&&(b=null),u==="select"&&Q!==null&&Array.isArray(Q)){var F=Q.find(function(Se){return Se.selected});Q=F?F.text:Q.length>0&&Q[0].text!==void 0?Q[0].text:null}else u==="link"&&Q!==null&&Q.constructor===Object&&(Q=Q.text);if(_==="select"&&b!==null&&Array.isArray(b)){var P=b.find(function(Se){return Se.selected});b=P?P.text:b.length>0&&b[0].text!==void 0?b[0].text:null}else _==="link"&&b!==null&&b.constructor===Object&&(b=b.text);if(w.dataType&&Object.keys(w.dataType).forEach(function(Se){if(u===Se)if(w.dataType[Se].getSortValue){if(typeof w.dataType[Se].getSortValue!="function")throw new Error("getSortValue must be a function.");Q=w.dataType[Se].getSortValue(g,Q)}else Q=se.text;if(_===Se)if(w.dataType[Se].getSortValue){if(typeof w.dataType[Se].getSortValue!="function")throw new Error("getSortValue must be a function.");b=w.dataType[Se].getSortValue(g,b)}else b=me.text}),R){var z=Q===null?NaN:Number(Q),pe=b===null?NaN:Number(b);if(!isNaN(z)&&!isNaN(pe))return H!==!1?z-pe:pe-z;isNaN(z)&&(Q=null),isNaN(pe)&&(b=null)}return Q===null&&b===null?0:Q===null?H!==!1?1:-1:b===null?H!==!1?-1:1:Q.localeCompare||b.localeCompare?Q.localeCompare?b.localeCompare?R?H!==!1?Q.localeCompare(b,void 0,{numeric:!0}):b.localeCompare(Q,void 0,{numeric:!0}):H!==!1?Q.localeCompare(b):b.localeCompare(Q):H!==!1?-1:1:H!==!1?1:-1:0}),oe.data.variables.sortToggle={},oe.data.variables.sortToggle[B]=H,q},x.setFilterOptions=function(g,p){var B=g.value;Qe(g),p.forEach(function(H){var U=document.createElement("option");U.value=H.value,U.textContent=H.text,g.appendChild(U)}),B&&(g.value=B)},x.reloadColFilterValue=function(g,p){var B=A[g];if(B&&B.data.gridInfo.filterable){var H=x.__getColInfo(g,p);if(H.filterable){H.filterValues=new Set;for(var U=function(){var oe,de=x._getCell(g,q,H.colIndex);if(!de||!de.rowVisible||!de.colVisible)return 1;oe=x.getTextFromCell(de),Object.keys(w.dataType).forEach(function(he){if(de.dataType===he&&w.dataType[he].getFilterValue){if(typeof w.dataType[he].getFilterValue!="function")throw new Error("getFilterValue must be a function.");oe=w.dataType[he].getFilterValue(g,de.value)}}),oe!==""&&oe!=null&&oe!==B.data.gridInfo.nullValue||(oe="$$NULL"),H.filterValues.add(oe)},q=1;q<=B.methods.getRowCount();q++)U();x.reloadFilter(g,p)}}},x.reloadFilter=function(g,p){var B=x.__getHeaderFilter(g,p);if(B){var H=x.__getColInfo(g,p),U=H.filterValues,q=H.dataType;if(U){var oe=[];oe.push({value:"$$ALL",text:"*"});var de=A[g];U.forEach(function(se){var me={value:se,text:se};se==="$$NULL"&&(me.text=de.data.gridInfo.nullValue),q==="checkbox"&&(me.text=se===de.data.gridInfo.checkedValue?"☑":"☐"),oe.push(me)});var he=B.value;Qe(B),oe.forEach(function(se){var me=document.createElement("option");me.value=se.value,me.textContent=se.text,B.appendChild(me)}),he&&(B.value=he,H.filterValue=he)}}},x.getDatasWithClearFilterValue=function(g,p){return p.forEach(function(B){B.forEach(function(H){H.filter=!1})}),A[g].data.variables.filters=[],p},x.reloadColForMerge=function(g,p){var B=x.__getColInfo(g,p);if(B){var H,U,q,oe,de=A[g];if(B.rowMerge){for(oe=B.colIndex,q=1;q<=de.methods.getRowCount();q++)delete(U=x._getCell(g,q,oe)).rowSpan,delete U.isRowMerge,delete U.colSpan,delete U.isColMerge;for(q=2;q<=de.methods.getRowCount();q++)if(H=x._getCell(g,q-1,oe),U=x._getCell(g,q,oe),H&&x.isCellVisible(H)&&H.dataType===U.dataType&&x.getTextFromCell(H)===x.getTextFromCell(U)){for(var he=H.rowIndex-1;he>0;he--)if((H=x._getCell(g,he,oe)).isRowMerge!==!0){H.rowSpan=_e(H.rowSpan,1)+1;break}U.isRowMerge=!0}for(q=1;q<=de.methods.getRowCount();q++)U=x._getCell(g,q,oe),x.reConnectedCallbackElement(U)}if(B.colMerge&&!x.__getColInfo(g,p-1).rowMerge){var se=x._getCells(g);for(q=1;q<=de.methods.getRowCount();q++)for(oe=B.colIndex-1;oe<=B.colIndex;oe++)delete(U=x._getCell(g,q,oe)).rowSpan,delete U.isRowMerge,delete U.colSpan,delete U.isColMerge;for(oe=B.colIndex,q=1;q<=de.methods.getRowCount();q++)if(H=se[q-1][oe-2],U=se[q-1][oe-1],H&&x.isCellVisible(H)&&H.dataType===U.dataType&&x.getTextFromCell(H)===x.getTextFromCell(U)){for(var me=H.colIndex-1;me>2;me--)if((H=se[q-1][me]).isColMerge!==!0){H.colSpan=_e(H.colSpan,1)+1;break}U.isColMerge=!0}for(q=1;q<=de.methods.getRowCount();q++)for(oe=B.colIndex-1;oe<=B.colIndex;oe++)U=x._getCell(g,q,oe),x.reConnectedCallbackElement(U)}}},x.reloadGridWithModifyCell=function(g,p){x.reloadFooterValue(g),x.reloadColFilterValue(g,p);var B=x.__getColInfo(g,p+1);B&&B.colMerge?x.reloadColForMerge(g,p+1):x.reloadColForMerge(g,p)},x.reloadGridForMerge=function(g){for(var p=A[g],B=3;B<=p.methods.getColCount();B++)x.reloadColForMerge(g,B)},x.reloadFooterValue=function(g){var p,B=k(x._getFooterCells(g));try{for(B.s();!(p=B.n()).done;){var H,U=k(p.value);try{for(U.s();!(H=U.n()).done;){var q=H.value;A[g].data.colInfos[q.colIndex-1]!=null&&x.reConnectedCallbackElement(q)}}catch(oe){U.e(oe)}finally{U.f()}}}catch(oe){B.e(oe)}finally{B.f()}},x.setGridDataRowCol=function(g,p,B){g.rowIndex=p,g.colIndex=B,x.setGridDataPosition(g)},x.setGridDataPosition=function(g){var p=g.rowIndex,B=g.colIndex;g.style.gridRowStart=String(p),g.style.gridRowEnd=String(p+1),g.style.gridColumnStart=String(B),g.style.gridColumnEnd=String(B+1)},x.getGridCell=function(g,p,B,H,U){var q;if(B&&B.constructor===Object)q={value:B[p.colId]};else if(B&&Array.isArray(B)){var oe,de=k(B);try{for(de.s();!(oe=de.n()).done;){var he=oe.value;if(he.colId===p.colId){q=he;break}}}catch(me){de.e(me)}finally{de.f()}}q||(q={value:null});var se=document.createElement("div");if(se._gridId=g,se._type="gbd",x.setCellDataFromColInfo(se,p),se.rowVisible=q.rowVisible===void 0||q.rowVisible,se.filter=q.filter!==void 0&&q.filter,q.colId!==void 0&&(se.colId=q.colId),q.colIndex!==void 0&&(se.colIndex=q.colIndex),q.name!==void 0&&(se.name=q.name),q.untarget!==void 0&&(se.untarget=q.untarget),q.rowMerge!==void 0&&(se.rowMerge=q.rowMerge),q.colMerge!==void 0&&(se.colMerge=q.colMerge),q.colVisible!==void 0&&(se.colVisible=q.colVisible),q.required!==void 0&&(se.required=q.required),q.resizable!==void 0&&(se.resizable=q.resizable),q.sortable!==void 0&&(se.sortable=q.sortable),q.filterable!==void 0&&(se.filterable=q.filterable),q.originWidth!==void 0&&(se.originWidth=q.originWidth),q.dataType!==void 0&&(se.dataType=q.dataType,![].concat(l(Object.keys(W)),l(Object.keys(w.dataType))).includes(se.dataType)))throw new Error("Please insert a valid dataType.");switch(q.selectSize!==void 0&&(se.selectSize=q.selectSize),q.locked!==void 0&&(se.locked=q.locked),q.lockedColor!==void 0&&(se.lockedColor=q.lockedColor),q.format!==void 0&&(se.format=q.format),q.codes!==void 0&&(se.codes=ot(q.codes)),q.defaultCode!==void 0&&(se.defaultCode=q.defaultCode),q.maxLength!==void 0&&(se.maxLength=q.maxLength),q.maxByte!==void 0&&(se.maxByte=q.maxByte),q.maxNumber!==void 0&&(se.maxNumber=q.maxNumber),q.minNumber!==void 0&&(se.minNumber=q.minNumber),q.roundNumber!==void 0&&(se.roundNumber=q.roundNumber),q.align!==void 0&&(se.align=q.align),q.verticalAlign!==void 0&&(se.verticalAlign=q.verticalAlign),q.overflowWrap!==void 0&&(se.overflowWrap=q.overflowWrap),q.wordBreak!==void 0&&(se.wordBreak=q.wordBreak),q.whiteSpace!==void 0&&(se.whiteSpace=q.whiteSpace),q.backColor!==void 0&&(se.backColor=q.backColor),q.fontColor!==void 0&&(se.fontColor=q.fontColor),q.fontBold!==void 0&&(se.fontBold=q.fontBold),q.fontItalic!==void 0&&(se.fontItalic=q.fontItalic),q.fontThruline!==void 0&&(se.fontThruline=q.fontThruline),q.fontUnderline!==void 0&&(se.fontUnderline=q.fontUnderline),se.colId){case"v-g-rownum":se.value=H;break;case"v-g-status":se.value=x.getCodeValue(["C","U","D"],null,q.value);break;default:se.value=x.getValidValue(se,q.value)}return p.filterable&&se.colVisible&&p.filterValues.add(se.textContent),x.setGridDataRowCol(se,H,U),se},x.setCellDataFromColInfo=function(g,p){if(g.colId=p.colId,g.colIndex=p.colIndex,g.name=p.name,g.untarget=p.untarget,g.rowMerge=p.rowMerge,g.colMerge=p.colMerge,g.colVisible=p.colVisible,g.required=p.required,g.resizable=p.resizable,g.sortable=p.sortable,g.filterable=p.filterable,g.originWidth=p.originWidth,g.dataType=p.dataType,![].concat(l(Object.keys(W)),l(Object.keys(w.dataType))).includes(g.dataType))throw new Error("Please insert a valid dataType.");g.selectSize=p.selectSize,g.locked=p.locked,g.lockedColor=p.lockedColor,g.format=p.format,g.codes=ot(p.codes),g.defaultCode=p.defaultCode,g.maxLength=p.maxLength,g.maxByte=p.maxByte,g.maxNumber=p.maxNumber,g.minNumber=p.minNumber,g.roundNumber=p.roundNumber,g.align=p.align,g.verticalAlign=p.verticalAlign,g.overflowWrap=p.overflowWrap,g.wordBreak=p.wordBreak,g.whiteSpace=p.whiteSpace,g.backColor=p.backColor,g.fontColor=p.fontColor,g.fontBold=p.fontBold,g.fontItalic=p.fontItalic,g.fontThruline=p.fontThruline,g.fontUnderline=p.fontUnderline},x.getSortSpan=function(g,p){var B;return A[g].data.variables.sortToggle[p]?w.elements.sortAscSpan&&w.elements.sortAscSpan instanceof HTMLElement&&w.elements.sortAscSpan.nodeType===1?B=w.elements.sortAscSpan.cloneNode(!0):((B=document.createElement("span")).style.fontSize="0.5em",B.style.paddingLeft="5px",B.innerText="▲"):w.elements.sortDescSpan&&w.elements.sortDescSpan instanceof HTMLElement&&w.elements.sortDescSpan.nodeType===1?B=w.elements.sortDescSpan.cloneNode(!0):((B=document.createElement("span")).style.fontSize="0.5em",B.style.paddingLeft="5px",B.innerText="▼"),B._gridId=g,B.isChild=!0,B._type="sort",B.classList.add(g+"_sortSpan"),B.classList.add(A[g].data.variables.sortToggle[p]?g+"_ascSpan":g+"_descSpan"),B}}(v,et,Ve),function(w,A,x){x.__getDefaultColInfo=function(g,p){var B=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(!p||!p.colId)throw new Error("Column ID is required. (colId)");var H=A[g];if(B){var U,q=ge(H.data.colInfos);try{for(q.s();!(U=q.n()).done;){var oe=U.value;if(p.colId===oe.colId)throw new Error("Column ID is primary key. (colId)")}}catch(se){q.e(se)}finally{q.f()}}var de=x._getColDefaultAlign(p.dataType?p.dataType:w.attributes.defaultColInfo.dataType),he={colId:p.colId,name:p.name?p.name:p.colId,colIndex:0,header:p.header?Zt(H.methods.getHeaderRowCount(),p.header):Zt(H.methods.getHeaderRowCount(),p.colId),footer:p.footer?p.footer:null,untarget:p.untarget?p.untarget:H.data.gridInfo.selectionPolicy==="none",rowMerge:p.rowMerge?p.rowMerge:w.attributes.defaultColInfo.rowMerge,colMerge:p.colMerge?p.colMerge:w.attributes.defaultColInfo.colMerge,colVisible:p.colVisible?p.colVisible:w.attributes.defaultColInfo.colVisible,required:p.required?p.required:w.attributes.defaultColInfo.required,resizable:p.resizable?p.resizable:w.attributes.defaultColInfo.resizable,sortable:p.sortable?p.sortable:w.attributes.defaultColInfo.sortable,filterable:p.filterable?p.filterable:w.attributes.defaultColInfo.filterable,originWidth:p.originWidth?p.originWidth:w.attributes.defaultColInfo.originWidth,dataType:p.dataType?p.dataType:w.attributes.defaultColInfo.dataType,selectSize:p.selectSize?p.selectSize:w.attributes.defaultColInfo.selectSize,locked:p.locked?p.locked:H.data.gridInfo.locked,lockedColor:p.lockedColor?p.lockedColor:H.data.gridInfo.lockedColor,format:p.format?p.format:w.attributes.defaultColInfo.format,codes:p.codes?p.codes:w.attributes.defaultColInfo.codes,defaultCode:p.defaultCode?p.defaultCode:w.attributes.defaultColInfo.defaultCode,maxLength:p.maxLength?p.maxLength:w.attributes.defaultColInfo.maxLength,maxByte:p.maxByte?p.maxByte:w.attributes.defaultColInfo.maxByte,maxNumber:p.maxNumber?p.maxNumber:w.attributes.defaultColInfo.maxNumber,minNumber:p.minNumber?p.minNumber:w.attributes.defaultColInfo.minNumber,roundNumber:p.roundNumber?p.roundNumber:w.attributes.defaultColInfo.roundNumber,align:p.align?p.align:de,verticalAlign:p.verticalAlign?p.verticalAlign:w.attributes.defaultColInfo.verticalAlign,overflowWrap:p.overflowWrap?p.overflowWrap:w.attributes.defaultColInfo.overflowWrap,wordBreak:p.wordBreak?p.wordBreak:w.attributes.defaultColInfo.wordBreak,whiteSpace:p.whiteSpace?p.whiteSpace:w.attributes.defaultColInfo.whiteSpace,backColor:p.backColor?p.backColor:w.attributes.defaultColInfo.backColor,fontColor:p.fontColor?p.fontColor:w.attributes.defaultColInfo.fontColor,fontBold:p.fontBold?p.fontBold:w.attributes.defaultColInfo.fontBold,fontItalic:p.fontItalic?p.fontItalic:w.attributes.defaultColInfo.fontItalic,fontThruline:p.fontThruline?p.fontThruline:w.attributes.defaultColInfo.fontThruline,fontUnderline:p.fontUnderline?p.fontUnderline:w.attributes.defaultColInfo.fontUnderline,filterValues:new Set,filterValue:null};return he.filterValue=he.filterable?"$$ALL":null,he},x.__getColInfo=function(g,p){var B,H=arguments.length>2&&arguments[2]!==void 0&&arguments[2],U=A[g];if(typeof p=="number")B=U.data.colInfos[p-1];else{var q,oe=ge(U.data.colInfos);try{for(oe.s();!(q=oe.n()).done;){var de=q.value;de.colId===p&&(B=de)}}catch(he){oe.e(he)}finally{oe.f()}}if(!B){if(H)throw new Error("There is no "+(typeof p=="number"?p+"th":p)+" colunm.");return null}return B},x.__getColIndex=function(g,p){var B=arguments.length>2&&arguments[2]!==void 0&&arguments[2],H=A[g];if(typeof p=="number")return B&&x.__checkColIndex(g,p),p;var U,q=ge(H.data.colInfos);try{for(q.s();!(U=q.n()).done;){var oe=U.value;if(oe.colId===p)return oe.colIndex}}catch(de){q.e(de)}finally{q.f()}if(B)throw new Error("There is no "+(typeof p=="number"?p+"th":p)+" colunm.");return null},x.__setGridColSize=function(g){var p,B=[],H=A[g],U=ge(H.data.colInfos);try{for(U.s();!(p=U.n()).done;){var q=p.value;B.push(q.colVisible?q.originWidth:"0px")}}catch(de){U.e(de)}finally{U.f()}var oe=B.join(" ");if(oe.includes("%")&&H.data.gridInfo.frozenColCount!==0)throw new Error(g+" has error. If you set the horizontal size to a percentage, property A is not available.");H.elements.gridHeader.style.gridTemplateColumns=oe,H.elements.gridBody.style.gridTemplateColumns=oe,H.elements.gridFooter.style.gridTemplateColumns=oe},x._getCellChildNode=function(g){if(!g)return null;var p,B=g._gridId,H=A[B];switch(g.dataType){case"text":(p=document.createElement("span")).classList.add(B+"_data-value-text"),p.innerText=g.value,p.nType="text";break;case"number":(p=document.createElement("span")).classList.add(B+"_data-value-number"),g.value===null||g.value===void 0||g.value===H.data.gridInfo.nullValue?p.innerText=H.data.gridInfo.nullValue:p.innerText=x.getFormatNumberFromCell(g),p.nType="number";break;case"mask":(p=document.createElement("span")).classList.add(B+"_data-value-mask"),p.innerText=g.value,p.nType="mask";break;case"date":(p=document.createElement("span")).classList.add(B+"_data-value-date"),g.value===null||g.value===void 0||g.value===H.data.gridInfo.nullValue?p.innerText=H.data.gridInfo.nullValue:p.innerText=x.getDateWithGridDateFormat(g),p.nType="date";break;case"month":(p=document.createElement("span")).classList.add(B+"_data-value-month"),g.value===null||g.value===void 0||g.value===H.data.gridInfo.nullValue?p.innerText=H.data.gridInfo.nullValue:p.innerText=x.getDateWithGridMonthFormat(g),p.nType="month";break;case"select":Array.isArray(g.value)&&g.value.length>0?((p=document.createElement("select")).classList.add(B+"_data-value-select"),p.addEventListener("change",function(U){x.selectAndCheckboxOnChange(U.target)}),x.setSelectOptions(p,g.value),p.nType="select",g.selectSize&&(p.style.width=g.selectSize)):((p=document.createElement("span")).classList.add(B+"_data-value-text"),p.innerText=H.data.gridInfo.nullValue,p.nType="text");break;case"checkbox":(p=document.createElement("input")).classList.add(B+"_data-value-checkbox"),p.addEventListener("change",function(U){x.selectAndCheckboxOnChange(U.target)}),p.type="checkbox",p.nType="checkbox",x.getCheckboxCellTrueOrFalse(g)&&p.setAttribute("checked","");break;case"button":g.value===null||g.value===void 0||g.value===H.data.gridInfo.nullValue?((p=document.createElement("span")).classList.add(B+"_data-value-text"),p.innerText=H.data.gridInfo.nullValue,p.nType="text"):((p=document.createElement("button")).classList.add(B+"_data-value-button"),p.innerText=g.value,p.nType="button",p.addEventListener("touchstart",function(){p.classList.add("active")}),p.addEventListener("touchend",function(){p.classList.remove("active")}));break;case"link":g.value===null||g.value===void 0||g.value===H.data.gridInfo.nullValue?((p=document.createElement("span")).classList.add(B+"_data-value-text"),p.innerText=H.data.gridInfo.nullValue,p.nType="text"):((p=document.createElement("a")).classList.add(B+"_data-value-link"),p.innerText=g.value.text,p.setAttribute("href",g.value.value),p.setAttribute("target",g.value.target?g.value.target:"_blank"),p.nType="link");break;case"code":(p=document.createElement("span")).classList.add(B+"_data-value-code"),p.innerText=g.value,p.nType="code";break;default:w.dataType&&Object.keys(w.dataType).forEach(function(U){if(U===g.dataType){if(w.dataType[U].getChildNode){if(typeof w.dataType[U].getChildNode!="function")throw new Error("getChildNode must be a function.");if(p=w.dataType[U].getChildNode(B,x.__getData(g))){if(!(p instanceof HTMLElement)||p.nodeType!==1)throw new Error("getChildNode must return an html element.")}else(p=document.createElement("span")).innerText=g.value}else(p=document.createElement("span")).innerText=g.value;p.classList.add(B+"_data-value-"+U),p.nType=U}})}return p.classList.add(B+"_data-value"),p._type="gbdv",p},x.__loadHeader=function(g){var p=A[g];x.__setGridColSize(g),Qe(p.elements.gridHeader),p.elements.gridHeader._gridHeaderCells.length=0;for(var B=p.methods.getHeaderRowCount(),H=1;H<=B;H++){var U,q=[],oe=1,de=ge(p.data.colInfos);try{for(de.s();!(U=de.n()).done;){var he=U.value,se=document.createElement("div");se._gridId=g,se._type="ghd",se.rowVisible=!0,se.filter=!1,x.setCellDataFromColInfo(se,he);var me=he.header.split(";");if(se.value=me[H-1]?me[H-1].replaceAll("\\n",`
|
|
48
|
-
`):"",x.setGridDataRowCol(se,H,oe),oe!==1){if(!me[H-1]){for(var Q=H-2;Q>=0;Q--)me[Q]&&(se.isRowMerge=!0);if(!se.isRowMerge)for(var u=oe-2;u>=0;u--)p.data.colInfos[u].header.split(";")[H-1]&&(se.isColMerge=!0)}}else H!==1&&(se.isRowMerge=!0);se.addEventListener("mousemove",function(pe){var Se=pe.target,ze=Se._gridId;if(ze){var je=A[ze];if(je&&(Se.style.cursor&&Se.style.removeProperty("cursor"),je.data.gridInfo.resizable&&Se._type==="ghd")){var Ue,it,rt=Se.getBoundingClientRect(),ct=rt.left,Ne=rt.right,De=pe.clientX;if(De-ct<20){if(Se.colIndex<=3||Se._frozenCol)return;for(var lt=Se.colIndex-1;lt>1&&(it=x._getHeaderCell(ze,1,lt)).colVisible!==!0;lt--);if(!it.resizable)return;Se.style.cursor="ew-resize",w._status.onHeaderDragging=!0,w._status.isHeaderDragging&&(Ue=De-w._status.mouseX,x.modifyColSize(it,Ue),w._status.mouseX=De)}else if(Ne-De<20){if(Se.colIndex<3||Se._frozenCol)return;for(var ae=Se.colIndex;ae>1&&(it=x._getHeaderCell(ze,1,ae)).colVisible!==!0;ae--);if(!it.resizable)return;Se.style.cursor="ew-resize",w._status.onHeaderDragging=!0,w._status.isHeaderDragging&&(Ue=De-w._status.mouseX,x.modifyColSize(it,Ue),w._status.mouseX=De)}else Se.style.cursor="",w._status.onHeaderDragging=!1}}}),se.addEventListener("mousedown",function(pe){w._status.mouseX=pe.clientX,w._status.onHeaderDragging&&(w._status.isHeaderDragging=!0)}),q.push(se),oe++}}catch(pe){de.e(pe)}finally{de.f()}p.elements.gridHeader._gridHeaderCells.push(q)}var b,_=ge(p.elements.gridHeader._gridHeaderCells);try{for(_.s();!(b=_.n()).done;){var R,F=ge(b.value);try{for(F.s();!(R=F.n()).done;){var P=R.value;p.elements.gridHeader.append(P),x.connectedGridData(P)}}catch(pe){F.e(pe)}finally{F.f()}}}catch(pe){_.e(pe)}finally{_.f()}var z=p.elements.gridHeader._gridHeaderCells;z.forEach(function(pe){pe.forEach(function(Se,ze){if(p.data.gridInfo.sortable&&Object.keys(p.data.variables.sortToggle).length>0&&B===Se.rowIndex)for(var je=B;je>0;je--){var Ue=z[je-1][ze];if(!Ue.isRowMerge&&!Ue.isColMerge&&p.data.variables.sortToggle[Ue.colId]!==void 0){var it=x.getSortSpan(p.data.id,Ue.colId);Ue.append(it);break}}p.data.gridInfo.filterable&&p.data.variables.filters.length>0&&Se.filterable&&Se._filterSelector&&p.data.variables.filters.forEach(function(rt){Se.colId===rt.colId&&(Se._filterSelector.style.display="block",requestAnimationFrame(function(){Array.from(Se._filterSelector.options).some(function(ct){return ct.value===rt.value})&&(Se._filterSelector.value=rt.value)}))})})})},x._getHeaderRow=function(g,p){return mt(A[g].elements.gridHeader._gridHeaderCells,p-1)},x._getHeaderCell=function(g,p,B){if(typeof B=="number")return mt(x._getHeaderRow(g,p),B-1);var H,U=ge(x._getHeaderRow(g,p));try{for(U.s();!(H=U.n()).done;){var q=H.value;if(q.colId===B)return q}}catch(oe){U.e(oe)}finally{U.f()}throw new Error("There is no "+(typeof B=="number"?B+"th":B)+" colunm.")},x._getHeaderCells=function(g){return A[g].elements.gridHeader._gridHeaderCells},x.__getHeaderFilter=function(g,p){var B,H,U=x.__getColIndex(g,p),q=A[g];if(!q.data.colInfos[U-1].filterable)return null;for(var oe=1;oe<=q.methods.getHeaderRowCount();oe++)if((B=x._getHeaderCell(g,oe,U))&&(H=B.querySelectorAll("."+g+"_filterSelect"))[0])return H[0];return null},x.__loadFooter=function(g){var p=A[g];Qe(p.elements.gridFooter),p.elements.gridFooter._gridFooterCells.length=0;for(var B=1;B<=p.methods.getFooterRowCount();B++){var H,U=[],q=1,oe=ge(p.data.colInfos);try{for(oe.s();!(H=oe.n()).done;){var de=H.value,he=document.createElement("div");he._gridId=g,he._type="gfd",he.rowVisible=!0,he.filter=!1,x.setCellDataFromColInfo(he,de),x.setGridDataRowCol(he,B,q),U.push(he),q++}}catch(_){oe.e(_)}finally{oe.f()}p.elements.gridFooter._gridFooterCells.push(U)}var se,me=ge(p.elements.gridFooter._gridFooterCells);try{for(me.s();!(se=me.n()).done;){var Q,u=ge(se.value);try{for(u.s();!(Q=u.n()).done;){var b=Q.value;p.elements.gridFooter.append(b),x.connectedGridData(b)}}catch(_){u.e(_)}finally{u.f()}}}catch(_){me.e(_)}finally{me.f()}},x._getFooterRow=function(g,p){var B=A[g];return mt(B.elements.gridFooter._gridFooterCells,p-1)},x._getFooterCell=function(g,p,B){if(typeof B=="number")return mt(x._getFooterRow(g,p),B-1);var H,U=ge(x._getFooterRow(g,p));try{for(U.s();!(H=U.n()).done;){var q=H.value;if(q.colId===B)return q}}catch(oe){U.e(oe)}finally{U.f()}throw new Error("There is no "+(typeof B=="number"?B+"th":B)+" colunm.")},x._getFooterCells=function(g){return A[g].elements.gridFooter._gridFooterCells},x._getRow=function(g,p){return A[g].elements.gridBody._gridBodyCells[p-1]},x._getCell=function(g,p,B){try{if(typeof B=="number")return A[g].elements.gridBody._gridBodyCells[p-1][B-1];var H,U=ge(A[g].elements.gridBody._gridBodyCells[p-1]);try{for(U.s();!(H=U.n()).done;){var q=H.value;if(q.colId===B)return q}}catch(oe){U.e(oe)}finally{U.f()}}catch{return null}return null},x._getCells=function(g){return A[g].elements.gridBody._gridBodyCells},x.__gridBodyCellsReConnected=function(g){if(A[g].data.variables.isDrawable){var p,B=ge(A[g].elements.gridBody._gridBodyCells);try{for(B.s();!(p=B.n()).done;){var H,U=ge(p.value);try{for(U.s();!(H=U.n()).done;){var q=H.value;x.reConnectedCallbackElement(q)}}catch(oe){U.e(oe)}finally{U.f()}}}catch(oe){B.e(oe)}finally{B.f()}}},x.__mountGridBodyCell=function(g){var p=A[g];if(p.data.variables.isDrawable){Qe(p.elements.gridBody);var B,H=ge(p.elements.gridBody._gridBodyCells);try{for(H.s();!(B=H.n()).done;){var U,q=ge(B.value);try{for(q.s();!(U=q.n()).done;){var oe=U.value;p.elements.gridBody.append(oe),x.connectedGridData(oe)}}catch(de){q.e(de)}finally{q.f()}}}catch(de){H.e(de)}finally{H.f()}x.reloadGridForMerge(g),p.methods.reloadFilterValue(),p.methods.reloadFooterValue()}},x.__clear=function(g){var p=A[g];p.elements.gridBody._gridBodyCells.length=0,p.data.variables.activeRows=[],p.data.variables.activeCols=[],p.data.variables.activeCells=[],p.data.variables.targetCell=null,p.data.variables.records=[],p.data.variables.recordseq=0},x.__checkRowIndex=function(g,p){if(!(p=Me(p))||p<1||p>A[g].methods.getRowCount())throw new Error("Please insert a row of valid range.")},x.__checkColRownumOrStatus=function(g){if(typeof g=="number"){if(g<=2)throw new Error("The row number or status columns info cannot be modified.")}else if(g==="v-g-rownum"||g==="v-g-status")throw new Error("The row number or status columns info cannot be modified.")},x.__checkColIndex=function(g,p){if(!(p=Me(p))||p<1||p>A[g].methods.getColCount())throw new Error("Please insert a col of valid range.")},x.___getDatasWithoutExceptedProperty=function(g){var p,B,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],U=[],q=ge(A[g].elements.gridBody._gridBodyCells);try{for(q.s();!(B=q.n()).done;){var oe=B.value;p=[];var de,he=ge(oe);try{for(he.s();!(de=he.n()).done;){var se=de.value,me=x.__getData(se,H);p.push(me)}}catch(Q){he.e(Q)}finally{he.f()}U.push(p)}}catch(Q){q.e(Q)}finally{q.f()}return U},x._doFilter=function(g){var p,B=A[g];if(B.data.variables.filters=[],B.elements.gridHeader.querySelectorAll("."+g+"_filterSelect").forEach(function(U){U.value!=="$$ALL"&&(p={colId:U.colId,value:U.value},x.__getColInfo(g,U.parentNode.parentNode.colIndex).filterValue=U.value,p.value!=="$$NULL"&&p.value!==null&&p.value!==void 0&&p.value!==""||(p.value=B.data.gridInfo.nullValue),B.data.variables.filters.push(p))}),B.data.variables.filters.length===0)x._getCells(g).forEach(function(U){U.forEach(function(q){q.filter=!1})});else{var H=1;x._getCells(g).forEach(function(U){var q=!1;U.forEach(function(oe){B.data.variables.filters.forEach(function(de){if(oe.colId===de.colId){var he=x.getTextFromCell(oe);Object.keys(w.dataType).forEach(function(se){if(oe.dataType===se&&w.dataType[se].getFilterValue){if(typeof w.dataType[se].getFilterValue!="function")throw new Error("getFilterValue must be a function.");he=w.dataType[se].getFilterValue(g,oe.value)}}),he!=de.value&&(q=!0)}})}),x._getRow(g,H).forEach(function(oe){oe.filter=q}),H++})}B.methods.load(B.methods.getDatas())},x.__gridCellReConnectedWithControlSpan=function(g){if(x.reConnectedCallbackElement(g),g.rowSpan)for(var p=g.rowIndex+1;p<g.rowIndex+g.rowSpan;p++)x.__gridCellReConnectedWithControlSpan(x._getCell(g._gridId,p,g.colIndex));if(g.colSpan)for(var B=g.colIndex+1;B<g.colIndex+g.colSpan;B++)x.__gridCellReConnectedWithControlSpan(x._getCell(g._gridId,g.rowIndex,B))},x.__getCellData=function(g,p){var B={};return x.setCellDataFromColInfo(B,g),B.value=null,B.rowIndex=p,B.filter=!1,B.rowVisible=!0,B},x.__getData=function(g){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],B={value:ot(g.value),colId:g.colId,rowIndex:g.rowIndex,colIndex:g.colIndex,name:g.name,untarget:g.untarget,rowMerge:g.rowMerge,colMerge:g.colMerge,colVisible:g.colVisible,required:g.required,resizable:g.resizable,sortable:g.sortable,filterable:g.filterable,originWidth:g.originWidth,dataType:g.dataType,selectSize:g.selectSize,locked:g.locked,lockedColor:g.lockedColor,format:g.format,codes:ot(g.codes),defaultCode:g.defaultCode,maxLength:g.maxLength,maxByte:g.maxByte,maxNumber:g.maxNumber,minNumber:g.minNumber,roundNumber:g.roundNumber,align:g.align,verticalAlign:g.verticalAlign,overflowWrap:g.overflowWrap,wordBreak:g.wordBreak,whiteSpace:g.whiteSpace,backColor:g.backColor,fontColor:g.fontColor,fontBold:g.fontBold,fontItalic:g.fontItalic,fontThruline:g.fontThruline,fontUnderline:g.fontUnderline,filter:g.filter};return B.text=x.getTextFromCell(g),g.rowSpan&&(B.rowSpan=g.rowSpan),g.colSpan&&(B.colSpan=g.colSpan),g.isRowMerge&&(B.isRowMerge=g.isRowMerge),g.isColMerge&&(B.isColMerge=g.isColMerge),g.rowVisible&&(B.rowVisible=g.rowVisible),p&&(p.indexOf("untarget")>=0&&(B.untarget=null),p.indexOf("colVisible")>=0&&(B.colVisible=null),p.indexOf("rowVisible")>=0&&(B.rowVisible=null),p.indexOf("required")>=0&&(B.required=null),p.indexOf("resizable")>=0&&(B.resizable=null),p.indexOf("originWidth")>=0&&(B.originWidth=null),p.indexOf("dataType")>=0&&(B.dataType=null),p.indexOf("selectSize")>=0&&(B.selectSize=null),p.indexOf("locked")>=0&&(B.locked=null),p.indexOf("lockedColor")>=0&&(B.lockedColor=null),p.indexOf("format")>=0&&(B.format=null),p.indexOf("codes")>=0&&(B.codes=null),p.indexOf("defaultCode")>=0&&(B.defaultCode=null),p.indexOf("maxLength")>=0&&(B.maxLength=null),p.indexOf("maxByte")>=0&&(B.maxByte=null),p.indexOf("maxNumber")>=0&&(B.maxNumber=null),p.indexOf("minNumber")>=0&&(B.minNumber=null),p.indexOf("roundNumber")>=0&&(B.roundNumber=null),p.indexOf("align")>=0&&(B.align=null),p.indexOf("verticalAlign")>=0&&(B.verticalAlign=null),p.indexOf("backColor")>=0&&(B.backColor=null),p.indexOf("fontColor")>=0&&(B.fontColor=null),p.indexOf("fontBold")>=0&&(B.fontBold=null),p.indexOf("fontItalic")>=0&&(B.fontItalic=null),p.indexOf("fontThruline")>=0&&(B.fontThruline=null),p.indexOf("fontUnderline")>=0&&(B.fontUnderline=null),p.indexOf("filter")>=0&&(B.filter=null),p.indexOf("value")>=0&&(B.value=null)),B},x.__setCellData=function(g,p,B,H){var U=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4];x.__checkRowIndex(g,p);var q=x.__getColIndex(g,B,!0);if(q<=2){if(U)throw new Error("The row number or status columns are immutable.");return!1}var oe=x._getCell(g,p,q);if(H.untarget&&(oe.untarget=H.untarget),H.dataType){if(![].concat(ie(Object.keys(W)),ie(Object.keys(w.dataType))).includes(H.dataType))throw new Error("Please insert a valid dataType.");oe.dataType=H.dataType}return H.selectSize&&(oe.selectSize=H.selectSize),H.locked&&(oe.locked=H.locked),H.lockedColor&&(oe.lockedColor=H.lockedColor),H.format&&(oe.format=H.format),H.codes&&(oe.codes=H.codes),H.defaultCode&&(oe.defaultCode=H.defaultCode),H.maxLength&&(oe.maxLength=H.maxLength),H.maxByte&&(oe.maxByte=H.maxByte),H.maxNumber&&(oe.maxNumber=H.maxNumber),H.minNumber&&(oe.minNumber=H.minNumber),H.roundNumber&&(oe.roundNumber=H.roundNumber),H.align&&(oe.align=H.align),H.verticalAlign&&(oe.verticalAlign=H.verticalAlign),H.overflowWrap&&(oe.overflowWrap=H.overflowWrap),H.wordBreak&&(oe.wordBreak=H.wordBreak),H.whiteSpace&&(oe.whiteSpace=H.whiteSpace),H.backColor&&(oe.backColor=H.backColor),H.fontColor&&(oe.fontColor=H.fontColor),H.fontBold&&(oe.fontBold=H.fontBold),H.fontItalic&&(oe.fontItalic=H.fontItalic),H.fontThruline&&(oe.fontThruline=H.fontThruline),H.fontUnderline&&(oe.fontUnderline=H.fontUnderline),H.value&&(oe.value=H.value),x.reConnectedCallbackElement(oe),x.reloadGridWithModifyCell(g,oe.colIndex),!0},x._getDataTypeStyle=function(){var g={};return Object.keys(w.dataType).forEach(function(p){w.dataType[p].cellStyle&&(g[p]=w.dataType[p].cellStyle)}),g},x._getFilterSpan=function(){return w.elements.filterSpan},x._getFooterFormula=function(){return ot(w.footerFormula)},x._getColDefaultAlign=function(g){switch(g){case"text":case"mask":return r.left;case"number":return r.right;case"date":case"month":case"select":case"checkbox":case"button":case"link":case"code":return r.center;default:return w.attributes.defaultColInfo.align}}}(v,et,Ve),function(w,A,x){x.isCellVisible=function(g){return!!g&&!(g.colVisible===!1||g.rowVisible===!1||g.filter===!0)},x.getFirstCellValidNumber=function(g){for(var p,B,H=g._gridId,U=1;U<A[H].methods.getRowCount();U++)if(B=x._getCell(H,U,g.colIndex),x.isCellVisible(B)&&(p=Et(B.value)))return p;return null},x.removeGridEditor=function(){if(!w._status.activeGridEditor)return!1;var g=w._status.activeGridEditor.targetCell,p=g._gridId;return A[p].events.onEditEnding(g.rowIndex,g.colId,w._status.editOldValue,w._status.editNewValue),g.style.padding="",g.style.fontSize="",w._status.activeGridEditor.parentNode.removeChild(w._status.activeGridEditor),w._status.activeGridEditor=null,!0},x.addBagicEventListenerToGridEditor=function(g){g.addEventListener("keydown",function(p){var B,H=w._status.activeGrid,U=H.data.variables.targetCell;if(H.events.onKeydownEditor(p)===!1)return p.stopPropagation(),void p.preventDefault();switch(p.key){case"Enter":p.shiftKey||(x.modifyCell(w),B=x.getMoveRowCell(U,1),x.selectCell(B),p.stopPropagation(),p.preventDefault());break;case"Escape":w._status.editNewValue=w._status.editOldValue,x.removeGridEditor(),p.stopPropagation(),p.preventDefault();break;case"Tab":x.modifyCell(w),B=x.getTabCell(U,p.shiftKey),x.selectCell(B),p.stopPropagation(),p.preventDefault();break;case"F2":x.modifyCell(w),p.stopPropagation(),p.preventDefault()}}),g.addEventListener("input",function(p){w._status.activeGrid.events.onInputEditor(p)})},x.setBagicAttributesToGridEditor=function(g,p){g._gridId=p._gridId,g.targetCell=p,g.style.width=p.offsetWidth+"px",g.style.height=p.scrollHeight+g.offsetHeight-g.clientHeight+"px",g.classList.add(g._gridId+"_editor")},x.createGridEditorTextarea=function(g){var p=document.createElement("textarea");x.setBagicAttributesToGridEditor(p,g),p.placeholder,p.classList.add(p._gridId+"_editor_textarea");var B=A[g._gridId].data.gridInfo.nullValue===g.value?null:g.value;return w._status.editOldValue=B,p.value=w._status.editOldValue,p.addEventListener("input",function(H){H.target.style.height=H.target.scrollHeight+p.offsetHeight-p.clientHeight+"px"},!1),p.addEventListener("keyup",function(H){H.target.value&&H.target.parentNode&&H.target.parentNode.maxLength&&(H.target.value=H.target.value.substring(0,H.target.parentNode.maxLength)),H.target.value&&H.target.parentNode&&H.target.parentNode.maxByte&&(H.target.value=Pe(H.target.value,H.target.parentNode.maxByte,w.checkByte))},!1),x.addBagicEventListenerToGridEditor(p),p},x.createGridEditorNumber=function(g){var p=document.createElement("input");x.setBagicAttributesToGridEditor(p,g),p.classList.add(p._gridId+"_editor_number"),p.setAttribute("type","number");var B=A[g._gridId].data.gridInfo.nullValue===g.value?null:g.value;return w._status.editOldValue=B,p.value=w._status.editOldValue,x.addBagicEventListenerToGridEditor(p),p},x.createGridEditorDate=function(g){var p=document.createElement("input");return x.setBagicAttributesToGridEditor(p,g),p.classList.add(p._gridId+"_editor_date"),p.setAttribute("type","date"),w._status.editOldValue=x.getDateWithInputDateFormat(g.value),p.value=w._status.editOldValue,x.addBagicEventListenerToGridEditor(p),p},x.createGridEditorMonth=function(g){var p=document.createElement("input");return x.setBagicAttributesToGridEditor(p,g),p.classList.add(p._gridId+"_editor_month"),p.setAttribute("type","month"),w._status.editOldValue=x.getDateWithInputMonthFormat(g.value),p.value=w._status.editOldValue,x.addBagicEventListenerToGridEditor(p),p},x.createGridEditorMask=function(g){var p=document.createElement("input");x.setBagicAttributesToGridEditor(p,g),p.classList.add(p._gridId+"_editor_mask"),p.setAttribute("type","text");var B=A[g._gridId].data.gridInfo.nullValue===g.value?null:g.value;return w._status.editOldValue=B,p.value=w._status.editOldValue,p.addEventListener("keyup",function(H){H.target.value=x.getMaskValue(H.target.targetCell.format,H.target.value)}),x.addBagicEventListenerToGridEditor(p),p},x.createGridEditorCode=function(g){var p=document.createElement("input");x.setBagicAttributesToGridEditor(p,g),p.classList.add(p._gridId+"_editor_code"),p.setAttribute("type","text");var B=g.value;return w._status.editOldValue=B,p.value=w._status.editOldValue,x.addBagicEventListenerToGridEditor(p),p},x.createGridEditor=function(g){var p=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!(g.locked||g.untarget||["select","checkbox","button","link"].indexOf(g.dataType)>=0)){var B;switch(x.removeGridEditor(),g.dataType){case"text":B=x.createGridEditorTextarea(g);break;case"number":B=x.createGridEditorNumber(g);break;case"date":B=x.createGridEditorDate(g);break;case"month":B=x.createGridEditorMonth(g);break;case"mask":B=x.createGridEditorMask(g);break;case"code":B=x.createGridEditorCode(g);break;default:Object.keys(w.dataType).forEach(function(H){if(g.dataType===H&&w.dataType[H].getEditor){if(typeof w.dataType[H].getEditor!="function")throw new Error("getEditor must be a function.");if(B=w.dataType[H].getEditor(g,g._gridId,x.__getData(g),function(){x.modifyCell(w)},function(){w._status.editNewValue=w._status.editOldValue,x.removeGridEditor()})){if(!(B instanceof HTMLElement)||B.nodeType!==1)throw new Error("getEditor must return an html element.");B._gridId=g._gridId,B.targetCell=g,B.classList.add(B._gridId+"_editor_"+H),B.classList.add(B._gridId+"_editor"),w._status.editOldValue=g.value}}})}A[g._gridId].events.onBeforeEditEnter(g.rowIndex,g.colId,B)!==!1&&B&&(g.style.padding="0",g.style.fontSize="0px",g.appendChild(B),B.focus(),p&&B.select(),w._status.activeGridEditor=B,A[g._gridId].events.onAfterEditEnter(g.rowIndex,g.colId,B))}},x.getValidValue=function(g,p){var B=_e(A[g._gridId].data.gridInfo.nullValue,null);if(!g)return null;if(g.dataType!=="code"&&(p==null||p===""||p===B))return B;switch(g.dataType){case"text":return g.maxLength&&(p=p.substring(0,g.maxLength)),g.maxByte&&(p=Pe(p,g.maxByte,w.checkByte)),p;case"mask":return _e(x.getMaskValue(g.format,p),B);case"date":return _e(x.getDateWithValueDateFormat(p),B);case"month":return _e(x.getDateWithValueMonthFormat(p),B);case"number":if((p=Et(p))===null)return B;var H=g.maxNumber,U=g.minNumber,q=g.roundNumber;H!=null&&typeof H=="number"&&p>H&&(p=H),U!=null&&typeof U=="number"&&p<U&&(p=U);var oe=parseFloat(p);if(q==null||typeof q!="number")return Number(p);if(q>=0){var de=oe.toFixed(q);return de=(de=de.replace(/(\.[0-9]*?)0+$/,"$1")).replace(/\.$/,""),Number(de)}var he=Math.pow(10,-q);return Number((Math.round(oe/he)*he).toFixed(-q));case"select":case"button":case"link":return p;case"checkbox":return typeof p=="boolean"?p:A[g._gridId].data.gridInfo.checkedValue===p;case"code":return x.getCodeValue(g.codes,g.defaultCode,p);default:return w.dataType&&Object.keys(w.dataType).forEach(function(se){if(g.dataType===se&&w.dataType[se].getValue){if(typeof w.dataType[se].getValue!="function")throw new Error("getValue must be a function.");p=w.dataType[se].getValue(g._gridId,p)}}),p}},x.getTextFromCell=function(g){if(!g)return"";var p="",B=_e(g.value,A[g._gridId].data.gridInfo.nullValue);switch(g.dataType){case"number":p=B===A[g._gridId].data.gridInfo.nullValue?B:_e(x.getFormatNumberFromCell(g),A[g._gridId].data.gridInfo.nullValue);break;case"date":p=B===A[g._gridId].data.gridInfo.nullValue?B:_e(x.getDateWithGridDateFormat(g),A[g._gridId].data.gridInfo.nullValue);break;case"month":p=B===A[g._gridId].data.gridInfo.nullValue?B:_e(x.getDateWithGridMonthFormat(g),A[g._gridId].data.gridInfo.nullValue);break;case"select":if(Array.isArray(g.value)&&g.value.length>0){p=g.value[0].text;var H,U=Le(g.value);try{for(U.s();!(H=U.n()).done;){var q=H.value;q.selected&&(p=q.text)}}catch(oe){U.e(oe)}finally{U.f()}p==null&&(p=A[g._gridId].data.gridInfo.nullValue)}break;case"link":p=g.value&&g.value.text?g.value.text:B;break;default:p=B,w.dataType?Object.keys(w.dataType).forEach(function(oe){if(g.dataType===oe&&w.dataType[oe].getText){if(typeof w.dataType[oe].getText!="function")throw new Error("getText must be a function.");p=w.dataType[oe].getText(g._gridId,p)}}):p=String(B)}return p},x.getFormatNumber=function(g,p){if(!g||p==null)return Number(p);var B=g.match(/^(.*?)([#0,.]+)(.*?)$/);if(!B)return Number(p);var H=function(R){return isNaN(R)||!isFinite(R)?0:Number(R)},U=function(R){return isNaN(R)||!isFinite(R)?0:parseFloat(R)},q=B[1],oe=B[2],de=B[3],he=oe.split(".")[0],se=oe.split(".").length>1?oe.split(".")[1]:"";de!=="%"&&de!==" %"||(p*=100);var me,Q=String(p),u=Q[0]==="-",b=(Q=u?Q.substring(1):Q).split(".")[0],_=Q.split(".").length>1?Q.split(".")[1]:"";switch(_=(_=U("0."+_).toLocaleString("en",{minimumFractionDigits:se.lastIndexOf("0")+1,maximumFractionDigits:se.length}))==="0"?"":_.substring(1),he){case"#,###":me=H(b)===0?_:(b=U(b).toLocaleString("en"))+_;break;case"#,##0":me=(b=U(b).toLocaleString("en"))+_;break;case"#":me=H(b)===0?_:b+_;break;case"0":me=b+_;break;default:return p}return q+(me=u?"-"+me:me)+de},x.getFormatNumberFromCell=function(g){return g.format?g.value===null||g.value===void 0?null:x.getFormatNumber(g.format,g.value):g.value},x.getDateWithValueDateFormat=function(g){if(!g||typeof g!="string")return null;var p=/^(\d{4})[-/.]? ?(\d{2})[-/.]? ?(\d{2})$/.exec(g.replace(/\s+/g,""));if(!p)return null;var B=p[1],H=p[2],U=p[3];return nt(B,H,U)?"".concat(B).concat(H).concat(U):null},x.getDateWithValueMonthFormat=function(g){if(!g||typeof g!="string")return null;g=g.replace(/\s+/g,"");var p,B,H=/^(\d{4})[-/.]? ?(\d{2})[-/.]? ?(\d{2})?$/.exec(g),U=/^(\d{4})[-/.]? ?(\d{2})$/.exec(g);if(H)p=H[1],B=H[2];else{if(!U)return null;p=U[1],B=U[2]}return nt(p,B,"01")?"".concat(p).concat(B):null},x.getDateWithInputDateFormat=function(g){if(!g||typeof g!="string")return null;var p=/^(\d{4})[-/.]?(\d{2})[-/.]?(\d{2})$/.exec(g);if(!p)return null;var B=p[1],H=p[2],U=p[3];return nt(B,H,U)?"".concat(B,"-").concat(H,"-").concat(U):null},x.getDateWithInputMonthFormat=function(g){if(!g||typeof g!="string")return null;var p=/^(\d{4})[-/.]?(\d{2})$/.exec(g);if(!p)return null;var B=p[1],H=p[2];return nt(B,H,"01")?"".concat(B,"-").concat(H):null},x.getDateWithGridDateFormat=function(g){var p=/^(\d{4})[-/.]?(\d{2})[-/.]?(\d{2})$/.exec(g.value);if(!p)return null;var B=p[1],H=p[2],U=p[3];if(!nt(B,H,U))return null;switch(A[g._gridId].data.gridInfo.dateFormat){case"yyyy-mm-dd":default:return"".concat(B,"-").concat(H,"-").concat(U);case"yyyy/mm/dd":return"".concat(B,"/").concat(H,"/").concat(U);case"yyyy. mm. dd":return"".concat(B,". ").concat(H,". ").concat(U);case"yyyymmdd":return"".concat(B).concat(H).concat(U);case"mm-dd-yyyy":return"".concat(H,"-").concat(U,"-").concat(B);case"mm/dd/yyyy":return"".concat(H,"/").concat(U,"/").concat(B);case"mm. dd. yyyy":return"".concat(H,". ").concat(U,". ").concat(B);case"mmddyyyy":return"".concat(H).concat(U).concat(B);case"dd-mm-yyyy":return"".concat(U,"-").concat(H,"-").concat(B);case"dd/mm/yyyy":return"".concat(U,"/").concat(H,"/").concat(B);case"dd. mm. yyyy":return"".concat(U,". ").concat(H,". ").concat(B);case"ddmmyyyy":return"".concat(U).concat(H).concat(B)}},x.getDateWithGridMonthFormat=function(g){var p=/^(\d{4})[-/.]?(\d{2})$/.exec(g.value);if(!p)return null;var B=p[1],H=p[2];if(!nt(B,H,"01"))return null;switch(A[g._gridId].data.gridInfo.monthFormat){case"yyyy-mm":default:return"".concat(B,"-").concat(H);case"yyyy/mm":return"".concat(B,"/").concat(H);case"yyyy. mm":return"".concat(B,". ").concat(H);case"yyyymm":return"".concat(B).concat(H);case"mm-yyyy":return"".concat(H,"-").concat(B);case"mm/yyyy":return"".concat(H,"/").concat(B);case"mm. yyyy":return"".concat(H,". ").concat(B);case"mmyyyy":return"".concat(H).concat(B)}},x.getCheckboxCellTrueOrFalse=function(g){var p=g.value,B=A[g._gridId].data.gridInfo.checkedValue,H=A[g._gridId].data.gridInfo.uncheckedValue;return typeof p=="boolean"?(g.value=p?B:H,p):p===B||(g.value=H,!1)},x.getCodeValue=function(g,p,B){return g&&Array.isArray(g)&&g.indexOf(B)>=0?B:p},x.getMaskValue=function(g,p){if(typeof g!="string"||typeof p!="string")return null;var B,H=g.split(""),U=p.split(""),q="";return H.every(function(oe,de){switch(B=!1,oe){case"A":/^[A-Z]$/.test(U[de])?(q+=U[de],B=!0):/^[a-z]$/.test(U[de])&&(q+=(he=U[de])&&typeof he=="string"?he.toUpperCase():"",B=!0);break;case"a":/^[a-z]$/.test(U[de])?(q+=U[de],B=!0):/^[A-Z]$/.test(U[de])&&(q+=Te(U[de]),B=!0);break;case"9":/^[0-9]$/.test(U[de])&&(q+=U[de],B=!0);break;default:oe===U[de]&&(q+=U[de],B=!0)}var he;return B}),q},x.setSelectOptions=function(g,p){Array.isArray(p)&&(Qe(g),p.forEach(function(B){var H=document.createElement("option");H.value=B.value,H.textContent=B.text,B.selected&&H.setAttribute("selected",""),B.disabled&&H.setAttribute("disabled",""),B.label&&H.setAttribute("label",B.label),g.appendChild(H)}))},x.getSelectOptions=function(g){if(!g)return null;var p=g.options;if(!p)return null;var B,H=[],U=Le(p);try{for(U.s();!(B=U.n()).done;){var q=B.value,oe={value:q.value,text:q.textContent};q.selected&&(oe.selected=!0),q.disabled&&(oe.disabled=!0),q.label&&(oe.label=q.label),H.push(oe)}}catch(de){U.e(de)}finally{U.f()}return H.length===0?null:H}}(v,et,Ve),function(w,A){A.connectedGridHeader=function(x){var g=w[x];if(g){var p=w[x].elements.gridHeader;if(!p.style.gridTemplateColumns.includes("%")){for(var B=0,H=1;H<g.methods.getColCount();H++)B+=Ie(g.methods.getColOriginWidth(H)).number;p.style.width=B+"px"}}},A.connectedGridBody=function(x){var g=w[x];if(g){var p=w[x].elements.gridBody;if(!p.style.gridTemplateColumns.includes("%")){for(var B=0,H=1;H<g.methods.getColCount();H++)B+=Ie(g.methods.getColOriginWidth(H)).number;p.style.width=B+"px"}}},A.connectedGridFooter=function(x){var g=w[x];if(g){var p=w[x].elements.gridFooter;if(!p.style.gridTemplateColumns.includes("%")){var B=0;if(!A._getFooterCells(x)||A._getFooterCells(x).length<=0)return;for(var H=1;H<g.methods.getColCount();H++)B+=Ie(g.methods.getColOriginWidth(H)).number;p.style.width=B+"px"}}},A.connectedGridData=function(x){var g=x._gridId,p=w[g],B=p.methods.getGridInfo();switch(x.style.removeProperty("display"),x.style.removeProperty("align-items"),x.style.removeProperty("justify-content"),x.style.removeProperty("text-align"),x.style.removeProperty("z-index"),x._type){case"ghd":if(x.innerText=x.value,B.frozenRowCount<=0&&x.colIndex<=B.frozenColCount){for(var H,U=0,q=x.colIndex-1;q>0;q--)if(H=A._getHeaderCell(g,x.rowIndex,q))if(H.isRowMerge){for(var oe=x.rowIndex-1,de=A._getHeaderCell(g,oe,q);de&&!(oe<0)&&de.isRowMerge;)oe--,de=A._getHeaderCell(g,oe,q);U+=de.offsetWidth}else U+=A._getHeaderCell(g,x.rowIndex,q).offsetWidth;else U+=0;x.style.position="sticky",x.style.zIndex=String(300+p.methods.getColCount()-x.colIndex),x.style.left=U+"px",x._frozenCol=!0}if(x.isRowMerge){for(var he=x.rowIndex-1,se=A._getHeaderCell(g,he,x.colIndex);se&&!(he<0);){if(!se.isRowMerge){se.style.gridRowEnd=x.style.gridRowEnd,se.rowSpan=se.rowSpan?se.rowSpan+1:1,se.style.zIndex=se.style.zIndex?se.style.zIndex:"250";break}he--,se=A._getHeaderCell(g,he,x.colIndex)}x.style.display="none"}if(x.isColMerge){for(var me=x.colIndex-1,Q=A._getHeaderCell(g,x.rowIndex,me);Q&&!(me<0);){if(!Q.isColMerge){if(Q.colId==="v-g-rownum"||Q.colId==="v-g-status")break;Q.style.gridColumnEnd=x.style.gridColumnEnd,Q.colSpan=Q.colSpan?Q.colSpan+1:1,Q.style.zIndex=Q.style.zIndex?Q.style.zIndex:"250";break}me--,Q=A._getHeaderCell(g,x.rowIndex,me)}x.style.display="none"}if(x.colVisible&&x.rowVisible||(x.style.display="none"),p.methods.getHeaderRowCount()===x.rowIndex){var u=x;if(x.isRowMerge)for(var b=x.rowIndex-1;b>0&&!(u=A._getHeaderCell(g,b,x.colIndex)).rowSpan;b--);u&&(u._isLastCell=!0)}if(B.filterable===!0&&p.methods.getColInfo(x.colId).filterable&&p.methods.getHeaderRowCount()===x.rowIndex&&x.colId!=="v-g-rownum"&&x.colId!=="v-g-status"){var _,R=A._getFilterSpan();R&&R instanceof HTMLElement&&R.nodeType===1?_=R.cloneNode(!0):(_=document.createElement("span")).innerText="σ",_._gridId=x._gridId,_.isChild=!0,_._type="filter",_.classList.add(x._gridId+"_filterSpan");var F=document.createElement("select");F.classList.add(x._gridId+"_filterSelect"),F.style.display="none",F._gridId=x._gridId,F.colId=x.colId,F.addEventListener("mousedown",function(Ct){Ct.target.filterOldValue=Ct.target.value}),F.addEventListener("change",function(Ct){var jt=Ct.target.value,rn=Ct.target._gridId;if(w[rn].events.onChooseFilter(Ct.target.parentNode.parentNode.rowIndex,Ct.target.parentNode.parentNode.colId,Ct.target.filterOldValue,jt)===!1)return Ct.stopPropagation(),void Ct.preventDefault();A._doFilter(rn),jt==="$$ALL"&&(Ct.target.style.display="none")}),_.append(F);var P=x;if(x.isRowMerge)for(var z=x.rowIndex-1;z>0&&!(P=A._getHeaderCell(g,z,x.colIndex)).rowSpan;z--);P&&(P.insertBefore(_,P.firstChild),P._filterSelector=F)}x.classList.add(x._gridId+"_h-v-g-d");break;case"gfd":if(B.frozenRowCount<=0&&x.colIndex<=B.frozenColCount){for(var pe,Se=0,ze=x.colIndex-1;ze>0;ze--)if(pe=A._getFooterCell(g,x.rowIndex,ze))if(pe.isRowMerge){for(var je=x.rowIndex-1,Ue=A._getFooterCell(g,je,ze);Ue&&!(je<0)&&Ue.isRowMerge;)je--,Ue=A._getFooterCell(g,je,ze);Se+=Ue.offsetWidth}else Se+=A._getFooterCell(g,x.rowIndex,ze).offsetWidth;else Se+=0;x.style.position="-webkit-sticky",x.style.zIndex="300",x.style.left=Se+"px",x._frozenCol=!0}var it=p.data.colInfos[x.colIndex-1].footer;Array.isArray(it)||(it=null);var rt=it&&it.length>=x.rowIndex-1?it[x.rowIndex-1]:null;if(rt){var ct;x.classList.add(x._gridId+"_f-v-g-d-value");try{ct=A._getFooterCell(g,x.rowIndex,x.colIndex-1)}catch{ct=null}if(ct&&ct.classList.add(x._gridId+"_f-v-g-d-value"),Object.values(re).includes(rt)){var Ne,De,lt;switch(rt){case"$$MAX":if(x.style.justifyContent="right",x.style.textAlign="right",p.methods.getRowCount()>0){Ne=De=A.getFirstCellValidNumber(x);for(var ae=2;ae<=p.methods.getRowCount();ae++)lt=A._getCell(g,ae,x.colIndex),A.isCellVisible(lt)&&(De=Et(lt.value))!==null&&De>Ne&&(Ne=De)}break;case"$$MIN":if(x.style.justifyContent="right",x.style.textAlign="right",p.methods.getRowCount()>0){Ne=De=A.getFirstCellValidNumber(x);for(var te=2;te<=p.methods.getRowCount();te++)lt=A._getCell(g,te,x.colIndex),A.isCellVisible(lt)&&(De=Et(lt.value))!==null&&De<Ne&&(Ne=De)}break;case"$$SUM":if(x.style.justifyContent="right",x.style.textAlign="right",p.methods.getRowCount()>0){Ne=0;for(var ht=1;ht<=p.methods.getRowCount();ht++)lt=A._getCell(g,ht,x.colIndex),A.isCellVisible(lt)&&(Ne=Math.round(1e5*(Ne+nn(lt.value)))/1e5)}break;case"$$AVG":if(x.style.justifyContent="right",x.style.textAlign="right",p.methods.getRowCount()>0){Ne=0,De=0;for(var d=0,y=1;y<=p.methods.getRowCount();y++)lt=A._getCell(g,y,x.colIndex),A.isCellVisible(lt)&&(Ne=Math.round(1e5*(Ne+nn(lt.value)))/1e5,lt.value===null||lt.value===void 0||isNaN(lt.value)||d++);Ne=d===0?null:(Ne/d).toFixed(2)}}Ne=Ne==null?"-":A.getFormatNumber(p.methods.getColFormat(x.colIndex),Ne),x.innerText=Ne,x.value=Ne}else if(typeof rt=="function"){var M=rt(p.methods.getValues());x.innerText=M,x.value=M}else{x.innerText=rt,x.value=rt;var S=A._getFooterFormula();S&&S.constructor===Object&&Object.keys(S).forEach(function(Ct){if(rt===Ct){var jt=S[Ct](p.methods.getColValues(x.colIndex));x.innerText=jt,x.value=jt}})}}x.align&&(x.style.justifyContent=x.align,x.style.textAlign=x.align),x.colIndex===p.methods.getColCount()&&x.classList.add(x._gridId+"_f-v-g-d-value"),x.colVisible&&x.rowVisible||(x.style.display="none"),x.classList.add(x._gridId+"_f-v-g-d");break;case"gbd":switch(x.dataType){case"text":case"mask":x.style.justifyContent="left",x.style.textAlign="left";break;case"number":x.style.justifyContent="right",x.style.textAlign="right";break;case"date":case"month":case"code":case"select":case"checkbox":case"button":case"link":x.style.justifyContent="center",x.style.textAlign="center";break;default:x.style.justifyContent="center",x.style.textAlign="center";var N=A._getDataTypeStyle();Object.keys(N).forEach(function(Ct){if(x.dataType===Ct){if(N[Ct].constructor!==Object)throw new Error("Cellstyle can only be inserted in object type.");Object.keys(N[Ct]).forEach(function(jt){x.style[jt]=N[Ct][jt]})}})}for(;x.firstChild;)x.removeChild(x.firstChild);if(x.append(A._getCellChildNode(x)),x.rowIndex<=B.frozenRowCount){for(var O,T=p.elements.gridHeader.offsetHeight,G=0,V=x.rowIndex-1;V>0;V--)if(O=A._getCell(g,V,x.colIndex))if(O.isColMerge){for(var Z=x.colIndex-1,ne=A._getCell(g,V,Z);ne&&!(Z<0)&&ne.isColMerge;)Z--,ne=A._getCell(g,V,Z);G+=ne.offsetHeight}else G+=A._getCell(g,V,x.colIndex).offsetHeight;else G+=0;x.style.position="sticky",x.style.zIndex="200",x.style.top=T+G+"px",x.rowIndex===B.frozenRowCount&&(x.style.borderBottom=B.cssInfo.verticalBorderSize+"px solid "+B.cssInfo.headerCellBorderColor),x._frozenCol=!0}if(B.frozenRowCount<=0&&x.colIndex<=B.frozenColCount){for(var Y,le=0,qe=x.colIndex-1;qe>0;qe--)if(Y=A._getCell(g,x.rowIndex,qe))if(Y.isRowMerge){for(var _t=x.rowIndex-1,on=A._getCell(g,_t,qe);on&&!(_t<0)&&on.isRowMerge;)_t--,on=A._getCell(g,_t,qe);le+=on.offsetWidth}else le+=A._getCell(g,x.rowIndex,qe).offsetWidth;else le+=0;x.style.position="sticky",x.style.zIndex="200",x.colIndex===B.frozenColCount&&(x.style.borderRight=B.cssInfo.verticalBorderSize+"px solid "+B.cssInfo.headerCellBorderColor),x.style.left=le+"px",x._frozenRow=!0}if(x.isRowMerge){for(var Ft=x.rowIndex-1,Gt=A._getCell(g,Ft,x.colIndex);Gt&&!(Ft<0);){if(!Gt.isRowMerge){Gt.style.gridRowEnd=x.style.gridRowEnd,Gt.verticalAlign||(Gt.style.alignItems="center"),Gt.style.zIndex=Gt.style.zIndex?Gt.style.zIndex:"50";break}Ft--,Gt=A._getCell(g,Ft,x.colIndex)}A.isCellVisible(Gt)&&(x.style.display="none")}if(x.isColMerge){for(var St=x.colIndex-1,At=A._getCell(g,x.rowIndex,St);At&&!(St<0);){if(!At.isColMerge){At.style.gridColumnEnd=x.style.gridColumnEnd,At.align||(At.style.justifyContent="center"),At.align||(At.style.textAlign="center"),At.verticalAlign||(At.style.alignItems="center"),At.style.zIndex=At.style.zIndex?At.style.zIndex:"50";break}St--,At=A._getCell(g,x.rowIndex,St)}x.style.display="none"}if(x.align&&(x.style.justifyContent=x.align,x.style.textAlign=x.align),x.verticalAlign)switch(x.verticalAlign.toLowerCase()){case"top":x.style.alignItems="flex-start";break;case"bottom":x.style.alignItems="flex-end";break;default:x.style.alignItems="center"}x.overflowWrap&&(x.style.overflowWrap=x.overflowWrap),x.wordBreak&&(x.style.wordBreak=x.wordBreak),x.whiteSpace&&(x.style.whiteSpace=x.whiteSpace),x.backColor&&(x.style.backgroundColor=x.backColor),x.fontColor&&(x.firstChild.style.color=x.fontColor),x.fontBold&&(x.firstChild.style.fontWeight="bold"),x.fontItalic&&(x.firstChild.style.fontStyle="italic"),x.fontThruline&&(x.firstChild.style.textDecoration="line-through"),x.fontUnderline&&(x.firstChild.style.textDecoration="underline"),x.colVisible&&x.rowVisible||(x.style.display="none"),x.filter&&(x.style.display="none"),B.alterRow&&x.rowIndex%2==0?(x.classList.add(x._gridId+"_b-v-g-d-alter"),x.classList.remove(x._gridId+"_b-v-g-d")):(x.classList.add(x._gridId+"_b-v-g-d"),x.classList.remove(x._gridId+"_b-v-g-d-alter")),x.locked&&x.lockedColor?x.classList.add(x._gridId+"_b-v-g-d-locked"):x.classList.remove(x._gridId+"_b-v-g-d-locked"),x.locked&&(x.dataType==="select"&&x.firstChild&&x.firstChild.nType=="select"||x.dataType==="checkbox"&&x.firstChild&&x.firstChild.nType=="checkbox")&&(x.firstChild.disabled=!0,x.firstChild.style.pointerEvents="none"),x.untarget&&(x.dataType==="button"&&x.firstChild&&x.firstChild.nType=="button"?(x.firstChild.disabled=!0,x.firstChild.style.pointerEvents="none"):x.dataType==="link"&&x.firstChild&&x.firstChild.nType=="link"&&(x.firstChild.style.opacity="0.8",x.firstChild.style.pointerEvents="none"))}x.classList.add(x._gridId+"_v-g-d"),x.addEventListener("mouseover",function(Ct){x.untarget||x._type!=="gbd"||(x.classList.add(x._gridId+"_mouseover-cell"),x.dataType==="link"&&x.querySelectorAll("*").forEach(function(jt){jt.classList.add(x._gridId+"_mouseover-cell")}))}),x.addEventListener("mouseout",function(Ct){x.untarget||x._type!=="gbd"||(x.classList.remove(x._gridId+"_mouseover-cell"),x.dataType==="link"&&x.querySelectorAll("*").forEach(function(jt){jt.classList.remove(x._gridId+"_mouseover-cell")}))})}}(et,Ve),v.documentEvent.mousedown=function(w){v._status.activeGridEditor&&v._status.activeGridEditor!==w.target&&Ve.modifyCell(v),v._status.activeGrid&&!v._status.activeGrid.elements.grid.contains(w.target)&&(v._status.activeGrid=null)},document.removeEventListener("mousedown",v.documentEvent.mousedown),document.addEventListener("mousedown",v.documentEvent.mousedown),v.documentEvent.mouseup=function(w){v._status.mouseX=0,v._status.mouseY=0,Ve.stopScrolling(v),v._status.isDragging&&(v._status.isDragging=!1),v._status.isHeaderDragging&&(v._status.isHeaderDragging=!1)},document.removeEventListener("mouseup",v.documentEvent.mouseup),document.addEventListener("mouseup",v.documentEvent.mouseup),v.documentEvent.keydown=function(w){if(v._status.activeGrid&&!v._status.activeGridEditor){var A=v._status.activeGrid;if(!A)return;var x=A.data.id;if(A.events.onKeydownGrid(w)===!1)return w.stopPropagation(),void w.preventDefault();if(w.ctrlKey||w.metaKey)switch(w.key){case"z":case"Z":Ve.redoundo(x),w.preventDefault();break;case"y":case"Y":Ve.redoundo(x,!1),w.preventDefault();break;case"a":case"A":A.data.variables.targetCell=Ve._getCell(x,1,3),Ve.selectCells(Ve._getCell(x,1,1),Ve._getCell(x,A.methods.getRowCount(),A.methods.getColCount())),w.preventDefault()}if(A.data.gridInfo.selectionPolicy==="none"||A.data.variables.activeCells.length<=0)return;var g,p=A.data.variables.activeCells[0],B=A.data.variables.activeCells[A.data.variables.activeCells.length-1];switch(Object.keys(v.dataType).forEach(function(H){if(A.data.variables.targetCell.dataType===H&&v.dataType[H].onSelectedAndKeyDown){if(typeof v.dataType[H].onSelectedAndKeyDown!="function")throw new Error("onSelectedAndKeyDown must be a function.");if(v.dataType[H].onSelectedAndKeyDown(w,A.data.id,Ve.__getData(A.data.variables.targetCell))===!1)return}}),w.key){case"Tab":g=Ve.getTabCell(A.data.variables.targetCell,w.shiftKey),Ve.selectCell(g),w.preventDefault();break;case"F2":Ve.createGridEditor(A.data.variables.targetCell),w.preventDefault();break;case"Enter":A.data.variables.targetCell.dataType==="select"?(v._status.editOldValue=A.data.variables.targetCell.firstChild.value,A.data.variables.targetCell.firstChild.focus()):A.data.variables.targetCell.dataType==="checkbox"?(v._status.editOldValue=A.data.variables.targetCell.value,A.data.variables.targetCell.firstChild.checked=!A.data.variables.targetCell.firstChild.checked,Ve.selectAndCheckboxOnChange(A.data.variables.targetCell.firstChild),g=Ve.getMoveRowCell(A.data.variables.targetCell,1),Ve.selectCell(g),w.preventDefault()):["text","number","date","month","mask","code"].indexOf(A.data.variables.targetCell.dataType)>=0&&(Ve.createGridEditor(A.data.variables.targetCell,!0),w.preventDefault());break;case" ":if(A.data.variables.targetCell.dataType==="select"){if(A.data.variables.targetCell.untarget||A.data.variables.targetCell.locked)return void w.preventDefault();v._status.editOldValue=A.data.variables.targetCell.firstChild.value,A.data.variables.targetCell.firstChild.focus()}else if(A.data.variables.targetCell.dataType==="button")A.data.variables.targetCell.firstChild.focus();else if(A.data.variables.targetCell.dataType==="checkbox"){if(A.data.variables.targetCell.untarget||A.data.variables.targetCell.locked)return void w.preventDefault();v._status.editOldValue=A.data.variables.targetCell.value,A.data.variables.targetCell.firstChild.checked=!A.data.variables.targetCell.firstChild.checked,Ve.selectAndCheckboxOnChange(A.data.variables.targetCell.firstChild),w.preventDefault()}else["text","number","date","month","mask","code"].indexOf(A.data.variables.targetCell.dataType)>=0&&(Ve.createGridEditor(A.data.variables.targetCell),w.preventDefault());break;case"ArrowUp":A.data.gridInfo.selectionPolicy==="range"&&w.shiftKey?(Ve.unselectCells(x),A.data.variables.targetCell.rowIndex>=B.rowIndex?(g=Ve.getMoveRowCell(p,-1),Ve.selectCells(g,B,g)):(g=Ve.getMoveRowCell(B,-1),Ve.selectCells(p,g))):(g=Ve.getMoveRowCell(A.data.variables.targetCell,-1),Ve.selectCell(g)),w.preventDefault();break;case"ArrowDown":A.data.gridInfo.selectionPolicy==="range"&&w.shiftKey?(Ve.unselectCells(x),A.data.variables.targetCell.rowIndex<=p.rowIndex?(g=Ve.getMoveRowCell(B,1),Ve.selectCells(p,g)):(g=Ve.getMoveRowCell(p,1),Ve.selectCells(g,B,g))):(g=Ve.getMoveRowCell(A.data.variables.targetCell,1),Ve.selectCell(g)),w.preventDefault();break;case"ArrowLeft":A.data.gridInfo.selectionPolicy==="range"&&w.shiftKey?(Ve.unselectCells(x),A.data.variables.targetCell.colIndex>=B.colIndex?(g=Ve.getMoveColCell(p,-1),Ve.selectCells(g,B,g)):(g=Ve.getMoveColCell(B,-1),Ve.selectCells(p,g))):(g=Ve.getMoveColCell(A.data.variables.targetCell,-1),Ve.selectCell(g)),w.preventDefault();break;case"ArrowRight":A.data.gridInfo.selectionPolicy==="range"&&w.shiftKey?(Ve.unselectCells(x),A.data.variables.targetCell.colIndex<=p.colIndex?(g=Ve.getMoveColCell(B,1),Ve.selectCells(p,g)):(g=Ve.getMoveColCell(p,1),Ve.selectCells(g,B,g))):(g=Ve.getMoveColCell(A.data.variables.targetCell,1),Ve.selectCell(g)),w.preventDefault()}}},document.removeEventListener("keydown",v.documentEvent.keydown),document.addEventListener("keydown",v.documentEvent.keydown),v.documentEvent.copy=function(w){if(v._status.activeGrid&&!v._status.activeGridEditor){var A=v._status.activeGrid.data.variables.activeCells;A.length>0&&(w.preventDefault(),Ve.copyGrid(A))}},document.removeEventListener("copy",v.documentEvent.copy),document.addEventListener("copy",v.documentEvent.copy),v.documentEvent.paste=function(w){v._status.activeGrid&&!v._status.activeGridEditor&&v._status.activeGrid.data.variables.activeCells.length>0&&(w.preventDefault(),Ve.pasteGrid(w,v._status.activeGrid.data.id))},document.removeEventListener("paste",v.documentEvent.paste),document.addEventListener("paste",v.documentEvent.paste),v._initialized=!0)},Ht=function(){Ze&&(Object.values(et).forEach(function(v){var w=document.getElementById(v.data.id),A=document.getElementById(v.data.id+"_styles-sheet");w&&w.parentNode.removeChild(w),A&&A.parentNode.removeChild(A),delete et[v.data.id],v=null}),document.removeEventListener("mousedown",Ze.documentEvent.mousedown),document.removeEventListener("mouseup",Ze.documentEvent.mouseup),document.removeEventListener("keydown",Ze.documentEvent.keydown),document.removeEventListener("copy",Ze.documentEvent.copy),document.removeEventListener("paste",Ze.documentEvent.paste),Ze.unmountGrid(),Ze=null)};return o})())}(fi)),fi.exports}var Na=Yd();const Kd=t=>t==null,Xd=()=>{let t=new Date().getTime();return typeof performance<"u"&&typeof performance.now=="function"&&(t+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const n=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(e==="x"?n:n&3|8).toString(16)})},Jd=t=>!t||typeof t!="string"?"":t.toLowerCase(),Zd=t=>!t||typeof t!="string"?"":t.toUpperCase(),Qd=(t,e)=>{if(typeof e!="string"||typeof t!="string")return null;const n=e.split(""),o=t.split("");let r="",i;return n.every((a,c)=>{switch(i=!1,a){case"A":/^[A-Z]$/.test(o[c])?(r+=o[c],i=!0):/^[a-z]$/.test(o[c])&&(r+=Zd(o[c]),i=!0);break;case"a":/^[a-z]$/.test(o[c])?(r+=o[c],i=!0):/^[A-Z]$/.test(o[c])&&(r+=Jd(o[c]),i=!0);break;case"9":/^[0-9]$/.test(o[c])&&(r+=o[c],i=!0);break;default:a===o[c]&&(r+=o[c],i=!0);break}return i}),r},eu=t=>t.replace(/[^0-9]/g,""),tu=t=>t<768?"mb":t<1200?"tb":t<1980?"pc":"wd",nu=(t,e)=>Array.from(t).find(n=>n.startsWith(`hison-${e}-`)),ou=(t,e)=>{const n=nu(t,e);if(n){const o=n.split("-");if(o.length>=3)return o[2]}return null},js=(t,e)=>t.findIndex(n=>n.startsWith(`hison-${e}-`)),Ws=t=>t?typeof t=="string"?t:Array.isArray(t)?t.map(Ws).filter(Boolean).join(" "):typeof t=="object"?Object.keys(t).filter(e=>!!t[e]).join(" "):"":"",ru=(t,e)=>{const n=t.trim().split(/\s+/),o={},r=[];for(const a of n){const c=a.match(/^(hison-(color|size|col|pos|layout-vertical-align)-[\w]+?)(?:-(mb|tb|pc|wd))?$/);if(c){const m=c[1],C=c[2],L=c[3];o[C]||(o[C]={}),L?o[C][L]=m:o[C].default=m}else r.push(a)}const i=[];for(const a of Object.values(o)){const c=a[e]||(e==="mb"?a.tb:void 0)||(e==="tb"?a.mb:void 0)||(e==="pc"?a.wd:void 0)||(e==="wd"?a.pc:void 0)||a.default;c&&i.push(c)}return[...r,...i].filter(Boolean)},iu=(t,e,n)=>{const o=js(t,e);o!==-1?t[o]=t[o]:t.push(`hison-${e}-${n}`)},au=(t,e)=>{if(!t||!e)return[];const n=`hison-${e}-`;return t.trim().split(/\s+/).filter(o=>o.startsWith(n))},Li=t=>/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t),qs=t=>/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(\s*,\s*(0|1|0?\.\d+))?\s*\)$/.test(t),Sl=t=>typeof t=="number"&&isFinite(t),lu=t=>{let e,n,o;if(t.length===4)e=parseInt(t[1]+t[1],16),n=parseInt(t[2]+t[2],16),o=parseInt(t[3]+t[3],16);else if(t.length===7)e=parseInt(t.slice(1,3),16),n=parseInt(t.slice(3,5),16),o=parseInt(t.slice(5,7),16);else throw new Error(`Invalid hex color format: ${t}`);return`rgba(${e}, ${n}, ${o}, 1)`},su=t=>{const e=t.replace(/\s+/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?.*\)$/i);if(!e)throw new Error(`Invalid rgba color format: ${t}`);const n=parseInt(e[1],10),o=parseInt(e[2],10),r=parseInt(e[3],10),i=a=>{const c=a.toString(16);return c.length===1?"0"+c:c};return`#${i(n)}${i(o)}${i(r)}`},Vn=t=>{if(Li(t))return t.replace(/\s+/g,"");if(qs(t))return su(t);throw new Error(`Invalid color format: ${t}`)},dn=t=>{if(Li(t))return lu(t);if(qs(t))return t.replace(/\s+/g,"");throw new Error(`Invalid color format: ${t}`)},_o=(t,e,n)=>{if(!Sl(e))throw new Error("add must be valid numbers");if(n&&!Sl(n))throw new Error("newOpacity must be valid numbers");const o=(K,X,ee)=>Math.min(Math.max(K,X),ee),r=t.match(/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*(0|1|0?\.\d+))?\s*\)$/i);if(!r)throw new Error("Invalid rgba color format");let[,i,a,c,m]=r;n||(n=Number(m));const C=o(parseInt(i)+e,0,255),L=o(parseInt(a)+e,0,255),D=o(parseInt(c)+e,0,255),W=o(n,0,1);return`rgba(${C},${L},${D},${W})`},hn=t=>{const e=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+),\s*(\d*\.?\d+)\)$/);if(!e)throw new Error("Invalid RGBA format.");const[,n,o,r,i]=e.map(Number),a=255-n,c=255-o,m=255-r;return`rgba(${a}, ${c}, ${m}, ${i})`},$s=t=>{const e=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+),\s*(\d*\.?\d+)\)$/);if(!e)throw new Error("Invalid RGBA format.");const[,n,o,r,i]=e.map(Number);return i<=.5?!1:n+o+r>385},cu=t=>{switch(t){case"primary":return Vn(ce.componentStyle.primaryColor);case"muted":return Vn(ce.componentStyle.mutedColor);case"info":return Vn(ce.componentStyle.infoColor);case"success":return Vn(ce.componentStyle.successColor);case"danger":return Vn(ce.componentStyle.dangerColor);case"warning":return Vn(ce.componentStyle.warningColor)}return null},du=t=>{switch(t){case"primary":return ce.componentStyle.primaryColor;case"muted":return ce.componentStyle.mutedColor;case"info":return ce.componentStyle.infoColor;case"success":return ce.componentStyle.successColor;case"danger":return ce.componentStyle.dangerColor;case"warning":return ce.componentStyle.warningColor}return""},uu=t=>$s(t)?Ja:Za,vo=(t,e)=>{t.buttonColor=e,t.borderColor=_o(e,-31),t.shadowColor=_o(e,-47),t.hoverColor=_o(e,-24),t.activeColor=_o(e,-24),t.rowHoverColor=_o(e,64,.2),t.stripeColor=_o(e,64,.1),t.emptyTextColor=e,t.filledTextColor=uu(e)},fu=(t,e)=>t.replace(/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([0-9.]+)\s*\)/i,(n,o,r,i)=>`rgba(${o},${r},${i},${e})`),Ni=new Map,hu=(t,e)=>{Ni.set(t,e)},mu=t=>{Ni.delete(t)},gu=()=>{for(const t of Ni.values())t()},yu=t=>{const e=Ni.get(t);e&&e()};var lo=(t=>(t.s="s",t.m="m",t.l="l",t.xl="xl",t))(lo||{}),Ys=(t=>(t.primary="primary",t.muted="muted",t.info="info",t.success="success",t.danger="danger",t.warning="warning",t))(Ys||{}),hi={exports:{}},pu=hi.exports,kl;function _u(){return kl||(kl=1,function(t,e){(function(n,o){t.exports=o()})(typeof self<"u"?self:typeof So<"u"?So:pu,()=>(()=>{var n={d:(f,h)=>{for(var I in h)n.o(h,I)&&!n.o(f,I)&&Object.defineProperty(f,I,{enumerable:!0,get:h[I]})},o:(f,h)=>Object.prototype.hasOwnProperty.call(f,h),r:f=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(f,"__esModule",{value:!0})}},o={};n.r(o),n.d(o,{NoteModeByDevice:()=>i,ToolPosition:()=>r,getVanillanote:()=>gn,getVanillanoteConfig:()=>Rn});var r=function(f){return f.top="TOP",f.bottom="BOTTOM",f}({}),i=function(f){return f.adaptive="ADAPTIVE",f.mobile="MOBILE",f.desktop="DESKTOP",f}({}),a=function(f){for(var h=f;!(h instanceof Element);)h=h.parentNode;return h.closest?h.closest("[data-vanillanote]"):null},c=function(f,h,I){return f+"_"+h+"_"+I},m=function(f,h,I){return f+"_"+h+"_"+I},C=function(f){return f+"_eventChildren"},L=function(f){return f+"_eventOnOverCssElement"},D=function(f){return f+"_eventClickCssElement"},W=function(){var f=new Date().getTime();return typeof performance<"u"&&typeof performance.now=="function"&&(f+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(h){var I=(f+16*Math.random())%16|0;return f=Math.floor(f/16),(h==="x"?I:3&I|8).toString(16)})},K=function(f){if(!f)return null;for(var h,I=f instanceof Element?f:f.parentNode;!I.hasAttribute("data-note-id")&&(I=I.parentNode)&&I.hasAttribute;);return I&&I.hasAttribute&&I.hasAttribute("data-note-id")&&(h=I.getAttribute("data-note-id")),h},X=function(){var f,h=navigator;if(((f=h.userAgentData)===null||f===void 0?void 0:f.mobile)!==void 0)return h.userAgentData.mobile;var I=navigator.userAgent;return/iPhone|iPad|iPod|Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(I)},ee=function(f){return/^[0-9]+$/.test(f)},re=function(f){return f==="-"||!isNaN(f)},fe=function(f){return/^[0-9A-Fa-f]*$/.test(f)},ye=function(f){var h=f.match(/-?\d+\.?\d*/);return h?Number(parseFloat(h[0])):null},xe=function(f,h){var I=Object.keys(f),be=Object.keys(h);if(I.length!==be.length)return!1;for(var Be=0;Be<I.length;Be++)if(!be.includes(I[Be])||f[I[Be]]!==h[I[Be]])return!1;return!0},ke=function(f,h){var I={};for(var be in f)f.hasOwnProperty(be)&&(I[be]=f[be]);for(var Be in h)h.hasOwnProperty(Be)&&(I[Be]=h[Be]);return I},ve=function(f){var h,I,be=new Object;if(!f)return be;h=f.trim().split(";");for(var Be=0;Be<h.length;Be++)h[Be]&&((I=h[Be].split(":")).length<2||(be[I[0].trim()]=I[1].trim()));return be},Ee=function(f){var h="";if(!f||f.constructor!==Object||Object.keys(f).length===0)return h;for(var I=Object.entries(f),be=0;be<I.length;be++)I[be].length<2||(h+=I[be][0].trim()+":"+I[be][1].trim()+";");return h},Me=function(f,h){if(!h||h.constructor!==Object)return f;for(var I=Object.keys(h),be=0;be<I.length;be++)f.setAttribute(I[be],h[I[be]]);return f},Ie=function(f,h){if(!f||!h||(h=h.toUpperCase(),f[0]!=="#"&&(f="#"+f),!/^#([0-9A-Fa-f]{6})$/.test(f)))return"33";var I=h==="R"?1:h==="G"?3:5;return f.substring(I,I+2)},Te=function(f,h){return"rgba("+parseInt(Ie(f,"R"),16)+","+parseInt(Ie(f,"G"),16)+","+parseInt(Ie(f,"B"),16)+","+h+")"},We=function(f){if(f.startsWith("#"))return f;if(!f.startsWith("rgba"))return null;var h=f.match(/\d+/g).map(Number),I=h[0].toString(16),be=h[1].toString(16),Be=h[2].toString(16);return I.length==1&&(I="0"+I),be.length==1&&(be="0"+be),Be.length==1&&(Be="0"+Be),"#"+I+be+Be},nt=function(f){if(!f||f.startsWith("#"))return null;var h=f.match(/\d+/g);if(!h)return null;var I=h.map(Number);return I.length<4?"1":I[3].toString()},Pe=function(f){if(/^#[0-9a-fA-F]{6}$/.test(f))return f;var h=document.createElement("div");h.style.color=f,document.body.appendChild(h);var I=window.getComputedStyle(h).color;document.body.removeChild(h);var be=I.match(/\d+/g);return"#"+((1<<24)+(+be[0]<<16)+(+be[1]<<8)+ +be[2]).toString(16).slice(1)},ot=function(f,h){f.startsWith("#")&&(f=f.slice(1));var I=parseInt(h,16);h.startsWith("-")&&(I=-parseInt(h.slice(1),16));var be=parseInt(f.slice(0,2),16)+I,Be=parseInt(f.slice(2,4),16)+I,tt=parseInt(f.slice(4,6),16)+I;return"#"+(be=(be<0?0:be>255?255:be).toString(16).padStart(2,"0"))+(Be=(Be<0?0:Be>255?255:Be).toString(16).padStart(2,"0"))+(tt<0?0:tt>255?255:tt).toString(16).padStart(2,"0")},mt=function(f){f.startsWith("#")&&(f=f.slice(1));var h=255-parseInt(f.slice(0,2),16),I=255-parseInt(f.slice(2,4),16),be=255-parseInt(f.slice(4,6),16);return I=I<127.5?I+16:I-16,be=be<127.5?be+16:be-16,"#"+(h=((h=h<127.5?h+16:h-16)<0?0:h>255?255:h).toString(16).padStart(2,"0"))+(I=(I<0?0:I>255?255:I).toString(16).padStart(2,"0"))+(be<0?0:be>255?255:be).toString(16).padStart(2,"0")},Qe=function(f){var h={color1:"",color2:"",color3:"",color4:"",color5:"",color6:"",color7:"",color8:"",color9:"",color10:"",color11:"",color12:"",color13:"",color14:"",color15:"",color16:"",color17:"",color18:"",color19:"",color20:""};return function(I){if(!/^#([0-9a-fA-F]{6})$/.test(I))throw new Error("Invalid HEX color format: ".concat(I));return parseInt(I.slice(1,3),16)+parseInt(I.slice(3,5),16)+parseInt(I.slice(5,7),16)>385?"light":"dark"}(f=Pe(f))==="light"?(h.color1="#333333",h.color2="#ffffff",h.color3=ot(f,"18"),h.color4=f,h.color5=ot(f,"-18"),h.color6=ot(f,"-1f"),h.color7=ot(f,"-2f"),h.color8="#609966",h.color9="#df2e38",h.color10="#333333",h.color11="#666666",h.color12="#333333",h.color13="#ffffff",h.color14="#ff7f7f",h.color15="#ffad66",h.color16="#ffff66",h.color17="#99ff99",h.color18="#99ccff",h.color19="#6699cc",h.color20="#cc99cc"):(h.color1="#ffffff",h.color2="#ffffff",h.color3=ot(f,"18"),h.color4=f,h.color5=ot(f,"-18"),h.color6=ot(f,"-1f"),h.color7=ot(f,"-2f"),h.color8="#609966",h.color9="#df2e38",h.color10="#333333",h.color11="#666666",h.color12="#333333",h.color13="#ffffff",h.color14="#b70404",h.color15="#e55807",h.color16="#f1c93b",h.color17="#1a5d1a",h.color18="#068fff",h.color19="#0c134f",h.color20="#5c469c"),h};function ut(f){return ut=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},ut(f)}function Ye(f,h){return function(I){if(Array.isArray(I))return I}(f)||function(I,be){var Be=I==null?null:typeof Symbol<"u"&&I[Symbol.iterator]||I["@@iterator"];if(Be!=null){var tt,Ge,j,E,s=[],l=!0,k=!1;try{if(j=(Be=Be.call(I)).next,be!==0)for(;!(l=(tt=j.call(Be)).done)&&(s.push(tt.value),s.length!==be);l=!0);}catch($){k=!0,Ge=$}finally{try{if(!l&&Be.return!=null&&(E=Be.return(),Object(E)!==E))return}finally{if(k)throw Ge}}return s}}(f,h)||function(I,be){if(I){if(typeof I=="string")return Je(I,be);var Be={}.toString.call(I).slice(8,-1);return Be==="Object"&&I.constructor&&(Be=I.constructor.name),Be==="Map"||Be==="Set"?Array.from(I):Be==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Be)?Je(I,be):void 0}}(f,h)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
48
|
+
`):"",x.setGridDataRowCol(se,H,oe),oe!==1){if(!me[H-1]){for(var Q=H-2;Q>=0;Q--)me[Q]&&(se.isRowMerge=!0);if(!se.isRowMerge)for(var u=oe-2;u>=0;u--)p.data.colInfos[u].header.split(";")[H-1]&&(se.isColMerge=!0)}}else H!==1&&(se.isRowMerge=!0);se.addEventListener("mousemove",function(pe){var Se=pe.target,ze=Se._gridId;if(ze){var je=A[ze];if(je&&(Se.style.cursor&&Se.style.removeProperty("cursor"),je.data.gridInfo.resizable&&Se._type==="ghd")){var Ue,it,rt=Se.getBoundingClientRect(),ct=rt.left,Ne=rt.right,De=pe.clientX;if(De-ct<20){if(Se.colIndex<=3||Se._frozenCol)return;for(var lt=Se.colIndex-1;lt>1&&(it=x._getHeaderCell(ze,1,lt)).colVisible!==!0;lt--);if(!it.resizable)return;Se.style.cursor="ew-resize",w._status.onHeaderDragging=!0,w._status.isHeaderDragging&&(Ue=De-w._status.mouseX,x.modifyColSize(it,Ue),w._status.mouseX=De)}else if(Ne-De<20){if(Se.colIndex<3||Se._frozenCol)return;for(var ae=Se.colIndex;ae>1&&(it=x._getHeaderCell(ze,1,ae)).colVisible!==!0;ae--);if(!it.resizable)return;Se.style.cursor="ew-resize",w._status.onHeaderDragging=!0,w._status.isHeaderDragging&&(Ue=De-w._status.mouseX,x.modifyColSize(it,Ue),w._status.mouseX=De)}else Se.style.cursor="",w._status.onHeaderDragging=!1}}}),se.addEventListener("mousedown",function(pe){w._status.mouseX=pe.clientX,w._status.onHeaderDragging&&(w._status.isHeaderDragging=!0)}),q.push(se),oe++}}catch(pe){de.e(pe)}finally{de.f()}p.elements.gridHeader._gridHeaderCells.push(q)}var b,_=ge(p.elements.gridHeader._gridHeaderCells);try{for(_.s();!(b=_.n()).done;){var R,F=ge(b.value);try{for(F.s();!(R=F.n()).done;){var P=R.value;p.elements.gridHeader.append(P),x.connectedGridData(P)}}catch(pe){F.e(pe)}finally{F.f()}}}catch(pe){_.e(pe)}finally{_.f()}var z=p.elements.gridHeader._gridHeaderCells;z.forEach(function(pe){pe.forEach(function(Se,ze){if(p.data.gridInfo.sortable&&Object.keys(p.data.variables.sortToggle).length>0&&B===Se.rowIndex)for(var je=B;je>0;je--){var Ue=z[je-1][ze];if(!Ue.isRowMerge&&!Ue.isColMerge&&p.data.variables.sortToggle[Ue.colId]!==void 0){var it=x.getSortSpan(p.data.id,Ue.colId);Ue.append(it);break}}p.data.gridInfo.filterable&&p.data.variables.filters.length>0&&Se.filterable&&Se._filterSelector&&p.data.variables.filters.forEach(function(rt){Se.colId===rt.colId&&(Se._filterSelector.style.display="block",requestAnimationFrame(function(){Array.from(Se._filterSelector.options).some(function(ct){return ct.value===rt.value})&&(Se._filterSelector.value=rt.value)}))})})})},x._getHeaderRow=function(g,p){return mt(A[g].elements.gridHeader._gridHeaderCells,p-1)},x._getHeaderCell=function(g,p,B){if(typeof B=="number")return mt(x._getHeaderRow(g,p),B-1);var H,U=ge(x._getHeaderRow(g,p));try{for(U.s();!(H=U.n()).done;){var q=H.value;if(q.colId===B)return q}}catch(oe){U.e(oe)}finally{U.f()}throw new Error("There is no "+(typeof B=="number"?B+"th":B)+" colunm.")},x._getHeaderCells=function(g){return A[g].elements.gridHeader._gridHeaderCells},x.__getHeaderFilter=function(g,p){var B,H,U=x.__getColIndex(g,p),q=A[g];if(!q.data.colInfos[U-1].filterable)return null;for(var oe=1;oe<=q.methods.getHeaderRowCount();oe++)if((B=x._getHeaderCell(g,oe,U))&&(H=B.querySelectorAll("."+g+"_filterSelect"))[0])return H[0];return null},x.__loadFooter=function(g){var p=A[g];Qe(p.elements.gridFooter),p.elements.gridFooter._gridFooterCells.length=0;for(var B=1;B<=p.methods.getFooterRowCount();B++){var H,U=[],q=1,oe=ge(p.data.colInfos);try{for(oe.s();!(H=oe.n()).done;){var de=H.value,he=document.createElement("div");he._gridId=g,he._type="gfd",he.rowVisible=!0,he.filter=!1,x.setCellDataFromColInfo(he,de),x.setGridDataRowCol(he,B,q),U.push(he),q++}}catch(_){oe.e(_)}finally{oe.f()}p.elements.gridFooter._gridFooterCells.push(U)}var se,me=ge(p.elements.gridFooter._gridFooterCells);try{for(me.s();!(se=me.n()).done;){var Q,u=ge(se.value);try{for(u.s();!(Q=u.n()).done;){var b=Q.value;p.elements.gridFooter.append(b),x.connectedGridData(b)}}catch(_){u.e(_)}finally{u.f()}}}catch(_){me.e(_)}finally{me.f()}},x._getFooterRow=function(g,p){var B=A[g];return mt(B.elements.gridFooter._gridFooterCells,p-1)},x._getFooterCell=function(g,p,B){if(typeof B=="number")return mt(x._getFooterRow(g,p),B-1);var H,U=ge(x._getFooterRow(g,p));try{for(U.s();!(H=U.n()).done;){var q=H.value;if(q.colId===B)return q}}catch(oe){U.e(oe)}finally{U.f()}throw new Error("There is no "+(typeof B=="number"?B+"th":B)+" colunm.")},x._getFooterCells=function(g){return A[g].elements.gridFooter._gridFooterCells},x._getRow=function(g,p){return A[g].elements.gridBody._gridBodyCells[p-1]},x._getCell=function(g,p,B){try{if(typeof B=="number")return A[g].elements.gridBody._gridBodyCells[p-1][B-1];var H,U=ge(A[g].elements.gridBody._gridBodyCells[p-1]);try{for(U.s();!(H=U.n()).done;){var q=H.value;if(q.colId===B)return q}}catch(oe){U.e(oe)}finally{U.f()}}catch{return null}return null},x._getCells=function(g){return A[g].elements.gridBody._gridBodyCells},x.__gridBodyCellsReConnected=function(g){if(A[g].data.variables.isDrawable){var p,B=ge(A[g].elements.gridBody._gridBodyCells);try{for(B.s();!(p=B.n()).done;){var H,U=ge(p.value);try{for(U.s();!(H=U.n()).done;){var q=H.value;x.reConnectedCallbackElement(q)}}catch(oe){U.e(oe)}finally{U.f()}}}catch(oe){B.e(oe)}finally{B.f()}}},x.__mountGridBodyCell=function(g){var p=A[g];if(p.data.variables.isDrawable){Qe(p.elements.gridBody);var B,H=ge(p.elements.gridBody._gridBodyCells);try{for(H.s();!(B=H.n()).done;){var U,q=ge(B.value);try{for(q.s();!(U=q.n()).done;){var oe=U.value;p.elements.gridBody.append(oe),x.connectedGridData(oe)}}catch(de){q.e(de)}finally{q.f()}}}catch(de){H.e(de)}finally{H.f()}x.reloadGridForMerge(g),p.methods.reloadFilterValue(),p.methods.reloadFooterValue()}},x.__clear=function(g){var p=A[g];p.elements.gridBody._gridBodyCells.length=0,p.data.variables.activeRows=[],p.data.variables.activeCols=[],p.data.variables.activeCells=[],p.data.variables.targetCell=null,p.data.variables.records=[],p.data.variables.recordseq=0},x.__checkRowIndex=function(g,p){if(!(p=Me(p))||p<1||p>A[g].methods.getRowCount())throw new Error("Please insert a row of valid range.")},x.__checkColRownumOrStatus=function(g){if(typeof g=="number"){if(g<=2)throw new Error("The row number or status columns info cannot be modified.")}else if(g==="v-g-rownum"||g==="v-g-status")throw new Error("The row number or status columns info cannot be modified.")},x.__checkColIndex=function(g,p){if(!(p=Me(p))||p<1||p>A[g].methods.getColCount())throw new Error("Please insert a col of valid range.")},x.___getDatasWithoutExceptedProperty=function(g){var p,B,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],U=[],q=ge(A[g].elements.gridBody._gridBodyCells);try{for(q.s();!(B=q.n()).done;){var oe=B.value;p=[];var de,he=ge(oe);try{for(he.s();!(de=he.n()).done;){var se=de.value,me=x.__getData(se,H);p.push(me)}}catch(Q){he.e(Q)}finally{he.f()}U.push(p)}}catch(Q){q.e(Q)}finally{q.f()}return U},x._doFilter=function(g){var p,B=A[g];if(B.data.variables.filters=[],B.elements.gridHeader.querySelectorAll("."+g+"_filterSelect").forEach(function(U){U.value!=="$$ALL"&&(p={colId:U.colId,value:U.value},x.__getColInfo(g,U.parentNode.parentNode.colIndex).filterValue=U.value,p.value!=="$$NULL"&&p.value!==null&&p.value!==void 0&&p.value!==""||(p.value=B.data.gridInfo.nullValue),B.data.variables.filters.push(p))}),B.data.variables.filters.length===0)x._getCells(g).forEach(function(U){U.forEach(function(q){q.filter=!1})});else{var H=1;x._getCells(g).forEach(function(U){var q=!1;U.forEach(function(oe){B.data.variables.filters.forEach(function(de){if(oe.colId===de.colId){var he=x.getTextFromCell(oe);Object.keys(w.dataType).forEach(function(se){if(oe.dataType===se&&w.dataType[se].getFilterValue){if(typeof w.dataType[se].getFilterValue!="function")throw new Error("getFilterValue must be a function.");he=w.dataType[se].getFilterValue(g,oe.value)}}),he!=de.value&&(q=!0)}})}),x._getRow(g,H).forEach(function(oe){oe.filter=q}),H++})}B.methods.load(B.methods.getDatas())},x.__gridCellReConnectedWithControlSpan=function(g){if(x.reConnectedCallbackElement(g),g.rowSpan)for(var p=g.rowIndex+1;p<g.rowIndex+g.rowSpan;p++)x.__gridCellReConnectedWithControlSpan(x._getCell(g._gridId,p,g.colIndex));if(g.colSpan)for(var B=g.colIndex+1;B<g.colIndex+g.colSpan;B++)x.__gridCellReConnectedWithControlSpan(x._getCell(g._gridId,g.rowIndex,B))},x.__getCellData=function(g,p){var B={};return x.setCellDataFromColInfo(B,g),B.value=null,B.rowIndex=p,B.filter=!1,B.rowVisible=!0,B},x.__getData=function(g){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],B={value:ot(g.value),colId:g.colId,rowIndex:g.rowIndex,colIndex:g.colIndex,name:g.name,untarget:g.untarget,rowMerge:g.rowMerge,colMerge:g.colMerge,colVisible:g.colVisible,required:g.required,resizable:g.resizable,sortable:g.sortable,filterable:g.filterable,originWidth:g.originWidth,dataType:g.dataType,selectSize:g.selectSize,locked:g.locked,lockedColor:g.lockedColor,format:g.format,codes:ot(g.codes),defaultCode:g.defaultCode,maxLength:g.maxLength,maxByte:g.maxByte,maxNumber:g.maxNumber,minNumber:g.minNumber,roundNumber:g.roundNumber,align:g.align,verticalAlign:g.verticalAlign,overflowWrap:g.overflowWrap,wordBreak:g.wordBreak,whiteSpace:g.whiteSpace,backColor:g.backColor,fontColor:g.fontColor,fontBold:g.fontBold,fontItalic:g.fontItalic,fontThruline:g.fontThruline,fontUnderline:g.fontUnderline,filter:g.filter};return B.text=x.getTextFromCell(g),g.rowSpan&&(B.rowSpan=g.rowSpan),g.colSpan&&(B.colSpan=g.colSpan),g.isRowMerge&&(B.isRowMerge=g.isRowMerge),g.isColMerge&&(B.isColMerge=g.isColMerge),g.rowVisible&&(B.rowVisible=g.rowVisible),p&&(p.indexOf("untarget")>=0&&(B.untarget=null),p.indexOf("colVisible")>=0&&(B.colVisible=null),p.indexOf("rowVisible")>=0&&(B.rowVisible=null),p.indexOf("required")>=0&&(B.required=null),p.indexOf("resizable")>=0&&(B.resizable=null),p.indexOf("originWidth")>=0&&(B.originWidth=null),p.indexOf("dataType")>=0&&(B.dataType=null),p.indexOf("selectSize")>=0&&(B.selectSize=null),p.indexOf("locked")>=0&&(B.locked=null),p.indexOf("lockedColor")>=0&&(B.lockedColor=null),p.indexOf("format")>=0&&(B.format=null),p.indexOf("codes")>=0&&(B.codes=null),p.indexOf("defaultCode")>=0&&(B.defaultCode=null),p.indexOf("maxLength")>=0&&(B.maxLength=null),p.indexOf("maxByte")>=0&&(B.maxByte=null),p.indexOf("maxNumber")>=0&&(B.maxNumber=null),p.indexOf("minNumber")>=0&&(B.minNumber=null),p.indexOf("roundNumber")>=0&&(B.roundNumber=null),p.indexOf("align")>=0&&(B.align=null),p.indexOf("verticalAlign")>=0&&(B.verticalAlign=null),p.indexOf("backColor")>=0&&(B.backColor=null),p.indexOf("fontColor")>=0&&(B.fontColor=null),p.indexOf("fontBold")>=0&&(B.fontBold=null),p.indexOf("fontItalic")>=0&&(B.fontItalic=null),p.indexOf("fontThruline")>=0&&(B.fontThruline=null),p.indexOf("fontUnderline")>=0&&(B.fontUnderline=null),p.indexOf("filter")>=0&&(B.filter=null),p.indexOf("value")>=0&&(B.value=null)),B},x.__setCellData=function(g,p,B,H){var U=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4];x.__checkRowIndex(g,p);var q=x.__getColIndex(g,B,!0);if(q<=2){if(U)throw new Error("The row number or status columns are immutable.");return!1}var oe=x._getCell(g,p,q);if(H.untarget&&(oe.untarget=H.untarget),H.dataType){if(![].concat(ie(Object.keys(W)),ie(Object.keys(w.dataType))).includes(H.dataType))throw new Error("Please insert a valid dataType.");oe.dataType=H.dataType}return H.selectSize&&(oe.selectSize=H.selectSize),H.locked&&(oe.locked=H.locked),H.lockedColor&&(oe.lockedColor=H.lockedColor),H.format&&(oe.format=H.format),H.codes&&(oe.codes=H.codes),H.defaultCode&&(oe.defaultCode=H.defaultCode),H.maxLength&&(oe.maxLength=H.maxLength),H.maxByte&&(oe.maxByte=H.maxByte),H.maxNumber&&(oe.maxNumber=H.maxNumber),H.minNumber&&(oe.minNumber=H.minNumber),H.roundNumber&&(oe.roundNumber=H.roundNumber),H.align&&(oe.align=H.align),H.verticalAlign&&(oe.verticalAlign=H.verticalAlign),H.overflowWrap&&(oe.overflowWrap=H.overflowWrap),H.wordBreak&&(oe.wordBreak=H.wordBreak),H.whiteSpace&&(oe.whiteSpace=H.whiteSpace),H.backColor&&(oe.backColor=H.backColor),H.fontColor&&(oe.fontColor=H.fontColor),H.fontBold&&(oe.fontBold=H.fontBold),H.fontItalic&&(oe.fontItalic=H.fontItalic),H.fontThruline&&(oe.fontThruline=H.fontThruline),H.fontUnderline&&(oe.fontUnderline=H.fontUnderline),H.value&&(oe.value=H.value),x.reConnectedCallbackElement(oe),x.reloadGridWithModifyCell(g,oe.colIndex),!0},x._getDataTypeStyle=function(){var g={};return Object.keys(w.dataType).forEach(function(p){w.dataType[p].cellStyle&&(g[p]=w.dataType[p].cellStyle)}),g},x._getFilterSpan=function(){return w.elements.filterSpan},x._getFooterFormula=function(){return ot(w.footerFormula)},x._getColDefaultAlign=function(g){switch(g){case"text":case"mask":return r.left;case"number":return r.right;case"date":case"month":case"select":case"checkbox":case"button":case"link":case"code":return r.center;default:return w.attributes.defaultColInfo.align}}}(v,et,Ve),function(w,A,x){x.isCellVisible=function(g){return!!g&&!(g.colVisible===!1||g.rowVisible===!1||g.filter===!0)},x.getFirstCellValidNumber=function(g){for(var p,B,H=g._gridId,U=1;U<A[H].methods.getRowCount();U++)if(B=x._getCell(H,U,g.colIndex),x.isCellVisible(B)&&(p=Et(B.value)))return p;return null},x.removeGridEditor=function(){if(!w._status.activeGridEditor)return!1;var g=w._status.activeGridEditor.targetCell,p=g._gridId;return A[p].events.onEditEnding(g.rowIndex,g.colId,w._status.editOldValue,w._status.editNewValue),g.style.padding="",g.style.fontSize="",w._status.activeGridEditor.parentNode.removeChild(w._status.activeGridEditor),w._status.activeGridEditor=null,!0},x.addBagicEventListenerToGridEditor=function(g){g.addEventListener("keydown",function(p){var B,H=w._status.activeGrid,U=H.data.variables.targetCell;if(H.events.onKeydownEditor(p)===!1)return p.stopPropagation(),void p.preventDefault();switch(p.key){case"Enter":p.shiftKey||(x.modifyCell(w),B=x.getMoveRowCell(U,1),x.selectCell(B),p.stopPropagation(),p.preventDefault());break;case"Escape":w._status.editNewValue=w._status.editOldValue,x.removeGridEditor(),p.stopPropagation(),p.preventDefault();break;case"Tab":x.modifyCell(w),B=x.getTabCell(U,p.shiftKey),x.selectCell(B),p.stopPropagation(),p.preventDefault();break;case"F2":x.modifyCell(w),p.stopPropagation(),p.preventDefault()}}),g.addEventListener("input",function(p){w._status.activeGrid.events.onInputEditor(p)})},x.setBagicAttributesToGridEditor=function(g,p){g._gridId=p._gridId,g.targetCell=p,g.style.width=p.offsetWidth+"px",g.style.height=p.scrollHeight+g.offsetHeight-g.clientHeight+"px",g.classList.add(g._gridId+"_editor")},x.createGridEditorTextarea=function(g){var p=document.createElement("textarea");x.setBagicAttributesToGridEditor(p,g),p.placeholder,p.classList.add(p._gridId+"_editor_textarea");var B=A[g._gridId].data.gridInfo.nullValue===g.value?null:g.value;return w._status.editOldValue=B,p.value=w._status.editOldValue,p.addEventListener("input",function(H){H.target.style.height=H.target.scrollHeight+p.offsetHeight-p.clientHeight+"px"},!1),p.addEventListener("keyup",function(H){H.target.value&&H.target.parentNode&&H.target.parentNode.maxLength&&(H.target.value=H.target.value.substring(0,H.target.parentNode.maxLength)),H.target.value&&H.target.parentNode&&H.target.parentNode.maxByte&&(H.target.value=Pe(H.target.value,H.target.parentNode.maxByte,w.checkByte))},!1),x.addBagicEventListenerToGridEditor(p),p},x.createGridEditorNumber=function(g){var p=document.createElement("input");x.setBagicAttributesToGridEditor(p,g),p.classList.add(p._gridId+"_editor_number"),p.setAttribute("type","number");var B=A[g._gridId].data.gridInfo.nullValue===g.value?null:g.value;return w._status.editOldValue=B,p.value=w._status.editOldValue,x.addBagicEventListenerToGridEditor(p),p},x.createGridEditorDate=function(g){var p=document.createElement("input");return x.setBagicAttributesToGridEditor(p,g),p.classList.add(p._gridId+"_editor_date"),p.setAttribute("type","date"),w._status.editOldValue=x.getDateWithInputDateFormat(g.value),p.value=w._status.editOldValue,x.addBagicEventListenerToGridEditor(p),p},x.createGridEditorMonth=function(g){var p=document.createElement("input");return x.setBagicAttributesToGridEditor(p,g),p.classList.add(p._gridId+"_editor_month"),p.setAttribute("type","month"),w._status.editOldValue=x.getDateWithInputMonthFormat(g.value),p.value=w._status.editOldValue,x.addBagicEventListenerToGridEditor(p),p},x.createGridEditorMask=function(g){var p=document.createElement("input");x.setBagicAttributesToGridEditor(p,g),p.classList.add(p._gridId+"_editor_mask"),p.setAttribute("type","text");var B=A[g._gridId].data.gridInfo.nullValue===g.value?null:g.value;return w._status.editOldValue=B,p.value=w._status.editOldValue,p.addEventListener("keyup",function(H){H.target.value=x.getMaskValue(H.target.targetCell.format,H.target.value)}),x.addBagicEventListenerToGridEditor(p),p},x.createGridEditorCode=function(g){var p=document.createElement("input");x.setBagicAttributesToGridEditor(p,g),p.classList.add(p._gridId+"_editor_code"),p.setAttribute("type","text");var B=g.value;return w._status.editOldValue=B,p.value=w._status.editOldValue,x.addBagicEventListenerToGridEditor(p),p},x.createGridEditor=function(g){var p=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!(g.locked||g.untarget||["select","checkbox","button","link"].indexOf(g.dataType)>=0)){var B;switch(x.removeGridEditor(),g.dataType){case"text":B=x.createGridEditorTextarea(g);break;case"number":B=x.createGridEditorNumber(g);break;case"date":B=x.createGridEditorDate(g);break;case"month":B=x.createGridEditorMonth(g);break;case"mask":B=x.createGridEditorMask(g);break;case"code":B=x.createGridEditorCode(g);break;default:Object.keys(w.dataType).forEach(function(H){if(g.dataType===H&&w.dataType[H].getEditor){if(typeof w.dataType[H].getEditor!="function")throw new Error("getEditor must be a function.");if(B=w.dataType[H].getEditor(g,g._gridId,x.__getData(g),function(){x.modifyCell(w)},function(){w._status.editNewValue=w._status.editOldValue,x.removeGridEditor()})){if(!(B instanceof HTMLElement)||B.nodeType!==1)throw new Error("getEditor must return an html element.");B._gridId=g._gridId,B.targetCell=g,B.classList.add(B._gridId+"_editor_"+H),B.classList.add(B._gridId+"_editor"),w._status.editOldValue=g.value}}})}A[g._gridId].events.onBeforeEditEnter(g.rowIndex,g.colId,B)!==!1&&B&&(g.style.padding="0",g.style.fontSize="0px",g.appendChild(B),B.focus(),p&&B.select(),w._status.activeGridEditor=B,A[g._gridId].events.onAfterEditEnter(g.rowIndex,g.colId,B))}},x.getValidValue=function(g,p){var B=_e(A[g._gridId].data.gridInfo.nullValue,null);if(!g)return null;if(g.dataType!=="code"&&(p==null||p===""||p===B))return B;switch(g.dataType){case"text":return g.maxLength&&(p=p.substring(0,g.maxLength)),g.maxByte&&(p=Pe(p,g.maxByte,w.checkByte)),p;case"mask":return _e(x.getMaskValue(g.format,p),B);case"date":return _e(x.getDateWithValueDateFormat(p),B);case"month":return _e(x.getDateWithValueMonthFormat(p),B);case"number":if((p=Et(p))===null)return B;var H=g.maxNumber,U=g.minNumber,q=g.roundNumber;H!=null&&typeof H=="number"&&p>H&&(p=H),U!=null&&typeof U=="number"&&p<U&&(p=U);var oe=parseFloat(p);if(q==null||typeof q!="number")return Number(p);if(q>=0){var de=oe.toFixed(q);return de=(de=de.replace(/(\.[0-9]*?)0+$/,"$1")).replace(/\.$/,""),Number(de)}var he=Math.pow(10,-q);return Number((Math.round(oe/he)*he).toFixed(-q));case"select":case"button":case"link":return p;case"checkbox":return typeof p=="boolean"?p:A[g._gridId].data.gridInfo.checkedValue===p;case"code":return x.getCodeValue(g.codes,g.defaultCode,p);default:return w.dataType&&Object.keys(w.dataType).forEach(function(se){if(g.dataType===se&&w.dataType[se].getValue){if(typeof w.dataType[se].getValue!="function")throw new Error("getValue must be a function.");p=w.dataType[se].getValue(g._gridId,p)}}),p}},x.getTextFromCell=function(g){if(!g)return"";var p="",B=_e(g.value,A[g._gridId].data.gridInfo.nullValue);switch(g.dataType){case"number":p=B===A[g._gridId].data.gridInfo.nullValue?B:_e(x.getFormatNumberFromCell(g),A[g._gridId].data.gridInfo.nullValue);break;case"date":p=B===A[g._gridId].data.gridInfo.nullValue?B:_e(x.getDateWithGridDateFormat(g),A[g._gridId].data.gridInfo.nullValue);break;case"month":p=B===A[g._gridId].data.gridInfo.nullValue?B:_e(x.getDateWithGridMonthFormat(g),A[g._gridId].data.gridInfo.nullValue);break;case"select":if(Array.isArray(g.value)&&g.value.length>0){p=g.value[0].text;var H,U=Le(g.value);try{for(U.s();!(H=U.n()).done;){var q=H.value;q.selected&&(p=q.text)}}catch(oe){U.e(oe)}finally{U.f()}p==null&&(p=A[g._gridId].data.gridInfo.nullValue)}break;case"link":p=g.value&&g.value.text?g.value.text:B;break;default:p=B,w.dataType?Object.keys(w.dataType).forEach(function(oe){if(g.dataType===oe&&w.dataType[oe].getText){if(typeof w.dataType[oe].getText!="function")throw new Error("getText must be a function.");p=w.dataType[oe].getText(g._gridId,p)}}):p=String(B)}return p},x.getFormatNumber=function(g,p){if(!g||p==null)return Number(p);var B=g.match(/^(.*?)([#0,.]+)(.*?)$/);if(!B)return Number(p);var H=function(R){return isNaN(R)||!isFinite(R)?0:Number(R)},U=function(R){return isNaN(R)||!isFinite(R)?0:parseFloat(R)},q=B[1],oe=B[2],de=B[3],he=oe.split(".")[0],se=oe.split(".").length>1?oe.split(".")[1]:"";de!=="%"&&de!==" %"||(p*=100);var me,Q=String(p),u=Q[0]==="-",b=(Q=u?Q.substring(1):Q).split(".")[0],_=Q.split(".").length>1?Q.split(".")[1]:"";switch(_=(_=U("0."+_).toLocaleString("en",{minimumFractionDigits:se.lastIndexOf("0")+1,maximumFractionDigits:se.length}))==="0"?"":_.substring(1),he){case"#,###":me=H(b)===0?_:(b=U(b).toLocaleString("en"))+_;break;case"#,##0":me=(b=U(b).toLocaleString("en"))+_;break;case"#":me=H(b)===0?_:b+_;break;case"0":me=b+_;break;default:return p}return q+(me=u?"-"+me:me)+de},x.getFormatNumberFromCell=function(g){return g.format?g.value===null||g.value===void 0?null:x.getFormatNumber(g.format,g.value):g.value},x.getDateWithValueDateFormat=function(g){if(!g||typeof g!="string")return null;var p=/^(\d{4})[-/.]? ?(\d{2})[-/.]? ?(\d{2})$/.exec(g.replace(/\s+/g,""));if(!p)return null;var B=p[1],H=p[2],U=p[3];return nt(B,H,U)?"".concat(B).concat(H).concat(U):null},x.getDateWithValueMonthFormat=function(g){if(!g||typeof g!="string")return null;g=g.replace(/\s+/g,"");var p,B,H=/^(\d{4})[-/.]? ?(\d{2})[-/.]? ?(\d{2})?$/.exec(g),U=/^(\d{4})[-/.]? ?(\d{2})$/.exec(g);if(H)p=H[1],B=H[2];else{if(!U)return null;p=U[1],B=U[2]}return nt(p,B,"01")?"".concat(p).concat(B):null},x.getDateWithInputDateFormat=function(g){if(!g||typeof g!="string")return null;var p=/^(\d{4})[-/.]?(\d{2})[-/.]?(\d{2})$/.exec(g);if(!p)return null;var B=p[1],H=p[2],U=p[3];return nt(B,H,U)?"".concat(B,"-").concat(H,"-").concat(U):null},x.getDateWithInputMonthFormat=function(g){if(!g||typeof g!="string")return null;var p=/^(\d{4})[-/.]?(\d{2})$/.exec(g);if(!p)return null;var B=p[1],H=p[2];return nt(B,H,"01")?"".concat(B,"-").concat(H):null},x.getDateWithGridDateFormat=function(g){var p=/^(\d{4})[-/.]?(\d{2})[-/.]?(\d{2})$/.exec(g.value);if(!p)return null;var B=p[1],H=p[2],U=p[3];if(!nt(B,H,U))return null;switch(A[g._gridId].data.gridInfo.dateFormat){case"yyyy-mm-dd":default:return"".concat(B,"-").concat(H,"-").concat(U);case"yyyy/mm/dd":return"".concat(B,"/").concat(H,"/").concat(U);case"yyyy. mm. dd":return"".concat(B,". ").concat(H,". ").concat(U);case"yyyymmdd":return"".concat(B).concat(H).concat(U);case"mm-dd-yyyy":return"".concat(H,"-").concat(U,"-").concat(B);case"mm/dd/yyyy":return"".concat(H,"/").concat(U,"/").concat(B);case"mm. dd. yyyy":return"".concat(H,". ").concat(U,". ").concat(B);case"mmddyyyy":return"".concat(H).concat(U).concat(B);case"dd-mm-yyyy":return"".concat(U,"-").concat(H,"-").concat(B);case"dd/mm/yyyy":return"".concat(U,"/").concat(H,"/").concat(B);case"dd. mm. yyyy":return"".concat(U,". ").concat(H,". ").concat(B);case"ddmmyyyy":return"".concat(U).concat(H).concat(B)}},x.getDateWithGridMonthFormat=function(g){var p=/^(\d{4})[-/.]?(\d{2})$/.exec(g.value);if(!p)return null;var B=p[1],H=p[2];if(!nt(B,H,"01"))return null;switch(A[g._gridId].data.gridInfo.monthFormat){case"yyyy-mm":default:return"".concat(B,"-").concat(H);case"yyyy/mm":return"".concat(B,"/").concat(H);case"yyyy. mm":return"".concat(B,". ").concat(H);case"yyyymm":return"".concat(B).concat(H);case"mm-yyyy":return"".concat(H,"-").concat(B);case"mm/yyyy":return"".concat(H,"/").concat(B);case"mm. yyyy":return"".concat(H,". ").concat(B);case"mmyyyy":return"".concat(H).concat(B)}},x.getCheckboxCellTrueOrFalse=function(g){var p=g.value,B=A[g._gridId].data.gridInfo.checkedValue,H=A[g._gridId].data.gridInfo.uncheckedValue;return typeof p=="boolean"?(g.value=p?B:H,p):p===B||(g.value=H,!1)},x.getCodeValue=function(g,p,B){return g&&Array.isArray(g)&&g.indexOf(B)>=0?B:p},x.getMaskValue=function(g,p){if(typeof g!="string"||typeof p!="string")return null;var B,H=g.split(""),U=p.split(""),q="";return H.every(function(oe,de){switch(B=!1,oe){case"A":/^[A-Z]$/.test(U[de])?(q+=U[de],B=!0):/^[a-z]$/.test(U[de])&&(q+=(he=U[de])&&typeof he=="string"?he.toUpperCase():"",B=!0);break;case"a":/^[a-z]$/.test(U[de])?(q+=U[de],B=!0):/^[A-Z]$/.test(U[de])&&(q+=Te(U[de]),B=!0);break;case"9":/^[0-9]$/.test(U[de])&&(q+=U[de],B=!0);break;default:oe===U[de]&&(q+=U[de],B=!0)}var he;return B}),q},x.setSelectOptions=function(g,p){Array.isArray(p)&&(Qe(g),p.forEach(function(B){var H=document.createElement("option");H.value=B.value,H.textContent=B.text,B.selected&&H.setAttribute("selected",""),B.disabled&&H.setAttribute("disabled",""),B.label&&H.setAttribute("label",B.label),g.appendChild(H)}))},x.getSelectOptions=function(g){if(!g)return null;var p=g.options;if(!p)return null;var B,H=[],U=Le(p);try{for(U.s();!(B=U.n()).done;){var q=B.value,oe={value:q.value,text:q.textContent};q.selected&&(oe.selected=!0),q.disabled&&(oe.disabled=!0),q.label&&(oe.label=q.label),H.push(oe)}}catch(de){U.e(de)}finally{U.f()}return H.length===0?null:H}}(v,et,Ve),function(w,A){A.connectedGridHeader=function(x){var g=w[x];if(g){var p=w[x].elements.gridHeader;if(!p.style.gridTemplateColumns.includes("%")){for(var B=0,H=1;H<g.methods.getColCount();H++)B+=Ie(g.methods.getColOriginWidth(H)).number;p.style.width=B+"px"}}},A.connectedGridBody=function(x){var g=w[x];if(g){var p=w[x].elements.gridBody;if(!p.style.gridTemplateColumns.includes("%")){for(var B=0,H=1;H<g.methods.getColCount();H++)B+=Ie(g.methods.getColOriginWidth(H)).number;p.style.width=B+"px"}}},A.connectedGridFooter=function(x){var g=w[x];if(g){var p=w[x].elements.gridFooter;if(!p.style.gridTemplateColumns.includes("%")){var B=0;if(!A._getFooterCells(x)||A._getFooterCells(x).length<=0)return;for(var H=1;H<g.methods.getColCount();H++)B+=Ie(g.methods.getColOriginWidth(H)).number;p.style.width=B+"px"}}},A.connectedGridData=function(x){var g=x._gridId,p=w[g],B=p.methods.getGridInfo();switch(x.style.removeProperty("display"),x.style.removeProperty("align-items"),x.style.removeProperty("justify-content"),x.style.removeProperty("text-align"),x.style.removeProperty("z-index"),x._type){case"ghd":if(x.innerText=x.value,B.frozenRowCount<=0&&x.colIndex<=B.frozenColCount){for(var H,U=0,q=x.colIndex-1;q>0;q--)if(H=A._getHeaderCell(g,x.rowIndex,q))if(H.isRowMerge){for(var oe=x.rowIndex-1,de=A._getHeaderCell(g,oe,q);de&&!(oe<0)&&de.isRowMerge;)oe--,de=A._getHeaderCell(g,oe,q);U+=de.offsetWidth}else U+=A._getHeaderCell(g,x.rowIndex,q).offsetWidth;else U+=0;x.style.position="sticky",x.style.zIndex=String(300+p.methods.getColCount()-x.colIndex),x.style.left=U+"px",x._frozenCol=!0}if(x.isRowMerge){for(var he=x.rowIndex-1,se=A._getHeaderCell(g,he,x.colIndex);se&&!(he<0);){if(!se.isRowMerge){se.style.gridRowEnd=x.style.gridRowEnd,se.rowSpan=se.rowSpan?se.rowSpan+1:1,se.style.zIndex=se.style.zIndex?se.style.zIndex:"250";break}he--,se=A._getHeaderCell(g,he,x.colIndex)}x.style.display="none"}if(x.isColMerge){for(var me=x.colIndex-1,Q=A._getHeaderCell(g,x.rowIndex,me);Q&&!(me<0);){if(!Q.isColMerge){if(Q.colId==="v-g-rownum"||Q.colId==="v-g-status")break;Q.style.gridColumnEnd=x.style.gridColumnEnd,Q.colSpan=Q.colSpan?Q.colSpan+1:1,Q.style.zIndex=Q.style.zIndex?Q.style.zIndex:"250";break}me--,Q=A._getHeaderCell(g,x.rowIndex,me)}x.style.display="none"}if(x.colVisible&&x.rowVisible||(x.style.display="none"),p.methods.getHeaderRowCount()===x.rowIndex){var u=x;if(x.isRowMerge)for(var b=x.rowIndex-1;b>0&&!(u=A._getHeaderCell(g,b,x.colIndex)).rowSpan;b--);u&&(u._isLastCell=!0)}if(B.filterable===!0&&p.methods.getColInfo(x.colId).filterable&&p.methods.getHeaderRowCount()===x.rowIndex&&x.colId!=="v-g-rownum"&&x.colId!=="v-g-status"){var _,R=A._getFilterSpan();R&&R instanceof HTMLElement&&R.nodeType===1?_=R.cloneNode(!0):(_=document.createElement("span")).innerText="σ",_._gridId=x._gridId,_.isChild=!0,_._type="filter",_.classList.add(x._gridId+"_filterSpan");var F=document.createElement("select");F.classList.add(x._gridId+"_filterSelect"),F.style.display="none",F._gridId=x._gridId,F.colId=x.colId,F.addEventListener("mousedown",function(Ct){Ct.target.filterOldValue=Ct.target.value}),F.addEventListener("change",function(Ct){var jt=Ct.target.value,rn=Ct.target._gridId;if(w[rn].events.onChooseFilter(Ct.target.parentNode.parentNode.rowIndex,Ct.target.parentNode.parentNode.colId,Ct.target.filterOldValue,jt)===!1)return Ct.stopPropagation(),void Ct.preventDefault();A._doFilter(rn),jt==="$$ALL"&&(Ct.target.style.display="none")}),_.append(F);var P=x;if(x.isRowMerge)for(var z=x.rowIndex-1;z>0&&!(P=A._getHeaderCell(g,z,x.colIndex)).rowSpan;z--);P&&(P.insertBefore(_,P.firstChild),P._filterSelector=F)}x.classList.add(x._gridId+"_h-v-g-d");break;case"gfd":if(B.frozenRowCount<=0&&x.colIndex<=B.frozenColCount){for(var pe,Se=0,ze=x.colIndex-1;ze>0;ze--)if(pe=A._getFooterCell(g,x.rowIndex,ze))if(pe.isRowMerge){for(var je=x.rowIndex-1,Ue=A._getFooterCell(g,je,ze);Ue&&!(je<0)&&Ue.isRowMerge;)je--,Ue=A._getFooterCell(g,je,ze);Se+=Ue.offsetWidth}else Se+=A._getFooterCell(g,x.rowIndex,ze).offsetWidth;else Se+=0;x.style.position="-webkit-sticky",x.style.zIndex="300",x.style.left=Se+"px",x._frozenCol=!0}var it=p.data.colInfos[x.colIndex-1].footer;Array.isArray(it)||(it=null);var rt=it&&it.length>=x.rowIndex-1?it[x.rowIndex-1]:null;if(rt){var ct;x.classList.add(x._gridId+"_f-v-g-d-value");try{ct=A._getFooterCell(g,x.rowIndex,x.colIndex-1)}catch{ct=null}if(ct&&ct.classList.add(x._gridId+"_f-v-g-d-value"),Object.values(re).includes(rt)){var Ne,De,lt;switch(rt){case"$$MAX":if(x.style.justifyContent="right",x.style.textAlign="right",p.methods.getRowCount()>0){Ne=De=A.getFirstCellValidNumber(x);for(var ae=2;ae<=p.methods.getRowCount();ae++)lt=A._getCell(g,ae,x.colIndex),A.isCellVisible(lt)&&(De=Et(lt.value))!==null&&De>Ne&&(Ne=De)}break;case"$$MIN":if(x.style.justifyContent="right",x.style.textAlign="right",p.methods.getRowCount()>0){Ne=De=A.getFirstCellValidNumber(x);for(var te=2;te<=p.methods.getRowCount();te++)lt=A._getCell(g,te,x.colIndex),A.isCellVisible(lt)&&(De=Et(lt.value))!==null&&De<Ne&&(Ne=De)}break;case"$$SUM":if(x.style.justifyContent="right",x.style.textAlign="right",p.methods.getRowCount()>0){Ne=0;for(var ht=1;ht<=p.methods.getRowCount();ht++)lt=A._getCell(g,ht,x.colIndex),A.isCellVisible(lt)&&(Ne=Math.round(1e5*(Ne+nn(lt.value)))/1e5)}break;case"$$AVG":if(x.style.justifyContent="right",x.style.textAlign="right",p.methods.getRowCount()>0){Ne=0,De=0;for(var d=0,y=1;y<=p.methods.getRowCount();y++)lt=A._getCell(g,y,x.colIndex),A.isCellVisible(lt)&&(Ne=Math.round(1e5*(Ne+nn(lt.value)))/1e5,lt.value===null||lt.value===void 0||isNaN(lt.value)||d++);Ne=d===0?null:(Ne/d).toFixed(2)}}Ne=Ne==null?"-":A.getFormatNumber(p.methods.getColFormat(x.colIndex),Ne),x.innerText=Ne,x.value=Ne}else if(typeof rt=="function"){var M=rt(p.methods.getValues());x.innerText=M,x.value=M}else{x.innerText=rt,x.value=rt;var S=A._getFooterFormula();S&&S.constructor===Object&&Object.keys(S).forEach(function(Ct){if(rt===Ct){var jt=S[Ct](p.methods.getColValues(x.colIndex));x.innerText=jt,x.value=jt}})}}x.align&&(x.style.justifyContent=x.align,x.style.textAlign=x.align),x.colIndex===p.methods.getColCount()&&x.classList.add(x._gridId+"_f-v-g-d-value"),x.colVisible&&x.rowVisible||(x.style.display="none"),x.classList.add(x._gridId+"_f-v-g-d");break;case"gbd":switch(x.dataType){case"text":case"mask":x.style.justifyContent="left",x.style.textAlign="left";break;case"number":x.style.justifyContent="right",x.style.textAlign="right";break;case"date":case"month":case"code":case"select":case"checkbox":case"button":case"link":x.style.justifyContent="center",x.style.textAlign="center";break;default:x.style.justifyContent="center",x.style.textAlign="center";var N=A._getDataTypeStyle();Object.keys(N).forEach(function(Ct){if(x.dataType===Ct){if(N[Ct].constructor!==Object)throw new Error("Cellstyle can only be inserted in object type.");Object.keys(N[Ct]).forEach(function(jt){x.style[jt]=N[Ct][jt]})}})}for(;x.firstChild;)x.removeChild(x.firstChild);if(x.append(A._getCellChildNode(x)),x.rowIndex<=B.frozenRowCount){for(var O,T=p.elements.gridHeader.offsetHeight,G=0,V=x.rowIndex-1;V>0;V--)if(O=A._getCell(g,V,x.colIndex))if(O.isColMerge){for(var Z=x.colIndex-1,ne=A._getCell(g,V,Z);ne&&!(Z<0)&&ne.isColMerge;)Z--,ne=A._getCell(g,V,Z);G+=ne.offsetHeight}else G+=A._getCell(g,V,x.colIndex).offsetHeight;else G+=0;x.style.position="sticky",x.style.zIndex="200",x.style.top=T+G+"px",x.rowIndex===B.frozenRowCount&&(x.style.borderBottom=B.cssInfo.verticalBorderSize+"px solid "+B.cssInfo.headerCellBorderColor),x._frozenCol=!0}if(B.frozenRowCount<=0&&x.colIndex<=B.frozenColCount){for(var Y,le=0,qe=x.colIndex-1;qe>0;qe--)if(Y=A._getCell(g,x.rowIndex,qe))if(Y.isRowMerge){for(var _t=x.rowIndex-1,on=A._getCell(g,_t,qe);on&&!(_t<0)&&on.isRowMerge;)_t--,on=A._getCell(g,_t,qe);le+=on.offsetWidth}else le+=A._getCell(g,x.rowIndex,qe).offsetWidth;else le+=0;x.style.position="sticky",x.style.zIndex="200",x.colIndex===B.frozenColCount&&(x.style.borderRight=B.cssInfo.verticalBorderSize+"px solid "+B.cssInfo.headerCellBorderColor),x.style.left=le+"px",x._frozenRow=!0}if(x.isRowMerge){for(var Ft=x.rowIndex-1,Gt=A._getCell(g,Ft,x.colIndex);Gt&&!(Ft<0);){if(!Gt.isRowMerge){Gt.style.gridRowEnd=x.style.gridRowEnd,Gt.verticalAlign||(Gt.style.alignItems="center"),Gt.style.zIndex=Gt.style.zIndex?Gt.style.zIndex:"50";break}Ft--,Gt=A._getCell(g,Ft,x.colIndex)}A.isCellVisible(Gt)&&(x.style.display="none")}if(x.isColMerge){for(var St=x.colIndex-1,At=A._getCell(g,x.rowIndex,St);At&&!(St<0);){if(!At.isColMerge){At.style.gridColumnEnd=x.style.gridColumnEnd,At.align||(At.style.justifyContent="center"),At.align||(At.style.textAlign="center"),At.verticalAlign||(At.style.alignItems="center"),At.style.zIndex=At.style.zIndex?At.style.zIndex:"50";break}St--,At=A._getCell(g,x.rowIndex,St)}x.style.display="none"}if(x.align&&(x.style.justifyContent=x.align,x.style.textAlign=x.align),x.verticalAlign)switch(x.verticalAlign.toLowerCase()){case"top":x.style.alignItems="flex-start";break;case"bottom":x.style.alignItems="flex-end";break;default:x.style.alignItems="center"}x.overflowWrap&&(x.style.overflowWrap=x.overflowWrap),x.wordBreak&&(x.style.wordBreak=x.wordBreak),x.whiteSpace&&(x.style.whiteSpace=x.whiteSpace),x.backColor&&(x.style.backgroundColor=x.backColor),x.fontColor&&(x.firstChild.style.color=x.fontColor),x.fontBold&&(x.firstChild.style.fontWeight="bold"),x.fontItalic&&(x.firstChild.style.fontStyle="italic"),x.fontThruline&&(x.firstChild.style.textDecoration="line-through"),x.fontUnderline&&(x.firstChild.style.textDecoration="underline"),x.colVisible&&x.rowVisible||(x.style.display="none"),x.filter&&(x.style.display="none"),B.alterRow&&x.rowIndex%2==0?(x.classList.add(x._gridId+"_b-v-g-d-alter"),x.classList.remove(x._gridId+"_b-v-g-d")):(x.classList.add(x._gridId+"_b-v-g-d"),x.classList.remove(x._gridId+"_b-v-g-d-alter")),x.locked&&x.lockedColor?x.classList.add(x._gridId+"_b-v-g-d-locked"):x.classList.remove(x._gridId+"_b-v-g-d-locked"),x.locked&&(x.dataType==="select"&&x.firstChild&&x.firstChild.nType=="select"||x.dataType==="checkbox"&&x.firstChild&&x.firstChild.nType=="checkbox")&&(x.firstChild.disabled=!0,x.firstChild.style.pointerEvents="none"),x.untarget&&(x.dataType==="button"&&x.firstChild&&x.firstChild.nType=="button"?(x.firstChild.disabled=!0,x.firstChild.style.pointerEvents="none"):x.dataType==="link"&&x.firstChild&&x.firstChild.nType=="link"&&(x.firstChild.style.opacity="0.8",x.firstChild.style.pointerEvents="none"))}x.classList.add(x._gridId+"_v-g-d"),x.addEventListener("mouseover",function(Ct){x.untarget||x._type!=="gbd"||(x.classList.add(x._gridId+"_mouseover-cell"),x.dataType==="link"&&x.querySelectorAll("*").forEach(function(jt){jt.classList.add(x._gridId+"_mouseover-cell")}))}),x.addEventListener("mouseout",function(Ct){x.untarget||x._type!=="gbd"||(x.classList.remove(x._gridId+"_mouseover-cell"),x.dataType==="link"&&x.querySelectorAll("*").forEach(function(jt){jt.classList.remove(x._gridId+"_mouseover-cell")}))})}}(et,Ve),v.documentEvent.mousedown=function(w){v._status.activeGridEditor&&v._status.activeGridEditor!==w.target&&Ve.modifyCell(v),v._status.activeGrid&&!v._status.activeGrid.elements.grid.contains(w.target)&&(v._status.activeGrid=null)},document.removeEventListener("mousedown",v.documentEvent.mousedown),document.addEventListener("mousedown",v.documentEvent.mousedown),v.documentEvent.mouseup=function(w){v._status.mouseX=0,v._status.mouseY=0,Ve.stopScrolling(v),v._status.isDragging&&(v._status.isDragging=!1),v._status.isHeaderDragging&&(v._status.isHeaderDragging=!1)},document.removeEventListener("mouseup",v.documentEvent.mouseup),document.addEventListener("mouseup",v.documentEvent.mouseup),v.documentEvent.keydown=function(w){if(v._status.activeGrid&&!v._status.activeGridEditor){var A=v._status.activeGrid;if(!A)return;var x=A.data.id;if(A.events.onKeydownGrid(w)===!1)return w.stopPropagation(),void w.preventDefault();if(w.ctrlKey||w.metaKey)switch(w.key){case"z":case"Z":Ve.redoundo(x),w.preventDefault();break;case"y":case"Y":Ve.redoundo(x,!1),w.preventDefault();break;case"a":case"A":A.data.variables.targetCell=Ve._getCell(x,1,3),Ve.selectCells(Ve._getCell(x,1,1),Ve._getCell(x,A.methods.getRowCount(),A.methods.getColCount())),w.preventDefault()}if(A.data.gridInfo.selectionPolicy==="none"||A.data.variables.activeCells.length<=0)return;var g,p=A.data.variables.activeCells[0],B=A.data.variables.activeCells[A.data.variables.activeCells.length-1];switch(Object.keys(v.dataType).forEach(function(H){if(A.data.variables.targetCell.dataType===H&&v.dataType[H].onSelectedAndKeyDown){if(typeof v.dataType[H].onSelectedAndKeyDown!="function")throw new Error("onSelectedAndKeyDown must be a function.");if(v.dataType[H].onSelectedAndKeyDown(w,A.data.id,Ve.__getData(A.data.variables.targetCell))===!1)return}}),w.key){case"Tab":g=Ve.getTabCell(A.data.variables.targetCell,w.shiftKey),Ve.selectCell(g),w.preventDefault();break;case"F2":Ve.createGridEditor(A.data.variables.targetCell),w.preventDefault();break;case"Enter":A.data.variables.targetCell.dataType==="select"?(v._status.editOldValue=A.data.variables.targetCell.firstChild.value,A.data.variables.targetCell.firstChild.focus()):A.data.variables.targetCell.dataType==="checkbox"?(v._status.editOldValue=A.data.variables.targetCell.value,A.data.variables.targetCell.firstChild.checked=!A.data.variables.targetCell.firstChild.checked,Ve.selectAndCheckboxOnChange(A.data.variables.targetCell.firstChild),g=Ve.getMoveRowCell(A.data.variables.targetCell,1),Ve.selectCell(g),w.preventDefault()):["text","number","date","month","mask","code"].indexOf(A.data.variables.targetCell.dataType)>=0&&(Ve.createGridEditor(A.data.variables.targetCell,!0),w.preventDefault());break;case" ":if(A.data.variables.targetCell.dataType==="select"){if(A.data.variables.targetCell.untarget||A.data.variables.targetCell.locked)return void w.preventDefault();v._status.editOldValue=A.data.variables.targetCell.firstChild.value,A.data.variables.targetCell.firstChild.focus()}else if(A.data.variables.targetCell.dataType==="button")A.data.variables.targetCell.firstChild.focus();else if(A.data.variables.targetCell.dataType==="checkbox"){if(A.data.variables.targetCell.untarget||A.data.variables.targetCell.locked)return void w.preventDefault();v._status.editOldValue=A.data.variables.targetCell.value,A.data.variables.targetCell.firstChild.checked=!A.data.variables.targetCell.firstChild.checked,Ve.selectAndCheckboxOnChange(A.data.variables.targetCell.firstChild),w.preventDefault()}else["text","number","date","month","mask","code"].indexOf(A.data.variables.targetCell.dataType)>=0&&(Ve.createGridEditor(A.data.variables.targetCell),w.preventDefault());break;case"ArrowUp":A.data.gridInfo.selectionPolicy==="range"&&w.shiftKey?(Ve.unselectCells(x),A.data.variables.targetCell.rowIndex>=B.rowIndex?(g=Ve.getMoveRowCell(p,-1),Ve.selectCells(g,B,g)):(g=Ve.getMoveRowCell(B,-1),Ve.selectCells(p,g))):(g=Ve.getMoveRowCell(A.data.variables.targetCell,-1),Ve.selectCell(g)),w.preventDefault();break;case"ArrowDown":A.data.gridInfo.selectionPolicy==="range"&&w.shiftKey?(Ve.unselectCells(x),A.data.variables.targetCell.rowIndex<=p.rowIndex?(g=Ve.getMoveRowCell(B,1),Ve.selectCells(p,g)):(g=Ve.getMoveRowCell(p,1),Ve.selectCells(g,B,g))):(g=Ve.getMoveRowCell(A.data.variables.targetCell,1),Ve.selectCell(g)),w.preventDefault();break;case"ArrowLeft":A.data.gridInfo.selectionPolicy==="range"&&w.shiftKey?(Ve.unselectCells(x),A.data.variables.targetCell.colIndex>=B.colIndex?(g=Ve.getMoveColCell(p,-1),Ve.selectCells(g,B,g)):(g=Ve.getMoveColCell(B,-1),Ve.selectCells(p,g))):(g=Ve.getMoveColCell(A.data.variables.targetCell,-1),Ve.selectCell(g)),w.preventDefault();break;case"ArrowRight":A.data.gridInfo.selectionPolicy==="range"&&w.shiftKey?(Ve.unselectCells(x),A.data.variables.targetCell.colIndex<=p.colIndex?(g=Ve.getMoveColCell(B,1),Ve.selectCells(p,g)):(g=Ve.getMoveColCell(p,1),Ve.selectCells(g,B,g))):(g=Ve.getMoveColCell(A.data.variables.targetCell,1),Ve.selectCell(g)),w.preventDefault()}}},document.removeEventListener("keydown",v.documentEvent.keydown),document.addEventListener("keydown",v.documentEvent.keydown),v.documentEvent.copy=function(w){if(v._status.activeGrid&&!v._status.activeGridEditor){var A=v._status.activeGrid.data.variables.activeCells;A.length>0&&(w.preventDefault(),Ve.copyGrid(A))}},document.removeEventListener("copy",v.documentEvent.copy),document.addEventListener("copy",v.documentEvent.copy),v.documentEvent.paste=function(w){v._status.activeGrid&&!v._status.activeGridEditor&&v._status.activeGrid.data.variables.activeCells.length>0&&(w.preventDefault(),Ve.pasteGrid(w,v._status.activeGrid.data.id))},document.removeEventListener("paste",v.documentEvent.paste),document.addEventListener("paste",v.documentEvent.paste),v._initialized=!0)},Ht=function(){Ze&&(Object.values(et).forEach(function(v){var w=document.getElementById(v.data.id),A=document.getElementById(v.data.id+"_styles-sheet");w&&w.parentNode.removeChild(w),A&&A.parentNode.removeChild(A),delete et[v.data.id],v=null}),document.removeEventListener("mousedown",Ze.documentEvent.mousedown),document.removeEventListener("mouseup",Ze.documentEvent.mouseup),document.removeEventListener("keydown",Ze.documentEvent.keydown),document.removeEventListener("copy",Ze.documentEvent.copy),document.removeEventListener("paste",Ze.documentEvent.paste),Ze.unmountGrid(),Ze=null)};return o})())}(fi)),fi.exports}var Na=Yd();const Kd=t=>t==null,Xd=()=>{let t=new Date().getTime();return typeof performance<"u"&&typeof performance.now=="function"&&(t+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const n=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(e==="x"?n:n&3|8).toString(16)})},Jd=t=>!t||typeof t!="string"?"":t.toLowerCase(),Zd=t=>!t||typeof t!="string"?"":t.toUpperCase(),Qd=(t,e)=>{if(typeof e!="string"||typeof t!="string")return null;const n=e.split(""),o=t.split("");let r="",i;return n.every((a,c)=>{switch(i=!1,a){case"A":/^[A-Z]$/.test(o[c])?(r+=o[c],i=!0):/^[a-z]$/.test(o[c])&&(r+=Zd(o[c]),i=!0);break;case"a":/^[a-z]$/.test(o[c])?(r+=o[c],i=!0):/^[A-Z]$/.test(o[c])&&(r+=Jd(o[c]),i=!0);break;case"9":/^[0-9]$/.test(o[c])&&(r+=o[c],i=!0);break;default:a===o[c]&&(r+=o[c],i=!0);break}return i}),r},eu=t=>(t=String(t),t.replace(/[^0-9]/g,"")),tu=t=>t<768?"mb":t<1200?"tb":t<1980?"pc":"wd",nu=(t,e)=>Array.from(t).find(n=>n.startsWith(`hison-${e}-`)),ou=(t,e)=>{const n=nu(t,e);if(n){const o=n.split("-");if(o.length>=3)return o[2]}return null},js=(t,e)=>t.findIndex(n=>n.startsWith(`hison-${e}-`)),Ws=t=>t?typeof t=="string"?t:Array.isArray(t)?t.map(Ws).filter(Boolean).join(" "):typeof t=="object"?Object.keys(t).filter(e=>!!t[e]).join(" "):"":"",ru=(t,e)=>{const n=t.trim().split(/\s+/),o={},r=[];for(const a of n){const c=a.match(/^(hison-(color|size|col|pos|layout-vertical-align)-[\w]+?)(?:-(mb|tb|pc|wd))?$/);if(c){const m=c[1],C=c[2],L=c[3];o[C]||(o[C]={}),L?o[C][L]=m:o[C].default=m}else r.push(a)}const i=[];for(const a of Object.values(o)){const c=a[e]||(e==="mb"?a.tb:void 0)||(e==="tb"?a.mb:void 0)||(e==="pc"?a.wd:void 0)||(e==="wd"?a.pc:void 0)||a.default;c&&i.push(c)}return[...r,...i].filter(Boolean)},iu=(t,e,n)=>{const o=js(t,e);o!==-1?t[o]=t[o]:t.push(`hison-${e}-${n}`)},au=(t,e)=>{if(!t||!e)return[];const n=`hison-${e}-`;return t.trim().split(/\s+/).filter(o=>o.startsWith(n))},Li=t=>/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t),qs=t=>/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(\s*,\s*(0|1|0?\.\d+))?\s*\)$/.test(t),Sl=t=>typeof t=="number"&&isFinite(t),lu=t=>{let e,n,o;if(t.length===4)e=parseInt(t[1]+t[1],16),n=parseInt(t[2]+t[2],16),o=parseInt(t[3]+t[3],16);else if(t.length===7)e=parseInt(t.slice(1,3),16),n=parseInt(t.slice(3,5),16),o=parseInt(t.slice(5,7),16);else throw new Error(`Invalid hex color format: ${t}`);return`rgba(${e}, ${n}, ${o}, 1)`},su=t=>{const e=t.replace(/\s+/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?.*\)$/i);if(!e)throw new Error(`Invalid rgba color format: ${t}`);const n=parseInt(e[1],10),o=parseInt(e[2],10),r=parseInt(e[3],10),i=a=>{const c=a.toString(16);return c.length===1?"0"+c:c};return`#${i(n)}${i(o)}${i(r)}`},Vn=t=>{if(Li(t))return t.replace(/\s+/g,"");if(qs(t))return su(t);throw new Error(`Invalid color format: ${t}`)},dn=t=>{if(Li(t))return lu(t);if(qs(t))return t.replace(/\s+/g,"");throw new Error(`Invalid color format: ${t}`)},_o=(t,e,n)=>{if(!Sl(e))throw new Error("add must be valid numbers");if(n&&!Sl(n))throw new Error("newOpacity must be valid numbers");const o=(K,X,ee)=>Math.min(Math.max(K,X),ee),r=t.match(/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*(0|1|0?\.\d+))?\s*\)$/i);if(!r)throw new Error("Invalid rgba color format");let[,i,a,c,m]=r;n||(n=Number(m));const C=o(parseInt(i)+e,0,255),L=o(parseInt(a)+e,0,255),D=o(parseInt(c)+e,0,255),W=o(n,0,1);return`rgba(${C},${L},${D},${W})`},hn=t=>{const e=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+),\s*(\d*\.?\d+)\)$/);if(!e)throw new Error("Invalid RGBA format.");const[,n,o,r,i]=e.map(Number),a=255-n,c=255-o,m=255-r;return`rgba(${a}, ${c}, ${m}, ${i})`},$s=t=>{const e=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+),\s*(\d*\.?\d+)\)$/);if(!e)throw new Error("Invalid RGBA format.");const[,n,o,r,i]=e.map(Number);return i<=.5?!1:n+o+r>385},cu=t=>{switch(t){case"primary":return Vn(ce.componentStyle.primaryColor);case"muted":return Vn(ce.componentStyle.mutedColor);case"info":return Vn(ce.componentStyle.infoColor);case"success":return Vn(ce.componentStyle.successColor);case"danger":return Vn(ce.componentStyle.dangerColor);case"warning":return Vn(ce.componentStyle.warningColor)}return null},du=t=>{switch(t){case"primary":return ce.componentStyle.primaryColor;case"muted":return ce.componentStyle.mutedColor;case"info":return ce.componentStyle.infoColor;case"success":return ce.componentStyle.successColor;case"danger":return ce.componentStyle.dangerColor;case"warning":return ce.componentStyle.warningColor}return""},uu=t=>$s(t)?Ja:Za,vo=(t,e)=>{t.buttonColor=e,t.borderColor=_o(e,-31),t.shadowColor=_o(e,-47),t.hoverColor=_o(e,-24),t.activeColor=_o(e,-24),t.rowHoverColor=_o(e,64,.2),t.stripeColor=_o(e,64,.1),t.emptyTextColor=e,t.filledTextColor=uu(e)},fu=(t,e)=>t.replace(/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([0-9.]+)\s*\)/i,(n,o,r,i)=>`rgba(${o},${r},${i},${e})`),Ni=new Map,hu=(t,e)=>{Ni.set(t,e)},mu=t=>{Ni.delete(t)},gu=()=>{for(const t of Ni.values())t()},yu=t=>{const e=Ni.get(t);e&&e()};var lo=(t=>(t.s="s",t.m="m",t.l="l",t.xl="xl",t))(lo||{}),Ys=(t=>(t.primary="primary",t.muted="muted",t.info="info",t.success="success",t.danger="danger",t.warning="warning",t))(Ys||{}),hi={exports:{}},pu=hi.exports,kl;function _u(){return kl||(kl=1,function(t,e){(function(n,o){t.exports=o()})(typeof self<"u"?self:typeof So<"u"?So:pu,()=>(()=>{var n={d:(f,h)=>{for(var I in h)n.o(h,I)&&!n.o(f,I)&&Object.defineProperty(f,I,{enumerable:!0,get:h[I]})},o:(f,h)=>Object.prototype.hasOwnProperty.call(f,h),r:f=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(f,"__esModule",{value:!0})}},o={};n.r(o),n.d(o,{NoteModeByDevice:()=>i,ToolPosition:()=>r,getVanillanote:()=>gn,getVanillanoteConfig:()=>Rn});var r=function(f){return f.top="TOP",f.bottom="BOTTOM",f}({}),i=function(f){return f.adaptive="ADAPTIVE",f.mobile="MOBILE",f.desktop="DESKTOP",f}({}),a=function(f){for(var h=f;!(h instanceof Element);)h=h.parentNode;return h.closest?h.closest("[data-vanillanote]"):null},c=function(f,h,I){return f+"_"+h+"_"+I},m=function(f,h,I){return f+"_"+h+"_"+I},C=function(f){return f+"_eventChildren"},L=function(f){return f+"_eventOnOverCssElement"},D=function(f){return f+"_eventClickCssElement"},W=function(){var f=new Date().getTime();return typeof performance<"u"&&typeof performance.now=="function"&&(f+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(h){var I=(f+16*Math.random())%16|0;return f=Math.floor(f/16),(h==="x"?I:3&I|8).toString(16)})},K=function(f){if(!f)return null;for(var h,I=f instanceof Element?f:f.parentNode;!I.hasAttribute("data-note-id")&&(I=I.parentNode)&&I.hasAttribute;);return I&&I.hasAttribute&&I.hasAttribute("data-note-id")&&(h=I.getAttribute("data-note-id")),h},X=function(){var f,h=navigator;if(((f=h.userAgentData)===null||f===void 0?void 0:f.mobile)!==void 0)return h.userAgentData.mobile;var I=navigator.userAgent;return/iPhone|iPad|iPod|Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(I)},ee=function(f){return/^[0-9]+$/.test(f)},re=function(f){return f==="-"||!isNaN(f)},fe=function(f){return/^[0-9A-Fa-f]*$/.test(f)},ye=function(f){var h=f.match(/-?\d+\.?\d*/);return h?Number(parseFloat(h[0])):null},xe=function(f,h){var I=Object.keys(f),be=Object.keys(h);if(I.length!==be.length)return!1;for(var Be=0;Be<I.length;Be++)if(!be.includes(I[Be])||f[I[Be]]!==h[I[Be]])return!1;return!0},ke=function(f,h){var I={};for(var be in f)f.hasOwnProperty(be)&&(I[be]=f[be]);for(var Be in h)h.hasOwnProperty(Be)&&(I[Be]=h[Be]);return I},ve=function(f){var h,I,be=new Object;if(!f)return be;h=f.trim().split(";");for(var Be=0;Be<h.length;Be++)h[Be]&&((I=h[Be].split(":")).length<2||(be[I[0].trim()]=I[1].trim()));return be},Ee=function(f){var h="";if(!f||f.constructor!==Object||Object.keys(f).length===0)return h;for(var I=Object.entries(f),be=0;be<I.length;be++)I[be].length<2||(h+=I[be][0].trim()+":"+I[be][1].trim()+";");return h},Me=function(f,h){if(!h||h.constructor!==Object)return f;for(var I=Object.keys(h),be=0;be<I.length;be++)f.setAttribute(I[be],h[I[be]]);return f},Ie=function(f,h){if(!f||!h||(h=h.toUpperCase(),f[0]!=="#"&&(f="#"+f),!/^#([0-9A-Fa-f]{6})$/.test(f)))return"33";var I=h==="R"?1:h==="G"?3:5;return f.substring(I,I+2)},Te=function(f,h){return"rgba("+parseInt(Ie(f,"R"),16)+","+parseInt(Ie(f,"G"),16)+","+parseInt(Ie(f,"B"),16)+","+h+")"},We=function(f){if(f.startsWith("#"))return f;if(!f.startsWith("rgba"))return null;var h=f.match(/\d+/g).map(Number),I=h[0].toString(16),be=h[1].toString(16),Be=h[2].toString(16);return I.length==1&&(I="0"+I),be.length==1&&(be="0"+be),Be.length==1&&(Be="0"+Be),"#"+I+be+Be},nt=function(f){if(!f||f.startsWith("#"))return null;var h=f.match(/\d+/g);if(!h)return null;var I=h.map(Number);return I.length<4?"1":I[3].toString()},Pe=function(f){if(/^#[0-9a-fA-F]{6}$/.test(f))return f;var h=document.createElement("div");h.style.color=f,document.body.appendChild(h);var I=window.getComputedStyle(h).color;document.body.removeChild(h);var be=I.match(/\d+/g);return"#"+((1<<24)+(+be[0]<<16)+(+be[1]<<8)+ +be[2]).toString(16).slice(1)},ot=function(f,h){f.startsWith("#")&&(f=f.slice(1));var I=parseInt(h,16);h.startsWith("-")&&(I=-parseInt(h.slice(1),16));var be=parseInt(f.slice(0,2),16)+I,Be=parseInt(f.slice(2,4),16)+I,tt=parseInt(f.slice(4,6),16)+I;return"#"+(be=(be<0?0:be>255?255:be).toString(16).padStart(2,"0"))+(Be=(Be<0?0:Be>255?255:Be).toString(16).padStart(2,"0"))+(tt<0?0:tt>255?255:tt).toString(16).padStart(2,"0")},mt=function(f){f.startsWith("#")&&(f=f.slice(1));var h=255-parseInt(f.slice(0,2),16),I=255-parseInt(f.slice(2,4),16),be=255-parseInt(f.slice(4,6),16);return I=I<127.5?I+16:I-16,be=be<127.5?be+16:be-16,"#"+(h=((h=h<127.5?h+16:h-16)<0?0:h>255?255:h).toString(16).padStart(2,"0"))+(I=(I<0?0:I>255?255:I).toString(16).padStart(2,"0"))+(be<0?0:be>255?255:be).toString(16).padStart(2,"0")},Qe=function(f){var h={color1:"",color2:"",color3:"",color4:"",color5:"",color6:"",color7:"",color8:"",color9:"",color10:"",color11:"",color12:"",color13:"",color14:"",color15:"",color16:"",color17:"",color18:"",color19:"",color20:""};return function(I){if(!/^#([0-9a-fA-F]{6})$/.test(I))throw new Error("Invalid HEX color format: ".concat(I));return parseInt(I.slice(1,3),16)+parseInt(I.slice(3,5),16)+parseInt(I.slice(5,7),16)>385?"light":"dark"}(f=Pe(f))==="light"?(h.color1="#333333",h.color2="#ffffff",h.color3=ot(f,"18"),h.color4=f,h.color5=ot(f,"-18"),h.color6=ot(f,"-1f"),h.color7=ot(f,"-2f"),h.color8="#609966",h.color9="#df2e38",h.color10="#333333",h.color11="#666666",h.color12="#333333",h.color13="#ffffff",h.color14="#ff7f7f",h.color15="#ffad66",h.color16="#ffff66",h.color17="#99ff99",h.color18="#99ccff",h.color19="#6699cc",h.color20="#cc99cc"):(h.color1="#ffffff",h.color2="#ffffff",h.color3=ot(f,"18"),h.color4=f,h.color5=ot(f,"-18"),h.color6=ot(f,"-1f"),h.color7=ot(f,"-2f"),h.color8="#609966",h.color9="#df2e38",h.color10="#333333",h.color11="#666666",h.color12="#333333",h.color13="#ffffff",h.color14="#b70404",h.color15="#e55807",h.color16="#f1c93b",h.color17="#1a5d1a",h.color18="#068fff",h.color19="#0c134f",h.color20="#5c469c"),h};function ut(f){return ut=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},ut(f)}function Ye(f,h){return function(I){if(Array.isArray(I))return I}(f)||function(I,be){var Be=I==null?null:typeof Symbol<"u"&&I[Symbol.iterator]||I["@@iterator"];if(Be!=null){var tt,Ge,j,E,s=[],l=!0,k=!1;try{if(j=(Be=Be.call(I)).next,be!==0)for(;!(l=(tt=j.call(Be)).done)&&(s.push(tt.value),s.length!==be);l=!0);}catch($){k=!0,Ge=$}finally{try{if(!l&&Be.return!=null&&(E=Be.return(),Object(E)!==E))return}finally{if(k)throw Ge}}return s}}(f,h)||function(I,be){if(I){if(typeof I=="string")return Je(I,be);var Be={}.toString.call(I).slice(8,-1);return Be==="Object"&&I.constructor&&(Be=I.constructor.name),Be==="Map"||Be==="Set"?Array.from(I):Be==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Be)?Je(I,be):void 0}}(f,h)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
49
49
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Je(f,h){(h==null||h>f.length)&&(h=f.length);for(var I=0,be=Array(h);I<h;I++)be[I]=f[I];return be}function dt(f,h){var I=Object.keys(f);if(Object.getOwnPropertySymbols){var be=Object.getOwnPropertySymbols(f);h&&(be=be.filter(function(Be){return Object.getOwnPropertyDescriptor(f,Be).enumerable})),I.push.apply(I,be)}return I}function Dt(f){for(var h=1;h<arguments.length;h++){var I=arguments[h]!=null?arguments[h]:{};h%2?dt(Object(I),!0).forEach(function(be){Re(f,be,I[be])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(I)):dt(Object(I)).forEach(function(be){Object.defineProperty(f,be,Object.getOwnPropertyDescriptor(I,be))})}return f}function Re(f,h,I){return(h=function(be){var Be=function(tt){if(ut(tt)!="object"||!tt)return tt;var Ge=tt[Symbol.toPrimitive];if(Ge!==void 0){var j=Ge.call(tt,"string");if(ut(j)!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(tt)}(be);return ut(Be)=="symbol"?Be:Be+""}(h))in f?Object.defineProperty(f,h,{value:I,enumerable:!0,configurable:!0,writable:!0}):f[h]=I,f}var ft=function(f,h,I,be){var Be=null,tt=h.createElement("div",I,f.consts.CLASS_NAMES.template.id,f.consts.CLASS_NAMES.template.className);tt.style.display="none";var Ge=h.createElementBasic(I._noteName+"-textarea",I,f.consts.CLASS_NAMES.textarea.id,f.consts.CLASS_NAMES.textarea.className);Ge.setAttribute("contenteditable","true"),Ge.setAttribute("role","textbox"),Ge.setAttribute("aria-multiline","true"),Ge.setAttribute("spellcheck","true"),Ge.setAttribute("autocorrect","true"),Ge.setAttribute("name",c(I._noteName,I._id,f.consts.CLASS_NAMES.textarea.id)),Ge.setAttribute("title",f.languageSet[I._attributes.language].textareaTooltip),Ge.addEventListener("focus",function(ue){I._elementEvents.textarea_onBeforeFocus(ue)&&(f.events.elementEvents.textarea_onFocus(ue),I._elementEvents.textarea_onAfterFocus(ue),ue.stopImmediatePropagation())}),Ge.addEventListener(typeof navigator<"u"&&/iPhone|iPad|iPod/i.test(navigator.userAgent)?"mouseout":"blur",function(ue){I._elementEvents.textarea_onBeforeBlur(ue)&&(f.events.elementEvents.textarea_onBlur(ue),I._elementEvents.textarea_onAfterBlur(ue),ue.stopImmediatePropagation())}),Ge.addEventListener("keydown",function(ue){f.events.elementEvents.textarea_onKeydown(ue),ue.stopImmediatePropagation()}),Ge.addEventListener("keyup",function(ue){f.events.elementEvents.textarea_onKeyup(ue),ue.stopImmediatePropagation()}),Ge.addEventListener("beforeinput",function(ue){f.events.elementEvents.textarea_onBeforeinput(ue),ue.stopImmediatePropagation()}),f.events.documentEvents.noteObserver.observe(Ge,f.variables.observerOptions),h.initTextarea(Ge);var j=[C(I._noteName),D(I._noteName),L(I._noteName),c(I._noteName,I._id,"icon")],E=h.createElement("div",I,f.consts.CLASS_NAMES.tool.id,f.consts.CLASS_NAMES.tool.className),s=h.createElementButton("span",I,f.consts.CLASS_NAMES.toolToggleButton.id,f.consts.CLASS_NAMES.toolToggleButton.className,{isIcon:!0,text:"arrow_drop_down"});if(f.iconSpanElement.toolToggleButtonIcon&&f.iconSpanElement.toolToggleButtonIcon instanceof HTMLSpanElement){var l=f.iconSpanElement.toolToggleButtonIcon.cloneNode(!0);l.setAttribute("data-note-id",I._id),j.forEach(function(ue){l.classList.contains(ue)||l.classList.add(ue)}),s.replaceChild(l,s.firstChild)}var k=h.createElementSelect("span",I,f.consts.CLASS_NAMES.paragraphStyleSelect.id,f.consts.CLASS_NAMES.paragraphStyleSelect.className,{isIcon:!0,text:"auto_fix_high"});if(k.setAttribute("title",f.languageSet[I._attributes.language].styleTooltip),f.iconSpanElement.paragraphStyleSelectIcon&&f.iconSpanElement.paragraphStyleSelectIcon instanceof HTMLSpanElement){var $=f.iconSpanElement.paragraphStyleSelectIcon.cloneNode(!0);$.setAttribute("data-note-id",I._id),j.forEach(function(ue){$.classList.contains(ue)||$.classList.add(ue)}),k.replaceChild($,k.firstChild)}var J=h.createElement("div",I,f.consts.CLASS_NAMES.paragraphStyleSelectBox.id,f.consts.CLASS_NAMES.paragraphStyleSelectBox.className);k.appendChild(J);var ie=h.createElementButton("div",I,f.consts.CLASS_NAMES.styleNomal.id,f.consts.CLASS_NAMES.styleNomal.className,{isIcon:!1,text:"Normal"});ie.setAttribute("data-tag-name","p"),J.appendChild(ie);var ge=h.createElementButton("h1",I,f.consts.CLASS_NAMES.styleHeader1.id,f.consts.CLASS_NAMES.styleHeader1.className,{isIcon:!1,text:"Header1"});ge.setAttribute("data-tag-name","H1"),J.appendChild(ge);var Ce=h.createElementButton("h2",I,f.consts.CLASS_NAMES.styleHeader2.id,f.consts.CLASS_NAMES.styleHeader2.className,{isIcon:!1,text:"Header2"});Ce.setAttribute("data-tag-name","H2"),J.appendChild(Ce);var He=h.createElementButton("h3",I,f.consts.CLASS_NAMES.styleHeader3.id,f.consts.CLASS_NAMES.styleHeader3.className,{isIcon:!1,text:"Header3"});He.setAttribute("data-tag-name","H3"),J.appendChild(He);var Le=h.createElementButton("h4",I,f.consts.CLASS_NAMES.styleHeader4.id,f.consts.CLASS_NAMES.styleHeader4.className,{isIcon:!1,text:"Header4"});Le.setAttribute("data-tag-name","H4"),J.appendChild(Le);var Ke=h.createElementButton("h5",I,f.consts.CLASS_NAMES.styleHeader5.id,f.consts.CLASS_NAMES.styleHeader5.className,{isIcon:!1,text:"Header5"});Ke.setAttribute("data-tag-name","H5"),J.appendChild(Ke);var Ze=h.createElementButton("h6",I,f.consts.CLASS_NAMES.styleHeader6.id,f.consts.CLASS_NAMES.styleHeader6.className,{isIcon:!1,text:"Header6"});Ze.setAttribute("data-tag-name","H6"),J.appendChild(Ze);var et=h.createElementButton("span",I,f.consts.CLASS_NAMES.boldButton.id,f.consts.CLASS_NAMES.boldButton.className,{isIcon:!0,text:"format_bold"});if(et.setAttribute("title",f.languageSet[I._attributes.language].boldTooltip),f.iconSpanElement.boldButtonIcon&&f.iconSpanElement.boldButtonIcon instanceof HTMLSpanElement){var Ve=f.iconSpanElement.boldButtonIcon.cloneNode(!0);Ve.setAttribute("data-note-id",I._id),j.forEach(function(ue){Ve.classList.contains(ue)||Ve.classList.add(ue)}),et.replaceChild(Ve,et.firstChild)}var Mt=h.createElementButton("span",I,f.consts.CLASS_NAMES.underlineButton.id,f.consts.CLASS_NAMES.underlineButton.className,{isIcon:!0,text:"format_underlined"});if(Mt.setAttribute("title",f.languageSet[I._attributes.language].underlineTooltip),f.iconSpanElement.underlineButtonIcon&&f.iconSpanElement.underlineButtonIcon instanceof HTMLSpanElement){var Rt=f.iconSpanElement.underlineButtonIcon.cloneNode(!0);Rt.setAttribute("data-note-id",I._id),j.forEach(function(ue){Rt.classList.contains(ue)||Rt.classList.add(ue)}),Mt.replaceChild(Rt,Mt.firstChild)}var xt=h.createElementButton("span",I,f.consts.CLASS_NAMES.italicButton.id,f.consts.CLASS_NAMES.italicButton.className,{isIcon:!0,text:"format_italic"});if(xt.setAttribute("title",f.languageSet[I._attributes.language].italicTooltip),f.iconSpanElement.italicButtonIcon&&f.iconSpanElement.italicButtonIcon instanceof HTMLSpanElement){var Ht=f.iconSpanElement.italicButtonIcon.cloneNode(!0);Ht.setAttribute("data-note-id",I._id),j.forEach(function(ue){Ht.classList.contains(ue)||Ht.classList.add(ue)}),xt.replaceChild(Ht,xt.firstChild)}var v=h.createElementButton("span",I,f.consts.CLASS_NAMES.ulButton.id,f.consts.CLASS_NAMES.ulButton.className,{isIcon:!0,text:"format_list_bulleted"});if(v.setAttribute("title",f.languageSet[I._attributes.language].ulTooltip),v.setAttribute("data-tag-name","UL"),f.iconSpanElement.ulButtonIcon&&f.iconSpanElement.ulButtonIcon instanceof HTMLSpanElement){var w=f.iconSpanElement.ulButtonIcon.cloneNode(!0);w.setAttribute("data-note-id",I._id),j.forEach(function(ue){w.classList.contains(ue)||w.classList.add(ue)}),v.replaceChild(w,v.firstChild)}var A=h.createElementButton("span",I,f.consts.CLASS_NAMES.olButton.id,f.consts.CLASS_NAMES.olButton.className,{isIcon:!0,text:"format_list_numbered"});if(A.setAttribute("title",f.languageSet[I._attributes.language].olTooltip),A.setAttribute("data-tag-name","OL"),f.iconSpanElement.olButtonIcon&&f.iconSpanElement.olButtonIcon instanceof HTMLSpanElement){var x=f.iconSpanElement.olButtonIcon.cloneNode(!0);x.setAttribute("data-note-id",I._id),j.forEach(function(ue){x.classList.contains(ue)||x.classList.add(ue)}),A.replaceChild(x,A.firstChild)}var g=h.createElementSelect("span",I,f.consts.CLASS_NAMES.textAlignSelect.id,f.consts.CLASS_NAMES.textAlignSelect.className,{isIcon:!0,text:"notes"});if(g.setAttribute("title",f.languageSet[I._attributes.language].textAlignTooltip),f.iconSpanElement.textAlignSelectIcon&&f.iconSpanElement.textAlignSelectIcon instanceof HTMLSpanElement){var p=f.iconSpanElement.textAlignSelectIcon.cloneNode(!0);p.setAttribute("data-note-id",I._id),j.forEach(function(ue){p.classList.contains(ue)||p.classList.add(ue)}),g.replaceChild(p,g.firstChild)}var B=h.createElement("div",I,f.consts.CLASS_NAMES.textAlignSelectBox.id,f.consts.CLASS_NAMES.textAlignSelectBox.className);g.appendChild(B);var H=h.createElementButton("span",I,f.consts.CLASS_NAMES.textAlignLeft.id,f.consts.CLASS_NAMES.textAlignLeft.className,{isIcon:!0,text:"format_align_left"});if(H.setAttribute("data-tag-style","text-align:left;"),f.iconSpanElement.textAlignLeftButtonIcon&&f.iconSpanElement.textAlignLeftButtonIcon instanceof HTMLSpanElement){var U=f.iconSpanElement.textAlignLeftButtonIcon.cloneNode(!0);U.setAttribute("data-note-id",I._id),j.forEach(function(ue){U.classList.contains(ue)||U.classList.add(ue)}),H.replaceChild(U,H.firstChild)}B.appendChild(H);var q=h.createElementButton("span",I,f.consts.CLASS_NAMES.textAlignCenter.id,f.consts.CLASS_NAMES.textAlignCenter.className,{isIcon:!0,text:"format_align_center"});if(q.setAttribute("data-tag-style","text-align:center;"),f.iconSpanElement.textAlignCenterButtonIcon&&f.iconSpanElement.textAlignCenterButtonIcon instanceof HTMLSpanElement){var oe=f.iconSpanElement.textAlignCenterButtonIcon.cloneNode(!0);oe.setAttribute("data-note-id",I._id),j.forEach(function(ue){oe.classList.contains(ue)||oe.classList.add(ue)}),q.replaceChild(oe,q.firstChild)}B.appendChild(q);var de=h.createElementButton("span",I,f.consts.CLASS_NAMES.textAlignRight.id,f.consts.CLASS_NAMES.textAlignRight.className,{isIcon:!0,text:"format_align_right"});if(de.setAttribute("data-tag-style","text-align:right;"),f.iconSpanElement.textAlignRightButtonIcon&&f.iconSpanElement.textAlignRightButtonIcon instanceof HTMLSpanElement){var he=f.iconSpanElement.textAlignRightButtonIcon.cloneNode(!0);he.setAttribute("data-note-id",I._id),j.forEach(function(ue){he.classList.contains(ue)||he.classList.add(ue)}),de.replaceChild(he,de.firstChild)}B.appendChild(de);var se=h.createElementButton("span",I,f.consts.CLASS_NAMES.attLinkButton.id,f.consts.CLASS_NAMES.attLinkButton.className,{isIcon:!0,text:"link"});if(se.setAttribute("title",f.languageSet[I._attributes.language].attLinkTooltip),f.iconSpanElement.attLinkButtonIcon&&f.iconSpanElement.attLinkButtonIcon instanceof HTMLSpanElement){var me=f.iconSpanElement.attLinkButtonIcon.cloneNode(!0);me.setAttribute("data-note-id",I._id),j.forEach(function(ue){me.classList.contains(ue)||me.classList.add(ue)}),se.replaceChild(me,se.firstChild)}var Q=h.createElementButton("span",I,f.consts.CLASS_NAMES.attFileButton.id,f.consts.CLASS_NAMES.attFileButton.className,{isIcon:!0,text:"attach_file"});if(Q.setAttribute("title",f.languageSet[I._attributes.language].attFileTooltip),f.iconSpanElement.attFileButtonIcon&&f.iconSpanElement.attFileButtonIcon instanceof HTMLSpanElement){var u=f.iconSpanElement.attFileButtonIcon.cloneNode(!0);u.setAttribute("data-note-id",I._id),j.forEach(function(ue){u.classList.contains(ue)||u.classList.add(ue)}),Q.replaceChild(u,Q.firstChild)}var b=h.createElementButton("span",I,f.consts.CLASS_NAMES.attImageButton.id,f.consts.CLASS_NAMES.attImageButton.className,{isIcon:!0,text:"image"});if(b.setAttribute("title",f.languageSet[I._attributes.language].attImageTooltip),f.iconSpanElement.attImageButtonIcon&&f.iconSpanElement.attImageButtonIcon instanceof HTMLSpanElement){var _=f.iconSpanElement.attImageButtonIcon.cloneNode(!0);_.setAttribute("data-note-id",I._id),j.forEach(function(ue){_.classList.contains(ue)||_.classList.add(ue)}),b.replaceChild(_,b.firstChild)}var R=h.createElementButton("span",I,f.consts.CLASS_NAMES.attVideoButton.id,f.consts.CLASS_NAMES.attVideoButton.className,{isIcon:!0,text:"videocam"});if(R.setAttribute("title",f.languageSet[I._attributes.language].attVideoTooltip),f.iconSpanElement.attVideoButtonIcon&&f.iconSpanElement.attVideoButtonIcon instanceof HTMLSpanElement){var F=f.iconSpanElement.attVideoButtonIcon.cloneNode(!0);F.setAttribute("data-note-id",I._id),j.forEach(function(ue){F.classList.contains(ue)||F.classList.add(ue)}),R.replaceChild(F,R.firstChild)}var P=h.createElementButton("span",I,f.consts.CLASS_NAMES.fontSizeInputBox.id,f.consts.CLASS_NAMES.fontSizeInputBox.className,{isIcon:!0,text:"format_size"});if(f.iconSpanElement.fontSizeInputBoxIcon&&f.iconSpanElement.fontSizeInputBoxIcon instanceof HTMLSpanElement){var z=f.iconSpanElement.fontSizeInputBoxIcon.cloneNode(!0);z.setAttribute("data-note-id",I._id),j.forEach(function(ue){z.classList.contains(ue)||z.classList.add(ue)}),P.replaceChild(z,P.firstChild)}var pe=h.createElementInput(I,f.consts.CLASS_NAMES.fontSizeInput.id,f.consts.CLASS_NAMES.fontSizeInput.className);pe.setAttribute("type","number"),pe.setAttribute("title",f.languageSet[I._attributes.language].fontSizeTooltip),h.addClickEvent(pe,f.consts.CLASS_NAMES.fontSizeInput.id,I),P.appendChild(pe);var Se=h.createElementButton("span",I,f.consts.CLASS_NAMES.letterSpacingInputBox.id,f.consts.CLASS_NAMES.letterSpacingInputBox.className,{isIcon:!0,text:"swap_horiz"});if(f.iconSpanElement.letterSpacingInputBoxIcon&&f.iconSpanElement.letterSpacingInputBoxIcon instanceof HTMLSpanElement){var ze=f.iconSpanElement.letterSpacingInputBoxIcon.cloneNode(!0);ze.setAttribute("data-note-id",I._id),j.forEach(function(ue){ze.classList.contains(ue)||ze.classList.add(ue)}),Se.replaceChild(ze,Se.firstChild)}var je=h.createElementInput(I,f.consts.CLASS_NAMES.letterSpacingInput.id,f.consts.CLASS_NAMES.letterSpacingInput.className);je.setAttribute("type","number"),je.setAttribute("title",f.languageSet[I._attributes.language].letterSpacingTooltip),h.addClickEvent(je,f.consts.CLASS_NAMES.letterSpacingInput.id,I),Se.appendChild(je);var Ue=h.createElementButton("span",I,f.consts.CLASS_NAMES.lineHeightInputBox.id,f.consts.CLASS_NAMES.lineHeightInputBox.className,{isIcon:!0,text:"height"});if(f.iconSpanElement.lineHeightInputBoxIcon&&f.iconSpanElement.lineHeightInputBoxIcon instanceof HTMLSpanElement){var it=f.iconSpanElement.lineHeightInputBoxIcon.cloneNode(!0);it.setAttribute("data-note-id",I._id),j.forEach(function(ue){it.classList.contains(ue)||it.classList.add(ue)}),Ue.replaceChild(it,Ue.firstChild)}var rt=h.createElementInput(I,f.consts.CLASS_NAMES.lineHeightInput.id,f.consts.CLASS_NAMES.lineHeightInput.className);rt.setAttribute("type","number"),rt.setAttribute("title",f.languageSet[I._attributes.language].lineHeightTooltip),h.addClickEvent(rt,f.consts.CLASS_NAMES.lineHeightInput.id,I),Ue.appendChild(rt);var ct=h.createElementSelect("span",I,f.consts.CLASS_NAMES.fontFamilySelect.id,f.consts.CLASS_NAMES.fontFamilySelect.className,{isIcon:!1,text:I._attributes.defaultTextareaFontFamily.length>12?I._attributes.defaultTextareaFontFamily.substr(0,12)+"...":I._attributes.defaultTextareaFontFamily});ct.setAttribute("style","font-family:"+I._attributes.defaultTextareaFontFamily+";"),ct.setAttribute("title",f.languageSet[I._attributes.language].fontFamilyTooltip);var Ne=h.createElement("div",I,f.consts.CLASS_NAMES.fontFamilySelectBox.id,f.consts.CLASS_NAMES.fontFamilySelectBox.className);ct.appendChild(Ne);for(var De=0;De<I._attributes.defaultFontFamilies.length;De++){var lt=h.createElementFontFamiliySelect("div",I,f.consts.CLASS_NAMES.fontFamily.id+De,f.consts.CLASS_NAMES.fontFamily.className,{isIcon:!1,text:I._attributes.defaultFontFamilies[De]});lt.setAttribute("data-font-family",I._attributes.defaultFontFamilies[De]),lt.setAttribute("style","font-family:"+I._attributes.defaultFontFamilies[De]+";"),Ne.appendChild(lt)}var ae=h.createElementSelect("span",I,f.consts.CLASS_NAMES.colorTextSelect.id,f.consts.CLASS_NAMES.colorTextSelect.className,{isIcon:!0,text:"format_color_text",iconStyle:"-webkit-text-stroke: 0.5px black; font-size: 1.1em"});if(ae.setAttribute("title",f.languageSet[I._attributes.language].colorTextTooltip),f.iconSpanElement.colorTextSelectIcon&&f.iconSpanElement.colorTextSelectIcon instanceof HTMLSpanElement){var te=f.iconSpanElement.colorTextSelectIcon.cloneNode(!0);te.setAttribute("data-note-id",I._id),j.forEach(function(ue){te.classList.contains(ue)||te.classList.add(ue)}),ae.replaceChild(te,ae.firstChild)}var ht=h.createElement("div",I,f.consts.CLASS_NAMES.colorTextSelectBox.id,f.consts.CLASS_NAMES.colorTextSelectBox.className);ae.appendChild(ht);var d=h.createElement("span",I,f.consts.CLASS_NAMES.colorTextRExplain.id,f.consts.CLASS_NAMES.colorTextRExplain.className,{isIcon:!1,text:"R"});d.style.paddingLeft=8*I._attributes.sizeRate+"px",ht.appendChild(d);var y=h.createElementInput(I,f.consts.CLASS_NAMES.colorTextRInput.id,f.consts.CLASS_NAMES.colorTextRInput.className);y.setAttribute("maxlength","2"),h.addClickEvent(y,f.consts.CLASS_NAMES.colorTextRInput.id,I),ht.appendChild(y);var M=h.createElement("span",I,f.consts.CLASS_NAMES.colorTextGExplain.id,f.consts.CLASS_NAMES.colorTextGExplain.className,{isIcon:!1,text:"G"});ht.appendChild(M);var S=h.createElementInput(I,f.consts.CLASS_NAMES.colorTextGInput.id,f.consts.CLASS_NAMES.colorTextGInput.className);S.setAttribute("maxlength","2"),h.addClickEvent(S,f.consts.CLASS_NAMES.colorTextGInput.id,I),ht.appendChild(S);var N=h.createElement("span",I,f.consts.CLASS_NAMES.colorTextBExplain.id,f.consts.CLASS_NAMES.colorTextBExplain.className,{isIcon:!1,text:"B"});ht.appendChild(N);var O=h.createElementInput(I,f.consts.CLASS_NAMES.colorTextBInput.id,f.consts.CLASS_NAMES.colorTextBInput.className);O.setAttribute("maxlength","2"),h.addClickEvent(O,f.consts.CLASS_NAMES.colorTextBInput.id,I),ht.appendChild(O);var T=h.createElement("span",I,f.consts.CLASS_NAMES.colorTextOpacityExplain.id,f.consts.CLASS_NAMES.colorTextOpacityExplain.className,{isIcon:!1,text:"Opacity"});ht.appendChild(T);var G=h.createElementInput(I,f.consts.CLASS_NAMES.colorTextOpacityInput.id,f.consts.CLASS_NAMES.colorTextOpacityInput.className);G.setAttribute("type","number"),G.setAttribute("maxlength","3"),h.addClickEvent(G,f.consts.CLASS_NAMES.colorTextOpacityInput.id,I),ht.appendChild(G),Be=document.createElement("br"),ht.appendChild(Be);var V=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorText0.id,f.consts.CLASS_NAMES.colorText0.className);V.style.backgroundColor=I._colors.color12,ht.appendChild(V);var Z=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorText1.id,f.consts.CLASS_NAMES.colorText1.className);Z.style.backgroundColor=I._colors.color14,ht.appendChild(Z);var ne=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorText2.id,f.consts.CLASS_NAMES.colorText2.className);ne.style.backgroundColor=I._colors.color15,ht.appendChild(ne);var Y=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorText3.id,f.consts.CLASS_NAMES.colorText3.className);Y.style.backgroundColor=I._colors.color16,ht.appendChild(Y);var le=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorText4.id,f.consts.CLASS_NAMES.colorText4.className);le.style.backgroundColor=I._colors.color17,ht.appendChild(le);var qe=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorText5.id,f.consts.CLASS_NAMES.colorText5.className);qe.style.backgroundColor=I._colors.color18,ht.appendChild(qe);var _t=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorText6.id,f.consts.CLASS_NAMES.colorText6.className);_t.style.backgroundColor=I._colors.color19,ht.appendChild(_t);var on=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorText7.id,f.consts.CLASS_NAMES.colorText7.className);on.style.backgroundColor=I._colors.color20,ht.appendChild(on);var Ft=h.createElementSelect("span",I,f.consts.CLASS_NAMES.colorBackSelect.id,f.consts.CLASS_NAMES.colorBackSelect.className,{isIcon:!0,text:"format_color_fill",iconStyle:"font-size: 1.1em; -webkit-text-stroke: 0.5px "+I._colors.color1+";"});if(Ft.setAttribute("title",f.languageSet[I._attributes.language].colorBackTooltip),f.iconSpanElement.colorBackSelectIcon&&f.iconSpanElement.colorBackSelectIcon instanceof HTMLSpanElement){var Gt=f.iconSpanElement.colorBackSelectIcon.cloneNode(!0);Gt.setAttribute("data-note-id",I._id),j.forEach(function(ue){Gt.classList.contains(ue)||Gt.classList.add(ue)}),Ft.replaceChild(Gt,Ft.firstChild)}var St=h.createElement("div",I,f.consts.CLASS_NAMES.colorBackSelectBox.id,f.consts.CLASS_NAMES.colorBackSelectBox.className);Ft.appendChild(St);var At=h.createElement("span",I,f.consts.CLASS_NAMES.colorBackRExplain.id,f.consts.CLASS_NAMES.colorBackRExplain.className,{isIcon:!1,text:"R"});At.style.paddingLeft=8*I._attributes.sizeRate+"px",St.appendChild(At);var Ct=h.createElementInput(I,f.consts.CLASS_NAMES.colorBackRInput.id,f.consts.CLASS_NAMES.colorBackRInput.className);Ct.setAttribute("maxlength","2"),h.addClickEvent(Ct,f.consts.CLASS_NAMES.colorBackRInput.id,I),St.appendChild(Ct);var jt=h.createElement("span",I,f.consts.CLASS_NAMES.colorBackGExplain.id,f.consts.CLASS_NAMES.colorBackGExplain.className,{isIcon:!1,text:"G"});St.appendChild(jt);var rn=h.createElementInput(I,f.consts.CLASS_NAMES.colorBackGInput.id,f.consts.CLASS_NAMES.colorBackGInput.className);rn.setAttribute("maxlength","2"),h.addClickEvent(rn,f.consts.CLASS_NAMES.colorBackGInput.id,I),St.appendChild(rn);var Sn=h.createElement("span",I,f.consts.CLASS_NAMES.colorBackBExplain.id,f.consts.CLASS_NAMES.colorBackBExplain.className,{isIcon:!1,text:"B"});St.appendChild(Sn);var Hn=h.createElementInput(I,f.consts.CLASS_NAMES.colorBackBInput.id,f.consts.CLASS_NAMES.colorBackBInput.className);Hn.setAttribute("maxlength","2"),h.addClickEvent(Hn,f.consts.CLASS_NAMES.colorBackBInput.id,I),St.appendChild(Hn);var Kn=h.createElement("span",I,f.consts.CLASS_NAMES.colorBackOpacityExplain.id,f.consts.CLASS_NAMES.colorBackOpacityExplain.className,{isIcon:!1,text:"Opacity"});St.appendChild(Kn);var Fn=h.createElementInput(I,f.consts.CLASS_NAMES.colorBackOpacityInput.id,f.consts.CLASS_NAMES.colorBackOpacityInput.className);Fn.setAttribute("type","number"),Fn.setAttribute("maxlength","3"),h.addClickEvent(Fn,f.consts.CLASS_NAMES.colorBackOpacityInput.id,I),St.appendChild(Fn),Be=document.createElement("br"),St.appendChild(Be);var ho=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorBack0.id,f.consts.CLASS_NAMES.colorBack0.className);ho.style.backgroundColor=I._colors.color13,St.appendChild(ho);var To=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorBack1.id,f.consts.CLASS_NAMES.colorBack1.className);To.style.backgroundColor=I._colors.color14,St.appendChild(To);var Xn=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorBack2.id,f.consts.CLASS_NAMES.colorBack2.className);Xn.style.backgroundColor=I._colors.color15,St.appendChild(Xn);var Jn=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorBack3.id,f.consts.CLASS_NAMES.colorBack3.className);Jn.style.backgroundColor=I._colors.color16,St.appendChild(Jn);var Zn=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorBack4.id,f.consts.CLASS_NAMES.colorBack4.className);Zn.style.backgroundColor=I._colors.color17,St.appendChild(Zn);var Ae=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorBack5.id,f.consts.CLASS_NAMES.colorBack5.className);Ae.style.backgroundColor=I._colors.color18,St.appendChild(Ae);var we=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorBack6.id,f.consts.CLASS_NAMES.colorBack6.className);we.style.backgroundColor=I._colors.color19,St.appendChild(we);var Fe=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorBack7.id,f.consts.CLASS_NAMES.colorBack7.className);Fe.style.backgroundColor=I._colors.color20,St.appendChild(Fe);var at=h.createElementButton("span",I,f.consts.CLASS_NAMES.formatClearButton.id,f.consts.CLASS_NAMES.formatClearButton.className,{isIcon:!0,text:"format_clear"});if(at.setAttribute("title",f.languageSet[I._attributes.language].formatClearButtonTooltip),f.iconSpanElement.formatClearButtonIcon&&f.iconSpanElement.formatClearButtonIcon instanceof HTMLSpanElement){var $e=f.iconSpanElement.formatClearButtonIcon.cloneNode(!0);$e.setAttribute("data-note-id",I._id),j.forEach(function(ue){$e.classList.contains(ue)||$e.classList.add(ue)}),at.replaceChild($e,at.firstChild)}var pt=h.createElementButton("span",I,f.consts.CLASS_NAMES.undoButton.id,f.consts.CLASS_NAMES.undoButton.className,{isIcon:!0,text:"undo"});if(pt.setAttribute("title",f.languageSet[I._attributes.language].undoTooltip),f.iconSpanElement.undoButtonIcon&&f.iconSpanElement.undoButtonIcon instanceof HTMLSpanElement){var Nt=f.iconSpanElement.undoButtonIcon.cloneNode(!0);Nt.setAttribute("data-note-id",I._id),j.forEach(function(ue){Nt.classList.contains(ue)||Nt.classList.add(ue)}),pt.replaceChild(Nt,pt.firstChild)}var zt=h.createElementButton("span",I,f.consts.CLASS_NAMES.redoButton.id,f.consts.CLASS_NAMES.redoButton.className,{isIcon:!0,text:"redo"});if(zt.setAttribute("title",f.languageSet[I._attributes.language].redoTooltip),f.iconSpanElement.redoButtonIcon&&f.iconSpanElement.redoButtonIcon instanceof HTMLSpanElement){var Wt=f.iconSpanElement.redoButtonIcon.cloneNode(!0);Wt.setAttribute("data-note-id",I._id),j.forEach(function(ue){Wt.classList.contains(ue)||Wt.classList.add(ue)}),zt.replaceChild(Wt,zt.firstChild)}var an=h.createElementButton("span",I,f.consts.CLASS_NAMES.helpButton.id,f.consts.CLASS_NAMES.helpButton.className,{isIcon:!0,text:"help"});if(an.setAttribute("title",f.languageSet[I._attributes.language].helpTooltip),f.iconSpanElement.helpButtonIcon&&f.iconSpanElement.helpButtonIcon instanceof HTMLSpanElement){var pn=f.iconSpanElement.helpButtonIcon.cloneNode(!0);pn.setAttribute("data-note-id",I._id),j.forEach(function(ue){pn.classList.contains(ue)||pn.classList.add(ue)}),an.replaceChild(pn,an.firstChild)}var Xt=h.createElementBasic("div",I,f.consts.CLASS_NAMES.modalBack.id,f.consts.CLASS_NAMES.modalBack.className),kn=h.createElementBasic("div",I,f.consts.CLASS_NAMES.attLinkModal.id,f.consts.CLASS_NAMES.attLinkModal.className),Qa=h.createElement("div",I,f.consts.CLASS_NAMES.attLinkHeader.id,f.consts.CLASS_NAMES.attLinkHeader.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attLinkModalTitle});kn.appendChild(Qa);var el=h.createElement("div",I,f.consts.CLASS_NAMES.attLinkExplain1.id,f.consts.CLASS_NAMES.attLinkExplain1.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attLinkInTextExplain});kn.appendChild(el);var Di=h.createElementInput(I,f.consts.CLASS_NAMES.attLinkText.id,f.consts.CLASS_NAMES.attLinkText.className);Di.setAttribute("title",f.languageSet[I._attributes.language].attLinkInTextTooltip),kn.appendChild(Di);var tl=h.createElement("div",I,f.consts.CLASS_NAMES.attLinkExplain2.id,f.consts.CLASS_NAMES.attLinkExplain2.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attLinkInLinkExplain});kn.appendChild(tl);var zi=h.createElementInput(I,f.consts.CLASS_NAMES.attLinkHref.id,f.consts.CLASS_NAMES.attLinkHref.className);zi.setAttribute("title",f.languageSet[I._attributes.language].attLinkInLinkTooltip),kn.appendChild(zi);var Ui=h.createElementInputCheckbox(I,f.consts.CLASS_NAMES.attLinkIsBlankCheckbox.id,f.consts.CLASS_NAMES.attLinkIsBlankCheckbox.className);Ui.setAttribute("title",f.languageSet[I._attributes.language].attLinkIsOpenTooltip);var dr=h.createElement("label",I,f.consts.CLASS_NAMES.attLinkIsBlankLabel.id,f.consts.CLASS_NAMES.attLinkIsBlankLabel.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attLinkIsOpenExplain});dr.insertBefore(Ui,dr.firstChild),kn.appendChild(dr);var nl=h.createElement("span",I,f.consts.CLASS_NAMES.attLinkValidCheckText.id,f.consts.CLASS_NAMES.attLinkValidCheckText.className),Gi=h.createElementInputCheckbox(I,f.consts.CLASS_NAMES.attLinkValidCheckbox.id,f.consts.CLASS_NAMES.attLinkValidCheckbox.className);Gi.style.display="none";var Bo=h.createElement("div",I,f.consts.CLASS_NAMES.attLinkFooter.id,f.consts.CLASS_NAMES.attLinkFooter.className),ur=h.createElementButton("button",I,f.consts.CLASS_NAMES.attLinkInsertButton.id,f.consts.CLASS_NAMES.attLinkInsertButton.className,{isIcon:!0,text:"add_link"});if(f.iconSpanElement.attLinkInsertButtonIcon&&f.iconSpanElement.attLinkInsertButtonIcon instanceof HTMLSpanElement){var fr=f.iconSpanElement.attLinkInsertButtonIcon.cloneNode(!0);fr.setAttribute("data-note-id",I._id),j.forEach(function(ue){fr.classList.contains(ue)||fr.classList.add(ue)}),ur.replaceChild(fr,ur.firstChild)}Bo.appendChild(nl),Bo.appendChild(Gi),Bo.appendChild(ur),kn.appendChild(Bo);var Lo=h.createElementBasic("div",I,f.consts.CLASS_NAMES.attFileModal.id,f.consts.CLASS_NAMES.attFileModal.className),ol=h.createElement("div",I,f.consts.CLASS_NAMES.attFileHeader.id,f.consts.CLASS_NAMES.attFileHeader.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attFileModalTitle});Lo.appendChild(ol);var Qn=h.createElement("div",I,f.consts.CLASS_NAMES.attFilelayout.id,f.consts.CLASS_NAMES.attFilelayout.className),rl=h.createElement("div",I,f.consts.CLASS_NAMES.attFileExplain1.id,f.consts.CLASS_NAMES.attFileExplain1.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attFileExplain1});Qn.appendChild(rl),Be=document.createElement("br"),Qn.appendChild(Be);var hr=document.createElement("div");hr.setAttribute("style","width:90%;text-align:center;margin:0 auto;");var mr=h.createElementButton("div",I,f.consts.CLASS_NAMES.attFileUploadDiv.id,f.consts.CLASS_NAMES.attFileUploadDiv.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attFileUploadDiv});mr.addEventListener("dragover",function(ue){I._elementEvents.attFileUploadDiv_onBeforeDragover(ue)&&(f.events.elementEvents.attFileUploadDiv_onDragover(ue),I._elementEvents.attFileUploadDiv_onAfterDragover(ue),ue.stopImmediatePropagation())}),mr.addEventListener("drop",function(ue){I._elementEvents.attFileUploadDiv_onBeforeDrop(ue)&&(f.events.elementEvents.attFileUploadDiv_onDrop(ue),I._elementEvents.attFileUploadDiv_onAfterDrop(ue),ue.stopImmediatePropagation())}),hr.appendChild(mr),Qn.appendChild(hr);var gr=document.createElement("div");gr.setAttribute("style","width:90%;text-align:right;margin:5px auto 20px auto;");var il=h.createElementButton("button",I,f.consts.CLASS_NAMES.attFileUploadButton.id,f.consts.CLASS_NAMES.attFileUploadButton.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attFileUploadButton});gr.appendChild(il),Qn.appendChild(gr);var yr=h.createElementInput(I,f.consts.CLASS_NAMES.attFileUpload.id,f.consts.CLASS_NAMES.attFileUpload.className);yr.setAttribute("type","file"),yr.setAttribute("multiple",""),Qn.appendChild(yr),Lo.appendChild(Qn);var ji=h.createElement("div",I,f.consts.CLASS_NAMES.attFileFooter.id,f.consts.CLASS_NAMES.attFileFooter.className),pr=h.createElementButton("button",I,f.consts.CLASS_NAMES.attFileInsertButton.id,f.consts.CLASS_NAMES.attFileInsertButton.className,{isIcon:!0,text:"attach_file"});if(f.iconSpanElement.attFileInsertButtonIcon&&f.iconSpanElement.attFileInsertButtonIcon instanceof HTMLSpanElement){var _r=f.iconSpanElement.attFileInsertButtonIcon.cloneNode(!0);_r.setAttribute("data-note-id",I._id),j.forEach(function(ue){_r.classList.contains(ue)||_r.classList.add(ue)}),pr.replaceChild(_r,pr.firstChild)}ji.appendChild(pr),Lo.appendChild(ji);var fn=h.createElementBasic("div",I,f.consts.CLASS_NAMES.attImageModal.id,f.consts.CLASS_NAMES.attImageModal.className),al=h.createElement("div",I,f.consts.CLASS_NAMES.attImageHeader.id,f.consts.CLASS_NAMES.attImageHeader.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attImageModalTitle});fn.appendChild(al);var ll=h.createElement("div",I,f.consts.CLASS_NAMES.attImageExplain1.id,f.consts.CLASS_NAMES.attImageExplain1.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attImageExplain1});fn.appendChild(ll),Be=document.createElement("br"),fn.appendChild(Be);var mo=document.createElement("div");mo.setAttribute("style","width:90%;text-align:center;margin:0 auto;position:relative;");var No=h.createElementButton("button",I,f.consts.CLASS_NAMES.attImageViewPreButton.id,f.consts.CLASS_NAMES.attImageViewPreButton.className,{isIcon:!0,text:"navigate_before"});if(f.iconSpanElement.attImageViewPreButtonIcon&&f.iconSpanElement.attImageViewPreButtonIcon instanceof HTMLSpanElement){var vr=f.iconSpanElement.attImageViewPreButtonIcon.cloneNode(!0);vr.setAttribute("data-note-id",I._id),j.forEach(function(ue){vr.classList.contains(ue)||vr.classList.add(ue)}),No.replaceChild(vr,No.firstChild)}No.setAttribute("style","position:absolute;top:50%;transform:translateY(-50%) translateX(1%);"),mo.appendChild(No);var br=h.createElementBasic("div",I,f.consts.CLASS_NAMES.attImageUploadButtonAndView.id,f.consts.CLASS_NAMES.attImageUploadButtonAndView.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attImageUploadButtonAndView});br.addEventListener("dragover",function(ue){I._elementEvents.attImageUploadButtonAndView_onBeforeDragover(ue)&&(f.events.elementEvents.attImageUploadButtonAndView_onDragover(ue),I._elementEvents.attImageUploadButtonAndView_onAfterDragover(ue),ue.stopImmediatePropagation())}),br.addEventListener("drop",function(ue){I._elementEvents.attImageUploadButtonAndView_onBeforeDrop(ue)&&(f.events.elementEvents.attImageUploadButtonAndView_onDrop(ue),I._elementEvents.attImageUploadButtonAndView_onAfterDrop(ue),ue.stopImmediatePropagation())}),mo.appendChild(br);var Ro=h.createElementButton("button",I,f.consts.CLASS_NAMES.attImageViewNextButton.id,f.consts.CLASS_NAMES.attImageViewNextButton.className,{isIcon:!0,text:"navigate_next"});if(f.iconSpanElement.attImageViewNextButtonIcon&&f.iconSpanElement.attImageViewNextButtonIcon instanceof HTMLSpanElement){var Cr=f.iconSpanElement.attImageViewNextButtonIcon.cloneNode(!0);Cr.setAttribute("data-note-id",I._id),j.forEach(function(ue){Cr.classList.contains(ue)||Cr.classList.add(ue)}),Ro.replaceChild(Cr,Ro.firstChild)}Ro.setAttribute("style","position:absolute;top:50%;transform:translateY(-50%) translateX(-101%);"),mo.appendChild(Ro),fn.appendChild(mo);var Ho=h.createElementInput(I,f.consts.CLASS_NAMES.attImageUpload.id,f.consts.CLASS_NAMES.attImageUpload.className);Ho.setAttribute("type","file"),Ho.setAttribute("multiple","");var zd=function(ue){for(var eo="",On=0;On<ue.length;On++)ue[On]&&(eo+=ue[On].trim(),On!==ue.length-1&&(eo+=", "));return eo}(I._attributes.attImageAcceptTypes);Ho.setAttribute("accept",zd),fn.appendChild(Ho);var sl=h.createElement("div",I,f.consts.CLASS_NAMES.attImageExplain2.id,f.consts.CLASS_NAMES.attImageExplain2.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attImageExplain2});fn.appendChild(sl),Be=document.createElement("br"),fn.appendChild(Be);var Wi=h.createElementInput(I,f.consts.CLASS_NAMES.attImageURL.id,f.consts.CLASS_NAMES.attImageURL.className);Wi.setAttribute("title",f.languageSet[I._attributes.language].attImageURLTooltip),fn.appendChild(Wi);var qi=h.createElement("div",I,f.consts.CLASS_NAMES.attImageFooter.id,f.consts.CLASS_NAMES.attImageFooter.className),Mr=h.createElementButton("button",I,f.consts.CLASS_NAMES.attImageInsertButton.id,f.consts.CLASS_NAMES.attImageInsertButton.className,{isIcon:!0,text:"image"});if(f.iconSpanElement.attImageInsertButtonIcon&&f.iconSpanElement.attImageInsertButtonIcon instanceof HTMLSpanElement){var xr=f.iconSpanElement.attImageInsertButtonIcon.cloneNode(!0);xr.setAttribute("data-note-id",I._id),j.forEach(function(ue){xr.classList.contains(ue)||xr.classList.add(ue)}),Mr.replaceChild(xr,Mr.firstChild)}qi.appendChild(Mr),fn.appendChild(qi);var In=h.createElementBasic("div",I,f.consts.CLASS_NAMES.attVideoModal.id,f.consts.CLASS_NAMES.attVideoModal.className),cl=h.createElement("div",I,f.consts.CLASS_NAMES.attVideoHeader.id,f.consts.CLASS_NAMES.attVideoHeader.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attVideoModalTitle});In.appendChild(cl);var dl=h.createElement("div",I,f.consts.CLASS_NAMES.attVideoExplain1.id,f.consts.CLASS_NAMES.attVideoExplain1.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attVideoExplain1});In.appendChild(dl);var $i=h.createElementInput(I,f.consts.CLASS_NAMES.attVideoEmbedId.id,f.consts.CLASS_NAMES.attVideoEmbedId.className);$i.setAttribute("title",f.languageSet[I._attributes.language].attVideoEmbedIdTooltip),In.appendChild($i);var ul=h.createElement("div",I,f.consts.CLASS_NAMES.attVideoExplain2.id,f.consts.CLASS_NAMES.attVideoExplain2.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attVideoExplain2});In.appendChild(ul);var go=document.createElement("div");go.setAttribute("style","padding-left:20px;color:"+I._colors.color10);var Sr=h.createElement("span",I,"","modal_att_video_icon",{isIcon:!0,text:"width",iconStyle:"color:"+I._colors.color10});if(f.iconSpanElement.attVideoWidthTextIcon&&f.iconSpanElement.attVideoWidthTextIcon instanceof HTMLSpanElement){var kr=f.iconSpanElement.attVideoWidthTextIcon.cloneNode(!0);kr.setAttribute("data-note-id",I._id),j.forEach(function(ue){kr.classList.contains(ue)||kr.classList.add(ue)}),Sr.replaceChild(kr,Sr.firstChild)}go.appendChild(Sr);var Fo=h.createElementInput(I,f.consts.CLASS_NAMES.attVideoWidth.id,f.consts.CLASS_NAMES.attVideoWidth.className);Fo.setAttribute("title",f.languageSet[I._attributes.language].attVideoWidthTooltip),Fo.setAttribute("type","number"),Fo.setAttribute("style","text-align:right;"),go.appendChild(Fo);var Yi=h.createElement("span",I,"","modal_att_video_icon",{isIcon:!1,text:"%"});Yi.setAttribute("style","padding-left:10px;font-size:0.8em"),go.appendChild(Yi),In.appendChild(go);var yo=document.createElement("div");yo.setAttribute("style","padding-left:20px;color:"+I._colors.color10);var Ir=h.createElement("span",I,"","modal_att_video_icon",{isIcon:!0,text:"height",iconStyle:"color:"+I._colors.color10});if(f.iconSpanElement.attVideoHeightTextIcon&&f.iconSpanElement.attVideoHeightTextIcon instanceof HTMLSpanElement){var Er=f.iconSpanElement.attVideoHeightTextIcon.cloneNode(!0);Er.setAttribute("data-note-id",I._id),j.forEach(function(ue){Er.classList.contains(ue)||Er.classList.add(ue)}),Ir.replaceChild(Er,Ir.firstChild)}yo.appendChild(Ir);var Oo=h.createElementInput(I,f.consts.CLASS_NAMES.attVideoHeight.id,f.consts.CLASS_NAMES.attVideoHeight.className);Oo.setAttribute("title",f.languageSet[I._attributes.language].attVideoHeightTooltip),Oo.setAttribute("type","number"),Oo.setAttribute("style","text-align:right;"),yo.appendChild(Oo);var Ki=h.createElement("span",I,"","modal_att_video_icon",{isIcon:!1,text:"px"});Ki.setAttribute("style","padding-left:10px;font-size:0.8em"),yo.appendChild(Ki),In.appendChild(yo);var fl=h.createElement("span",I,f.consts.CLASS_NAMES.attVideoValidCheckText.id,f.consts.CLASS_NAMES.attVideoValidCheckText.className),Xi=h.createElementInputCheckbox(I,f.consts.CLASS_NAMES.attVideoValidCheckbox.id,f.consts.CLASS_NAMES.attVideoValidCheckbox.className);Xi.style.display="none";var wr=h.createElementButton("button",I,f.consts.CLASS_NAMES.attVideoInsertButton.id,f.consts.CLASS_NAMES.attVideoInsertButton.className,{isIcon:!0,text:"videocam"});if(f.iconSpanElement.attVideoInsertButtonIcon&&f.iconSpanElement.attVideoInsertButtonIcon instanceof HTMLSpanElement){var Ar=f.iconSpanElement.attVideoInsertButtonIcon.cloneNode(!0);Ar.setAttribute("data-note-id",I._id),j.forEach(function(ue){Ar.classList.contains(ue)||Ar.classList.add(ue)}),wr.replaceChild(Ar,wr.firstChild)}var Vo=h.createElement("div",I,f.consts.CLASS_NAMES.attVideoFooter.id,f.consts.CLASS_NAMES.attVideoFooter.className);Vo.appendChild(fl),Vo.appendChild(Xi),Vo.appendChild(wr),In.appendChild(Vo);var po=h.createElement("div",I,f.consts.CLASS_NAMES.attLinkTooltip.id,f.consts.CLASS_NAMES.attLinkTooltip.className),Ji=h.createElement("a",I,f.consts.CLASS_NAMES.attLinkTooltipHref.id,f.consts.CLASS_NAMES.attLinkTooltipHref.className);Ji.setAttribute("target","_blank");var Tr=h.createElementButton("span",I,f.consts.CLASS_NAMES.attLinkTooltipEditButton.id,f.consts.CLASS_NAMES.attLinkTooltipEditButton.className,{isIcon:!0,text:"add_link",iconStyle:"font-size:0.9em"});if(f.iconSpanElement.attLinkTooltipEditButtonIcon&&f.iconSpanElement.attLinkTooltipEditButtonIcon instanceof HTMLSpanElement){var Br=f.iconSpanElement.attLinkTooltipEditButtonIcon.cloneNode(!0);Br.setAttribute("data-note-id",I._id),j.forEach(function(ue){Br.classList.contains(ue)||Br.classList.add(ue)}),Tr.replaceChild(Br,Tr.firstChild)}var Lr=h.createElementButton("span",I,f.consts.CLASS_NAMES.attLinkTooltipUnlinkButton.id,f.consts.CLASS_NAMES.attLinkTooltipUnlinkButton.className,{isIcon:!0,text:"link_off",iconStyle:"font-size:0.9em"});if(f.iconSpanElement.attLinkTooltipUnlinkButtonIcon&&f.iconSpanElement.attLinkTooltipUnlinkButtonIcon instanceof HTMLSpanElement){var Nr=f.iconSpanElement.attLinkTooltipUnlinkButtonIcon.cloneNode(!0);Nr.setAttribute("data-note-id",I._id),j.forEach(function(ue){Nr.classList.contains(ue)||Nr.classList.add(ue)}),Lr.replaceChild(Nr,Lr.firstChild)}po.appendChild(Tr),po.appendChild(Lr),po.appendChild(Ji);var Po=h.createElement("div",I,f.consts.CLASS_NAMES.attImageAndVideoTooltip.id,f.consts.CLASS_NAMES.attImageAndVideoTooltip.className),sn=document.createElement("div"),Do=document.createElement("span");Do.setAttribute("class",m(I._noteName,I.id,"small_text_box")),Do.setAttribute("style","padding: 0 0 0 10px;"),Do.textContent=f.languageSet[I._attributes.language].attImageAndVideoTooltipWidthInput,sn.appendChild(Do);var Rr=h.createElementInput(I,f.consts.CLASS_NAMES.attImageAndVideoTooltipWidthInput.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipWidthInput.className);Rr.addEventListener("keyup",function(ue){I._elementEvents.attImageAndVideoTooltipWidthInput_onBeforeKeyup(ue)&&(f.events.elementEvents.attImageAndVideoTooltipWidthInput_onKeyup(ue),I._elementEvents.attImageAndVideoTooltipWidthInput_onAfterKeyup(ue),ue.stopImmediatePropagation())}),Rr.setAttribute("type","number"),sn.appendChild(Rr);var zo=document.createElement("span");zo.setAttribute("class",m(I._noteName,I.id,"small_text_box")),zo.setAttribute("style","padding: 0;"),zo.textContent="%",sn.appendChild(zo);var Hr=document.createElement("span");Hr.setAttribute("class",m(I._noteName,I.id,"small_text_box")),Hr.textContent=f.languageSet[I._attributes.language].attImageAndVideoTooltipFloatRadio,sn.appendChild(Hr);var hl=h.createElementInputRadio(I,f.consts.CLASS_NAMES.attImageAndVideoTooltipFloatRadioNone.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipFloatRadioNone.className,c(I._noteName,I.id,"attImageAndVideoTooltipFloatRadio"));sn.appendChild(hl);var Fr=h.createElementRadioLabel(I,c(I._noteName,I.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipFloatRadioNone.id),"close");if(f.iconSpanElement.attImageAndVideoTooltipFloatRadioNoneLabelIcon&&f.iconSpanElement.attImageAndVideoTooltipFloatRadioNoneLabelIcon instanceof HTMLSpanElement){var Or=f.iconSpanElement.attImageAndVideoTooltipFloatRadioNoneLabelIcon.cloneNode(!0);Or.setAttribute("data-note-id",I._id),j.forEach(function(ue){Or.classList.contains(ue)||Or.classList.add(ue)}),Fr.replaceChild(Or,Fr.firstChild)}sn.appendChild(Fr);var ml=h.createElementInputRadio(I,f.consts.CLASS_NAMES.attImageAndVideoTooltipFloatRadioLeft.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipFloatRadioLeft.className,c(I._noteName,I.id,"attImageAndVideoTooltipFloatRadio"));sn.appendChild(ml);var Vr=h.createElementRadioLabel(I,c(I._noteName,I.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipFloatRadioLeft.id),"art_track");if(f.iconSpanElement.attImageAndVideoTooltipFloatRadioLeftLabelIcon&&f.iconSpanElement.attImageAndVideoTooltipFloatRadioLeftLabelIcon instanceof HTMLSpanElement){var Pr=f.iconSpanElement.attImageAndVideoTooltipFloatRadioLeftLabelIcon.cloneNode(!0);Pr.setAttribute("data-note-id",I._id),j.forEach(function(ue){Pr.classList.contains(ue)||Pr.classList.add(ue)}),Vr.replaceChild(Pr,Vr.firstChild)}sn.appendChild(Vr);var gl=h.createElementInputRadio(I,f.consts.CLASS_NAMES.attImageAndVideoTooltipFloatRadioRight.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipFloatRadioRight.className,c(I._noteName,I.id,"attImageAndVideoTooltipFloatRadio"));sn.appendChild(gl);var Dr=h.createElementRadioLabel(I,c(I._noteName,I.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipFloatRadioRight.id),"burst_mode");if(f.iconSpanElement.attImageAndVideoTooltipFloatRadioRightLabelIcon&&f.iconSpanElement.attImageAndVideoTooltipFloatRadioRightLabelIcon instanceof HTMLSpanElement){var zr=f.iconSpanElement.attImageAndVideoTooltipFloatRadioRightLabelIcon.cloneNode(!0);zr.setAttribute("data-note-id",I._id),j.forEach(function(ue){zr.classList.contains(ue)||zr.classList.add(ue)}),Dr.replaceChild(zr,Dr.firstChild)}sn.appendChild(Dr),Po.appendChild(sn);var En=document.createElement("div"),Ur=document.createElement("span");Ur.setAttribute("class",m(I._noteName,I.id,"small_text_box")),Ur.textContent=f.languageSet[I._attributes.language].attImageAndVideoTooltipShapeRadio,En.appendChild(Ur);var yl=h.createElementInputRadio(I,f.consts.CLASS_NAMES.attImageAndVideoTooltipShapeRadioSquare.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipShapeRadioSquare.className,c(I._noteName,I.id,"attImageAndVideoTooltipShapeRadio"));En.appendChild(yl);var Gr=h.createElementRadioLabel(I,c(I._noteName,I.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipShapeRadioSquare.id),"crop_5_4");if(f.iconSpanElement.attImageAndVideoTooltipShapeRadioSquareLabelIcon&&f.iconSpanElement.attImageAndVideoTooltipShapeRadioSquareLabelIcon instanceof HTMLSpanElement){var jr=f.iconSpanElement.attImageAndVideoTooltipShapeRadioSquareLabelIcon.cloneNode(!0);jr.setAttribute("data-note-id",I._id),j.forEach(function(ue){jr.classList.contains(ue)||jr.classList.add(ue)}),Gr.replaceChild(jr,Gr.firstChild)}En.appendChild(Gr);var pl=h.createElementInputRadio(I,f.consts.CLASS_NAMES.attImageAndVideoTooltipShapeRadioRadius.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipShapeRadioRadius.className,c(I._noteName,I.id,"attImageAndVideoTooltipShapeRadio"));En.appendChild(pl);var Wr=h.createElementRadioLabel(I,c(I._noteName,I.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipShapeRadioRadius.id),"aspect_ratio");if(f.iconSpanElement.attImageAndVideoTooltipShapeRadioRadiusLabelIcon&&f.iconSpanElement.attImageAndVideoTooltipShapeRadioRadiusLabelIcon instanceof HTMLSpanElement){var qr=f.iconSpanElement.attImageAndVideoTooltipShapeRadioRadiusLabelIcon.cloneNode(!0);qr.setAttribute("data-note-id",I._id),j.forEach(function(ue){qr.classList.contains(ue)||qr.classList.add(ue)}),Wr.replaceChild(qr,Wr.firstChild)}En.appendChild(Wr);var _l=h.createElementInputRadio(I,f.consts.CLASS_NAMES.attImageAndVideoTooltipShapeRadioCircle.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipShapeRadioCircle.className,c(I._noteName,I.id,"attImageAndVideoTooltipShapeRadio"));En.appendChild(_l);var $r=h.createElementRadioLabel(I,c(I._noteName,I.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipShapeRadioCircle.id),"circle");if(f.iconSpanElement.attImageAndVideoTooltipShapeRadioCircleLabelIcon&&f.iconSpanElement.attImageAndVideoTooltipShapeRadioCircleLabelIcon instanceof HTMLSpanElement){var Yr=f.iconSpanElement.attImageAndVideoTooltipShapeRadioCircleLabelIcon.cloneNode(!0);Yr.setAttribute("data-note-id",I._id),j.forEach(function(ue){Yr.classList.contains(ue)||Yr.classList.add(ue)}),$r.replaceChild(Yr,$r.firstChild)}En.appendChild($r),Po.appendChild(En);var Uo=h.createElementBasic("div",I,f.consts.CLASS_NAMES.helpModal.id,f.consts.CLASS_NAMES.helpModal.className),vl=h.createElement("div",I,f.consts.CLASS_NAMES.helpHeader.id,f.consts.CLASS_NAMES.helpHeader.className,{isIcon:!1,text:f.languageSet[I._attributes.language].helpModalTitle});Uo.appendChild(vl);var Zi=h.createElement("div",I,f.consts.CLASS_NAMES.helpMain.id,f.consts.CLASS_NAMES.helpMain.className),Qi=document.createElement("table");f.languageSet[I._attributes.language].helpContent.forEach(function(ue){var eo=document.createElement("tr");Object.keys(ue).forEach(function(On){var ta=document.createElement("td");ta.textContent=On,ta.setAttribute("style","width:30%;padding:0 0 6px 12px;border:none;"),eo.appendChild(ta);var na=document.createElement("td");na.setAttribute("style","width:70%;padding:0 12px 6px 12px;border:none;"),na.textContent=ue[On],eo.appendChild(na)}),Qi.appendChild(eo)}),Zi.appendChild(Qi),Uo.appendChild(Zi);var ea=h.createElement("div",I,f.consts.CLASS_NAMES.helpFooter.id,f.consts.CLASS_NAMES.helpFooter.className);ea.setAttribute("style","height:25px;"),Uo.appendChild(ea);var Kr=h.createElementBasic("div",I,f.consts.CLASS_NAMES.placeholder.id,f.consts.CLASS_NAMES.placeholder.className);if(I._attributes.placeholderTitle){var bl=document.createElement("h5");bl.innerText=I._attributes.placeholderTitle,Kr.appendChild(bl)}if(I._attributes.placeholderTextContent){var Cl=document.createElement("p");Cl.innerText=I._attributes.placeholderTextContent,Kr.appendChild(Cl)}Xt.appendChild(kn),Xt.appendChild(Lo),Xt.appendChild(fn),Xt.appendChild(In),Xt.appendChild(Uo),tt.appendChild(Xt),tt.appendChild(Kr),I._attributes.toolToggleUsing&&E.appendChild(s),E.appendChild(k),E.appendChild(et),E.appendChild(Mt),E.appendChild(xt),E.appendChild(v),E.appendChild(A),E.appendChild(g),E.appendChild(se),E.appendChild(Q),E.appendChild(b),E.appendChild(R),E.appendChild(P),E.appendChild(Se),E.appendChild(Ue),E.appendChild(ct),E.appendChild(ae),E.appendChild(Ft),E.appendChild(at),E.appendChild(pt),E.appendChild(zt),E.appendChild(an),I._attributes.toolPosition===r.bottom?(tt.appendChild(Ge),tt.appendChild(po),tt.appendChild(Po),tt.appendChild(E)):(tt.appendChild(E),tt.appendChild(po),tt.appendChild(Po),tt.appendChild(Ge)),I.appendChild(tt),pe.value=String(I._status.fontSize),je.value=String(I._status.letterSpacing),rt.value=String(I._status.lineHeight),y.value=I._status.colorTextR,S.value=I._status.colorTextG,O.value=I._status.colorTextB,G.value=I._status.colorTextO,Ct.value=I._status.colorBackR,rn.value=I._status.colorBackG,Hn.value=I._status.colorBackB,Fn.value=I._status.colorBackO,be.usingParagraphStyle||(k.style.display="none"),be.usingBold||(et.style.display="none"),be.usingUnderline||(Mt.style.display="none"),be.usingItalic||(xt.style.display="none"),be.usingUl||(v.style.display="none"),be.usingOl||(A.style.display="none"),be.usingTextAlign||(g.style.display="none"),be.usingAttLink||(se.style.display="none"),be.usingAttFile||(Q.style.display="none"),be.usingAttImage||(b.style.display="none"),be.usingAttVideo||(R.style.display="none"),be.usingFontSize||(P.style.display="none"),be.usingLetterSpacing||(Se.style.display="none"),be.usingLineHeight||(Ue.style.display="none"),be.usingFontFamily||(ct.style.display="none"),be.usingColorText||(ae.style.display="none"),be.usingColorBack||(Ft.style.display="none"),be.usingFormatClear||(at.style.display="none"),be.usingUndo||(pt.style.display="none"),be.usingRedo||(zt.style.display="none"),be.usingHelp||(an.style.display="none"),I._elements={template:tt,textarea:Ge,tool:E,toolToggleButton:s,paragraphStyleSelect:k,paragraphStyleSelectBox:J,paragraphStyleNormalButton:ie,paragraphStyleHeader1Button:ge,paragraphStyleHeader2Button:Ce,paragraphStyleHeader3Button:He,paragraphStyleHeader4Button:Le,paragraphStyleHeader5Button:Ke,paragraphStyleHeader6Button:Ze,boldButton:et,underlineButton:Mt,italicButton:xt,ulButton:v,olButton:A,textAlignSelect:g,textAlignSelectBox:B,textAlignLeftButton:H,textAlignCenterButton:q,textAlignRightButton:de,attLinkButton:se,attFileButton:Q,attImageButton:b,attVideoButton:R,fontSizeInputBox:P,fontSizeInput:pe,letterSpacingInputBox:Se,letterSpacingInput:je,lineHeightInputBox:Ue,lineHeightInput:rt,fontFamilySelect:ct,fontFamilySelectBox:Ne,colorTextSelect:ae,colorTextSelectBox:ht,colorTextRIcon:d,colorTextRInput:y,colorTextGIcon:M,colorTextGInput:S,colorTextBIcon:N,colorTextBInput:O,colorTextOpacityIcon:T,colorTextOpacityInput:G,colorText0:V,colorText1:Z,colorText2:ne,colorText3:Y,colorText4:le,colorText5:qe,colorText6:_t,colorText7:on,colorBackSelect:Ft,colorBackSelectBox:St,colorBackRIcon:At,colorBackRInput:Ct,colorBackGIcon:jt,colorBackGInput:rn,colorBackBIcon:Sn,colorBackBInput:Hn,colorBackOpacityIcon:Kn,colorBackOpacityInput:Fn,colorBack0:ho,colorBack1:To,colorBack2:Xn,colorBack3:Jn,colorBack4:Zn,colorBack5:Ae,colorBack6:we,colorBack7:Fe,formatClearButton:at,undoButton:pt,redoButton:zt,helpButton:an,modalBack:Xt,attLinkModal:kn,attLinkModalTitle:Qa,attLinkInTextExplain:el,attLinkText:Di,attLinkInLinkExplain:tl,attLinkHref:zi,attLinkIsBlankCheckbox:Ui,attLinkIsOpenExplain:dr,attLinkValidCheckText:nl,attLinkValidCheckbox:Gi,attModalBox:Bo,attLinkInsertButton:ur,attFileModal:Lo,attFileModalTitle:ol,attFilelayout:Qn,attFileExplain1:rl,attFileUploadDivBox:hr,attFileUploadDiv:mr,attFileUploadButtonBox:gr,attFileUploadButton:il,attFileUpload:yr,attFileInsertButtonBox:ji,attFileInsertButton:pr,attImageModal:fn,attImageModalTitle:al,attImageExplain1:ll,attImageUploadButtonAndViewBox:mo,attImageViewPreButton:No,attImageUploadButtonAndView:br,attImageViewNextButton:Ro,attImageUpload:Ho,attImageExplain2:sl,attImageURL:Wi,attImageInsertButtonBox:qi,attImageInsertButton:Mr,attVideoModal:In,attVideoModalTitle:cl,attVideoExplain1:dl,attVideoEmbedId:$i,attVideoExplain2:ul,attVideoWidthTextBox:go,attVideoWidthText:Sr,attVideoWidth:Fo,attVideoWidthUnit:Yi,attVideoHeightTextBox:yo,attVideoHeightText:Ir,attVideoHeight:Oo,attVideoHeightUnit:Ki,attVideoFooter:Vo,attVideoValidCheckText:fl,attVideoValidCheckbox:Xi,attVideoInsertButton:wr,attLinkTooltip:po,attLinkTooltipHref:Ji,attLinkTooltipEditButton:Tr,attLinkTooltipUnlinkButton:Lr,attImageAndVideoTooltip:Po,attImageAndVideoTooltipWidthAndFloatBox:sn,attImageAndVideoTooltipWidthText:Do,attImageAndVideoTooltipWidthInput:Rr,attImageAndVideoTooltipWidthUnit:zo,attImageAndVideoTooltipFloatRadioBox:Hr,attImageAndVideoTooltipFloatRadioNone:hl,attImageAndVideoTooltipFloatRadioNoneLabel:Fr,attImageAndVideoTooltipFloatRadioLeft:ml,attImageAndVideoTooltipFloatRadioLeftLabel:Vr,attImageAndVideoTooltipFloatRadioRight:gl,attImageAndVideoTooltipFloatRadioRightLabel:Dr,attImageAndVideoTooltipShapeBox:En,attImageAndVideoTooltipShapeRadioBox:Ur,attImageAndVideoTooltipShapeRadioSquare:yl,attImageAndVideoTooltipShapeRadioSquareLabel:Gr,attImageAndVideoTooltipShapeRadioRadius:pl,attImageAndVideoTooltipShapeRadioRadiusLabel:Wr,attImageAndVideoTooltipShapeRadioCircle:_l,attImageAndVideoTooltipShapeRadioCircleLabel:$r,helpModal:Uo,helpHeader:vl,helpMain:Zi,helpMainTable:Qi,helpFooter:ea,placeholder:Kr}},nn=function(f,h){for(var I,be=h.getAttribute("note-mode-by-device")&&["ADAPTIVE","MOBILE","DESKTOP"].indexOf(h.getAttribute("note-mode-by-device"))?h.getAttribute("note-mode-by-device").toUpperCase():f.attributes.noteModeByDevice,Be=be==="MOBILE"||be!=="DESKTOP"&&X(),tt=h.getAttribute("tool-position")&&["BOTTOM","TOP"].indexOf(h.getAttribute("tool-position"))>=0?h.getAttribute("tool-position"):Be?r.bottom:r.top,Ge=ee(h.getAttribute("tool-default-line"))?Number(h.getAttribute("tool-default-line")):Be?2:1,j=h.getAttribute("tool-toggle")?h.getAttribute("tool-toggle").toLowerCase()==="true":!!Be,E=h.getAttribute("textarea-width")?h.getAttribute("textarea-width"):f.attributes.textareaOriginWidth,s=h.getAttribute("textarea-height")?h.getAttribute("textarea-height"):f.attributes.textareaOriginHeight,l=h.getAttribute("textarea-max-width")?h.getAttribute("textarea-max-width"):f.attributes.textareaMaxWidth,k=h.getAttribute("textarea-max-height")?h.getAttribute("textarea-max-height"):f.attributes.textareaMaxHeight,$=h.getAttribute("textarea-height-isModify")?h.getAttribute("textarea-height-isModify").toLowerCase()==="true":f.attributes.textareaHeightIsModify,J=h.getAttribute("placeholder-is-visible")?h.getAttribute("placeholder-is-visible").toLowerCase()==="true":f.attributes.placeholderIsVisible,ie=re(h.getAttribute("placeholder-add-top"))?Number(h.getAttribute("placeholder-add-top")):f.attributes.placeholderAddTop,ge=re(h.getAttribute("placeholder-add-left"))?Number(h.getAttribute("placeholder-add-left")):f.attributes.placeholderAddLeft,Ce=h.getAttribute("placeholder-width")?h.getAttribute("placeholder-width"):f.attributes.placeholderWidth,He=h.getAttribute("placeholder-color")?h.getAttribute("placeholder-color"):f.attributes.placeholderColor,Le=h.getAttribute("placeholder-background-color")?h.getAttribute("placeholder-background-color"):f.attributes.placeholderBackgroundColor,Ke=h.getAttribute("placeholder-title")?h.getAttribute("placeholder-title"):f.attributes.placeholderTitle,Ze=h.getAttribute("placeholder-text-content")?h.getAttribute("placeholder-text-content"):f.attributes.placeholderTextContent,et=h.getAttribute("att-file-prevent-types")?h.getAttribute("att-file-prevent-types").split(","):f.attributes.attFilePreventTypes,Ve=h.getAttribute("att-file-accept-types")?h.getAttribute("att-file-accept-types").split(","):f.attributes.attFileAcceptTypes,Mt=ee(h.getAttribute("att-file-max-size"))?Number(h.getAttribute("att-file-max-size")):f.attributes.attFileMaxSize,Rt=h.getAttribute("att-image-prevent-types")?h.getAttribute("att-image-prevent-types").split(","):f.attributes.attImagePreventTypes,xt=h.getAttribute("att-image-accept-types")?h.getAttribute("att-image-accept-types").split(","):f.attributes.attImageAcceptTypes,Ht=ee(h.getAttribute("att-image-max-size"))?Number(h.getAttribute("att-image-max-size")):f.attributes.attImageMaxSize,v=f.attributes.defaultFontFamilies,w=h.getAttribute("add-font-family")?h.getAttribute("add-font-family").split(","):[],A=h.getAttribute("remove-font-family")?h.getAttribute("remove-font-family").split(","):[],x=0;x<w.length;x++)w[x],w[x]&&(v.includes(w[x])||(I=w[x],/^[A-Za-z0-9]+$/.test(I)?v.splice(7+x,0,w[x]):v.push(w[x])));for(var g=function(S){if(!A[S])return 1;v=v.filter(function(N){return N!==A[S]})},p=0;p<A.length;p++)g(p);var B=h.getAttribute("default-font-family")?h.getAttribute("default-font-family"):f.attributes.defaultTextareaFontFamily;v.includes(B)||v.splice(0,0,B);var H=h.getAttribute("default-tool-font-family")?h.getAttribute("default-tool-font-family"):f.attributes.defaultToolFontFamily,U=ee(h.getAttribute("default-font-size"))?Number(h.getAttribute("default-font-size")):f.attributes.defaultTextareaFontSize,q=ee(h.getAttribute("default-line-height"))?Number(h.getAttribute("default-line-height")):f.attributes.defaultTextareaLineHeight,oe=ee(h.getAttribute("size-level-desktop"))?Number(h.getAttribute("size-level-desktop")):3,de=ee(h.getAttribute("size-level-mobile"))?Number(h.getAttribute("size-level-mobile")):7,he=Be?de:oe;he<1&&(he=1),he>9&&(he=9);var se=(he+11)/20,me=h.getAttribute("main-color")?Pe(h.getAttribute("main-color")):f.attributes.mainColor,Q=h.getAttribute("color-set")?h.getAttribute("color-set").toLowerCase():f.attributes.colorSet,u=h.getAttribute("invert-color")?h.getAttribute("invert-color").toLowerCase()==="true":f.attributes.invertColor,b=(!h.getAttribute("using-paragraph-style")||h.getAttribute("using-paragraph-style").toLowerCase()!=="false")&&f.attributes.usingParagraphStyle,_=(!h.getAttribute("using-bold")||h.getAttribute("using-bold").toLowerCase()!=="false")&&f.attributes.usingBold,R=(!h.getAttribute("using-underline")||h.getAttribute("using-underline").toLowerCase()!=="false")&&f.attributes.usingUnderline,F=(!h.getAttribute("using-italic")||h.getAttribute("using-italic").toLowerCase()!=="false")&&f.attributes.usingItalic,P=(!h.getAttribute("using-ul")||h.getAttribute("using-ul").toLowerCase()!=="false")&&f.attributes.usingUl,z=(!h.getAttribute("using-ol")||h.getAttribute("using-ol").toLowerCase()!=="false")&&f.attributes.usingOl,pe=(!h.getAttribute("using-text-align")||h.getAttribute("using-text-align").toLowerCase()!=="false")&&f.attributes.usingTextAlign,Se=(!h.getAttribute("using-att-link")||h.getAttribute("using-att-link").toLowerCase()!=="false")&&f.attributes.usingAttLink,ze=(!h.getAttribute("using-att-file")||h.getAttribute("using-att-file").toLowerCase()!=="false")&&f.attributes.usingAttFile,je=(!h.getAttribute("using-att-image")||h.getAttribute("using-att-image").toLowerCase()!=="false")&&f.attributes.usingAttImage,Ue=(!h.getAttribute("using-att-video")||h.getAttribute("using-att-video").toLowerCase()!=="false")&&f.attributes.usingAttVideo,it=(!h.getAttribute("using-font-size")||h.getAttribute("using-font-size").toLowerCase()!=="false")&&f.attributes.usingFontSize,rt=(!h.getAttribute("using-letter-spacing")||h.getAttribute("using-letter-spacing").toLowerCase()!=="false")&&f.attributes.usingLetterSpacing,ct=(!h.getAttribute("using-line-height")||h.getAttribute("using-line-height").toLowerCase()!=="false")&&f.attributes.usingLineHeight,Ne=(!h.getAttribute("using-font-family")||h.getAttribute("using-font-family").toLowerCase()!=="false")&&f.attributes.usingFontFamily,De=(!h.getAttribute("using-color-text")||h.getAttribute("using-color-text").toLowerCase()!=="false")&&f.attributes.usingColorText,lt=(!h.getAttribute("using-color-back")||h.getAttribute("using-color-back").toLowerCase()!=="false")&&f.attributes.usingColorBack,ae=(!h.getAttribute("using-format-clear")||h.getAttribute("using-format-clear").toLowerCase()!=="false")&&f.attributes.usingFormatClear,te=(!h.getAttribute("using-undo")||h.getAttribute("using-undo").toLowerCase()!=="false")&&f.attributes.usingUndo,ht=(!h.getAttribute("using-redo")||h.getAttribute("using-redo").toLowerCase()!=="false")&&f.attributes.usingRedo,d=(!h.getAttribute("using-help")||h.getAttribute("using-help").toLowerCase()!=="false")&&f.attributes.usingHelp;h.getAttribute("using-paragraph-all-style")&&h.getAttribute("using-paragraph-all-style").toLowerCase()==="false"&&(b=!1,P=!1,z=!1,pe=!1),h.getAttribute("using-character-style")&&h.getAttribute("using-character-style").toLowerCase()==="false"&&(_=!1,R=!1,F=!1,Ne=!1,De=!1,lt=!1,ae=!1),h.getAttribute("using-character-size")&&h.getAttribute("using-character-size").toLowerCase()==="false"&&(it=!1,rt=!1,ct=!1),h.getAttribute("using-attach-file")&&h.getAttribute("using-attach-file").toLowerCase()==="false"&&(Se=!1,ze=!1,je=!1,Ue=!1),h.getAttribute("using-do")&&h.getAttribute("using-do").toLowerCase()==="false"&&(te=!1,ht=!1);var y=h.getAttribute("language")&&f.languageSet.hasOwnProperty(h.getAttribute("language"))?h.getAttribute("language"):f.attributes.language,M=ee(h.getAttribute("recode-limit"))?Number(h.getAttribute("recode-limit")):f.attributes.recodeLimit;return{isNoteByMobile:Be,toolPosition:tt,toolDefaultLine:Ge,toolToggleUsing:j,sizeRate:se,noteModeByDevice:be,textareaOriginWidth:E,textareaOriginHeight:s,textareaMaxWidth:l,textareaMaxHeight:k,textareaHeightIsModify:$,placeholderIsVisible:J,placeholderAddTop:ie,placeholderAddLeft:ge,placeholderWidth:Ce,placeholderColor:He,placeholderBackgroundColor:Le,placeholderTitle:Ke,placeholderTextContent:Ze,attFilePreventTypes:et,attFileAcceptTypes:Ve,attFileMaxSize:Mt,attImagePreventTypes:Rt,attImageAcceptTypes:xt,attImageMaxSize:Ht,defaultFontFamilies:v,defaultTextareaFontFamily:B,defaultToolFontFamily:H,defaultTextareaFontSize:U,defaultTextareaLineHeight:q,mainColor:me,colorSet:Q,invertColor:u,usingParagraphStyle:b,usingBold:_,usingUnderline:R,usingItalic:F,usingUl:P,usingOl:z,usingTextAlign:pe,usingAttLink:Se,usingAttFile:ze,usingAttImage:je,usingAttVideo:Ue,usingFontSize:it,usingLetterSpacing:rt,usingLineHeight:ct,usingFontFamily:Ne,usingColorText:De,usingColorBack:lt,usingFormatClear:ae,usingUndo:te,usingRedo:ht,usingHelp:d,language:y,recodeLimit:M}},Et=function(f,h){var I={color1:f.colors.color1,color2:f.colors.color2,color3:f.colors.color3,color4:f.colors.color4,color5:f.colors.color5,color6:f.colors.color6,color7:f.colors.color7,color8:f.colors.color8,color9:f.colors.color9,color10:f.colors.color10,color11:f.colors.color11,color12:f.colors.color12,color13:f.colors.color13,color14:f.colors.color14,color15:f.colors.color15,color16:f.colors.color16,color17:f.colors.color17,color18:f.colors.color18,color19:f.colors.color19,color20:f.colors.color20};if(h.mainColor)I=Qe(h.mainColor);else switch(h.colorSet){case"skyblue":I=Qe("#91c8e4");break;case"blue":I=Qe("#4682a9");break;case"light-red":I=Qe("#fdd2bf");break;case"red":I=Qe("#b61919");break;case"light-green":I=Qe("#a4be7b");break;case"green":I=Qe("#285430");break;case"orange":I=Qe("#f79327");break;case"yellow":I=Qe("#ffe569");break;case"purple":I=Qe("#804674");break;case"brown":I=Qe("#675d50");break;case"black":I=Qe("#272829")}return h.invertColor&&(I.color1=mt(I.color1),I.color2=mt(I.color2),I.color3=mt(I.color3),I.color4=mt(I.color4),I.color5=mt(I.color5),I.color6=mt(I.color6),I.color7=mt(I.color7),I.color10=mt(I.color10),I.color11=mt(I.color11),I.color12=mt(I.color12),I.color13=mt(I.color13)),I},_e=function(f,h,I){if(!h)throw new Error("Please insert variables object in VanillanoteConfig.");if(!I)throw new Error("Please insert colors object in VanillanoteConfig.");return{"template h1":{display:"block","font-size":"2em","line-height":"1.2em","font-weight":"bold",margin:"1em 0",padding:"0 10px"},"template h2":{display:"block","font-size":"1.8em","line-height":"1.2em","font-weight":"bold",margin:"1em 0",padding:"0 10px"},"template h3":{display:"block","font-size":"1.6em","line-height":"1.2em","font-weight":"bold","margin-top":"1em","margin-bottom":"1em",padding:"0 10px"},"template h4":{display:"block","font-size":"1.4em","line-height":"1.2em","font-weight":"bold",margin:"1em 0",padding:"0 10px"},"template h5":{display:"block","font-size":"1.2em","line-height":"1.2em","font-weight":"bold",margin:"1em 0",padding:"0 10px"},"template h6":{display:"block","font-size":"1em","line-height":"1.2em","font-weight":"bold",margin:"1em 0",padding:"0 10px"},"textarea ul":{display:"block","list-style-type":"disc","padding-left":"40px",margin:"1em 0"},"textarea ol":{display:"block","list-style-type":"decimal","padding-left":"40px",margin:"1em 0"},"textarea li":{display:"list-item","margin-top":"0.5em","margin-bottom":"0.5em",padding:"0 10px"},"textarea p":{display:"block","margin-top":"1em","margin-bottom":"1em",padding:"0 10px"},"textarea div":{display:"block","margin-top":"1em","margin-bottom":"1em",padding:"0 10px"},"textarea span":{display:"inline"},"textarea a":{display:"inline",color:I.color11,"text-decoration":"underline"},template:{width:"100%",height:"100%",position:"relative"},textarea:{width:h.textareaOriginWidth,height:h.textareaOriginHeight,display:"block",margin:"0 auto",outline:"none",cursor:"text","text-align":"left",overflow:"auto","word-wrap":"break-word",resize:h.textareaHeightIsModify===!0?"vertical":"none","max-width":h.textareaMaxWidth,"max-height":h.textareaMaxHeight,"box-shadow":"0 0.5px 1px 0.5px "+I.color7,"background-color":I.color2,"font-size":h.defaultTextareaFontSize+"px","line-height":h.defaultTextareaLineHeight+"px","font-family":h.defaultTextareaFontFamily,color:I.color12,transition:"height 0.5s"},tool:{width:h.textareaOriginWidth,height:h.toolDefaultLine*(50*h.sizeRate)+"px",padding:"2px 0","max-width":h.textareaMaxWidth,display:"block","line-height":50*h.sizeRate+"px",margin:"0 auto","text-align":"left","vertical-align":"middle","box-shadow":"0.25px 0.25px 1px 0.5px "+I.color7,"font-size":16*h.sizeRate+"px","background-color":I.color3,"font-family":h.defaultToolFontFamily},icon:{"font-size":"1.3em","-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",color:I.color1},button:{width:50*h.sizeRate+"px",height:45*h.sizeRate+"px",float:"left",display:"inline-block",cursor:"pointer","text-align":"center",margin:"2px 2px","border-radius":"5px","box-shadow":"0.25px 0.25px 2px 0.25px "+I.color7,"background-color":I.color4,"font-family":h.defaultToolFontFamily,position:"relative"},select:{width:150*h.sizeRate+"px",height:45*h.sizeRate+"px","background-color":I.color4,float:"left",display:"inline-block",cursor:"pointer","text-align":"center",margin:"2px 2px","border-radius":"5px","box-shadow":"0.25px 0.25px 2px 0.25px "+I.color7,color:I.color1,position:"relative"},select_box_a:{"min-width":150*h.sizeRate+"px","background-color":I.color4,display:"none",float:"left",position:"absolute",cursor:"pointer","border-radius":"5px","box-shadow":"0.25px 0.25px 0.1em "+I.color7,opacity:"0.85","z-index":"200"},select_box_b:{width:50*h.sizeRate+"px",display:" none",float:"left",position:"absolute",cursor:"pointer","border-radius":"5px","z-index":"200"},select_box_c:{width:220*h.sizeRate+30+"px",display:"none",padding:"0 "+10*h.sizeRate+"px",float:"left",position:"absolute","border-radius":"5px","box-shadow":"0.25px 0.25px 0.1em "+I.color7,"background-color":I.color4,opacity:"0.95",cursor:"text","text-align":"left","z-index":"200"},select_list:{display:"block",height:45*h.sizeRate+"px",margin:"0 !important","line-height":45*h.sizeRate+"px !important",padding:"3px 5px",cursor:"pointer","text-align":"left",overflow:"hidden"},select_list_button:{width:50*h.sizeRate+"px",height:45*h.sizeRate+"px","background-color":I.color4,display:"inline-block",cursor:"pointer","border-radius":"5px","box-shadow":"0px 0.25px 0.1em "+I.color7},small_input_box:{width:120*h.sizeRate+"px",height:45*h.sizeRate+"px","background-color":I.color4,float:"left",overflow:"hidden",cursor:"pointer",display:"inline-block","text-align":"center",margin:"2px 2px","border-radius":"5px","box-shadow":"0.25px 0.25px 2px 0.25px "+I.color7},small_input:{width:"30%","background-color":"rgba(0,0,0,0)",color:I.color1,border:"none","border-radius":"0","text-align":"right",display:"inline-block",position:"relative",top:"-4px","margin-left":"5px","font-family":h.defaultToolFontFamily,cursor:"text","font-size":"0.8em!important"},"small_input:focus":{outline:"none"},"small_input::-webkit-inner-spin-button":{"-webkit-appearance":"none",margin:"0"},"small_input::-webkit-outer-spin-button":{"-webkit-appearance":"none",margin:"0"},"small_input[type=number]":{"-moz-appearance":"textfield"},normal_button:{"min-width":50*h.sizeRate+"px",height:45*h.sizeRate+"px","font-size":"0.8em",padding:"0 15px",display:"inline-block",cursor:"pointer","text-align":"center","border-radius":"5px",border:"none","box-shadow":"0.25px 0.25px 2px 0.25px "+I.color7,color:I.color1,"font-family":h.defaultToolFontFamily,"background-color":I.color4},opacity_button:{"min-width":40*h.sizeRate+"px",height:40*h.sizeRate+"px","font-size":"0.7em",display:"inline-block",cursor:"pointer","text-align":"center","border-radius":"5px",border:"none",color:I.color1,"font-family":h.defaultToolFontFamily,"background-color":Te(I.color4,.5)},small_text_box:{display:"inline-block",padding:"0 10px","font-size":"0.8em",color:I.color1},modal_back:{"background-color":"rgba(0,0,0,0.5)",display:"none",position:"absolute","z-index":"300","font-family":h.defaultToolFontFamily,color:I.color1,"font-size":16*h.sizeRate+"px"},modal_body:{width:"80%",margin:"0 auto",display:"none","text-align":"left",border:"solid 1px "+I.color6,"border-radius":"20px","background-color":I.color2},modal_header:{"text-align":"left","padding-top":20*h.sizeRate+"px","padding-right":10*h.sizeRate+"px","padding-bottom":20*h.sizeRate+"px","padding-left":20*h.sizeRate+"px","margin-bottom":10*h.sizeRate+"px","background-color":I.color4,"border-radius":"20px 20px 0 0","font-weight":"bold","font-size":"1.05em"},modal_footer:{"text-align":"right","margin-top":10*h.sizeRate+"px","padding-top":10*h.sizeRate+"px","padding-right":10*h.sizeRate+"px","padding-bottom":10*h.sizeRate+"px","padding-left":10*h.sizeRate+"px","border-top":"1px solid "+I.color6},modal_explain:{"font-size":"0.95em","text-align":"left","padding-top":20*h.sizeRate+"px","padding-bottom":10*h.sizeRate+"px","padding-left":20*h.sizeRate+"px",display:"inline-block",color:I.color10,"font-family":h.defaultToolFontFamily},modal_input:{display:"block",width:"80%","background-color":"rgba(0,0,0,0)","font-family":h.defaultToolFontFamily,color:I.color10,border:"none","border-radius":"0","border-bottom":"1px solid "+I.color6,"margin-bottom":10*h.sizeRate+"px","margin-left":20*h.sizeRate+"px","font-size":"1.05em",animation:f+"-modal-input 0.7s forwards"},"modal_input:focus":{outline:"none"},"modal_input[readonly]":{"background-color":"rgba(0,0,0,0.1)"},modal_small_input:{display:"inline-block",width:"20%","background-color":"rgba(0,0,0,0)","font-family":h.defaultToolFontFamily,color:I.color10,border:"none","border-radius":"0","border-bottom":"1px solid "+I.color6,"margin-bottom":10*h.sizeRate+"px","margin-left":20*h.sizeRate+"px","font-size":"1.05em",animation:f+"-modal-small-input 1s forwards"},"modal_small_input:focus":{outline:"none"},"modal_small_input::-webkit-inner-spin-button":{appearance:"none","-moz-appearance":"none","-webkit-appearance":"none"},"modal_small_input::-webkit-outer-spin-button":{"-webkit-appearance":"none",margin:"0"},"modal_small_input[type=number]":{"-moz-appearance":"textfield"},"modal_small_input[readonly]":{"background-color":I.color4},modal_input_file:{display:"none!important"},att_valid_checktext:{"padding-right":"10px","font-size":"0.7em"},att_link_is_blank_label:{"font-size":"0.95em","text-align":"left",display:"inline-block",height:"25px",cursor:"pointer","margin-top":10*h.sizeRate+"px","margin-bottom":10*h.sizeRate+"px","margin-left":15*h.sizeRate+"px",color:I.color10},input_checkbox:{cursor:"pointer",display:"inline-block",width:"12px",height:"12px","border-radius":"3px",border:"solid "+I.color6,"border-width":"1px 2px 2px 1px",transform:"rotate(0deg)",transition:"transform 0.3s"},"input_checkbox:focus":{outline:"none!important"},"input_checkbox[disabled]":{"background-color":I.color4},smallpx_input:{width:"40px","background-color":"rgba(0,0,0,0)",color:I.color1,border:"none","border-radius":"5px","text-align":"right","font-size":"0.9em!important",display:"inline-block","margin-left":"5px","font-family":h.defaultToolFontFamily},"smallpx_input:focus":{outline:"none"},"smallpx_input::-webkit-inner-spin-button":{appearance:"none","-moz-appearance":"none","-webkit-appearance":"none"},input_radio:{cursor:"pointer",display:"inline-block",width:"12px",height:"12px","border-radius":"50%",border:"solid 1px "+I.color6,transition:"transform 0.4s, background-color 0.6s;"},"input_radio:focus":{outline:"none!important"},"input_radio:checked":{"background-color":I.color5,transform:"rotateY( 180deg )",transition:"transform 0.3s, background-color 0.5s;"},"input_radio[disabled]":{"background-color":I.color4},drag_drop_div:{width:"100%",height:120*h.sizeRate+"px",display:"inline-block","margin-top":"10px","border-radius":"5px","background-color":I.color4,border:"solid 1px"+I.color6,"line-height":130*h.sizeRate+"px","font-size":"0.8em",color:Te(I.color1,.8),"overflow-y":"scroll",cursor:"pointer"},image_view_div:{width:"80%",height:120*h.sizeRate+"px",display:"inline-block","margin-top":"10px","border-radius":"5px","background-color":I.color4,border:"solid 1px"+I.color6,"line-height":130*h.sizeRate+"px","font-size":"0.8em",color:Te(I.color1,.8),cursor:"pointer",overflow:"hidden","white-space":"nowrap","scroll-behavior":"smooth"},color_button:{width:50*h.sizeRate*.5+"px",height:45*h.sizeRate*.5+"px",float:"left",display:"inline-block",cursor:"pointer","text-align":"center","border-radius":"5px","margin-right":"3px","margin-bottom":"5%",border:"1px solid "+I.color1,"box-shadow":"0.25px 0.25px 2px 0.25px "+I.color7,position:"relative"},color_input:{display:"inline-block","background-color":"rgba(0,0,0,0)",width:25*h.sizeRate+"px",height:40*h.sizeRate+"px","font-size":"0.7em!important",color:I.color1,border:"none","border-radius":"5px","text-align":"right","margin-right":8*h.sizeRate+"px","margin-left":2*h.sizeRate+"px","font-family":h.defaultToolFontFamily},"color_input:focus":{outline:"none"},"color_input::-webkit-inner-spin-button":{appearance:"none","-moz-appearance":"none","-webkit-appearance":"none"},color_explain:{display:"inline-block",height:25*h.sizeRate+"px",color:I.color1,"font-family":h.defaultToolFontFamily,"font-size":"0.7em"},tooltip:{width:h.textareaOriginWidth,"max-width":h.textareaMaxWidth,margin:"0 auto",padding:"2px 0","background-color":I.color3,border:"solid 1px "+I.color5,height:"0",overflow:"hidden",opacity:"0",transition:"opacity 0.6s, height 0.6s",position:"absolute",left:"50%",transform:"translateX(-50%)","z-index":"100","text-align":"left","font-family":h.defaultToolFontFamily,"font-size":"0.9em"},tooltip_button:{width:50*h.sizeRate*.7+"px",height:45*h.sizeRate*.7+"px",float:"left",display:"inline-block",cursor:"pointer","text-align":"center",margin:"2px 2px","border-radius":"5px","box-shadow":"0.25px 0.25px 2px 0.25px "+I.color7,"background-color":I.color4,position:"relative"},att_link_tooltip_href:{cursor:"pointer",float:"left",padding:"0 10px",color:I.color11,"text-decoration":"underline","font-size":"0.9em","line-height":45*h.sizeRate*.8+"px"},help_main:{"max-height":h.textareaOriginHeight,color:I.color10,"overflow-y":"auto"},placeholder:{width:h.textareaOriginWidth,padding:"10px","background-color":Te(I.color3,.8),color:I.color1,display:"none",position:"absolute","z-index":"100","font-family":h.defaultToolFontFamily},on_button_on:{"background-color":I.color5+"!important","box-shadow":"0.25px 0.25px 0.25px 0.25px "+I.color7},on_active:{"background-color":I.color5+"!important","box-shadow":"0.25px 0.25px 0.25px 0.25px "+I.color7},on_mouseover:{"background-color":I.color5+"!important"},on_mouseout:{"background-color":I.color4+"!important"},on_display_inline:{display:"inline"},on_display_inline_block:{display:"inline-block"},on_display_block:{display:"block"},on_display_none:{display:"none"}}},bt=function(f){f._cssEvents={target_onBeforeClick:function(h){return!0},target_onAfterClick:function(h){},target_onBeforeMouseover:function(h){return!0},target_onAfterMouseover:function(h){},target_onBeforeMouseout:function(h){return!0},target_onAfterMouseout:function(h){},target_onBeforeTouchstart:function(h){return!0},target_onAfterTouchstart:function(h){},target_onBeforeTouchend:function(h){return!0},target_onAfterTouchend:function(h){}},f._elementEvents={textarea_onBeforeClick:function(h){return!0},textarea_onAfterClick:function(h){},textarea_onBeforeFocus:function(h){return!0},textarea_onAfterFocus:function(h){},textarea_onBeforeBlur:function(h){return!0},textarea_onAfterBlur:function(h){},paragraphStyleSelect_onBeforeClick:function(h){return!0},paragraphStyleSelect_onAfterClick:function(h){},toolToggleButton_onBeforeClick:function(h){return!0},toolToggleButton_onAfterClick:function(h){},styleNomal_onBeforeClick:function(h){return!0},styleNomal_onAfterClick:function(h){},styleHeader1_onBeforeClick:function(h){return!0},styleHeader1_onAfterClick:function(h){},styleHeader2_onBeforeClick:function(h){return!0},styleHeader2_onAfterClick:function(h){},styleHeader3_onBeforeClick:function(h){return!0},styleHeader3_onAfterClick:function(h){},styleHeader4_onBeforeClick:function(h){return!0},styleHeader4_onAfterClick:function(h){},styleHeader5_onBeforeClick:function(h){return!0},styleHeader5_onAfterClick:function(h){},styleHeader6_onBeforeClick:function(h){return!0},styleHeader6_onAfterClick:function(h){},boldButton_onBeforeClick:function(h){return!0},boldButton_onAfterClick:function(h){},underlineButton_onBeforeClick:function(h){return!0},underlineButton_onAfterClick:function(h){},italicButton_onBeforeClick:function(h){return!0},italicButton_onAfterClick:function(h){},ulButton_onBeforeClick:function(h){return!0},ulButton_onAfterClick:function(h){},olButton_onBeforeClick:function(h){return!0},olButton_onAfterClick:function(h){},textAlignSelect_onBeforeClick:function(h){return!0},textAlignSelect_onAfterClick:function(h){},textAlignLeft_onBeforeClick:function(h){return!0},textAlignLeft_onAfterClick:function(h){},textAlignCenter_onBeforeClick:function(h){return!0},textAlignCenter_onAfterClick:function(h){},textAlignRight_onBeforeClick:function(h){return!0},textAlignRight_onAfterClick:function(h){},attLinkButton_onBeforeClick:function(h){return!0},attLinkButton_onAfterClick:function(h){},attFileButton_onBeforeClick:function(h){return!0},attFileButton_onAfterClick:function(h){},attImageButton_onBeforeClick:function(h){return!0},attImageButton_onAfterClick:function(h){},attVideoButton_onBeforeClick:function(h){return!0},attVideoButton_onAfterClick:function(h){},fontSizeInputBox_onBeforeClick:function(h){return!0},fontSizeInputBox_onAfterClick:function(h){},fontSizeInput_onBeforeClick:function(h){return!0},fontSizeInput_onAfterClick:function(h){},fontSizeInput_onBeforeInput:function(h){return!0},fontSizeInput_onAfterInput:function(h){},fontSizeInput_onBeforeBlur:function(h){return!0},fontSizeInput_onAfterBlur:function(h){},letterSpacingInputBox_onBeforeClick:function(h){return!0},letterSpacingInputBox_onAfterClick:function(h){},letterSpacingInput_onBeforeClick:function(h){return!0},letterSpacingInput_onAfterClick:function(h){},letterSpacingInput_onBeforeInput:function(h){return!0},letterSpacingInput_onAfterInput:function(h){},letterSpacingInput_onBeforeBlur:function(h){return!0},letterSpacingInput_onAfterBlur:function(h){},lineHeightInputBox_onBeforeClick:function(h){return!0},lineHeightInputBox_onAfterClick:function(h){},lineHeightInput_onBeforeClick:function(h){return!0},lineHeightInput_onAfterClick:function(h){},lineHeightInput_onBeforeInput:function(h){return!0},lineHeightInput_onAfterInput:function(h){},lineHeightInput_onBeforeBlur:function(h){return!0},lineHeightInput_onAfterBlur:function(h){},fontFamilySelect_onBeforeClick:function(h){return!0},fontFamilySelect_onAfterClick:function(h){},colorTextSelect_onBeforeClick:function(h){return!0},colorTextSelect_onAfterClick:function(h){},colorTextSelectBox_onBeforeClick:function(h){return!0},colorTextSelectBox_onAfterClick:function(h){},colorText0_onBeforeClick:function(h){return!0},colorText0_onAfterClick:function(h){},colorText1_onBeforeClick:function(h){return!0},colorText1_onAfterClick:function(h){},colorText2_onBeforeClick:function(h){return!0},colorText2_onAfterClick:function(h){},colorText3_onBeforeClick:function(h){return!0},colorText3_onAfterClick:function(h){},colorText4_onBeforeClick:function(h){return!0},colorText4_onAfterClick:function(h){},colorText5_onBeforeClick:function(h){return!0},colorText5_onAfterClick:function(h){},colorText6_onBeforeClick:function(h){return!0},colorText6_onAfterClick:function(h){},colorText7_onBeforeClick:function(h){return!0},colorText7_onAfterClick:function(h){},colorTextRInput_onBeforeClick:function(h){return!0},colorTextRInput_onAfterClick:function(h){},colorTextRInput_onBeforeInput:function(h){return!0},colorTextRInput_onAfterInput:function(h){},colorTextRInput_onBeforeBlur:function(h){return!0},colorTextRInput_onAfterBlur:function(h){},colorTextGInput_onBeforeClick:function(h){return!0},colorTextGInput_onAfterClick:function(h){},colorTextGInput_onBeforeInput:function(h){return!0},colorTextGInput_onAfterInput:function(h){},colorTextGInput_onBeforeBlur:function(h){return!0},colorTextGInput_onAfterBlur:function(h){},colorTextBInput_onBeforeClick:function(h){return!0},colorTextBInput_onAfterClick:function(h){},colorTextBInput_onBeforeInput:function(h){return!0},colorTextBInput_onAfterInput:function(h){},colorTextBInput_onBeforeBlur:function(h){return!0},colorTextBInput_onAfterBlur:function(h){},colorTextOpacityInput_onBeforeClick:function(h){return!0},colorTextOpacityInput_onAfterClick:function(h){},colorTextOpacityInput_onBeforeInput:function(h){return!0},colorTextOpacityInput_onAfterInput:function(h){},colorTextOpacityInput_onBeforeBlur:function(h){return!0},colorTextOpacityInput_onAfterBlur:function(h){},colorBackSelect_onBeforeClick:function(h){return!0},colorBackSelect_onAfterClick:function(h){},colorBackSelectBox_onBeforeClick:function(h){return!0},colorBackSelectBox_onAfterClick:function(h){},colorBack0_onBeforeClick:function(h){return!0},colorBack0_onAfterClick:function(h){},colorBack1_onBeforeClick:function(h){return!0},colorBack1_onAfterClick:function(h){},colorBack2_onBeforeClick:function(h){return!0},colorBack2_onAfterClick:function(h){},colorBack3_onBeforeClick:function(h){return!0},colorBack3_onAfterClick:function(h){},colorBack4_onBeforeClick:function(h){return!0},colorBack4_onAfterClick:function(h){},colorBack5_onBeforeClick:function(h){return!0},colorBack5_onAfterClick:function(h){},colorBack6_onBeforeClick:function(h){return!0},colorBack6_onAfterClick:function(h){},colorBack7_onBeforeClick:function(h){return!0},colorBack7_onAfterClick:function(h){},colorBackRInput_onBeforeClick:function(h){return!0},colorBackRInput_onAfterClick:function(h){},colorBackRInput_onBeforeInput:function(h){return!0},colorBackRInput_onAfterInput:function(h){},colorBackRInput_onBeforeBlur:function(h){return!0},colorBackRInput_onAfterBlur:function(h){},colorBackGInput_onBeforeClick:function(h){return!0},colorBackGInput_onAfterClick:function(h){},colorBackGInput_onBeforeInput:function(h){return!0},colorBackGInput_onAfterInput:function(h){},colorBackGInput_onBeforeBlur:function(h){return!0},colorBackGInput_onAfterBlur:function(h){},colorBackBInput_onBeforeClick:function(h){return!0},colorBackBInput_onAfterClick:function(h){},colorBackBInput_onBeforeInput:function(h){return!0},colorBackBInput_onAfterInput:function(h){},colorBackBInput_onBeforeBlur:function(h){return!0},colorBackBInput_onAfterBlur:function(h){},colorBackOpacityInput_onBeforeClick:function(h){return!0},colorBackOpacityInput_onAfterClick:function(h){},colorBackOpacityInput_onBeforeInput:function(h){return!0},colorBackOpacityInput_onAfterInput:function(h){},colorBackOpacityInput_onBeforeBlur:function(h){return!0},colorBackOpacityInput_onAfterBlur:function(h){},formatClearButton_onBeforeClick:function(h){return!0},formatClearButton_onAfterClick:function(h){},undoButton_onBeforeClick:function(h){return!0},undoButton_onAfterClick:function(h){},redoButton_onBeforeClick:function(h){return!0},redoButton_onAfterClick:function(h){},helpButton_onBeforeClick:function(h){return!0},helpButton_onAfterClick:function(h){},modalBack_onBeforeClick:function(h){return!0},modalBack_onAfterClick:function(h){},attLinkModal_onBeforeClick:function(h){return!0},attLinkModal_onAfterClick:function(h){},attLinkText_onBeforeInput:function(h){return!0},attLinkText_onAfterInput:function(h){},attLinkText_onBeforeBlur:function(h){return!0},attLinkText_onAfterBlur:function(h){},attLinkHref_onBeforeInput:function(h){return!0},attLinkHref_onAfterInput:function(h){},attLinkHref_onBeforeBlur:function(h){return!0},attLinkHref_onAfterBlur:function(h){},attLinkInsertButton_onBeforeClick:function(h){return!0},attLinkInsertButton_onAfterClick:function(h){},attFileModal_onBeforeClick:function(h){return!0},attFileModal_onAfterClick:function(h){},attFileUploadButton_onBeforeClick:function(h){return!0},attFileUploadButton_onAfterClick:function(h){},attFileUploadDiv_onBeforeDragover:function(h){return!0},attFileUploadDiv_onAfterDragover:function(h){},attFileUploadDiv_onBeforeDrop:function(h){return!0},attFileUploadDiv_onAfterDrop:function(h){},attFileUploadDiv_onBeforeClick:function(h){return!0},attFileUploadDiv_onAfterClick:function(h){},attFileUpload_onBeforeInput:function(h){return!0},attFileUpload_onAfterInput:function(h){},attFileUpload_onBeforeBlur:function(h){return!0},attFileUpload_onAfterBlur:function(h){},attFileInsertButton_onBeforeClick:function(h){return!0},attFileInsertButton_onAfterClick:function(h){},attLinkTooltipEditButton_onBeforeClick:function(h){return!0},attLinkTooltipEditButton_onAfterClick:function(h){},attLinkTooltipUnlinkButton_onBeforeClick:function(h){return!0},attLinkTooltipUnlinkButton_onAfterClick:function(h){},attImageModal_onBeforeClick:function(h){return!0},attImageModal_onAfterClick:function(h){},attImageUploadButtonAndView_onBeforeDragover:function(h){return!0},attImageUploadButtonAndView_onAfterDragover:function(h){},attImageUploadButtonAndView_onBeforeDrop:function(h){return!0},attImageUploadButtonAndView_onAfterDrop:function(h){},attImageUploadButtonAndView_onBeforeClick:function(h){return!0},attImageUploadButtonAndView_onAfterClick:function(h){},attImageViewPreButton_onBeforeClick:function(h){return!0},attImageViewPreButton_onAfterClick:function(h){},attImageViewNextButton_onBeforeClick:function(h){return!0},attImageViewNextButton_onAfterClick:function(h){},attImageUpload_onBeforeInput:function(h){return!0},attImageUpload_onAfterInput:function(h){},attImageUpload_onBeforeBlur:function(h){return!0},attImageUpload_onAfterBlur:function(h){},attImageURL_onBeforeInput:function(h){return!0},attImageURL_onAfterInput:function(h){},attImageURL_onBeforeBlur:function(h){return!0},attImageURL_onAfterBlur:function(h){},attImageInsertButton_onBeforeClick:function(h){return!0},attImageInsertButton_onAfterClick:function(h){},attVideoModal_onBeforeClick:function(h){return!0},attVideoModal_onAfterClick:function(h){},attVideoEmbedId_onBeforeInput:function(h){return!0},attVideoEmbedId_onAfterInput:function(h){},attVideoEmbedId_onBeforeBlur:function(h){return!0},attVideoEmbedId_onAfterBlur:function(h){},attVideoWidth_onBeforeInput:function(h){return!0},attVideoWidth_onAfterInput:function(h){},attVideoWidth_onBeforeBlur:function(h){return!0},attVideoWidth_onAfterBlur:function(h){},attVideoHeight_onBeforeInput:function(h){return!0},attVideoHeight_onAfterInput:function(h){},attVideoHeight_onBeforeBlur:function(h){return!0},attVideoHeight_onAfterBlur:function(h){},attVideoInsertButton_onBeforeClick:function(h){return!0},attVideoInsertButton_onAfterClick:function(h){},attImageAndVideoTooltipWidthInput_onBeforeInput:function(h){return!0},attImageAndVideoTooltipWidthInput_onAfterInput:function(h){},attImageAndVideoTooltipWidthInput_onBeforeBlur:function(h){return!0},attImageAndVideoTooltipWidthInput_onAfterBlur:function(h){},attImageAndVideoTooltipWidthInput_onBeforeKeyup:function(h){return!0},attImageAndVideoTooltipWidthInput_onAfterKeyup:function(h){},attImageAndVideoTooltipFloatRadioNone_onBeforeClick:function(h){return!0},attImageAndVideoTooltipFloatRadioNone_onAfterClick:function(h){},attImageAndVideoTooltipFloatRadioLeft_onBeforeClick:function(h){return!0},attImageAndVideoTooltipFloatRadioLeft_onAfterClick:function(h){},attImageAndVideoTooltipFloatRadioRight_onBeforeClick:function(h){return!0},attImageAndVideoTooltipFloatRadioRight_onAfterClick:function(h){},attImageAndVideoTooltipShapeRadioSquare_onBeforeClick:function(h){return!0},attImageAndVideoTooltipShapeRadioSquare_onAfterClick:function(h){},attImageAndVideoTooltipShapeRadioRadius_onBeforeClick:function(h){return!0},attImageAndVideoTooltipShapeRadioRadius_onAfterClick:function(h){},attImageAndVideoTooltipShapeRadioCircle_onBeforeClick:function(h){return!0},attImageAndVideoTooltipShapeRadioCircle_onAfterClick:function(h){},helpModal_onBeforeClick:function(h){return!0},helpModal_onAfterClick:function(h){},placeholder_onBeforeClick:function(h){return!0},placeholder_onAfterClick:function(h){}}},Yn=function(f,h){(h||document).querySelectorAll("[data-vanillanote]").forEach(function(I){var be,Be=document.getElementById("".concat(I._noteName,"_").concat(I._id,"_styles-sheet"));Be==null||(be=Be.parentElement)===null||be===void 0||be.removeChild(Be),delete f.vanillanoteElements[I._id],function(tt){for(;tt.firstChild;)tt.removeChild(tt.firstChild)}(I)})};function Zt(f){return Zt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},Zt(f)}function Lt(f){return Lt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},Lt(f)}var Xe=null,Ut={setAttTempFileValid:function(f){},setAttFileUploadDiv:function(f){},setAttTempImageValid:function(f){},setAttImageUploadAndView:function(f){},createElement:function(f,h,I,be,Be){},createElementBasic:function(f,h,I,be,Be){},createElementButton:function(f,h,I,be,Be){},createElementSelect:function(f,h,I,be,Be){},createElementInput:function(f,h,I){},createElementInputCheckbox:function(f,h,I){},createElementInputRadio:function(f,h,I,be){},createElementRadioLabel:function(f,h,I){},createElementFontFamiliySelect:function(f,h,I,be,Be){},addClickEvent:function(f,h,I){},addMouseoverEvent:function(f,h){},addMouseoutEvent:function(f,h){},addTouchstartEvent:function(f,h){},addTouchendEvent:function(f,h){},onEventDisable:function(f,h){},replaceDifferentBetweenElements:function(f,h,I){},compareAttributesBetweenEl:function(f,h){},compareStylesBetweenEl:function(f,h){},getAttributesObjectFromElement:function(f){},getSpecialTag:function(f,h){},getParentUnitTagElemnt:function(f,h){},getParentTagName:function(f,h){},getObjectEditElementAttributes:function(f,h){},getObjectEditElementCss:function(f,h){},getEditElementTag:function(f){},getPreviousElementsUntilNotTag:function(f,h,I){},getNextElementsUntilNotTag:function(f,h,I){},setTagToggle:function(f,h){},initToggleButtonVariables:function(f){},isInNote:function(f){},getElementReplaceTag:function(f,h){},removeDoubleTag:function(f,h){},getElement:function(f,h,I,be,Be){},setEditNodeAndElement:function(f,h,I){},removeEmptyElment:function(f,h){},editUnitCheck:function(f){},doEditUnitCheck:function(f){},connectObserver:function(f){},isElementInParentBounds:function(f,h){},validCheckAttLink:function(f){},validCheckAttVideo:function(f){},initAttLink:function(f){},initAttFile:function(f){},initAttImage:function(f){},getObjectNoteCss:function(f){},showAlert:function(f,h){},recodeNote:function(f){},closeAllTooltip:function(f){},setVariableButtonTogle:function(f,h){},button_onToggle:function(f,h){},allButtonToggle:function(f){},selectToggle:function(f,h){},closeAllSelectBoxes:function(f){},fontFamilySelectList_onClick:function(f,h){},setEditStyleTag:function(f){},setElementScroll:function(f,h,I){},getCheckSelectBoxesOpened:function(f){},closeAllModal:function(f){},openAttLinkModal:function(f){},openPlaceholder:function(f){},closePlaceholder:function(f){},setAllModalSize:function(f){},setPlaceholderSize:function(f){},setAllToolTipPosition:function(f){},appearAttLinkToolTip:function(f){},appearAttImageAndVideoTooltip:function(f){},setImageAndVideoWidth:function(f){},setAllToolSize:function(f){},doDecreaseTextareaHeight:function(f){},doIncreaseTextareaHeight:function(f){},modifyTextareaScroll:function(f,h){},initTextarea:function(f){},setNewSelection:function(f,h,I,be){},handleSpecialTagSelection:function(f){},setOriginEditSelection:function(f){},setEditSelection:function(f,h){},isValidSelection:function(f){},modifySeletedElements:function(f){},modifySelectedUnitElementTag:function(f,h){},modifySelectedUnitElementStyle:function(f,h){},modifySelectedSingleElement:function(f,h,I,be){},textarea_onBeforeinputSpelling:function(f){},textarea_onKeydownEnter:function(f){}},gn=function(f){var h,I,be,Be,tt,Ge,j,E,s,l,k,$,J,ie,ge,Ce,He,Le,Ke,Ze,et,Ve,Mt,Rt,xt,Ht,v,w,A,x,g,p,B,H,U,q,oe,de,he,se;if(Xe)return Xe;var me=function(P){return Object.freeze(P),Object.getOwnPropertyNames(P).forEach(function(z){var pe=P[z];pe&&Lt(pe)==="object"&&!Object.isFrozen(pe)&&me(pe)}),P},Q=me({START_POSSIBLE_TAG:["P","H1","H2","H3","H4","H5","H6","OL","UL","BR","DIV","PRE","BLOCKQUOTE","TABLE"],UNIT_TAG:["P","H1","H2","H3","H4","H5","H6","LI","DIV","PRE","BLOCKQUOTE","TH","TD"],DOUBLE_TAG:["UL","OL"],NOT_SINGLE_TAG:["P","H1","H2","H3","H4","H5","H6","OL","UL","LI","DIV","PRE","BLOCKQUOTE"],SPECIAL_TAG:["A","IMG","IFRAME"],AUTO_MODIFY_TAG:["B","U"],EMPTY_ABLE_TAG:["BR","IMG","IFRAME","INPUT","I"],CLASS_NAMES:{template:{id:"template",className:"template"},textarea:{id:"textarea",className:"textarea"},tool:{id:"tool",className:"tool"},toolToggleButton:{id:"toolToggleButton",className:"button"},paragraphStyleSelect:{id:"paragraphStyleSelect",className:"select"},paragraphStyleSelectBox:{id:"paragraphStyleSelectBox",className:"select_box_a"},styleNomal:{id:"styleNomal",className:"select_list"},styleHeader1:{id:"styleHeader1",className:"select_list"},styleHeader2:{id:"styleHeader2",className:"select_list"},styleHeader3:{id:"styleHeader3",className:"select_list"},styleHeader4:{id:"styleHeader4",className:"select_list"},styleHeader5:{id:"styleHeader5",className:"select_list"},styleHeader6:{id:"styleHeader6",className:"select_list"},boldButton:{id:"boldButton",className:"button"},underlineButton:{id:"underlineButton",className:"button"},italicButton:{id:"italicButton",className:"button"},ulButton:{id:"ulButton",className:"button"},olButton:{id:"olButton",className:"button"},textAlignSelect:{id:"textAlignSelect",className:"button"},textAlignSelectBox:{id:"textAlignSelectBox",className:"select_box_b"},textAlignLeft:{id:"textAlignLeft",className:"select_list_button"},textAlignCenter:{id:"textAlignCenter",className:"select_list_button"},textAlignRight:{id:"textAlignRight",className:"select_list_button"},attLinkButton:{id:"attLinkButton",className:"button"},attFileButton:{id:"attFileButton",className:"button"},attImageButton:{id:"attImageButton",className:"button"},attVideoButton:{id:"attVideoButton",className:"button"},fontSizeInputBox:{id:"fontSizeInputBox",className:"small_input_box"},fontSizeInput:{id:"fontSizeInput",className:"small_input"},letterSpacingInputBox:{id:"letterSpacingInputBox",className:"small_input_box"},letterSpacingInput:{id:"letterSpacingInput",className:"small_input"},lineHeightInputBox:{id:"lineHeightInputBox",className:"small_input_box"},lineHeightInput:{id:"lineHeightInput",className:"small_input"},fontFamilySelect:{id:"fontFamilySelect",className:"select"},fontFamilySelectBox:{id:"fontFamilySelectBox",className:"select_box_a"},fontFamily:{id:"fontFamily_",className:"select_list"},colorTextSelect:{id:"colorTextSelect",className:"button"},colorTextSelectBox:{id:"colorTextSelectBox",className:"select_box_c"},colorText0:{id:"colorText0",className:"color_button"},colorText1:{id:"colorText1",className:"color_button"},colorText2:{id:"colorText2",className:"color_button"},colorText3:{id:"colorText3",className:"color_button"},colorText4:{id:"colorText4",className:"color_button"},colorText5:{id:"colorText5",className:"color_button"},colorText6:{id:"colorText6",className:"color_button"},colorText7:{id:"colorText7",className:"color_button"},colorTextRInput:{id:"colorTextRInput",className:"color_input"},colorTextRExplain:{id:"colorTextRExplain",className:"color_explain"},colorTextGInput:{id:"colorTextGInput",className:"color_input"},colorTextGExplain:{id:"colorTextGExplain",className:"color_explain"},colorTextBInput:{id:"colorTextBInput",className:"color_input"},colorTextBExplain:{id:"colorTextBExplain",className:"color_explain"},colorTextOpacityInput:{id:"colorTextOpacityInput",className:"color_input"},colorTextOpacityExplain:{id:"colorTextOpacityExplain",className:"color_explain"},colorBackSelect:{id:"colorBackSelect",className:"button"},colorBackSelectBox:{id:"colorTextSelectBox",className:"select_box_c"},colorBack0:{id:"colorBack0",className:"color_button"},colorBack1:{id:"colorBack1",className:"color_button"},colorBack2:{id:"colorBack2",className:"color_button"},colorBack3:{id:"colorBack3",className:"color_button"},colorBack4:{id:"colorBack4",className:"color_button"},colorBack5:{id:"colorBack5",className:"color_button"},colorBack6:{id:"colorBack6",className:"color_button"},colorBack7:{id:"colorBack7",className:"color_button"},colorBackRInput:{id:"colorBackRInput",className:"color_input"},colorBackRExplain:{id:"colorBackRExplain",className:"color_explain"},colorBackGInput:{id:"colorBackGInput",className:"color_input"},colorBackGExplain:{id:"colorBackGExplain",className:"color_explain"},colorBackBInput:{id:"colorBackBInput",className:"color_input"},colorBackBExplain:{id:"colorBackBExplain",className:"color_explain"},colorBackOpacityInput:{id:"colorBackOpacityInput",className:"color_input"},colorBackOpacityExplain:{id:"colorBackOpacityExplain",className:"color_explain"},formatClearButton:{id:"formatClearButton",className:"button"},undoButton:{id:"undoButton",className:"button"},redoButton:{id:"redoButton",className:"button"},helpButton:{id:"helpButton",className:"button"},modalBack:{id:"modalBack",className:"modal_back"},attLinkModal:{id:"attLinkModal",className:"modal_body"},attLinkHeader:{id:"attLinkHeader",className:"modal_header"},attLinkFooter:{id:"attLinkFooter",className:"modal_footer"},attLinkExplain1:{id:"attLinkExplain1",className:"modal_explain"},attLinkText:{id:"attLinkText",className:"modal_input"},attLinkExplain2:{id:"attLinkExplain2",className:"modal_explain"},attLinkHref:{id:"attLinkHref",className:"modal_input"},attLinkIsBlankLabel:{id:"attLinkIsBlankLabel",className:"att_link_is_blank_label"},attLinkIsBlankCheckbox:{id:"attLinkIsBlankCheckbox",className:"input_checkbox"},attLinkValidCheckText:{id:"attLinkValidChecktext",className:"att_valid_checktext"},attLinkValidCheckbox:{id:"attLinkValidCheckbox",className:"input_checkbox"},attLinkInsertButton:{id:"attLinkInsertButton",className:"normal_button"},attLinkTooltip:{id:"attLinkTooltip",className:"tooltip"},attLinkTooltipHref:{id:"attLinkTooltipHref",className:"att_link_tooltip_href"},attLinkTooltipEditButton:{id:"attLinkTooltipEditButton",className:"tooltip_button"},attLinkTooltipUnlinkButton:{id:"attLinkTooltipUnlinkButton",className:"tooltip_button"},attFileModal:{id:"attFileModal",className:"modal_body"},attFileHeader:{id:"attFileHeader",className:"modal_header"},attFilelayout:{id:"attFilelayout",className:"modal_layout"},attFileExplain1:{id:"attFileExplain1",className:"modal_explain"},attFileUploadButton:{id:"attFileUploadButton",className:"normal_button"},attFileUploadDiv:{id:"attFileUploadDiv",className:"drag_drop_div"},attFileUpload:{id:"attFileUpload",className:"modal_input_file"},attFileInsertButton:{id:"attFileInsertButton",className:"normal_button"},attFileFooter:{id:"attFileFooter",className:"modal_footer"},attImageModal:{id:"attImageModal",className:"modal_body"},attImageHeader:{id:"attImageHeader",className:"modal_header"},attImageExplain1:{id:"attImageExplain1",className:"modal_explain"},attImageExplain2:{id:"attImageExplain2",className:"modal_explain"},attImageUploadButtonAndView:{id:"attImageUploadButtonAndView",className:"image_view_div"},attImageViewPreButton:{id:"attImageViewPreButton",className:"opacity_button"},attImageViewNextButton:{id:"attImageViewNextButton",className:"opacity_button"},attImageUpload:{id:"attImageUpload",className:"modal_input_file"},attImageURL:{id:"attImageURL",className:"modal_input"},attImageInsertButton:{id:"attImageInsertButton",className:"normal_button"},attImageFooter:{id:"attImageFooter",className:"modal_footer"},attVideoModal:{id:"attVideoModal",className:"modal_body"},attVideoHeader:{id:"attVideoHeader",className:"modal_header"},attVideoExplain1:{id:"attVideoExplain1",className:"modal_explain"},attVideoEmbedId:{id:"attVideoEmbedId",className:"modal_input"},attVideoExplain2:{id:"attVideoExplain2",className:"modal_explain"},attVideoWidth:{id:"attVideoWidth",className:"modal_small_input"},attVideoHeight:{id:"attVideoHeight",className:"modal_small_input"},attVideoValidCheckText:{id:"attVideoValidCheckText",className:"att_valid_checktext"},attVideoValidCheckbox:{id:"attVideoValidCheckbox",className:"input_checkbox"},attVideoInsertButton:{id:"attVideoInsertButton",className:"normal_button"},attVideoFooter:{id:"attVideoFooter",className:"modal_footer"},attImageAndVideoTooltip:{id:"attImageAndVideoTooltip",className:"tooltip"},attImageAndVideoTooltipWidthInput:{id:"attImageAndVideoTooltipWidthInput",className:"smallpx_input"},attImageAndVideoTooltipFloatRadioNone:{id:"attImageAndVideoTooltipFloatRadioNone",className:"input_radio"},attImageAndVideoTooltipFloatRadioLeft:{id:"attImageAndVideoTooltipFloatRadioLeft",className:"input_radio"},attImageAndVideoTooltipFloatRadioRight:{id:"attImageAndVideoTooltipFloatRadioRight",className:"input_radio"},attImageAndVideoTooltipShapeRadioSquare:{id:"attImageAndVideoTooltipShapeRadioSquare",className:"input_radio"},attImageAndVideoTooltipShapeRadioRadius:{id:"attImageAndVideoTooltipShapeRadioRadius",className:"input_radio"},attImageAndVideoTooltipShapeRadioCircle:{id:"attImageAndVideoTooltipShapeRadioCircle",className:"input_radio"},helpModal:{id:"helpModal",className:"modal_body"},helpMain:{id:"helpMain",className:"help_main"},helpHeader:{id:"helpHeader",className:"modal_header"},helpFooter:{id:"helpFooter",className:"modal_footer"},placeholder:{id:"placeholder",className:"placeholder"}}});f||(f=Rn());var u=f.colors,b=f.attributes,_=f.variables,R=f.languageSet,F=f.useGoogleIcon;return(Xe={consts:Q,colors:u,attributes:b,variables:_,languageSet:R,iconSpanElement:{toolToggleButtonIcon:(h=f.iconSpanElement.toolToggleButtonIcon)!==null&&h!==void 0?h:null,paragraphStyleSelectIcon:(I=f.iconSpanElement.paragraphStyleSelectIcon)!==null&&I!==void 0?I:null,boldButtonIcon:(be=f.iconSpanElement.boldButtonIcon)!==null&&be!==void 0?be:null,underlineButtonIcon:(Be=f.iconSpanElement.underlineButtonIcon)!==null&&Be!==void 0?Be:null,italicButtonIcon:(tt=f.iconSpanElement.italicButtonIcon)!==null&&tt!==void 0?tt:null,ulButtonIcon:(Ge=f.iconSpanElement.ulButtonIcon)!==null&&Ge!==void 0?Ge:null,olButtonIcon:(j=f.iconSpanElement.olButtonIcon)!==null&&j!==void 0?j:null,textAlignSelectIcon:(E=f.iconSpanElement.textAlignSelectIcon)!==null&&E!==void 0?E:null,textAlignLeftButtonIcon:(s=f.iconSpanElement.textAlignLeftButtonIcon)!==null&&s!==void 0?s:null,textAlignCenterButtonIcon:(l=f.iconSpanElement.textAlignCenterButtonIcon)!==null&&l!==void 0?l:null,textAlignRightButtonIcon:(k=f.iconSpanElement.textAlignRightButtonIcon)!==null&&k!==void 0?k:null,attLinkButtonIcon:($=f.iconSpanElement.attLinkButtonIcon)!==null&&$!==void 0?$:null,attLinkInsertButtonIcon:(J=f.iconSpanElement.attLinkInsertButtonIcon)!==null&&J!==void 0?J:null,attLinkTooltipEditButtonIcon:(ie=f.iconSpanElement.attLinkTooltipEditButtonIcon)!==null&&ie!==void 0?ie:null,attLinkTooltipUnlinkButtonIcon:(ge=f.iconSpanElement.attLinkTooltipUnlinkButtonIcon)!==null&&ge!==void 0?ge:null,attFileButtonIcon:(Ce=f.iconSpanElement.attFileButtonIcon)!==null&&Ce!==void 0?Ce:null,attFileInsertButtonIcon:(He=f.iconSpanElement.attFileInsertButtonIcon)!==null&&He!==void 0?He:null,attImageButtonIcon:(Le=f.iconSpanElement.attImageButtonIcon)!==null&&Le!==void 0?Le:null,attImageViewPreButtonIcon:(Ke=f.iconSpanElement.attImageViewPreButtonIcon)!==null&&Ke!==void 0?Ke:null,attImageViewNextButtonIcon:(Ze=f.iconSpanElement.attImageViewNextButtonIcon)!==null&&Ze!==void 0?Ze:null,attImageInsertButtonIcon:(et=f.iconSpanElement.attImageInsertButtonIcon)!==null&&et!==void 0?et:null,attVideoButtonIcon:(Ve=f.iconSpanElement.attVideoButtonIcon)!==null&&Ve!==void 0?Ve:null,attVideoWidthTextIcon:(Mt=f.iconSpanElement.attVideoWidthTextIcon)!==null&&Mt!==void 0?Mt:null,attVideoHeightTextIcon:(Rt=f.iconSpanElement.attVideoHeightTextIcon)!==null&&Rt!==void 0?Rt:null,attVideoInsertButtonIcon:(xt=f.iconSpanElement.attVideoInsertButtonIcon)!==null&&xt!==void 0?xt:null,attImageAndVideoTooltipFloatRadioNoneLabelIcon:(Ht=f.iconSpanElement.attImageAndVideoTooltipFloatRadioNoneLabelIcon)!==null&&Ht!==void 0?Ht:null,attImageAndVideoTooltipFloatRadioLeftLabelIcon:(v=f.iconSpanElement.attImageAndVideoTooltipFloatRadioLeftLabelIcon)!==null&&v!==void 0?v:null,attImageAndVideoTooltipFloatRadioRightLabelIcon:(w=f.iconSpanElement.attImageAndVideoTooltipFloatRadioRightLabelIcon)!==null&&w!==void 0?w:null,attImageAndVideoTooltipShapeRadioSquareLabelIcon:(A=f.iconSpanElement.attImageAndVideoTooltipShapeRadioSquareLabelIcon)!==null&&A!==void 0?A:null,attImageAndVideoTooltipShapeRadioRadiusLabelIcon:(x=f.iconSpanElement.attImageAndVideoTooltipShapeRadioRadiusLabelIcon)!==null&&x!==void 0?x:null,attImageAndVideoTooltipShapeRadioCircleLabelIcon:(g=f.iconSpanElement.attImageAndVideoTooltipShapeRadioCircleLabelIcon)!==null&&g!==void 0?g:null,fontSizeInputBoxIcon:(p=f.iconSpanElement.fontSizeInputBoxIcon)!==null&&p!==void 0?p:null,letterSpacingInputBoxIcon:(B=f.iconSpanElement.letterSpacingInputBoxIcon)!==null&&B!==void 0?B:null,lineHeightInputBoxIcon:(H=f.iconSpanElement.lineHeightInputBoxIcon)!==null&&H!==void 0?H:null,colorTextSelectIcon:(U=f.iconSpanElement.colorTextSelectIcon)!==null&&U!==void 0?U:null,colorBackSelectIcon:(q=f.iconSpanElement.colorBackSelectIcon)!==null&&q!==void 0?q:null,formatClearButtonIcon:(oe=f.iconSpanElement.formatClearButtonIcon)!==null&&oe!==void 0?oe:null,undoButtonIcon:(de=f.iconSpanElement.undoButtonIcon)!==null&&de!==void 0?de:null,redoButtonIcon:(he=f.iconSpanElement.redoButtonIcon)!==null&&he!==void 0?he:null,helpButtonIcon:(se=f.iconSpanElement.helpButtonIcon)!==null&&se!==void 0?se:null},useGoogleIcon:F===!0,events:{documentEvents:{noteObserver:null,selectionchange:null,keydown:null,resize:null,resizeViewport:null},cssEvents:{target_onClick:null,target_onMouseover:null,target_onMouseout:null,target_onTouchstart:null,target_onTouchend:null},elementEvents:{toolToggleButton_onClick:null,paragraphStyleSelect_onClick:null,styleNomal_onClick:null,styleHeader1_onClick:null,styleHeader2_onClick:null,styleHeader3_onClick:null,styleHeader4_onClick:null,styleHeader5_onClick:null,styleHeader6_onClick:null,boldButton_onClick:null,underlineButton_onClick:null,italicButton_onClick:null,ulButton_onClick:null,olButton_onClick:null,textAlignSelect_onClick:null,textAlignLeft_onClick:null,textAlignCenter_onClick:null,textAlignRight_onClick:null,attLinkButton_onClick:null,attLinkModal_onClick:null,attLinkText_onInput:null,attLinkText_onBlur:null,attLinkHref_onInput:null,attLinkHref_onBlur:null,attLinkInsertButton_onClick:null,attLinkTooltipEditButton_onClick:null,attLinkTooltipUnlinkButton_onClick:null,attFileButton_onClick:null,attFileModal_onClick:null,attFileUploadButton_onClick:null,attFileUploadDiv_onDragover:null,attFileUploadDiv_onDrop:null,attFileUploadDiv_onClick:null,attFileUpload_onInput:null,attFileUpload_onBlur:null,attFileInsertButton_onClick:null,attImageButton_onClick:null,attImageModal_onClick:null,attImageUploadButtonAndView_onDragover:null,attImageUploadButtonAndView_onDrop:null,attImageUploadButtonAndView_onClick:null,attImageViewPreButton_onClick:null,attImageViewNextButton_onClick:null,attImageUpload_onInput:null,attImageUpload_onBlur:null,attImageURL_onInput:null,attImageURL_onBlur:null,attImageInsertButton_onClick:null,attVideoButton_onClick:null,attVideoModal_onClick:null,attVideoEmbedId_onInput:null,attVideoEmbedId_onBlur:null,attVideoWidth_onInput:null,attVideoWidth_onBlur:null,attVideoHeight_onInput:null,attVideoHeight_onBlur:null,attVideoInsertButton_onClick:null,attImageAndVideoTooltipWidthInput_onInput:null,attImageAndVideoTooltipWidthInput_onBlur:null,attImageAndVideoTooltipWidthInput_onKeyup:null,attImageAndVideoTooltipFloatRadioNone_onClick:null,attImageAndVideoTooltipFloatRadioLeft_onClick:null,attImageAndVideoTooltipFloatRadioRight_onClick:null,attImageAndVideoTooltipShapeRadioSquare_onClick:null,attImageAndVideoTooltipShapeRadioRadius_onClick:null,attImageAndVideoTooltipShapeRadioCircle_onClick:null,fontSizeInputBox_onClick:null,fontSizeInput_onClick:null,fontSizeInput_onInput:null,fontSizeInput_onBlur:null,letterSpacingInputBox_onClick:null,letterSpacingInput_onClick:null,letterSpacingInput_onInput:null,letterSpacingInput_onBlur:null,lineHeightInputBox_onClick:null,lineHeightInputBox_onInput:null,lineHeightInput_onClick:null,lineHeightInput_onInput:null,lineHeightInput_onBlur:null,fontFamilySelect_onClick:null,colorTextSelect_onClick:null,colorTextSelectBox_onClick:null,colorTextRInput_onClick:null,colorTextRInput_onInput:null,colorTextRInput_onBlur:null,colorTextGInput_onClick:null,colorTextGInput_onInput:null,colorTextGInput_onBlur:null,colorTextBInput_onClick:null,colorTextBInput_onInput:null,colorTextBInput_onBlur:null,colorTextOpacityInput_onClick:null,colorTextOpacityInput_onInput:null,colorTextOpacityInput_onBlur:null,colorText0_onClick:null,colorText1_onClick:null,colorText2_onClick:null,colorText3_onClick:null,colorText4_onClick:null,colorText5_onClick:null,colorText6_onClick:null,colorText7_onClick:null,colorBackSelect_onClick:null,colorBackSelectBox_onClick:null,colorBackRInput_onClick:null,colorBackRInput_onInput:null,colorBackRInput_onBlur:null,colorBackGInput_onClick:null,colorBackGInput_onInput:null,colorBackGInput_onBlur:null,colorBackBInput_onClick:null,colorBackBInput_onInput:null,colorBackBInput_onBlur:null,colorBackOpacityInput_onClick:null,colorBackOpacityInput_onInput:null,colorBackOpacityInput_onBlur:null,colorBack0_onClick:null,colorBack1_onClick:null,colorBack2_onClick:null,colorBack3_onClick:null,colorBack4_onClick:null,colorBack5_onClick:null,colorBack6_onClick:null,colorBack7_onClick:null,formatClearButton_onClick:null,undoButton_onClick:null,redoButton_onClick:null,helpButton_onClick:null,helpModal_onClick:null,modalBack_onClick:null,placeholder_onClick:null,textarea_onClick:null,textarea_onFocus:null,textarea_onBlur:null,textarea_onKeydown:null,textarea_onKeyup:null,textarea_onBeforeinput:null}},vanillanoteElements:{},getNote:function(P){return null},beforeAlert:function(P){return!0},init:function(){gt()},mountNote:function(P){},destroy:function(){yn()},unmountNote:function(P){},_initialized:!1}).mountNote=function(P){(function(z,pe,Se){var ze=(Se||document).querySelectorAll("[data-vanillanote]");ze.length<=0||(ze.forEach(function(je){var Ue=je.getAttribute("data-id");if(!Ue)throw new Error("The data-id attribute of vanillanote is required.");if(Ue&&Object.keys(z.vanillanoteElements).includes(Ue))throw new Error("".concat(Ue," is a note that has already been created."))}),ze.forEach(function(je){var Ue=je.getAttribute("data-id");if(Object.keys(z.vanillanoteElements).includes(Ue))throw new Error("Duplicate vanillanote id detected: ".concat(Ue));var it=je;it.setAttribute("id",c(z.variables.noteName,Ue,"note")),it.setAttribute("class",m(z.variables.noteName,Ue,"note")),it.setAttribute("data-note-id",Ue),it._noteName=z.variables.noteName,it._id=Ue,z.vanillanoteElements[Ue]=function(rt,ct,Ne){var De=nn(rt,Ne);Ne._colors=Et(rt,De);var lt=_e(Ne._noteName,De,Ne._colors),ae="".concat(Ne._noteName,"_").concat(Ne._id,"_styles-sheet");if(!document.getElementById(ae)){var te="";Object.keys(lt).forEach(function(d){te=te+function(y,M,S,N){return"."+c(y,M,S)+" {"+Ee(N)+"}"}(Ne._noteName,Ne._id,d,lt[d])+`
|
|
50
50
|
`});var ht=document.createElement("style");ht.id=ae,ht.textContent=te.trim(),document.head.appendChild(ht)}return Ne._selection={editSelection:null,editRange:null,startOffset:null,endOffset:null,editStartNode:null,editEndNode:null,editStartElement:null,editEndElement:null,editStartUnitElement:null,editEndUnitElement:null,editDragUnitElement:[],setEditStyleTagToggle:0},Ne._attributes={isNoteByMobile:De.isNoteByMobile,language:De.language,sizeRate:De.sizeRate,toolPosition:De.toolPosition,toolToggleUsing:De.toolToggleUsing,toolDefaultLine:De.toolDefaultLine,textareaOriginHeight:De.textareaOriginHeight,defaultTextareaFontSize:De.defaultTextareaFontSize,defaultTextareaLineHeight:De.defaultTextareaLineHeight,defaultTextareaFontFamily:De.defaultTextareaFontFamily,defaultFontFamilies:De.defaultFontFamilies,attFilePreventTypes:De.attFilePreventTypes,attFileAcceptTypes:De.attFileAcceptTypes,attFileMaxSize:De.attFileMaxSize,attImagePreventTypes:De.attImagePreventTypes,attImageAcceptTypes:De.attImageAcceptTypes,attImageMaxSize:De.attImageMaxSize,placeholderIsVisible:De.placeholderIsVisible,placeholderWidth:De.placeholderWidth,placeholderAddTop:De.placeholderAddTop,placeholderAddLeft:De.placeholderAddLeft,placeholderTitle:De.placeholderTitle,placeholderTextContent:De.placeholderTextContent},Ne._status={toolToggle:!1,boldToggle:!1,underlineToggle:!1,italicToggle:!1,ulToggle:!1,olToggle:!1,fontSize:De.defaultTextareaFontSize,letterSpacing:0,lineHeight:De.defaultTextareaLineHeight,fontFamily:De.defaultTextareaFontFamily,colorTextR:Ie(Ne._colors.color12,"R"),colorTextG:Ie(Ne._colors.color12,"G"),colorTextB:Ie(Ne._colors.color12,"B"),colorTextO:"1",colorTextRGB:Ne._colors.color12,colorTextOpacity:"1",colorBackR:Ie(Ne._colors.color13,"R"),colorBackG:Ie(Ne._colors.color13,"G"),colorBackB:Ie(Ne._colors.color13,"B"),colorBackO:"0",colorBackRGB:Ne._colors.color13,colorBackOpacity:"0"},Ne._recodes={recodeNotes:[],recodeCount:-1,recodeLimit:De.recodeLimit},Ne._attTempFiles={},Ne._attFiles={},Ne._attTempImages={},Ne._attImages={},bt(Ne),ft(rt,ct,Ne,De),Ne.getNoteData=function(){var d=Ne._elements.textarea,y=d.querySelectorAll("[uuid]"),M=d.querySelectorAll("img[data-note-id]"),S=d.querySelectorAll("a[data-note-id]"),N=d.querySelectorAll("iframe[data-note-id]"),O=Dt(Dt({},Ne._attFiles),Ne._attImages),T={},G={};Object.keys(O).forEach(function(le){Array.from(y).some(function(qe){return qe.getAttribute("uuid")===le})&&(T[le]=O[le]),Array.from(M).some(function(qe){return qe.getAttribute("uuid")===le})&&(G[le]=O[le])});var V=[];S.forEach(function(le){V.push({text:le.textContent||"",href:le.getAttribute("href")||"",target:le.getAttribute("target")||void 0})});var Z=[];M.forEach(function(le){Z.push({src:le.getAttribute("src")||"",uuid:le.getAttribute("uuid")||void 0})});var ne=[];Object.keys(T).forEach(function(le){ne.push({uuid:le,name:T[le].name})});var Y=[];return N.forEach(function(le){var qe=le.getAttribute("src")||"";qe.includes("youtube.com/embed")&&Y.push({src:qe,width:le.style.width||le.getAttribute("width")||void 0,height:le.style.height||le.getAttribute("height")||void 0})}),{html:d.innerHTML,plainText:d.textContent||"",links:V,files:ne,images:Z,videos:Y,fileObjects:T,imageObjects:G}},Ne.setNoteData=function(d){if(d){var y=Ne._elements.textarea;y&&(y.innerHTML="",Ne._attFiles={},Ne._attImages={},y.innerHTML=d.html,Object.entries(d.fileObjects).forEach(function(M){var S=Ye(M,2),N=S[0],O=S[1];Ne._attFiles[N]=O,y.querySelectorAll('a[uuid="'.concat(N,'"]')).forEach(function(T){T.setAttribute("href",URL.createObjectURL(O)),T.setAttribute("download",O.name)})}),Object.entries(d.imageObjects).forEach(function(M){var S=Ye(M,2),N=S[0],O=S[1];Ne._attImages[N]=O,y.querySelectorAll('img[uuid="'.concat(N,'"]')).forEach(function(T){T.setAttribute("src",URL.createObjectURL(O))})}))}},Ne}(z,pe,it)}),setTimeout(function(){Object.keys(z.vanillanoteElements).forEach(function(je){z.vanillanoteElements[je]._elements.template.removeAttribute("style")}),z.events.documentEvents.resize()},z.variables.loadInterval))})(Xe,Ut,P)},Xe.unmountNote=function(P){Yn(Xe,P)},Xe},gt=function(){if(Xe&&!Xe._initialized){Xe._initialized=!0,function(j,E){E.setAttTempFileValid=function(s){for(var l=new Object,k=Object.keys(s._attTempFiles),$=0;$<k.length;$++)s._attributes.attFileAcceptTypes.length>0?s._attributes.attFileAcceptTypes.includes(s._attTempFiles[k[$]].type)&&(l[k[$]]=s._attTempFiles[k[$]]):l[k[$]]=s._attTempFiles[k[$]],l[k[$]]&&(s._attributes.attFilePreventTypes.includes(l[k[$]].type)?(E.showAlert("["+l[k[$]].name+"] "+j.languageSet[s._attributes.language].attPreventType,j.beforeAlert),delete l[k[$]]):l[k[$]].size>=s._attributes.attFileMaxSize&&(E.showAlert("["+l[k[$]].name+"] "+j.languageSet[s._attributes.language].attOverSize,j.beforeAlert),delete l[k[$]]));s._attTempFiles=l},E.setAttFileUploadDiv=function(s){if(s._attTempFiles.length<=0)return s._elements.attFileUploadDiv.style.removeProperty("line-height"),void(s._elements.attFileUploadDiv.textContent=j.languageSet[s._attributes.language].attFileUploadDiv);s._elements.attFileUploadDiv.style.lineHeight="unset",s._elements.attFileUploadDiv.replaceChildren();for(var l,k=Object.keys(s._attTempFiles),$=0;$<k.length;$++)l=E.getElement(s._attTempFiles[k[$]].name,"P","display:block;padding:0.5em 0;",{title:j.languageSet[s._attributes.language].attFileListTooltip,uuid:k[$]},s),s._elements.attFileUploadDiv.appendChild(l)},E.setAttTempImageValid=function(s){for(var l=new Object,k=Object.keys(s._attTempImages),$=0;$<k.length;$++)s._attributes.attImageAcceptTypes.length>0?s._attributes.attImageAcceptTypes.includes(s._attTempImages[k[$]].type)&&(l[k[$]]=s._attTempImages[k[$]]):l[k[$]]=s._attTempImages[k[$]],l[k[$]]&&(s._attributes.attImagePreventTypes.includes(l[k[$]].type)?(E.showAlert("["+l[k[$]].name+"] "+j.languageSet[s._attributes.language].attPreventType,j.beforeAlert),delete l[k[$]]):l[k[$]].size>=s._attributes.attImageMaxSize&&(E.showAlert("["+l[k[$]].name+"] "+j.languageSet[s._attributes.language].attOverSize,j.beforeAlert),delete l[k[$]]));s._attTempImages=l},E.setAttImageUploadAndView=function(s){var l=Object.keys(s._attTempImages);if(!(l.length<=0)){var k,$;s._elements.attImageUploadButtonAndView.replaceChildren();for(var J=0;J<l.length;J++)k=s._attTempImages[l[J]],($=document.createElement("img")).src=URL.createObjectURL(k),$.style.width="auto",$.style.height="100%",$.style.display="inline-block",$.style.margin="0 5px",s._elements.attImageUploadButtonAndView.appendChild($);s._elements.attImageURL.value="",s._elements.attImageURL.setAttribute("readonly","true")}},E.createElement=function(s,l,k,$,J){var ie,ge=document.createElement(s);if(k!==""&&ge.setAttribute("id",c(l._noteName,l._id,k)),ge.setAttribute("data-note-id",l._id),ge.setAttribute("class",m(l._noteName,l._id,$)),J&&Zt(J)==="object"&&Object.keys(J).length!==0)if(J.isIcon){var Ce=document.createElement("span");Ce.setAttribute("class","material-symbols-rounded "+C(l._noteName)+" "+D(l._noteName)+" "+L(l._noteName)+" "+c(l._noteName,l._id,"icon")),ie=document.createTextNode(J.text),Ce.appendChild(ie),J.iconStyle&&Ce.setAttribute("style",J.iconStyle),Ce.setAttribute("data-note-id",l._id),ge.appendChild(Ce)}else ie=document.createTextNode(J.text),ge.appendChild(ie);return ge},E.createElementBasic=function(s,l,k,$,J){var ie=E.createElement(s,l,k,$,J);return E.addClickEvent(ie,k,l),ie},E.createElementButton=function(s,l,k,$,J){var ie=E.createElement(s,l,k,$,J);return ie.classList.add(D(l._noteName)),ie.classList.add(L(l._noteName)),E.addClickEvent(ie,k,l),E.addMouseoverEvent(ie,l),E.addMouseoutEvent(ie,l),E.addTouchstartEvent(ie,l),E.addTouchendEvent(ie,l),ie},E.createElementSelect=function(s,l,k,$,J){var ie=E.createElement(s,l,k,$,J);return ie.classList.add(D(l._noteName)),ie.classList.add(L(l._noteName)),ie.setAttribute("type","select"),E.addClickEvent(ie,k,l),E.addMouseoverEvent(ie,l),E.addMouseoutEvent(ie,l),E.addTouchstartEvent(ie,l),E.addTouchendEvent(ie,l),ie},E.createElementInput=function(s,l,k){var $=E.createElement("input",s,l,k);return $.setAttribute("name",c(s._noteName,s._id,l)),$.setAttribute("autocapitalize","none"),$.setAttribute("placeholder",""),$.addEventListener("input",function(J){s._elementEvents[l+"_onBeforeInput"](J)&&(j.events.elementEvents[l+"_onInput"](J),s._elementEvents[l+"_onAfterInput"](J),J.stopImmediatePropagation())}),$.addEventListener("blur",function(J){s._elementEvents[l+"_onBeforeBlur"](J)&&(j.events.elementEvents[l+"_onBlur"](J),s._elementEvents[l+"_onAfterBlur"](J),J.stopImmediatePropagation())}),$},E.createElementInputCheckbox=function(s,l,k){var $=E.createElement("input",s,l,k);return $.setAttribute("name",c(s._noteName,s._id,l)),$.setAttribute("placeholder",""),$.setAttribute("type","checkbox"),$},E.createElementInputRadio=function(s,l,k,$){var J=E.createElement("input",s,l,k);return J.setAttribute("name",$),J.setAttribute("placeholder",""),J.setAttribute("type","radio"),E.addClickEvent(J,l,s),J},E.createElementRadioLabel=function(s,l,k){var $=document.createElement("label");$.setAttribute("for",l),$.setAttribute("style","display:inline-block;width:30px;position:relative;margin-left:3px;;margin-left:3px;");var J=document.createElement("span");return J.setAttribute("class","material-symbols-rounded"),J.setAttribute("style","font-size:1.3em;position:absolute;bottom:-6px;cursor:pointer;color:"+Pe(s._colors.color1)),J.textContent=k,$.appendChild(J),$},E.createElementFontFamiliySelect=function(s,l,k,$,J){var ie=E.createElement(s,l,k,$,J);return ie.classList.add(D(l._noteName)),ie.classList.add(L(l._noteName)),l._elementEvents[k+"_onBeforeClick"]=function(ge){return!0},j.events.elementEvents[l._id+"_"+k+"_onClick"]=function(ge){E.fontFamilySelectList_onClick(ge,l),E.selectToggle(ge.target,l),l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):E.modifySelectedSingleElement(l,E.getObjectNoteCss(l))},l._elementEvents[k+"_onAfterClick"]=function(ge){},ie.addEventListener("click",function(ge){l._cssEvents.target_onBeforeClick(ge)&&ge.target.classList.contains(D(l._noteName))&&(j.events.cssEvents.target_onClick(ge),l._cssEvents.target_onAfterClick(ge)),l._elementEvents[k+"_onBeforeClick"](ge)&&(j.events.elementEvents[l._id+"_"+k+"_onClick"](ge),l._elementEvents[k+"_onAfterClick"](ge),ge.stopImmediatePropagation())}),E.addMouseoverEvent(ie,l),E.addMouseoutEvent(ie,l),E.addTouchstartEvent(ie,l),E.addTouchendEvent(ie,l),ie},E.addClickEvent=function(s,l,k){l==="textarea"?s.addEventListener("click",function($){k._elementEvents[l+"_onBeforeClick"]($)&&(j.events.elementEvents[l+"_onClick"]($),k._elementEvents[l+"_onAfterClick"]($),$.stopImmediatePropagation())}):s.addEventListener("click",function($){k._cssEvents.target_onBeforeClick($)&&$.target.classList.contains(D(k._noteName))&&(j.events.cssEvents.target_onClick($),k._cssEvents.target_onAfterClick($)),k._elementEvents[l+"_onBeforeClick"]($)&&(j.events.elementEvents[l+"_onClick"]($),k._elementEvents[l+"_onAfterClick"]($),$.stopImmediatePropagation())})},E.addMouseoverEvent=function(s,l){s.addEventListener("mouseover",function(k){l._cssEvents.target_onBeforeMouseover(k)&&k.target.classList.contains(L(l._noteName))&&(j.events.cssEvents.target_onMouseover(k),l._cssEvents.target_onAfterMouseover(k),k.stopImmediatePropagation())})},E.addMouseoutEvent=function(s,l){s.addEventListener("mouseout",function(k){l._cssEvents.target_onBeforeMouseout(k)&&k.target.classList.contains(L(l._noteName))&&(j.events.cssEvents.target_onMouseout(k),l._cssEvents.target_onAfterMouseout(k),k.stopImmediatePropagation())})},E.addTouchstartEvent=function(s,l){s.addEventListener("touchstart",function(k){l._cssEvents.target_onBeforeTouchstart(k)&&k.target.classList.contains(L(l._noteName))&&(j.events.cssEvents.target_onTouchstart(k),l._cssEvents.target_onAfterTouchstart(k),k.stopImmediatePropagation())})},E.addTouchendEvent=function(s,l){s.addEventListener("touchend",function(k){l._cssEvents.target_onBeforeTouchend(k)&&k.target.classList.contains(L(l._noteName))&&(j.events.cssEvents.target_onTouchend(k),l._cssEvents.target_onAfterTouchend(k),k.stopImmediatePropagation())})}}(Xe,Ut),function(j,E){E.onEventDisable=function(s,l){var k;k=l==="resize"?s.variables.resizeInterval:s.variables.inputInterval,s.variables.canEvent=!1,setTimeout(function(){s.variables.canEvent=!0},k)},E.replaceDifferentBetweenElements=function(s,l,k){var $,J,ie,ge,Ce=function(He,Le,Ke){if(!(Le.tagName!==(He.variables.noteName+"-textarea").toUpperCase()&&Ke.tagName!==(He.variables.noteName+"-textarea").toUpperCase()&&He.consts.NOT_SINGLE_TAG.indexOf(Le.tagName)>=0&&He.consts.NOT_SINGLE_TAG.indexOf(Ke.tagName)>=0)||Le.nodeType===Ke.nodeType&&Le.tagName===Ke.tagName&&E.compareAttributesBetweenEl(Le,Ke)&&E.compareStylesBetweenEl(Le,Ke))if(!(Le.tagName!==(He.variables.noteName+"-textarea").toUpperCase()&&Ke.tagName!==(He.variables.noteName+"-textarea").toUpperCase()&&He.consts.NOT_SINGLE_TAG.indexOf(Le.tagName)<0&&He.consts.NOT_SINGLE_TAG.indexOf(Ke.tagName)<0)||Le.nodeType===Ke.nodeType&&Le.tagName===Ke.tagName&&Le.textContent===Ke.textContent&&E.compareAttributesBetweenEl(Le,Ke)&&E.compareStylesBetweenEl(Le,Ke))for(var Ze=Array.prototype.slice.call(Le.childNodes),et=Array.prototype.slice.call(Ke.childNodes),Ve=Math.max(Ze.length,et.length),Mt=0;Mt<Ve;Mt++){var Rt=Ze[Mt],xt=et[Mt];!Rt&&xt?(ie=xt.cloneNode(!0),Le.appendChild(ie),$||($=ie),J=ie):Rt&&!xt?Le.removeChild(Rt):Ce(He,Rt,xt)}else ie=Ke.cloneNode(!0),Le.parentNode.replaceChild(ie,Le),$||($=ie),J=ie;else ie=Ke.cloneNode(!0),Le.parentNode.replaceChild(ie,Le),$||($=ie),J=ie};Ce(s,l,k),$&&(J||(J=$),ge=J instanceof Element?J.childNodes.length:J.nodeType===3?J.textContent.length:0,E.setNewSelection($,0,J,ge))},E.compareAttributesBetweenEl=function(s,l){var k=E.getAttributesObjectFromElement(s),$=E.getAttributesObjectFromElement(l);return xe(k,$)},E.compareStylesBetweenEl=function(s,l){var k=s.cssText,$=l.cssText;return xe(ve(k),ve($))},E.getAttributesObjectFromElement=function(s){var l=new Object;if(!s.attributes)return l;for(var k=0;k<s.attributes.length;k++)l[s.attributes[k].nodeName]=s.attributes[k].nodeValue;return l},E.getSpecialTag=function(s,l){for(var k=s,$=k.tagName;k&&j.consts.UNIT_TAG.indexOf($)<0;){if(j.consts.SPECIAL_TAG.indexOf($)>=0)return $;if(!(k=k.parentNode))break;$=k.tagName}return"SPAN"},E.getParentUnitTagElemnt=function(s,l){for(var k=s;k&&!(j.consts.UNIT_TAG.indexOf(k.tagName)>=0);){if(j.consts.DOUBLE_TAG.indexOf(k.tagName)>=0){k=k.lastElementChild;break}if(k.tagName===(l._noteName+"-textarea").toUpperCase())return null;k=k.parentNode}return k},E.getParentTagName=function(s,l){var k="span";return s&&s.parentNode&&s.parentNode.tagName?j.consts.UNIT_TAG.indexOf(s.parentNode.tagName)>=0||j.consts.AUTO_MODIFY_TAG.indexOf(s.parentNode.tagName)>=0?k:s.parentNode.tagName:k},E.getObjectEditElementAttributes=function(s,l){for(var k=E.getAttributesObjectFromElement(s),$=function(J){if(J.getAttribute)for(var ie=E.getAttributesObjectFromElement(J),ge=Object.keys(ie),Ce=0;Ce<ge.length;Ce++)ie[ge[Ce]]&&ge[Ce]!=="style"&&!k[ge[Ce]]&&(k[ge[Ce]]=ie[ge[Ce]])};s&&!(j.consts.UNIT_TAG.indexOf(s.tagName)>=0);)$(s),s=s.parentNode;return k},E.getObjectEditElementCss=function(s,l){for(var k=ve(document.contains(s)&&s.getAttribute?s.getAttribute("style"):""),$=function(J){if(J.getAttribute)for(var ie=ve(J.getAttribute("style")),ge=Object.keys(ie),Ce=0;Ce<ge.length;Ce++)k[ge[Ce]]||(k[ge[Ce]]=ie[ge[Ce]])};s&&!(j.consts.UNIT_TAG.indexOf(s.tagName)>=0);){switch(s.tagName){case"B":case"STRONG":k["font-weight"]="bold";break;case"U":k["text-decoration"]="underline";break;case"I":k["font-style"]="italic"}$(s),s=s.parentNode}return k},E.getEditElementTag=function(s){for(var l="",k="",$=0;$<s._selection.editDragUnitElement.length;$++){if(k=s._selection.editDragUnitElement[$].tagName==="LI"?s._selection.editDragUnitElement[$].parentNode.tagName:s._selection.editDragUnitElement[$].tagName,l&&l!==k)return"";l=k}return l},E.getPreviousElementsUntilNotTag=function(s,l,k){var $=[],J=s,ie=E.getAttributesObjectFromElement(s);for($.push(J);J;){for(;J.previousSibling;){if((J=J.previousSibling).tagName&&k.DOUBLE_TAG.indexOf(J.tagName)>0)for(;J.lastChild;)J=J.lastChild;else if(J.tagName&&k.UNIT_TAG.indexOf(J.tagName)>0)for(;J.lastChild;)J=J.lastChild;if(J.nodeType===3&&(J=J.parentNode),k.UNIT_TAG.indexOf(J.tagName)>0||!J.tagName||J.tagName!==l.toUpperCase()||!xe(ie,E.getAttributesObjectFromElement(J)))return $;$.push(J)}J=J.parentNode}return $},E.getNextElementsUntilNotTag=function(s,l,k){var $=[],J=s,ie=E.getAttributesObjectFromElement(s);for($.push(J);J;){for(;J.nextSibling;){if((J=J.nextSibling).tagName&&k.DOUBLE_TAG.indexOf(J.tagName)>0)for(;J.firstChild;)J=J.firstChild;else if(J.tagName&&k.UNIT_TAG.indexOf(J.tagName)>0)for(;J.firstChild;)J=J.firstChild;if(J.nodeType===3&&(J=J.parentNode),k.UNIT_TAG.indexOf(J.tagName)>0||!J.tagName||J.tagName!==l.toUpperCase()||!xe(ie,E.getAttributesObjectFromElement(J)))return $;$.push(J)}J=J.parentNode}return $},E.setTagToggle=function(s,l){s._status.ulToggle=l==="UL",s._status.olToggle=l==="OL"},E.initToggleButtonVariables=function(s){s._status.boldToggle=!1,s._status.underlineToggle=!1,s._status.italicToggle=!1,s._status.ulToggle=!1,s._status.olToggle=!1,E.button_onToggle(s._elements.boldButton,s._status.boldToggle),E.button_onToggle(s._elements.underlineButton,s._status.underlineToggle),E.button_onToggle(s._elements.italicButton,s._status.italicToggle),E.button_onToggle(s._elements.ulButton,s._status.ulToggle),E.button_onToggle(s._elements.olButton,s._status.olToggle)},E.isInNote=function(s){for(;s;){if(s&&s instanceof Element&&s.hasAttribute("data-vanillanote"))return!0;s=s.parentNode}return!1},E.getElementReplaceTag=function(s,l){for(var k,$,J=document.createElement(l),ie=s.childNodes;ie[0];)ie[0].getAttribute&&(k=ve(ie[0].getAttribute("style")),J&&J.tagName.substring(0,1)==="H"&&(delete k["font-size"],delete k["letter-spacing"],delete k["line-height"]),$=Ee(k)),$&&ie[0].setAttribute&&ie[0].setAttribute("style",$),J.append(ie[0]);return Me(J,E.getAttributesObjectFromElement(s))},E.removeDoubleTag=function(s,l){if(!(j.consts.DOUBLE_TAG.indexOf(l.tagName)<0)){for(var k,$=l.childNodes,J=0;J<$.length;J++){k=E.getElementReplaceTag($[J],"P"),l.insertAdjacentElement("beforebegin",k);for(var ie=0;ie<s._selection.editDragUnitElement.length;ie++)if(s._selection.editDragUnitElement[ie]===$[J]){s._selection.editDragUnitElement[ie]=k;break}}l.remove()}},E.getElement=function(s,l,k,$,J){s=s.replace(/<br\s*\/?>/gm,`
|
|
51
51
|
`),(!l||j.consts.UNIT_TAG.indexOf(l)>=0||j.consts.AUTO_MODIFY_TAG.indexOf(l)>=0)&&(l="span");var ie=document.createElement(l);return ie.innerText=s,$&&(ie=Me(ie,$)),k&&ie.setAttribute("style",k),ie},E.setEditNodeAndElement=function(s,l,k){var $=!1;return s._selection.editStartNode===k&&(s._selection.editStartNode=l,$=!0),s._selection.editEndNode===k&&(s._selection.editEndNode=l,$=!0),s._selection.editStartElement===k&&(s._selection.editStartElement=l,$=!0),s._selection.editEndElement===k&&(s._selection.editEndElement=l,$=!0),s._selection.editStartUnitElement===k&&(s._selection.editStartUnitElement=l,$=!0),s._selection.editEndUnitElement===k&&(s._selection.editEndUnitElement=l,$=!0),$},E.removeEmptyElment=function(s,l){for(var k=s.querySelectorAll("*"),$=k.length-1;$>=0;$--)!k[$].hasChildNodes()&&j.consts.EMPTY_ABLE_TAG.indexOf(k[$].tagName)<0&&k[$].remove()},E.doEditUnitCheck=function(s){j.events.documentEvents.noteObserver.disconnect(),function(l){for(var k=l._elements.textarea,$=k.childNodes,J=document.createElement("P"),ie=[],ge=!0,Ce=0;Ce<$.length;Ce++)j.consts.UNIT_TAG.indexOf($[Ce].tagName)<0&&j.consts.DOUBLE_TAG.indexOf($[Ce].tagName)<0?ge?(k.insertBefore(J,$[Ce]),ge=!1):(J.append($[Ce].cloneNode(!0)),ie.push($[Ce])):(J=document.createElement("P"),ge=!0);for(var He=0;He<ie.length;He++)ie[He].remove()}(s),E.connectObserver(j)},E.connectObserver=function(s){Object.keys(s.vanillanoteElements).forEach(function(l){s.events.documentEvents.noteObserver.observe(s.vanillanoteElements[l]._elements.textarea,s.variables.observerOptions)})},E.isElementInParentBounds=function(s,l){if(s.offsetParent===null)return!1;var k=s.getBoundingClientRect();if(l.offsetParent===null)return!1;var $=l.getBoundingClientRect(),J=$.top+window.pageYOffset,ie=$.bottom+window.pageYOffset,ge=k.top+window.pageYOffset,Ce=k.bottom+window.pageYOffset;return J>=ge&&ie<=Ce},E.validCheckAttLink=function(s){return s._elements.attLinkText.value?s._elements.attLinkHref.value?(s._elements.attLinkValidCheckbox.checked=!0,s._elements.attLinkValidCheckText.style.color=Pe(s._colors.color8),void(s._elements.attLinkValidCheckText.textContent=j.languageSet[s._attributes.language].thanks)):(s._elements.attLinkValidCheckbox.checked=!1,s._elements.attLinkValidCheckText.style.color=Pe(s._colors.color9),void(s._elements.attLinkValidCheckText.textContent=j.languageSet[s._attributes.language].attLinkInLinkTooltip)):(s._elements.attLinkValidCheckbox.checked=!1,s._elements.attLinkValidCheckText.style.color=Pe(s._colors.color9),void(s._elements.attLinkValidCheckText.textContent=j.languageSet[s._attributes.language].attLinkInTextTooltip))},E.validCheckAttVideo=function(s){if(!s._elements.attVideoEmbedId.value)return s._elements.attVideoValidCheckbox.checked=!1,s._elements.attVideoValidCheckText.style.color=Pe(s._colors.color9),void(s._elements.attVideoValidCheckText.textContent=j.languageSet[s._attributes.language].attVideoEmbedIdTooltip);s._elements.attVideoValidCheckbox.checked=!0,s._elements.attVideoValidCheckText.style.color=Pe(s._colors.color8),s._elements.attVideoValidCheckText.textContent=j.languageSet[s._attributes.language].thanks},E.initAttLink=function(s){s._elements.attLinkText.value="",s._elements.attLinkHref.value="",s._elements.attLinkIsBlankCheckbox.checked=!1},E.initAttFile=function(s){delete s._attTempFiles,s._attTempFiles={},s._elements.attFileUploadDiv.replaceChildren(),s._elements.attFileUploadDiv.textContent=j.languageSet[s._attributes.language].attFileUploadDiv,s._elements.attFileUploadDiv.style.lineHeight=130*s._attributes.sizeRate+"px",s._elements.attFileUpload.value=""},E.initAttImage=function(s){delete s._attTempImages,s._attTempImages={},s._elements.attImageUploadButtonAndView.replaceChildren(),s._elements.attImageUploadButtonAndView.textContent=j.languageSet[s._attributes.language].attImageUploadButtonAndView,s._elements.attImageUpload.value="",s._elements.attImageURL.value="",s._elements.attImageURL.removeAttribute("readonly")},E.getObjectNoteCss=function(s){var l=new Object;return s._status.boldToggle&&(l["font-weight"]="bold"),s._status.underlineToggle&&(l["text-decoration"]="underline"),s._status.italicToggle&&(l["font-style"]="italic"),l["font-size"]=s._status.fontSize+"px",l["line-height"]=s._status.lineHeight+"px",s._status.letterSpacing&&re(s._status.letterSpacing)&&(l["letter-spacing"]=s._status.letterSpacing+"px"),s._status.fontFamily&&(l["font-family"]=s._status.fontFamily),Pe(s._colors.color12)===s._status.colorTextRGB&&s._status.colorTextOpacity==="1"||(l.color=Te(s._status.colorTextRGB,s._status.colorTextOpacity)),Pe(s._colors.color13)===s._status.colorBackRGB&&s._status.colorBackOpacity==="0"||(l["background-color"]=Te(s._status.colorBackRGB,s._status.colorBackOpacity)),l},E.showAlert=function(s,l){l(s)&&alert(s)},E.recodeNote=function(s){s._recodes.recodeNotes.length>=s._recodes.recodeLimit?(s._recodes.recodeNotes.shift(),s._recodes.recodeNotes.push(s._elements.textarea.cloneNode(!0))):(s._recodes.recodeCount=s._recodes.recodeCount+1,s._recodes.recodeCount<s._recodes.recodeNotes.length&&s._recodes.recodeNotes.splice(s._recodes.recodeCount),s._recodes.recodeNotes.push(s._elements.textarea.cloneNode(!0)))}}(Xe,Ut),function(j,E){E.closeAllTooltip=function(s){s._elements.attLinkTooltip.style.opacity="0",s._elements.attLinkTooltip.style.height="0",s._elements.attImageAndVideoTooltip.style.opacity="0",s._elements.attImageAndVideoTooltip.style.height="0"},E.setVariableButtonTogle=function(s,l){l["font-weight"]==="bold"?s._status.boldToggle=!0:s._status.boldToggle=!1,l["text-decoration"]==="underline"||l["text-decoration-line"]==="underline"?s._status.underlineToggle=!0:s._status.underlineToggle=!1,l["font-style"]==="italic"?s._status.italicToggle=!0:s._status.italicToggle=!1,l.color?(s._status.colorTextRGB=We(l.color),s._status.colorTextOpacity=nt(l.color),s._status.colorTextRGB?s._status.colorTextOpacity||(l.opacity?s._status.colorTextOpacity=l.opacity:s._status.colorTextOpacity="1"):(s._status.colorTextRGB=Pe(s._colors.color12),s._status.colorTextOpacity="1")):(s._status.colorTextRGB=Pe(s._colors.color12),s._status.colorTextOpacity="1"),l["background-color"]?(s._status.colorBackRGB=We(l["background-color"]),s._status.colorBackOpacity=nt(l["background-color"]),s._status.colorTextRGB?s._status.colorBackOpacity||(l.opacity?s._status.colorBackOpacity=l.opacity:s._status.colorBackOpacity="0"):(s._status.colorTextRGB=Pe(s._colors.color12),s._status.colorTextOpacity="1")):(s._status.colorBackRGB=Pe(s._colors.color13),s._status.colorBackOpacity="0")},E.button_onToggle=function(s,l){var k=a(s);k&&(s.classList.contains(C(k._noteName))&&(s=s.parentNode),l?s.classList.add(c(k._noteName,k._id,"on_button_on")):s.classList.remove(c(k._noteName,k._id,"on_button_on")))},E.allButtonToggle=function(s){E.button_onToggle(s._elements.boldButton,s._status.boldToggle),E.button_onToggle(s._elements.underlineButton,s._status.underlineToggle),E.button_onToggle(s._elements.italicButton,s._status.italicToggle),E.button_onToggle(s._elements.ulButton,s._status.ulToggle),E.button_onToggle(s._elements.olButton,s._status.olToggle),s._elements.colorTextSelect.querySelector("."+C(s._noteName)).style.color=Te(s._status.colorTextRGB,s._status.colorTextOpacity==="0"?"1":s._status.colorTextOpacity),s._elements.colorBackSelect.querySelector("."+C(s._noteName)).style.color=Te(s._status.colorBackRGB,s._status.colorBackOpacity==="0"?"1":s._status.colorBackOpacity)},E.selectToggle=function(s,l){var k=l||a(s);if(k){s.classList.contains(C(k._noteName))&&(s=s.parentNode);for(var $=s,J=!1;$&&$.getAttribute("type")!=="select";)J=!0,$=$.parentNode;if($.getAttribute("data-note-id")){var ie,ge=$.getAttribute("id");if(ge.includes("paragraphStyleSelect"))ie=k._elements.paragraphStyleSelectBox;else if(ge.includes("textAlignSelect"))ie=k._elements.textAlignSelectBox;else if(ge.includes("fontFamilySelect"))ie=k._elements.fontFamilySelectBox;else if(ge.includes("colorTextSelect")){if(J)return;ie=k._elements.colorTextSelectBox}else if(ge.includes("colorBackSelect")){if(J)return;ie=k._elements.colorBackSelectBox}var Ce=c(k._noteName,k._id,"on_display_block"),He=c(k._noteName,k._id,"on_display_none"),Le=ie.classList.contains(Ce);if(E.closeAllSelectBoxes(k),Le?(ie.classList.remove(Ce),ie.classList.add(He)):(ie.classList.remove(He),ie.classList.add(Ce)),function(Ve){if(Ve.offsetParent===null)return!1;var Mt=Ve.getBoundingClientRect();return window.innerWidth/2<Mt.left}($)){if(ie.style.removeProperty("left"),ie.style.right="0%",ie.offsetParent===null)return;var Ke=ie.getBoundingClientRect();if(Ke.top===0||k._elements.tool.offsetParent===null)return;k._elements.tool.getBoundingClientRect().left>Ke.left&&(ie.style.right=Ke.left-1+"px")}else{if(ie.style.removeProperty("right"),ie.style.left="0%",ie.offsetParent===null)return;var Ze=ie.getBoundingClientRect();if(Ze.top===0||k._elements.tool.offsetParent===null)return;var et=k._elements.tool.getBoundingClientRect();et.right<Ze.right&&(ie.style.left=et.right-(Ze.right+1)+"px")}}}},E.closeAllSelectBoxes=function(s){var l=c(s._noteName,s._id,"on_display_block"),k=c(s._noteName,s._id,"on_display_none");s._elements.paragraphStyleSelectBox.classList.remove(l),s._elements.paragraphStyleSelectBox.classList.add(k),s._elements.textAlignSelectBox.classList.remove(l),s._elements.textAlignSelectBox.classList.add(k),s._elements.fontFamilySelectBox.classList.remove(l),s._elements.fontFamilySelectBox.classList.add(k),s._elements.colorTextSelectBox.classList.remove(l),s._elements.colorTextSelectBox.classList.add(k),s._elements.colorBackSelectBox.classList.remove(l),s._elements.colorBackSelectBox.classList.add(k)},E.fontFamilySelectList_onClick=function(s,l){if(s.target){var k=s.target,$=l||a(s.target);if($){var J=k.getAttribute("data-font-family");ve($._elements.fontFamilySelect.getAttribute("style"))["font-family"]=J,$._status.fontFamily=J,$._elements.fontFamilySelect.firstChild.textContent=J.length>12?J.substr(0,12)+"...":J,$._elements.fontFamilySelect.style.fontFamily=J}}},E.setEditStyleTag=function(s){if(s._selection.setEditStyleTagToggle>0)s._selection.setEditStyleTagToggle--;else{for(var l=s._selection.editStartUnitElement,k=l;l;){if(l.tagName===(s._noteName+"-textarea").toUpperCase()){k=l;break}l=l.parentNode}if(k){var $=E.getObjectEditElementCss(s._selection.editStartElement,s);if(s._selection.editStartNode!==s._selection.editEndNode)for(var J=$,ie=!1,ge=!1,Ce=function(Ke){for(var Ze=0;Ze<Ke.childNodes.length&&!ge;Ze++)s._selection.editStartNode===Ke.childNodes[Ze]&&(ie=!0),ie&&Ke.childNodes[Ze].nodeType===3&&Ke.childNodes[Ze].textContent&&(J=E.getObjectEditElementCss(Ke.childNodes[Ze],s)),xe($,J)||($={},ge=!0),s._selection.editEndNode===Ke.childNodes[Ze]&&(ge=!0),Ke.childNodes[Ze].childNodes&&Ce(Ke.childNodes[Ze])},He=0;He<s._selection.editDragUnitElement.length;He++)Ce(s._selection.editDragUnitElement[He]);E.setVariableButtonTogle(s,$);var Le=E.getEditElementTag(s);E.setTagToggle(s,Le),E.allButtonToggle(s)}else Object.keys(j.vanillanoteElements).forEach(function(Ke){E.initToggleButtonVariables(j.vanillanoteElements[Ke])})}},E.setElementScroll=function(s,l,k){if(s&&l){l.nodeType===3&&(l=l.parentNode);var $=null,J=l.offsetTop-Math.round(k/2)+Math.round(l.offsetHeight/2),ie=s.scrollTop,ge=J-ie;window.requestAnimationFrame(function Ce(He){$||($=He);var Le=He-$,Ke=Math.min(Le/500,1);s.scrollTop=ie+ge*Ke,Le<500&&window.requestAnimationFrame(Ce)})}},E.getCheckSelectBoxesOpened=function(s){var l=c(s._noteName,s._id,"on_display_block");return!!(s._elements.paragraphStyleSelectBox.classList.contains(l)||s._elements.textAlignSelectBox.classList.contains(l)||s._elements.fontFamilySelectBox.classList.contains(l)||s._elements.colorTextSelectBox.classList.contains(l)||s._elements.colorBackSelectBox.classList.contains(l))},E.closeAllModal=function(s){var l=c(s._noteName,s._id,"on_display_block"),k=c(s._noteName,s._id,"on_display_none");s._elements.modalBack.classList.remove(l),s._elements.modalBack.classList.add(k),s._elements.attLinkModal.classList.remove(l),s._elements.attLinkModal.classList.add(k),s._elements.attFileModal.classList.remove(l),s._elements.attFileModal.classList.add(k),s._elements.attImageModal.classList.remove(l),s._elements.attImageModal.classList.add(k),s._elements.attVideoModal.classList.remove(l),s._elements.attVideoModal.classList.add(k),s._elements.helpModal.classList.remove(l),s._elements.helpModal.classList.add(k),E.initAttLink(s),E.initAttFile(s),E.initAttImage(s)},E.openAttLinkModal=function(s){E.doIncreaseTextareaHeight(j),E.closeAllModal(s),E.closeAllSelectBoxes(s),E.setAllModalSize(s);var l=c(s._noteName,s._id,"on_display_block"),k=c(s._noteName,s._id,"on_display_none");if(s._elements.modalBack.classList.remove(k),s._elements.modalBack.classList.add(l),s._elements.attLinkModal.classList.remove(k),s._elements.attLinkModal.classList.add(l),E.isValidSelection(s)){var $=s._elements.attLinkText,J=s._elements.attLinkHref;$.value=s._selection.editRange.toString(),J.value="",s._selection.editRange.collapsed?($.removeAttribute("readonly"),$.focus()):($.setAttribute("readonly","true"),J.focus()),E.validCheckAttLink(s)}else E.validCheckAttLink(s)},E.openPlaceholder=function(s){s._attributes.placeholderIsVisible&&s._elements.textarea.innerText.length<=1&&s._elements.textarea.textContent.length<1&&s._elements.textarea.childNodes.length<=1&&s._elements.textarea.childNodes[0]&&s._elements.textarea.childNodes[0].childNodes.length<=1&&s._elements.textarea.childNodes[0].childNodes[0]&&s._elements.textarea.childNodes[0].childNodes[0].tagName==="BR"&&(s._elements.placeholder.classList.remove(c(s._noteName,s._id,"on_display_none")),s._elements.placeholder.classList.add(c(s._noteName,s._id,"on_display_block")))},E.closePlaceholder=function(s){s._attributes.placeholderIsVisible&&(s._elements.placeholder.classList.remove(c(s._noteName,s._id,"on_display_block")),s._elements.placeholder.classList.add(c(s._noteName,s._id,"on_display_none")))},E.setAllModalSize=function(s){s._elements.template.offsetParent!==null&&setTimeout(function(){s._elements.modalBack.style.width=s._elements.template.clientWidth+"px",s._elements.modalBack.style.height=s._elements.template.clientHeight+"px",s._elements.attLinkModal.style.width=.8*s._elements.textarea.clientWidth+"px",s._elements.attLinkModal.style.marginTop=.1*s._elements.template.clientHeight+"px",s._elements.attFileModal.style.width=.8*s._elements.textarea.clientWidth+"px",s._elements.attFileModal.style.marginTop=.1*s._elements.template.clientHeight+"px",s._elements.attImageModal.style.width=.8*s._elements.textarea.clientWidth+"px",s._elements.attImageModal.style.marginTop=.1*s._elements.template.clientHeight+"px",s._elements.attVideoModal.style.width=.8*s._elements.textarea.clientWidth+"px",s._elements.attVideoModal.style.marginTop=.1*s._elements.template.clientHeight+"px",s._elements.helpModal.style.width=.8*s._elements.textarea.clientWidth+"px",s._elements.helpModal.style.marginTop=.1*s._elements.template.clientHeight+"px"},500)},E.setPlaceholderSize=function(s){setTimeout(function(){s._attributes.placeholderIsVisible&&(E.closePlaceholder(s),s._elements.textarea.offsetParent!==null&&(s._elements.placeholder.style.top=s._elements.textarea.offsetTop+s._attributes.placeholderAddTop+"px",s._elements.placeholder.style.left=s._elements.textarea.offsetLeft+s._attributes.placeholderAddLeft+"px",s._elements.placeholder.style.width=s._attributes.placeholderWidth?s._attributes.placeholderWidth:s._elements.textarea.clientWidth+"px",E.openPlaceholder(s)))},100)},E.setAllToolTipPosition=function(s){s._attributes.toolPosition===r.bottom&&(s._elements.attLinkTooltip.style.bottom=s._elements.tool.style.height,s._elements.attImageAndVideoTooltip.style.bottom=s._elements.tool.style.height)},E.appearAttLinkToolTip=function(s){var l=s._selection.editStartNode.parentElement,k=l.getAttribute("href"),$=l.getAttribute("download"),J=c(s._noteName,s._id,"on_display_inline_block"),ie=c(s._noteName,s._id,"on_display_none");s._elements.attLinkTooltipEditButton.classList.remove(ie),s._elements.attLinkTooltipUnlinkButton.classList.remove(ie),s._elements.attLinkTooltipEditButton.classList.add(J),s._elements.attLinkTooltipUnlinkButton.classList.add(J),k&&(s._elements.attLinkTooltipHref.setAttribute("href",k),s._elements.attLinkTooltipHref.textContent=k.length>25?k.substr(0,25)+"...":k),$&&(s._elements.attLinkTooltipHref.setAttribute("download",$),s._elements.attLinkTooltipHref.textContent="download : "+$,s._elements.attLinkTooltipEditButton.classList.remove(J),s._elements.attLinkTooltipUnlinkButton.classList.remove(J),s._elements.attLinkTooltipEditButton.classList.add(ie),s._elements.attLinkTooltipUnlinkButton.classList.add(ie)),s._elements.attLinkTooltip.style.opacity="0.95",s._elements.attLinkTooltip.style.height=54*s._attributes.sizeRate*.8+"px",s._elements.attLinkTooltip.style.lineHeight=54*s._attributes.sizeRate*.8+"px"},E.appearAttImageAndVideoTooltip=function(s){var l=s._selection.editStartNode,k=ve(E.getAttributesObjectFromElement(l).style);switch(k.width&&(s._elements.attImageAndVideoTooltipWidthInput.value=ye(k.width)),k.float){case"left":s._elements.attImageAndVideoTooltipFloatRadioLeft.checked=!0;break;case"right":s._elements.attImageAndVideoTooltipFloatRadioRight.checked=!0;break;default:s._elements.attImageAndVideoTooltipFloatRadioNone.checked=!0}if(s._elements.attImageAndVideoTooltipShapeRadioSquare.checked=!0,k["border-radius"]){var $=ye(k["border-radius"]);$>0?s._elements.attImageAndVideoTooltipShapeRadioRadius.checked=!0:$>=50&&(s._elements.attImageAndVideoTooltipShapeRadioCircle.checked=!0)}s._elements.attImageAndVideoTooltip.style.opacity="0.9",s._elements.attImageAndVideoTooltip.style.height=54*s._attributes.sizeRate*.8*2+"px",s._elements.attImageAndVideoTooltip.style.lineHeight=54*s._attributes.sizeRate*.7+"px"},E.setImageAndVideoWidth=function(s){s.value||(s.value=100);var l=s.value,k=a(s);if(k){var $=k._selection.editStartNode;$.tagName!=="IMG"&&$.tagName!=="IFRAME"||(l<10&&(l=10),l>100&&(l=100),s.value=l,$.style.width=l+"%",k._selection.editStartNode.parentNode.replaceChild($,k._selection.editStartNode),k._selection.editStartNode=$)}},E.setAllToolSize=function(s){for(var l=s._elements.tool.childNodes,k=c(s._noteName,s._id,"on_display_inline_block"),$=c(s._noteName,s._id,"on_display_none"),J=l.length-1;J>=0;J--)l[J].classList.add(k),l[J].classList.remove($);if(s._elements.tool.offsetParent!==null)if(s._status.toolToggle){s._elements.tool.style.height=s._attributes.toolDefaultLine*(52*s._attributes.sizeRate)+"px";for(var ie=l.length-1;ie>=0;ie--)E.isElementInParentBounds(s._elements.tool,l[ie])||(l[ie].classList.remove(k),l[ie].classList.add($))}else{for(var ge,Ce,He,Le=l.length-1;Le>=0;Le--)if(l[Le].offsetParent!==null){Ce=l[Le];break}if(s._elements.tool.offsetParent===null)return;ge=window.pageYOffset+s._elements.tool.getBoundingClientRect().top,He=window.pageYOffset+Ce.getBoundingClientRect().top-ge+52*s._attributes.sizeRate,s._elements.tool.style.height=He+"px"}},E.doDecreaseTextareaHeight=function(s){s._attributes.isNoteByMobile&&(s._elements.textarea.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(function(){(s._attributes.textareaOriginHeight.replace(/[-+]?[0-9]*\.?[0-9]+/g,"")||null)==="px"&&j.variables.mobileKeyboardExceptHeight<ye(s._attributes.textareaOriginHeight)&&j.variables.mobileKeyboardExceptHeight<s._elements.textarea.offsetHeight&&(s._elements.textarea.style.height=j.variables.mobileKeyboardExceptHeight+"px")},100))},E.doIncreaseTextareaHeight=function(s){for(var l=Object.keys(s.vanillanoteElements),k=0;k<l.length;k++){var $=s.vanillanoteElements[l[k]];$._attributes.isNoteByMobile&&($._elements.textarea.style.height=$._attributes.textareaOriginHeight)}},E.modifyTextareaScroll=function(s,l){l._attributes.isNoteByMobile&&(j.variables.preventChangeScroll>0?j.variables.preventChangeScroll--:j.variables.isSelectionProgress||(j.variables.isSelectionProgress=!0,setTimeout(function(){if(j.variables.isSelectionProgress=!1,E.isValidSelection(l)){var k=ee(l._selection.editDragUnitElement.length/2)?l._selection.editDragUnitElement.length/2-1:Math.floor(l._selection.editDragUnitElement.length/2);l._selection.editDragUnitElement[l._selection.editDragUnitElement.length-1].offsetTop-l._selection.editDragUnitElement[0].offsetTop+l._selection.editDragUnitElement[l._selection.editDragUnitElement.length-1].offsetHeight>s.offsetHeight-30||E.getCheckSelectBoxesOpened(l)||(l._selection.editRange.collapsed?E.setElementScroll(s,l._selection.editStartElement,j.variables.mobileKeyboardExceptHeight):E.setElementScroll(s,l._selection.editDragUnitElement[k],j.variables.mobileKeyboardExceptHeight))}},50)))},E.initTextarea=function(s){for(;s.firstChild;)s.removeChild(s.firstChild);var l=document.createElement("P"),k=document.createElement("BR");l.appendChild(k),s.appendChild(l),E.setNewSelection(l,0,l,0)}}(Xe,Ut),function(j,E){E.setNewSelection=function(s,l,k,$){if(document.contains(s)&&document.contains(k)){var J=document.createRange(),ie=window.getSelection();return J.setStart(s,l),J.setEnd(k,$),ie.removeAllRanges(),ie.addRange(J),ie}},E.handleSpecialTagSelection=function(s){if(E.closeAllTooltip(s),s._selection.editRange.collapsed)switch(E.getSpecialTag(s._selection.editStartNode,s)){case"A":E.appearAttLinkToolTip(s);break;case"IMG":case"IFRAME":E.appearAttImageAndVideoTooltip(s);break;default:return}},E.setOriginEditSelection=function(s){if(s._selection.editRange){s._selection.setEditStyleTagToggle=2;var l=window.getSelection();l.removeAllRanges(),l.addRange(s._selection.editRange)}},E.setEditSelection=function(s,l){if(l.rangeCount<1||!function(ie){var ge=window.getSelection();if(!ge||ge.rangeCount<1)return!1;for(var Ce=ge.getRangeAt(0).startContainer.parentNode,He=!1;Ce;){if(Ce.tagName===(ie+"-textarea").toUpperCase()){He=!0;break}Ce=Ce.parentNode}return He}(s._noteName))return!1;if(s._selection.editSelection=l,s._selection.editRange=s._selection.editSelection.getRangeAt(0),s._selection.startOffset=s._selection.editRange.startOffset,s._selection.endOffset=s._selection.editRange.endOffset,s._selection.editStartNode=s._selection.editRange.startContainer,s._selection.editEndNode=s._selection.editRange.endContainer,s._selection.editStartNode instanceof Element){for(;s._selection.editStartNode instanceof Element&&s._selection.editStartNode.firstChild&&s._selection.editStartNode.firstChild.tagName!=="BR"&&(s._selection.editStartNode=s._selection.editStartNode.firstChild,s._selection.editStartNode.nodeType!==3););s._selection.startOffset=0}if(s._selection.editEndNode instanceof Element){for(;s._selection.editEndNode instanceof Element&&s._selection.editEndNode.firstChild&&s._selection.editEndNode.firstChild.tagName!=="BR"&&(s._selection.editEndNode=s._selection.editEndNode.firstChild,s._selection.editEndNode.nodeType!==3););s._selection.endOffset=0}if(s._selection.editStartElement=s._selection.editRange.startContainer instanceof Element?s._selection.editRange.startContainer:s._selection.editRange.startContainer.parentNode,s._selection.editEndElement=s._selection.editRange.endContainer instanceof Element?s._selection.editRange.endContainer:s._selection.editRange.endContainer.parentNode,j.consts.UNIT_TAG.indexOf(s._selection.editStartElement.tagName)>0)for(;j.consts.UNIT_TAG.indexOf(s._selection.editStartElement.tagName)>0;)s._selection.editStartElement=s._selection.editStartElement.firstChild;if(j.consts.UNIT_TAG.indexOf(s._selection.editEndElement.tagName)>0)for(;j.consts.UNIT_TAG.indexOf(s._selection.editEndElement.tagName)>0;)s._selection.editEndElement=s._selection.editEndElement.lastChild;s._selection.editStartElement instanceof Element&&s._selection.editStartElement.tagName==="BR"&&(s._selection.editStartElement=s._selection.editStartElement.parentNode),s._selection.editEndElement instanceof Element&&s._selection.editEndElement.tagName==="BR"&&(s._selection.editEndElement=s._selection.editEndElement.parentNode),s._selection.editStartElement.tagName===(s._noteName+"-textarea").toUpperCase()&&(s._selection.editStartElement=null),s._selection.editEndElement.tagName===(s._noteName+"-textarea").toUpperCase()&&(s._selection.editEndElement=null),s._selection.editStartUnitElement=E.getParentUnitTagElemnt(s._selection.editStartElement,s),s._selection.editEndUnitElement=E.getParentUnitTagElemnt(s._selection.editEndElement,s),s._selection.editDragUnitElement.splice(0,s._selection.editDragUnitElement.length);for(var k,$=E.modifySeletedElements(s),J=0;J<$.length;J++)k=E.getParentUnitTagElemnt($[J],s),s._selection.editDragUnitElement.includes(k)||s._selection.editDragUnitElement.push(k);return E.setEditStyleTag(s),E.handleSpecialTagSelection(s),!0},E.isValidSelection=function(s){return!!s._selection.editRange&&!!s._selection.editStartElement&&!!s._selection.editStartUnitElement},E.modifySeletedElements=function(s){var l=!1,k=s._selection.editStartNode,$=[];if(!s._selection.editStartUnitElement||!s._selection.editEndUnitElement)return $;for(var J=s._selection.editEndUnitElement.lastChild;J&&J.lastChild;)J=J.lastChild;for(var ie=function(ge){if(ge===J&&($.push(ge),l=!0),!l&&((j.consts.UNIT_TAG.indexOf(ge.tagName)>=0||j.consts.EMPTY_ABLE_TAG.indexOf(ge.tagName)>=0||ge.nodeType===3)&&$.push(ge),ge&&ge.childNodes&&ge.childNodes.length))for(var Ce=0;Ce<ge.childNodes.length;Ce++)ie(ge.childNodes[Ce])};k&&!l;)if(ie(k),k.nextSibling)k=k.nextSibling;else{for(;k&&!k.nextSibling;)k=k.parentNode;k&&(k=k.nextSibling)}return $},E.modifySelectedUnitElementTag=function(s,l){var k=l||a(s);if(k&&E.isValidSelection(k)){var $,J=s.getAttribute("data-tag-name");if(j.consts.DOUBLE_TAG.indexOf(J)>=0)for(var ie=document.createElement(J),ge=0;ge<k._selection.editDragUnitElement.length&&(k._selection.editDragUnitElement[ge].tagName==="LI"&&E.removeDoubleTag(k,k._selection.editDragUnitElement[ge].parentNode),J!=="UL"||!k._status.ulToggle)&&(J!=="OL"||!k._status.olToggle);ge++)ge===0&&k._selection.editDragUnitElement[0].insertAdjacentElement("beforebegin",ie),$=E.getElementReplaceTag(k._selection.editDragUnitElement[ge],"LI"),E.setEditNodeAndElement(k,$,k._selection.editDragUnitElement[ge]),k._selection.editDragUnitElement[ge].remove(),k._selection.editDragUnitElement[ge]=$,ie.append($);else for(var Ce=0;Ce<k._selection.editDragUnitElement.length;Ce++)k._selection.editDragUnitElement[Ce].tagName==="LI"&&E.removeDoubleTag(k,k._selection.editDragUnitElement[Ce].parentNode),$=E.getElementReplaceTag(k._selection.editDragUnitElement[Ce],J),E.setEditNodeAndElement(k,$,k._selection.editDragUnitElement[Ce]),k._selection.editDragUnitElement[Ce].replaceWith($),k._selection.editDragUnitElement[Ce]=$;var He=0,Le=k._selection.editEndElement?k._selection.editEndElement.textContent.length:0;k._selection.editStartElement===k._selection.editEndElement&&(He=Le),E.setNewSelection(k._selection.editStartNode,He,k._selection.editEndNode,Le)}},E.modifySelectedUnitElementStyle=function(s,l){var k=l||a(s);if(k&&E.isValidSelection(k)){for(var $,J,ie,ge,Ce=s.getAttribute("data-tag-style"),He=ve(Ce),Le=0;Le<k._selection.editDragUnitElement.length;Le++)$=k._selection.editDragUnitElement[Le].getAttribute("style"),ie=ve($),J=Ee(ke(ie,He)),(ge=k._selection.editDragUnitElement[Le].cloneNode(!0)).setAttribute("style",J),k._selection.editDragUnitElement[Le].parentNode.replaceChild(ge,k._selection.editDragUnitElement[Le]),k._selection.editDragUnitElement[Le]=ge;k._selection.editEndElement.childNodes&&k._selection.editEndElement.childNodes.length,E.setNewSelection(k._selection.editDragUnitElement[0],0,k._selection.editDragUnitElement[k._selection.editDragUnitElement.length-1],1)}},E.modifySelectedSingleElement=function(s,l,k,$){if(E.isValidSelection(s)){var J,ie,ge,Ce,He,Le,Ke,Ze,et;Ce=l?Ee(l):"",ge=k||"",He=$||null,Le=E.modifySeletedElements(s);for(var Ve=s._selection.editStartNode.textContent.slice(0,s._selection.startOffset),Mt=s._selection.editStartNode.textContent.slice(s._selection.startOffset,s._selection.editStartNode.textContent.length),Rt=s._selection.editEndNode.textContent.slice(0,s._selection.endOffset),xt=s._selection.editEndNode.textContent.slice(s._selection.endOffset,s._selection.editEndNode.textContent.length),Ht=function(g,p){g&&(p?p.insertBefore(g,null):s._selection.editStartUnitElement.insertBefore(g,null))},v=!1,w=s._selection.editStartNode===s._selection.editEndNode,A=0;A<Le.length;A++)Le[A].nodeType===3?($||(He=E.getObjectEditElementAttributes(Le[A],s)),k||(ge=E.getSpecialTag(Le[A],s)),l||(Ce=Ee(E.getObjectEditElementCss(Le[A],s))),(J=E.getParentUnitTagElemnt(Le[A],s))&&J.tagName.substring(0,1)==="H"&&(delete(l=ve(Ce))["font-size"],delete l["letter-spacing"],delete l["line-height"],Ce=Ee(l)),Le[A]===s._selection.editStartNode?(w&&(Mt=Mt.slice(0,Mt.length-xt.length)),Ht(J=E.getElement(Ve,E.getParentTagName(s._selection.editStartNode,s),Ee(E.getObjectEditElementCss(s._selection.editStartNode,s)),E.getObjectEditElementAttributes(s._selection.editStartNode,s),s),ie),Ht(J=E.getElement(Mt,ge,Ce,He,s),ie),Ke=J.firstChild,w&&(Ze=J.firstChild,Ht(J=E.getElement(xt,E.getParentTagName(s._selection.editEndNode,s),Ee(E.getObjectEditElementCss(s._selection.editEndNode,s)),E.getObjectEditElementAttributes(s._selection.editEndNode,s),s),ie),v=!0),Le[A].remove()):w||Le[A]!==s._selection.editEndNode?(Ht(J=v?E.getElement(Le[A].textContent,E.getParentTagName(Le[A],s),Ee(E.getObjectEditElementCss(Le[A],s)),E.getObjectEditElementAttributes(Le[A],s),s):E.getElement(Le[A].textContent,ge,Ce,He,s),ie),Le[A].remove()):(Ht(J=E.getElement(Rt,ge,Ce,He,s),ie),Ze=J.firstChild,Ht(J=E.getElement(xt,E.getParentTagName(s._selection.editEndNode,s),Ee(E.getObjectEditElementCss(s._selection.editEndNode,s)),E.getObjectEditElementAttributes(s._selection.editEndNode,s),s),ie),v=!0,Le[A].remove())):j.consts.EMPTY_ABLE_TAG.indexOf(Le[A].tagName)>=0?(Ht(J=Le[A].cloneNode(),ie),Le[A].remove()):j.consts.UNIT_TAG.indexOf(Le[A].tagName)>=0&&(ie=Le[A]);for(var x=0;x<s._selection.editDragUnitElement.length;x++)E.removeEmptyElment(s._selection.editDragUnitElement[x],s);Ke||(Ke=s._selection.editStartUnitElement),Ze?et=Ze.textContent.length:(Ze=s._selection.editEndUnitElement,et=0),E.setNewSelection(Ke,0,Ze,et)}},E.textarea_onBeforeinputSpelling=function(s){var l=a(s.target);if(l&&j.variables.canEvent&&(E.onEventDisable(j,"input"),E.isValidSelection(l))){var k="",$=E.getObjectNoteCss(l),J=E.getObjectEditElementCss(l._selection.editStartElement,l);if(l._selection.editStartUnitElement.tagName.substring(0,1)==="H"?(delete $["font-size"],delete $["letter-spacing"],delete $["line-height"]):!(l._selection.editStartElement instanceof Element&&j.consts.UNIT_TAG.indexOf(l._selection.editStartElement.tagName)<0)||J["font-size"]&&J["line-height"]||(J=$,Me(l._selection.editStartElement,{style:Ee(J)})),!xe($,J)){k=Ee($);var ie=document.createElement("span");if(ie.setAttribute("class",l._noteName+"-point"),ie.appendChild(document.createTextNode("!")),l._selection.editRange.collapsed){l._selection.editRange.insertNode(ie);try{E.modifySelectedSingleElement(l,E.getObjectNoteCss(l))}catch{}var ge=document.getElementsByClassName(l._noteName+"-point"),Ce=ge[0];k?Ce.setAttribute("style",k):Ce.removeAttribute("style");for(var He=0;He<ge.length;He++)ge[He].removeAttribute("class");E.setNewSelection(Ce.firstChild,0,Ce.firstChild,Ce.firstChild.length)}else E.modifySelectedSingleElement(l,E.getObjectNoteCss(l))}}},E.textarea_onKeydownEnter=function(s){var l=a(s);if(l&&E.isValidSelection(l)&&!(l._selection.editStartUnitElement&&l._selection.editStartUnitElement.textContent||l._selection.editStartNode instanceof Element&&j.consts.EMPTY_ABLE_TAG.indexOf(l._selection.editStartNode.tagName)>=0&&l._selection.editStartNode.tagName!=="BR")){var k,$,J=l._selection.editStartUnitElement.tagName;k=document.createElement(J),$=document.createElement("BR"),k.appendChild($),k=Me(k,E.getAttributesObjectFromElement(l._selection.editStartUnitElement)),l._selection.editStartUnitElement.replaceWith(k),E.setNewSelection(k,0,k,0)}}}(Xe,Ut),Xe.variables.lastScreenHeight=typeof window<"u"&&window.visualViewport?window.visualViewport.height:null,Xe.getNote=function(j){return Xe.vanillanoteElements[j]?Xe.vanillanoteElements[j]:null};var f,h="".concat(Xe.variables.noteName,"_animation_styles-sheet");if(!document.getElementById(h)){var I=`
|
|
@@ -74,7 +74,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
74
74
|
* Released under the MIT License
|
|
75
75
|
*/class zh{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,o,r){const i=n.listeners[r],a=n.duration;i.forEach(c=>c({chart:e,initial:n.initial,numSteps:a,currentStep:Math.min(o-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=kc.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((o,r)=>{if(!o.running||!o.items.length)return;const i=o.items;let a=i.length-1,c=!1,m;for(;a>=0;--a)m=i[a],m._active?(m._total>o.duration&&(o.duration=m._total),m.tick(e),c=!0):(i[a]=i[i.length-1],i.pop());c&&(r.draw(),this._notify(r,o,e,"progress")),i.length||(o.running=!1,this._notify(r,o,e,"complete"),o.initial=!1),n+=i.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let o=n.get(e);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,o)),o}listen(e,n,o){this._getAnims(e).listeners[n].push(o)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((o,r)=>Math.max(o,r._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const o=n.items;let r=o.length-1;for(;r>=0;--r)o[r].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var An=new zh;const Yl="transparent",Uh={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const o=Vl(t||Yl),r=o.valid&&Vl(e||Yl);return r&&r.valid?r.mix(o,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class Gh{constructor(e,n,o,r){const i=n[o];r=ei([e.to,r,i,e.from]);const a=ei([e.from,i,r]);this._active=!0,this._fn=e.fn||Uh[e.type||typeof a],this._easing=tr[e.easing]||tr.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=o,this._from=a,this._to=r,this._promises=void 0}active(){return this._active}update(e,n,o){if(this._active){this._notify(!1);const r=this._target[this._prop],i=o-this._start,a=this._duration-i;this._start=o,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=ei([e.to,n,r,e.from]),this._from=ei([e.from,r,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,o=this._duration,r=this._prop,i=this._from,a=this._loop,c=this._to;let m;if(this._active=i!==c&&(a||n<o),!this._active){this._target[r]=c,this._notify(!0);return}if(n<0){this._target[r]=i;return}m=n/o%2,m=a&&m>1?2-m:m,m=this._easing(Math.min(1,Math.max(0,m))),this._target[r]=this._fn(i,c,m)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,o)=>{e.push({res:n,rej:o})})}_notify(e){const n=e?"res":"rej",o=this._promises||[];for(let r=0;r<o.length;r++)o[r][n]()}}class Gc{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!yt(e))return;const n=Object.keys(Vt.animation),o=this._properties;Object.getOwnPropertyNames(e).forEach(r=>{const i=e[r];if(!yt(i))return;const a={};for(const c of n)a[c]=i[c];(Ot(i.properties)&&i.properties||[r]).forEach(c=>{(c===r||!o.has(c))&&o.set(c,a)})})}_animateOptions(e,n){const o=n.options,r=Wh(e,o);if(!r)return[];const i=this._createAnimations(r,o);return o.$shared&&jh(e.options.$animations,o).then(()=>{e.options=o},()=>{}),i}_createAnimations(e,n){const o=this._properties,r=[],i=e.$animations||(e.$animations={}),a=Object.keys(n),c=Date.now();let m;for(m=a.length-1;m>=0;--m){const C=a[m];if(C.charAt(0)==="$")continue;if(C==="options"){r.push(...this._animateOptions(e,n));continue}const L=n[C];let D=i[C];const W=o.get(C);if(D)if(W&&D.active()){D.update(W,L,c);continue}else D.cancel();if(!W||!W.duration){e[C]=L;continue}i[C]=D=new Gh(W,e,C,L),r.push(D)}return r}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const o=this._createAnimations(e,n);if(o.length)return An.add(this._chart,o),!0}}function jh(t,e){const n=[],o=Object.keys(e);for(let r=0;r<o.length;r++){const i=t[o[r]];i&&i.active()&&n.push(i.wait())}return Promise.all(n)}function Wh(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Kl(t,e){const n=t&&t.options||{},o=n.reverse,r=n.min===void 0?e:0,i=n.max===void 0?e:0;return{start:o?i:r,end:o?r:i}}function qh(t,e,n){if(n===!1)return!1;const o=Kl(t,n),r=Kl(e,n);return{top:r.end,right:o.end,bottom:r.start,left:o.start}}function $h(t){let e,n,o,r;return yt(t)?(e=t.top,n=t.right,o=t.bottom,r=t.left):e=n=o=r=t,{top:e,right:n,bottom:o,left:r,disabled:t===!1}}function jc(t,e){const n=[],o=t._getSortedDatasetMetas(e);let r,i;for(r=0,i=o.length;r<i;++r)n.push(o[r].index);return n}function Xl(t,e,n,o={}){const r=t.keys,i=o.mode==="single";let a,c,m,C;if(e===null)return;let L=!1;for(a=0,c=r.length;a<c;++a){if(m=+r[a],m===n){if(L=!0,o.all)continue;break}C=t.values[m],qt(C)&&(i||e===0||Mn(e)===Mn(C))&&(e+=C)}return!L&&!o.all?0:e}function Yh(t,e){const{iScale:n,vScale:o}=e,r=n.axis==="x"?"x":"y",i=o.axis==="x"?"x":"y",a=Object.keys(t),c=new Array(a.length);let m,C,L;for(m=0,C=a.length;m<C;++m)L=a[m],c[m]={[r]:L,[i]:t[L]};return c}function aa(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function Kh(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function Xh(t){const{min:e,max:n,minDefined:o,maxDefined:r}=t.getUserBounds();return{min:o?e:Number.NEGATIVE_INFINITY,max:r?n:Number.POSITIVE_INFINITY}}function Jh(t,e,n){const o=t[e]||(t[e]={});return o[n]||(o[n]={})}function Jl(t,e,n,o){for(const r of e.getMatchingVisibleMetas(o).reverse()){const i=t[r.index];if(n&&i>0||!n&&i<0)return r.index}return null}function Zl(t,e){const{chart:n,_cachedMeta:o}=t,r=n._stacks||(n._stacks={}),{iScale:i,vScale:a,index:c}=o,m=i.axis,C=a.axis,L=Kh(i,a,o),D=e.length;let W;for(let K=0;K<D;++K){const X=e[K],{[m]:ee,[C]:re}=X,fe=X._stacks||(X._stacks={});W=fe[C]=Jh(r,L,ee),W[c]=re,W._top=Jl(W,a,!0,o.type),W._bottom=Jl(W,a,!1,o.type);const ye=W._visualValues||(W._visualValues={});ye[c]=re}}function la(t,e){const n=t.scales;return Object.keys(n).filter(o=>n[o].axis===e).shift()}function Zh(t,e){return qn(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Qh(t,e,n){return qn(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function Go(t,e){const n=t.controller.index,o=t.vScale&&t.vScale.axis;if(o){e=e||t._parsed;for(const r of e){const i=r._stacks;if(!i||i[o]===void 0||i[o][n]===void 0)return;delete i[o][n],i[o]._visualValues!==void 0&&i[o]._visualValues[n]!==void 0&&delete i[o]._visualValues[n]}}}const sa=t=>t==="reset"||t==="none",Ql=(t,e)=>e?t:Object.assign({},t),em=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:jc(n,!0),values:null};class xn{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=aa(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&Go(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,o=this.getDataset(),r=(D,W,K,X)=>D==="x"?W:D==="r"?X:K,i=n.xAxisID=st(o.xAxisID,la(e,"x")),a=n.yAxisID=st(o.yAxisID,la(e,"y")),c=n.rAxisID=st(o.rAxisID,la(e,"r")),m=n.indexAxis,C=n.iAxisID=r(m,i,a,c),L=n.vAxisID=r(m,a,i,c);n.xScale=this.getScaleForId(i),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(c),n.iScale=this.getScaleForId(C),n.vScale=this.getScaleForId(L)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Hl(this._data,this),e._stacked&&Go(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),o=this._data;if(yt(n)){const r=this._cachedMeta;this._data=Yh(n,r)}else if(o!==n){if(o){Hl(o,this);const r=this._cachedMeta;Go(r),r._parsed=[]}n&&Object.isExtensible(n)&&Ff(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,o=this.getDataset();let r=!1;this._dataCheck();const i=n._stacked;n._stacked=aa(n.vScale,n),n.stack!==o.stack&&(r=!0,Go(n),n.stack=o.stack),this._resyncElements(e),(r||i!==n._stacked)&&(Zl(this,n._parsed),n._stacked=aa(n.vScale,n))}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),o=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:o,_data:r}=this,{iScale:i,_stacked:a}=o,c=i.axis;let m=e===0&&n===r.length?!0:o._sorted,C=e>0&&o._parsed[e-1],L,D,W;if(this._parsing===!1)o._parsed=r,o._sorted=!0,W=r;else{Ot(r[e])?W=this.parseArrayData(o,r,e,n):yt(r[e])?W=this.parseObjectData(o,r,e,n):W=this.parsePrimitiveData(o,r,e,n);const K=()=>D[c]===null||C&&D[c]<C[c];for(L=0;L<n;++L)o._parsed[L+e]=D=W[L],m&&(K()&&(m=!1),C=D);o._sorted=m}a&&Zl(this,W)}parsePrimitiveData(e,n,o,r){const{iScale:i,vScale:a}=e,c=i.axis,m=a.axis,C=i.getLabels(),L=i===a,D=new Array(r);let W,K,X;for(W=0,K=r;W<K;++W)X=W+o,D[W]={[c]:L||i.parse(C[X],X),[m]:a.parse(n[X],X)};return D}parseArrayData(e,n,o,r){const{xScale:i,yScale:a}=e,c=new Array(r);let m,C,L,D;for(m=0,C=r;m<C;++m)L=m+o,D=n[L],c[m]={x:i.parse(D[0],L),y:a.parse(D[1],L)};return c}parseObjectData(e,n,o,r){const{xScale:i,yScale:a}=e,{xAxisKey:c="x",yAxisKey:m="y"}=this._parsing,C=new Array(r);let L,D,W,K;for(L=0,D=r;L<D;++L)W=L+o,K=n[W],C[L]={x:i.parse(jn(K,c),W),y:a.parse(jn(K,m),W)};return C}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,o){const r=this.chart,i=this._cachedMeta,a=n[e.axis],c={keys:jc(r,!0),values:n._stacks[e.axis]._visualValues};return Xl(c,a,i.index,{mode:o})}updateRangeFromParsed(e,n,o,r){const i=o[n.axis];let a=i===null?NaN:i;const c=r&&o._stacks[n.axis];r&&c&&(r.values=c,a=Xl(r,i,this._cachedMeta.index)),e.min=Math.min(e.min,a),e.max=Math.max(e.max,a)}getMinMax(e,n){const o=this._cachedMeta,r=o._parsed,i=o._sorted&&e===o.iScale,a=r.length,c=this._getOtherScale(e),m=em(n,o,this.chart),C={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:L,max:D}=Xh(c);let W,K;function X(){K=r[W];const ee=K[c.axis];return!qt(K[e.axis])||L>ee||D<ee}for(W=0;W<a&&!(!X()&&(this.updateRangeFromParsed(C,e,K,m),i));++W);if(i){for(W=a-1;W>=0;--W)if(!X()){this.updateRangeFromParsed(C,e,K,m);break}}return C}getAllParsedValues(e){const n=this._cachedMeta._parsed,o=[];let r,i,a;for(r=0,i=n.length;r<i;++r)a=n[r][e.axis],qt(a)&&o.push(a);return o}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,o=n.iScale,r=n.vScale,i=this.getParsed(e);return{label:o?""+o.getLabelForValue(i[o.axis]):"",value:r?""+r.getLabelForValue(i[r.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=$h(st(this.options.clip,qh(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,o=this._cachedMeta,r=o.data||[],i=n.chartArea,a=[],c=this._drawStart||0,m=this._drawCount||r.length-c,C=this.options.drawActiveElementsOnTop;let L;for(o.dataset&&o.dataset.draw(e,i,c,m),L=c;L<c+m;++L){const D=r[L];D.hidden||(D.active&&C?a.push(D):D.draw(e,i))}for(L=0;L<a.length;++L)a[L].draw(e,i)}getStyle(e,n){const o=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(e||0,o)}getContext(e,n,o){const r=this.getDataset();let i;if(e>=0&&e<this._cachedMeta.data.length){const a=this._cachedMeta.data[e];i=a.$context||(a.$context=Qh(this.getContext(),e,a)),i.parsed=this.getParsed(e),i.raw=r.data[e],i.index=i.dataIndex=e}else i=this.$context||(this.$context=Zh(this.chart.getContext(),this.index)),i.dataset=r,i.index=i.datasetIndex=this.index;return i.active=!!n,i.mode=o,i}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",o){const r=n==="active",i=this._cachedDataOpts,a=e+"-"+n,c=i[a],m=this.enableOptionSharing&&ir(o);if(c)return Ql(c,m);const C=this.chart.config,L=C.datasetElementScopeKeys(this._type,e),D=r?[`${e}Hover`,"hover",e,""]:[e,""],W=C.getOptionScopes(this.getDataset(),L),K=Object.keys(Vt.elements[e]),X=()=>this.getContext(o,r,n),ee=C.resolveNamedOptions(W,K,X,D);return ee.$shared&&(ee.$shared=m,i[a]=Object.freeze(Ql(ee,m))),ee}_resolveAnimations(e,n,o){const r=this.chart,i=this._cachedDataOpts,a=`animation-${n}`,c=i[a];if(c)return c;let m;if(r.options.animation!==!1){const L=this.chart.config,D=L.datasetAnimationScopeKeys(this._type,n),W=L.getOptionScopes(this.getDataset(),D);m=L.createResolver(W,this.getContext(e,o,n))}const C=new Gc(r,m&&m.animations);return m&&m._cacheable&&(i[a]=Object.freeze(C)),C}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||sa(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const o=this.resolveDataElementOptions(e,n),r=this._sharedOptions,i=this.getSharedOptions(o),a=this.includeOptions(n,i)||i!==r;return this.updateSharedOptions(i,n,o),{sharedOptions:i,includeOptions:a}}updateElement(e,n,o,r){sa(r)?Object.assign(e,o):this._resolveAnimations(n,r).update(e,o)}updateSharedOptions(e,n,o){e&&!sa(n)&&this._resolveAnimations(void 0,n).update(e,o)}_setStyle(e,n,o,r){e.active=r;const i=this.getStyle(n,r);this._resolveAnimations(n,o,r).update(e,{options:!r&&this.getSharedOptions(i)||i})}removeHoverStyle(e,n,o){this._setStyle(e,o,"active",!1)}setHoverStyle(e,n,o){this._setStyle(e,o,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,o=this._cachedMeta.data;for(const[c,m,C]of this._syncList)this[c](m,C);this._syncList=[];const r=o.length,i=n.length,a=Math.min(i,r);a&&this.parse(0,a),i>r?this._insertElements(r,i-r,e):i<r&&this._removeElements(i,r-i)}_insertElements(e,n,o=!0){const r=this._cachedMeta,i=r.data,a=e+n;let c;const m=C=>{for(C.length+=n,c=C.length-1;c>=a;c--)C[c]=C[c-n]};for(m(i),c=e;c<a;++c)i[c]=new this.dataElementType;this._parsing&&m(r._parsed),this.parse(e,n),o&&this.updateElements(i,e,n,"reset")}updateElements(e,n,o,r){}_removeElements(e,n){const o=this._cachedMeta;if(this._parsing){const r=o._parsed.splice(e,n);o._stacked&&Go(o,r)}o.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,o,r]=e;this[n](o,r)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const o=arguments.length-2;o&&this._sync(["_insertElements",e,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}Oe(xn,"defaults",{}),Oe(xn,"datasetElementType",null),Oe(xn,"dataElementType",null);function tm(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let o=[];for(let r=0,i=n.length;r<i;r++)o=o.concat(n[r].controller.getAllParsedValues(t));t._cache.$bar=Sc(o.sort((r,i)=>r-i))}return t._cache.$bar}function nm(t){const e=t.iScale,n=tm(e,t.type);let o=e._length,r,i,a,c;const m=()=>{a===32767||a===-32768||(ir(c)&&(o=Math.min(o,Math.abs(a-c)||o)),c=a)};for(r=0,i=n.length;r<i;++r)a=e.getPixelForValue(n[r]),m();for(c=void 0,r=0,i=e.ticks.length;r<i;++r)a=e.getPixelForTick(r),m();return o}function om(t,e,n,o){const r=n.barThickness;let i,a;return vt(r)?(i=e.min*n.categoryPercentage,a=n.barPercentage):(i=r*o,a=1),{chunk:i/o,ratio:a,start:e.pixels[t]-i/2}}function rm(t,e,n,o){const r=e.pixels,i=r[t];let a=t>0?r[t-1]:null,c=t<r.length-1?r[t+1]:null;const m=n.categoryPercentage;a===null&&(a=i-(c===null?e.end-e.start:c-i)),c===null&&(c=i+i-a);const C=i-(i-Math.min(a,c))/2*m;return{chunk:Math.abs(c-a)/2*m/o,ratio:n.barPercentage,start:C}}function im(t,e,n,o){const r=n.parse(t[0],o),i=n.parse(t[1],o),a=Math.min(r,i),c=Math.max(r,i);let m=a,C=c;Math.abs(a)>Math.abs(c)&&(m=c,C=a),e[n.axis]=C,e._custom={barStart:m,barEnd:C,start:r,end:i,min:a,max:c}}function Wc(t,e,n,o){return Ot(t)?im(t,e,n,o):e[n.axis]=n.parse(t,o),e}function es(t,e,n,o){const r=t.iScale,i=t.vScale,a=r.getLabels(),c=r===i,m=[];let C,L,D,W;for(C=n,L=n+o;C<L;++C)W=e[C],D={},D[r.axis]=c||r.parse(a[C],C),m.push(Wc(W,D,i,C));return m}function ca(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function am(t,e,n){return t!==0?Mn(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function lm(t){let e,n,o,r,i;return t.horizontal?(e=t.base>t.x,n="left",o="right"):(e=t.base<t.y,n="bottom",o="top"),e?(r="end",i="start"):(r="start",i="end"),{start:n,end:o,reverse:e,top:r,bottom:i}}function sm(t,e,n,o){let r=e.borderSkipped;const i={};if(!r){t.borderSkipped=i;return}if(r===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:c,reverse:m,top:C,bottom:L}=lm(t);r==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===o?r=C:(n._bottom||0)===o?r=L:(i[ts(L,a,c,m)]=!0,r=C)),i[ts(r,a,c,m)]=!0,t.borderSkipped=i}function ts(t,e,n,o){return o?(t=cm(t,e,n),t=ns(t,n,e)):t=ns(t,e,n),t}function cm(t,e,n){return t===e?n:t===n?e:t}function ns(t,e,n){return t==="start"?e:t==="end"?n:t}function dm(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class mi extends xn{parsePrimitiveData(e,n,o,r){return es(e,n,o,r)}parseArrayData(e,n,o,r){return es(e,n,o,r)}parseObjectData(e,n,o,r){const{iScale:i,vScale:a}=e,{xAxisKey:c="x",yAxisKey:m="y"}=this._parsing,C=i.axis==="x"?c:m,L=a.axis==="x"?c:m,D=[];let W,K,X,ee;for(W=o,K=o+r;W<K;++W)ee=n[W],X={},X[i.axis]=i.parse(jn(ee,C),W),D.push(Wc(jn(ee,L),X,a,W));return D}updateRangeFromParsed(e,n,o,r){super.updateRangeFromParsed(e,n,o,r);const i=o._custom;i&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,i.min),e.max=Math.max(e.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:o,vScale:r}=n,i=this.getParsed(e),a=i._custom,c=ca(a)?"["+a.start+", "+a.end+"]":""+r.getLabelForValue(i[r.axis]);return{label:""+o.getLabelForValue(i[o.axis]),value:c}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,o,r){const i=r==="reset",{index:a,_cachedMeta:{vScale:c}}=this,m=c.getBasePixel(),C=c.isHorizontal(),L=this._getRuler(),{sharedOptions:D,includeOptions:W}=this._getSharedOptions(n,r);for(let K=n;K<n+o;K++){const X=this.getParsed(K),ee=i||vt(X[c.axis])?{base:m,head:m}:this._calculateBarValuePixels(K),re=this._calculateBarIndexPixels(K,L),fe=(X._stacks||{})[c.axis],ye={horizontal:C,base:ee.base,enableBorderRadius:!fe||ca(X._custom)||a===fe._top||a===fe._bottom,x:C?ee.head:re.center,y:C?re.center:ee.head,height:C?re.size:Math.abs(ee.size),width:C?Math.abs(ee.size):re.size};W&&(ye.options=D||this.resolveDataElementOptions(K,e[K].active?"active":r));const xe=ye.options||e[K].options;sm(ye,xe,fe,a),dm(ye,xe,L.ratio),this.updateElement(e[K],K,ye,r)}}_getStacks(e,n){const{iScale:o}=this._cachedMeta,r=o.getMatchingVisibleMetas(this._type).filter(L=>L.controller.options.grouped),i=o.options.stacked,a=[],c=this._cachedMeta.controller.getParsed(n),m=c&&c[o.axis],C=L=>{const D=L._parsed.find(K=>K[o.axis]===m),W=D&&D[L.vScale.axis];if(vt(W)||isNaN(W))return!0};for(const L of r)if(!(n!==void 0&&C(L))&&((i===!1||a.indexOf(L.stack)===-1||i===void 0&&L.stack===void 0)&&a.push(L.stack),L.index===e))break;return a.length||a.push(void 0),a}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const e=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(e).filter(o=>e[o].axis===n).shift()}_getAxis(){const e={},n=this.getFirstScaleIdForIndexAxis();for(const o of this.chart.data.datasets)e[st(this.chart.options.indexAxis==="x"?o.xAxisID:o.yAxisID,n)]=!0;return Object.keys(e)}_getStackIndex(e,n,o){const r=this._getStacks(e,o),i=n!==void 0?r.indexOf(n):-1;return i===-1?r.length-1:i}_getRuler(){const e=this.options,n=this._cachedMeta,o=n.iScale,r=[];let i,a;for(i=0,a=n.data.length;i<a;++i)r.push(o.getPixelForValue(this.getParsed(i)[o.axis],i));const c=e.barThickness;return{min:c||nm(n),pixels:r,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:e.grouped,ratio:c?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:o,index:r},options:{base:i,minBarLength:a}}=this,c=i||0,m=this.getParsed(e),C=m._custom,L=ca(C);let D=m[n.axis],W=0,K=o?this.applyStack(n,m,o):D,X,ee;K!==D&&(W=K-D,K=D),L&&(D=C.barStart,K=C.barEnd-C.barStart,D!==0&&Mn(D)!==Mn(C.barEnd)&&(W=0),W+=D);const re=!vt(i)&&!L?i:W;let fe=n.getPixelForValue(re);if(this.chart.getDataVisibility(e)?X=n.getPixelForValue(W+K):X=fe,ee=X-fe,Math.abs(ee)<a){ee=am(ee,n,c)*a,D===c&&(fe-=ee/2);const ye=n.getPixelForDecimal(0),xe=n.getPixelForDecimal(1),ke=Math.min(ye,xe),ve=Math.max(ye,xe);fe=Math.max(Math.min(fe,ve),ke),X=fe+ee,o&&!L&&(m._stacks[n.axis]._visualValues[r]=n.getValueForPixel(X)-n.getValueForPixel(fe))}if(fe===n.getPixelForValue(c)){const ye=Mn(ee)*n.getLineWidthForValue(c)/2;fe+=ye,ee-=ye}return{size:ee,base:fe,head:X,center:X+ee/2}}_calculateBarIndexPixels(e,n){const o=n.scale,r=this.options,i=r.skipNull,a=st(r.maxBarThickness,1/0);let c,m;const C=this._getAxisCount();if(n.grouped){const L=i?this._getStackCount(e):n.stackCount,D=r.barThickness==="flex"?rm(e,n,r,L*C):om(e,n,r,L*C),W=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,K=this._getAxis().indexOf(st(W,this.getFirstScaleIdForIndexAxis())),X=this._getStackIndex(this.index,this._cachedMeta.stack,i?e:void 0)+K;c=D.start+D.chunk*X+D.chunk/2,m=Math.min(a,D.chunk*D.ratio)}else c=o.getPixelForValue(this.getParsed(e)[o.axis],e),m=Math.min(a,n.min*n.ratio);return{base:c-m/2,head:c+m/2,center:c,size:m}}draw(){const e=this._cachedMeta,n=e.vScale,o=e.data,r=o.length;let i=0;for(;i<r;++i)this.getParsed(i)[n.axis]!==null&&!o[i].hidden&&o[i].draw(this._ctx)}}Oe(mi,"id","bar"),Oe(mi,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),Oe(mi,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class gi extends xn{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,o,r){const i=super.parsePrimitiveData(e,n,o,r);for(let a=0;a<i.length;a++)i[a]._custom=this.resolveDataElementOptions(a+o).radius;return i}parseArrayData(e,n,o,r){const i=super.parseArrayData(e,n,o,r);for(let a=0;a<i.length;a++){const c=n[o+a];i[a]._custom=st(c[2],this.resolveDataElementOptions(a+o).radius)}return i}parseObjectData(e,n,o,r){const i=super.parseObjectData(e,n,o,r);for(let a=0;a<i.length;a++){const c=n[o+a];i[a]._custom=st(c&&c.r&&+c.r,this.resolveDataElementOptions(a+o).radius)}return i}getMaxOverflow(){const e=this._cachedMeta.data;let n=0;for(let o=e.length-1;o>=0;--o)n=Math.max(n,e[o].size(this.resolveDataElementOptions(o))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:r,yScale:i}=n,a=this.getParsed(e),c=r.getLabelForValue(a.x),m=i.getLabelForValue(a.y),C=a._custom;return{label:o[e]||"",value:"("+c+", "+m+(C?", "+C:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,o,r){const i=r==="reset",{iScale:a,vScale:c}=this._cachedMeta,{sharedOptions:m,includeOptions:C}=this._getSharedOptions(n,r),L=a.axis,D=c.axis;for(let W=n;W<n+o;W++){const K=e[W],X=!i&&this.getParsed(W),ee={},re=ee[L]=i?a.getPixelForDecimal(.5):a.getPixelForValue(X[L]),fe=ee[D]=i?c.getBasePixel():c.getPixelForValue(X[D]);ee.skip=isNaN(re)||isNaN(fe),C&&(ee.options=m||this.resolveDataElementOptions(W,K.active?"active":r),i&&(ee.options.radius=0)),this.updateElement(K,W,ee,r)}}resolveDataElementOptions(e,n){const o=this.getParsed(e);let r=super.resolveDataElementOptions(e,n);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const i=r.radius;return n!=="active"&&(r.radius=0),r.radius+=st(o&&o._custom,i),r}}Oe(gi,"id","bubble"),Oe(gi,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),Oe(gi,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function um(t,e,n){let o=1,r=1,i=0,a=0;if(e<Tt){const c=t,m=c+e,C=Math.cos(c),L=Math.sin(c),D=Math.cos(m),W=Math.sin(m),K=(xe,ke,ve)=>ar(xe,c,m,!0)?1:Math.max(ke,ke*n,ve,ve*n),X=(xe,ke,ve)=>ar(xe,c,m,!0)?-1:Math.min(ke,ke*n,ve,ve*n),ee=K(0,C,D),re=K(Pt,L,W),fe=X(It,C,D),ye=X(It+Pt,L,W);o=(ee-fe)/2,r=(re-ye)/2,i=-(ee+fe)/2,a=-(re+ye)/2}return{ratioX:o,ratioY:r,offsetX:i,offsetY:a}}class Mo extends xn{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const o=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=o;else{let i=m=>+o[m];if(yt(o[e])){const{key:m="value"}=this._parsing;i=C=>+jn(o[C],m)}let a,c;for(a=e,c=e+n;a<c;++a)r._parsed[a]=i(a)}}_getRotation(){return Cn(this.options.rotation-90)}_getCircumference(){return Cn(this.options.circumference)}_getRotationExtents(){let e=Tt,n=-Tt;for(let o=0;o<this.chart.data.datasets.length;++o)if(this.chart.isDatasetVisible(o)&&this.chart.getDatasetMeta(o).type===this._type){const r=this.chart.getDatasetMeta(o).controller,i=r._getRotation(),a=r._getCircumference();e=Math.min(e,i),n=Math.max(n,i+a)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:o}=n,r=this._cachedMeta,i=r.data,a=this.getMaxBorderWidth()+this.getMaxOffset(i)+this.options.spacing,c=Math.max((Math.min(o.width,o.height)-a)/2,0),m=Math.min(bf(this.options.cutout,c),1),C=this._getRingWeight(this.index),{circumference:L,rotation:D}=this._getRotationExtents(),{ratioX:W,ratioY:K,offsetX:X,offsetY:ee}=um(D,L,m),re=(o.width-a)/W,fe=(o.height-a)/K,ye=Math.max(Math.min(re,fe)/2,0),xe=vc(this.options.radius,ye),ke=Math.max(xe*m,0),ve=(xe-ke)/this._getVisibleDatasetWeightTotal();this.offsetX=X*xe,this.offsetY=ee*xe,r.total=this.calculateTotal(),this.outerRadius=xe-ve*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-ve*C,0),this.updateElements(i,0,i.length,e)}_circumference(e,n){const o=this.options,r=this._cachedMeta,i=this._getCircumference();return n&&o.animation.animateRotate||!this.chart.getDataVisibility(e)||r._parsed[e]===null||r.data[e].hidden?0:this.calculateCircumference(r._parsed[e]*i/Tt)}updateElements(e,n,o,r){const i=r==="reset",a=this.chart,c=a.chartArea,C=a.options.animation,L=(c.left+c.right)/2,D=(c.top+c.bottom)/2,W=i&&C.animateScale,K=W?0:this.innerRadius,X=W?0:this.outerRadius,{sharedOptions:ee,includeOptions:re}=this._getSharedOptions(n,r);let fe=this._getRotation(),ye;for(ye=0;ye<n;++ye)fe+=this._circumference(ye,i);for(ye=n;ye<n+o;++ye){const xe=this._circumference(ye,i),ke=e[ye],ve={x:L+this.offsetX,y:D+this.offsetY,startAngle:fe,endAngle:fe+xe,circumference:xe,outerRadius:X,innerRadius:K};re&&(ve.options=ee||this.resolveDataElementOptions(ye,ke.active?"active":r)),fe+=xe,this.updateElement(ke,ye,ve,r)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let o=0,r;for(r=0;r<n.length;r++){const i=e._parsed[r];i!==null&&!isNaN(i)&&this.chart.getDataVisibility(r)&&!n[r].hidden&&(o+=Math.abs(i))}return o}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?Tt*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,r=o.data.labels||[],i=Ua(n._parsed[e],o.options.locale);return{label:r[e]||"",value:i}}getMaxBorderWidth(e){let n=0;const o=this.chart;let r,i,a,c,m;if(!e){for(r=0,i=o.data.datasets.length;r<i;++r)if(o.isDatasetVisible(r)){a=o.getDatasetMeta(r),e=a.data,c=a.controller;break}}if(!e)return 0;for(r=0,i=e.length;r<i;++r)m=c.resolveDataElementOptions(r),m.borderAlign!=="inner"&&(n=Math.max(n,m.borderWidth||0,m.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let o=0,r=e.length;o<r;++o){const i=this.resolveDataElementOptions(o);n=Math.max(n,i.offset||0,i.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let o=0;o<e;++o)this.chart.isDatasetVisible(o)&&(n+=this._getRingWeight(o));return n}_getRingWeight(e){return Math.max(st(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}Oe(Mo,"id","doughnut"),Oe(Mo,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),Oe(Mo,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),Oe(Mo,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:r}}=e.legend.options;return n.labels.map((i,a)=>{const m=e.getDatasetMeta(0).controller.getStyle(a);return{text:i,fillStyle:m.backgroundColor,strokeStyle:m.borderColor,fontColor:r,lineWidth:m.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(a),index:a}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}}});class yi extends xn{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:o,data:r=[],_dataset:i}=n,a=this.chart._animationsDisabled;let{start:c,count:m}=wc(n,r,a);this._drawStart=c,this._drawCount=m,Ac(n)&&(c=0,m=r.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!i._decimated,o.points=r;const C=this.resolveDatasetElementOptions(e);this.options.showLine||(C.borderWidth=0),C.segment=this.options.segment,this.updateElement(o,void 0,{animated:!a,options:C},e),this.updateElements(r,c,m,e)}updateElements(e,n,o,r){const i=r==="reset",{iScale:a,vScale:c,_stacked:m,_dataset:C}=this._cachedMeta,{sharedOptions:L,includeOptions:D}=this._getSharedOptions(n,r),W=a.axis,K=c.axis,{spanGaps:X,segment:ee}=this.options,re=ko(X)?X:Number.POSITIVE_INFINITY,fe=this.chart._animationsDisabled||i||r==="none",ye=n+o,xe=e.length;let ke=n>0&&this.getParsed(n-1);for(let ve=0;ve<xe;++ve){const Ee=e[ve],Me=fe?Ee:{};if(ve<n||ve>=ye){Me.skip=!0;continue}const Ie=this.getParsed(ve),Te=vt(Ie[K]),We=Me[W]=a.getPixelForValue(Ie[W],ve),nt=Me[K]=i||Te?c.getBasePixel():c.getPixelForValue(m?this.applyStack(c,Ie,m):Ie[K],ve);Me.skip=isNaN(We)||isNaN(nt)||Te,Me.stop=ve>0&&Math.abs(Ie[W]-ke[W])>re,ee&&(Me.parsed=Ie,Me.raw=C.data[ve]),D&&(Me.options=L||this.resolveDataElementOptions(ve,Ee.active?"active":r)),fe||this.updateElement(Ee,ve,Me,r),ke=Ie}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,o=n.options&&n.options.borderWidth||0,r=e.data||[];if(!r.length)return o;const i=r[0].size(this.resolveDataElementOptions(0)),a=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(o,i,a)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Oe(yi,"id","line"),Oe(yi,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Oe(yi,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Ca extends Mo{}Oe(Ca,"id","pie"),Oe(Ca,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class pi extends xn{getLabelAndValue(e){const n=this._cachedMeta.vScale,o=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(o[n.axis])}}parseObjectData(e,n,o,r){return gh.bind(this)(e,n,o,r)}update(e){const n=this._cachedMeta,o=n.dataset,r=n.data||[],i=n.iScale.getLabels();if(o.points=r,e!=="resize"){const a=this.resolveDatasetElementOptions(e);this.options.showLine||(a.borderWidth=0);const c={_loop:!0,_fullLoop:i.length===r.length,options:a};this.updateElement(o,void 0,c,e)}this.updateElements(r,0,r.length,e)}updateElements(e,n,o,r){const i=this._cachedMeta.rScale,a=r==="reset";for(let c=n;c<n+o;c++){const m=e[c],C=this.resolveDataElementOptions(c,m.active?"active":r),L=i.getPointPositionForValue(c,this.getParsed(c).r),D=a?i.xCenter:L.x,W=a?i.yCenter:L.y,K={x:D,y:W,angle:L.angle,skip:isNaN(D)||isNaN(W),options:C};this.updateElement(m,c,K,r)}}}Oe(pi,"id","radar"),Oe(pi,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),Oe(pi,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class _i extends xn{getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:r,yScale:i}=n,a=this.getParsed(e),c=r.getLabelForValue(a.x),m=i.getLabelForValue(a.y);return{label:o[e]||"",value:"("+c+", "+m+")"}}update(e){const n=this._cachedMeta,{data:o=[]}=n,r=this.chart._animationsDisabled;let{start:i,count:a}=wc(n,o,r);if(this._drawStart=i,this._drawCount=a,Ac(n)&&(i=0,a=o.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:c,_dataset:m}=n;c._chart=this.chart,c._datasetIndex=this.index,c._decimated=!!m._decimated,c.points=o;const C=this.resolveDatasetElementOptions(e);C.segment=this.options.segment,this.updateElement(c,void 0,{animated:!r,options:C},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(o,i,a,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,o,r){const i=r==="reset",{iScale:a,vScale:c,_stacked:m,_dataset:C}=this._cachedMeta,L=this.resolveDataElementOptions(n,r),D=this.getSharedOptions(L),W=this.includeOptions(r,D),K=a.axis,X=c.axis,{spanGaps:ee,segment:re}=this.options,fe=ko(ee)?ee:Number.POSITIVE_INFINITY,ye=this.chart._animationsDisabled||i||r==="none";let xe=n>0&&this.getParsed(n-1);for(let ke=n;ke<n+o;++ke){const ve=e[ke],Ee=this.getParsed(ke),Me=ye?ve:{},Ie=vt(Ee[X]),Te=Me[K]=a.getPixelForValue(Ee[K],ke),We=Me[X]=i||Ie?c.getBasePixel():c.getPixelForValue(m?this.applyStack(c,Ee,m):Ee[X],ke);Me.skip=isNaN(Te)||isNaN(We)||Ie,Me.stop=ke>0&&Math.abs(Ee[K]-xe[K])>fe,re&&(Me.parsed=Ee,Me.raw=C.data[ke]),W&&(Me.options=D||this.resolveDataElementOptions(ke,ve.active?"active":r)),ye||this.updateElement(ve,ke,Me,r),xe=Ee}this.updateSharedOptions(D,r,L)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let c=0;for(let m=n.length-1;m>=0;--m)c=Math.max(c,n[m].size(this.resolveDataElementOptions(m))/2);return c>0&&c}const o=e.dataset,r=o.options&&o.options.borderWidth||0;if(!n.length)return r;const i=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(r,i,a)/2}}Oe(_i,"id","scatter"),Oe(_i,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),Oe(_i,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});function oo(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Xa{constructor(e){Oe(this,"options");this.options=e||{}}static override(e){Object.assign(Xa.prototype,e)}init(){}formats(){return oo()}parse(){return oo()}format(){return oo()}add(){return oo()}diff(){return oo()}startOf(){return oo()}endOf(){return oo()}}var fm={_date:Xa};function hm(t,e,n,o){const{controller:r,data:i,_sorted:a}=t,c=r._cachedMeta.iScale,m=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(c&&e===c.axis&&e!=="r"&&a&&i.length){const C=c._reversePixels?Rf:so;if(o){if(r._sharedOptions){const L=i[0],D=typeof L.getRange=="function"&&L.getRange(e);if(D){const W=C(i,e,n-D),K=C(i,e,n+D);return{lo:W.lo,hi:K.hi}}}}else{const L=C(i,e,n);if(m){const{vScale:D}=r._cachedMeta,{_parsed:W}=t,K=W.slice(0,L.lo+1).reverse().findIndex(ee=>!vt(ee[D.axis]));L.lo-=Math.max(0,K);const X=W.slice(L.hi).findIndex(ee=>!vt(ee[D.axis]));L.hi+=Math.max(0,X)}return L}}return{lo:0,hi:i.length-1}}function Oi(t,e,n,o,r){const i=t.getSortedVisibleDatasetMetas(),a=n[e];for(let c=0,m=i.length;c<m;++c){const{index:C,data:L}=i[c],{lo:D,hi:W}=hm(i[c],e,a,r);for(let K=D;K<=W;++K){const X=L[K];X.skip||o(X,C,K)}}}function mm(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(o,r){const i=e?Math.abs(o.x-r.x):0,a=n?Math.abs(o.y-r.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(a,2))}}function da(t,e,n,o,r){const i=[];return!r&&!t.isPointInArea(e)||Oi(t,n,e,function(c,m,C){!r&&!Nn(c,t.chartArea,0)||c.inRange(e.x,e.y,o)&&i.push({element:c,datasetIndex:m,index:C})},!0),i}function gm(t,e,n,o){let r=[];function i(a,c,m){const{startAngle:C,endAngle:L}=a.getProps(["startAngle","endAngle"],o),{angle:D}=Mc(a,{x:e.x,y:e.y});ar(D,C,L)&&r.push({element:a,datasetIndex:c,index:m})}return Oi(t,n,e,i),r}function ym(t,e,n,o,r,i){let a=[];const c=mm(n);let m=Number.POSITIVE_INFINITY;function C(L,D,W){const K=L.inRange(e.x,e.y,r);if(o&&!K)return;const X=L.getCenterPoint(r);if(!(!!i||t.isPointInArea(X))&&!K)return;const re=c(e,X);re<m?(a=[{element:L,datasetIndex:D,index:W}],m=re):re===m&&a.push({element:L,datasetIndex:D,index:W})}return Oi(t,n,e,C),a}function ua(t,e,n,o,r,i){return!i&&!t.isPointInArea(e)?[]:n==="r"&&!o?gm(t,e,n,r):ym(t,e,n,o,r,i)}function os(t,e,n,o,r){const i=[],a=n==="x"?"inXRange":"inYRange";let c=!1;return Oi(t,n,e,(m,C,L)=>{m[a]&&m[a](e[n],r)&&(i.push({element:m,datasetIndex:C,index:L}),c=c||m.inRange(e.x,e.y,r))}),o&&!c?[]:i}var pm={modes:{index(t,e,n,o){const r=ro(e,t),i=n.axis||"x",a=n.includeInvisible||!1,c=n.intersect?da(t,r,i,o,a):ua(t,r,i,!1,o,a),m=[];return c.length?(t.getSortedVisibleDatasetMetas().forEach(C=>{const L=c[0].index,D=C.data[L];D&&!D.skip&&m.push({element:D,datasetIndex:C.index,index:L})}),m):[]},dataset(t,e,n,o){const r=ro(e,t),i=n.axis||"xy",a=n.includeInvisible||!1;let c=n.intersect?da(t,r,i,o,a):ua(t,r,i,!1,o,a);if(c.length>0){const m=c[0].datasetIndex,C=t.getDatasetMeta(m).data;c=[];for(let L=0;L<C.length;++L)c.push({element:C[L],datasetIndex:m,index:L})}return c},point(t,e,n,o){const r=ro(e,t),i=n.axis||"xy",a=n.includeInvisible||!1;return da(t,r,i,o,a)},nearest(t,e,n,o){const r=ro(e,t),i=n.axis||"xy",a=n.includeInvisible||!1;return ua(t,r,i,n.intersect,o,a)},x(t,e,n,o){const r=ro(e,t);return os(t,r,"x",n.intersect,o)},y(t,e,n,o){const r=ro(e,t);return os(t,r,"y",n.intersect,o)}}};const qc=["left","top","right","bottom"];function jo(t,e){return t.filter(n=>n.pos===e)}function rs(t,e){return t.filter(n=>qc.indexOf(n.pos)===-1&&n.box.axis===e)}function Wo(t,e){return t.sort((n,o)=>{const r=e?o:n,i=e?n:o;return r.weight===i.weight?r.index-i.index:r.weight-i.weight})}function _m(t){const e=[];let n,o,r,i,a,c;for(n=0,o=(t||[]).length;n<o;++n)r=t[n],{position:i,options:{stack:a,stackWeight:c=1}}=r,e.push({index:n,box:r,pos:i,horizontal:r.isHorizontal(),weight:r.weight,stack:a&&i+a,stackWeight:c});return e}function vm(t){const e={};for(const n of t){const{stack:o,pos:r,stackWeight:i}=n;if(!o||!qc.includes(r))continue;const a=e[o]||(e[o]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=i}return e}function bm(t,e){const n=vm(t),{vBoxMaxWidth:o,hBoxMaxHeight:r}=e;let i,a,c;for(i=0,a=t.length;i<a;++i){c=t[i];const{fullSize:m}=c.box,C=n[c.stack],L=C&&c.stackWeight/C.weight;c.horizontal?(c.width=L?L*o:m&&e.availableWidth,c.height=r):(c.width=o,c.height=L?L*r:m&&e.availableHeight)}return n}function Cm(t){const e=_m(t),n=Wo(e.filter(C=>C.box.fullSize),!0),o=Wo(jo(e,"left"),!0),r=Wo(jo(e,"right")),i=Wo(jo(e,"top"),!0),a=Wo(jo(e,"bottom")),c=rs(e,"x"),m=rs(e,"y");return{fullSize:n,leftAndTop:o.concat(i),rightAndBottom:r.concat(m).concat(a).concat(c),chartArea:jo(e,"chartArea"),vertical:o.concat(r).concat(m),horizontal:i.concat(a).concat(c)}}function is(t,e,n,o){return Math.max(t[n],e[n])+Math.max(t[o],e[o])}function $c(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Mm(t,e,n,o){const{pos:r,box:i}=n,a=t.maxPadding;if(!yt(r)){n.size&&(t[r]-=n.size);const D=o[n.stack]||{size:0,count:1};D.size=Math.max(D.size,n.horizontal?i.height:i.width),n.size=D.size/D.count,t[r]+=n.size}i.getPadding&&$c(a,i.getPadding());const c=Math.max(0,e.outerWidth-is(a,t,"left","right")),m=Math.max(0,e.outerHeight-is(a,t,"top","bottom")),C=c!==t.w,L=m!==t.h;return t.w=c,t.h=m,n.horizontal?{same:C,other:L}:{same:L,other:C}}function xm(t){const e=t.maxPadding;function n(o){const r=Math.max(e[o]-t[o],0);return t[o]+=r,r}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function Sm(t,e){const n=e.maxPadding;function o(r){const i={left:0,top:0,right:0,bottom:0};return r.forEach(a=>{i[a]=Math.max(e[a],n[a])}),i}return o(t?["left","right"]:["top","bottom"])}function Ko(t,e,n,o){const r=[];let i,a,c,m,C,L;for(i=0,a=t.length,C=0;i<a;++i){c=t[i],m=c.box,m.update(c.width||e.w,c.height||e.h,Sm(c.horizontal,e));const{same:D,other:W}=Mm(e,n,c,o);C|=D&&r.length,L=L||W,m.fullSize||r.push(c)}return C&&Ko(r,e,n,o)||L}function ri(t,e,n,o,r){t.top=n,t.left=e,t.right=e+o,t.bottom=n+r,t.width=o,t.height=r}function as(t,e,n,o){const r=n.padding;let{x:i,y:a}=e;for(const c of t){const m=c.box,C=o[c.stack]||{placed:0,weight:1},L=c.stackWeight/C.weight||1;if(c.horizontal){const D=e.w*L,W=C.size||m.height;ir(C.start)&&(a=C.start),m.fullSize?ri(m,r.left,a,n.outerWidth-r.right-r.left,W):ri(m,e.left+C.placed,a,D,W),C.start=a,C.placed+=D,a=m.bottom}else{const D=e.h*L,W=C.size||m.width;ir(C.start)&&(i=C.start),m.fullSize?ri(m,i,r.top,W,n.outerHeight-r.bottom-r.top):ri(m,i,e.top+C.placed,W,D),C.start=i,C.placed+=D,i=m.right}}e.x=i,e.y=a}var Dn={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,o){if(!t)return;const r=Jt(t.options.layout.padding),i=Math.max(e-r.width,0),a=Math.max(n-r.height,0),c=Cm(t.boxes),m=c.vertical,C=c.horizontal;kt(t.boxes,ee=>{typeof ee.beforeLayout=="function"&&ee.beforeLayout()});const L=m.reduce((ee,re)=>re.box.options&&re.box.options.display===!1?ee:ee+1,0)||1,D=Object.freeze({outerWidth:e,outerHeight:n,padding:r,availableWidth:i,availableHeight:a,vBoxMaxWidth:i/2/L,hBoxMaxHeight:a/2}),W=Object.assign({},r);$c(W,Jt(o));const K=Object.assign({maxPadding:W,w:i,h:a,x:r.left,y:r.top},r),X=bm(m.concat(C),D);Ko(c.fullSize,K,D,X),Ko(m,K,D,X),Ko(C,K,D,X)&&Ko(m,K,D,X),xm(K),as(c.leftAndTop,K,D,X),K.x+=K.w,K.y+=K.h,as(c.rightAndBottom,K,D,X),t.chartArea={left:K.left,top:K.top,right:K.left+K.w,bottom:K.top+K.h,height:K.h,width:K.w},kt(c.chartArea,ee=>{const re=ee.box;Object.assign(re,t.chartArea),re.update(K.w,K.h,{left:0,top:0,right:0,bottom:0})})}};class Yc{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,o){}removeEventListener(e,n,o){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,o,r){return n=Math.max(0,n||e.width),o=o||e.height,{width:n,height:Math.max(0,r?Math.floor(n/r):o)}}isAttached(e){return!0}updateConfig(e){}}class km extends Yc{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const vi="$chartjs",Im={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ls=t=>t===null||t==="";function Em(t,e){const n=t.style,o=t.getAttribute("height"),r=t.getAttribute("width");if(t[vi]={initial:{height:o,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",ls(r)){const i=jl(t,"width");i!==void 0&&(t.width=i)}if(ls(o))if(t.style.height==="")t.height=t.width/(e||2);else{const i=jl(t,"height");i!==void 0&&(t.height=i)}return t}const Kc=Ah?{passive:!0}:!1;function wm(t,e,n){t&&t.addEventListener(e,n,Kc)}function Am(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,Kc)}function Tm(t,e){const n=Im[t.type]||t.type,{x:o,y:r}=ro(t,e);return{type:n,chart:e,native:t,x:o!==void 0?o:null,y:r!==void 0?r:null}}function wi(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function Bm(t,e,n){const o=t.canvas,r=new MutationObserver(i=>{let a=!1;for(const c of i)a=a||wi(c.addedNodes,o),a=a&&!wi(c.removedNodes,o);a&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}function Lm(t,e,n){const o=t.canvas,r=new MutationObserver(i=>{let a=!1;for(const c of i)a=a||wi(c.removedNodes,o),a=a&&!wi(c.addedNodes,o);a&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}const sr=new Map;let ss=0;function Xc(){const t=window.devicePixelRatio;t!==ss&&(ss=t,sr.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function Nm(t,e){sr.size||window.addEventListener("resize",Xc),sr.set(t,e)}function Rm(t){sr.delete(t),sr.size||window.removeEventListener("resize",Xc)}function Hm(t,e,n){const o=t.canvas,r=o&&Ka(o);if(!r)return;const i=Ic((c,m)=>{const C=r.clientWidth;n(c,m),C<r.clientWidth&&n()},window),a=new ResizeObserver(c=>{const m=c[0],C=m.contentRect.width,L=m.contentRect.height;C===0&&L===0||i(C,L)});return a.observe(r),Nm(t,i),a}function fa(t,e,n){n&&n.disconnect(),e==="resize"&&Rm(t)}function Fm(t,e,n){const o=t.canvas,r=Ic(i=>{t.ctx!==null&&n(Tm(i,t))},t);return wm(o,e,r),r}class Om extends Yc{acquireContext(e,n){const o=e&&e.getContext&&e.getContext("2d");return o&&o.canvas===e?(Em(e,n),o):null}releaseContext(e){const n=e.canvas;if(!n[vi])return!1;const o=n[vi].initial;["height","width"].forEach(i=>{const a=o[i];vt(a)?n.removeAttribute(i):n.setAttribute(i,a)});const r=o.style||{};return Object.keys(r).forEach(i=>{n.style[i]=r[i]}),n.width=n.width,delete n[vi],!0}addEventListener(e,n,o){this.removeEventListener(e,n);const r=e.$proxies||(e.$proxies={}),a={attach:Bm,detach:Lm,resize:Hm}[n]||Fm;r[n]=a(e,n,o)}removeEventListener(e,n){const o=e.$proxies||(e.$proxies={}),r=o[n];if(!r)return;({attach:fa,detach:fa,resize:fa}[n]||Am)(e,n,r),o[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,o,r){return wh(e,n,o,r)}isAttached(e){const n=e&&Ka(e);return!!(n&&n.isConnected)}}function Vm(t){return!Ya()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?km:Om}var di;let $n=(di=class{constructor(){Oe(this,"x");Oe(this,"y");Oe(this,"active",!1);Oe(this,"options");Oe(this,"$animations")}tooltipPosition(e){const{x:n,y:o}=this.getProps(["x","y"],e);return{x:n,y:o}}hasValue(){return ko(this.x)&&ko(this.y)}getProps(e,n){const o=this.$animations;if(!n||!o)return this;const r={};return e.forEach(i=>{r[i]=o[i]&&o[i].active()?o[i]._to:this[i]}),r}},Oe(di,"defaults",{}),Oe(di,"defaultRoutes"),di);function Pm(t,e){const n=t.options.ticks,o=Dm(t),r=Math.min(n.maxTicksLimit||o,o),i=n.major.enabled?Um(e):[],a=i.length,c=i[0],m=i[a-1],C=[];if(a>r)return Gm(e,C,i,a/r),C;const L=zm(i,e,r);if(a>0){let D,W;const K=a>1?Math.round((m-c)/(a-1)):null;for(ii(e,C,L,vt(K)?0:c-K,c),D=0,W=a-1;D<W;D++)ii(e,C,L,i[D],i[D+1]);return ii(e,C,L,m,vt(K)?e.length:m+K),C}return ii(e,C,L),C}function Dm(t){const e=t.options.offset,n=t._tickSize(),o=t._length/n+(e?0:1),r=t._maxLength/n;return Math.floor(Math.min(o,r))}function zm(t,e,n){const o=jm(t),r=e.length/n;if(!o)return Math.max(r,1);const i=wf(o);for(let a=0,c=i.length-1;a<c;a++){const m=i[a];if(m>r)return m}return Math.max(r,1)}function Um(t){const e=[];let n,o;for(n=0,o=t.length;n<o;n++)t[n].major&&e.push(n);return e}function Gm(t,e,n,o){let r=0,i=n[0],a;for(o=Math.ceil(o),a=0;a<t.length;a++)a===i&&(e.push(t[a]),r++,i=n[r*o])}function ii(t,e,n,o,r){const i=st(o,0),a=Math.min(st(r,t.length),t.length);let c=0,m,C,L;for(n=Math.ceil(n),r&&(m=r-o,n=m/Math.floor(m/n)),L=i;L<0;)c++,L=Math.round(i+c*n);for(C=Math.max(i,0);C<a;C++)C===L&&(e.push(t[C]),c++,L=Math.round(i+c*n))}function jm(t){const e=t.length;let n,o;if(e<2)return!1;for(o=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==o)return!1;return o}const Wm=t=>t==="left"?"right":t==="right"?"left":t,cs=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,ds=(t,e)=>Math.min(e||t,t);function us(t,e){const n=[],o=t.length/e,r=t.length;let i=0;for(;i<r;i+=o)n.push(t[Math.floor(i)]);return n}function qm(t,e,n){const o=t.ticks.length,r=Math.min(e,o-1),i=t._startPixel,a=t._endPixel,c=1e-6;let m=t.getPixelForTick(r),C;if(!(n&&(o===1?C=Math.max(m-i,a-m):e===0?C=(t.getPixelForTick(1)-m)/2:C=(m-t.getPixelForTick(r-1))/2,m+=r<e?C:-C,m<i-c||m>a+c)))return m}function $m(t,e){kt(t,n=>{const o=n.gc,r=o.length/2;let i;if(r>e){for(i=0;i<r;++i)delete n.data[o[i]];o.splice(0,r)}})}function qo(t){return t.drawTicks?t.tickLength:0}function fs(t,e){if(!t.display)return 0;const n=$t(t.font,e),o=Jt(t.padding);return(Ot(t.text)?t.text.length:1)*n.lineHeight+o.height}function Ym(t,e){return qn(t,{scale:e,type:"scale"})}function Km(t,e,n){return qn(t,{tick:n,index:e,type:"tick"})}function Xm(t,e,n){let o=Ec(t);return(n&&e!=="right"||!n&&e==="right")&&(o=Wm(o)),o}function Jm(t,e,n,o){const{top:r,left:i,bottom:a,right:c,chart:m}=t,{chartArea:C,scales:L}=m;let D=0,W,K,X;const ee=a-r,re=c-i;if(t.isHorizontal()){if(K=ln(o,i,c),yt(n)){const fe=Object.keys(n)[0],ye=n[fe];X=L[fe].getPixelForValue(ye)+ee-e}else n==="center"?X=(C.bottom+C.top)/2+ee-e:X=cs(t,n,e);W=c-i}else{if(yt(n)){const fe=Object.keys(n)[0],ye=n[fe];K=L[fe].getPixelForValue(ye)-re+e}else n==="center"?K=(C.left+C.right)/2-re+e:K=cs(t,n,e);X=ln(o,a,r),D=n==="left"?-Pt:Pt}return{titleX:K,titleY:X,maxWidth:W,rotation:D}}class Ao extends $n{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:o,_suggestedMax:r}=this;return e=_n(e,Number.POSITIVE_INFINITY),n=_n(n,Number.NEGATIVE_INFINITY),o=_n(o,Number.POSITIVE_INFINITY),r=_n(r,Number.NEGATIVE_INFINITY),{min:_n(e,o),max:_n(n,r),minDefined:qt(e),maxDefined:qt(n)}}getMinMax(e){let{min:n,max:o,minDefined:r,maxDefined:i}=this.getUserBounds(),a;if(r&&i)return{min:n,max:o};const c=this.getMatchingVisibleMetas();for(let m=0,C=c.length;m<C;++m)a=c[m].controller.getMinMax(this,e),r||(n=Math.min(n,a.min)),i||(o=Math.max(o,a.max));return n=i&&n>o?o:n,o=r&&n>o?n:o,{min:_n(n,_n(o,n)),max:_n(o,_n(n,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){wt(this.options.beforeUpdate,[this])}update(e,n,o){const{beginAtZero:r,grace:i,ticks:a}=this.options,c=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=o=Object.assign({left:0,right:0,top:0,bottom:0},o),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+o.left+o.right:this.height+o.top+o.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=ih(this,i,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const m=c<this.ticks.length;this._convertTicksToLabels(m?us(this.ticks,c):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=Pm(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),m&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,o;this.isHorizontal()?(n=this.left,o=this.right):(n=this.top,o=this.bottom,e=!e),this._startPixel=n,this._endPixel=o,this._reversePixels=e,this._length=o-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){wt(this.options.afterUpdate,[this])}beforeSetDimensions(){wt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){wt(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),wt(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){wt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let o,r,i;for(o=0,r=e.length;o<r;o++)i=e[o],i.label=wt(n.callback,[i.value,o,e],this)}afterTickToLabelConversion(){wt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){wt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,o=ds(this.ticks.length,e.ticks.maxTicksLimit),r=n.minRotation||0,i=n.maxRotation;let a=r,c,m,C;if(!this._isVisible()||!n.display||r>=i||o<=1||!this.isHorizontal()){this.labelRotation=r;return}const L=this._getLabelSizes(),D=L.widest.width,W=L.highest.height,K=Kt(this.chart.width-D,0,this.maxWidth);c=e.offset?this.maxWidth/o:K/(o-1),D+6>c&&(c=K/(o-(e.offset?.5:1)),m=this.maxHeight-qo(e.grid)-n.padding-fs(e.title,this.chart.options.font),C=Math.sqrt(D*D+W*W),a=Pa(Math.min(Math.asin(Kt((L.highest.height+6)/c,-1,1)),Math.asin(Kt(m/C,-1,1))-Math.asin(Kt(W/C,-1,1)))),a=Math.max(r,Math.min(i,a))),this.labelRotation=a}afterCalculateLabelRotation(){wt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){wt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:o,title:r,grid:i}}=this,a=this._isVisible(),c=this.isHorizontal();if(a){const m=fs(r,n.options.font);if(c?(e.width=this.maxWidth,e.height=qo(i)+m):(e.height=this.maxHeight,e.width=qo(i)+m),o.display&&this.ticks.length){const{first:C,last:L,widest:D,highest:W}=this._getLabelSizes(),K=o.padding*2,X=Cn(this.labelRotation),ee=Math.cos(X),re=Math.sin(X);if(c){const fe=o.mirror?0:re*D.width+ee*W.height;e.height=Math.min(this.maxHeight,e.height+fe+K)}else{const fe=o.mirror?0:ee*D.width+re*W.height;e.width=Math.min(this.maxWidth,e.width+fe+K)}this._calculatePadding(C,L,re,ee)}}this._handleMargins(),c?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,o,r){const{ticks:{align:i,padding:a},position:c}=this.options,m=this.labelRotation!==0,C=c!=="top"&&this.axis==="x";if(this.isHorizontal()){const L=this.getPixelForTick(0)-this.left,D=this.right-this.getPixelForTick(this.ticks.length-1);let W=0,K=0;m?C?(W=r*e.width,K=o*n.height):(W=o*e.height,K=r*n.width):i==="start"?K=n.width:i==="end"?W=e.width:i!=="inner"&&(W=e.width/2,K=n.width/2),this.paddingLeft=Math.max((W-L+a)*this.width/(this.width-L),0),this.paddingRight=Math.max((K-D+a)*this.width/(this.width-D),0)}else{let L=n.height/2,D=e.height/2;i==="start"?(L=0,D=e.height):i==="end"&&(L=n.height,D=0),this.paddingTop=L+a,this.paddingBottom=D+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){wt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,o;for(n=0,o=e.length;n<o;n++)vt(e[n].label)&&(e.splice(n,1),o--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let o=this.ticks;n<o.length&&(o=us(o,n)),this._labelSizes=e=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,o){const{ctx:r,_longestTextCache:i}=this,a=[],c=[],m=Math.floor(n/ds(n,o));let C=0,L=0,D,W,K,X,ee,re,fe,ye,xe,ke,ve;for(D=0;D<n;D+=m){if(X=e[D].label,ee=this._resolveTickFontOptions(D),r.font=re=ee.string,fe=i[re]=i[re]||{data:{},gc:[]},ye=ee.lineHeight,xe=ke=0,!vt(X)&&!Ot(X))xe=Ii(r,fe.data,fe.gc,xe,X),ke=ye;else if(Ot(X))for(W=0,K=X.length;W<K;++W)ve=X[W],!vt(ve)&&!Ot(ve)&&(xe=Ii(r,fe.data,fe.gc,xe,ve),ke+=ye);a.push(xe),c.push(ke),C=Math.max(xe,C),L=Math.max(ke,L)}$m(i,n);const Ee=a.indexOf(C),Me=c.indexOf(L),Ie=Te=>({width:a[Te]||0,height:c[Te]||0});return{first:Ie(0),last:Ie(n-1),widest:Ie(Ee),highest:Ie(Me),widths:a,heights:c}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return Nf(this._alignToPixels?no(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const o=n[e];return o.$context||(o.$context=Km(this.getContext(),e,o))}return this.$context||(this.$context=Ym(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Cn(this.labelRotation),o=Math.abs(Math.cos(n)),r=Math.abs(Math.sin(n)),i=this._getLabelSizes(),a=e.autoSkipPadding||0,c=i?i.widest.width+a:0,m=i?i.highest.height+a:0;return this.isHorizontal()?m*o>c*r?c/o:m/r:m*r<c*o?m/o:c/r}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,o=this.chart,r=this.options,{grid:i,position:a,border:c}=r,m=i.offset,C=this.isHorizontal(),D=this.ticks.length+(m?1:0),W=qo(i),K=[],X=c.setContext(this.getContext()),ee=X.display?X.width:0,re=ee/2,fe=function(ut){return no(o,ut,ee)};let ye,xe,ke,ve,Ee,Me,Ie,Te,We,nt,Pe,ot;if(a==="top")ye=fe(this.bottom),Me=this.bottom-W,Te=ye-re,nt=fe(e.top)+re,ot=e.bottom;else if(a==="bottom")ye=fe(this.top),nt=e.top,ot=fe(e.bottom)-re,Me=ye+re,Te=this.top+W;else if(a==="left")ye=fe(this.right),Ee=this.right-W,Ie=ye-re,We=fe(e.left)+re,Pe=e.right;else if(a==="right")ye=fe(this.left),We=e.left,Pe=fe(e.right)-re,Ee=ye+re,Ie=this.left+W;else if(n==="x"){if(a==="center")ye=fe((e.top+e.bottom)/2+.5);else if(yt(a)){const ut=Object.keys(a)[0],Ye=a[ut];ye=fe(this.chart.scales[ut].getPixelForValue(Ye))}nt=e.top,ot=e.bottom,Me=ye+re,Te=Me+W}else if(n==="y"){if(a==="center")ye=fe((e.left+e.right)/2);else if(yt(a)){const ut=Object.keys(a)[0],Ye=a[ut];ye=fe(this.chart.scales[ut].getPixelForValue(Ye))}Ee=ye-re,Ie=Ee-W,We=e.left,Pe=e.right}const mt=st(r.ticks.maxTicksLimit,D),Qe=Math.max(1,Math.ceil(D/mt));for(xe=0;xe<D;xe+=Qe){const ut=this.getContext(xe),Ye=i.setContext(ut),Je=c.setContext(ut),dt=Ye.lineWidth,Dt=Ye.color,Re=Je.dash||[],ft=Je.dashOffset,nn=Ye.tickWidth,Et=Ye.tickColor,_e=Ye.tickBorderDash||[],bt=Ye.tickBorderDashOffset;ke=qm(this,xe,m),ke!==void 0&&(ve=no(o,ke,dt),C?Ee=Ie=We=Pe=ve:Me=Te=nt=ot=ve,K.push({tx1:Ee,ty1:Me,tx2:Ie,ty2:Te,x1:We,y1:nt,x2:Pe,y2:ot,width:dt,color:Dt,borderDash:Re,borderDashOffset:ft,tickWidth:nn,tickColor:Et,tickBorderDash:_e,tickBorderDashOffset:bt}))}return this._ticksLength=D,this._borderValue=ye,K}_computeLabelItems(e){const n=this.axis,o=this.options,{position:r,ticks:i}=o,a=this.isHorizontal(),c=this.ticks,{align:m,crossAlign:C,padding:L,mirror:D}=i,W=qo(o.grid),K=W+L,X=D?-L:K,ee=-Cn(this.labelRotation),re=[];let fe,ye,xe,ke,ve,Ee,Me,Ie,Te,We,nt,Pe,ot="middle";if(r==="top")Ee=this.bottom-X,Me=this._getXAxisLabelAlignment();else if(r==="bottom")Ee=this.top+X,Me=this._getXAxisLabelAlignment();else if(r==="left"){const Qe=this._getYAxisLabelAlignment(W);Me=Qe.textAlign,ve=Qe.x}else if(r==="right"){const Qe=this._getYAxisLabelAlignment(W);Me=Qe.textAlign,ve=Qe.x}else if(n==="x"){if(r==="center")Ee=(e.top+e.bottom)/2+K;else if(yt(r)){const Qe=Object.keys(r)[0],ut=r[Qe];Ee=this.chart.scales[Qe].getPixelForValue(ut)+K}Me=this._getXAxisLabelAlignment()}else if(n==="y"){if(r==="center")ve=(e.left+e.right)/2-K;else if(yt(r)){const Qe=Object.keys(r)[0],ut=r[Qe];ve=this.chart.scales[Qe].getPixelForValue(ut)}Me=this._getYAxisLabelAlignment(W).textAlign}n==="y"&&(m==="start"?ot="top":m==="end"&&(ot="bottom"));const mt=this._getLabelSizes();for(fe=0,ye=c.length;fe<ye;++fe){xe=c[fe],ke=xe.label;const Qe=i.setContext(this.getContext(fe));Ie=this.getPixelForTick(fe)+i.labelOffset,Te=this._resolveTickFontOptions(fe),We=Te.lineHeight,nt=Ot(ke)?ke.length:1;const ut=nt/2,Ye=Qe.color,Je=Qe.textStrokeColor,dt=Qe.textStrokeWidth;let Dt=Me;a?(ve=Ie,Me==="inner"&&(fe===ye-1?Dt=this.options.reverse?"left":"right":fe===0?Dt=this.options.reverse?"right":"left":Dt="center"),r==="top"?C==="near"||ee!==0?Pe=-nt*We+We/2:C==="center"?Pe=-mt.highest.height/2-ut*We+We:Pe=-mt.highest.height+We/2:C==="near"||ee!==0?Pe=We/2:C==="center"?Pe=mt.highest.height/2-ut*We:Pe=mt.highest.height-nt*We,D&&(Pe*=-1),ee!==0&&!Qe.showLabelBackdrop&&(ve+=We/2*Math.sin(ee))):(Ee=Ie,Pe=(1-nt)*We/2);let Re;if(Qe.showLabelBackdrop){const ft=Jt(Qe.backdropPadding),nn=mt.heights[fe],Et=mt.widths[fe];let _e=Pe-ft.top,bt=0-ft.left;switch(ot){case"middle":_e-=nn/2;break;case"bottom":_e-=nn;break}switch(Me){case"center":bt-=Et/2;break;case"right":bt-=Et;break;case"inner":fe===ye-1?bt-=Et:fe>0&&(bt-=Et/2);break}Re={left:bt,top:_e,width:Et+ft.width,height:nn+ft.height,color:Qe.backdropColor}}re.push({label:ke,font:Te,textOffset:Pe,options:{rotation:ee,color:Ye,strokeColor:Je,strokeWidth:dt,textAlign:Dt,textBaseline:ot,translation:[ve,Ee],backdrop:Re}})}return re}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Cn(this.labelRotation))return e==="top"?"left":"right";let r="center";return n.align==="start"?r="left":n.align==="end"?r="right":n.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:o,mirror:r,padding:i}}=this.options,a=this._getLabelSizes(),c=e+i,m=a.widest.width;let C,L;return n==="left"?r?(L=this.right+i,o==="near"?C="left":o==="center"?(C="center",L+=m/2):(C="right",L+=m)):(L=this.right-c,o==="near"?C="right":o==="center"?(C="center",L-=m/2):(C="left",L=this.left)):n==="right"?r?(L=this.left+i,o==="near"?C="right":o==="center"?(C="center",L-=m/2):(C="left",L-=m)):(L=this.left+c,o==="near"?C="left":o==="center"?(C="center",L+=m/2):(C="right",L=this.right)):C="right",{textAlign:C,x:L}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:o,top:r,width:i,height:a}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(o,r,i,a),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const r=this.ticks.findIndex(i=>i.value===e);return r>=0?n.setContext(this.getContext(r)).lineWidth:0}drawGrid(e){const n=this.options.grid,o=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let i,a;const c=(m,C,L)=>{!L.width||!L.color||(o.save(),o.lineWidth=L.width,o.strokeStyle=L.color,o.setLineDash(L.borderDash||[]),o.lineDashOffset=L.borderDashOffset,o.beginPath(),o.moveTo(m.x,m.y),o.lineTo(C.x,C.y),o.stroke(),o.restore())};if(n.display)for(i=0,a=r.length;i<a;++i){const m=r[i];n.drawOnChartArea&&c({x:m.x1,y:m.y1},{x:m.x2,y:m.y2},m),n.drawTicks&&c({x:m.tx1,y:m.ty1},{x:m.tx2,y:m.ty2},{color:m.tickColor,width:m.tickWidth,borderDash:m.tickBorderDash,borderDashOffset:m.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:o,grid:r}}=this,i=o.setContext(this.getContext()),a=o.display?i.width:0;if(!a)return;const c=r.setContext(this.getContext(0)).lineWidth,m=this._borderValue;let C,L,D,W;this.isHorizontal()?(C=no(e,this.left,a)-a/2,L=no(e,this.right,c)+c/2,D=W=m):(D=no(e,this.top,a)-a/2,W=no(e,this.bottom,c)+c/2,C=L=m),n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.beginPath(),n.moveTo(C,D),n.lineTo(L,W),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const o=this.ctx,r=this._computeLabelArea();r&&Ri(o,r);const i=this.getLabelItems(e);for(const a of i){const c=a.options,m=a.font,C=a.label,L=a.textOffset;Io(o,C,0,L,m,c)}r&&Hi(o)}drawTitle(){const{ctx:e,options:{position:n,title:o,reverse:r}}=this;if(!o.display)return;const i=$t(o.font),a=Jt(o.padding),c=o.align;let m=i.lineHeight/2;n==="bottom"||n==="center"||yt(n)?(m+=a.bottom,Ot(o.text)&&(m+=i.lineHeight*(o.text.length-1))):m+=a.top;const{titleX:C,titleY:L,maxWidth:D,rotation:W}=Jm(this,m,n,c);Io(e,o.text,0,0,i,{color:o.color,maxWidth:D,rotation:W,textAlign:Xm(c,n,r),textBaseline:"middle",translation:[C,L]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,o=st(e.grid&&e.grid.z,-1),r=st(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Ao.prototype.draw?[{z:n,draw:i=>{this.draw(i)}}]:[{z:o,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:n,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",r=[];let i,a;for(i=0,a=n.length;i<a;++i){const c=n[i];c[o]===this.id&&(!e||c.type===e)&&r.push(c)}return r}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return $t(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class ai{constructor(e,n,o){this.type=e,this.scope=n,this.override=o,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let o;eg(n)&&(o=this.register(n));const r=this.items,i=e.id,a=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+e);return i in r||(r[i]=e,Zm(e,a,o),this.override&&Vt.override(e.id,e.overrides)),a}get(e){return this.items[e]}unregister(e){const n=this.items,o=e.id,r=this.scope;o in n&&delete n[o],r&&o in Vt[r]&&(delete Vt[r][o],this.override&&delete fo[o])}}function Zm(t,e,n){const o=rr(Object.create(null),[n?Vt.get(n):{},Vt.get(e),t.defaults]);Vt.set(e,o),t.defaultRoutes&&Qm(e,t.defaultRoutes),t.descriptors&&Vt.describe(e,t.descriptors)}function Qm(t,e){Object.keys(e).forEach(n=>{const o=n.split("."),r=o.pop(),i=[t].concat(o).join("."),a=e[n].split("."),c=a.pop(),m=a.join(".");Vt.route(i,r,m,c)})}function eg(t){return"id"in t&&"defaults"in t}class tg{constructor(){this.controllers=new ai(xn,"datasets",!0),this.elements=new ai($n,"elements"),this.plugins=new ai(Object,"plugins"),this.scales=new ai(Ao,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,o){[...n].forEach(r=>{const i=o||this._getRegistryForType(r);o||i.isForType(r)||i===this.plugins&&r.id?this._exec(e,i,r):kt(r,a=>{const c=o||this._getRegistryForType(a);this._exec(e,c,a)})})}_exec(e,n,o){const r=Va(e);wt(o["before"+r],[],o),n[e](o),wt(o["after"+r],[],o)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const o=this._typedRegistries[n];if(o.isForType(e))return o}return this.plugins}_get(e,n,o){const r=n.get(e);if(r===void 0)throw new Error('"'+e+'" is not a registered '+o+".");return r}}var bn=new tg;class ng{constructor(){this._init=[]}notify(e,n,o,r){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const i=r?this._descriptors(e).filter(r):this._descriptors(e),a=this._notify(i,e,n,o);return n==="afterDestroy"&&(this._notify(i,e,"stop"),this._notify(this._init,e,"uninstall")),a}_notify(e,n,o,r){r=r||{};for(const i of e){const a=i.plugin,c=a[o],m=[n,r,i.options];if(wt(c,m,a)===!1&&r.cancelable)return!1}return!0}invalidate(){vt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const o=e&&e.config,r=st(o.options&&o.options.plugins,{}),i=og(o);return r===!1&&!n?[]:ig(e,i,r,n)}_notifyStateChanges(e){const n=this._oldCache||[],o=this._cache,r=(i,a)=>i.filter(c=>!a.some(m=>c.plugin.id===m.plugin.id));this._notify(r(n,o),e,"stop"),this._notify(r(o,n),e,"start")}}function og(t){const e={},n=[],o=Object.keys(bn.plugins.items);for(let i=0;i<o.length;i++)n.push(bn.getPlugin(o[i]));const r=t.plugins||[];for(let i=0;i<r.length;i++){const a=r[i];n.indexOf(a)===-1&&(n.push(a),e[a.id]=!0)}return{plugins:n,localIds:e}}function rg(t,e){return!e&&t===!1?null:t===!0?{}:t}function ig(t,{plugins:e,localIds:n},o,r){const i=[],a=t.getContext();for(const c of e){const m=c.id,C=rg(o[m],r);C!==null&&i.push({plugin:c,options:ag(t.config,{plugin:c,local:n[m]},C,a)})}return i}function ag(t,{plugin:e,local:n},o,r){const i=t.pluginScopeKeys(e),a=t.getOptionScopes(o,i);return n&&e.defaults&&a.push(e.defaults),t.createResolver(a,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Ma(t,e){const n=Vt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function lg(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function sg(t,e){return t===e?"_index_":"_value_"}function hs(t){if(t==="x"||t==="y"||t==="r")return t}function cg(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function xa(t,...e){if(hs(t))return t;for(const n of e){const o=n.axis||cg(n.position)||t.length>1&&hs(t[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function ms(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function dg(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(o=>o.xAxisID===t||o.yAxisID===t);if(n.length)return ms(t,"x",n[0])||ms(t,"y",n[0])}return{}}function ug(t,e){const n=fo[t.type]||{scales:{}},o=e.scales||{},r=Ma(t.type,e),i=Object.create(null);return Object.keys(o).forEach(a=>{const c=o[a];if(!yt(c))return console.error(`Invalid scale configuration for scale: ${a}`);if(c._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const m=xa(a,c,dg(a,t),Vt.scales[c.type]),C=sg(m,r),L=n.scales||{};i[a]=Qo(Object.create(null),[{axis:m},c,L[m],L[C]])}),t.data.datasets.forEach(a=>{const c=a.type||t.type,m=a.indexAxis||Ma(c,e),L=(fo[c]||{}).scales||{};Object.keys(L).forEach(D=>{const W=lg(D,m),K=a[W+"AxisID"]||W;i[K]=i[K]||Object.create(null),Qo(i[K],[{axis:W},o[K],L[D]])})}),Object.keys(i).forEach(a=>{const c=i[a];Qo(c,[Vt.scales[c.type],Vt.scale])}),i}function Jc(t){const e=t.options||(t.options={});e.plugins=st(e.plugins,{}),e.scales=ug(t,e)}function Zc(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function fg(t){return t=t||{},t.data=Zc(t.data),Jc(t),t}const gs=new Map,Qc=new Set;function li(t,e){let n=gs.get(t);return n||(n=e(),gs.set(t,n),Qc.add(n)),n}const $o=(t,e,n)=>{const o=jn(e,n);o!==void 0&&t.add(o)};class hg{constructor(e){this._config=fg(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Zc(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Jc(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return li(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return li(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return li(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,o=this.type;return li(`${o}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const o=this._scopeCache;let r=o.get(e);return(!r||n)&&(r=new Map,o.set(e,r)),r}getOptionScopes(e,n,o){const{options:r,type:i}=this,a=this._cachedScopes(e,o),c=a.get(n);if(c)return c;const m=new Set;n.forEach(L=>{e&&(m.add(e),L.forEach(D=>$o(m,e,D))),L.forEach(D=>$o(m,r,D)),L.forEach(D=>$o(m,fo[i]||{},D)),L.forEach(D=>$o(m,Vt,D)),L.forEach(D=>$o(m,va,D))});const C=Array.from(m);return C.length===0&&C.push(Object.create(null)),Qc.has(n)&&a.set(n,C),C}chartOptionScopes(){const{options:e,type:n}=this;return[e,fo[n]||{},Vt.datasets[n]||{},{type:n},Vt,va]}resolveNamedOptions(e,n,o,r=[""]){const i={$shared:!0},{resolver:a,subPrefixes:c}=ys(this._resolverCache,e,r);let m=a;if(gg(a,n)){i.$shared=!1,o=Wn(o)?o():o;const C=this.createResolver(e,o,c);m=Eo(a,o,C)}for(const C of n)i[C]=m[C];return i}createResolver(e,n,o=[""],r){const{resolver:i}=ys(this._resolverCache,e,o);return yt(n)?Eo(i,n,void 0,r):i}}function ys(t,e,n){let o=t.get(e);o||(o=new Map,t.set(e,o));const r=n.join();let i=o.get(r);return i||(i={resolver:Wa(e,n),subPrefixes:n.filter(c=>!c.toLowerCase().includes("hover"))},o.set(r,i)),i}const mg=t=>yt(t)&&Object.getOwnPropertyNames(t).some(e=>Wn(t[e]));function gg(t,e){const{isScriptable:n,isIndexable:o}=Lc(t);for(const r of e){const i=n(r),a=o(r),c=(a||i)&&t[r];if(i&&(Wn(c)||mg(c))||a&&Ot(c))return!0}return!1}var yg="4.5.0";const pg=["top","bottom","left","right","chartArea"];function ps(t,e){return t==="top"||t==="bottom"||pg.indexOf(t)===-1&&e==="x"}function _s(t,e){return function(n,o){return n[t]===o[t]?n[e]-o[e]:n[t]-o[t]}}function vs(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),wt(n&&n.onComplete,[t],e)}function _g(t){const e=t.chart,n=e.options.animation;wt(n&&n.onProgress,[t],e)}function ed(t){return Ya()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const bi={},bs=t=>{const e=ed(t);return Object.values(bi).filter(n=>n.canvas===e).pop()};function vg(t,e,n){const o=Object.keys(t);for(const r of o){const i=+r;if(i>=e){const a=t[r];delete t[r],(n>0||i>e)&&(t[i+n]=a)}}}function bg(t,e,n,o){return!n||t.type==="mouseout"?null:o?e:t}class mn{static register(...e){bn.add(...e),Cs()}static unregister(...e){bn.remove(...e),Cs()}constructor(e,n){const o=this.config=new hg(n),r=ed(e),i=bs(r);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const a=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||Vm(r)),this.platform.updateConfig(o);const c=this.platform.acquireContext(r,a.aspectRatio),m=c&&c.canvas,C=m&&m.height,L=m&&m.width;if(this.id=vf(),this.ctx=c,this.canvas=m,this.width=L,this.height=C,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new ng,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Of(D=>this.update(D),a.resizeDelay||0),this._dataChanges=[],bi[this.id]=this,!c||!m){console.error("Failed to create chart: can't acquire context from the given item");return}An.listen(this,"complete",vs),An.listen(this,"progress",_g),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:o,height:r,_aspectRatio:i}=this;return vt(e)?n&&i?i:r?o/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return bn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Gl(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Dl(this.canvas,this.ctx),this}stop(){return An.stop(this),this}resize(e,n){An.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const o=this.options,r=this.canvas,i=o.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(r,e,n,i),c=o.devicePixelRatio||this.platform.getDevicePixelRatio(),m=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Gl(this,c,!0)&&(this.notifyPlugins("resize",{size:a}),wt(o.onResize,[this,a],this),this.attached&&this._doResize(m)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};kt(n,(o,r)=>{o.id=r})}buildOrUpdateScales(){const e=this.options,n=e.scales,o=this.scales,r=Object.keys(o).reduce((a,c)=>(a[c]=!1,a),{});let i=[];n&&(i=i.concat(Object.keys(n).map(a=>{const c=n[a],m=xa(a,c),C=m==="r",L=m==="x";return{options:c,dposition:C?"chartArea":L?"bottom":"left",dtype:C?"radialLinear":L?"category":"linear"}}))),kt(i,a=>{const c=a.options,m=c.id,C=xa(m,c),L=st(c.type,a.dtype);(c.position===void 0||ps(c.position,C)!==ps(a.dposition))&&(c.position=a.dposition),r[m]=!0;let D=null;if(m in o&&o[m].type===L)D=o[m];else{const W=bn.getScale(L);D=new W({id:m,type:L,ctx:this.ctx,chart:this}),o[D.id]=D}D.init(c,e)}),kt(r,(a,c)=>{a||delete o[c]}),kt(o,a=>{Dn.configure(this,a,a.options),Dn.addBox(this,a)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,o=e.length;if(e.sort((r,i)=>r.index-i.index),o>n){for(let r=n;r<o;++r)this._destroyDatasetMeta(r);e.splice(n,o-n)}this._sortedMetasets=e.slice(0).sort(_s("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((o,r)=>{n.filter(i=>i===o._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let o,r;for(this._removeUnreferencedMetasets(),o=0,r=n.length;o<r;o++){const i=n[o];let a=this.getDatasetMeta(o);const c=i.type||this.config.type;if(a.type&&a.type!==c&&(this._destroyDatasetMeta(o),a=this.getDatasetMeta(o)),a.type=c,a.indexAxis=i.indexAxis||Ma(c,this.options),a.order=i.order||0,a.index=o,a.label=""+i.label,a.visible=this.isDatasetVisible(o),a.controller)a.controller.updateIndex(o),a.controller.linkScales();else{const m=bn.getController(c),{datasetElementType:C,dataElementType:L}=Vt.datasets[c];Object.assign(m,{dataElementType:bn.getElement(L),datasetElementType:C&&bn.getElement(C)}),a.controller=new m(this,o),e.push(a.controller)}}return this._updateMetasets(),e}_resetElements(){kt(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const o=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let C=0,L=this.data.datasets.length;C<L;C++){const{controller:D}=this.getDatasetMeta(C),W=!r&&i.indexOf(D)===-1;D.buildOrUpdateElements(W),a=Math.max(+D.getMaxOverflow(),a)}a=this._minPadding=o.layout.autoPadding?a:0,this._updateLayout(a),r||kt(i,C=>{C.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(_s("z","_idx"));const{_active:c,_lastEvent:m}=this;m?this._eventHandler(m,!0):c.length&&this._updateHoverStyles(c,c,!0),this.render()}_updateScales(){kt(this.scales,e=>{Dn.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(e.events);(!Bl(n,o)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:o,start:r,count:i}of n){const a=o==="_removeElements"?-i:i;vg(e,r,a)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=i=>new Set(e.filter(a=>a[0]===i).map((a,c)=>c+","+a.splice(1).join(","))),r=o(0);for(let i=1;i<n;i++)if(!Bl(r,o(i)))return;return Array.from(r).map(i=>i.split(",")).map(i=>({method:i[1],start:+i[2],count:+i[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Dn.update(this,this.width,this.height,e);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],kt(this.boxes,r=>{o&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,i)=>{r._idx=i}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,o=this.data.datasets.length;n<o;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,o=this.data.datasets.length;n<o;++n)this._updateDataset(n,Wn(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const o=this.getDatasetMeta(e),r={meta:o,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(o.controller._update(n),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(An.has(this)?this.attached&&!An.running(this)&&An.start(this):(this.draw(),vs({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:o,height:r}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(o,r)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,o=[];let r,i;for(r=0,i=n.length;r<i;++r){const a=n[r];(!e||a.visible)&&o.push(a)}return o}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,o={meta:e,index:e.index,cancelable:!0},r=Uc(this,e);this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(r&&Ri(n,r),e.controller.draw(),r&&Hi(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return Nn(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,o,r){const i=pm.modes[n];return typeof i=="function"?i(this,e,o,r):[]}getDatasetMeta(e){const n=this.data.datasets[e],o=this._metasets;let r=o.filter(i=>i&&i._dataset===n).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},o.push(r)),r}getContext(){return this.$context||(this.$context=qn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const o=this.getDatasetMeta(e);return typeof o.hidden=="boolean"?!o.hidden:!n.hidden}setDatasetVisibility(e,n){const o=this.getDatasetMeta(e);o.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,o){const r=o?"show":"hide",i=this.getDatasetMeta(e),a=i.controller._resolveAnimations(void 0,r);ir(n)?(i.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(e,o),a.update(i,{visible:o}),this.update(c=>c.datasetIndex===e?r:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),An.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Dl(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete bi[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,o=(i,a)=>{n.addEventListener(this,i,a),e[i]=a},r=(i,a,c)=>{i.offsetX=a,i.offsetY=c,this._eventHandler(i)};kt(this.options.events,i=>o(i,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,o=(m,C)=>{n.addEventListener(this,m,C),e[m]=C},r=(m,C)=>{e[m]&&(n.removeEventListener(this,m,C),delete e[m])},i=(m,C)=>{this.canvas&&this.resize(m,C)};let a;const c=()=>{r("attach",c),this.attached=!0,this.resize(),o("resize",i),o("detach",a)};a=()=>{this.attached=!1,r("resize",i),this._stop(),this._resize(0,0),o("attach",c)},n.isAttached(this.canvas)?c():a()}unbindEvents(){kt(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},kt(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,o){const r=o?"set":"remove";let i,a,c,m;for(n==="dataset"&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller["_"+r+"DatasetHoverStyle"]()),c=0,m=e.length;c<m;++c){a=e[c];const C=a&&this.getDatasetMeta(a.datasetIndex).controller;C&&C[r+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],o=e.map(({datasetIndex:i,index:a})=>{const c=this.getDatasetMeta(i);if(!c)throw new Error("No dataset found at index "+i);return{datasetIndex:i,element:c.data[a],index:a}});!xi(o,n)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,n))}notifyPlugins(e,n,o){return this._plugins.notify(this,e,n,o)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,o){const r=this.options.hover,i=(m,C)=>m.filter(L=>!C.some(D=>L.datasetIndex===D.datasetIndex&&L.index===D.index)),a=i(n,e),c=o?e:i(e,n);a.length&&this.updateHoverStyle(a,r.mode,!1),c.length&&r.mode&&this.updateHoverStyle(c,r.mode,!0)}_eventHandler(e,n){const o={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},r=a=>(a.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",o,r)===!1)return;const i=this._handleEvent(e,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,r),(i||o.changed)&&this.render(),this}_handleEvent(e,n,o){const{_active:r=[],options:i}=this,a=n,c=this._getActiveElements(e,r,o,a),m=kf(e),C=bg(e,this._lastEvent,o,m);o&&(this._lastEvent=null,wt(i.onHover,[e,c,this],this),m&&wt(i.onClick,[e,c,this],this));const L=!xi(c,r);return(L||n)&&(this._active=c,this._updateHoverStyles(c,r,n)),this._lastEvent=C,L}_getActiveElements(e,n,o,r){if(e.type==="mouseout")return[];if(!o)return n;const i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,r)}}Oe(mn,"defaults",Vt),Oe(mn,"instances",bi),Oe(mn,"overrides",fo),Oe(mn,"registry",bn),Oe(mn,"version",yg),Oe(mn,"getChart",bs);function Cs(){return kt(mn.instances,t=>t._plugins.invalidate())}function Cg(t,e,n){const{startAngle:o,x:r,y:i,outerRadius:a,innerRadius:c,options:m}=e,{borderWidth:C,borderJoinStyle:L}=m,D=Math.min(C/a,Yt(o-n));if(t.beginPath(),t.arc(r,i,a-C/2,o+D/2,n-D/2),c>0){const W=Math.min(C/c,Yt(o-n));t.arc(r,i,c+C/2,n-W/2,o+W/2,!0)}else{const W=Math.min(C/2,a*Yt(o-n));if(L==="round")t.arc(r,i,W,n-It/2,o+It/2,!0);else if(L==="bevel"){const K=2*W*W,X=-K*Math.cos(n+It/2)+r,ee=-K*Math.sin(n+It/2)+i,re=K*Math.cos(o+It/2)+r,fe=K*Math.sin(o+It/2)+i;t.lineTo(X,ee),t.lineTo(re,fe)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}function Mg(t,e,n){const{startAngle:o,pixelMargin:r,x:i,y:a,outerRadius:c,innerRadius:m}=e;let C=r/c;t.beginPath(),t.arc(i,a,c,o-C,n+C),m>r?(C=r/m,t.arc(i,a,m,n+C,o-C,!0)):t.arc(i,a,r,n+Pt,o-Pt),t.closePath(),t.clip()}function xg(t){return ja(t,["outerStart","outerEnd","innerStart","innerEnd"])}function Sg(t,e,n,o){const r=xg(t.options.borderRadius),i=(n-e)/2,a=Math.min(i,o*e/2),c=m=>{const C=(n-Math.min(i,m))*o/2;return Kt(m,0,Math.min(i,C))};return{outerStart:c(r.outerStart),outerEnd:c(r.outerEnd),innerStart:Kt(r.innerStart,0,a),innerEnd:Kt(r.innerEnd,0,a)}}function Co(t,e,n,o){return{x:n+t*Math.cos(e),y:o+t*Math.sin(e)}}function Ai(t,e,n,o,r,i){const{x:a,y:c,startAngle:m,pixelMargin:C,innerRadius:L}=e,D=Math.max(e.outerRadius+o+n-C,0),W=L>0?L+o+n+C:0;let K=0;const X=r-m;if(o){const Qe=L>0?L-o:0,ut=D>0?D-o:0,Ye=(Qe+ut)/2,Je=Ye!==0?X*Ye/(Ye+o):X;K=(X-Je)/2}const ee=Math.max(.001,X*D-n/It)/D,re=(X-ee)/2,fe=m+re+K,ye=r-re-K,{outerStart:xe,outerEnd:ke,innerStart:ve,innerEnd:Ee}=Sg(e,W,D,ye-fe),Me=D-xe,Ie=D-ke,Te=fe+xe/Me,We=ye-ke/Ie,nt=W+ve,Pe=W+Ee,ot=fe+ve/nt,mt=ye-Ee/Pe;if(t.beginPath(),i){const Qe=(Te+We)/2;if(t.arc(a,c,D,Te,Qe),t.arc(a,c,D,Qe,We),ke>0){const dt=Co(Ie,We,a,c);t.arc(dt.x,dt.y,ke,We,ye+Pt)}const ut=Co(Pe,ye,a,c);if(t.lineTo(ut.x,ut.y),Ee>0){const dt=Co(Pe,mt,a,c);t.arc(dt.x,dt.y,Ee,ye+Pt,mt+Math.PI)}const Ye=(ye-Ee/W+(fe+ve/W))/2;if(t.arc(a,c,W,ye-Ee/W,Ye,!0),t.arc(a,c,W,Ye,fe+ve/W,!0),ve>0){const dt=Co(nt,ot,a,c);t.arc(dt.x,dt.y,ve,ot+Math.PI,fe-Pt)}const Je=Co(Me,fe,a,c);if(t.lineTo(Je.x,Je.y),xe>0){const dt=Co(Me,Te,a,c);t.arc(dt.x,dt.y,xe,fe-Pt,Te)}}else{t.moveTo(a,c);const Qe=Math.cos(Te)*D+a,ut=Math.sin(Te)*D+c;t.lineTo(Qe,ut);const Ye=Math.cos(We)*D+a,Je=Math.sin(We)*D+c;t.lineTo(Ye,Je)}t.closePath()}function kg(t,e,n,o,r){const{fullCircles:i,startAngle:a,circumference:c}=e;let m=e.endAngle;if(i){Ai(t,e,n,o,m,r);for(let C=0;C<i;++C)t.fill();isNaN(c)||(m=a+(c%Tt||Tt))}return Ai(t,e,n,o,m,r),t.fill(),m}function Ig(t,e,n,o,r){const{fullCircles:i,startAngle:a,circumference:c,options:m}=e,{borderWidth:C,borderJoinStyle:L,borderDash:D,borderDashOffset:W,borderRadius:K}=m,X=m.borderAlign==="inner";if(!C)return;t.setLineDash(D||[]),t.lineDashOffset=W,X?(t.lineWidth=C*2,t.lineJoin=L||"round"):(t.lineWidth=C,t.lineJoin=L||"bevel");let ee=e.endAngle;if(i){Ai(t,e,n,o,ee,r);for(let re=0;re<i;++re)t.stroke();isNaN(c)||(ee=a+(c%Tt||Tt))}X&&Mg(t,e,ee),m.selfJoin&&ee-a>=It&&K===0&&L!=="miter"&&Cg(t,e,ee),i||(Ai(t,e,n,o,ee,r),t.stroke())}class Xo extends $n{constructor(n){super();Oe(this,"circumference");Oe(this,"endAngle");Oe(this,"fullCircles");Oe(this,"innerRadius");Oe(this,"outerRadius");Oe(this,"pixelMargin");Oe(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,o,r){const i=this.getProps(["x","y"],r),{angle:a,distance:c}=Mc(i,{x:n,y:o}),{startAngle:m,endAngle:C,innerRadius:L,outerRadius:D,circumference:W}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),K=(this.options.spacing+this.options.borderWidth)/2,X=st(W,C-m),ee=ar(a,m,C)&&m!==C,re=X>=Tt||ee,fe=Ln(c,L+K,D+K);return re&&fe}getCenterPoint(n){const{x:o,y:r,startAngle:i,endAngle:a,innerRadius:c,outerRadius:m}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:C,spacing:L}=this.options,D=(i+a)/2,W=(c+m+L+C)/2;return{x:o+Math.cos(D)*W,y:r+Math.sin(D)*W}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:o,circumference:r}=this,i=(o.offset||0)/4,a=(o.spacing||0)/2,c=o.circular;if(this.pixelMargin=o.borderAlign==="inner"?.33:0,this.fullCircles=r>Tt?Math.floor(r/Tt):0,r===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const m=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(m)*i,Math.sin(m)*i);const C=1-Math.sin(Math.min(It,r||0)),L=i*C;n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,kg(n,this,L,a,c),Ig(n,this,L,a,c),n.restore()}}Oe(Xo,"id","arc"),Oe(Xo,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),Oe(Xo,"defaultRoutes",{backgroundColor:"backgroundColor"}),Oe(Xo,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function td(t,e,n=e){t.lineCap=st(n.borderCapStyle,e.borderCapStyle),t.setLineDash(st(n.borderDash,e.borderDash)),t.lineDashOffset=st(n.borderDashOffset,e.borderDashOffset),t.lineJoin=st(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=st(n.borderWidth,e.borderWidth),t.strokeStyle=st(n.borderColor,e.borderColor)}function Eg(t,e,n){t.lineTo(n.x,n.y)}function wg(t){return t.stepped?Xf:t.tension||t.cubicInterpolationMode==="monotone"?Jf:Eg}function nd(t,e,n={}){const o=t.length,{start:r=0,end:i=o-1}=n,{start:a,end:c}=e,m=Math.max(r,a),C=Math.min(i,c),L=r<a&&i<a||r>c&&i>c;return{count:o,start:m,loop:e.loop,ilen:C<m&&!L?o+C-m:C-m}}function Ag(t,e,n,o){const{points:r,options:i}=e,{count:a,start:c,loop:m,ilen:C}=nd(r,n,o),L=wg(i);let{move:D=!0,reverse:W}=o||{},K,X,ee;for(K=0;K<=C;++K)X=r[(c+(W?C-K:K))%a],!X.skip&&(D?(t.moveTo(X.x,X.y),D=!1):L(t,ee,X,W,i.stepped),ee=X);return m&&(X=r[(c+(W?C:0))%a],L(t,ee,X,W,i.stepped)),!!m}function Tg(t,e,n,o){const r=e.points,{count:i,start:a,ilen:c}=nd(r,n,o),{move:m=!0,reverse:C}=o||{};let L=0,D=0,W,K,X,ee,re,fe;const ye=ke=>(a+(C?c-ke:ke))%i,xe=()=>{ee!==re&&(t.lineTo(L,re),t.lineTo(L,ee),t.lineTo(L,fe))};for(m&&(K=r[ye(0)],t.moveTo(K.x,K.y)),W=0;W<=c;++W){if(K=r[ye(W)],K.skip)continue;const ke=K.x,ve=K.y,Ee=ke|0;Ee===X?(ve<ee?ee=ve:ve>re&&(re=ve),L=(D*L+ke)/++D):(xe(),t.lineTo(ke,ve),X=Ee,D=0,ee=re=ve),fe=ve}xe()}function Sa(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?Tg:Ag}function Bg(t){return t.stepped?Th:t.tension||t.cubicInterpolationMode==="monotone"?Bh:io}function Lg(t,e,n,o){let r=e._path;r||(r=e._path=new Path2D,e.path(r,n,o)&&r.closePath()),td(t,e.options),t.stroke(r)}function Ng(t,e,n,o){const{segments:r,options:i}=e,a=Sa(e);for(const c of r)td(t,i,c.style),t.beginPath(),a(t,e,c,{start:n,end:n+o-1})&&t.closePath(),t.stroke()}const Rg=typeof Path2D=="function";function Hg(t,e,n,o){Rg&&!e.options.segment?Lg(t,e,n,o):Ng(t,e,n,o)}class zn extends $n{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const o=this.options;if((o.tension||o.cubicInterpolationMode==="monotone")&&!o.stepped&&!this._pointsUpdated){const r=o.spanGaps?this._loop:this._fullLoop;Mh(this._points,o,e,r,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Oh(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,o=e.length;return o&&n[e[o-1].end]}interpolate(e,n){const o=this.options,r=e[n],i=this.points,a=zc(this,{property:n,start:r,end:r});if(!a.length)return;const c=[],m=Bg(o);let C,L;for(C=0,L=a.length;C<L;++C){const{start:D,end:W}=a[C],K=i[D],X=i[W];if(K===X){c.push(K);continue}const ee=Math.abs((r-K[n])/(X[n]-K[n])),re=m(K,X,ee,o.stepped);re[n]=e[n],c.push(re)}return c.length===1?c[0]:c}pathSegment(e,n,o){return Sa(this)(e,this,n,o)}path(e,n,o){const r=this.segments,i=Sa(this);let a=this._loop;n=n||0,o=o||this.points.length-n;for(const c of r)a&=i(e,this,c,{start:n,end:n+o-1});return!!a}draw(e,n,o,r){const i=this.options||{};(this.points||[]).length&&i.borderWidth&&(e.save(),Hg(e,this,o,r),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Oe(zn,"id","line"),Oe(zn,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),Oe(zn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),Oe(zn,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function Ms(t,e,n,o){const r=t.options,{[n]:i}=t.getProps([n],o);return Math.abs(e-i)<r.radius+r.hitRadius}class Ci extends $n{constructor(n){super();Oe(this,"parsed");Oe(this,"skip");Oe(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,o,r){const i=this.options,{x:a,y:c}=this.getProps(["x","y"],r);return Math.pow(n-a,2)+Math.pow(o-c,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(n,o){return Ms(this,n,"x",o)}inYRange(n,o){return Ms(this,n,"y",o)}getCenterPoint(n){const{x:o,y:r}=this.getProps(["x","y"],n);return{x:o,y:r}}size(n){n=n||this.options||{};let o=n.radius||0;o=Math.max(o,o&&n.hoverRadius||0);const r=o&&n.borderWidth||0;return(o+r)*2}draw(n,o){const r=this.options;this.skip||r.radius<.1||!Nn(this,o,this.size(r)/2)||(n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.fillStyle=r.backgroundColor,ba(n,r,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}Oe(Ci,"id","point"),Oe(Ci,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),Oe(Ci,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function od(t,e){const{x:n,y:o,base:r,width:i,height:a}=t.getProps(["x","y","base","width","height"],e);let c,m,C,L,D;return t.horizontal?(D=a/2,c=Math.min(n,r),m=Math.max(n,r),C=o-D,L=o+D):(D=i/2,c=n-D,m=n+D,C=Math.min(o,r),L=Math.max(o,r)),{left:c,top:C,right:m,bottom:L}}function Un(t,e,n,o){return t?0:Kt(e,n,o)}function Fg(t,e,n){const o=t.options.borderWidth,r=t.borderSkipped,i=Bc(o);return{t:Un(r.top,i.top,0,n),r:Un(r.right,i.right,0,e),b:Un(r.bottom,i.bottom,0,n),l:Un(r.left,i.left,0,e)}}function Og(t,e,n){const{enableBorderRadius:o}=t.getProps(["enableBorderRadius"]),r=t.options.borderRadius,i=co(r),a=Math.min(e,n),c=t.borderSkipped,m=o||yt(r);return{topLeft:Un(!m||c.top||c.left,i.topLeft,0,a),topRight:Un(!m||c.top||c.right,i.topRight,0,a),bottomLeft:Un(!m||c.bottom||c.left,i.bottomLeft,0,a),bottomRight:Un(!m||c.bottom||c.right,i.bottomRight,0,a)}}function Vg(t){const e=od(t),n=e.right-e.left,o=e.bottom-e.top,r=Fg(t,n/2,o/2),i=Og(t,n/2,o/2);return{outer:{x:e.left,y:e.top,w:n,h:o,radius:i},inner:{x:e.left+r.l,y:e.top+r.t,w:n-r.l-r.r,h:o-r.t-r.b,radius:{topLeft:Math.max(0,i.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,i.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,i.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,i.bottomRight-Math.max(r.b,r.r))}}}}function ha(t,e,n,o){const r=e===null,i=n===null,c=t&&!(r&&i)&&od(t,o);return c&&(r||Ln(e,c.left,c.right))&&(i||Ln(n,c.top,c.bottom))}function Pg(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function Dg(t,e){t.rect(e.x,e.y,e.w,e.h)}function ma(t,e,n={}){const o=t.x!==n.x?-e:0,r=t.y!==n.y?-e:0,i=(t.x+t.w!==n.x+n.w?e:0)-o,a=(t.y+t.h!==n.y+n.h?e:0)-r;return{x:t.x+o,y:t.y+r,w:t.w+i,h:t.h+a,radius:t.radius}}class Mi extends $n{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:o,backgroundColor:r}}=this,{inner:i,outer:a}=Vg(this),c=Pg(a.radius)?lr:Dg;e.save(),(a.w!==i.w||a.h!==i.h)&&(e.beginPath(),c(e,ma(a,n,i)),e.clip(),c(e,ma(i,-n,a)),e.fillStyle=o,e.fill("evenodd")),e.beginPath(),c(e,ma(i,n)),e.fillStyle=r,e.fill(),e.restore()}inRange(e,n,o){return ha(this,e,n,o)}inXRange(e,n){return ha(this,e,null,n)}inYRange(e,n){return ha(this,null,e,n)}getCenterPoint(e){const{x:n,y:o,base:r,horizontal:i}=this.getProps(["x","y","base","horizontal"],e);return{x:i?(n+r)/2:n,y:i?o:(o+r)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}Oe(Mi,"id","bar"),Oe(Mi,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),Oe(Mi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function zg(t,e,n){const o=t.segments,r=t.points,i=e.points,a=[];for(const c of o){let{start:m,end:C}=c;C=Vi(m,C,r);const L=ka(n,r[m],r[C],c.loop);if(!e.segments){a.push({source:c,target:L,start:r[m],end:r[C]});continue}const D=zc(e,L);for(const W of D){const K=ka(n,i[W.start],i[W.end],W.loop),X=Dc(c,r,K);for(const ee of X)a.push({source:ee,target:W,start:{[n]:xs(L,K,"start",Math.max)},end:{[n]:xs(L,K,"end",Math.min)}})}}return a}function ka(t,e,n,o){if(o)return;let r=e[t],i=n[t];return t==="angle"&&(r=Yt(r),i=Yt(i)),{property:t,start:r,end:i}}function Ug(t,e){const{x:n=null,y:o=null}=t||{},r=e.points,i=[];return e.segments.forEach(({start:a,end:c})=>{c=Vi(a,c,r);const m=r[a],C=r[c];o!==null?(i.push({x:m.x,y:o}),i.push({x:C.x,y:o})):n!==null&&(i.push({x:n,y:m.y}),i.push({x:n,y:C.y}))}),i}function Vi(t,e,n){for(;e>t;e--){const o=n[e];if(!isNaN(o.x)&&!isNaN(o.y))break}return e}function xs(t,e,n,o){return t&&e?o(t[n],e[n]):t?t[n]:e?e[n]:0}function rd(t,e){let n=[],o=!1;return Ot(t)?(o=!0,n=t):n=Ug(t,e),n.length?new zn({points:n,options:{tension:0},_loop:o,_fullLoop:o}):null}function Ss(t){return t&&t.fill!==!1}function Gg(t,e,n){let r=t[e].fill;const i=[e];let a;if(!n)return r;for(;r!==!1&&i.indexOf(r)===-1;){if(!qt(r))return r;if(a=t[r],!a)return!1;if(a.visible)return r;i.push(r),r=a.fill}return!1}function jg(t,e,n){const o=Yg(t);if(yt(o))return isNaN(o.value)?!1:o;let r=parseFloat(o);return qt(r)&&Math.floor(r)===r?Wg(o[0],e,r,n):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function Wg(t,e,n,o){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=o?!1:n}function qg(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:yt(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function $g(t,e,n){let o;return t==="start"?o=n:t==="end"?o=e.options.reverse?e.min:e.max:yt(t)?o=t.value:o=e.getBaseValue(),o}function Yg(t){const e=t.options,n=e.fill;let o=st(n&&n.target,n);return o===void 0&&(o=!!e.backgroundColor),o===!1||o===null?!1:o===!0?"origin":o}function Kg(t){const{scale:e,index:n,line:o}=t,r=[],i=o.segments,a=o.points,c=Xg(e,n);c.push(rd({x:null,y:e.bottom},o));for(let m=0;m<i.length;m++){const C=i[m];for(let L=C.start;L<=C.end;L++)Jg(r,a[L],c)}return new zn({points:r,options:{}})}function Xg(t,e){const n=[],o=t.getMatchingVisibleMetas("line");for(let r=0;r<o.length;r++){const i=o[r];if(i.index===e)break;i.hidden||n.unshift(i.dataset)}return n}function Jg(t,e,n){const o=[];for(let r=0;r<n.length;r++){const i=n[r],{first:a,last:c,point:m}=Zg(i,e,"x");if(!(!m||a&&c)){if(a)o.unshift(m);else if(t.push(m),!c)break}}t.push(...o)}function Zg(t,e,n){const o=t.interpolate(e,n);if(!o)return{};const r=o[n],i=t.segments,a=t.points;let c=!1,m=!1;for(let C=0;C<i.length;C++){const L=i[C],D=a[L.start][n],W=a[L.end][n];if(Ln(r,D,W)){c=r===D,m=r===W;break}}return{first:c,last:m,point:o}}class id{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,o){const{x:r,y:i,radius:a}=this;return n=n||{start:0,end:Tt},e.arc(r,i,a,n.end,n.start,!0),!o.bounds}interpolate(e){const{x:n,y:o,radius:r}=this,i=e.angle;return{x:n+Math.cos(i)*r,y:o+Math.sin(i)*r,angle:i}}}function Qg(t){const{chart:e,fill:n,line:o}=t;if(qt(n))return ey(e,n);if(n==="stack")return Kg(t);if(n==="shape")return!0;const r=ty(t);return r instanceof id?r:rd(r,o)}function ey(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function ty(t){return(t.scale||{}).getPointPositionForValue?oy(t):ny(t)}function ny(t){const{scale:e={},fill:n}=t,o=qg(n,e);if(qt(o)){const r=e.isHorizontal();return{x:r?o:null,y:r?null:o}}return null}function oy(t){const{scale:e,fill:n}=t,o=e.options,r=e.getLabels().length,i=o.reverse?e.max:e.min,a=$g(n,e,i),c=[];if(o.grid.circular){const m=e.getPointPositionForValue(0,i);return new id({x:m.x,y:m.y,radius:e.getDistanceFromCenterForValue(a)})}for(let m=0;m<r;++m)c.push(e.getPointPositionForValue(m,a));return c}function ga(t,e,n){const o=Qg(e),{chart:r,index:i,line:a,scale:c,axis:m}=e,C=a.options,L=C.fill,D=C.backgroundColor,{above:W=D,below:K=D}=L||{},X=r.getDatasetMeta(i),ee=Uc(r,X);o&&a.points.length&&(Ri(t,n),ry(t,{line:a,target:o,above:W,below:K,area:n,scale:c,axis:m,clip:ee}),Hi(t))}function ry(t,e){const{line:n,target:o,above:r,below:i,area:a,scale:c,clip:m}=e,C=n._loop?"angle":e.axis;t.save();let L=i;i!==r&&(C==="x"?(ks(t,o,a.top),ya(t,{line:n,target:o,color:r,scale:c,property:C,clip:m}),t.restore(),t.save(),ks(t,o,a.bottom)):C==="y"&&(Is(t,o,a.left),ya(t,{line:n,target:o,color:i,scale:c,property:C,clip:m}),t.restore(),t.save(),Is(t,o,a.right),L=r)),ya(t,{line:n,target:o,color:L,scale:c,property:C,clip:m}),t.restore()}function ks(t,e,n){const{segments:o,points:r}=e;let i=!0,a=!1;t.beginPath();for(const c of o){const{start:m,end:C}=c,L=r[m],D=r[Vi(m,C,r)];i?(t.moveTo(L.x,L.y),i=!1):(t.lineTo(L.x,n),t.lineTo(L.x,L.y)),a=!!e.pathSegment(t,c,{move:a}),a?t.closePath():t.lineTo(D.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function Is(t,e,n){const{segments:o,points:r}=e;let i=!0,a=!1;t.beginPath();for(const c of o){const{start:m,end:C}=c,L=r[m],D=r[Vi(m,C,r)];i?(t.moveTo(L.x,L.y),i=!1):(t.lineTo(n,L.y),t.lineTo(L.x,L.y)),a=!!e.pathSegment(t,c,{move:a}),a?t.closePath():t.lineTo(n,D.y)}t.lineTo(n,e.first().y),t.closePath(),t.clip()}function ya(t,e){const{line:n,target:o,property:r,color:i,scale:a,clip:c}=e,m=zg(n,o,r);for(const{source:C,target:L,start:D,end:W}of m){const{style:{backgroundColor:K=i}={}}=C,X=o!==!0;t.save(),t.fillStyle=K,iy(t,a,c,X&&ka(r,D,W)),t.beginPath();const ee=!!n.pathSegment(t,C);let re;if(X){ee?t.closePath():Es(t,o,W,r);const fe=!!o.pathSegment(t,L,{move:ee,reverse:!0});re=ee&&fe,re||Es(t,o,D,r)}t.closePath(),t.fill(re?"evenodd":"nonzero"),t.restore()}}function iy(t,e,n,o){const r=e.chart.chartArea,{property:i,start:a,end:c}=o||{};if(i==="x"||i==="y"){let m,C,L,D;i==="x"?(m=a,C=r.top,L=c,D=r.bottom):(m=r.left,C=a,L=r.right,D=c),t.beginPath(),n&&(m=Math.max(m,n.left),L=Math.min(L,n.right),C=Math.max(C,n.top),D=Math.min(D,n.bottom)),t.rect(m,C,L-m,D-C),t.clip()}}function Es(t,e,n,o){const r=e.interpolate(n,o);r&&t.lineTo(r.x,r.y)}var ay={id:"filler",afterDatasetsUpdate(t,e,n){const o=(t.data.datasets||[]).length,r=[];let i,a,c,m;for(a=0;a<o;++a)i=t.getDatasetMeta(a),c=i.dataset,m=null,c&&c.options&&c instanceof zn&&(m={visible:t.isDatasetVisible(a),index:a,fill:jg(c,a,o),chart:t,axis:i.controller.options.indexAxis,scale:i.vScale,line:c}),i.$filler=m,r.push(m);for(a=0;a<o;++a)m=r[a],!(!m||m.fill===!1)&&(m.fill=Gg(r,a,n.propagate))},beforeDraw(t,e,n){const o=n.drawTime==="beforeDraw",r=t.getSortedVisibleDatasetMetas(),i=t.chartArea;for(let a=r.length-1;a>=0;--a){const c=r[a].$filler;c&&(c.line.updateControlPoints(i,c.axis),o&&c.fill&&ga(t.ctx,c,i))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const o=t.getSortedVisibleDatasetMetas();for(let r=o.length-1;r>=0;--r){const i=o[r].$filler;Ss(i)&&ga(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,n){const o=e.meta.$filler;!Ss(o)||n.drawTime!=="beforeDatasetDraw"||ga(t.ctx,o,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ws=(t,e)=>{let{boxHeight:n=e,boxWidth:o=e}=t;return t.usePointStyle&&(n=Math.min(n,e),o=t.pointStyleWidth||Math.min(o,e)),{boxWidth:o,boxHeight:n,itemHeight:Math.max(e,n)}},ly=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class As extends $n{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,o){this.maxWidth=e,this.maxHeight=n,this._margins=o,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let n=wt(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(o=>e.filter(o,this.chart.data))),e.sort&&(n=n.sort((o,r)=>e.sort(o,r,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const o=e.labels,r=$t(o.font),i=r.size,a=this._computeTitleHeight(),{boxWidth:c,itemHeight:m}=ws(o,i);let C,L;n.font=r.string,this.isHorizontal()?(C=this.maxWidth,L=this._fitRows(a,i,c,m)+10):(L=this.maxHeight,C=this._fitCols(a,r,c,m)+10),this.width=Math.min(C,e.maxWidth||this.maxWidth),this.height=Math.min(L,e.maxHeight||this.maxHeight)}_fitRows(e,n,o,r){const{ctx:i,maxWidth:a,options:{labels:{padding:c}}}=this,m=this.legendHitBoxes=[],C=this.lineWidths=[0],L=r+c;let D=e;i.textAlign="left",i.textBaseline="middle";let W=-1,K=-L;return this.legendItems.forEach((X,ee)=>{const re=o+n/2+i.measureText(X.text).width;(ee===0||C[C.length-1]+re+2*c>a)&&(D+=L,C[C.length-(ee>0?0:1)]=0,K+=L,W++),m[ee]={left:0,top:K,row:W,width:re,height:r},C[C.length-1]+=re+c}),D}_fitCols(e,n,o,r){const{ctx:i,maxHeight:a,options:{labels:{padding:c}}}=this,m=this.legendHitBoxes=[],C=this.columnSizes=[],L=a-e;let D=c,W=0,K=0,X=0,ee=0;return this.legendItems.forEach((re,fe)=>{const{itemWidth:ye,itemHeight:xe}=sy(o,n,i,re,r);fe>0&&K+xe+2*c>L&&(D+=W+c,C.push({width:W,height:K}),X+=W+c,ee++,W=K=0),m[fe]={left:X,top:K,col:ee,width:ye,height:xe},W=Math.max(W,ye),K+=xe+c}),D+=W,C.push({width:W,height:K}),D}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:o,labels:{padding:r},rtl:i}}=this,a=xo(i,this.left,this.width);if(this.isHorizontal()){let c=0,m=ln(o,this.left+r,this.right-this.lineWidths[c]);for(const C of n)c!==C.row&&(c=C.row,m=ln(o,this.left+r,this.right-this.lineWidths[c])),C.top+=this.top+e+r,C.left=a.leftForLtr(a.x(m),C.width),m+=C.width+r}else{let c=0,m=ln(o,this.top+e+r,this.bottom-this.columnSizes[c].height);for(const C of n)C.col!==c&&(c=C.col,m=ln(o,this.top+e+r,this.bottom-this.columnSizes[c].height)),C.top=m,C.left+=this.left+r,C.left=a.leftForLtr(a.x(C.left),C.width),m+=C.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Ri(e,this),this._draw(),Hi(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:o,ctx:r}=this,{align:i,labels:a}=e,c=Vt.color,m=xo(e.rtl,this.left,this.width),C=$t(a.font),{padding:L}=a,D=C.size,W=D/2;let K;this.drawTitle(),r.textAlign=m.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=C.string;const{boxWidth:X,boxHeight:ee,itemHeight:re}=ws(a,D),fe=function(Ee,Me,Ie){if(isNaN(X)||X<=0||isNaN(ee)||ee<0)return;r.save();const Te=st(Ie.lineWidth,1);if(r.fillStyle=st(Ie.fillStyle,c),r.lineCap=st(Ie.lineCap,"butt"),r.lineDashOffset=st(Ie.lineDashOffset,0),r.lineJoin=st(Ie.lineJoin,"miter"),r.lineWidth=Te,r.strokeStyle=st(Ie.strokeStyle,c),r.setLineDash(st(Ie.lineDash,[])),a.usePointStyle){const We={radius:ee*Math.SQRT2/2,pointStyle:Ie.pointStyle,rotation:Ie.rotation,borderWidth:Te},nt=m.xPlus(Ee,X/2),Pe=Me+W;Tc(r,We,nt,Pe,a.pointStyleWidth&&X)}else{const We=Me+Math.max((D-ee)/2,0),nt=m.leftForLtr(Ee,X),Pe=co(Ie.borderRadius);r.beginPath(),Object.values(Pe).some(ot=>ot!==0)?lr(r,{x:nt,y:We,w:X,h:ee,radius:Pe}):r.rect(nt,We,X,ee),r.fill(),Te!==0&&r.stroke()}r.restore()},ye=function(Ee,Me,Ie){Io(r,Ie.text,Ee,Me+re/2,C,{strikethrough:Ie.hidden,textAlign:m.textAlign(Ie.textAlign)})},xe=this.isHorizontal(),ke=this._computeTitleHeight();xe?K={x:ln(i,this.left+L,this.right-o[0]),y:this.top+L+ke,line:0}:K={x:this.left+L,y:ln(i,this.top+ke+L,this.bottom-n[0].height),line:0},Oc(this.ctx,e.textDirection);const ve=re+L;this.legendItems.forEach((Ee,Me)=>{r.strokeStyle=Ee.fontColor,r.fillStyle=Ee.fontColor;const Ie=r.measureText(Ee.text).width,Te=m.textAlign(Ee.textAlign||(Ee.textAlign=a.textAlign)),We=X+W+Ie;let nt=K.x,Pe=K.y;m.setWidth(this.width),xe?Me>0&&nt+We+L>this.right&&(Pe=K.y+=ve,K.line++,nt=K.x=ln(i,this.left+L,this.right-o[K.line])):Me>0&&Pe+ve>this.bottom&&(nt=K.x=nt+n[K.line].width+L,K.line++,Pe=K.y=ln(i,this.top+ke+L,this.bottom-n[K.line].height));const ot=m.x(nt);if(fe(ot,Pe,Ee),nt=Vf(Te,nt+X+W,xe?nt+We:this.right,e.rtl),ye(m.x(nt),Pe,Ee),xe)K.x+=We+L;else if(typeof Ee.text!="string"){const mt=C.lineHeight;K.y+=ad(Ee,mt)+L}else K.y+=ve}),Vc(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,o=$t(n.font),r=Jt(n.padding);if(!n.display)return;const i=xo(e.rtl,this.left,this.width),a=this.ctx,c=n.position,m=o.size/2,C=r.top+m;let L,D=this.left,W=this.width;if(this.isHorizontal())W=Math.max(...this.lineWidths),L=this.top+C,D=ln(e.align,D,this.right-W);else{const X=this.columnSizes.reduce((ee,re)=>Math.max(ee,re.height),0);L=C+ln(e.align,this.top,this.bottom-X-e.labels.padding-this._computeTitleHeight())}const K=ln(c,D,D+W);a.textAlign=i.textAlign(Ec(c)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=o.string,Io(a,n.text,K,L,o)}_computeTitleHeight(){const e=this.options.title,n=$t(e.font),o=Jt(e.padding);return e.display?n.lineHeight+o.height:0}_getLegendItemAt(e,n){let o,r,i;if(Ln(e,this.left,this.right)&&Ln(n,this.top,this.bottom)){for(i=this.legendHitBoxes,o=0;o<i.length;++o)if(r=i[o],Ln(e,r.left,r.left+r.width)&&Ln(n,r.top,r.top+r.height))return this.legendItems[o]}return null}handleEvent(e){const n=this.options;if(!uy(e.type,n))return;const o=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const r=this._hoveredItem,i=ly(r,o);r&&!i&&wt(n.onLeave,[e,r,this],this),this._hoveredItem=o,o&&!i&&wt(n.onHover,[e,o,this],this)}else o&&wt(n.onClick,[e,o,this],this)}}function sy(t,e,n,o,r){const i=cy(o,t,e,n),a=dy(r,o,e.lineHeight);return{itemWidth:i,itemHeight:a}}function cy(t,e,n,o){let r=t.text;return r&&typeof r!="string"&&(r=r.reduce((i,a)=>i.length>a.length?i:a)),e+n.size/2+o.measureText(r).width}function dy(t,e,n){let o=t;return typeof e.text!="string"&&(o=ad(e,n)),o}function ad(t,e){const n=t.text?t.text.length:0;return e*n}function uy(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var fy={id:"legend",_element:As,start(t,e,n){const o=t.legend=new As({ctx:t.ctx,options:n,chart:t});Dn.configure(t,o,n),Dn.addBox(t,o)},stop(t){Dn.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const o=t.legend;Dn.configure(t,o,n),o.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const o=e.datasetIndex,r=n.chart;r.isDatasetVisible(o)?(r.hide(o),e.hidden=!0):(r.show(o),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:o,textAlign:r,color:i,useBorderRadius:a,borderRadius:c}}=t.legend.options;return t._getSortedDatasetMetas().map(m=>{const C=m.controller.getStyle(n?0:void 0),L=Jt(C.borderWidth);return{text:e[m.index].label,fillStyle:C.backgroundColor,fontColor:i,hidden:!m.visible,lineCap:C.borderCapStyle,lineDash:C.borderDash,lineDashOffset:C.borderDashOffset,lineJoin:C.borderJoinStyle,lineWidth:(L.width+L.height)/4,strokeStyle:C.borderColor,pointStyle:o||C.pointStyle,rotation:C.rotation,textAlign:r||C.textAlign,borderRadius:a&&(c||C.borderRadius),datasetIndex:m.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};const Jo={average(t){if(!t.length)return!1;let e,n,o=new Set,r=0,i=0;for(e=0,n=t.length;e<n;++e){const c=t[e].element;if(c&&c.hasValue()){const m=c.tooltipPosition();o.add(m.x),r+=m.y,++i}}return i===0||o.size===0?!1:{x:[...o].reduce((c,m)=>c+m)/o.size,y:r/i}},nearest(t,e){if(!t.length)return!1;let n=e.x,o=e.y,r=Number.POSITIVE_INFINITY,i,a,c;for(i=0,a=t.length;i<a;++i){const m=t[i].element;if(m&&m.hasValue()){const C=m.getCenterPoint(),L=_a(e,C);L<r&&(r=L,c=m)}}if(c){const m=c.tooltipPosition();n=m.x,o=m.y}return{x:n,y:o}}};function vn(t,e){return e&&(Ot(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Tn(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
76
76
|
`)>-1?t.split(`
|
|
77
|
-
`):t}function hy(t,e){const{element:n,datasetIndex:o,index:r}=e,i=t.getDatasetMeta(o).controller,{label:a,value:c}=i.getLabelAndValue(r);return{chart:t,label:a,parsed:i.getParsed(r),raw:t.data.datasets[o].data[r],formattedValue:c,dataset:i.getDataset(),dataIndex:r,datasetIndex:o,element:n}}function Ts(t,e){const n=t.chart.ctx,{body:o,footer:r,title:i}=t,{boxWidth:a,boxHeight:c}=e,m=$t(e.bodyFont),C=$t(e.titleFont),L=$t(e.footerFont),D=i.length,W=r.length,K=o.length,X=Jt(e.padding);let ee=X.height,re=0,fe=o.reduce((ke,ve)=>ke+ve.before.length+ve.lines.length+ve.after.length,0);if(fe+=t.beforeBody.length+t.afterBody.length,D&&(ee+=D*C.lineHeight+(D-1)*e.titleSpacing+e.titleMarginBottom),fe){const ke=e.displayColors?Math.max(c,m.lineHeight):m.lineHeight;ee+=K*ke+(fe-K)*m.lineHeight+(fe-1)*e.bodySpacing}W&&(ee+=e.footerMarginTop+W*L.lineHeight+(W-1)*e.footerSpacing);let ye=0;const xe=function(ke){re=Math.max(re,n.measureText(ke).width+ye)};return n.save(),n.font=C.string,kt(t.title,xe),n.font=m.string,kt(t.beforeBody.concat(t.afterBody),xe),ye=e.displayColors?a+2+e.boxPadding:0,kt(o,ke=>{kt(ke.before,xe),kt(ke.lines,xe),kt(ke.after,xe)}),ye=0,n.font=L.string,kt(t.footer,xe),n.restore(),re+=X.width,{width:re,height:ee}}function my(t,e){const{y:n,height:o}=e;return n<o/2?"top":n>t.height-o/2?"bottom":"center"}function gy(t,e,n,o){const{x:r,width:i}=o,a=n.caretSize+n.caretPadding;if(t==="left"&&r+i+a>e.width||t==="right"&&r-i-a<0)return!0}function yy(t,e,n,o){const{x:r,width:i}=n,{width:a,chartArea:{left:c,right:m}}=t;let C="center";return o==="center"?C=r<=(c+m)/2?"left":"right":r<=i/2?C="left":r>=a-i/2&&(C="right"),gy(C,t,e,n)&&(C="center"),C}function Bs(t,e,n){const o=n.yAlign||e.yAlign||my(t,n);return{xAlign:n.xAlign||e.xAlign||yy(t,e,n,o),yAlign:o}}function py(t,e){let{x:n,width:o}=t;return e==="right"?n-=o:e==="center"&&(n-=o/2),n}function _y(t,e,n){let{y:o,height:r}=t;return e==="top"?o+=n:e==="bottom"?o-=r+n:o-=r/2,o}function Ls(t,e,n,o){const{caretSize:r,caretPadding:i,cornerRadius:a}=t,{xAlign:c,yAlign:m}=n,C=r+i,{topLeft:L,topRight:D,bottomLeft:W,bottomRight:K}=co(a);let X=py(e,c);const ee=_y(e,m,C);return m==="center"?c==="left"?X+=C:c==="right"&&(X-=C):c==="left"?X-=Math.max(L,W)+r:c==="right"&&(X+=Math.max(D,K)+r),{x:Kt(X,0,o.width-e.width),y:Kt(ee,0,o.height-e.height)}}function si(t,e,n){const o=Jt(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-o.right:t.x+o.left}function Ns(t){return vn([],Tn(t))}function vy(t,e,n){return qn(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function Rs(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const ld={beforeTitle:wn,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,o=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(o>0&&e.dataIndex<o)return n[e.dataIndex]}return""},afterTitle:wn,beforeBody:wn,beforeLabel:wn,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return vt(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:wn,afterBody:wn,beforeFooter:wn,footer:wn,afterFooter:wn};function Qt(t,e,n,o){const r=t[e].call(n,o);return typeof r>"u"?ld[e].call(n,o):r}class Ia extends $n{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,o=this.options.setContext(this.getContext()),r=o.enabled&&n.options.animation&&o.animations,i=new Gc(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=vy(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:o}=n,r=Qt(o,"beforeTitle",this,e),i=Qt(o,"title",this,e),a=Qt(o,"afterTitle",this,e);let c=[];return c=vn(c,Tn(r)),c=vn(c,Tn(i)),c=vn(c,Tn(a)),c}getBeforeBody(e,n){return Ns(Qt(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:o}=n,r=[];return kt(e,i=>{const a={before:[],lines:[],after:[]},c=Rs(o,i);vn(a.before,Tn(Qt(c,"beforeLabel",this,i))),vn(a.lines,Qt(c,"label",this,i)),vn(a.after,Tn(Qt(c,"afterLabel",this,i))),r.push(a)}),r}getAfterBody(e,n){return Ns(Qt(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:o}=n,r=Qt(o,"beforeFooter",this,e),i=Qt(o,"footer",this,e),a=Qt(o,"afterFooter",this,e);let c=[];return c=vn(c,Tn(r)),c=vn(c,Tn(i)),c=vn(c,Tn(a)),c}_createItems(e){const n=this._active,o=this.chart.data,r=[],i=[],a=[];let c=[],m,C;for(m=0,C=n.length;m<C;++m)c.push(hy(this.chart,n[m]));return e.filter&&(c=c.filter((L,D,W)=>e.filter(L,D,W,o))),e.itemSort&&(c=c.sort((L,D)=>e.itemSort(L,D,o))),kt(c,L=>{const D=Rs(e.callbacks,L);r.push(Qt(D,"labelColor",this,L)),i.push(Qt(D,"labelPointStyle",this,L)),a.push(Qt(D,"labelTextColor",this,L))}),this.labelColors=r,this.labelPointStyles=i,this.labelTextColors=a,this.dataPoints=c,c}update(e,n){const o=this.options.setContext(this.getContext()),r=this._active;let i,a=[];if(!r.length)this.opacity!==0&&(i={opacity:0});else{const c=Jo[o.position].call(this,r,this._eventPosition);a=this._createItems(o),this.title=this.getTitle(a,o),this.beforeBody=this.getBeforeBody(a,o),this.body=this.getBody(a,o),this.afterBody=this.getAfterBody(a,o),this.footer=this.getFooter(a,o);const m=this._size=Ts(this,o),C=Object.assign({},c,m),L=Bs(this.chart,o,C),D=Ls(o,C,L,this.chart);this.xAlign=L.xAlign,this.yAlign=L.yAlign,i={opacity:1,x:D.x,y:D.y,width:m.width,height:m.height,caretX:c.x,caretY:c.y}}this._tooltipItems=a,this.$context=void 0,i&&this._resolveAnimations().update(this,i),e&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,o,r){const i=this.getCaretPosition(e,o,r);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)}getCaretPosition(e,n,o){const{xAlign:r,yAlign:i}=this,{caretSize:a,cornerRadius:c}=o,{topLeft:m,topRight:C,bottomLeft:L,bottomRight:D}=co(c),{x:W,y:K}=e,{width:X,height:ee}=n;let re,fe,ye,xe,ke,ve;return i==="center"?(ke=K+ee/2,r==="left"?(re=W,fe=re-a,xe=ke+a,ve=ke-a):(re=W+X,fe=re+a,xe=ke-a,ve=ke+a),ye=re):(r==="left"?fe=W+Math.max(m,L)+a:r==="right"?fe=W+X-Math.max(C,D)-a:fe=this.caretX,i==="top"?(xe=K,ke=xe-a,re=fe-a,ye=fe+a):(xe=K+ee,ke=xe+a,re=fe+a,ye=fe-a),ve=xe),{x1:re,x2:fe,x3:ye,y1:xe,y2:ke,y3:ve}}drawTitle(e,n,o){const r=this.title,i=r.length;let a,c,m;if(i){const C=xo(o.rtl,this.x,this.width);for(e.x=si(this,o.titleAlign,o),n.textAlign=C.textAlign(o.titleAlign),n.textBaseline="middle",a=$t(o.titleFont),c=o.titleSpacing,n.fillStyle=o.titleColor,n.font=a.string,m=0;m<i;++m)n.fillText(r[m],C.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+c,m+1===i&&(e.y+=o.titleMarginBottom-c)}}_drawColorBox(e,n,o,r,i){const a=this.labelColors[o],c=this.labelPointStyles[o],{boxHeight:m,boxWidth:C}=i,L=$t(i.bodyFont),D=si(this,"left",i),W=r.x(D),K=m<L.lineHeight?(L.lineHeight-m)/2:0,X=n.y+K;if(i.usePointStyle){const ee={radius:Math.min(C,m)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},re=r.leftForLtr(W,C)+C/2,fe=X+m/2;e.strokeStyle=i.multiKeyBackground,e.fillStyle=i.multiKeyBackground,ba(e,ee,re,fe),e.strokeStyle=a.borderColor,e.fillStyle=a.backgroundColor,ba(e,ee,re,fe)}else{e.lineWidth=yt(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,e.strokeStyle=a.borderColor,e.setLineDash(a.borderDash||[]),e.lineDashOffset=a.borderDashOffset||0;const ee=r.leftForLtr(W,C),re=r.leftForLtr(r.xPlus(W,1),C-2),fe=co(a.borderRadius);Object.values(fe).some(ye=>ye!==0)?(e.beginPath(),e.fillStyle=i.multiKeyBackground,lr(e,{x:ee,y:X,w:C,h:m,radius:fe}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),lr(e,{x:re,y:X+1,w:C-2,h:m-2,radius:fe}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(ee,X,C,m),e.strokeRect(ee,X,C,m),e.fillStyle=a.backgroundColor,e.fillRect(re,X+1,C-2,m-2))}e.fillStyle=this.labelTextColors[o]}drawBody(e,n,o){const{body:r}=this,{bodySpacing:i,bodyAlign:a,displayColors:c,boxHeight:m,boxWidth:C,boxPadding:L}=o,D=$t(o.bodyFont);let W=D.lineHeight,K=0;const X=xo(o.rtl,this.x,this.width),ee=function(Ie){n.fillText(Ie,X.x(e.x+K),e.y+W/2),e.y+=W+i},re=X.textAlign(a);let fe,ye,xe,ke,ve,Ee,Me;for(n.textAlign=a,n.textBaseline="middle",n.font=D.string,e.x=si(this,re,o),n.fillStyle=o.bodyColor,kt(this.beforeBody,ee),K=c&&re!=="right"?a==="center"?C/2+L:C+2+L:0,ke=0,Ee=r.length;ke<Ee;++ke){for(fe=r[ke],ye=this.labelTextColors[ke],n.fillStyle=ye,kt(fe.before,ee),xe=fe.lines,c&&xe.length&&(this._drawColorBox(n,e,ke,X,o),W=Math.max(D.lineHeight,m)),ve=0,Me=xe.length;ve<Me;++ve)ee(xe[ve]),W=D.lineHeight;kt(fe.after,ee)}K=0,W=D.lineHeight,kt(this.afterBody,ee),e.y-=i}drawFooter(e,n,o){const r=this.footer,i=r.length;let a,c;if(i){const m=xo(o.rtl,this.x,this.width);for(e.x=si(this,o.footerAlign,o),e.y+=o.footerMarginTop,n.textAlign=m.textAlign(o.footerAlign),n.textBaseline="middle",a=$t(o.footerFont),n.fillStyle=o.footerColor,n.font=a.string,c=0;c<i;++c)n.fillText(r[c],m.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+o.footerSpacing}}drawBackground(e,n,o,r){const{xAlign:i,yAlign:a}=this,{x:c,y:m}=e,{width:C,height:L}=o,{topLeft:D,topRight:W,bottomLeft:K,bottomRight:X}=co(r.cornerRadius);n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.beginPath(),n.moveTo(c+D,m),a==="top"&&this.drawCaret(e,n,o,r),n.lineTo(c+C-W,m),n.quadraticCurveTo(c+C,m,c+C,m+W),a==="center"&&i==="right"&&this.drawCaret(e,n,o,r),n.lineTo(c+C,m+L-X),n.quadraticCurveTo(c+C,m+L,c+C-X,m+L),a==="bottom"&&this.drawCaret(e,n,o,r),n.lineTo(c+K,m+L),n.quadraticCurveTo(c,m+L,c,m+L-K),a==="center"&&i==="left"&&this.drawCaret(e,n,o,r),n.lineTo(c,m+D),n.quadraticCurveTo(c,m,c+D,m),n.closePath(),n.fill(),r.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,o=this.$animations,r=o&&o.x,i=o&&o.y;if(r||i){const a=Jo[e.position].call(this,this._active,this._eventPosition);if(!a)return;const c=this._size=Ts(this,e),m=Object.assign({},a,this._size),C=Bs(n,e,m),L=Ls(e,m,C,n);(r._to!==L.x||i._to!==L.y)&&(this.xAlign=C.xAlign,this.yAlign=C.yAlign,this.width=c.width,this.height=c.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,L))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(n);const r={width:this.width,height:this.height},i={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const a=Jt(n.padding),c=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&c&&(e.save(),e.globalAlpha=o,this.drawBackground(i,e,r,n),Oc(e,n.textDirection),i.y+=a.top,this.drawTitle(i,e,n),this.drawBody(i,e,n),this.drawFooter(i,e,n),Vc(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const o=this._active,r=e.map(({datasetIndex:c,index:m})=>{const C=this.chart.getDatasetMeta(c);if(!C)throw new Error("Cannot find a dataset at index "+c);return{datasetIndex:c,element:C.data[m],index:m}}),i=!xi(o,r),a=this._positionChanged(r,n);(i||a)&&(this._active=r,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,o=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,i=this._active||[],a=this._getActiveElements(e,i,n,o),c=this._positionChanged(a,e),m=n||!xi(a,i)||c;return m&&(this._active=a,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),m}_getActiveElements(e,n,o,r){const i=this.options;if(e.type==="mouseout")return[];if(!r)return n.filter(c=>this.chart.data.datasets[c.datasetIndex]&&this.chart.getDatasetMeta(c.datasetIndex).controller.getParsed(c.index)!==void 0);const a=this.chart.getElementsAtEventForMode(e,i.mode,i,o);return i.reverse&&a.reverse(),a}_positionChanged(e,n){const{caretX:o,caretY:r,options:i}=this,a=Jo[i.position].call(this,e,n);return a!==!1&&(o!==a.x||r!==a.y)}}Oe(Ia,"positioners",Jo);var by={id:"tooltip",_element:Ia,positioners:Jo,afterInit(t,e,n){n&&(t.tooltip=new Ia({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:ld},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Cy=(t,e,n,o)=>(typeof e=="string"?(n=t.push(e)-1,o.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function My(t,e,n,o){const r=t.indexOf(e);if(r===-1)return Cy(t,e,n,o);const i=t.lastIndexOf(e);return r!==i?n:r}const xy=(t,e)=>t===null?null:Kt(Math.round(t),0,e);function Hs(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Ea extends Ao{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const o=this.getLabels();for(const{index:r,label:i}of n)o[r]===i&&o.splice(r,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(vt(e))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===e?n:My(o,e,st(n,e),this._addedLabels),xy(n,o.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:o,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(o=0),n||(r=this.getLabels().length-1)),this.min=o,this.max=r}buildTicks(){const e=this.min,n=this.max,o=this.options.offset,r=[];let i=this.getLabels();i=e===0&&n===i.length-1?i:i.slice(e,n+1),this._valueRange=Math.max(i.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let a=e;a<=n;a++)r.push({value:a});return r}getLabelForValue(e){return Hs.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}Oe(Ea,"id","category"),Oe(Ea,"defaults",{ticks:{callback:Hs}});function Sy(t,e){const n=[],{bounds:r,step:i,min:a,max:c,precision:m,count:C,maxTicks:L,maxDigits:D,includeBounds:W}=t,K=i||1,X=L-1,{min:ee,max:re}=e,fe=!vt(a),ye=!vt(c),xe=!vt(C),ke=(re-ee)/(D+1);let ve=Nl((re-ee)/X/K)*K,Ee,Me,Ie,Te;if(ve<1e-14&&!fe&&!ye)return[{value:ee},{value:re}];Te=Math.ceil(re/ve)-Math.floor(ee/ve),Te>X&&(ve=Nl(Te*ve/X/K)*K),vt(m)||(Ee=Math.pow(10,m),ve=Math.ceil(ve*Ee)/Ee),r==="ticks"?(Me=Math.floor(ee/ve)*ve,Ie=Math.ceil(re/ve)*ve):(Me=ee,Ie=re),fe&&ye&&i&&Tf((c-a)/i,ve/1e3)?(Te=Math.round(Math.min((c-a)/ve,L)),ve=(c-a)/Te,Me=a,Ie=c):xe?(Me=fe?a:Me,Ie=ye?c:Ie,Te=C-1,ve=(Ie-Me)/Te):(Te=(Ie-Me)/ve,er(Te,Math.round(Te),ve/1e3)?Te=Math.round(Te):Te=Math.ceil(Te));const We=Math.max(Rl(ve),Rl(Me));Ee=Math.pow(10,vt(m)?We:m),Me=Math.round(Me*Ee)/Ee,Ie=Math.round(Ie*Ee)/Ee;let nt=0;for(fe&&(W&&Me!==a?(n.push({value:a}),Me<a&&nt++,er(Math.round((Me+nt*ve)*Ee)/Ee,a,Fs(a,ke,t))&&nt++):Me<a&&nt++);nt<Te;++nt){const Pe=Math.round((Me+nt*ve)*Ee)/Ee;if(ye&&Pe>c)break;n.push({value:Pe})}return ye&&W&&Ie!==c?n.length&&er(n[n.length-1].value,c,Fs(c,ke,t))?n[n.length-1].value=c:n.push({value:c}):(!ye||Ie===c)&&n.push({value:Ie}),n}function Fs(t,e,{horizontal:n,minRotation:o}){const r=Cn(o),i=(n?Math.sin(r):Math.cos(r))||.001,a=.75*e*(""+t).length;return Math.min(e/i,a)}class wa extends Ao{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return vt(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:r,max:i}=this;const a=m=>r=n?r:m,c=m=>i=o?i:m;if(e){const m=Mn(r),C=Mn(i);m<0&&C<0?c(0):m>0&&C>0&&a(0)}if(r===i){let m=i===0?1:Math.abs(i*.05);c(i+m),e||a(r-m)}this.min=r,this.max=i}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=e,r;return o?(r=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),n=n||11),n&&(r=Math.min(n,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let o=this.getTickLimit();o=Math.max(2,o);const r={maxTicks:o,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},i=this._range||this,a=Sy(r,i);return e.bounds==="ticks"&&Bf(a,this,"value"),e.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const e=this.ticks;let n=this.min,o=this.max;if(super.configure(),this.options.offset&&e.length){const r=(o-n)/Math.max(e.length-1,1)/2;n-=r,o+=r}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(e){return Ua(e,this.chart.options.locale,this.options.ticks.format)}}class Aa extends wa{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=qt(e)?e:0,this.max=qt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,o=Cn(this.options.ticks.minRotation),r=(e?Math.sin(o):Math.cos(o))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,i.lineHeight/r))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}Oe(Aa,"id","linear"),Oe(Aa,"defaults",{ticks:{callback:Ga.formatters.numeric}});function Ta(t){const e=t.ticks;if(e.display&&t.display){const n=Jt(e.backdropPadding);return st(e.font&&e.font.size,Vt.font.size)+n.height}return 0}function ky(t,e,n){return n=Ot(n)?n:[n],{w:Kf(t,e.string,n),h:n.length*e.lineHeight}}function Os(t,e,n,o,r){return t===o||t===r?{start:e-n/2,end:e+n/2}:t<o||t>r?{start:e-n,end:e}:{start:e,end:e+n}}function Iy(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),o=[],r=[],i=t._pointLabels.length,a=t.options.pointLabels,c=a.centerPointLabels?It/i:0;for(let m=0;m<i;m++){const C=a.setContext(t.getPointLabelContext(m));r[m]=C.padding;const L=t.getPointPosition(m,t.drawingArea+r[m],c),D=$t(C.font),W=ky(t.ctx,D,t._pointLabels[m]);o[m]=W;const K=Yt(t.getIndexAngle(m)+c),X=Math.round(Pa(K)),ee=Os(X,L.x,W.w,0,180),re=Os(X,L.y,W.h,90,270);Ey(n,e,K,ee,re)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=Ty(t,o,r)}function Ey(t,e,n,o,r){const i=Math.abs(Math.sin(n)),a=Math.abs(Math.cos(n));let c=0,m=0;o.start<e.l?(c=(e.l-o.start)/i,t.l=Math.min(t.l,e.l-c)):o.end>e.r&&(c=(o.end-e.r)/i,t.r=Math.max(t.r,e.r+c)),r.start<e.t?(m=(e.t-r.start)/a,t.t=Math.min(t.t,e.t-m)):r.end>e.b&&(m=(r.end-e.b)/a,t.b=Math.max(t.b,e.b+m))}function wy(t,e,n){const o=t.drawingArea,{extra:r,additionalAngle:i,padding:a,size:c}=n,m=t.getPointPosition(e,o+r+a,i),C=Math.round(Pa(Yt(m.angle+Pt))),L=Ny(m.y,c.h,C),D=By(C),W=Ly(m.x,c.w,D);return{visible:!0,x:m.x,y:L,textAlign:D,left:W,top:L,right:W+c.w,bottom:L+c.h}}function Ay(t,e){if(!e)return!0;const{left:n,top:o,right:r,bottom:i}=t;return!(Nn({x:n,y:o},e)||Nn({x:n,y:i},e)||Nn({x:r,y:o},e)||Nn({x:r,y:i},e))}function Ty(t,e,n){const o=[],r=t._pointLabels.length,i=t.options,{centerPointLabels:a,display:c}=i.pointLabels,m={extra:Ta(i)/2,additionalAngle:a?It/r:0};let C;for(let L=0;L<r;L++){m.padding=n[L],m.size=e[L];const D=wy(t,L,m);o.push(D),c==="auto"&&(D.visible=Ay(D,C),D.visible&&(C=D))}return o}function By(t){return t===0||t===180?"center":t<180?"left":"right"}function Ly(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function Ny(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function Ry(t,e,n){const{left:o,top:r,right:i,bottom:a}=n,{backdropColor:c}=e;if(!vt(c)){const m=co(e.borderRadius),C=Jt(e.backdropPadding);t.fillStyle=c;const L=o-C.left,D=r-C.top,W=i-o+C.width,K=a-r+C.height;Object.values(m).some(X=>X!==0)?(t.beginPath(),lr(t,{x:L,y:D,w:W,h:K,radius:m}),t.fill()):t.fillRect(L,D,W,K)}}function Hy(t,e){const{ctx:n,options:{pointLabels:o}}=t;for(let r=e-1;r>=0;r--){const i=t._pointLabelItems[r];if(!i.visible)continue;const a=o.setContext(t.getPointLabelContext(r));Ry(n,a,i);const c=$t(a.font),{x:m,y:C,textAlign:L}=i;Io(n,t._pointLabels[r],m,C+c.lineHeight/2,c,{color:a.color,textAlign:L,textBaseline:"middle"})}}function sd(t,e,n,o){const{ctx:r}=t;if(n)r.arc(t.xCenter,t.yCenter,e,0,Tt);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let a=1;a<o;a++)i=t.getPointPosition(a,e),r.lineTo(i.x,i.y)}}function Fy(t,e,n,o,r){const i=t.ctx,a=e.circular,{color:c,lineWidth:m}=e;!a&&!o||!c||!m||n<0||(i.save(),i.strokeStyle=c,i.lineWidth=m,i.setLineDash(r.dash||[]),i.lineDashOffset=r.dashOffset,i.beginPath(),sd(t,n,a,o),i.closePath(),i.stroke(),i.restore())}function Oy(t,e,n){return qn(t,{label:n,index:e,type:"pointLabel"})}class Zo extends wa{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=Jt(Ta(this.options)/2),n=this.width=this.maxWidth-e.width,o=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+o/2+e.top),this.drawingArea=Math.floor(Math.min(n,o)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=qt(e)&&!isNaN(e)?e:0,this.max=qt(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ta(this.options))}generateTickLabels(e){wa.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,o)=>{const r=wt(this.options.pointLabels.callback,[n,o],this);return r||r===0?r:""}).filter((n,o)=>this.chart.getDataVisibility(o))}fit(){const e=this.options;e.display&&e.pointLabels.display?Iy(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,o,r){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((o-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,o,r))}getIndexAngle(e){const n=Tt/(this._pointLabels.length||1),o=this.options.startAngle||0;return Yt(e*n+Cn(o))}getDistanceFromCenterForValue(e){if(vt(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(vt(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const o=n[e];return Oy(this.getContext(),e,o)}}getPointPosition(e,n,o=0){const r=this.getIndexAngle(e)-Pt+o;return{x:Math.cos(r)*n+this.xCenter,y:Math.sin(r)*n+this.yCenter,angle:r}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:o,right:r,bottom:i}=this._pointLabelItems[e];return{left:n,top:o,right:r,bottom:i}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const o=this.ctx;o.save(),o.beginPath(),sd(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),o.closePath(),o.fillStyle=e,o.fill(),o.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:o,grid:r,border:i}=n,a=this._pointLabels.length;let c,m,C;if(n.pointLabels.display&&Hy(this,a),r.display&&this.ticks.forEach((L,D)=>{if(D!==0||D===0&&this.min<0){m=this.getDistanceFromCenterForValue(L.value);const W=this.getContext(D),K=r.setContext(W),X=i.setContext(W);Fy(this,K,m,a,X)}}),o.display){for(e.save(),c=a-1;c>=0;c--){const L=o.setContext(this.getPointLabelContext(c)),{color:D,lineWidth:W}=L;!W||!D||(e.lineWidth=W,e.strokeStyle=D,e.setLineDash(L.borderDash),e.lineDashOffset=L.borderDashOffset,m=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max),C=this.getPointPosition(c,m),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(C.x,C.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,o=n.ticks;if(!o.display)return;const r=this.getIndexAngle(0);let i,a;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((c,m)=>{if(m===0&&this.min>=0&&!n.reverse)return;const C=o.setContext(this.getContext(m)),L=$t(C.font);if(i=this.getDistanceFromCenterForValue(this.ticks[m].value),C.showLabelBackdrop){e.font=L.string,a=e.measureText(c.label).width,e.fillStyle=C.backdropColor;const D=Jt(C.backdropPadding);e.fillRect(-a/2-D.left,-i-L.size/2-D.top,a+D.width,L.size+D.height)}Io(e,c.label,0,-i,L,{color:C.color,strokeColor:C.textStrokeColor,strokeWidth:C.textStrokeWidth})}),e.restore()}drawTitle(){}}Oe(Zo,"id","radialLinear"),Oe(Zo,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ga.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),Oe(Zo,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Oe(Zo,"descriptors",{angleLines:{_fallback:"grid"}});const Pi={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},tn=Object.keys(Pi);function Vs(t,e){return t-e}function Ps(t,e){if(vt(e))return null;const n=t._adapter,{parser:o,round:r,isoWeekday:i}=t._parseOpts;let a=e;return typeof o=="function"&&(a=o(a)),qt(a)||(a=typeof o=="string"?n.parse(a,o):n.parse(a)),a===null?null:(r&&(a=r==="week"&&(ko(i)||i===!0)?n.startOf(a,"isoWeek",i):n.startOf(a,r)),+a)}function Ds(t,e,n,o){const r=tn.length;for(let i=tn.indexOf(t);i<r-1;++i){const a=Pi[tn[i]],c=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-e)/(c*a.size))<=o)return tn[i]}return tn[r-1]}function Vy(t,e,n,o,r){for(let i=tn.length-1;i>=tn.indexOf(n);i--){const a=tn[i];if(Pi[a].common&&t._adapter.diff(r,o,a)>=e-1)return a}return tn[n?tn.indexOf(n):0]}function Py(t){for(let e=tn.indexOf(t)+1,n=tn.length;e<n;++e)if(Pi[tn[e]].common)return tn[e]}function zs(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:o,hi:r}=Da(n,e),i=n[o]>=e?n[o]:n[r];t[i]=!0}}function Dy(t,e,n,o){const r=t._adapter,i=+r.startOf(e[0].value,o),a=e[e.length-1].value;let c,m;for(c=i;c<=a;c=+r.add(c,1,o))m=n[c],m>=0&&(e[m].major=!0);return e}function Us(t,e,n){const o=[],r={},i=e.length;let a,c;for(a=0;a<i;++a)c=e[a],r[c]=a,o.push({value:c,major:!1});return i===0||!n?o:Dy(t,o,r,n)}class Ti extends Ao{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const o=e.time||(e.time={}),r=this._adapter=new fm._date(e.adapters.date);r.init(n),Qo(o.displayFormats,r.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:Ps(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,o=e.time.unit||"day";let{min:r,max:i,minDefined:a,maxDefined:c}=this.getUserBounds();function m(C){!a&&!isNaN(C.min)&&(r=Math.min(r,C.min)),!c&&!isNaN(C.max)&&(i=Math.max(i,C.max))}(!a||!c)&&(m(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&m(this.getMinMax(!1))),r=qt(r)&&!isNaN(r)?r:+n.startOf(Date.now(),o),i=qt(i)&&!isNaN(i)?i:+n.endOf(Date.now(),o)+1,this.min=Math.min(r,i-1),this.max=Math.max(r+1,i)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],o=e[e.length-1]),{min:n,max:o}}buildTicks(){const e=this.options,n=e.time,o=e.ticks,r=o.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const i=this.min,a=this.max,c=Hf(r,i,a);return this._unit=n.unit||(o.autoSkip?Ds(n.minUnit,this.min,this.max,this._getLabelCapacity(i)):Vy(this,c.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:Py(this._unit),this.initOffsets(r),e.reverse&&c.reverse(),Us(this,c,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,o=0,r,i;this.options.offset&&e.length&&(r=this.getDecimalForValue(e[0]),e.length===1?n=1-r:n=(this.getDecimalForValue(e[1])-r)/2,i=this.getDecimalForValue(e[e.length-1]),e.length===1?o=i:o=(i-this.getDecimalForValue(e[e.length-2]))/2);const a=e.length<3?.5:.25;n=Kt(n,0,a),o=Kt(o,0,a),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const e=this._adapter,n=this.min,o=this.max,r=this.options,i=r.time,a=i.unit||Ds(i.minUnit,n,o,this._getLabelCapacity(n)),c=st(r.ticks.stepSize,1),m=a==="week"?i.isoWeekday:!1,C=ko(m)||m===!0,L={};let D=n,W,K;if(C&&(D=+e.startOf(D,"isoWeek",m)),D=+e.startOf(D,C?"day":a),e.diff(o,n,a)>1e5*c)throw new Error(n+" and "+o+" are too far apart with stepSize of "+c+" "+a);const X=r.ticks.source==="data"&&this.getDataTimestamps();for(W=D,K=0;W<o;W=+e.add(W,c,a),K++)zs(L,W,X);return(W===o||r.bounds==="ticks"||K===1)&&zs(L,W,X),Object.keys(L).sort(Vs).map(ee=>+ee)}getLabelForValue(e){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(e,o.tooltipFormat):n.format(e,o.displayFormats.datetime)}format(e,n){const r=this.options.time.displayFormats,i=this._unit,a=n||r[i];return this._adapter.format(e,a)}_tickFormatFunction(e,n,o,r){const i=this.options,a=i.ticks.callback;if(a)return wt(a,[e,n,o],this);const c=i.time.displayFormats,m=this._unit,C=this._majorUnit,L=m&&c[m],D=C&&c[C],W=o[n],K=C&&D&&W&&W.major;return this._adapter.format(e,r||(K?D:L))}generateTickLabels(e){let n,o,r;for(n=0,o=e.length;n<o;++n)r=e[n],r.label=this._tickFormatFunction(r.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,o=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,o=this.ctx.measureText(e).width,r=Cn(this.isHorizontal()?n.maxRotation:n.minRotation),i=Math.cos(r),a=Math.sin(r),c=this._resolveTickFontOptions(0).size;return{w:o*i+c*a,h:o*a+c*i}}_getLabelCapacity(e){const n=this.options.time,o=n.displayFormats,r=o[n.unit]||o.millisecond,i=this._tickFormatFunction(e,0,Us(this,[e],this._majorUnit),r),a=this._getLabelSize(i),c=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return c>0?c:1}getDataTimestamps(){let e=this._cache.data||[],n,o;if(e.length)return e;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(n=0,o=r.length;n<o;++n)e=e.concat(r[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,o;if(e.length)return e;const r=this.getLabels();for(n=0,o=r.length;n<o;++n)e.push(Ps(this,r[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Sc(e.sort(Vs))}}Oe(Ti,"id","time"),Oe(Ti,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function ci(t,e,n){let o=0,r=t.length-1,i,a,c,m;n?(e>=t[o].pos&&e<=t[r].pos&&({lo:o,hi:r}=so(t,"pos",e)),{pos:i,time:c}=t[o],{pos:a,time:m}=t[r]):(e>=t[o].time&&e<=t[r].time&&({lo:o,hi:r}=so(t,"time",e)),{time:i,pos:c}=t[o],{time:a,pos:m}=t[r]);const C=a-i;return C?c+(m-c)*(e-i)/C:c}class Gs extends Ti{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=ci(n,this.min),this._tableRange=ci(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:o}=this,r=[],i=[];let a,c,m,C,L;for(a=0,c=e.length;a<c;++a)C=e[a],C>=n&&C<=o&&r.push(C);if(r.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(a=0,c=r.length;a<c;++a)L=r[a+1],m=r[a-1],C=r[a],Math.round((L+m)/2)!==C&&i.push({time:C,pos:a/(c-1)});return i}_generate(){const e=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(e)||!o.length)&&o.splice(0,0,e),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((r,i)=>r-i)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?e=this.normalize(n.concat(o)):e=n.length?n:o,e=this._cache.all=e,e}getDecimalForValue(e){return(ci(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return ci(this._table,o*this._tableRange+this._minPos,!0)}}Oe(Gs,"id","timeseries"),Oe(Gs,"defaults",Ti.defaults);mn.register(mi,yi,pi,Ca,Mo,gi,_i,Xo,zn,Mi,Ci,Ea,Aa,Zo,by,fy,ay);const zy=t=>{const e=t.component.chart;e&&Object.assign(mn.defaults,e)},Uy=t=>{t.event.cssEvent.textbox_onBeforeFocus&&(ce.event.cssEvent.textbox_onBeforeFocus=t.event.cssEvent.textbox_onBeforeFocus),t.event.cssEvent.textbox_onAfterFocus&&(ce.event.cssEvent.textbox_onAfterFocus=t.event.cssEvent.textbox_onAfterFocus),t.event.cssEvent.textbox_onBeforeBlur&&(ce.event.cssEvent.textbox_onBeforeBlur=t.event.cssEvent.textbox_onBeforeBlur),t.event.cssEvent.textbox_onAfterBlur&&(ce.event.cssEvent.textbox_onAfterBlur=t.event.cssEvent.textbox_onAfterBlur),t.event.cssEvent.textbox_onBeforeClick&&(ce.event.cssEvent.textbox_onBeforeClick=t.event.cssEvent.textbox_onBeforeClick),t.event.cssEvent.textbox_onAfterClick&&(ce.event.cssEvent.textbox_onAfterClick=t.event.cssEvent.textbox_onAfterClick),t.event.cssEvent.textbox_onBeforeMouseover&&(ce.event.cssEvent.textbox_onBeforeMouseover=t.event.cssEvent.textbox_onBeforeMouseover),t.event.cssEvent.textbox_onAfterMouseover&&(ce.event.cssEvent.textbox_onAfterMouseover=t.event.cssEvent.textbox_onAfterMouseover),t.event.cssEvent.textbox_onBeforeMouseout&&(ce.event.cssEvent.textbox_onBeforeMouseout=t.event.cssEvent.textbox_onBeforeMouseout),t.event.cssEvent.textbox_onAfterMouseout&&(ce.event.cssEvent.textbox_onAfterMouseout=t.event.cssEvent.textbox_onAfterMouseout),t.event.cssEvent.textbox_onBeforeTouchstart&&(ce.event.cssEvent.textbox_onBeforeTouchstart=t.event.cssEvent.textbox_onBeforeTouchstart),t.event.cssEvent.textbox_onAfterTouchstart&&(ce.event.cssEvent.textbox_onAfterTouchstart=t.event.cssEvent.textbox_onAfterTouchstart),t.event.cssEvent.textbox_onBeforeTouchend&&(ce.event.cssEvent.textbox_onBeforeTouchend=t.event.cssEvent.textbox_onBeforeTouchend),t.event.cssEvent.textbox_onAfterTouchend&&(ce.event.cssEvent.textbox_onAfterTouchend=t.event.cssEvent.textbox_onAfterTouchend),t.event.cssEvent.button_onBeforeFocus&&(ce.event.cssEvent.button_onBeforeFocus=t.event.cssEvent.button_onBeforeFocus),t.event.cssEvent.button_onAfterFocus&&(ce.event.cssEvent.button_onAfterFocus=t.event.cssEvent.button_onAfterFocus),t.event.cssEvent.button_onBeforeBlur&&(ce.event.cssEvent.button_onBeforeBlur=t.event.cssEvent.button_onBeforeBlur),t.event.cssEvent.button_onAfterBlur&&(ce.event.cssEvent.button_onAfterBlur=t.event.cssEvent.button_onAfterBlur),t.event.cssEvent.button_onBeforeClick&&(ce.event.cssEvent.button_onBeforeClick=t.event.cssEvent.button_onBeforeClick),t.event.cssEvent.button_onAfterClick&&(ce.event.cssEvent.button_onAfterClick=t.event.cssEvent.button_onAfterClick),t.event.cssEvent.button_onBeforeMouseover&&(ce.event.cssEvent.button_onBeforeMouseover=t.event.cssEvent.button_onBeforeMouseover),t.event.cssEvent.button_onAfterMouseover&&(ce.event.cssEvent.button_onAfterMouseover=t.event.cssEvent.button_onAfterMouseover),t.event.cssEvent.button_onBeforeMouseout&&(ce.event.cssEvent.button_onBeforeMouseout=t.event.cssEvent.button_onBeforeMouseout),t.event.cssEvent.button_onAfterMouseout&&(ce.event.cssEvent.button_onAfterMouseout=t.event.cssEvent.button_onAfterMouseout),t.event.cssEvent.button_onBeforeTouchstart&&(ce.event.cssEvent.button_onBeforeTouchstart=t.event.cssEvent.button_onBeforeTouchstart),t.event.cssEvent.button_onAfterTouchstart&&(ce.event.cssEvent.button_onAfterTouchstart=t.event.cssEvent.button_onAfterTouchstart),t.event.cssEvent.button_onBeforeTouchend&&(ce.event.cssEvent.button_onBeforeTouchend=t.event.cssEvent.button_onBeforeTouchend),t.event.cssEvent.button_onAfterTouchend&&(ce.event.cssEvent.button_onAfterTouchend=t.event.cssEvent.button_onAfterTouchend),t.event.cssEvent.input_onBeforeFocus&&(ce.event.cssEvent.input_onBeforeFocus=t.event.cssEvent.input_onBeforeFocus),t.event.cssEvent.input_onAfterFocus&&(ce.event.cssEvent.input_onAfterFocus=t.event.cssEvent.input_onAfterFocus),t.event.cssEvent.input_onBeforeBlur&&(ce.event.cssEvent.input_onBeforeBlur=t.event.cssEvent.input_onBeforeBlur),t.event.cssEvent.input_onAfterBlur&&(ce.event.cssEvent.input_onAfterBlur=t.event.cssEvent.input_onAfterBlur),t.event.cssEvent.input_onBeforeMouseover&&(ce.event.cssEvent.input_onBeforeMouseover=t.event.cssEvent.input_onBeforeMouseover),t.event.cssEvent.input_onAfterMouseover&&(ce.event.cssEvent.input_onAfterMouseover=t.event.cssEvent.input_onAfterMouseover),t.event.cssEvent.input_onBeforeMouseout&&(ce.event.cssEvent.input_onBeforeMouseout=t.event.cssEvent.input_onBeforeMouseout),t.event.cssEvent.input_onAfterMouseout&&(ce.event.cssEvent.input_onAfterMouseout=t.event.cssEvent.input_onAfterMouseout),t.event.cssEvent.input_onBeforeTouchstart&&(ce.event.cssEvent.input_onBeforeTouchstart=t.event.cssEvent.input_onBeforeTouchstart),t.event.cssEvent.input_onAfterTouchstart&&(ce.event.cssEvent.input_onAfterTouchstart=t.event.cssEvent.input_onAfterTouchstart),t.event.cssEvent.input_onBeforeTouchend&&(ce.event.cssEvent.input_onBeforeTouchend=t.event.cssEvent.input_onBeforeTouchend),t.event.cssEvent.input_onAfterTouchend&&(ce.event.cssEvent.input_onAfterTouchend=t.event.cssEvent.input_onAfterTouchend),ce.componentStyle={size:t.componentStyle.size,filledColor:t.componentStyle.filledColor,emptyColor:t.componentStyle.emptyColor,filledTextColor:t.componentStyle.filledTextColor,emptyTextColor:t.componentStyle.emptyTextColor,primaryColor:t.componentStyle.primaryColor,mutedColor:t.componentStyle.mutedColor,infoColor:t.componentStyle.infoColor,successColor:t.componentStyle.successColor,dangerColor:t.componentStyle.dangerColor,warningColor:t.componentStyle.warningColor,invertColor:t.componentStyle.invertColor,minHeightS:t.componentStyle.minHeightS,minHeightM:t.componentStyle.minHeightM,minHeightL:t.componentStyle.minHeightL,minHeightXL:t.componentStyle.minHeightXL,fontSizeS:t.componentStyle.fontSizeS,fontSizeM:t.componentStyle.fontSizeM,fontSizeL:t.componentStyle.fontSizeL,fontSizeXL:t.componentStyle.fontSizeXL,primaryInvertColor:null,mutedInvertColor:null,infoInvertColor:null,successInvertColor:null,dangerInvertColor:null,warningInvertColor:null,filledInvertColor:null,emptyInvertColor:null,filledTextInvertColor:null,emptyTextInvertColor:null,componentColor:{primary:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},muted:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},info:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},success:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},danger:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},warning:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null}}},ce.componentConfig={filesetSize:t.component.filesetSize??1/0,filesetTotalSize:t.component.filesetTotalSize??1/0};const e=Yu(t),n=qu(t);ce.note=e,ce.grid=n,zy(t),ce.component={accordionList:{},baggieList:{},bannerList:{},buttonList:{},calendarList:{},captionList:{},chartList:{},drawerList:{},dropdownList:{},filesetList:{},gapList:{},imageboxList:{},inputList:{},inputGroupList:{},labelList:{},layoutList:{},listList:{},modalList:{},paginationList:{},paragraphList:{},popupList:{},spinnerList:{},tableList:{}}};function Bt(t,e){return ao.defineComponent({name:`${e}SSRWrapper`,setup(n,{slots:o,attrs:r}){const i=ao.ref(null);return ao.onMounted(async()=>{const a=await t();i.value=ao.markRaw(a.default)}),()=>i.value?ao.h(i.value,{...r},o):null}})}const Ba=ao.ref("pc"),Gy=()=>ao.readonly(Ba),jy=()=>{if(typeof window>"u")return;const t=()=>{const e=tu(window.innerWidth);Ba.value!==e&&(Ba.value=e)};t(),window.addEventListener("resize",()=>{requestAnimationFrame(t)})},Bi="rgba(19,70,134,1)",cd="rgba(158,158,158,1)",dd="rgba(147,191,207,1)",ud="rgba(95,141,78,1)",fd="rgba(247,113,109,1)",hd="rgba(255,193,98,1)",Ja="rgba(48,48,48,1)",Za="rgba(255,255,255,1)",md="rgba(255,255,255,1)",La=()=>{const t=Ra.getVanillanoteConfig(),e=Na.getVanillagridConfig();e.footerFormula={$$COUNT_CHECK:function(r){let i=0;return r.forEach(a=>{a==="Y"&&(i=i+1)}),String(i)}},e.dataType={img:{cellStyle:{justifyContent:"center",textAlign:"center",padding:"0"},onSelected:function(r){r.firstChild.children[0]&&r.firstChild.children[0].style.setProperty("opacity","0.2")},onUnselected:function(r){r.firstChild.children[0]&&r.firstChild.children[0].style.removeProperty("opacity")},getValue:function(r,i){return i||null},getText:function(r,i){return i?i.alt:null},getChildNode:function(r,i){const a=document.createElement("span");if(!i||!i.value)return a;a.style.display="flex",a.style.alignItems="center",a.style.position="relative",a.style.overflow="hidden",a.style.width="100%";const c=document.createElement("img"),m=document.createElement("span");return c.style.width="100%",c.style.zIndex="1",c.src=i.value.src,c.alt=i.text,m.style.position="absolute",m.style.fontSize="12px",$s(dn(un.component.getGrid(r).getGridInfo().cssInfo.selectCellBackColor))?m.style.color="black":m.style.color="white",m.style.textAlign="left",m.style.display="inline-block",m.style.width="100%",m.style.whiteSpace="normal",m.style.wordBreak="break-all",m.textContent=i.text,c.gridId=r,c.cellRow=i.rowIndex,c.cellCol=i.colIndex,a.append(c),a.append(m),a.addEventListener("click",function(C){un.component.getGrid(r).setTargetCell(C.target.cellRow,C.target.cellCol)}),a.addEventListener("dblclick",function(C){un.component.getGrid(r).editCell(C.target.cellRow,C.target.cellCol)}),a},getEditor:function(r,i,a,c,m){if(!a.value)return null;const C=document.createElement("input");return C.setAttribute("type","text"),C.style.width=r.offsetWidth+"px",C.style.height=r.scrollHeight+C.offsetHeight-C.clientHeight+"px",C.style.position="absolute",C.style.zIndex="200",C.value=a.text,C.addEventListener("keydown",function(L){switch(L.key){case"Enter":c(),L.stopPropagation(),L.preventDefault();break;case"Escape":m(),L.stopPropagation(),L.preventDefault();break;case"Tab":c(),L.stopPropagation(),L.preventDefault();break;case"F2":c(),L.stopPropagation(),L.preventDefault();break}}),C},getEditedValue:function(r,i,a){if(!a.value)return null;const c=a.value;return c.alt=r.value,c},getFilterValue:function(r,i){return i?"title : "+i.alt:null},getSortValue:function(r,i){return i?i.alt:null},getCopyValue:function(r,i){return i?i.alt:null},getPasteValue:function(r,i,a){if(!i.value)return null;const c=i.value;return c.alt=a,c}},radio:{cellStyle:{justifyContent:"center",textAlign:"center"},onSelectedAndKeyDown:function(r,i,a){return(r.key==="Enter"||r.key===" ")&&(un.component.getGrid(i).setColSameValue(a.colIndex,"N",!0),un.component.getGrid(i).setCellValue(a.rowIndex,a.colIndex,"Y",!0),r.stopPropagation(),r.preventDefault()),!1},onClick:function(r,i,a){un.component.getGrid(i).setColSameValue(a.colIndex,"N",!0),un.component.getGrid(i).setCellValue(a.rowIndex,a.colIndex,"Y",!0)},getValue:function(r,i){return i},getText:function(r,i){return i==="Y"?"true":"false"},getChildNode:function(r,i){const a=document.createElement("input");return a.setAttribute("type","radio"),a.setAttribute("name",i.name?i.name:i.colIndex),a.setAttribute("value",""+i.rowIndex),a._gridId=r,a.rowIndex=i.rowIndex,a.colIndex=i.colIndex,a.checked=i.value==="Y",a},getFilterValue:function(r,i){return i==="Y"?"●":"○"}},tree:{cellStyle:{justifyContent:"left",textAlign:"left"},getValue:function(r,i){return i.constructor===Object?i:{title:i,toggle:!1}},getText:function(r,i){return i?i.title:null},getChildNode:function(r,i){if(!i.value)return document.createElement("span");const a=document.createElement("div");a.style.width="100%";const c=document.createElement("span");c.textContent=i.text,c.style.display="inline-block",c.style.marginLeft="10px",c.style.maxWidth="90%",c.style.overflow="hidden",c.style.textOverflow="ellipsis",c.addEventListener("click",D=>{L(D,r,i)});const m=document.createElement("span");m.classList.add("far"),i.value.toggle?m.textContent="-":m.textContent="+",m.style.fontSize="0.85em",m.addEventListener("click",D=>{L(D,r,i)});const C=un.component.getGrid(r);i.colIndex+1<=C.getColCount()&&C.getCellDataType(i.rowIndex,i.colIndex+1)!=="tree"&&(i.value.toggle?C.setCellDataType(i.rowIndex,i.colIndex+1,C.getColDataType(i.colIndex+1)):C.setCellDataType(i.rowIndex,i.colIndex+1,"none"));for(let D=i.colIndex;D>3;D--)if(C.getCellDataType(i.rowIndex,D)==="tree"){const W=C.getCellValue(i.rowIndex,D-1);W&&!W.toggle&&(c.textContent="...");break}(i.rowIndex===1||i.rowIndex>1&&C.getCellText(i.rowIndex-1,i.colIndex)!==i.text)&&(a.append(m),a.append(c));function L(D,W,K){const X=un.component.getGrid(W),ee=!K.value.toggle;function re(ye,xe){let ke;const ve=X.getCellText(ye,xe);if(ye===1)ke=ye;else for(let Me=ye;Me>1;Me--)if(X.getCellText(Me,xe)===ve){ke=Me;break}const Ee={title:ve,toggle:!0};for(let Me=ke;Me<=X.getRowCount()&&ve===X.getCellText(Me,xe);Me++)if(X.setCellValue(Me,xe,Ee),Me!==ke)X.getCellDataType(Me,xe+1)==="tree"?(Me===1||X.getCellText(Me,xe+1)!==X.getCellText(Me-1,xe+1))&&X.setRowVisible(Me,!0):X.setRowVisible(Me,!0);else for(let Ie=xe+1;Ie<=X.getColCount();Ie++)if(X.getCellDataType(Me,Ie)==="tree"){X.setCellValue(Me,Ie,X.getCellValue(Me,Ie));break}}function fe(ye,xe){let ke=ye;const ve=X.getCellText(ye,xe);if(ve)for(let Ee=ke;Ee<=X.getRowCount()&&ve===X.getCellText(Ee,xe);Ee++){Ee!==ke&&X.setRowVisible(Ee,!1);for(let Me=xe;Me<=X.getColCount();Me++)if(X.getCellDataType(Ee,Me)==="tree"){const Ie=X.getCellValue(Ee,Me);Ie&&(Ie.toggle=!1,X.setCellValue(Ee,Me,Ie))}}}if(ee)for(let ye=K.colIndex;ye>2;ye--)re(K.rowIndex,ye);else fe(K.rowIndex,K.colIndex)}return a}},none:{getChildNode:function(r,i){return document.createElement("span")}}};const n=mn.defaults;return{dateFormat:en.DateFormat["yyyy-MM-dd"],timeFormat:en.TimeFormat["HH:mm:ss"],datetimeFormat:en.DateTimeFormat["yyyy-MM-dd HH:mm:ss"],yearFormat:en.YearFormat.yyyy,monthFormat:en.MonthFormat.M,yearMonthFormat:en.YearMonthFormat["yyyy-MM"],dayFormat:en.DayFormat.d,dayOfWeekFormat:en.DayOfWeekFormat.d,hourFormat:en.HourFormat.h,hourMinuteFormat:en.HourMinuteFormat["hh:mm"],minuteFormat:en.MinuteFormat.m,secondFormat:en.SecondFormat.s,numberFormat:"#,##0.##",LESSOREQ_0X7FF_BYTE:2,LESSOREQ_0XFFFF_BYTE:3,GREATER_0XFFFF_BYTE:4,shieldURL:"",exposeIpList:["0:0:0:0:0:0:0:1"],isFreeze:!0,isPossibleGoBack:!1,isPossibleOpenDevTool:!1,doDetectDevTool(){},convertValue(r){return r},protocol:"http://",domain:"localhost:8080",controllerPath:"/hison-api-link",timeout:1e4,webSocketProtocol:"ws://",webSocketEndPoint:"/hison-websocket-endpoint",cachingLimit:10,beforeGetRequest(r,i){return!0},beforePostRequest(r,i){return!0},beforePutRequest(r,i){return!0},beforePatchRequest(r,i){return!0},beforeDeleteRequest(r,i){return!0},afterGetRequest(r){return!0},afterPostRequest(r){return!0},afterPutRequest(r){return!0},afterPatchRequest(r){return!0},afterDeleteRequest(r){return!0},beforeGetUrlRequest(r,i){return!0},beforePostUrlRequest(r,i,a){return!0},beforePutUrlRequest(r,i,a){return!0},beforePatchUrlRequest(r,i,a){return!0},beforeDeleteUrlRequest(r,i,a){return!0},afterGetUrlRequest(r){return!0},afterPostUrlRequest(r){return!0},afterPutUrlRequest(r){return!0},afterPatchUrlRequest(r){return!0},afterDeleteUrlRequest(r){return!0},interceptApiResult(r,i){return!0},interceptApiError(r){return!0},component:{note:t,grid:e,chart:n,filesetTotalSize:1/0,filesetSize:1/0},componentStyle:{size:lo.m,filledColor:Bi,emptyColor:md,filledTextColor:Za,emptyTextColor:Ja,primaryColor:Bi,mutedColor:cd,infoColor:dd,successColor:ud,dangerColor:fd,warningColor:hd,invertColor:!1,minHeightS:1.7,minHeightM:1.95,minHeightL:2.25,minHeightXL:2.55,fontSizeS:.7,fontSizeM:.75,fontSizeL:.85,fontSizeXL:1},event:{cssEvent:{textbox_onBeforeFocus:r=>!0,textbox_onAfterFocus:r=>{},textbox_onBeforeBlur:r=>!0,textbox_onAfterBlur:r=>{},textbox_onBeforeClick:r=>!0,textbox_onAfterClick:r=>{},textbox_onBeforeMouseover:r=>!0,textbox_onAfterMouseover:r=>{},textbox_onBeforeMouseout:r=>!0,textbox_onAfterMouseout:r=>{},textbox_onBeforeTouchstart:r=>!0,textbox_onAfterTouchstart:r=>{},textbox_onBeforeTouchend:r=>!0,textbox_onAfterTouchend:r=>{},button_onBeforeFocus:r=>!0,button_onAfterFocus:r=>{},button_onBeforeBlur:r=>!0,button_onAfterBlur:r=>{},button_onBeforeClick:r=>!0,button_onAfterClick:r=>{},button_onBeforeMouseover:r=>!0,button_onAfterMouseover:r=>{},button_onBeforeMouseout:r=>!0,button_onAfterMouseout:r=>{},button_onBeforeTouchstart:r=>!0,button_onAfterTouchstart:r=>{},button_onBeforeTouchend:r=>!0,button_onAfterTouchend:r=>{},input_onBeforeFocus:r=>!0,input_onAfterFocus:r=>{},input_onBeforeBlur:r=>!0,input_onAfterBlur:r=>{},input_onBeforeMouseover:r=>!0,input_onAfterMouseover:r=>{},input_onBeforeMouseout:r=>!0,input_onAfterMouseout:r=>{},input_onBeforeTouchstart:r=>!0,input_onAfterTouchstart:r=>{},input_onBeforeTouchend:r=>!0,input_onAfterTouchend:r=>{}}}}},gd=()=>{const t=ce.componentStyle;t.primaryColor=t.primaryColor?dn(t.primaryColor):Bi,t.mutedColor=t.mutedColor?dn(t.mutedColor):cd,t.infoColor=t.infoColor?dn(t.infoColor):dd,t.successColor=t.successColor?dn(t.successColor):ud,t.dangerColor=t.dangerColor?dn(t.dangerColor):fd,t.warningColor=t.warningColor?dn(t.warningColor):hd,t.filledColor=t.filledColor?dn(t.filledColor):Bi,t.emptyColor=t.emptyColor?dn(t.emptyColor):md,t.filledTextColor=t.filledTextColor?dn(t.filledTextColor):Za,t.emptyTextColor=t.emptyTextColor?dn(t.emptyTextColor):Ja,t.primaryInvertColor=hn(t.primaryColor),t.mutedInvertColor=hn(t.mutedColor),t.infoInvertColor=hn(t.infoColor),t.successInvertColor=hn(t.successColor),t.dangerInvertColor=hn(t.dangerColor),t.warningInvertColor=hn(t.warningColor),t.filledInvertColor=hn(t.filledColor),t.emptyInvertColor=hn(t.emptyColor),t.filledTextInvertColor=hn(t.filledTextColor),t.emptyTextInvertColor=hn(t.emptyTextColor);const e=t.componentColor;vo(e.primary,t.invertColor?t.primaryInvertColor:t.primaryColor),vo(e.muted,t.invertColor?t.mutedInvertColor:t.mutedColor),vo(e.info,t.invertColor?t.infoInvertColor:t.infoColor),vo(e.success,t.invertColor?t.successInvertColor:t.successColor),vo(e.danger,t.invertColor?t.dangerInvertColor:t.dangerColor),vo(e.warning,t.invertColor?t.warningInvertColor:t.warningColor);const n=`
|
|
77
|
+
`):t}function hy(t,e){const{element:n,datasetIndex:o,index:r}=e,i=t.getDatasetMeta(o).controller,{label:a,value:c}=i.getLabelAndValue(r);return{chart:t,label:a,parsed:i.getParsed(r),raw:t.data.datasets[o].data[r],formattedValue:c,dataset:i.getDataset(),dataIndex:r,datasetIndex:o,element:n}}function Ts(t,e){const n=t.chart.ctx,{body:o,footer:r,title:i}=t,{boxWidth:a,boxHeight:c}=e,m=$t(e.bodyFont),C=$t(e.titleFont),L=$t(e.footerFont),D=i.length,W=r.length,K=o.length,X=Jt(e.padding);let ee=X.height,re=0,fe=o.reduce((ke,ve)=>ke+ve.before.length+ve.lines.length+ve.after.length,0);if(fe+=t.beforeBody.length+t.afterBody.length,D&&(ee+=D*C.lineHeight+(D-1)*e.titleSpacing+e.titleMarginBottom),fe){const ke=e.displayColors?Math.max(c,m.lineHeight):m.lineHeight;ee+=K*ke+(fe-K)*m.lineHeight+(fe-1)*e.bodySpacing}W&&(ee+=e.footerMarginTop+W*L.lineHeight+(W-1)*e.footerSpacing);let ye=0;const xe=function(ke){re=Math.max(re,n.measureText(ke).width+ye)};return n.save(),n.font=C.string,kt(t.title,xe),n.font=m.string,kt(t.beforeBody.concat(t.afterBody),xe),ye=e.displayColors?a+2+e.boxPadding:0,kt(o,ke=>{kt(ke.before,xe),kt(ke.lines,xe),kt(ke.after,xe)}),ye=0,n.font=L.string,kt(t.footer,xe),n.restore(),re+=X.width,{width:re,height:ee}}function my(t,e){const{y:n,height:o}=e;return n<o/2?"top":n>t.height-o/2?"bottom":"center"}function gy(t,e,n,o){const{x:r,width:i}=o,a=n.caretSize+n.caretPadding;if(t==="left"&&r+i+a>e.width||t==="right"&&r-i-a<0)return!0}function yy(t,e,n,o){const{x:r,width:i}=n,{width:a,chartArea:{left:c,right:m}}=t;let C="center";return o==="center"?C=r<=(c+m)/2?"left":"right":r<=i/2?C="left":r>=a-i/2&&(C="right"),gy(C,t,e,n)&&(C="center"),C}function Bs(t,e,n){const o=n.yAlign||e.yAlign||my(t,n);return{xAlign:n.xAlign||e.xAlign||yy(t,e,n,o),yAlign:o}}function py(t,e){let{x:n,width:o}=t;return e==="right"?n-=o:e==="center"&&(n-=o/2),n}function _y(t,e,n){let{y:o,height:r}=t;return e==="top"?o+=n:e==="bottom"?o-=r+n:o-=r/2,o}function Ls(t,e,n,o){const{caretSize:r,caretPadding:i,cornerRadius:a}=t,{xAlign:c,yAlign:m}=n,C=r+i,{topLeft:L,topRight:D,bottomLeft:W,bottomRight:K}=co(a);let X=py(e,c);const ee=_y(e,m,C);return m==="center"?c==="left"?X+=C:c==="right"&&(X-=C):c==="left"?X-=Math.max(L,W)+r:c==="right"&&(X+=Math.max(D,K)+r),{x:Kt(X,0,o.width-e.width),y:Kt(ee,0,o.height-e.height)}}function si(t,e,n){const o=Jt(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-o.right:t.x+o.left}function Ns(t){return vn([],Tn(t))}function vy(t,e,n){return qn(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function Rs(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const ld={beforeTitle:wn,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,o=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(o>0&&e.dataIndex<o)return n[e.dataIndex]}return""},afterTitle:wn,beforeBody:wn,beforeLabel:wn,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return vt(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:wn,afterBody:wn,beforeFooter:wn,footer:wn,afterFooter:wn};function Qt(t,e,n,o){const r=t[e].call(n,o);return typeof r>"u"?ld[e].call(n,o):r}class Ia extends $n{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,o=this.options.setContext(this.getContext()),r=o.enabled&&n.options.animation&&o.animations,i=new Gc(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=vy(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:o}=n,r=Qt(o,"beforeTitle",this,e),i=Qt(o,"title",this,e),a=Qt(o,"afterTitle",this,e);let c=[];return c=vn(c,Tn(r)),c=vn(c,Tn(i)),c=vn(c,Tn(a)),c}getBeforeBody(e,n){return Ns(Qt(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:o}=n,r=[];return kt(e,i=>{const a={before:[],lines:[],after:[]},c=Rs(o,i);vn(a.before,Tn(Qt(c,"beforeLabel",this,i))),vn(a.lines,Qt(c,"label",this,i)),vn(a.after,Tn(Qt(c,"afterLabel",this,i))),r.push(a)}),r}getAfterBody(e,n){return Ns(Qt(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:o}=n,r=Qt(o,"beforeFooter",this,e),i=Qt(o,"footer",this,e),a=Qt(o,"afterFooter",this,e);let c=[];return c=vn(c,Tn(r)),c=vn(c,Tn(i)),c=vn(c,Tn(a)),c}_createItems(e){const n=this._active,o=this.chart.data,r=[],i=[],a=[];let c=[],m,C;for(m=0,C=n.length;m<C;++m)c.push(hy(this.chart,n[m]));return e.filter&&(c=c.filter((L,D,W)=>e.filter(L,D,W,o))),e.itemSort&&(c=c.sort((L,D)=>e.itemSort(L,D,o))),kt(c,L=>{const D=Rs(e.callbacks,L);r.push(Qt(D,"labelColor",this,L)),i.push(Qt(D,"labelPointStyle",this,L)),a.push(Qt(D,"labelTextColor",this,L))}),this.labelColors=r,this.labelPointStyles=i,this.labelTextColors=a,this.dataPoints=c,c}update(e,n){const o=this.options.setContext(this.getContext()),r=this._active;let i,a=[];if(!r.length)this.opacity!==0&&(i={opacity:0});else{const c=Jo[o.position].call(this,r,this._eventPosition);a=this._createItems(o),this.title=this.getTitle(a,o),this.beforeBody=this.getBeforeBody(a,o),this.body=this.getBody(a,o),this.afterBody=this.getAfterBody(a,o),this.footer=this.getFooter(a,o);const m=this._size=Ts(this,o),C=Object.assign({},c,m),L=Bs(this.chart,o,C),D=Ls(o,C,L,this.chart);this.xAlign=L.xAlign,this.yAlign=L.yAlign,i={opacity:1,x:D.x,y:D.y,width:m.width,height:m.height,caretX:c.x,caretY:c.y}}this._tooltipItems=a,this.$context=void 0,i&&this._resolveAnimations().update(this,i),e&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,o,r){const i=this.getCaretPosition(e,o,r);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)}getCaretPosition(e,n,o){const{xAlign:r,yAlign:i}=this,{caretSize:a,cornerRadius:c}=o,{topLeft:m,topRight:C,bottomLeft:L,bottomRight:D}=co(c),{x:W,y:K}=e,{width:X,height:ee}=n;let re,fe,ye,xe,ke,ve;return i==="center"?(ke=K+ee/2,r==="left"?(re=W,fe=re-a,xe=ke+a,ve=ke-a):(re=W+X,fe=re+a,xe=ke-a,ve=ke+a),ye=re):(r==="left"?fe=W+Math.max(m,L)+a:r==="right"?fe=W+X-Math.max(C,D)-a:fe=this.caretX,i==="top"?(xe=K,ke=xe-a,re=fe-a,ye=fe+a):(xe=K+ee,ke=xe+a,re=fe+a,ye=fe-a),ve=xe),{x1:re,x2:fe,x3:ye,y1:xe,y2:ke,y3:ve}}drawTitle(e,n,o){const r=this.title,i=r.length;let a,c,m;if(i){const C=xo(o.rtl,this.x,this.width);for(e.x=si(this,o.titleAlign,o),n.textAlign=C.textAlign(o.titleAlign),n.textBaseline="middle",a=$t(o.titleFont),c=o.titleSpacing,n.fillStyle=o.titleColor,n.font=a.string,m=0;m<i;++m)n.fillText(r[m],C.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+c,m+1===i&&(e.y+=o.titleMarginBottom-c)}}_drawColorBox(e,n,o,r,i){const a=this.labelColors[o],c=this.labelPointStyles[o],{boxHeight:m,boxWidth:C}=i,L=$t(i.bodyFont),D=si(this,"left",i),W=r.x(D),K=m<L.lineHeight?(L.lineHeight-m)/2:0,X=n.y+K;if(i.usePointStyle){const ee={radius:Math.min(C,m)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},re=r.leftForLtr(W,C)+C/2,fe=X+m/2;e.strokeStyle=i.multiKeyBackground,e.fillStyle=i.multiKeyBackground,ba(e,ee,re,fe),e.strokeStyle=a.borderColor,e.fillStyle=a.backgroundColor,ba(e,ee,re,fe)}else{e.lineWidth=yt(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,e.strokeStyle=a.borderColor,e.setLineDash(a.borderDash||[]),e.lineDashOffset=a.borderDashOffset||0;const ee=r.leftForLtr(W,C),re=r.leftForLtr(r.xPlus(W,1),C-2),fe=co(a.borderRadius);Object.values(fe).some(ye=>ye!==0)?(e.beginPath(),e.fillStyle=i.multiKeyBackground,lr(e,{x:ee,y:X,w:C,h:m,radius:fe}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),lr(e,{x:re,y:X+1,w:C-2,h:m-2,radius:fe}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(ee,X,C,m),e.strokeRect(ee,X,C,m),e.fillStyle=a.backgroundColor,e.fillRect(re,X+1,C-2,m-2))}e.fillStyle=this.labelTextColors[o]}drawBody(e,n,o){const{body:r}=this,{bodySpacing:i,bodyAlign:a,displayColors:c,boxHeight:m,boxWidth:C,boxPadding:L}=o,D=$t(o.bodyFont);let W=D.lineHeight,K=0;const X=xo(o.rtl,this.x,this.width),ee=function(Ie){n.fillText(Ie,X.x(e.x+K),e.y+W/2),e.y+=W+i},re=X.textAlign(a);let fe,ye,xe,ke,ve,Ee,Me;for(n.textAlign=a,n.textBaseline="middle",n.font=D.string,e.x=si(this,re,o),n.fillStyle=o.bodyColor,kt(this.beforeBody,ee),K=c&&re!=="right"?a==="center"?C/2+L:C+2+L:0,ke=0,Ee=r.length;ke<Ee;++ke){for(fe=r[ke],ye=this.labelTextColors[ke],n.fillStyle=ye,kt(fe.before,ee),xe=fe.lines,c&&xe.length&&(this._drawColorBox(n,e,ke,X,o),W=Math.max(D.lineHeight,m)),ve=0,Me=xe.length;ve<Me;++ve)ee(xe[ve]),W=D.lineHeight;kt(fe.after,ee)}K=0,W=D.lineHeight,kt(this.afterBody,ee),e.y-=i}drawFooter(e,n,o){const r=this.footer,i=r.length;let a,c;if(i){const m=xo(o.rtl,this.x,this.width);for(e.x=si(this,o.footerAlign,o),e.y+=o.footerMarginTop,n.textAlign=m.textAlign(o.footerAlign),n.textBaseline="middle",a=$t(o.footerFont),n.fillStyle=o.footerColor,n.font=a.string,c=0;c<i;++c)n.fillText(r[c],m.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+o.footerSpacing}}drawBackground(e,n,o,r){const{xAlign:i,yAlign:a}=this,{x:c,y:m}=e,{width:C,height:L}=o,{topLeft:D,topRight:W,bottomLeft:K,bottomRight:X}=co(r.cornerRadius);n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.beginPath(),n.moveTo(c+D,m),a==="top"&&this.drawCaret(e,n,o,r),n.lineTo(c+C-W,m),n.quadraticCurveTo(c+C,m,c+C,m+W),a==="center"&&i==="right"&&this.drawCaret(e,n,o,r),n.lineTo(c+C,m+L-X),n.quadraticCurveTo(c+C,m+L,c+C-X,m+L),a==="bottom"&&this.drawCaret(e,n,o,r),n.lineTo(c+K,m+L),n.quadraticCurveTo(c,m+L,c,m+L-K),a==="center"&&i==="left"&&this.drawCaret(e,n,o,r),n.lineTo(c,m+D),n.quadraticCurveTo(c,m,c+D,m),n.closePath(),n.fill(),r.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,o=this.$animations,r=o&&o.x,i=o&&o.y;if(r||i){const a=Jo[e.position].call(this,this._active,this._eventPosition);if(!a)return;const c=this._size=Ts(this,e),m=Object.assign({},a,this._size),C=Bs(n,e,m),L=Ls(e,m,C,n);(r._to!==L.x||i._to!==L.y)&&(this.xAlign=C.xAlign,this.yAlign=C.yAlign,this.width=c.width,this.height=c.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,L))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(n);const r={width:this.width,height:this.height},i={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const a=Jt(n.padding),c=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&c&&(e.save(),e.globalAlpha=o,this.drawBackground(i,e,r,n),Oc(e,n.textDirection),i.y+=a.top,this.drawTitle(i,e,n),this.drawBody(i,e,n),this.drawFooter(i,e,n),Vc(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const o=this._active,r=e.map(({datasetIndex:c,index:m})=>{const C=this.chart.getDatasetMeta(c);if(!C)throw new Error("Cannot find a dataset at index "+c);return{datasetIndex:c,element:C.data[m],index:m}}),i=!xi(o,r),a=this._positionChanged(r,n);(i||a)&&(this._active=r,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,o=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,i=this._active||[],a=this._getActiveElements(e,i,n,o),c=this._positionChanged(a,e),m=n||!xi(a,i)||c;return m&&(this._active=a,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),m}_getActiveElements(e,n,o,r){const i=this.options;if(e.type==="mouseout")return[];if(!r)return n.filter(c=>this.chart.data.datasets[c.datasetIndex]&&this.chart.getDatasetMeta(c.datasetIndex).controller.getParsed(c.index)!==void 0);const a=this.chart.getElementsAtEventForMode(e,i.mode,i,o);return i.reverse&&a.reverse(),a}_positionChanged(e,n){const{caretX:o,caretY:r,options:i}=this,a=Jo[i.position].call(this,e,n);return a!==!1&&(o!==a.x||r!==a.y)}}Oe(Ia,"positioners",Jo);var by={id:"tooltip",_element:Ia,positioners:Jo,afterInit(t,e,n){n&&(t.tooltip=new Ia({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:ld},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Cy=(t,e,n,o)=>(typeof e=="string"?(n=t.push(e)-1,o.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function My(t,e,n,o){const r=t.indexOf(e);if(r===-1)return Cy(t,e,n,o);const i=t.lastIndexOf(e);return r!==i?n:r}const xy=(t,e)=>t===null?null:Kt(Math.round(t),0,e);function Hs(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Ea extends Ao{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const o=this.getLabels();for(const{index:r,label:i}of n)o[r]===i&&o.splice(r,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(vt(e))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===e?n:My(o,e,st(n,e),this._addedLabels),xy(n,o.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:o,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(o=0),n||(r=this.getLabels().length-1)),this.min=o,this.max=r}buildTicks(){const e=this.min,n=this.max,o=this.options.offset,r=[];let i=this.getLabels();i=e===0&&n===i.length-1?i:i.slice(e,n+1),this._valueRange=Math.max(i.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let a=e;a<=n;a++)r.push({value:a});return r}getLabelForValue(e){return Hs.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}Oe(Ea,"id","category"),Oe(Ea,"defaults",{ticks:{callback:Hs}});function Sy(t,e){const n=[],{bounds:r,step:i,min:a,max:c,precision:m,count:C,maxTicks:L,maxDigits:D,includeBounds:W}=t,K=i||1,X=L-1,{min:ee,max:re}=e,fe=!vt(a),ye=!vt(c),xe=!vt(C),ke=(re-ee)/(D+1);let ve=Nl((re-ee)/X/K)*K,Ee,Me,Ie,Te;if(ve<1e-14&&!fe&&!ye)return[{value:ee},{value:re}];Te=Math.ceil(re/ve)-Math.floor(ee/ve),Te>X&&(ve=Nl(Te*ve/X/K)*K),vt(m)||(Ee=Math.pow(10,m),ve=Math.ceil(ve*Ee)/Ee),r==="ticks"?(Me=Math.floor(ee/ve)*ve,Ie=Math.ceil(re/ve)*ve):(Me=ee,Ie=re),fe&&ye&&i&&Tf((c-a)/i,ve/1e3)?(Te=Math.round(Math.min((c-a)/ve,L)),ve=(c-a)/Te,Me=a,Ie=c):xe?(Me=fe?a:Me,Ie=ye?c:Ie,Te=C-1,ve=(Ie-Me)/Te):(Te=(Ie-Me)/ve,er(Te,Math.round(Te),ve/1e3)?Te=Math.round(Te):Te=Math.ceil(Te));const We=Math.max(Rl(ve),Rl(Me));Ee=Math.pow(10,vt(m)?We:m),Me=Math.round(Me*Ee)/Ee,Ie=Math.round(Ie*Ee)/Ee;let nt=0;for(fe&&(W&&Me!==a?(n.push({value:a}),Me<a&&nt++,er(Math.round((Me+nt*ve)*Ee)/Ee,a,Fs(a,ke,t))&&nt++):Me<a&&nt++);nt<Te;++nt){const Pe=Math.round((Me+nt*ve)*Ee)/Ee;if(ye&&Pe>c)break;n.push({value:Pe})}return ye&&W&&Ie!==c?n.length&&er(n[n.length-1].value,c,Fs(c,ke,t))?n[n.length-1].value=c:n.push({value:c}):(!ye||Ie===c)&&n.push({value:Ie}),n}function Fs(t,e,{horizontal:n,minRotation:o}){const r=Cn(o),i=(n?Math.sin(r):Math.cos(r))||.001,a=.75*e*(""+t).length;return Math.min(e/i,a)}class wa extends Ao{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return vt(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:r,max:i}=this;const a=m=>r=n?r:m,c=m=>i=o?i:m;if(e){const m=Mn(r),C=Mn(i);m<0&&C<0?c(0):m>0&&C>0&&a(0)}if(r===i){let m=i===0?1:Math.abs(i*.05);c(i+m),e||a(r-m)}this.min=r,this.max=i}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=e,r;return o?(r=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),n=n||11),n&&(r=Math.min(n,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let o=this.getTickLimit();o=Math.max(2,o);const r={maxTicks:o,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},i=this._range||this,a=Sy(r,i);return e.bounds==="ticks"&&Bf(a,this,"value"),e.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const e=this.ticks;let n=this.min,o=this.max;if(super.configure(),this.options.offset&&e.length){const r=(o-n)/Math.max(e.length-1,1)/2;n-=r,o+=r}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(e){return Ua(e,this.chart.options.locale,this.options.ticks.format)}}class Aa extends wa{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=qt(e)?e:0,this.max=qt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,o=Cn(this.options.ticks.minRotation),r=(e?Math.sin(o):Math.cos(o))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,i.lineHeight/r))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}Oe(Aa,"id","linear"),Oe(Aa,"defaults",{ticks:{callback:Ga.formatters.numeric}});function Ta(t){const e=t.ticks;if(e.display&&t.display){const n=Jt(e.backdropPadding);return st(e.font&&e.font.size,Vt.font.size)+n.height}return 0}function ky(t,e,n){return n=Ot(n)?n:[n],{w:Kf(t,e.string,n),h:n.length*e.lineHeight}}function Os(t,e,n,o,r){return t===o||t===r?{start:e-n/2,end:e+n/2}:t<o||t>r?{start:e-n,end:e}:{start:e,end:e+n}}function Iy(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),o=[],r=[],i=t._pointLabels.length,a=t.options.pointLabels,c=a.centerPointLabels?It/i:0;for(let m=0;m<i;m++){const C=a.setContext(t.getPointLabelContext(m));r[m]=C.padding;const L=t.getPointPosition(m,t.drawingArea+r[m],c),D=$t(C.font),W=ky(t.ctx,D,t._pointLabels[m]);o[m]=W;const K=Yt(t.getIndexAngle(m)+c),X=Math.round(Pa(K)),ee=Os(X,L.x,W.w,0,180),re=Os(X,L.y,W.h,90,270);Ey(n,e,K,ee,re)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=Ty(t,o,r)}function Ey(t,e,n,o,r){const i=Math.abs(Math.sin(n)),a=Math.abs(Math.cos(n));let c=0,m=0;o.start<e.l?(c=(e.l-o.start)/i,t.l=Math.min(t.l,e.l-c)):o.end>e.r&&(c=(o.end-e.r)/i,t.r=Math.max(t.r,e.r+c)),r.start<e.t?(m=(e.t-r.start)/a,t.t=Math.min(t.t,e.t-m)):r.end>e.b&&(m=(r.end-e.b)/a,t.b=Math.max(t.b,e.b+m))}function wy(t,e,n){const o=t.drawingArea,{extra:r,additionalAngle:i,padding:a,size:c}=n,m=t.getPointPosition(e,o+r+a,i),C=Math.round(Pa(Yt(m.angle+Pt))),L=Ny(m.y,c.h,C),D=By(C),W=Ly(m.x,c.w,D);return{visible:!0,x:m.x,y:L,textAlign:D,left:W,top:L,right:W+c.w,bottom:L+c.h}}function Ay(t,e){if(!e)return!0;const{left:n,top:o,right:r,bottom:i}=t;return!(Nn({x:n,y:o},e)||Nn({x:n,y:i},e)||Nn({x:r,y:o},e)||Nn({x:r,y:i},e))}function Ty(t,e,n){const o=[],r=t._pointLabels.length,i=t.options,{centerPointLabels:a,display:c}=i.pointLabels,m={extra:Ta(i)/2,additionalAngle:a?It/r:0};let C;for(let L=0;L<r;L++){m.padding=n[L],m.size=e[L];const D=wy(t,L,m);o.push(D),c==="auto"&&(D.visible=Ay(D,C),D.visible&&(C=D))}return o}function By(t){return t===0||t===180?"center":t<180?"left":"right"}function Ly(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function Ny(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function Ry(t,e,n){const{left:o,top:r,right:i,bottom:a}=n,{backdropColor:c}=e;if(!vt(c)){const m=co(e.borderRadius),C=Jt(e.backdropPadding);t.fillStyle=c;const L=o-C.left,D=r-C.top,W=i-o+C.width,K=a-r+C.height;Object.values(m).some(X=>X!==0)?(t.beginPath(),lr(t,{x:L,y:D,w:W,h:K,radius:m}),t.fill()):t.fillRect(L,D,W,K)}}function Hy(t,e){const{ctx:n,options:{pointLabels:o}}=t;for(let r=e-1;r>=0;r--){const i=t._pointLabelItems[r];if(!i.visible)continue;const a=o.setContext(t.getPointLabelContext(r));Ry(n,a,i);const c=$t(a.font),{x:m,y:C,textAlign:L}=i;Io(n,t._pointLabels[r],m,C+c.lineHeight/2,c,{color:a.color,textAlign:L,textBaseline:"middle"})}}function sd(t,e,n,o){const{ctx:r}=t;if(n)r.arc(t.xCenter,t.yCenter,e,0,Tt);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let a=1;a<o;a++)i=t.getPointPosition(a,e),r.lineTo(i.x,i.y)}}function Fy(t,e,n,o,r){const i=t.ctx,a=e.circular,{color:c,lineWidth:m}=e;!a&&!o||!c||!m||n<0||(i.save(),i.strokeStyle=c,i.lineWidth=m,i.setLineDash(r.dash||[]),i.lineDashOffset=r.dashOffset,i.beginPath(),sd(t,n,a,o),i.closePath(),i.stroke(),i.restore())}function Oy(t,e,n){return qn(t,{label:n,index:e,type:"pointLabel"})}class Zo extends wa{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=Jt(Ta(this.options)/2),n=this.width=this.maxWidth-e.width,o=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+o/2+e.top),this.drawingArea=Math.floor(Math.min(n,o)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=qt(e)&&!isNaN(e)?e:0,this.max=qt(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ta(this.options))}generateTickLabels(e){wa.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,o)=>{const r=wt(this.options.pointLabels.callback,[n,o],this);return r||r===0?r:""}).filter((n,o)=>this.chart.getDataVisibility(o))}fit(){const e=this.options;e.display&&e.pointLabels.display?Iy(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,o,r){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((o-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,o,r))}getIndexAngle(e){const n=Tt/(this._pointLabels.length||1),o=this.options.startAngle||0;return Yt(e*n+Cn(o))}getDistanceFromCenterForValue(e){if(vt(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(vt(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const o=n[e];return Oy(this.getContext(),e,o)}}getPointPosition(e,n,o=0){const r=this.getIndexAngle(e)-Pt+o;return{x:Math.cos(r)*n+this.xCenter,y:Math.sin(r)*n+this.yCenter,angle:r}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:o,right:r,bottom:i}=this._pointLabelItems[e];return{left:n,top:o,right:r,bottom:i}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const o=this.ctx;o.save(),o.beginPath(),sd(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),o.closePath(),o.fillStyle=e,o.fill(),o.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:o,grid:r,border:i}=n,a=this._pointLabels.length;let c,m,C;if(n.pointLabels.display&&Hy(this,a),r.display&&this.ticks.forEach((L,D)=>{if(D!==0||D===0&&this.min<0){m=this.getDistanceFromCenterForValue(L.value);const W=this.getContext(D),K=r.setContext(W),X=i.setContext(W);Fy(this,K,m,a,X)}}),o.display){for(e.save(),c=a-1;c>=0;c--){const L=o.setContext(this.getPointLabelContext(c)),{color:D,lineWidth:W}=L;!W||!D||(e.lineWidth=W,e.strokeStyle=D,e.setLineDash(L.borderDash),e.lineDashOffset=L.borderDashOffset,m=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max),C=this.getPointPosition(c,m),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(C.x,C.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,o=n.ticks;if(!o.display)return;const r=this.getIndexAngle(0);let i,a;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((c,m)=>{if(m===0&&this.min>=0&&!n.reverse)return;const C=o.setContext(this.getContext(m)),L=$t(C.font);if(i=this.getDistanceFromCenterForValue(this.ticks[m].value),C.showLabelBackdrop){e.font=L.string,a=e.measureText(c.label).width,e.fillStyle=C.backdropColor;const D=Jt(C.backdropPadding);e.fillRect(-a/2-D.left,-i-L.size/2-D.top,a+D.width,L.size+D.height)}Io(e,c.label,0,-i,L,{color:C.color,strokeColor:C.textStrokeColor,strokeWidth:C.textStrokeWidth})}),e.restore()}drawTitle(){}}Oe(Zo,"id","radialLinear"),Oe(Zo,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ga.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),Oe(Zo,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Oe(Zo,"descriptors",{angleLines:{_fallback:"grid"}});const Pi={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},tn=Object.keys(Pi);function Vs(t,e){return t-e}function Ps(t,e){if(vt(e))return null;const n=t._adapter,{parser:o,round:r,isoWeekday:i}=t._parseOpts;let a=e;return typeof o=="function"&&(a=o(a)),qt(a)||(a=typeof o=="string"?n.parse(a,o):n.parse(a)),a===null?null:(r&&(a=r==="week"&&(ko(i)||i===!0)?n.startOf(a,"isoWeek",i):n.startOf(a,r)),+a)}function Ds(t,e,n,o){const r=tn.length;for(let i=tn.indexOf(t);i<r-1;++i){const a=Pi[tn[i]],c=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-e)/(c*a.size))<=o)return tn[i]}return tn[r-1]}function Vy(t,e,n,o,r){for(let i=tn.length-1;i>=tn.indexOf(n);i--){const a=tn[i];if(Pi[a].common&&t._adapter.diff(r,o,a)>=e-1)return a}return tn[n?tn.indexOf(n):0]}function Py(t){for(let e=tn.indexOf(t)+1,n=tn.length;e<n;++e)if(Pi[tn[e]].common)return tn[e]}function zs(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:o,hi:r}=Da(n,e),i=n[o]>=e?n[o]:n[r];t[i]=!0}}function Dy(t,e,n,o){const r=t._adapter,i=+r.startOf(e[0].value,o),a=e[e.length-1].value;let c,m;for(c=i;c<=a;c=+r.add(c,1,o))m=n[c],m>=0&&(e[m].major=!0);return e}function Us(t,e,n){const o=[],r={},i=e.length;let a,c;for(a=0;a<i;++a)c=e[a],r[c]=a,o.push({value:c,major:!1});return i===0||!n?o:Dy(t,o,r,n)}class Ti extends Ao{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const o=e.time||(e.time={}),r=this._adapter=new fm._date(e.adapters.date);r.init(n),Qo(o.displayFormats,r.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:Ps(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,o=e.time.unit||"day";let{min:r,max:i,minDefined:a,maxDefined:c}=this.getUserBounds();function m(C){!a&&!isNaN(C.min)&&(r=Math.min(r,C.min)),!c&&!isNaN(C.max)&&(i=Math.max(i,C.max))}(!a||!c)&&(m(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&m(this.getMinMax(!1))),r=qt(r)&&!isNaN(r)?r:+n.startOf(Date.now(),o),i=qt(i)&&!isNaN(i)?i:+n.endOf(Date.now(),o)+1,this.min=Math.min(r,i-1),this.max=Math.max(r+1,i)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],o=e[e.length-1]),{min:n,max:o}}buildTicks(){const e=this.options,n=e.time,o=e.ticks,r=o.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const i=this.min,a=this.max,c=Hf(r,i,a);return this._unit=n.unit||(o.autoSkip?Ds(n.minUnit,this.min,this.max,this._getLabelCapacity(i)):Vy(this,c.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:Py(this._unit),this.initOffsets(r),e.reverse&&c.reverse(),Us(this,c,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,o=0,r,i;this.options.offset&&e.length&&(r=this.getDecimalForValue(e[0]),e.length===1?n=1-r:n=(this.getDecimalForValue(e[1])-r)/2,i=this.getDecimalForValue(e[e.length-1]),e.length===1?o=i:o=(i-this.getDecimalForValue(e[e.length-2]))/2);const a=e.length<3?.5:.25;n=Kt(n,0,a),o=Kt(o,0,a),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const e=this._adapter,n=this.min,o=this.max,r=this.options,i=r.time,a=i.unit||Ds(i.minUnit,n,o,this._getLabelCapacity(n)),c=st(r.ticks.stepSize,1),m=a==="week"?i.isoWeekday:!1,C=ko(m)||m===!0,L={};let D=n,W,K;if(C&&(D=+e.startOf(D,"isoWeek",m)),D=+e.startOf(D,C?"day":a),e.diff(o,n,a)>1e5*c)throw new Error(n+" and "+o+" are too far apart with stepSize of "+c+" "+a);const X=r.ticks.source==="data"&&this.getDataTimestamps();for(W=D,K=0;W<o;W=+e.add(W,c,a),K++)zs(L,W,X);return(W===o||r.bounds==="ticks"||K===1)&&zs(L,W,X),Object.keys(L).sort(Vs).map(ee=>+ee)}getLabelForValue(e){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(e,o.tooltipFormat):n.format(e,o.displayFormats.datetime)}format(e,n){const r=this.options.time.displayFormats,i=this._unit,a=n||r[i];return this._adapter.format(e,a)}_tickFormatFunction(e,n,o,r){const i=this.options,a=i.ticks.callback;if(a)return wt(a,[e,n,o],this);const c=i.time.displayFormats,m=this._unit,C=this._majorUnit,L=m&&c[m],D=C&&c[C],W=o[n],K=C&&D&&W&&W.major;return this._adapter.format(e,r||(K?D:L))}generateTickLabels(e){let n,o,r;for(n=0,o=e.length;n<o;++n)r=e[n],r.label=this._tickFormatFunction(r.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,o=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,o=this.ctx.measureText(e).width,r=Cn(this.isHorizontal()?n.maxRotation:n.minRotation),i=Math.cos(r),a=Math.sin(r),c=this._resolveTickFontOptions(0).size;return{w:o*i+c*a,h:o*a+c*i}}_getLabelCapacity(e){const n=this.options.time,o=n.displayFormats,r=o[n.unit]||o.millisecond,i=this._tickFormatFunction(e,0,Us(this,[e],this._majorUnit),r),a=this._getLabelSize(i),c=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return c>0?c:1}getDataTimestamps(){let e=this._cache.data||[],n,o;if(e.length)return e;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(n=0,o=r.length;n<o;++n)e=e.concat(r[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,o;if(e.length)return e;const r=this.getLabels();for(n=0,o=r.length;n<o;++n)e.push(Ps(this,r[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Sc(e.sort(Vs))}}Oe(Ti,"id","time"),Oe(Ti,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function ci(t,e,n){let o=0,r=t.length-1,i,a,c,m;n?(e>=t[o].pos&&e<=t[r].pos&&({lo:o,hi:r}=so(t,"pos",e)),{pos:i,time:c}=t[o],{pos:a,time:m}=t[r]):(e>=t[o].time&&e<=t[r].time&&({lo:o,hi:r}=so(t,"time",e)),{time:i,pos:c}=t[o],{time:a,pos:m}=t[r]);const C=a-i;return C?c+(m-c)*(e-i)/C:c}class Gs extends Ti{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=ci(n,this.min),this._tableRange=ci(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:o}=this,r=[],i=[];let a,c,m,C,L;for(a=0,c=e.length;a<c;++a)C=e[a],C>=n&&C<=o&&r.push(C);if(r.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(a=0,c=r.length;a<c;++a)L=r[a+1],m=r[a-1],C=r[a],Math.round((L+m)/2)!==C&&i.push({time:C,pos:a/(c-1)});return i}_generate(){const e=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(e)||!o.length)&&o.splice(0,0,e),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((r,i)=>r-i)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?e=this.normalize(n.concat(o)):e=n.length?n:o,e=this._cache.all=e,e}getDecimalForValue(e){return(ci(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return ci(this._table,o*this._tableRange+this._minPos,!0)}}Oe(Gs,"id","timeseries"),Oe(Gs,"defaults",Ti.defaults);mn.register(mi,yi,pi,Ca,Mo,gi,_i,Xo,zn,Mi,Ci,Ea,Aa,Zo,by,fy,ay);const zy=t=>{const e=t.component.chart;e&&Object.assign(mn.defaults,e)},Uy=t=>{t.event.cssEvent.textbox_onBeforeFocus&&(ce.event.cssEvent.textbox_onBeforeFocus=t.event.cssEvent.textbox_onBeforeFocus),t.event.cssEvent.textbox_onAfterFocus&&(ce.event.cssEvent.textbox_onAfterFocus=t.event.cssEvent.textbox_onAfterFocus),t.event.cssEvent.textbox_onBeforeBlur&&(ce.event.cssEvent.textbox_onBeforeBlur=t.event.cssEvent.textbox_onBeforeBlur),t.event.cssEvent.textbox_onAfterBlur&&(ce.event.cssEvent.textbox_onAfterBlur=t.event.cssEvent.textbox_onAfterBlur),t.event.cssEvent.textbox_onBeforeClick&&(ce.event.cssEvent.textbox_onBeforeClick=t.event.cssEvent.textbox_onBeforeClick),t.event.cssEvent.textbox_onAfterClick&&(ce.event.cssEvent.textbox_onAfterClick=t.event.cssEvent.textbox_onAfterClick),t.event.cssEvent.textbox_onBeforeMouseover&&(ce.event.cssEvent.textbox_onBeforeMouseover=t.event.cssEvent.textbox_onBeforeMouseover),t.event.cssEvent.textbox_onAfterMouseover&&(ce.event.cssEvent.textbox_onAfterMouseover=t.event.cssEvent.textbox_onAfterMouseover),t.event.cssEvent.textbox_onBeforeMouseout&&(ce.event.cssEvent.textbox_onBeforeMouseout=t.event.cssEvent.textbox_onBeforeMouseout),t.event.cssEvent.textbox_onAfterMouseout&&(ce.event.cssEvent.textbox_onAfterMouseout=t.event.cssEvent.textbox_onAfterMouseout),t.event.cssEvent.textbox_onBeforeTouchstart&&(ce.event.cssEvent.textbox_onBeforeTouchstart=t.event.cssEvent.textbox_onBeforeTouchstart),t.event.cssEvent.textbox_onAfterTouchstart&&(ce.event.cssEvent.textbox_onAfterTouchstart=t.event.cssEvent.textbox_onAfterTouchstart),t.event.cssEvent.textbox_onBeforeTouchend&&(ce.event.cssEvent.textbox_onBeforeTouchend=t.event.cssEvent.textbox_onBeforeTouchend),t.event.cssEvent.textbox_onAfterTouchend&&(ce.event.cssEvent.textbox_onAfterTouchend=t.event.cssEvent.textbox_onAfterTouchend),t.event.cssEvent.button_onBeforeFocus&&(ce.event.cssEvent.button_onBeforeFocus=t.event.cssEvent.button_onBeforeFocus),t.event.cssEvent.button_onAfterFocus&&(ce.event.cssEvent.button_onAfterFocus=t.event.cssEvent.button_onAfterFocus),t.event.cssEvent.button_onBeforeBlur&&(ce.event.cssEvent.button_onBeforeBlur=t.event.cssEvent.button_onBeforeBlur),t.event.cssEvent.button_onAfterBlur&&(ce.event.cssEvent.button_onAfterBlur=t.event.cssEvent.button_onAfterBlur),t.event.cssEvent.button_onBeforeClick&&(ce.event.cssEvent.button_onBeforeClick=t.event.cssEvent.button_onBeforeClick),t.event.cssEvent.button_onAfterClick&&(ce.event.cssEvent.button_onAfterClick=t.event.cssEvent.button_onAfterClick),t.event.cssEvent.button_onBeforeMouseover&&(ce.event.cssEvent.button_onBeforeMouseover=t.event.cssEvent.button_onBeforeMouseover),t.event.cssEvent.button_onAfterMouseover&&(ce.event.cssEvent.button_onAfterMouseover=t.event.cssEvent.button_onAfterMouseover),t.event.cssEvent.button_onBeforeMouseout&&(ce.event.cssEvent.button_onBeforeMouseout=t.event.cssEvent.button_onBeforeMouseout),t.event.cssEvent.button_onAfterMouseout&&(ce.event.cssEvent.button_onAfterMouseout=t.event.cssEvent.button_onAfterMouseout),t.event.cssEvent.button_onBeforeTouchstart&&(ce.event.cssEvent.button_onBeforeTouchstart=t.event.cssEvent.button_onBeforeTouchstart),t.event.cssEvent.button_onAfterTouchstart&&(ce.event.cssEvent.button_onAfterTouchstart=t.event.cssEvent.button_onAfterTouchstart),t.event.cssEvent.button_onBeforeTouchend&&(ce.event.cssEvent.button_onBeforeTouchend=t.event.cssEvent.button_onBeforeTouchend),t.event.cssEvent.button_onAfterTouchend&&(ce.event.cssEvent.button_onAfterTouchend=t.event.cssEvent.button_onAfterTouchend),t.event.cssEvent.input_onBeforeFocus&&(ce.event.cssEvent.input_onBeforeFocus=t.event.cssEvent.input_onBeforeFocus),t.event.cssEvent.input_onAfterFocus&&(ce.event.cssEvent.input_onAfterFocus=t.event.cssEvent.input_onAfterFocus),t.event.cssEvent.input_onBeforeBlur&&(ce.event.cssEvent.input_onBeforeBlur=t.event.cssEvent.input_onBeforeBlur),t.event.cssEvent.input_onAfterBlur&&(ce.event.cssEvent.input_onAfterBlur=t.event.cssEvent.input_onAfterBlur),t.event.cssEvent.input_onBeforeMouseover&&(ce.event.cssEvent.input_onBeforeMouseover=t.event.cssEvent.input_onBeforeMouseover),t.event.cssEvent.input_onAfterMouseover&&(ce.event.cssEvent.input_onAfterMouseover=t.event.cssEvent.input_onAfterMouseover),t.event.cssEvent.input_onBeforeMouseout&&(ce.event.cssEvent.input_onBeforeMouseout=t.event.cssEvent.input_onBeforeMouseout),t.event.cssEvent.input_onAfterMouseout&&(ce.event.cssEvent.input_onAfterMouseout=t.event.cssEvent.input_onAfterMouseout),t.event.cssEvent.input_onBeforeTouchstart&&(ce.event.cssEvent.input_onBeforeTouchstart=t.event.cssEvent.input_onBeforeTouchstart),t.event.cssEvent.input_onAfterTouchstart&&(ce.event.cssEvent.input_onAfterTouchstart=t.event.cssEvent.input_onAfterTouchstart),t.event.cssEvent.input_onBeforeTouchend&&(ce.event.cssEvent.input_onBeforeTouchend=t.event.cssEvent.input_onBeforeTouchend),t.event.cssEvent.input_onAfterTouchend&&(ce.event.cssEvent.input_onAfterTouchend=t.event.cssEvent.input_onAfterTouchend),ce.componentStyle={size:t.componentStyle.size,filledColor:t.componentStyle.filledColor,emptyColor:t.componentStyle.emptyColor,filledTextColor:t.componentStyle.filledTextColor,emptyTextColor:t.componentStyle.emptyTextColor,primaryColor:t.componentStyle.primaryColor,mutedColor:t.componentStyle.mutedColor,infoColor:t.componentStyle.infoColor,successColor:t.componentStyle.successColor,dangerColor:t.componentStyle.dangerColor,warningColor:t.componentStyle.warningColor,invertColor:t.componentStyle.invertColor,minHeightS:t.componentStyle.minHeightS,minHeightM:t.componentStyle.minHeightM,minHeightL:t.componentStyle.minHeightL,minHeightXL:t.componentStyle.minHeightXL,fontSizeS:t.componentStyle.fontSizeS,fontSizeM:t.componentStyle.fontSizeM,fontSizeL:t.componentStyle.fontSizeL,fontSizeXL:t.componentStyle.fontSizeXL,primaryInvertColor:null,mutedInvertColor:null,infoInvertColor:null,successInvertColor:null,dangerInvertColor:null,warningInvertColor:null,filledInvertColor:null,emptyInvertColor:null,filledTextInvertColor:null,emptyTextInvertColor:null,componentColor:{primary:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},muted:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},info:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},success:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},danger:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},warning:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null}}},ce.componentConfig={filesetSize:t.component.filesetSize??1/0,filesetTotalSize:t.component.filesetTotalSize??1/0};const e=Yu(t),n=qu(t);ce.note=e,ce.grid=n,zy(t),ce.component={accordionList:{},baggieList:{},bannerList:{},buttonList:{},calendarList:{},captionList:{},chartList:{},drawerList:{},dropdownList:{},filesetList:{},gapList:{},imageboxList:{},inputList:{},inputGroupList:{},labelList:{},layoutList:{},listList:{},modalList:{},paginationList:{},paragraphList:{},popupList:{},spinnerList:{},tableList:{}}};function Bt(t,e){return ao.defineComponent({name:`${e}SSRWrapper`,setup(n,{slots:o,attrs:r}){const i=ao.ref(null);return ao.onMounted(async()=>{const a=await t();i.value=ao.markRaw(a.default)}),()=>i.value?ao.h(i.value,{...r},o):null}})}const Ba=ao.ref("pc"),Gy=()=>ao.readonly(Ba),jy=()=>{if(typeof window>"u")return;const t=()=>{const e=tu(window.innerWidth);Ba.value!==e&&(Ba.value=e)};t(),window.addEventListener("resize",()=>{requestAnimationFrame(t)})},Bi="rgba(19,70,134,1)",cd="rgba(158,158,158,1)",dd="rgba(147,191,207,1)",ud="rgba(95,141,78,1)",fd="rgba(247,113,109,1)",hd="rgba(255,193,98,1)",Ja="rgba(48,48,48,1)",Za="rgba(255,255,255,1)",md="rgba(255,255,255,1)",La=()=>{const t=Ra.getVanillanoteConfig(),e=Na.getVanillagridConfig();e.footerFormula={$$COUNT_CHECK:function(r){let i=0;return r.forEach(a=>{a==="Y"&&(i=i+1)}),String(i)}},e.dataType={img:{cellStyle:{justifyContent:"center",textAlign:"center",padding:"0"},onSelected:function(r){r.firstChild.children[0]&&r.firstChild.children[0].style.setProperty("opacity","0.2")},onUnselected:function(r){r.firstChild.children[0]&&r.firstChild.children[0].style.removeProperty("opacity")},getValue:function(r,i){return i||null},getText:function(r,i){return i?i.alt:null},getChildNode:function(r,i){const a=document.createElement("span");if(!i||!i.value)return a;a.style.display="flex",a.style.alignItems="center",a.style.position="relative",a.style.overflow="hidden",a.style.width="100%";const c=document.createElement("img"),m=document.createElement("span");return c.style.width="100%",c.style.zIndex="1",c.src=i.value.src,c.alt=i.text,m.style.position="absolute",m.style.fontSize="12px",$s(dn(un.component.getGrid(r).getGridInfo().cssInfo.selectCellBackColor))?m.style.color="black":m.style.color="white",m.style.textAlign="left",m.style.display="inline-block",m.style.width="100%",m.style.whiteSpace="normal",m.style.wordBreak="break-all",m.textContent=i.text,c.gridId=r,c.cellRow=i.rowIndex,c.cellCol=i.colIndex,a.append(c),a.append(m),a.addEventListener("click",function(C){un.component.getGrid(r).setTargetCell(C.target.cellRow,C.target.cellCol)}),a.addEventListener("dblclick",function(C){un.component.getGrid(r).editCell(C.target.cellRow,C.target.cellCol)}),a},getEditor:function(r,i,a,c,m){if(!a.value)return null;const C=document.createElement("input");return C.setAttribute("type","text"),C.style.width=r.offsetWidth+"px",C.style.height=r.scrollHeight+C.offsetHeight-C.clientHeight+"px",C.style.position="absolute",C.style.zIndex="200",C.value=a.text,C.addEventListener("keydown",function(L){switch(L.key){case"Enter":c(),L.stopPropagation(),L.preventDefault();break;case"Escape":m(),L.stopPropagation(),L.preventDefault();break;case"Tab":c(),L.stopPropagation(),L.preventDefault();break;case"F2":c(),L.stopPropagation(),L.preventDefault();break}}),C},getEditedValue:function(r,i,a){if(!a.value)return null;const c=a.value;return c.alt=r.value,c},getFilterValue:function(r,i){return i?"title : "+i.alt:null},getSortValue:function(r,i){return i?i.alt:null},getCopyValue:function(r,i){return i?i.alt:null},getPasteValue:function(r,i,a){if(!i.value)return null;const c=i.value;return c.alt=a,c}},radio:{cellStyle:{justifyContent:"center",textAlign:"center"},onSelectedAndKeyDown:function(r,i,a){return(r.key==="Enter"||r.key===" ")&&(un.component.getGrid(i).setColSameValue(a.colIndex,"N",!0),un.component.getGrid(i).setCellValue(a.rowIndex,a.colIndex,"Y",!0),r.stopPropagation(),r.preventDefault()),!1},onClick:function(r,i,a){un.component.getGrid(i).setColSameValue(a.colIndex,"N",!0),un.component.getGrid(i).setCellValue(a.rowIndex,a.colIndex,"Y",!0)},getValue:function(r,i){return i},getText:function(r,i){return i==="Y"?"true":"false"},getChildNode:function(r,i){const a=document.createElement("input");return a.setAttribute("type","radio"),a.setAttribute("name",i.name?i.name:i.colIndex),a.setAttribute("value",""+i.rowIndex),a._gridId=r,a.rowIndex=i.rowIndex,a.colIndex=i.colIndex,a.checked=i.value==="Y",a},getFilterValue:function(r,i){return i==="Y"?"●":"○"}},tree:{cellStyle:{justifyContent:"left",textAlign:"left"},getValue:function(r,i){return i.constructor===Object?i:{title:i,toggle:!1}},getText:function(r,i){return i?i.title:null},getChildNode:function(r,i){if(!i.value)return document.createElement("span");const a=document.createElement("div");a.style.width="100%";const c=document.createElement("span");c.textContent=i.text,c.style.display="inline-block",c.style.marginLeft="10px",c.style.maxWidth="90%",c.style.overflow="hidden",c.style.textOverflow="ellipsis",c.addEventListener("click",D=>{L(D,r,i)});const m=document.createElement("span");m.classList.add("far"),i.value.toggle?m.textContent="-":m.textContent="+",m.style.fontSize="0.85em",m.addEventListener("click",D=>{L(D,r,i)});const C=un.component.getGrid(r);i.colIndex+1<=C.getColCount()&&C.getCellDataType(i.rowIndex,i.colIndex+1)!=="tree"&&(i.value.toggle?C.setCellDataType(i.rowIndex,i.colIndex+1,C.getColDataType(i.colIndex+1)):C.setCellDataType(i.rowIndex,i.colIndex+1,"none"));for(let D=i.colIndex;D>3;D--)if(C.getCellDataType(i.rowIndex,D)==="tree"){const W=C.getCellValue(i.rowIndex,D-1);W&&!W.toggle&&(c.textContent="...");break}(i.rowIndex===1||i.rowIndex>1&&C.getCellText(i.rowIndex-1,i.colIndex)!==i.text)&&(a.append(m),a.append(c));function L(D,W,K){const X=un.component.getGrid(W),ee=!K.value.toggle;function re(ye,xe){let ke;const ve=X.getCellText(ye,xe);if(ye===1)ke=ye;else for(let Me=ye;Me>1;Me--)if(X.getCellText(Me,xe)===ve){ke=Me;break}const Ee={title:ve,toggle:!0};for(let Me=ke;Me<=X.getRowCount()&&ve===X.getCellText(Me,xe);Me++)if(X.setCellValue(Me,xe,Ee),Me!==ke)X.getCellDataType(Me,xe+1)==="tree"?(Me===1||X.getCellText(Me,xe+1)!==X.getCellText(Me-1,xe+1))&&X.setRowVisible(Me,!0):X.setRowVisible(Me,!0);else for(let Ie=xe+1;Ie<=X.getColCount();Ie++)if(X.getCellDataType(Me,Ie)==="tree"){X.setCellValue(Me,Ie,X.getCellValue(Me,Ie));break}}function fe(ye,xe){let ke=ye;const ve=X.getCellText(ye,xe);if(ve)for(let Ee=ke;Ee<=X.getRowCount()&&ve===X.getCellText(Ee,xe);Ee++){Ee!==ke&&X.setRowVisible(Ee,!1);for(let Me=xe;Me<=X.getColCount();Me++)if(X.getCellDataType(Ee,Me)==="tree"){const Ie=X.getCellValue(Ee,Me);Ie&&(Ie.toggle=!1,X.setCellValue(Ee,Me,Ie))}}}if(ee)for(let ye=K.colIndex;ye>2;ye--)re(K.rowIndex,ye);else fe(K.rowIndex,K.colIndex)}return a}},none:{getChildNode:function(r,i){return document.createElement("span")}}};const n=mn.defaults;return{dateFormat:en.DateFormat["yyyy-MM-dd"],timeFormat:en.TimeFormat["HH:mm:ss"],datetimeFormat:en.DateTimeFormat["yyyy-MM-dd HH:mm:ss"],yearFormat:en.YearFormat.yyyy,monthFormat:en.MonthFormat.M,yearMonthFormat:en.YearMonthFormat["yyyy-MM"],dayFormat:en.DayFormat.d,dayOfWeekFormat:en.DayOfWeekFormat.d,hourFormat:en.HourFormat.h,hourMinuteFormat:en.HourMinuteFormat["hh:mm"],minuteFormat:en.MinuteFormat.m,secondFormat:en.SecondFormat.s,numberFormat:"#,##0.##",LESSOREQ_0X7FF_BYTE:2,LESSOREQ_0XFFFF_BYTE:3,GREATER_0XFFFF_BYTE:4,shieldURL:"",exposeIpList:["0:0:0:0:0:0:0:1"],isFreeze:!0,isPossibleGoBack:!1,isPossibleOpenDevTool:!1,doDetectDevTool(){},convertValue(r){return r},protocol:"http://",domain:"localhost:8080",controllerPath:"/hison-api-link",timeout:1e4,webSocketProtocol:"ws://",webSocketEndPoint:"/hison-websocket-endpoint",cachingLimit:10,beforeGetRequest(r,i){return!0},beforePostRequest(r,i){return!0},beforePutRequest(r,i){return!0},beforePatchRequest(r,i){return!0},beforeDeleteRequest(r,i){return!0},afterGetRequest(r){return!0},afterPostRequest(r){return!0},afterPutRequest(r){return!0},afterPatchRequest(r){return!0},afterDeleteRequest(r){return!0},beforeGetUrlRequest(r,i){return!0},beforePostUrlRequest(r,i,a){return!0},beforePutUrlRequest(r,i,a){return!0},beforePatchUrlRequest(r,i,a){return!0},beforeDeleteUrlRequest(r,i,a){return!0},afterGetUrlRequest(r){return!0},afterPostUrlRequest(r){return!0},afterPutUrlRequest(r){return!0},afterPatchUrlRequest(r){return!0},afterDeleteUrlRequest(r){return!0},interceptApiResult(r,i){return!0},interceptApiError(r){return!0},component:{note:t,grid:e,chart:n,filesetTotalSize:1/0,filesetSize:1/0},componentStyle:{size:lo.m,filledColor:Bi,emptyColor:md,filledTextColor:Za,emptyTextColor:Ja,primaryColor:Bi,mutedColor:cd,infoColor:dd,successColor:ud,dangerColor:fd,warningColor:hd,invertColor:!1,minHeightS:1.7,minHeightM:2,minHeightL:2.3,minHeightXL:2.6,fontSizeS:.8,fontSizeM:.9,fontSizeL:1,fontSizeXL:1.1},event:{cssEvent:{textbox_onBeforeFocus:r=>!0,textbox_onAfterFocus:r=>{},textbox_onBeforeBlur:r=>!0,textbox_onAfterBlur:r=>{},textbox_onBeforeClick:r=>!0,textbox_onAfterClick:r=>{},textbox_onBeforeMouseover:r=>!0,textbox_onAfterMouseover:r=>{},textbox_onBeforeMouseout:r=>!0,textbox_onAfterMouseout:r=>{},textbox_onBeforeTouchstart:r=>!0,textbox_onAfterTouchstart:r=>{},textbox_onBeforeTouchend:r=>!0,textbox_onAfterTouchend:r=>{},button_onBeforeFocus:r=>!0,button_onAfterFocus:r=>{},button_onBeforeBlur:r=>!0,button_onAfterBlur:r=>{},button_onBeforeClick:r=>!0,button_onAfterClick:r=>{},button_onBeforeMouseover:r=>!0,button_onAfterMouseover:r=>{},button_onBeforeMouseout:r=>!0,button_onAfterMouseout:r=>{},button_onBeforeTouchstart:r=>!0,button_onAfterTouchstart:r=>{},button_onBeforeTouchend:r=>!0,button_onAfterTouchend:r=>{},input_onBeforeFocus:r=>!0,input_onAfterFocus:r=>{},input_onBeforeBlur:r=>!0,input_onAfterBlur:r=>{},input_onBeforeMouseover:r=>!0,input_onAfterMouseover:r=>{},input_onBeforeMouseout:r=>!0,input_onAfterMouseout:r=>{},input_onBeforeTouchstart:r=>!0,input_onAfterTouchstart:r=>{},input_onBeforeTouchend:r=>!0,input_onAfterTouchend:r=>{}}}}},gd=()=>{const t=ce.componentStyle;t.primaryColor=t.primaryColor?dn(t.primaryColor):Bi,t.mutedColor=t.mutedColor?dn(t.mutedColor):cd,t.infoColor=t.infoColor?dn(t.infoColor):dd,t.successColor=t.successColor?dn(t.successColor):ud,t.dangerColor=t.dangerColor?dn(t.dangerColor):fd,t.warningColor=t.warningColor?dn(t.warningColor):hd,t.filledColor=t.filledColor?dn(t.filledColor):Bi,t.emptyColor=t.emptyColor?dn(t.emptyColor):md,t.filledTextColor=t.filledTextColor?dn(t.filledTextColor):Za,t.emptyTextColor=t.emptyTextColor?dn(t.emptyTextColor):Ja,t.primaryInvertColor=hn(t.primaryColor),t.mutedInvertColor=hn(t.mutedColor),t.infoInvertColor=hn(t.infoColor),t.successInvertColor=hn(t.successColor),t.dangerInvertColor=hn(t.dangerColor),t.warningInvertColor=hn(t.warningColor),t.filledInvertColor=hn(t.filledColor),t.emptyInvertColor=hn(t.emptyColor),t.filledTextInvertColor=hn(t.filledTextColor),t.emptyTextInvertColor=hn(t.emptyTextColor);const e=t.componentColor;vo(e.primary,t.invertColor?t.primaryInvertColor:t.primaryColor),vo(e.muted,t.invertColor?t.mutedInvertColor:t.mutedColor),vo(e.info,t.invertColor?t.infoInvertColor:t.infoColor),vo(e.success,t.invertColor?t.successInvertColor:t.successColor),vo(e.danger,t.invertColor?t.dangerInvertColor:t.dangerColor),vo(e.warning,t.invertColor?t.warningInvertColor:t.warningColor);const n=`
|
|
78
78
|
:root {
|
|
79
79
|
--hison-filledColor: ${t.invertColor?t.filledInvertColor:t.filledColor};
|
|
80
80
|
--hison-emptyColor: ${t.invertColor?t.emptyInvertColor:t.emptyColor};
|
|
@@ -150,4 +150,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
150
150
|
--hison-l-font-size: ${t.fontSizeL};
|
|
151
151
|
--hison-xl-font-size: ${t.fontSizeXL};
|
|
152
152
|
}
|
|
153
|
-
`.trim(),o="hisonvue-css-variables";let r=document.getElementById(o);r&&r.remove(),r=document.createElement("style"),r.id=o,r.textContent=n,document.head.appendChild(r)},Wy=(t,e)=>{qd(t,e),t.setMaxFilesetSize=o=>{ce.componentConfig.filesetSize=o},t.setMaxFilesetTotalSize=o=>{ce.componentConfig.filesetTotalSize=o},t.getMaxFilesetSize=()=>ce.componentConfig.filesetSize,t.getMaxFilesetTotalSize=()=>ce.componentConfig.filesetTotalSize,t.cssEvent={setButtonOnBefoerFocus(o){ce.event.cssEvent.button_onBeforeFocus=o},setButtonOnAfterFocus(o){ce.event.cssEvent.button_onAfterFocus=o},setButtonOnBefoerBlur(o){ce.event.cssEvent.button_onBeforeBlur=o},setButtonOnAfterBlur(o){ce.event.cssEvent.button_onAfterBlur=o},setButtonOnBefoerClick(o){ce.event.cssEvent.button_onBeforeClick=o},setButtonOnAfterClick(o){ce.event.cssEvent.button_onAfterClick=o},setButtonOnBeforeMouseover(o){ce.event.cssEvent.button_onBeforeMouseover=o},setButtonOnAfterMouseover(o){ce.event.cssEvent.button_onAfterMouseover=o},setButtonOnBeforeMouseout(o){ce.event.cssEvent.button_onBeforeMouseout=o},setButtonOnAfterMouseout(o){ce.event.cssEvent.button_onAfterMouseout=o},setButtonOnBeforeTouchstart(o){ce.event.cssEvent.button_onBeforeTouchstart=o},setButtonOnAfterTouchstart(o){ce.event.cssEvent.button_onAfterTouchstart=o},setButtonOnBeforeTouchend(o){ce.event.cssEvent.button_onBeforeTouchend=o},setButtonOnAfterTouchend(o){ce.event.cssEvent.button_onAfterTouchend=o},setInputOnBefoerFocus(o){ce.event.cssEvent.input_onBeforeFocus=o},setInputOnAfterFocus(o){ce.event.cssEvent.input_onAfterFocus=o},setInputOnBefoerBlur(o){ce.event.cssEvent.input_onBeforeBlur=o},setInputOnAfterBlur(o){ce.event.cssEvent.input_onAfterBlur=o},setInputOnBeforeMouseover(o){ce.event.cssEvent.input_onBeforeMouseover=o},setInputOnAfterMouseover(o){ce.event.cssEvent.input_onAfterMouseover=o},setInputOnBeforeMouseout(o){ce.event.cssEvent.input_onBeforeMouseout=o},setInputOnAfterMouseout(o){ce.event.cssEvent.input_onAfterMouseout=o},setInputOnBeforeTouchstart(o){ce.event.cssEvent.input_onBeforeTouchstart=o},setInputOnAfterTouchstart(o){ce.event.cssEvent.input_onAfterTouchstart=o},setInputOnBeforeTouchend(o){ce.event.cssEvent.input_onBeforeTouchend=o},setInputOnAfterTouchend(o){ce.event.cssEvent.input_onAfterTouchend=o}};const n=()=>{typeof window<"u"&&(gd(),gu())};t.style={setSize(o){ce.componentStyle.size=o,n()},setFilledColor(o){ce.componentStyle.filledColor=o,n()},setEmptyColor(o){ce.componentStyle.emptyColor=o,n()},setFilledTextColor(o){ce.componentStyle.filledTextColor=o,n()},setEmptyTextColor(o){ce.componentStyle.emptyTextColor=o,n()},setPrimaryColor(o){ce.componentStyle.primaryColor=o,n()},setMutedColor(o){ce.componentStyle.mutedColor=o,n()},setInfoColor(o){ce.componentStyle.infoColor=o,n()},setSuccessColor(o){ce.componentStyle.successColor=o,n()},setDangerColor(o){ce.componentStyle.dangerColor=o,n()},setWarningColor(o){ce.componentStyle.warningColor=o,n()},setInvertColor(o){ce.componentStyle.invertColor=o,n()},getFilledColor(){return ce.componentStyle.filledColor},getEmptyColor(){return ce.componentStyle.emptyColor},getFilledTextColor(){return ce.componentStyle.filledTextColor},getEmptyTextColor(){return ce.componentStyle.emptyTextColor},getPrimaryColor(){return ce.componentStyle.primaryColor},getPrimaryButtonColor(){return ce.componentStyle.componentColor.primary.buttonColor},getPrimaryBorderColor(){return ce.componentStyle.componentColor.primary.borderColor},getPrimaryShadowColor(){return ce.componentStyle.componentColor.primary.shadowColor},getPrimaryHoverColor(){return ce.componentStyle.componentColor.primary.hoverColor},getPrimaryActiveColor(){return ce.componentStyle.componentColor.primary.activeColor},getPrimaryRowHoverColor(){return ce.componentStyle.componentColor.primary.rowHoverColor},getPrimaryStripeColor(){return ce.componentStyle.componentColor.primary.stripeColor},getMutedColor(){return ce.componentStyle.mutedColor},getMutedButtonColor(){return ce.componentStyle.componentColor.muted.buttonColor},getMutedBorderColor(){return ce.componentStyle.componentColor.muted.borderColor},getMutedShadowColor(){return ce.componentStyle.componentColor.muted.shadowColor},getMutedHoverColor(){return ce.componentStyle.componentColor.muted.hoverColor},getMutedActiveColor(){return ce.componentStyle.componentColor.muted.activeColor},getMutedRowHoverColor(){return ce.componentStyle.componentColor.muted.rowHoverColor},getMutedStripeColor(){return ce.componentStyle.componentColor.muted.stripeColor},getInfoColor(){return ce.componentStyle.infoColor},getInfoButtonColor(){return ce.componentStyle.componentColor.info.buttonColor},getInfoBorderColor(){return ce.componentStyle.componentColor.info.borderColor},getInfoShadowColor(){return ce.componentStyle.componentColor.info.shadowColor},getInfoHoverColor(){return ce.componentStyle.componentColor.info.hoverColor},getInfoActiveColor(){return ce.componentStyle.componentColor.info.activeColor},getInfoRowHoverColor(){return ce.componentStyle.componentColor.info.rowHoverColor},getInfoStripeColor(){return ce.componentStyle.componentColor.info.stripeColor},getSuccessColor(){return ce.componentStyle.successColor},getSuccessButtonColor(){return ce.componentStyle.componentColor.success.buttonColor},getSuccessBorderColor(){return ce.componentStyle.componentColor.success.borderColor},getSuccessShadowColor(){return ce.componentStyle.componentColor.success.shadowColor},getSuccessHoverColor(){return ce.componentStyle.componentColor.success.hoverColor},getSuccessActiveColor(){return ce.componentStyle.componentColor.success.activeColor},getSuccessRowHoverColor(){return ce.componentStyle.componentColor.success.rowHoverColor},getSuccessStripeColor(){return ce.componentStyle.componentColor.success.stripeColor},getDangerColor(){return ce.componentStyle.dangerColor},getDangerButtonColor(){return ce.componentStyle.componentColor.danger.buttonColor},getDangerBorderColor(){return ce.componentStyle.componentColor.danger.borderColor},getDangerShadowColor(){return ce.componentStyle.componentColor.danger.shadowColor},getDangerHoverColor(){return ce.componentStyle.componentColor.danger.hoverColor},getDangerActiveColor(){return ce.componentStyle.componentColor.danger.activeColor},getDangerRowHoverColor(){return ce.componentStyle.componentColor.danger.rowHoverColor},getDangerStripeColor(){return ce.componentStyle.componentColor.danger.stripeColor},getWarningColor(){return ce.componentStyle.warningColor},getWarningButtonColor(){return ce.componentStyle.componentColor.warning.buttonColor},getWarningBorderColor(){return ce.componentStyle.componentColor.warning.borderColor},getWarningShadowColor(){return ce.componentStyle.componentColor.warning.shadowColor},getWarningHoverColor(){return ce.componentStyle.componentColor.warning.hoverColor},getWarningActiveColor(){return ce.componentStyle.componentColor.warning.activeColor},getWarningRowHoverColor(){return ce.componentStyle.componentColor.warning.rowHoverColor},getWarningStripeColor(){return ce.componentStyle.componentColor.warning.stripeColor},isInvertColor(){return ce.componentStyle.invertColor}},t.component={},t.component.getAccordion=o=>ce.component.accordionList[o],t.component.getBaggie=o=>ce.component.baggieList[o],t.component.getBanner=o=>ce.component.bannerList[o],t.component.getButton=o=>ce.component.buttonList[o],t.component.getCalendar=o=>ce.component.calendarList[o],t.component.getCaption=o=>ce.component.captionList[o],t.component.getChart=o=>ce.component.chartList[o],t.component.getDrawer=o=>ce.component.drawerList[o],t.component.getDropdown=o=>ce.component.dropdownList[o],t.component.getGap=o=>ce.component.gapList[o],t.component.getFileset=o=>ce.component.filesetList[o],t.component.getGrid=o=>ce.grid.getGrid(o),t.component.getImagebox=o=>ce.component.imageboxList[o],t.component.getInput=o=>ce.component.inputList[o],t.component.getInputGroup=o=>ce.component.inputGroupList[o],t.component.getLabel=o=>ce.component.labelList[o],t.component.getLayout=o=>ce.component.layoutList[o],t.component.getList=o=>ce.component.listList[o],t.component.getModal=o=>ce.component.modalList[o],t.component.getNote=o=>ce.note.getNote(o),t.component.getPagination=o=>ce.component.paginationList[o],t.component.getParagraph=o=>ce.component.paragraphList[o],t.component.getPopup=o=>ce.component.popupList[o],t.component.getSpinner=o=>ce.component.spinnerList[o],t.component.getTable=o=>ce.component.tableList[o]},yd=Bt(()=>Promise.resolve().then(()=>require("./HAccordion-yaZ0sBWj.js")),"HAccordion"),pd=Bt(()=>Promise.resolve().then(()=>require("./HBaggie-DhMiL1-B.js")),"HBaggie"),_d=Bt(()=>Promise.resolve().then(()=>require("./HBanner-CkIr-lzQ.js")),"HBanner"),vd=Bt(()=>Promise.resolve().then(()=>require("./HButton-CT0Az7ea.js")),"HButton"),bd=Bt(()=>Promise.resolve().then(()=>require("./HCalendar-C7RbTZT9.js")),"HCalendar"),Cd=Bt(()=>Promise.resolve().then(()=>require("./HCaption-DslrgN-4.js")),"HCaption"),Md=Bt(()=>Promise.resolve().then(()=>require("./HChart-Dw1BMCJS.js")),"HChart"),xd=Bt(()=>Promise.resolve().then(()=>require("./HDrawer-C8dvmJDK.js")),"HDrawer"),Sd=Bt(()=>Promise.resolve().then(()=>require("./HDropdown-mSEm-0ZC.js")),"HDropdown"),kd=Bt(()=>Promise.resolve().then(()=>require("./HFileset-Bu2-UdKj.js")),"HFileset"),Id=Bt(()=>Promise.resolve().then(()=>require("./HGap-DsJy_QnE.js")),"HGap"),Ed=Bt(()=>Promise.resolve().then(()=>require("./HGrid-1YUZ2y6u.js")),"HGrid"),wd=Bt(()=>Promise.resolve().then(()=>require("./HImagebox-r9i5w5WN.js")),"HImagebox"),Ad=Bt(()=>Promise.resolve().then(()=>require("./HInput-CcWTYayE.js")),"HInput"),Td=Bt(()=>Promise.resolve().then(()=>require("./HInputGroup-lVdHU36z.js")),"HInputGroup"),Bd=Bt(()=>Promise.resolve().then(()=>require("./HLabel-vkRYvApC.js")),"HLabel"),Ld=Bt(()=>Promise.resolve().then(()=>require("./HLayout-VCGeEX_T.js")),"HLayout"),Nd=Bt(()=>Promise.resolve().then(()=>require("./HList-T55xOKTU.js")),"HList"),Rd=Bt(()=>Promise.resolve().then(()=>require("./HModal-C4C4J9GA.js")),"HModal"),Hd=Bt(()=>Promise.resolve().then(()=>require("./HNote-RUUsRTzx.js")),"HNote"),Fd=Bt(()=>Promise.resolve().then(()=>require("./HPagination-BxRAk9Pi.js")),"HPagination"),Od=Bt(()=>Promise.resolve().then(()=>require("./HParagraph-B3VkXyh7.js")),"HParagraph"),Vd=Bt(()=>Promise.resolve().then(()=>require("./HPopup-Cnt1__JS.js")),"HPopup"),Pd=Bt(()=>Promise.resolve().then(()=>require("./HSpinner-CMZ2W-GY.js")),"HSpinner"),Dd=Bt(()=>Promise.resolve().then(()=>require("./HTable-Dx5l45_-.js")),"HTable"),ce={event:{cssEvent:{}}},un=en.createHison(),qy={install(t,e){const n=La();e?Object.keys(n).forEach(o=>{o in e||(e[o]=n[o])}):e=La(),Uy(e),Wy(un,e),typeof window<"u"&&gd(),jy(),t.provide("hison",un),t.component("HAccordion",yd),t.component("HBaggie",pd),t.component("HBanner",_d),t.component("HButton",vd),t.component("HCalendar",bd),t.component("HCaption",Cd),t.component("HChart",Md),t.component("HDrawer",xd),t.component("HDropdown",Sd),t.component("HFileset",kd),t.component("HGap",Id),t.component("HGrid",Ed),t.component("HImagebox",wd),t.component("HInput",Ad),t.component("HInputGroup",Td),t.component("HLabel",Bd),t.component("HLayout",Ld),t.component("HList",Nd),t.component("HModal",Rd),t.component("HNote",Hd),t.component("HPagination",Fd),t.component("HParagraph",Od),t.component("HPopup",Vd),t.component("HSpinner",Pd),t.component("HTable",Dd)}};exports.BACKGROUND_TYPE_VALUES=Mu;exports.BACK_IMAGE_ALIGN_VALUES=vu;exports.BACK_IMAGE_STYLE_VALUES=Cu;exports.BACK_IMAGE_VERTICAL_ALIGN_VALUES=bu;exports.BackImageAlign=Ks;exports.BackImageRepeat=Js;exports.BackImageVerticalAlign=Xs;exports.BackgroundType=Zs;exports.COLOR_SET_VALUES=Pu;exports.CSS_VAR_RE=uc;exports.Chart=mn;exports.Color=Ys;exports.DATA_STATUS_VALUES=zu;exports.DROPDOWN_TRIGGER_VALUES=Lu;exports.DataStatus=fc;exports.DayOfWeek=hc;exports.DropdownTrigger=sc;exports.EDIT_MODE_VALUES=Bu;exports.EditMode=lc;exports.GRID_ALIGN_VALUES=Ou;exports.GRID_DATE_FORMAT_VALUES=Hu;exports.GRID_MONTH_FORMAT_VALUES=Fu;exports.GRID_VERTICAL_ALIGN_VALUES=Vu;exports.HAccordionClientOnly=yd;exports.HBaggieClientOnly=pd;exports.HBannerClientOnly=_d;exports.HButtonClientOnly=vd;exports.HCalendarClientOnly=bd;exports.HCalendarTimeFormat=gc;exports.HCalendarView=mc;exports.HCaptionClientOnly=Cd;exports.HChartClientOnly=Md;exports.HDrawerClientOnly=xd;exports.HDropdownClientOnly=Sd;exports.HEX_COLOR_RE=dc;exports.HFilesetClientOnly=kd;exports.HGapClientOnly=Id;exports.HGapLine=rc;exports.HGapLineStyle=ic;exports.HGridClientOnly=Ed;exports.HImageboxClientOnly=wd;exports.HInputClientOnly=Ad;exports.HInputGroupClientOnly=Td;exports.HLabelClientOnly=Bd;exports.HLayoutClientOnly=Ld;exports.HListClientOnly=Nd;exports.HModalClientOnly=Rd;exports.HNoteClientOnly=Hd;exports.HPaginationClientOnly=Fd;exports.HParagraphClientOnly=Od;exports.HPopupClientOnly=Vd;exports.HSpinnerClientOnly=Pd;exports.HTableClientOnly=Dd;exports.H_CALENDAR_TIME_FORMAT_VALUES=Gu;exports.H_CALENDAR_VIEW_VALUES=Uu;exports.H_GAP_LINE_STYLE_VALUES=Au;exports.H_GAP_RULE_VALUES=wu;exports.Hisonjs_bundleExports=en;exports.INPUT_TYPE_VALUES=Tu;exports.InputType=ac;exports.MODAL_PLACEMENT_VALUES=xu;exports.ModalPlacement=Qs;exports.NOTE_MODE_BY_DEVICE_VALUES=ju;exports.SCREEN_POSITION_VALUES=Su;exports.SELECTION_POLICY_VALUES=Ru;exports.SPINNER_TYPE_VALUES=ku;exports.ScreenPosition=ec;exports.Size=lo;exports.SpinnerType=tc;exports.TEXT_ALIGN_VALUES=Nu;exports.TOOL_POSITION_VALUES=Wu;exports.TextAlign=cc;exports.VERTICAL_ALIGN_VALUES=Iu;exports.Vanillagrid2_bundleExports=Na;exports.Vanillanote2_bundleExports=Ra;exports.VerticalAlign=nc;exports.WHITE_SPACE_VALUES=Eu;exports.WhiteSpace=oc;exports.addComponentNameToClass=iu;exports.applyOpacityToRgba=fu;exports.extractPrefixedClasses=au;exports.extractResponsiveClasses=ru;exports.getDefaultHisonConfig=La;exports.getDigitsOnly=eu;exports.getHexCodeFromColorText=cu;exports.getIndexSpecificClassNameFromClassList=js;exports.getInvertColor=hn;exports.getMaskValue=Qd;exports.getRGBAFromColorText=du;exports.getSpecificClassValueFromClassList=ou;exports.getUUID=Xd;exports.hison=un;exports.hisonCloser=ce;exports.hisonvue=qy;exports.isCssColorLike=Du;exports.isNullOrUndefined=Kd;exports.normalizeToRgba=dn;exports.registerReloadable=hu;exports.reloadHisonComponent=yu;exports.toClassString=Ws;exports.unregisterReloadable=mu;exports.useDevice=Gy;
|
|
153
|
+
`.trim(),o="hisonvue-css-variables";let r=document.getElementById(o);r&&r.remove(),r=document.createElement("style"),r.id=o,r.textContent=n,document.head.appendChild(r)},Wy=(t,e)=>{qd(t,e),t.setMaxFilesetSize=o=>{ce.componentConfig.filesetSize=o},t.setMaxFilesetTotalSize=o=>{ce.componentConfig.filesetTotalSize=o},t.getMaxFilesetSize=()=>ce.componentConfig.filesetSize,t.getMaxFilesetTotalSize=()=>ce.componentConfig.filesetTotalSize,t.cssEvent={setButtonOnBefoerFocus(o){ce.event.cssEvent.button_onBeforeFocus=o},setButtonOnAfterFocus(o){ce.event.cssEvent.button_onAfterFocus=o},setButtonOnBefoerBlur(o){ce.event.cssEvent.button_onBeforeBlur=o},setButtonOnAfterBlur(o){ce.event.cssEvent.button_onAfterBlur=o},setButtonOnBefoerClick(o){ce.event.cssEvent.button_onBeforeClick=o},setButtonOnAfterClick(o){ce.event.cssEvent.button_onAfterClick=o},setButtonOnBeforeMouseover(o){ce.event.cssEvent.button_onBeforeMouseover=o},setButtonOnAfterMouseover(o){ce.event.cssEvent.button_onAfterMouseover=o},setButtonOnBeforeMouseout(o){ce.event.cssEvent.button_onBeforeMouseout=o},setButtonOnAfterMouseout(o){ce.event.cssEvent.button_onAfterMouseout=o},setButtonOnBeforeTouchstart(o){ce.event.cssEvent.button_onBeforeTouchstart=o},setButtonOnAfterTouchstart(o){ce.event.cssEvent.button_onAfterTouchstart=o},setButtonOnBeforeTouchend(o){ce.event.cssEvent.button_onBeforeTouchend=o},setButtonOnAfterTouchend(o){ce.event.cssEvent.button_onAfterTouchend=o},setInputOnBefoerFocus(o){ce.event.cssEvent.input_onBeforeFocus=o},setInputOnAfterFocus(o){ce.event.cssEvent.input_onAfterFocus=o},setInputOnBefoerBlur(o){ce.event.cssEvent.input_onBeforeBlur=o},setInputOnAfterBlur(o){ce.event.cssEvent.input_onAfterBlur=o},setInputOnBeforeMouseover(o){ce.event.cssEvent.input_onBeforeMouseover=o},setInputOnAfterMouseover(o){ce.event.cssEvent.input_onAfterMouseover=o},setInputOnBeforeMouseout(o){ce.event.cssEvent.input_onBeforeMouseout=o},setInputOnAfterMouseout(o){ce.event.cssEvent.input_onAfterMouseout=o},setInputOnBeforeTouchstart(o){ce.event.cssEvent.input_onBeforeTouchstart=o},setInputOnAfterTouchstart(o){ce.event.cssEvent.input_onAfterTouchstart=o},setInputOnBeforeTouchend(o){ce.event.cssEvent.input_onBeforeTouchend=o},setInputOnAfterTouchend(o){ce.event.cssEvent.input_onAfterTouchend=o}};const n=()=>{typeof window<"u"&&(gd(),gu())};t.style={setSize(o){ce.componentStyle.size=o,n()},setFilledColor(o){ce.componentStyle.filledColor=o,n()},setEmptyColor(o){ce.componentStyle.emptyColor=o,n()},setFilledTextColor(o){ce.componentStyle.filledTextColor=o,n()},setEmptyTextColor(o){ce.componentStyle.emptyTextColor=o,n()},setPrimaryColor(o){ce.componentStyle.primaryColor=o,n()},setMutedColor(o){ce.componentStyle.mutedColor=o,n()},setInfoColor(o){ce.componentStyle.infoColor=o,n()},setSuccessColor(o){ce.componentStyle.successColor=o,n()},setDangerColor(o){ce.componentStyle.dangerColor=o,n()},setWarningColor(o){ce.componentStyle.warningColor=o,n()},setInvertColor(o){ce.componentStyle.invertColor=o,n()},getFilledColor(){return ce.componentStyle.filledColor},getEmptyColor(){return ce.componentStyle.emptyColor},getFilledTextColor(){return ce.componentStyle.filledTextColor},getEmptyTextColor(){return ce.componentStyle.emptyTextColor},getPrimaryColor(){return ce.componentStyle.primaryColor},getPrimaryButtonColor(){return ce.componentStyle.componentColor.primary.buttonColor},getPrimaryBorderColor(){return ce.componentStyle.componentColor.primary.borderColor},getPrimaryShadowColor(){return ce.componentStyle.componentColor.primary.shadowColor},getPrimaryHoverColor(){return ce.componentStyle.componentColor.primary.hoverColor},getPrimaryActiveColor(){return ce.componentStyle.componentColor.primary.activeColor},getPrimaryRowHoverColor(){return ce.componentStyle.componentColor.primary.rowHoverColor},getPrimaryStripeColor(){return ce.componentStyle.componentColor.primary.stripeColor},getMutedColor(){return ce.componentStyle.mutedColor},getMutedButtonColor(){return ce.componentStyle.componentColor.muted.buttonColor},getMutedBorderColor(){return ce.componentStyle.componentColor.muted.borderColor},getMutedShadowColor(){return ce.componentStyle.componentColor.muted.shadowColor},getMutedHoverColor(){return ce.componentStyle.componentColor.muted.hoverColor},getMutedActiveColor(){return ce.componentStyle.componentColor.muted.activeColor},getMutedRowHoverColor(){return ce.componentStyle.componentColor.muted.rowHoverColor},getMutedStripeColor(){return ce.componentStyle.componentColor.muted.stripeColor},getInfoColor(){return ce.componentStyle.infoColor},getInfoButtonColor(){return ce.componentStyle.componentColor.info.buttonColor},getInfoBorderColor(){return ce.componentStyle.componentColor.info.borderColor},getInfoShadowColor(){return ce.componentStyle.componentColor.info.shadowColor},getInfoHoverColor(){return ce.componentStyle.componentColor.info.hoverColor},getInfoActiveColor(){return ce.componentStyle.componentColor.info.activeColor},getInfoRowHoverColor(){return ce.componentStyle.componentColor.info.rowHoverColor},getInfoStripeColor(){return ce.componentStyle.componentColor.info.stripeColor},getSuccessColor(){return ce.componentStyle.successColor},getSuccessButtonColor(){return ce.componentStyle.componentColor.success.buttonColor},getSuccessBorderColor(){return ce.componentStyle.componentColor.success.borderColor},getSuccessShadowColor(){return ce.componentStyle.componentColor.success.shadowColor},getSuccessHoverColor(){return ce.componentStyle.componentColor.success.hoverColor},getSuccessActiveColor(){return ce.componentStyle.componentColor.success.activeColor},getSuccessRowHoverColor(){return ce.componentStyle.componentColor.success.rowHoverColor},getSuccessStripeColor(){return ce.componentStyle.componentColor.success.stripeColor},getDangerColor(){return ce.componentStyle.dangerColor},getDangerButtonColor(){return ce.componentStyle.componentColor.danger.buttonColor},getDangerBorderColor(){return ce.componentStyle.componentColor.danger.borderColor},getDangerShadowColor(){return ce.componentStyle.componentColor.danger.shadowColor},getDangerHoverColor(){return ce.componentStyle.componentColor.danger.hoverColor},getDangerActiveColor(){return ce.componentStyle.componentColor.danger.activeColor},getDangerRowHoverColor(){return ce.componentStyle.componentColor.danger.rowHoverColor},getDangerStripeColor(){return ce.componentStyle.componentColor.danger.stripeColor},getWarningColor(){return ce.componentStyle.warningColor},getWarningButtonColor(){return ce.componentStyle.componentColor.warning.buttonColor},getWarningBorderColor(){return ce.componentStyle.componentColor.warning.borderColor},getWarningShadowColor(){return ce.componentStyle.componentColor.warning.shadowColor},getWarningHoverColor(){return ce.componentStyle.componentColor.warning.hoverColor},getWarningActiveColor(){return ce.componentStyle.componentColor.warning.activeColor},getWarningRowHoverColor(){return ce.componentStyle.componentColor.warning.rowHoverColor},getWarningStripeColor(){return ce.componentStyle.componentColor.warning.stripeColor},isInvertColor(){return ce.componentStyle.invertColor}},t.component={},t.component.getAccordion=o=>ce.component.accordionList[o],t.component.getBaggie=o=>ce.component.baggieList[o],t.component.getBanner=o=>ce.component.bannerList[o],t.component.getButton=o=>ce.component.buttonList[o],t.component.getCalendar=o=>ce.component.calendarList[o],t.component.getCaption=o=>ce.component.captionList[o],t.component.getChart=o=>ce.component.chartList[o],t.component.getDrawer=o=>ce.component.drawerList[o],t.component.getDropdown=o=>ce.component.dropdownList[o],t.component.getGap=o=>ce.component.gapList[o],t.component.getFileset=o=>ce.component.filesetList[o],t.component.getGrid=o=>ce.grid.getGrid(o),t.component.getImagebox=o=>ce.component.imageboxList[o],t.component.getInput=o=>ce.component.inputList[o],t.component.getInputGroup=o=>ce.component.inputGroupList[o],t.component.getLabel=o=>ce.component.labelList[o],t.component.getLayout=o=>ce.component.layoutList[o],t.component.getList=o=>ce.component.listList[o],t.component.getModal=o=>ce.component.modalList[o],t.component.getNote=o=>ce.note.getNote(o),t.component.getPagination=o=>ce.component.paginationList[o],t.component.getParagraph=o=>ce.component.paragraphList[o],t.component.getPopup=o=>ce.component.popupList[o],t.component.getSpinner=o=>ce.component.spinnerList[o],t.component.getTable=o=>ce.component.tableList[o]},yd=Bt(()=>Promise.resolve().then(()=>require("./HAccordion-nste-gIh.js")),"HAccordion"),pd=Bt(()=>Promise.resolve().then(()=>require("./HBaggie-D9XHuvli.js")),"HBaggie"),_d=Bt(()=>Promise.resolve().then(()=>require("./HBanner-B8DynVnX.js")),"HBanner"),vd=Bt(()=>Promise.resolve().then(()=>require("./HButton-eTsFKKnM.js")),"HButton"),bd=Bt(()=>Promise.resolve().then(()=>require("./HCalendar-Cq5zpcAr.js")),"HCalendar"),Cd=Bt(()=>Promise.resolve().then(()=>require("./HCaption-uIKYMMan.js")),"HCaption"),Md=Bt(()=>Promise.resolve().then(()=>require("./HChart-oEkG07OJ.js")),"HChart"),xd=Bt(()=>Promise.resolve().then(()=>require("./HDrawer-Cc3jqUlQ.js")),"HDrawer"),Sd=Bt(()=>Promise.resolve().then(()=>require("./HDropdown-CU3zKxJ3.js")),"HDropdown"),kd=Bt(()=>Promise.resolve().then(()=>require("./HFileset-BTxxYDz4.js")),"HFileset"),Id=Bt(()=>Promise.resolve().then(()=>require("./HGap-BWYEUzBg.js")),"HGap"),Ed=Bt(()=>Promise.resolve().then(()=>require("./HGrid-V2xOmqxp.js")),"HGrid"),wd=Bt(()=>Promise.resolve().then(()=>require("./HImagebox-Rjlk6PO-.js")),"HImagebox"),Ad=Bt(()=>Promise.resolve().then(()=>require("./HInput-DATgRssT.js")),"HInput"),Td=Bt(()=>Promise.resolve().then(()=>require("./HInputGroup-C5CCa_H8.js")),"HInputGroup"),Bd=Bt(()=>Promise.resolve().then(()=>require("./HLabel-Dn0SXEHh.js")),"HLabel"),Ld=Bt(()=>Promise.resolve().then(()=>require("./HLayout-BbYIgmYy.js")),"HLayout"),Nd=Bt(()=>Promise.resolve().then(()=>require("./HList-BbhTZa3d.js")),"HList"),Rd=Bt(()=>Promise.resolve().then(()=>require("./HModal-BuIgfi_-.js")),"HModal"),Hd=Bt(()=>Promise.resolve().then(()=>require("./HNote-h-lB6QZv.js")),"HNote"),Fd=Bt(()=>Promise.resolve().then(()=>require("./HPagination-CostpT0D.js")),"HPagination"),Od=Bt(()=>Promise.resolve().then(()=>require("./HParagraph-C_afHbvS.js")),"HParagraph"),Vd=Bt(()=>Promise.resolve().then(()=>require("./HPopup-BBpZXoYa.js")),"HPopup"),Pd=Bt(()=>Promise.resolve().then(()=>require("./HSpinner--MbdeUop.js")),"HSpinner"),Dd=Bt(()=>Promise.resolve().then(()=>require("./HTable-DI9-1vqI.js")),"HTable"),ce={event:{cssEvent:{}}},un=en.createHison(),qy={install(t,e){const n=La();e?Object.keys(n).forEach(o=>{o in e||(e[o]=n[o])}):e=La(),Uy(e),Wy(un,e),typeof window<"u"&&gd(),jy(),t.provide("hison",un),t.component("HAccordion",yd),t.component("HBaggie",pd),t.component("HBanner",_d),t.component("HButton",vd),t.component("HCalendar",bd),t.component("HCaption",Cd),t.component("HChart",Md),t.component("HDrawer",xd),t.component("HDropdown",Sd),t.component("HFileset",kd),t.component("HGap",Id),t.component("HGrid",Ed),t.component("HImagebox",wd),t.component("HInput",Ad),t.component("HInputGroup",Td),t.component("HLabel",Bd),t.component("HLayout",Ld),t.component("HList",Nd),t.component("HModal",Rd),t.component("HNote",Hd),t.component("HPagination",Fd),t.component("HParagraph",Od),t.component("HPopup",Vd),t.component("HSpinner",Pd),t.component("HTable",Dd)}};exports.BACKGROUND_TYPE_VALUES=Mu;exports.BACK_IMAGE_ALIGN_VALUES=vu;exports.BACK_IMAGE_STYLE_VALUES=Cu;exports.BACK_IMAGE_VERTICAL_ALIGN_VALUES=bu;exports.BackImageAlign=Ks;exports.BackImageRepeat=Js;exports.BackImageVerticalAlign=Xs;exports.BackgroundType=Zs;exports.COLOR_SET_VALUES=Pu;exports.CSS_VAR_RE=uc;exports.Chart=mn;exports.Color=Ys;exports.DATA_STATUS_VALUES=zu;exports.DROPDOWN_TRIGGER_VALUES=Lu;exports.DataStatus=fc;exports.DayOfWeek=hc;exports.DropdownTrigger=sc;exports.EDIT_MODE_VALUES=Bu;exports.EditMode=lc;exports.GRID_ALIGN_VALUES=Ou;exports.GRID_DATE_FORMAT_VALUES=Hu;exports.GRID_MONTH_FORMAT_VALUES=Fu;exports.GRID_VERTICAL_ALIGN_VALUES=Vu;exports.HAccordionClientOnly=yd;exports.HBaggieClientOnly=pd;exports.HBannerClientOnly=_d;exports.HButtonClientOnly=vd;exports.HCalendarClientOnly=bd;exports.HCalendarTimeFormat=gc;exports.HCalendarView=mc;exports.HCaptionClientOnly=Cd;exports.HChartClientOnly=Md;exports.HDrawerClientOnly=xd;exports.HDropdownClientOnly=Sd;exports.HEX_COLOR_RE=dc;exports.HFilesetClientOnly=kd;exports.HGapClientOnly=Id;exports.HGapLine=rc;exports.HGapLineStyle=ic;exports.HGridClientOnly=Ed;exports.HImageboxClientOnly=wd;exports.HInputClientOnly=Ad;exports.HInputGroupClientOnly=Td;exports.HLabelClientOnly=Bd;exports.HLayoutClientOnly=Ld;exports.HListClientOnly=Nd;exports.HModalClientOnly=Rd;exports.HNoteClientOnly=Hd;exports.HPaginationClientOnly=Fd;exports.HParagraphClientOnly=Od;exports.HPopupClientOnly=Vd;exports.HSpinnerClientOnly=Pd;exports.HTableClientOnly=Dd;exports.H_CALENDAR_TIME_FORMAT_VALUES=Gu;exports.H_CALENDAR_VIEW_VALUES=Uu;exports.H_GAP_LINE_STYLE_VALUES=Au;exports.H_GAP_RULE_VALUES=wu;exports.Hisonjs_bundleExports=en;exports.INPUT_TYPE_VALUES=Tu;exports.InputType=ac;exports.MODAL_PLACEMENT_VALUES=xu;exports.ModalPlacement=Qs;exports.NOTE_MODE_BY_DEVICE_VALUES=ju;exports.SCREEN_POSITION_VALUES=Su;exports.SELECTION_POLICY_VALUES=Ru;exports.SPINNER_TYPE_VALUES=ku;exports.ScreenPosition=ec;exports.Size=lo;exports.SpinnerType=tc;exports.TEXT_ALIGN_VALUES=Nu;exports.TOOL_POSITION_VALUES=Wu;exports.TextAlign=cc;exports.VERTICAL_ALIGN_VALUES=Iu;exports.Vanillagrid2_bundleExports=Na;exports.Vanillanote2_bundleExports=Ra;exports.VerticalAlign=nc;exports.WHITE_SPACE_VALUES=Eu;exports.WhiteSpace=oc;exports.addComponentNameToClass=iu;exports.applyOpacityToRgba=fu;exports.extractPrefixedClasses=au;exports.extractResponsiveClasses=ru;exports.getDefaultHisonConfig=La;exports.getDigitsOnly=eu;exports.getHexCodeFromColorText=cu;exports.getIndexSpecificClassNameFromClassList=js;exports.getInvertColor=hn;exports.getMaskValue=Qd;exports.getRGBAFromColorText=du;exports.getSpecificClassValueFromClassList=ou;exports.getUUID=Xd;exports.hison=un;exports.hisonCloser=ce;exports.hisonvue=qy;exports.isCssColorLike=Du;exports.isNullOrUndefined=Kd;exports.normalizeToRgba=dn;exports.registerReloadable=hu;exports.reloadHisonComponent=yu;exports.toClassString=Ws;exports.unregisterReloadable=mu;exports.useDevice=Gy;
|